Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
lumtis committed Aug 15, 2024
1 parent 5ff7d21 commit 6621fe7
Show file tree
Hide file tree
Showing 16 changed files with 28 additions and 20 deletions.
2 changes: 1 addition & 1 deletion e2e/e2etests/test_v2_erc20_deposit.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ func TestV2ERC20Deposit(r *runner.E2ERunner, args []string) {
require.NoError(r, err)

// perform the deposit
tx := r.V2ERC20Deposit(r.EVMAddress(), amount, gatewayevm.RevertOptions{})
tx := r.V2ERC20Deposit(r.EVMAddress(), amount, gatewayevm.RevertOptions{OnRevertGasLimit: big.NewInt(0)})

// wait for the cctx to be mined
cctx := utils.WaitCctxMinedByInboundHash(r.Ctx, tx.Hash().Hex(), r.CctxClient, r.Logger, r.CctxTimeout)
Expand Down
2 changes: 1 addition & 1 deletion e2e/e2etests/test_v2_erc20_deposit_and_call.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ func TestV2ERC20DepositAndCall(r *runner.E2ERunner, args []string) {
r.TestDAppV2ZEVMAddr,
amount,
[]byte(payloadMessageDepositERC20),
gatewayevm.RevertOptions{},
gatewayevm.RevertOptions{OnRevertGasLimit: big.NewInt(0)},
)

// wait for the cctx to be mined
Expand Down
3 changes: 2 additions & 1 deletion e2e/e2etests/test_v2_erc20_deposit_and_call_revert.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ func TestV2ERC20DepositAndCallRevert(r *runner.E2ERunner, args []string) {

// perform the deposit
tx := r.V2ERC20DepositAndCall(r.TestDAppV2ZEVMAddr, amount, []byte("revert"), gatewayevm.RevertOptions{
RevertAddress: revertAddress,
RevertAddress: revertAddress,
OnRevertGasLimit: big.NewInt(0),
})

// wait for the cctx to be reverted
Expand Down
2 changes: 1 addition & 1 deletion e2e/e2etests/test_v2_erc20_withdraw.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ func TestV2ERC20Withdraw(r *runner.E2ERunner, args []string) {
r.ApproveETHZRC20(r.GatewayZEVMAddr)

// perform the withdraw
tx := r.V2ERC20Withdraw(r.EVMAddress(), amount, gatewayzevm.RevertOptions{})
tx := r.V2ERC20Withdraw(r.EVMAddress(), amount, gatewayzevm.RevertOptions{OnRevertGasLimit: big.NewInt(0)})

// wait for the cctx to be mined
cctx := utils.WaitCctxMinedByInboundHash(r.Ctx, tx.Hash().Hex(), r.CctxClient, r.Logger, r.CctxTimeout)
Expand Down
2 changes: 1 addition & 1 deletion e2e/e2etests/test_v2_erc20_withdraw_and_call.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ func TestV2ERC20WithdrawAndCall(r *runner.E2ERunner, args []string) {
r.TestDAppV2EVMAddr,
amount,
r.EncodeERC20Call(r.ERC20Addr, amount, payloadMessageWithdrawERC20),
gatewayzevm.RevertOptions{},
gatewayzevm.RevertOptions{OnRevertGasLimit: big.NewInt(0)},
)

// wait for the cctx to be mined
Expand Down
3 changes: 2 additions & 1 deletion e2e/e2etests/test_v2_erc20_withdraw_and_call_revert.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@ func TestV2ERC20WithdrawAndCallRevert(r *runner.E2ERunner, args []string) {
amount,
r.EncodeERC20CallRevert(r.ERC20Addr, amount),
gatewayzevm.RevertOptions{
RevertAddress: revertAddress,
RevertAddress: revertAddress,
OnRevertGasLimit: big.NewInt(0),
},
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,10 @@ func TestV2ERC20WithdrawAndCallRevertWithCall(r *runner.E2ERunner, args []string
amount,
r.EncodeERC20CallRevert(r.ERC20Addr, amount),
gatewayzevm.RevertOptions{
RevertAddress: r.TestDAppV2ZEVMAddr,
CallOnRevert: true,
RevertMessage: []byte(payloadMessageWithdrawOnRevertERC20),
RevertAddress: r.TestDAppV2ZEVMAddr,
CallOnRevert: true,
RevertMessage: []byte(payloadMessageWithdrawOnRevertERC20),
OnRevertGasLimit: big.NewInt(0),
},
)

Expand Down
2 changes: 1 addition & 1 deletion e2e/e2etests/test_v2_eth_deposit.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ func TestV2ETHDeposit(r *runner.E2ERunner, args []string) {
r.Logger.Info("starting v2 eth deposit test")

// perform the deposit
tx := r.V2ETHDeposit(r.EVMAddress(), amount, gatewayevm.RevertOptions{})
tx := r.V2ETHDeposit(r.EVMAddress(), amount, gatewayevm.RevertOptions{OnRevertGasLimit: big.NewInt(0)})

// wait for the cctx to be mined
cctx := utils.WaitCctxMinedByInboundHash(r.Ctx, tx.Hash().Hex(), r.CctxClient, r.Logger, r.CctxTimeout)
Expand Down
2 changes: 1 addition & 1 deletion e2e/e2etests/test_v2_eth_deposit_and_call.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ func TestV2ETHDepositAndCall(r *runner.E2ERunner, args []string) {
r.TestDAppV2ZEVMAddr,
amount,
[]byte(payloadMessageDepositETH),
gatewayevm.RevertOptions{},
gatewayevm.RevertOptions{OnRevertGasLimit: big.NewInt(0)},
)

// wait for the cctx to be mined
Expand Down
3 changes: 2 additions & 1 deletion e2e/e2etests/test_v2_eth_deposit_and_call_revert.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ func TestV2ETHDepositAndCallRevert(r *runner.E2ERunner, args []string) {

// perform the deposit
tx := r.V2ETHDepositAndCall(r.TestDAppV2ZEVMAddr, amount, []byte("revert"), gatewayevm.RevertOptions{
RevertAddress: revertAddress,
RevertAddress: revertAddress,
OnRevertGasLimit: big.NewInt(0),
})

// wait for the cctx to be mined
Expand Down
2 changes: 1 addition & 1 deletion e2e/e2etests/test_v2_eth_withdraw.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ func TestV2ETHWithdraw(r *runner.E2ERunner, args []string) {
r.ApproveETHZRC20(r.GatewayZEVMAddr)

// perform the withdraw
tx := r.V2ETHWithdraw(r.EVMAddress(), amount, gatewayzevm.RevertOptions{})
tx := r.V2ETHWithdraw(r.EVMAddress(), amount, gatewayzevm.RevertOptions{OnRevertGasLimit: big.NewInt(0)})

// wait for the cctx to be mined
cctx := utils.WaitCctxMinedByInboundHash(r.Ctx, tx.Hash().Hex(), r.CctxClient, r.Logger, r.CctxTimeout)
Expand Down
2 changes: 1 addition & 1 deletion e2e/e2etests/test_v2_eth_withdraw_and_call.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ func TestV2ETHWithdrawAndCall(r *runner.E2ERunner, args []string) {
r.TestDAppV2EVMAddr,
amount,
r.EncodeGasCall(payloadMessageWithdrawETH),
gatewayzevm.RevertOptions{},
gatewayzevm.RevertOptions{OnRevertGasLimit: big.NewInt(0)},
)

// wait for the cctx to be mined
Expand Down
3 changes: 2 additions & 1 deletion e2e/e2etests/test_v2_eth_withdraw_and_call_revert.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ func TestV2ETHWithdrawAndCallRevert(r *runner.E2ERunner, args []string) {

// perform the withdraw
tx := r.V2ETHWithdrawAndCall(r.TestDAppV2EVMAddr, amount, r.EncodeGasCall("revert"), gatewayzevm.RevertOptions{
RevertAddress: revertAddress,
RevertAddress: revertAddress,
OnRevertGasLimit: big.NewInt(0),
})

// wait for the cctx to be mined
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,10 @@ func TestV2ETHWithdrawAndCallRevertWithCall(r *runner.E2ERunner, args []string)
amount,
r.EncodeGasCall("revert"),
gatewayzevm.RevertOptions{
RevertAddress: r.TestDAppV2ZEVMAddr,
CallOnRevert: true,
RevertMessage: []byte(payloadMessageWithdrawOnRevertETH),
RevertAddress: r.TestDAppV2ZEVMAddr,
CallOnRevert: true,
RevertMessage: []byte(payloadMessageWithdrawOnRevertETH),
OnRevertGasLimit: big.NewInt(0),
},
)

Expand Down
2 changes: 1 addition & 1 deletion e2e/e2etests/test_v2_evm_to_zevm_call.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ func TestV2EVMToZEVMCall(r *runner.E2ERunner, args []string) {
r.AssertTestDAppZEVMCalled(false, payloadMessageZEVMCall, big.NewInt(0))

// perform the withdraw
tx := r.V2EVMToZEMVCall(r.TestDAppV2ZEVMAddr, []byte(payloadMessageZEVMCall), gatewayevm.RevertOptions{})
tx := r.V2EVMToZEMVCall(r.TestDAppV2ZEVMAddr, []byte(payloadMessageZEVMCall), gatewayevm.RevertOptions{OnRevertGasLimit: big.NewInt(0)})

// wait for the cctx to be mined
cctx := utils.WaitCctxMinedByInboundHash(r.Ctx, tx.Hash().Hex(), r.CctxClient, r.Logger, r.CctxTimeout)
Expand Down
4 changes: 3 additions & 1 deletion e2e/e2etests/test_v2_zevm_to_evm_call.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@ func TestV2ZEVMToEVMCall(r *runner.E2ERunner, args []string) {
r.ApproveETHZRC20(r.GatewayZEVMAddr)

// perform the withdraw
tx := r.V2ZEVMToEMVCall(r.TestDAppV2EVMAddr, r.EncodeSimpleCall(payloadMessageEVMCall), gatewayzevm.RevertOptions{})
tx := r.V2ZEVMToEMVCall(r.TestDAppV2EVMAddr, r.EncodeSimpleCall(payloadMessageEVMCall), gatewayzevm.RevertOptions{
OnRevertGasLimit: big.NewInt(0),
})

// wait for the cctx to be mined
cctx := utils.WaitCctxMinedByInboundHash(r.Ctx, tx.Hash().Hex(), r.CctxClient, r.Logger, r.CctxTimeout)
Expand Down

0 comments on commit 6621fe7

Please sign in to comment.