Skip to content

Commit

Permalink
test event emitting
Browse files Browse the repository at this point in the history
  • Loading branch information
lumtis committed Nov 12, 2024
1 parent 470ce61 commit d2f4a96
Show file tree
Hide file tree
Showing 7 changed files with 213 additions and 36 deletions.
62 changes: 31 additions & 31 deletions cmd/zetae2e/local/v2.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,21 +15,21 @@ import (
// startV2Tests starts v2 related tests in parallel
func startV2Tests(eg *errgroup.Group, conf config.Config, deployerRunner *runner.E2ERunner, verbose bool) {
// Test happy paths for gas token workflow
//eg.Go(v2TestRoutine(conf, "eth", conf.AdditionalAccounts.UserV2Ether, color.FgHiGreen, deployerRunner, verbose,
// //e2etests.TestV2ETHDepositName,
// //e2etests.TestV2ETHDepositAndCallName,
// //e2etests.TestV2ETHWithdrawName,
// //e2etests.TestV2ETHWithdrawAndArbitraryCallName,
// //e2etests.TestV2ETHWithdrawAndCallName,
// //e2etests.TestV2ETHWithdrawAndCallThroughContractName,
// //e2etests.TestV2ZEVMToEVMArbitraryCallName,
// //e2etests.TestV2ZEVMToEVMCallName,
// //e2etests.TestV2ZEVMToEVMCallThroughContractName,
// //e2etests.TestV2EVMToZEVMCallName,
// //e2etests.TestV2ETHDepositAndCallNoMessageName,
// //e2etests.TestV2ETHWithdrawAndCallNoMessageName,
// e2etests.TestDepositAndWithdrawName,
//))
eg.Go(v2TestRoutine(conf, "eth", conf.AdditionalAccounts.UserV2Ether, color.FgHiGreen, deployerRunner, verbose,
//e2etests.TestV2ETHDepositName,
//e2etests.TestV2ETHDepositAndCallName,
//e2etests.TestV2ETHWithdrawName,
//e2etests.TestV2ETHWithdrawAndArbitraryCallName,
//e2etests.TestV2ETHWithdrawAndCallName,
//e2etests.TestV2ETHWithdrawAndCallThroughContractName,
//e2etests.TestV2ZEVMToEVMArbitraryCallName,
//e2etests.TestV2ZEVMToEVMCallName,
//e2etests.TestV2ZEVMToEVMCallThroughContractName,
//e2etests.TestV2EVMToZEVMCallName,
//e2etests.TestV2ETHDepositAndCallNoMessageName,
//e2etests.TestV2ETHWithdrawAndCallNoMessageName,
e2etests.TestDepositAndWithdrawName,
))
//
//// Test happy paths for erc20 token workflow
//eg.Go(v2TestRoutine(conf, "erc20", conf.AdditionalAccounts.UserV2ERC20, color.FgHiBlue, deployerRunner, verbose,
Expand All @@ -44,22 +44,22 @@ func startV2Tests(eg *errgroup.Group, conf config.Config, deployerRunner *runner
//))
//
//// Test revert cases for gas token workflow
eg.Go(
v2TestRoutine(
conf,
"eth-revert",
conf.AdditionalAccounts.UserV2EtherRevert,
color.FgHiYellow,
deployerRunner,
verbose,
//e2etests.TestV2ETHDepositName, // necessary to pay fees on ZEVM and withdraw
e2etests.TestV2ETHDepositAndCallRevertName,
//e2etests.TestV2ETHDepositAndCallRevertWithCallName,
//e2etests.TestV2ETHWithdrawAndCallRevertName,
//e2etests.TestV2ETHWithdrawAndCallRevertWithCallName,
//e2etests.TestDepositAndCallOutOfGasName,
),
)
//eg.Go(
// v2TestRoutine(
// conf,
// "eth-revert",
// conf.AdditionalAccounts.UserV2EtherRevert,
// color.FgHiYellow,
// deployerRunner,
// verbose,
// e2etests.TestV2ETHDepositName, // necessary to pay fees on ZEVM and withdraw
// e2etests.TestV2ETHDepositAndCallRevertName,
// e2etests.TestV2ETHDepositAndCallRevertWithCallName,
// e2etests.TestV2ETHWithdrawAndCallRevertName,
// e2etests.TestV2ETHWithdrawAndCallRevertWithCallName,
// e2etests.TestDepositAndCallOutOfGasName,
// ),
//)
//
//// Test revert cases for erc20 token workflow
//eg.Go(
Expand Down
2 changes: 1 addition & 1 deletion e2e/e2etests/test_v2_eth_deposit_and_call_revert.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ func TestV2ETHDepositAndCallRevert(r *runner.E2ERunner, args []string) {
// perform the deposit
tx := r.V2ETHDepositAndCall(r.TestDAppV2ZEVMAddr, amount, []byte("revert"), gatewayevm.RevertOptions{
RevertAddress: revertAddress,
OnRevertGasLimit: big.NewInt(7000000),
OnRevertGasLimit: big.NewInt(0),
})

// wait for the cctx to be mined
Expand Down
19 changes: 19 additions & 0 deletions pkg/contracts/testdappv2/TestDAppV2.abi
Original file line number Diff line number Diff line change
@@ -1,4 +1,23 @@
[
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "string",
"name": "",
"type": "string"
},
{
"indexed": false,
"internalType": "string",
"name": "",
"type": "string"
}
],
"name": "HelloEvent",
"type": "event"
},
{
"inputs": [],
"name": "NO_MESSAGE_CALL",
Expand Down
2 changes: 1 addition & 1 deletion pkg/contracts/testdappv2/TestDAppV2.bin

Large diffs are not rendered by default.

139 changes: 137 additions & 2 deletions pkg/contracts/testdappv2/TestDAppV2.go

Large diffs are not rendered by default.

Loading

0 comments on commit d2f4a96

Please sign in to comment.