Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -378,7 +378,7 @@ endif
start-upgrade-test: zetanode-upgrade solana
@echo "--> Starting upgrade test"
export LOCALNET_MODE=upgrade && \
export UPGRADE_HEIGHT=250 && \
export UPGRADE_HEIGHT=260 && \
export E2E_ARGS="--test-solana --test-sui" && \
cd contrib/localnet/ && $(DOCKER_COMPOSE) --profile upgrade --profile solana --profile sui -f docker-compose-upgrade.yml up -d

Expand Down
12 changes: 9 additions & 3 deletions e2e/e2etests/e2etests.go
Original file line number Diff line number Diff line change
Expand Up @@ -682,20 +682,26 @@ var AllE2ETests = []runner.E2ETest{
runner.NewE2ETest(
TestZEVMToEVMCallName,
"zevm -> evm call",
[]runner.ArgDefinition{},
[]runner.ArgDefinition{
{Description: "gas limit for call", DefaultValue: "250000"},
},
TestZEVMToEVMCall,
),
runner.NewE2ETest(
TestZEVMToEVMCallRevertName,
"zevm -> evm call that reverts and call onRevert",
[]runner.ArgDefinition{},
[]runner.ArgDefinition{
{Description: "gas limit for call", DefaultValue: "250000"},
},
TestZEVMToEVMCallRevert,
runner.WithMinimumVersion("v29.0.0"),
),
runner.NewE2ETest(
TestZEVMToEVMCallRevertAndAbortName,
"zevm -> evm call that reverts and abort with onAbort",
[]runner.ArgDefinition{},
[]runner.ArgDefinition{
{Description: "gas limit for call", DefaultValue: "250000"},
},
TestZEVMToEVMCallRevertAndAbort,
runner.WithMinimumVersion("v29.0.0"),
),
Expand Down
4 changes: 3 additions & 1 deletion e2e/e2etests/test_zevm_to_evm_call.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ import (
)

func TestZEVMToEVMCall(r *runner.E2ERunner, args []string) {
require.Len(r, args, 0)
require.Len(r, args, 1)
gasLimit := utils.ParseBigInt(r, args[0])

payload := randomPayload(r)

Expand All @@ -29,6 +30,7 @@ func TestZEVMToEVMCall(r *runner.E2ERunner, args []string) {
gatewayzevm.RevertOptions{
OnRevertGasLimit: big.NewInt(0),
},
gasLimit,
)

// wait for the cctx to be mined
Expand Down
4 changes: 3 additions & 1 deletion e2e/e2etests/test_zevm_to_evm_call_revert.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ import (
)

func TestZEVMToEVMCallRevert(r *runner.E2ERunner, args []string) {
require.Len(r, args, 0)
require.Len(r, args, 1)
gasLimit := utils.ParseBigInt(r, args[0])

payload := randomPayload(r)

Expand All @@ -30,6 +31,7 @@ func TestZEVMToEVMCallRevert(r *runner.E2ERunner, args []string) {
RevertMessage: []byte(payload),
OnRevertGasLimit: big.NewInt(200000),
},
gasLimit,
)

// wait for the cctx to be mined
Expand Down
4 changes: 3 additions & 1 deletion e2e/e2etests/test_zevm_to_evm_call_revert_and_abort.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ import (
)

func TestZEVMToEVMCallRevertAndAbort(r *runner.E2ERunner, args []string) {
require.Len(r, args, 0)
require.Len(r, args, 1)
gasLimit := utils.ParseBigInt(r, args[0])

r.ApproveETHZRC20(r.GatewayZEVMAddr)

Expand All @@ -34,6 +35,7 @@ func TestZEVMToEVMCallRevertAndAbort(r *runner.E2ERunner, args []string) {
OnRevertGasLimit: big.NewInt(200000),
AbortAddress: testAbortAddr,
},
gasLimit,
)

// wait for the cctx to be mined
Expand Down
3 changes: 2 additions & 1 deletion e2e/runner/zevm.go
Original file line number Diff line number Diff line change
Expand Up @@ -361,14 +361,15 @@ func (r *E2ERunner) ZEVMToEMVCall(
receiver ethcommon.Address,
payload []byte,
revertOptions gatewayzevm.RevertOptions,
gasLimit *big.Int,
) *ethtypes.Transaction {
tx, err := r.GatewayZEVM.Call(
r.ZEVMAuth,
receiver.Bytes(),
r.ETHZRC20Addr,
payload,
gatewayzevm.CallOptions{
GasLimit: defaultGasLimit,
GasLimit: gasLimit,
IsArbitraryCall: false,
},
revertOptions,
Expand Down