forked from jl777/SuperNET
-
Notifications
You must be signed in to change notification settings - Fork 116
feat(hd_wallet): evm hd wallet and trezor #1979
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
140 commits
Select commit
Hold shift + click to select a range
921e281
wip: move hd_wallet.rs into a mod along with storage
shamardy 83ade83
move hd_confirm_address.rs to hd_wallet mod
shamardy 64932d9
move hd_pubkey.rs to hd_wallet mod
shamardy edfc928
remove hd prefix from file names in hd_wallet mod
shamardy bd5cfd4
wip: create hd_wallet mod to separate hd wallet functionalities from …
shamardy 73b8b84
make set_known_addresses_number to have a default implementation acro…
shamardy aadf904
rename NewAccountCreatingError to NewAccountCreationError
shamardy 975c6fa
return Self::Address instead of reference from HDAddressOps::address …
shamardy 4d6e468
derive copy for HDAccountAddressId + other refactors
shamardy 5114cc1
convert create_new_account to a generic function
shamardy 731b27c
remove address_format field from generic HDWallet impl
shamardy 8d7cf6d
move UtxoHDWallet and it's impl to utxo_hd_wallet.rs
shamardy 038e0bd
create HDCoinWithdrawOps and move get_withdraw_hd_sender to it and ma…
shamardy 1672197
wip: Add HDWallet derivation and implement HD coin ops for ETHCoin
shamardy 2d42b3e
refactor is_address_used impl for ETHAddressScanner
shamardy 7658417
move scan_for_new_addresses_impl to lp_coins.rs for now
shamardy e6b686e
enable account_balance, get_new_address, create_account, scan_for_new…
shamardy e8add69
create eth_hd_wallet.rs and move eth hd wallet types and implementati…
shamardy 30080bb
make extract_extended_pubkey function common for all coins
shamardy e842165
do concurrent call for addresses balances
shamardy dd1d4c0
remove address EthCoinImpl since it's included in derivation_method, …
shamardy ad18db8
Merge remote-tracking branch 'origin/dev' into evm-hd-wallet
shamardy 3ff7e3e
wip: enable eth hd wallet on coin initialization
shamardy ce4a337
Merge remote-tracking branch 'hd-account-balance' into evm-hd-wallet
shamardy f30842b
Original source for UDP transport to connect to Trezor emulator
76c8cc9
added modifications to udp.rs to integrate it
d47a43f
add tests for withdraw from witness and p2pkh with trezor, add trezor…
a76b189
refactor trezor ConnectableDeviceWrapper (use borrow instead of consu…
8e56aa9
add support for trezor evm initialisation with rpc task manager and w…
2d2894a
fix fmt
599e60a
remove unused commented code
9a39110
add Result to pubkey_from_xpub_str
1d8df3c
dispose extra chain_id replay protection, fix trimming zeros for trez…
aed8ef8
change amount in trezor test
da9c6a5
add error check of signature v created by trezor
719bff0
fix chunk length calc for trezor eth tx request
1b7993a
fix target all for bip32 lib for trezor
b0e2f58
add trezor eth network definitions structs
b4ccf3f
fix deadcode clippy
c9a6f5c
fix clippy errors
1c9fa22
add pin input in test trezor init loop, remove unsupported trezor tests
d17e605
move trezor tests in a module
7cbc46e
fix wasm build
958617c
added: init_enable_eth rpc set, check to disable init eth trezor in n…
e0a4565
fix fmt
da421b4
remove unused comments
bd4ec47
refactor xpub extraction by checking coin type
00aa339
add test code to try create new eth acc with trezor
10bfef1
fix eth gap_limit
4988565
fix getting address for derivation_path in eth withdraw for trezor
56fba06
allow eth withdraw from default account (no 'from' set) for trezor
3004711
fix clippy warnings
134c2e9
fix fmt
ddcb180
change get_enabled_address() to return HDAddress
1569184
change eth withdraw build to use cached from address (instead getting…
c7e5971
fix eth withdraw wasm build of refactored code
ff45c04
fix fmt
3925fe5
fix eth withdraw test mock
ad4cec8
fix fmt
6e664a9
fix eth withdraw test mock
055f9be
reorg imports
0e845bb
remove extra pub
bfe7a29
eliminate activated_pubkey in Trezor privkey policy; fix address for …
29b7835
mark unused trezor proto impl function as reserved for future
75c75a6
fix fmt
b98d380
fix default privkey policy in test helper activation request
fc6ec8d
Merge remote-tracking branch 'hd-account-balance' into evm-hd-wallet
shamardy 52f9d91
Fix HDAddressOps::Address trait bounds
shamardy a1a0a43
Fix todo comments
shamardy 63def73
Merge remote-tracking branch 'hd-account-balance' into evm-hd-wallet
shamardy 5896b77
Merge branch 'evm-hd-wallet' into evm-hd-wallet-trezor
7d55c88
fix review notes: update signing status, get_public_key() return, sig…
950e349
fix fmt
049f025
refactor old DerivationMethod struct
1f897d7
new and refactor eth tests:
75ecef0
Merge remote-tracking branch 'hd-account-balance' into evm-hd-wallet
shamardy 7f50a64
Merge remote-tracking branch 'evm-hd-wallet' into evm-hd-wallet-trezor
shamardy 31295f3
Refactor EthPrivKeyBuildPolicy conversion and error handling in eth.rs
shamardy a4ac2ca
move eth on_generating_transaction after to and from address are checked
shamardy 50e7933
add todo to add trezor to detect_priv_key_policy
shamardy 58ca5f7
Remove JST distributor and related functions from eth/for_tests.rs
shamardy b520897
fix and remove some attributes
shamardy df2fa11
minor refactors
shamardy 7481338
Removed the UnexpectedDerivationMethod variant from WithdrawError enu…
shamardy a0c33fd
Updated the to_response method in DerivationMethod enum in mm2src/coi…
shamardy c90489d
use for-tests feature for test_create_new_account_init_loop
shamardy 504bd5e
Refactor coin activation statuses names
shamardy 3dad3bf
fix `ETH_NETWORK_DEFS` typo and minor refactors
shamardy 28bbba7
fix task_handle in re enable platform coin
097ba56
fix trezor tests for updated rpc_mode param
faa15e9
Merge remote-tracking branch 'hd-account-balance' into evm-hd-wallet
shamardy efb9c31
update todo comment about CoinAssocTypes::my_addr for HD wallet
shamardy 185dbb0
Merge remote-tracking branch 'evm-hd-wallet' into evm-hd-wallet-trezor
shamardy 4ca5491
Merge pull request #2005 from KomodoPlatform/evm-hd-wallet-trezor
shamardy 95675c1
fix HDAddressBalanceScanner to use transaction count and balance
shamardy c538bb5
EVM HD Wallet balance streaming
shamardy d085af1
* implement CoinAssocTypes::my_addr for utxo hd wallet
shamardy d28042d
add init_token and implement it for EthCoin
shamardy 49f2805
fix is_address_used for evm to check for both platform and tokens bal…
shamardy b35b7fb
use task_handle to update init erc20 task status
shamardy 3233549
Fix eth_with_tokens response without creating a new trait for init_pl…
shamardy cf83e9b
fix backward compatibility issues
shamardy 318c39c
Remove todos that are not needed anymore
shamardy be0acb0
make nonce lock per address
shamardy 160dcda
Include token contract address, platform_coin, required_confirmations…
shamardy ef359ca
Better handle EnableCoinBalanceError
shamardy 6b3fb5f
wip: doc comments
shamardy ffd0c96
complete doc comments
shamardy 37e2b71
fix: insert platform ticker as a token only once for balance events
shamardy 8660392
fix: make evm balance streaming error per address, add BalanceData an…
shamardy d2eaa17
fix: doc comments
shamardy 846c22a
fix: use my addresses outside get_all_balance_results_concurrently to…
shamardy 3c2e77d
fix: rename eth xpub ectractor status function and move to a common file
shamardy 2a9e790
fix: doc comment of InitTokenActivationOps
shamardy 7b81206
fix: rename erc20 xpub extractor status function and move to a common…
shamardy d9777af
fix: make confirm_address works for ethereum
shamardy dc6ef2a
fix: add some comments to explain why Address::default() is used for …
shamardy ee8ecf3
fix: Remove unused comment on get_eth_address and add doc comment for…
shamardy 503aafb
fix: remove parameters from doc comments
shamardy 09c1260
fix: rename all instances of BalanceMap to BalanceObject
shamardy def7e33
fix: make `chain_id` non-optional in `EthCoinImpl`
shamardy a0650d2
fix: fix failing eth tests due to chain_id not found:
shamardy 681d5e4
fix: set proper chain id for some hardcoded configs in tests
shamardy afffe8b
Merge remote-tracking branch 'origin/hd-account-balance' into evm-hd-…
shamardy 9de56f0
post-merge fix: fix z_balance_streaming.rs imports
shamardy fb1ccd7
fix: Rename common fn `extract_extended_pubkey` to `extract_extended_…
shamardy faaae10
fix: document `ExtractExtendedPubkey` trait
shamardy 26cca4b
fix: rename `my_addresses` to `all_addresses` add it to `CoinWithDeri…
shamardy 2201300
fix: map `EthActivationV2Error::ChainIdNotSet` to `EnablePlatformCoin…
shamardy 2d8b0e2
fix: create a common registry for events and error events of the stre…
shamardy 9462346
Merge remote-tracking branch 'origin/hd-account-balance' into evm-hd-…
shamardy b1d6d62
post-merge fixes: reduce arguments in sign_and_send_transaction
shamardy 2017c22
post-merge test fixes: fix test_buy_conf_settings by adding chain_id …
shamardy 031add3
post-merge fixes:
shamardy 8e59228
post-merge test fixes: fix docker tests
shamardy 8c41e55
post-merge test fixes:
shamardy 66673b7
post-merge test fixes: fix fmt
shamardy b9890e6
post-merge test fixes: unignore swap_usdc_ibc_with_nimda test after t…
shamardy 862476c
post-merge test fixes: increase WASM_BINDGEN_TEST_TIMEOUT to 420 and …
shamardy ff28b4b
post-merge test fixes: fix some issues in swap watcher test, some tes…
shamardy File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -17,6 +17,7 @@ enable-solana = [ | |
| ] | ||
| default = [] | ||
| run-docker-tests = [] | ||
| for-tests = [] | ||
|
|
||
| [lib] | ||
| name = "coins" | ||
|
|
||
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.