forked from jl777/SuperNET
-
Notifications
You must be signed in to change notification settings - Fork 118
feat(eth-swap): eth tpu v2 methods, eth docker test enhancements #2169
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
273 commits
Select commit
Hold shift + click to select a range
e94fac7
provide UrlSignWrapper structure
laruh 2e8c662
additionally include chain field into UrlSignWrapper
laruh 0fbf75d
increase erc721 tx confirmation time to 150, add more logs
laruh 03860e1
review: use map_err for generate_gui_auth_signed_validation, doc comm…
laruh b8b05d1
proxy: send regular http post request to proxy for nft feature
laruh 3de2b92
make erc721 and erc1155 time locks different in tests
laruh f2625fd
Merge remote-tracking branch 'refs/remotes/origin/dev' into standalon…
laruh 930a593
Merge remote-tracking branch 'refs/remotes/origin/dev' into standalon…
laruh 350abd6
review: impl lock_coins() to keep coins field in CoinsContext private
laruh 36eaf38
review: rename Gui-Auth types to align with new names in the KomodoDe…
laruh 4478ccb
review: use "http-rustls-tls" feature in web3 crate for tests
laruh 7882e6e
review: send Http GET request to activate NFT
laruh d03b6d1
review: support GET requests to KomodoDeFi Proxy layer and to 3rd API…
laruh ff92a20
impl build_and_send_request func to avoid code repetition
laruh a2c47f8
review: panic in wait_for_geth_node_ready if Deth node is not ready a…
laruh d6cbfd8
Merge remote-tracking branch 'refs/remotes/origin/dev' into standalon…
laruh 9c3ff07
merge: fmt, log tx_hash() in NFT payments instead of bytes, import et…
laruh 0bedba3
send only signed message as header in nft
laruh 7976761
Merge remote-tracking branch 'refs/remotes/origin/dev' into standalon…
laruh a6ad6fc
wip: refund_nft_maker_payment_v2
laruh 5daf723
wip: refund_nft_maker_payment_v2_secret
laruh 2daec7a
test send_send_and_refund_erc721_maker_payment_timelock ignoring ERC1155
laruh 6992931
log info in send_send_and_refund_erc721_maker_payment_timelock
laruh 3f07f1f
log token_id=2 send_send_and_refund_erc721_maker_payment_timelock
laruh 0079362
test only refund_nft_maker_payment_v2_timelock
laruh 0c164fb
test only refund_nft_maker_payment_v2_timelock
laruh 63af2bc
use global_nft_with_random_privkey in send_send_and_refund_erc721_mak…
laruh e2f8ccf
call maker_global_nft.refund_nft_maker_payment_v2_timelock
laruh dad6988
use get_erc712_owner func in refund erc721 test
laruh 9b1a700
add geth_ prefix to Address functions in eth tests
laruh fc4d6e4
impl [test] send_send_and_refund_erc1155_maker_payment_timelock
laruh cc8e78e
test the refund payment with taker secret
laruh 87b297a
use Geth node for swap tests
laruh 780b1e8
reduce code duplication
laruh f789e91
provide NftSwapInfo type
laruh aa1d70f
use coins config file for NFT activation
laruh b9f2a98
reduce code duplication using `validate_state` func
laruh ece5152
refactor Quicknode HTTP request: move `signed_message` to header
laruh 920861e
tests: increase wait for confirm time and add sleep duration
laruh e478711
eth tpu v2: deploy maker and taker swap v2 contracts in tests. add ma…
laruh 9803fd5
eth tpu v2: dont include "nft_maker_swap_v2_contract" in eth/erc20 ac…
laruh 2828be0
eth tpu v2: provide init_watchers_swap_contract in swap_watcher_tests.rs
laruh 04d99e4
eth tpu v2: impl TakerCoinSwapOpsV2 for EthCoin, send_taker_funding WIP
laruh d31566d
eth_docker_tests.rs change sleep Duration in some tests
laruh 4064999
eth tpu v2: impl TakerCoinSwapOpsV2 for EthCoin WIP
laruh b986279
Merge remote-tracking branch 'refs/remotes/origin/dev' into nft-refun…
laruh e636da1
avoid code duplication in input_tokens vector
laruh 40ffb65
review: rename validate_state fnc, use extend plus chain in etomic_sw…
laruh 888108c
review: move contract bytes strings to txt files, remove "the"
laruh 8143cc2
review: move code to EthCoinType::Nft arm
laruh b391a16
state machine: fix log info text related to sign_and_send_taker_fundi…
laruh 5f34f1c
Merge remote-tracking branch 'refs/remotes/origin/dev' into standalon…
laruh e672485
review: provide log!, instead println! in tests
laruh 986c5e7
Merge remote-tracking branch 'refs/remotes/origin/standalone-nft-make…
laruh d998062
review: swap part of ERC1155 nfts in eth_docker_tests.rs
laruh ff4d306
eth tpu v2: leave comms about preimages
laruh 2ae0b04
eth tpu v2: use Public from ethereum_types in impl ParseCoinAssocType…
laruh 0d54567
Merge remote-tracking branch 'refs/remotes/origin/dev' into standalon…
laruh 602206d
Merge remote-tracking branch 'refs/remotes/origin/standalone-nft-make…
laruh 604d182
change sleep duration in send_and_spend_erc721_maker_payment
laruh 36d94b9
change sleep duration in send_and_refund_erc721_maker_payment_timeloc…
laruh ce6673b
change sleep duration in send_and_refund_erc721_maker_payment_timelock
laruh 933d4b9
change sleep duration in send_and_refund_erc1155_maker_payment_timelock
laruh 1e90600
eth tpu v2: add swap_v2_contracts Opt param in EthActivationV2Request…
laruh b9049bf
state machine: change doc comment related to sign_and_send_taker_fund…
laruh 8e4cd71
eth tpu v2: send_taker_funding Erc20 WIP (need to optimize code)
laruh 4e9f902
change sleep duration in send_and_refund_erc721_maker_payment_timelock
laruh 801a688
Merge remote-tracking branch 'refs/remotes/origin/dev' into standalon…
laruh 1e050d2
fmt code after merge
laruh 2447763
Merge remote-tracking branch 'refs/remotes/origin/standalone-nft-make…
laruh fa3f553
fix merge conflicts
laruh eddeb1a
make "proxy_auth" Optional
laruh 7cbb941
Merge remote-tracking branch 'refs/remotes/origin/dev' into standalon…
laruh 87cc404
Merge remote-tracking branch 'refs/remotes/origin/standalone-nft-make…
laruh 49c1450
eth docker tests: use eth_coin_from_conf_and_request_v2 func in globa…
laruh 5971601
eth docker tests: set global MM_CTX in set_coin_type
laruh 647f425
eth docker tests: init global MM_CTX1 with config
laruh af70871
eth docker tests: change sleep duration
laruh ceeaac5
eth tpu v2: refund_taker_funding_secret ETH part
laruh bb39b36
eth tpu v2: refund_taker_funding_secret ETH and ERC20 parts impl
laruh ac38aea
eth tpu v2: send_and_refund_taker_funding_by_secret ETH/ERC20 tests. …
laruh c64af3b
eth tpu v2: add wait_for_confirmations in send_and_refund_taker_fundi…
laruh bac63a9
eth tpu v2: use public_to_address function
laruh 5c0361f
fix typo and add now_sec()
laruh 49f435d
eth tpu v2: refund_taker_funding_timelock WIP
laruh b5861b0
eth tpu v2: replace RefundPaymentArgs by RefundTakerPaymentArgs in Ta…
laruh 2b24db6
change sleep Duration
laruh ae16a3c
eth tpu v2: refund_taker_funding_timelock_impl
laruh 01cd625
eth tpu v2: refactor refund_taker_funding_secret_impl
laruh 191b5f0
Merge remote-tracking branch 'origin/dev' into standalone-nft-maker-s…
laruh 734edbc
Merge remote-tracking branch 'origin/standalone-nft-maker-swap-contra…
laruh 7b69886
fmt and clippy
laruh 078fc5c
Merge remote-tracking branch 'origin/nft-refund-payment-geth' into nf…
laruh 603daa7
use `self.gas_limit` instead of `mod gas_limit` in eth_swap_v2.rs
laruh 99ec522
use EthGasLimit::default() in EthCoin set_coin_type
laruh b13ab34
Merge remote-tracking branch 'origin/dev' into nft-refund-payment-geth
laruh dab5bd9
fmt, clippy
laruh 42f6d37
test send_and_refund_taker_funding_timelock_eth WIP
laruh b3d0e12
Merge remote-tracking branch 'origin/nft-refund-payment-geth' into nf…
laruh 114637a
eth tpu v2: test send_and_refund_taker_funding_timelock_eth
laruh c924520
eth tpu v2: test send_and_refund_taker_funding_timelock_erc20
laruh 69d2fbe
doc comments
laruh cac2d0d
review: remove gas_limit module from eth_swap_v2.rs
laruh 2358c11
Merge remote-tracking branch 'origin/nft-refund-payment-geth' into nf…
laruh 071a1f6
review: use `etomic_swap_id` function
laruh 37031bd
Merge remote-tracking branch 'origin/nft-refund-payment-geth' into nf…
laruh b3c66bd
use etomic_swap_id in eth_swap_v2.rs, remove funding_time_lock from R…
laruh 439243a
review: use fixed size arrays
laruh ec59a27
Merge remote-tracking branch 'origin/nft-refund-payment-geth' into nf…
laruh ee9d9dc
review: use fixed size arrays
laruh b971ad8
update maker_swap_v2_bytes and taker_swap_v2_bytes
laruh c26c7a5
ignore tendermint tests
laruh c7e01d5
eth tpu v2 docker tests: balance check in send_and_refund_taker_fundi…
laruh 8719922
eth tpu v2 docker tests: balance check in refund by secret tests
laruh a7974a9
eth tpu v2 docker tests: add fill_erc20
laruh 472c34b
eth tpu v2 docker tests: change sleep duration, add `wait_for_confirm…
laruh 10b8f9b
eth tpu v2 docker tests: change sleep duration, increase wait for con…
laruh dc215ec
ignore tendermint tests
laruh 787a2b2
ignore nft, eth docker tests
laruh 9e353a6
add balance checks
laruh 351d538
ignore timelock and leave refund by secret
laruh e0e9126
more logs, add dexFee to eth_total_payment
laruh f2ac7ef
update taker_swap_v2_bytes
laruh fdb7fef
more logs
laruh 52d4ddf
init erc20
laruh 0d34688
provide 0 to send value in refund methods
laruh 7cd09ca
eth tpu v2: update ValidateTakerFundingArgs fields
laruh 14f86b7
leave only send_and_refund_taker_funding_by_secret_erc20 test
laruh 2ffe134
sepolia: fix swap id, test refund by secret and timelock
laruh fd504b1
remove balance logs
laruh c629d7a
review: provide eth total payment to sign_and_send_transaction
laruh 60f5432
Merge remote-tracking branch 'origin/nft-refund-payment-geth' into nf…
laruh ed08df9
review: fix typo
laruh 89e543f
review: update log to "Sent taker funding spend (taker payment)"
laruh 8c03854
Merge remote-tracking branch 'origin/nft-refund-payment-geth' into nf…
laruh cf1e0bf
allow check_eth_balance dead code in docker tests
laruh 28bc18a
review: remove legacy "derive_htlc_pubkey" function from swap_v2, use…
laruh 5901e74
Merge remote-tracking branch 'origin/nft-refund-payment-geth' into nf…
laruh 173dd33
fmt code
laruh 69a07a8
Merge remote-tracking branch 'origin/dev' into nft-refund-payment-geth
laruh 7570df7
gas limit: TODO about new consts and params for v2 calls
laruh 3042e60
todo burnFee support
laruh e1e2242
review: update doc comments for taker and maker secret hashes in Send…
laruh fcd394d
review: specify timelock doc comments for UTXO and smart contracts in…
laruh 6a231a3
review: remove wait_for_confirmation_until and use funding_time_lock …
laruh 45ac62b
Merge remote-tracking branch 'origin/nft-refund-payment-geth' into nf…
laruh 37845ac
todo note about gas_limit params for v2 calls
laruh e780280
fix clippy and provide sleep duration to test pre-approved timelock u…
laruh 8473304
erc20 tests on sepolia
laruh 84b8ad4
eth tpu v2: validate_taker_funding_impl WIP, provide validation in v2…
laruh cee5f61
eth tpu v2 tests: wait pending txs before validation call
laruh 10c6a14
eth tpu v2: remove premium from validate_payment_args
laruh d53bc66
eth tpu v2: use `is_positive` function for eth/erc20 amount
laruh 067b2ae
eth tpu v2 tests: add sleep Duration
laruh 9c157e5
remove dead_code, improve wait_pending_transactions log
laruh 027da95
change sleep duration
laruh c58808a
review: use Public::from_slice directly in parse_pubkey
laruh 1a5bf73
review: use public_to_address to get address from pubkey
laruh 4c8c425
Merge remote-tracking branch 'origin/nft-refund-payment-geth' into nf…
laruh d922395
review: use dex_fee plus payment_amount for eth_total_payment
laruh 5d6f943
review: use dex_fee plus payment_amount for eth_total_payment
laruh 27473bb
Merge remote-tracking branch 'origin/nft-refund-payment-geth' into nf…
laruh 2007a70
review: extract sign_and_send_transaction outside the if/else
laruh 5524dca
Merge remote-tracking branch 'origin/nft-refund-payment-geth' into nf…
laruh 9aca0d7
review: minify json
laruh 0ef082d
Merge remote-tracking branch 'origin/nft-refund-payment-geth' into nf…
laruh 2bf5294
eth tpu v2: impl validate_from_to_and_status func, additionally use i…
laruh 8a16714
eth tpu v2: change sleep duration in send_and_refund_taker_funding_by…
laruh 25074b8
eth tpu v2: validate_taker_funding swap method
laruh 95f21dd
eth tpu v2: prepare_taker_payment_approve_data.
laruh d0c038e
eth tpu v2: spend payment functionality, send_approve_and_spend_eth test
laruh 4ef88fa
eth tpu v2: log approve tx
laruh fac2d38
eth tpu v2: refactor spend functionality
laruh b2d6d4b
eth tpu v2: check payment state in approve
laruh 70dfcdc
eth tpu v2: use function.encode_input
laruh fe730fa
review: drop variables, return result value directly
laruh 4f8ef5b
Merge remote-tracking branch 'origin/nft-refund-payment-geth' into nf…
laruh a814575
eth tpu v2: use match self.coin_type for token_address in sign_and_br…
laruh bd41f9a
eth tpu v2 tests: try geth_send_approve_and_spend_eth
laruh d6e42c5
eth tpu v2: refactor spend. approve impls.
laruh 6949b7a
eth tpu v2 tests: send_and_refund_taker_funding_exceed_payment_timelo…
laruh 89cf307
eth tpu v2 tests: only send_and_refund_taker_funding_exceed_payment_t…
laruh 8df5c47
Merge remote-tracking branch 'origin/dev' into nft-refund-payment-get…
laruh 747e51e
fix code after merge
laruh ff00bf0
eth docker tests: remove `geth_send_approve_and_spend_eth`
laruh e5eef68
Revert "ignore tendermint tests"
laruh ddbcdba
Revert "ignore tendermint tests"
laruh dfc482d
Merge remote-tracking branch 'origin/dev' into nft-refund-payment-get…
laruh c5607d8
polish taker_payment_approve and sign_and_broadcast_taker_payment_spe…
laruh 8d33bfe
eth tpu v2: search_for_taker_funding_spend implemented
laruh 5e3e0fd
review fixes
laruh 8b8e0a5
use Arc mut
laruh 4e1352d
return old set_coin_type
laruh 467a421
review: create decoded variable within an inner scope, From<RefundTak…
laruh 284fc0f
use checked_add for eth_total_payment calculation
laruh 9f31649
review: change error type, move match coin_type to the top, update ma…
laruh 67e7f15
docker tests: add `search_for_taker_funding_spend` func in send_appro…
laruh 046dc32
move coin_type match at the beginning in search_for_taker_funding_spe…
laruh 303056f
more doc comments for swap v2 methods
laruh bf70525
wait_for_taker_payment_spend_impl WIP
laruh 0bae344
review: remove TakerRefundSecretArgs and reuse TakerRefundArgs
laruh e65f224
review: use checked_add and InvalidData
laruh 46dcbc1
eth tpu v2: wait_for_taker_payment_spend_impl
laruh 6c4814d
move get script_pubkey from loop
laruh 3bf653e
add wait_for_taker_payment_spend to eth tests
laruh 74d31ca
change sleep duration in send_and_refund_taker_funding_exceed, remove…
laruh 8a5d5df
provide get_decoded_and_swap_contract func to reduce code duplication
laruh a72247f
move match coin_type to the beginning of fn taker_swap_v2_details
laruh 78166b1
review: fn set_chain_id, remove redundant doc comms, update ABIError
laruh b08be1a
Merge remote-tracking branch 'origin/dev' into nft-refund-payment-get…
laruh 3629f0e
add doc comms, update sleep duration for send_and_refund_taker_fundin…
laruh f6ffcf1
review: reduce sleep time, use explicit U256::from
laruh bce1752
review: update wrapper docs
laruh 2ee4ef1
review: etomic_swap_id_v2 with time_lock: u64
laruh a5765b1
dont wait pending tx for validate_taker_funding
laruh 006963a
move send_and_refund_taker_funding_exceed_pre_approve_timelock_erc20 …
laruh a859414
re-check payment state in fncs `taker_payment_approve` and `sign_and_…
laruh 738731c
change sleep duration for send_and_refund_taker_funding_by_secret_erc20
laruh d9e3c4e
review: provide const ZERO_VALUE
laruh e1144d1
review: fix missed maker_secret_hash, unify EthCoinType match arms
laruh fbe7bb6
review: fix timelocks doc comms, make them clearer.
laruh adb69d5
review: provide RefundMakerPaymentTimelockArgs, RefundMakerPaymentSec…
laruh 28694c7
change sleep duration in send_and_refund_taker_funding_by_secret_erc20
laruh a933c74
review: return 10 sec sleep in wait_for_taker_payment_spend_impl
laruh e5bde47
review: fix ABIError match and use InvalidData
laruh be41221
remove "reuse refund_taker_funding_timelock_impl" clarification
laruh 983ea4d
review: change fn refund_taker_funding_timelock_impl name
laruh 07fa30a
Merge remote-tracking branch 'origin/dev' into nft-refund-payment-get…
laruh 8e50c8f
fix compile error
laruh 1c635b4
fix eth docker tests: ensure_p2p_context before eth_coin_from_conf_an…
laruh 6f34920
fix eth docker tests: init CryptoCtx for MM_CTX1
laruh 098e270
fix eth docker tests: build mmctx for global Nft
laruh 8469aff
fix eth docker tests: init_p2p_context right in lazy static
laruh 98f78d2
fix eth docker tests: use ensure_p2p_context
laruh 885c0e9
comment for_slp_ops.wait_ready
laruh 525b99d
Revert "comment for_slp_ops.wait_ready"
laruh 0e35898
docker tests: init_p2p_context in lazy static
laruh fbdbf10
docker tests: exclude p2pctx in build_web3_instances for tests
laruh eb83c70
Revert "docker tests: exclude p2pctx in build_web3_instances for tests"
laruh f7668ce
docker tests: provide build_web3_instances_for_test and eth_coin_from…
laruh 653c063
review: remove unused code, except SwapAddresses::init and eth_coin_v…
laruh 20b9428
Merge remote-tracking branch 'origin/dev' into nft-refund-payment-get…
laruh 1fda81b
fix clippy
laruh 722b807
review: remove From impl for RefundPaymentArgs
laruh f1e6b20
provide test func changes notification in doc comms
laruh f9f8d50
use p2p ctx only if `komodo_proxy` is true
shamardy b744a1d
correct GETH_NONCE_LOCK in geth_erc1155_balance and ERC20 ticker in e…
laruh 2381b7d
review: provide check_decoded_length
laruh 1faea01
ignore taker sepolia tests
laruh 6dd0fc2
review: provide smart contract methods links
laruh 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
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.