diff --git a/mm2src/coins/eth.rs b/mm2src/coins/eth.rs index fa157ae28c..c1b2a1cb58 100644 --- a/mm2src/coins/eth.rs +++ b/mm2src/coins/eth.rs @@ -251,9 +251,9 @@ pub mod gas_limit { pub const ETH_MAX_TRADE_GAS: u64 = 150_000; } -/// Gas limits for EthGasLimitV2 +/// Default gas limits for EthGasLimitV2 pub mod gas_limit_v2 { - /// Gas limits for maker operations in EthGasLimitV2 + /// Gas limits for maker operations in EtomicSwapMakerV2 contract pub mod maker { pub const ETH_SEND_PAYMENT: u64 = 65_000; pub const ERC20_SEND_PAYMENT: u64 = 115_000; @@ -265,7 +265,7 @@ pub mod gas_limit_v2 { pub const ERC20_MAKER_REFUND_SECRET: u64 = 65_000; } - /// Gas limits for taker operations in EthGasLimitV2 + /// Gas limits for taker operations in EtomicSwapTakerV2 contract pub mod taker { pub const ETH_SEND_PAYMENT: u64 = 65_000; pub const ERC20_SEND_PAYMENT: u64 = 115_000; diff --git a/mm2src/mm2_main/tests/docker_tests/eth_docker_tests.rs b/mm2src/mm2_main/tests/docker_tests/eth_docker_tests.rs index a4cd19a142..b387920fec 100644 --- a/mm2src/mm2_main/tests/docker_tests/eth_docker_tests.rs +++ b/mm2src/mm2_main/tests/docker_tests/eth_docker_tests.rs @@ -1452,11 +1452,9 @@ fn eth_coin_v2_activation_with_random_privkey( coin } -#[ignore] #[test] fn send_and_refund_taker_funding_by_secret_eth() { // sepolia test - thread::sleep(Duration::from_secs(5)); let taker_coin = get_or_create_sepolia_coin(&MM_CTX1, SEPOLIA_TAKER_PRIV, ETH, ð_sepolia_conf(), false); let maker_coin = get_or_create_sepolia_coin(&MM_CTX, SEPOLIA_MAKER_PRIV, ETH, ð_sepolia_conf(), false); @@ -1514,10 +1512,9 @@ fn send_and_refund_taker_funding_by_secret_eth() { wait_for_confirmations(&taker_coin, &funding_tx_refund, 100); } -#[ignore] #[test] fn send_and_refund_taker_funding_by_secret_erc20() { - thread::sleep(Duration::from_secs(130)); + thread::sleep(Duration::from_secs(30)); let erc20_conf = &sepolia_erc20_dev_conf(&sepolia_erc20_contract_checksum()); let taker_coin = get_or_create_sepolia_coin(&MM_CTX1, SEPOLIA_TAKER_PRIV, ERC20, erc20_conf, true); let maker_coin = get_or_create_sepolia_coin(&MM_CTX1, SEPOLIA_MAKER_PRIV, ERC20, erc20_conf, true); @@ -1576,11 +1573,10 @@ fn send_and_refund_taker_funding_by_secret_erc20() { wait_for_confirmations(&taker_coin, &funding_tx_refund, 200); } -#[ignore] #[test] fn send_and_refund_taker_funding_exceed_pre_approve_timelock_eth() { - thread::sleep(Duration::from_secs(12)); // sepolia test + thread::sleep(Duration::from_secs(60)); let taker_coin = get_or_create_sepolia_coin(&MM_CTX1, SEPOLIA_TAKER_PRIV, ETH, ð_sepolia_conf(), false); let maker_coin = get_or_create_sepolia_coin(&MM_CTX, SEPOLIA_MAKER_PRIV, ETH, ð_sepolia_conf(), false); @@ -1641,10 +1637,10 @@ fn send_and_refund_taker_funding_exceed_pre_approve_timelock_eth() { wait_for_confirmations(&taker_coin, &funding_tx_refund, 100); } -#[ignore] #[test] fn taker_send_approve_and_spend_eth() { // sepolia test + thread::sleep(Duration::from_secs(90)); let taker_coin = get_or_create_sepolia_coin(&MM_CTX1, SEPOLIA_TAKER_PRIV, ETH, ð_sepolia_conf(), false); let maker_coin = get_or_create_sepolia_coin(&MM_CTX, SEPOLIA_MAKER_PRIV, ETH, ð_sepolia_conf(), false); @@ -1750,11 +1746,10 @@ fn taker_send_approve_and_spend_eth() { block_on(taker_coin.wait_for_taker_payment_spend(&spend_tx, 0u64, payment_time_lock)).unwrap(); } -#[ignore] #[test] fn taker_send_approve_and_spend_erc20() { // sepolia test - thread::sleep(Duration::from_secs(9)); + thread::sleep(Duration::from_secs(120)); let erc20_conf = &sepolia_erc20_dev_conf(&sepolia_erc20_contract_checksum()); let taker_coin = get_or_create_sepolia_coin(&MM_CTX1, SEPOLIA_TAKER_PRIV, ERC20, erc20_conf, true); let maker_coin = get_or_create_sepolia_coin(&MM_CTX, SEPOLIA_MAKER_PRIV, ERC20, erc20_conf, true); @@ -1860,11 +1855,10 @@ fn taker_send_approve_and_spend_erc20() { block_on(taker_coin.wait_for_taker_payment_spend(&spend_tx, 0u64, payment_time_lock)).unwrap(); } -#[ignore] #[test] fn send_and_refund_taker_funding_exceed_payment_timelock_eth() { // sepolia test - thread::sleep(Duration::from_secs(25)); + thread::sleep(Duration::from_secs(150)); let taker_coin = get_or_create_sepolia_coin(&MM_CTX1, SEPOLIA_TAKER_PRIV, ETH, ð_sepolia_conf(), false); let maker_coin = get_or_create_sepolia_coin(&MM_CTX, SEPOLIA_MAKER_PRIV, ETH, ð_sepolia_conf(), false); @@ -1944,11 +1938,10 @@ fn send_and_refund_taker_funding_exceed_payment_timelock_eth() { wait_for_confirmations(&taker_coin, &funding_tx_refund, 100); } -#[ignore] #[test] fn send_and_refund_taker_funding_exceed_payment_timelock_erc20() { // sepolia test - thread::sleep(Duration::from_secs(28)); + thread::sleep(Duration::from_secs(180)); let erc20_conf = &sepolia_erc20_dev_conf(&sepolia_erc20_contract_checksum()); let taker_coin = get_or_create_sepolia_coin(&MM_CTX1, SEPOLIA_TAKER_PRIV, ERC20, erc20_conf, true); let maker_coin = get_or_create_sepolia_coin(&MM_CTX, SEPOLIA_MAKER_PRIV, ERC20, erc20_conf, true); @@ -2030,11 +2023,10 @@ fn send_and_refund_taker_funding_exceed_payment_timelock_erc20() { wait_for_confirmations(&taker_coin, &funding_tx_refund, 100); } -#[ignore] #[test] fn send_and_refund_taker_funding_exceed_pre_approve_timelock_erc20() { // sepolia test - thread::sleep(Duration::from_secs(200)); + thread::sleep(Duration::from_secs(210)); let erc20_conf = &sepolia_erc20_dev_conf(&sepolia_erc20_contract_checksum()); let taker_coin = get_or_create_sepolia_coin(&MM_CTX1, SEPOLIA_TAKER_PRIV, ERC20, erc20_conf, true); let maker_coin = get_or_create_sepolia_coin(&MM_CTX1, SEPOLIA_MAKER_PRIV, ERC20, erc20_conf, true); @@ -2097,6 +2089,7 @@ fn send_and_refund_taker_funding_exceed_pre_approve_timelock_erc20() { wait_for_confirmations(&taker_coin, &funding_tx_refund, 150); } +#[ignore] #[test] fn send_maker_payment_and_refund_timelock_eth() { thread::sleep(Duration::from_secs(150)); @@ -2149,6 +2142,7 @@ fn send_maker_payment_and_refund_timelock_eth() { wait_for_confirmations(&maker_coin, &payment_tx_refund, 100); } +#[ignore] #[test] fn send_maker_payment_and_refund_timelock_erc20() { thread::sleep(Duration::from_secs(120)); @@ -2202,6 +2196,7 @@ fn send_maker_payment_and_refund_timelock_erc20() { wait_for_confirmations(&maker_coin, &payment_tx_refund, 100); } +#[ignore] #[test] fn send_maker_payment_and_refund_secret_eth() { thread::sleep(Duration::from_secs(90)); @@ -2251,6 +2246,7 @@ fn send_maker_payment_and_refund_secret_eth() { wait_for_confirmations(&maker_coin, &payment_tx_refund, 100); } +#[ignore] #[test] fn send_maker_payment_and_refund_secret_erc20() { thread::sleep(Duration::from_secs(60)); @@ -2301,6 +2297,7 @@ fn send_maker_payment_and_refund_secret_erc20() { wait_for_confirmations(&maker_coin, &payment_tx_refund, 100); } +#[ignore] #[test] fn send_and_spend_maker_payment_eth() { let taker_coin = get_or_create_sepolia_coin(&MM_CTX1, SEPOLIA_TAKER_PRIV, ETH, ð_sepolia_conf(), false); @@ -2362,6 +2359,7 @@ fn send_and_spend_maker_payment_eth() { block_on(maker_coin.wait_for_maker_payment_spend(&spend_tx, 0u64, payment_time_lock)).unwrap(); } +#[ignore] #[test] fn send_and_spend_maker_payment_erc20() { thread::sleep(Duration::from_secs(30));