diff --git a/contracts/prototypes/evm/Receiver.sol b/contracts/prototypes/evm/ReceiverEVM.sol similarity index 98% rename from contracts/prototypes/evm/Receiver.sol rename to contracts/prototypes/evm/ReceiverEVM.sol index 54fa499d..1ac1ad26 100644 --- a/contracts/prototypes/evm/Receiver.sol +++ b/contracts/prototypes/evm/ReceiverEVM.sol @@ -4,7 +4,7 @@ pragma solidity 0.8.7; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; -contract Receiver { +contract ReceiverEVM { using SafeERC20 for IERC20; event ReceivedPayable(address sender, uint256 value, string str, uint256 num, bool flag); diff --git a/contracts/prototypes/zevm/GatewayZEVM.sol b/contracts/prototypes/zevm/GatewayZEVM.sol index 8ef155e4..bb0c3eb3 100644 --- a/contracts/prototypes/zevm/GatewayZEVM.sol +++ b/contracts/prototypes/zevm/GatewayZEVM.sol @@ -20,7 +20,7 @@ contract GatewayZEVM is Initializable, OwnableUpgradeable, UUPSUpgradeable { error CallerIsNotFungibleModule(); error InvalidTarget(); - event Call(address indexed sender, bytes indexed receiver, bytes message); + event Call(address indexed sender, bytes receiver, bytes message); event Withdrawal(address indexed from, bytes to, uint256 value, uint256 gasfee, uint256 protocolFlatFee, bytes message); /// @custom:oz-upgrades-unsafe-allow constructor diff --git a/contracts/prototypes/zevm/Sender.sol b/contracts/prototypes/zevm/SenderZEVM.sol similarity index 98% rename from contracts/prototypes/zevm/Sender.sol rename to contracts/prototypes/zevm/SenderZEVM.sol index a39831e3..711d1d97 100644 --- a/contracts/prototypes/zevm/Sender.sol +++ b/contracts/prototypes/zevm/SenderZEVM.sol @@ -5,7 +5,7 @@ import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "./interfaces.sol"; import "../../zevm/interfaces/IZRC20.sol"; -contract Sender { +contract SenderZEVM { address public gateway; error ApprovalFailed(); diff --git a/hardhat.config.ts b/hardhat.config.ts index 263a02c4..8fdc1844 100644 --- a/hardhat.config.ts +++ b/hardhat.config.ts @@ -7,6 +7,7 @@ import "uniswap-v2-deploy-plugin"; import "solidity-coverage"; import "hardhat-gas-reporter"; import "./tasks/addresses"; +import "./tasks/localnet"; import "@openzeppelin/hardhat-upgrades"; import { getHardhatConfigNetworks } from "@zetachain/networks"; diff --git a/package.json b/package.json index 7d62bcd2..5e987a5f 100644 --- a/package.json +++ b/package.json @@ -28,6 +28,7 @@ "@zetachain/networks": "^8.0.0", "axios": "^1.6.5", "chai": "^4.3.6", + "concurrently": "^8.2.2", "cpx": "^1.5.0", "del-cli": "^5.0.0", "dotenv": "^16.0.0", @@ -58,7 +59,8 @@ "tsconfig-paths": "^3.14.1", "typechain": "^8.1.0", "typescript": "^4.6.3", - "uniswap-v2-deploy-plugin": "^0.0.4" + "uniswap-v2-deploy-plugin": "^0.0.4", + "wait-on": "^7.2.0" }, "files": [ "contracts", @@ -83,10 +85,12 @@ "lint": "npx eslint . --ext .js,.ts", "lint:fix": "npx eslint . --ext .js,.ts,.json --fix --ignore-pattern coverage/ --ignore-pattern coverage.json", "lint:sol": "solhint 'contracts/**/*.sol'", + "localnet": "concurrently --names \"NODE,WORKER\" --prefix-colors \"blue.bold,green.bold\" \"npx hardhat node\" \"wait-on tcp:8545 && yarn worker\"", "prepublishOnly": "yarn build", "test": "npx hardhat test", "test:prototypes": "yarn compile && npx hardhat test test/prototypes/*", - "tsc:watch": "npx tsc --watch" + "tsc:watch": "npx tsc --watch", + "worker": "npx hardhat run scripts/worker.ts --network localhost" }, "types": "./dist/lib/index.d.ts", "version": "0.0.8" diff --git a/pkg/contracts/prototypes/evm/receiver.sol/receiver.go b/pkg/contracts/prototypes/evm/receiverevm.sol/receiverevm.go similarity index 64% rename from pkg/contracts/prototypes/evm/receiver.sol/receiver.go rename to pkg/contracts/prototypes/evm/receiverevm.sol/receiverevm.go index 8a976a45..5856f803 100644 --- a/pkg/contracts/prototypes/evm/receiver.sol/receiver.go +++ b/pkg/contracts/prototypes/evm/receiverevm.sol/receiverevm.go @@ -1,7 +1,7 @@ // Code generated - DO NOT EDIT. // This file is a generated binding and any manual changes will be lost. -package receiver +package receiverevm import ( "errors" @@ -29,23 +29,23 @@ var ( _ = abi.ConvertType ) -// ReceiverMetaData contains all meta data concerning the Receiver contract. -var ReceiverMetaData = &bind.MetaData{ +// ReceiverEVMMetaData contains all meta data concerning the ReceiverEVM contract. +var ReceiverEVMMetaData = &bind.MetaData{ ABI: "[{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"destination\",\"type\":\"address\"}],\"name\":\"ReceivedERC20\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"ReceivedNoParams\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"string[]\",\"name\":\"strs\",\"type\":\"string[]\"},{\"indexed\":false,\"internalType\":\"uint256[]\",\"name\":\"nums\",\"type\":\"uint256[]\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"flag\",\"type\":\"bool\"}],\"name\":\"ReceivedNonPayable\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"str\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"num\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"flag\",\"type\":\"bool\"}],\"name\":\"ReceivedPayable\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"destination\",\"type\":\"address\"}],\"name\":\"receiveERC20\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"receiveNoParams\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string[]\",\"name\":\"strs\",\"type\":\"string[]\"},{\"internalType\":\"uint256[]\",\"name\":\"nums\",\"type\":\"uint256[]\"},{\"internalType\":\"bool\",\"name\":\"flag\",\"type\":\"bool\"}],\"name\":\"receiveNonPayable\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"str\",\"type\":\"string\"},{\"internalType\":\"uint256\",\"name\":\"num\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"flag\",\"type\":\"bool\"}],\"name\":\"receivePayable\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"}]", - Bin: "0x608060405234801561001057600080fd5b5061108a806100206000396000f3fe60806040526004361061003f5760003560e01c8063357fc5a2146100445780636ed701691461006d578063e04d4f9714610084578063f05b6abf146100a0575b600080fd5b34801561005057600080fd5b5061006b6004803603810190610066919061085a565b6100c9565b005b34801561007957600080fd5b50610082610138565b005b61009e600480360381019061009991906107eb565b610171565b005b3480156100ac57600080fd5b506100c760048036038101906100c29190610733565b6101b5565b005b6100f63382858573ffffffffffffffffffffffffffffffffffffffff166101f7909392919063ffffffff16565b7f2b58128f24a9f59127cc5b5430d70542b22220f2d9adaa86e442b816ab98af603384848460405161012b9493929190610bb0565b60405180910390a1505050565b7fbcaadb46b82a48af60b608f58959ae6b8310d1b0a0d094c2e9ec3208ed39f2a0336040516101679190610b0b565b60405180910390a1565b7f1f1ff1f5fb41346850b2f5c04e6c767e2f1c8a525c5c0c5cdb60cdf3ca5f62fa33348585856040516101a8959493929190610bf5565b60405180910390a1505050565b7f74a53cd528a921fca7dbdee62f86819051d3cc98f214951f4238e8843f20b146338484846040516101ea9493929190610b5d565b60405180910390a1505050565b61027a846323b872dd60e01b85858560405160240161021893929190610b26565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050610280565b50505050565b60006102e2826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff166103479092919063ffffffff16565b9050600081511115610342578080602001905181019061030291906107be565b610341576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161033890610cb1565b60405180910390fd5b5b505050565b6060610356848460008561035f565b90509392505050565b6060824710156103a4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161039b90610c71565b60405180910390fd5b6000808673ffffffffffffffffffffffffffffffffffffffff1685876040516103cd9190610af4565b60006040518083038185875af1925050503d806000811461040a576040519150601f19603f3d011682016040523d82523d6000602084013e61040f565b606091505b50915091506104208783838761042c565b92505050949350505050565b6060831561048f5760008351141561048757610447856104a2565b610486576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161047d90610c91565b60405180910390fd5b5b82905061049a565b61049983836104c5565b5b949350505050565b6000808273ffffffffffffffffffffffffffffffffffffffff163b119050919050565b6000825111156104d85781518083602001fd5b806040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161050c9190610c4f565b60405180910390fd5b600061052861052384610cf6565b610cd1565b9050808382526020820190508285602086028201111561054b5761054a610f23565b5b60005b8581101561059957813567ffffffffffffffff81111561057157610570610f1e565b5b80860161057e89826106f0565b8552602085019450602084019350505060018101905061054e565b5050509392505050565b60006105b66105b184610d22565b610cd1565b905080838252602082019050828560208602820111156105d9576105d8610f23565b5b60005b8581101561060957816105ef888261071e565b8452602084019350602083019250506001810190506105dc565b5050509392505050565b600061062661062184610d4e565b610cd1565b90508281526020810184848401111561064257610641610f28565b5b61064d848285610e7c565b509392505050565b6000813590506106648161100f565b92915050565b600082601f83011261067f5761067e610f1e565b5b813561068f848260208601610515565b91505092915050565b600082601f8301126106ad576106ac610f1e565b5b81356106bd8482602086016105a3565b91505092915050565b6000813590506106d581611026565b92915050565b6000815190506106ea81611026565b92915050565b600082601f83011261070557610704610f1e565b5b8135610715848260208601610613565b91505092915050565b60008135905061072d8161103d565b92915050565b60008060006060848603121561074c5761074b610f32565b5b600084013567ffffffffffffffff81111561076a57610769610f2d565b5b6107768682870161066a565b935050602084013567ffffffffffffffff81111561079757610796610f2d565b5b6107a386828701610698565b92505060406107b4868287016106c6565b9150509250925092565b6000602082840312156107d4576107d3610f32565b5b60006107e2848285016106db565b91505092915050565b60008060006060848603121561080457610803610f32565b5b600084013567ffffffffffffffff81111561082257610821610f2d565b5b61082e868287016106f0565b935050602061083f8682870161071e565b9250506040610850868287016106c6565b9150509250925092565b60008060006060848603121561087357610872610f32565b5b60006108818682870161071e565b935050602061089286828701610655565b92505060406108a386828701610655565b9150509250925092565b60006108b983836109fb565b905092915050565b60006108cd8383610ad6565b60208301905092915050565b6108e281610e34565b82525050565b60006108f382610d9f565b6108fd8185610de5565b93508360208202850161090f85610d7f565b8060005b8581101561094b578484038952815161092c85826108ad565b945061093783610dcb565b925060208a01995050600181019050610913565b50829750879550505050505092915050565b600061096882610daa565b6109728185610df6565b935061097d83610d8f565b8060005b838110156109ae57815161099588826108c1565b97506109a083610dd8565b925050600181019050610981565b5085935050505092915050565b6109c481610e46565b82525050565b60006109d582610db5565b6109df8185610e07565b93506109ef818560208601610e8b565b80840191505092915050565b6000610a0682610dc0565b610a108185610e12565b9350610a20818560208601610e8b565b610a2981610f37565b840191505092915050565b6000610a3f82610dc0565b610a498185610e23565b9350610a59818560208601610e8b565b610a6281610f37565b840191505092915050565b6000610a7a602683610e23565b9150610a8582610f48565b604082019050919050565b6000610a9d601d83610e23565b9150610aa882610f97565b602082019050919050565b6000610ac0602a83610e23565b9150610acb82610fc0565b604082019050919050565b610adf81610e72565b82525050565b610aee81610e72565b82525050565b6000610b0082846109ca565b915081905092915050565b6000602082019050610b2060008301846108d9565b92915050565b6000606082019050610b3b60008301866108d9565b610b4860208301856108d9565b610b556040830184610ae5565b949350505050565b6000608082019050610b7260008301876108d9565b8181036020830152610b8481866108e8565b90508181036040830152610b98818561095d565b9050610ba760608301846109bb565b95945050505050565b6000608082019050610bc560008301876108d9565b610bd26020830186610ae5565b610bdf60408301856108d9565b610bec60608301846108d9565b95945050505050565b600060a082019050610c0a60008301886108d9565b610c176020830187610ae5565b8181036040830152610c298186610a34565b9050610c386060830185610ae5565b610c4560808301846109bb565b9695505050505050565b60006020820190508181036000830152610c698184610a34565b905092915050565b60006020820190508181036000830152610c8a81610a6d565b9050919050565b60006020820190508181036000830152610caa81610a90565b9050919050565b60006020820190508181036000830152610cca81610ab3565b9050919050565b6000610cdb610cec565b9050610ce78282610ebe565b919050565b6000604051905090565b600067ffffffffffffffff821115610d1157610d10610eef565b5b602082029050602081019050919050565b600067ffffffffffffffff821115610d3d57610d3c610eef565b5b602082029050602081019050919050565b600067ffffffffffffffff821115610d6957610d68610eef565b5b610d7282610f37565b9050602081019050919050565b6000819050602082019050919050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b600081905092915050565b600082825260208201905092915050565b600082825260208201905092915050565b6000610e3f82610e52565b9050919050565b60008115159050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b82818337600083830152505050565b60005b83811015610ea9578082015181840152602081019050610e8e565b83811115610eb8576000848401525b50505050565b610ec782610f37565b810181811067ffffffffffffffff82111715610ee657610ee5610eef565b5b80604052505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f416464726573733a20696e73756666696369656e742062616c616e636520666f60008201527f722063616c6c0000000000000000000000000000000000000000000000000000602082015250565b7f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000600082015250565b7f5361666545524332303a204552433230206f7065726174696f6e20646964206e60008201527f6f74207375636365656400000000000000000000000000000000000000000000602082015250565b61101881610e34565b811461102357600080fd5b50565b61102f81610e46565b811461103a57600080fd5b50565b61104681610e72565b811461105157600080fd5b5056fea264697066735822122069722b36f6aa512f9b0f76207f5b5cbc4a4f69e9581bf19d4c36cde9ee1c6c3e64736f6c63430008070033", + Bin: "0x608060405234801561001057600080fd5b5061108a806100206000396000f3fe60806040526004361061003f5760003560e01c8063357fc5a2146100445780636ed701691461006d578063e04d4f9714610084578063f05b6abf146100a0575b600080fd5b34801561005057600080fd5b5061006b6004803603810190610066919061085a565b6100c9565b005b34801561007957600080fd5b50610082610138565b005b61009e600480360381019061009991906107eb565b610171565b005b3480156100ac57600080fd5b506100c760048036038101906100c29190610733565b6101b5565b005b6100f63382858573ffffffffffffffffffffffffffffffffffffffff166101f7909392919063ffffffff16565b7f2b58128f24a9f59127cc5b5430d70542b22220f2d9adaa86e442b816ab98af603384848460405161012b9493929190610bb0565b60405180910390a1505050565b7fbcaadb46b82a48af60b608f58959ae6b8310d1b0a0d094c2e9ec3208ed39f2a0336040516101679190610b0b565b60405180910390a1565b7f1f1ff1f5fb41346850b2f5c04e6c767e2f1c8a525c5c0c5cdb60cdf3ca5f62fa33348585856040516101a8959493929190610bf5565b60405180910390a1505050565b7f74a53cd528a921fca7dbdee62f86819051d3cc98f214951f4238e8843f20b146338484846040516101ea9493929190610b5d565b60405180910390a1505050565b61027a846323b872dd60e01b85858560405160240161021893929190610b26565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050610280565b50505050565b60006102e2826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff166103479092919063ffffffff16565b9050600081511115610342578080602001905181019061030291906107be565b610341576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161033890610cb1565b60405180910390fd5b5b505050565b6060610356848460008561035f565b90509392505050565b6060824710156103a4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161039b90610c71565b60405180910390fd5b6000808673ffffffffffffffffffffffffffffffffffffffff1685876040516103cd9190610af4565b60006040518083038185875af1925050503d806000811461040a576040519150601f19603f3d011682016040523d82523d6000602084013e61040f565b606091505b50915091506104208783838761042c565b92505050949350505050565b6060831561048f5760008351141561048757610447856104a2565b610486576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161047d90610c91565b60405180910390fd5b5b82905061049a565b61049983836104c5565b5b949350505050565b6000808273ffffffffffffffffffffffffffffffffffffffff163b119050919050565b6000825111156104d85781518083602001fd5b806040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161050c9190610c4f565b60405180910390fd5b600061052861052384610cf6565b610cd1565b9050808382526020820190508285602086028201111561054b5761054a610f23565b5b60005b8581101561059957813567ffffffffffffffff81111561057157610570610f1e565b5b80860161057e89826106f0565b8552602085019450602084019350505060018101905061054e565b5050509392505050565b60006105b66105b184610d22565b610cd1565b905080838252602082019050828560208602820111156105d9576105d8610f23565b5b60005b8581101561060957816105ef888261071e565b8452602084019350602083019250506001810190506105dc565b5050509392505050565b600061062661062184610d4e565b610cd1565b90508281526020810184848401111561064257610641610f28565b5b61064d848285610e7c565b509392505050565b6000813590506106648161100f565b92915050565b600082601f83011261067f5761067e610f1e565b5b813561068f848260208601610515565b91505092915050565b600082601f8301126106ad576106ac610f1e565b5b81356106bd8482602086016105a3565b91505092915050565b6000813590506106d581611026565b92915050565b6000815190506106ea81611026565b92915050565b600082601f83011261070557610704610f1e565b5b8135610715848260208601610613565b91505092915050565b60008135905061072d8161103d565b92915050565b60008060006060848603121561074c5761074b610f32565b5b600084013567ffffffffffffffff81111561076a57610769610f2d565b5b6107768682870161066a565b935050602084013567ffffffffffffffff81111561079757610796610f2d565b5b6107a386828701610698565b92505060406107b4868287016106c6565b9150509250925092565b6000602082840312156107d4576107d3610f32565b5b60006107e2848285016106db565b91505092915050565b60008060006060848603121561080457610803610f32565b5b600084013567ffffffffffffffff81111561082257610821610f2d565b5b61082e868287016106f0565b935050602061083f8682870161071e565b9250506040610850868287016106c6565b9150509250925092565b60008060006060848603121561087357610872610f32565b5b60006108818682870161071e565b935050602061089286828701610655565b92505060406108a386828701610655565b9150509250925092565b60006108b983836109fb565b905092915050565b60006108cd8383610ad6565b60208301905092915050565b6108e281610e34565b82525050565b60006108f382610d9f565b6108fd8185610de5565b93508360208202850161090f85610d7f565b8060005b8581101561094b578484038952815161092c85826108ad565b945061093783610dcb565b925060208a01995050600181019050610913565b50829750879550505050505092915050565b600061096882610daa565b6109728185610df6565b935061097d83610d8f565b8060005b838110156109ae57815161099588826108c1565b97506109a083610dd8565b925050600181019050610981565b5085935050505092915050565b6109c481610e46565b82525050565b60006109d582610db5565b6109df8185610e07565b93506109ef818560208601610e8b565b80840191505092915050565b6000610a0682610dc0565b610a108185610e12565b9350610a20818560208601610e8b565b610a2981610f37565b840191505092915050565b6000610a3f82610dc0565b610a498185610e23565b9350610a59818560208601610e8b565b610a6281610f37565b840191505092915050565b6000610a7a602683610e23565b9150610a8582610f48565b604082019050919050565b6000610a9d601d83610e23565b9150610aa882610f97565b602082019050919050565b6000610ac0602a83610e23565b9150610acb82610fc0565b604082019050919050565b610adf81610e72565b82525050565b610aee81610e72565b82525050565b6000610b0082846109ca565b915081905092915050565b6000602082019050610b2060008301846108d9565b92915050565b6000606082019050610b3b60008301866108d9565b610b4860208301856108d9565b610b556040830184610ae5565b949350505050565b6000608082019050610b7260008301876108d9565b8181036020830152610b8481866108e8565b90508181036040830152610b98818561095d565b9050610ba760608301846109bb565b95945050505050565b6000608082019050610bc560008301876108d9565b610bd26020830186610ae5565b610bdf60408301856108d9565b610bec60608301846108d9565b95945050505050565b600060a082019050610c0a60008301886108d9565b610c176020830187610ae5565b8181036040830152610c298186610a34565b9050610c386060830185610ae5565b610c4560808301846109bb565b9695505050505050565b60006020820190508181036000830152610c698184610a34565b905092915050565b60006020820190508181036000830152610c8a81610a6d565b9050919050565b60006020820190508181036000830152610caa81610a90565b9050919050565b60006020820190508181036000830152610cca81610ab3565b9050919050565b6000610cdb610cec565b9050610ce78282610ebe565b919050565b6000604051905090565b600067ffffffffffffffff821115610d1157610d10610eef565b5b602082029050602081019050919050565b600067ffffffffffffffff821115610d3d57610d3c610eef565b5b602082029050602081019050919050565b600067ffffffffffffffff821115610d6957610d68610eef565b5b610d7282610f37565b9050602081019050919050565b6000819050602082019050919050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b600081905092915050565b600082825260208201905092915050565b600082825260208201905092915050565b6000610e3f82610e52565b9050919050565b60008115159050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b82818337600083830152505050565b60005b83811015610ea9578082015181840152602081019050610e8e565b83811115610eb8576000848401525b50505050565b610ec782610f37565b810181811067ffffffffffffffff82111715610ee657610ee5610eef565b5b80604052505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f416464726573733a20696e73756666696369656e742062616c616e636520666f60008201527f722063616c6c0000000000000000000000000000000000000000000000000000602082015250565b7f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000600082015250565b7f5361666545524332303a204552433230206f7065726174696f6e20646964206e60008201527f6f74207375636365656400000000000000000000000000000000000000000000602082015250565b61101881610e34565b811461102357600080fd5b50565b61102f81610e46565b811461103a57600080fd5b50565b61104681610e72565b811461105157600080fd5b5056fea2646970667358221220086a1c9f56ed96506c7198d50cf431a5b03003c16cd4168d2395cdedfc1ac06164736f6c63430008070033", } -// ReceiverABI is the input ABI used to generate the binding from. -// Deprecated: Use ReceiverMetaData.ABI instead. -var ReceiverABI = ReceiverMetaData.ABI +// ReceiverEVMABI is the input ABI used to generate the binding from. +// Deprecated: Use ReceiverEVMMetaData.ABI instead. +var ReceiverEVMABI = ReceiverEVMMetaData.ABI -// ReceiverBin is the compiled bytecode used for deploying new contracts. -// Deprecated: Use ReceiverMetaData.Bin instead. -var ReceiverBin = ReceiverMetaData.Bin +// ReceiverEVMBin is the compiled bytecode used for deploying new contracts. +// Deprecated: Use ReceiverEVMMetaData.Bin instead. +var ReceiverEVMBin = ReceiverEVMMetaData.Bin -// DeployReceiver deploys a new Ethereum contract, binding an instance of Receiver to it. -func DeployReceiver(auth *bind.TransactOpts, backend bind.ContractBackend) (common.Address, *types.Transaction, *Receiver, error) { - parsed, err := ReceiverMetaData.GetAbi() +// DeployReceiverEVM deploys a new Ethereum contract, binding an instance of ReceiverEVM to it. +func DeployReceiverEVM(auth *bind.TransactOpts, backend bind.ContractBackend) (common.Address, *types.Transaction, *ReceiverEVM, error) { + parsed, err := ReceiverEVMMetaData.GetAbi() if err != nil { return common.Address{}, nil, nil, err } @@ -53,111 +53,111 @@ func DeployReceiver(auth *bind.TransactOpts, backend bind.ContractBackend) (comm return common.Address{}, nil, nil, errors.New("GetABI returned nil") } - address, tx, contract, err := bind.DeployContract(auth, *parsed, common.FromHex(ReceiverBin), backend) + address, tx, contract, err := bind.DeployContract(auth, *parsed, common.FromHex(ReceiverEVMBin), backend) if err != nil { return common.Address{}, nil, nil, err } - return address, tx, &Receiver{ReceiverCaller: ReceiverCaller{contract: contract}, ReceiverTransactor: ReceiverTransactor{contract: contract}, ReceiverFilterer: ReceiverFilterer{contract: contract}}, nil + return address, tx, &ReceiverEVM{ReceiverEVMCaller: ReceiverEVMCaller{contract: contract}, ReceiverEVMTransactor: ReceiverEVMTransactor{contract: contract}, ReceiverEVMFilterer: ReceiverEVMFilterer{contract: contract}}, nil } -// Receiver is an auto generated Go binding around an Ethereum contract. -type Receiver struct { - ReceiverCaller // Read-only binding to the contract - ReceiverTransactor // Write-only binding to the contract - ReceiverFilterer // Log filterer for contract events +// ReceiverEVM is an auto generated Go binding around an Ethereum contract. +type ReceiverEVM struct { + ReceiverEVMCaller // Read-only binding to the contract + ReceiverEVMTransactor // Write-only binding to the contract + ReceiverEVMFilterer // Log filterer for contract events } -// ReceiverCaller is an auto generated read-only Go binding around an Ethereum contract. -type ReceiverCaller struct { +// ReceiverEVMCaller is an auto generated read-only Go binding around an Ethereum contract. +type ReceiverEVMCaller struct { contract *bind.BoundContract // Generic contract wrapper for the low level calls } -// ReceiverTransactor is an auto generated write-only Go binding around an Ethereum contract. -type ReceiverTransactor struct { +// ReceiverEVMTransactor is an auto generated write-only Go binding around an Ethereum contract. +type ReceiverEVMTransactor struct { contract *bind.BoundContract // Generic contract wrapper for the low level calls } -// ReceiverFilterer is an auto generated log filtering Go binding around an Ethereum contract events. -type ReceiverFilterer struct { +// ReceiverEVMFilterer is an auto generated log filtering Go binding around an Ethereum contract events. +type ReceiverEVMFilterer struct { contract *bind.BoundContract // Generic contract wrapper for the low level calls } -// ReceiverSession is an auto generated Go binding around an Ethereum contract, +// ReceiverEVMSession is an auto generated Go binding around an Ethereum contract, // with pre-set call and transact options. -type ReceiverSession struct { - Contract *Receiver // Generic contract binding to set the session for +type ReceiverEVMSession struct { + Contract *ReceiverEVM // Generic contract binding to set the session for CallOpts bind.CallOpts // Call options to use throughout this session TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session } -// ReceiverCallerSession is an auto generated read-only Go binding around an Ethereum contract, +// ReceiverEVMCallerSession is an auto generated read-only Go binding around an Ethereum contract, // with pre-set call options. -type ReceiverCallerSession struct { - Contract *ReceiverCaller // Generic contract caller binding to set the session for - CallOpts bind.CallOpts // Call options to use throughout this session +type ReceiverEVMCallerSession struct { + Contract *ReceiverEVMCaller // Generic contract caller binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session } -// ReceiverTransactorSession is an auto generated write-only Go binding around an Ethereum contract, +// ReceiverEVMTransactorSession is an auto generated write-only Go binding around an Ethereum contract, // with pre-set transact options. -type ReceiverTransactorSession struct { - Contract *ReceiverTransactor // Generic contract transactor binding to set the session for - TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +type ReceiverEVMTransactorSession struct { + Contract *ReceiverEVMTransactor // Generic contract transactor binding to set the session for + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session } -// ReceiverRaw is an auto generated low-level Go binding around an Ethereum contract. -type ReceiverRaw struct { - Contract *Receiver // Generic contract binding to access the raw methods on +// ReceiverEVMRaw is an auto generated low-level Go binding around an Ethereum contract. +type ReceiverEVMRaw struct { + Contract *ReceiverEVM // Generic contract binding to access the raw methods on } -// ReceiverCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. -type ReceiverCallerRaw struct { - Contract *ReceiverCaller // Generic read-only contract binding to access the raw methods on +// ReceiverEVMCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. +type ReceiverEVMCallerRaw struct { + Contract *ReceiverEVMCaller // Generic read-only contract binding to access the raw methods on } -// ReceiverTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. -type ReceiverTransactorRaw struct { - Contract *ReceiverTransactor // Generic write-only contract binding to access the raw methods on +// ReceiverEVMTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. +type ReceiverEVMTransactorRaw struct { + Contract *ReceiverEVMTransactor // Generic write-only contract binding to access the raw methods on } -// NewReceiver creates a new instance of Receiver, bound to a specific deployed contract. -func NewReceiver(address common.Address, backend bind.ContractBackend) (*Receiver, error) { - contract, err := bindReceiver(address, backend, backend, backend) +// NewReceiverEVM creates a new instance of ReceiverEVM, bound to a specific deployed contract. +func NewReceiverEVM(address common.Address, backend bind.ContractBackend) (*ReceiverEVM, error) { + contract, err := bindReceiverEVM(address, backend, backend, backend) if err != nil { return nil, err } - return &Receiver{ReceiverCaller: ReceiverCaller{contract: contract}, ReceiverTransactor: ReceiverTransactor{contract: contract}, ReceiverFilterer: ReceiverFilterer{contract: contract}}, nil + return &ReceiverEVM{ReceiverEVMCaller: ReceiverEVMCaller{contract: contract}, ReceiverEVMTransactor: ReceiverEVMTransactor{contract: contract}, ReceiverEVMFilterer: ReceiverEVMFilterer{contract: contract}}, nil } -// NewReceiverCaller creates a new read-only instance of Receiver, bound to a specific deployed contract. -func NewReceiverCaller(address common.Address, caller bind.ContractCaller) (*ReceiverCaller, error) { - contract, err := bindReceiver(address, caller, nil, nil) +// NewReceiverEVMCaller creates a new read-only instance of ReceiverEVM, bound to a specific deployed contract. +func NewReceiverEVMCaller(address common.Address, caller bind.ContractCaller) (*ReceiverEVMCaller, error) { + contract, err := bindReceiverEVM(address, caller, nil, nil) if err != nil { return nil, err } - return &ReceiverCaller{contract: contract}, nil + return &ReceiverEVMCaller{contract: contract}, nil } -// NewReceiverTransactor creates a new write-only instance of Receiver, bound to a specific deployed contract. -func NewReceiverTransactor(address common.Address, transactor bind.ContractTransactor) (*ReceiverTransactor, error) { - contract, err := bindReceiver(address, nil, transactor, nil) +// NewReceiverEVMTransactor creates a new write-only instance of ReceiverEVM, bound to a specific deployed contract. +func NewReceiverEVMTransactor(address common.Address, transactor bind.ContractTransactor) (*ReceiverEVMTransactor, error) { + contract, err := bindReceiverEVM(address, nil, transactor, nil) if err != nil { return nil, err } - return &ReceiverTransactor{contract: contract}, nil + return &ReceiverEVMTransactor{contract: contract}, nil } -// NewReceiverFilterer creates a new log filterer instance of Receiver, bound to a specific deployed contract. -func NewReceiverFilterer(address common.Address, filterer bind.ContractFilterer) (*ReceiverFilterer, error) { - contract, err := bindReceiver(address, nil, nil, filterer) +// NewReceiverEVMFilterer creates a new log filterer instance of ReceiverEVM, bound to a specific deployed contract. +func NewReceiverEVMFilterer(address common.Address, filterer bind.ContractFilterer) (*ReceiverEVMFilterer, error) { + contract, err := bindReceiverEVM(address, nil, nil, filterer) if err != nil { return nil, err } - return &ReceiverFilterer{contract: contract}, nil + return &ReceiverEVMFilterer{contract: contract}, nil } -// bindReceiver binds a generic wrapper to an already deployed contract. -func bindReceiver(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { - parsed, err := ReceiverMetaData.GetAbi() +// bindReceiverEVM binds a generic wrapper to an already deployed contract. +func bindReceiverEVM(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := ReceiverEVMMetaData.GetAbi() if err != nil { return nil, err } @@ -168,127 +168,127 @@ func bindReceiver(address common.Address, caller bind.ContractCaller, transactor // sets the output to result. The result type might be a single field for simple // returns, a slice of interfaces for anonymous returns and a struct for named // returns. -func (_Receiver *ReceiverRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { - return _Receiver.Contract.ReceiverCaller.contract.Call(opts, result, method, params...) +func (_ReceiverEVM *ReceiverEVMRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _ReceiverEVM.Contract.ReceiverEVMCaller.contract.Call(opts, result, method, params...) } // Transfer initiates a plain transaction to move funds to the contract, calling // its default method if one is available. -func (_Receiver *ReceiverRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _Receiver.Contract.ReceiverTransactor.contract.Transfer(opts) +func (_ReceiverEVM *ReceiverEVMRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _ReceiverEVM.Contract.ReceiverEVMTransactor.contract.Transfer(opts) } // Transact invokes the (paid) contract method with params as input values. -func (_Receiver *ReceiverRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _Receiver.Contract.ReceiverTransactor.contract.Transact(opts, method, params...) +func (_ReceiverEVM *ReceiverEVMRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _ReceiverEVM.Contract.ReceiverEVMTransactor.contract.Transact(opts, method, params...) } // Call invokes the (constant) contract method with params as input values and // sets the output to result. The result type might be a single field for simple // returns, a slice of interfaces for anonymous returns and a struct for named // returns. -func (_Receiver *ReceiverCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { - return _Receiver.Contract.contract.Call(opts, result, method, params...) +func (_ReceiverEVM *ReceiverEVMCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _ReceiverEVM.Contract.contract.Call(opts, result, method, params...) } // Transfer initiates a plain transaction to move funds to the contract, calling // its default method if one is available. -func (_Receiver *ReceiverTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _Receiver.Contract.contract.Transfer(opts) +func (_ReceiverEVM *ReceiverEVMTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _ReceiverEVM.Contract.contract.Transfer(opts) } // Transact invokes the (paid) contract method with params as input values. -func (_Receiver *ReceiverTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _Receiver.Contract.contract.Transact(opts, method, params...) +func (_ReceiverEVM *ReceiverEVMTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _ReceiverEVM.Contract.contract.Transact(opts, method, params...) } // ReceiveERC20 is a paid mutator transaction binding the contract method 0x357fc5a2. // // Solidity: function receiveERC20(uint256 amount, address token, address destination) returns() -func (_Receiver *ReceiverTransactor) ReceiveERC20(opts *bind.TransactOpts, amount *big.Int, token common.Address, destination common.Address) (*types.Transaction, error) { - return _Receiver.contract.Transact(opts, "receiveERC20", amount, token, destination) +func (_ReceiverEVM *ReceiverEVMTransactor) ReceiveERC20(opts *bind.TransactOpts, amount *big.Int, token common.Address, destination common.Address) (*types.Transaction, error) { + return _ReceiverEVM.contract.Transact(opts, "receiveERC20", amount, token, destination) } // ReceiveERC20 is a paid mutator transaction binding the contract method 0x357fc5a2. // // Solidity: function receiveERC20(uint256 amount, address token, address destination) returns() -func (_Receiver *ReceiverSession) ReceiveERC20(amount *big.Int, token common.Address, destination common.Address) (*types.Transaction, error) { - return _Receiver.Contract.ReceiveERC20(&_Receiver.TransactOpts, amount, token, destination) +func (_ReceiverEVM *ReceiverEVMSession) ReceiveERC20(amount *big.Int, token common.Address, destination common.Address) (*types.Transaction, error) { + return _ReceiverEVM.Contract.ReceiveERC20(&_ReceiverEVM.TransactOpts, amount, token, destination) } // ReceiveERC20 is a paid mutator transaction binding the contract method 0x357fc5a2. // // Solidity: function receiveERC20(uint256 amount, address token, address destination) returns() -func (_Receiver *ReceiverTransactorSession) ReceiveERC20(amount *big.Int, token common.Address, destination common.Address) (*types.Transaction, error) { - return _Receiver.Contract.ReceiveERC20(&_Receiver.TransactOpts, amount, token, destination) +func (_ReceiverEVM *ReceiverEVMTransactorSession) ReceiveERC20(amount *big.Int, token common.Address, destination common.Address) (*types.Transaction, error) { + return _ReceiverEVM.Contract.ReceiveERC20(&_ReceiverEVM.TransactOpts, amount, token, destination) } // ReceiveNoParams is a paid mutator transaction binding the contract method 0x6ed70169. // // Solidity: function receiveNoParams() returns() -func (_Receiver *ReceiverTransactor) ReceiveNoParams(opts *bind.TransactOpts) (*types.Transaction, error) { - return _Receiver.contract.Transact(opts, "receiveNoParams") +func (_ReceiverEVM *ReceiverEVMTransactor) ReceiveNoParams(opts *bind.TransactOpts) (*types.Transaction, error) { + return _ReceiverEVM.contract.Transact(opts, "receiveNoParams") } // ReceiveNoParams is a paid mutator transaction binding the contract method 0x6ed70169. // // Solidity: function receiveNoParams() returns() -func (_Receiver *ReceiverSession) ReceiveNoParams() (*types.Transaction, error) { - return _Receiver.Contract.ReceiveNoParams(&_Receiver.TransactOpts) +func (_ReceiverEVM *ReceiverEVMSession) ReceiveNoParams() (*types.Transaction, error) { + return _ReceiverEVM.Contract.ReceiveNoParams(&_ReceiverEVM.TransactOpts) } // ReceiveNoParams is a paid mutator transaction binding the contract method 0x6ed70169. // // Solidity: function receiveNoParams() returns() -func (_Receiver *ReceiverTransactorSession) ReceiveNoParams() (*types.Transaction, error) { - return _Receiver.Contract.ReceiveNoParams(&_Receiver.TransactOpts) +func (_ReceiverEVM *ReceiverEVMTransactorSession) ReceiveNoParams() (*types.Transaction, error) { + return _ReceiverEVM.Contract.ReceiveNoParams(&_ReceiverEVM.TransactOpts) } // ReceiveNonPayable is a paid mutator transaction binding the contract method 0xf05b6abf. // // Solidity: function receiveNonPayable(string[] strs, uint256[] nums, bool flag) returns() -func (_Receiver *ReceiverTransactor) ReceiveNonPayable(opts *bind.TransactOpts, strs []string, nums []*big.Int, flag bool) (*types.Transaction, error) { - return _Receiver.contract.Transact(opts, "receiveNonPayable", strs, nums, flag) +func (_ReceiverEVM *ReceiverEVMTransactor) ReceiveNonPayable(opts *bind.TransactOpts, strs []string, nums []*big.Int, flag bool) (*types.Transaction, error) { + return _ReceiverEVM.contract.Transact(opts, "receiveNonPayable", strs, nums, flag) } // ReceiveNonPayable is a paid mutator transaction binding the contract method 0xf05b6abf. // // Solidity: function receiveNonPayable(string[] strs, uint256[] nums, bool flag) returns() -func (_Receiver *ReceiverSession) ReceiveNonPayable(strs []string, nums []*big.Int, flag bool) (*types.Transaction, error) { - return _Receiver.Contract.ReceiveNonPayable(&_Receiver.TransactOpts, strs, nums, flag) +func (_ReceiverEVM *ReceiverEVMSession) ReceiveNonPayable(strs []string, nums []*big.Int, flag bool) (*types.Transaction, error) { + return _ReceiverEVM.Contract.ReceiveNonPayable(&_ReceiverEVM.TransactOpts, strs, nums, flag) } // ReceiveNonPayable is a paid mutator transaction binding the contract method 0xf05b6abf. // // Solidity: function receiveNonPayable(string[] strs, uint256[] nums, bool flag) returns() -func (_Receiver *ReceiverTransactorSession) ReceiveNonPayable(strs []string, nums []*big.Int, flag bool) (*types.Transaction, error) { - return _Receiver.Contract.ReceiveNonPayable(&_Receiver.TransactOpts, strs, nums, flag) +func (_ReceiverEVM *ReceiverEVMTransactorSession) ReceiveNonPayable(strs []string, nums []*big.Int, flag bool) (*types.Transaction, error) { + return _ReceiverEVM.Contract.ReceiveNonPayable(&_ReceiverEVM.TransactOpts, strs, nums, flag) } // ReceivePayable is a paid mutator transaction binding the contract method 0xe04d4f97. // // Solidity: function receivePayable(string str, uint256 num, bool flag) payable returns() -func (_Receiver *ReceiverTransactor) ReceivePayable(opts *bind.TransactOpts, str string, num *big.Int, flag bool) (*types.Transaction, error) { - return _Receiver.contract.Transact(opts, "receivePayable", str, num, flag) +func (_ReceiverEVM *ReceiverEVMTransactor) ReceivePayable(opts *bind.TransactOpts, str string, num *big.Int, flag bool) (*types.Transaction, error) { + return _ReceiverEVM.contract.Transact(opts, "receivePayable", str, num, flag) } // ReceivePayable is a paid mutator transaction binding the contract method 0xe04d4f97. // // Solidity: function receivePayable(string str, uint256 num, bool flag) payable returns() -func (_Receiver *ReceiverSession) ReceivePayable(str string, num *big.Int, flag bool) (*types.Transaction, error) { - return _Receiver.Contract.ReceivePayable(&_Receiver.TransactOpts, str, num, flag) +func (_ReceiverEVM *ReceiverEVMSession) ReceivePayable(str string, num *big.Int, flag bool) (*types.Transaction, error) { + return _ReceiverEVM.Contract.ReceivePayable(&_ReceiverEVM.TransactOpts, str, num, flag) } // ReceivePayable is a paid mutator transaction binding the contract method 0xe04d4f97. // // Solidity: function receivePayable(string str, uint256 num, bool flag) payable returns() -func (_Receiver *ReceiverTransactorSession) ReceivePayable(str string, num *big.Int, flag bool) (*types.Transaction, error) { - return _Receiver.Contract.ReceivePayable(&_Receiver.TransactOpts, str, num, flag) +func (_ReceiverEVM *ReceiverEVMTransactorSession) ReceivePayable(str string, num *big.Int, flag bool) (*types.Transaction, error) { + return _ReceiverEVM.Contract.ReceivePayable(&_ReceiverEVM.TransactOpts, str, num, flag) } -// ReceiverReceivedERC20Iterator is returned from FilterReceivedERC20 and is used to iterate over the raw logs and unpacked data for ReceivedERC20 events raised by the Receiver contract. -type ReceiverReceivedERC20Iterator struct { - Event *ReceiverReceivedERC20 // Event containing the contract specifics and raw log +// ReceiverEVMReceivedERC20Iterator is returned from FilterReceivedERC20 and is used to iterate over the raw logs and unpacked data for ReceivedERC20 events raised by the ReceiverEVM contract. +type ReceiverEVMReceivedERC20Iterator struct { + Event *ReceiverEVMReceivedERC20 // Event containing the contract specifics and raw log contract *bind.BoundContract // Generic contract to use for unpacking event data event string // Event name to use for unpacking event data @@ -302,7 +302,7 @@ type ReceiverReceivedERC20Iterator struct { // Next advances the iterator to the subsequent event, returning whether there // are any more events found. In case of a retrieval or parsing error, false is // returned and Error() can be queried for the exact failure. -func (it *ReceiverReceivedERC20Iterator) Next() bool { +func (it *ReceiverEVMReceivedERC20Iterator) Next() bool { // If the iterator failed, stop iterating if it.fail != nil { return false @@ -311,7 +311,7 @@ func (it *ReceiverReceivedERC20Iterator) Next() bool { if it.done { select { case log := <-it.logs: - it.Event = new(ReceiverReceivedERC20) + it.Event = new(ReceiverEVMReceivedERC20) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -326,7 +326,7 @@ func (it *ReceiverReceivedERC20Iterator) Next() bool { // Iterator still in progress, wait for either a data or an error event select { case log := <-it.logs: - it.Event = new(ReceiverReceivedERC20) + it.Event = new(ReceiverEVMReceivedERC20) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -342,19 +342,19 @@ func (it *ReceiverReceivedERC20Iterator) Next() bool { } // Error returns any retrieval or parsing error occurred during filtering. -func (it *ReceiverReceivedERC20Iterator) Error() error { +func (it *ReceiverEVMReceivedERC20Iterator) Error() error { return it.fail } // Close terminates the iteration process, releasing any pending underlying // resources. -func (it *ReceiverReceivedERC20Iterator) Close() error { +func (it *ReceiverEVMReceivedERC20Iterator) Close() error { it.sub.Unsubscribe() return nil } -// ReceiverReceivedERC20 represents a ReceivedERC20 event raised by the Receiver contract. -type ReceiverReceivedERC20 struct { +// ReceiverEVMReceivedERC20 represents a ReceivedERC20 event raised by the ReceiverEVM contract. +type ReceiverEVMReceivedERC20 struct { Sender common.Address Amount *big.Int Token common.Address @@ -365,21 +365,21 @@ type ReceiverReceivedERC20 struct { // FilterReceivedERC20 is a free log retrieval operation binding the contract event 0x2b58128f24a9f59127cc5b5430d70542b22220f2d9adaa86e442b816ab98af60. // // Solidity: event ReceivedERC20(address sender, uint256 amount, address token, address destination) -func (_Receiver *ReceiverFilterer) FilterReceivedERC20(opts *bind.FilterOpts) (*ReceiverReceivedERC20Iterator, error) { +func (_ReceiverEVM *ReceiverEVMFilterer) FilterReceivedERC20(opts *bind.FilterOpts) (*ReceiverEVMReceivedERC20Iterator, error) { - logs, sub, err := _Receiver.contract.FilterLogs(opts, "ReceivedERC20") + logs, sub, err := _ReceiverEVM.contract.FilterLogs(opts, "ReceivedERC20") if err != nil { return nil, err } - return &ReceiverReceivedERC20Iterator{contract: _Receiver.contract, event: "ReceivedERC20", logs: logs, sub: sub}, nil + return &ReceiverEVMReceivedERC20Iterator{contract: _ReceiverEVM.contract, event: "ReceivedERC20", logs: logs, sub: sub}, nil } // WatchReceivedERC20 is a free log subscription operation binding the contract event 0x2b58128f24a9f59127cc5b5430d70542b22220f2d9adaa86e442b816ab98af60. // // Solidity: event ReceivedERC20(address sender, uint256 amount, address token, address destination) -func (_Receiver *ReceiverFilterer) WatchReceivedERC20(opts *bind.WatchOpts, sink chan<- *ReceiverReceivedERC20) (event.Subscription, error) { +func (_ReceiverEVM *ReceiverEVMFilterer) WatchReceivedERC20(opts *bind.WatchOpts, sink chan<- *ReceiverEVMReceivedERC20) (event.Subscription, error) { - logs, sub, err := _Receiver.contract.WatchLogs(opts, "ReceivedERC20") + logs, sub, err := _ReceiverEVM.contract.WatchLogs(opts, "ReceivedERC20") if err != nil { return nil, err } @@ -389,8 +389,8 @@ func (_Receiver *ReceiverFilterer) WatchReceivedERC20(opts *bind.WatchOpts, sink select { case log := <-logs: // New log arrived, parse the event and forward to the user - event := new(ReceiverReceivedERC20) - if err := _Receiver.contract.UnpackLog(event, "ReceivedERC20", log); err != nil { + event := new(ReceiverEVMReceivedERC20) + if err := _ReceiverEVM.contract.UnpackLog(event, "ReceivedERC20", log); err != nil { return err } event.Raw = log @@ -414,18 +414,18 @@ func (_Receiver *ReceiverFilterer) WatchReceivedERC20(opts *bind.WatchOpts, sink // ParseReceivedERC20 is a log parse operation binding the contract event 0x2b58128f24a9f59127cc5b5430d70542b22220f2d9adaa86e442b816ab98af60. // // Solidity: event ReceivedERC20(address sender, uint256 amount, address token, address destination) -func (_Receiver *ReceiverFilterer) ParseReceivedERC20(log types.Log) (*ReceiverReceivedERC20, error) { - event := new(ReceiverReceivedERC20) - if err := _Receiver.contract.UnpackLog(event, "ReceivedERC20", log); err != nil { +func (_ReceiverEVM *ReceiverEVMFilterer) ParseReceivedERC20(log types.Log) (*ReceiverEVMReceivedERC20, error) { + event := new(ReceiverEVMReceivedERC20) + if err := _ReceiverEVM.contract.UnpackLog(event, "ReceivedERC20", log); err != nil { return nil, err } event.Raw = log return event, nil } -// ReceiverReceivedNoParamsIterator is returned from FilterReceivedNoParams and is used to iterate over the raw logs and unpacked data for ReceivedNoParams events raised by the Receiver contract. -type ReceiverReceivedNoParamsIterator struct { - Event *ReceiverReceivedNoParams // Event containing the contract specifics and raw log +// ReceiverEVMReceivedNoParamsIterator is returned from FilterReceivedNoParams and is used to iterate over the raw logs and unpacked data for ReceivedNoParams events raised by the ReceiverEVM contract. +type ReceiverEVMReceivedNoParamsIterator struct { + Event *ReceiverEVMReceivedNoParams // Event containing the contract specifics and raw log contract *bind.BoundContract // Generic contract to use for unpacking event data event string // Event name to use for unpacking event data @@ -439,7 +439,7 @@ type ReceiverReceivedNoParamsIterator struct { // Next advances the iterator to the subsequent event, returning whether there // are any more events found. In case of a retrieval or parsing error, false is // returned and Error() can be queried for the exact failure. -func (it *ReceiverReceivedNoParamsIterator) Next() bool { +func (it *ReceiverEVMReceivedNoParamsIterator) Next() bool { // If the iterator failed, stop iterating if it.fail != nil { return false @@ -448,7 +448,7 @@ func (it *ReceiverReceivedNoParamsIterator) Next() bool { if it.done { select { case log := <-it.logs: - it.Event = new(ReceiverReceivedNoParams) + it.Event = new(ReceiverEVMReceivedNoParams) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -463,7 +463,7 @@ func (it *ReceiverReceivedNoParamsIterator) Next() bool { // Iterator still in progress, wait for either a data or an error event select { case log := <-it.logs: - it.Event = new(ReceiverReceivedNoParams) + it.Event = new(ReceiverEVMReceivedNoParams) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -479,19 +479,19 @@ func (it *ReceiverReceivedNoParamsIterator) Next() bool { } // Error returns any retrieval or parsing error occurred during filtering. -func (it *ReceiverReceivedNoParamsIterator) Error() error { +func (it *ReceiverEVMReceivedNoParamsIterator) Error() error { return it.fail } // Close terminates the iteration process, releasing any pending underlying // resources. -func (it *ReceiverReceivedNoParamsIterator) Close() error { +func (it *ReceiverEVMReceivedNoParamsIterator) Close() error { it.sub.Unsubscribe() return nil } -// ReceiverReceivedNoParams represents a ReceivedNoParams event raised by the Receiver contract. -type ReceiverReceivedNoParams struct { +// ReceiverEVMReceivedNoParams represents a ReceivedNoParams event raised by the ReceiverEVM contract. +type ReceiverEVMReceivedNoParams struct { Sender common.Address Raw types.Log // Blockchain specific contextual infos } @@ -499,21 +499,21 @@ type ReceiverReceivedNoParams struct { // FilterReceivedNoParams is a free log retrieval operation binding the contract event 0xbcaadb46b82a48af60b608f58959ae6b8310d1b0a0d094c2e9ec3208ed39f2a0. // // Solidity: event ReceivedNoParams(address sender) -func (_Receiver *ReceiverFilterer) FilterReceivedNoParams(opts *bind.FilterOpts) (*ReceiverReceivedNoParamsIterator, error) { +func (_ReceiverEVM *ReceiverEVMFilterer) FilterReceivedNoParams(opts *bind.FilterOpts) (*ReceiverEVMReceivedNoParamsIterator, error) { - logs, sub, err := _Receiver.contract.FilterLogs(opts, "ReceivedNoParams") + logs, sub, err := _ReceiverEVM.contract.FilterLogs(opts, "ReceivedNoParams") if err != nil { return nil, err } - return &ReceiverReceivedNoParamsIterator{contract: _Receiver.contract, event: "ReceivedNoParams", logs: logs, sub: sub}, nil + return &ReceiverEVMReceivedNoParamsIterator{contract: _ReceiverEVM.contract, event: "ReceivedNoParams", logs: logs, sub: sub}, nil } // WatchReceivedNoParams is a free log subscription operation binding the contract event 0xbcaadb46b82a48af60b608f58959ae6b8310d1b0a0d094c2e9ec3208ed39f2a0. // // Solidity: event ReceivedNoParams(address sender) -func (_Receiver *ReceiverFilterer) WatchReceivedNoParams(opts *bind.WatchOpts, sink chan<- *ReceiverReceivedNoParams) (event.Subscription, error) { +func (_ReceiverEVM *ReceiverEVMFilterer) WatchReceivedNoParams(opts *bind.WatchOpts, sink chan<- *ReceiverEVMReceivedNoParams) (event.Subscription, error) { - logs, sub, err := _Receiver.contract.WatchLogs(opts, "ReceivedNoParams") + logs, sub, err := _ReceiverEVM.contract.WatchLogs(opts, "ReceivedNoParams") if err != nil { return nil, err } @@ -523,8 +523,8 @@ func (_Receiver *ReceiverFilterer) WatchReceivedNoParams(opts *bind.WatchOpts, s select { case log := <-logs: // New log arrived, parse the event and forward to the user - event := new(ReceiverReceivedNoParams) - if err := _Receiver.contract.UnpackLog(event, "ReceivedNoParams", log); err != nil { + event := new(ReceiverEVMReceivedNoParams) + if err := _ReceiverEVM.contract.UnpackLog(event, "ReceivedNoParams", log); err != nil { return err } event.Raw = log @@ -548,18 +548,18 @@ func (_Receiver *ReceiverFilterer) WatchReceivedNoParams(opts *bind.WatchOpts, s // ParseReceivedNoParams is a log parse operation binding the contract event 0xbcaadb46b82a48af60b608f58959ae6b8310d1b0a0d094c2e9ec3208ed39f2a0. // // Solidity: event ReceivedNoParams(address sender) -func (_Receiver *ReceiverFilterer) ParseReceivedNoParams(log types.Log) (*ReceiverReceivedNoParams, error) { - event := new(ReceiverReceivedNoParams) - if err := _Receiver.contract.UnpackLog(event, "ReceivedNoParams", log); err != nil { +func (_ReceiverEVM *ReceiverEVMFilterer) ParseReceivedNoParams(log types.Log) (*ReceiverEVMReceivedNoParams, error) { + event := new(ReceiverEVMReceivedNoParams) + if err := _ReceiverEVM.contract.UnpackLog(event, "ReceivedNoParams", log); err != nil { return nil, err } event.Raw = log return event, nil } -// ReceiverReceivedNonPayableIterator is returned from FilterReceivedNonPayable and is used to iterate over the raw logs and unpacked data for ReceivedNonPayable events raised by the Receiver contract. -type ReceiverReceivedNonPayableIterator struct { - Event *ReceiverReceivedNonPayable // Event containing the contract specifics and raw log +// ReceiverEVMReceivedNonPayableIterator is returned from FilterReceivedNonPayable and is used to iterate over the raw logs and unpacked data for ReceivedNonPayable events raised by the ReceiverEVM contract. +type ReceiverEVMReceivedNonPayableIterator struct { + Event *ReceiverEVMReceivedNonPayable // Event containing the contract specifics and raw log contract *bind.BoundContract // Generic contract to use for unpacking event data event string // Event name to use for unpacking event data @@ -573,7 +573,7 @@ type ReceiverReceivedNonPayableIterator struct { // Next advances the iterator to the subsequent event, returning whether there // are any more events found. In case of a retrieval or parsing error, false is // returned and Error() can be queried for the exact failure. -func (it *ReceiverReceivedNonPayableIterator) Next() bool { +func (it *ReceiverEVMReceivedNonPayableIterator) Next() bool { // If the iterator failed, stop iterating if it.fail != nil { return false @@ -582,7 +582,7 @@ func (it *ReceiverReceivedNonPayableIterator) Next() bool { if it.done { select { case log := <-it.logs: - it.Event = new(ReceiverReceivedNonPayable) + it.Event = new(ReceiverEVMReceivedNonPayable) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -597,7 +597,7 @@ func (it *ReceiverReceivedNonPayableIterator) Next() bool { // Iterator still in progress, wait for either a data or an error event select { case log := <-it.logs: - it.Event = new(ReceiverReceivedNonPayable) + it.Event = new(ReceiverEVMReceivedNonPayable) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -613,19 +613,19 @@ func (it *ReceiverReceivedNonPayableIterator) Next() bool { } // Error returns any retrieval or parsing error occurred during filtering. -func (it *ReceiverReceivedNonPayableIterator) Error() error { +func (it *ReceiverEVMReceivedNonPayableIterator) Error() error { return it.fail } // Close terminates the iteration process, releasing any pending underlying // resources. -func (it *ReceiverReceivedNonPayableIterator) Close() error { +func (it *ReceiverEVMReceivedNonPayableIterator) Close() error { it.sub.Unsubscribe() return nil } -// ReceiverReceivedNonPayable represents a ReceivedNonPayable event raised by the Receiver contract. -type ReceiverReceivedNonPayable struct { +// ReceiverEVMReceivedNonPayable represents a ReceivedNonPayable event raised by the ReceiverEVM contract. +type ReceiverEVMReceivedNonPayable struct { Sender common.Address Strs []string Nums []*big.Int @@ -636,21 +636,21 @@ type ReceiverReceivedNonPayable struct { // FilterReceivedNonPayable is a free log retrieval operation binding the contract event 0x74a53cd528a921fca7dbdee62f86819051d3cc98f214951f4238e8843f20b146. // // Solidity: event ReceivedNonPayable(address sender, string[] strs, uint256[] nums, bool flag) -func (_Receiver *ReceiverFilterer) FilterReceivedNonPayable(opts *bind.FilterOpts) (*ReceiverReceivedNonPayableIterator, error) { +func (_ReceiverEVM *ReceiverEVMFilterer) FilterReceivedNonPayable(opts *bind.FilterOpts) (*ReceiverEVMReceivedNonPayableIterator, error) { - logs, sub, err := _Receiver.contract.FilterLogs(opts, "ReceivedNonPayable") + logs, sub, err := _ReceiverEVM.contract.FilterLogs(opts, "ReceivedNonPayable") if err != nil { return nil, err } - return &ReceiverReceivedNonPayableIterator{contract: _Receiver.contract, event: "ReceivedNonPayable", logs: logs, sub: sub}, nil + return &ReceiverEVMReceivedNonPayableIterator{contract: _ReceiverEVM.contract, event: "ReceivedNonPayable", logs: logs, sub: sub}, nil } // WatchReceivedNonPayable is a free log subscription operation binding the contract event 0x74a53cd528a921fca7dbdee62f86819051d3cc98f214951f4238e8843f20b146. // // Solidity: event ReceivedNonPayable(address sender, string[] strs, uint256[] nums, bool flag) -func (_Receiver *ReceiverFilterer) WatchReceivedNonPayable(opts *bind.WatchOpts, sink chan<- *ReceiverReceivedNonPayable) (event.Subscription, error) { +func (_ReceiverEVM *ReceiverEVMFilterer) WatchReceivedNonPayable(opts *bind.WatchOpts, sink chan<- *ReceiverEVMReceivedNonPayable) (event.Subscription, error) { - logs, sub, err := _Receiver.contract.WatchLogs(opts, "ReceivedNonPayable") + logs, sub, err := _ReceiverEVM.contract.WatchLogs(opts, "ReceivedNonPayable") if err != nil { return nil, err } @@ -660,8 +660,8 @@ func (_Receiver *ReceiverFilterer) WatchReceivedNonPayable(opts *bind.WatchOpts, select { case log := <-logs: // New log arrived, parse the event and forward to the user - event := new(ReceiverReceivedNonPayable) - if err := _Receiver.contract.UnpackLog(event, "ReceivedNonPayable", log); err != nil { + event := new(ReceiverEVMReceivedNonPayable) + if err := _ReceiverEVM.contract.UnpackLog(event, "ReceivedNonPayable", log); err != nil { return err } event.Raw = log @@ -685,18 +685,18 @@ func (_Receiver *ReceiverFilterer) WatchReceivedNonPayable(opts *bind.WatchOpts, // ParseReceivedNonPayable is a log parse operation binding the contract event 0x74a53cd528a921fca7dbdee62f86819051d3cc98f214951f4238e8843f20b146. // // Solidity: event ReceivedNonPayable(address sender, string[] strs, uint256[] nums, bool flag) -func (_Receiver *ReceiverFilterer) ParseReceivedNonPayable(log types.Log) (*ReceiverReceivedNonPayable, error) { - event := new(ReceiverReceivedNonPayable) - if err := _Receiver.contract.UnpackLog(event, "ReceivedNonPayable", log); err != nil { +func (_ReceiverEVM *ReceiverEVMFilterer) ParseReceivedNonPayable(log types.Log) (*ReceiverEVMReceivedNonPayable, error) { + event := new(ReceiverEVMReceivedNonPayable) + if err := _ReceiverEVM.contract.UnpackLog(event, "ReceivedNonPayable", log); err != nil { return nil, err } event.Raw = log return event, nil } -// ReceiverReceivedPayableIterator is returned from FilterReceivedPayable and is used to iterate over the raw logs and unpacked data for ReceivedPayable events raised by the Receiver contract. -type ReceiverReceivedPayableIterator struct { - Event *ReceiverReceivedPayable // Event containing the contract specifics and raw log +// ReceiverEVMReceivedPayableIterator is returned from FilterReceivedPayable and is used to iterate over the raw logs and unpacked data for ReceivedPayable events raised by the ReceiverEVM contract. +type ReceiverEVMReceivedPayableIterator struct { + Event *ReceiverEVMReceivedPayable // Event containing the contract specifics and raw log contract *bind.BoundContract // Generic contract to use for unpacking event data event string // Event name to use for unpacking event data @@ -710,7 +710,7 @@ type ReceiverReceivedPayableIterator struct { // Next advances the iterator to the subsequent event, returning whether there // are any more events found. In case of a retrieval or parsing error, false is // returned and Error() can be queried for the exact failure. -func (it *ReceiverReceivedPayableIterator) Next() bool { +func (it *ReceiverEVMReceivedPayableIterator) Next() bool { // If the iterator failed, stop iterating if it.fail != nil { return false @@ -719,7 +719,7 @@ func (it *ReceiverReceivedPayableIterator) Next() bool { if it.done { select { case log := <-it.logs: - it.Event = new(ReceiverReceivedPayable) + it.Event = new(ReceiverEVMReceivedPayable) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -734,7 +734,7 @@ func (it *ReceiverReceivedPayableIterator) Next() bool { // Iterator still in progress, wait for either a data or an error event select { case log := <-it.logs: - it.Event = new(ReceiverReceivedPayable) + it.Event = new(ReceiverEVMReceivedPayable) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -750,19 +750,19 @@ func (it *ReceiverReceivedPayableIterator) Next() bool { } // Error returns any retrieval or parsing error occurred during filtering. -func (it *ReceiverReceivedPayableIterator) Error() error { +func (it *ReceiverEVMReceivedPayableIterator) Error() error { return it.fail } // Close terminates the iteration process, releasing any pending underlying // resources. -func (it *ReceiverReceivedPayableIterator) Close() error { +func (it *ReceiverEVMReceivedPayableIterator) Close() error { it.sub.Unsubscribe() return nil } -// ReceiverReceivedPayable represents a ReceivedPayable event raised by the Receiver contract. -type ReceiverReceivedPayable struct { +// ReceiverEVMReceivedPayable represents a ReceivedPayable event raised by the ReceiverEVM contract. +type ReceiverEVMReceivedPayable struct { Sender common.Address Value *big.Int Str string @@ -774,21 +774,21 @@ type ReceiverReceivedPayable struct { // FilterReceivedPayable is a free log retrieval operation binding the contract event 0x1f1ff1f5fb41346850b2f5c04e6c767e2f1c8a525c5c0c5cdb60cdf3ca5f62fa. // // Solidity: event ReceivedPayable(address sender, uint256 value, string str, uint256 num, bool flag) -func (_Receiver *ReceiverFilterer) FilterReceivedPayable(opts *bind.FilterOpts) (*ReceiverReceivedPayableIterator, error) { +func (_ReceiverEVM *ReceiverEVMFilterer) FilterReceivedPayable(opts *bind.FilterOpts) (*ReceiverEVMReceivedPayableIterator, error) { - logs, sub, err := _Receiver.contract.FilterLogs(opts, "ReceivedPayable") + logs, sub, err := _ReceiverEVM.contract.FilterLogs(opts, "ReceivedPayable") if err != nil { return nil, err } - return &ReceiverReceivedPayableIterator{contract: _Receiver.contract, event: "ReceivedPayable", logs: logs, sub: sub}, nil + return &ReceiverEVMReceivedPayableIterator{contract: _ReceiverEVM.contract, event: "ReceivedPayable", logs: logs, sub: sub}, nil } // WatchReceivedPayable is a free log subscription operation binding the contract event 0x1f1ff1f5fb41346850b2f5c04e6c767e2f1c8a525c5c0c5cdb60cdf3ca5f62fa. // // Solidity: event ReceivedPayable(address sender, uint256 value, string str, uint256 num, bool flag) -func (_Receiver *ReceiverFilterer) WatchReceivedPayable(opts *bind.WatchOpts, sink chan<- *ReceiverReceivedPayable) (event.Subscription, error) { +func (_ReceiverEVM *ReceiverEVMFilterer) WatchReceivedPayable(opts *bind.WatchOpts, sink chan<- *ReceiverEVMReceivedPayable) (event.Subscription, error) { - logs, sub, err := _Receiver.contract.WatchLogs(opts, "ReceivedPayable") + logs, sub, err := _ReceiverEVM.contract.WatchLogs(opts, "ReceivedPayable") if err != nil { return nil, err } @@ -798,8 +798,8 @@ func (_Receiver *ReceiverFilterer) WatchReceivedPayable(opts *bind.WatchOpts, si select { case log := <-logs: // New log arrived, parse the event and forward to the user - event := new(ReceiverReceivedPayable) - if err := _Receiver.contract.UnpackLog(event, "ReceivedPayable", log); err != nil { + event := new(ReceiverEVMReceivedPayable) + if err := _ReceiverEVM.contract.UnpackLog(event, "ReceivedPayable", log); err != nil { return err } event.Raw = log @@ -823,9 +823,9 @@ func (_Receiver *ReceiverFilterer) WatchReceivedPayable(opts *bind.WatchOpts, si // ParseReceivedPayable is a log parse operation binding the contract event 0x1f1ff1f5fb41346850b2f5c04e6c767e2f1c8a525c5c0c5cdb60cdf3ca5f62fa. // // Solidity: event ReceivedPayable(address sender, uint256 value, string str, uint256 num, bool flag) -func (_Receiver *ReceiverFilterer) ParseReceivedPayable(log types.Log) (*ReceiverReceivedPayable, error) { - event := new(ReceiverReceivedPayable) - if err := _Receiver.contract.UnpackLog(event, "ReceivedPayable", log); err != nil { +func (_ReceiverEVM *ReceiverEVMFilterer) ParseReceivedPayable(log types.Log) (*ReceiverEVMReceivedPayable, error) { + event := new(ReceiverEVMReceivedPayable) + if err := _ReceiverEVM.contract.UnpackLog(event, "ReceivedPayable", log); err != nil { return nil, err } event.Raw = log diff --git a/pkg/contracts/prototypes/zevm/gatewayzevm.sol/gatewayzevm.go b/pkg/contracts/prototypes/zevm/gatewayzevm.sol/gatewayzevm.go index 82c24a3b..a308bbb0 100644 --- a/pkg/contracts/prototypes/zevm/gatewayzevm.sol/gatewayzevm.go +++ b/pkg/contracts/prototypes/zevm/gatewayzevm.sol/gatewayzevm.go @@ -38,8 +38,8 @@ type ZContext struct { // GatewayZEVMMetaData contains all meta data concerning the GatewayZEVM contract. var GatewayZEVMMetaData = &bind.MetaData{ - ABI: "[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"CallerIsNotFungibleModule\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"GasFeeTransferFailed\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InsufficientZRC20Amount\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidTarget\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"WithdrawalFailed\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ZRC20BurnFailed\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ZRC20TransferFailed\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"previousAdmin\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newAdmin\",\"type\":\"address\"}],\"name\":\"AdminChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"beacon\",\"type\":\"address\"}],\"name\":\"BeaconUpgraded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"bytes\",\"name\":\"receiver\",\"type\":\"bytes\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"message\",\"type\":\"bytes\"}],\"name\":\"Call\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"implementation\",\"type\":\"address\"}],\"name\":\"Upgraded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"to\",\"type\":\"bytes\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"gasfee\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"protocolFlatFee\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"message\",\"type\":\"bytes\"}],\"name\":\"Withdrawal\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"FUNGIBLE_MODULE_ADDRESS\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"receiver\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"message\",\"type\":\"bytes\"}],\"name\":\"call\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"zrc20\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"target\",\"type\":\"address\"}],\"name\":\"deposit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes\",\"name\":\"origin\",\"type\":\"bytes\"},{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"chainID\",\"type\":\"uint256\"}],\"internalType\":\"structzContext\",\"name\":\"context\",\"type\":\"tuple\"},{\"internalType\":\"address\",\"name\":\"zrc20\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"target\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"message\",\"type\":\"bytes\"}],\"name\":\"depositAndCall\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes\",\"name\":\"origin\",\"type\":\"bytes\"},{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"chainID\",\"type\":\"uint256\"}],\"internalType\":\"structzContext\",\"name\":\"context\",\"type\":\"tuple\"},{\"internalType\":\"address\",\"name\":\"zrc20\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"target\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"message\",\"type\":\"bytes\"}],\"name\":\"execute\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"proxiableUUID\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"}],\"name\":\"upgradeTo\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"upgradeToAndCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"receiver\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"zrc20\",\"type\":\"address\"}],\"name\":\"withdraw\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"receiver\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"zrc20\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"message\",\"type\":\"bytes\"}],\"name\":\"withdrawAndCall\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", - Bin: "0x60a06040523073ffffffffffffffffffffffffffffffffffffffff1660809073ffffffffffffffffffffffffffffffffffffffff1660601b8152503480156200004757600080fd5b50620000586200005e60201b60201c565b62000208565b600060019054906101000a900460ff1615620000b1576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401620000a8906200015c565b60405180910390fd5b60ff801660008054906101000a900460ff1660ff1614620001225760ff6000806101000a81548160ff021916908360ff1602179055507f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb384740249860ff6040516200011991906200017e565b60405180910390a15b565b6000620001336027836200019b565b91506200014082620001b9565b604082019050919050565b6200015681620001ac565b82525050565b60006020820190508181036000830152620001778162000124565b9050919050565b60006020820190506200019560008301846200014b565b92915050565b600082825260208201905092915050565b600060ff82169050919050565b7f496e697469616c697a61626c653a20636f6e747261637420697320696e69746960008201527f616c697a696e6700000000000000000000000000000000000000000000000000602082015250565b60805160601c612c716200024360003960008181610447015281816104d6015281816105e80152818161067701526107270152612c716000f3fe6080604052600436106100dd5760003560e01c80637993c1e01161007f578063bcf7f32b11610059578063bcf7f32b14610251578063c39aca371461027a578063f2fde38b146102a3578063f45346dc146102cc576100dd565b80637993c1e0146101e65780638129fc1c1461020f5780638da5cb5b14610226576100dd565b80633ce4a5bc116100bb5780633ce4a5bc1461015d5780634f1ef2861461018857806352d1902d146101a4578063715018a6146101cf576100dd565b80630ac7c44c146100e2578063135390f91461010b5780633659cfe614610134575b600080fd5b3480156100ee57600080fd5b5061010960048036038101906101049190611c94565b6102f5565b005b34801561011757600080fd5b50610132600480360381019061012d9190611d10565b610360565b005b34801561014057600080fd5b5061015b60048036038101906101569190611b1e565b610445565b005b34801561016957600080fd5b506101726105ce565b60405161017f9190612282565b60405180910390f35b6101a2600480360381019061019d9190611b4b565b6105e6565b005b3480156101b057600080fd5b506101b9610723565b6040516101c691906122fd565b60405180910390f35b3480156101db57600080fd5b506101e46107dc565b005b3480156101f257600080fd5b5061020d60048036038101906102089190611d7f565b6107f0565b005b34801561021b57600080fd5b506102246108db565b005b34801561023257600080fd5b5061023b610a21565b6040516102489190612282565b60405180910390f35b34801561025d57600080fd5b5061027860048036038101906102739190611e23565b610a4b565b005b34801561028657600080fd5b506102a1600480360381019061029c9190611e23565b610b3f565b005b3480156102af57600080fd5b506102ca60048036038101906102c59190611b1e565b610d71565b005b3480156102d857600080fd5b506102f360048036038101906102ee9190611be7565b610df5565b005b82604051610303919061226b565b60405180910390203373ffffffffffffffffffffffffffffffffffffffff167f2b5af078ce280d812dc2241658dc5435c93408020e5418eef55a2b536de51c0f8484604051610353929190612318565b60405180910390a3505050565b600061036c8383610fb1565b90503373ffffffffffffffffffffffffffffffffffffffff167f1866ad2994816c79f4103e1eddacc7b085eb7c635205243a28940be69b01536d8585848673ffffffffffffffffffffffffffffffffffffffff16634d8943bb6040518163ffffffff1660e01b815260040160206040518083038186803b1580156103ef57600080fd5b505afa158015610403573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104279190611ed9565b604051610437949392919061239f565b60405180910390a250505050565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163073ffffffffffffffffffffffffffffffffffffffff1614156104d4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016104cb9061245b565b60405180910390fd5b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166105136112a1565b73ffffffffffffffffffffffffffffffffffffffff1614610569576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105609061247b565b60405180910390fd5b610572816112f8565b6105cb81600067ffffffffffffffff8111156105915761059061282a565b5b6040519080825280601f01601f1916602001820160405280156105c35781602001600182028036833780820191505090505b506000611303565b50565b73735b14bb79463307aacbed86daf3322b1e6226ab81565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163073ffffffffffffffffffffffffffffffffffffffff161415610675576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161066c9061245b565b60405180910390fd5b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166106b46112a1565b73ffffffffffffffffffffffffffffffffffffffff161461070a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107019061247b565b60405180910390fd5b610713826112f8565b61071f82826001611303565b5050565b60007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163073ffffffffffffffffffffffffffffffffffffffff16146107b3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107aa9061249b565b60405180910390fd5b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc60001b905090565b6107e4611480565b6107ee60006114fe565b565b60006107fc8585610fb1565b90503373ffffffffffffffffffffffffffffffffffffffff167f1866ad2994816c79f4103e1eddacc7b085eb7c635205243a28940be69b01536d8787848873ffffffffffffffffffffffffffffffffffffffff16634d8943bb6040518163ffffffff1660e01b815260040160206040518083038186803b15801561087f57600080fd5b505afa158015610893573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108b79190611ed9565b88886040516108cb9695949392919061233c565b60405180910390a2505050505050565b60008060019054906101000a900460ff1615905080801561090c5750600160008054906101000a900460ff1660ff16105b80610939575061091b306115c4565b1580156109385750600160008054906101000a900460ff1660ff16145b5b610978576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161096f906124db565b60405180910390fd5b60016000806101000a81548160ff021916908360ff16021790555080156109b5576001600060016101000a81548160ff0219169083151502179055505b6109bd6115e7565b6109c5611640565b8015610a1e5760008060016101000a81548160ff0219169083151502179055507f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024986001604051610a1591906123fe565b60405180910390a15b50565b6000603360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b73735b14bb79463307aacbed86daf3322b1e6226ab73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610ac4576040517f2b2add3d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8273ffffffffffffffffffffffffffffffffffffffff1663de43156e87878786866040518663ffffffff1660e01b8152600401610b0595949392919061259b565b600060405180830381600087803b158015610b1f57600080fd5b505af1158015610b33573d6000803e3d6000fd5b50505050505050505050565b73735b14bb79463307aacbed86daf3322b1e6226ab73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610bb8576040517f2b2add3d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73735b14bb79463307aacbed86daf3322b1e6226ab73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161480610c3157503073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16145b15610c68576040517f82d5d76a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8473ffffffffffffffffffffffffffffffffffffffff166347e7ef2484866040518363ffffffff1660e01b8152600401610ca39291906122d4565b602060405180830381600087803b158015610cbd57600080fd5b505af1158015610cd1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610cf59190611c3a565b508273ffffffffffffffffffffffffffffffffffffffff1663de43156e87878786866040518663ffffffff1660e01b8152600401610d3795949392919061259b565b600060405180830381600087803b158015610d5157600080fd5b505af1158015610d65573d6000803e3d6000fd5b50505050505050505050565b610d79611480565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415610de9576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610de09061243b565b60405180910390fd5b610df2816114fe565b50565b73735b14bb79463307aacbed86daf3322b1e6226ab73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610e6e576040517f2b2add3d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73735b14bb79463307aacbed86daf3322b1e6226ab73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161480610ee757503073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16145b15610f1e576040517f82d5d76a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8273ffffffffffffffffffffffffffffffffffffffff166347e7ef2482846040518363ffffffff1660e01b8152600401610f599291906122d4565b602060405180830381600087803b158015610f7357600080fd5b505af1158015610f87573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fab9190611c3a565b50505050565b60008060008373ffffffffffffffffffffffffffffffffffffffff1663d9eeebed6040518163ffffffff1660e01b8152600401604080518083038186803b158015610ffb57600080fd5b505afa15801561100f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110339190611ba7565b915091508173ffffffffffffffffffffffffffffffffffffffff166323b872dd3373735b14bb79463307aacbed86daf3322b1e6226ab846040518463ffffffff1660e01b81526004016110889392919061229d565b602060405180830381600087803b1580156110a257600080fd5b505af11580156110b6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110da9190611c3a565b611110576040517f0a7cd6d600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8373ffffffffffffffffffffffffffffffffffffffff166323b872dd3330886040518463ffffffff1660e01b815260040161114d9392919061229d565b602060405180830381600087803b15801561116757600080fd5b505af115801561117b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061119f9190611c3a565b6111d5576040517f4dd9ee8d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8373ffffffffffffffffffffffffffffffffffffffff166342966c68866040518263ffffffff1660e01b815260040161120e91906125f0565b602060405180830381600087803b15801561122857600080fd5b505af115801561123c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112609190611c3a565b611296576040517f2c77e05c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b809250505092915050565b60006112cf7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc60001b611691565b60000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b611300611480565b50565b61132f7f4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd914360001b61169b565b60000160009054906101000a900460ff16156113535761134e836116a5565b61147b565b8273ffffffffffffffffffffffffffffffffffffffff166352d1902d6040518163ffffffff1660e01b815260040160206040518083038186803b15801561139957600080fd5b505afa9250505080156113ca57506040513d601f19601f820116820180604052508101906113c79190611c67565b60015b611409576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611400906124fb565b60405180910390fd5b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc60001b811461146e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611465906124bb565b60405180910390fd5b5061147a83838361175e565b5b505050565b61148861178a565b73ffffffffffffffffffffffffffffffffffffffff166114a6610a21565b73ffffffffffffffffffffffffffffffffffffffff16146114fc576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016114f39061253b565b60405180910390fd5b565b6000603360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905081603360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b6000808273ffffffffffffffffffffffffffffffffffffffff163b119050919050565b600060019054906101000a900460ff16611636576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161162d9061257b565b60405180910390fd5b61163e611792565b565b600060019054906101000a900460ff1661168f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016116869061257b565b60405180910390fd5b565b6000819050919050565b6000819050919050565b6116ae816115c4565b6116ed576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016116e49061251b565b60405180910390fd5b8061171a7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc60001b611691565b60000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b611767836117f3565b6000825111806117745750805b15611785576117838383611842565b505b505050565b600033905090565b600060019054906101000a900460ff166117e1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016117d89061257b565b60405180910390fd5b6117f16117ec61178a565b6114fe565b565b6117fc816116a5565b8073ffffffffffffffffffffffffffffffffffffffff167fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b60405160405180910390a250565b60606118678383604051806060016040528060278152602001612c156027913961186f565b905092915050565b60606000808573ffffffffffffffffffffffffffffffffffffffff1685604051611899919061226b565b600060405180830381855af49150503d80600081146118d4576040519150601f19603f3d011682016040523d82523d6000602084013e6118d9565b606091505b50915091506118ea868383876118f5565b925050509392505050565b606083156119585760008351141561195057611910856115c4565b61194f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016119469061255b565b60405180910390fd5b5b829050611963565b611962838361196b565b5b949350505050565b60008251111561197e5781518083602001fd5b806040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016119b29190612419565b60405180910390fd5b60006119ce6119c984612630565b61260b565b9050828152602081018484840111156119ea576119e9612877565b5b6119f58482856127b7565b509392505050565b600081359050611a0c81612bb8565b92915050565b600081519050611a2181612bb8565b92915050565b600081519050611a3681612bcf565b92915050565b600081519050611a4b81612be6565b92915050565b60008083601f840112611a6757611a66612863565b5b8235905067ffffffffffffffff811115611a8457611a8361285e565b5b602083019150836001820283011115611aa057611a9f612872565b5b9250929050565b600082601f830112611abc57611abb612863565b5b8135611acc8482602086016119bb565b91505092915050565b600060608284031215611aeb57611aea612868565b5b81905092915050565b600081359050611b0381612bfd565b92915050565b600081519050611b1881612bfd565b92915050565b600060208284031215611b3457611b33612886565b5b6000611b42848285016119fd565b91505092915050565b60008060408385031215611b6257611b61612886565b5b6000611b70858286016119fd565b925050602083013567ffffffffffffffff811115611b9157611b9061287c565b5b611b9d85828601611aa7565b9150509250929050565b60008060408385031215611bbe57611bbd612886565b5b6000611bcc85828601611a12565b9250506020611bdd85828601611b09565b9150509250929050565b600080600060608486031215611c0057611bff612886565b5b6000611c0e868287016119fd565b9350506020611c1f86828701611af4565b9250506040611c30868287016119fd565b9150509250925092565b600060208284031215611c5057611c4f612886565b5b6000611c5e84828501611a27565b91505092915050565b600060208284031215611c7d57611c7c612886565b5b6000611c8b84828501611a3c565b91505092915050565b600080600060408486031215611cad57611cac612886565b5b600084013567ffffffffffffffff811115611ccb57611cca61287c565b5b611cd786828701611aa7565b935050602084013567ffffffffffffffff811115611cf857611cf761287c565b5b611d0486828701611a51565b92509250509250925092565b600080600060608486031215611d2957611d28612886565b5b600084013567ffffffffffffffff811115611d4757611d4661287c565b5b611d5386828701611aa7565b9350506020611d6486828701611af4565b9250506040611d75868287016119fd565b9150509250925092565b600080600080600060808688031215611d9b57611d9a612886565b5b600086013567ffffffffffffffff811115611db957611db861287c565b5b611dc588828901611aa7565b9550506020611dd688828901611af4565b9450506040611de7888289016119fd565b935050606086013567ffffffffffffffff811115611e0857611e0761287c565b5b611e1488828901611a51565b92509250509295509295909350565b60008060008060008060a08789031215611e4057611e3f612886565b5b600087013567ffffffffffffffff811115611e5e57611e5d61287c565b5b611e6a89828a01611ad5565b9650506020611e7b89828a016119fd565b9550506040611e8c89828a01611af4565b9450506060611e9d89828a016119fd565b935050608087013567ffffffffffffffff811115611ebe57611ebd61287c565b5b611eca89828a01611a51565b92509250509295509295509295565b600060208284031215611eef57611eee612886565b5b6000611efd84828501611b09565b91505092915050565b611f0f81612746565b82525050565b611f1e81612746565b82525050565b611f2d81612764565b82525050565b6000611f3f8385612677565b9350611f4c8385846127b7565b611f558361288b565b840190509392505050565b6000611f6c8385612688565b9350611f798385846127b7565b611f828361288b565b840190509392505050565b6000611f9882612661565b611fa28185612688565b9350611fb28185602086016127c6565b611fbb8161288b565b840191505092915050565b6000611fd182612661565b611fdb8185612699565b9350611feb8185602086016127c6565b80840191505092915050565b612000816127a5565b82525050565b60006120118261266c565b61201b81856126a4565b935061202b8185602086016127c6565b6120348161288b565b840191505092915050565b600061204c6026836126a4565b91506120578261289c565b604082019050919050565b600061206f602c836126a4565b915061207a826128eb565b604082019050919050565b6000612092602c836126a4565b915061209d8261293a565b604082019050919050565b60006120b56038836126a4565b91506120c082612989565b604082019050919050565b60006120d86029836126a4565b91506120e3826129d8565b604082019050919050565b60006120fb602e836126a4565b915061210682612a27565b604082019050919050565b600061211e602e836126a4565b915061212982612a76565b604082019050919050565b6000612141602d836126a4565b915061214c82612ac5565b604082019050919050565b60006121646020836126a4565b915061216f82612b14565b602082019050919050565b6000612187600083612688565b915061219282612b3d565b600082019050919050565b60006121aa601d836126a4565b91506121b582612b40565b602082019050919050565b60006121cd602b836126a4565b91506121d882612b69565b604082019050919050565b6000606083016121f660008401846126cc565b8583036000870152612209838284611f33565b9250505061221a60208401846126b5565b6122276020860182611f06565b50612235604084018461272f565b612242604086018261224d565b508091505092915050565b6122568161278e565b82525050565b6122658161278e565b82525050565b60006122778284611fc6565b915081905092915050565b60006020820190506122976000830184611f15565b92915050565b60006060820190506122b26000830186611f15565b6122bf6020830185611f15565b6122cc604083018461225c565b949350505050565b60006040820190506122e96000830185611f15565b6122f6602083018461225c565b9392505050565b60006020820190506123126000830184611f24565b92915050565b60006020820190508181036000830152612333818486611f60565b90509392505050565b600060a08201905081810360008301526123568189611f8d565b9050612365602083018861225c565b612372604083018761225c565b61237f606083018661225c565b8181036080830152612392818486611f60565b9050979650505050505050565b600060a08201905081810360008301526123b98187611f8d565b90506123c8602083018661225c565b6123d5604083018561225c565b6123e2606083018461225c565b81810360808301526123f38161217a565b905095945050505050565b60006020820190506124136000830184611ff7565b92915050565b600060208201905081810360008301526124338184612006565b905092915050565b600060208201905081810360008301526124548161203f565b9050919050565b6000602082019050818103600083015261247481612062565b9050919050565b6000602082019050818103600083015261249481612085565b9050919050565b600060208201905081810360008301526124b4816120a8565b9050919050565b600060208201905081810360008301526124d4816120cb565b9050919050565b600060208201905081810360008301526124f4816120ee565b9050919050565b6000602082019050818103600083015261251481612111565b9050919050565b6000602082019050818103600083015261253481612134565b9050919050565b6000602082019050818103600083015261255481612157565b9050919050565b600060208201905081810360008301526125748161219d565b9050919050565b60006020820190508181036000830152612594816121c0565b9050919050565b600060808201905081810360008301526125b581886121e3565b90506125c46020830187611f15565b6125d1604083018661225c565b81810360608301526125e4818486611f60565b90509695505050505050565b6000602082019050612605600083018461225c565b92915050565b6000612615612626565b905061262182826127f9565b919050565b6000604051905090565b600067ffffffffffffffff82111561264b5761264a61282a565b5b6126548261288b565b9050602081019050919050565b600081519050919050565b600081519050919050565b600082825260208201905092915050565b600082825260208201905092915050565b600081905092915050565b600082825260208201905092915050565b60006126c460208401846119fd565b905092915050565b600080833560016020038436030381126126e9576126e8612881565b5b83810192508235915060208301925067ffffffffffffffff82111561271157612710612859565b5b6001820236038413156127275761272661286d565b5b509250929050565b600061273e6020840184611af4565b905092915050565b60006127518261276e565b9050919050565b60008115159050919050565b6000819050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b60006127b082612798565b9050919050565b82818337600083830152505050565b60005b838110156127e45780820151818401526020810190506127c9565b838111156127f3576000848401525b50505050565b6128028261288b565b810181811067ffffffffffffffff821117156128215761282061282a565b5b80604052505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b7f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060008201527f64656c656761746563616c6c0000000000000000000000000000000000000000602082015250565b7f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060008201527f6163746976652070726f78790000000000000000000000000000000000000000602082015250565b7f555550535570677261646561626c653a206d757374206e6f742062652063616c60008201527f6c6564207468726f7567682064656c656761746563616c6c0000000000000000602082015250565b7f45524331393637557067726164653a20756e737570706f727465642070726f7860008201527f6961626c65555549440000000000000000000000000000000000000000000000602082015250565b7f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160008201527f647920696e697469616c697a6564000000000000000000000000000000000000602082015250565b7f45524331393637557067726164653a206e657720696d706c656d656e7461746960008201527f6f6e206973206e6f742055555053000000000000000000000000000000000000602082015250565b7f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60008201527f6f74206120636f6e747261637400000000000000000000000000000000000000602082015250565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b50565b7f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000600082015250565b7f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960008201527f6e697469616c697a696e67000000000000000000000000000000000000000000602082015250565b612bc181612746565b8114612bcc57600080fd5b50565b612bd881612758565b8114612be357600080fd5b50565b612bef81612764565b8114612bfa57600080fd5b50565b612c068161278e565b8114612c1157600080fd5b5056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a26469706673582212200ef3180e9cedc3a1a1edef10c36506994a9e026c730e2624d2348359ce00bf2764736f6c63430008070033", + ABI: "[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"CallerIsNotFungibleModule\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"GasFeeTransferFailed\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InsufficientZRC20Amount\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidTarget\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"WithdrawalFailed\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ZRC20BurnFailed\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ZRC20TransferFailed\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"previousAdmin\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newAdmin\",\"type\":\"address\"}],\"name\":\"AdminChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"beacon\",\"type\":\"address\"}],\"name\":\"BeaconUpgraded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"receiver\",\"type\":\"bytes\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"message\",\"type\":\"bytes\"}],\"name\":\"Call\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"implementation\",\"type\":\"address\"}],\"name\":\"Upgraded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"to\",\"type\":\"bytes\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"gasfee\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"protocolFlatFee\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"message\",\"type\":\"bytes\"}],\"name\":\"Withdrawal\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"FUNGIBLE_MODULE_ADDRESS\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"receiver\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"message\",\"type\":\"bytes\"}],\"name\":\"call\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"zrc20\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"target\",\"type\":\"address\"}],\"name\":\"deposit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes\",\"name\":\"origin\",\"type\":\"bytes\"},{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"chainID\",\"type\":\"uint256\"}],\"internalType\":\"structzContext\",\"name\":\"context\",\"type\":\"tuple\"},{\"internalType\":\"address\",\"name\":\"zrc20\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"target\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"message\",\"type\":\"bytes\"}],\"name\":\"depositAndCall\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes\",\"name\":\"origin\",\"type\":\"bytes\"},{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"chainID\",\"type\":\"uint256\"}],\"internalType\":\"structzContext\",\"name\":\"context\",\"type\":\"tuple\"},{\"internalType\":\"address\",\"name\":\"zrc20\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"target\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"message\",\"type\":\"bytes\"}],\"name\":\"execute\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"proxiableUUID\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"}],\"name\":\"upgradeTo\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"upgradeToAndCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"receiver\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"zrc20\",\"type\":\"address\"}],\"name\":\"withdraw\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"receiver\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"zrc20\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"message\",\"type\":\"bytes\"}],\"name\":\"withdrawAndCall\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", + Bin: "0x60a06040523073ffffffffffffffffffffffffffffffffffffffff1660809073ffffffffffffffffffffffffffffffffffffffff1660601b8152503480156200004757600080fd5b50620000586200005e60201b60201c565b62000208565b600060019054906101000a900460ff1615620000b1576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401620000a8906200015c565b60405180910390fd5b60ff801660008054906101000a900460ff1660ff1614620001225760ff6000806101000a81548160ff021916908360ff1602179055507f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb384740249860ff6040516200011991906200017e565b60405180910390a15b565b6000620001336027836200019b565b91506200014082620001b9565b604082019050919050565b6200015681620001ac565b82525050565b60006020820190508181036000830152620001778162000124565b9050919050565b60006020820190506200019560008301846200014b565b92915050565b600082825260208201905092915050565b600060ff82169050919050565b7f496e697469616c697a61626c653a20636f6e747261637420697320696e69746960008201527f616c697a696e6700000000000000000000000000000000000000000000000000602082015250565b60805160601c612c726200024360003960008181610433015281816104c2015281816105d40152818161066301526107130152612c726000f3fe6080604052600436106100dd5760003560e01c80637993c1e01161007f578063bcf7f32b11610059578063bcf7f32b14610251578063c39aca371461027a578063f2fde38b146102a3578063f45346dc146102cc576100dd565b80637993c1e0146101e65780638129fc1c1461020f5780638da5cb5b14610226576100dd565b80633ce4a5bc116100bb5780633ce4a5bc1461015d5780634f1ef2861461018857806352d1902d146101a4578063715018a6146101cf576100dd565b80630ac7c44c146100e2578063135390f91461010b5780633659cfe614610134575b600080fd5b3480156100ee57600080fd5b5061010960048036038101906101049190611c80565b6102f5565b005b34801561011757600080fd5b50610132600480360381019061012d9190611cfc565b61034c565b005b34801561014057600080fd5b5061015b60048036038101906101569190611b0a565b610431565b005b34801561016957600080fd5b506101726105ba565b60405161017f919061226e565b60405180910390f35b6101a2600480360381019061019d9190611b37565b6105d2565b005b3480156101b057600080fd5b506101b961070f565b6040516101c691906122e9565b60405180910390f35b3480156101db57600080fd5b506101e46107c8565b005b3480156101f257600080fd5b5061020d60048036038101906102089190611d6b565b6107dc565b005b34801561021b57600080fd5b506102246108c7565b005b34801561023257600080fd5b5061023b610a0d565b604051610248919061226e565b60405180910390f35b34801561025d57600080fd5b5061027860048036038101906102739190611e0f565b610a37565b005b34801561028657600080fd5b506102a1600480360381019061029c9190611e0f565b610b2b565b005b3480156102af57600080fd5b506102ca60048036038101906102c59190611b0a565b610d5d565b005b3480156102d857600080fd5b506102f360048036038101906102ee9190611bd3565b610de1565b005b3373ffffffffffffffffffffffffffffffffffffffff167f2b5af078ce280d812dc2241658dc5435c93408020e5418eef55a2b536de51c0f84848460405161033f93929190612304565b60405180910390a2505050565b60006103588383610f9d565b90503373ffffffffffffffffffffffffffffffffffffffff167f1866ad2994816c79f4103e1eddacc7b085eb7c635205243a28940be69b01536d8585848673ffffffffffffffffffffffffffffffffffffffff16634d8943bb6040518163ffffffff1660e01b815260040160206040518083038186803b1580156103db57600080fd5b505afa1580156103ef573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104139190611ec5565b60405161042394939291906123a0565b60405180910390a250505050565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163073ffffffffffffffffffffffffffffffffffffffff1614156104c0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016104b79061245c565b60405180910390fd5b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166104ff61128d565b73ffffffffffffffffffffffffffffffffffffffff1614610555576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161054c9061247c565b60405180910390fd5b61055e816112e4565b6105b781600067ffffffffffffffff81111561057d5761057c61282b565b5b6040519080825280601f01601f1916602001820160405280156105af5781602001600182028036833780820191505090505b5060006112ef565b50565b73735b14bb79463307aacbed86daf3322b1e6226ab81565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163073ffffffffffffffffffffffffffffffffffffffff161415610661576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106589061245c565b60405180910390fd5b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166106a061128d565b73ffffffffffffffffffffffffffffffffffffffff16146106f6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106ed9061247c565b60405180910390fd5b6106ff826112e4565b61070b828260016112ef565b5050565b60007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163073ffffffffffffffffffffffffffffffffffffffff161461079f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107969061249c565b60405180910390fd5b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc60001b905090565b6107d061146c565b6107da60006114ea565b565b60006107e88585610f9d565b90503373ffffffffffffffffffffffffffffffffffffffff167f1866ad2994816c79f4103e1eddacc7b085eb7c635205243a28940be69b01536d8787848873ffffffffffffffffffffffffffffffffffffffff16634d8943bb6040518163ffffffff1660e01b815260040160206040518083038186803b15801561086b57600080fd5b505afa15801561087f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108a39190611ec5565b88886040516108b79695949392919061233d565b60405180910390a2505050505050565b60008060019054906101000a900460ff161590508080156108f85750600160008054906101000a900460ff1660ff16105b806109255750610907306115b0565b1580156109245750600160008054906101000a900460ff1660ff16145b5b610964576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161095b906124dc565b60405180910390fd5b60016000806101000a81548160ff021916908360ff16021790555080156109a1576001600060016101000a81548160ff0219169083151502179055505b6109a96115d3565b6109b161162c565b8015610a0a5760008060016101000a81548160ff0219169083151502179055507f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024986001604051610a0191906123ff565b60405180910390a15b50565b6000603360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b73735b14bb79463307aacbed86daf3322b1e6226ab73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610ab0576040517f2b2add3d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8273ffffffffffffffffffffffffffffffffffffffff1663de43156e87878786866040518663ffffffff1660e01b8152600401610af195949392919061259c565b600060405180830381600087803b158015610b0b57600080fd5b505af1158015610b1f573d6000803e3d6000fd5b50505050505050505050565b73735b14bb79463307aacbed86daf3322b1e6226ab73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610ba4576040517f2b2add3d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73735b14bb79463307aacbed86daf3322b1e6226ab73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161480610c1d57503073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16145b15610c54576040517f82d5d76a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8473ffffffffffffffffffffffffffffffffffffffff166347e7ef2484866040518363ffffffff1660e01b8152600401610c8f9291906122c0565b602060405180830381600087803b158015610ca957600080fd5b505af1158015610cbd573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ce19190611c26565b508273ffffffffffffffffffffffffffffffffffffffff1663de43156e87878786866040518663ffffffff1660e01b8152600401610d2395949392919061259c565b600060405180830381600087803b158015610d3d57600080fd5b505af1158015610d51573d6000803e3d6000fd5b50505050505050505050565b610d6561146c565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415610dd5576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610dcc9061243c565b60405180910390fd5b610dde816114ea565b50565b73735b14bb79463307aacbed86daf3322b1e6226ab73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610e5a576040517f2b2add3d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73735b14bb79463307aacbed86daf3322b1e6226ab73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161480610ed357503073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16145b15610f0a576040517f82d5d76a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8273ffffffffffffffffffffffffffffffffffffffff166347e7ef2482846040518363ffffffff1660e01b8152600401610f459291906122c0565b602060405180830381600087803b158015610f5f57600080fd5b505af1158015610f73573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f979190611c26565b50505050565b60008060008373ffffffffffffffffffffffffffffffffffffffff1663d9eeebed6040518163ffffffff1660e01b8152600401604080518083038186803b158015610fe757600080fd5b505afa158015610ffb573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061101f9190611b93565b915091508173ffffffffffffffffffffffffffffffffffffffff166323b872dd3373735b14bb79463307aacbed86daf3322b1e6226ab846040518463ffffffff1660e01b815260040161107493929190612289565b602060405180830381600087803b15801561108e57600080fd5b505af11580156110a2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110c69190611c26565b6110fc576040517f0a7cd6d600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8373ffffffffffffffffffffffffffffffffffffffff166323b872dd3330886040518463ffffffff1660e01b815260040161113993929190612289565b602060405180830381600087803b15801561115357600080fd5b505af1158015611167573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061118b9190611c26565b6111c1576040517f4dd9ee8d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8373ffffffffffffffffffffffffffffffffffffffff166342966c68866040518263ffffffff1660e01b81526004016111fa91906125f1565b602060405180830381600087803b15801561121457600080fd5b505af1158015611228573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061124c9190611c26565b611282576040517f2c77e05c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b809250505092915050565b60006112bb7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc60001b61167d565b60000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6112ec61146c565b50565b61131b7f4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd914360001b611687565b60000160009054906101000a900460ff161561133f5761133a83611691565b611467565b8273ffffffffffffffffffffffffffffffffffffffff166352d1902d6040518163ffffffff1660e01b815260040160206040518083038186803b15801561138557600080fd5b505afa9250505080156113b657506040513d601f19601f820116820180604052508101906113b39190611c53565b60015b6113f5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016113ec906124fc565b60405180910390fd5b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc60001b811461145a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611451906124bc565b60405180910390fd5b5061146683838361174a565b5b505050565b611474611776565b73ffffffffffffffffffffffffffffffffffffffff16611492610a0d565b73ffffffffffffffffffffffffffffffffffffffff16146114e8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016114df9061253c565b60405180910390fd5b565b6000603360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905081603360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b6000808273ffffffffffffffffffffffffffffffffffffffff163b119050919050565b600060019054906101000a900460ff16611622576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016116199061257c565b60405180910390fd5b61162a61177e565b565b600060019054906101000a900460ff1661167b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016116729061257c565b60405180910390fd5b565b6000819050919050565b6000819050919050565b61169a816115b0565b6116d9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016116d09061251c565b60405180910390fd5b806117067f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc60001b61167d565b60000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b611753836117df565b6000825111806117605750805b156117715761176f838361182e565b505b505050565b600033905090565b600060019054906101000a900460ff166117cd576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016117c49061257c565b60405180910390fd5b6117dd6117d8611776565b6114ea565b565b6117e881611691565b8073ffffffffffffffffffffffffffffffffffffffff167fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b60405160405180910390a250565b60606118538383604051806060016040528060278152602001612c166027913961185b565b905092915050565b60606000808573ffffffffffffffffffffffffffffffffffffffff16856040516118859190612257565b600060405180830381855af49150503d80600081146118c0576040519150601f19603f3d011682016040523d82523d6000602084013e6118c5565b606091505b50915091506118d6868383876118e1565b925050509392505050565b606083156119445760008351141561193c576118fc856115b0565b61193b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016119329061255c565b60405180910390fd5b5b82905061194f565b61194e8383611957565b5b949350505050565b60008251111561196a5781518083602001fd5b806040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161199e919061241a565b60405180910390fd5b60006119ba6119b584612631565b61260c565b9050828152602081018484840111156119d6576119d5612878565b5b6119e18482856127b8565b509392505050565b6000813590506119f881612bb9565b92915050565b600081519050611a0d81612bb9565b92915050565b600081519050611a2281612bd0565b92915050565b600081519050611a3781612be7565b92915050565b60008083601f840112611a5357611a52612864565b5b8235905067ffffffffffffffff811115611a7057611a6f61285f565b5b602083019150836001820283011115611a8c57611a8b612873565b5b9250929050565b600082601f830112611aa857611aa7612864565b5b8135611ab88482602086016119a7565b91505092915050565b600060608284031215611ad757611ad6612869565b5b81905092915050565b600081359050611aef81612bfe565b92915050565b600081519050611b0481612bfe565b92915050565b600060208284031215611b2057611b1f612887565b5b6000611b2e848285016119e9565b91505092915050565b60008060408385031215611b4e57611b4d612887565b5b6000611b5c858286016119e9565b925050602083013567ffffffffffffffff811115611b7d57611b7c61287d565b5b611b8985828601611a93565b9150509250929050565b60008060408385031215611baa57611ba9612887565b5b6000611bb8858286016119fe565b9250506020611bc985828601611af5565b9150509250929050565b600080600060608486031215611bec57611beb612887565b5b6000611bfa868287016119e9565b9350506020611c0b86828701611ae0565b9250506040611c1c868287016119e9565b9150509250925092565b600060208284031215611c3c57611c3b612887565b5b6000611c4a84828501611a13565b91505092915050565b600060208284031215611c6957611c68612887565b5b6000611c7784828501611a28565b91505092915050565b600080600060408486031215611c9957611c98612887565b5b600084013567ffffffffffffffff811115611cb757611cb661287d565b5b611cc386828701611a93565b935050602084013567ffffffffffffffff811115611ce457611ce361287d565b5b611cf086828701611a3d565b92509250509250925092565b600080600060608486031215611d1557611d14612887565b5b600084013567ffffffffffffffff811115611d3357611d3261287d565b5b611d3f86828701611a93565b9350506020611d5086828701611ae0565b9250506040611d61868287016119e9565b9150509250925092565b600080600080600060808688031215611d8757611d86612887565b5b600086013567ffffffffffffffff811115611da557611da461287d565b5b611db188828901611a93565b9550506020611dc288828901611ae0565b9450506040611dd3888289016119e9565b935050606086013567ffffffffffffffff811115611df457611df361287d565b5b611e0088828901611a3d565b92509250509295509295909350565b60008060008060008060a08789031215611e2c57611e2b612887565b5b600087013567ffffffffffffffff811115611e4a57611e4961287d565b5b611e5689828a01611ac1565b9650506020611e6789828a016119e9565b9550506040611e7889828a01611ae0565b9450506060611e8989828a016119e9565b935050608087013567ffffffffffffffff811115611eaa57611ea961287d565b5b611eb689828a01611a3d565b92509250509295509295509295565b600060208284031215611edb57611eda612887565b5b6000611ee984828501611af5565b91505092915050565b611efb81612747565b82525050565b611f0a81612747565b82525050565b611f1981612765565b82525050565b6000611f2b8385612678565b9350611f388385846127b8565b611f418361288c565b840190509392505050565b6000611f588385612689565b9350611f658385846127b8565b611f6e8361288c565b840190509392505050565b6000611f8482612662565b611f8e8185612689565b9350611f9e8185602086016127c7565b611fa78161288c565b840191505092915050565b6000611fbd82612662565b611fc7818561269a565b9350611fd78185602086016127c7565b80840191505092915050565b611fec816127a6565b82525050565b6000611ffd8261266d565b61200781856126a5565b93506120178185602086016127c7565b6120208161288c565b840191505092915050565b60006120386026836126a5565b91506120438261289d565b604082019050919050565b600061205b602c836126a5565b9150612066826128ec565b604082019050919050565b600061207e602c836126a5565b91506120898261293b565b604082019050919050565b60006120a16038836126a5565b91506120ac8261298a565b604082019050919050565b60006120c46029836126a5565b91506120cf826129d9565b604082019050919050565b60006120e7602e836126a5565b91506120f282612a28565b604082019050919050565b600061210a602e836126a5565b915061211582612a77565b604082019050919050565b600061212d602d836126a5565b915061213882612ac6565b604082019050919050565b60006121506020836126a5565b915061215b82612b15565b602082019050919050565b6000612173600083612689565b915061217e82612b3e565b600082019050919050565b6000612196601d836126a5565b91506121a182612b41565b602082019050919050565b60006121b9602b836126a5565b91506121c482612b6a565b604082019050919050565b6000606083016121e260008401846126cd565b85830360008701526121f5838284611f1f565b9250505061220660208401846126b6565b6122136020860182611ef2565b506122216040840184612730565b61222e6040860182612239565b508091505092915050565b6122428161278f565b82525050565b6122518161278f565b82525050565b60006122638284611fb2565b915081905092915050565b60006020820190506122836000830184611f01565b92915050565b600060608201905061229e6000830186611f01565b6122ab6020830185611f01565b6122b86040830184612248565b949350505050565b60006040820190506122d56000830185611f01565b6122e26020830184612248565b9392505050565b60006020820190506122fe6000830184611f10565b92915050565b6000604082019050818103600083015261231e8186611f79565b90508181036020830152612333818486611f4c565b9050949350505050565b600060a08201905081810360008301526123578189611f79565b90506123666020830188612248565b6123736040830187612248565b6123806060830186612248565b8181036080830152612393818486611f4c565b9050979650505050505050565b600060a08201905081810360008301526123ba8187611f79565b90506123c96020830186612248565b6123d66040830185612248565b6123e36060830184612248565b81810360808301526123f481612166565b905095945050505050565b60006020820190506124146000830184611fe3565b92915050565b600060208201905081810360008301526124348184611ff2565b905092915050565b600060208201905081810360008301526124558161202b565b9050919050565b600060208201905081810360008301526124758161204e565b9050919050565b6000602082019050818103600083015261249581612071565b9050919050565b600060208201905081810360008301526124b581612094565b9050919050565b600060208201905081810360008301526124d5816120b7565b9050919050565b600060208201905081810360008301526124f5816120da565b9050919050565b60006020820190508181036000830152612515816120fd565b9050919050565b6000602082019050818103600083015261253581612120565b9050919050565b6000602082019050818103600083015261255581612143565b9050919050565b6000602082019050818103600083015261257581612189565b9050919050565b60006020820190508181036000830152612595816121ac565b9050919050565b600060808201905081810360008301526125b681886121cf565b90506125c56020830187611f01565b6125d26040830186612248565b81810360608301526125e5818486611f4c565b90509695505050505050565b60006020820190506126066000830184612248565b92915050565b6000612616612627565b905061262282826127fa565b919050565b6000604051905090565b600067ffffffffffffffff82111561264c5761264b61282b565b5b6126558261288c565b9050602081019050919050565b600081519050919050565b600081519050919050565b600082825260208201905092915050565b600082825260208201905092915050565b600081905092915050565b600082825260208201905092915050565b60006126c560208401846119e9565b905092915050565b600080833560016020038436030381126126ea576126e9612882565b5b83810192508235915060208301925067ffffffffffffffff8211156127125761271161285a565b5b6001820236038413156127285761272761286e565b5b509250929050565b600061273f6020840184611ae0565b905092915050565b60006127528261276f565b9050919050565b60008115159050919050565b6000819050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b60006127b182612799565b9050919050565b82818337600083830152505050565b60005b838110156127e55780820151818401526020810190506127ca565b838111156127f4576000848401525b50505050565b6128038261288c565b810181811067ffffffffffffffff821117156128225761282161282b565b5b80604052505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b7f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060008201527f64656c656761746563616c6c0000000000000000000000000000000000000000602082015250565b7f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060008201527f6163746976652070726f78790000000000000000000000000000000000000000602082015250565b7f555550535570677261646561626c653a206d757374206e6f742062652063616c60008201527f6c6564207468726f7567682064656c656761746563616c6c0000000000000000602082015250565b7f45524331393637557067726164653a20756e737570706f727465642070726f7860008201527f6961626c65555549440000000000000000000000000000000000000000000000602082015250565b7f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160008201527f647920696e697469616c697a6564000000000000000000000000000000000000602082015250565b7f45524331393637557067726164653a206e657720696d706c656d656e7461746960008201527f6f6e206973206e6f742055555053000000000000000000000000000000000000602082015250565b7f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60008201527f6f74206120636f6e747261637400000000000000000000000000000000000000602082015250565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b50565b7f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000600082015250565b7f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960008201527f6e697469616c697a696e67000000000000000000000000000000000000000000602082015250565b612bc281612747565b8114612bcd57600080fd5b50565b612bd981612759565b8114612be457600080fd5b50565b612bf081612765565b8114612bfb57600080fd5b50565b612c078161278f565b8114612c1257600080fd5b5056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a2646970667358221220d791071fca3eb6f4d8ee341d9d051caa2cc3da51b34ac59d695c4cced2a1daf464736f6c63430008070033", } // GatewayZEVMABI is the input ABI used to generate the binding from. @@ -882,26 +882,22 @@ func (it *GatewayZEVMCallIterator) Close() error { // GatewayZEVMCall represents a Call event raised by the GatewayZEVM contract. type GatewayZEVMCall struct { Sender common.Address - Receiver common.Hash + Receiver []byte Message []byte Raw types.Log // Blockchain specific contextual infos } // FilterCall is a free log retrieval operation binding the contract event 0x2b5af078ce280d812dc2241658dc5435c93408020e5418eef55a2b536de51c0f. // -// Solidity: event Call(address indexed sender, bytes indexed receiver, bytes message) -func (_GatewayZEVM *GatewayZEVMFilterer) FilterCall(opts *bind.FilterOpts, sender []common.Address, receiver [][]byte) (*GatewayZEVMCallIterator, error) { +// Solidity: event Call(address indexed sender, bytes receiver, bytes message) +func (_GatewayZEVM *GatewayZEVMFilterer) FilterCall(opts *bind.FilterOpts, sender []common.Address) (*GatewayZEVMCallIterator, error) { var senderRule []interface{} for _, senderItem := range sender { senderRule = append(senderRule, senderItem) } - var receiverRule []interface{} - for _, receiverItem := range receiver { - receiverRule = append(receiverRule, receiverItem) - } - logs, sub, err := _GatewayZEVM.contract.FilterLogs(opts, "Call", senderRule, receiverRule) + logs, sub, err := _GatewayZEVM.contract.FilterLogs(opts, "Call", senderRule) if err != nil { return nil, err } @@ -910,19 +906,15 @@ func (_GatewayZEVM *GatewayZEVMFilterer) FilterCall(opts *bind.FilterOpts, sende // WatchCall is a free log subscription operation binding the contract event 0x2b5af078ce280d812dc2241658dc5435c93408020e5418eef55a2b536de51c0f. // -// Solidity: event Call(address indexed sender, bytes indexed receiver, bytes message) -func (_GatewayZEVM *GatewayZEVMFilterer) WatchCall(opts *bind.WatchOpts, sink chan<- *GatewayZEVMCall, sender []common.Address, receiver [][]byte) (event.Subscription, error) { +// Solidity: event Call(address indexed sender, bytes receiver, bytes message) +func (_GatewayZEVM *GatewayZEVMFilterer) WatchCall(opts *bind.WatchOpts, sink chan<- *GatewayZEVMCall, sender []common.Address) (event.Subscription, error) { var senderRule []interface{} for _, senderItem := range sender { senderRule = append(senderRule, senderItem) } - var receiverRule []interface{} - for _, receiverItem := range receiver { - receiverRule = append(receiverRule, receiverItem) - } - logs, sub, err := _GatewayZEVM.contract.WatchLogs(opts, "Call", senderRule, receiverRule) + logs, sub, err := _GatewayZEVM.contract.WatchLogs(opts, "Call", senderRule) if err != nil { return nil, err } @@ -956,7 +948,7 @@ func (_GatewayZEVM *GatewayZEVMFilterer) WatchCall(opts *bind.WatchOpts, sink ch // ParseCall is a log parse operation binding the contract event 0x2b5af078ce280d812dc2241658dc5435c93408020e5418eef55a2b536de51c0f. // -// Solidity: event Call(address indexed sender, bytes indexed receiver, bytes message) +// Solidity: event Call(address indexed sender, bytes receiver, bytes message) func (_GatewayZEVM *GatewayZEVMFilterer) ParseCall(log types.Log) (*GatewayZEVMCall, error) { event := new(GatewayZEVMCall) if err := _GatewayZEVM.contract.UnpackLog(event, "Call", log); err != nil { diff --git a/pkg/contracts/prototypes/zevm/sender.sol/sender.go b/pkg/contracts/prototypes/zevm/senderzevm.sol/senderzevm.go similarity index 58% rename from pkg/contracts/prototypes/zevm/sender.sol/sender.go rename to pkg/contracts/prototypes/zevm/senderzevm.sol/senderzevm.go index 3f0bd6f4..77c21d44 100644 --- a/pkg/contracts/prototypes/zevm/sender.sol/sender.go +++ b/pkg/contracts/prototypes/zevm/senderzevm.sol/senderzevm.go @@ -1,7 +1,7 @@ // Code generated - DO NOT EDIT. // This file is a generated binding and any manual changes will be lost. -package sender +package senderzevm import ( "errors" @@ -29,23 +29,23 @@ var ( _ = abi.ConvertType ) -// SenderMetaData contains all meta data concerning the Sender contract. -var SenderMetaData = &bind.MetaData{ +// SenderZEVMMetaData contains all meta data concerning the SenderZEVM contract. +var SenderZEVMMetaData = &bind.MetaData{ ABI: "[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_gateway\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"ApprovalFailed\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"receiver\",\"type\":\"bytes\"},{\"internalType\":\"string\",\"name\":\"str\",\"type\":\"string\"},{\"internalType\":\"uint256\",\"name\":\"num\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"flag\",\"type\":\"bool\"}],\"name\":\"callReceiver\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"gateway\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"receiver\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"zrc20\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"str\",\"type\":\"string\"},{\"internalType\":\"uint256\",\"name\":\"num\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"flag\",\"type\":\"bool\"}],\"name\":\"withdrawAndCallReceiver\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", - Bin: "0x608060405234801561001057600080fd5b50604051610bcd380380610bcd8339818101604052810190610032919061008d565b806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050610108565b600081519050610087816100f1565b92915050565b6000602082840312156100a3576100a26100ec565b5b60006100b184828501610078565b91505092915050565b60006100c5826100cc565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600080fd5b6100fa816100ba565b811461010557600080fd5b50565b610ab6806101176000396000f3fe608060405234801561001057600080fd5b50600436106100415760003560e01c80630abd890514610046578063116191b614610062578063a0a1730b14610080575b600080fd5b610060600480360381019061005b91906105fd565b61009c565b005b61006a6102af565b6040516100779190610761565b60405180910390f35b61009a6004803603810190610095919061055e565b6102d3565b005b60008383836040516024016100b39392919061082f565b6040516020818303038152906040527fe04d4f97000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff838183161783525050505090508473ffffffffffffffffffffffffffffffffffffffff1663095ea7b360008054906101000a900473ffffffffffffffffffffffffffffffffffffffff16886040518363ffffffff1660e01b815260040161018d92919061077c565b602060405180830381600087803b1580156101a757600080fd5b505af11580156101bb573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101df9190610531565b610215576040517f8164f84200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16637993c1e0888888856040518563ffffffff1660e01b815260040161027494939291906107dc565b600060405180830381600087803b15801561028e57600080fd5b505af11580156102a2573d6000803e3d6000fd5b5050505050505050505050565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008383836040516024016102ea9392919061082f565b6040516020818303038152906040527fe04d4f97000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050905060008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16630ac7c44c86836040518363ffffffff1660e01b81526004016103c49291906107a5565b600060405180830381600087803b1580156103de57600080fd5b505af11580156103f2573d6000803e3d6000fd5b505050505050505050565b600061041061040b84610892565b61086d565b90508281526020810184848401111561042c5761042b610a1b565b5b610437848285610974565b509392505050565b600061045261044d846108c3565b61086d565b90508281526020810184848401111561046e5761046d610a1b565b5b610479848285610974565b509392505050565b60008135905061049081610a3b565b92915050565b6000813590506104a581610a52565b92915050565b6000815190506104ba81610a52565b92915050565b600082601f8301126104d5576104d4610a16565b5b81356104e58482602086016103fd565b91505092915050565b600082601f83011261050357610502610a16565b5b813561051384826020860161043f565b91505092915050565b60008135905061052b81610a69565b92915050565b60006020828403121561054757610546610a25565b5b6000610555848285016104ab565b91505092915050565b6000806000806080858703121561057857610577610a25565b5b600085013567ffffffffffffffff81111561059657610595610a20565b5b6105a2878288016104c0565b945050602085013567ffffffffffffffff8111156105c3576105c2610a20565b5b6105cf878288016104ee565b93505060406105e08782880161051c565b92505060606105f187828801610496565b91505092959194509250565b60008060008060008060c0878903121561061a57610619610a25565b5b600087013567ffffffffffffffff81111561063857610637610a20565b5b61064489828a016104c0565b965050602061065589828a0161051c565b955050604061066689828a01610481565b945050606087013567ffffffffffffffff81111561068757610686610a20565b5b61069389828a016104ee565b93505060806106a489828a0161051c565b92505060a06106b589828a01610496565b9150509295509295509295565b6106cb8161092c565b82525050565b6106da8161093e565b82525050565b60006106eb826108f4565b6106f5818561090a565b9350610705818560208601610983565b61070e81610a2a565b840191505092915050565b6000610724826108ff565b61072e818561091b565b935061073e818560208601610983565b61074781610a2a565b840191505092915050565b61075b8161096a565b82525050565b600060208201905061077660008301846106c2565b92915050565b600060408201905061079160008301856106c2565b61079e6020830184610752565b9392505050565b600060408201905081810360008301526107bf81856106e0565b905081810360208301526107d381846106e0565b90509392505050565b600060808201905081810360008301526107f681876106e0565b90506108056020830186610752565b61081260408301856106c2565b818103606083015261082481846106e0565b905095945050505050565b600060608201905081810360008301526108498186610719565b90506108586020830185610752565b61086560408301846106d1565b949350505050565b6000610877610888565b905061088382826109b6565b919050565b6000604051905090565b600067ffffffffffffffff8211156108ad576108ac6109e7565b5b6108b682610a2a565b9050602081019050919050565b600067ffffffffffffffff8211156108de576108dd6109e7565b5b6108e782610a2a565b9050602081019050919050565b600081519050919050565b600081519050919050565b600082825260208201905092915050565b600082825260208201905092915050565b60006109378261094a565b9050919050565b60008115159050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b82818337600083830152505050565b60005b838110156109a1578082015181840152602081019050610986565b838111156109b0576000848401525b50505050565b6109bf82610a2a565b810181811067ffffffffffffffff821117156109de576109dd6109e7565b5b80604052505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b610a448161092c565b8114610a4f57600080fd5b50565b610a5b8161093e565b8114610a6657600080fd5b50565b610a728161096a565b8114610a7d57600080fd5b5056fea2646970667358221220ef1adb339e85463eb7fc8992fa1513ffe98ce4f59d2fb2b57db08574d1cccd0864736f6c63430008070033", + Bin: "0x608060405234801561001057600080fd5b50604051610bcd380380610bcd8339818101604052810190610032919061008d565b806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050610108565b600081519050610087816100f1565b92915050565b6000602082840312156100a3576100a26100ec565b5b60006100b184828501610078565b91505092915050565b60006100c5826100cc565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600080fd5b6100fa816100ba565b811461010557600080fd5b50565b610ab6806101176000396000f3fe608060405234801561001057600080fd5b50600436106100415760003560e01c80630abd890514610046578063116191b614610062578063a0a1730b14610080575b600080fd5b610060600480360381019061005b91906105fd565b61009c565b005b61006a6102af565b6040516100779190610761565b60405180910390f35b61009a6004803603810190610095919061055e565b6102d3565b005b60008383836040516024016100b39392919061082f565b6040516020818303038152906040527fe04d4f97000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff838183161783525050505090508473ffffffffffffffffffffffffffffffffffffffff1663095ea7b360008054906101000a900473ffffffffffffffffffffffffffffffffffffffff16886040518363ffffffff1660e01b815260040161018d92919061077c565b602060405180830381600087803b1580156101a757600080fd5b505af11580156101bb573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101df9190610531565b610215576040517f8164f84200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16637993c1e0888888856040518563ffffffff1660e01b815260040161027494939291906107dc565b600060405180830381600087803b15801561028e57600080fd5b505af11580156102a2573d6000803e3d6000fd5b5050505050505050505050565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008383836040516024016102ea9392919061082f565b6040516020818303038152906040527fe04d4f97000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050905060008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16630ac7c44c86836040518363ffffffff1660e01b81526004016103c49291906107a5565b600060405180830381600087803b1580156103de57600080fd5b505af11580156103f2573d6000803e3d6000fd5b505050505050505050565b600061041061040b84610892565b61086d565b90508281526020810184848401111561042c5761042b610a1b565b5b610437848285610974565b509392505050565b600061045261044d846108c3565b61086d565b90508281526020810184848401111561046e5761046d610a1b565b5b610479848285610974565b509392505050565b60008135905061049081610a3b565b92915050565b6000813590506104a581610a52565b92915050565b6000815190506104ba81610a52565b92915050565b600082601f8301126104d5576104d4610a16565b5b81356104e58482602086016103fd565b91505092915050565b600082601f83011261050357610502610a16565b5b813561051384826020860161043f565b91505092915050565b60008135905061052b81610a69565b92915050565b60006020828403121561054757610546610a25565b5b6000610555848285016104ab565b91505092915050565b6000806000806080858703121561057857610577610a25565b5b600085013567ffffffffffffffff81111561059657610595610a20565b5b6105a2878288016104c0565b945050602085013567ffffffffffffffff8111156105c3576105c2610a20565b5b6105cf878288016104ee565b93505060406105e08782880161051c565b92505060606105f187828801610496565b91505092959194509250565b60008060008060008060c0878903121561061a57610619610a25565b5b600087013567ffffffffffffffff81111561063857610637610a20565b5b61064489828a016104c0565b965050602061065589828a0161051c565b955050604061066689828a01610481565b945050606087013567ffffffffffffffff81111561068757610686610a20565b5b61069389828a016104ee565b93505060806106a489828a0161051c565b92505060a06106b589828a01610496565b9150509295509295509295565b6106cb8161092c565b82525050565b6106da8161093e565b82525050565b60006106eb826108f4565b6106f5818561090a565b9350610705818560208601610983565b61070e81610a2a565b840191505092915050565b6000610724826108ff565b61072e818561091b565b935061073e818560208601610983565b61074781610a2a565b840191505092915050565b61075b8161096a565b82525050565b600060208201905061077660008301846106c2565b92915050565b600060408201905061079160008301856106c2565b61079e6020830184610752565b9392505050565b600060408201905081810360008301526107bf81856106e0565b905081810360208301526107d381846106e0565b90509392505050565b600060808201905081810360008301526107f681876106e0565b90506108056020830186610752565b61081260408301856106c2565b818103606083015261082481846106e0565b905095945050505050565b600060608201905081810360008301526108498186610719565b90506108586020830185610752565b61086560408301846106d1565b949350505050565b6000610877610888565b905061088382826109b6565b919050565b6000604051905090565b600067ffffffffffffffff8211156108ad576108ac6109e7565b5b6108b682610a2a565b9050602081019050919050565b600067ffffffffffffffff8211156108de576108dd6109e7565b5b6108e782610a2a565b9050602081019050919050565b600081519050919050565b600081519050919050565b600082825260208201905092915050565b600082825260208201905092915050565b60006109378261094a565b9050919050565b60008115159050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b82818337600083830152505050565b60005b838110156109a1578082015181840152602081019050610986565b838111156109b0576000848401525b50505050565b6109bf82610a2a565b810181811067ffffffffffffffff821117156109de576109dd6109e7565b5b80604052505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b610a448161092c565b8114610a4f57600080fd5b50565b610a5b8161093e565b8114610a6657600080fd5b50565b610a728161096a565b8114610a7d57600080fd5b5056fea26469706673582212208a3927b16976e0767f2cbe9ff03b81fd6a157ff79229c4f70c5c63c32ee2810164736f6c63430008070033", } -// SenderABI is the input ABI used to generate the binding from. -// Deprecated: Use SenderMetaData.ABI instead. -var SenderABI = SenderMetaData.ABI +// SenderZEVMABI is the input ABI used to generate the binding from. +// Deprecated: Use SenderZEVMMetaData.ABI instead. +var SenderZEVMABI = SenderZEVMMetaData.ABI -// SenderBin is the compiled bytecode used for deploying new contracts. -// Deprecated: Use SenderMetaData.Bin instead. -var SenderBin = SenderMetaData.Bin +// SenderZEVMBin is the compiled bytecode used for deploying new contracts. +// Deprecated: Use SenderZEVMMetaData.Bin instead. +var SenderZEVMBin = SenderZEVMMetaData.Bin -// DeploySender deploys a new Ethereum contract, binding an instance of Sender to it. -func DeploySender(auth *bind.TransactOpts, backend bind.ContractBackend, _gateway common.Address) (common.Address, *types.Transaction, *Sender, error) { - parsed, err := SenderMetaData.GetAbi() +// DeploySenderZEVM deploys a new Ethereum contract, binding an instance of SenderZEVM to it. +func DeploySenderZEVM(auth *bind.TransactOpts, backend bind.ContractBackend, _gateway common.Address) (common.Address, *types.Transaction, *SenderZEVM, error) { + parsed, err := SenderZEVMMetaData.GetAbi() if err != nil { return common.Address{}, nil, nil, err } @@ -53,111 +53,111 @@ func DeploySender(auth *bind.TransactOpts, backend bind.ContractBackend, _gatewa return common.Address{}, nil, nil, errors.New("GetABI returned nil") } - address, tx, contract, err := bind.DeployContract(auth, *parsed, common.FromHex(SenderBin), backend, _gateway) + address, tx, contract, err := bind.DeployContract(auth, *parsed, common.FromHex(SenderZEVMBin), backend, _gateway) if err != nil { return common.Address{}, nil, nil, err } - return address, tx, &Sender{SenderCaller: SenderCaller{contract: contract}, SenderTransactor: SenderTransactor{contract: contract}, SenderFilterer: SenderFilterer{contract: contract}}, nil + return address, tx, &SenderZEVM{SenderZEVMCaller: SenderZEVMCaller{contract: contract}, SenderZEVMTransactor: SenderZEVMTransactor{contract: contract}, SenderZEVMFilterer: SenderZEVMFilterer{contract: contract}}, nil } -// Sender is an auto generated Go binding around an Ethereum contract. -type Sender struct { - SenderCaller // Read-only binding to the contract - SenderTransactor // Write-only binding to the contract - SenderFilterer // Log filterer for contract events +// SenderZEVM is an auto generated Go binding around an Ethereum contract. +type SenderZEVM struct { + SenderZEVMCaller // Read-only binding to the contract + SenderZEVMTransactor // Write-only binding to the contract + SenderZEVMFilterer // Log filterer for contract events } -// SenderCaller is an auto generated read-only Go binding around an Ethereum contract. -type SenderCaller struct { +// SenderZEVMCaller is an auto generated read-only Go binding around an Ethereum contract. +type SenderZEVMCaller struct { contract *bind.BoundContract // Generic contract wrapper for the low level calls } -// SenderTransactor is an auto generated write-only Go binding around an Ethereum contract. -type SenderTransactor struct { +// SenderZEVMTransactor is an auto generated write-only Go binding around an Ethereum contract. +type SenderZEVMTransactor struct { contract *bind.BoundContract // Generic contract wrapper for the low level calls } -// SenderFilterer is an auto generated log filtering Go binding around an Ethereum contract events. -type SenderFilterer struct { +// SenderZEVMFilterer is an auto generated log filtering Go binding around an Ethereum contract events. +type SenderZEVMFilterer struct { contract *bind.BoundContract // Generic contract wrapper for the low level calls } -// SenderSession is an auto generated Go binding around an Ethereum contract, +// SenderZEVMSession is an auto generated Go binding around an Ethereum contract, // with pre-set call and transact options. -type SenderSession struct { - Contract *Sender // Generic contract binding to set the session for +type SenderZEVMSession struct { + Contract *SenderZEVM // Generic contract binding to set the session for CallOpts bind.CallOpts // Call options to use throughout this session TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session } -// SenderCallerSession is an auto generated read-only Go binding around an Ethereum contract, +// SenderZEVMCallerSession is an auto generated read-only Go binding around an Ethereum contract, // with pre-set call options. -type SenderCallerSession struct { - Contract *SenderCaller // Generic contract caller binding to set the session for - CallOpts bind.CallOpts // Call options to use throughout this session +type SenderZEVMCallerSession struct { + Contract *SenderZEVMCaller // Generic contract caller binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session } -// SenderTransactorSession is an auto generated write-only Go binding around an Ethereum contract, +// SenderZEVMTransactorSession is an auto generated write-only Go binding around an Ethereum contract, // with pre-set transact options. -type SenderTransactorSession struct { - Contract *SenderTransactor // Generic contract transactor binding to set the session for - TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +type SenderZEVMTransactorSession struct { + Contract *SenderZEVMTransactor // Generic contract transactor binding to set the session for + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session } -// SenderRaw is an auto generated low-level Go binding around an Ethereum contract. -type SenderRaw struct { - Contract *Sender // Generic contract binding to access the raw methods on +// SenderZEVMRaw is an auto generated low-level Go binding around an Ethereum contract. +type SenderZEVMRaw struct { + Contract *SenderZEVM // Generic contract binding to access the raw methods on } -// SenderCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. -type SenderCallerRaw struct { - Contract *SenderCaller // Generic read-only contract binding to access the raw methods on +// SenderZEVMCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. +type SenderZEVMCallerRaw struct { + Contract *SenderZEVMCaller // Generic read-only contract binding to access the raw methods on } -// SenderTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. -type SenderTransactorRaw struct { - Contract *SenderTransactor // Generic write-only contract binding to access the raw methods on +// SenderZEVMTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. +type SenderZEVMTransactorRaw struct { + Contract *SenderZEVMTransactor // Generic write-only contract binding to access the raw methods on } -// NewSender creates a new instance of Sender, bound to a specific deployed contract. -func NewSender(address common.Address, backend bind.ContractBackend) (*Sender, error) { - contract, err := bindSender(address, backend, backend, backend) +// NewSenderZEVM creates a new instance of SenderZEVM, bound to a specific deployed contract. +func NewSenderZEVM(address common.Address, backend bind.ContractBackend) (*SenderZEVM, error) { + contract, err := bindSenderZEVM(address, backend, backend, backend) if err != nil { return nil, err } - return &Sender{SenderCaller: SenderCaller{contract: contract}, SenderTransactor: SenderTransactor{contract: contract}, SenderFilterer: SenderFilterer{contract: contract}}, nil + return &SenderZEVM{SenderZEVMCaller: SenderZEVMCaller{contract: contract}, SenderZEVMTransactor: SenderZEVMTransactor{contract: contract}, SenderZEVMFilterer: SenderZEVMFilterer{contract: contract}}, nil } -// NewSenderCaller creates a new read-only instance of Sender, bound to a specific deployed contract. -func NewSenderCaller(address common.Address, caller bind.ContractCaller) (*SenderCaller, error) { - contract, err := bindSender(address, caller, nil, nil) +// NewSenderZEVMCaller creates a new read-only instance of SenderZEVM, bound to a specific deployed contract. +func NewSenderZEVMCaller(address common.Address, caller bind.ContractCaller) (*SenderZEVMCaller, error) { + contract, err := bindSenderZEVM(address, caller, nil, nil) if err != nil { return nil, err } - return &SenderCaller{contract: contract}, nil + return &SenderZEVMCaller{contract: contract}, nil } -// NewSenderTransactor creates a new write-only instance of Sender, bound to a specific deployed contract. -func NewSenderTransactor(address common.Address, transactor bind.ContractTransactor) (*SenderTransactor, error) { - contract, err := bindSender(address, nil, transactor, nil) +// NewSenderZEVMTransactor creates a new write-only instance of SenderZEVM, bound to a specific deployed contract. +func NewSenderZEVMTransactor(address common.Address, transactor bind.ContractTransactor) (*SenderZEVMTransactor, error) { + contract, err := bindSenderZEVM(address, nil, transactor, nil) if err != nil { return nil, err } - return &SenderTransactor{contract: contract}, nil + return &SenderZEVMTransactor{contract: contract}, nil } -// NewSenderFilterer creates a new log filterer instance of Sender, bound to a specific deployed contract. -func NewSenderFilterer(address common.Address, filterer bind.ContractFilterer) (*SenderFilterer, error) { - contract, err := bindSender(address, nil, nil, filterer) +// NewSenderZEVMFilterer creates a new log filterer instance of SenderZEVM, bound to a specific deployed contract. +func NewSenderZEVMFilterer(address common.Address, filterer bind.ContractFilterer) (*SenderZEVMFilterer, error) { + contract, err := bindSenderZEVM(address, nil, nil, filterer) if err != nil { return nil, err } - return &SenderFilterer{contract: contract}, nil + return &SenderZEVMFilterer{contract: contract}, nil } -// bindSender binds a generic wrapper to an already deployed contract. -func bindSender(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { - parsed, err := SenderMetaData.GetAbi() +// bindSenderZEVM binds a generic wrapper to an already deployed contract. +func bindSenderZEVM(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := SenderZEVMMetaData.GetAbi() if err != nil { return nil, err } @@ -168,46 +168,46 @@ func bindSender(address common.Address, caller bind.ContractCaller, transactor b // sets the output to result. The result type might be a single field for simple // returns, a slice of interfaces for anonymous returns and a struct for named // returns. -func (_Sender *SenderRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { - return _Sender.Contract.SenderCaller.contract.Call(opts, result, method, params...) +func (_SenderZEVM *SenderZEVMRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _SenderZEVM.Contract.SenderZEVMCaller.contract.Call(opts, result, method, params...) } // Transfer initiates a plain transaction to move funds to the contract, calling // its default method if one is available. -func (_Sender *SenderRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _Sender.Contract.SenderTransactor.contract.Transfer(opts) +func (_SenderZEVM *SenderZEVMRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _SenderZEVM.Contract.SenderZEVMTransactor.contract.Transfer(opts) } // Transact invokes the (paid) contract method with params as input values. -func (_Sender *SenderRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _Sender.Contract.SenderTransactor.contract.Transact(opts, method, params...) +func (_SenderZEVM *SenderZEVMRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _SenderZEVM.Contract.SenderZEVMTransactor.contract.Transact(opts, method, params...) } // Call invokes the (constant) contract method with params as input values and // sets the output to result. The result type might be a single field for simple // returns, a slice of interfaces for anonymous returns and a struct for named // returns. -func (_Sender *SenderCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { - return _Sender.Contract.contract.Call(opts, result, method, params...) +func (_SenderZEVM *SenderZEVMCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _SenderZEVM.Contract.contract.Call(opts, result, method, params...) } // Transfer initiates a plain transaction to move funds to the contract, calling // its default method if one is available. -func (_Sender *SenderTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _Sender.Contract.contract.Transfer(opts) +func (_SenderZEVM *SenderZEVMTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _SenderZEVM.Contract.contract.Transfer(opts) } // Transact invokes the (paid) contract method with params as input values. -func (_Sender *SenderTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _Sender.Contract.contract.Transact(opts, method, params...) +func (_SenderZEVM *SenderZEVMTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _SenderZEVM.Contract.contract.Transact(opts, method, params...) } // Gateway is a free data retrieval call binding the contract method 0x116191b6. // // Solidity: function gateway() view returns(address) -func (_Sender *SenderCaller) Gateway(opts *bind.CallOpts) (common.Address, error) { +func (_SenderZEVM *SenderZEVMCaller) Gateway(opts *bind.CallOpts) (common.Address, error) { var out []interface{} - err := _Sender.contract.Call(opts, &out, "gateway") + err := _SenderZEVM.contract.Call(opts, &out, "gateway") if err != nil { return *new(common.Address), err @@ -222,55 +222,55 @@ func (_Sender *SenderCaller) Gateway(opts *bind.CallOpts) (common.Address, error // Gateway is a free data retrieval call binding the contract method 0x116191b6. // // Solidity: function gateway() view returns(address) -func (_Sender *SenderSession) Gateway() (common.Address, error) { - return _Sender.Contract.Gateway(&_Sender.CallOpts) +func (_SenderZEVM *SenderZEVMSession) Gateway() (common.Address, error) { + return _SenderZEVM.Contract.Gateway(&_SenderZEVM.CallOpts) } // Gateway is a free data retrieval call binding the contract method 0x116191b6. // // Solidity: function gateway() view returns(address) -func (_Sender *SenderCallerSession) Gateway() (common.Address, error) { - return _Sender.Contract.Gateway(&_Sender.CallOpts) +func (_SenderZEVM *SenderZEVMCallerSession) Gateway() (common.Address, error) { + return _SenderZEVM.Contract.Gateway(&_SenderZEVM.CallOpts) } // CallReceiver is a paid mutator transaction binding the contract method 0xa0a1730b. // // Solidity: function callReceiver(bytes receiver, string str, uint256 num, bool flag) returns() -func (_Sender *SenderTransactor) CallReceiver(opts *bind.TransactOpts, receiver []byte, str string, num *big.Int, flag bool) (*types.Transaction, error) { - return _Sender.contract.Transact(opts, "callReceiver", receiver, str, num, flag) +func (_SenderZEVM *SenderZEVMTransactor) CallReceiver(opts *bind.TransactOpts, receiver []byte, str string, num *big.Int, flag bool) (*types.Transaction, error) { + return _SenderZEVM.contract.Transact(opts, "callReceiver", receiver, str, num, flag) } // CallReceiver is a paid mutator transaction binding the contract method 0xa0a1730b. // // Solidity: function callReceiver(bytes receiver, string str, uint256 num, bool flag) returns() -func (_Sender *SenderSession) CallReceiver(receiver []byte, str string, num *big.Int, flag bool) (*types.Transaction, error) { - return _Sender.Contract.CallReceiver(&_Sender.TransactOpts, receiver, str, num, flag) +func (_SenderZEVM *SenderZEVMSession) CallReceiver(receiver []byte, str string, num *big.Int, flag bool) (*types.Transaction, error) { + return _SenderZEVM.Contract.CallReceiver(&_SenderZEVM.TransactOpts, receiver, str, num, flag) } // CallReceiver is a paid mutator transaction binding the contract method 0xa0a1730b. // // Solidity: function callReceiver(bytes receiver, string str, uint256 num, bool flag) returns() -func (_Sender *SenderTransactorSession) CallReceiver(receiver []byte, str string, num *big.Int, flag bool) (*types.Transaction, error) { - return _Sender.Contract.CallReceiver(&_Sender.TransactOpts, receiver, str, num, flag) +func (_SenderZEVM *SenderZEVMTransactorSession) CallReceiver(receiver []byte, str string, num *big.Int, flag bool) (*types.Transaction, error) { + return _SenderZEVM.Contract.CallReceiver(&_SenderZEVM.TransactOpts, receiver, str, num, flag) } // WithdrawAndCallReceiver is a paid mutator transaction binding the contract method 0x0abd8905. // // Solidity: function withdrawAndCallReceiver(bytes receiver, uint256 amount, address zrc20, string str, uint256 num, bool flag) returns() -func (_Sender *SenderTransactor) WithdrawAndCallReceiver(opts *bind.TransactOpts, receiver []byte, amount *big.Int, zrc20 common.Address, str string, num *big.Int, flag bool) (*types.Transaction, error) { - return _Sender.contract.Transact(opts, "withdrawAndCallReceiver", receiver, amount, zrc20, str, num, flag) +func (_SenderZEVM *SenderZEVMTransactor) WithdrawAndCallReceiver(opts *bind.TransactOpts, receiver []byte, amount *big.Int, zrc20 common.Address, str string, num *big.Int, flag bool) (*types.Transaction, error) { + return _SenderZEVM.contract.Transact(opts, "withdrawAndCallReceiver", receiver, amount, zrc20, str, num, flag) } // WithdrawAndCallReceiver is a paid mutator transaction binding the contract method 0x0abd8905. // // Solidity: function withdrawAndCallReceiver(bytes receiver, uint256 amount, address zrc20, string str, uint256 num, bool flag) returns() -func (_Sender *SenderSession) WithdrawAndCallReceiver(receiver []byte, amount *big.Int, zrc20 common.Address, str string, num *big.Int, flag bool) (*types.Transaction, error) { - return _Sender.Contract.WithdrawAndCallReceiver(&_Sender.TransactOpts, receiver, amount, zrc20, str, num, flag) +func (_SenderZEVM *SenderZEVMSession) WithdrawAndCallReceiver(receiver []byte, amount *big.Int, zrc20 common.Address, str string, num *big.Int, flag bool) (*types.Transaction, error) { + return _SenderZEVM.Contract.WithdrawAndCallReceiver(&_SenderZEVM.TransactOpts, receiver, amount, zrc20, str, num, flag) } // WithdrawAndCallReceiver is a paid mutator transaction binding the contract method 0x0abd8905. // // Solidity: function withdrawAndCallReceiver(bytes receiver, uint256 amount, address zrc20, string str, uint256 num, bool flag) returns() -func (_Sender *SenderTransactorSession) WithdrawAndCallReceiver(receiver []byte, amount *big.Int, zrc20 common.Address, str string, num *big.Int, flag bool) (*types.Transaction, error) { - return _Sender.Contract.WithdrawAndCallReceiver(&_Sender.TransactOpts, receiver, amount, zrc20, str, num, flag) +func (_SenderZEVM *SenderZEVMTransactorSession) WithdrawAndCallReceiver(receiver []byte, amount *big.Int, zrc20 common.Address, str string, num *big.Int, flag bool) (*types.Transaction, error) { + return _SenderZEVM.Contract.WithdrawAndCallReceiver(&_SenderZEVM.TransactOpts, receiver, amount, zrc20, str, num, flag) } diff --git a/scripts/readme.md b/scripts/readme.md new file mode 100644 index 00000000..1db37dc0 --- /dev/null +++ b/scripts/readme.md @@ -0,0 +1,15 @@ +## Worker script + +To start localnet execute: + +``` +yarn localnet +``` + +This will run hardhat local node and worker script, which will deploy all contracts, and listen and react to events, facilitating communication between contracts. +Tasks to interact with localnet are located in `tasks/localnet`. To make use of default contract addresses on localnet, start localnet from scratch, so contracts are deployed on same addresses. Otherwise, provide custom addresses as tasks parameters. + +To only show logs from worker and hide hardhat node logs: +``` +yarn localnet --hide="NODE" +``` \ No newline at end of file diff --git a/scripts/worker.ts b/scripts/worker.ts new file mode 100644 index 00000000..aaf749a9 --- /dev/null +++ b/scripts/worker.ts @@ -0,0 +1,202 @@ +import { AddressZero } from "@ethersproject/constants"; +import { SignerWithAddress } from "@nomiclabs/hardhat-ethers/signers"; +import { SystemContract, ZRC20 } from "@typechain-types"; +import { parseEther } from "ethers/lib/utils"; +import { ethers, upgrades } from "hardhat"; + +const hre = require("hardhat"); + +export const FUNGIBLE_MODULE_ADDRESS = "0x735b14BB79463307AAcBED86DAf3322B1e6226aB"; + +const deploySystemContracts = async (tss: SignerWithAddress) => { + // Prepare EVM + // Deploy system contracts (gateway and custody) + const GatewayEVM = await ethers.getContractFactory("GatewayEVM"); + const Custody = await ethers.getContractFactory("ERC20CustodyNew"); + + const gatewayEVM = await upgrades.deployProxy(GatewayEVM, [tss.address], { + initializer: "initialize", + kind: "uups", + }); + console.log("GatewayEVM:", gatewayEVM.address); + + const custody = await Custody.deploy(gatewayEVM.address); + await gatewayEVM.setCustody(custody.address); + + // Prepare ZEVM + // Deploy system contracts (gateway and system) + const SystemContractFactory = await ethers.getContractFactory("SystemContractMock"); + const systemContract = (await SystemContractFactory.deploy(AddressZero, AddressZero, AddressZero)) as SystemContract; + + const GatewayZEVM = await ethers.getContractFactory("GatewayZEVM"); + const gatewayZEVM = await upgrades.deployProxy(GatewayZEVM, [], { + initializer: "initialize", + kind: "uups", + }); + console.log("GatewayZEVM:", gatewayZEVM.address); + + return { + custody, + gatewayEVM, + gatewayZEVM, + systemContract, + }; +}; + +const deployTestContracts = async ( + systemContracts, + ownerEVM: SignerWithAddress, + ownerZEVM: SignerWithAddress, + fungibleModuleSigner: SignerWithAddress +) => { + // Prepare EVM + // Deploy test contracts (erc20, receiver) and mint funds to test accounts + const TestERC20 = await ethers.getContractFactory("TestERC20"); + const ReceiverEVM = await ethers.getContractFactory("ReceiverEVM"); + + const token = await TestERC20.deploy("Test Token", "TTK"); + const receiverEVM = await ReceiverEVM.deploy(); + await token.mint(ownerEVM.address, ethers.utils.parseEther("1000")); + + // Transfer some tokens to the custody contract + await token.transfer(systemContracts.custody.address, ethers.utils.parseEther("500")); + + // Prepare ZEVM + // Deploy test contracts (test zContract, zrc20, sender) and mint funds to test accounts + const TestZContract = await ethers.getContractFactory("TestZContract"); + const testZContract = await TestZContract.deploy(); + + const ZRC20Factory = await ethers.getContractFactory("ZRC20New"); + const ZRC20Contract = (await ZRC20Factory.connect(fungibleModuleSigner).deploy( + "TOKEN", + "TKN", + 18, + 1, + 1, + 0, + systemContracts.systemContract.address, + systemContracts.gatewayZEVM.address + )) as ZRC20; + + await systemContracts.systemContract.setGasCoinZRC20(1, ZRC20Contract.address); + await systemContracts.systemContract.setGasPrice(1, ZRC20Contract.address); + await ZRC20Contract.connect(fungibleModuleSigner).deposit(ownerZEVM.address, parseEther("100")); + await ZRC20Contract.connect(ownerZEVM).approve(systemContracts.gatewayZEVM.address, parseEther("100")); + + // Include abi of gatewayZEVM events, so hardhat can decode them automatically + const senderArtifact = await hre.artifacts.readArtifact("SenderZEVM"); + const gatewayZEVMArtifact = await hre.artifacts.readArtifact("GatewayZEVM"); + const senderABI = [ + ...senderArtifact.abi, + ...gatewayZEVMArtifact.abi.filter((f: ethers.utils.Fragment) => f.type === "event"), + ]; + + const SenderZEVM = new ethers.ContractFactory(senderABI, senderArtifact.bytecode, ownerZEVM); + const senderZEVM = await SenderZEVM.deploy(systemContracts.gatewayZEVM.address); + await ZRC20Contract.connect(fungibleModuleSigner).deposit(senderZEVM.address, parseEther("100")); + + return { + ZRC20Contract, + receiverEVM, + senderZEVM, + testZContract, + }; +}; + +export const startWorker = async () => { + const [ownerEVM, ownerZEVM, tss] = await ethers.getSigners(); + + // Impersonate the fungible module account + await hre.network.provider.request({ + method: "hardhat_impersonateAccount", + params: [FUNGIBLE_MODULE_ADDRESS], + }); + + // Get a signer for the fungible module account + const fungibleModuleSigner = await ethers.getSigner(FUNGIBLE_MODULE_ADDRESS); + hre.network.provider.send("hardhat_setBalance", [FUNGIBLE_MODULE_ADDRESS, parseEther("1000000").toHexString()]); + + // Deploy system and test contracts + const systemContracts = await deploySystemContracts(tss); + const testContracts = await deployTestContracts(systemContracts, ownerEVM, ownerZEVM, fungibleModuleSigner); + + // Listen to contracts events + // event Call(address indexed sender, bytes receiver, bytes message); + systemContracts.gatewayZEVM.on("Call", async (...args: Array) => { + console.log("Worker: Call event on GatewayZEVM."); + console.log("Worker: Calling ReceiverEVM through GatewayEVM..."); + const receiver = args[1]; + const message = args[2]; + const executeTx = await systemContracts.gatewayEVM.execute(receiver, message, { value: 0 }); + await executeTx.wait(); + }); + + // event Withdrawal(address indexed from, bytes to, uint256 value, uint256 gasfee, uint256 protocolFlatFee, bytes message); + systemContracts.gatewayZEVM.on("Withdrawal", async (...args: Array) => { + console.log("Worker: Withdrawal event on GatewayZEVM."); + const receiver = args[1]; + const message = args[5]; + if (message != "0x") { + console.log("Worker: Calling ReceiverEVM through GatewayEVM..."); + const executeTx = await systemContracts.gatewayEVM.execute(receiver, message, { value: 0 }); + await executeTx.wait(); + } + }); + + testContracts.receiverEVM.on("ReceivedPayable", () => { + console.log("ReceiverEVM: receivePayable called!"); + }); + + // event Call(address indexed sender, address indexed receiver, bytes payload); + systemContracts.gatewayEVM.on("Call", async (...args: Array) => { + console.log("Worker: Call event on GatewayEVM."); + console.log("Worker: Calling TestZContract through GatewayZEVM..."); + const zContract = args[1]; + const payload = args[2]; + const executeTx = await systemContracts.gatewayZEVM.connect(fungibleModuleSigner).execute( + [systemContracts.gatewayZEVM.address, fungibleModuleSigner.address, 1], + // onCrosschainCall contains zrc20 and amount which is not available in Call event + testContracts.ZRC20Contract.address, + parseEther("0"), + zContract, + payload + ); + await executeTx.wait(); + }); + + // event Deposit(address indexed sender, address indexed receiver, uint256 amount, address asset, bytes payload); + systemContracts.gatewayEVM.on("Deposit", async (...args: Array) => { + console.log("Worker: Deposit event on GatewayEVM."); + const receiver = args[1]; + const asset = args[3]; + const payload = args[4]; + if (payload != "0x") { + console.log("Worker: Calling TestZContract through GatewayZEVM..."); + const executeTx = await systemContracts.gatewayZEVM + .connect(fungibleModuleSigner) + .execute( + [systemContracts.gatewayZEVM.address, fungibleModuleSigner.address, 1], + asset, + parseEther("0"), + receiver, + payload + ); + await executeTx.wait(); + } + }); + + testContracts.testZContract.on("ContextData", async () => { + console.log("TestZContract: onCrosschainCall called!"); + }); + + process.stdin.resume(); +}; + +startWorker() + .then(() => { + console.log("Setup complete, monitoring events. Press CTRL+C to exit."); + }) + .catch((error) => { + console.error("Failed to deploy contracts or set up listeners:", error); + process.exit(1); + }); diff --git a/tasks/localnet.ts b/tasks/localnet.ts new file mode 100644 index 00000000..b57f21a9 --- /dev/null +++ b/tasks/localnet.ts @@ -0,0 +1,104 @@ +import { task } from "hardhat/config"; + +declare const hre: any; + +// Contains tasks to make it easier to interact with prototype contracts localnet. +// To make use of default contract addresses on localnet, start localnet from scratch, so contracts are deployed on same addresses. +// Otherwise, provide custom addresses as parameters. + +task("zevm-call", "calls evm contract from zevm account") + .addOptionalParam("gatewayZEVM", "contract address of gateway on ZEVM", "0x413b1AfCa96a3df5A686d8BFBF93d30688a7f7D9") + .addOptionalParam("receiverEVM", "contract address of receiver on EVM", "0x821f3361D454cc98b7555221A06Be563a7E2E0A6") + .setAction(async (taskArgs) => { + const gatewayZEVM = await hre.ethers.getContractAt("GatewayZEVM", taskArgs.gatewayZEVM); + const receiverEVM = await hre.ethers.getContractAt("ReceiverEVM", taskArgs.receiverEVM); + + const str = "Hello!"; + const num = 42; + const flag = true; + + // Encode the function call data and call on zevm + const message = receiverEVM.interface.encodeFunctionData("receivePayable", [str, num, flag]); + try { + const callTx = await gatewayZEVM.call(receiverEVM.address, message); + await callTx.wait(); + console.log("ReceiverEVM called from ZEVM"); + } catch (e) { + console.error("Error calling ReceiverEVM:", e); + } + }); + +task("zevm-withdraw-and-call", "withdraws zrc20 and calls evm contract from zevm account") + .addOptionalParam("gatewayZEVM", "contract address of gateway on ZEVM", "0x413b1AfCa96a3df5A686d8BFBF93d30688a7f7D9") + .addOptionalParam("receiverEVM", "contract address of receiver on EVM", "0x821f3361D454cc98b7555221A06Be563a7E2E0A6") + .addOptionalParam("zrc20", "contract address of zrc20", "0x9fd96203f7b22bCF72d9DCb40ff98302376cE09c") + .addOptionalParam("amount", "amount to withdraw", "1") + .setAction(async (taskArgs) => { + const gatewayZEVM = await hre.ethers.getContractAt("GatewayZEVM", taskArgs.gatewayZEVM); + const receiverEVM = await hre.ethers.getContractAt("ReceiverEVM", taskArgs.receiverEVM); + const zrc20 = await hre.ethers.getContractAt("ZRC20New", taskArgs.zrc20); + const [, ownerZEVM] = await hre.ethers.getSigners(); + + const str = "Hello!"; + const num = 42; + const flag = true; + + // Encode the function call data and call on zevm + const message = receiverEVM.interface.encodeFunctionData("receivePayable", [str, num, flag]); + + try { + const callTx = await gatewayZEVM + .connect(ownerZEVM) + .withdrawAndCall(receiverEVM.address, hre.ethers.utils.parseEther(taskArgs.amount), zrc20.address, message); + await callTx.wait(); + console.log("ReceiverEVM called from ZEVM"); + } catch (e) { + console.error("Error calling ReciverEVM:", e); + } + }); + +task("evm-call", "calls zevm zcontract from evm account") + .addOptionalParam("gatewayEVM", "contract address of gateway on EVM", "0xB06c856C8eaBd1d8321b687E188204C1018BC4E5") + .addOptionalParam("zContract", "contract address of zContract on ZEVM", "0x71089Ba41e478702e1904692385Be3972B2cBf9e") + .setAction(async (taskArgs) => { + const gatewayEVM = await hre.ethers.getContractAt("GatewayEVM", taskArgs.gatewayEVM); + const zContract = await hre.ethers.getContractAt("TestZContract", taskArgs.zContract); + + const message = hre.ethers.utils.defaultAbiCoder.encode(["string"], ["hello"]); + + try { + const callTx = await gatewayEVM.call(zContract.address, message); + await callTx.wait(); + console.log("TestZContract called from EVM"); + } catch (e) { + console.error("Error calling TestZContract:", e); + } + }); + +task("evm-deposit-and-call", "deposits erc20 and calls zevm zcontract from evm account") + .addOptionalParam("gatewayEVM", "contract address of gateway on EVM", "0xB06c856C8eaBd1d8321b687E188204C1018BC4E5") + .addOptionalParam("zContract", "contract address of zContract on ZEVM", "0x71089Ba41e478702e1904692385Be3972B2cBf9e") + .addOptionalParam("erc20", "contract address of erc20", "0x02df3a3F960393F5B349E40A599FEda91a7cc1A7") + .addOptionalParam("amount", "amount to deposit", "1") + .setAction(async (taskArgs) => { + const gatewayEVM = await hre.ethers.getContractAt("GatewayEVM", taskArgs.gatewayEVM); + const zContract = await hre.ethers.getContractAt("TestZContract", taskArgs.zContract); + const erc20 = await hre.ethers.getContractAt("TestERC20", taskArgs.erc20); + + await erc20.approve(gatewayEVM.address, hre.ethers.utils.parseEther(taskArgs.amount)); + + const payload = hre.ethers.utils.defaultAbiCoder.encode(["string"], ["hello"]); + + try { + const callTx = await gatewayEVM["depositAndCall(address,uint256,address,bytes)"]( + zContract.address, + hre.ethers.utils.parseEther(taskArgs.amount), + erc20.address, + payload + ); + await callTx.wait(); + console.log("TestZContract called from EVM"); + } catch (e) { + console.error("Error calling TestZContract:", e); + } + }); diff --git a/test/prototypes/GatewayEVM.spec.ts b/test/prototypes/GatewayEVM.spec.ts index 7a5ba2e8..8e0b3c77 100644 --- a/test/prototypes/GatewayEVM.spec.ts +++ b/test/prototypes/GatewayEVM.spec.ts @@ -11,7 +11,7 @@ describe("GatewayEVM inbound", function () { beforeEach(async function () { const TestERC20 = await ethers.getContractFactory("TestERC20"); - const Receiver = await ethers.getContractFactory("Receiver"); + const Receiver = await ethers.getContractFactory("ReceiverEVM"); const Gateway = await ethers.getContractFactory("GatewayEVM"); const Custody = await ethers.getContractFactory("ERC20CustodyNew"); [owner, destination, tssAddress] = await ethers.getSigners(); @@ -34,7 +34,7 @@ describe("GatewayEVM inbound", function () { await token.transfer(custody.address, ethers.utils.parseEther("500")); }); - it("should forward call to Receiver's receiveA function", async function () { + it("should forward call to Receiver's receivePayable function", async function () { const str = "Hello, Hardhat!"; const num = 42; const flag = true; diff --git a/test/prototypes/GatewayEVMUpgrade.spec.ts b/test/prototypes/GatewayEVMUpgrade.spec.ts index bc46a4df..8e663ea1 100644 --- a/test/prototypes/GatewayEVMUpgrade.spec.ts +++ b/test/prototypes/GatewayEVMUpgrade.spec.ts @@ -11,7 +11,7 @@ describe("GatewayEVM upgrade", function () { beforeEach(async function () { const TestERC20 = await ethers.getContractFactory("TestERC20"); - const Receiver = await ethers.getContractFactory("Receiver"); + const Receiver = await ethers.getContractFactory("ReceiverEVM"); const Gateway = await ethers.getContractFactory("GatewayEVM"); const Custody = await ethers.getContractFactory("ERC20CustodyNew"); [owner, destination, randomSigner, tssAddress] = await ethers.getSigners(); diff --git a/test/prototypes/GatewayIntegration.spec.ts b/test/prototypes/GatewayIntegration.spec.ts index bd81a9e3..998c63bc 100644 --- a/test/prototypes/GatewayIntegration.spec.ts +++ b/test/prototypes/GatewayIntegration.spec.ts @@ -29,7 +29,7 @@ describe("GatewayEVM GatewayZEVM integration", function () { [ownerEVM, ownerZEVM, destination, tssAddress, ...addrs] = await ethers.getSigners(); // Prepare EVM const TestERC20 = await ethers.getContractFactory("TestERC20"); - const ReceiverEVM = await ethers.getContractFactory("Receiver"); + const ReceiverEVM = await ethers.getContractFactory("ReceiverEVM"); const GatewayEVM = await ethers.getContractFactory("GatewayEVM"); const Custody = await ethers.getContractFactory("ERC20CustodyNew"); @@ -89,7 +89,7 @@ describe("GatewayEVM GatewayZEVM integration", function () { await ZRC20Contract.connect(ownerZEVM).approve(gatewayZEVM.address, parseEther("100")); // including abi of gatewayZEVM events, so hardhat can decode them automatically - const senderArtifact = await hre.artifacts.readArtifact("Sender"); + const senderArtifact = await hre.artifacts.readArtifact("SenderZEVM"); const gatewayZEVMArtifact = await hre.artifacts.readArtifact("GatewayZEVM"); const senderABI = [ ...senderArtifact.abi, @@ -102,7 +102,7 @@ describe("GatewayEVM GatewayZEVM integration", function () { await ZRC20Contract.connect(fungibleModuleSigner).deposit(senderZEVM.address, parseEther("100")); }); - it("should call Receiver contract on EVM from ZEVM account", async function () { + it("should call ReceiverEVM from ZEVM account", async function () { const str = "Hello, Hardhat!"; const num = 42; const flag = true; @@ -110,8 +110,10 @@ describe("GatewayEVM GatewayZEVM integration", function () { // Encode the function call data and call on zevm const message = receiverEVM.interface.encodeFunctionData("receivePayable", [str, num, flag]); - const callTx = await gatewayZEVM.connect(ownerZEVM).call(ethers.utils.arrayify(addrs[0].address), message); - await expect(callTx).to.emit(gatewayZEVM, "Call").withArgs(ownerZEVM.address, addrs[0].address, message); + const callTx = await gatewayZEVM.connect(ownerZEVM).call(receiverEVM.address, message); + await expect(callTx) + .to.emit(gatewayZEVM, "Call") + .withArgs(ownerZEVM.address, receiverEVM.address.toLowerCase(), message); // Get message from events const callTxReceipt = await callTx.wait(); @@ -126,7 +128,7 @@ describe("GatewayEVM GatewayZEVM integration", function () { await expect(executeTx).to.emit(receiverEVM, "ReceivedPayable").withArgs(gatewayEVM.address, value, str, num, flag); }); - it("should withdraw and call Receiver contract on EVM from ZEVM account", async function () { + it("should withdraw and call ReceiverEVM from ZEVM account", async function () { const str = "Hello, Hardhat!"; const num = 42; const flag = true; @@ -165,7 +167,7 @@ describe("GatewayEVM GatewayZEVM integration", function () { expect(balanceOfAfterWithdrawal).to.equal(parseEther("99")); }); - it("should call Receiver contract on EVM from Sender contract on ZEVM", async function () { + it("should call ReceiverEVM from SenderZEVM", async function () { const str = "Hello, Hardhat!"; const num = 42; const flag = true; @@ -179,7 +181,7 @@ describe("GatewayEVM GatewayZEVM integration", function () { const expectedMessage = receiverEVM.interface.encodeFunctionData("receivePayable", [str, num, flag]); await expect(callTx) .to.emit(gatewayZEVM, "Call") - .withArgs(senderZEVM.address, receiverEVM.address, expectedMessage); + .withArgs(senderZEVM.address, receiverEVM.address.toLowerCase(), expectedMessage); const callEvent = callTxReceipt.events[0]; const callMessage = callEvent.args[2]; @@ -192,7 +194,7 @@ describe("GatewayEVM GatewayZEVM integration", function () { await expect(executeTx).to.emit(receiverEVM, "ReceivedPayable").withArgs(gatewayEVM.address, value, str, num, flag); }); - it("should withdrawn and call Receiver contract on EVM from Sender contract on ZEVM", async function () { + it("should withdrawn and call ReceiverEVM from SenderZEVM", async function () { const str = "Hello, Hardhat!"; const num = 42; const flag = true; diff --git a/typechain-types/contracts/prototypes/evm/ReceiverEVM.ts b/typechain-types/contracts/prototypes/evm/ReceiverEVM.ts new file mode 100644 index 00000000..1608a7a7 --- /dev/null +++ b/typechain-types/contracts/prototypes/evm/ReceiverEVM.ts @@ -0,0 +1,360 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type { + BaseContract, + BigNumber, + BigNumberish, + BytesLike, + CallOverrides, + ContractTransaction, + Overrides, + PayableOverrides, + PopulatedTransaction, + Signer, + utils, +} from "ethers"; +import type { + FunctionFragment, + Result, + EventFragment, +} from "@ethersproject/abi"; +import type { Listener, Provider } from "@ethersproject/providers"; +import type { + TypedEventFilter, + TypedEvent, + TypedListener, + OnEvent, + PromiseOrValue, +} from "../../../common"; + +export interface ReceiverEVMInterface extends utils.Interface { + functions: { + "receiveERC20(uint256,address,address)": FunctionFragment; + "receiveNoParams()": FunctionFragment; + "receiveNonPayable(string[],uint256[],bool)": FunctionFragment; + "receivePayable(string,uint256,bool)": FunctionFragment; + }; + + getFunction( + nameOrSignatureOrTopic: + | "receiveERC20" + | "receiveNoParams" + | "receiveNonPayable" + | "receivePayable" + ): FunctionFragment; + + encodeFunctionData( + functionFragment: "receiveERC20", + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ] + ): string; + encodeFunctionData( + functionFragment: "receiveNoParams", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "receiveNonPayable", + values: [ + PromiseOrValue[], + PromiseOrValue[], + PromiseOrValue + ] + ): string; + encodeFunctionData( + functionFragment: "receivePayable", + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ] + ): string; + + decodeFunctionResult( + functionFragment: "receiveERC20", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "receiveNoParams", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "receiveNonPayable", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "receivePayable", + data: BytesLike + ): Result; + + events: { + "ReceivedERC20(address,uint256,address,address)": EventFragment; + "ReceivedNoParams(address)": EventFragment; + "ReceivedNonPayable(address,string[],uint256[],bool)": EventFragment; + "ReceivedPayable(address,uint256,string,uint256,bool)": EventFragment; + }; + + getEvent(nameOrSignatureOrTopic: "ReceivedERC20"): EventFragment; + getEvent(nameOrSignatureOrTopic: "ReceivedNoParams"): EventFragment; + getEvent(nameOrSignatureOrTopic: "ReceivedNonPayable"): EventFragment; + getEvent(nameOrSignatureOrTopic: "ReceivedPayable"): EventFragment; +} + +export interface ReceivedERC20EventObject { + sender: string; + amount: BigNumber; + token: string; + destination: string; +} +export type ReceivedERC20Event = TypedEvent< + [string, BigNumber, string, string], + ReceivedERC20EventObject +>; + +export type ReceivedERC20EventFilter = TypedEventFilter; + +export interface ReceivedNoParamsEventObject { + sender: string; +} +export type ReceivedNoParamsEvent = TypedEvent< + [string], + ReceivedNoParamsEventObject +>; + +export type ReceivedNoParamsEventFilter = + TypedEventFilter; + +export interface ReceivedNonPayableEventObject { + sender: string; + strs: string[]; + nums: BigNumber[]; + flag: boolean; +} +export type ReceivedNonPayableEvent = TypedEvent< + [string, string[], BigNumber[], boolean], + ReceivedNonPayableEventObject +>; + +export type ReceivedNonPayableEventFilter = + TypedEventFilter; + +export interface ReceivedPayableEventObject { + sender: string; + value: BigNumber; + str: string; + num: BigNumber; + flag: boolean; +} +export type ReceivedPayableEvent = TypedEvent< + [string, BigNumber, string, BigNumber, boolean], + ReceivedPayableEventObject +>; + +export type ReceivedPayableEventFilter = TypedEventFilter; + +export interface ReceiverEVM extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + interface: ReceiverEVMInterface; + + queryFilter( + event: TypedEventFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>; + + listeners( + eventFilter?: TypedEventFilter + ): Array>; + listeners(eventName?: string): Array; + removeAllListeners( + eventFilter: TypedEventFilter + ): this; + removeAllListeners(eventName?: string): this; + off: OnEvent; + on: OnEvent; + once: OnEvent; + removeListener: OnEvent; + + functions: { + receiveERC20( + amount: PromiseOrValue, + token: PromiseOrValue, + destination: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + receiveNoParams( + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + receiveNonPayable( + strs: PromiseOrValue[], + nums: PromiseOrValue[], + flag: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + receivePayable( + str: PromiseOrValue, + num: PromiseOrValue, + flag: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + }; + + receiveERC20( + amount: PromiseOrValue, + token: PromiseOrValue, + destination: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + receiveNoParams( + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + receiveNonPayable( + strs: PromiseOrValue[], + nums: PromiseOrValue[], + flag: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + receivePayable( + str: PromiseOrValue, + num: PromiseOrValue, + flag: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + callStatic: { + receiveERC20( + amount: PromiseOrValue, + token: PromiseOrValue, + destination: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + receiveNoParams(overrides?: CallOverrides): Promise; + + receiveNonPayable( + strs: PromiseOrValue[], + nums: PromiseOrValue[], + flag: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + receivePayable( + str: PromiseOrValue, + num: PromiseOrValue, + flag: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + }; + + filters: { + "ReceivedERC20(address,uint256,address,address)"( + sender?: null, + amount?: null, + token?: null, + destination?: null + ): ReceivedERC20EventFilter; + ReceivedERC20( + sender?: null, + amount?: null, + token?: null, + destination?: null + ): ReceivedERC20EventFilter; + + "ReceivedNoParams(address)"(sender?: null): ReceivedNoParamsEventFilter; + ReceivedNoParams(sender?: null): ReceivedNoParamsEventFilter; + + "ReceivedNonPayable(address,string[],uint256[],bool)"( + sender?: null, + strs?: null, + nums?: null, + flag?: null + ): ReceivedNonPayableEventFilter; + ReceivedNonPayable( + sender?: null, + strs?: null, + nums?: null, + flag?: null + ): ReceivedNonPayableEventFilter; + + "ReceivedPayable(address,uint256,string,uint256,bool)"( + sender?: null, + value?: null, + str?: null, + num?: null, + flag?: null + ): ReceivedPayableEventFilter; + ReceivedPayable( + sender?: null, + value?: null, + str?: null, + num?: null, + flag?: null + ): ReceivedPayableEventFilter; + }; + + estimateGas: { + receiveERC20( + amount: PromiseOrValue, + token: PromiseOrValue, + destination: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + receiveNoParams( + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + receiveNonPayable( + strs: PromiseOrValue[], + nums: PromiseOrValue[], + flag: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + receivePayable( + str: PromiseOrValue, + num: PromiseOrValue, + flag: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + }; + + populateTransaction: { + receiveERC20( + amount: PromiseOrValue, + token: PromiseOrValue, + destination: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + receiveNoParams( + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + receiveNonPayable( + strs: PromiseOrValue[], + nums: PromiseOrValue[], + flag: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + receivePayable( + str: PromiseOrValue, + num: PromiseOrValue, + flag: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + }; +} diff --git a/typechain-types/contracts/prototypes/evm/index.ts b/typechain-types/contracts/prototypes/evm/index.ts index 356b9286..939b9af8 100644 --- a/typechain-types/contracts/prototypes/evm/index.ts +++ b/typechain-types/contracts/prototypes/evm/index.ts @@ -6,5 +6,5 @@ export type { interfacesSol }; export type { ERC20CustodyNew } from "./ERC20CustodyNew"; export type { GatewayEVM } from "./GatewayEVM"; export type { GatewayEVMUpgradeTest } from "./GatewayEVMUpgradeTest"; -export type { Receiver } from "./Receiver"; +export type { ReceiverEVM } from "./ReceiverEVM"; export type { TestERC20 } from "./TestERC20"; diff --git a/typechain-types/contracts/prototypes/zevm/GatewayZEVM.ts b/typechain-types/contracts/prototypes/zevm/GatewayZEVM.ts index 04d1fed5..a9dde1e5 100644 --- a/typechain-types/contracts/prototypes/zevm/GatewayZEVM.ts +++ b/typechain-types/contracts/prototypes/zevm/GatewayZEVM.ts @@ -554,12 +554,12 @@ export interface GatewayZEVM extends BaseContract { "Call(address,bytes,bytes)"( sender?: PromiseOrValue | null, - receiver?: PromiseOrValue | null, + receiver?: null, message?: null ): CallEventFilter; Call( sender?: PromiseOrValue | null, - receiver?: PromiseOrValue | null, + receiver?: null, message?: null ): CallEventFilter; diff --git a/typechain-types/contracts/prototypes/zevm/SenderZEVM.ts b/typechain-types/contracts/prototypes/zevm/SenderZEVM.ts new file mode 100644 index 00000000..26711238 --- /dev/null +++ b/typechain-types/contracts/prototypes/zevm/SenderZEVM.ts @@ -0,0 +1,210 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type { + BaseContract, + BigNumber, + BigNumberish, + BytesLike, + CallOverrides, + ContractTransaction, + Overrides, + PopulatedTransaction, + Signer, + utils, +} from "ethers"; +import type { FunctionFragment, Result } from "@ethersproject/abi"; +import type { Listener, Provider } from "@ethersproject/providers"; +import type { + TypedEventFilter, + TypedEvent, + TypedListener, + OnEvent, + PromiseOrValue, +} from "../../../common"; + +export interface SenderZEVMInterface extends utils.Interface { + functions: { + "callReceiver(bytes,string,uint256,bool)": FunctionFragment; + "gateway()": FunctionFragment; + "withdrawAndCallReceiver(bytes,uint256,address,string,uint256,bool)": FunctionFragment; + }; + + getFunction( + nameOrSignatureOrTopic: + | "callReceiver" + | "gateway" + | "withdrawAndCallReceiver" + ): FunctionFragment; + + encodeFunctionData( + functionFragment: "callReceiver", + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ] + ): string; + encodeFunctionData(functionFragment: "gateway", values?: undefined): string; + encodeFunctionData( + functionFragment: "withdrawAndCallReceiver", + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ] + ): string; + + decodeFunctionResult( + functionFragment: "callReceiver", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "gateway", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "withdrawAndCallReceiver", + data: BytesLike + ): Result; + + events: {}; +} + +export interface SenderZEVM extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + interface: SenderZEVMInterface; + + queryFilter( + event: TypedEventFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>; + + listeners( + eventFilter?: TypedEventFilter + ): Array>; + listeners(eventName?: string): Array; + removeAllListeners( + eventFilter: TypedEventFilter + ): this; + removeAllListeners(eventName?: string): this; + off: OnEvent; + on: OnEvent; + once: OnEvent; + removeListener: OnEvent; + + functions: { + callReceiver( + receiver: PromiseOrValue, + str: PromiseOrValue, + num: PromiseOrValue, + flag: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + gateway(overrides?: CallOverrides): Promise<[string]>; + + withdrawAndCallReceiver( + receiver: PromiseOrValue, + amount: PromiseOrValue, + zrc20: PromiseOrValue, + str: PromiseOrValue, + num: PromiseOrValue, + flag: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + }; + + callReceiver( + receiver: PromiseOrValue, + str: PromiseOrValue, + num: PromiseOrValue, + flag: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + gateway(overrides?: CallOverrides): Promise; + + withdrawAndCallReceiver( + receiver: PromiseOrValue, + amount: PromiseOrValue, + zrc20: PromiseOrValue, + str: PromiseOrValue, + num: PromiseOrValue, + flag: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + callStatic: { + callReceiver( + receiver: PromiseOrValue, + str: PromiseOrValue, + num: PromiseOrValue, + flag: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + gateway(overrides?: CallOverrides): Promise; + + withdrawAndCallReceiver( + receiver: PromiseOrValue, + amount: PromiseOrValue, + zrc20: PromiseOrValue, + str: PromiseOrValue, + num: PromiseOrValue, + flag: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + }; + + filters: {}; + + estimateGas: { + callReceiver( + receiver: PromiseOrValue, + str: PromiseOrValue, + num: PromiseOrValue, + flag: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + gateway(overrides?: CallOverrides): Promise; + + withdrawAndCallReceiver( + receiver: PromiseOrValue, + amount: PromiseOrValue, + zrc20: PromiseOrValue, + str: PromiseOrValue, + num: PromiseOrValue, + flag: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + }; + + populateTransaction: { + callReceiver( + receiver: PromiseOrValue, + str: PromiseOrValue, + num: PromiseOrValue, + flag: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + gateway(overrides?: CallOverrides): Promise; + + withdrawAndCallReceiver( + receiver: PromiseOrValue, + amount: PromiseOrValue, + zrc20: PromiseOrValue, + str: PromiseOrValue, + num: PromiseOrValue, + flag: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + }; +} diff --git a/typechain-types/contracts/prototypes/zevm/index.ts b/typechain-types/contracts/prototypes/zevm/index.ts index 0bf18c3c..e6090cc6 100644 --- a/typechain-types/contracts/prototypes/zevm/index.ts +++ b/typechain-types/contracts/prototypes/zevm/index.ts @@ -6,5 +6,5 @@ export type { zrc20NewSol }; import type * as interfacesSol from "./interfaces.sol"; export type { interfacesSol }; export type { GatewayZEVM } from "./GatewayZEVM"; -export type { Sender } from "./Sender"; +export type { SenderZEVM } from "./SenderZEVM"; export type { TestZContract } from "./TestZContract"; diff --git a/typechain-types/factories/contracts/prototypes/evm/ReceiverEVM__factory.ts b/typechain-types/factories/contracts/prototypes/evm/ReceiverEVM__factory.ts new file mode 100644 index 00000000..cda804bb --- /dev/null +++ b/typechain-types/factories/contracts/prototypes/evm/ReceiverEVM__factory.ts @@ -0,0 +1,251 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import { Signer, utils, Contract, ContractFactory, Overrides } from "ethers"; +import type { Provider, TransactionRequest } from "@ethersproject/providers"; +import type { PromiseOrValue } from "../../../../common"; +import type { + ReceiverEVM, + ReceiverEVMInterface, +} from "../../../../contracts/prototypes/evm/ReceiverEVM"; + +const _abi = [ + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "sender", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "amount", + type: "uint256", + }, + { + indexed: false, + internalType: "address", + name: "token", + type: "address", + }, + { + indexed: false, + internalType: "address", + name: "destination", + type: "address", + }, + ], + name: "ReceivedERC20", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "sender", + type: "address", + }, + ], + name: "ReceivedNoParams", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "sender", + type: "address", + }, + { + indexed: false, + internalType: "string[]", + name: "strs", + type: "string[]", + }, + { + indexed: false, + internalType: "uint256[]", + name: "nums", + type: "uint256[]", + }, + { + indexed: false, + internalType: "bool", + name: "flag", + type: "bool", + }, + ], + name: "ReceivedNonPayable", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "sender", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "value", + type: "uint256", + }, + { + indexed: false, + internalType: "string", + name: "str", + type: "string", + }, + { + indexed: false, + internalType: "uint256", + name: "num", + type: "uint256", + }, + { + indexed: false, + internalType: "bool", + name: "flag", + type: "bool", + }, + ], + name: "ReceivedPayable", + type: "event", + }, + { + inputs: [ + { + internalType: "uint256", + name: "amount", + type: "uint256", + }, + { + internalType: "address", + name: "token", + type: "address", + }, + { + internalType: "address", + name: "destination", + type: "address", + }, + ], + name: "receiveERC20", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "receiveNoParams", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "string[]", + name: "strs", + type: "string[]", + }, + { + internalType: "uint256[]", + name: "nums", + type: "uint256[]", + }, + { + internalType: "bool", + name: "flag", + type: "bool", + }, + ], + name: "receiveNonPayable", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "string", + name: "str", + type: "string", + }, + { + internalType: "uint256", + name: "num", + type: "uint256", + }, + { + internalType: "bool", + name: "flag", + type: "bool", + }, + ], + name: "receivePayable", + outputs: [], + stateMutability: "payable", + type: "function", + }, +] as const; + +const _bytecode = + "0x608060405234801561001057600080fd5b5061108a806100206000396000f3fe60806040526004361061003f5760003560e01c8063357fc5a2146100445780636ed701691461006d578063e04d4f9714610084578063f05b6abf146100a0575b600080fd5b34801561005057600080fd5b5061006b6004803603810190610066919061085a565b6100c9565b005b34801561007957600080fd5b50610082610138565b005b61009e600480360381019061009991906107eb565b610171565b005b3480156100ac57600080fd5b506100c760048036038101906100c29190610733565b6101b5565b005b6100f63382858573ffffffffffffffffffffffffffffffffffffffff166101f7909392919063ffffffff16565b7f2b58128f24a9f59127cc5b5430d70542b22220f2d9adaa86e442b816ab98af603384848460405161012b9493929190610bb0565b60405180910390a1505050565b7fbcaadb46b82a48af60b608f58959ae6b8310d1b0a0d094c2e9ec3208ed39f2a0336040516101679190610b0b565b60405180910390a1565b7f1f1ff1f5fb41346850b2f5c04e6c767e2f1c8a525c5c0c5cdb60cdf3ca5f62fa33348585856040516101a8959493929190610bf5565b60405180910390a1505050565b7f74a53cd528a921fca7dbdee62f86819051d3cc98f214951f4238e8843f20b146338484846040516101ea9493929190610b5d565b60405180910390a1505050565b61027a846323b872dd60e01b85858560405160240161021893929190610b26565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050610280565b50505050565b60006102e2826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff166103479092919063ffffffff16565b9050600081511115610342578080602001905181019061030291906107be565b610341576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161033890610cb1565b60405180910390fd5b5b505050565b6060610356848460008561035f565b90509392505050565b6060824710156103a4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161039b90610c71565b60405180910390fd5b6000808673ffffffffffffffffffffffffffffffffffffffff1685876040516103cd9190610af4565b60006040518083038185875af1925050503d806000811461040a576040519150601f19603f3d011682016040523d82523d6000602084013e61040f565b606091505b50915091506104208783838761042c565b92505050949350505050565b6060831561048f5760008351141561048757610447856104a2565b610486576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161047d90610c91565b60405180910390fd5b5b82905061049a565b61049983836104c5565b5b949350505050565b6000808273ffffffffffffffffffffffffffffffffffffffff163b119050919050565b6000825111156104d85781518083602001fd5b806040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161050c9190610c4f565b60405180910390fd5b600061052861052384610cf6565b610cd1565b9050808382526020820190508285602086028201111561054b5761054a610f23565b5b60005b8581101561059957813567ffffffffffffffff81111561057157610570610f1e565b5b80860161057e89826106f0565b8552602085019450602084019350505060018101905061054e565b5050509392505050565b60006105b66105b184610d22565b610cd1565b905080838252602082019050828560208602820111156105d9576105d8610f23565b5b60005b8581101561060957816105ef888261071e565b8452602084019350602083019250506001810190506105dc565b5050509392505050565b600061062661062184610d4e565b610cd1565b90508281526020810184848401111561064257610641610f28565b5b61064d848285610e7c565b509392505050565b6000813590506106648161100f565b92915050565b600082601f83011261067f5761067e610f1e565b5b813561068f848260208601610515565b91505092915050565b600082601f8301126106ad576106ac610f1e565b5b81356106bd8482602086016105a3565b91505092915050565b6000813590506106d581611026565b92915050565b6000815190506106ea81611026565b92915050565b600082601f83011261070557610704610f1e565b5b8135610715848260208601610613565b91505092915050565b60008135905061072d8161103d565b92915050565b60008060006060848603121561074c5761074b610f32565b5b600084013567ffffffffffffffff81111561076a57610769610f2d565b5b6107768682870161066a565b935050602084013567ffffffffffffffff81111561079757610796610f2d565b5b6107a386828701610698565b92505060406107b4868287016106c6565b9150509250925092565b6000602082840312156107d4576107d3610f32565b5b60006107e2848285016106db565b91505092915050565b60008060006060848603121561080457610803610f32565b5b600084013567ffffffffffffffff81111561082257610821610f2d565b5b61082e868287016106f0565b935050602061083f8682870161071e565b9250506040610850868287016106c6565b9150509250925092565b60008060006060848603121561087357610872610f32565b5b60006108818682870161071e565b935050602061089286828701610655565b92505060406108a386828701610655565b9150509250925092565b60006108b983836109fb565b905092915050565b60006108cd8383610ad6565b60208301905092915050565b6108e281610e34565b82525050565b60006108f382610d9f565b6108fd8185610de5565b93508360208202850161090f85610d7f565b8060005b8581101561094b578484038952815161092c85826108ad565b945061093783610dcb565b925060208a01995050600181019050610913565b50829750879550505050505092915050565b600061096882610daa565b6109728185610df6565b935061097d83610d8f565b8060005b838110156109ae57815161099588826108c1565b97506109a083610dd8565b925050600181019050610981565b5085935050505092915050565b6109c481610e46565b82525050565b60006109d582610db5565b6109df8185610e07565b93506109ef818560208601610e8b565b80840191505092915050565b6000610a0682610dc0565b610a108185610e12565b9350610a20818560208601610e8b565b610a2981610f37565b840191505092915050565b6000610a3f82610dc0565b610a498185610e23565b9350610a59818560208601610e8b565b610a6281610f37565b840191505092915050565b6000610a7a602683610e23565b9150610a8582610f48565b604082019050919050565b6000610a9d601d83610e23565b9150610aa882610f97565b602082019050919050565b6000610ac0602a83610e23565b9150610acb82610fc0565b604082019050919050565b610adf81610e72565b82525050565b610aee81610e72565b82525050565b6000610b0082846109ca565b915081905092915050565b6000602082019050610b2060008301846108d9565b92915050565b6000606082019050610b3b60008301866108d9565b610b4860208301856108d9565b610b556040830184610ae5565b949350505050565b6000608082019050610b7260008301876108d9565b8181036020830152610b8481866108e8565b90508181036040830152610b98818561095d565b9050610ba760608301846109bb565b95945050505050565b6000608082019050610bc560008301876108d9565b610bd26020830186610ae5565b610bdf60408301856108d9565b610bec60608301846108d9565b95945050505050565b600060a082019050610c0a60008301886108d9565b610c176020830187610ae5565b8181036040830152610c298186610a34565b9050610c386060830185610ae5565b610c4560808301846109bb565b9695505050505050565b60006020820190508181036000830152610c698184610a34565b905092915050565b60006020820190508181036000830152610c8a81610a6d565b9050919050565b60006020820190508181036000830152610caa81610a90565b9050919050565b60006020820190508181036000830152610cca81610ab3565b9050919050565b6000610cdb610cec565b9050610ce78282610ebe565b919050565b6000604051905090565b600067ffffffffffffffff821115610d1157610d10610eef565b5b602082029050602081019050919050565b600067ffffffffffffffff821115610d3d57610d3c610eef565b5b602082029050602081019050919050565b600067ffffffffffffffff821115610d6957610d68610eef565b5b610d7282610f37565b9050602081019050919050565b6000819050602082019050919050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b600081905092915050565b600082825260208201905092915050565b600082825260208201905092915050565b6000610e3f82610e52565b9050919050565b60008115159050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b82818337600083830152505050565b60005b83811015610ea9578082015181840152602081019050610e8e565b83811115610eb8576000848401525b50505050565b610ec782610f37565b810181811067ffffffffffffffff82111715610ee657610ee5610eef565b5b80604052505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f416464726573733a20696e73756666696369656e742062616c616e636520666f60008201527f722063616c6c0000000000000000000000000000000000000000000000000000602082015250565b7f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000600082015250565b7f5361666545524332303a204552433230206f7065726174696f6e20646964206e60008201527f6f74207375636365656400000000000000000000000000000000000000000000602082015250565b61101881610e34565b811461102357600080fd5b50565b61102f81610e46565b811461103a57600080fd5b50565b61104681610e72565b811461105157600080fd5b5056fea2646970667358221220086a1c9f56ed96506c7198d50cf431a5b03003c16cd4168d2395cdedfc1ac06164736f6c63430008070033"; + +type ReceiverEVMConstructorParams = + | [signer?: Signer] + | ConstructorParameters; + +const isSuperArgs = ( + xs: ReceiverEVMConstructorParams +): xs is ConstructorParameters => xs.length > 1; + +export class ReceiverEVM__factory extends ContractFactory { + constructor(...args: ReceiverEVMConstructorParams) { + if (isSuperArgs(args)) { + super(...args); + } else { + super(_abi, _bytecode, args[0]); + } + } + + override deploy( + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise { + return super.deploy(overrides || {}) as Promise; + } + override getDeployTransaction( + overrides?: Overrides & { from?: PromiseOrValue } + ): TransactionRequest { + return super.getDeployTransaction(overrides || {}); + } + override attach(address: string): ReceiverEVM { + return super.attach(address) as ReceiverEVM; + } + override connect(signer: Signer): ReceiverEVM__factory { + return super.connect(signer) as ReceiverEVM__factory; + } + + static readonly bytecode = _bytecode; + static readonly abi = _abi; + static createInterface(): ReceiverEVMInterface { + return new utils.Interface(_abi) as ReceiverEVMInterface; + } + static connect( + address: string, + signerOrProvider: Signer | Provider + ): ReceiverEVM { + return new Contract(address, _abi, signerOrProvider) as ReceiverEVM; + } +} diff --git a/typechain-types/factories/contracts/prototypes/evm/index.ts b/typechain-types/factories/contracts/prototypes/evm/index.ts index d00427f1..b7a35400 100644 --- a/typechain-types/factories/contracts/prototypes/evm/index.ts +++ b/typechain-types/factories/contracts/prototypes/evm/index.ts @@ -5,5 +5,5 @@ export * as interfacesSol from "./interfaces.sol"; export { ERC20CustodyNew__factory } from "./ERC20CustodyNew__factory"; export { GatewayEVM__factory } from "./GatewayEVM__factory"; export { GatewayEVMUpgradeTest__factory } from "./GatewayEVMUpgradeTest__factory"; -export { Receiver__factory } from "./Receiver__factory"; +export { ReceiverEVM__factory } from "./ReceiverEVM__factory"; export { TestERC20__factory } from "./TestERC20__factory"; diff --git a/typechain-types/factories/contracts/prototypes/zevm/GatewayZEVM__factory.ts b/typechain-types/factories/contracts/prototypes/zevm/GatewayZEVM__factory.ts index 34a40dc1..a8e69e9e 100644 --- a/typechain-types/factories/contracts/prototypes/zevm/GatewayZEVM__factory.ts +++ b/typechain-types/factories/contracts/prototypes/zevm/GatewayZEVM__factory.ts @@ -92,7 +92,7 @@ const _abi = [ type: "address", }, { - indexed: true, + indexed: false, internalType: "bytes", name: "receiver", type: "bytes", @@ -487,7 +487,7 @@ const _abi = [ ] as const; const _bytecode = - "0x60a06040523073ffffffffffffffffffffffffffffffffffffffff1660809073ffffffffffffffffffffffffffffffffffffffff1660601b8152503480156200004757600080fd5b50620000586200005e60201b60201c565b62000208565b600060019054906101000a900460ff1615620000b1576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401620000a8906200015c565b60405180910390fd5b60ff801660008054906101000a900460ff1660ff1614620001225760ff6000806101000a81548160ff021916908360ff1602179055507f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb384740249860ff6040516200011991906200017e565b60405180910390a15b565b6000620001336027836200019b565b91506200014082620001b9565b604082019050919050565b6200015681620001ac565b82525050565b60006020820190508181036000830152620001778162000124565b9050919050565b60006020820190506200019560008301846200014b565b92915050565b600082825260208201905092915050565b600060ff82169050919050565b7f496e697469616c697a61626c653a20636f6e747261637420697320696e69746960008201527f616c697a696e6700000000000000000000000000000000000000000000000000602082015250565b60805160601c612c716200024360003960008181610447015281816104d6015281816105e80152818161067701526107270152612c716000f3fe6080604052600436106100dd5760003560e01c80637993c1e01161007f578063bcf7f32b11610059578063bcf7f32b14610251578063c39aca371461027a578063f2fde38b146102a3578063f45346dc146102cc576100dd565b80637993c1e0146101e65780638129fc1c1461020f5780638da5cb5b14610226576100dd565b80633ce4a5bc116100bb5780633ce4a5bc1461015d5780634f1ef2861461018857806352d1902d146101a4578063715018a6146101cf576100dd565b80630ac7c44c146100e2578063135390f91461010b5780633659cfe614610134575b600080fd5b3480156100ee57600080fd5b5061010960048036038101906101049190611c94565b6102f5565b005b34801561011757600080fd5b50610132600480360381019061012d9190611d10565b610360565b005b34801561014057600080fd5b5061015b60048036038101906101569190611b1e565b610445565b005b34801561016957600080fd5b506101726105ce565b60405161017f9190612282565b60405180910390f35b6101a2600480360381019061019d9190611b4b565b6105e6565b005b3480156101b057600080fd5b506101b9610723565b6040516101c691906122fd565b60405180910390f35b3480156101db57600080fd5b506101e46107dc565b005b3480156101f257600080fd5b5061020d60048036038101906102089190611d7f565b6107f0565b005b34801561021b57600080fd5b506102246108db565b005b34801561023257600080fd5b5061023b610a21565b6040516102489190612282565b60405180910390f35b34801561025d57600080fd5b5061027860048036038101906102739190611e23565b610a4b565b005b34801561028657600080fd5b506102a1600480360381019061029c9190611e23565b610b3f565b005b3480156102af57600080fd5b506102ca60048036038101906102c59190611b1e565b610d71565b005b3480156102d857600080fd5b506102f360048036038101906102ee9190611be7565b610df5565b005b82604051610303919061226b565b60405180910390203373ffffffffffffffffffffffffffffffffffffffff167f2b5af078ce280d812dc2241658dc5435c93408020e5418eef55a2b536de51c0f8484604051610353929190612318565b60405180910390a3505050565b600061036c8383610fb1565b90503373ffffffffffffffffffffffffffffffffffffffff167f1866ad2994816c79f4103e1eddacc7b085eb7c635205243a28940be69b01536d8585848673ffffffffffffffffffffffffffffffffffffffff16634d8943bb6040518163ffffffff1660e01b815260040160206040518083038186803b1580156103ef57600080fd5b505afa158015610403573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104279190611ed9565b604051610437949392919061239f565b60405180910390a250505050565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163073ffffffffffffffffffffffffffffffffffffffff1614156104d4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016104cb9061245b565b60405180910390fd5b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166105136112a1565b73ffffffffffffffffffffffffffffffffffffffff1614610569576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105609061247b565b60405180910390fd5b610572816112f8565b6105cb81600067ffffffffffffffff8111156105915761059061282a565b5b6040519080825280601f01601f1916602001820160405280156105c35781602001600182028036833780820191505090505b506000611303565b50565b73735b14bb79463307aacbed86daf3322b1e6226ab81565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163073ffffffffffffffffffffffffffffffffffffffff161415610675576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161066c9061245b565b60405180910390fd5b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166106b46112a1565b73ffffffffffffffffffffffffffffffffffffffff161461070a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107019061247b565b60405180910390fd5b610713826112f8565b61071f82826001611303565b5050565b60007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163073ffffffffffffffffffffffffffffffffffffffff16146107b3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107aa9061249b565b60405180910390fd5b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc60001b905090565b6107e4611480565b6107ee60006114fe565b565b60006107fc8585610fb1565b90503373ffffffffffffffffffffffffffffffffffffffff167f1866ad2994816c79f4103e1eddacc7b085eb7c635205243a28940be69b01536d8787848873ffffffffffffffffffffffffffffffffffffffff16634d8943bb6040518163ffffffff1660e01b815260040160206040518083038186803b15801561087f57600080fd5b505afa158015610893573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108b79190611ed9565b88886040516108cb9695949392919061233c565b60405180910390a2505050505050565b60008060019054906101000a900460ff1615905080801561090c5750600160008054906101000a900460ff1660ff16105b80610939575061091b306115c4565b1580156109385750600160008054906101000a900460ff1660ff16145b5b610978576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161096f906124db565b60405180910390fd5b60016000806101000a81548160ff021916908360ff16021790555080156109b5576001600060016101000a81548160ff0219169083151502179055505b6109bd6115e7565b6109c5611640565b8015610a1e5760008060016101000a81548160ff0219169083151502179055507f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024986001604051610a1591906123fe565b60405180910390a15b50565b6000603360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b73735b14bb79463307aacbed86daf3322b1e6226ab73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610ac4576040517f2b2add3d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8273ffffffffffffffffffffffffffffffffffffffff1663de43156e87878786866040518663ffffffff1660e01b8152600401610b0595949392919061259b565b600060405180830381600087803b158015610b1f57600080fd5b505af1158015610b33573d6000803e3d6000fd5b50505050505050505050565b73735b14bb79463307aacbed86daf3322b1e6226ab73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610bb8576040517f2b2add3d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73735b14bb79463307aacbed86daf3322b1e6226ab73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161480610c3157503073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16145b15610c68576040517f82d5d76a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8473ffffffffffffffffffffffffffffffffffffffff166347e7ef2484866040518363ffffffff1660e01b8152600401610ca39291906122d4565b602060405180830381600087803b158015610cbd57600080fd5b505af1158015610cd1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610cf59190611c3a565b508273ffffffffffffffffffffffffffffffffffffffff1663de43156e87878786866040518663ffffffff1660e01b8152600401610d3795949392919061259b565b600060405180830381600087803b158015610d5157600080fd5b505af1158015610d65573d6000803e3d6000fd5b50505050505050505050565b610d79611480565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415610de9576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610de09061243b565b60405180910390fd5b610df2816114fe565b50565b73735b14bb79463307aacbed86daf3322b1e6226ab73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610e6e576040517f2b2add3d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73735b14bb79463307aacbed86daf3322b1e6226ab73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161480610ee757503073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16145b15610f1e576040517f82d5d76a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8273ffffffffffffffffffffffffffffffffffffffff166347e7ef2482846040518363ffffffff1660e01b8152600401610f599291906122d4565b602060405180830381600087803b158015610f7357600080fd5b505af1158015610f87573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fab9190611c3a565b50505050565b60008060008373ffffffffffffffffffffffffffffffffffffffff1663d9eeebed6040518163ffffffff1660e01b8152600401604080518083038186803b158015610ffb57600080fd5b505afa15801561100f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110339190611ba7565b915091508173ffffffffffffffffffffffffffffffffffffffff166323b872dd3373735b14bb79463307aacbed86daf3322b1e6226ab846040518463ffffffff1660e01b81526004016110889392919061229d565b602060405180830381600087803b1580156110a257600080fd5b505af11580156110b6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110da9190611c3a565b611110576040517f0a7cd6d600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8373ffffffffffffffffffffffffffffffffffffffff166323b872dd3330886040518463ffffffff1660e01b815260040161114d9392919061229d565b602060405180830381600087803b15801561116757600080fd5b505af115801561117b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061119f9190611c3a565b6111d5576040517f4dd9ee8d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8373ffffffffffffffffffffffffffffffffffffffff166342966c68866040518263ffffffff1660e01b815260040161120e91906125f0565b602060405180830381600087803b15801561122857600080fd5b505af115801561123c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112609190611c3a565b611296576040517f2c77e05c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b809250505092915050565b60006112cf7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc60001b611691565b60000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b611300611480565b50565b61132f7f4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd914360001b61169b565b60000160009054906101000a900460ff16156113535761134e836116a5565b61147b565b8273ffffffffffffffffffffffffffffffffffffffff166352d1902d6040518163ffffffff1660e01b815260040160206040518083038186803b15801561139957600080fd5b505afa9250505080156113ca57506040513d601f19601f820116820180604052508101906113c79190611c67565b60015b611409576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611400906124fb565b60405180910390fd5b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc60001b811461146e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611465906124bb565b60405180910390fd5b5061147a83838361175e565b5b505050565b61148861178a565b73ffffffffffffffffffffffffffffffffffffffff166114a6610a21565b73ffffffffffffffffffffffffffffffffffffffff16146114fc576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016114f39061253b565b60405180910390fd5b565b6000603360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905081603360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b6000808273ffffffffffffffffffffffffffffffffffffffff163b119050919050565b600060019054906101000a900460ff16611636576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161162d9061257b565b60405180910390fd5b61163e611792565b565b600060019054906101000a900460ff1661168f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016116869061257b565b60405180910390fd5b565b6000819050919050565b6000819050919050565b6116ae816115c4565b6116ed576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016116e49061251b565b60405180910390fd5b8061171a7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc60001b611691565b60000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b611767836117f3565b6000825111806117745750805b15611785576117838383611842565b505b505050565b600033905090565b600060019054906101000a900460ff166117e1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016117d89061257b565b60405180910390fd5b6117f16117ec61178a565b6114fe565b565b6117fc816116a5565b8073ffffffffffffffffffffffffffffffffffffffff167fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b60405160405180910390a250565b60606118678383604051806060016040528060278152602001612c156027913961186f565b905092915050565b60606000808573ffffffffffffffffffffffffffffffffffffffff1685604051611899919061226b565b600060405180830381855af49150503d80600081146118d4576040519150601f19603f3d011682016040523d82523d6000602084013e6118d9565b606091505b50915091506118ea868383876118f5565b925050509392505050565b606083156119585760008351141561195057611910856115c4565b61194f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016119469061255b565b60405180910390fd5b5b829050611963565b611962838361196b565b5b949350505050565b60008251111561197e5781518083602001fd5b806040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016119b29190612419565b60405180910390fd5b60006119ce6119c984612630565b61260b565b9050828152602081018484840111156119ea576119e9612877565b5b6119f58482856127b7565b509392505050565b600081359050611a0c81612bb8565b92915050565b600081519050611a2181612bb8565b92915050565b600081519050611a3681612bcf565b92915050565b600081519050611a4b81612be6565b92915050565b60008083601f840112611a6757611a66612863565b5b8235905067ffffffffffffffff811115611a8457611a8361285e565b5b602083019150836001820283011115611aa057611a9f612872565b5b9250929050565b600082601f830112611abc57611abb612863565b5b8135611acc8482602086016119bb565b91505092915050565b600060608284031215611aeb57611aea612868565b5b81905092915050565b600081359050611b0381612bfd565b92915050565b600081519050611b1881612bfd565b92915050565b600060208284031215611b3457611b33612886565b5b6000611b42848285016119fd565b91505092915050565b60008060408385031215611b6257611b61612886565b5b6000611b70858286016119fd565b925050602083013567ffffffffffffffff811115611b9157611b9061287c565b5b611b9d85828601611aa7565b9150509250929050565b60008060408385031215611bbe57611bbd612886565b5b6000611bcc85828601611a12565b9250506020611bdd85828601611b09565b9150509250929050565b600080600060608486031215611c0057611bff612886565b5b6000611c0e868287016119fd565b9350506020611c1f86828701611af4565b9250506040611c30868287016119fd565b9150509250925092565b600060208284031215611c5057611c4f612886565b5b6000611c5e84828501611a27565b91505092915050565b600060208284031215611c7d57611c7c612886565b5b6000611c8b84828501611a3c565b91505092915050565b600080600060408486031215611cad57611cac612886565b5b600084013567ffffffffffffffff811115611ccb57611cca61287c565b5b611cd786828701611aa7565b935050602084013567ffffffffffffffff811115611cf857611cf761287c565b5b611d0486828701611a51565b92509250509250925092565b600080600060608486031215611d2957611d28612886565b5b600084013567ffffffffffffffff811115611d4757611d4661287c565b5b611d5386828701611aa7565b9350506020611d6486828701611af4565b9250506040611d75868287016119fd565b9150509250925092565b600080600080600060808688031215611d9b57611d9a612886565b5b600086013567ffffffffffffffff811115611db957611db861287c565b5b611dc588828901611aa7565b9550506020611dd688828901611af4565b9450506040611de7888289016119fd565b935050606086013567ffffffffffffffff811115611e0857611e0761287c565b5b611e1488828901611a51565b92509250509295509295909350565b60008060008060008060a08789031215611e4057611e3f612886565b5b600087013567ffffffffffffffff811115611e5e57611e5d61287c565b5b611e6a89828a01611ad5565b9650506020611e7b89828a016119fd565b9550506040611e8c89828a01611af4565b9450506060611e9d89828a016119fd565b935050608087013567ffffffffffffffff811115611ebe57611ebd61287c565b5b611eca89828a01611a51565b92509250509295509295509295565b600060208284031215611eef57611eee612886565b5b6000611efd84828501611b09565b91505092915050565b611f0f81612746565b82525050565b611f1e81612746565b82525050565b611f2d81612764565b82525050565b6000611f3f8385612677565b9350611f4c8385846127b7565b611f558361288b565b840190509392505050565b6000611f6c8385612688565b9350611f798385846127b7565b611f828361288b565b840190509392505050565b6000611f9882612661565b611fa28185612688565b9350611fb28185602086016127c6565b611fbb8161288b565b840191505092915050565b6000611fd182612661565b611fdb8185612699565b9350611feb8185602086016127c6565b80840191505092915050565b612000816127a5565b82525050565b60006120118261266c565b61201b81856126a4565b935061202b8185602086016127c6565b6120348161288b565b840191505092915050565b600061204c6026836126a4565b91506120578261289c565b604082019050919050565b600061206f602c836126a4565b915061207a826128eb565b604082019050919050565b6000612092602c836126a4565b915061209d8261293a565b604082019050919050565b60006120b56038836126a4565b91506120c082612989565b604082019050919050565b60006120d86029836126a4565b91506120e3826129d8565b604082019050919050565b60006120fb602e836126a4565b915061210682612a27565b604082019050919050565b600061211e602e836126a4565b915061212982612a76565b604082019050919050565b6000612141602d836126a4565b915061214c82612ac5565b604082019050919050565b60006121646020836126a4565b915061216f82612b14565b602082019050919050565b6000612187600083612688565b915061219282612b3d565b600082019050919050565b60006121aa601d836126a4565b91506121b582612b40565b602082019050919050565b60006121cd602b836126a4565b91506121d882612b69565b604082019050919050565b6000606083016121f660008401846126cc565b8583036000870152612209838284611f33565b9250505061221a60208401846126b5565b6122276020860182611f06565b50612235604084018461272f565b612242604086018261224d565b508091505092915050565b6122568161278e565b82525050565b6122658161278e565b82525050565b60006122778284611fc6565b915081905092915050565b60006020820190506122976000830184611f15565b92915050565b60006060820190506122b26000830186611f15565b6122bf6020830185611f15565b6122cc604083018461225c565b949350505050565b60006040820190506122e96000830185611f15565b6122f6602083018461225c565b9392505050565b60006020820190506123126000830184611f24565b92915050565b60006020820190508181036000830152612333818486611f60565b90509392505050565b600060a08201905081810360008301526123568189611f8d565b9050612365602083018861225c565b612372604083018761225c565b61237f606083018661225c565b8181036080830152612392818486611f60565b9050979650505050505050565b600060a08201905081810360008301526123b98187611f8d565b90506123c8602083018661225c565b6123d5604083018561225c565b6123e2606083018461225c565b81810360808301526123f38161217a565b905095945050505050565b60006020820190506124136000830184611ff7565b92915050565b600060208201905081810360008301526124338184612006565b905092915050565b600060208201905081810360008301526124548161203f565b9050919050565b6000602082019050818103600083015261247481612062565b9050919050565b6000602082019050818103600083015261249481612085565b9050919050565b600060208201905081810360008301526124b4816120a8565b9050919050565b600060208201905081810360008301526124d4816120cb565b9050919050565b600060208201905081810360008301526124f4816120ee565b9050919050565b6000602082019050818103600083015261251481612111565b9050919050565b6000602082019050818103600083015261253481612134565b9050919050565b6000602082019050818103600083015261255481612157565b9050919050565b600060208201905081810360008301526125748161219d565b9050919050565b60006020820190508181036000830152612594816121c0565b9050919050565b600060808201905081810360008301526125b581886121e3565b90506125c46020830187611f15565b6125d1604083018661225c565b81810360608301526125e4818486611f60565b90509695505050505050565b6000602082019050612605600083018461225c565b92915050565b6000612615612626565b905061262182826127f9565b919050565b6000604051905090565b600067ffffffffffffffff82111561264b5761264a61282a565b5b6126548261288b565b9050602081019050919050565b600081519050919050565b600081519050919050565b600082825260208201905092915050565b600082825260208201905092915050565b600081905092915050565b600082825260208201905092915050565b60006126c460208401846119fd565b905092915050565b600080833560016020038436030381126126e9576126e8612881565b5b83810192508235915060208301925067ffffffffffffffff82111561271157612710612859565b5b6001820236038413156127275761272661286d565b5b509250929050565b600061273e6020840184611af4565b905092915050565b60006127518261276e565b9050919050565b60008115159050919050565b6000819050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b60006127b082612798565b9050919050565b82818337600083830152505050565b60005b838110156127e45780820151818401526020810190506127c9565b838111156127f3576000848401525b50505050565b6128028261288b565b810181811067ffffffffffffffff821117156128215761282061282a565b5b80604052505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b7f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060008201527f64656c656761746563616c6c0000000000000000000000000000000000000000602082015250565b7f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060008201527f6163746976652070726f78790000000000000000000000000000000000000000602082015250565b7f555550535570677261646561626c653a206d757374206e6f742062652063616c60008201527f6c6564207468726f7567682064656c656761746563616c6c0000000000000000602082015250565b7f45524331393637557067726164653a20756e737570706f727465642070726f7860008201527f6961626c65555549440000000000000000000000000000000000000000000000602082015250565b7f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160008201527f647920696e697469616c697a6564000000000000000000000000000000000000602082015250565b7f45524331393637557067726164653a206e657720696d706c656d656e7461746960008201527f6f6e206973206e6f742055555053000000000000000000000000000000000000602082015250565b7f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60008201527f6f74206120636f6e747261637400000000000000000000000000000000000000602082015250565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b50565b7f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000600082015250565b7f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960008201527f6e697469616c697a696e67000000000000000000000000000000000000000000602082015250565b612bc181612746565b8114612bcc57600080fd5b50565b612bd881612758565b8114612be357600080fd5b50565b612bef81612764565b8114612bfa57600080fd5b50565b612c068161278e565b8114612c1157600080fd5b5056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a26469706673582212200ef3180e9cedc3a1a1edef10c36506994a9e026c730e2624d2348359ce00bf2764736f6c63430008070033"; + "0x60a06040523073ffffffffffffffffffffffffffffffffffffffff1660809073ffffffffffffffffffffffffffffffffffffffff1660601b8152503480156200004757600080fd5b50620000586200005e60201b60201c565b62000208565b600060019054906101000a900460ff1615620000b1576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401620000a8906200015c565b60405180910390fd5b60ff801660008054906101000a900460ff1660ff1614620001225760ff6000806101000a81548160ff021916908360ff1602179055507f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb384740249860ff6040516200011991906200017e565b60405180910390a15b565b6000620001336027836200019b565b91506200014082620001b9565b604082019050919050565b6200015681620001ac565b82525050565b60006020820190508181036000830152620001778162000124565b9050919050565b60006020820190506200019560008301846200014b565b92915050565b600082825260208201905092915050565b600060ff82169050919050565b7f496e697469616c697a61626c653a20636f6e747261637420697320696e69746960008201527f616c697a696e6700000000000000000000000000000000000000000000000000602082015250565b60805160601c612c726200024360003960008181610433015281816104c2015281816105d40152818161066301526107130152612c726000f3fe6080604052600436106100dd5760003560e01c80637993c1e01161007f578063bcf7f32b11610059578063bcf7f32b14610251578063c39aca371461027a578063f2fde38b146102a3578063f45346dc146102cc576100dd565b80637993c1e0146101e65780638129fc1c1461020f5780638da5cb5b14610226576100dd565b80633ce4a5bc116100bb5780633ce4a5bc1461015d5780634f1ef2861461018857806352d1902d146101a4578063715018a6146101cf576100dd565b80630ac7c44c146100e2578063135390f91461010b5780633659cfe614610134575b600080fd5b3480156100ee57600080fd5b5061010960048036038101906101049190611c80565b6102f5565b005b34801561011757600080fd5b50610132600480360381019061012d9190611cfc565b61034c565b005b34801561014057600080fd5b5061015b60048036038101906101569190611b0a565b610431565b005b34801561016957600080fd5b506101726105ba565b60405161017f919061226e565b60405180910390f35b6101a2600480360381019061019d9190611b37565b6105d2565b005b3480156101b057600080fd5b506101b961070f565b6040516101c691906122e9565b60405180910390f35b3480156101db57600080fd5b506101e46107c8565b005b3480156101f257600080fd5b5061020d60048036038101906102089190611d6b565b6107dc565b005b34801561021b57600080fd5b506102246108c7565b005b34801561023257600080fd5b5061023b610a0d565b604051610248919061226e565b60405180910390f35b34801561025d57600080fd5b5061027860048036038101906102739190611e0f565b610a37565b005b34801561028657600080fd5b506102a1600480360381019061029c9190611e0f565b610b2b565b005b3480156102af57600080fd5b506102ca60048036038101906102c59190611b0a565b610d5d565b005b3480156102d857600080fd5b506102f360048036038101906102ee9190611bd3565b610de1565b005b3373ffffffffffffffffffffffffffffffffffffffff167f2b5af078ce280d812dc2241658dc5435c93408020e5418eef55a2b536de51c0f84848460405161033f93929190612304565b60405180910390a2505050565b60006103588383610f9d565b90503373ffffffffffffffffffffffffffffffffffffffff167f1866ad2994816c79f4103e1eddacc7b085eb7c635205243a28940be69b01536d8585848673ffffffffffffffffffffffffffffffffffffffff16634d8943bb6040518163ffffffff1660e01b815260040160206040518083038186803b1580156103db57600080fd5b505afa1580156103ef573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104139190611ec5565b60405161042394939291906123a0565b60405180910390a250505050565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163073ffffffffffffffffffffffffffffffffffffffff1614156104c0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016104b79061245c565b60405180910390fd5b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166104ff61128d565b73ffffffffffffffffffffffffffffffffffffffff1614610555576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161054c9061247c565b60405180910390fd5b61055e816112e4565b6105b781600067ffffffffffffffff81111561057d5761057c61282b565b5b6040519080825280601f01601f1916602001820160405280156105af5781602001600182028036833780820191505090505b5060006112ef565b50565b73735b14bb79463307aacbed86daf3322b1e6226ab81565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163073ffffffffffffffffffffffffffffffffffffffff161415610661576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106589061245c565b60405180910390fd5b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166106a061128d565b73ffffffffffffffffffffffffffffffffffffffff16146106f6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106ed9061247c565b60405180910390fd5b6106ff826112e4565b61070b828260016112ef565b5050565b60007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163073ffffffffffffffffffffffffffffffffffffffff161461079f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107969061249c565b60405180910390fd5b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc60001b905090565b6107d061146c565b6107da60006114ea565b565b60006107e88585610f9d565b90503373ffffffffffffffffffffffffffffffffffffffff167f1866ad2994816c79f4103e1eddacc7b085eb7c635205243a28940be69b01536d8787848873ffffffffffffffffffffffffffffffffffffffff16634d8943bb6040518163ffffffff1660e01b815260040160206040518083038186803b15801561086b57600080fd5b505afa15801561087f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108a39190611ec5565b88886040516108b79695949392919061233d565b60405180910390a2505050505050565b60008060019054906101000a900460ff161590508080156108f85750600160008054906101000a900460ff1660ff16105b806109255750610907306115b0565b1580156109245750600160008054906101000a900460ff1660ff16145b5b610964576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161095b906124dc565b60405180910390fd5b60016000806101000a81548160ff021916908360ff16021790555080156109a1576001600060016101000a81548160ff0219169083151502179055505b6109a96115d3565b6109b161162c565b8015610a0a5760008060016101000a81548160ff0219169083151502179055507f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024986001604051610a0191906123ff565b60405180910390a15b50565b6000603360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b73735b14bb79463307aacbed86daf3322b1e6226ab73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610ab0576040517f2b2add3d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8273ffffffffffffffffffffffffffffffffffffffff1663de43156e87878786866040518663ffffffff1660e01b8152600401610af195949392919061259c565b600060405180830381600087803b158015610b0b57600080fd5b505af1158015610b1f573d6000803e3d6000fd5b50505050505050505050565b73735b14bb79463307aacbed86daf3322b1e6226ab73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610ba4576040517f2b2add3d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73735b14bb79463307aacbed86daf3322b1e6226ab73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161480610c1d57503073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16145b15610c54576040517f82d5d76a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8473ffffffffffffffffffffffffffffffffffffffff166347e7ef2484866040518363ffffffff1660e01b8152600401610c8f9291906122c0565b602060405180830381600087803b158015610ca957600080fd5b505af1158015610cbd573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ce19190611c26565b508273ffffffffffffffffffffffffffffffffffffffff1663de43156e87878786866040518663ffffffff1660e01b8152600401610d2395949392919061259c565b600060405180830381600087803b158015610d3d57600080fd5b505af1158015610d51573d6000803e3d6000fd5b50505050505050505050565b610d6561146c565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415610dd5576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610dcc9061243c565b60405180910390fd5b610dde816114ea565b50565b73735b14bb79463307aacbed86daf3322b1e6226ab73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610e5a576040517f2b2add3d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73735b14bb79463307aacbed86daf3322b1e6226ab73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161480610ed357503073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16145b15610f0a576040517f82d5d76a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8273ffffffffffffffffffffffffffffffffffffffff166347e7ef2482846040518363ffffffff1660e01b8152600401610f459291906122c0565b602060405180830381600087803b158015610f5f57600080fd5b505af1158015610f73573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f979190611c26565b50505050565b60008060008373ffffffffffffffffffffffffffffffffffffffff1663d9eeebed6040518163ffffffff1660e01b8152600401604080518083038186803b158015610fe757600080fd5b505afa158015610ffb573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061101f9190611b93565b915091508173ffffffffffffffffffffffffffffffffffffffff166323b872dd3373735b14bb79463307aacbed86daf3322b1e6226ab846040518463ffffffff1660e01b815260040161107493929190612289565b602060405180830381600087803b15801561108e57600080fd5b505af11580156110a2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110c69190611c26565b6110fc576040517f0a7cd6d600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8373ffffffffffffffffffffffffffffffffffffffff166323b872dd3330886040518463ffffffff1660e01b815260040161113993929190612289565b602060405180830381600087803b15801561115357600080fd5b505af1158015611167573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061118b9190611c26565b6111c1576040517f4dd9ee8d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8373ffffffffffffffffffffffffffffffffffffffff166342966c68866040518263ffffffff1660e01b81526004016111fa91906125f1565b602060405180830381600087803b15801561121457600080fd5b505af1158015611228573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061124c9190611c26565b611282576040517f2c77e05c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b809250505092915050565b60006112bb7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc60001b61167d565b60000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6112ec61146c565b50565b61131b7f4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd914360001b611687565b60000160009054906101000a900460ff161561133f5761133a83611691565b611467565b8273ffffffffffffffffffffffffffffffffffffffff166352d1902d6040518163ffffffff1660e01b815260040160206040518083038186803b15801561138557600080fd5b505afa9250505080156113b657506040513d601f19601f820116820180604052508101906113b39190611c53565b60015b6113f5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016113ec906124fc565b60405180910390fd5b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc60001b811461145a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611451906124bc565b60405180910390fd5b5061146683838361174a565b5b505050565b611474611776565b73ffffffffffffffffffffffffffffffffffffffff16611492610a0d565b73ffffffffffffffffffffffffffffffffffffffff16146114e8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016114df9061253c565b60405180910390fd5b565b6000603360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905081603360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b6000808273ffffffffffffffffffffffffffffffffffffffff163b119050919050565b600060019054906101000a900460ff16611622576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016116199061257c565b60405180910390fd5b61162a61177e565b565b600060019054906101000a900460ff1661167b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016116729061257c565b60405180910390fd5b565b6000819050919050565b6000819050919050565b61169a816115b0565b6116d9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016116d09061251c565b60405180910390fd5b806117067f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc60001b61167d565b60000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b611753836117df565b6000825111806117605750805b156117715761176f838361182e565b505b505050565b600033905090565b600060019054906101000a900460ff166117cd576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016117c49061257c565b60405180910390fd5b6117dd6117d8611776565b6114ea565b565b6117e881611691565b8073ffffffffffffffffffffffffffffffffffffffff167fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b60405160405180910390a250565b60606118538383604051806060016040528060278152602001612c166027913961185b565b905092915050565b60606000808573ffffffffffffffffffffffffffffffffffffffff16856040516118859190612257565b600060405180830381855af49150503d80600081146118c0576040519150601f19603f3d011682016040523d82523d6000602084013e6118c5565b606091505b50915091506118d6868383876118e1565b925050509392505050565b606083156119445760008351141561193c576118fc856115b0565b61193b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016119329061255c565b60405180910390fd5b5b82905061194f565b61194e8383611957565b5b949350505050565b60008251111561196a5781518083602001fd5b806040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161199e919061241a565b60405180910390fd5b60006119ba6119b584612631565b61260c565b9050828152602081018484840111156119d6576119d5612878565b5b6119e18482856127b8565b509392505050565b6000813590506119f881612bb9565b92915050565b600081519050611a0d81612bb9565b92915050565b600081519050611a2281612bd0565b92915050565b600081519050611a3781612be7565b92915050565b60008083601f840112611a5357611a52612864565b5b8235905067ffffffffffffffff811115611a7057611a6f61285f565b5b602083019150836001820283011115611a8c57611a8b612873565b5b9250929050565b600082601f830112611aa857611aa7612864565b5b8135611ab88482602086016119a7565b91505092915050565b600060608284031215611ad757611ad6612869565b5b81905092915050565b600081359050611aef81612bfe565b92915050565b600081519050611b0481612bfe565b92915050565b600060208284031215611b2057611b1f612887565b5b6000611b2e848285016119e9565b91505092915050565b60008060408385031215611b4e57611b4d612887565b5b6000611b5c858286016119e9565b925050602083013567ffffffffffffffff811115611b7d57611b7c61287d565b5b611b8985828601611a93565b9150509250929050565b60008060408385031215611baa57611ba9612887565b5b6000611bb8858286016119fe565b9250506020611bc985828601611af5565b9150509250929050565b600080600060608486031215611bec57611beb612887565b5b6000611bfa868287016119e9565b9350506020611c0b86828701611ae0565b9250506040611c1c868287016119e9565b9150509250925092565b600060208284031215611c3c57611c3b612887565b5b6000611c4a84828501611a13565b91505092915050565b600060208284031215611c6957611c68612887565b5b6000611c7784828501611a28565b91505092915050565b600080600060408486031215611c9957611c98612887565b5b600084013567ffffffffffffffff811115611cb757611cb661287d565b5b611cc386828701611a93565b935050602084013567ffffffffffffffff811115611ce457611ce361287d565b5b611cf086828701611a3d565b92509250509250925092565b600080600060608486031215611d1557611d14612887565b5b600084013567ffffffffffffffff811115611d3357611d3261287d565b5b611d3f86828701611a93565b9350506020611d5086828701611ae0565b9250506040611d61868287016119e9565b9150509250925092565b600080600080600060808688031215611d8757611d86612887565b5b600086013567ffffffffffffffff811115611da557611da461287d565b5b611db188828901611a93565b9550506020611dc288828901611ae0565b9450506040611dd3888289016119e9565b935050606086013567ffffffffffffffff811115611df457611df361287d565b5b611e0088828901611a3d565b92509250509295509295909350565b60008060008060008060a08789031215611e2c57611e2b612887565b5b600087013567ffffffffffffffff811115611e4a57611e4961287d565b5b611e5689828a01611ac1565b9650506020611e6789828a016119e9565b9550506040611e7889828a01611ae0565b9450506060611e8989828a016119e9565b935050608087013567ffffffffffffffff811115611eaa57611ea961287d565b5b611eb689828a01611a3d565b92509250509295509295509295565b600060208284031215611edb57611eda612887565b5b6000611ee984828501611af5565b91505092915050565b611efb81612747565b82525050565b611f0a81612747565b82525050565b611f1981612765565b82525050565b6000611f2b8385612678565b9350611f388385846127b8565b611f418361288c565b840190509392505050565b6000611f588385612689565b9350611f658385846127b8565b611f6e8361288c565b840190509392505050565b6000611f8482612662565b611f8e8185612689565b9350611f9e8185602086016127c7565b611fa78161288c565b840191505092915050565b6000611fbd82612662565b611fc7818561269a565b9350611fd78185602086016127c7565b80840191505092915050565b611fec816127a6565b82525050565b6000611ffd8261266d565b61200781856126a5565b93506120178185602086016127c7565b6120208161288c565b840191505092915050565b60006120386026836126a5565b91506120438261289d565b604082019050919050565b600061205b602c836126a5565b9150612066826128ec565b604082019050919050565b600061207e602c836126a5565b91506120898261293b565b604082019050919050565b60006120a16038836126a5565b91506120ac8261298a565b604082019050919050565b60006120c46029836126a5565b91506120cf826129d9565b604082019050919050565b60006120e7602e836126a5565b91506120f282612a28565b604082019050919050565b600061210a602e836126a5565b915061211582612a77565b604082019050919050565b600061212d602d836126a5565b915061213882612ac6565b604082019050919050565b60006121506020836126a5565b915061215b82612b15565b602082019050919050565b6000612173600083612689565b915061217e82612b3e565b600082019050919050565b6000612196601d836126a5565b91506121a182612b41565b602082019050919050565b60006121b9602b836126a5565b91506121c482612b6a565b604082019050919050565b6000606083016121e260008401846126cd565b85830360008701526121f5838284611f1f565b9250505061220660208401846126b6565b6122136020860182611ef2565b506122216040840184612730565b61222e6040860182612239565b508091505092915050565b6122428161278f565b82525050565b6122518161278f565b82525050565b60006122638284611fb2565b915081905092915050565b60006020820190506122836000830184611f01565b92915050565b600060608201905061229e6000830186611f01565b6122ab6020830185611f01565b6122b86040830184612248565b949350505050565b60006040820190506122d56000830185611f01565b6122e26020830184612248565b9392505050565b60006020820190506122fe6000830184611f10565b92915050565b6000604082019050818103600083015261231e8186611f79565b90508181036020830152612333818486611f4c565b9050949350505050565b600060a08201905081810360008301526123578189611f79565b90506123666020830188612248565b6123736040830187612248565b6123806060830186612248565b8181036080830152612393818486611f4c565b9050979650505050505050565b600060a08201905081810360008301526123ba8187611f79565b90506123c96020830186612248565b6123d66040830185612248565b6123e36060830184612248565b81810360808301526123f481612166565b905095945050505050565b60006020820190506124146000830184611fe3565b92915050565b600060208201905081810360008301526124348184611ff2565b905092915050565b600060208201905081810360008301526124558161202b565b9050919050565b600060208201905081810360008301526124758161204e565b9050919050565b6000602082019050818103600083015261249581612071565b9050919050565b600060208201905081810360008301526124b581612094565b9050919050565b600060208201905081810360008301526124d5816120b7565b9050919050565b600060208201905081810360008301526124f5816120da565b9050919050565b60006020820190508181036000830152612515816120fd565b9050919050565b6000602082019050818103600083015261253581612120565b9050919050565b6000602082019050818103600083015261255581612143565b9050919050565b6000602082019050818103600083015261257581612189565b9050919050565b60006020820190508181036000830152612595816121ac565b9050919050565b600060808201905081810360008301526125b681886121cf565b90506125c56020830187611f01565b6125d26040830186612248565b81810360608301526125e5818486611f4c565b90509695505050505050565b60006020820190506126066000830184612248565b92915050565b6000612616612627565b905061262282826127fa565b919050565b6000604051905090565b600067ffffffffffffffff82111561264c5761264b61282b565b5b6126558261288c565b9050602081019050919050565b600081519050919050565b600081519050919050565b600082825260208201905092915050565b600082825260208201905092915050565b600081905092915050565b600082825260208201905092915050565b60006126c560208401846119e9565b905092915050565b600080833560016020038436030381126126ea576126e9612882565b5b83810192508235915060208301925067ffffffffffffffff8211156127125761271161285a565b5b6001820236038413156127285761272761286e565b5b509250929050565b600061273f6020840184611ae0565b905092915050565b60006127528261276f565b9050919050565b60008115159050919050565b6000819050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b60006127b182612799565b9050919050565b82818337600083830152505050565b60005b838110156127e55780820151818401526020810190506127ca565b838111156127f4576000848401525b50505050565b6128038261288c565b810181811067ffffffffffffffff821117156128225761282161282b565b5b80604052505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b7f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060008201527f64656c656761746563616c6c0000000000000000000000000000000000000000602082015250565b7f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060008201527f6163746976652070726f78790000000000000000000000000000000000000000602082015250565b7f555550535570677261646561626c653a206d757374206e6f742062652063616c60008201527f6c6564207468726f7567682064656c656761746563616c6c0000000000000000602082015250565b7f45524331393637557067726164653a20756e737570706f727465642070726f7860008201527f6961626c65555549440000000000000000000000000000000000000000000000602082015250565b7f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160008201527f647920696e697469616c697a6564000000000000000000000000000000000000602082015250565b7f45524331393637557067726164653a206e657720696d706c656d656e7461746960008201527f6f6e206973206e6f742055555053000000000000000000000000000000000000602082015250565b7f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60008201527f6f74206120636f6e747261637400000000000000000000000000000000000000602082015250565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b50565b7f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000600082015250565b7f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960008201527f6e697469616c697a696e67000000000000000000000000000000000000000000602082015250565b612bc281612747565b8114612bcd57600080fd5b50565b612bd981612759565b8114612be457600080fd5b50565b612bf081612765565b8114612bfb57600080fd5b50565b612c078161278f565b8114612c1257600080fd5b5056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a2646970667358221220d791071fca3eb6f4d8ee341d9d051caa2cc3da51b34ac59d695c4cced2a1daf464736f6c63430008070033"; type GatewayZEVMConstructorParams = | [signer?: Signer] diff --git a/typechain-types/factories/contracts/prototypes/zevm/SenderZEVM__factory.ts b/typechain-types/factories/contracts/prototypes/zevm/SenderZEVM__factory.ts new file mode 100644 index 00000000..fafcf4e0 --- /dev/null +++ b/typechain-types/factories/contracts/prototypes/zevm/SenderZEVM__factory.ts @@ -0,0 +1,160 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import { Signer, utils, Contract, ContractFactory, Overrides } from "ethers"; +import type { Provider, TransactionRequest } from "@ethersproject/providers"; +import type { PromiseOrValue } from "../../../../common"; +import type { + SenderZEVM, + SenderZEVMInterface, +} from "../../../../contracts/prototypes/zevm/SenderZEVM"; + +const _abi = [ + { + inputs: [ + { + internalType: "address", + name: "_gateway", + type: "address", + }, + ], + stateMutability: "nonpayable", + type: "constructor", + }, + { + inputs: [], + name: "ApprovalFailed", + type: "error", + }, + { + inputs: [ + { + internalType: "bytes", + name: "receiver", + type: "bytes", + }, + { + internalType: "string", + name: "str", + type: "string", + }, + { + internalType: "uint256", + name: "num", + type: "uint256", + }, + { + internalType: "bool", + name: "flag", + type: "bool", + }, + ], + name: "callReceiver", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "gateway", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes", + name: "receiver", + type: "bytes", + }, + { + internalType: "uint256", + name: "amount", + type: "uint256", + }, + { + internalType: "address", + name: "zrc20", + type: "address", + }, + { + internalType: "string", + name: "str", + type: "string", + }, + { + internalType: "uint256", + name: "num", + type: "uint256", + }, + { + internalType: "bool", + name: "flag", + type: "bool", + }, + ], + name: "withdrawAndCallReceiver", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, +] as const; + +const _bytecode = + "0x608060405234801561001057600080fd5b50604051610bcd380380610bcd8339818101604052810190610032919061008d565b806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050610108565b600081519050610087816100f1565b92915050565b6000602082840312156100a3576100a26100ec565b5b60006100b184828501610078565b91505092915050565b60006100c5826100cc565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600080fd5b6100fa816100ba565b811461010557600080fd5b50565b610ab6806101176000396000f3fe608060405234801561001057600080fd5b50600436106100415760003560e01c80630abd890514610046578063116191b614610062578063a0a1730b14610080575b600080fd5b610060600480360381019061005b91906105fd565b61009c565b005b61006a6102af565b6040516100779190610761565b60405180910390f35b61009a6004803603810190610095919061055e565b6102d3565b005b60008383836040516024016100b39392919061082f565b6040516020818303038152906040527fe04d4f97000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff838183161783525050505090508473ffffffffffffffffffffffffffffffffffffffff1663095ea7b360008054906101000a900473ffffffffffffffffffffffffffffffffffffffff16886040518363ffffffff1660e01b815260040161018d92919061077c565b602060405180830381600087803b1580156101a757600080fd5b505af11580156101bb573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101df9190610531565b610215576040517f8164f84200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16637993c1e0888888856040518563ffffffff1660e01b815260040161027494939291906107dc565b600060405180830381600087803b15801561028e57600080fd5b505af11580156102a2573d6000803e3d6000fd5b5050505050505050505050565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008383836040516024016102ea9392919061082f565b6040516020818303038152906040527fe04d4f97000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050905060008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16630ac7c44c86836040518363ffffffff1660e01b81526004016103c49291906107a5565b600060405180830381600087803b1580156103de57600080fd5b505af11580156103f2573d6000803e3d6000fd5b505050505050505050565b600061041061040b84610892565b61086d565b90508281526020810184848401111561042c5761042b610a1b565b5b610437848285610974565b509392505050565b600061045261044d846108c3565b61086d565b90508281526020810184848401111561046e5761046d610a1b565b5b610479848285610974565b509392505050565b60008135905061049081610a3b565b92915050565b6000813590506104a581610a52565b92915050565b6000815190506104ba81610a52565b92915050565b600082601f8301126104d5576104d4610a16565b5b81356104e58482602086016103fd565b91505092915050565b600082601f83011261050357610502610a16565b5b813561051384826020860161043f565b91505092915050565b60008135905061052b81610a69565b92915050565b60006020828403121561054757610546610a25565b5b6000610555848285016104ab565b91505092915050565b6000806000806080858703121561057857610577610a25565b5b600085013567ffffffffffffffff81111561059657610595610a20565b5b6105a2878288016104c0565b945050602085013567ffffffffffffffff8111156105c3576105c2610a20565b5b6105cf878288016104ee565b93505060406105e08782880161051c565b92505060606105f187828801610496565b91505092959194509250565b60008060008060008060c0878903121561061a57610619610a25565b5b600087013567ffffffffffffffff81111561063857610637610a20565b5b61064489828a016104c0565b965050602061065589828a0161051c565b955050604061066689828a01610481565b945050606087013567ffffffffffffffff81111561068757610686610a20565b5b61069389828a016104ee565b93505060806106a489828a0161051c565b92505060a06106b589828a01610496565b9150509295509295509295565b6106cb8161092c565b82525050565b6106da8161093e565b82525050565b60006106eb826108f4565b6106f5818561090a565b9350610705818560208601610983565b61070e81610a2a565b840191505092915050565b6000610724826108ff565b61072e818561091b565b935061073e818560208601610983565b61074781610a2a565b840191505092915050565b61075b8161096a565b82525050565b600060208201905061077660008301846106c2565b92915050565b600060408201905061079160008301856106c2565b61079e6020830184610752565b9392505050565b600060408201905081810360008301526107bf81856106e0565b905081810360208301526107d381846106e0565b90509392505050565b600060808201905081810360008301526107f681876106e0565b90506108056020830186610752565b61081260408301856106c2565b818103606083015261082481846106e0565b905095945050505050565b600060608201905081810360008301526108498186610719565b90506108586020830185610752565b61086560408301846106d1565b949350505050565b6000610877610888565b905061088382826109b6565b919050565b6000604051905090565b600067ffffffffffffffff8211156108ad576108ac6109e7565b5b6108b682610a2a565b9050602081019050919050565b600067ffffffffffffffff8211156108de576108dd6109e7565b5b6108e782610a2a565b9050602081019050919050565b600081519050919050565b600081519050919050565b600082825260208201905092915050565b600082825260208201905092915050565b60006109378261094a565b9050919050565b60008115159050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b82818337600083830152505050565b60005b838110156109a1578082015181840152602081019050610986565b838111156109b0576000848401525b50505050565b6109bf82610a2a565b810181811067ffffffffffffffff821117156109de576109dd6109e7565b5b80604052505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b610a448161092c565b8114610a4f57600080fd5b50565b610a5b8161093e565b8114610a6657600080fd5b50565b610a728161096a565b8114610a7d57600080fd5b5056fea26469706673582212208a3927b16976e0767f2cbe9ff03b81fd6a157ff79229c4f70c5c63c32ee2810164736f6c63430008070033"; + +type SenderZEVMConstructorParams = + | [signer?: Signer] + | ConstructorParameters; + +const isSuperArgs = ( + xs: SenderZEVMConstructorParams +): xs is ConstructorParameters => xs.length > 1; + +export class SenderZEVM__factory extends ContractFactory { + constructor(...args: SenderZEVMConstructorParams) { + if (isSuperArgs(args)) { + super(...args); + } else { + super(_abi, _bytecode, args[0]); + } + } + + override deploy( + _gateway: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise { + return super.deploy(_gateway, overrides || {}) as Promise; + } + override getDeployTransaction( + _gateway: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): TransactionRequest { + return super.getDeployTransaction(_gateway, overrides || {}); + } + override attach(address: string): SenderZEVM { + return super.attach(address) as SenderZEVM; + } + override connect(signer: Signer): SenderZEVM__factory { + return super.connect(signer) as SenderZEVM__factory; + } + + static readonly bytecode = _bytecode; + static readonly abi = _abi; + static createInterface(): SenderZEVMInterface { + return new utils.Interface(_abi) as SenderZEVMInterface; + } + static connect( + address: string, + signerOrProvider: Signer | Provider + ): SenderZEVM { + return new Contract(address, _abi, signerOrProvider) as SenderZEVM; + } +} diff --git a/typechain-types/factories/contracts/prototypes/zevm/index.ts b/typechain-types/factories/contracts/prototypes/zevm/index.ts index 54162241..389b7ace 100644 --- a/typechain-types/factories/contracts/prototypes/zevm/index.ts +++ b/typechain-types/factories/contracts/prototypes/zevm/index.ts @@ -4,5 +4,5 @@ export * as zrc20NewSol from "./ZRC20New.sol"; export * as interfacesSol from "./interfaces.sol"; export { GatewayZEVM__factory } from "./GatewayZEVM__factory"; -export { Sender__factory } from "./Sender__factory"; +export { SenderZEVM__factory } from "./SenderZEVM__factory"; export { TestZContract__factory } from "./TestZContract__factory"; diff --git a/typechain-types/hardhat.d.ts b/typechain-types/hardhat.d.ts index e7b1e088..6f78440d 100644 --- a/typechain-types/hardhat.d.ts +++ b/typechain-types/hardhat.d.ts @@ -349,9 +349,9 @@ declare module "hardhat/types/runtime" { signerOrOptions?: ethers.Signer | FactoryOptions ): Promise; getContractFactory( - name: "Receiver", + name: "ReceiverEVM", signerOrOptions?: ethers.Signer | FactoryOptions - ): Promise; + ): Promise; getContractFactory( name: "TestERC20", signerOrOptions?: ethers.Signer | FactoryOptions @@ -365,9 +365,9 @@ declare module "hardhat/types/runtime" { signerOrOptions?: ethers.Signer | FactoryOptions ): Promise; getContractFactory( - name: "Sender", + name: "SenderZEVM", signerOrOptions?: ethers.Signer | FactoryOptions - ): Promise; + ): Promise; getContractFactory( name: "TestZContract", signerOrOptions?: ethers.Signer | FactoryOptions @@ -870,10 +870,10 @@ declare module "hardhat/types/runtime" { signer?: ethers.Signer ): Promise; getContractAt( - name: "Receiver", + name: "ReceiverEVM", address: string, signer?: ethers.Signer - ): Promise; + ): Promise; getContractAt( name: "TestERC20", address: string, @@ -890,10 +890,10 @@ declare module "hardhat/types/runtime" { signer?: ethers.Signer ): Promise; getContractAt( - name: "Sender", + name: "SenderZEVM", address: string, signer?: ethers.Signer - ): Promise; + ): Promise; getContractAt( name: "TestZContract", address: string, diff --git a/typechain-types/index.ts b/typechain-types/index.ts index a2eabf95..f17533ca 100644 --- a/typechain-types/index.ts +++ b/typechain-types/index.ts @@ -164,16 +164,16 @@ export type { GatewayEVMUpgradeTest } from "./contracts/prototypes/evm/GatewayEV export { GatewayEVMUpgradeTest__factory } from "./factories/contracts/prototypes/evm/GatewayEVMUpgradeTest__factory"; export type { IGatewayEVM } from "./contracts/prototypes/evm/interfaces.sol/IGatewayEVM"; export { IGatewayEVM__factory } from "./factories/contracts/prototypes/evm/interfaces.sol/IGatewayEVM__factory"; -export type { Receiver } from "./contracts/prototypes/evm/Receiver"; -export { Receiver__factory } from "./factories/contracts/prototypes/evm/Receiver__factory"; +export type { ReceiverEVM } from "./contracts/prototypes/evm/ReceiverEVM"; +export { ReceiverEVM__factory } from "./factories/contracts/prototypes/evm/ReceiverEVM__factory"; export type { TestERC20 } from "./contracts/prototypes/evm/TestERC20"; export { TestERC20__factory } from "./factories/contracts/prototypes/evm/TestERC20__factory"; export type { GatewayZEVM } from "./contracts/prototypes/zevm/GatewayZEVM"; export { GatewayZEVM__factory } from "./factories/contracts/prototypes/zevm/GatewayZEVM__factory"; export type { IGatewayZEVM } from "./contracts/prototypes/zevm/interfaces.sol/IGatewayZEVM"; export { IGatewayZEVM__factory } from "./factories/contracts/prototypes/zevm/interfaces.sol/IGatewayZEVM__factory"; -export type { Sender } from "./contracts/prototypes/zevm/Sender"; -export { Sender__factory } from "./factories/contracts/prototypes/zevm/Sender__factory"; +export type { SenderZEVM } from "./contracts/prototypes/zevm/SenderZEVM"; +export { SenderZEVM__factory } from "./factories/contracts/prototypes/zevm/SenderZEVM__factory"; export type { TestZContract } from "./contracts/prototypes/zevm/TestZContract"; export { TestZContract__factory } from "./factories/contracts/prototypes/zevm/TestZContract__factory"; export type { ZRC20Errors } from "./contracts/prototypes/zevm/ZRC20New.sol/ZRC20Errors"; diff --git a/yarn.lock b/yarn.lock index 3e45fd86..9202ef21 100644 --- a/yarn.lock +++ b/yarn.lock @@ -63,6 +63,13 @@ dependencies: regenerator-runtime "^0.13.11" +"@babel/runtime@^7.21.0": + version "7.24.7" + resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.24.7.tgz#f4f0d5530e8dbdf59b3451b9b3e594b6ba082e12" + integrity sha512-UwgBRMjJP+xv857DCngvqXI3Iq6J4v0wXmwc6sapg+zyhbwmQX67LUEFrkK5tbyJ30jGuG3ZvWpBiB9LCy1kWw== + dependencies: + regenerator-runtime "^0.14.0" + "@chainsafe/as-sha256@^0.3.1": version "0.3.1" resolved "https://registry.npmjs.org/@chainsafe/as-sha256/-/as-sha256-0.3.1.tgz" @@ -1224,6 +1231,18 @@ optionalDependencies: "@trufflesuite/bigint-buffer" "1.1.9" +"@hapi/hoek@^9.0.0", "@hapi/hoek@^9.3.0": + version "9.3.0" + resolved "https://registry.yarnpkg.com/@hapi/hoek/-/hoek-9.3.0.tgz#8368869dcb735be2e7f5cb7647de78e167a251fb" + integrity sha512-/c6rf4UJlmHlC9b5BaNvzAcFv7HZ2QHaV0D4/HNlBdvFnvQq8RI4kYdhyPCl7Xj+oWvTWQ8ujhqS53LIgAe6KQ== + +"@hapi/topo@^5.1.0": + version "5.1.0" + resolved "https://registry.yarnpkg.com/@hapi/topo/-/topo-5.1.0.tgz#dc448e332c6c6e37a4dc02fd84ba8d44b9afb012" + integrity sha512-foQZKJig7Ob0BMAYBfcJk8d77QtOe7Wo4ox7ff1lQYoNNAb6jwcY1ncdoy2e9wQZzvNy7ODZCYJkK8kzmcAnAg== + dependencies: + "@hapi/hoek" "^9.0.0" + "@humanwhocodes/config-array@^0.11.8": version "0.11.8" resolved "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.8.tgz" @@ -1831,6 +1850,23 @@ "@sentry/types" "5.30.0" tslib "^1.9.3" +"@sideway/address@^4.1.5": + version "4.1.5" + resolved "https://registry.yarnpkg.com/@sideway/address/-/address-4.1.5.tgz#4bc149a0076623ced99ca8208ba780d65a99b9d5" + integrity sha512-IqO/DUQHUkPeixNQ8n0JA6102hT9CmaljNTPmQ1u8MEhBo/R4Q8eKLN/vGZxuebwOroDB4cbpjheD4+/sKFK4Q== + dependencies: + "@hapi/hoek" "^9.0.0" + +"@sideway/formula@^3.0.1": + version "3.0.1" + resolved "https://registry.yarnpkg.com/@sideway/formula/-/formula-3.0.1.tgz#80fcbcbaf7ce031e0ef2dd29b1bfc7c3f583611f" + integrity sha512-/poHZJJVjx3L+zVD6g9KgHfYnb443oi7wLu/XKojDviHy6HOEOA6z1Trk5aR1dGcmPenJEgb2sK2I80LeS3MIg== + +"@sideway/pinpoint@^2.0.0": + version "2.0.0" + resolved "https://registry.yarnpkg.com/@sideway/pinpoint/-/pinpoint-2.0.0.tgz#cff8ffadc372ad29fd3f78277aeb29e632cc70df" + integrity sha512-RNiOoTPkptFtSVzQevY/yWtZwf/RxyVnPy/OcA9HBM3MlGDnBEYL5B41H0MTn0Uec8Hi+2qUtTfG2WWZBmMejQ== + "@sindresorhus/is@^5.2.0": version "5.6.0" resolved "https://registry.npmjs.org/@sindresorhus/is/-/is-5.6.0.tgz" @@ -2774,7 +2810,7 @@ axios@^0.21.2: dependencies: follow-redirects "^1.14.0" -axios@^1.4.0: +axios@^1.4.0, axios@^1.6.1: version "1.7.2" resolved "https://registry.yarnpkg.com/axios/-/axios-1.7.2.tgz#b625db8a7051fbea61c35a3cbb3a1daa7b9c7621" integrity sha512-2A8QhOMrbomlDuiLeK9XibIBzuHeRcqqNOHp0Cyp5EoJ1IFDh+XZH3A6BkXtv0K4gFGCI0Y4BM7B1wOEi0Rmgw== @@ -3531,6 +3567,21 @@ concat-stream@^1.6.0, concat-stream@^1.6.2: readable-stream "^2.2.2" typedarray "^0.0.6" +concurrently@^8.2.2: + version "8.2.2" + resolved "https://registry.yarnpkg.com/concurrently/-/concurrently-8.2.2.tgz#353141985c198cfa5e4a3ef90082c336b5851784" + integrity sha512-1dP4gpXFhei8IOtlXRE/T/4H88ElHgTiUzh71YUmtjTEHMSRS2Z/fgOxHSxxusGHogsRfxNq1vyAwxSC+EVyDg== + dependencies: + chalk "^4.1.2" + date-fns "^2.30.0" + lodash "^4.17.21" + rxjs "^7.8.1" + shell-quote "^1.8.1" + spawn-command "0.0.2" + supports-color "^8.1.1" + tree-kill "^1.2.2" + yargs "^17.7.2" + config-chain@^1.1.11: version "1.1.13" resolved "https://registry.npmjs.org/config-chain/-/config-chain-1.1.13.tgz" @@ -3711,6 +3762,13 @@ data-view-byte-offset@^1.0.0: es-errors "^1.3.0" is-data-view "^1.0.1" +date-fns@^2.30.0: + version "2.30.0" + resolved "https://registry.yarnpkg.com/date-fns/-/date-fns-2.30.0.tgz#f367e644839ff57894ec6ac480de40cae4b0f4d0" + integrity sha512-fnULvOpxnC5/Vg3NCiWelDsLiUc9bRwAPs/+LfTLNvetFCtCTN+yQz15C/fs4AwX1R9K5GLtLfn8QW+dWisaAw== + dependencies: + "@babel/runtime" "^7.21.0" + death@^1.1.0: version "1.1.0" resolved "https://registry.npmjs.org/death/-/death-1.1.0.tgz" @@ -6404,6 +6462,17 @@ isstream@~0.1.2: resolved "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz" integrity sha512-Yljz7ffyPbrLpLngrMtZ7NduUgVvi6wG9RJ9IUcyCd59YQ911PBJphODUcbOVbqYfxe1wuYf/LJ8PauMRwsM/g== +joi@^17.11.0: + version "17.13.3" + resolved "https://registry.yarnpkg.com/joi/-/joi-17.13.3.tgz#0f5cc1169c999b30d344366d384b12d92558bcec" + integrity sha512-otDA4ldcIx+ZXsKHWmp0YizCweVRZG96J10b0FevjfuncLO1oX59THoAmHkNubYJ+9gWsYsp5k8v4ib6oDv1fA== + dependencies: + "@hapi/hoek" "^9.3.0" + "@hapi/topo" "^5.1.0" + "@sideway/address" "^4.1.5" + "@sideway/formula" "^3.0.1" + "@sideway/pinpoint" "^2.0.0" + js-cookie@^2.2.1: version "2.2.1" resolved "https://registry.yarnpkg.com/js-cookie/-/js-cookie-2.2.1.tgz#69e106dc5d5806894562902aa5baec3744e9b2b8" @@ -7160,7 +7229,7 @@ minimist-options@4.1.0, minimist-options@^4.0.2: is-plain-obj "^1.1.0" kind-of "^6.0.3" -minimist@^1.1.0, minimist@^1.2.0, minimist@^1.2.5, minimist@^1.2.6, minimist@^1.2.7: +minimist@^1.1.0, minimist@^1.2.0, minimist@^1.2.5, minimist@^1.2.6, minimist@^1.2.7, minimist@^1.2.8: version "1.2.8" resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.8.tgz#c1a464e7693302e082a075cee0c057741ac4772c" integrity sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA== @@ -8156,6 +8225,11 @@ regenerator-runtime@^0.13.11: resolved "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.11.tgz" integrity sha512-kY1AZVr2Ra+t+piVaJ4gxaFaReZVH40AKNo7UCX6W+dEwBo/2oZJzqfuN1qLq1oL45o56cPaTXELwrTh8Fpggg== +regenerator-runtime@^0.14.0: + version "0.14.1" + resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.14.1.tgz#356ade10263f685dda125100cd862c1db895327f" + integrity sha512-dYnhHh0nJoMfnkZs6GmmhFknAGRrLznOu5nc9ML+EJxGvrx6H7teuevqVqCuPcPK//3eDrrjQhehXVx9cnkGdw== + regex-cache@^0.4.2: version "0.4.4" resolved "https://registry.npmjs.org/regex-cache/-/regex-cache-0.4.4.tgz" @@ -8457,6 +8531,13 @@ rxjs@^7.2.0, rxjs@^7.5.5: dependencies: tslib "^2.1.0" +rxjs@^7.8.1: + version "7.8.1" + resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-7.8.1.tgz#6f6f3d99ea8044291efd92e7c7fcf562c4057543" + integrity sha512-AA3TVj+0A2iuIoQkWEK/tqFjBq2j+6PO6Y0zJcvzLAFhEFIO3HL0vls9hWLncZbAAbK0mar7oZ4V079I/qPMxg== + dependencies: + tslib "^2.1.0" + safe-array-concat@^1.1.2: version "1.1.2" resolved "https://registry.yarnpkg.com/safe-array-concat/-/safe-array-concat-1.1.2.tgz#81d77ee0c4e8b863635227c721278dd524c20edb" @@ -8691,7 +8772,7 @@ shebang-regex@^3.0.0: resolved "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz" integrity sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A== -shell-quote@^1.6.1: +shell-quote@^1.6.1, shell-quote@^1.8.1: version "1.8.1" resolved "https://registry.npmjs.org/shell-quote/-/shell-quote-1.8.1.tgz" integrity sha512-6j1W9l1iAs/4xYBI1SYOVZyFcCis9b4KCLQ8fgAGG07QvzaRLVVRQvAy85yNmmZSjYjg4MWh4gNvlPujU/5LpA== @@ -8907,6 +8988,11 @@ source-map@~0.2.0: dependencies: amdefine ">=0.0.4" +spawn-command@0.0.2: + version "0.0.2" + resolved "https://registry.yarnpkg.com/spawn-command/-/spawn-command-0.0.2.tgz#9544e1a43ca045f8531aac1a48cb29bdae62338e" + integrity sha512-zC8zGoGkmc8J9ndvml8Xksr1Amk9qBujgbF0JAIWO7kXr43w0h/0GJNM/Vustixu+YE8N/MTrQ7N31FvHUACxQ== + spawndamnit@^2.0.0: version "2.0.0" resolved "https://registry.npmjs.org/spawndamnit/-/spawndamnit-2.0.0.tgz" @@ -9176,7 +9262,7 @@ supports-color@6.0.0: dependencies: has-flag "^3.0.0" -supports-color@8.1.1: +supports-color@8.1.1, supports-color@^8.1.1: version "8.1.1" resolved "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz" integrity sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q== @@ -9335,6 +9421,11 @@ tr46@~0.0.3: resolved "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz" integrity sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw== +tree-kill@^1.2.2: + version "1.2.2" + resolved "https://registry.yarnpkg.com/tree-kill/-/tree-kill-1.2.2.tgz#4ca09a9092c88b73a7cdc5e8a01b507b0790a0cc" + integrity sha512-L0Orpi8qGpRG//Nd+H90vFB+3iHnue1zSSGmNOOCh1GLJ7rUKVwV2HvijphGQS2UmhUZewS9VgvxYIdgr+fG1A== + trim-newlines@^3.0.0: version "3.0.1" resolved "https://registry.npmjs.org/trim-newlines/-/trim-newlines-3.0.1.tgz" @@ -9771,6 +9862,17 @@ verror@1.10.0: core-util-is "1.0.2" extsprintf "^1.2.0" +wait-on@^7.2.0: + version "7.2.0" + resolved "https://registry.yarnpkg.com/wait-on/-/wait-on-7.2.0.tgz#d76b20ed3fc1e2bebc051fae5c1ff93be7892928" + integrity sha512-wCQcHkRazgjG5XoAq9jbTMLpNIjoSlZslrJ2+N9MxDsGEv1HnFoVjOCexL0ESva7Y9cu350j+DWADdk54s4AFQ== + dependencies: + axios "^1.6.1" + joi "^17.11.0" + lodash "^4.17.21" + minimist "^1.2.8" + rxjs "^7.8.1" + wcwidth@^1.0.1: version "1.0.1" resolved "https://registry.npmjs.org/wcwidth/-/wcwidth-1.0.1.tgz" @@ -10082,6 +10184,19 @@ yargs@^17.7.1: y18n "^5.0.5" yargs-parser "^21.1.1" +yargs@^17.7.2: + version "17.7.2" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-17.7.2.tgz#991df39aca675a192b816e1e0363f9d75d2aa269" + integrity sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w== + dependencies: + cliui "^8.0.1" + escalade "^3.1.1" + get-caller-file "^2.0.5" + require-directory "^2.1.1" + string-width "^4.2.3" + y18n "^5.0.5" + yargs-parser "^21.1.1" + yn@3.1.1: version "3.1.1" resolved "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz"