forked from jl777/SuperNET
-
Notifications
You must be signed in to change notification settings - Fork 94
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
feat(nft-swap): complete refund methods #2129
Merged
Merged
Changes from all commits
Commits
Show all changes
121 commits
Select commit
Hold shift + click to select a range
394fe4d
use NFT_MAKER_SWAP_V2 in nft_swap_v2 mod and in spend erc721 test
laruh 44f542d
deploy contracts before tokens, add constructor to EtomicSwapMakerNft…
laruh ff1006a
use Sepolia in dockerized nft tests
laruh aebf756
global variables and send nft back to maker
laruh 1966fcf
add web3 HTTPS support in mm2_main tests
laruh 1922bff
wait for send_back_tx confirmation
laruh c07e8e2
call contract addresses with functions
laruh ebac6e6
impl check_token_uri and make chains field in ClearNftDbReq optional …
laruh f9f4eab
doc comms
laruh ad0ce31
Merge remote-tracking branch 'origin/dev' into standalone-nft-maker-s…
laruh 4a4dfc0
Merge remote-tracking branch 'refs/remotes/origin/dev' into standalon…
laruh c703913
fix merge conflicts
laruh fe498fa
impl wait_pending_transactions
laruh 18fa53e
increase max nonce by 1
laruh b9a6719
Revert "increase max nonce by 1"
laruh 9a23f20
Merge remote-tracking branch 'origin/dev' into standalone-nft-maker-s…
laruh 998708b
impl get_or_create_nft function
laruh 364d795
additional logs, ignore erc1155
laruh cb187c7
deploy new SEPOLIA_ERC721_CONTRACT
laruh 9d4e3ee
fix linter
laruh 495e7a9
run both nft send payment tests
laruh e917b0b
proxy: send nft reqs with payload data in body to satisfy proxy HttpG…
laruh f868a50
Merge remote-tracking branch 'refs/remotes/origin/dev' into standalon…
laruh 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 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 b13ab34
Merge remote-tracking branch 'origin/dev' into nft-refund-payment-geth
laruh dab5bd9
fmt, clippy
laruh cac2d0d
review: remove gas_limit module from eth_swap_v2.rs
laruh 071a1f6
review: use `etomic_swap_id` function
laruh 439243a
review: use fixed size arrays
laruh c629d7a
review: provide eth total payment to sign_and_send_transaction
laruh ed08df9
review: fix typo
laruh 89e543f
review: update log to "Sent taker funding spend (taker payment)"
laruh 28bc18a
review: remove legacy "derive_htlc_pubkey" function from swap_v2, use…
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 c58808a
review: use Public::from_slice directly in parse_pubkey
laruh 1a5bf73
review: use public_to_address to get address from pubkey
laruh 5d6f943
review: use dex_fee plus payment_amount for eth_total_payment
laruh 2007a70
review: extract sign_and_send_transaction outside the if/else
laruh 9aca0d7
review: minify json
laruh fe730fa
review: drop variables, return result value directly
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 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.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Related to this #2093 (comment) , we can look into it in next PRs. We should try to use same format across HD wallet and external ones so that a swap can be continued from either if started from the other one (if both have the same mnemonic / seed and address_id)
c.c. @borngraced If we will not extract a pubkey from walletconnect / external wallet for EVM and we use Address hash after the
0x
, then we should do the same here and address can still be derived from this hash by adding0x
to access contract functions.