From 88b5b8613f401e8ad17dd35a44b4563208c168e2 Mon Sep 17 00:00:00 2001 From: Alex Gartner Date: Wed, 19 Jun 2024 10:12:05 -0700 Subject: [PATCH] move TestERC20DepositAndCallRefund back to erc20 test routine --- cmd/zetae2e/local/erc20.go | 1 + cmd/zetae2e/local/local.go | 2 +- e2e/e2etests/e2etests.go | 36 ++++++++++++++++++------------------ 3 files changed, 20 insertions(+), 19 deletions(-) diff --git a/cmd/zetae2e/local/erc20.go b/cmd/zetae2e/local/erc20.go index 5d0e7a5ac9..b7fd74f0d8 100644 --- a/cmd/zetae2e/local/erc20.go +++ b/cmd/zetae2e/local/erc20.go @@ -40,6 +40,7 @@ func erc20TestRoutine( UserERC20Address, UserERC20PrivateKey, runner.NewLogger(verbose, color.FgGreen, "erc20"), + runner.WithZetaTxServer(deployerRunner.ZetaTxServer), ) if err != nil { return err diff --git a/cmd/zetae2e/local/local.go b/cmd/zetae2e/local/local.go index c0bc460f2d..d791621170 100644 --- a/cmd/zetae2e/local/local.go +++ b/cmd/zetae2e/local/local.go @@ -262,6 +262,7 @@ func localE2ETest(cmd *cobra.Command, _ []string) { erc20Tests := []string{ e2etests.TestERC20WithdrawName, e2etests.TestMultipleERC20WithdrawsName, + e2etests.TestERC20DepositAndCallRefundName, e2etests.TestZRC20SwapName, } erc20AdvancedTests := []string{ @@ -334,7 +335,6 @@ func localE2ETest(cmd *cobra.Command, _ []string) { e2etests.TestUpdateBytecodeZRC20Name, e2etests.TestUpdateBytecodeConnectorName, e2etests.TestDepositEtherLiquidityCapName, - e2etests.TestERC20DepositAndCallRefundName, // TestMigrateChainSupportName tests EVM chain migration. Currently this test doesn't work with Anvil because pre-EIP1559 txs are not supported // See issue below for details diff --git a/e2e/e2etests/e2etests.go b/e2e/e2etests/e2etests.go index 8bbdabe7e3..71edc76c5d 100644 --- a/e2e/e2etests/e2etests.go +++ b/e2e/e2etests/e2etests.go @@ -44,11 +44,12 @@ const ( EVM erc20 tests Test transfer of EVM erc20 asset across chains */ - TestERC20WithdrawName = "erc20_withdraw" - TestERC20DepositName = "erc20_deposit" - TestMultipleERC20DepositName = "erc20_multiple_deposit" - TestMultipleERC20WithdrawsName = "erc20_multiple_withdraw" - TestERC20DepositRestrictedName = "erc20_deposit_restricted" // #nosec G101: Potential hardcoded credentials (gosec), not a credential + TestERC20WithdrawName = "erc20_withdraw" + TestERC20DepositName = "erc20_deposit" + TestMultipleERC20DepositName = "erc20_multiple_deposit" + TestMultipleERC20WithdrawsName = "erc20_multiple_withdraw" + TestERC20DepositRestrictedName = "erc20_deposit_restricted" // #nosec G101: Potential hardcoded credentials (gosec), not a credential + TestERC20DepositAndCallRefundName = "erc20_deposit_and_call_refund" /* Bitcoin tests @@ -91,13 +92,12 @@ const ( Admin tests Test admin functionalities */ - TestDepositEtherLiquidityCapName = "deposit_eth_liquidity_cap" - TestMigrateChainSupportName = "migrate_chain_support" - TestPauseZRC20Name = "pause_zrc20" - TestUpdateBytecodeZRC20Name = "update_bytecode_zrc20" - TestUpdateBytecodeConnectorName = "update_bytecode_connector" - TestRateLimiterName = "rate_limiter" - TestERC20DepositAndCallRefundName = "erc20_deposit_and_call_refund" + TestDepositEtherLiquidityCapName = "deposit_eth_liquidity_cap" + TestMigrateChainSupportName = "migrate_chain_support" + TestPauseZRC20Name = "pause_zrc20" + TestUpdateBytecodeZRC20Name = "update_bytecode_zrc20" + TestUpdateBytecodeConnectorName = "update_bytecode_connector" + TestRateLimiterName = "rate_limiter" /* Special tests @@ -315,6 +315,12 @@ var AllE2ETests = []runner.E2ETest{ }, TestERC20DepositRestricted, ), + runner.NewE2ETest( + TestERC20DepositAndCallRefundName, + "deposit a non-gas ZRC20 into ZEVM and call a contract that reverts", + []runner.ArgDefinition{}, + TestERC20DepositAndCallRefund, + ), /* Bitcoin tests */ @@ -507,12 +513,6 @@ var AllE2ETests = []runner.E2ETest{ []runner.ArgDefinition{}, TestRateLimiter, ), - runner.NewE2ETest( - TestERC20DepositAndCallRefundName, - "deposit a non-gas ZRC20 into ZEVM and call a contract that reverts", - []runner.ArgDefinition{}, - TestERC20DepositAndCallRefund, - ), /* Special tests */