atomicDEX-API icon indicating copy to clipboard operation
atomicDEX-API copied to clipboard

feat(eth-swap): maker tpu v2 implementation

Open laruh opened this issue 1 year ago • 0 comments

  • impl MakerCoinSwapOpsV2 trait for ETH
  • eth taker and maker swap v2 implementations are stored in eth_swap_v2 module
  • added taker, maker and nft_maker gas limit v2 params and consts
  • Nft swap v2 methods started to use swap address from "swap_v2_contracts" coin field

In addition, added additional wait_for_maker_payment_spend function to MakerCoinSwapOpsV2 trait. It is needed to cover "taker doesnt wait for spend maker payment tx confirmation" issue which we faced in legacy swap protocol https://github.com/KomodoPlatform/komodo-defi-framework/issues/2175#issuecomment-2292645109

Later we can add wait_for_maker_payment_spend usage in MakerPaymentSpent state before changing it to Completed https://github.com/KomodoPlatform/komodo-defi-framework/blob/8f983ec362cb00704b27582b8c0dc3e9934aa912/mm2src/mm2_main/src/lp_swap/taker_swap_v2.rs#L2195-L2203

Note Provided two test features to be able to test maker and taker swap v2 contracts separately on sepolia.

sepolia-maker-swap-v2-tests = []
sepolia-taker-swap-v2-tests = []

laruh avatar Sep 05 '24 05:09 laruh