From 09da3246f7cd8e213aaa1aed33575435e3f173bb Mon Sep 17 00:00:00 2001 From: Andres Aiello Date: Thu, 18 Apr 2024 14:52:54 -0300 Subject: [PATCH] feat: update zevm connector to accept zeta in onreceive --- contracts/zevm/ZetaConnectorZEVM.sol | 4 ++-- .../zetaconnectorzevm.go | 16 +++++++-------- test/ConnectorZEVM.spec.ts | 20 ++++++------------- .../ZetaConnectorZEVM.ts | 17 ++++++++-------- .../ZetaConnectorZEVM__factory.ts | 6 +++--- 5 files changed, 28 insertions(+), 35 deletions(-) diff --git a/contracts/zevm/ZetaConnectorZEVM.sol b/contracts/zevm/ZetaConnectorZEVM.sol index 224b9dd0..19caf9eb 100644 --- a/contracts/zevm/ZetaConnectorZEVM.sol +++ b/contracts/zevm/ZetaConnectorZEVM.sol @@ -162,7 +162,7 @@ contract ZetaConnectorZEVM { uint256 zetaValue, bytes calldata message, bytes32 internalSendHash - ) external onlyFungibleModule { + ) external payable onlyFungibleModule { IWETH9(wzeta).deposit{value: zetaValue}(); if (!IWETH9(wzeta).transferFrom(address(this), destinationAddress, zetaValue)) revert WZETATransferFailed(); @@ -188,7 +188,7 @@ contract ZetaConnectorZEVM { uint256 remainingZetaValue, bytes calldata message, bytes32 internalSendHash - ) external onlyFungibleModule { + ) external payable onlyFungibleModule { IWETH9(wzeta).deposit{value: remainingZetaValue}(); if (!IWETH9(wzeta).transferFrom(address(this), zetaTxSenderAddress, remainingZetaValue)) revert WZETATransferFailed(); diff --git a/pkg/contracts/zevm/zetaconnectorzevm.sol/zetaconnectorzevm.go b/pkg/contracts/zevm/zetaconnectorzevm.sol/zetaconnectorzevm.go index 03419fe6..10a1cb23 100644 --- a/pkg/contracts/zevm/zetaconnectorzevm.sol/zetaconnectorzevm.go +++ b/pkg/contracts/zevm/zetaconnectorzevm.sol/zetaconnectorzevm.go @@ -41,8 +41,8 @@ type ZetaInterfacesSendInput struct { // ZetaConnectorZEVMMetaData contains all meta data concerning the ZetaConnectorZEVM contract. var ZetaConnectorZEVMMetaData = &bind.MetaData{ - ABI: "[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"wzeta_\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"FailedZetaSent\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OnlyFungibleModule\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OnlyWZETAOrFungible\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"WZETATransferFailed\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"wzeta_\",\"type\":\"address\"}],\"name\":\"SetWZETA\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"zetaTxSenderAddress\",\"type\":\"bytes\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"sourceChainId\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"destinationAddress\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"zetaValue\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"message\",\"type\":\"bytes\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"internalSendHash\",\"type\":\"bytes32\"}],\"name\":\"ZetaReceived\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"zetaTxSenderAddress\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"sourceChainId\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"destinationChainId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"destinationAddress\",\"type\":\"bytes\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"remainingZetaValue\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"message\",\"type\":\"bytes\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"internalSendHash\",\"type\":\"bytes32\"}],\"name\":\"ZetaReverted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"sourceTxOriginAddress\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"zetaTxSenderAddress\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"destinationChainId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"destinationAddress\",\"type\":\"bytes\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"zetaValueAndGas\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"destinationGasLimit\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"message\",\"type\":\"bytes\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"zetaParams\",\"type\":\"bytes\"}],\"name\":\"ZetaSent\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"FUNGIBLE_MODULE_ADDRESS\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"zetaTxSenderAddress\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"sourceChainId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"destinationAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"zetaValue\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"message\",\"type\":\"bytes\"},{\"internalType\":\"bytes32\",\"name\":\"internalSendHash\",\"type\":\"bytes32\"}],\"name\":\"onReceive\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"zetaTxSenderAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"sourceChainId\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"destinationAddress\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"destinationChainId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"remainingZetaValue\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"message\",\"type\":\"bytes\"},{\"internalType\":\"bytes32\",\"name\":\"internalSendHash\",\"type\":\"bytes32\"}],\"name\":\"onRevert\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"destinationChainId\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"destinationAddress\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"destinationGasLimit\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"message\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"zetaValueAndGas\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"zetaParams\",\"type\":\"bytes\"}],\"internalType\":\"structZetaInterfaces.SendInput\",\"name\":\"input\",\"type\":\"tuple\"}],\"name\":\"send\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"wzeta_\",\"type\":\"address\"}],\"name\":\"setWzetaAddress\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"wzeta\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}]", - Bin: "0x60806040523480156200001157600080fd5b506040516200172538038062001725833981810160405281019062000037919062000095565b806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550506200011a565b6000815190506200008f8162000100565b92915050565b600060208284031215620000ae57620000ad620000fb565b5b6000620000be848285016200007e565b91505092915050565b6000620000d482620000db565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600080fd5b6200010b81620000c7565b81146200011757600080fd5b50565b6115fb806200012a6000396000f3fe6080604052600436106100585760003560e01c8062173d461461013757806329dd214d146101625780633ce4a5bc1461018b578063942a5e16146101b6578063eb3bacbd146101df578063ec0269011461020857610132565b366101325760008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141580156100f9575073735b14bb79463307aacbed86daf3322b1e6226ab73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614155b15610130576040517f229930b200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b005b600080fd5b34801561014357600080fd5b5061014c610231565b604051610159919061121e565b60405180910390f35b34801561016e57600080fd5b5061018960048036038101906101849190610f1f565b610255565b005b34801561019757600080fd5b506101a06105d2565b6040516101ad919061121e565b60405180910390f35b3480156101c257600080fd5b506101dd60048036038101906101d89190610e10565b6105ea565b005b3480156101eb57600080fd5b5061020660048036038101906102019190610de3565b61095b565b005b34801561021457600080fd5b5061022f600480360381019061022a9190610fee565b610a4e565b005b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b73735b14bb79463307aacbed86daf3322b1e6226ab73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146102ce576040517fea02b3f300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663d0e30db0856040518263ffffffff1660e01b81526004016000604051808303818588803b15801561033657600080fd5b505af115801561034a573d6000803e3d6000fd5b505050505060008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166323b872dd3087876040518463ffffffff1660e01b81526004016103ac93929190611239565b602060405180830381600087803b1580156103c657600080fd5b505af11580156103da573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103fe9190610ef2565b610434576040517fa8c6fd4a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000838390501115610570578473ffffffffffffffffffffffffffffffffffffffff16633749c51a6040518060a001604052808b8b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505081526020018981526020018873ffffffffffffffffffffffffffffffffffffffff16815260200187815260200186868080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050508152506040518263ffffffff1660e01b815260040161053d919061139a565b600060405180830381600087803b15801561055757600080fd5b505af115801561056b573d6000803e3d6000fd5b505050505b808573ffffffffffffffffffffffffffffffffffffffff16877ff1302855733b40d8acb467ee990b6d56c05c80e28ebcabfa6e6f3f57cb50d6988b8b8989896040516105c0959493929190611351565b60405180910390a45050505050505050565b73735b14bb79463307aacbed86daf3322b1e6226ab81565b73735b14bb79463307aacbed86daf3322b1e6226ab73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610663576040517fea02b3f300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663d0e30db0856040518263ffffffff1660e01b81526004016000604051808303818588803b1580156106cb57600080fd5b505af11580156106df573d6000803e3d6000fd5b505050505060008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166323b872dd308b876040518463ffffffff1660e01b815260040161074193929190611239565b602060405180830381600087803b15801561075b57600080fd5b505af115801561076f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107939190610ef2565b6107c9576040517fa8c6fd4a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600083839050111561090b578873ffffffffffffffffffffffffffffffffffffffff16633ff0693c6040518060c001604052808c73ffffffffffffffffffffffffffffffffffffffff1681526020018b81526020018a8a8080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050815260200188815260200187815260200186868080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050508152506040518263ffffffff1660e01b81526004016108d891906113bc565b600060405180830381600087803b1580156108f257600080fd5b505af1158015610906573d6000803e3d6000fd5b505050505b80857f521fb0b407c2eb9b1375530e9b9a569889992140a688bc076aa72c1712012c888b8b8b8b8a8a8a60405161094897969594939291906112ec565b60405180910390a3505050505050505050565b73735b14bb79463307aacbed86daf3322b1e6226ab73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146109d4576040517fea02b3f300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055507f7325870b05f8f3412c318a35fc6a74feca51ea15811ec7a257676ca4db9d417681604051610a43919061121e565b60405180910390a150565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166323b872dd333084608001356040518463ffffffff1660e01b8152600401610aaf93929190611239565b602060405180830381600087803b158015610ac957600080fd5b505af1158015610add573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b019190610ef2565b610b37576040517fa8c6fd4a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16632e1a7d4d82608001356040518263ffffffff1660e01b8152600401610b9491906113de565b600060405180830381600087803b158015610bae57600080fd5b505af1158015610bc2573d6000803e3d6000fd5b50505050600073735b14bb79463307aacbed86daf3322b1e6226ab73ffffffffffffffffffffffffffffffffffffffff168260800135604051610c0490611209565b60006040518083038185875af1925050503d8060008114610c41576040519150601f19603f3d011682016040523d82523d6000602084013e610c46565b606091505b5050905080610c81576040517fc7ffc47b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b81600001353373ffffffffffffffffffffffffffffffffffffffff167f7ec1c94701e09b1652f3e1d307e60c4b9ebf99aff8c2079fd1d8c585e031c4e432858060200190610ccf91906113f9565b87608001358860400135898060600190610ce991906113f9565b8b8060a00190610cf991906113f9565b604051610d0e99989796959493929190611270565b60405180910390a35050565b600081359050610d2981611569565b92915050565b600081519050610d3e81611580565b92915050565b600081359050610d5381611597565b92915050565b60008083601f840112610d6f57610d6e61152d565b5b8235905067ffffffffffffffff811115610d8c57610d8b611528565b5b602083019150836001820283011115610da857610da7611541565b5b9250929050565b600060c08284031215610dc557610dc4611537565b5b81905092915050565b600081359050610ddd816115ae565b92915050565b600060208284031215610df957610df8611550565b5b6000610e0784828501610d1a565b91505092915050565b600080600080600080600080600060e08a8c031215610e3257610e31611550565b5b6000610e408c828d01610d1a565b9950506020610e518c828d01610dce565b98505060408a013567ffffffffffffffff811115610e7257610e7161154b565b5b610e7e8c828d01610d59565b97509750506060610e918c828d01610dce565b9550506080610ea28c828d01610dce565b94505060a08a013567ffffffffffffffff811115610ec357610ec261154b565b5b610ecf8c828d01610d59565b935093505060c0610ee28c828d01610d44565b9150509295985092959850929598565b600060208284031215610f0857610f07611550565b5b6000610f1684828501610d2f565b91505092915050565b60008060008060008060008060c0898b031215610f3f57610f3e611550565b5b600089013567ffffffffffffffff811115610f5d57610f5c61154b565b5b610f698b828c01610d59565b98509850506020610f7c8b828c01610dce565b9650506040610f8d8b828c01610d1a565b9550506060610f9e8b828c01610dce565b945050608089013567ffffffffffffffff811115610fbf57610fbe61154b565b5b610fcb8b828c01610d59565b935093505060a0610fde8b828c01610d44565b9150509295985092959890939650565b60006020828403121561100457611003611550565b5b600082013567ffffffffffffffff8111156110225761102161154b565b5b61102e84828501610daf565b91505092915050565b61104081611494565b82525050565b61104f81611494565b82525050565b60006110618385611478565b935061106e8385846114e6565b61107783611555565b840190509392505050565b600061108d8261145c565b6110978185611467565b93506110a78185602086016114f5565b6110b081611555565b840191505092915050565b60006110c8600083611489565b91506110d382611566565b600082019050919050565b600060a08301600083015184820360008601526110fb8282611082565b915050602083015161111060208601826111eb565b5060408301516111236040860182611037565b50606083015161113660608601826111eb565b506080830151848203608086015261114e8282611082565b9150508091505092915050565b600060c0830160008301516111736000860182611037565b50602083015161118660208601826111eb565b506040830151848203604086015261119e8282611082565b91505060608301516111b360608601826111eb565b5060808301516111c660808601826111eb565b5060a083015184820360a08601526111de8282611082565b9150508091505092915050565b6111f4816114dc565b82525050565b611203816114dc565b82525050565b6000611214826110bb565b9150819050919050565b60006020820190506112336000830184611046565b92915050565b600060608201905061124e6000830186611046565b61125b6020830185611046565b61126860408301846111fa565b949350505050565b600060c082019050611285600083018c611046565b8181036020830152611298818a8c611055565b90506112a760408301896111fa565b6112b460608301886111fa565b81810360808301526112c7818688611055565b905081810360a08301526112dc818486611055565b90509a9950505050505050505050565b600060a082019050611301600083018a611046565b61130e60208301896111fa565b8181036040830152611321818789611055565b905061133060608301866111fa565b8181036080830152611343818486611055565b905098975050505050505050565b6000606082019050818103600083015261136c818789611055565b905061137b60208301866111fa565b818103604083015261138e818486611055565b90509695505050505050565b600060208201905081810360008301526113b481846110de565b905092915050565b600060208201905081810360008301526113d6818461115b565b905092915050565b60006020820190506113f360008301846111fa565b92915050565b600080833560016020038436030381126114165761141561153c565b5b80840192508235915067ffffffffffffffff82111561143857611437611532565b5b60208301925060018202360383131561145457611453611546565b5b509250929050565b600081519050919050565b600082825260208201905092915050565b600082825260208201905092915050565b600081905092915050565b600061149f826114bc565b9050919050565b60008115159050919050565b6000819050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b82818337600083830152505050565b60005b838110156115135780820151818401526020810190506114f8565b83811115611522576000848401525b50505050565b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b50565b61157281611494565b811461157d57600080fd5b50565b611589816114a6565b811461159457600080fd5b50565b6115a0816114b2565b81146115ab57600080fd5b50565b6115b7816114dc565b81146115c257600080fd5b5056fea264697066735822122056c9710d2ed23fc250229a04bffe82424d1028e07e2fe295cd842423320e0a3764736f6c63430008070033", + ABI: "[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"wzeta_\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"FailedZetaSent\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OnlyFungibleModule\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OnlyWZETAOrFungible\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"WZETATransferFailed\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"wzeta_\",\"type\":\"address\"}],\"name\":\"SetWZETA\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"zetaTxSenderAddress\",\"type\":\"bytes\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"sourceChainId\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"destinationAddress\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"zetaValue\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"message\",\"type\":\"bytes\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"internalSendHash\",\"type\":\"bytes32\"}],\"name\":\"ZetaReceived\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"zetaTxSenderAddress\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"sourceChainId\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"destinationChainId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"destinationAddress\",\"type\":\"bytes\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"remainingZetaValue\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"message\",\"type\":\"bytes\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"internalSendHash\",\"type\":\"bytes32\"}],\"name\":\"ZetaReverted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"sourceTxOriginAddress\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"zetaTxSenderAddress\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"destinationChainId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"destinationAddress\",\"type\":\"bytes\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"zetaValueAndGas\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"destinationGasLimit\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"message\",\"type\":\"bytes\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"zetaParams\",\"type\":\"bytes\"}],\"name\":\"ZetaSent\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"FUNGIBLE_MODULE_ADDRESS\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"zetaTxSenderAddress\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"sourceChainId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"destinationAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"zetaValue\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"message\",\"type\":\"bytes\"},{\"internalType\":\"bytes32\",\"name\":\"internalSendHash\",\"type\":\"bytes32\"}],\"name\":\"onReceive\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"zetaTxSenderAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"sourceChainId\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"destinationAddress\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"destinationChainId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"remainingZetaValue\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"message\",\"type\":\"bytes\"},{\"internalType\":\"bytes32\",\"name\":\"internalSendHash\",\"type\":\"bytes32\"}],\"name\":\"onRevert\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"destinationChainId\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"destinationAddress\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"destinationGasLimit\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"message\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"zetaValueAndGas\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"zetaParams\",\"type\":\"bytes\"}],\"internalType\":\"structZetaInterfaces.SendInput\",\"name\":\"input\",\"type\":\"tuple\"}],\"name\":\"send\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"wzeta_\",\"type\":\"address\"}],\"name\":\"setWzetaAddress\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"wzeta\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}]", + Bin: "0x60806040523480156200001157600080fd5b506040516200170b3803806200170b833981810160405281019062000037919062000095565b806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550506200011a565b6000815190506200008f8162000100565b92915050565b600060208284031215620000ae57620000ad620000fb565b5b6000620000be848285016200007e565b91505092915050565b6000620000d482620000db565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600080fd5b6200010b81620000c7565b81146200011757600080fd5b50565b6115e1806200012a6000396000f3fe6080604052600436106100585760003560e01c8062173d461461013757806329dd214d146101625780633ce4a5bc1461017e578063942a5e16146101a9578063eb3bacbd146101c5578063ec026901146101ee57610132565b366101325760008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141580156100f9575073735b14bb79463307aacbed86daf3322b1e6226ab73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614155b15610130576040517f229930b200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b005b600080fd5b34801561014357600080fd5b5061014c610217565b6040516101599190611204565b60405180910390f35b61017c60048036038101906101779190610f05565b61023b565b005b34801561018a57600080fd5b506101936105b8565b6040516101a09190611204565b60405180910390f35b6101c360048036038101906101be9190610df6565b6105d0565b005b3480156101d157600080fd5b506101ec60048036038101906101e79190610dc9565b610941565b005b3480156101fa57600080fd5b5061021560048036038101906102109190610fd4565b610a34565b005b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b73735b14bb79463307aacbed86daf3322b1e6226ab73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146102b4576040517fea02b3f300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663d0e30db0856040518263ffffffff1660e01b81526004016000604051808303818588803b15801561031c57600080fd5b505af1158015610330573d6000803e3d6000fd5b505050505060008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166323b872dd3087876040518463ffffffff1660e01b81526004016103929392919061121f565b602060405180830381600087803b1580156103ac57600080fd5b505af11580156103c0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103e49190610ed8565b61041a576040517fa8c6fd4a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000838390501115610556578473ffffffffffffffffffffffffffffffffffffffff16633749c51a6040518060a001604052808b8b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505081526020018981526020018873ffffffffffffffffffffffffffffffffffffffff16815260200187815260200186868080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050508152506040518263ffffffff1660e01b81526004016105239190611380565b600060405180830381600087803b15801561053d57600080fd5b505af1158015610551573d6000803e3d6000fd5b505050505b808573ffffffffffffffffffffffffffffffffffffffff16877ff1302855733b40d8acb467ee990b6d56c05c80e28ebcabfa6e6f3f57cb50d6988b8b8989896040516105a6959493929190611337565b60405180910390a45050505050505050565b73735b14bb79463307aacbed86daf3322b1e6226ab81565b73735b14bb79463307aacbed86daf3322b1e6226ab73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610649576040517fea02b3f300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663d0e30db0856040518263ffffffff1660e01b81526004016000604051808303818588803b1580156106b157600080fd5b505af11580156106c5573d6000803e3d6000fd5b505050505060008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166323b872dd308b876040518463ffffffff1660e01b81526004016107279392919061121f565b602060405180830381600087803b15801561074157600080fd5b505af1158015610755573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107799190610ed8565b6107af576040517fa8c6fd4a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008383905011156108f1578873ffffffffffffffffffffffffffffffffffffffff16633ff0693c6040518060c001604052808c73ffffffffffffffffffffffffffffffffffffffff1681526020018b81526020018a8a8080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050815260200188815260200187815260200186868080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050508152506040518263ffffffff1660e01b81526004016108be91906113a2565b600060405180830381600087803b1580156108d857600080fd5b505af11580156108ec573d6000803e3d6000fd5b505050505b80857f521fb0b407c2eb9b1375530e9b9a569889992140a688bc076aa72c1712012c888b8b8b8b8a8a8a60405161092e97969594939291906112d2565b60405180910390a3505050505050505050565b73735b14bb79463307aacbed86daf3322b1e6226ab73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146109ba576040517fea02b3f300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055507f7325870b05f8f3412c318a35fc6a74feca51ea15811ec7a257676ca4db9d417681604051610a299190611204565b60405180910390a150565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166323b872dd333084608001356040518463ffffffff1660e01b8152600401610a959392919061121f565b602060405180830381600087803b158015610aaf57600080fd5b505af1158015610ac3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ae79190610ed8565b610b1d576040517fa8c6fd4a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16632e1a7d4d82608001356040518263ffffffff1660e01b8152600401610b7a91906113c4565b600060405180830381600087803b158015610b9457600080fd5b505af1158015610ba8573d6000803e3d6000fd5b50505050600073735b14bb79463307aacbed86daf3322b1e6226ab73ffffffffffffffffffffffffffffffffffffffff168260800135604051610bea906111ef565b60006040518083038185875af1925050503d8060008114610c27576040519150601f19603f3d011682016040523d82523d6000602084013e610c2c565b606091505b5050905080610c67576040517fc7ffc47b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b81600001353373ffffffffffffffffffffffffffffffffffffffff167f7ec1c94701e09b1652f3e1d307e60c4b9ebf99aff8c2079fd1d8c585e031c4e432858060200190610cb591906113df565b87608001358860400135898060600190610ccf91906113df565b8b8060a00190610cdf91906113df565b604051610cf499989796959493929190611256565b60405180910390a35050565b600081359050610d0f8161154f565b92915050565b600081519050610d2481611566565b92915050565b600081359050610d398161157d565b92915050565b60008083601f840112610d5557610d54611513565b5b8235905067ffffffffffffffff811115610d7257610d7161150e565b5b602083019150836001820283011115610d8e57610d8d611527565b5b9250929050565b600060c08284031215610dab57610daa61151d565b5b81905092915050565b600081359050610dc381611594565b92915050565b600060208284031215610ddf57610dde611536565b5b6000610ded84828501610d00565b91505092915050565b600080600080600080600080600060e08a8c031215610e1857610e17611536565b5b6000610e268c828d01610d00565b9950506020610e378c828d01610db4565b98505060408a013567ffffffffffffffff811115610e5857610e57611531565b5b610e648c828d01610d3f565b97509750506060610e778c828d01610db4565b9550506080610e888c828d01610db4565b94505060a08a013567ffffffffffffffff811115610ea957610ea8611531565b5b610eb58c828d01610d3f565b935093505060c0610ec88c828d01610d2a565b9150509295985092959850929598565b600060208284031215610eee57610eed611536565b5b6000610efc84828501610d15565b91505092915050565b60008060008060008060008060c0898b031215610f2557610f24611536565b5b600089013567ffffffffffffffff811115610f4357610f42611531565b5b610f4f8b828c01610d3f565b98509850506020610f628b828c01610db4565b9650506040610f738b828c01610d00565b9550506060610f848b828c01610db4565b945050608089013567ffffffffffffffff811115610fa557610fa4611531565b5b610fb18b828c01610d3f565b935093505060a0610fc48b828c01610d2a565b9150509295985092959890939650565b600060208284031215610fea57610fe9611536565b5b600082013567ffffffffffffffff81111561100857611007611531565b5b61101484828501610d95565b91505092915050565b6110268161147a565b82525050565b6110358161147a565b82525050565b6000611047838561145e565b93506110548385846114cc565b61105d8361153b565b840190509392505050565b600061107382611442565b61107d818561144d565b935061108d8185602086016114db565b6110968161153b565b840191505092915050565b60006110ae60008361146f565b91506110b98261154c565b600082019050919050565b600060a08301600083015184820360008601526110e18282611068565b91505060208301516110f660208601826111d1565b506040830151611109604086018261101d565b50606083015161111c60608601826111d1565b50608083015184820360808601526111348282611068565b9150508091505092915050565b600060c083016000830151611159600086018261101d565b50602083015161116c60208601826111d1565b50604083015184820360408601526111848282611068565b915050606083015161119960608601826111d1565b5060808301516111ac60808601826111d1565b5060a083015184820360a08601526111c48282611068565b9150508091505092915050565b6111da816114c2565b82525050565b6111e9816114c2565b82525050565b60006111fa826110a1565b9150819050919050565b6000602082019050611219600083018461102c565b92915050565b6000606082019050611234600083018661102c565b611241602083018561102c565b61124e60408301846111e0565b949350505050565b600060c08201905061126b600083018c61102c565b818103602083015261127e818a8c61103b565b905061128d60408301896111e0565b61129a60608301886111e0565b81810360808301526112ad81868861103b565b905081810360a08301526112c281848661103b565b90509a9950505050505050505050565b600060a0820190506112e7600083018a61102c565b6112f460208301896111e0565b818103604083015261130781878961103b565b905061131660608301866111e0565b818103608083015261132981848661103b565b905098975050505050505050565b6000606082019050818103600083015261135281878961103b565b905061136160208301866111e0565b818103604083015261137481848661103b565b90509695505050505050565b6000602082019050818103600083015261139a81846110c4565b905092915050565b600060208201905081810360008301526113bc8184611141565b905092915050565b60006020820190506113d960008301846111e0565b92915050565b600080833560016020038436030381126113fc576113fb611522565b5b80840192508235915067ffffffffffffffff82111561141e5761141d611518565b5b60208301925060018202360383131561143a5761143961152c565b5b509250929050565b600081519050919050565b600082825260208201905092915050565b600082825260208201905092915050565b600081905092915050565b6000611485826114a2565b9050919050565b60008115159050919050565b6000819050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b82818337600083830152505050565b60005b838110156114f95780820151818401526020810190506114de565b83811115611508576000848401525b50505050565b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b50565b6115588161147a565b811461156357600080fd5b50565b61156f8161148c565b811461157a57600080fd5b50565b61158681611498565b811461159157600080fd5b50565b61159d816114c2565b81146115a857600080fd5b5056fea2646970667358221220e06cae3a9a7d1fb2823c71a311da459c143366264308d573c7dc963afc88696364736f6c63430008070033", } // ZetaConnectorZEVMABI is the input ABI used to generate the binding from. @@ -276,42 +276,42 @@ func (_ZetaConnectorZEVM *ZetaConnectorZEVMCallerSession) Wzeta() (common.Addres // OnReceive is a paid mutator transaction binding the contract method 0x29dd214d. // -// Solidity: function onReceive(bytes zetaTxSenderAddress, uint256 sourceChainId, address destinationAddress, uint256 zetaValue, bytes message, bytes32 internalSendHash) returns() +// Solidity: function onReceive(bytes zetaTxSenderAddress, uint256 sourceChainId, address destinationAddress, uint256 zetaValue, bytes message, bytes32 internalSendHash) payable returns() func (_ZetaConnectorZEVM *ZetaConnectorZEVMTransactor) OnReceive(opts *bind.TransactOpts, zetaTxSenderAddress []byte, sourceChainId *big.Int, destinationAddress common.Address, zetaValue *big.Int, message []byte, internalSendHash [32]byte) (*types.Transaction, error) { return _ZetaConnectorZEVM.contract.Transact(opts, "onReceive", zetaTxSenderAddress, sourceChainId, destinationAddress, zetaValue, message, internalSendHash) } // OnReceive is a paid mutator transaction binding the contract method 0x29dd214d. // -// Solidity: function onReceive(bytes zetaTxSenderAddress, uint256 sourceChainId, address destinationAddress, uint256 zetaValue, bytes message, bytes32 internalSendHash) returns() +// Solidity: function onReceive(bytes zetaTxSenderAddress, uint256 sourceChainId, address destinationAddress, uint256 zetaValue, bytes message, bytes32 internalSendHash) payable returns() func (_ZetaConnectorZEVM *ZetaConnectorZEVMSession) OnReceive(zetaTxSenderAddress []byte, sourceChainId *big.Int, destinationAddress common.Address, zetaValue *big.Int, message []byte, internalSendHash [32]byte) (*types.Transaction, error) { return _ZetaConnectorZEVM.Contract.OnReceive(&_ZetaConnectorZEVM.TransactOpts, zetaTxSenderAddress, sourceChainId, destinationAddress, zetaValue, message, internalSendHash) } // OnReceive is a paid mutator transaction binding the contract method 0x29dd214d. // -// Solidity: function onReceive(bytes zetaTxSenderAddress, uint256 sourceChainId, address destinationAddress, uint256 zetaValue, bytes message, bytes32 internalSendHash) returns() +// Solidity: function onReceive(bytes zetaTxSenderAddress, uint256 sourceChainId, address destinationAddress, uint256 zetaValue, bytes message, bytes32 internalSendHash) payable returns() func (_ZetaConnectorZEVM *ZetaConnectorZEVMTransactorSession) OnReceive(zetaTxSenderAddress []byte, sourceChainId *big.Int, destinationAddress common.Address, zetaValue *big.Int, message []byte, internalSendHash [32]byte) (*types.Transaction, error) { return _ZetaConnectorZEVM.Contract.OnReceive(&_ZetaConnectorZEVM.TransactOpts, zetaTxSenderAddress, sourceChainId, destinationAddress, zetaValue, message, internalSendHash) } // OnRevert is a paid mutator transaction binding the contract method 0x942a5e16. // -// Solidity: function onRevert(address zetaTxSenderAddress, uint256 sourceChainId, bytes destinationAddress, uint256 destinationChainId, uint256 remainingZetaValue, bytes message, bytes32 internalSendHash) returns() +// Solidity: function onRevert(address zetaTxSenderAddress, uint256 sourceChainId, bytes destinationAddress, uint256 destinationChainId, uint256 remainingZetaValue, bytes message, bytes32 internalSendHash) payable returns() func (_ZetaConnectorZEVM *ZetaConnectorZEVMTransactor) OnRevert(opts *bind.TransactOpts, zetaTxSenderAddress common.Address, sourceChainId *big.Int, destinationAddress []byte, destinationChainId *big.Int, remainingZetaValue *big.Int, message []byte, internalSendHash [32]byte) (*types.Transaction, error) { return _ZetaConnectorZEVM.contract.Transact(opts, "onRevert", zetaTxSenderAddress, sourceChainId, destinationAddress, destinationChainId, remainingZetaValue, message, internalSendHash) } // OnRevert is a paid mutator transaction binding the contract method 0x942a5e16. // -// Solidity: function onRevert(address zetaTxSenderAddress, uint256 sourceChainId, bytes destinationAddress, uint256 destinationChainId, uint256 remainingZetaValue, bytes message, bytes32 internalSendHash) returns() +// Solidity: function onRevert(address zetaTxSenderAddress, uint256 sourceChainId, bytes destinationAddress, uint256 destinationChainId, uint256 remainingZetaValue, bytes message, bytes32 internalSendHash) payable returns() func (_ZetaConnectorZEVM *ZetaConnectorZEVMSession) OnRevert(zetaTxSenderAddress common.Address, sourceChainId *big.Int, destinationAddress []byte, destinationChainId *big.Int, remainingZetaValue *big.Int, message []byte, internalSendHash [32]byte) (*types.Transaction, error) { return _ZetaConnectorZEVM.Contract.OnRevert(&_ZetaConnectorZEVM.TransactOpts, zetaTxSenderAddress, sourceChainId, destinationAddress, destinationChainId, remainingZetaValue, message, internalSendHash) } // OnRevert is a paid mutator transaction binding the contract method 0x942a5e16. // -// Solidity: function onRevert(address zetaTxSenderAddress, uint256 sourceChainId, bytes destinationAddress, uint256 destinationChainId, uint256 remainingZetaValue, bytes message, bytes32 internalSendHash) returns() +// Solidity: function onRevert(address zetaTxSenderAddress, uint256 sourceChainId, bytes destinationAddress, uint256 destinationChainId, uint256 remainingZetaValue, bytes message, bytes32 internalSendHash) payable returns() func (_ZetaConnectorZEVM *ZetaConnectorZEVMTransactorSession) OnRevert(zetaTxSenderAddress common.Address, sourceChainId *big.Int, destinationAddress []byte, destinationChainId *big.Int, remainingZetaValue *big.Int, message []byte, internalSendHash [32]byte) (*types.Transaction, error) { return _ZetaConnectorZEVM.Contract.OnRevert(&_ZetaConnectorZEVM.TransactOpts, zetaTxSenderAddress, sourceChainId, destinationAddress, destinationChainId, remainingZetaValue, message, internalSendHash) } diff --git a/test/ConnectorZEVM.spec.ts b/test/ConnectorZEVM.spec.ts index 9f968e4e..491a64a3 100644 --- a/test/ConnectorZEVM.spec.ts +++ b/test/ConnectorZEVM.spec.ts @@ -136,16 +136,11 @@ describe("ConnectorZEVM tests", () => { }); it("Should transfer to the receiver address", async () => { - await fungibleModuleSigner.sendTransaction({ - to: zetaConnectorZEVM.address, - value: 1000, - }); - // read eth balance of zetaConnectorEVM const initialZetaBalanceConnector = await ethers.provider.getBalance(zetaConnectorZEVM.address); const initialBalanceConnector = await zetaTokenContract.balanceOf(zetaConnectorZEVM.address); const initialBalanceReceiver = await zetaTokenContract.balanceOf(zetaReceiverMockContract.address); - expect(initialZetaBalanceConnector.toString()).to.equal("1000"); + expect(initialZetaBalanceConnector.toString()).to.equal("0"); expect(initialBalanceConnector.toString()).to.equal("0"); expect(initialBalanceReceiver.toString()).to.equal("0"); @@ -157,7 +152,8 @@ describe("ConnectorZEVM tests", () => { zetaReceiverMockContract.address, 1000, new ethers.utils.AbiCoder().encode(["string"], ["hello"]), - ethers.constants.HashZero + ethers.constants.HashZero, + { value: 1000 } ); await expect(tx) @@ -174,16 +170,11 @@ describe("ConnectorZEVM tests", () => { }); it("Should call onRevert to the original address", async () => { - await fungibleModuleSigner.sendTransaction({ - to: zetaConnectorZEVM.address, - value: 1000, - }); - // read eth balance of zetaConnectorEVM const initialZetaBalanceConnector = await ethers.provider.getBalance(zetaConnectorZEVM.address); const initialBalanceConnector = await zetaTokenContract.balanceOf(zetaConnectorZEVM.address); const initialBalanceReceiver = await zetaTokenContract.balanceOf(zetaReceiverMockContract.address); - expect(initialZetaBalanceConnector.toString()).to.equal("1000"); + expect(initialZetaBalanceConnector.toString()).to.equal("0"); expect(initialBalanceConnector.toString()).to.equal("0"); expect(initialBalanceReceiver.toString()).to.equal("0"); @@ -196,7 +187,8 @@ describe("ConnectorZEVM tests", () => { 5, 1000, new ethers.utils.AbiCoder().encode(["string"], ["hello"]), - ethers.constants.HashZero + ethers.constants.HashZero, + { value: 1000 } ); await expect(tx).to.emit(zetaReceiverMockContract, "MockOnZetaRevert").withArgs(zetaReceiverMockContract.address); diff --git a/typechain-types/contracts/zevm/ZetaConnectorZEVM.sol/ZetaConnectorZEVM.ts b/typechain-types/contracts/zevm/ZetaConnectorZEVM.sol/ZetaConnectorZEVM.ts index e570b3bd..f310b3cc 100644 --- a/typechain-types/contracts/zevm/ZetaConnectorZEVM.sol/ZetaConnectorZEVM.ts +++ b/typechain-types/contracts/zevm/ZetaConnectorZEVM.sol/ZetaConnectorZEVM.ts @@ -9,6 +9,7 @@ import type { CallOverrides, ContractTransaction, Overrides, + PayableOverrides, PopulatedTransaction, Signer, utils, @@ -228,7 +229,7 @@ export interface ZetaConnectorZEVM extends BaseContract { zetaValue: PromiseOrValue, message: PromiseOrValue, internalSendHash: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } + overrides?: PayableOverrides & { from?: PromiseOrValue } ): Promise; onRevert( @@ -239,7 +240,7 @@ export interface ZetaConnectorZEVM extends BaseContract { remainingZetaValue: PromiseOrValue, message: PromiseOrValue, internalSendHash: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } + overrides?: PayableOverrides & { from?: PromiseOrValue } ): Promise; send( @@ -264,7 +265,7 @@ export interface ZetaConnectorZEVM extends BaseContract { zetaValue: PromiseOrValue, message: PromiseOrValue, internalSendHash: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } + overrides?: PayableOverrides & { from?: PromiseOrValue } ): Promise; onRevert( @@ -275,7 +276,7 @@ export interface ZetaConnectorZEVM extends BaseContract { remainingZetaValue: PromiseOrValue, message: PromiseOrValue, internalSendHash: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } + overrides?: PayableOverrides & { from?: PromiseOrValue } ): Promise; send( @@ -399,7 +400,7 @@ export interface ZetaConnectorZEVM extends BaseContract { zetaValue: PromiseOrValue, message: PromiseOrValue, internalSendHash: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } + overrides?: PayableOverrides & { from?: PromiseOrValue } ): Promise; onRevert( @@ -410,7 +411,7 @@ export interface ZetaConnectorZEVM extends BaseContract { remainingZetaValue: PromiseOrValue, message: PromiseOrValue, internalSendHash: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } + overrides?: PayableOverrides & { from?: PromiseOrValue } ): Promise; send( @@ -438,7 +439,7 @@ export interface ZetaConnectorZEVM extends BaseContract { zetaValue: PromiseOrValue, message: PromiseOrValue, internalSendHash: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } + overrides?: PayableOverrides & { from?: PromiseOrValue } ): Promise; onRevert( @@ -449,7 +450,7 @@ export interface ZetaConnectorZEVM extends BaseContract { remainingZetaValue: PromiseOrValue, message: PromiseOrValue, internalSendHash: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } + overrides?: PayableOverrides & { from?: PromiseOrValue } ): Promise; send( diff --git a/typechain-types/factories/contracts/zevm/ZetaConnectorZEVM.sol/ZetaConnectorZEVM__factory.ts b/typechain-types/factories/contracts/zevm/ZetaConnectorZEVM.sol/ZetaConnectorZEVM__factory.ts index b3ad4dae..0812ad90 100644 --- a/typechain-types/factories/contracts/zevm/ZetaConnectorZEVM.sol/ZetaConnectorZEVM__factory.ts +++ b/typechain-types/factories/contracts/zevm/ZetaConnectorZEVM.sol/ZetaConnectorZEVM__factory.ts @@ -249,7 +249,7 @@ const _abi = [ ], name: "onReceive", outputs: [], - stateMutability: "nonpayable", + stateMutability: "payable", type: "function", }, { @@ -292,7 +292,7 @@ const _abi = [ ], name: "onRevert", outputs: [], - stateMutability: "nonpayable", + stateMutability: "payable", type: "function", }, { @@ -373,7 +373,7 @@ const _abi = [ ] as const; const _bytecode = - "0x60806040523480156200001157600080fd5b506040516200172538038062001725833981810160405281019062000037919062000095565b806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550506200011a565b6000815190506200008f8162000100565b92915050565b600060208284031215620000ae57620000ad620000fb565b5b6000620000be848285016200007e565b91505092915050565b6000620000d482620000db565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600080fd5b6200010b81620000c7565b81146200011757600080fd5b50565b6115fb806200012a6000396000f3fe6080604052600436106100585760003560e01c8062173d461461013757806329dd214d146101625780633ce4a5bc1461018b578063942a5e16146101b6578063eb3bacbd146101df578063ec0269011461020857610132565b366101325760008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141580156100f9575073735b14bb79463307aacbed86daf3322b1e6226ab73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614155b15610130576040517f229930b200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b005b600080fd5b34801561014357600080fd5b5061014c610231565b604051610159919061121e565b60405180910390f35b34801561016e57600080fd5b5061018960048036038101906101849190610f1f565b610255565b005b34801561019757600080fd5b506101a06105d2565b6040516101ad919061121e565b60405180910390f35b3480156101c257600080fd5b506101dd60048036038101906101d89190610e10565b6105ea565b005b3480156101eb57600080fd5b5061020660048036038101906102019190610de3565b61095b565b005b34801561021457600080fd5b5061022f600480360381019061022a9190610fee565b610a4e565b005b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b73735b14bb79463307aacbed86daf3322b1e6226ab73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146102ce576040517fea02b3f300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663d0e30db0856040518263ffffffff1660e01b81526004016000604051808303818588803b15801561033657600080fd5b505af115801561034a573d6000803e3d6000fd5b505050505060008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166323b872dd3087876040518463ffffffff1660e01b81526004016103ac93929190611239565b602060405180830381600087803b1580156103c657600080fd5b505af11580156103da573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103fe9190610ef2565b610434576040517fa8c6fd4a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000838390501115610570578473ffffffffffffffffffffffffffffffffffffffff16633749c51a6040518060a001604052808b8b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505081526020018981526020018873ffffffffffffffffffffffffffffffffffffffff16815260200187815260200186868080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050508152506040518263ffffffff1660e01b815260040161053d919061139a565b600060405180830381600087803b15801561055757600080fd5b505af115801561056b573d6000803e3d6000fd5b505050505b808573ffffffffffffffffffffffffffffffffffffffff16877ff1302855733b40d8acb467ee990b6d56c05c80e28ebcabfa6e6f3f57cb50d6988b8b8989896040516105c0959493929190611351565b60405180910390a45050505050505050565b73735b14bb79463307aacbed86daf3322b1e6226ab81565b73735b14bb79463307aacbed86daf3322b1e6226ab73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610663576040517fea02b3f300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663d0e30db0856040518263ffffffff1660e01b81526004016000604051808303818588803b1580156106cb57600080fd5b505af11580156106df573d6000803e3d6000fd5b505050505060008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166323b872dd308b876040518463ffffffff1660e01b815260040161074193929190611239565b602060405180830381600087803b15801561075b57600080fd5b505af115801561076f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107939190610ef2565b6107c9576040517fa8c6fd4a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600083839050111561090b578873ffffffffffffffffffffffffffffffffffffffff16633ff0693c6040518060c001604052808c73ffffffffffffffffffffffffffffffffffffffff1681526020018b81526020018a8a8080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050815260200188815260200187815260200186868080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050508152506040518263ffffffff1660e01b81526004016108d891906113bc565b600060405180830381600087803b1580156108f257600080fd5b505af1158015610906573d6000803e3d6000fd5b505050505b80857f521fb0b407c2eb9b1375530e9b9a569889992140a688bc076aa72c1712012c888b8b8b8b8a8a8a60405161094897969594939291906112ec565b60405180910390a3505050505050505050565b73735b14bb79463307aacbed86daf3322b1e6226ab73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146109d4576040517fea02b3f300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055507f7325870b05f8f3412c318a35fc6a74feca51ea15811ec7a257676ca4db9d417681604051610a43919061121e565b60405180910390a150565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166323b872dd333084608001356040518463ffffffff1660e01b8152600401610aaf93929190611239565b602060405180830381600087803b158015610ac957600080fd5b505af1158015610add573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b019190610ef2565b610b37576040517fa8c6fd4a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16632e1a7d4d82608001356040518263ffffffff1660e01b8152600401610b9491906113de565b600060405180830381600087803b158015610bae57600080fd5b505af1158015610bc2573d6000803e3d6000fd5b50505050600073735b14bb79463307aacbed86daf3322b1e6226ab73ffffffffffffffffffffffffffffffffffffffff168260800135604051610c0490611209565b60006040518083038185875af1925050503d8060008114610c41576040519150601f19603f3d011682016040523d82523d6000602084013e610c46565b606091505b5050905080610c81576040517fc7ffc47b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b81600001353373ffffffffffffffffffffffffffffffffffffffff167f7ec1c94701e09b1652f3e1d307e60c4b9ebf99aff8c2079fd1d8c585e031c4e432858060200190610ccf91906113f9565b87608001358860400135898060600190610ce991906113f9565b8b8060a00190610cf991906113f9565b604051610d0e99989796959493929190611270565b60405180910390a35050565b600081359050610d2981611569565b92915050565b600081519050610d3e81611580565b92915050565b600081359050610d5381611597565b92915050565b60008083601f840112610d6f57610d6e61152d565b5b8235905067ffffffffffffffff811115610d8c57610d8b611528565b5b602083019150836001820283011115610da857610da7611541565b5b9250929050565b600060c08284031215610dc557610dc4611537565b5b81905092915050565b600081359050610ddd816115ae565b92915050565b600060208284031215610df957610df8611550565b5b6000610e0784828501610d1a565b91505092915050565b600080600080600080600080600060e08a8c031215610e3257610e31611550565b5b6000610e408c828d01610d1a565b9950506020610e518c828d01610dce565b98505060408a013567ffffffffffffffff811115610e7257610e7161154b565b5b610e7e8c828d01610d59565b97509750506060610e918c828d01610dce565b9550506080610ea28c828d01610dce565b94505060a08a013567ffffffffffffffff811115610ec357610ec261154b565b5b610ecf8c828d01610d59565b935093505060c0610ee28c828d01610d44565b9150509295985092959850929598565b600060208284031215610f0857610f07611550565b5b6000610f1684828501610d2f565b91505092915050565b60008060008060008060008060c0898b031215610f3f57610f3e611550565b5b600089013567ffffffffffffffff811115610f5d57610f5c61154b565b5b610f698b828c01610d59565b98509850506020610f7c8b828c01610dce565b9650506040610f8d8b828c01610d1a565b9550506060610f9e8b828c01610dce565b945050608089013567ffffffffffffffff811115610fbf57610fbe61154b565b5b610fcb8b828c01610d59565b935093505060a0610fde8b828c01610d44565b9150509295985092959890939650565b60006020828403121561100457611003611550565b5b600082013567ffffffffffffffff8111156110225761102161154b565b5b61102e84828501610daf565b91505092915050565b61104081611494565b82525050565b61104f81611494565b82525050565b60006110618385611478565b935061106e8385846114e6565b61107783611555565b840190509392505050565b600061108d8261145c565b6110978185611467565b93506110a78185602086016114f5565b6110b081611555565b840191505092915050565b60006110c8600083611489565b91506110d382611566565b600082019050919050565b600060a08301600083015184820360008601526110fb8282611082565b915050602083015161111060208601826111eb565b5060408301516111236040860182611037565b50606083015161113660608601826111eb565b506080830151848203608086015261114e8282611082565b9150508091505092915050565b600060c0830160008301516111736000860182611037565b50602083015161118660208601826111eb565b506040830151848203604086015261119e8282611082565b91505060608301516111b360608601826111eb565b5060808301516111c660808601826111eb565b5060a083015184820360a08601526111de8282611082565b9150508091505092915050565b6111f4816114dc565b82525050565b611203816114dc565b82525050565b6000611214826110bb565b9150819050919050565b60006020820190506112336000830184611046565b92915050565b600060608201905061124e6000830186611046565b61125b6020830185611046565b61126860408301846111fa565b949350505050565b600060c082019050611285600083018c611046565b8181036020830152611298818a8c611055565b90506112a760408301896111fa565b6112b460608301886111fa565b81810360808301526112c7818688611055565b905081810360a08301526112dc818486611055565b90509a9950505050505050505050565b600060a082019050611301600083018a611046565b61130e60208301896111fa565b8181036040830152611321818789611055565b905061133060608301866111fa565b8181036080830152611343818486611055565b905098975050505050505050565b6000606082019050818103600083015261136c818789611055565b905061137b60208301866111fa565b818103604083015261138e818486611055565b90509695505050505050565b600060208201905081810360008301526113b481846110de565b905092915050565b600060208201905081810360008301526113d6818461115b565b905092915050565b60006020820190506113f360008301846111fa565b92915050565b600080833560016020038436030381126114165761141561153c565b5b80840192508235915067ffffffffffffffff82111561143857611437611532565b5b60208301925060018202360383131561145457611453611546565b5b509250929050565b600081519050919050565b600082825260208201905092915050565b600082825260208201905092915050565b600081905092915050565b600061149f826114bc565b9050919050565b60008115159050919050565b6000819050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b82818337600083830152505050565b60005b838110156115135780820151818401526020810190506114f8565b83811115611522576000848401525b50505050565b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b50565b61157281611494565b811461157d57600080fd5b50565b611589816114a6565b811461159457600080fd5b50565b6115a0816114b2565b81146115ab57600080fd5b50565b6115b7816114dc565b81146115c257600080fd5b5056fea264697066735822122056c9710d2ed23fc250229a04bffe82424d1028e07e2fe295cd842423320e0a3764736f6c63430008070033"; + "0x60806040523480156200001157600080fd5b506040516200170b3803806200170b833981810160405281019062000037919062000095565b806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550506200011a565b6000815190506200008f8162000100565b92915050565b600060208284031215620000ae57620000ad620000fb565b5b6000620000be848285016200007e565b91505092915050565b6000620000d482620000db565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600080fd5b6200010b81620000c7565b81146200011757600080fd5b50565b6115e1806200012a6000396000f3fe6080604052600436106100585760003560e01c8062173d461461013757806329dd214d146101625780633ce4a5bc1461017e578063942a5e16146101a9578063eb3bacbd146101c5578063ec026901146101ee57610132565b366101325760008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141580156100f9575073735b14bb79463307aacbed86daf3322b1e6226ab73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614155b15610130576040517f229930b200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b005b600080fd5b34801561014357600080fd5b5061014c610217565b6040516101599190611204565b60405180910390f35b61017c60048036038101906101779190610f05565b61023b565b005b34801561018a57600080fd5b506101936105b8565b6040516101a09190611204565b60405180910390f35b6101c360048036038101906101be9190610df6565b6105d0565b005b3480156101d157600080fd5b506101ec60048036038101906101e79190610dc9565b610941565b005b3480156101fa57600080fd5b5061021560048036038101906102109190610fd4565b610a34565b005b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b73735b14bb79463307aacbed86daf3322b1e6226ab73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146102b4576040517fea02b3f300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663d0e30db0856040518263ffffffff1660e01b81526004016000604051808303818588803b15801561031c57600080fd5b505af1158015610330573d6000803e3d6000fd5b505050505060008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166323b872dd3087876040518463ffffffff1660e01b81526004016103929392919061121f565b602060405180830381600087803b1580156103ac57600080fd5b505af11580156103c0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103e49190610ed8565b61041a576040517fa8c6fd4a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000838390501115610556578473ffffffffffffffffffffffffffffffffffffffff16633749c51a6040518060a001604052808b8b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505081526020018981526020018873ffffffffffffffffffffffffffffffffffffffff16815260200187815260200186868080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050508152506040518263ffffffff1660e01b81526004016105239190611380565b600060405180830381600087803b15801561053d57600080fd5b505af1158015610551573d6000803e3d6000fd5b505050505b808573ffffffffffffffffffffffffffffffffffffffff16877ff1302855733b40d8acb467ee990b6d56c05c80e28ebcabfa6e6f3f57cb50d6988b8b8989896040516105a6959493929190611337565b60405180910390a45050505050505050565b73735b14bb79463307aacbed86daf3322b1e6226ab81565b73735b14bb79463307aacbed86daf3322b1e6226ab73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610649576040517fea02b3f300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663d0e30db0856040518263ffffffff1660e01b81526004016000604051808303818588803b1580156106b157600080fd5b505af11580156106c5573d6000803e3d6000fd5b505050505060008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166323b872dd308b876040518463ffffffff1660e01b81526004016107279392919061121f565b602060405180830381600087803b15801561074157600080fd5b505af1158015610755573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107799190610ed8565b6107af576040517fa8c6fd4a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008383905011156108f1578873ffffffffffffffffffffffffffffffffffffffff16633ff0693c6040518060c001604052808c73ffffffffffffffffffffffffffffffffffffffff1681526020018b81526020018a8a8080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050815260200188815260200187815260200186868080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050508152506040518263ffffffff1660e01b81526004016108be91906113a2565b600060405180830381600087803b1580156108d857600080fd5b505af11580156108ec573d6000803e3d6000fd5b505050505b80857f521fb0b407c2eb9b1375530e9b9a569889992140a688bc076aa72c1712012c888b8b8b8b8a8a8a60405161092e97969594939291906112d2565b60405180910390a3505050505050505050565b73735b14bb79463307aacbed86daf3322b1e6226ab73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146109ba576040517fea02b3f300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055507f7325870b05f8f3412c318a35fc6a74feca51ea15811ec7a257676ca4db9d417681604051610a299190611204565b60405180910390a150565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166323b872dd333084608001356040518463ffffffff1660e01b8152600401610a959392919061121f565b602060405180830381600087803b158015610aaf57600080fd5b505af1158015610ac3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ae79190610ed8565b610b1d576040517fa8c6fd4a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16632e1a7d4d82608001356040518263ffffffff1660e01b8152600401610b7a91906113c4565b600060405180830381600087803b158015610b9457600080fd5b505af1158015610ba8573d6000803e3d6000fd5b50505050600073735b14bb79463307aacbed86daf3322b1e6226ab73ffffffffffffffffffffffffffffffffffffffff168260800135604051610bea906111ef565b60006040518083038185875af1925050503d8060008114610c27576040519150601f19603f3d011682016040523d82523d6000602084013e610c2c565b606091505b5050905080610c67576040517fc7ffc47b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b81600001353373ffffffffffffffffffffffffffffffffffffffff167f7ec1c94701e09b1652f3e1d307e60c4b9ebf99aff8c2079fd1d8c585e031c4e432858060200190610cb591906113df565b87608001358860400135898060600190610ccf91906113df565b8b8060a00190610cdf91906113df565b604051610cf499989796959493929190611256565b60405180910390a35050565b600081359050610d0f8161154f565b92915050565b600081519050610d2481611566565b92915050565b600081359050610d398161157d565b92915050565b60008083601f840112610d5557610d54611513565b5b8235905067ffffffffffffffff811115610d7257610d7161150e565b5b602083019150836001820283011115610d8e57610d8d611527565b5b9250929050565b600060c08284031215610dab57610daa61151d565b5b81905092915050565b600081359050610dc381611594565b92915050565b600060208284031215610ddf57610dde611536565b5b6000610ded84828501610d00565b91505092915050565b600080600080600080600080600060e08a8c031215610e1857610e17611536565b5b6000610e268c828d01610d00565b9950506020610e378c828d01610db4565b98505060408a013567ffffffffffffffff811115610e5857610e57611531565b5b610e648c828d01610d3f565b97509750506060610e778c828d01610db4565b9550506080610e888c828d01610db4565b94505060a08a013567ffffffffffffffff811115610ea957610ea8611531565b5b610eb58c828d01610d3f565b935093505060c0610ec88c828d01610d2a565b9150509295985092959850929598565b600060208284031215610eee57610eed611536565b5b6000610efc84828501610d15565b91505092915050565b60008060008060008060008060c0898b031215610f2557610f24611536565b5b600089013567ffffffffffffffff811115610f4357610f42611531565b5b610f4f8b828c01610d3f565b98509850506020610f628b828c01610db4565b9650506040610f738b828c01610d00565b9550506060610f848b828c01610db4565b945050608089013567ffffffffffffffff811115610fa557610fa4611531565b5b610fb18b828c01610d3f565b935093505060a0610fc48b828c01610d2a565b9150509295985092959890939650565b600060208284031215610fea57610fe9611536565b5b600082013567ffffffffffffffff81111561100857611007611531565b5b61101484828501610d95565b91505092915050565b6110268161147a565b82525050565b6110358161147a565b82525050565b6000611047838561145e565b93506110548385846114cc565b61105d8361153b565b840190509392505050565b600061107382611442565b61107d818561144d565b935061108d8185602086016114db565b6110968161153b565b840191505092915050565b60006110ae60008361146f565b91506110b98261154c565b600082019050919050565b600060a08301600083015184820360008601526110e18282611068565b91505060208301516110f660208601826111d1565b506040830151611109604086018261101d565b50606083015161111c60608601826111d1565b50608083015184820360808601526111348282611068565b9150508091505092915050565b600060c083016000830151611159600086018261101d565b50602083015161116c60208601826111d1565b50604083015184820360408601526111848282611068565b915050606083015161119960608601826111d1565b5060808301516111ac60808601826111d1565b5060a083015184820360a08601526111c48282611068565b9150508091505092915050565b6111da816114c2565b82525050565b6111e9816114c2565b82525050565b60006111fa826110a1565b9150819050919050565b6000602082019050611219600083018461102c565b92915050565b6000606082019050611234600083018661102c565b611241602083018561102c565b61124e60408301846111e0565b949350505050565b600060c08201905061126b600083018c61102c565b818103602083015261127e818a8c61103b565b905061128d60408301896111e0565b61129a60608301886111e0565b81810360808301526112ad81868861103b565b905081810360a08301526112c281848661103b565b90509a9950505050505050505050565b600060a0820190506112e7600083018a61102c565b6112f460208301896111e0565b818103604083015261130781878961103b565b905061131660608301866111e0565b818103608083015261132981848661103b565b905098975050505050505050565b6000606082019050818103600083015261135281878961103b565b905061136160208301866111e0565b818103604083015261137481848661103b565b90509695505050505050565b6000602082019050818103600083015261139a81846110c4565b905092915050565b600060208201905081810360008301526113bc8184611141565b905092915050565b60006020820190506113d960008301846111e0565b92915050565b600080833560016020038436030381126113fc576113fb611522565b5b80840192508235915067ffffffffffffffff82111561141e5761141d611518565b5b60208301925060018202360383131561143a5761143961152c565b5b509250929050565b600081519050919050565b600082825260208201905092915050565b600082825260208201905092915050565b600081905092915050565b6000611485826114a2565b9050919050565b60008115159050919050565b6000819050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b82818337600083830152505050565b60005b838110156114f95780820151818401526020810190506114de565b83811115611508576000848401525b50505050565b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b50565b6115588161147a565b811461156357600080fd5b50565b61156f8161148c565b811461157a57600080fd5b50565b61158681611498565b811461159157600080fd5b50565b61159d816114c2565b81146115a857600080fd5b5056fea2646970667358221220e06cae3a9a7d1fb2823c71a311da459c143366264308d573c7dc963afc88696364736f6c63430008070033"; type ZetaConnectorZEVMConstructorParams = | [signer?: Signer]