diff --git a/changelog.md b/changelog.md index fb4435cade..56ccf83d84 100644 --- a/changelog.md +++ b/changelog.md @@ -54,6 +54,7 @@ * [2853](https://github.com/zeta-chain/node/pull/2853) - calling precompile through sc with sc state update * [2925](https://github.com/zeta-chain/node/pull/2925) - add recover to init chainer to diplay informative message when starting a node from block 1 * [2909](https://github.com/zeta-chain/node/pull/2909) - add legacy messages back to codec for querier backward compatibility +* [3018](https://github.com/zeta-chain/node/pull/3018) - support `DepositAndCall` and `WithdrawAndCall` with empty payload ## v20.0.0 diff --git a/cmd/zetae2e/local/v2.go b/cmd/zetae2e/local/v2.go index 3ef5ff880a..22de8a6c51 100644 --- a/cmd/zetae2e/local/v2.go +++ b/cmd/zetae2e/local/v2.go @@ -26,6 +26,8 @@ func startV2Tests(eg *errgroup.Group, conf config.Config, deployerRunner *runner e2etests.TestV2ZEVMToEVMCallName, e2etests.TestV2ZEVMToEVMCallThroughContractName, e2etests.TestV2EVMToZEVMCallName, + e2etests.TestV2ETHDepositAndCallNoMessageName, + e2etests.TestV2ETHWithdrawAndCallNoMessageName, )) // Test happy paths for erc20 token workflow @@ -36,6 +38,7 @@ func startV2Tests(eg *errgroup.Group, conf config.Config, deployerRunner *runner e2etests.TestV2ERC20WithdrawName, e2etests.TestV2ERC20WithdrawAndArbitraryCallName, e2etests.TestV2ERC20WithdrawAndCallName, + e2etests.TestV2ERC20DepositAndCallNoMessageName, )) // Test revert cases for gas token workflow diff --git a/docs/openapi/openapi.swagger.yaml b/docs/openapi/openapi.swagger.yaml index dfa9349794..9dc72eabb9 100644 --- a/docs/openapi/openapi.swagger.yaml +++ b/docs/openapi/openapi.swagger.yaml @@ -57202,6 +57202,11 @@ definitions: format: uint64 tx_finalization_status: $ref: '#/definitions/crosschainTxFinalizationStatus' + is_cross_chain_call: + type: boolean + title: |- + this field describes if a smart contract call should be made for a inbound + with assets only used for protocol contract version 2 crosschainInboundTracker: type: object properties: diff --git a/docs/spec/crosschain/messages.md b/docs/spec/crosschain/messages.md index b12149de9e..3182bec082 100644 --- a/docs/spec/crosschain/messages.md +++ b/docs/spec/crosschain/messages.md @@ -191,6 +191,7 @@ message MsgVoteInbound { ProtocolContractVersion protocol_contract_version = 16; RevertOptions revert_options = 17; CallOptions call_options = 18; + bool is_cross_chain_call = 19; } ``` diff --git a/e2e/e2etests/e2etests.go b/e2e/e2etests/e2etests.go index c94eb8f89d..979876b352 100644 --- a/e2e/e2etests/e2etests.go +++ b/e2e/e2etests/e2etests.go @@ -130,21 +130,25 @@ const ( */ TestV2ETHDepositName = "v2_eth_deposit" TestV2ETHDepositAndCallName = "v2_eth_deposit_and_call" + TestV2ETHDepositAndCallNoMessageName = "v2_eth_deposit_and_call_no_message" TestV2ETHDepositAndCallRevertName = "v2_eth_deposit_and_call_revert" TestV2ETHDepositAndCallRevertWithCallName = "v2_eth_deposit_and_call_revert_with_call" TestV2ETHWithdrawName = "v2_eth_withdraw" TestV2ETHWithdrawAndArbitraryCallName = "v2_eth_withdraw_and_arbitrary_call" TestV2ETHWithdrawAndCallName = "v2_eth_withdraw_and_call" + TestV2ETHWithdrawAndCallNoMessageName = "v2_eth_withdraw_and_call_no_message" TestV2ETHWithdrawAndCallThroughContractName = "v2_eth_withdraw_and_call_through_contract" TestV2ETHWithdrawAndCallRevertName = "v2_eth_withdraw_and_call_revert" TestV2ETHWithdrawAndCallRevertWithCallName = "v2_eth_withdraw_and_call_revert_with_call" TestV2ERC20DepositName = "v2_erc20_deposit" TestV2ERC20DepositAndCallName = "v2_erc20_deposit_and_call" + TestV2ERC20DepositAndCallNoMessageName = "v2_erc20_deposit_and_call_no_message" TestV2ERC20DepositAndCallRevertName = "v2_erc20_deposit_and_call_revert" TestV2ERC20DepositAndCallRevertWithCallName = "v2_erc20_deposit_and_call_revert_with_call" TestV2ERC20WithdrawName = "v2_erc20_withdraw" TestV2ERC20WithdrawAndArbitraryCallName = "v2_erc20_withdraw_and_arbitrary_call" TestV2ERC20WithdrawAndCallName = "v2_erc20_withdraw_and_call" + TestV2ERC20WithdrawAndCallNoMessageName = "v2_erc20_withdraw_and_call_no_message" TestV2ERC20WithdrawAndCallRevertName = "v2_erc20_withdraw_and_call_revert" TestV2ERC20WithdrawAndCallRevertWithCallName = "v2_erc20_withdraw_and_call_revert_with_call" TestV2ZEVMToEVMArbitraryCallName = "v2_zevm_to_evm_arbitrary_call" @@ -731,6 +735,14 @@ var AllE2ETests = []runner.E2ETest{ }, TestV2ETHDepositAndCall, ), + runner.NewE2ETest( + TestV2ETHDepositAndCallNoMessageName, + "deposit Ether into ZEVM and call a contract using V2 contract using no message content", + []runner.ArgDefinition{ + {Description: "amount in wei", DefaultValue: "10000000000000000"}, + }, + TestV2ETHDepositAndCallNoMessage, + ), runner.NewE2ETest( TestV2ETHDepositAndCallRevertName, "deposit Ether into ZEVM and call a contract using V2 contract that reverts", @@ -771,6 +783,14 @@ var AllE2ETests = []runner.E2ETest{ }, TestV2ETHWithdrawAndCall, ), + runner.NewE2ETest( + TestV2ETHWithdrawAndCallNoMessageName, + "withdraw Ether from ZEVM call a contract using V2 contract with no message content", + []runner.ArgDefinition{ + {Description: "amount in wei", DefaultValue: "100000"}, + }, + TestV2ETHWithdrawAndCallNoMessage, + ), runner.NewE2ETest( TestV2ETHWithdrawAndCallThroughContractName, "withdraw Ether from ZEVM call a contract using V2 contract through intermediary contract", @@ -811,6 +831,14 @@ var AllE2ETests = []runner.E2ETest{ }, TestV2ERC20DepositAndCall, ), + runner.NewE2ETest( + TestV2ERC20DepositAndCallNoMessageName, + "deposit ERC20 into ZEVM and call a contract using V2 contract with no message content", + []runner.ArgDefinition{ + {Description: "amount", DefaultValue: "100000"}, + }, + TestV2ERC20DepositAndCallNoMessage, + ), runner.NewE2ETest( TestV2ERC20DepositAndCallRevertName, "deposit ERC20 into ZEVM and call a contract using V2 contract that reverts", @@ -849,6 +877,12 @@ var AllE2ETests = []runner.E2ETest{ []runner.ArgDefinition{}, TestV2ERC20WithdrawAndCall, ), + runner.NewE2ETest( + TestV2ERC20WithdrawAndCallNoMessageName, + "withdraw ERC20 from ZEVM and authenticated call a contract using V2 contract with no message", + []runner.ArgDefinition{}, + TestV2ERC20WithdrawAndCallNoMessage, + ), runner.NewE2ETest( TestV2ERC20WithdrawAndCallRevertName, "withdraw ERC20 from ZEVM and call a contract using V2 contract that reverts", diff --git a/e2e/e2etests/test_v2_erc20_deposit_and_call.go b/e2e/e2etests/test_v2_erc20_deposit_and_call.go index 6328998e81..332f2d6009 100644 --- a/e2e/e2etests/test_v2_erc20_deposit_and_call.go +++ b/e2e/e2etests/test_v2_erc20_deposit_and_call.go @@ -37,7 +37,7 @@ func TestV2ERC20DepositAndCall(r *runner.E2ERunner, args []string) { // wait for the cctx to be mined cctx := utils.WaitCctxMinedByInboundHash(r.Ctx, tx.Hash().Hex(), r.CctxClient, r.Logger, r.CctxTimeout) - r.Logger.CCTX(*cctx, "deposit") + r.Logger.CCTX(*cctx, "deposit_and_call") require.Equal(r, crosschaintypes.CctxStatus_OutboundMined, cctx.CctxStatus.Status) // check the payload was received on the contract diff --git a/e2e/e2etests/test_v2_erc20_deposit_and_call_no_message.go b/e2e/e2etests/test_v2_erc20_deposit_and_call_no_message.go new file mode 100644 index 0000000000..ff6adf74e6 --- /dev/null +++ b/e2e/e2etests/test_v2_erc20_deposit_and_call_no_message.go @@ -0,0 +1,48 @@ +package e2etests + +import ( + "math/big" + + "github.com/ethereum/go-ethereum/accounts/abi/bind" + "github.com/stretchr/testify/require" + "github.com/zeta-chain/protocol-contracts/v2/pkg/gatewayevm.sol" + + "github.com/zeta-chain/node/e2e/runner" + "github.com/zeta-chain/node/e2e/utils" + crosschaintypes "github.com/zeta-chain/node/x/crosschain/types" +) + +func TestV2ERC20DepositAndCallNoMessage(r *runner.E2ERunner, args []string) { + require.Len(r, args, 1) + + amount, ok := big.NewInt(0).SetString(args[0], 10) + require.True(r, ok, "Invalid amount specified for TestV2ERC20DepositAndCallNoMessage") + + r.ApproveERC20OnEVM(r.GatewayEVMAddr) + + oldBalance, err := r.ERC20ZRC20.BalanceOf(&bind.CallOpts{}, r.TestDAppV2ZEVMAddr) + require.NoError(r, err) + + // perform the deposit + tx := r.V2ERC20DepositAndCall( + r.TestDAppV2ZEVMAddr, + amount, + []byte{}, + 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) + r.Logger.CCTX(*cctx, "deposit_and_call") + require.Equal(r, crosschaintypes.CctxStatus_OutboundMined, cctx.CctxStatus.Status) + + // check the payload was received on the contract + messageIndex, err := r.TestDAppV2ZEVM.GetNoMessageIndex(&bind.CallOpts{}, r.EVMAddress()) + require.NoError(r, err) + r.AssertTestDAppZEVMCalled(true, messageIndex, amount) + + // check the balance was updated + newBalance, err := r.ERC20ZRC20.BalanceOf(&bind.CallOpts{}, r.TestDAppV2ZEVMAddr) + require.NoError(r, err) + require.Equal(r, new(big.Int).Add(oldBalance, amount), newBalance) +} diff --git a/e2e/e2etests/test_v2_erc20_deposit_and_call_revert.go b/e2e/e2etests/test_v2_erc20_deposit_and_call_revert.go index ba2d031710..91d3f23a77 100644 --- a/e2e/e2etests/test_v2_erc20_deposit_and_call_revert.go +++ b/e2e/e2etests/test_v2_erc20_deposit_and_call_revert.go @@ -35,7 +35,7 @@ func TestV2ERC20DepositAndCallRevert(r *runner.E2ERunner, args []string) { // wait for the cctx to be reverted cctx := utils.WaitCctxMinedByInboundHash(r.Ctx, tx.Hash().Hex(), r.CctxClient, r.Logger, r.CctxTimeout) - r.Logger.CCTX(*cctx, "deposit") + r.Logger.CCTX(*cctx, "deposit_and_call") require.Equal(r, crosschaintypes.CctxStatus_Reverted, cctx.CctxStatus.Status) // check the balance is more than 0 diff --git a/e2e/e2etests/test_v2_erc20_deposit_and_call_revert_with_call.go b/e2e/e2etests/test_v2_erc20_deposit_and_call_revert_with_call.go index 41b92fee4f..0bee6ff837 100644 --- a/e2e/e2etests/test_v2_erc20_deposit_and_call_revert_with_call.go +++ b/e2e/e2etests/test_v2_erc20_deposit_and_call_revert_with_call.go @@ -34,7 +34,7 @@ func TestV2ERC20DepositAndCallRevertWithCall(r *runner.E2ERunner, args []string) // wait for the cctx to be reverted cctx := utils.WaitCctxMinedByInboundHash(r.Ctx, tx.Hash().Hex(), r.CctxClient, r.Logger, r.CctxTimeout) - r.Logger.CCTX(*cctx, "deposit") + r.Logger.CCTX(*cctx, "deposit_and_call") require.Equal(r, crosschaintypes.CctxStatus_Reverted, cctx.CctxStatus.Status) // check the payload was received on the contract diff --git a/e2e/e2etests/test_v2_erc20_withdraw_and_call_no_message.go b/e2e/e2etests/test_v2_erc20_withdraw_and_call_no_message.go new file mode 100644 index 0000000000..50396ee58c --- /dev/null +++ b/e2e/e2etests/test_v2_erc20_withdraw_and_call_no_message.go @@ -0,0 +1,55 @@ +package e2etests + +import ( + "math/big" + + "github.com/ethereum/go-ethereum/accounts/abi/bind" + "github.com/stretchr/testify/require" + "github.com/zeta-chain/protocol-contracts/v2/pkg/gatewayzevm.sol" + + "github.com/zeta-chain/node/e2e/runner" + "github.com/zeta-chain/node/e2e/utils" + crosschaintypes "github.com/zeta-chain/node/x/crosschain/types" +) + +func TestV2ERC20WithdrawAndCallNoMessage(r *runner.E2ERunner, args []string) { + require.Len(r, args, 1) + + previousGasLimit := r.ZEVMAuth.GasLimit + r.ZEVMAuth.GasLimit = 10000000 + defer func() { + r.ZEVMAuth.GasLimit = previousGasLimit + }() + + amount, ok := big.NewInt(0).SetString(args[0], 10) + require.True(r, ok, "Invalid amount specified for TestV2ERC20WithdrawAndCallNoMessage") + + r.ApproveERC20ZRC20(r.GatewayZEVMAddr) + r.ApproveETHZRC20(r.GatewayZEVMAddr) + + // perform the withdraw + tx := r.V2ERC20WithdrawAndCall( + r.TestDAppV2EVMAddr, + amount, + []byte{}, + 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) + r.Logger.CCTX(*cctx, "withdraw_and_call") + require.Equal(r, crosschaintypes.CctxStatus_OutboundMined, cctx.CctxStatus.Status) + + // check called + messageIndex, err := r.TestDAppV2EVM.GetNoMessageIndex(&bind.CallOpts{}, r.EVMAddress()) + require.NoError(r, err) + r.AssertTestDAppEVMCalled(true, messageIndex, amount) + + // check expected sender was used + senderForMsg, err := r.TestDAppV2EVM.SenderWithMessage( + &bind.CallOpts{}, + []byte(messageIndex), + ) + require.NoError(r, err) + require.Equal(r, r.ZEVMAuth.From, senderForMsg) +} diff --git a/e2e/e2etests/test_v2_eth_deposit_and_call_no_message.go b/e2e/e2etests/test_v2_eth_deposit_and_call_no_message.go new file mode 100644 index 0000000000..be8b55cdc8 --- /dev/null +++ b/e2e/e2etests/test_v2_eth_deposit_and_call_no_message.go @@ -0,0 +1,46 @@ +package e2etests + +import ( + "math/big" + + "github.com/ethereum/go-ethereum/accounts/abi/bind" + "github.com/stretchr/testify/require" + "github.com/zeta-chain/protocol-contracts/v2/pkg/gatewayevm.sol" + + "github.com/zeta-chain/node/e2e/runner" + "github.com/zeta-chain/node/e2e/utils" + crosschaintypes "github.com/zeta-chain/node/x/crosschain/types" +) + +func TestV2ETHDepositAndCallNoMessage(r *runner.E2ERunner, args []string) { + require.Len(r, args, 1) + + amount, ok := big.NewInt(0).SetString(args[0], 10) + require.True(r, ok, "Invalid amount specified for TestV2ETHDepositAndCallNoMessage") + + oldBalance, err := r.ETHZRC20.BalanceOf(&bind.CallOpts{}, r.TestDAppV2ZEVMAddr) + require.NoError(r, err) + + // perform the deposit and call to the TestDAppV2ZEVMAddr + tx := r.V2ETHDepositAndCall( + r.TestDAppV2ZEVMAddr, + amount, + []byte{}, + 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) + r.Logger.CCTX(*cctx, "deposit_and_call") + require.Equal(r, crosschaintypes.CctxStatus_OutboundMined, cctx.CctxStatus.Status) + + // check the payload was received on the contract + messageIndex, err := r.TestDAppV2ZEVM.GetNoMessageIndex(&bind.CallOpts{}, r.EVMAddress()) + require.NoError(r, err) + r.AssertTestDAppZEVMCalled(true, messageIndex, amount) + + // check the balance was updated + newBalance, err := r.ETHZRC20.BalanceOf(&bind.CallOpts{}, r.TestDAppV2ZEVMAddr) + require.NoError(r, err) + require.Equal(r, new(big.Int).Add(oldBalance, amount), newBalance) +} diff --git a/e2e/e2etests/test_v2_eth_withdraw_and_call_no_message.go b/e2e/e2etests/test_v2_eth_withdraw_and_call_no_message.go new file mode 100644 index 0000000000..2e7531f9f1 --- /dev/null +++ b/e2e/e2etests/test_v2_eth_withdraw_and_call_no_message.go @@ -0,0 +1,54 @@ +package e2etests + +import ( + "math/big" + + "github.com/ethereum/go-ethereum/accounts/abi/bind" + "github.com/stretchr/testify/require" + "github.com/zeta-chain/protocol-contracts/v2/pkg/gatewayzevm.sol" + + "github.com/zeta-chain/node/e2e/runner" + "github.com/zeta-chain/node/e2e/utils" + crosschaintypes "github.com/zeta-chain/node/x/crosschain/types" +) + +func TestV2ETHWithdrawAndCallNoMessage(r *runner.E2ERunner, args []string) { + require.Len(r, args, 1) + + previousGasLimit := r.ZEVMAuth.GasLimit + r.ZEVMAuth.GasLimit = 10000000 + defer func() { + r.ZEVMAuth.GasLimit = previousGasLimit + }() + + amount, ok := big.NewInt(0).SetString(args[0], 10) + require.True(r, ok, "Invalid amount specified for TestV2ETHWithdrawAndCallNoMessage") + + r.ApproveETHZRC20(r.GatewayZEVMAddr) + + // perform the withdraw + tx := r.V2ETHWithdrawAndCall( + r.TestDAppV2EVMAddr, + amount, + []byte{}, + 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) + r.Logger.CCTX(*cctx, "withdraw_and_call") + require.Equal(r, crosschaintypes.CctxStatus_OutboundMined, cctx.CctxStatus.Status) + + // check called + messageIndex, err := r.TestDAppV2EVM.GetNoMessageIndex(&bind.CallOpts{}, r.EVMAddress()) + require.NoError(r, err) + r.AssertTestDAppEVMCalled(true, messageIndex, amount) + + // check expected sender was used + senderForMsg, err := r.TestDAppV2EVM.SenderWithMessage( + &bind.CallOpts{}, + []byte(messageIndex), + ) + require.NoError(r, err) + require.Equal(r, r.ZEVMAuth.From, senderForMsg) +} diff --git a/e2e/runner/v2_zevm.go b/e2e/runner/v2_zevm.go index 5153f2c823..45dd8c6761 100644 --- a/e2e/runner/v2_zevm.go +++ b/e2e/runner/v2_zevm.go @@ -76,7 +76,7 @@ func (r *E2ERunner) V2ETHWithdrawAndCall( return tx } -// V2ETHWithdrawAndCall calls WithdrawAndCall of Gateway with gas token on ZEVM using authenticated call +// V2ETHWithdrawAndCallThroughContract calls WithdrawAndCall of Gateway with gas token on ZEVM using authenticated call // through contract func (r *E2ERunner) V2ETHWithdrawAndCallThroughContract( gatewayZEVMCaller *gatewayzevmcaller.GatewayZEVMCaller, @@ -120,7 +120,7 @@ func (r *E2ERunner) V2ERC20Withdraw( return tx } -// V2ERC20WithdrawAndCall calls WithdrawAndCall of Gateway with erc20 token on ZEVM using arbitrary call +// V2ERC20WithdrawAndArbitraryCall calls WithdrawAndCall of Gateway with erc20 token on ZEVM using arbitrary call func (r *E2ERunner) V2ERC20WithdrawAndArbitraryCall( receiver ethcommon.Address, amount *big.Int, @@ -178,7 +178,7 @@ func (r *E2ERunner) V2ERC20WithdrawAndCall( return tx } -// V2ZEVMToEMVCall calls Call of Gateway on ZEVM using arbitrary call +// V2ZEVMToEMVArbitraryCall calls Call of Gateway on ZEVM using arbitrary call func (r *E2ERunner) V2ZEVMToEMVArbitraryCall( receiver ethcommon.Address, payload []byte, @@ -219,7 +219,7 @@ func (r *E2ERunner) V2ZEVMToEMVCall( return tx } -// V2ZEVMToEMVCall calls authenticated Call of Gateway on ZEVM through contract using authenticated call +// V2ZEVMToEMVCallThroughContract calls authenticated Call of Gateway on ZEVM through contract using authenticated call func (r *E2ERunner) V2ZEVMToEMVCallThroughContract( gatewayZEVMCaller *gatewayzevmcaller.GatewayZEVMCaller, receiver ethcommon.Address, diff --git a/go.mod b/go.mod index faa6709809..524a63d8be 100644 --- a/go.mod +++ b/go.mod @@ -59,7 +59,7 @@ require ( github.com/stretchr/testify v1.9.0 github.com/zeta-chain/ethermint v0.0.0-20241010181243-044e22bdb7e7 github.com/zeta-chain/keystone/keys v0.0.0-20240826165841-3874f358c138 - github.com/zeta-chain/protocol-contracts v1.0.2-athens3.0.20241016134610-c70fec4d66a6 + github.com/zeta-chain/protocol-contracts v1.0.2-athens3.0.20241021075719-d40d2e28467c gitlab.com/thorchain/tss/go-tss v1.6.5 go.nhat.io/grpcmock v0.25.0 golang.org/x/crypto v0.23.0 diff --git a/go.sum b/go.sum index 8f884485e3..04150048bc 100644 --- a/go.sum +++ b/go.sum @@ -4208,8 +4208,8 @@ github.com/zeta-chain/go-tss v0.0.0-20240916173049-89fee4b0ae7f h1:XqUvw9a3EnDa2 github.com/zeta-chain/go-tss v0.0.0-20240916173049-89fee4b0ae7f/go.mod h1:B1FDE6kHs8hozKSX1/iXgCdvlFbS6+FeAupoBHDK0Cc= github.com/zeta-chain/keystone/keys v0.0.0-20240826165841-3874f358c138 h1:vck/FcIIpFOvpBUm0NO17jbEtmSz/W/a5Y4jRuSJl6I= github.com/zeta-chain/keystone/keys v0.0.0-20240826165841-3874f358c138/go.mod h1:U494OsZTWsU75hqoriZgMdSsgSGP1mUL1jX+wN/Aez8= -github.com/zeta-chain/protocol-contracts v1.0.2-athens3.0.20241016134610-c70fec4d66a6 h1:9xfE77UtF316hcsX7H2/OjROWtxBZyk8k1sQN3exIVM= -github.com/zeta-chain/protocol-contracts v1.0.2-athens3.0.20241016134610-c70fec4d66a6/go.mod h1:SjT7QirtJE8stnAe1SlNOanxtfSfijJm3MGJ+Ax7w7w= +github.com/zeta-chain/protocol-contracts v1.0.2-athens3.0.20241021075719-d40d2e28467c h1:ZoFxMMZtivRLquXVq1sEVlT45UnTPMO1MSXtc88nDv4= +github.com/zeta-chain/protocol-contracts v1.0.2-athens3.0.20241021075719-d40d2e28467c/go.mod h1:SjT7QirtJE8stnAe1SlNOanxtfSfijJm3MGJ+Ax7w7w= github.com/zeta-chain/tss-lib v0.0.0-20240916163010-2e6b438bd901 h1:9whtN5fjYHfk4yXIuAsYP2EHxImwDWDVUOnZJ2pfL3w= github.com/zeta-chain/tss-lib v0.0.0-20240916163010-2e6b438bd901/go.mod h1:d2iTC62s9JwKiCMPhcDDXbIZmuzAyJ4lwso0H5QyRbk= github.com/zondax/hid v0.9.1/go.mod h1:l5wttcP0jwtdLjqjMMWFVEE7d1zO0jvSPA9OPZxWpEM= diff --git a/pkg/contracts/testdappv2/TestDAppV2.abi b/pkg/contracts/testdappv2/TestDAppV2.abi index c2846866a1..33270e31e3 100644 --- a/pkg/contracts/testdappv2/TestDAppV2.abi +++ b/pkg/contracts/testdappv2/TestDAppV2.abi @@ -1,4 +1,17 @@ [ + { + "inputs": [], + "name": "NO_MESSAGE_CALL", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, { "inputs": [ { @@ -111,6 +124,25 @@ "stateMutability": "view", "type": "function" }, + { + "inputs": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "getNoMessageIndex", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "pure", + "type": "function" + }, { "inputs": [ { diff --git a/pkg/contracts/testdappv2/TestDAppV2.bin b/pkg/contracts/testdappv2/TestDAppV2.bin index d5b99ed321..b53d34a684 100644 --- a/pkg/contracts/testdappv2/TestDAppV2.bin +++ b/pkg/contracts/testdappv2/TestDAppV2.bin @@ -1 +1 @@ -608060405234801561001057600080fd5b5061130b806100206000396000f3fe6080604052600436106100a05760003560e01c8063a799911f11610064578063a799911f146101a8578063c7a339a9146101c4578063c9028a36146101ed578063e2842ed714610216578063f592cbfb14610253578063f936ae8514610290576100a7565b806336e980a0146100ac5780634297a263146100d55780635bcfd61614610112578063676cc0541461013b5780639291fe261461016b576100a7565b366100a757005b600080fd5b3480156100b857600080fd5b506100d360048036038101906100ce9190610c65565b6102cd565b005b3480156100e157600080fd5b506100fc60048036038101906100f79190610b80565b6102f7565b6040516101099190610fae565b60405180910390f35b34801561011e57600080fd5b5061013960048036038101906101349190610d57565b61030f565b005b61015560048036038101906101509190610cae565b610408565b6040516101629190610f8c565b60405180910390f35b34801561017757600080fd5b50610192600480360381019061018d9190610c65565b61051d565b60405161019f9190610fae565b60405180910390f35b6101c260048036038101906101bd9190610c65565b610560565b005b3480156101d057600080fd5b506101eb60048036038101906101e69190610bf6565b610589565b005b3480156101f957600080fd5b50610214600480360381019061020f9190610d0e565b61064c565b005b34801561022257600080fd5b5061023d60048036038101906102389190610b80565b610786565b60405161024a9190610f71565b60405180910390f35b34801561025f57600080fd5b5061027a60048036038101906102759190610c65565b6107a6565b6040516102879190610f71565b60405180910390f35b34801561029c57600080fd5b506102b760048036038101906102b29190610bad565b6107f5565b6040516102c49190610f1f565b60405180910390f35b6102d68161083e565b156102e057600080fd5b6102e981610894565b6102f48160006108e8565b50565b60026020528060005260406000206000915090505481565b61035c82828080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505061083e565b1561036657600080fd5b6103b382828080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050610894565b61040182828080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050846108e8565b5050505050565b606061045783838080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050610894565b6104a583838080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050346108e8565b8360000160208101906104b89190610b26565b600184846040516104ca929190610eda565b908152602001604051809103902060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055509392505050565b600060026000836040516020016105349190610ef3565b604051602081830303815290604052805190602001208152602001908152602001600020549050919050565b6105698161083e565b1561057357600080fd5b61057c81610894565b61058681346108e8565b50565b6105928161083e565b1561059c57600080fd5b8273ffffffffffffffffffffffffffffffffffffffff166323b872dd3330856040518463ffffffff1660e01b81526004016105d993929190610f3a565b602060405180830381600087803b1580156105f357600080fd5b505af1158015610607573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061062b9190610b53565b61063457600080fd5b61063d81610894565b61064781836108e8565b505050565b6106a781806060019061065f9190610fc9565b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050610894565b6107048180606001906106ba9190610fc9565b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505060006108e8565b8060000160208101906107179190610b26565b60018280606001906107299190610fc9565b604051610737929190610eda565b908152602001604051809103902060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b60006020528060005260406000206000915054906101000a900460ff1681565b6000806000836040516020016107bc9190610ef3565b60405160208183030381529060405280519060200120815260200190815260200160002060009054906101000a900460ff169050919050565b6001818051602081018201805184825260208301602085012081835280955050505050506000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600060405160200161084f90610f0a565b60405160208183030381529060405280519060200120826040516020016108769190610ef3565b60405160208183030381529060405280519060200120149050919050565b6001600080836040516020016108aa9190610ef3565b60405160208183030381529060405280519060200120815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b8060026000846040516020016108fe9190610ef3565b604051602081830303815290604052805190602001208152602001908152602001600020819055505050565b600061093d61093884611051565b61102c565b90508281526020810184848401111561095957610958611219565b5b610964848285611154565b509392505050565b600061097f61097a84611082565b61102c565b90508281526020810184848401111561099b5761099a611219565b5b6109a6848285611154565b509392505050565b6000813590506109bd81611262565b92915050565b6000815190506109d281611279565b92915050565b6000813590506109e781611290565b92915050565b60008083601f840112610a0357610a026111fb565b5b8235905067ffffffffffffffff811115610a2057610a1f6111f6565b5b602083019150836001820283011115610a3c57610a3b61120f565b5b9250929050565b600082601f830112610a5857610a576111fb565b5b8135610a6884826020860161092a565b91505092915050565b600081359050610a80816112a7565b92915050565b600082601f830112610a9b57610a9a6111fb565b5b8135610aab84826020860161096c565b91505092915050565b600060208284031215610aca57610ac9611205565b5b81905092915050565b600060808284031215610ae957610ae8611205565b5b81905092915050565b600060608284031215610b0857610b07611205565b5b81905092915050565b600081359050610b20816112be565b92915050565b600060208284031215610b3c57610b3b611223565b5b6000610b4a848285016109ae565b91505092915050565b600060208284031215610b6957610b68611223565b5b6000610b77848285016109c3565b91505092915050565b600060208284031215610b9657610b95611223565b5b6000610ba4848285016109d8565b91505092915050565b600060208284031215610bc357610bc2611223565b5b600082013567ffffffffffffffff811115610be157610be061121e565b5b610bed84828501610a43565b91505092915050565b600080600060608486031215610c0f57610c0e611223565b5b6000610c1d86828701610a71565b9350506020610c2e86828701610b11565b925050604084013567ffffffffffffffff811115610c4f57610c4e61121e565b5b610c5b86828701610a86565b9150509250925092565b600060208284031215610c7b57610c7a611223565b5b600082013567ffffffffffffffff811115610c9957610c9861121e565b5b610ca584828501610a86565b91505092915050565b600080600060408486031215610cc757610cc6611223565b5b6000610cd586828701610ab4565b935050602084013567ffffffffffffffff811115610cf657610cf561121e565b5b610d02868287016109ed565b92509250509250925092565b600060208284031215610d2457610d23611223565b5b600082013567ffffffffffffffff811115610d4257610d4161121e565b5b610d4e84828501610ad3565b91505092915050565b600080600080600060808688031215610d7357610d72611223565b5b600086013567ffffffffffffffff811115610d9157610d9061121e565b5b610d9d88828901610af2565b9550506020610dae888289016109ae565b9450506040610dbf88828901610b11565b935050606086013567ffffffffffffffff811115610de057610ddf61121e565b5b610dec888289016109ed565b92509250509295509295909350565b610e04816110f0565b82525050565b610e1381611102565b82525050565b6000610e2583856110da565b9350610e32838584611154565b82840190509392505050565b6000610e49826110b3565b610e5381856110c9565b9350610e63818560208601611163565b610e6c81611228565b840191505092915050565b6000610e82826110be565b610e8c81856110e5565b9350610e9c818560208601611163565b80840191505092915050565b6000610eb56006836110e5565b9150610ec082611239565b600682019050919050565b610ed48161114a565b82525050565b6000610ee7828486610e19565b91508190509392505050565b6000610eff8284610e77565b915081905092915050565b6000610f1582610ea8565b9150819050919050565b6000602082019050610f346000830184610dfb565b92915050565b6000606082019050610f4f6000830186610dfb565b610f5c6020830185610dfb565b610f696040830184610ecb565b949350505050565b6000602082019050610f866000830184610e0a565b92915050565b60006020820190508181036000830152610fa68184610e3e565b905092915050565b6000602082019050610fc36000830184610ecb565b92915050565b60008083356001602003843603038112610fe657610fe561120a565b5b80840192508235915067ffffffffffffffff82111561100857611007611200565b5b60208301925060018202360383131561102457611023611214565b5b509250929050565b6000611036611047565b90506110428282611196565b919050565b6000604051905090565b600067ffffffffffffffff82111561106c5761106b6111c7565b5b61107582611228565b9050602081019050919050565b600067ffffffffffffffff82111561109d5761109c6111c7565b5b6110a682611228565b9050602081019050919050565b600081519050919050565b600081519050919050565b600082825260208201905092915050565b600081905092915050565b600081905092915050565b60006110fb8261112a565b9050919050565b60008115159050919050565b6000819050919050565b6000611123826110f0565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b82818337600083830152505050565b60005b83811015611181578082015181840152602081019050611166565b83811115611190576000848401525b50505050565b61119f82611228565b810181811067ffffffffffffffff821117156111be576111bd6111c7565b5b80604052505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f7265766572740000000000000000000000000000000000000000000000000000600082015250565b61126b816110f0565b811461127657600080fd5b50565b61128281611102565b811461128d57600080fd5b50565b6112998161110e565b81146112a457600080fd5b50565b6112b081611118565b81146112bb57600080fd5b50565b6112c78161114a565b81146112d257600080fd5b5056fea26469706673582212201f295f137d0ea146883fdaa6858baa14e4c467a843ff4e7829fd9df0d4c2aede64736f6c63430008070033 +6080604052348015600f57600080fd5b506115288061001f6000396000f3fe6080604052600436106100c65760003560e01c8063ad23b28b1161007f578063c9028a3611610059578063c9028a361461027b578063e2842ed7146102a4578063f592cbfb146102e1578063f936ae851461031e576100cd565b8063ad23b28b146101ea578063c7a339a914610227578063c85f843414610250576100cd565b806336e980a0146100d25780634297a263146100fb5780635bcfd61614610138578063676cc054146101615780639291fe2614610191578063a799911f146101ce576100cd565b366100cd57005b600080fd5b3480156100de57600080fd5b506100f960048036038101906100f49190610b86565b61035b565b005b34801561010757600080fd5b50610122600480360381019061011d9190610c05565b610385565b60405161012f9190610c4b565b60405180910390f35b34801561014457600080fd5b5061015f600480360381019061015a9190610d74565b61039d565b005b61017b60048036038101906101769190610e37565b610483565b6040516101889190610f16565b60405180910390f35b34801561019d57600080fd5b506101b860048036038101906101b39190610b86565b610595565b6040516101c59190610c4b565b60405180910390f35b6101e860048036038101906101e39190610b86565b6105d8565b005b3480156101f657600080fd5b50610211600480360381019061020c9190610f38565b610601565b60405161021e9190610fba565b60405180910390f35b34801561023357600080fd5b5061024e6004803603810190610249919061101a565b610661565b005b34801561025c57600080fd5b50610265610715565b6040516102729190610fba565b60405180910390f35b34801561028757600080fd5b506102a2600480360381019061029d91906110a8565b61074e565b005b3480156102b057600080fd5b506102cb60048036038101906102c69190610c05565b610888565b6040516102d8919061110c565b60405180910390f35b3480156102ed57600080fd5b5061030860048036038101906103039190610b86565b6108a8565b604051610315919061110c565b60405180910390f35b34801561032a57600080fd5b50610345600480360381019061034091906111c8565b6108f7565b6040516103529190611220565b60405180910390f35b61036481610940565b1561036e57600080fd5b61037781610996565b6103828160006109ea565b50565b60026020528060005260406000206000915090505481565b6103ea82828080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050610940565b156103f457600080fd5b600080838390501461044a5782828080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050610466565b6104658660200160208101906104609190610f38565b610601565b5b905061047181610996565b61047b81856109ea565b505050505050565b606060008084849050146104db5783838080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050506104f7565b6104f68560000160208101906104f19190610f38565b610601565b5b905061050281610996565b61050c81346109ea565b84600001602081019061051f9190610f38565b60018260405161052f9190611277565b908152602001604051809103902060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550604051806020016040528060008152509150509392505050565b600060026000836040516020016105ac91906112ca565b604051602081830303815290604052805190602001208152602001908152602001600020549050919050565b6105e181610940565b156105eb57600080fd5b6105f481610996565b6105fe81346109ea565b50565b60606040518060400160405280601681526020017f63616c6c65642077697468206e6f206d657373616765000000000000000000008152508260405160200161064b929190611329565b6040516020818303038152906040529050919050565b61066a81610940565b1561067457600080fd5b8273ffffffffffffffffffffffffffffffffffffffff166323b872dd3330856040518463ffffffff1660e01b81526004016106b193929190611351565b6020604051808303816000875af11580156106d0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106f491906113b4565b6106fd57600080fd5b61070681610996565b61071081836109ea565b505050565b6040518060400160405280601681526020017f63616c6c65642077697468206e6f206d6573736167650000000000000000000081525081565b6107a981806060019061076191906113f0565b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050610996565b6108068180606001906107bc91906113f0565b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505060006109ea565b8060000160208101906108199190610f38565b600182806060019061082b91906113f0565b604051610839929190611478565b908152602001604051809103902060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b60006020528060005260406000206000915054906101000a900460ff1681565b6000806000836040516020016108be91906112ca565b60405160208183030381529060405280519060200120815260200190815260200160002060009054906101000a900460ff169050919050565b6001818051602081018201805184825260208301602085012081835280955050505050506000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000604051602001610951906114dd565b604051602081830303815290604052805190602001208260405160200161097891906112ca565b60405160208183030381529060405280519060200120149050919050565b6001600080836040516020016109ac91906112ca565b60405160208183030381529060405280519060200120815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b806002600084604051602001610a0091906112ca565b604051602081830303815290604052805190602001208152602001908152602001600020819055505050565b6000604051905090565b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b610a9382610a4a565b810181811067ffffffffffffffff82111715610ab257610ab1610a5b565b5b80604052505050565b6000610ac5610a2c565b9050610ad18282610a8a565b919050565b600067ffffffffffffffff821115610af157610af0610a5b565b5b610afa82610a4a565b9050602081019050919050565b82818337600083830152505050565b6000610b29610b2484610ad6565b610abb565b905082815260208101848484011115610b4557610b44610a45565b5b610b50848285610b07565b509392505050565b600082601f830112610b6d57610b6c610a40565b5b8135610b7d848260208601610b16565b91505092915050565b600060208284031215610b9c57610b9b610a36565b5b600082013567ffffffffffffffff811115610bba57610bb9610a3b565b5b610bc684828501610b58565b91505092915050565b6000819050919050565b610be281610bcf565b8114610bed57600080fd5b50565b600081359050610bff81610bd9565b92915050565b600060208284031215610c1b57610c1a610a36565b5b6000610c2984828501610bf0565b91505092915050565b6000819050919050565b610c4581610c32565b82525050565b6000602082019050610c606000830184610c3c565b92915050565b600080fd5b600060608284031215610c8157610c80610c66565b5b81905092915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000610cb582610c8a565b9050919050565b610cc581610caa565b8114610cd057600080fd5b50565b600081359050610ce281610cbc565b92915050565b610cf181610c32565b8114610cfc57600080fd5b50565b600081359050610d0e81610ce8565b92915050565b600080fd5b600080fd5b60008083601f840112610d3457610d33610a40565b5b8235905067ffffffffffffffff811115610d5157610d50610d14565b5b602083019150836001820283011115610d6d57610d6c610d19565b5b9250929050565b600080600080600060808688031215610d9057610d8f610a36565b5b600086013567ffffffffffffffff811115610dae57610dad610a3b565b5b610dba88828901610c6b565b9550506020610dcb88828901610cd3565b9450506040610ddc88828901610cff565b935050606086013567ffffffffffffffff811115610dfd57610dfc610a3b565b5b610e0988828901610d1e565b92509250509295509295909350565b600060208284031215610e2e57610e2d610c66565b5b81905092915050565b600080600060408486031215610e5057610e4f610a36565b5b6000610e5e86828701610e18565b935050602084013567ffffffffffffffff811115610e7f57610e7e610a3b565b5b610e8b86828701610d1e565b92509250509250925092565b600081519050919050565b600082825260208201905092915050565b60005b83811015610ed1578082015181840152602081019050610eb6565b60008484015250505050565b6000610ee882610e97565b610ef28185610ea2565b9350610f02818560208601610eb3565b610f0b81610a4a565b840191505092915050565b60006020820190508181036000830152610f308184610edd565b905092915050565b600060208284031215610f4e57610f4d610a36565b5b6000610f5c84828501610cd3565b91505092915050565b600081519050919050565b600082825260208201905092915050565b6000610f8c82610f65565b610f968185610f70565b9350610fa6818560208601610eb3565b610faf81610a4a565b840191505092915050565b60006020820190508181036000830152610fd48184610f81565b905092915050565b6000610fe782610caa565b9050919050565b610ff781610fdc565b811461100257600080fd5b50565b60008135905061101481610fee565b92915050565b60008060006060848603121561103357611032610a36565b5b600061104186828701611005565b935050602061105286828701610cff565b925050604084013567ffffffffffffffff81111561107357611072610a3b565b5b61107f86828701610b58565b9150509250925092565b60006080828403121561109f5761109e610c66565b5b81905092915050565b6000602082840312156110be576110bd610a36565b5b600082013567ffffffffffffffff8111156110dc576110db610a3b565b5b6110e884828501611089565b91505092915050565b60008115159050919050565b611106816110f1565b82525050565b600060208201905061112160008301846110fd565b92915050565b600067ffffffffffffffff82111561114257611141610a5b565b5b61114b82610a4a565b9050602081019050919050565b600061116b61116684611127565b610abb565b90508281526020810184848401111561118757611186610a45565b5b611192848285610b07565b509392505050565b600082601f8301126111af576111ae610a40565b5b81356111bf848260208601611158565b91505092915050565b6000602082840312156111de576111dd610a36565b5b600082013567ffffffffffffffff8111156111fc576111fb610a3b565b5b6112088482850161119a565b91505092915050565b61121a81610caa565b82525050565b60006020820190506112356000830184611211565b92915050565b600081905092915050565b600061125182610e97565b61125b818561123b565b935061126b818560208601610eb3565b80840191505092915050565b60006112838284611246565b915081905092915050565b600081905092915050565b60006112a482610f65565b6112ae818561128e565b93506112be818560208601610eb3565b80840191505092915050565b60006112d68284611299565b915081905092915050565b60008160601b9050919050565b60006112f9826112e1565b9050919050565b600061130b826112ee565b9050919050565b61132361131e82610caa565b611300565b82525050565b60006113358285611299565b91506113418284611312565b6014820191508190509392505050565b60006060820190506113666000830186611211565b6113736020830185611211565b6113806040830184610c3c565b949350505050565b611391816110f1565b811461139c57600080fd5b50565b6000815190506113ae81611388565b92915050565b6000602082840312156113ca576113c9610a36565b5b60006113d88482850161139f565b91505092915050565b600080fd5b600080fd5b600080fd5b6000808335600160200384360303811261140d5761140c6113e1565b5b80840192508235915067ffffffffffffffff82111561142f5761142e6113e6565b5b60208301925060018202360383131561144b5761144a6113eb565b5b509250929050565b600061145f838561123b565b935061146c838584610b07565b82840190509392505050565b6000611485828486611453565b91508190509392505050565b7f7265766572740000000000000000000000000000000000000000000000000000600082015250565b60006114c760068361128e565b91506114d282611491565b600682019050919050565b60006114e8826114ba565b915081905091905056fea26469706673582212205747e512af435680fec20f1d2e088f93d6c12052fee7e353f45e5e49a671377b64736f6c634300081a0033 diff --git a/pkg/contracts/testdappv2/TestDAppV2.go b/pkg/contracts/testdappv2/TestDAppV2.go index 967c261e60..7414aaccf2 100644 --- a/pkg/contracts/testdappv2/TestDAppV2.go +++ b/pkg/contracts/testdappv2/TestDAppV2.go @@ -51,8 +51,8 @@ type TestDAppV2zContext struct { // TestDAppV2MetaData contains all meta data concerning the TestDAppV2 contract. var TestDAppV2MetaData = &bind.MetaData{ - ABI: "[{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"amountWithMessage\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"calledWithMessage\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contractIERC20\",\"name\":\"erc20\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"message\",\"type\":\"string\"}],\"name\":\"erc20Call\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"message\",\"type\":\"string\"}],\"name\":\"gasCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"message\",\"type\":\"string\"}],\"name\":\"getAmountWithMessage\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"message\",\"type\":\"string\"}],\"name\":\"getCalledWithMessage\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes\",\"name\":\"origin\",\"type\":\"bytes\"},{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"chainID\",\"type\":\"uint256\"}],\"internalType\":\"structTestDAppV2.zContext\",\"name\":\"_context\",\"type\":\"tuple\"},{\"internalType\":\"address\",\"name\":\"_zrc20\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"message\",\"type\":\"bytes\"}],\"name\":\"onCall\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"internalType\":\"structTestDAppV2.MessageContext\",\"name\":\"messageContext\",\"type\":\"tuple\"},{\"internalType\":\"bytes\",\"name\":\"message\",\"type\":\"bytes\"}],\"name\":\"onCall\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"asset\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"revertMessage\",\"type\":\"bytes\"}],\"internalType\":\"structTestDAppV2.RevertContext\",\"name\":\"revertContext\",\"type\":\"tuple\"}],\"name\":\"onRevert\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"name\":\"senderWithMessage\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"message\",\"type\":\"string\"}],\"name\":\"simpleCall\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}]", - Bin: "0x608060405234801561001057600080fd5b5061130b806100206000396000f3fe6080604052600436106100a05760003560e01c8063a799911f11610064578063a799911f146101a8578063c7a339a9146101c4578063c9028a36146101ed578063e2842ed714610216578063f592cbfb14610253578063f936ae8514610290576100a7565b806336e980a0146100ac5780634297a263146100d55780635bcfd61614610112578063676cc0541461013b5780639291fe261461016b576100a7565b366100a757005b600080fd5b3480156100b857600080fd5b506100d360048036038101906100ce9190610c65565b6102cd565b005b3480156100e157600080fd5b506100fc60048036038101906100f79190610b80565b6102f7565b6040516101099190610fae565b60405180910390f35b34801561011e57600080fd5b5061013960048036038101906101349190610d57565b61030f565b005b61015560048036038101906101509190610cae565b610408565b6040516101629190610f8c565b60405180910390f35b34801561017757600080fd5b50610192600480360381019061018d9190610c65565b61051d565b60405161019f9190610fae565b60405180910390f35b6101c260048036038101906101bd9190610c65565b610560565b005b3480156101d057600080fd5b506101eb60048036038101906101e69190610bf6565b610589565b005b3480156101f957600080fd5b50610214600480360381019061020f9190610d0e565b61064c565b005b34801561022257600080fd5b5061023d60048036038101906102389190610b80565b610786565b60405161024a9190610f71565b60405180910390f35b34801561025f57600080fd5b5061027a60048036038101906102759190610c65565b6107a6565b6040516102879190610f71565b60405180910390f35b34801561029c57600080fd5b506102b760048036038101906102b29190610bad565b6107f5565b6040516102c49190610f1f565b60405180910390f35b6102d68161083e565b156102e057600080fd5b6102e981610894565b6102f48160006108e8565b50565b60026020528060005260406000206000915090505481565b61035c82828080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505061083e565b1561036657600080fd5b6103b382828080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050610894565b61040182828080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050846108e8565b5050505050565b606061045783838080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050610894565b6104a583838080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050346108e8565b8360000160208101906104b89190610b26565b600184846040516104ca929190610eda565b908152602001604051809103902060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055509392505050565b600060026000836040516020016105349190610ef3565b604051602081830303815290604052805190602001208152602001908152602001600020549050919050565b6105698161083e565b1561057357600080fd5b61057c81610894565b61058681346108e8565b50565b6105928161083e565b1561059c57600080fd5b8273ffffffffffffffffffffffffffffffffffffffff166323b872dd3330856040518463ffffffff1660e01b81526004016105d993929190610f3a565b602060405180830381600087803b1580156105f357600080fd5b505af1158015610607573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061062b9190610b53565b61063457600080fd5b61063d81610894565b61064781836108e8565b505050565b6106a781806060019061065f9190610fc9565b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050610894565b6107048180606001906106ba9190610fc9565b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505060006108e8565b8060000160208101906107179190610b26565b60018280606001906107299190610fc9565b604051610737929190610eda565b908152602001604051809103902060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b60006020528060005260406000206000915054906101000a900460ff1681565b6000806000836040516020016107bc9190610ef3565b60405160208183030381529060405280519060200120815260200190815260200160002060009054906101000a900460ff169050919050565b6001818051602081018201805184825260208301602085012081835280955050505050506000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600060405160200161084f90610f0a565b60405160208183030381529060405280519060200120826040516020016108769190610ef3565b60405160208183030381529060405280519060200120149050919050565b6001600080836040516020016108aa9190610ef3565b60405160208183030381529060405280519060200120815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b8060026000846040516020016108fe9190610ef3565b604051602081830303815290604052805190602001208152602001908152602001600020819055505050565b600061093d61093884611051565b61102c565b90508281526020810184848401111561095957610958611219565b5b610964848285611154565b509392505050565b600061097f61097a84611082565b61102c565b90508281526020810184848401111561099b5761099a611219565b5b6109a6848285611154565b509392505050565b6000813590506109bd81611262565b92915050565b6000815190506109d281611279565b92915050565b6000813590506109e781611290565b92915050565b60008083601f840112610a0357610a026111fb565b5b8235905067ffffffffffffffff811115610a2057610a1f6111f6565b5b602083019150836001820283011115610a3c57610a3b61120f565b5b9250929050565b600082601f830112610a5857610a576111fb565b5b8135610a6884826020860161092a565b91505092915050565b600081359050610a80816112a7565b92915050565b600082601f830112610a9b57610a9a6111fb565b5b8135610aab84826020860161096c565b91505092915050565b600060208284031215610aca57610ac9611205565b5b81905092915050565b600060808284031215610ae957610ae8611205565b5b81905092915050565b600060608284031215610b0857610b07611205565b5b81905092915050565b600081359050610b20816112be565b92915050565b600060208284031215610b3c57610b3b611223565b5b6000610b4a848285016109ae565b91505092915050565b600060208284031215610b6957610b68611223565b5b6000610b77848285016109c3565b91505092915050565b600060208284031215610b9657610b95611223565b5b6000610ba4848285016109d8565b91505092915050565b600060208284031215610bc357610bc2611223565b5b600082013567ffffffffffffffff811115610be157610be061121e565b5b610bed84828501610a43565b91505092915050565b600080600060608486031215610c0f57610c0e611223565b5b6000610c1d86828701610a71565b9350506020610c2e86828701610b11565b925050604084013567ffffffffffffffff811115610c4f57610c4e61121e565b5b610c5b86828701610a86565b9150509250925092565b600060208284031215610c7b57610c7a611223565b5b600082013567ffffffffffffffff811115610c9957610c9861121e565b5b610ca584828501610a86565b91505092915050565b600080600060408486031215610cc757610cc6611223565b5b6000610cd586828701610ab4565b935050602084013567ffffffffffffffff811115610cf657610cf561121e565b5b610d02868287016109ed565b92509250509250925092565b600060208284031215610d2457610d23611223565b5b600082013567ffffffffffffffff811115610d4257610d4161121e565b5b610d4e84828501610ad3565b91505092915050565b600080600080600060808688031215610d7357610d72611223565b5b600086013567ffffffffffffffff811115610d9157610d9061121e565b5b610d9d88828901610af2565b9550506020610dae888289016109ae565b9450506040610dbf88828901610b11565b935050606086013567ffffffffffffffff811115610de057610ddf61121e565b5b610dec888289016109ed565b92509250509295509295909350565b610e04816110f0565b82525050565b610e1381611102565b82525050565b6000610e2583856110da565b9350610e32838584611154565b82840190509392505050565b6000610e49826110b3565b610e5381856110c9565b9350610e63818560208601611163565b610e6c81611228565b840191505092915050565b6000610e82826110be565b610e8c81856110e5565b9350610e9c818560208601611163565b80840191505092915050565b6000610eb56006836110e5565b9150610ec082611239565b600682019050919050565b610ed48161114a565b82525050565b6000610ee7828486610e19565b91508190509392505050565b6000610eff8284610e77565b915081905092915050565b6000610f1582610ea8565b9150819050919050565b6000602082019050610f346000830184610dfb565b92915050565b6000606082019050610f4f6000830186610dfb565b610f5c6020830185610dfb565b610f696040830184610ecb565b949350505050565b6000602082019050610f866000830184610e0a565b92915050565b60006020820190508181036000830152610fa68184610e3e565b905092915050565b6000602082019050610fc36000830184610ecb565b92915050565b60008083356001602003843603038112610fe657610fe561120a565b5b80840192508235915067ffffffffffffffff82111561100857611007611200565b5b60208301925060018202360383131561102457611023611214565b5b509250929050565b6000611036611047565b90506110428282611196565b919050565b6000604051905090565b600067ffffffffffffffff82111561106c5761106b6111c7565b5b61107582611228565b9050602081019050919050565b600067ffffffffffffffff82111561109d5761109c6111c7565b5b6110a682611228565b9050602081019050919050565b600081519050919050565b600081519050919050565b600082825260208201905092915050565b600081905092915050565b600081905092915050565b60006110fb8261112a565b9050919050565b60008115159050919050565b6000819050919050565b6000611123826110f0565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b82818337600083830152505050565b60005b83811015611181578082015181840152602081019050611166565b83811115611190576000848401525b50505050565b61119f82611228565b810181811067ffffffffffffffff821117156111be576111bd6111c7565b5b80604052505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f7265766572740000000000000000000000000000000000000000000000000000600082015250565b61126b816110f0565b811461127657600080fd5b50565b61128281611102565b811461128d57600080fd5b50565b6112998161110e565b81146112a457600080fd5b50565b6112b081611118565b81146112bb57600080fd5b50565b6112c78161114a565b81146112d257600080fd5b5056fea26469706673582212201f295f137d0ea146883fdaa6858baa14e4c467a843ff4e7829fd9df0d4c2aede64736f6c63430008070033", + ABI: "[{\"inputs\":[],\"name\":\"NO_MESSAGE_CALL\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"amountWithMessage\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"calledWithMessage\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contractIERC20\",\"name\":\"erc20\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"message\",\"type\":\"string\"}],\"name\":\"erc20Call\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"message\",\"type\":\"string\"}],\"name\":\"gasCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"message\",\"type\":\"string\"}],\"name\":\"getAmountWithMessage\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"message\",\"type\":\"string\"}],\"name\":\"getCalledWithMessage\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"getNoMessageIndex\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes\",\"name\":\"origin\",\"type\":\"bytes\"},{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"chainID\",\"type\":\"uint256\"}],\"internalType\":\"structTestDAppV2.zContext\",\"name\":\"_context\",\"type\":\"tuple\"},{\"internalType\":\"address\",\"name\":\"_zrc20\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"message\",\"type\":\"bytes\"}],\"name\":\"onCall\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"internalType\":\"structTestDAppV2.MessageContext\",\"name\":\"messageContext\",\"type\":\"tuple\"},{\"internalType\":\"bytes\",\"name\":\"message\",\"type\":\"bytes\"}],\"name\":\"onCall\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"asset\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"revertMessage\",\"type\":\"bytes\"}],\"internalType\":\"structTestDAppV2.RevertContext\",\"name\":\"revertContext\",\"type\":\"tuple\"}],\"name\":\"onRevert\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"name\":\"senderWithMessage\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"message\",\"type\":\"string\"}],\"name\":\"simpleCall\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}]", + Bin: "0x6080604052348015600f57600080fd5b506115288061001f6000396000f3fe6080604052600436106100c65760003560e01c8063ad23b28b1161007f578063c9028a3611610059578063c9028a361461027b578063e2842ed7146102a4578063f592cbfb146102e1578063f936ae851461031e576100cd565b8063ad23b28b146101ea578063c7a339a914610227578063c85f843414610250576100cd565b806336e980a0146100d25780634297a263146100fb5780635bcfd61614610138578063676cc054146101615780639291fe2614610191578063a799911f146101ce576100cd565b366100cd57005b600080fd5b3480156100de57600080fd5b506100f960048036038101906100f49190610b86565b61035b565b005b34801561010757600080fd5b50610122600480360381019061011d9190610c05565b610385565b60405161012f9190610c4b565b60405180910390f35b34801561014457600080fd5b5061015f600480360381019061015a9190610d74565b61039d565b005b61017b60048036038101906101769190610e37565b610483565b6040516101889190610f16565b60405180910390f35b34801561019d57600080fd5b506101b860048036038101906101b39190610b86565b610595565b6040516101c59190610c4b565b60405180910390f35b6101e860048036038101906101e39190610b86565b6105d8565b005b3480156101f657600080fd5b50610211600480360381019061020c9190610f38565b610601565b60405161021e9190610fba565b60405180910390f35b34801561023357600080fd5b5061024e6004803603810190610249919061101a565b610661565b005b34801561025c57600080fd5b50610265610715565b6040516102729190610fba565b60405180910390f35b34801561028757600080fd5b506102a2600480360381019061029d91906110a8565b61074e565b005b3480156102b057600080fd5b506102cb60048036038101906102c69190610c05565b610888565b6040516102d8919061110c565b60405180910390f35b3480156102ed57600080fd5b5061030860048036038101906103039190610b86565b6108a8565b604051610315919061110c565b60405180910390f35b34801561032a57600080fd5b50610345600480360381019061034091906111c8565b6108f7565b6040516103529190611220565b60405180910390f35b61036481610940565b1561036e57600080fd5b61037781610996565b6103828160006109ea565b50565b60026020528060005260406000206000915090505481565b6103ea82828080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050610940565b156103f457600080fd5b600080838390501461044a5782828080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050610466565b6104658660200160208101906104609190610f38565b610601565b5b905061047181610996565b61047b81856109ea565b505050505050565b606060008084849050146104db5783838080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050506104f7565b6104f68560000160208101906104f19190610f38565b610601565b5b905061050281610996565b61050c81346109ea565b84600001602081019061051f9190610f38565b60018260405161052f9190611277565b908152602001604051809103902060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550604051806020016040528060008152509150509392505050565b600060026000836040516020016105ac91906112ca565b604051602081830303815290604052805190602001208152602001908152602001600020549050919050565b6105e181610940565b156105eb57600080fd5b6105f481610996565b6105fe81346109ea565b50565b60606040518060400160405280601681526020017f63616c6c65642077697468206e6f206d657373616765000000000000000000008152508260405160200161064b929190611329565b6040516020818303038152906040529050919050565b61066a81610940565b1561067457600080fd5b8273ffffffffffffffffffffffffffffffffffffffff166323b872dd3330856040518463ffffffff1660e01b81526004016106b193929190611351565b6020604051808303816000875af11580156106d0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106f491906113b4565b6106fd57600080fd5b61070681610996565b61071081836109ea565b505050565b6040518060400160405280601681526020017f63616c6c65642077697468206e6f206d6573736167650000000000000000000081525081565b6107a981806060019061076191906113f0565b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050610996565b6108068180606001906107bc91906113f0565b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505060006109ea565b8060000160208101906108199190610f38565b600182806060019061082b91906113f0565b604051610839929190611478565b908152602001604051809103902060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b60006020528060005260406000206000915054906101000a900460ff1681565b6000806000836040516020016108be91906112ca565b60405160208183030381529060405280519060200120815260200190815260200160002060009054906101000a900460ff169050919050565b6001818051602081018201805184825260208301602085012081835280955050505050506000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000604051602001610951906114dd565b604051602081830303815290604052805190602001208260405160200161097891906112ca565b60405160208183030381529060405280519060200120149050919050565b6001600080836040516020016109ac91906112ca565b60405160208183030381529060405280519060200120815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b806002600084604051602001610a0091906112ca565b604051602081830303815290604052805190602001208152602001908152602001600020819055505050565b6000604051905090565b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b610a9382610a4a565b810181811067ffffffffffffffff82111715610ab257610ab1610a5b565b5b80604052505050565b6000610ac5610a2c565b9050610ad18282610a8a565b919050565b600067ffffffffffffffff821115610af157610af0610a5b565b5b610afa82610a4a565b9050602081019050919050565b82818337600083830152505050565b6000610b29610b2484610ad6565b610abb565b905082815260208101848484011115610b4557610b44610a45565b5b610b50848285610b07565b509392505050565b600082601f830112610b6d57610b6c610a40565b5b8135610b7d848260208601610b16565b91505092915050565b600060208284031215610b9c57610b9b610a36565b5b600082013567ffffffffffffffff811115610bba57610bb9610a3b565b5b610bc684828501610b58565b91505092915050565b6000819050919050565b610be281610bcf565b8114610bed57600080fd5b50565b600081359050610bff81610bd9565b92915050565b600060208284031215610c1b57610c1a610a36565b5b6000610c2984828501610bf0565b91505092915050565b6000819050919050565b610c4581610c32565b82525050565b6000602082019050610c606000830184610c3c565b92915050565b600080fd5b600060608284031215610c8157610c80610c66565b5b81905092915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000610cb582610c8a565b9050919050565b610cc581610caa565b8114610cd057600080fd5b50565b600081359050610ce281610cbc565b92915050565b610cf181610c32565b8114610cfc57600080fd5b50565b600081359050610d0e81610ce8565b92915050565b600080fd5b600080fd5b60008083601f840112610d3457610d33610a40565b5b8235905067ffffffffffffffff811115610d5157610d50610d14565b5b602083019150836001820283011115610d6d57610d6c610d19565b5b9250929050565b600080600080600060808688031215610d9057610d8f610a36565b5b600086013567ffffffffffffffff811115610dae57610dad610a3b565b5b610dba88828901610c6b565b9550506020610dcb88828901610cd3565b9450506040610ddc88828901610cff565b935050606086013567ffffffffffffffff811115610dfd57610dfc610a3b565b5b610e0988828901610d1e565b92509250509295509295909350565b600060208284031215610e2e57610e2d610c66565b5b81905092915050565b600080600060408486031215610e5057610e4f610a36565b5b6000610e5e86828701610e18565b935050602084013567ffffffffffffffff811115610e7f57610e7e610a3b565b5b610e8b86828701610d1e565b92509250509250925092565b600081519050919050565b600082825260208201905092915050565b60005b83811015610ed1578082015181840152602081019050610eb6565b60008484015250505050565b6000610ee882610e97565b610ef28185610ea2565b9350610f02818560208601610eb3565b610f0b81610a4a565b840191505092915050565b60006020820190508181036000830152610f308184610edd565b905092915050565b600060208284031215610f4e57610f4d610a36565b5b6000610f5c84828501610cd3565b91505092915050565b600081519050919050565b600082825260208201905092915050565b6000610f8c82610f65565b610f968185610f70565b9350610fa6818560208601610eb3565b610faf81610a4a565b840191505092915050565b60006020820190508181036000830152610fd48184610f81565b905092915050565b6000610fe782610caa565b9050919050565b610ff781610fdc565b811461100257600080fd5b50565b60008135905061101481610fee565b92915050565b60008060006060848603121561103357611032610a36565b5b600061104186828701611005565b935050602061105286828701610cff565b925050604084013567ffffffffffffffff81111561107357611072610a3b565b5b61107f86828701610b58565b9150509250925092565b60006080828403121561109f5761109e610c66565b5b81905092915050565b6000602082840312156110be576110bd610a36565b5b600082013567ffffffffffffffff8111156110dc576110db610a3b565b5b6110e884828501611089565b91505092915050565b60008115159050919050565b611106816110f1565b82525050565b600060208201905061112160008301846110fd565b92915050565b600067ffffffffffffffff82111561114257611141610a5b565b5b61114b82610a4a565b9050602081019050919050565b600061116b61116684611127565b610abb565b90508281526020810184848401111561118757611186610a45565b5b611192848285610b07565b509392505050565b600082601f8301126111af576111ae610a40565b5b81356111bf848260208601611158565b91505092915050565b6000602082840312156111de576111dd610a36565b5b600082013567ffffffffffffffff8111156111fc576111fb610a3b565b5b6112088482850161119a565b91505092915050565b61121a81610caa565b82525050565b60006020820190506112356000830184611211565b92915050565b600081905092915050565b600061125182610e97565b61125b818561123b565b935061126b818560208601610eb3565b80840191505092915050565b60006112838284611246565b915081905092915050565b600081905092915050565b60006112a482610f65565b6112ae818561128e565b93506112be818560208601610eb3565b80840191505092915050565b60006112d68284611299565b915081905092915050565b60008160601b9050919050565b60006112f9826112e1565b9050919050565b600061130b826112ee565b9050919050565b61132361131e82610caa565b611300565b82525050565b60006113358285611299565b91506113418284611312565b6014820191508190509392505050565b60006060820190506113666000830186611211565b6113736020830185611211565b6113806040830184610c3c565b949350505050565b611391816110f1565b811461139c57600080fd5b50565b6000815190506113ae81611388565b92915050565b6000602082840312156113ca576113c9610a36565b5b60006113d88482850161139f565b91505092915050565b600080fd5b600080fd5b600080fd5b6000808335600160200384360303811261140d5761140c6113e1565b5b80840192508235915067ffffffffffffffff82111561142f5761142e6113e6565b5b60208301925060018202360383131561144b5761144a6113eb565b5b509250929050565b600061145f838561123b565b935061146c838584610b07565b82840190509392505050565b6000611485828486611453565b91508190509392505050565b7f7265766572740000000000000000000000000000000000000000000000000000600082015250565b60006114c760068361128e565b91506114d282611491565b600682019050919050565b60006114e8826114ba565b915081905091905056fea26469706673582212205747e512af435680fec20f1d2e088f93d6c12052fee7e353f45e5e49a671377b64736f6c634300081a0033", } // TestDAppV2ABI is the input ABI used to generate the binding from. @@ -222,6 +222,37 @@ func (_TestDAppV2 *TestDAppV2TransactorRaw) Transact(opts *bind.TransactOpts, me return _TestDAppV2.Contract.contract.Transact(opts, method, params...) } +// NOMESSAGECALL is a free data retrieval call binding the contract method 0xc85f8434. +// +// Solidity: function NO_MESSAGE_CALL() view returns(string) +func (_TestDAppV2 *TestDAppV2Caller) NOMESSAGECALL(opts *bind.CallOpts) (string, error) { + var out []interface{} + err := _TestDAppV2.contract.Call(opts, &out, "NO_MESSAGE_CALL") + + if err != nil { + return *new(string), err + } + + out0 := *abi.ConvertType(out[0], new(string)).(*string) + + return out0, err + +} + +// NOMESSAGECALL is a free data retrieval call binding the contract method 0xc85f8434. +// +// Solidity: function NO_MESSAGE_CALL() view returns(string) +func (_TestDAppV2 *TestDAppV2Session) NOMESSAGECALL() (string, error) { + return _TestDAppV2.Contract.NOMESSAGECALL(&_TestDAppV2.CallOpts) +} + +// NOMESSAGECALL is a free data retrieval call binding the contract method 0xc85f8434. +// +// Solidity: function NO_MESSAGE_CALL() view returns(string) +func (_TestDAppV2 *TestDAppV2CallerSession) NOMESSAGECALL() (string, error) { + return _TestDAppV2.Contract.NOMESSAGECALL(&_TestDAppV2.CallOpts) +} + // AmountWithMessage is a free data retrieval call binding the contract method 0x4297a263. // // Solidity: function amountWithMessage(bytes32 ) view returns(uint256) @@ -346,6 +377,37 @@ func (_TestDAppV2 *TestDAppV2CallerSession) GetCalledWithMessage(message string) return _TestDAppV2.Contract.GetCalledWithMessage(&_TestDAppV2.CallOpts, message) } +// GetNoMessageIndex is a free data retrieval call binding the contract method 0xad23b28b. +// +// Solidity: function getNoMessageIndex(address sender) pure returns(string) +func (_TestDAppV2 *TestDAppV2Caller) GetNoMessageIndex(opts *bind.CallOpts, sender common.Address) (string, error) { + var out []interface{} + err := _TestDAppV2.contract.Call(opts, &out, "getNoMessageIndex", sender) + + if err != nil { + return *new(string), err + } + + out0 := *abi.ConvertType(out[0], new(string)).(*string) + + return out0, err + +} + +// GetNoMessageIndex is a free data retrieval call binding the contract method 0xad23b28b. +// +// Solidity: function getNoMessageIndex(address sender) pure returns(string) +func (_TestDAppV2 *TestDAppV2Session) GetNoMessageIndex(sender common.Address) (string, error) { + return _TestDAppV2.Contract.GetNoMessageIndex(&_TestDAppV2.CallOpts, sender) +} + +// GetNoMessageIndex is a free data retrieval call binding the contract method 0xad23b28b. +// +// Solidity: function getNoMessageIndex(address sender) pure returns(string) +func (_TestDAppV2 *TestDAppV2CallerSession) GetNoMessageIndex(sender common.Address) (string, error) { + return _TestDAppV2.Contract.GetNoMessageIndex(&_TestDAppV2.CallOpts, sender) +} + // SenderWithMessage is a free data retrieval call binding the contract method 0xf936ae85. // // Solidity: function senderWithMessage(bytes ) view returns(address) diff --git a/pkg/contracts/testdappv2/TestDAppV2.json b/pkg/contracts/testdappv2/TestDAppV2.json index 2ea4bd665d..189d8b853f 100644 --- a/pkg/contracts/testdappv2/TestDAppV2.json +++ b/pkg/contracts/testdappv2/TestDAppV2.json @@ -1,5 +1,18 @@ { "abi": [ + { + "inputs": [], + "name": "NO_MESSAGE_CALL", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, { "inputs": [ { @@ -112,6 +125,25 @@ "stateMutability": "view", "type": "function" }, + { + "inputs": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "getNoMessageIndex", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "pure", + "type": "function" + }, { "inputs": [ { @@ -260,5 +292,5 @@ "type": "receive" } ], - "bin": "608060405234801561001057600080fd5b5061130b806100206000396000f3fe6080604052600436106100a05760003560e01c8063a799911f11610064578063a799911f146101a8578063c7a339a9146101c4578063c9028a36146101ed578063e2842ed714610216578063f592cbfb14610253578063f936ae8514610290576100a7565b806336e980a0146100ac5780634297a263146100d55780635bcfd61614610112578063676cc0541461013b5780639291fe261461016b576100a7565b366100a757005b600080fd5b3480156100b857600080fd5b506100d360048036038101906100ce9190610c65565b6102cd565b005b3480156100e157600080fd5b506100fc60048036038101906100f79190610b80565b6102f7565b6040516101099190610fae565b60405180910390f35b34801561011e57600080fd5b5061013960048036038101906101349190610d57565b61030f565b005b61015560048036038101906101509190610cae565b610408565b6040516101629190610f8c565b60405180910390f35b34801561017757600080fd5b50610192600480360381019061018d9190610c65565b61051d565b60405161019f9190610fae565b60405180910390f35b6101c260048036038101906101bd9190610c65565b610560565b005b3480156101d057600080fd5b506101eb60048036038101906101e69190610bf6565b610589565b005b3480156101f957600080fd5b50610214600480360381019061020f9190610d0e565b61064c565b005b34801561022257600080fd5b5061023d60048036038101906102389190610b80565b610786565b60405161024a9190610f71565b60405180910390f35b34801561025f57600080fd5b5061027a60048036038101906102759190610c65565b6107a6565b6040516102879190610f71565b60405180910390f35b34801561029c57600080fd5b506102b760048036038101906102b29190610bad565b6107f5565b6040516102c49190610f1f565b60405180910390f35b6102d68161083e565b156102e057600080fd5b6102e981610894565b6102f48160006108e8565b50565b60026020528060005260406000206000915090505481565b61035c82828080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505061083e565b1561036657600080fd5b6103b382828080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050610894565b61040182828080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050846108e8565b5050505050565b606061045783838080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050610894565b6104a583838080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050346108e8565b8360000160208101906104b89190610b26565b600184846040516104ca929190610eda565b908152602001604051809103902060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055509392505050565b600060026000836040516020016105349190610ef3565b604051602081830303815290604052805190602001208152602001908152602001600020549050919050565b6105698161083e565b1561057357600080fd5b61057c81610894565b61058681346108e8565b50565b6105928161083e565b1561059c57600080fd5b8273ffffffffffffffffffffffffffffffffffffffff166323b872dd3330856040518463ffffffff1660e01b81526004016105d993929190610f3a565b602060405180830381600087803b1580156105f357600080fd5b505af1158015610607573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061062b9190610b53565b61063457600080fd5b61063d81610894565b61064781836108e8565b505050565b6106a781806060019061065f9190610fc9565b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050610894565b6107048180606001906106ba9190610fc9565b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505060006108e8565b8060000160208101906107179190610b26565b60018280606001906107299190610fc9565b604051610737929190610eda565b908152602001604051809103902060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b60006020528060005260406000206000915054906101000a900460ff1681565b6000806000836040516020016107bc9190610ef3565b60405160208183030381529060405280519060200120815260200190815260200160002060009054906101000a900460ff169050919050565b6001818051602081018201805184825260208301602085012081835280955050505050506000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600060405160200161084f90610f0a565b60405160208183030381529060405280519060200120826040516020016108769190610ef3565b60405160208183030381529060405280519060200120149050919050565b6001600080836040516020016108aa9190610ef3565b60405160208183030381529060405280519060200120815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b8060026000846040516020016108fe9190610ef3565b604051602081830303815290604052805190602001208152602001908152602001600020819055505050565b600061093d61093884611051565b61102c565b90508281526020810184848401111561095957610958611219565b5b610964848285611154565b509392505050565b600061097f61097a84611082565b61102c565b90508281526020810184848401111561099b5761099a611219565b5b6109a6848285611154565b509392505050565b6000813590506109bd81611262565b92915050565b6000815190506109d281611279565b92915050565b6000813590506109e781611290565b92915050565b60008083601f840112610a0357610a026111fb565b5b8235905067ffffffffffffffff811115610a2057610a1f6111f6565b5b602083019150836001820283011115610a3c57610a3b61120f565b5b9250929050565b600082601f830112610a5857610a576111fb565b5b8135610a6884826020860161092a565b91505092915050565b600081359050610a80816112a7565b92915050565b600082601f830112610a9b57610a9a6111fb565b5b8135610aab84826020860161096c565b91505092915050565b600060208284031215610aca57610ac9611205565b5b81905092915050565b600060808284031215610ae957610ae8611205565b5b81905092915050565b600060608284031215610b0857610b07611205565b5b81905092915050565b600081359050610b20816112be565b92915050565b600060208284031215610b3c57610b3b611223565b5b6000610b4a848285016109ae565b91505092915050565b600060208284031215610b6957610b68611223565b5b6000610b77848285016109c3565b91505092915050565b600060208284031215610b9657610b95611223565b5b6000610ba4848285016109d8565b91505092915050565b600060208284031215610bc357610bc2611223565b5b600082013567ffffffffffffffff811115610be157610be061121e565b5b610bed84828501610a43565b91505092915050565b600080600060608486031215610c0f57610c0e611223565b5b6000610c1d86828701610a71565b9350506020610c2e86828701610b11565b925050604084013567ffffffffffffffff811115610c4f57610c4e61121e565b5b610c5b86828701610a86565b9150509250925092565b600060208284031215610c7b57610c7a611223565b5b600082013567ffffffffffffffff811115610c9957610c9861121e565b5b610ca584828501610a86565b91505092915050565b600080600060408486031215610cc757610cc6611223565b5b6000610cd586828701610ab4565b935050602084013567ffffffffffffffff811115610cf657610cf561121e565b5b610d02868287016109ed565b92509250509250925092565b600060208284031215610d2457610d23611223565b5b600082013567ffffffffffffffff811115610d4257610d4161121e565b5b610d4e84828501610ad3565b91505092915050565b600080600080600060808688031215610d7357610d72611223565b5b600086013567ffffffffffffffff811115610d9157610d9061121e565b5b610d9d88828901610af2565b9550506020610dae888289016109ae565b9450506040610dbf88828901610b11565b935050606086013567ffffffffffffffff811115610de057610ddf61121e565b5b610dec888289016109ed565b92509250509295509295909350565b610e04816110f0565b82525050565b610e1381611102565b82525050565b6000610e2583856110da565b9350610e32838584611154565b82840190509392505050565b6000610e49826110b3565b610e5381856110c9565b9350610e63818560208601611163565b610e6c81611228565b840191505092915050565b6000610e82826110be565b610e8c81856110e5565b9350610e9c818560208601611163565b80840191505092915050565b6000610eb56006836110e5565b9150610ec082611239565b600682019050919050565b610ed48161114a565b82525050565b6000610ee7828486610e19565b91508190509392505050565b6000610eff8284610e77565b915081905092915050565b6000610f1582610ea8565b9150819050919050565b6000602082019050610f346000830184610dfb565b92915050565b6000606082019050610f4f6000830186610dfb565b610f5c6020830185610dfb565b610f696040830184610ecb565b949350505050565b6000602082019050610f866000830184610e0a565b92915050565b60006020820190508181036000830152610fa68184610e3e565b905092915050565b6000602082019050610fc36000830184610ecb565b92915050565b60008083356001602003843603038112610fe657610fe561120a565b5b80840192508235915067ffffffffffffffff82111561100857611007611200565b5b60208301925060018202360383131561102457611023611214565b5b509250929050565b6000611036611047565b90506110428282611196565b919050565b6000604051905090565b600067ffffffffffffffff82111561106c5761106b6111c7565b5b61107582611228565b9050602081019050919050565b600067ffffffffffffffff82111561109d5761109c6111c7565b5b6110a682611228565b9050602081019050919050565b600081519050919050565b600081519050919050565b600082825260208201905092915050565b600081905092915050565b600081905092915050565b60006110fb8261112a565b9050919050565b60008115159050919050565b6000819050919050565b6000611123826110f0565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b82818337600083830152505050565b60005b83811015611181578082015181840152602081019050611166565b83811115611190576000848401525b50505050565b61119f82611228565b810181811067ffffffffffffffff821117156111be576111bd6111c7565b5b80604052505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f7265766572740000000000000000000000000000000000000000000000000000600082015250565b61126b816110f0565b811461127657600080fd5b50565b61128281611102565b811461128d57600080fd5b50565b6112998161110e565b81146112a457600080fd5b50565b6112b081611118565b81146112bb57600080fd5b50565b6112c78161114a565b81146112d257600080fd5b5056fea26469706673582212201f295f137d0ea146883fdaa6858baa14e4c467a843ff4e7829fd9df0d4c2aede64736f6c63430008070033" + "bin": "6080604052348015600f57600080fd5b506115288061001f6000396000f3fe6080604052600436106100c65760003560e01c8063ad23b28b1161007f578063c9028a3611610059578063c9028a361461027b578063e2842ed7146102a4578063f592cbfb146102e1578063f936ae851461031e576100cd565b8063ad23b28b146101ea578063c7a339a914610227578063c85f843414610250576100cd565b806336e980a0146100d25780634297a263146100fb5780635bcfd61614610138578063676cc054146101615780639291fe2614610191578063a799911f146101ce576100cd565b366100cd57005b600080fd5b3480156100de57600080fd5b506100f960048036038101906100f49190610b86565b61035b565b005b34801561010757600080fd5b50610122600480360381019061011d9190610c05565b610385565b60405161012f9190610c4b565b60405180910390f35b34801561014457600080fd5b5061015f600480360381019061015a9190610d74565b61039d565b005b61017b60048036038101906101769190610e37565b610483565b6040516101889190610f16565b60405180910390f35b34801561019d57600080fd5b506101b860048036038101906101b39190610b86565b610595565b6040516101c59190610c4b565b60405180910390f35b6101e860048036038101906101e39190610b86565b6105d8565b005b3480156101f657600080fd5b50610211600480360381019061020c9190610f38565b610601565b60405161021e9190610fba565b60405180910390f35b34801561023357600080fd5b5061024e6004803603810190610249919061101a565b610661565b005b34801561025c57600080fd5b50610265610715565b6040516102729190610fba565b60405180910390f35b34801561028757600080fd5b506102a2600480360381019061029d91906110a8565b61074e565b005b3480156102b057600080fd5b506102cb60048036038101906102c69190610c05565b610888565b6040516102d8919061110c565b60405180910390f35b3480156102ed57600080fd5b5061030860048036038101906103039190610b86565b6108a8565b604051610315919061110c565b60405180910390f35b34801561032a57600080fd5b50610345600480360381019061034091906111c8565b6108f7565b6040516103529190611220565b60405180910390f35b61036481610940565b1561036e57600080fd5b61037781610996565b6103828160006109ea565b50565b60026020528060005260406000206000915090505481565b6103ea82828080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050610940565b156103f457600080fd5b600080838390501461044a5782828080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050610466565b6104658660200160208101906104609190610f38565b610601565b5b905061047181610996565b61047b81856109ea565b505050505050565b606060008084849050146104db5783838080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050506104f7565b6104f68560000160208101906104f19190610f38565b610601565b5b905061050281610996565b61050c81346109ea565b84600001602081019061051f9190610f38565b60018260405161052f9190611277565b908152602001604051809103902060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550604051806020016040528060008152509150509392505050565b600060026000836040516020016105ac91906112ca565b604051602081830303815290604052805190602001208152602001908152602001600020549050919050565b6105e181610940565b156105eb57600080fd5b6105f481610996565b6105fe81346109ea565b50565b60606040518060400160405280601681526020017f63616c6c65642077697468206e6f206d657373616765000000000000000000008152508260405160200161064b929190611329565b6040516020818303038152906040529050919050565b61066a81610940565b1561067457600080fd5b8273ffffffffffffffffffffffffffffffffffffffff166323b872dd3330856040518463ffffffff1660e01b81526004016106b193929190611351565b6020604051808303816000875af11580156106d0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106f491906113b4565b6106fd57600080fd5b61070681610996565b61071081836109ea565b505050565b6040518060400160405280601681526020017f63616c6c65642077697468206e6f206d6573736167650000000000000000000081525081565b6107a981806060019061076191906113f0565b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050610996565b6108068180606001906107bc91906113f0565b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505060006109ea565b8060000160208101906108199190610f38565b600182806060019061082b91906113f0565b604051610839929190611478565b908152602001604051809103902060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b60006020528060005260406000206000915054906101000a900460ff1681565b6000806000836040516020016108be91906112ca565b60405160208183030381529060405280519060200120815260200190815260200160002060009054906101000a900460ff169050919050565b6001818051602081018201805184825260208301602085012081835280955050505050506000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000604051602001610951906114dd565b604051602081830303815290604052805190602001208260405160200161097891906112ca565b60405160208183030381529060405280519060200120149050919050565b6001600080836040516020016109ac91906112ca565b60405160208183030381529060405280519060200120815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b806002600084604051602001610a0091906112ca565b604051602081830303815290604052805190602001208152602001908152602001600020819055505050565b6000604051905090565b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b610a9382610a4a565b810181811067ffffffffffffffff82111715610ab257610ab1610a5b565b5b80604052505050565b6000610ac5610a2c565b9050610ad18282610a8a565b919050565b600067ffffffffffffffff821115610af157610af0610a5b565b5b610afa82610a4a565b9050602081019050919050565b82818337600083830152505050565b6000610b29610b2484610ad6565b610abb565b905082815260208101848484011115610b4557610b44610a45565b5b610b50848285610b07565b509392505050565b600082601f830112610b6d57610b6c610a40565b5b8135610b7d848260208601610b16565b91505092915050565b600060208284031215610b9c57610b9b610a36565b5b600082013567ffffffffffffffff811115610bba57610bb9610a3b565b5b610bc684828501610b58565b91505092915050565b6000819050919050565b610be281610bcf565b8114610bed57600080fd5b50565b600081359050610bff81610bd9565b92915050565b600060208284031215610c1b57610c1a610a36565b5b6000610c2984828501610bf0565b91505092915050565b6000819050919050565b610c4581610c32565b82525050565b6000602082019050610c606000830184610c3c565b92915050565b600080fd5b600060608284031215610c8157610c80610c66565b5b81905092915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000610cb582610c8a565b9050919050565b610cc581610caa565b8114610cd057600080fd5b50565b600081359050610ce281610cbc565b92915050565b610cf181610c32565b8114610cfc57600080fd5b50565b600081359050610d0e81610ce8565b92915050565b600080fd5b600080fd5b60008083601f840112610d3457610d33610a40565b5b8235905067ffffffffffffffff811115610d5157610d50610d14565b5b602083019150836001820283011115610d6d57610d6c610d19565b5b9250929050565b600080600080600060808688031215610d9057610d8f610a36565b5b600086013567ffffffffffffffff811115610dae57610dad610a3b565b5b610dba88828901610c6b565b9550506020610dcb88828901610cd3565b9450506040610ddc88828901610cff565b935050606086013567ffffffffffffffff811115610dfd57610dfc610a3b565b5b610e0988828901610d1e565b92509250509295509295909350565b600060208284031215610e2e57610e2d610c66565b5b81905092915050565b600080600060408486031215610e5057610e4f610a36565b5b6000610e5e86828701610e18565b935050602084013567ffffffffffffffff811115610e7f57610e7e610a3b565b5b610e8b86828701610d1e565b92509250509250925092565b600081519050919050565b600082825260208201905092915050565b60005b83811015610ed1578082015181840152602081019050610eb6565b60008484015250505050565b6000610ee882610e97565b610ef28185610ea2565b9350610f02818560208601610eb3565b610f0b81610a4a565b840191505092915050565b60006020820190508181036000830152610f308184610edd565b905092915050565b600060208284031215610f4e57610f4d610a36565b5b6000610f5c84828501610cd3565b91505092915050565b600081519050919050565b600082825260208201905092915050565b6000610f8c82610f65565b610f968185610f70565b9350610fa6818560208601610eb3565b610faf81610a4a565b840191505092915050565b60006020820190508181036000830152610fd48184610f81565b905092915050565b6000610fe782610caa565b9050919050565b610ff781610fdc565b811461100257600080fd5b50565b60008135905061101481610fee565b92915050565b60008060006060848603121561103357611032610a36565b5b600061104186828701611005565b935050602061105286828701610cff565b925050604084013567ffffffffffffffff81111561107357611072610a3b565b5b61107f86828701610b58565b9150509250925092565b60006080828403121561109f5761109e610c66565b5b81905092915050565b6000602082840312156110be576110bd610a36565b5b600082013567ffffffffffffffff8111156110dc576110db610a3b565b5b6110e884828501611089565b91505092915050565b60008115159050919050565b611106816110f1565b82525050565b600060208201905061112160008301846110fd565b92915050565b600067ffffffffffffffff82111561114257611141610a5b565b5b61114b82610a4a565b9050602081019050919050565b600061116b61116684611127565b610abb565b90508281526020810184848401111561118757611186610a45565b5b611192848285610b07565b509392505050565b600082601f8301126111af576111ae610a40565b5b81356111bf848260208601611158565b91505092915050565b6000602082840312156111de576111dd610a36565b5b600082013567ffffffffffffffff8111156111fc576111fb610a3b565b5b6112088482850161119a565b91505092915050565b61121a81610caa565b82525050565b60006020820190506112356000830184611211565b92915050565b600081905092915050565b600061125182610e97565b61125b818561123b565b935061126b818560208601610eb3565b80840191505092915050565b60006112838284611246565b915081905092915050565b600081905092915050565b60006112a482610f65565b6112ae818561128e565b93506112be818560208601610eb3565b80840191505092915050565b60006112d68284611299565b915081905092915050565b60008160601b9050919050565b60006112f9826112e1565b9050919050565b600061130b826112ee565b9050919050565b61132361131e82610caa565b611300565b82525050565b60006113358285611299565b91506113418284611312565b6014820191508190509392505050565b60006060820190506113666000830186611211565b6113736020830185611211565b6113806040830184610c3c565b949350505050565b611391816110f1565b811461139c57600080fd5b50565b6000815190506113ae81611388565b92915050565b6000602082840312156113ca576113c9610a36565b5b60006113d88482850161139f565b91505092915050565b600080fd5b600080fd5b600080fd5b6000808335600160200384360303811261140d5761140c6113e1565b5b80840192508235915067ffffffffffffffff82111561142f5761142e6113e6565b5b60208301925060018202360383131561144b5761144a6113eb565b5b509250929050565b600061145f838561123b565b935061146c838584610b07565b82840190509392505050565b6000611485828486611453565b91508190509392505050565b7f7265766572740000000000000000000000000000000000000000000000000000600082015250565b60006114c760068361128e565b91506114d282611491565b600682019050919050565b60006114e8826114ba565b915081905091905056fea26469706673582212205747e512af435680fec20f1d2e088f93d6c12052fee7e353f45e5e49a671377b64736f6c634300081a0033" } diff --git a/pkg/contracts/testdappv2/TestDAppV2.sol b/pkg/contracts/testdappv2/TestDAppV2.sol index c460c87025..3282cbe383 100644 --- a/pkg/contracts/testdappv2/TestDAppV2.sol +++ b/pkg/contracts/testdappv2/TestDAppV2.sol @@ -1,11 +1,13 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.8.7; +pragma solidity ^0.8.26; interface IERC20 { function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); } contract TestDAppV2 { + string public constant NO_MESSAGE_CALL = "called with no message"; + struct zContext { bytes origin; address sender; @@ -35,9 +37,17 @@ contract TestDAppV2 { mapping(bytes => address) public senderWithMessage; mapping(bytes32 => uint256) public amountWithMessage; + // return the index used for the "WithMessage" mapping when the message for calls is empty + // this allows testing the message with empty message + // this function includes the sender of the message to avoid collisions when running parallel tests with different senders + function getNoMessageIndex(address sender) pure public returns (string memory) { + return string(abi.encodePacked(NO_MESSAGE_CALL, sender)); + } + function setCalledWithMessage(string memory message) internal { calledWithMessage[keccak256(abi.encodePacked(message))] = true; } + function setAmountWithMessage(string memory message, uint256 amount) internal { amountWithMessage[keccak256(abi.encodePacked(message))] = amount; } @@ -50,7 +60,7 @@ contract TestDAppV2 { return amountWithMessage[keccak256(abi.encodePacked(message))]; } - // Universal contract interface + // Universal contract interface on ZEVM function onCall( zContext calldata _context, address _zrc20, @@ -61,8 +71,10 @@ contract TestDAppV2 { { require(!isRevertMessage(string(message))); - setCalledWithMessage(string(message)); - setAmountWithMessage(string(message), amount); + string memory messageStr = message.length == 0 ? getNoMessageIndex(_context.sender) : string(message); + + setCalledWithMessage(messageStr); + setAmountWithMessage(messageStr, amount); } // called with gas token @@ -103,11 +115,15 @@ contract TestDAppV2 { senderWithMessage[revertContext.revertMessage] = revertContext.sender; } - // Callable interface + // Callable interface on connected EVM chains function onCall(MessageContext calldata messageContext, bytes calldata message) external payable returns (bytes memory) { - setCalledWithMessage(string(message)); - setAmountWithMessage(string(message), msg.value); - senderWithMessage[message] = messageContext.sender; + string memory messageStr = message.length == 0 ? getNoMessageIndex(messageContext.sender) : string(message); + + setCalledWithMessage(messageStr); + setAmountWithMessage(messageStr, msg.value); + senderWithMessage[bytes(messageStr)] = messageContext.sender; + + return ""; } receive() external payable {} diff --git a/pkg/contracts/testdappv2/bindings.go b/pkg/contracts/testdappv2/bindings.go index 73843ba2d2..f2dbd2bfa8 100644 --- a/pkg/contracts/testdappv2/bindings.go +++ b/pkg/contracts/testdappv2/bindings.go @@ -1,4 +1,4 @@ -//go:generate sh -c "solc TestDAppV2.sol --combined-json abi,bin | jq '.contracts.\"TestDAppV2.sol:TestDAppV2\"' > TestDAppV2.json" +//go:generate sh -c "solc TestDAppV2.sol --evm-version london --combined-json abi,bin | jq '.contracts.\"TestDAppV2.sol:TestDAppV2\"' > TestDAppV2.json" //go:generate sh -c "cat TestDAppV2.json | jq .abi > TestDAppV2.abi" //go:generate sh -c "cat TestDAppV2.json | jq .bin | tr -d '\"' > TestDAppV2.bin" //go:generate sh -c "abigen --abi TestDAppV2.abi --bin TestDAppV2.bin --pkg testdappv2 --type TestDAppV2 --out TestDAppV2.go" diff --git a/proto/zetachain/zetacore/crosschain/cross_chain_tx.proto b/proto/zetachain/zetacore/crosschain/cross_chain_tx.proto index 9b634a6378..8feb44d382 100644 --- a/proto/zetachain/zetacore/crosschain/cross_chain_tx.proto +++ b/proto/zetachain/zetacore/crosschain/cross_chain_tx.proto @@ -43,6 +43,10 @@ message InboundParams { string ballot_index = 9; uint64 finalized_zeta_height = 10; TxFinalizationStatus tx_finalization_status = 11; + + // this field describes if a smart contract call should be made for a inbound + // with assets only used for protocol contract version 2 + bool is_cross_chain_call = 12; } message ZetaAccounting { diff --git a/proto/zetachain/zetacore/crosschain/tx.proto b/proto/zetachain/zetacore/crosschain/tx.proto index 9499a7c25c..cb76e53d0a 100644 --- a/proto/zetachain/zetacore/crosschain/tx.proto +++ b/proto/zetachain/zetacore/crosschain/tx.proto @@ -178,6 +178,9 @@ message MsgVoteInbound { RevertOptions revert_options = 17 [ (gogoproto.nullable) = false ]; CallOptions call_options = 18; + + // define if a smart contract call should be made with asset + bool is_cross_chain_call = 19; } message MsgVoteInboundResponse {} diff --git a/testutil/keeper/crosschain.go b/testutil/keeper/crosschain.go index aade2afdeb..8418bbdaaf 100644 --- a/testutil/keeper/crosschain.go +++ b/testutil/keeper/crosschain.go @@ -390,6 +390,7 @@ func MockRevertForHandleEVMDeposit( coin.CoinType_ERC20, mock.Anything, mock.Anything, + mock.Anything, ).Return(&evmtypes.MsgEthereumTxResponse{VmError: "reverted"}, false, errDeposit) } diff --git a/testutil/keeper/mocks/crosschain/fungible.go b/testutil/keeper/mocks/crosschain/fungible.go index d2de2b7a98..856e3e8313 100644 --- a/testutil/keeper/mocks/crosschain/fungible.go +++ b/testutil/keeper/mocks/crosschain/fungible.go @@ -697,9 +697,9 @@ func (_m *CrosschainFungibleKeeper) ZETARevertAndCallContract(ctx types.Context, return r0, r1 } -// ZRC20DepositAndCallContract provides a mock function with given fields: ctx, from, to, amount, senderChainID, data, coinType, asset, protocolContractVersion -func (_m *CrosschainFungibleKeeper) ZRC20DepositAndCallContract(ctx types.Context, from []byte, to common.Address, amount *big.Int, senderChainID int64, data []byte, coinType coin.CoinType, asset string, protocolContractVersion crosschaintypes.ProtocolContractVersion) (*evmtypes.MsgEthereumTxResponse, bool, error) { - ret := _m.Called(ctx, from, to, amount, senderChainID, data, coinType, asset, protocolContractVersion) +// ZRC20DepositAndCallContract provides a mock function with given fields: ctx, from, to, amount, senderChainID, data, coinType, asset, protocolContractVersion, isCrossChainCall +func (_m *CrosschainFungibleKeeper) ZRC20DepositAndCallContract(ctx types.Context, from []byte, to common.Address, amount *big.Int, senderChainID int64, data []byte, coinType coin.CoinType, asset string, protocolContractVersion crosschaintypes.ProtocolContractVersion, isCrossChainCall bool) (*evmtypes.MsgEthereumTxResponse, bool, error) { + ret := _m.Called(ctx, from, to, amount, senderChainID, data, coinType, asset, protocolContractVersion, isCrossChainCall) if len(ret) == 0 { panic("no return value specified for ZRC20DepositAndCallContract") @@ -708,25 +708,25 @@ func (_m *CrosschainFungibleKeeper) ZRC20DepositAndCallContract(ctx types.Contex var r0 *evmtypes.MsgEthereumTxResponse var r1 bool var r2 error - if rf, ok := ret.Get(0).(func(types.Context, []byte, common.Address, *big.Int, int64, []byte, coin.CoinType, string, crosschaintypes.ProtocolContractVersion) (*evmtypes.MsgEthereumTxResponse, bool, error)); ok { - return rf(ctx, from, to, amount, senderChainID, data, coinType, asset, protocolContractVersion) + if rf, ok := ret.Get(0).(func(types.Context, []byte, common.Address, *big.Int, int64, []byte, coin.CoinType, string, crosschaintypes.ProtocolContractVersion, bool) (*evmtypes.MsgEthereumTxResponse, bool, error)); ok { + return rf(ctx, from, to, amount, senderChainID, data, coinType, asset, protocolContractVersion, isCrossChainCall) } - if rf, ok := ret.Get(0).(func(types.Context, []byte, common.Address, *big.Int, int64, []byte, coin.CoinType, string, crosschaintypes.ProtocolContractVersion) *evmtypes.MsgEthereumTxResponse); ok { - r0 = rf(ctx, from, to, amount, senderChainID, data, coinType, asset, protocolContractVersion) + if rf, ok := ret.Get(0).(func(types.Context, []byte, common.Address, *big.Int, int64, []byte, coin.CoinType, string, crosschaintypes.ProtocolContractVersion, bool) *evmtypes.MsgEthereumTxResponse); ok { + r0 = rf(ctx, from, to, amount, senderChainID, data, coinType, asset, protocolContractVersion, isCrossChainCall) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*evmtypes.MsgEthereumTxResponse) } } - if rf, ok := ret.Get(1).(func(types.Context, []byte, common.Address, *big.Int, int64, []byte, coin.CoinType, string, crosschaintypes.ProtocolContractVersion) bool); ok { - r1 = rf(ctx, from, to, amount, senderChainID, data, coinType, asset, protocolContractVersion) + if rf, ok := ret.Get(1).(func(types.Context, []byte, common.Address, *big.Int, int64, []byte, coin.CoinType, string, crosschaintypes.ProtocolContractVersion, bool) bool); ok { + r1 = rf(ctx, from, to, amount, senderChainID, data, coinType, asset, protocolContractVersion, isCrossChainCall) } else { r1 = ret.Get(1).(bool) } - if rf, ok := ret.Get(2).(func(types.Context, []byte, common.Address, *big.Int, int64, []byte, coin.CoinType, string, crosschaintypes.ProtocolContractVersion) error); ok { - r2 = rf(ctx, from, to, amount, senderChainID, data, coinType, asset, protocolContractVersion) + if rf, ok := ret.Get(2).(func(types.Context, []byte, common.Address, *big.Int, int64, []byte, coin.CoinType, string, crosschaintypes.ProtocolContractVersion, bool) error); ok { + r2 = rf(ctx, from, to, amount, senderChainID, data, coinType, asset, protocolContractVersion, isCrossChainCall) } else { r2 = ret.Error(2) } diff --git a/testutil/sample/crosschain.go b/testutil/sample/crosschain.go index ff17525734..25733e1fef 100644 --- a/testutil/sample/crosschain.go +++ b/testutil/sample/crosschain.go @@ -305,30 +305,34 @@ func ZRC20Withdrawal(to []byte, value *big.Int) *zrc20.ZRC20Withdrawal { } } +// InvalidZRC20WithdrawToExternalReceipt is a receipt for a invalid ZRC20 withdrawal to an external address // receiver is 1EYVvXLusCxtVuEwoYvWRyN5EZTXwPVvo3 -func GetInvalidZRC20WithdrawToExternal(t *testing.T) (receipt ethtypes.Receipt) { +func InvalidZRC20WithdrawToExternalReceipt(t *testing.T) (receipt ethtypes.Receipt) { block := "{\n \"type\": \"0x2\",\n \"root\": \"0x\",\n \"status\": \"0x1\",\n \"cumulativeGasUsed\": \"0x4e7a38\",\n \"logsBloom\": \"0x00000000000000000000010000020000000000000000000000000000000000020000000100000000000000000000000080000000000000000000000400200000200000000002000000000008000000000000000000000000000000000000000000000000020000000000000000800800000040000000000000000010000000000000000000000000000000000000000000000000000004000000000000000000020000000000000000000000000000000000000000000000000000000000010000000002000000000000000000000000000000000000000000000000000020000010000000000000000001000000000000000000040200000000000000000000\",\n \"logs\": [\n {\n \"address\": \"0x13a0c5930c028511dc02665e7285134b6d11a5f4\",\n \"topics\": [\n \"0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef\",\n \"0x000000000000000000000000313e74f7755afbae4f90e02ca49f8f09ff934a37\",\n \"0x000000000000000000000000735b14bb79463307aacbed86daf3322b1e6226ab\"\n ],\n \"data\": \"0x0000000000000000000000000000000000000000000000000000000000003790\",\n \"blockNumber\": \"0x1a2ad3\",\n \"transactionHash\": \"0x81126c18c7ca7d1fb7ded6644a87802e91bf52154ee4af7a5b379354e24fb6e0\",\n \"transactionIndex\": \"0x10\",\n \"blockHash\": \"0x5cb338544f64a226f4bfccb7a8d977f861c13ad73f7dd4317b66b00dd95de51c\",\n \"logIndex\": \"0x46\",\n \"removed\": false\n },\n {\n \"address\": \"0x13a0c5930c028511dc02665e7285134b6d11a5f4\",\n \"topics\": [\n \"0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925\",\n \"0x000000000000000000000000313e74f7755afbae4f90e02ca49f8f09ff934a37\",\n \"0x00000000000000000000000013a0c5930c028511dc02665e7285134b6d11a5f4\"\n ],\n \"data\": \"0x00000000000000000000000000000000000000000000000000000000006a1217\",\n \"blockNumber\": \"0x1a2ad3\",\n \"transactionHash\": \"0x81126c18c7ca7d1fb7ded6644a87802e91bf52154ee4af7a5b379354e24fb6e0\",\n \"transactionIndex\": \"0x10\",\n \"blockHash\": \"0x5cb338544f64a226f4bfccb7a8d977f861c13ad73f7dd4317b66b00dd95de51c\",\n \"logIndex\": \"0x47\",\n \"removed\": false\n },\n {\n \"address\": \"0x13a0c5930c028511dc02665e7285134b6d11a5f4\",\n \"topics\": [\n \"0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef\",\n \"0x000000000000000000000000313e74f7755afbae4f90e02ca49f8f09ff934a37\",\n \"0x0000000000000000000000000000000000000000000000000000000000000000\"\n ],\n \"data\": \"0x00000000000000000000000000000000000000000000000000000000006a0c70\",\n \"blockNumber\": \"0x1a2ad3\",\n \"transactionHash\": \"0x81126c18c7ca7d1fb7ded6644a87802e91bf52154ee4af7a5b379354e24fb6e0\",\n \"transactionIndex\": \"0x10\",\n \"blockHash\": \"0x5cb338544f64a226f4bfccb7a8d977f861c13ad73f7dd4317b66b00dd95de51c\",\n \"logIndex\": \"0x48\",\n \"removed\": false\n },\n {\n \"address\": \"0x13a0c5930c028511dc02665e7285134b6d11a5f4\",\n \"topics\": [\n \"0x9ffbffc04a397460ee1dbe8c9503e098090567d6b7f4b3c02a8617d800b6d955\",\n \"0x000000000000000000000000313e74f7755afbae4f90e02ca49f8f09ff934a37\"\n ],\n \"data\": \"0x000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000006a0c700000000000000000000000000000000000000000000000000000000000003790000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000223145595676584c7573437874567545776f59765752794e35455a5458775056766f33000000000000000000000000000000000000000000000000000000000000\",\n \"blockNumber\": \"0x1a2ad3\",\n \"transactionHash\": \"0x81126c18c7ca7d1fb7ded6644a87802e91bf52154ee4af7a5b379354e24fb6e0\",\n \"transactionIndex\": \"0x10\",\n \"blockHash\": \"0x5cb338544f64a226f4bfccb7a8d977f861c13ad73f7dd4317b66b00dd95de51c\",\n \"logIndex\": \"0x49\",\n \"removed\": false\n }\n ],\n \"transactionHash\": \"0x81126c18c7ca7d1fb7ded6644a87802e91bf52154ee4af7a5b379354e24fb6e0\",\n \"contractAddress\": \"0x0000000000000000000000000000000000000000\",\n \"gasUsed\": \"0x12521\",\n \"blockHash\": \"0x5cb338544f64a226f4bfccb7a8d977f861c13ad73f7dd4317b66b00dd95de51c\",\n \"blockNumber\": \"0x1a2ad3\",\n \"transactionIndex\": \"0x10\"\n}\n" err := json.Unmarshal([]byte(block), &receipt) require.NoError(t, err) return } -func GetValidZrc20WithdrawToETH(t *testing.T) (receipt ethtypes.Receipt) { +// ValidZrc20WithdrawToETHReceipt is a receipt for a ZRC20 withdrawal to an external address +func ValidZrc20WithdrawToETHReceipt(t *testing.T) (receipt ethtypes.Receipt) { block := "{\n \"type\": \"0x2\",\n \"root\": \"0x\",\n \"status\": \"0x1\",\n \"cumulativeGasUsed\": \"0xdbedca\",\n \"logsBloom\": \"0x00200000001000000000000088020001000001000000000000000000000000000000020100000000000000000000000080000000000000000000000400640000000000000000000008000008020000200000000000000002000000008000000000000000020000000200000000800801000000080000000000000010000000000000000000000000000000000000001000000001000004080001404000000000028002000000000000000040000000000000000000000000000000000000000000000002000000000000008000000000000000800800001000000002000021000010000100000000000010800400000000020000000100400880000000004000\",\n \"logs\": [\n {\n \"address\": \"0x3f641963f3d9adf82d890fd8142313dcec807ba5\",\n \"topics\": [\n \"0x3d0ce9bfc3ed7d6862dbb28b2dea94561fe714a1b4d019aa8af39730d1ad7c3d\",\n \"0x0000000000000000000000008e0f8e7e9e121403e72151d00f4937eacb2d9ef3\"\n ],\n \"data\": \"0x00000000000000000000000000000000000000000000000045400a8fd5330000\",\n \"blockNumber\": \"0x17ef22\",\n \"transactionHash\": \"0x87229bb05d67f42017a697b34ed52d95afc9f5e3285479e845fe088b4c77d8f0\",\n \"transactionIndex\": \"0x1f\",\n \"blockHash\": \"0xf49e7039c7f1a81cd46de150980d92fa869cc0d2e2f1fe46aedc6400396137ff\",\n \"logIndex\": \"0x57\",\n \"removed\": false\n },\n {\n \"address\": \"0x5f0b1a82749cb4e2278ec87f8bf6b618dc71a8bf\",\n \"topics\": [\n \"0xe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c\",\n \"0x0000000000000000000000008e0f8e7e9e121403e72151d00f4937eacb2d9ef3\"\n ],\n \"data\": \"0x00000000000000000000000000000000000000000000001ac7c4159f72b90000\",\n \"blockNumber\": \"0x17ef22\",\n \"transactionHash\": \"0x87229bb05d67f42017a697b34ed52d95afc9f5e3285479e845fe088b4c77d8f0\",\n \"transactionIndex\": \"0x1f\",\n \"blockHash\": \"0xf49e7039c7f1a81cd46de150980d92fa869cc0d2e2f1fe46aedc6400396137ff\",\n \"logIndex\": \"0x58\",\n \"removed\": false\n },\n {\n \"address\": \"0x5f0b1a82749cb4e2278ec87f8bf6b618dc71a8bf\",\n \"topics\": [\n \"0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925\",\n \"0x0000000000000000000000008e0f8e7e9e121403e72151d00f4937eacb2d9ef3\",\n \"0x0000000000000000000000002ca7d64a7efe2d62a725e2b35cf7230d6677ffee\"\n ],\n \"data\": \"0x00000000000000000000000000000000000000000000001ac7c4159f72b90000\",\n \"blockNumber\": \"0x17ef22\",\n \"transactionHash\": \"0x87229bb05d67f42017a697b34ed52d95afc9f5e3285479e845fe088b4c77d8f0\",\n \"transactionIndex\": \"0x1f\",\n \"blockHash\": \"0xf49e7039c7f1a81cd46de150980d92fa869cc0d2e2f1fe46aedc6400396137ff\",\n \"logIndex\": \"0x59\",\n \"removed\": false\n },\n {\n \"address\": \"0x5f0b1a82749cb4e2278ec87f8bf6b618dc71a8bf\",\n \"topics\": [\n \"0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef\",\n \"0x0000000000000000000000008e0f8e7e9e121403e72151d00f4937eacb2d9ef3\",\n \"0x00000000000000000000000016ef1b018026e389fda93c1e993e987cf6e852e7\"\n ],\n \"data\": \"0x00000000000000000000000000000000000000000000001ac7c4159f72b90000\",\n \"blockNumber\": \"0x17ef22\",\n \"transactionHash\": \"0x87229bb05d67f42017a697b34ed52d95afc9f5e3285479e845fe088b4c77d8f0\",\n \"transactionIndex\": \"0x1f\",\n \"blockHash\": \"0xf49e7039c7f1a81cd46de150980d92fa869cc0d2e2f1fe46aedc6400396137ff\",\n \"logIndex\": \"0x5a\",\n \"removed\": false\n },\n {\n \"address\": \"0xd97b1de3619ed2c6beb3860147e30ca8a7dc9891\",\n \"topics\": [\n \"0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef\",\n \"0x00000000000000000000000016ef1b018026e389fda93c1e993e987cf6e852e7\",\n \"0x0000000000000000000000008e0f8e7e9e121403e72151d00f4937eacb2d9ef3\"\n ],\n \"data\": \"0x00000000000000000000000000000000000000000000000002e640d76638740f\",\n \"blockNumber\": \"0x17ef22\",\n \"transactionHash\": \"0x87229bb05d67f42017a697b34ed52d95afc9f5e3285479e845fe088b4c77d8f0\",\n \"transactionIndex\": \"0x1f\",\n \"blockHash\": \"0xf49e7039c7f1a81cd46de150980d92fa869cc0d2e2f1fe46aedc6400396137ff\",\n \"logIndex\": \"0x5b\",\n \"removed\": false\n },\n {\n \"address\": \"0x16ef1b018026e389fda93c1e993e987cf6e852e7\",\n \"topics\": [\n \"0x1c411e9a96e071241c2f21f7726b17ae89e3cab4c78be50e062b03a9fffbbad1\"\n ],\n \"data\": \"0x000000000000000000000000000000000000000000000b3f1da425061770a11600000000000000000000000000000000000000000000000135be3952e251aa40\",\n \"blockNumber\": \"0x17ef22\",\n \"transactionHash\": \"0x87229bb05d67f42017a697b34ed52d95afc9f5e3285479e845fe088b4c77d8f0\",\n \"transactionIndex\": \"0x1f\",\n \"blockHash\": \"0xf49e7039c7f1a81cd46de150980d92fa869cc0d2e2f1fe46aedc6400396137ff\",\n \"logIndex\": \"0x5c\",\n \"removed\": false\n },\n {\n \"address\": \"0x16ef1b018026e389fda93c1e993e987cf6e852e7\",\n \"topics\": [\n \"0xd78ad95fa46c994b6551d0da85fc275fe613ce37657fb8d5e3d130840159d822\",\n \"0x0000000000000000000000002ca7d64a7efe2d62a725e2b35cf7230d6677ffee\",\n \"0x0000000000000000000000008e0f8e7e9e121403e72151d00f4937eacb2d9ef3\"\n ],\n \"data\": \"0x00000000000000000000000000000000000000000000001ac7c4159f72b900000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002e640d76638740f\",\n \"blockNumber\": \"0x17ef22\",\n \"transactionHash\": \"0x87229bb05d67f42017a697b34ed52d95afc9f5e3285479e845fe088b4c77d8f0\",\n \"transactionIndex\": \"0x1f\",\n \"blockHash\": \"0xf49e7039c7f1a81cd46de150980d92fa869cc0d2e2f1fe46aedc6400396137ff\",\n \"logIndex\": \"0x5d\",\n \"removed\": false\n },\n {\n \"address\": \"0xd97b1de3619ed2c6beb3860147e30ca8a7dc9891\",\n \"topics\": [\n \"0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925\",\n \"0x0000000000000000000000008e0f8e7e9e121403e72151d00f4937eacb2d9ef3\",\n \"0x000000000000000000000000d97b1de3619ed2c6beb3860147e30ca8a7dc9891\"\n ],\n \"data\": \"0x00000000000000000000000000000000000000000000000000015059f36c8ec0\",\n \"blockNumber\": \"0x17ef22\",\n \"transactionHash\": \"0x87229bb05d67f42017a697b34ed52d95afc9f5e3285479e845fe088b4c77d8f0\",\n \"transactionIndex\": \"0x1f\",\n \"blockHash\": \"0xf49e7039c7f1a81cd46de150980d92fa869cc0d2e2f1fe46aedc6400396137ff\",\n \"logIndex\": \"0x5e\",\n \"removed\": false\n },\n {\n \"address\": \"0xd97b1de3619ed2c6beb3860147e30ca8a7dc9891\",\n \"topics\": [\n \"0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef\",\n \"0x0000000000000000000000008e0f8e7e9e121403e72151d00f4937eacb2d9ef3\",\n \"0x000000000000000000000000735b14bb79463307aacbed86daf3322b1e6226ab\"\n ],\n \"data\": \"0x00000000000000000000000000000000000000000000000000015059f36c8ec0\",\n \"blockNumber\": \"0x17ef22\",\n \"transactionHash\": \"0x87229bb05d67f42017a697b34ed52d95afc9f5e3285479e845fe088b4c77d8f0\",\n \"transactionIndex\": \"0x1f\",\n \"blockHash\": \"0xf49e7039c7f1a81cd46de150980d92fa869cc0d2e2f1fe46aedc6400396137ff\",\n \"logIndex\": \"0x5f\",\n \"removed\": false\n },\n {\n \"address\": \"0xd97b1de3619ed2c6beb3860147e30ca8a7dc9891\",\n \"topics\": [\n \"0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925\",\n \"0x0000000000000000000000008e0f8e7e9e121403e72151d00f4937eacb2d9ef3\",\n \"0x000000000000000000000000d97b1de3619ed2c6beb3860147e30ca8a7dc9891\"\n ],\n \"data\": \"0x0000000000000000000000000000000000000000000000000000000000000000\",\n \"blockNumber\": \"0x17ef22\",\n \"transactionHash\": \"0x87229bb05d67f42017a697b34ed52d95afc9f5e3285479e845fe088b4c77d8f0\",\n \"transactionIndex\": \"0x1f\",\n \"blockHash\": \"0xf49e7039c7f1a81cd46de150980d92fa869cc0d2e2f1fe46aedc6400396137ff\",\n \"logIndex\": \"0x60\",\n \"removed\": false\n },\n {\n \"address\": \"0xd97b1de3619ed2c6beb3860147e30ca8a7dc9891\",\n \"topics\": [\n \"0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef\",\n \"0x0000000000000000000000008e0f8e7e9e121403e72151d00f4937eacb2d9ef3\",\n \"0x0000000000000000000000000000000000000000000000000000000000000000\"\n ],\n \"data\": \"0x00000000000000000000000000000000000000000000000002e4f07d72cbe54f\",\n \"blockNumber\": \"0x17ef22\",\n \"transactionHash\": \"0x87229bb05d67f42017a697b34ed52d95afc9f5e3285479e845fe088b4c77d8f0\",\n \"transactionIndex\": \"0x1f\",\n \"blockHash\": \"0xf49e7039c7f1a81cd46de150980d92fa869cc0d2e2f1fe46aedc6400396137ff\",\n \"logIndex\": \"0x61\",\n \"removed\": false\n },\n {\n \"address\": \"0xd97b1de3619ed2c6beb3860147e30ca8a7dc9891\",\n \"topics\": [\n \"0x9ffbffc04a397460ee1dbe8c9503e098090567d6b7f4b3c02a8617d800b6d955\",\n \"0x0000000000000000000000008e0f8e7e9e121403e72151d00f4937eacb2d9ef3\"\n ],\n \"data\": \"0x000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000002e4f07d72cbe54f00000000000000000000000000000000000000000000000000015059f36c8ec0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000005dabfdd153aaab4a970fd953dcfeee8bf6bb946e\",\n \"blockNumber\": \"0x17ef22\",\n \"transactionHash\": \"0x87229bb05d67f42017a697b34ed52d95afc9f5e3285479e845fe088b4c77d8f0\",\n \"transactionIndex\": \"0x1f\",\n \"blockHash\": \"0xf49e7039c7f1a81cd46de150980d92fa869cc0d2e2f1fe46aedc6400396137ff\",\n \"logIndex\": \"0x62\",\n \"removed\": false\n },\n {\n \"address\": \"0x8e0f8e7e9e121403e72151d00f4937eacb2d9ef3\",\n \"topics\": [\n \"0x97eb75cc53ffa3f4560fc62e4912dda10ac56c3d12dbc48dc8c27d5ab225cf66\"\n ],\n \"data\": \"0x0000000000000000000000005f0b1a82749cb4e2278ec87f8bf6b618dc71a8bf000000000000000000000000d97b1de3619ed2c6beb3860147e30ca8a7dc989100000000000000000000000000000000000000000000001b0d04202f47ec000000000000000000000000000000000000000000000000001ac7c4159f72b900000000000000000000000000005dabfdd153aaab4a970fd953dcfeee8bf6bb946e00000000000000000000000000000000000000000000000045400a8fd5330000\",\n \"blockNumber\": \"0x17ef22\",\n \"transactionHash\": \"0x87229bb05d67f42017a697b34ed52d95afc9f5e3285479e845fe088b4c77d8f0\",\n \"transactionIndex\": \"0x1f\",\n \"blockHash\": \"0xf49e7039c7f1a81cd46de150980d92fa869cc0d2e2f1fe46aedc6400396137ff\",\n \"logIndex\": \"0x63\",\n \"removed\": false\n }\n ],\n \"transactionHash\": \"0x87229bb05d67f42017a697b34ed52d95afc9f5e3285479e845fe088b4c77d8f0\",\n \"contractAddress\": \"0x0000000000000000000000000000000000000000\",\n \"gasUsed\": \"0x41c3c\",\n \"blockHash\": \"0xf49e7039c7f1a81cd46de150980d92fa869cc0d2e2f1fe46aedc6400396137ff\",\n \"blockNumber\": \"0x17ef22\",\n \"transactionIndex\": \"0x1f\"\n}" err := json.Unmarshal([]byte(block), &receipt) require.NoError(t, err) return } +// ValidZRC20WithdrawToBTCReceipt is a receipt for a ZRC20 withdrawal to a BTC address // receiver is bc1qysd4sp9q8my59ul9wsf5rvs9p387hf8vfwatzu -func GetValidZRC20WithdrawToBTC(t *testing.T) (receipt ethtypes.Receipt) { +func ValidZRC20WithdrawToBTCReceipt(t *testing.T) (receipt ethtypes.Receipt) { block := "{\"type\":\"0x2\",\"root\":\"0x\",\"status\":\"0x1\",\"cumulativeGasUsed\":\"0x1f25ed\",\"logsBloom\":\"0x00000000000000000000000000020000000000000000000000000000000000020000000100000000000000000040000080000000000000000000000400200000200000000002000000000008000000000000000000000000000000000000000000000000020000000000000000800800000000000000000000000010000000000000000000000000000000000000000000000000000004000000000000000000020000000001000000000000000000000000000000000000000000000000010000000002000000000000000010000000000000000000000000000000000020000010000000000000000000000000000000000000040200000000000000000000\",\"logs\":[{\"address\":\"0x13a0c5930c028511dc02665e7285134b6d11a5f4\",\"topics\":[\"0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef\",\"0x00000000000000000000000033ead83db0d0c682b05ead61e8d8f481bb1b4933\",\"0x000000000000000000000000735b14bb79463307aacbed86daf3322b1e6226ab\"],\"data\":\"0x0000000000000000000000000000000000000000000000000000000000003d84\",\"blockNumber\":\"0x1a00f3\",\"transactionHash\":\"0x9aaefece38fd2bd87077038a63fffb7c84cc8dd1ed01de134a8504a1f9a410c3\",\"transactionIndex\":\"0x8\",\"blockHash\":\"0x9517356f0b3877990590421266f02a4ff349b7476010ee34dd5f0dfc85c2684f\",\"logIndex\":\"0x28\",\"removed\":false},{\"address\":\"0x13a0c5930c028511dc02665e7285134b6d11a5f4\",\"topics\":[\"0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925\",\"0x00000000000000000000000033ead83db0d0c682b05ead61e8d8f481bb1b4933\",\"0x00000000000000000000000013a0c5930c028511dc02665e7285134b6d11a5f4\"],\"data\":\"0x0000000000000000000000000000000000000000000000000000000000978c98\",\"blockNumber\":\"0x1a00f3\",\"transactionHash\":\"0x9aaefece38fd2bd87077038a63fffb7c84cc8dd1ed01de134a8504a1f9a410c3\",\"transactionIndex\":\"0x8\",\"blockHash\":\"0x9517356f0b3877990590421266f02a4ff349b7476010ee34dd5f0dfc85c2684f\",\"logIndex\":\"0x29\",\"removed\":false},{\"address\":\"0x13a0c5930c028511dc02665e7285134b6d11a5f4\",\"topics\":[\"0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef\",\"0x00000000000000000000000033ead83db0d0c682b05ead61e8d8f481bb1b4933\",\"0x0000000000000000000000000000000000000000000000000000000000000000\"],\"data\":\"0x0000000000000000000000000000000000000000000000000000000000003039\",\"blockNumber\":\"0x1a00f3\",\"transactionHash\":\"0x9aaefece38fd2bd87077038a63fffb7c84cc8dd1ed01de134a8504a1f9a410c3\",\"transactionIndex\":\"0x8\",\"blockHash\":\"0x9517356f0b3877990590421266f02a4ff349b7476010ee34dd5f0dfc85c2684f\",\"logIndex\":\"0x2a\",\"removed\":false},{\"address\":\"0x13a0c5930c028511dc02665e7285134b6d11a5f4\",\"topics\":[\"0x9ffbffc04a397460ee1dbe8c9503e098090567d6b7f4b3c02a8617d800b6d955\",\"0x00000000000000000000000033ead83db0d0c682b05ead61e8d8f481bb1b4933\"],\"data\":\"0x000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000030390000000000000000000000000000000000000000000000000000000000003d840000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002a626331717973643473703971386d793539756c3977736635727673397033383768663876667761747a7500000000000000000000000000000000000000000000\",\"blockNumber\":\"0x1a00f3\",\"transactionHash\":\"0x9aaefece38fd2bd87077038a63fffb7c84cc8dd1ed01de134a8504a1f9a410c3\",\"transactionIndex\":\"0x8\",\"blockHash\":\"0x9517356f0b3877990590421266f02a4ff349b7476010ee34dd5f0dfc85c2684f\",\"logIndex\":\"0x2b\",\"removed\":false}],\"transactionHash\":\"0x9aaefece38fd2bd87077038a63fffb7c84cc8dd1ed01de134a8504a1f9a410c3\",\"contractAddress\":\"0x0000000000000000000000000000000000000000\",\"gasUsed\":\"0x12575\",\"blockHash\":\"0x9517356f0b3877990590421266f02a4ff349b7476010ee34dd5f0dfc85c2684f\",\"blockNumber\":\"0x1a00f3\",\"transactionIndex\":\"0x8\"}\n" err := json.Unmarshal([]byte(block), &receipt) require.NoError(t, err) return } -func GetValidZetaSentDestinationExternal(t *testing.T) (receipt ethtypes.Receipt) { +// ValidZetaSentDestinationExternalReceipt is a receipt for a Zeta sent to an external destination +func ValidZetaSentDestinationExternalReceipt(t *testing.T) (receipt ethtypes.Receipt) { block := "{\"root\":\"0x\",\"status\":\"0x1\",\"cumulativeGasUsed\":\"0xd75f4f\",\"logsBloom\":\"0x00000000000000000000000000000000800800000000000000000000100000000000002000000100000000000000000000000000000000000000000000240000000000000000000000000008000000000800000000440000000000008080000000000000000000000000000000000000000000000000040000000010000000000000000000000000000000000000000200000001000000000000000040000000020000000000000000000000008200000000000000000000000000000000000000000002000000000000008000000000000000000000000000080002000041000010000000000000000000000000000000000000000000400000000000000000\",\"logs\":[{\"address\":\"0x5f0b1a82749cb4e2278ec87f8bf6b618dc71a8bf\",\"topics\":[\"0xe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c\",\"0x000000000000000000000000f0a3f93ed1b126142e61423f9546bf1323ff82df\"],\"data\":\"0x000000000000000000000000000000000000000000000003cb71f51fc5580000\",\"blockNumber\":\"0x1bedc8\",\"transactionHash\":\"0x19d8a67a05998f1cb19fe731b96d817d5b186b62c9430c51679664959c952ef0\",\"transactionIndex\":\"0x5f\",\"blockHash\":\"0x198fdd1f4bc6b910db978602cb15bdb2bcc6fd960e9324e9b9675dc062133794\",\"logIndex\":\"0x13b\",\"removed\":false},{\"address\":\"0x5f0b1a82749cb4e2278ec87f8bf6b618dc71a8bf\",\"topics\":[\"0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925\",\"0x000000000000000000000000f0a3f93ed1b126142e61423f9546bf1323ff82df\",\"0x000000000000000000000000239e96c8f17c85c30100ac26f635ea15f23e9c67\"],\"data\":\"0x000000000000000000000000000000000000000000000003cb71f51fc5580000\",\"blockNumber\":\"0x1bedc8\",\"transactionHash\":\"0x19d8a67a05998f1cb19fe731b96d817d5b186b62c9430c51679664959c952ef0\",\"transactionIndex\":\"0x5f\",\"blockHash\":\"0x198fdd1f4bc6b910db978602cb15bdb2bcc6fd960e9324e9b9675dc062133794\",\"logIndex\":\"0x13c\",\"removed\":false},{\"address\":\"0x5f0b1a82749cb4e2278ec87f8bf6b618dc71a8bf\",\"topics\":[\"0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef\",\"0x000000000000000000000000f0a3f93ed1b126142e61423f9546bf1323ff82df\",\"0x000000000000000000000000239e96c8f17c85c30100ac26f635ea15f23e9c67\"],\"data\":\"0x000000000000000000000000000000000000000000000003cb71f51fc5580000\",\"blockNumber\":\"0x1bedc8\",\"transactionHash\":\"0x19d8a67a05998f1cb19fe731b96d817d5b186b62c9430c51679664959c952ef0\",\"transactionIndex\":\"0x5f\",\"blockHash\":\"0x198fdd1f4bc6b910db978602cb15bdb2bcc6fd960e9324e9b9675dc062133794\",\"logIndex\":\"0x13d\",\"removed\":false},{\"address\":\"0x5f0b1a82749cb4e2278ec87f8bf6b618dc71a8bf\",\"topics\":[\"0x7fcf532c15f0a6db0bd6d0e038bea71d30d808c7d98cb3bf7268a95bf5081b65\",\"0x000000000000000000000000239e96c8f17c85c30100ac26f635ea15f23e9c67\"],\"data\":\"0x000000000000000000000000000000000000000000000003cb71f51fc5580000\",\"blockNumber\":\"0x1bedc8\",\"transactionHash\":\"0x19d8a67a05998f1cb19fe731b96d817d5b186b62c9430c51679664959c952ef0\",\"transactionIndex\":\"0x5f\",\"blockHash\":\"0x198fdd1f4bc6b910db978602cb15bdb2bcc6fd960e9324e9b9675dc062133794\",\"logIndex\":\"0x13e\",\"removed\":false},{\"address\":\"0x239e96c8f17c85c30100ac26f635ea15f23e9c67\",\"topics\":[\"0x7ec1c94701e09b1652f3e1d307e60c4b9ebf99aff8c2079fd1d8c585e031c4e4\",\"0x000000000000000000000000f0a3f93ed1b126142e61423f9546bf1323ff82df\",\"0x0000000000000000000000000000000000000000000000000000000000000001\"],\"data\":\"0x00000000000000000000000060983881bdf302dcfa96603a58274d15d596620900000000000000000000000000000000000000000000000000000000000000c0000000000000000000000000000000000000000000000003cb71f51fc558000000000000000000000000000000000000000000000000000000000000000186a000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000120000000000000000000000000000000000000000000000000000000000000001460983881bdf302dcfa96603a58274d15d59662090000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000000\",\"blockNumber\":\"0x1bedc8\",\"transactionHash\":\"0x19d8a67a05998f1cb19fe731b96d817d5b186b62c9430c51679664959c952ef0\",\"transactionIndex\":\"0x5f\",\"blockHash\":\"0x198fdd1f4bc6b910db978602cb15bdb2bcc6fd960e9324e9b9675dc062133794\",\"logIndex\":\"0x13f\",\"removed\":false}],\"transactionHash\":\"0x19d8a67a05998f1cb19fe731b96d817d5b186b62c9430c51679664959c952ef0\",\"contractAddress\":\"0x0000000000000000000000000000000000000000\",\"gasUsed\":\"0x2406d\",\"blockHash\":\"0x198fdd1f4bc6b910db978602cb15bdb2bcc6fd960e9324e9b9675dc062133794\",\"blockNumber\":\"0x1bedc8\",\"transactionIndex\":\"0x5f\"}\n" err := json.Unmarshal([]byte(block), &receipt) require.NoError(t, err) diff --git a/typescript/zetachain/zetacore/crosschain/cross_chain_tx_pb.d.ts b/typescript/zetachain/zetacore/crosschain/cross_chain_tx_pb.d.ts index e5295ee133..4ac84ac5e7 100644 --- a/typescript/zetachain/zetacore/crosschain/cross_chain_tx_pb.d.ts +++ b/typescript/zetachain/zetacore/crosschain/cross_chain_tx_pb.d.ts @@ -165,6 +165,14 @@ export declare class InboundParams extends Message { */ txFinalizationStatus: TxFinalizationStatus; + /** + * this field describes if a smart contract call should be made for a inbound + * with assets only used for protocol contract version 2 + * + * @generated from field: bool is_cross_chain_call = 12; + */ + isCrossChainCall: boolean; + constructor(data?: PartialMessage); static readonly runtime: typeof proto3; diff --git a/typescript/zetachain/zetacore/crosschain/tx_pb.d.ts b/typescript/zetachain/zetacore/crosschain/tx_pb.d.ts index caee83f0cc..f830e00a48 100644 --- a/typescript/zetachain/zetacore/crosschain/tx_pb.d.ts +++ b/typescript/zetachain/zetacore/crosschain/tx_pb.d.ts @@ -669,6 +669,13 @@ export declare class MsgVoteInbound extends Message { */ callOptions?: CallOptions; + /** + * define if a smart contract call should be made with asset + * + * @generated from field: bool is_cross_chain_call = 19; + */ + isCrossChainCall: boolean; + constructor(data?: PartialMessage); static readonly runtime: typeof proto3; diff --git a/x/crosschain/keeper/evm_deposit.go b/x/crosschain/keeper/evm_deposit.go index be08873bba..e57dc16d1b 100644 --- a/x/crosschain/keeper/evm_deposit.go +++ b/x/crosschain/keeper/evm_deposit.go @@ -110,6 +110,7 @@ func (k Keeper) HandleEVMDeposit(ctx sdk.Context, cctx *types.CrossChainTx) (boo inboundCoinType, cctx.InboundParams.Asset, cctx.ProtocolContractVersion, + cctx.InboundParams.IsCrossChainCall, ) if fungibletypes.IsContractReverted(evmTxResponse, err) || errShouldRevertCctx(err) { return true, err diff --git a/x/crosschain/keeper/evm_deposit_test.go b/x/crosschain/keeper/evm_deposit_test.go index e933d168aa..45c0a0aecc 100644 --- a/x/crosschain/keeper/evm_deposit_test.go +++ b/x/crosschain/keeper/evm_deposit_test.go @@ -107,6 +107,7 @@ func TestMsgServer_HandleEVMDeposit(t *testing.T) { coin.CoinType_ERC20, mock.Anything, mock.Anything, + mock.Anything, ).Return(&evmtypes.MsgEthereumTxResponse{}, false, nil) // call HandleEVMDeposit @@ -153,6 +154,7 @@ func TestMsgServer_HandleEVMDeposit(t *testing.T) { coin.CoinType_ERC20, mock.Anything, mock.Anything, + mock.Anything, ).Return(&evmtypes.MsgEthereumTxResponse{ Logs: []*evmtypes.Log{ { @@ -216,6 +218,7 @@ func TestMsgServer_HandleEVMDeposit(t *testing.T) { coin.CoinType_ERC20, mock.Anything, mock.Anything, + mock.Anything, ).Return(&evmtypes.MsgEthereumTxResponse{ Logs: []*evmtypes.Log{ { @@ -306,6 +309,7 @@ func TestMsgServer_HandleEVMDeposit(t *testing.T) { coin.CoinType_ERC20, mock.Anything, mock.Anything, + mock.Anything, ).Return(&evmtypes.MsgEthereumTxResponse{}, false, errDeposit) // call HandleEVMDeposit @@ -351,6 +355,7 @@ func TestMsgServer_HandleEVMDeposit(t *testing.T) { coin.CoinType_ERC20, mock.Anything, mock.Anything, + mock.Anything, ).Return(&evmtypes.MsgEthereumTxResponse{VmError: "reverted"}, false, errDeposit) // call HandleEVMDeposit @@ -395,6 +400,7 @@ func TestMsgServer_HandleEVMDeposit(t *testing.T) { coin.CoinType_ERC20, mock.Anything, mock.Anything, + mock.Anything, ).Return(&evmtypes.MsgEthereumTxResponse{}, false, fungibletypes.ErrForeignCoinCapReached) // call HandleEVMDeposit @@ -439,6 +445,7 @@ func TestMsgServer_HandleEVMDeposit(t *testing.T) { coin.CoinType_ERC20, mock.Anything, mock.Anything, + mock.Anything, ).Return(&evmtypes.MsgEthereumTxResponse{}, false, fungibletypes.ErrPausedZRC20) // call HandleEVMDeposit @@ -483,6 +490,7 @@ func TestMsgServer_HandleEVMDeposit(t *testing.T) { coin.CoinType_ERC20, mock.Anything, mock.Anything, + mock.Anything, ).Return(&evmtypes.MsgEthereumTxResponse{}, false, fungibletypes.ErrCallNonContract) // call HandleEVMDeposit @@ -553,6 +561,7 @@ func TestMsgServer_HandleEVMDeposit(t *testing.T) { coin.CoinType_ERC20, mock.Anything, mock.Anything, + mock.Anything, ).Return(&evmtypes.MsgEthereumTxResponse{}, false, nil) cctx.GetCurrentOutboundParam().Receiver = sample.EthAddress().String() @@ -596,6 +605,7 @@ func TestMsgServer_HandleEVMDeposit(t *testing.T) { coin.CoinType_ERC20, mock.Anything, mock.Anything, + mock.Anything, ).Return(&evmtypes.MsgEthereumTxResponse{}, false, nil) cctx := sample.CrossChainTx(t, "foo") diff --git a/x/crosschain/keeper/evm_hooks_test.go b/x/crosschain/keeper/evm_hooks_test.go index 3f4e049d33..fff7e31f02 100644 --- a/x/crosschain/keeper/evm_hooks_test.go +++ b/x/crosschain/keeper/evm_hooks_test.go @@ -102,7 +102,7 @@ func SetupStateForProcessLogs( func TestParseZRC20WithdrawalEvent(t *testing.T) { t.Run("unable to parse an event with an invalid address in event log", func(t *testing.T) { - for i, log := range sample.GetInvalidZRC20WithdrawToExternal(t).Logs { + for i, log := range sample.InvalidZRC20WithdrawToExternalReceipt(t).Logs { event, err := crosschainkeeper.ParseZRC20WithdrawalEvent(*log) if i < 3 { require.ErrorContains(t, err, "event signature mismatch") @@ -116,7 +116,7 @@ func TestParseZRC20WithdrawalEvent(t *testing.T) { }) t.Run("successfully parse event for a valid BTC withdrawal", func(t *testing.T) { - for i, log := range sample.GetValidZRC20WithdrawToBTC(t).Logs { + for i, log := range sample.ValidZRC20WithdrawToBTCReceipt(t).Logs { event, err := crosschainkeeper.ParseZRC20WithdrawalEvent(*log) if i < 3 { require.ErrorContains(t, err, "event signature mismatch") @@ -131,7 +131,7 @@ func TestParseZRC20WithdrawalEvent(t *testing.T) { }) t.Run("successfully parse valid event for ETH withdrawal", func(t *testing.T) { - for i, log := range sample.GetValidZrc20WithdrawToETH(t).Logs { + for i, log := range sample.ValidZrc20WithdrawToETHReceipt(t).Logs { event, err := crosschainkeeper.ParseZRC20WithdrawalEvent(*log) if i != 11 { require.ErrorContains(t, err, "event signature mismatch") @@ -146,7 +146,7 @@ func TestParseZRC20WithdrawalEvent(t *testing.T) { }) t.Run("failed to parse event with a valid address but no topic present", func(t *testing.T) { - for _, log := range sample.GetValidZRC20WithdrawToBTC(t).Logs { + for _, log := range sample.ValidZRC20WithdrawToBTCReceipt(t).Logs { log.Topics = nil event, err := crosschainkeeper.ParseZRC20WithdrawalEvent(*log) require.ErrorContains(t, err, "invalid log - no topics") @@ -158,7 +158,7 @@ func TestValidateZrc20WithdrawEvent(t *testing.T) { t.Run("successfully validate a valid event", func(t *testing.T) { k, ctx, _, _ := keepertest.CrosschainKeeper(t) btcMainNetWithdrawalEvent, err := crosschainkeeper.ParseZRC20WithdrawalEvent( - *sample.GetValidZRC20WithdrawToBTC(t).Logs[3], + *sample.ValidZRC20WithdrawToBTCReceipt(t).Logs[3], ) require.NoError(t, err) err = k.ValidateZrc20WithdrawEvent(ctx, btcMainNetWithdrawalEvent, chains.BitcoinMainnet.ChainId) @@ -168,7 +168,7 @@ func TestValidateZrc20WithdrawEvent(t *testing.T) { t.Run("unable to validate a btc withdrawal event with an invalid amount", func(t *testing.T) { k, ctx, _, _ := keepertest.CrosschainKeeper(t) btcMainNetWithdrawalEvent, err := crosschainkeeper.ParseZRC20WithdrawalEvent( - *sample.GetValidZRC20WithdrawToBTC(t).Logs[3], + *sample.ValidZRC20WithdrawToBTCReceipt(t).Logs[3], ) require.NoError(t, err) @@ -186,7 +186,7 @@ func TestValidateZrc20WithdrawEvent(t *testing.T) { t.Run("unable to validate a event with an invalid chain ID", func(t *testing.T) { k, ctx, _, _ := keepertest.CrosschainKeeper(t) btcMainNetWithdrawalEvent, err := crosschainkeeper.ParseZRC20WithdrawalEvent( - *sample.GetValidZRC20WithdrawToBTC(t).Logs[3], + *sample.ValidZRC20WithdrawToBTCReceipt(t).Logs[3], ) require.NoError(t, err) err = k.ValidateZrc20WithdrawEvent(ctx, btcMainNetWithdrawalEvent, chains.BitcoinTestnet.ChainId) @@ -196,7 +196,7 @@ func TestValidateZrc20WithdrawEvent(t *testing.T) { t.Run("unable to validate an unsupported address type", func(t *testing.T) { k, ctx, _, _ := keepertest.CrosschainKeeper(t) btcMainNetWithdrawalEvent, err := crosschainkeeper.ParseZRC20WithdrawalEvent( - *sample.GetValidZRC20WithdrawToBTC(t).Logs[3], + *sample.ValidZRC20WithdrawToBTCReceipt(t).Logs[3], ) require.NoError(t, err) btcMainNetWithdrawalEvent.To = []byte("04b2891ba8cb491828db3ebc8a780d43b169e7b3974114e6e50f9bab6ec" + @@ -248,7 +248,7 @@ func TestKeeper_ProcessZRC20WithdrawalEvent(t *testing.T) { setSupportedChain(ctx, zk, []int64{chainID, senderChain.ChainId}...) SetupStateForProcessLogs(t, ctx, k, zk, sdkk, chain) - event, err := crosschainkeeper.ParseZRC20WithdrawalEvent(*sample.GetValidZRC20WithdrawToBTC(t).Logs[3]) + event, err := crosschainkeeper.ParseZRC20WithdrawalEvent(*sample.ValidZRC20WithdrawToBTCReceipt(t).Logs[3]) require.NoError(t, err) zrc20 := setupGasCoin(t, ctx, zk.FungibleKeeper, sdkk.EvmKeeper, chainID, "bitcoin", "BTC") event.Raw.Address = zrc20 @@ -274,7 +274,7 @@ func TestKeeper_ProcessZRC20WithdrawalEvent(t *testing.T) { setSupportedChain(ctx, zk, []int64{chainID, senderChain.ChainId}...) SetupStateForProcessLogs(t, ctx, k, zk, sdkk, chain) - event, err := crosschainkeeper.ParseZRC20WithdrawalEvent(*sample.GetValidZrc20WithdrawToETH(t).Logs[11]) + event, err := crosschainkeeper.ParseZRC20WithdrawalEvent(*sample.ValidZrc20WithdrawToETHReceipt(t).Logs[11]) require.NoError(t, err) zrc20 := setupGasCoin(t, ctx, zk.FungibleKeeper, sdkk.EvmKeeper, chainID, "ethereum", "ETH") event.Raw.Address = zrc20 @@ -299,7 +299,7 @@ func TestKeeper_ProcessZRC20WithdrawalEvent(t *testing.T) { setSupportedChain(ctx, zk, chainID) SetupStateForProcessLogs(t, ctx, k, zk, sdkk, chain) - event, err := crosschainkeeper.ParseZRC20WithdrawalEvent(*sample.GetValidZrc20WithdrawToETH(t).Logs[11]) + event, err := crosschainkeeper.ParseZRC20WithdrawalEvent(*sample.ValidZrc20WithdrawToETHReceipt(t).Logs[11]) require.NoError(t, err) setupGasCoin(t, ctx, zk.FungibleKeeper, sdkk.EvmKeeper, chainID, "ethereum", "ETH") emittingContract := sample.EthAddress() @@ -318,7 +318,7 @@ func TestKeeper_ProcessZRC20WithdrawalEvent(t *testing.T) { chainID := chain.ChainId SetupStateForProcessLogs(t, ctx, k, zk, sdkk, chain) - event, err := crosschainkeeper.ParseZRC20WithdrawalEvent(*sample.GetValidZrc20WithdrawToETH(t).Logs[11]) + event, err := crosschainkeeper.ParseZRC20WithdrawalEvent(*sample.ValidZrc20WithdrawToETHReceipt(t).Logs[11]) require.NoError(t, err) zrc20 := setupGasCoin(t, ctx, zk.FungibleKeeper, sdkk.EvmKeeper, chainID, "ethereum", "ETH") event.Raw.Address = zrc20 @@ -339,7 +339,7 @@ func TestKeeper_ProcessZRC20WithdrawalEvent(t *testing.T) { setSupportedChain(ctx, zk, chainID) SetupStateForProcessLogs(t, ctx, k, zk, sdkk, chain) - event, err := crosschainkeeper.ParseZRC20WithdrawalEvent(*sample.GetValidZrc20WithdrawToETH(t).Logs[11]) + event, err := crosschainkeeper.ParseZRC20WithdrawalEvent(*sample.ValidZrc20WithdrawToETHReceipt(t).Logs[11]) require.NoError(t, err) zrc20 := setupGasCoin(t, ctx, zk.FungibleKeeper, sdkk.EvmKeeper, chainID, "ethereum", "ETH") event.Raw.Address = zrc20 @@ -362,7 +362,7 @@ func TestKeeper_ProcessZRC20WithdrawalEvent(t *testing.T) { setSupportedChain(ctx, zk, chainID) SetupStateForProcessLogs(t, ctx, k, zk, sdkk, chain) - event, err := crosschainkeeper.ParseZRC20WithdrawalEvent(*sample.GetValidZrc20WithdrawToETH(t).Logs[11]) + event, err := crosschainkeeper.ParseZRC20WithdrawalEvent(*sample.ValidZrc20WithdrawToETHReceipt(t).Logs[11]) require.NoError(t, err) zrc20 := setupGasCoin(t, ctx, zk.FungibleKeeper, sdkk.EvmKeeper, chainID, "ethereum", "ETH") event.Raw.Address = zrc20 @@ -387,7 +387,7 @@ func TestKeeper_ProcessZRC20WithdrawalEvent(t *testing.T) { setSupportedChain(ctx, zk, chainID) SetupStateForProcessLogs(t, ctx, k, zk, sdkk, chain) - event, err := crosschainkeeper.ParseZRC20WithdrawalEvent(*sample.GetValidZrc20WithdrawToETH(t).Logs[11]) + event, err := crosschainkeeper.ParseZRC20WithdrawalEvent(*sample.ValidZrc20WithdrawToETHReceipt(t).Logs[11]) require.NoError(t, err) zrc20 := setupGasCoin(t, ctx, zk.FungibleKeeper, sdkk.EvmKeeper, chainID, "ethereum", "ETH") event.Raw.Address = zrc20 @@ -415,7 +415,7 @@ func TestKeeper_ProcessZRC20WithdrawalEvent(t *testing.T) { SetupStateForProcessLogs(t, ctx, k, zk, sdkk, chain) k.RemoveGasPrice(ctx, strconv.FormatInt(chainID, 10)) - event, err := crosschainkeeper.ParseZRC20WithdrawalEvent(*sample.GetValidZrc20WithdrawToETH(t).Logs[11]) + event, err := crosschainkeeper.ParseZRC20WithdrawalEvent(*sample.ValidZrc20WithdrawToETHReceipt(t).Logs[11]) require.NoError(t, err) zrc20 := setupGasCoin(t, ctx, zk.FungibleKeeper, sdkk.EvmKeeper, chainID, "ethereum", "ETH") event.Raw.Address = zrc20 @@ -441,7 +441,7 @@ func TestKeeper_ProcessZRC20WithdrawalEvent(t *testing.T) { Nonce: 1, }) - event, err := crosschainkeeper.ParseZRC20WithdrawalEvent(*sample.GetValidZrc20WithdrawToETH(t).Logs[11]) + event, err := crosschainkeeper.ParseZRC20WithdrawalEvent(*sample.ValidZrc20WithdrawToETHReceipt(t).Logs[11]) require.NoError(t, err) zrc20 := setupGasCoin(t, ctx, zk.FungibleKeeper, sdkk.EvmKeeper, chainID, "ethereum", "ETH") event.Raw.Address = zrc20 @@ -456,7 +456,7 @@ func TestKeeper_ProcessZRC20WithdrawalEvent(t *testing.T) { func TestKeeper_ParseZetaSentEvent(t *testing.T) { t.Run("successfully parse a valid event", func(t *testing.T) { - logs := sample.GetValidZetaSentDestinationExternal(t).Logs + logs := sample.ValidZetaSentDestinationExternalReceipt(t).Logs for i, log := range logs { connector := log.Address event, err := crosschainkeeper.ParseZetaSentEvent(*log, connector) @@ -473,7 +473,7 @@ func TestKeeper_ParseZetaSentEvent(t *testing.T) { }) t.Run("unable to parse if topics field is empty", func(t *testing.T) { - logs := sample.GetValidZetaSentDestinationExternal(t).Logs + logs := sample.ValidZetaSentDestinationExternalReceipt(t).Logs for _, log := range logs { connector := log.Address log.Topics = nil @@ -484,7 +484,7 @@ func TestKeeper_ParseZetaSentEvent(t *testing.T) { }) t.Run("unable to parse if connector address does not match", func(t *testing.T) { - logs := sample.GetValidZetaSentDestinationExternal(t).Logs + logs := sample.ValidZetaSentDestinationExternalReceipt(t).Logs for i, log := range logs { event, err := crosschainkeeper.ParseZetaSentEvent(*log, sample.EthAddress()) if i < 4 { @@ -522,8 +522,8 @@ func TestKeeper_ProcessZetaSentEvent(t *testing.T) { require.NoError(t, err) event, err := crosschainkeeper.ParseZetaSentEvent( - *sample.GetValidZetaSentDestinationExternal(t).Logs[4], - sample.GetValidZetaSentDestinationExternal(t).Logs[4].Address, + *sample.ValidZetaSentDestinationExternalReceipt(t).Logs[4], + sample.ValidZetaSentDestinationExternalReceipt(t).Logs[4].Address, ) require.NoError(t, err) emittingContract := sample.EthAddress() @@ -558,8 +558,8 @@ func TestKeeper_ProcessZetaSentEvent(t *testing.T) { SetupStateForProcessLogsZetaSent(t, ctx, k, zk, sdkk, chain, admin) event, err := crosschainkeeper.ParseZetaSentEvent( - *sample.GetValidZetaSentDestinationExternal(t).Logs[4], - sample.GetValidZetaSentDestinationExternal(t).Logs[4].Address, + *sample.ValidZetaSentDestinationExternalReceipt(t).Logs[4], + sample.ValidZetaSentDestinationExternalReceipt(t).Logs[4].Address, ) require.NoError(t, err) emittingContract := sample.EthAddress() @@ -588,8 +588,8 @@ func TestKeeper_ProcessZetaSentEvent(t *testing.T) { require.NoError(t, err) event, err := crosschainkeeper.ParseZetaSentEvent( - *sample.GetValidZetaSentDestinationExternal(t).Logs[4], - sample.GetValidZetaSentDestinationExternal(t).Logs[4].Address, + *sample.ValidZetaSentDestinationExternalReceipt(t).Logs[4], + sample.ValidZetaSentDestinationExternalReceipt(t).Logs[4].Address, ) require.NoError(t, err) emittingContract := sample.EthAddress() @@ -620,8 +620,8 @@ func TestKeeper_ProcessZetaSentEvent(t *testing.T) { require.NoError(t, err) event, err := crosschainkeeper.ParseZetaSentEvent( - *sample.GetValidZetaSentDestinationExternal(t).Logs[4], - sample.GetValidZetaSentDestinationExternal(t).Logs[4].Address, + *sample.ValidZetaSentDestinationExternalReceipt(t).Logs[4], + sample.ValidZetaSentDestinationExternalReceipt(t).Logs[4].Address, ) require.NoError(t, err) emittingContract := sample.EthAddress() @@ -651,8 +651,8 @@ func TestKeeper_ProcessZetaSentEvent(t *testing.T) { ) require.NoError(t, err) event, err := crosschainkeeper.ParseZetaSentEvent( - *sample.GetValidZetaSentDestinationExternal(t).Logs[4], - sample.GetValidZetaSentDestinationExternal(t).Logs[4].Address, + *sample.ValidZetaSentDestinationExternalReceipt(t).Logs[4], + sample.ValidZetaSentDestinationExternalReceipt(t).Logs[4].Address, ) require.NoError(t, err) emittingContract := sample.EthAddress() @@ -689,8 +689,8 @@ func TestKeeper_ProcessZetaSentEvent(t *testing.T) { require.NoError(t, err) event, err := crosschainkeeper.ParseZetaSentEvent( - *sample.GetValidZetaSentDestinationExternal(t).Logs[4], - sample.GetValidZetaSentDestinationExternal(t).Logs[4].Address, + *sample.ValidZetaSentDestinationExternalReceipt(t).Logs[4], + sample.ValidZetaSentDestinationExternalReceipt(t).Logs[4].Address, ) require.NoError(t, err) emittingContract := sample.EthAddress() @@ -712,7 +712,7 @@ func TestKeeper_ProcessLogs(t *testing.T) { setSupportedChain(ctx, zk, []int64{chainID, senderChain.ChainId}...) SetupStateForProcessLogs(t, ctx, k, zk, sdkk, chain) - block := sample.GetValidZRC20WithdrawToBTC(t) + block := sample.ValidZRC20WithdrawToBTCReceipt(t) gasZRC20 := setupGasCoin(t, ctx, zk.FungibleKeeper, sdkk.EvmKeeper, chainID, "bitcoin", "BTC") for _, log := range block.Logs { log.Address = gasZRC20 @@ -749,7 +749,7 @@ func TestKeeper_ProcessLogs(t *testing.T) { sdk.NewCoins(sdk.NewCoin(config.BaseDenom, amount)), ) require.NoError(t, err) - block := sample.GetValidZetaSentDestinationExternal(t) + block := sample.ValidZetaSentDestinationExternalReceipt(t) system, found := zk.FungibleKeeper.GetSystemContract(ctx) require.True(t, found) for _, log := range block.Logs { @@ -779,7 +779,7 @@ func TestKeeper_ProcessLogs(t *testing.T) { k, ctx, _, _ := keepertest.CrosschainKeeper(t) k.GetAuthKeeper().GetModuleAccount(ctx, fungibletypes.ModuleName) - err := k.ProcessLogs(ctx, sample.GetValidZRC20WithdrawToBTC(t).Logs, sample.EthAddress(), "") + err := k.ProcessLogs(ctx, sample.ValidZRC20WithdrawToBTCReceipt(t).Logs, sample.EthAddress(), "") require.ErrorContains(t, err, "cannot find system contract") cctxList := k.GetAllCrossChainTx(ctx) require.Len(t, cctxList, 0) @@ -794,7 +794,7 @@ func TestKeeper_ProcessLogs(t *testing.T) { setSupportedChain(ctx, zk, chainID) SetupStateForProcessLogs(t, ctx, k, zk, sdkk, chain) - block := sample.GetValidZRC20WithdrawToBTC(t) + block := sample.ValidZRC20WithdrawToBTCReceipt(t) gasZRC20 := setupGasCoin(t, ctx, zk.FungibleKeeper, sdkk.EvmKeeper, chainID, "bitcoin", "BTC") for _, log := range block.Logs { log.Address = gasZRC20 @@ -817,7 +817,7 @@ func TestKeeper_ProcessLogs(t *testing.T) { setSupportedChain(ctx, zk, chainID) SetupStateForProcessLogs(t, ctx, k, zk, sdkk, chain) - block := sample.GetValidZRC20WithdrawToBTC(t) + block := sample.ValidZRC20WithdrawToBTCReceipt(t) setupGasCoin(t, ctx, zk.FungibleKeeper, sdkk.EvmKeeper, chainID, "bitcoin", "BTC") for _, log := range block.Logs { log.Address = sample.EthAddress() @@ -840,7 +840,7 @@ func TestKeeper_ProcessLogs(t *testing.T) { setSupportedChain(ctx, zk, []int64{chainID, senderChain.ChainId}...) SetupStateForProcessLogs(t, ctx, k, zk, sdkk, chain) - block := sample.GetValidZRC20WithdrawToBTC(t) + block := sample.ValidZRC20WithdrawToBTCReceipt(t) gasZRC20 := setupGasCoin(t, ctx, zk.FungibleKeeper, sdkk.EvmKeeper, chainID, "bitcoin", "BTC") for _, log := range block.Logs { log.Address = gasZRC20 @@ -865,7 +865,7 @@ func TestKeeper_ProcessLogs(t *testing.T) { setSupportedChain(ctx, zk, chainID) SetupStateForProcessLogs(t, ctx, k, zk, sdkk, chain) - block := sample.GetInvalidZRC20WithdrawToExternal(t) + block := sample.InvalidZRC20WithdrawToExternalReceipt(t) gasZRC20 := setupGasCoin(t, ctx, zk.FungibleKeeper, sdkk.EvmKeeper, chainID, "bitcoin", "BTC") for _, log := range block.Logs { log.Address = gasZRC20 @@ -886,7 +886,7 @@ func TestKeeper_ProcessLogs(t *testing.T) { setSupportedChain(ctx, zk, chainID) SetupStateForProcessLogs(t, ctx, k, zk, sdkk, chain) - block := sample.GetValidZRC20WithdrawToBTC(t) + block := sample.ValidZRC20WithdrawToBTCReceipt(t) gasZRC20 := setupGasCoin(t, ctx, zk.FungibleKeeper, sdkk.EvmKeeper, chainID, "bitcoin", "BTC") for _, log := range block.Logs { log.Address = gasZRC20 diff --git a/x/crosschain/keeper/v2_zevm_inbound.go b/x/crosschain/keeper/v2_zevm_inbound.go index 9efc5e1e2e..8b4d4ed742 100644 --- a/x/crosschain/keeper/v2_zevm_inbound.go +++ b/x/crosschain/keeper/v2_zevm_inbound.go @@ -1,23 +1,16 @@ package keeper import ( - "encoding/hex" "fmt" "math/big" errorsmod "cosmossdk.io/errors" - "cosmossdk.io/math" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/ethereum/go-ethereum/accounts/abi/bind" ethcommon "github.com/ethereum/go-ethereum/common" ethtypes "github.com/ethereum/go-ethereum/core/types" "github.com/pkg/errors" - "github.com/zeta-chain/protocol-contracts/v2/pkg/gatewayzevm.sol" - "github.com/zeta-chain/node/pkg/chains" - "github.com/zeta-chain/node/pkg/coin" "github.com/zeta-chain/node/x/crosschain/types" - fungibletypes "github.com/zeta-chain/node/x/fungible/types" observertypes "github.com/zeta-chain/node/x/observer/types" ) @@ -30,8 +23,8 @@ func (k Keeper) ProcessZEVMInboundV2( txOrigin string, ) error { // try to parse a withdrawal event from the log - withdrawalEvent, gatewayEvent, err := k.parseGatewayEvent(*log, gatewayAddr) - if err == nil && (withdrawalEvent != nil || gatewayEvent != nil) { + withdrawalEvent, callEvent, withdrawalAndCallEvent, err := types.ParseGatewayEvent(*log, gatewayAddr) + if err == nil && (withdrawalEvent != nil || callEvent != nil || withdrawalAndCallEvent != nil) { var inbound *types.MsgVoteInbound // parse data from event and validate @@ -44,21 +37,42 @@ func (k Keeper) ProcessZEVMInboundV2( value = withdrawalEvent.Value receiver = withdrawalEvent.Receiver contractAddress = withdrawalEvent.Raw.Address - } else { - zrc20 = gatewayEvent.Zrc20 + } else if callEvent != nil { + zrc20 = callEvent.Zrc20 value = big.NewInt(0) - receiver = gatewayEvent.Receiver - contractAddress = gatewayEvent.Raw.Address + receiver = callEvent.Receiver + contractAddress = callEvent.Raw.Address + } else { + zrc20 = withdrawalAndCallEvent.Zrc20 + value = withdrawalAndCallEvent.Value + receiver = withdrawalAndCallEvent.Receiver + contractAddress = withdrawalAndCallEvent.Raw.Address } k.Logger(ctx).Error(fmt.Sprintf("processing inbound. zrc20: %s", zrc20.Hex())) + // get several information necessary for processing the inbound foreignCoin, found := k.fungibleKeeper.GetForeignCoins(ctx, zrc20.Hex()) if !found { ctx.Logger(). Info(fmt.Sprintf("cannot find foreign coin with contract address %s", contractAddress.Hex())) return nil } + receiverChain, found := k.zetaObserverKeeper.GetSupportedChainFromChainID(ctx, foreignCoin.ForeignChainId) + if !found { + return errorsmod.Wrapf( + observertypes.ErrSupportedChains, + "chain with chainID %d not supported", + foreignCoin.ForeignChainId, + ) + } + gasLimitQueried, err := k.fungibleKeeper.QueryGasLimit( + ctx, + ethcommon.HexToAddress(foreignCoin.Zrc20ContractAddress), + ) + if err != nil { + return err + } // validate data of the withdrawal event if err := k.validateZRC20Withdrawal(ctx, foreignCoin.ForeignChainId, value, receiver); err != nil { @@ -67,12 +81,39 @@ func (k Keeper) ProcessZEVMInboundV2( // create inbound object depending on the event type if withdrawalEvent != nil { - inbound, err = k.newWithdrawalInbound(ctx, txOrigin, foreignCoin, withdrawalEvent) + inbound, err = types.NewWithdrawalInbound( + ctx, + txOrigin, + foreignCoin.CoinType, + foreignCoin.Asset, + withdrawalEvent, + receiverChain, + gasLimitQueried, + ) + if err != nil { + return err + } + } else if callEvent != nil { + inbound, err = types.NewCallInbound( + ctx, + txOrigin, + callEvent, + receiverChain, + gasLimitQueried, + ) if err != nil { return err } } else { - inbound, err = k.newCallInbound(ctx, txOrigin, foreignCoin, gatewayEvent) + inbound, err = types.NewWithdrawAndCallInbound( + ctx, + txOrigin, + foreignCoin.CoinType, + foreignCoin.Asset, + withdrawalAndCallEvent, + receiverChain, + gasLimitQueried, + ) if err != nil { return err } @@ -96,182 +137,3 @@ func (k Keeper) ProcessZEVMInboundV2( return nil } - -// parseGatewayEvent parses the event from the gateway contract -func (k Keeper) parseGatewayEvent( - log ethtypes.Log, - gatewayAddr ethcommon.Address, -) (*gatewayzevm.GatewayZEVMWithdrawn, *gatewayzevm.GatewayZEVMCalled, error) { - if len(log.Topics) == 0 { - return nil, nil, errors.New("ParseGatewayCallEvent: invalid log - no topics") - } - filterer, err := gatewayzevm.NewGatewayZEVMFilterer(log.Address, bind.ContractFilterer(nil)) - if err != nil { - return nil, nil, err - } - withdrawalEvent, err := k.parseGatewayWithdrawalEvent(log, gatewayAddr, filterer) - if err == nil { - return withdrawalEvent, nil, nil - } - callEvent, err := k.parseGatewayCallEvent(log, gatewayAddr, filterer) - if err == nil { - return nil, callEvent, nil - } - return nil, nil, errors.New("ParseGatewayEvent: invalid log - no event found") -} - -// parseGatewayWithdrawalEvent parses the GatewayZEVMWithdrawal event from the log -func (k Keeper) parseGatewayWithdrawalEvent( - log ethtypes.Log, - gatewayAddr ethcommon.Address, - filterer *gatewayzevm.GatewayZEVMFilterer, -) (*gatewayzevm.GatewayZEVMWithdrawn, error) { - event, err := filterer.ParseWithdrawn(log) - if err != nil { - return nil, err - } - if event.Raw.Address != gatewayAddr { - return nil, errors.New("ParseGatewayWithdrawalEvent: invalid log - wrong contract address") - } - return event, nil -} - -// parseGatewayCallEvent parses the GatewayZEVMCall event from the log -func (k Keeper) parseGatewayCallEvent( - log ethtypes.Log, - gatewayAddr ethcommon.Address, - filterer *gatewayzevm.GatewayZEVMFilterer, -) (*gatewayzevm.GatewayZEVMCalled, error) { - event, err := filterer.ParseCalled(log) - if err != nil { - return nil, err - } - if event.Raw.Address != gatewayAddr { - return nil, errors.New("ParseGatewayCallEvent: invalid log - wrong contract address") - } - return event, nil -} - -// newWithdrawalInbound creates a new inbound object for a withdrawal -// currently inbound data is represented with a MsgVoteInbound message -// TODO: replace with a more appropriate object -// https://github.com/zeta-chain/node/issues/2658 -func (k Keeper) newWithdrawalInbound( - ctx sdk.Context, - txOrigin string, - foreignCoin fungibletypes.ForeignCoins, - event *gatewayzevm.GatewayZEVMWithdrawn, -) (*types.MsgVoteInbound, error) { - receiverChain, found := k.zetaObserverKeeper.GetSupportedChainFromChainID(ctx, foreignCoin.ForeignChainId) - if !found { - return nil, errorsmod.Wrapf( - observertypes.ErrSupportedChains, - "chain with chainID %d not supported", - foreignCoin.ForeignChainId, - ) - } - - senderChain, err := chains.ZetaChainFromCosmosChainID(ctx.ChainID()) - if err != nil { - return nil, errors.Wrapf(err, "ProcessZEVMInboundV2: failed to convert chainID %s", ctx.ChainID()) - } - - toAddr, err := receiverChain.EncodeAddress(event.Receiver) - if err != nil { - return nil, errors.Wrapf(err, "cannot encode address %v", event.Receiver) - } - - gasLimit := event.CallOptions.GasLimit.Uint64() - if gasLimit == 0 { - gasLimitQueried, err := k.fungibleKeeper.QueryGasLimit( - ctx, - ethcommon.HexToAddress(foreignCoin.Zrc20ContractAddress), - ) - if err != nil { - return nil, errors.Wrap(err, "cannot query gas limit") - } - gasLimit = gasLimitQueried.Uint64() - } - - return types.NewMsgVoteInbound( - "", - event.Sender.Hex(), - senderChain.ChainId, - txOrigin, - toAddr, - foreignCoin.ForeignChainId, - math.NewUintFromBigInt(event.Value), - hex.EncodeToString(event.Message), - event.Raw.TxHash.String(), - event.Raw.BlockNumber, - gasLimit, - foreignCoin.CoinType, - foreignCoin.Asset, - event.Raw.Index, - types.ProtocolContractVersion_V2, - event.CallOptions.IsArbitraryCall, - types.WithZEVMRevertOptions(event.RevertOptions), - ), nil -} - -// newCallInbound creates a new inbound object for a call -// currently inbound data is represented with a MsgVoteInbound message -// TODO: replace with a more appropriate object -// https://github.com/zeta-chain/node/issues/2658 -func (k Keeper) newCallInbound( - ctx sdk.Context, - txOrigin string, - foreignCoin fungibletypes.ForeignCoins, - event *gatewayzevm.GatewayZEVMCalled, -) (*types.MsgVoteInbound, error) { - receiverChain, found := k.zetaObserverKeeper.GetSupportedChainFromChainID(ctx, foreignCoin.ForeignChainId) - if !found { - return nil, errorsmod.Wrapf( - observertypes.ErrSupportedChains, - "chain with chainID %d not supported", - foreignCoin.ForeignChainId, - ) - } - - senderChain, err := chains.ZetaChainFromCosmosChainID(ctx.ChainID()) - if err != nil { - return nil, errors.Wrapf(err, "ProcessZEVMInboundV2: failed to convert chainID %s", ctx.ChainID()) - } - - toAddr, err := receiverChain.EncodeAddress(event.Receiver) - if err != nil { - return nil, errors.Wrapf(err, "cannot encode address %v", event.Receiver) - } - - gasLimit := event.CallOptions.GasLimit.Uint64() - if gasLimit == 0 { - gasLimitQueried, err := k.fungibleKeeper.QueryGasLimit( - ctx, - ethcommon.HexToAddress(foreignCoin.Zrc20ContractAddress), - ) - if err != nil { - return nil, errors.Wrap(err, "cannot query gas limit") - } - gasLimit = gasLimitQueried.Uint64() - } - - return types.NewMsgVoteInbound( - "", - event.Sender.Hex(), - senderChain.ChainId, - txOrigin, - toAddr, - foreignCoin.ForeignChainId, - math.ZeroUint(), - hex.EncodeToString(event.Message), - event.Raw.TxHash.String(), - event.Raw.BlockNumber, - gasLimit, - coin.CoinType_NoAssetCall, - "", - event.Raw.Index, - types.ProtocolContractVersion_V2, - event.CallOptions.IsArbitraryCall, - types.WithZEVMRevertOptions(event.RevertOptions), - ), nil -} diff --git a/x/crosschain/types/cctx.go b/x/crosschain/types/cctx.go index 91004511d4..2b84b5f26c 100644 --- a/x/crosschain/types/cctx.go +++ b/x/crosschain/types/cctx.go @@ -237,6 +237,7 @@ func NewCCTX(ctx sdk.Context, msg MsgVoteInbound, tssPubkey string) (CrossChainT FinalizedZetaHeight: 0, BallotIndex: index, CoinType: msg.CoinType, + IsCrossChainCall: msg.IsCrossChainCall, } outboundParams := &OutboundParams{ diff --git a/x/crosschain/types/cross_chain_tx.pb.go b/x/crosschain/types/cross_chain_tx.pb.go index 23923a9cbf..11ebc77bb3 100644 --- a/x/crosschain/types/cross_chain_tx.pb.go +++ b/x/crosschain/types/cross_chain_tx.pb.go @@ -130,6 +130,9 @@ type InboundParams struct { BallotIndex string `protobuf:"bytes,9,opt,name=ballot_index,json=ballotIndex,proto3" json:"ballot_index,omitempty"` FinalizedZetaHeight uint64 `protobuf:"varint,10,opt,name=finalized_zeta_height,json=finalizedZetaHeight,proto3" json:"finalized_zeta_height,omitempty"` TxFinalizationStatus TxFinalizationStatus `protobuf:"varint,11,opt,name=tx_finalization_status,json=txFinalizationStatus,proto3,enum=zetachain.zetacore.crosschain.TxFinalizationStatus" json:"tx_finalization_status,omitempty"` + // this field describes if a smart contract call should be made for a inbound + // with assets only used for protocol contract version 2 + IsCrossChainCall bool `protobuf:"varint,12,opt,name=is_cross_chain_call,json=isCrossChainCall,proto3" json:"is_cross_chain_call,omitempty"` } func (m *InboundParams) Reset() { *m = InboundParams{} } @@ -235,6 +238,13 @@ func (m *InboundParams) GetTxFinalizationStatus() TxFinalizationStatus { return TxFinalizationStatus_NotFinalized } +func (m *InboundParams) GetIsCrossChainCall() bool { + if m != nil { + return m.IsCrossChainCall + } + return false +} + type ZetaAccounting struct { // aborted_zeta_amount stores the total aborted amount for cctx of coin-type // ZETA @@ -765,93 +775,94 @@ func init() { } var fileDescriptor_d4c1966807fb5cb2 = []byte{ - // 1361 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x57, 0xcf, 0x6e, 0x1b, 0xb7, - 0x13, 0xf6, 0xda, 0xb2, 0x2c, 0x8d, 0xfe, 0x78, 0x4d, 0x2b, 0xce, 0xc6, 0x3f, 0x44, 0xf1, 0x4f, - 0xad, 0x13, 0xc5, 0xad, 0x25, 0x44, 0x01, 0x8a, 0xa2, 0x37, 0xdb, 0x88, 0x13, 0xb7, 0x4d, 0x6c, - 0x6c, 0x1c, 0x03, 0xc9, 0xa1, 0x5b, 0x6a, 0x97, 0x96, 0x08, 0xaf, 0x96, 0xea, 0x92, 0x32, 0xa4, - 0xa0, 0xb7, 0x9e, 0x0b, 0xf4, 0x15, 0x0a, 0xf4, 0xd0, 0x63, 0x1f, 0x23, 0xc7, 0x1c, 0x8b, 0x1e, - 0x82, 0x20, 0x79, 0x83, 0x3e, 0x41, 0xc1, 0x7f, 0x92, 0x15, 0xb8, 0x76, 0x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 0x21, 0x28, 0x1f, 0x90, 0x24, 0xa2, 0x49, 0xc7, 0xe4, 0xd6, 0x9d, 0x41, 0xcb, - 0xb0, 0x68, 0x30, 0x9b, 0x19, 0xd7, 0x41, 0x4b, 0x50, 0xb2, 0xb3, 0x87, 0x34, 0x21, 0x91, 0x3b, - 0x27, 0x21, 0xb3, 0x4e, 0xbb, 0x75, 0x33, 0xa8, 0x08, 0x39, 0x3d, 0x26, 0x91, 0x3b, 0x8f, 0x0a, - 0xb0, 0xb0, 0xa5, 0x1f, 0x3d, 0x6e, 0x76, 0x35, 0xf3, 0xeb, 0x2f, 0x55, 0x67, 0xe3, 0x2b, 0xa8, - 0x9c, 0xd7, 0xba, 0x91, 0x0b, 0xc5, 0x47, 0x4c, 0xec, 0xda, 0x27, 0xa0, 0x3b, 0x83, 0x4a, 0x90, - 0x9f, 0x4c, 0x1d, 0xc9, 0x7c, 0x6f, 0x48, 0xc2, 0x81, 0x24, 0x9b, 0x35, 0x64, 0x4d, 0xb8, 0xfa, - 0x37, 0x99, 0x45, 0x59, 0x98, 0x3d, 0xba, 0xe3, 0xce, 0xa8, 0xdf, 0x96, 0xeb, 0xe8, 0x0d, 0xdb, - 0xf7, 0x5f, 0xbc, 0xa9, 0x3a, 0x2f, 0xdf, 0x54, 0x9d, 0xd7, 0x6f, 0xaa, 0xce, 0x4f, 0x6f, 0xab, - 0x33, 0x2f, 0xdf, 0x56, 0x67, 0x7e, 0x7f, 0x5b, 0x9d, 0x79, 0xb6, 0x79, 0x46, 0x49, 0x32, 0xb1, - 0x9b, 0xfa, 0x4f, 0x46, 0xc2, 0x22, 0xd2, 0x1c, 0x9e, 0xfd, 0x2f, 0xa3, 0x44, 0xd5, 0xce, 0xaa, - 0x83, 0xbb, 0xfb, 0x57, 0x00, 0x00, 0x00, 0xff, 0xff, 0x84, 0x70, 0x56, 0x74, 0xf9, 0x0c, 0x00, - 0x00, + // 1378 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x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70, 0xd2, 0xa2, 0x22, 0xc1, 0xc9, 0x48, 0x7f, 0xcb, 0xbc, 0xfa, + 0x96, 0x65, 0xca, 0xb7, 0x2d, 0xae, 0x3e, 0xe5, 0x75, 0x1a, 0x8a, 0x07, 0x03, 0x31, 0xad, 0x96, + 0x75, 0xc8, 0x24, 0x24, 0x24, 0xf4, 0x6c, 0xac, 0x97, 0xf1, 0x1c, 0xdd, 0x06, 0xd7, 0x8e, 0x75, + 0xa2, 0xf6, 0xad, 0x64, 0x96, 0x2d, 0x6e, 0x45, 0x33, 0xa3, 0x8b, 0x85, 0x0f, 0xd3, 0xc5, 0x44, + 0x01, 0xa9, 0x7f, 0xa7, 0x00, 0xa9, 0x60, 0xce, 0x83, 0x98, 0xc5, 0x21, 0x51, 0x22, 0x4b, 0xf9, + 0x19, 0xc1, 0xf9, 0x23, 0x39, 0x9f, 0x4d, 0x66, 0xfa, 0x9d, 0x64, 0x1a, 0x63, 0x3f, 0xa1, 0x21, + 0x31, 0xba, 0x91, 0xc6, 0x43, 0x39, 0x47, 0x35, 0x70, 0x8d, 0x91, 0x25, 0x54, 0x8c, 0x82, 0x13, + 0x42, 0xbc, 0xab, 0x6a, 0x4d, 0x51, 0xaf, 0x51, 0xf0, 0x1e, 0x21, 0x08, 0x41, 0x4a, 0x29, 0x2f, + 0xa3, 0xac, 0x6a, 0xfc, 0x3e, 0xba, 0xb9, 0x48, 0x94, 0x70, 0xa1, 0x28, 0xaf, 0x81, 0x0c, 0x33, + 0x18, 0x70, 0x12, 0x79, 0x25, 0xb5, 0x72, 0xa9, 0x8d, 0xf9, 0x13, 0x4e, 0x22, 0xf4, 0x0d, 0xac, + 0x92, 0x93, 0x13, 0x12, 0x0a, 0x7a, 0x46, 0x82, 0xc9, 0xc7, 0x5d, 0x51, 0x29, 0xae, 0x9b, 0x14, + 0xdf, 0x7c, 0x8f, 0x14, 0xef, 0xcb, 0x5a, 0x1d, 0x53, 0xdd, 0xb7, 0x59, 0xa9, 0xbf, 0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, 0xc8, 0x4e, 0xa6, 0x8e, 0x64, 0xbe, 0x37, 0x24, 0xe1, 0x40, 0x92, 0xcd, 0x1b, 0xb2, 0x06, + 0x5c, 0xfd, 0x9b, 0xcc, 0xa2, 0x34, 0xcc, 0x1f, 0xdf, 0x71, 0xe7, 0xd4, 0x6f, 0xd3, 0x75, 0xf4, + 0x86, 0x9d, 0xfb, 0x2f, 0xde, 0x94, 0x9d, 0x97, 0x6f, 0xca, 0xce, 0xeb, 0x37, 0x65, 0xe7, 0xa7, + 0xb7, 0xe5, 0xb9, 0x97, 0x6f, 0xcb, 0x73, 0xbf, 0xbd, 0x2d, 0xcf, 0x3d, 0xdb, 0x9a, 0x52, 0x92, + 0x4c, 0xec, 0x96, 0xfe, 0x4f, 0x12, 0xb3, 0x88, 0x34, 0x86, 0xd3, 0x7f, 0x7d, 0x94, 0xa8, 0x5a, + 0x69, 0x75, 0x70, 0x77, 0xff, 0x0a, 0x00, 0x00, 0xff, 0xff, 0xa1, 0xdc, 0x72, 0x48, 0x28, 0x0d, + 0x00, 0x00, } func (m *InboundParams) Marshal() (dAtA []byte, err error) { @@ -874,6 +885,16 @@ func (m *InboundParams) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if m.IsCrossChainCall { + i-- + if m.IsCrossChainCall { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x60 + } if m.TxFinalizationStatus != 0 { i = encodeVarintCrossChainTx(dAtA, i, uint64(m.TxFinalizationStatus)) i-- @@ -1452,6 +1473,9 @@ func (m *InboundParams) Size() (n int) { if m.TxFinalizationStatus != 0 { n += 1 + sovCrossChainTx(uint64(m.TxFinalizationStatus)) } + if m.IsCrossChainCall { + n += 2 + } return n } @@ -1967,6 +1991,26 @@ func (m *InboundParams) Unmarshal(dAtA []byte) error { break } } + case 12: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field IsCrossChainCall", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCrossChainTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.IsCrossChainCall = bool(v != 0) default: iNdEx = preIndex skippy, err := skipCrossChainTx(dAtA[iNdEx:]) diff --git a/x/crosschain/types/expected_keepers.go b/x/crosschain/types/expected_keepers.go index 140c9b2db2..0f496c13d3 100644 --- a/x/crosschain/types/expected_keepers.go +++ b/x/crosschain/types/expected_keepers.go @@ -146,6 +146,7 @@ type FungibleKeeper interface { coinType coin.CoinType, asset string, protocolContractVersion ProtocolContractVersion, + isCrossChainCall bool, ) (*evmtypes.MsgEthereumTxResponse, bool, error) ProcessV2RevertDeposit( ctx sdk.Context, diff --git a/x/crosschain/types/inbound_parsing.go b/x/crosschain/types/inbound_parsing.go new file mode 100644 index 0000000000..e057183f2c --- /dev/null +++ b/x/crosschain/types/inbound_parsing.go @@ -0,0 +1,246 @@ +package types + +import ( + "encoding/hex" + "math/big" + + "cosmossdk.io/math" + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/ethereum/go-ethereum/accounts/abi/bind" + ethcommon "github.com/ethereum/go-ethereum/common" + ethtypes "github.com/ethereum/go-ethereum/core/types" + "github.com/pkg/errors" + "github.com/zeta-chain/protocol-contracts/v2/pkg/gatewayzevm.sol" + + "github.com/zeta-chain/node/pkg/chains" + "github.com/zeta-chain/node/pkg/coin" +) + +// ParseGatewayEvent parses the event from the gateway contract +func ParseGatewayEvent( + log ethtypes.Log, + gatewayAddr ethcommon.Address, +) (*gatewayzevm.GatewayZEVMWithdrawn, *gatewayzevm.GatewayZEVMCalled, *gatewayzevm.GatewayZEVMWithdrawnAndCalled, error) { + if len(log.Topics) == 0 { + return nil, nil, nil, errors.New("ParseGatewayCallEvent: invalid log - no topics") + } + filterer, err := gatewayzevm.NewGatewayZEVMFilterer(log.Address, bind.ContractFilterer(nil)) + if err != nil { + return nil, nil, nil, err + } + withdrawalEvent, err := ParseGatewayWithdrawalEvent(log, gatewayAddr, filterer) + if err == nil { + return withdrawalEvent, nil, nil, nil + } + callEvent, err := ParseGatewayCallEvent(log, gatewayAddr, filterer) + if err == nil { + return nil, callEvent, nil, nil + } + withdrawAndCallEvent, err := ParseGatewayWithdrawAndCallEvent(log, gatewayAddr, filterer) + if err == nil { + return nil, nil, withdrawAndCallEvent, nil + } + return nil, nil, nil, errors.New("ParseGatewayEvent: invalid log - no event found") +} + +// ParseGatewayWithdrawalEvent parses the GatewayZEVMWithdrawal event from the log +func ParseGatewayWithdrawalEvent( + log ethtypes.Log, + gatewayAddr ethcommon.Address, + filterer *gatewayzevm.GatewayZEVMFilterer, +) (*gatewayzevm.GatewayZEVMWithdrawn, error) { + event, err := filterer.ParseWithdrawn(log) + if err != nil { + return nil, err + } + if event.Raw.Address != gatewayAddr { + return nil, errors.New("ParseGatewayWithdrawalEvent: invalid log - wrong contract address") + } + + return event, nil +} + +// ParseGatewayCallEvent parses the GatewayZEVMCall event from the log +func ParseGatewayCallEvent( + log ethtypes.Log, + gatewayAddr ethcommon.Address, + filterer *gatewayzevm.GatewayZEVMFilterer, +) (*gatewayzevm.GatewayZEVMCalled, error) { + event, err := filterer.ParseCalled(log) + if err != nil { + return nil, err + } + if event.Raw.Address != gatewayAddr { + return nil, errors.New("ParseGatewayCallEvent: invalid log - wrong contract address") + } + return event, nil +} + +// ParseGatewayWithdrawAndCallEvent parses the GatewayZEVMWithdrawAndCall event from the log +func ParseGatewayWithdrawAndCallEvent( + log ethtypes.Log, + gatewayAddr ethcommon.Address, + filterer *gatewayzevm.GatewayZEVMFilterer, +) (*gatewayzevm.GatewayZEVMWithdrawnAndCalled, error) { + event, err := filterer.ParseWithdrawnAndCalled(log) + if err != nil { + return nil, err + } + if event.Raw.Address != gatewayAddr { + return nil, errors.New("ParseGatewayWithdrawAndCallEvent: invalid log - wrong contract address") + } + return event, nil +} + +// NewWithdrawalInbound creates a new inbound object for a withdrawal +// currently inbound data is represented with a MsgVoteInbound message +// TODO: replace with a more appropriate object +// https://github.com/zeta-chain/node/issues/2658 +func NewWithdrawalInbound( + ctx sdk.Context, + txOrigin string, + coinType coin.CoinType, + asset string, + event *gatewayzevm.GatewayZEVMWithdrawn, + receiverChain chains.Chain, + gasLimitQueried *big.Int, +) (*MsgVoteInbound, error) { + senderChain, err := chains.ZetaChainFromCosmosChainID(ctx.ChainID()) + if err != nil { + return nil, errors.Wrapf(err, "ProcessZEVMInboundV2: failed to convert chainID %s", ctx.ChainID()) + } + + toAddr, err := receiverChain.EncodeAddress(event.Receiver) + if err != nil { + return nil, errors.Wrapf(err, "cannot encode address %v", event.Receiver) + } + + gasLimit := event.CallOptions.GasLimit.Uint64() + if gasLimit == 0 { + gasLimit = gasLimitQueried.Uint64() + } + + // if the message is not empty, specify cross-chain call for backward compatibility with the Withdraw event + isCrossChainCall := false + if len(event.Message) > 0 { + isCrossChainCall = true + } + + return NewMsgVoteInbound( + "", + event.Sender.Hex(), + senderChain.ChainId, + txOrigin, + toAddr, + receiverChain.ChainId, + math.NewUintFromBigInt(event.Value), + hex.EncodeToString(event.Message), + event.Raw.TxHash.String(), + event.Raw.BlockNumber, + gasLimit, + coinType, + asset, + event.Raw.Index, + ProtocolContractVersion_V2, + event.CallOptions.IsArbitraryCall, + WithZEVMRevertOptions(event.RevertOptions), + WithCrossChainCall(isCrossChainCall), + ), nil +} + +// NewCallInbound creates a new inbound object for a call +// currently inbound data is represented with a MsgVoteInbound message +// TODO: replace with a more appropriate object +// https://github.com/zeta-chain/node/issues/2658 +func NewCallInbound( + ctx sdk.Context, + txOrigin string, + event *gatewayzevm.GatewayZEVMCalled, + receiverChain chains.Chain, + gasLimitQueried *big.Int, +) (*MsgVoteInbound, error) { + senderChain, err := chains.ZetaChainFromCosmosChainID(ctx.ChainID()) + if err != nil { + return nil, errors.Wrapf(err, "ProcessZEVMInboundV2: failed to convert chainID %s", ctx.ChainID()) + } + + toAddr, err := receiverChain.EncodeAddress(event.Receiver) + if err != nil { + return nil, errors.Wrapf(err, "cannot encode address %v", event.Receiver) + } + + gasLimit := event.CallOptions.GasLimit.Uint64() + if gasLimit == 0 { + gasLimit = gasLimitQueried.Uint64() + } + + return NewMsgVoteInbound( + "", + event.Sender.Hex(), + senderChain.ChainId, + txOrigin, + toAddr, + receiverChain.ChainId, + math.ZeroUint(), + hex.EncodeToString(event.Message), + event.Raw.TxHash.String(), + event.Raw.BlockNumber, + gasLimit, + coin.CoinType_NoAssetCall, + "", + event.Raw.Index, + ProtocolContractVersion_V2, + event.CallOptions.IsArbitraryCall, + WithZEVMRevertOptions(event.RevertOptions), + ), nil +} + +// NewWithdrawAndCallInbound creates a new inbound object for a withdraw and call +// currently inbound data is represented with a MsgVoteInbound message +// TODO: replace with a more appropriate object +// https://github.com/zeta-chain/node/issues/2658 +func NewWithdrawAndCallInbound( + ctx sdk.Context, + txOrigin string, + coinType coin.CoinType, + asset string, + event *gatewayzevm.GatewayZEVMWithdrawnAndCalled, + receiverChain chains.Chain, + gasLimitQueried *big.Int, +) (*MsgVoteInbound, error) { + senderChain, err := chains.ZetaChainFromCosmosChainID(ctx.ChainID()) + if err != nil { + return nil, errors.Wrapf(err, "ProcessZEVMInboundV2: failed to convert chainID %s", ctx.ChainID()) + } + + toAddr, err := receiverChain.EncodeAddress(event.Receiver) + if err != nil { + return nil, errors.Wrapf(err, "cannot encode address %v", event.Receiver) + } + + gasLimit := event.CallOptions.GasLimit.Uint64() + if gasLimit == 0 { + gasLimit = gasLimitQueried.Uint64() + } + + return NewMsgVoteInbound( + "", + event.Sender.Hex(), + senderChain.ChainId, + txOrigin, + toAddr, + receiverChain.ChainId, + math.NewUintFromBigInt(event.Value), + hex.EncodeToString(event.Message), + event.Raw.TxHash.String(), + event.Raw.BlockNumber, + gasLimit, + coinType, + asset, + event.Raw.Index, + ProtocolContractVersion_V2, + event.CallOptions.IsArbitraryCall, + WithZEVMRevertOptions(event.RevertOptions), + WithCrossChainCall(true), + ), nil +} diff --git a/x/crosschain/types/inbound_parsing_test.go b/x/crosschain/types/inbound_parsing_test.go new file mode 100644 index 0000000000..0d030fdd3d --- /dev/null +++ b/x/crosschain/types/inbound_parsing_test.go @@ -0,0 +1,89 @@ +package types_test + +import ( + "testing" +) + +// TODO: Complete tests for this file +// https://github.com/zeta-chain/node/issues/2669 + +func TestParseGatewayEvent(t *testing.T) { + +} + +func TestParseGatewayWithdrawalEvent(t *testing.T) { + +} + +func TestParseGatewayCallEvent(t *testing.T) { + +} + +func TestParseGatewayWithdrawAndCallEvent(t *testing.T) { + +} + +func TestNewWithdrawalInbound(t *testing.T) { + //t.Run("fail if sender chain ID is not valid", func(t *testing.T) { + // _, ctx, _, _ := keepertest.CrosschainKeeper(t) + // ctx = ctx.WithChainID("invalidChainID") + // + // fc := sample.ForeignCoins(t, sample.EthAddress().Hex()) + // + // _, err := types.NewWithdrawalInbound( + // ctx, + // sample.EthAddress().Hex(), + // fc.CoinType, + // fc.Asset, + // nil, + // chains.GoerliLocalnet, + // big.NewInt(1000), + // ) + // + // require.ErrorContains(t, err, " failed to convert chainID") + //}) + +} + +func TestNewCallInbound(t *testing.T) { + //t.Run("fail if sender chain ID is not valid", func(t *testing.T) { + // _, ctx, _, _ := keepertest.CrosschainKeeper(t) + // ctx = ctx.WithChainID("invalidChainID") + // + // _, err := types.NewCallInbound( + // ctx, + // sample.EthAddress().Hex(), + // nil, + // chains.GoerliLocalnet, + // big.NewInt(1000), + // ) + // + // require.ErrorContains(t, err, " failed to convert chainID") + //}) + +} + +func TestNewWithdrawAndCallInbound(t *testing.T) { + //t.Run("fail if sender chain ID is not valid", func(t *testing.T) { + // _, ctx, _, _ := keepertest.CrosschainKeeper(t) + // ctx = ctx.WithChainID("invalidChainID") + // + // fc := sample.ForeignCoins(t, sample.EthAddress().Hex()) + // + // _, err := types.NewWithdrawAndCallInbound( + // ctx, + // sample.EthAddress().Hex(), + // fc.CoinType, + // fc.Asset, + // nil, + // chains.GoerliLocalnet, + // big.NewInt(1000), + // ) + // + // require.ErrorContains(t, err, " failed to convert chainID") + //}) + // + //t.Run("fail if receiver address can't be decoded", func(t *testing.T) { + // + //}) +} diff --git a/x/crosschain/types/message_vote_inbound.go b/x/crosschain/types/message_vote_inbound.go index c73c9a24d4..34afb68be2 100644 --- a/x/crosschain/types/message_vote_inbound.go +++ b/x/crosschain/types/message_vote_inbound.go @@ -38,6 +38,13 @@ func WithEVMRevertOptions(revertOptions gatewayevm.RevertOptions) InboundVoteOpt } } +// WithCrossChainCall sets the cross chain call to true for the inbound vote message +func WithCrossChainCall(isCrossChainCall bool) InboundVoteOption { + return func(msg *MsgVoteInbound) { + msg.IsCrossChainCall = isCrossChainCall + } +} + var _ sdk.Msg = &MsgVoteInbound{} func NewMsgVoteInbound( @@ -79,6 +86,7 @@ func NewMsgVoteInbound( EventIndex: uint64(eventIndex), ProtocolContractVersion: protocolContractVersion, RevertOptions: NewEmptyRevertOptions(), + IsCrossChainCall: false, } for _, option := range options { diff --git a/x/crosschain/types/message_vote_inbound_test.go b/x/crosschain/types/message_vote_inbound_test.go index 77631f20fd..e3e9bc7fce 100644 --- a/x/crosschain/types/message_vote_inbound_test.go +++ b/x/crosschain/types/message_vote_inbound_test.go @@ -184,6 +184,71 @@ func TestNewMsgVoteInbound(t *testing.T) { RevertGasLimit: math.ZeroUint(), }, msg.RevertOptions) }) + + t.Run("can set is cross chain call options", func(t *testing.T) { + // false by default + msg := types.NewMsgVoteInbound( + sample.AccAddress(), + sample.AccAddress(), + 42, + sample.String(), + sample.String(), + 42, + math.NewUint(42), + sample.String(), + sample.String(), + 42, + 42, + coin.CoinType_Zeta, + sample.String(), + 42, + types.ProtocolContractVersion_V1, + true, + ) + require.False(t, msg.IsCrossChainCall) + + msg = types.NewMsgVoteInbound( + sample.AccAddress(), + sample.AccAddress(), + 42, + sample.String(), + sample.String(), + 42, + math.NewUint(42), + sample.String(), + sample.String(), + 42, + 42, + coin.CoinType_Zeta, + sample.String(), + 42, + types.ProtocolContractVersion_V1, + true, + types.WithCrossChainCall(true), + ) + require.True(t, msg.IsCrossChainCall) + + msg = types.NewMsgVoteInbound( + sample.AccAddress(), + sample.AccAddress(), + 42, + sample.String(), + sample.String(), + 42, + math.NewUint(42), + sample.String(), + sample.String(), + 42, + 42, + coin.CoinType_Zeta, + sample.String(), + 42, + types.ProtocolContractVersion_V1, + true, + types.WithCrossChainCall(false), + ) + require.False(t, msg.IsCrossChainCall) + }) } func TestMsgVoteInbound_ValidateBasic(t *testing.T) { diff --git a/x/crosschain/types/tx.pb.go b/x/crosschain/types/tx.pb.go index ad8b7cbd9d..ffe5c8cec7 100644 --- a/x/crosschain/types/tx.pb.go +++ b/x/crosschain/types/tx.pb.go @@ -1012,6 +1012,8 @@ type MsgVoteInbound struct { // revert options provided by the sender RevertOptions RevertOptions `protobuf:"bytes,17,opt,name=revert_options,json=revertOptions,proto3" json:"revert_options"` CallOptions *CallOptions `protobuf:"bytes,18,opt,name=call_options,json=callOptions,proto3" json:"call_options,omitempty"` + // define if a smart contract call should be made with asset + IsCrossChainCall bool `protobuf:"varint,19,opt,name=is_cross_chain_call,json=isCrossChainCall,proto3" json:"is_cross_chain_call,omitempty"` } func (m *MsgVoteInbound) Reset() { *m = MsgVoteInbound{} } @@ -1159,6 +1161,13 @@ func (m *MsgVoteInbound) GetCallOptions() *CallOptions { return nil } +func (m *MsgVoteInbound) GetIsCrossChainCall() bool { + if m != nil { + return m.IsCrossChainCall + } + return false +} + type MsgVoteInboundResponse struct { } @@ -1724,121 +1733,122 @@ func init() { } var fileDescriptor_15f0860550897740 = []byte{ - // 1818 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x59, 0x4f, 0x6f, 0xdb, 0xd8, - 0x11, 0x0f, 0x13, 0x59, 0x91, 0x46, 0xb6, 0x92, 0xbc, 0x75, 0x12, 0x9a, 0x5e, 0x2b, 0x8e, 0xd2, - 0x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x02, 0x67, 0x30, 0x8a, 0x58, 0xe4, 0x0c, 0x26, 0xb7, 0x18, 0x78, 0x05, 0x8d, - 0x37, 0x18, 0x0f, 0x16, 0xc9, 0xde, 0x14, 0x68, 0x91, 0x2b, 0x68, 0x6a, 0x4b, 0x41, 0xfe, 0xa0, - 0xc1, 0xb5, 0x29, 0xfd, 0xc4, 0x07, 0x8b, 0x9e, 0x6e, 0x1a, 0x69, 0xfc, 0x68, 0x59, 0x64, 0xa2, - 0xd6, 0x97, 0x1a, 0xe8, 0x53, 0x9b, 0x84, 0x47, 0x0b, 0x1f, 0xfa, 0x18, 0xd6, 0xd8, 0x5d, 0x1e, - 0x9b, 0x28, 0xf7, 0x67, 0x0d, 0xb6, 0x66, 0x57, 0xe2, 0x8f, 0x16, 0x75, 0xc0, 0x14, 0x01, 0xc6, - 0xde, 0x19, 0x05, 0xc4, 0xba, 0xee, 0xee, 0x7d, 0xf5, 0xba, 0xa4, 0x7d, 0xfd, 0xba, 0xa4, 0xfd, - 0xf3, 0x75, 0x49, 0xfb, 0xed, 0x9b, 0xd2, 0xb9, 0xaf, 0xdf, 0x94, 0xce, 0xfd, 0xfd, 0x4d, 0xe9, - 0xdc, 0xcf, 0xee, 0x0d, 0x35, 0x32, 0xd1, 0x16, 0xf7, 0xe4, 0xff, 0x11, 0x02, 0xe6, 0xd2, 0x6a, - 0x7f, 0xe4, 0xdf, 0x2d, 0x51, 0x4f, 0xd3, 0xcc, 0xe2, 0x6c, 0xf1, 0xe0, 0x7f, 0x01, 0x00, 0x00, - 0xff, 0xff, 0x45, 0x32, 0x2c, 0x14, 0x9c, 0x19, 0x00, 0x00, + // 1840 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x59, 0x4b, 0x6f, 0x1b, 0xc9, + 0x11, 0xf6, 0xd8, 0x12, 0x4d, 0x16, 0x25, 0x59, 0x6e, 0xcb, 0x36, 0x35, 0x5a, 0xc9, 0x32, 0x1d, + 0x3b, 0xc2, 0xc2, 0x22, 0x1d, 0x7a, 0xe3, 0x6c, 0xbc, 0x41, 0x36, 0x16, 0x77, 0xad, 0x15, 0x60, + 0xda, 0xc2, 0xac, 0xbc, 0x79, 0x5c, 0x06, 0xc3, 0x99, 0xd6, 0x68, 0x20, 0x72, 0x9a, 0x98, 0x6e, + 0x72, 0x29, 0x23, 0x40, 0x82, 0x00, 0x01, 0x72, 0x4c, 0x82, 0x9c, 0xf6, 0x90, 0x5b, 0x0e, 0xf9, + 0x13, 0x39, 0xef, 0xd1, 0xc8, 0x29, 0xc8, 0xc1, 0x08, 0xec, 0x43, 0xae, 0x49, 0xae, 0xb9, 0x04, + 0x5d, 0xdd, 0x33, 0x22, 0x87, 0x4f, 0x51, 0x08, 0xf6, 0x22, 0x76, 0x57, 0xd7, 0x57, 0x5d, 0x55, + 0x5d, 0xdd, 0x55, 0x35, 0x82, 0x7b, 0xaf, 0xa8, 0x70, 0xdc, 0x23, 0x27, 0x08, 0xcb, 0x38, 0x62, + 0x11, 0x2d, 0xbb, 0x11, 0xe3, 0x5c, 0xd1, 0x44, 0xb7, 0xd4, 0x8a, 0x98, 0x60, 0x64, 0x3d, 0xe1, + 0x2b, 0xc5, 0x7c, 0xa5, 0x53, 0x3e, 0x73, 0xc5, 0x67, 0x3e, 0x43, 0xce, 0xb2, 0x1c, 0x29, 0x90, + 0xf9, 0xfe, 0x10, 0xe1, 0xad, 0x63, 0xbf, 0x8c, 0x24, 0xae, 0x7f, 0x34, 0xef, 0xbd, 0x51, 0xbc, + 0x2c, 0x08, 0xf1, 0xcf, 0x04, 0x99, 0xad, 0x88, 0xb1, 0x43, 0xae, 0x7f, 0x34, 0xef, 0xa3, 0xf1, + 0xc6, 0x45, 0x8e, 0xa0, 0x76, 0x23, 0x68, 0x06, 0x82, 0x46, 0xf6, 0x61, 0xc3, 0xf1, 0x63, 0x5c, + 0x65, 0x3c, 0x0e, 0x87, 0x36, 0x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36, 0x1f, 0xdd, 0x84, 0xcb, 0xa2, 0x6b, + 0x1f, 0x39, 0xfc, 0x48, 0x39, 0xc9, 0xca, 0x88, 0xee, 0x67, 0x0e, 0x3f, 0x22, 0x3b, 0x90, 0x93, + 0xe1, 0x62, 0x4b, 0x77, 0x14, 0xe6, 0x36, 0x8d, 0xad, 0xa5, 0xca, 0xdd, 0xd2, 0x90, 0xe8, 0x6d, + 0x1d, 0xfb, 0x25, 0x8c, 0xab, 0x2a, 0x0b, 0xc2, 0x83, 0x93, 0x16, 0xb5, 0xb2, 0xae, 0x1e, 0x91, + 0xc7, 0x30, 0x8f, 0x81, 0x54, 0x98, 0xdf, 0x34, 0xb6, 0xf2, 0x95, 0x6f, 0x8d, 0xc2, 0xeb, 0x68, + 0xdb, 0x97, 0x3f, 0x96, 0x82, 0x48, 0x27, 0xd5, 0x1b, 0xcc, 0x3d, 0x56, 0xba, 0x65, 0x94, 0x93, + 0x90, 0x82, 0xea, 0xad, 0x42, 0x56, 0x74, 0xed, 0x20, 0xf4, 0x68, 0xb7, 0x70, 0x59, 0x99, 0x24, + 0xba, 0x7b, 0x72, 0x5a, 0xdc, 0x80, 0xf7, 0x86, 0xf9, 0x27, 0x71, 0xe0, 0x5f, 0x0d, 0xb8, 0x5a, + 0xe3, 0xfe, 0x8f, 0x8f, 0x02, 0x41, 0x1b, 0x01, 0x17, 0x9f, 0x5a, 0xd5, 0xca, 0x83, 0x31, 0xde, + 0xbb, 0x03, 0x8b, 0x34, 0x72, 0x2b, 0x0f, 0x6c, 0x47, 0x9d, 0x84, 0x3e, 0xb1, 0x05, 0x24, 0xc6, + 0xa7, 0xdd, 0xeb, 0xe2, 0x4b, 0xfd, 0x2e, 0x26, 0x30, 0x17, 0x3a, 0x4d, 0xe5, 0xc4, 0x9c, 0x85, + 0x63, 0x72, 0x03, 0x32, 0xfc, 0xa4, 0x59, 0x67, 0x0d, 0x74, 0x4d, 0xce, 0xd2, 0x33, 0x62, 0x42, + 0xd6, 0xa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bf, 0x62, 0x7e, 0x67, 0xb2, 0xb8, 0x14, 0xc4, + 0xfc, 0xfe, 0x99, 0x21, 0xbd, 0x67, 0x90, 0x2a, 0x26, 0xa6, 0x38, 0x83, 0x7e, 0xc4, 0x34, 0x67, + 0x30, 0xbc, 0xc4, 0xc0, 0x27, 0x68, 0xb0, 0xc0, 0x78, 0x38, 0xcd, 0xed, 0x4d, 0x81, 0xa6, 0x79, + 0x82, 0x46, 0x96, 0x14, 0xe4, 0x0f, 0x06, 0xdc, 0x18, 0x51, 0x4f, 0x7c, 0x38, 0xed, 0xe9, 0xa6, + 0x91, 0xe6, 0x8f, 0x66, 0x45, 0x26, 0x6a, 0x7d, 0x65, 0x40, 0x61, 0x64, 0x91, 0xf0, 0x78, 0xea, + 0x43, 0x1f, 0xc0, 0x9a, 0x3b, 0xb3, 0x63, 0x13, 0xe5, 0xfe, 0x6c, 0xc0, 0xfa, 0xf8, 0x4c, 0xfc, + 0xf1, 0xb4, 0x0e, 0x18, 0x21, 0xc0, 0xdc, 0x3d, 0xa7, 0x80, 0x58, 0xd7, 0x9d, 0xdd, 0xaf, 0xdf, + 0x6e, 0x18, 0xaf, 0xdf, 0x6e, 0x18, 0xff, 0x78, 0xbb, 0x61, 0xfc, 0xf6, 0xdd, 0xc6, 0x85, 0xd7, + 0xef, 0x36, 0x2e, 0xfc, 0xed, 0xdd, 0xc6, 0x85, 0x9f, 0x6d, 0xf7, 0x14, 0x32, 0x72, 0x8b, 0x6d, + 0xf5, 0x6f, 0x87, 0x90, 0x79, 0xb4, 0xdc, 0xed, 0xfb, 0xef, 0x8c, 0xac, 0x69, 0xea, 0x19, 0x6c, + 0x45, 0x1e, 0xfe, 0x2f, 0x00, 0x00, 0xff, 0xff, 0x5c, 0xd9, 0x42, 0xd4, 0xcb, 0x19, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -3103,6 +3113,18 @@ func (m *MsgVoteInbound) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if m.IsCrossChainCall { + i-- + if m.IsCrossChainCall { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0x98 + } if m.CallOptions != nil { { size, err := m.CallOptions.MarshalToSizedBuffer(dAtA[:i]) @@ -3993,6 +4015,9 @@ func (m *MsgVoteInbound) Size() (n int) { l = m.CallOptions.Size() n += 2 + l + sovTx(uint64(l)) } + if m.IsCrossChainCall { + n += 3 + } return n } @@ -6754,6 +6779,26 @@ func (m *MsgVoteInbound) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex + case 19: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field IsCrossChainCall", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.IsCrossChainCall = bool(v != 0) default: iNdEx = preIndex skippy, err := skipTx(dAtA[iNdEx:]) diff --git a/x/fungible/keeper/deposits.go b/x/fungible/keeper/deposits.go index 48c1deb771..b6a0c72c4e 100644 --- a/x/fungible/keeper/deposits.go +++ b/x/fungible/keeper/deposits.go @@ -35,6 +35,7 @@ func (k Keeper) ZRC20DepositAndCallContract( coinType coin.CoinType, asset string, protocolContractVersion crosschaintypes.ProtocolContractVersion, + isCrossChainCall bool, ) (*evmtypes.MsgEthereumTxResponse, bool, error) { // get ZRC20 contract zrc20Contract, _, err := k.getAndCheckZRC20(ctx, amount, senderChainID, coinType, asset) @@ -44,7 +45,17 @@ func (k Keeper) ZRC20DepositAndCallContract( // handle the deposit for protocol contract version 2 if protocolContractVersion == crosschaintypes.ProtocolContractVersion_V2 { - return k.ProcessV2Deposit(ctx, from, senderChainID, zrc20Contract, to, amount, message, coinType) + return k.ProcessV2Deposit( + ctx, + from, + senderChainID, + zrc20Contract, + to, + amount, + message, + coinType, + isCrossChainCall, + ) } // check if the receiver is a contract diff --git a/x/fungible/keeper/deposits_test.go b/x/fungible/keeper/deposits_test.go index f636ca19bd..3958ae191e 100644 --- a/x/fungible/keeper/deposits_test.go +++ b/x/fungible/keeper/deposits_test.go @@ -45,6 +45,7 @@ func TestKeeper_ZRC20DepositAndCallContract(t *testing.T) { coin.CoinType_Gas, sample.EthAddress().String(), crosschaintypes.ProtocolContractVersion_V1, + false, ) require.NoError(t, err) require.False(t, contractCall) @@ -78,6 +79,7 @@ func TestKeeper_ZRC20DepositAndCallContract(t *testing.T) { coin.CoinType_ERC20, assetAddress, crosschaintypes.ProtocolContractVersion_V1, + false, ) require.NoError(t, err) require.False(t, contractCall) @@ -111,6 +113,7 @@ func TestKeeper_ZRC20DepositAndCallContract(t *testing.T) { coin.CoinType_ERC20, assetAddress, crosschaintypes.ProtocolContractVersion_V1, + false, ) require.ErrorIs(t, err, types.ErrCallNonContract) }) @@ -153,6 +156,7 @@ func TestKeeper_ZRC20DepositAndCallContract(t *testing.T) { coin.CoinType_Gas, sample.EthAddress().String(), crosschaintypes.ProtocolContractVersion_V1, + false, ) require.NoError(t, err) require.False(t, contractCall) @@ -191,6 +195,7 @@ func TestKeeper_ZRC20DepositAndCallContract(t *testing.T) { coin.CoinType_Gas, sample.EthAddress().String(), crosschaintypes.ProtocolContractVersion_V1, + false, ) require.ErrorIs(t, err, types.ErrPausedZRC20) }) @@ -233,6 +238,7 @@ func TestKeeper_ZRC20DepositAndCallContract(t *testing.T) { coin.CoinType_Gas, sample.EthAddress().String(), crosschaintypes.ProtocolContractVersion_V1, + false, ) require.ErrorIs(t, err, types.ErrForeignCoinCapReached) }) @@ -260,6 +266,7 @@ func TestKeeper_ZRC20DepositAndCallContract(t *testing.T) { coin.CoinType_Gas, sample.EthAddress().String(), crosschaintypes.ProtocolContractVersion_V1, + false, ) require.ErrorIs(t, err, crosschaintypes.ErrGasCoinNotFound) }) @@ -287,6 +294,7 @@ func TestKeeper_ZRC20DepositAndCallContract(t *testing.T) { coin.CoinType_ERC20, assetAddress, crosschaintypes.ProtocolContractVersion_V1, + false, ) require.ErrorIs(t, err, crosschaintypes.ErrForeignCoinNotFound) }) @@ -318,6 +326,7 @@ func TestKeeper_ZRC20DepositAndCallContract(t *testing.T) { coin.CoinType_Gas, sample.EthAddress().String(), crosschaintypes.ProtocolContractVersion_V1, + false, ) require.NoError(t, err) require.True(t, contractCall) @@ -357,6 +366,7 @@ func TestKeeper_ZRC20DepositAndCallContract(t *testing.T) { coin.CoinType_Gas, sample.EthAddress().String(), crosschaintypes.ProtocolContractVersion_V1, + false, ) require.Error(t, err) require.True(t, contractCall) @@ -390,6 +400,7 @@ func TestKeeper_ZRC20DepositAndCallContract(t *testing.T) { coin.CoinType_Gas, sample.EthAddress().String(), crosschaintypes.ProtocolContractVersion_V2, + false, ) require.NoError(t, err) require.False(t, contractCall) diff --git a/x/fungible/keeper/v2_deposits.go b/x/fungible/keeper/v2_deposits.go index 812f2c0b81..16486dcbff 100644 --- a/x/fungible/keeper/v2_deposits.go +++ b/x/fungible/keeper/v2_deposits.go @@ -25,25 +25,27 @@ func (k Keeper) ProcessV2Deposit( amount *big.Int, message []byte, coinType coin.CoinType, + isCrossChainCall bool, ) (*evmtypes.MsgEthereumTxResponse, bool, error) { context := systemcontract.ZContext{ - Origin: from, - Sender: ethcommon.Address{}, + Origin: []byte{}, + Sender: ethcommon.BytesToAddress(from), ChainID: big.NewInt(senderChainID), } - if len(message) == 0 { - // simple deposit - res, err := k.DepositZRC20(ctx, zrc20Addr, to, amount) - return res, false, err - } else if coinType == coin.CoinType_NoAssetCall { + if coinType == coin.CoinType_NoAssetCall { // simple call res, err := k.CallExecute(ctx, context, zrc20Addr, amount, to, message) return res, true, err + } else if isCrossChainCall { + // call with asset + res, err := k.CallDepositAndCallZRC20(ctx, context, zrc20Addr, amount, to, message) + return res, true, err } - // deposit and call - res, err := k.CallDepositAndCallZRC20(ctx, context, zrc20Addr, amount, to, message) - return res, true, err + + // simple deposit + res, err := k.DepositZRC20(ctx, zrc20Addr, to, amount) + return res, false, err } // ProcessV2RevertDeposit handles a revert deposit from an inbound tx with protocol version 2 diff --git a/x/fungible/keeper/v2_deposits_test.go b/x/fungible/keeper/v2_deposits_test.go index e470480776..7b13eeef89 100644 --- a/x/fungible/keeper/v2_deposits_test.go +++ b/x/fungible/keeper/v2_deposits_test.go @@ -15,6 +15,40 @@ import ( "testing" ) +// getTestDAppNoMessageIndex queries the no message index of the test dapp v2 contract +func getTestDAppNoMessageIndex( + t *testing.T, + ctx sdk.Context, + k fungiblekeeper.Keeper, + contract, + account common.Address, +) string { + testDAppABI, err := testdappv2.TestDAppV2MetaData.GetAbi() + require.NoError(t, err) + res, err := k.CallEVM( + ctx, + *testDAppABI, + types.ModuleAddressEVM, + contract, + fungiblekeeper.BigIntZero, + nil, + false, + false, + "getNoMessageIndex", + account, + ) + require.NoError(t, err) + + unpacked, err := testDAppABI.Unpack("getNoMessageIndex", res.Ret) + require.NoError(t, err) + require.Len(t, unpacked, 1) + + index, ok := unpacked[0].(string) + require.True(t, ok) + + return index +} + // deployTestDAppV2 deploys the test dapp v2 contract and returns its address func deployTestDAppV2(t *testing.T, ctx sdk.Context, k *fungiblekeeper.Keeper, evmk types.EVMKeeper) common.Address { testDAppV2, err := k.DeployContract(ctx, testdappv2.TestDAppV2MetaData) @@ -105,6 +139,41 @@ func TestKeeper_ProcessV2Deposit(t *testing.T) { big.NewInt(42), []byte{}, coin.CoinType_Gas, + false, + ) + + // ASSERT + require.NoError(t, err) + require.False(t, contractCall) + + balance, err := k.BalanceOfZRC4(ctx, zrc20, receiver) + require.NoError(t, err) + require.Equal(t, big.NewInt(42), balance) + }) + + t.Run("should process no-call deposit, message should be ignored", func(t *testing.T) { + // ARRANGE + k, ctx, sdkk, _ := keepertest.FungibleKeeper(t) + _ = k.GetAuthKeeper().GetModuleAccount(ctx, types.ModuleName) + + chainID := chains.DefaultChainsList()[0].ChainId + receiver := sample.EthAddress() + + // deploy the system contracts + deploySystemContracts(t, ctx, k, sdkk.EvmKeeper) + zrc20 := setupGasCoin(t, ctx, k, sdkk.EvmKeeper, chainID, "foobar", "foobar") + + // ACT + _, contractCall, err := k.ProcessV2Deposit( + ctx, + sample.EthAddress().Bytes(), + chainID, + zrc20, + receiver, + big.NewInt(42), + []byte("foo"), + coin.CoinType_Gas, + false, ) // ASSERT @@ -140,6 +209,7 @@ func TestKeeper_ProcessV2Deposit(t *testing.T) { big.NewInt(82), []byte("foo"), coin.CoinType_Gas, + true, ) // ASSERT @@ -150,4 +220,52 @@ func TestKeeper_ProcessV2Deposit(t *testing.T) { require.Equal(t, big.NewInt(82), balance) assertTestDAppV2MessageAndAmount(t, ctx, k, testDapp, "foo", 82) }) + + t.Run("should process deposit and call with no message", func(t *testing.T) { + // ARRANGE + k, ctx, sdkk, _ := keepertest.FungibleKeeper(t) + _ = k.GetAuthKeeper().GetModuleAccount(ctx, types.ModuleName) + + chainID := chains.DefaultChainsList()[0].ChainId + + // deploy test dapp + testDapp := deployTestDAppV2(t, ctx, k, sdkk.EvmKeeper) + + // deploy the system contracts + deploySystemContracts(t, ctx, k, sdkk.EvmKeeper) + zrc20 := setupGasCoin(t, ctx, k, sdkk.EvmKeeper, chainID, "foobar", "foobar") + + sender := sample.EthAddress() + + // ACT + _, contractCall, err := k.ProcessV2Deposit( + ctx, + sender.Bytes(), + chainID, + zrc20, + testDapp, + big.NewInt(82), + []byte{}, + coin.CoinType_Gas, + true, + ) + + // ASSERT + require.NoError(t, err) + require.True(t, contractCall) + balance, err := k.BalanceOfZRC4(ctx, zrc20, testDapp) + require.NoError(t, err) + require.Equal(t, big.NewInt(82), balance) + + messageIndex := getTestDAppNoMessageIndex(t, ctx, *k, testDapp, sender) + + assertTestDAppV2MessageAndAmount( + t, + ctx, + k, + testDapp, + messageIndex, + 82, + ) + }) } diff --git a/zetaclient/chains/evm/cctx.go b/zetaclient/chains/evm/cctx.go index 019dbfe3a0..597347a0a5 100644 --- a/zetaclient/chains/evm/cctx.go +++ b/zetaclient/chains/evm/cctx.go @@ -47,10 +47,10 @@ func ParseOutboundTypeFromCCTX(cctx types.CrossChainTx) OutboundType { case coin.CoinType_Gas: switch cctx.CctxStatus.Status { case types.CctxStatus_PendingOutbound: - if len(cctx.RelayedMessage) == 0 { - return OutboundTypeGasWithdraw - } else { + if cctx.InboundParams.IsCrossChainCall { return OutboundTypeGasWithdrawAndCall + } else { + return OutboundTypeGasWithdraw } case types.CctxStatus_PendingRevert: if cctx.RevertOptions.CallOnRevert { @@ -62,10 +62,10 @@ func ParseOutboundTypeFromCCTX(cctx types.CrossChainTx) OutboundType { case coin.CoinType_ERC20: switch cctx.CctxStatus.Status { case types.CctxStatus_PendingOutbound: - if len(cctx.RelayedMessage) == 0 { - return OutboundTypeERC20Withdraw - } else { + if cctx.InboundParams.IsCrossChainCall { return OutboundTypeERC20WithdrawAndCall + } else { + return OutboundTypeERC20Withdraw } case types.CctxStatus_PendingRevert: if cctx.RevertOptions.CallOnRevert { diff --git a/zetaclient/chains/evm/cctx_test.go b/zetaclient/chains/evm/cctx_test.go new file mode 100644 index 0000000000..e61202fd13 --- /dev/null +++ b/zetaclient/chains/evm/cctx_test.go @@ -0,0 +1,105 @@ +package evm_test + +import ( + "testing" + + "github.com/stretchr/testify/require" + + "github.com/zeta-chain/node/pkg/coin" + "github.com/zeta-chain/node/x/crosschain/types" + "github.com/zeta-chain/node/zetaclient/chains/evm" +) + +func TestParseOutboundTypeFromCCTX(t *testing.T) { + tests := []struct { + name string + cctx types.CrossChainTx + expected evm.OutboundType + }{ + { + name: "Gas withdraw and call", + cctx: types.CrossChainTx{ + InboundParams: &types.InboundParams{ + CoinType: coin.CoinType_Gas, + IsCrossChainCall: true, + }, + CctxStatus: &types.Status{ + Status: types.CctxStatus_PendingOutbound, + }, + }, + expected: evm.OutboundTypeGasWithdrawAndCall, + }, + { + name: "Gas withdraw", + cctx: types.CrossChainTx{ + InboundParams: &types.InboundParams{ + CoinType: coin.CoinType_Gas, + IsCrossChainCall: false, + }, + CctxStatus: &types.Status{ + Status: types.CctxStatus_PendingOutbound, + }, + }, + expected: evm.OutboundTypeGasWithdraw, + }, + { + name: "ERC20 withdraw and call", + cctx: types.CrossChainTx{ + InboundParams: &types.InboundParams{ + CoinType: coin.CoinType_ERC20, + IsCrossChainCall: true, + }, + CctxStatus: &types.Status{ + Status: types.CctxStatus_PendingOutbound, + }, + }, + expected: evm.OutboundTypeERC20WithdrawAndCall, + }, + { + name: "ERC20 withdraw revert and call on revert", + cctx: types.CrossChainTx{ + InboundParams: &types.InboundParams{ + CoinType: coin.CoinType_ERC20, + }, + CctxStatus: &types.Status{ + Status: types.CctxStatus_PendingRevert, + }, + RevertOptions: types.RevertOptions{ + CallOnRevert: true, + }, + }, + expected: evm.OutboundTypeERC20WithdrawRevertAndCallOnRevert, + }, + { + name: "No asset call", + cctx: types.CrossChainTx{ + InboundParams: &types.InboundParams{ + CoinType: coin.CoinType_NoAssetCall, + }, + CctxStatus: &types.Status{ + Status: types.CctxStatus_PendingOutbound, + }, + }, + expected: evm.OutboundTypeCall, + }, + { + name: "ZETA gives Uuknown outbound type", + cctx: types.CrossChainTx{ + InboundParams: &types.InboundParams{ + CoinType: coin.CoinType_Zeta, + }, + CctxStatus: &types.Status{ + Status: types.CctxStatus_PendingOutbound, + }, + }, + expected: evm.OutboundTypeUnknown, + }, + } + + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + result := evm.ParseOutboundTypeFromCCTX(tt.cctx) + require.Equal(t, tt.expected, result) + }) + } +} diff --git a/zetaclient/chains/evm/constant.go b/zetaclient/chains/evm/constant.go index 65398b3013..01b229591a 100644 --- a/zetaclient/chains/evm/constant.go +++ b/zetaclient/chains/evm/constant.go @@ -47,6 +47,10 @@ const ( // [signature, sender, receiver] TopicsGatewayDeposit = 3 + // TopicsGatewayDepositAndCall is the number of topics for a gateway deposit and call event + // [signature, sender, receiver] + TopicsGatewayDepositAndCall = 3 + // TopicsGatewayCall is the number of topics for a gateway call event // [signature, sender, receiver] TopicsGatewayCall = 3 diff --git a/zetaclient/chains/evm/observer/inbound.go b/zetaclient/chains/evm/observer/inbound.go index aebd661ae3..02ab1a0b6f 100644 --- a/zetaclient/chains/evm/observer/inbound.go +++ b/zetaclient/chains/evm/observer/inbound.go @@ -239,6 +239,12 @@ func (ob *Observer) ObserveInbound(ctx context.Context, sampledLogger zerolog.Lo Err(err). Msgf("ObserveInbound: error observing call events from Gateway contract") } + lastScannedGatewayDepositAndCall, err := ob.ObserveGatewayDepositAndCall(ctx, startBlock, toBlock) + if err != nil { + ob.Logger().Inbound.Error(). + Err(err). + Msgf("ObserveInbound: error observing depositAndCall events from Gateway contract") + } // note: using lowest height for all 3 events is not perfect, but it's simple and good enough lastScannedLowest := lastScannedZetaSent @@ -254,6 +260,9 @@ func (ob *Observer) ObserveInbound(ctx context.Context, sampledLogger zerolog.Lo if lastScannedGatewayCall < lastScannedLowest { lastScannedLowest = lastScannedGatewayCall } + if lastScannedGatewayDepositAndCall < lastScannedLowest { + lastScannedLowest = lastScannedGatewayDepositAndCall + } // update last scanned block height for all 3 events (ZetaSent, Deposited, TssRecvd), ignore db error if lastScannedLowest > lastScanned { diff --git a/zetaclient/chains/evm/observer/v2_inbound.go b/zetaclient/chains/evm/observer/v2_inbound.go index 246dda603a..b19f0e9f85 100644 --- a/zetaclient/chains/evm/observer/v2_inbound.go +++ b/zetaclient/chains/evm/observer/v2_inbound.go @@ -175,6 +175,12 @@ func (ob *Observer) newDepositInboundVote(event *gatewayevm.GatewayEVMDeposited) coinType = coin.CoinType_Gas } + // to maintain compatibility with previous gateway version, deposit event with a non-empty payload is considered as a call + isCrossChainCall := false + if len(event.Payload) > 0 { + isCrossChainCall = true + } + return *types.NewMsgVoteInbound( ob.ZetacoreClient().GetKeys().GetOperatorAddress().String(), event.Sender.Hex(), @@ -193,6 +199,7 @@ func (ob *Observer) newDepositInboundVote(event *gatewayevm.GatewayEVMDeposited) types.ProtocolContractVersion_V2, false, // currently not relevant since calls are not arbitrary types.WithEVMRevertOptions(event.RevertOptions), + types.WithCrossChainCall(isCrossChainCall), ) } @@ -330,3 +337,141 @@ func (ob *Observer) newCallInboundVote(event *gatewayevm.GatewayEVMCalled) types types.WithEVMRevertOptions(event.RevertOptions), ) } + +// ObserveGatewayDepositAndCall queries the gateway contract for deposit and call events +// returns the last block successfully scanned +func (ob *Observer) ObserveGatewayDepositAndCall(ctx context.Context, startBlock, toBlock uint64) (uint64, error) { + gatewayAddr, gatewayContract, err := ob.GetGatewayContract() + if err != nil { + // lastScanned is startBlock - 1 + return startBlock - 1, errors.Wrap(err, "can't get gateway contract") + } + + // get iterator for the events for the block range + eventIterator, err := gatewayContract.FilterDepositedAndCalled(&bind.FilterOpts{ + Start: startBlock, + End: &toBlock, + Context: ctx, + }, []ethcommon.Address{}, []ethcommon.Address{}) + if err != nil { + return startBlock - 1, errors.Wrapf( + err, + "error filtering deposits from block %d to %d for chain %d", + startBlock, + toBlock, + ob.Chain().ChainId, + ) + } + + // parse and validate events + events := ob.parseAndValidateDepositAndCallEvents(eventIterator, gatewayAddr) + + // increment prom counter + metrics.GetFilterLogsPerChain.WithLabelValues(ob.Chain().Name).Inc() + + // post to zetacore + lastScanned := uint64(0) + for _, event := range events { + // remember which block we are scanning (there could be multiple events in the same block) + if event.Raw.BlockNumber > lastScanned { + lastScanned = event.Raw.BlockNumber + } + + // check if the event is processable + if !ob.checkEventProcessability(event.Sender, event.Receiver, event.Raw.TxHash, event.Payload) { + continue + } + + msg := ob.newDepositAndCallInboundVote(event) + + ob.Logger().Inbound.Info(). + Msgf("ObserveGateway: DepositAndCall inbound detected on chain %d tx %s block %d from %s value %s message %s", + ob.Chain(). + ChainId, event.Raw.TxHash.Hex(), event.Raw.BlockNumber, event.Sender.Hex(), event.Amount.String(), hex.EncodeToString(event.Payload)) + + _, err = ob.PostVoteInbound(ctx, &msg, zetacore.PostVoteInboundExecutionGasLimit) + if err != nil { + // decrement the last scanned block so we have to re-scan from this block next time + return lastScanned - 1, errors.Wrap(err, "error posting vote inbound") + } + } + + // successfully processed all events in [startBlock, toBlock] + return toBlock, nil +} + +// parseAndValidateDepositAndCallEvents collects and sorts events by block number, tx index, and log index +func (ob *Observer) parseAndValidateDepositAndCallEvents( + iterator *gatewayevm.GatewayEVMDepositedAndCalledIterator, + gatewayAddr ethcommon.Address, +) []*gatewayevm.GatewayEVMDepositedAndCalled { + // collect and sort events by block number, then tx index, then log index (ascending) + events := make([]*gatewayevm.GatewayEVMDepositedAndCalled, 0) + for iterator.Next() { + events = append(events, iterator.Event) + err := evm.ValidateEvmTxLog(&iterator.Event.Raw, gatewayAddr, "", evm.TopicsGatewayDepositAndCall) + if err == nil { + events = append(events, iterator.Event) + continue + } + ob.Logger().Inbound.Warn(). + Err(err). + Msgf("ObserveGateway: invalid DepositedAndCalled event in tx %s on chain %d at height %d", + iterator.Event.Raw.TxHash.Hex(), ob.Chain().ChainId, iterator.Event.Raw.BlockNumber) + } + sort.SliceStable(events, func(i, j int) bool { + if events[i].Raw.BlockNumber == events[j].Raw.BlockNumber { + if events[i].Raw.TxIndex == events[j].Raw.TxIndex { + return events[i].Raw.Index < events[j].Raw.Index + } + return events[i].Raw.TxIndex < events[j].Raw.TxIndex + } + return events[i].Raw.BlockNumber < events[j].Raw.BlockNumber + }) + + // filter events from same tx + filtered := make([]*gatewayevm.GatewayEVMDepositedAndCalled, 0) + guard := make(map[string]bool) + for _, event := range events { + // guard against multiple events in the same tx + if guard[event.Raw.TxHash.Hex()] { + ob.Logger().Inbound.Warn(). + Msgf("ObserveGateway: multiple remote call events detected in same tx %s", event.Raw.TxHash) + continue + } + guard[event.Raw.TxHash.Hex()] = true + filtered = append(filtered, event) + } + + return filtered +} + +// newDepositInboundVote creates a MsgVoteInbound message for a Deposit event +func (ob *Observer) newDepositAndCallInboundVote(event *gatewayevm.GatewayEVMDepositedAndCalled) types.MsgVoteInbound { + // if event.Asset is zero, it's a native token + coinType := coin.CoinType_ERC20 + if crypto.IsEmptyAddress(event.Asset) { + coinType = coin.CoinType_Gas + } + + return *types.NewMsgVoteInbound( + ob.ZetacoreClient().GetKeys().GetOperatorAddress().String(), + event.Sender.Hex(), + ob.Chain().ChainId, + "", + event.Receiver.Hex(), + ob.ZetacoreClient().Chain().ChainId, + sdkmath.NewUintFromBigInt(event.Amount), + hex.EncodeToString(event.Payload), + event.Raw.TxHash.Hex(), + event.Raw.BlockNumber, + 1_500_000, + coinType, + event.Asset.Hex(), + event.Raw.Index, + types.ProtocolContractVersion_V2, + false, // currently not relevant since calls are not arbitrary + types.WithEVMRevertOptions(event.RevertOptions), + types.WithCrossChainCall(true), + ) +}