From 9a785bce6a01a2ad78624b8be895cfe053b2cc84 Mon Sep 17 00:00:00 2001 From: skosito Date: Mon, 1 Jul 2024 16:06:29 +0100 Subject: [PATCH] feat: prototype inbound zevm (#183) Co-authored-by: lumtis --- contracts/prototypes/zevm/GatewayZEVM.sol | 61 + contracts/prototypes/zevm/Sender.sol | 35 + contracts/prototypes/zevm/interfaces.sol | 10 + contracts/zevm/interfaces/IZRC20.sol | 4 +- data/addresses.testnet.json | 13 + .../interfaces/IZRC20.sol/interface.IZRC20.md | 4 +- lib/types.ts | 1 + .../zevm/gatewayzevm.sol/gatewayzevm.go | 1477 +++++++++++++++++ .../zevm/interfaces.sol/igatewayzevm.go | 244 +++ .../prototypes/zevm/sender.sol/sender.go | 276 +++ .../zevm/interfaces/izrc20.sol/izrc20.go | 50 +- .../zevm/systemcontract.sol/systemcontract.go | 2 +- .../systemcontractmock.go | 2 +- pkg/hardhat/console.sol/console.go | 203 +++ test/prototypes/GatewayIntegration.spec.ts | 234 +++ test/prototypes/GatewayZEVM.spec.ts | 114 ++ typechain-types/contracts/prototypes/index.ts | 2 + .../contracts/prototypes/zevm/GatewayZEVM.ts | 583 +++++++ .../contracts/prototypes/zevm/Sender.ts | 210 +++ .../contracts/prototypes/zevm/index.ts | 7 + .../zevm/interfaces.sol/IGatewayZEVM.ts | 209 +++ .../prototypes/zevm/interfaces.sol/index.ts | 4 + .../contracts/zevm/interfaces/IZRC20.ts | 27 +- .../factories/contracts/prototypes/index.ts | 1 + .../prototypes/zevm/GatewayZEVM__factory.ts | 394 +++++ .../prototypes/zevm/Sender__factory.ts | 152 ++ .../contracts/prototypes/zevm/index.ts | 6 + .../interfaces.sol/IGatewayZEVM__factory.ts | 95 ++ .../prototypes/zevm/interfaces.sol/index.ts | 4 + .../SystemContract__factory.ts | 2 +- .../zevm/interfaces/IZRC20__factory.ts | 7 +- .../SystemContractMock__factory.ts | 2 +- typechain-types/hardhat.d.ts | 27 + typechain-types/index.ts | 6 + 34 files changed, 4413 insertions(+), 55 deletions(-) create mode 100644 contracts/prototypes/zevm/GatewayZEVM.sol create mode 100644 contracts/prototypes/zevm/Sender.sol create mode 100644 contracts/prototypes/zevm/interfaces.sol create mode 100644 pkg/contracts/prototypes/zevm/gatewayzevm.sol/gatewayzevm.go create mode 100644 pkg/contracts/prototypes/zevm/interfaces.sol/igatewayzevm.go create mode 100644 pkg/contracts/prototypes/zevm/sender.sol/sender.go create mode 100644 pkg/hardhat/console.sol/console.go create mode 100644 test/prototypes/GatewayIntegration.spec.ts create mode 100644 test/prototypes/GatewayZEVM.spec.ts create mode 100644 typechain-types/contracts/prototypes/zevm/GatewayZEVM.ts create mode 100644 typechain-types/contracts/prototypes/zevm/Sender.ts create mode 100644 typechain-types/contracts/prototypes/zevm/index.ts create mode 100644 typechain-types/contracts/prototypes/zevm/interfaces.sol/IGatewayZEVM.ts create mode 100644 typechain-types/contracts/prototypes/zevm/interfaces.sol/index.ts create mode 100644 typechain-types/factories/contracts/prototypes/zevm/GatewayZEVM__factory.ts create mode 100644 typechain-types/factories/contracts/prototypes/zevm/Sender__factory.ts create mode 100644 typechain-types/factories/contracts/prototypes/zevm/index.ts create mode 100644 typechain-types/factories/contracts/prototypes/zevm/interfaces.sol/IGatewayZEVM__factory.ts create mode 100644 typechain-types/factories/contracts/prototypes/zevm/interfaces.sol/index.ts diff --git a/contracts/prototypes/zevm/GatewayZEVM.sol b/contracts/prototypes/zevm/GatewayZEVM.sol new file mode 100644 index 00000000..170b2f45 --- /dev/null +++ b/contracts/prototypes/zevm/GatewayZEVM.sol @@ -0,0 +1,61 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.8.7; + +import "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol"; +import "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol"; +import "@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol"; +import "../../zevm/interfaces/IZRC20.sol"; + +// The GatewayZEVM contract is the endpoint to call smart contracts on omnichain +// The contract doesn't hold any funds and should never have active allowances +contract GatewayZEVM is Initializable, OwnableUpgradeable, UUPSUpgradeable { + address public constant FUNGIBLE_MODULE_ADDRESS = 0x735b14BB79463307AAcBED86DAf3322B1e6226aB; + + error WithdrawalFailed(); + error InsufficientZRC20Amount(); + error GasFeeTransferFailed(); + + event Call(address indexed sender, bytes indexed receiver, bytes message); + event Withdrawal(address indexed from, bytes to, uint256 value, uint256 gasfee, uint256 protocolFlatFee, bytes message); + + /// @custom:oz-upgrades-unsafe-allow constructor + constructor() { + _disableInitializers(); + } + + function initialize() public initializer { + __Ownable_init(); + __UUPSUpgradeable_init(); + } + + function _authorizeUpgrade(address newImplementation) internal override onlyOwner() {} + + function _withdraw(uint256 amount, address zrc20) internal returns (uint256) { + (address gasZRC20, uint256 gasFee) = IZRC20(zrc20).withdrawGasFee(); + if (!IZRC20(gasZRC20).transferFrom(msg.sender, FUNGIBLE_MODULE_ADDRESS, gasFee)) { + revert GasFeeTransferFailed(); + } + + IZRC20(zrc20).transferFrom(msg.sender, address(this), amount); + IZRC20(zrc20).burn(amount); + + return gasFee; + } + + // Withdraw ZRC20 tokens to external chain + function withdraw(bytes memory receiver, uint256 amount, address zrc20) external { + uint256 gasFee = _withdraw(amount, zrc20); + emit Withdrawal(msg.sender, receiver, amount, gasFee, IZRC20(zrc20).PROTOCOL_FLAT_FEE(), ""); + } + + // Withdraw ZRC20 tokens and call smart contract on external chain + function withdrawAndCall(bytes memory receiver, uint256 amount, address zrc20, bytes calldata message) external { + uint256 gasFee = _withdraw(amount, zrc20); + emit Withdrawal(msg.sender, receiver, amount, gasFee, IZRC20(zrc20).PROTOCOL_FLAT_FEE(), message); + } + + // Call smart contract on external chain without asset transfer + function call(bytes memory receiver, bytes calldata message) external { + emit Call(msg.sender, receiver, message); + } +} diff --git a/contracts/prototypes/zevm/Sender.sol b/contracts/prototypes/zevm/Sender.sol new file mode 100644 index 00000000..a495cc66 --- /dev/null +++ b/contracts/prototypes/zevm/Sender.sol @@ -0,0 +1,35 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.8.7; + +import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; +import "./interfaces.sol"; +import "../../zevm/interfaces/IZRC20.sol"; + +contract Sender { + address public gateway; + + constructor(address _gateway) { + gateway = _gateway; + } + + // Call receiver on EVM + function callReceiver(bytes memory receiver, string memory str, uint256 num, bool flag) external { + // Encode the function call to the receiver's receiveA method + bytes memory message = abi.encodeWithSignature("receiveA(string,uint256,bool)", str, num, flag); + + // Pass encoded call to gateway + IGatewayZEVM(gateway).call(receiver, message); + } + + // Withdraw and call receiver on EVM + function withdrawAndCallReceiver(bytes memory receiver, uint256 amount, address zrc20, string memory str, uint256 num, bool flag) external { + // Encode the function call to the receiver's receiveA method + bytes memory message = abi.encodeWithSignature("receiveA(string,uint256,bool)", str, num, flag); + + // Approve gateway to withdraw + IZRC20(zrc20).approve(gateway, amount); + + // Pass encoded call to gateway + IGatewayZEVM(gateway).withdrawAndCall(receiver, amount, zrc20, message); + } +} \ No newline at end of file diff --git a/contracts/prototypes/zevm/interfaces.sol b/contracts/prototypes/zevm/interfaces.sol new file mode 100644 index 00000000..3684976d --- /dev/null +++ b/contracts/prototypes/zevm/interfaces.sol @@ -0,0 +1,10 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.8.7; + +interface IGatewayZEVM { + function withdraw(bytes memory receiver, uint256 amount, address zrc20) external; + + function withdrawAndCall(bytes memory receiver, uint256 amount, address zrc20, bytes calldata message) external; + + function call(bytes memory receiver, bytes calldata message) external; +} \ No newline at end of file diff --git a/contracts/zevm/interfaces/IZRC20.sol b/contracts/zevm/interfaces/IZRC20.sol index c20da70a..eab06e7f 100644 --- a/contracts/zevm/interfaces/IZRC20.sol +++ b/contracts/zevm/interfaces/IZRC20.sol @@ -20,13 +20,13 @@ interface IZRC20 { function deposit(address to, uint256 amount) external returns (bool); - function burn(address account, uint256 amount) external returns (bool); + function burn(uint256 amount) external returns (bool); function withdraw(bytes memory to, uint256 amount) external returns (bool); function withdrawGasFee() external view returns (address, uint256); - function PROTOCOL_FEE() external view returns (uint256); + function PROTOCOL_FLAT_FEE() external view returns (uint256); event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); diff --git a/data/addresses.testnet.json b/data/addresses.testnet.json index f0c48fcb..cfe36c58 100644 --- a/data/addresses.testnet.json +++ b/data/addresses.testnet.json @@ -197,6 +197,19 @@ "symbol": "tBTC", "type": "zrc20" }, + { + "address": "0x777915D031d1e8144c90D025C594b3b8Bf07a08d", + "asset": "", + "category": "omnichain", + "chain_id": 7001, + "chain_name": "zeta_testnet", + "coin_type": "gas", + "decimals": 18, + "description": "ZetaChain ZRC20 Amoy MATIC-amoy_testnet", + "foreign_chain_id": "80002", + "symbol": "MATIC.AMOY", + "type": "zrc20" + }, { "address": "0x7c8dDa80bbBE1254a7aACf3219EBe1481c6E01d7", "asset": "0x64544969ed7EBf5f083679233325356EbE738930", diff --git a/docs/src/contracts/zevm/interfaces/IZRC20.sol/interface.IZRC20.md b/docs/src/contracts/zevm/interfaces/IZRC20.sol/interface.IZRC20.md index 6c211c96..ee91835d 100644 --- a/docs/src/contracts/zevm/interfaces/IZRC20.sol/interface.IZRC20.md +++ b/docs/src/contracts/zevm/interfaces/IZRC20.sol/interface.IZRC20.md @@ -87,11 +87,11 @@ function withdraw(bytes memory to, uint256 amount) external returns (bool); function withdrawGasFee() external view returns (address, uint256); ``` -### PROTOCOL_FEE +### PROTOCOL_FLAT_FEE ```solidity -function PROTOCOL_FEE() external view returns (uint256); +function PROTOCOL_FLAT_FEE() external view returns (uint256); ``` ## Events diff --git a/lib/types.ts b/lib/types.ts index 28738b51..92971a98 100644 --- a/lib/types.ts +++ b/lib/types.ts @@ -3,6 +3,7 @@ export type ParamSymbol = | "BTC.BTC" | "ETH.ETH" | "gETH" + | "MATIC.AMOY" | "sETH.SEPOLIA" | "tBNB" | "tBTC" diff --git a/pkg/contracts/prototypes/zevm/gatewayzevm.sol/gatewayzevm.go b/pkg/contracts/prototypes/zevm/gatewayzevm.sol/gatewayzevm.go new file mode 100644 index 00000000..751c8acf --- /dev/null +++ b/pkg/contracts/prototypes/zevm/gatewayzevm.sol/gatewayzevm.go @@ -0,0 +1,1477 @@ +// Code generated - DO NOT EDIT. +// This file is a generated binding and any manual changes will be lost. + +package gatewayzevm + +import ( + "errors" + "math/big" + "strings" + + ethereum "github.com/ethereum/go-ethereum" + "github.com/ethereum/go-ethereum/accounts/abi" + "github.com/ethereum/go-ethereum/accounts/abi/bind" + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/core/types" + "github.com/ethereum/go-ethereum/event" +) + +// Reference imports to suppress errors if they are not otherwise used. +var ( + _ = errors.New + _ = big.NewInt + _ = strings.NewReader + _ = ethereum.NotFound + _ = bind.Bind + _ = common.Big1 + _ = types.BloomLookup + _ = event.NewSubscription + _ = abi.ConvertType +) + +// GatewayZEVMMetaData contains all meta data concerning the GatewayZEVM contract. +var GatewayZEVMMetaData = &bind.MetaData{ + ABI: "[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"GasFeeTransferFailed\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InsufficientZRC20Amount\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"WithdrawalFailed\",\"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\":[],\"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: "0x60a06040523073ffffffffffffffffffffffffffffffffffffffff1660809073ffffffffffffffffffffffffffffffffffffffff1660601b8152503480156200004757600080fd5b50620000586200005e60201b60201c565b62000208565b600060019054906101000a900460ff1615620000b1576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401620000a8906200015c565b60405180910390fd5b60ff801660008054906101000a900460ff1660ff1614620001225760ff6000806101000a81548160ff021916908360ff1602179055507f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb384740249860ff6040516200011991906200017e565b60405180910390a15b565b6000620001336027836200019b565b91506200014082620001b9565b604082019050919050565b6200015681620001ac565b82525050565b60006020820190508181036000830152620001778162000124565b9050919050565b60006020820190506200019560008301846200014b565b92915050565b600082825260208201905092915050565b600060ff82169050919050565b7f496e697469616c697a61626c653a20636f6e747261637420697320696e69746960008201527f616c697a696e6700000000000000000000000000000000000000000000000000602082015250565b60805160601c612358620002436000396000818161038b0152818161041a0152818161052c015281816105bb015261066b01526123586000f3fe60806040526004361061009c5760003560e01c806352d1902d1161006457806352d1902d14610163578063715018a61461018e5780637993c1e0146101a55780638129fc1c146101ce5780638da5cb5b146101e5578063f2fde38b146102105761009c565b80630ac7c44c146100a1578063135390f9146100ca5780633659cfe6146100f35780633ce4a5bc1461011c5780634f1ef28614610147575b600080fd5b3480156100ad57600080fd5b506100c860048036038101906100c3919061161a565b610239565b005b3480156100d657600080fd5b506100f160048036038101906100ec9190611696565b6102a4565b005b3480156100ff57600080fd5b5061011a600480360381019061011591906114f7565b610389565b005b34801561012857600080fd5b50610131610512565b60405161013e9190611a9d565b60405180910390f35b610161600480360381019061015c9190611524565b61052a565b005b34801561016f57600080fd5b50610178610667565b6040516101859190611aef565b60405180910390f35b34801561019a57600080fd5b506101a3610720565b005b3480156101b157600080fd5b506101cc60048036038101906101c79190611705565b610734565b005b3480156101da57600080fd5b506101e361081f565b005b3480156101f157600080fd5b506101fa610965565b6040516102079190611a9d565b60405180910390f35b34801561021c57600080fd5b50610237600480360381019061023291906114f7565b61098f565b005b826040516102479190611a86565b60405180910390203373ffffffffffffffffffffffffffffffffffffffff167f2b5af078ce280d812dc2241658dc5435c93408020e5418eef55a2b536de51c0f8484604051610297929190611b0a565b60405180910390a3505050565b60006102b08383610a13565b90503373ffffffffffffffffffffffffffffffffffffffff167f1866ad2994816c79f4103e1eddacc7b085eb7c635205243a28940be69b01536d8585848673ffffffffffffffffffffffffffffffffffffffff16634d8943bb6040518163ffffffff1660e01b815260040160206040518083038186803b15801561033357600080fd5b505afa158015610347573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061036b91906117a9565b60405161037b9493929190611b91565b60405180910390a250505050565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163073ffffffffffffffffffffffffffffffffffffffff161415610418576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161040f90611c4d565b60405180910390fd5b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16610457610c99565b73ffffffffffffffffffffffffffffffffffffffff16146104ad576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016104a490611c6d565b60405180910390fd5b6104b681610cf0565b61050f81600067ffffffffffffffff8111156104d5576104d4611f25565b5b6040519080825280601f01601f1916602001820160405280156105075781602001600182028036833780820191505090505b506000610cfb565b50565b73735b14bb79463307aacbed86daf3322b1e6226ab81565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163073ffffffffffffffffffffffffffffffffffffffff1614156105b9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105b090611c4d565b60405180910390fd5b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166105f8610c99565b73ffffffffffffffffffffffffffffffffffffffff161461064e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161064590611c6d565b60405180910390fd5b61065782610cf0565b61066382826001610cfb565b5050565b60007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163073ffffffffffffffffffffffffffffffffffffffff16146106f7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106ee90611c8d565b60405180910390fd5b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc60001b905090565b610728610e78565b6107326000610ef6565b565b60006107408585610a13565b90503373ffffffffffffffffffffffffffffffffffffffff167f1866ad2994816c79f4103e1eddacc7b085eb7c635205243a28940be69b01536d8787848873ffffffffffffffffffffffffffffffffffffffff16634d8943bb6040518163ffffffff1660e01b815260040160206040518083038186803b1580156107c357600080fd5b505afa1580156107d7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107fb91906117a9565b888860405161080f96959493929190611b2e565b60405180910390a2505050505050565b60008060019054906101000a900460ff161590508080156108505750600160008054906101000a900460ff1660ff16105b8061087d575061085f30610fbc565b15801561087c5750600160008054906101000a900460ff1660ff16145b5b6108bc576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016108b390611ccd565b60405180910390fd5b60016000806101000a81548160ff021916908360ff16021790555080156108f9576001600060016101000a81548160ff0219169083151502179055505b610901610fdf565b610909611038565b80156109625760008060016101000a81548160ff0219169083151502179055507f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb384740249860016040516109599190611bf0565b60405180910390a15b50565b6000603360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b610997610e78565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415610a07576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109fe90611c2d565b60405180910390fd5b610a1081610ef6565b50565b60008060008373ffffffffffffffffffffffffffffffffffffffff1663d9eeebed6040518163ffffffff1660e01b8152600401604080518083038186803b158015610a5d57600080fd5b505afa158015610a71573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a959190611580565b915091508173ffffffffffffffffffffffffffffffffffffffff166323b872dd3373735b14bb79463307aacbed86daf3322b1e6226ab846040518463ffffffff1660e01b8152600401610aea93929190611ab8565b602060405180830381600087803b158015610b0457600080fd5b505af1158015610b18573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b3c91906115c0565b610b72576040517f0a7cd6d600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8373ffffffffffffffffffffffffffffffffffffffff166323b872dd3330886040518463ffffffff1660e01b8152600401610baf93929190611ab8565b602060405180830381600087803b158015610bc957600080fd5b505af1158015610bdd573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c0191906115c0565b508373ffffffffffffffffffffffffffffffffffffffff166342966c68866040518263ffffffff1660e01b8152600401610c3b9190611d8d565b602060405180830381600087803b158015610c5557600080fd5b505af1158015610c69573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c8d91906115c0565b50809250505092915050565b6000610cc77f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc60001b611089565b60000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b610cf8610e78565b50565b610d277f4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd914360001b611093565b60000160009054906101000a900460ff1615610d4b57610d468361109d565b610e73565b8273ffffffffffffffffffffffffffffffffffffffff166352d1902d6040518163ffffffff1660e01b815260040160206040518083038186803b158015610d9157600080fd5b505afa925050508015610dc257506040513d601f19601f82011682018060405250810190610dbf91906115ed565b60015b610e01576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610df890611ced565b60405180910390fd5b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc60001b8114610e66576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e5d90611cad565b60405180910390fd5b50610e72838383611156565b5b505050565b610e80611182565b73ffffffffffffffffffffffffffffffffffffffff16610e9e610965565b73ffffffffffffffffffffffffffffffffffffffff1614610ef4576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610eeb90611d2d565b60405180910390fd5b565b6000603360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905081603360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b6000808273ffffffffffffffffffffffffffffffffffffffff163b119050919050565b600060019054906101000a900460ff1661102e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161102590611d6d565b60405180910390fd5b61103661118a565b565b600060019054906101000a900460ff16611087576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161107e90611d6d565b60405180910390fd5b565b6000819050919050565b6000819050919050565b6110a681610fbc565b6110e5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016110dc90611d0d565b60405180910390fd5b806111127f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc60001b611089565b60000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b61115f836111eb565b60008251118061116c5750805b1561117d5761117b838361123a565b505b505050565b600033905090565b600060019054906101000a900460ff166111d9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016111d090611d6d565b60405180910390fd5b6111e96111e4611182565b610ef6565b565b6111f48161109d565b8073ffffffffffffffffffffffffffffffffffffffff167fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b60405160405180910390a250565b606061125f83836040518060600160405280602781526020016122fc60279139611267565b905092915050565b60606000808573ffffffffffffffffffffffffffffffffffffffff16856040516112919190611a86565b600060405180830381855af49150503d80600081146112cc576040519150601f19603f3d011682016040523d82523d6000602084013e6112d1565b606091505b50915091506112e2868383876112ed565b925050509392505050565b60608315611350576000835114156113485761130885610fbc565b611347576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161133e90611d4d565b60405180910390fd5b5b82905061135b565b61135a8383611363565b5b949350505050565b6000825111156113765781518083602001fd5b806040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016113aa9190611c0b565b60405180910390fd5b60006113c66113c184611dcd565b611da8565b9050828152602081018484840111156113e2576113e1611f63565b5b6113ed848285611eb2565b509392505050565b6000813590506114048161229f565b92915050565b6000815190506114198161229f565b92915050565b60008151905061142e816122b6565b92915050565b600081519050611443816122cd565b92915050565b60008083601f84011261145f5761145e611f59565b5b8235905067ffffffffffffffff81111561147c5761147b611f54565b5b60208301915083600182028301111561149857611497611f5e565b5b9250929050565b600082601f8301126114b4576114b3611f59565b5b81356114c48482602086016113b3565b91505092915050565b6000813590506114dc816122e4565b92915050565b6000815190506114f1816122e4565b92915050565b60006020828403121561150d5761150c611f6d565b5b600061151b848285016113f5565b91505092915050565b6000806040838503121561153b5761153a611f6d565b5b6000611549858286016113f5565b925050602083013567ffffffffffffffff81111561156a57611569611f68565b5b6115768582860161149f565b9150509250929050565b6000806040838503121561159757611596611f6d565b5b60006115a58582860161140a565b92505060206115b6858286016114e2565b9150509250929050565b6000602082840312156115d6576115d5611f6d565b5b60006115e48482850161141f565b91505092915050565b60006020828403121561160357611602611f6d565b5b600061161184828501611434565b91505092915050565b60008060006040848603121561163357611632611f6d565b5b600084013567ffffffffffffffff81111561165157611650611f68565b5b61165d8682870161149f565b935050602084013567ffffffffffffffff81111561167e5761167d611f68565b5b61168a86828701611449565b92509250509250925092565b6000806000606084860312156116af576116ae611f6d565b5b600084013567ffffffffffffffff8111156116cd576116cc611f68565b5b6116d98682870161149f565b93505060206116ea868287016114cd565b92505060406116fb868287016113f5565b9150509250925092565b60008060008060006080868803121561172157611720611f6d565b5b600086013567ffffffffffffffff81111561173f5761173e611f68565b5b61174b8882890161149f565b955050602061175c888289016114cd565b945050604061176d888289016113f5565b935050606086013567ffffffffffffffff81111561178e5761178d611f68565b5b61179a88828901611449565b92509250509295509295909350565b6000602082840312156117bf576117be611f6d565b5b60006117cd848285016114e2565b91505092915050565b6117df81611e41565b82525050565b6117ee81611e5f565b82525050565b60006118008385611e14565b935061180d838584611eb2565b61181683611f72565b840190509392505050565b600061182c82611dfe565b6118368185611e14565b9350611846818560208601611ec1565b61184f81611f72565b840191505092915050565b600061186582611dfe565b61186f8185611e25565b935061187f818560208601611ec1565b80840191505092915050565b61189481611ea0565b82525050565b60006118a582611e09565b6118af8185611e30565b93506118bf818560208601611ec1565b6118c881611f72565b840191505092915050565b60006118e0602683611e30565b91506118eb82611f83565b604082019050919050565b6000611903602c83611e30565b915061190e82611fd2565b604082019050919050565b6000611926602c83611e30565b915061193182612021565b604082019050919050565b6000611949603883611e30565b915061195482612070565b604082019050919050565b600061196c602983611e30565b9150611977826120bf565b604082019050919050565b600061198f602e83611e30565b915061199a8261210e565b604082019050919050565b60006119b2602e83611e30565b91506119bd8261215d565b604082019050919050565b60006119d5602d83611e30565b91506119e0826121ac565b604082019050919050565b60006119f8602083611e30565b9150611a03826121fb565b602082019050919050565b6000611a1b600083611e14565b9150611a2682612224565b600082019050919050565b6000611a3e601d83611e30565b9150611a4982612227565b602082019050919050565b6000611a61602b83611e30565b9150611a6c82612250565b604082019050919050565b611a8081611e89565b82525050565b6000611a92828461185a565b915081905092915050565b6000602082019050611ab260008301846117d6565b92915050565b6000606082019050611acd60008301866117d6565b611ada60208301856117d6565b611ae76040830184611a77565b949350505050565b6000602082019050611b0460008301846117e5565b92915050565b60006020820190508181036000830152611b258184866117f4565b90509392505050565b600060a0820190508181036000830152611b488189611821565b9050611b576020830188611a77565b611b646040830187611a77565b611b716060830186611a77565b8181036080830152611b848184866117f4565b9050979650505050505050565b600060a0820190508181036000830152611bab8187611821565b9050611bba6020830186611a77565b611bc76040830185611a77565b611bd46060830184611a77565b8181036080830152611be581611a0e565b905095945050505050565b6000602082019050611c05600083018461188b565b92915050565b60006020820190508181036000830152611c25818461189a565b905092915050565b60006020820190508181036000830152611c46816118d3565b9050919050565b60006020820190508181036000830152611c66816118f6565b9050919050565b60006020820190508181036000830152611c8681611919565b9050919050565b60006020820190508181036000830152611ca68161193c565b9050919050565b60006020820190508181036000830152611cc68161195f565b9050919050565b60006020820190508181036000830152611ce681611982565b9050919050565b60006020820190508181036000830152611d06816119a5565b9050919050565b60006020820190508181036000830152611d26816119c8565b9050919050565b60006020820190508181036000830152611d46816119eb565b9050919050565b60006020820190508181036000830152611d6681611a31565b9050919050565b60006020820190508181036000830152611d8681611a54565b9050919050565b6000602082019050611da26000830184611a77565b92915050565b6000611db2611dc3565b9050611dbe8282611ef4565b919050565b6000604051905090565b600067ffffffffffffffff821115611de857611de7611f25565b5b611df182611f72565b9050602081019050919050565b600081519050919050565b600081519050919050565b600082825260208201905092915050565b600081905092915050565b600082825260208201905092915050565b6000611e4c82611e69565b9050919050565b60008115159050919050565b6000819050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b6000611eab82611e93565b9050919050565b82818337600083830152505050565b60005b83811015611edf578082015181840152602081019050611ec4565b83811115611eee576000848401525b50505050565b611efd82611f72565b810181811067ffffffffffffffff82111715611f1c57611f1b611f25565b5b80604052505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b7f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060008201527f64656c656761746563616c6c0000000000000000000000000000000000000000602082015250565b7f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060008201527f6163746976652070726f78790000000000000000000000000000000000000000602082015250565b7f555550535570677261646561626c653a206d757374206e6f742062652063616c60008201527f6c6564207468726f7567682064656c656761746563616c6c0000000000000000602082015250565b7f45524331393637557067726164653a20756e737570706f727465642070726f7860008201527f6961626c65555549440000000000000000000000000000000000000000000000602082015250565b7f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160008201527f647920696e697469616c697a6564000000000000000000000000000000000000602082015250565b7f45524331393637557067726164653a206e657720696d706c656d656e7461746960008201527f6f6e206973206e6f742055555053000000000000000000000000000000000000602082015250565b7f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60008201527f6f74206120636f6e747261637400000000000000000000000000000000000000602082015250565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b50565b7f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000600082015250565b7f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960008201527f6e697469616c697a696e67000000000000000000000000000000000000000000602082015250565b6122a881611e41565b81146122b357600080fd5b50565b6122bf81611e53565b81146122ca57600080fd5b50565b6122d681611e5f565b81146122e157600080fd5b50565b6122ed81611e89565b81146122f857600080fd5b5056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a2646970667358221220a96ea75aa24da821773b60cdeb37abc9c0c82e869b0c543ddb8f552ae04b153164736f6c63430008070033", +} + +// GatewayZEVMABI is the input ABI used to generate the binding from. +// Deprecated: Use GatewayZEVMMetaData.ABI instead. +var GatewayZEVMABI = GatewayZEVMMetaData.ABI + +// GatewayZEVMBin is the compiled bytecode used for deploying new contracts. +// Deprecated: Use GatewayZEVMMetaData.Bin instead. +var GatewayZEVMBin = GatewayZEVMMetaData.Bin + +// DeployGatewayZEVM deploys a new Ethereum contract, binding an instance of GatewayZEVM to it. +func DeployGatewayZEVM(auth *bind.TransactOpts, backend bind.ContractBackend) (common.Address, *types.Transaction, *GatewayZEVM, error) { + parsed, err := GatewayZEVMMetaData.GetAbi() + if err != nil { + return common.Address{}, nil, nil, err + } + if parsed == nil { + return common.Address{}, nil, nil, errors.New("GetABI returned nil") + } + + address, tx, contract, err := bind.DeployContract(auth, *parsed, common.FromHex(GatewayZEVMBin), backend) + if err != nil { + return common.Address{}, nil, nil, err + } + return address, tx, &GatewayZEVM{GatewayZEVMCaller: GatewayZEVMCaller{contract: contract}, GatewayZEVMTransactor: GatewayZEVMTransactor{contract: contract}, GatewayZEVMFilterer: GatewayZEVMFilterer{contract: contract}}, nil +} + +// GatewayZEVM is an auto generated Go binding around an Ethereum contract. +type GatewayZEVM struct { + GatewayZEVMCaller // Read-only binding to the contract + GatewayZEVMTransactor // Write-only binding to the contract + GatewayZEVMFilterer // Log filterer for contract events +} + +// GatewayZEVMCaller is an auto generated read-only Go binding around an Ethereum contract. +type GatewayZEVMCaller struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// GatewayZEVMTransactor is an auto generated write-only Go binding around an Ethereum contract. +type GatewayZEVMTransactor struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// GatewayZEVMFilterer is an auto generated log filtering Go binding around an Ethereum contract events. +type GatewayZEVMFilterer struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// GatewayZEVMSession is an auto generated Go binding around an Ethereum contract, +// with pre-set call and transact options. +type GatewayZEVMSession struct { + Contract *GatewayZEVM // 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 +} + +// GatewayZEVMCallerSession is an auto generated read-only Go binding around an Ethereum contract, +// with pre-set call options. +type GatewayZEVMCallerSession struct { + Contract *GatewayZEVMCaller // Generic contract caller binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session +} + +// GatewayZEVMTransactorSession is an auto generated write-only Go binding around an Ethereum contract, +// with pre-set transact options. +type GatewayZEVMTransactorSession struct { + Contract *GatewayZEVMTransactor // Generic contract transactor binding to set the session for + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// GatewayZEVMRaw is an auto generated low-level Go binding around an Ethereum contract. +type GatewayZEVMRaw struct { + Contract *GatewayZEVM // Generic contract binding to access the raw methods on +} + +// GatewayZEVMCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. +type GatewayZEVMCallerRaw struct { + Contract *GatewayZEVMCaller // Generic read-only contract binding to access the raw methods on +} + +// GatewayZEVMTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. +type GatewayZEVMTransactorRaw struct { + Contract *GatewayZEVMTransactor // Generic write-only contract binding to access the raw methods on +} + +// NewGatewayZEVM creates a new instance of GatewayZEVM, bound to a specific deployed contract. +func NewGatewayZEVM(address common.Address, backend bind.ContractBackend) (*GatewayZEVM, error) { + contract, err := bindGatewayZEVM(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &GatewayZEVM{GatewayZEVMCaller: GatewayZEVMCaller{contract: contract}, GatewayZEVMTransactor: GatewayZEVMTransactor{contract: contract}, GatewayZEVMFilterer: GatewayZEVMFilterer{contract: contract}}, nil +} + +// NewGatewayZEVMCaller creates a new read-only instance of GatewayZEVM, bound to a specific deployed contract. +func NewGatewayZEVMCaller(address common.Address, caller bind.ContractCaller) (*GatewayZEVMCaller, error) { + contract, err := bindGatewayZEVM(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &GatewayZEVMCaller{contract: contract}, nil +} + +// NewGatewayZEVMTransactor creates a new write-only instance of GatewayZEVM, bound to a specific deployed contract. +func NewGatewayZEVMTransactor(address common.Address, transactor bind.ContractTransactor) (*GatewayZEVMTransactor, error) { + contract, err := bindGatewayZEVM(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &GatewayZEVMTransactor{contract: contract}, nil +} + +// NewGatewayZEVMFilterer creates a new log filterer instance of GatewayZEVM, bound to a specific deployed contract. +func NewGatewayZEVMFilterer(address common.Address, filterer bind.ContractFilterer) (*GatewayZEVMFilterer, error) { + contract, err := bindGatewayZEVM(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &GatewayZEVMFilterer{contract: contract}, nil +} + +// bindGatewayZEVM binds a generic wrapper to an already deployed contract. +func bindGatewayZEVM(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := GatewayZEVMMetaData.GetAbi() + if err != nil { + return nil, err + } + return bind.NewBoundContract(address, *parsed, caller, transactor, filterer), nil +} + +// 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 (_GatewayZEVM *GatewayZEVMRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _GatewayZEVM.Contract.GatewayZEVMCaller.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 (_GatewayZEVM *GatewayZEVMRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _GatewayZEVM.Contract.GatewayZEVMTransactor.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_GatewayZEVM *GatewayZEVMRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _GatewayZEVM.Contract.GatewayZEVMTransactor.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 (_GatewayZEVM *GatewayZEVMCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _GatewayZEVM.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 (_GatewayZEVM *GatewayZEVMTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _GatewayZEVM.Contract.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_GatewayZEVM *GatewayZEVMTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _GatewayZEVM.Contract.contract.Transact(opts, method, params...) +} + +// FUNGIBLEMODULEADDRESS is a free data retrieval call binding the contract method 0x3ce4a5bc. +// +// Solidity: function FUNGIBLE_MODULE_ADDRESS() view returns(address) +func (_GatewayZEVM *GatewayZEVMCaller) FUNGIBLEMODULEADDRESS(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _GatewayZEVM.contract.Call(opts, &out, "FUNGIBLE_MODULE_ADDRESS") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// FUNGIBLEMODULEADDRESS is a free data retrieval call binding the contract method 0x3ce4a5bc. +// +// Solidity: function FUNGIBLE_MODULE_ADDRESS() view returns(address) +func (_GatewayZEVM *GatewayZEVMSession) FUNGIBLEMODULEADDRESS() (common.Address, error) { + return _GatewayZEVM.Contract.FUNGIBLEMODULEADDRESS(&_GatewayZEVM.CallOpts) +} + +// FUNGIBLEMODULEADDRESS is a free data retrieval call binding the contract method 0x3ce4a5bc. +// +// Solidity: function FUNGIBLE_MODULE_ADDRESS() view returns(address) +func (_GatewayZEVM *GatewayZEVMCallerSession) FUNGIBLEMODULEADDRESS() (common.Address, error) { + return _GatewayZEVM.Contract.FUNGIBLEMODULEADDRESS(&_GatewayZEVM.CallOpts) +} + +// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. +// +// Solidity: function owner() view returns(address) +func (_GatewayZEVM *GatewayZEVMCaller) Owner(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _GatewayZEVM.contract.Call(opts, &out, "owner") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. +// +// Solidity: function owner() view returns(address) +func (_GatewayZEVM *GatewayZEVMSession) Owner() (common.Address, error) { + return _GatewayZEVM.Contract.Owner(&_GatewayZEVM.CallOpts) +} + +// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. +// +// Solidity: function owner() view returns(address) +func (_GatewayZEVM *GatewayZEVMCallerSession) Owner() (common.Address, error) { + return _GatewayZEVM.Contract.Owner(&_GatewayZEVM.CallOpts) +} + +// ProxiableUUID is a free data retrieval call binding the contract method 0x52d1902d. +// +// Solidity: function proxiableUUID() view returns(bytes32) +func (_GatewayZEVM *GatewayZEVMCaller) ProxiableUUID(opts *bind.CallOpts) ([32]byte, error) { + var out []interface{} + err := _GatewayZEVM.contract.Call(opts, &out, "proxiableUUID") + + if err != nil { + return *new([32]byte), err + } + + out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) + + return out0, err + +} + +// ProxiableUUID is a free data retrieval call binding the contract method 0x52d1902d. +// +// Solidity: function proxiableUUID() view returns(bytes32) +func (_GatewayZEVM *GatewayZEVMSession) ProxiableUUID() ([32]byte, error) { + return _GatewayZEVM.Contract.ProxiableUUID(&_GatewayZEVM.CallOpts) +} + +// ProxiableUUID is a free data retrieval call binding the contract method 0x52d1902d. +// +// Solidity: function proxiableUUID() view returns(bytes32) +func (_GatewayZEVM *GatewayZEVMCallerSession) ProxiableUUID() ([32]byte, error) { + return _GatewayZEVM.Contract.ProxiableUUID(&_GatewayZEVM.CallOpts) +} + +// Call is a paid mutator transaction binding the contract method 0x0ac7c44c. +// +// Solidity: function call(bytes receiver, bytes message) returns() +func (_GatewayZEVM *GatewayZEVMTransactor) Call(opts *bind.TransactOpts, receiver []byte, message []byte) (*types.Transaction, error) { + return _GatewayZEVM.contract.Transact(opts, "call", receiver, message) +} + +// Call is a paid mutator transaction binding the contract method 0x0ac7c44c. +// +// Solidity: function call(bytes receiver, bytes message) returns() +func (_GatewayZEVM *GatewayZEVMSession) Call(receiver []byte, message []byte) (*types.Transaction, error) { + return _GatewayZEVM.Contract.Call(&_GatewayZEVM.TransactOpts, receiver, message) +} + +// Call is a paid mutator transaction binding the contract method 0x0ac7c44c. +// +// Solidity: function call(bytes receiver, bytes message) returns() +func (_GatewayZEVM *GatewayZEVMTransactorSession) Call(receiver []byte, message []byte) (*types.Transaction, error) { + return _GatewayZEVM.Contract.Call(&_GatewayZEVM.TransactOpts, receiver, message) +} + +// Initialize is a paid mutator transaction binding the contract method 0x8129fc1c. +// +// Solidity: function initialize() returns() +func (_GatewayZEVM *GatewayZEVMTransactor) Initialize(opts *bind.TransactOpts) (*types.Transaction, error) { + return _GatewayZEVM.contract.Transact(opts, "initialize") +} + +// Initialize is a paid mutator transaction binding the contract method 0x8129fc1c. +// +// Solidity: function initialize() returns() +func (_GatewayZEVM *GatewayZEVMSession) Initialize() (*types.Transaction, error) { + return _GatewayZEVM.Contract.Initialize(&_GatewayZEVM.TransactOpts) +} + +// Initialize is a paid mutator transaction binding the contract method 0x8129fc1c. +// +// Solidity: function initialize() returns() +func (_GatewayZEVM *GatewayZEVMTransactorSession) Initialize() (*types.Transaction, error) { + return _GatewayZEVM.Contract.Initialize(&_GatewayZEVM.TransactOpts) +} + +// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. +// +// Solidity: function renounceOwnership() returns() +func (_GatewayZEVM *GatewayZEVMTransactor) RenounceOwnership(opts *bind.TransactOpts) (*types.Transaction, error) { + return _GatewayZEVM.contract.Transact(opts, "renounceOwnership") +} + +// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. +// +// Solidity: function renounceOwnership() returns() +func (_GatewayZEVM *GatewayZEVMSession) RenounceOwnership() (*types.Transaction, error) { + return _GatewayZEVM.Contract.RenounceOwnership(&_GatewayZEVM.TransactOpts) +} + +// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. +// +// Solidity: function renounceOwnership() returns() +func (_GatewayZEVM *GatewayZEVMTransactorSession) RenounceOwnership() (*types.Transaction, error) { + return _GatewayZEVM.Contract.RenounceOwnership(&_GatewayZEVM.TransactOpts) +} + +// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// +// Solidity: function transferOwnership(address newOwner) returns() +func (_GatewayZEVM *GatewayZEVMTransactor) TransferOwnership(opts *bind.TransactOpts, newOwner common.Address) (*types.Transaction, error) { + return _GatewayZEVM.contract.Transact(opts, "transferOwnership", newOwner) +} + +// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// +// Solidity: function transferOwnership(address newOwner) returns() +func (_GatewayZEVM *GatewayZEVMSession) TransferOwnership(newOwner common.Address) (*types.Transaction, error) { + return _GatewayZEVM.Contract.TransferOwnership(&_GatewayZEVM.TransactOpts, newOwner) +} + +// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// +// Solidity: function transferOwnership(address newOwner) returns() +func (_GatewayZEVM *GatewayZEVMTransactorSession) TransferOwnership(newOwner common.Address) (*types.Transaction, error) { + return _GatewayZEVM.Contract.TransferOwnership(&_GatewayZEVM.TransactOpts, newOwner) +} + +// UpgradeTo is a paid mutator transaction binding the contract method 0x3659cfe6. +// +// Solidity: function upgradeTo(address newImplementation) returns() +func (_GatewayZEVM *GatewayZEVMTransactor) UpgradeTo(opts *bind.TransactOpts, newImplementation common.Address) (*types.Transaction, error) { + return _GatewayZEVM.contract.Transact(opts, "upgradeTo", newImplementation) +} + +// UpgradeTo is a paid mutator transaction binding the contract method 0x3659cfe6. +// +// Solidity: function upgradeTo(address newImplementation) returns() +func (_GatewayZEVM *GatewayZEVMSession) UpgradeTo(newImplementation common.Address) (*types.Transaction, error) { + return _GatewayZEVM.Contract.UpgradeTo(&_GatewayZEVM.TransactOpts, newImplementation) +} + +// UpgradeTo is a paid mutator transaction binding the contract method 0x3659cfe6. +// +// Solidity: function upgradeTo(address newImplementation) returns() +func (_GatewayZEVM *GatewayZEVMTransactorSession) UpgradeTo(newImplementation common.Address) (*types.Transaction, error) { + return _GatewayZEVM.Contract.UpgradeTo(&_GatewayZEVM.TransactOpts, newImplementation) +} + +// UpgradeToAndCall is a paid mutator transaction binding the contract method 0x4f1ef286. +// +// Solidity: function upgradeToAndCall(address newImplementation, bytes data) payable returns() +func (_GatewayZEVM *GatewayZEVMTransactor) UpgradeToAndCall(opts *bind.TransactOpts, newImplementation common.Address, data []byte) (*types.Transaction, error) { + return _GatewayZEVM.contract.Transact(opts, "upgradeToAndCall", newImplementation, data) +} + +// UpgradeToAndCall is a paid mutator transaction binding the contract method 0x4f1ef286. +// +// Solidity: function upgradeToAndCall(address newImplementation, bytes data) payable returns() +func (_GatewayZEVM *GatewayZEVMSession) UpgradeToAndCall(newImplementation common.Address, data []byte) (*types.Transaction, error) { + return _GatewayZEVM.Contract.UpgradeToAndCall(&_GatewayZEVM.TransactOpts, newImplementation, data) +} + +// UpgradeToAndCall is a paid mutator transaction binding the contract method 0x4f1ef286. +// +// Solidity: function upgradeToAndCall(address newImplementation, bytes data) payable returns() +func (_GatewayZEVM *GatewayZEVMTransactorSession) UpgradeToAndCall(newImplementation common.Address, data []byte) (*types.Transaction, error) { + return _GatewayZEVM.Contract.UpgradeToAndCall(&_GatewayZEVM.TransactOpts, newImplementation, data) +} + +// Withdraw is a paid mutator transaction binding the contract method 0x135390f9. +// +// Solidity: function withdraw(bytes receiver, uint256 amount, address zrc20) returns() +func (_GatewayZEVM *GatewayZEVMTransactor) Withdraw(opts *bind.TransactOpts, receiver []byte, amount *big.Int, zrc20 common.Address) (*types.Transaction, error) { + return _GatewayZEVM.contract.Transact(opts, "withdraw", receiver, amount, zrc20) +} + +// Withdraw is a paid mutator transaction binding the contract method 0x135390f9. +// +// Solidity: function withdraw(bytes receiver, uint256 amount, address zrc20) returns() +func (_GatewayZEVM *GatewayZEVMSession) Withdraw(receiver []byte, amount *big.Int, zrc20 common.Address) (*types.Transaction, error) { + return _GatewayZEVM.Contract.Withdraw(&_GatewayZEVM.TransactOpts, receiver, amount, zrc20) +} + +// Withdraw is a paid mutator transaction binding the contract method 0x135390f9. +// +// Solidity: function withdraw(bytes receiver, uint256 amount, address zrc20) returns() +func (_GatewayZEVM *GatewayZEVMTransactorSession) Withdraw(receiver []byte, amount *big.Int, zrc20 common.Address) (*types.Transaction, error) { + return _GatewayZEVM.Contract.Withdraw(&_GatewayZEVM.TransactOpts, receiver, amount, zrc20) +} + +// WithdrawAndCall is a paid mutator transaction binding the contract method 0x7993c1e0. +// +// Solidity: function withdrawAndCall(bytes receiver, uint256 amount, address zrc20, bytes message) returns() +func (_GatewayZEVM *GatewayZEVMTransactor) WithdrawAndCall(opts *bind.TransactOpts, receiver []byte, amount *big.Int, zrc20 common.Address, message []byte) (*types.Transaction, error) { + return _GatewayZEVM.contract.Transact(opts, "withdrawAndCall", receiver, amount, zrc20, message) +} + +// WithdrawAndCall is a paid mutator transaction binding the contract method 0x7993c1e0. +// +// Solidity: function withdrawAndCall(bytes receiver, uint256 amount, address zrc20, bytes message) returns() +func (_GatewayZEVM *GatewayZEVMSession) WithdrawAndCall(receiver []byte, amount *big.Int, zrc20 common.Address, message []byte) (*types.Transaction, error) { + return _GatewayZEVM.Contract.WithdrawAndCall(&_GatewayZEVM.TransactOpts, receiver, amount, zrc20, message) +} + +// WithdrawAndCall is a paid mutator transaction binding the contract method 0x7993c1e0. +// +// Solidity: function withdrawAndCall(bytes receiver, uint256 amount, address zrc20, bytes message) returns() +func (_GatewayZEVM *GatewayZEVMTransactorSession) WithdrawAndCall(receiver []byte, amount *big.Int, zrc20 common.Address, message []byte) (*types.Transaction, error) { + return _GatewayZEVM.Contract.WithdrawAndCall(&_GatewayZEVM.TransactOpts, receiver, amount, zrc20, message) +} + +// GatewayZEVMAdminChangedIterator is returned from FilterAdminChanged and is used to iterate over the raw logs and unpacked data for AdminChanged events raised by the GatewayZEVM contract. +type GatewayZEVMAdminChangedIterator struct { + Event *GatewayZEVMAdminChanged // 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 + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// 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 *GatewayZEVMAdminChangedIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(GatewayZEVMAdminChanged) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(GatewayZEVMAdminChanged) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *GatewayZEVMAdminChangedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *GatewayZEVMAdminChangedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// GatewayZEVMAdminChanged represents a AdminChanged event raised by the GatewayZEVM contract. +type GatewayZEVMAdminChanged struct { + PreviousAdmin common.Address + NewAdmin common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterAdminChanged is a free log retrieval operation binding the contract event 0x7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f. +// +// Solidity: event AdminChanged(address previousAdmin, address newAdmin) +func (_GatewayZEVM *GatewayZEVMFilterer) FilterAdminChanged(opts *bind.FilterOpts) (*GatewayZEVMAdminChangedIterator, error) { + + logs, sub, err := _GatewayZEVM.contract.FilterLogs(opts, "AdminChanged") + if err != nil { + return nil, err + } + return &GatewayZEVMAdminChangedIterator{contract: _GatewayZEVM.contract, event: "AdminChanged", logs: logs, sub: sub}, nil +} + +// WatchAdminChanged is a free log subscription operation binding the contract event 0x7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f. +// +// Solidity: event AdminChanged(address previousAdmin, address newAdmin) +func (_GatewayZEVM *GatewayZEVMFilterer) WatchAdminChanged(opts *bind.WatchOpts, sink chan<- *GatewayZEVMAdminChanged) (event.Subscription, error) { + + logs, sub, err := _GatewayZEVM.contract.WatchLogs(opts, "AdminChanged") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(GatewayZEVMAdminChanged) + if err := _GatewayZEVM.contract.UnpackLog(event, "AdminChanged", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseAdminChanged is a log parse operation binding the contract event 0x7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f. +// +// Solidity: event AdminChanged(address previousAdmin, address newAdmin) +func (_GatewayZEVM *GatewayZEVMFilterer) ParseAdminChanged(log types.Log) (*GatewayZEVMAdminChanged, error) { + event := new(GatewayZEVMAdminChanged) + if err := _GatewayZEVM.contract.UnpackLog(event, "AdminChanged", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// GatewayZEVMBeaconUpgradedIterator is returned from FilterBeaconUpgraded and is used to iterate over the raw logs and unpacked data for BeaconUpgraded events raised by the GatewayZEVM contract. +type GatewayZEVMBeaconUpgradedIterator struct { + Event *GatewayZEVMBeaconUpgraded // 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 + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// 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 *GatewayZEVMBeaconUpgradedIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(GatewayZEVMBeaconUpgraded) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(GatewayZEVMBeaconUpgraded) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *GatewayZEVMBeaconUpgradedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *GatewayZEVMBeaconUpgradedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// GatewayZEVMBeaconUpgraded represents a BeaconUpgraded event raised by the GatewayZEVM contract. +type GatewayZEVMBeaconUpgraded struct { + Beacon common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterBeaconUpgraded is a free log retrieval operation binding the contract event 0x1cf3b03a6cf19fa2baba4df148e9dcabedea7f8a5c07840e207e5c089be95d3e. +// +// Solidity: event BeaconUpgraded(address indexed beacon) +func (_GatewayZEVM *GatewayZEVMFilterer) FilterBeaconUpgraded(opts *bind.FilterOpts, beacon []common.Address) (*GatewayZEVMBeaconUpgradedIterator, error) { + + var beaconRule []interface{} + for _, beaconItem := range beacon { + beaconRule = append(beaconRule, beaconItem) + } + + logs, sub, err := _GatewayZEVM.contract.FilterLogs(opts, "BeaconUpgraded", beaconRule) + if err != nil { + return nil, err + } + return &GatewayZEVMBeaconUpgradedIterator{contract: _GatewayZEVM.contract, event: "BeaconUpgraded", logs: logs, sub: sub}, nil +} + +// WatchBeaconUpgraded is a free log subscription operation binding the contract event 0x1cf3b03a6cf19fa2baba4df148e9dcabedea7f8a5c07840e207e5c089be95d3e. +// +// Solidity: event BeaconUpgraded(address indexed beacon) +func (_GatewayZEVM *GatewayZEVMFilterer) WatchBeaconUpgraded(opts *bind.WatchOpts, sink chan<- *GatewayZEVMBeaconUpgraded, beacon []common.Address) (event.Subscription, error) { + + var beaconRule []interface{} + for _, beaconItem := range beacon { + beaconRule = append(beaconRule, beaconItem) + } + + logs, sub, err := _GatewayZEVM.contract.WatchLogs(opts, "BeaconUpgraded", beaconRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(GatewayZEVMBeaconUpgraded) + if err := _GatewayZEVM.contract.UnpackLog(event, "BeaconUpgraded", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseBeaconUpgraded is a log parse operation binding the contract event 0x1cf3b03a6cf19fa2baba4df148e9dcabedea7f8a5c07840e207e5c089be95d3e. +// +// Solidity: event BeaconUpgraded(address indexed beacon) +func (_GatewayZEVM *GatewayZEVMFilterer) ParseBeaconUpgraded(log types.Log) (*GatewayZEVMBeaconUpgraded, error) { + event := new(GatewayZEVMBeaconUpgraded) + if err := _GatewayZEVM.contract.UnpackLog(event, "BeaconUpgraded", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// GatewayZEVMCallIterator is returned from FilterCall and is used to iterate over the raw logs and unpacked data for Call events raised by the GatewayZEVM contract. +type GatewayZEVMCallIterator struct { + Event *GatewayZEVMCall // 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 + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// 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 *GatewayZEVMCallIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(GatewayZEVMCall) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(GatewayZEVMCall) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *GatewayZEVMCallIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *GatewayZEVMCallIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// GatewayZEVMCall represents a Call event raised by the GatewayZEVM contract. +type GatewayZEVMCall struct { + Sender common.Address + Receiver common.Hash + 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) { + + 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) + if err != nil { + return nil, err + } + return &GatewayZEVMCallIterator{contract: _GatewayZEVM.contract, event: "Call", logs: logs, sub: sub}, nil +} + +// 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) { + + 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) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(GatewayZEVMCall) + if err := _GatewayZEVM.contract.UnpackLog(event, "Call", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseCall is a log parse operation binding the contract event 0x2b5af078ce280d812dc2241658dc5435c93408020e5418eef55a2b536de51c0f. +// +// Solidity: event Call(address indexed sender, bytes indexed 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 { + return nil, err + } + event.Raw = log + return event, nil +} + +// GatewayZEVMInitializedIterator is returned from FilterInitialized and is used to iterate over the raw logs and unpacked data for Initialized events raised by the GatewayZEVM contract. +type GatewayZEVMInitializedIterator struct { + Event *GatewayZEVMInitialized // 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 + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// 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 *GatewayZEVMInitializedIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(GatewayZEVMInitialized) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(GatewayZEVMInitialized) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *GatewayZEVMInitializedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *GatewayZEVMInitializedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// GatewayZEVMInitialized represents a Initialized event raised by the GatewayZEVM contract. +type GatewayZEVMInitialized struct { + Version uint8 + Raw types.Log // Blockchain specific contextual infos +} + +// FilterInitialized is a free log retrieval operation binding the contract event 0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498. +// +// Solidity: event Initialized(uint8 version) +func (_GatewayZEVM *GatewayZEVMFilterer) FilterInitialized(opts *bind.FilterOpts) (*GatewayZEVMInitializedIterator, error) { + + logs, sub, err := _GatewayZEVM.contract.FilterLogs(opts, "Initialized") + if err != nil { + return nil, err + } + return &GatewayZEVMInitializedIterator{contract: _GatewayZEVM.contract, event: "Initialized", logs: logs, sub: sub}, nil +} + +// WatchInitialized is a free log subscription operation binding the contract event 0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498. +// +// Solidity: event Initialized(uint8 version) +func (_GatewayZEVM *GatewayZEVMFilterer) WatchInitialized(opts *bind.WatchOpts, sink chan<- *GatewayZEVMInitialized) (event.Subscription, error) { + + logs, sub, err := _GatewayZEVM.contract.WatchLogs(opts, "Initialized") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(GatewayZEVMInitialized) + if err := _GatewayZEVM.contract.UnpackLog(event, "Initialized", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseInitialized is a log parse operation binding the contract event 0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498. +// +// Solidity: event Initialized(uint8 version) +func (_GatewayZEVM *GatewayZEVMFilterer) ParseInitialized(log types.Log) (*GatewayZEVMInitialized, error) { + event := new(GatewayZEVMInitialized) + if err := _GatewayZEVM.contract.UnpackLog(event, "Initialized", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// GatewayZEVMOwnershipTransferredIterator is returned from FilterOwnershipTransferred and is used to iterate over the raw logs and unpacked data for OwnershipTransferred events raised by the GatewayZEVM contract. +type GatewayZEVMOwnershipTransferredIterator struct { + Event *GatewayZEVMOwnershipTransferred // 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 + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// 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 *GatewayZEVMOwnershipTransferredIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(GatewayZEVMOwnershipTransferred) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(GatewayZEVMOwnershipTransferred) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *GatewayZEVMOwnershipTransferredIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *GatewayZEVMOwnershipTransferredIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// GatewayZEVMOwnershipTransferred represents a OwnershipTransferred event raised by the GatewayZEVM contract. +type GatewayZEVMOwnershipTransferred struct { + PreviousOwner common.Address + NewOwner common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterOwnershipTransferred is a free log retrieval operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. +// +// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner) +func (_GatewayZEVM *GatewayZEVMFilterer) FilterOwnershipTransferred(opts *bind.FilterOpts, previousOwner []common.Address, newOwner []common.Address) (*GatewayZEVMOwnershipTransferredIterator, error) { + + var previousOwnerRule []interface{} + for _, previousOwnerItem := range previousOwner { + previousOwnerRule = append(previousOwnerRule, previousOwnerItem) + } + var newOwnerRule []interface{} + for _, newOwnerItem := range newOwner { + newOwnerRule = append(newOwnerRule, newOwnerItem) + } + + logs, sub, err := _GatewayZEVM.contract.FilterLogs(opts, "OwnershipTransferred", previousOwnerRule, newOwnerRule) + if err != nil { + return nil, err + } + return &GatewayZEVMOwnershipTransferredIterator{contract: _GatewayZEVM.contract, event: "OwnershipTransferred", logs: logs, sub: sub}, nil +} + +// WatchOwnershipTransferred is a free log subscription operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. +// +// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner) +func (_GatewayZEVM *GatewayZEVMFilterer) WatchOwnershipTransferred(opts *bind.WatchOpts, sink chan<- *GatewayZEVMOwnershipTransferred, previousOwner []common.Address, newOwner []common.Address) (event.Subscription, error) { + + var previousOwnerRule []interface{} + for _, previousOwnerItem := range previousOwner { + previousOwnerRule = append(previousOwnerRule, previousOwnerItem) + } + var newOwnerRule []interface{} + for _, newOwnerItem := range newOwner { + newOwnerRule = append(newOwnerRule, newOwnerItem) + } + + logs, sub, err := _GatewayZEVM.contract.WatchLogs(opts, "OwnershipTransferred", previousOwnerRule, newOwnerRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(GatewayZEVMOwnershipTransferred) + if err := _GatewayZEVM.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseOwnershipTransferred is a log parse operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. +// +// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner) +func (_GatewayZEVM *GatewayZEVMFilterer) ParseOwnershipTransferred(log types.Log) (*GatewayZEVMOwnershipTransferred, error) { + event := new(GatewayZEVMOwnershipTransferred) + if err := _GatewayZEVM.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// GatewayZEVMUpgradedIterator is returned from FilterUpgraded and is used to iterate over the raw logs and unpacked data for Upgraded events raised by the GatewayZEVM contract. +type GatewayZEVMUpgradedIterator struct { + Event *GatewayZEVMUpgraded // 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 + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// 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 *GatewayZEVMUpgradedIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(GatewayZEVMUpgraded) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(GatewayZEVMUpgraded) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *GatewayZEVMUpgradedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *GatewayZEVMUpgradedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// GatewayZEVMUpgraded represents a Upgraded event raised by the GatewayZEVM contract. +type GatewayZEVMUpgraded struct { + Implementation common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterUpgraded is a free log retrieval operation binding the contract event 0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b. +// +// Solidity: event Upgraded(address indexed implementation) +func (_GatewayZEVM *GatewayZEVMFilterer) FilterUpgraded(opts *bind.FilterOpts, implementation []common.Address) (*GatewayZEVMUpgradedIterator, error) { + + var implementationRule []interface{} + for _, implementationItem := range implementation { + implementationRule = append(implementationRule, implementationItem) + } + + logs, sub, err := _GatewayZEVM.contract.FilterLogs(opts, "Upgraded", implementationRule) + if err != nil { + return nil, err + } + return &GatewayZEVMUpgradedIterator{contract: _GatewayZEVM.contract, event: "Upgraded", logs: logs, sub: sub}, nil +} + +// WatchUpgraded is a free log subscription operation binding the contract event 0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b. +// +// Solidity: event Upgraded(address indexed implementation) +func (_GatewayZEVM *GatewayZEVMFilterer) WatchUpgraded(opts *bind.WatchOpts, sink chan<- *GatewayZEVMUpgraded, implementation []common.Address) (event.Subscription, error) { + + var implementationRule []interface{} + for _, implementationItem := range implementation { + implementationRule = append(implementationRule, implementationItem) + } + + logs, sub, err := _GatewayZEVM.contract.WatchLogs(opts, "Upgraded", implementationRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(GatewayZEVMUpgraded) + if err := _GatewayZEVM.contract.UnpackLog(event, "Upgraded", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseUpgraded is a log parse operation binding the contract event 0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b. +// +// Solidity: event Upgraded(address indexed implementation) +func (_GatewayZEVM *GatewayZEVMFilterer) ParseUpgraded(log types.Log) (*GatewayZEVMUpgraded, error) { + event := new(GatewayZEVMUpgraded) + if err := _GatewayZEVM.contract.UnpackLog(event, "Upgraded", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// GatewayZEVMWithdrawalIterator is returned from FilterWithdrawal and is used to iterate over the raw logs and unpacked data for Withdrawal events raised by the GatewayZEVM contract. +type GatewayZEVMWithdrawalIterator struct { + Event *GatewayZEVMWithdrawal // 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 + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// 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 *GatewayZEVMWithdrawalIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(GatewayZEVMWithdrawal) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(GatewayZEVMWithdrawal) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *GatewayZEVMWithdrawalIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *GatewayZEVMWithdrawalIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// GatewayZEVMWithdrawal represents a Withdrawal event raised by the GatewayZEVM contract. +type GatewayZEVMWithdrawal struct { + From common.Address + To []byte + Value *big.Int + Gasfee *big.Int + ProtocolFlatFee *big.Int + Message []byte + Raw types.Log // Blockchain specific contextual infos +} + +// FilterWithdrawal is a free log retrieval operation binding the contract event 0x1866ad2994816c79f4103e1eddacc7b085eb7c635205243a28940be69b01536d. +// +// Solidity: event Withdrawal(address indexed from, bytes to, uint256 value, uint256 gasfee, uint256 protocolFlatFee, bytes message) +func (_GatewayZEVM *GatewayZEVMFilterer) FilterWithdrawal(opts *bind.FilterOpts, from []common.Address) (*GatewayZEVMWithdrawalIterator, error) { + + var fromRule []interface{} + for _, fromItem := range from { + fromRule = append(fromRule, fromItem) + } + + logs, sub, err := _GatewayZEVM.contract.FilterLogs(opts, "Withdrawal", fromRule) + if err != nil { + return nil, err + } + return &GatewayZEVMWithdrawalIterator{contract: _GatewayZEVM.contract, event: "Withdrawal", logs: logs, sub: sub}, nil +} + +// WatchWithdrawal is a free log subscription operation binding the contract event 0x1866ad2994816c79f4103e1eddacc7b085eb7c635205243a28940be69b01536d. +// +// Solidity: event Withdrawal(address indexed from, bytes to, uint256 value, uint256 gasfee, uint256 protocolFlatFee, bytes message) +func (_GatewayZEVM *GatewayZEVMFilterer) WatchWithdrawal(opts *bind.WatchOpts, sink chan<- *GatewayZEVMWithdrawal, from []common.Address) (event.Subscription, error) { + + var fromRule []interface{} + for _, fromItem := range from { + fromRule = append(fromRule, fromItem) + } + + logs, sub, err := _GatewayZEVM.contract.WatchLogs(opts, "Withdrawal", fromRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(GatewayZEVMWithdrawal) + if err := _GatewayZEVM.contract.UnpackLog(event, "Withdrawal", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseWithdrawal is a log parse operation binding the contract event 0x1866ad2994816c79f4103e1eddacc7b085eb7c635205243a28940be69b01536d. +// +// Solidity: event Withdrawal(address indexed from, bytes to, uint256 value, uint256 gasfee, uint256 protocolFlatFee, bytes message) +func (_GatewayZEVM *GatewayZEVMFilterer) ParseWithdrawal(log types.Log) (*GatewayZEVMWithdrawal, error) { + event := new(GatewayZEVMWithdrawal) + if err := _GatewayZEVM.contract.UnpackLog(event, "Withdrawal", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} diff --git a/pkg/contracts/prototypes/zevm/interfaces.sol/igatewayzevm.go b/pkg/contracts/prototypes/zevm/interfaces.sol/igatewayzevm.go new file mode 100644 index 00000000..01e3975d --- /dev/null +++ b/pkg/contracts/prototypes/zevm/interfaces.sol/igatewayzevm.go @@ -0,0 +1,244 @@ +// Code generated - DO NOT EDIT. +// This file is a generated binding and any manual changes will be lost. + +package interfaces + +import ( + "errors" + "math/big" + "strings" + + ethereum "github.com/ethereum/go-ethereum" + "github.com/ethereum/go-ethereum/accounts/abi" + "github.com/ethereum/go-ethereum/accounts/abi/bind" + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/core/types" + "github.com/ethereum/go-ethereum/event" +) + +// Reference imports to suppress errors if they are not otherwise used. +var ( + _ = errors.New + _ = big.NewInt + _ = strings.NewReader + _ = ethereum.NotFound + _ = bind.Bind + _ = common.Big1 + _ = types.BloomLookup + _ = event.NewSubscription + _ = abi.ConvertType +) + +// IGatewayZEVMMetaData contains all meta data concerning the IGatewayZEVM contract. +var IGatewayZEVMMetaData = &bind.MetaData{ + ABI: "[{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"receiver\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"message\",\"type\":\"bytes\"}],\"name\":\"call\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"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\"}]", +} + +// IGatewayZEVMABI is the input ABI used to generate the binding from. +// Deprecated: Use IGatewayZEVMMetaData.ABI instead. +var IGatewayZEVMABI = IGatewayZEVMMetaData.ABI + +// IGatewayZEVM is an auto generated Go binding around an Ethereum contract. +type IGatewayZEVM struct { + IGatewayZEVMCaller // Read-only binding to the contract + IGatewayZEVMTransactor // Write-only binding to the contract + IGatewayZEVMFilterer // Log filterer for contract events +} + +// IGatewayZEVMCaller is an auto generated read-only Go binding around an Ethereum contract. +type IGatewayZEVMCaller struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// IGatewayZEVMTransactor is an auto generated write-only Go binding around an Ethereum contract. +type IGatewayZEVMTransactor struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// IGatewayZEVMFilterer is an auto generated log filtering Go binding around an Ethereum contract events. +type IGatewayZEVMFilterer struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// IGatewayZEVMSession is an auto generated Go binding around an Ethereum contract, +// with pre-set call and transact options. +type IGatewayZEVMSession struct { + Contract *IGatewayZEVM // 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 +} + +// IGatewayZEVMCallerSession is an auto generated read-only Go binding around an Ethereum contract, +// with pre-set call options. +type IGatewayZEVMCallerSession struct { + Contract *IGatewayZEVMCaller // Generic contract caller binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session +} + +// IGatewayZEVMTransactorSession is an auto generated write-only Go binding around an Ethereum contract, +// with pre-set transact options. +type IGatewayZEVMTransactorSession struct { + Contract *IGatewayZEVMTransactor // Generic contract transactor binding to set the session for + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// IGatewayZEVMRaw is an auto generated low-level Go binding around an Ethereum contract. +type IGatewayZEVMRaw struct { + Contract *IGatewayZEVM // Generic contract binding to access the raw methods on +} + +// IGatewayZEVMCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. +type IGatewayZEVMCallerRaw struct { + Contract *IGatewayZEVMCaller // Generic read-only contract binding to access the raw methods on +} + +// IGatewayZEVMTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. +type IGatewayZEVMTransactorRaw struct { + Contract *IGatewayZEVMTransactor // Generic write-only contract binding to access the raw methods on +} + +// NewIGatewayZEVM creates a new instance of IGatewayZEVM, bound to a specific deployed contract. +func NewIGatewayZEVM(address common.Address, backend bind.ContractBackend) (*IGatewayZEVM, error) { + contract, err := bindIGatewayZEVM(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &IGatewayZEVM{IGatewayZEVMCaller: IGatewayZEVMCaller{contract: contract}, IGatewayZEVMTransactor: IGatewayZEVMTransactor{contract: contract}, IGatewayZEVMFilterer: IGatewayZEVMFilterer{contract: contract}}, nil +} + +// NewIGatewayZEVMCaller creates a new read-only instance of IGatewayZEVM, bound to a specific deployed contract. +func NewIGatewayZEVMCaller(address common.Address, caller bind.ContractCaller) (*IGatewayZEVMCaller, error) { + contract, err := bindIGatewayZEVM(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &IGatewayZEVMCaller{contract: contract}, nil +} + +// NewIGatewayZEVMTransactor creates a new write-only instance of IGatewayZEVM, bound to a specific deployed contract. +func NewIGatewayZEVMTransactor(address common.Address, transactor bind.ContractTransactor) (*IGatewayZEVMTransactor, error) { + contract, err := bindIGatewayZEVM(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &IGatewayZEVMTransactor{contract: contract}, nil +} + +// NewIGatewayZEVMFilterer creates a new log filterer instance of IGatewayZEVM, bound to a specific deployed contract. +func NewIGatewayZEVMFilterer(address common.Address, filterer bind.ContractFilterer) (*IGatewayZEVMFilterer, error) { + contract, err := bindIGatewayZEVM(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &IGatewayZEVMFilterer{contract: contract}, nil +} + +// bindIGatewayZEVM binds a generic wrapper to an already deployed contract. +func bindIGatewayZEVM(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := IGatewayZEVMMetaData.GetAbi() + if err != nil { + return nil, err + } + return bind.NewBoundContract(address, *parsed, caller, transactor, filterer), nil +} + +// 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 (_IGatewayZEVM *IGatewayZEVMRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _IGatewayZEVM.Contract.IGatewayZEVMCaller.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 (_IGatewayZEVM *IGatewayZEVMRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _IGatewayZEVM.Contract.IGatewayZEVMTransactor.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_IGatewayZEVM *IGatewayZEVMRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _IGatewayZEVM.Contract.IGatewayZEVMTransactor.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 (_IGatewayZEVM *IGatewayZEVMCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _IGatewayZEVM.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 (_IGatewayZEVM *IGatewayZEVMTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _IGatewayZEVM.Contract.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_IGatewayZEVM *IGatewayZEVMTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _IGatewayZEVM.Contract.contract.Transact(opts, method, params...) +} + +// Call is a paid mutator transaction binding the contract method 0x0ac7c44c. +// +// Solidity: function call(bytes receiver, bytes message) returns() +func (_IGatewayZEVM *IGatewayZEVMTransactor) Call(opts *bind.TransactOpts, receiver []byte, message []byte) (*types.Transaction, error) { + return _IGatewayZEVM.contract.Transact(opts, "call", receiver, message) +} + +// Call is a paid mutator transaction binding the contract method 0x0ac7c44c. +// +// Solidity: function call(bytes receiver, bytes message) returns() +func (_IGatewayZEVM *IGatewayZEVMSession) Call(receiver []byte, message []byte) (*types.Transaction, error) { + return _IGatewayZEVM.Contract.Call(&_IGatewayZEVM.TransactOpts, receiver, message) +} + +// Call is a paid mutator transaction binding the contract method 0x0ac7c44c. +// +// Solidity: function call(bytes receiver, bytes message) returns() +func (_IGatewayZEVM *IGatewayZEVMTransactorSession) Call(receiver []byte, message []byte) (*types.Transaction, error) { + return _IGatewayZEVM.Contract.Call(&_IGatewayZEVM.TransactOpts, receiver, message) +} + +// Withdraw is a paid mutator transaction binding the contract method 0x135390f9. +// +// Solidity: function withdraw(bytes receiver, uint256 amount, address zrc20) returns() +func (_IGatewayZEVM *IGatewayZEVMTransactor) Withdraw(opts *bind.TransactOpts, receiver []byte, amount *big.Int, zrc20 common.Address) (*types.Transaction, error) { + return _IGatewayZEVM.contract.Transact(opts, "withdraw", receiver, amount, zrc20) +} + +// Withdraw is a paid mutator transaction binding the contract method 0x135390f9. +// +// Solidity: function withdraw(bytes receiver, uint256 amount, address zrc20) returns() +func (_IGatewayZEVM *IGatewayZEVMSession) Withdraw(receiver []byte, amount *big.Int, zrc20 common.Address) (*types.Transaction, error) { + return _IGatewayZEVM.Contract.Withdraw(&_IGatewayZEVM.TransactOpts, receiver, amount, zrc20) +} + +// Withdraw is a paid mutator transaction binding the contract method 0x135390f9. +// +// Solidity: function withdraw(bytes receiver, uint256 amount, address zrc20) returns() +func (_IGatewayZEVM *IGatewayZEVMTransactorSession) Withdraw(receiver []byte, amount *big.Int, zrc20 common.Address) (*types.Transaction, error) { + return _IGatewayZEVM.Contract.Withdraw(&_IGatewayZEVM.TransactOpts, receiver, amount, zrc20) +} + +// WithdrawAndCall is a paid mutator transaction binding the contract method 0x7993c1e0. +// +// Solidity: function withdrawAndCall(bytes receiver, uint256 amount, address zrc20, bytes message) returns() +func (_IGatewayZEVM *IGatewayZEVMTransactor) WithdrawAndCall(opts *bind.TransactOpts, receiver []byte, amount *big.Int, zrc20 common.Address, message []byte) (*types.Transaction, error) { + return _IGatewayZEVM.contract.Transact(opts, "withdrawAndCall", receiver, amount, zrc20, message) +} + +// WithdrawAndCall is a paid mutator transaction binding the contract method 0x7993c1e0. +// +// Solidity: function withdrawAndCall(bytes receiver, uint256 amount, address zrc20, bytes message) returns() +func (_IGatewayZEVM *IGatewayZEVMSession) WithdrawAndCall(receiver []byte, amount *big.Int, zrc20 common.Address, message []byte) (*types.Transaction, error) { + return _IGatewayZEVM.Contract.WithdrawAndCall(&_IGatewayZEVM.TransactOpts, receiver, amount, zrc20, message) +} + +// WithdrawAndCall is a paid mutator transaction binding the contract method 0x7993c1e0. +// +// Solidity: function withdrawAndCall(bytes receiver, uint256 amount, address zrc20, bytes message) returns() +func (_IGatewayZEVM *IGatewayZEVMTransactorSession) WithdrawAndCall(receiver []byte, amount *big.Int, zrc20 common.Address, message []byte) (*types.Transaction, error) { + return _IGatewayZEVM.Contract.WithdrawAndCall(&_IGatewayZEVM.TransactOpts, receiver, amount, zrc20, message) +} diff --git a/pkg/contracts/prototypes/zevm/sender.sol/sender.go b/pkg/contracts/prototypes/zevm/sender.sol/sender.go new file mode 100644 index 00000000..430f4c60 --- /dev/null +++ b/pkg/contracts/prototypes/zevm/sender.sol/sender.go @@ -0,0 +1,276 @@ +// Code generated - DO NOT EDIT. +// This file is a generated binding and any manual changes will be lost. + +package sender + +import ( + "errors" + "math/big" + "strings" + + ethereum "github.com/ethereum/go-ethereum" + "github.com/ethereum/go-ethereum/accounts/abi" + "github.com/ethereum/go-ethereum/accounts/abi/bind" + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/core/types" + "github.com/ethereum/go-ethereum/event" +) + +// Reference imports to suppress errors if they are not otherwise used. +var ( + _ = errors.New + _ = big.NewInt + _ = strings.NewReader + _ = ethereum.NotFound + _ = bind.Bind + _ = common.Big1 + _ = types.BloomLookup + _ = event.NewSubscription + _ = abi.ConvertType +) + +// SenderMetaData contains all meta data concerning the Sender contract. +var SenderMetaData = &bind.MetaData{ + ABI: "[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_gateway\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"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: "0x608060405234801561001057600080fd5b50604051610b98380380610b988339818101604052810190610032919061008d565b806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050610108565b600081519050610087816100f1565b92915050565b6000602082840312156100a3576100a26100ec565b5b60006100b184828501610078565b91505092915050565b60006100c5826100cc565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600080fd5b6100fa816100ba565b811461010557600080fd5b50565b610a81806101176000396000f3fe608060405234801561001057600080fd5b50600436106100415760003560e01c80630abd890514610046578063116191b614610062578063a0a1730b14610080575b600080fd5b610060600480360381019061005b91906105c8565b61009c565b005b61006a61027a565b604051610077919061072c565b60405180910390f35b61009a60048036038101906100959190610529565b61029e565b005b60008383836040516024016100b3939291906107fa565b6040516020818303038152906040527f6fa220ad000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff838183161783525050505090508473ffffffffffffffffffffffffffffffffffffffff1663095ea7b360008054906101000a900473ffffffffffffffffffffffffffffffffffffffff16886040518363ffffffff1660e01b815260040161018d929190610747565b602060405180830381600087803b1580156101a757600080fd5b505af11580156101bb573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101df91906104fc565b5060008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16637993c1e0888888856040518563ffffffff1660e01b815260040161023f94939291906107a7565b600060405180830381600087803b15801561025957600080fd5b505af115801561026d573d6000803e3d6000fd5b5050505050505050505050565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008383836040516024016102b5939291906107fa565b6040516020818303038152906040527f6fa220ad000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050905060008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16630ac7c44c86836040518363ffffffff1660e01b815260040161038f929190610770565b600060405180830381600087803b1580156103a957600080fd5b505af11580156103bd573d6000803e3d6000fd5b505050505050505050565b60006103db6103d68461085d565b610838565b9050828152602081018484840111156103f7576103f66109e6565b5b61040284828561093f565b509392505050565b600061041d6104188461088e565b610838565b905082815260208101848484011115610439576104386109e6565b5b61044484828561093f565b509392505050565b60008135905061045b81610a06565b92915050565b60008135905061047081610a1d565b92915050565b60008151905061048581610a1d565b92915050565b600082601f8301126104a05761049f6109e1565b5b81356104b08482602086016103c8565b91505092915050565b600082601f8301126104ce576104cd6109e1565b5b81356104de84826020860161040a565b91505092915050565b6000813590506104f681610a34565b92915050565b600060208284031215610512576105116109f0565b5b600061052084828501610476565b91505092915050565b60008060008060808587031215610543576105426109f0565b5b600085013567ffffffffffffffff811115610561576105606109eb565b5b61056d8782880161048b565b945050602085013567ffffffffffffffff81111561058e5761058d6109eb565b5b61059a878288016104b9565b93505060406105ab878288016104e7565b92505060606105bc87828801610461565b91505092959194509250565b60008060008060008060c087890312156105e5576105e46109f0565b5b600087013567ffffffffffffffff811115610603576106026109eb565b5b61060f89828a0161048b565b965050602061062089828a016104e7565b955050604061063189828a0161044c565b945050606087013567ffffffffffffffff811115610652576106516109eb565b5b61065e89828a016104b9565b935050608061066f89828a016104e7565b92505060a061068089828a01610461565b9150509295509295509295565b610696816108f7565b82525050565b6106a581610909565b82525050565b60006106b6826108bf565b6106c081856108d5565b93506106d081856020860161094e565b6106d9816109f5565b840191505092915050565b60006106ef826108ca565b6106f981856108e6565b935061070981856020860161094e565b610712816109f5565b840191505092915050565b61072681610935565b82525050565b6000602082019050610741600083018461068d565b92915050565b600060408201905061075c600083018561068d565b610769602083018461071d565b9392505050565b6000604082019050818103600083015261078a81856106ab565b9050818103602083015261079e81846106ab565b90509392505050565b600060808201905081810360008301526107c181876106ab565b90506107d0602083018661071d565b6107dd604083018561068d565b81810360608301526107ef81846106ab565b905095945050505050565b6000606082019050818103600083015261081481866106e4565b9050610823602083018561071d565b610830604083018461069c565b949350505050565b6000610842610853565b905061084e8282610981565b919050565b6000604051905090565b600067ffffffffffffffff821115610878576108776109b2565b5b610881826109f5565b9050602081019050919050565b600067ffffffffffffffff8211156108a9576108a86109b2565b5b6108b2826109f5565b9050602081019050919050565b600081519050919050565b600081519050919050565b600082825260208201905092915050565b600082825260208201905092915050565b600061090282610915565b9050919050565b60008115159050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b82818337600083830152505050565b60005b8381101561096c578082015181840152602081019050610951565b8381111561097b576000848401525b50505050565b61098a826109f5565b810181811067ffffffffffffffff821117156109a9576109a86109b2565b5b80604052505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b610a0f816108f7565b8114610a1a57600080fd5b50565b610a2681610909565b8114610a3157600080fd5b50565b610a3d81610935565b8114610a4857600080fd5b5056fea2646970667358221220f68ac344070d69f2a3c87661d69a54d722816815e944d87572f521c8faceff8464736f6c63430008070033", +} + +// SenderABI is the input ABI used to generate the binding from. +// Deprecated: Use SenderMetaData.ABI instead. +var SenderABI = SenderMetaData.ABI + +// SenderBin is the compiled bytecode used for deploying new contracts. +// Deprecated: Use SenderMetaData.Bin instead. +var SenderBin = SenderMetaData.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() + if err != nil { + return common.Address{}, nil, nil, err + } + if parsed == nil { + return common.Address{}, nil, nil, errors.New("GetABI returned nil") + } + + address, tx, contract, err := bind.DeployContract(auth, *parsed, common.FromHex(SenderBin), 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 +} + +// 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 +} + +// SenderCaller is an auto generated read-only Go binding around an Ethereum contract. +type SenderCaller 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 { + 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 { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// SenderSession 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 + 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, +// 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 +} + +// SenderTransactorSession 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 +} + +// 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 +} + +// 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 +} + +// 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 +} + +// 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) + if err != nil { + return nil, err + } + return &Sender{SenderCaller: SenderCaller{contract: contract}, SenderTransactor: SenderTransactor{contract: contract}, SenderFilterer: SenderFilterer{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) + if err != nil { + return nil, err + } + return &SenderCaller{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) + if err != nil { + return nil, err + } + return &SenderTransactor{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) + if err != nil { + return nil, err + } + return &SenderFilterer{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() + if err != nil { + return nil, err + } + return bind.NewBoundContract(address, *parsed, caller, transactor, filterer), nil +} + +// 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 *SenderRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _Sender.Contract.SenderCaller.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) +} + +// 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...) +} + +// 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...) +} + +// 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) +} + +// 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...) +} + +// 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) { + var out []interface{} + err := _Sender.contract.Call(opts, &out, "gateway") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// 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) +} + +// 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) +} + +// 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) +} + +// 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) +} + +// 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) +} + +// 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) +} + +// 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) +} + +// 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) +} diff --git a/pkg/contracts/zevm/interfaces/izrc20.sol/izrc20.go b/pkg/contracts/zevm/interfaces/izrc20.sol/izrc20.go index 65a0da78..c16e5efc 100644 --- a/pkg/contracts/zevm/interfaces/izrc20.sol/izrc20.go +++ b/pkg/contracts/zevm/interfaces/izrc20.sol/izrc20.go @@ -31,7 +31,7 @@ var ( // IZRC20MetaData contains all meta data concerning the IZRC20 contract. var IZRC20MetaData = &bind.MetaData{ - ABI: "[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"from\",\"type\":\"bytes\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Deposit\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"gasLimit\",\"type\":\"uint256\"}],\"name\":\"UpdatedGasLimit\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"protocolFlatFee\",\"type\":\"uint256\"}],\"name\":\"UpdatedProtocolFlatFee\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"systemContract\",\"type\":\"address\"}],\"name\":\"UpdatedSystemContract\",\"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\"}],\"name\":\"Withdrawal\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"PROTOCOL_FEE\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"burn\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"decreaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"deposit\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"increaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"to\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"withdraw\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"withdrawGasFee\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"}]", + ABI: "[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"from\",\"type\":\"bytes\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Deposit\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"gasLimit\",\"type\":\"uint256\"}],\"name\":\"UpdatedGasLimit\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"protocolFlatFee\",\"type\":\"uint256\"}],\"name\":\"UpdatedProtocolFlatFee\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"systemContract\",\"type\":\"address\"}],\"name\":\"UpdatedSystemContract\",\"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\"}],\"name\":\"Withdrawal\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"PROTOCOL_FLAT_FEE\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"burn\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"decreaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"deposit\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"increaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"to\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"withdraw\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"withdrawGasFee\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"}]", } // IZRC20ABI is the input ABI used to generate the binding from. @@ -180,12 +180,12 @@ func (_IZRC20 *IZRC20TransactorRaw) Transact(opts *bind.TransactOpts, method str return _IZRC20.Contract.contract.Transact(opts, method, params...) } -// PROTOCOLFEE is a free data retrieval call binding the contract method 0x0b4501fd. +// PROTOCOLFLATFEE is a free data retrieval call binding the contract method 0x4d8943bb. // -// Solidity: function PROTOCOL_FEE() view returns(uint256) -func (_IZRC20 *IZRC20Caller) PROTOCOLFEE(opts *bind.CallOpts) (*big.Int, error) { +// Solidity: function PROTOCOL_FLAT_FEE() view returns(uint256) +func (_IZRC20 *IZRC20Caller) PROTOCOLFLATFEE(opts *bind.CallOpts) (*big.Int, error) { var out []interface{} - err := _IZRC20.contract.Call(opts, &out, "PROTOCOL_FEE") + err := _IZRC20.contract.Call(opts, &out, "PROTOCOL_FLAT_FEE") if err != nil { return *new(*big.Int), err @@ -197,18 +197,18 @@ func (_IZRC20 *IZRC20Caller) PROTOCOLFEE(opts *bind.CallOpts) (*big.Int, error) } -// PROTOCOLFEE is a free data retrieval call binding the contract method 0x0b4501fd. +// PROTOCOLFLATFEE is a free data retrieval call binding the contract method 0x4d8943bb. // -// Solidity: function PROTOCOL_FEE() view returns(uint256) -func (_IZRC20 *IZRC20Session) PROTOCOLFEE() (*big.Int, error) { - return _IZRC20.Contract.PROTOCOLFEE(&_IZRC20.CallOpts) +// Solidity: function PROTOCOL_FLAT_FEE() view returns(uint256) +func (_IZRC20 *IZRC20Session) PROTOCOLFLATFEE() (*big.Int, error) { + return _IZRC20.Contract.PROTOCOLFLATFEE(&_IZRC20.CallOpts) } -// PROTOCOLFEE is a free data retrieval call binding the contract method 0x0b4501fd. +// PROTOCOLFLATFEE is a free data retrieval call binding the contract method 0x4d8943bb. // -// Solidity: function PROTOCOL_FEE() view returns(uint256) -func (_IZRC20 *IZRC20CallerSession) PROTOCOLFEE() (*big.Int, error) { - return _IZRC20.Contract.PROTOCOLFEE(&_IZRC20.CallOpts) +// Solidity: function PROTOCOL_FLAT_FEE() view returns(uint256) +func (_IZRC20 *IZRC20CallerSession) PROTOCOLFLATFEE() (*big.Int, error) { + return _IZRC20.Contract.PROTOCOLFLATFEE(&_IZRC20.CallOpts) } // Allowance is a free data retrieval call binding the contract method 0xdd62ed3e. @@ -357,25 +357,25 @@ func (_IZRC20 *IZRC20TransactorSession) Approve(spender common.Address, amount * return _IZRC20.Contract.Approve(&_IZRC20.TransactOpts, spender, amount) } -// Burn is a paid mutator transaction binding the contract method 0x9dc29fac. +// Burn is a paid mutator transaction binding the contract method 0x42966c68. // -// Solidity: function burn(address account, uint256 amount) returns(bool) -func (_IZRC20 *IZRC20Transactor) Burn(opts *bind.TransactOpts, account common.Address, amount *big.Int) (*types.Transaction, error) { - return _IZRC20.contract.Transact(opts, "burn", account, amount) +// Solidity: function burn(uint256 amount) returns(bool) +func (_IZRC20 *IZRC20Transactor) Burn(opts *bind.TransactOpts, amount *big.Int) (*types.Transaction, error) { + return _IZRC20.contract.Transact(opts, "burn", amount) } -// Burn is a paid mutator transaction binding the contract method 0x9dc29fac. +// Burn is a paid mutator transaction binding the contract method 0x42966c68. // -// Solidity: function burn(address account, uint256 amount) returns(bool) -func (_IZRC20 *IZRC20Session) Burn(account common.Address, amount *big.Int) (*types.Transaction, error) { - return _IZRC20.Contract.Burn(&_IZRC20.TransactOpts, account, amount) +// Solidity: function burn(uint256 amount) returns(bool) +func (_IZRC20 *IZRC20Session) Burn(amount *big.Int) (*types.Transaction, error) { + return _IZRC20.Contract.Burn(&_IZRC20.TransactOpts, amount) } -// Burn is a paid mutator transaction binding the contract method 0x9dc29fac. +// Burn is a paid mutator transaction binding the contract method 0x42966c68. // -// Solidity: function burn(address account, uint256 amount) returns(bool) -func (_IZRC20 *IZRC20TransactorSession) Burn(account common.Address, amount *big.Int) (*types.Transaction, error) { - return _IZRC20.Contract.Burn(&_IZRC20.TransactOpts, account, amount) +// Solidity: function burn(uint256 amount) returns(bool) +func (_IZRC20 *IZRC20TransactorSession) Burn(amount *big.Int) (*types.Transaction, error) { + return _IZRC20.Contract.Burn(&_IZRC20.TransactOpts, amount) } // DecreaseAllowance is a paid mutator transaction binding the contract method 0xa457c2d7. diff --git a/pkg/contracts/zevm/systemcontract.sol/systemcontract.go b/pkg/contracts/zevm/systemcontract.sol/systemcontract.go index 1c119082..cc61517b 100644 --- a/pkg/contracts/zevm/systemcontract.sol/systemcontract.go +++ b/pkg/contracts/zevm/systemcontract.sol/systemcontract.go @@ -39,7 +39,7 @@ type ZContext struct { // SystemContractMetaData contains all meta data concerning the SystemContract contract. var SystemContractMetaData = &bind.MetaData{ ABI: "[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"wzeta_\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"uniswapv2Factory_\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"uniswapv2Router02_\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"CallerIsNotFungibleModule\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"CantBeIdenticalAddresses\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"CantBeZeroAddress\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidTarget\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ZeroAddress\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"SetConnectorZEVM\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"SetGasCoin\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"SetGasPrice\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"SetGasZetaPool\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"SetWZeta\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[],\"name\":\"SystemContractDeployed\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"FUNGIBLE_MODULE_ADDRESS\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes\",\"name\":\"origin\",\"type\":\"bytes\"},{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"chainID\",\"type\":\"uint256\"}],\"internalType\":\"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\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"gasCoinZRC20ByChainId\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"gasPriceByChainId\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"gasZetaPoolByChainId\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"}],\"name\":\"setConnectorZEVMAddress\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"chainID\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"zrc20\",\"type\":\"address\"}],\"name\":\"setGasCoinZRC20\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"chainID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"price\",\"type\":\"uint256\"}],\"name\":\"setGasPrice\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"chainID\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"erc20\",\"type\":\"address\"}],\"name\":\"setGasZetaPool\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"}],\"name\":\"setWZETAContractAddress\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"uniswapv2FactoryAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"factory\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"tokenA\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"tokenB\",\"type\":\"address\"}],\"name\":\"uniswapv2PairFor\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"pair\",\"type\":\"address\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"uniswapv2Router02Address\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"wZetaContractAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"zetaConnectorZEVMAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"}]", - Bin: "0x60c06040523480156200001157600080fd5b50604051620018aa380380620018aa8339818101604052810190620000379190620001ac565b73735b14bb79463307aacbed86daf3322b1e6226ab73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614620000b1576040517f2b2add3d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b82600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff1660808173ffffffffffffffffffffffffffffffffffffffff1660601b815250508073ffffffffffffffffffffffffffffffffffffffff1660a08173ffffffffffffffffffffffffffffffffffffffff1660601b815250507f80699e81136d69cb8367ad52a994e25c722a86da654b561d0c14b61a777e7ac560405160405180910390a15050506200025b565b600081519050620001a68162000241565b92915050565b600080600060608486031215620001c857620001c76200023c565b5b6000620001d88682870162000195565b9350506020620001eb8682870162000195565b9250506040620001fe8682870162000195565b9150509250925092565b600062000215826200021c565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600080fd5b6200024c8162000208565b81146200025857600080fd5b50565b60805160601c60a05160601c61161c6200028e600039600061051b0152600081816105bd0152610bc5015261161c6000f3fe608060405234801561001057600080fd5b50600436106100f55760003560e01c806397770dff11610097578063c63585cc11610066578063c63585cc1461025e578063d7fd7afb1461028e578063d936a012146102be578063ee2815ba146102dc576100f5565b806397770dff146101ec578063a7cb050714610208578063c39aca3714610224578063c62178ac14610240576100f5565b8063513a9c05116100d3578063513a9c0514610164578063569541b914610194578063842da36d146101b257806391dd645f146101d0576100f5565b80630be15547146100fa5780631f0e251b1461012a5780633ce4a5bc14610146575b600080fd5b610114600480360381019061010f9190611022565b6102f8565b60405161012191906112b1565b60405180910390f35b610144600480360381019061013f9190610ebf565b61032b565b005b61014e6104a8565b60405161015b91906112b1565b60405180910390f35b61017e60048036038101906101799190611022565b6104c0565b60405161018b91906112b1565b60405180910390f35b61019c6104f3565b6040516101a991906112b1565b60405180910390f35b6101ba610519565b6040516101c791906112b1565b60405180910390f35b6101ea60048036038101906101e5919061104f565b61053d565b005b61020660048036038101906102019190610ebf565b610697565b005b610222600480360381019061021d919061108f565b610814565b005b61023e60048036038101906102399190610f6c565b6108e1565b005b610248610b13565b60405161025591906112b1565b60405180910390f35b61027860048036038101906102739190610eec565b610b39565b60405161028591906112b1565b60405180910390f35b6102a860048036038101906102a39190611022565b610bab565b6040516102b5919061134a565b60405180910390f35b6102c6610bc3565b6040516102d391906112b1565b60405180910390f35b6102f660048036038101906102f1919061104f565b610be7565b005b60016020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b73735b14bb79463307aacbed86daf3322b1e6226ab73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146103a4576040517f2b2add3d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141561040b576040517fd92e233d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055507f3ade88e3922d64780e1bf4460d364c2970b69da813f9c0c07a1c187b5647636c600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1660405161049d91906112b1565b60405180910390a150565b73735b14bb79463307aacbed86daf3322b1e6226ab81565b60026020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b7f000000000000000000000000000000000000000000000000000000000000000081565b73735b14bb79463307aacbed86daf3322b1e6226ab73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146105b6576040517f2b2add3d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60006106057f0000000000000000000000000000000000000000000000000000000000000000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1684610b39565b9050806002600085815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055507f0ecec485166da6139b13bb7e033e9446e2d35348e80ebf1180d4afe2dba1704e838260405161068a929190611365565b60405180910390a1505050565b73735b14bb79463307aacbed86daf3322b1e6226ab73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610710576040517f2b2add3d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415610777576040517fd92e233d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055507fdba79d534382d1a8ae108e4c8ecb27c6ae42ab8b91d44eedf88bd329f3868d5e600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1660405161080991906112b1565b60405180910390a150565b73735b14bb79463307aacbed86daf3322b1e6226ab73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461088d576040517f2b2add3d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80600080848152602001908152602001600020819055507f49f492222906ac486c3c1401fa545626df1f0c0e5a77a05597ea2ed66af9850d82826040516108d592919061138e565b60405180910390a15050565b73735b14bb79463307aacbed86daf3322b1e6226ab73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461095a576040517f2b2add3d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73735b14bb79463307aacbed86daf3322b1e6226ab73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614806109d357503073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16145b15610a0a576040517f82d5d76a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8473ffffffffffffffffffffffffffffffffffffffff166347e7ef2484866040518363ffffffff1660e01b8152600401610a459291906112cc565b602060405180830381600087803b158015610a5f57600080fd5b505af1158015610a73573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a979190610f3f565b508273ffffffffffffffffffffffffffffffffffffffff1663de43156e87878786866040518663ffffffff1660e01b8152600401610ad99594939291906112f5565b600060405180830381600087803b158015610af357600080fd5b505af1158015610b07573d6000803e3d6000fd5b50505050505050505050565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000806000610b488585610cef565b91509150858282604051602001610b60929190611243565b60405160208183030381529060405280519060200120604051602001610b8792919061126f565b6040516020818303038152906040528051906020012060001c925050509392505050565b60006020528060005260406000206000915090505481565b7f000000000000000000000000000000000000000000000000000000000000000081565b73735b14bb79463307aacbed86daf3322b1e6226ab73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610c60576040517f2b2add3d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b806001600084815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055507fd1b36d30f6248e97c473b4d1348ca164a4ef6759022f54a58ec200326c39c45d8282604051610ce3929190611365565b60405180910390a15050565b6000808273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff161415610d58576040517fcb1e7cfe00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1610610d92578284610d95565b83835b8092508193505050600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610e04576040517f78b507da00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b9250929050565b600081359050610e1a816115a1565b92915050565b600081519050610e2f816115b8565b92915050565b60008083601f840112610e4b57610e4a61150e565b5b8235905067ffffffffffffffff811115610e6857610e67611509565b5b602083019150836001820283011115610e8457610e8361151d565b5b9250929050565b600060608284031215610ea157610ea0611513565b5b81905092915050565b600081359050610eb9816115cf565b92915050565b600060208284031215610ed557610ed461152c565b5b6000610ee384828501610e0b565b91505092915050565b600080600060608486031215610f0557610f0461152c565b5b6000610f1386828701610e0b565b9350506020610f2486828701610e0b565b9250506040610f3586828701610e0b565b9150509250925092565b600060208284031215610f5557610f5461152c565b5b6000610f6384828501610e20565b91505092915050565b60008060008060008060a08789031215610f8957610f8861152c565b5b600087013567ffffffffffffffff811115610fa757610fa6611522565b5b610fb389828a01610e8b565b9650506020610fc489828a01610e0b565b9550506040610fd589828a01610eaa565b9450506060610fe689828a01610e0b565b935050608087013567ffffffffffffffff81111561100757611006611522565b5b61101389828a01610e35565b92509250509295509295509295565b6000602082840312156110385761103761152c565b5b600061104684828501610eaa565b91505092915050565b600080604083850312156110665761106561152c565b5b600061107485828601610eaa565b925050602061108585828601610e0b565b9150509250929050565b600080604083850312156110a6576110a561152c565b5b60006110b485828601610eaa565b92505060206110c585828601610eaa565b9150509250929050565b6110d881611475565b82525050565b6110e781611475565b82525050565b6110fe6110f982611475565b6114d6565b82525050565b61111561111082611493565b6114e8565b82525050565b600061112783856113b7565b93506111348385846114c7565b61113d83611531565b840190509392505050565b600061115483856113c8565b93506111618385846114c7565b61116a83611531565b840190509392505050565b60006111826020836113d9565b915061118d8261154f565b602082019050919050565b60006111a56001836113d9565b91506111b082611578565b600182019050919050565b6000606083016111ce60008401846113fb565b85830360008701526111e183828461111b565b925050506111f260208401846113e4565b6111ff60208601826110cf565b5061120d604084018461145e565b61121a6040860182611225565b508091505092915050565b61122e816114bd565b82525050565b61123d816114bd565b82525050565b600061124f82856110ed565b60148201915061125f82846110ed565b6014820191508190509392505050565b600061127a82611198565b915061128682856110ed565b6014820191506112968284611104565b6020820191506112a582611175565b91508190509392505050565b60006020820190506112c660008301846110de565b92915050565b60006040820190506112e160008301856110de565b6112ee6020830184611234565b9392505050565b6000608082019050818103600083015261130f81886111bb565b905061131e60208301876110de565b61132b6040830186611234565b818103606083015261133e818486611148565b90509695505050505050565b600060208201905061135f6000830184611234565b92915050565b600060408201905061137a6000830185611234565b61138760208301846110de565b9392505050565b60006040820190506113a36000830185611234565b6113b06020830184611234565b9392505050565b600082825260208201905092915050565b600082825260208201905092915050565b600081905092915050565b60006113f36020840184610e0b565b905092915050565b6000808335600160200384360303811261141857611417611527565b5b83810192508235915060208301925067ffffffffffffffff8211156114405761143f611504565b5b60018202360384131561145657611455611518565b5b509250929050565b600061146d6020840184610eaa565b905092915050565b60006114808261149d565b9050919050565b60008115159050919050565b6000819050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b82818337600083830152505050565b60006114e1826114f2565b9050919050565b6000819050919050565b60006114fd82611542565b9050919050565b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b60008160601b9050919050565b7f96e8ac4277198ff8b6f785478aa9a39f403cb768dd02cbee326c3e7da348845f600082015250565b7fff00000000000000000000000000000000000000000000000000000000000000600082015250565b6115aa81611475565b81146115b557600080fd5b50565b6115c181611487565b81146115cc57600080fd5b50565b6115d8816114bd565b81146115e357600080fd5b5056fea2646970667358221220d4153f74dccdcf8c4e404c06ec70932b2acc46ffc5784c13399fb6b547739b2064736f6c63430008070033", + Bin: "0x60c06040523480156200001157600080fd5b50604051620018aa380380620018aa8339818101604052810190620000379190620001ac565b73735b14bb79463307aacbed86daf3322b1e6226ab73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614620000b1576040517f2b2add3d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b82600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff1660808173ffffffffffffffffffffffffffffffffffffffff1660601b815250508073ffffffffffffffffffffffffffffffffffffffff1660a08173ffffffffffffffffffffffffffffffffffffffff1660601b815250507f80699e81136d69cb8367ad52a994e25c722a86da654b561d0c14b61a777e7ac560405160405180910390a15050506200025b565b600081519050620001a68162000241565b92915050565b600080600060608486031215620001c857620001c76200023c565b5b6000620001d88682870162000195565b9350506020620001eb8682870162000195565b9250506040620001fe8682870162000195565b9150509250925092565b600062000215826200021c565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600080fd5b6200024c8162000208565b81146200025857600080fd5b50565b60805160601c60a05160601c61161c6200028e600039600061051b0152600081816105bd0152610bc5015261161c6000f3fe608060405234801561001057600080fd5b50600436106100f55760003560e01c806397770dff11610097578063c63585cc11610066578063c63585cc1461025e578063d7fd7afb1461028e578063d936a012146102be578063ee2815ba146102dc576100f5565b806397770dff146101ec578063a7cb050714610208578063c39aca3714610224578063c62178ac14610240576100f5565b8063513a9c05116100d3578063513a9c0514610164578063569541b914610194578063842da36d146101b257806391dd645f146101d0576100f5565b80630be15547146100fa5780631f0e251b1461012a5780633ce4a5bc14610146575b600080fd5b610114600480360381019061010f9190611022565b6102f8565b60405161012191906112b1565b60405180910390f35b610144600480360381019061013f9190610ebf565b61032b565b005b61014e6104a8565b60405161015b91906112b1565b60405180910390f35b61017e60048036038101906101799190611022565b6104c0565b60405161018b91906112b1565b60405180910390f35b61019c6104f3565b6040516101a991906112b1565b60405180910390f35b6101ba610519565b6040516101c791906112b1565b60405180910390f35b6101ea60048036038101906101e5919061104f565b61053d565b005b61020660048036038101906102019190610ebf565b610697565b005b610222600480360381019061021d919061108f565b610814565b005b61023e60048036038101906102399190610f6c565b6108e1565b005b610248610b13565b60405161025591906112b1565b60405180910390f35b61027860048036038101906102739190610eec565b610b39565b60405161028591906112b1565b60405180910390f35b6102a860048036038101906102a39190611022565b610bab565b6040516102b5919061134a565b60405180910390f35b6102c6610bc3565b6040516102d391906112b1565b60405180910390f35b6102f660048036038101906102f1919061104f565b610be7565b005b60016020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b73735b14bb79463307aacbed86daf3322b1e6226ab73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146103a4576040517f2b2add3d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141561040b576040517fd92e233d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055507f3ade88e3922d64780e1bf4460d364c2970b69da813f9c0c07a1c187b5647636c600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1660405161049d91906112b1565b60405180910390a150565b73735b14bb79463307aacbed86daf3322b1e6226ab81565b60026020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b7f000000000000000000000000000000000000000000000000000000000000000081565b73735b14bb79463307aacbed86daf3322b1e6226ab73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146105b6576040517f2b2add3d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60006106057f0000000000000000000000000000000000000000000000000000000000000000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1684610b39565b9050806002600085815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055507f0ecec485166da6139b13bb7e033e9446e2d35348e80ebf1180d4afe2dba1704e838260405161068a929190611365565b60405180910390a1505050565b73735b14bb79463307aacbed86daf3322b1e6226ab73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610710576040517f2b2add3d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415610777576040517fd92e233d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055507fdba79d534382d1a8ae108e4c8ecb27c6ae42ab8b91d44eedf88bd329f3868d5e600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1660405161080991906112b1565b60405180910390a150565b73735b14bb79463307aacbed86daf3322b1e6226ab73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461088d576040517f2b2add3d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80600080848152602001908152602001600020819055507f49f492222906ac486c3c1401fa545626df1f0c0e5a77a05597ea2ed66af9850d82826040516108d592919061138e565b60405180910390a15050565b73735b14bb79463307aacbed86daf3322b1e6226ab73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461095a576040517f2b2add3d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73735b14bb79463307aacbed86daf3322b1e6226ab73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614806109d357503073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16145b15610a0a576040517f82d5d76a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8473ffffffffffffffffffffffffffffffffffffffff166347e7ef2484866040518363ffffffff1660e01b8152600401610a459291906112cc565b602060405180830381600087803b158015610a5f57600080fd5b505af1158015610a73573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a979190610f3f565b508273ffffffffffffffffffffffffffffffffffffffff1663de43156e87878786866040518663ffffffff1660e01b8152600401610ad99594939291906112f5565b600060405180830381600087803b158015610af357600080fd5b505af1158015610b07573d6000803e3d6000fd5b50505050505050505050565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000806000610b488585610cef565b91509150858282604051602001610b60929190611243565b60405160208183030381529060405280519060200120604051602001610b8792919061126f565b6040516020818303038152906040528051906020012060001c925050509392505050565b60006020528060005260406000206000915090505481565b7f000000000000000000000000000000000000000000000000000000000000000081565b73735b14bb79463307aacbed86daf3322b1e6226ab73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610c60576040517f2b2add3d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b806001600084815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055507fd1b36d30f6248e97c473b4d1348ca164a4ef6759022f54a58ec200326c39c45d8282604051610ce3929190611365565b60405180910390a15050565b6000808273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff161415610d58576040517fcb1e7cfe00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1610610d92578284610d95565b83835b8092508193505050600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610e04576040517f78b507da00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b9250929050565b600081359050610e1a816115a1565b92915050565b600081519050610e2f816115b8565b92915050565b60008083601f840112610e4b57610e4a61150e565b5b8235905067ffffffffffffffff811115610e6857610e67611509565b5b602083019150836001820283011115610e8457610e8361151d565b5b9250929050565b600060608284031215610ea157610ea0611513565b5b81905092915050565b600081359050610eb9816115cf565b92915050565b600060208284031215610ed557610ed461152c565b5b6000610ee384828501610e0b565b91505092915050565b600080600060608486031215610f0557610f0461152c565b5b6000610f1386828701610e0b565b9350506020610f2486828701610e0b565b9250506040610f3586828701610e0b565b9150509250925092565b600060208284031215610f5557610f5461152c565b5b6000610f6384828501610e20565b91505092915050565b60008060008060008060a08789031215610f8957610f8861152c565b5b600087013567ffffffffffffffff811115610fa757610fa6611522565b5b610fb389828a01610e8b565b9650506020610fc489828a01610e0b565b9550506040610fd589828a01610eaa565b9450506060610fe689828a01610e0b565b935050608087013567ffffffffffffffff81111561100757611006611522565b5b61101389828a01610e35565b92509250509295509295509295565b6000602082840312156110385761103761152c565b5b600061104684828501610eaa565b91505092915050565b600080604083850312156110665761106561152c565b5b600061107485828601610eaa565b925050602061108585828601610e0b565b9150509250929050565b600080604083850312156110a6576110a561152c565b5b60006110b485828601610eaa565b92505060206110c585828601610eaa565b9150509250929050565b6110d881611475565b82525050565b6110e781611475565b82525050565b6110fe6110f982611475565b6114d6565b82525050565b61111561111082611493565b6114e8565b82525050565b600061112783856113b7565b93506111348385846114c7565b61113d83611531565b840190509392505050565b600061115483856113c8565b93506111618385846114c7565b61116a83611531565b840190509392505050565b60006111826020836113d9565b915061118d8261154f565b602082019050919050565b60006111a56001836113d9565b91506111b082611578565b600182019050919050565b6000606083016111ce60008401846113fb565b85830360008701526111e183828461111b565b925050506111f260208401846113e4565b6111ff60208601826110cf565b5061120d604084018461145e565b61121a6040860182611225565b508091505092915050565b61122e816114bd565b82525050565b61123d816114bd565b82525050565b600061124f82856110ed565b60148201915061125f82846110ed565b6014820191508190509392505050565b600061127a82611198565b915061128682856110ed565b6014820191506112968284611104565b6020820191506112a582611175565b91508190509392505050565b60006020820190506112c660008301846110de565b92915050565b60006040820190506112e160008301856110de565b6112ee6020830184611234565b9392505050565b6000608082019050818103600083015261130f81886111bb565b905061131e60208301876110de565b61132b6040830186611234565b818103606083015261133e818486611148565b90509695505050505050565b600060208201905061135f6000830184611234565b92915050565b600060408201905061137a6000830185611234565b61138760208301846110de565b9392505050565b60006040820190506113a36000830185611234565b6113b06020830184611234565b9392505050565b600082825260208201905092915050565b600082825260208201905092915050565b600081905092915050565b60006113f36020840184610e0b565b905092915050565b6000808335600160200384360303811261141857611417611527565b5b83810192508235915060208301925067ffffffffffffffff8211156114405761143f611504565b5b60018202360384131561145657611455611518565b5b509250929050565b600061146d6020840184610eaa565b905092915050565b60006114808261149d565b9050919050565b60008115159050919050565b6000819050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b82818337600083830152505050565b60006114e1826114f2565b9050919050565b6000819050919050565b60006114fd82611542565b9050919050565b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b60008160601b9050919050565b7f96e8ac4277198ff8b6f785478aa9a39f403cb768dd02cbee326c3e7da348845f600082015250565b7fff00000000000000000000000000000000000000000000000000000000000000600082015250565b6115aa81611475565b81146115b557600080fd5b50565b6115c181611487565b81146115cc57600080fd5b50565b6115d8816114bd565b81146115e357600080fd5b5056fea26469706673582212207875ed7b29614b36fed6df17ab4d8319246cc854565244214ea9e3ec60e5598264736f6c63430008070033", } // SystemContractABI is the input ABI used to generate the binding from. diff --git a/pkg/contracts/zevm/testing/systemcontractmock.sol/systemcontractmock.go b/pkg/contracts/zevm/testing/systemcontractmock.sol/systemcontractmock.go index 884e14e6..0eef1d99 100644 --- a/pkg/contracts/zevm/testing/systemcontractmock.sol/systemcontractmock.go +++ b/pkg/contracts/zevm/testing/systemcontractmock.sol/systemcontractmock.go @@ -32,7 +32,7 @@ var ( // SystemContractMockMetaData contains all meta data concerning the SystemContractMock contract. var SystemContractMockMetaData = &bind.MetaData{ ABI: "[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"wzeta_\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"uniswapv2Factory_\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"uniswapv2Router02_\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"CallerIsNotFungibleModule\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"CantBeIdenticalAddresses\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"CantBeZeroAddress\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidTarget\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"SetGasCoin\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"SetGasPrice\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"SetGasZetaPool\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"SetWZeta\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[],\"name\":\"SystemContractDeployed\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"gasCoinZRC20ByChainId\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"gasPriceByChainId\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"gasZetaPoolByChainId\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"target\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"zrc20\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"message\",\"type\":\"bytes\"}],\"name\":\"onCrossChainCall\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"chainID\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"zrc20\",\"type\":\"address\"}],\"name\":\"setGasCoinZRC20\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"chainID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"price\",\"type\":\"uint256\"}],\"name\":\"setGasPrice\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"}],\"name\":\"setWZETAContractAddress\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"uniswapv2FactoryAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"factory\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"tokenA\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"tokenB\",\"type\":\"address\"}],\"name\":\"uniswapv2PairFor\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"pair\",\"type\":\"address\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"uniswapv2Router02Address\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"wZetaContractAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"}]", - Bin: "0x60806040523480156200001157600080fd5b50604051620010d7380380620010d7833981810160405281019062000037919062000146565b82600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555081600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080600560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055507f80699e81136d69cb8367ad52a994e25c722a86da654b561d0c14b61a777e7ac560405160405180910390a1505050620001f5565b6000815190506200014081620001db565b92915050565b600080600060608486031215620001625762000161620001d6565b5b600062000172868287016200012f565b935050602062000185868287016200012f565b925050604062000198868287016200012f565b9150509250925092565b6000620001af82620001b6565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600080fd5b620001e681620001a2565b8114620001f257600080fd5b50565b610ed280620002056000396000f3fe608060405234801561001057600080fd5b50600436106100a95760003560e01c806397770dff1161007157806397770dff14610166578063a7cb050714610182578063c63585cc1461019e578063d7fd7afb146101ce578063d936a012146101fe578063ee2815ba1461021c576100a9565b80630be15547146100ae5780633c669d55146100de578063513a9c05146100fa578063569541b91461012a578063842da36d14610148575b600080fd5b6100c860048036038101906100c3919061094d565b610238565b6040516100d59190610bce565b60405180910390f35b6100f860048036038101906100f39190610898565b61026b565b005b610114600480360381019061010f919061094d565b6103b8565b6040516101219190610bce565b60405180910390f35b6101326103eb565b60405161013f9190610bce565b60405180910390f35b610150610411565b60405161015d9190610bce565b60405180910390f35b610180600480360381019061017b9190610818565b610437565b005b61019c600480360381019061019791906109ba565b6104d4565b005b6101b860048036038101906101b39190610845565b610528565b6040516101c59190610bce565b60405180910390f35b6101e860048036038101906101e3919061094d565b61059a565b6040516101f59190610c67565b60405180910390f35b6102066105b2565b6040516102139190610bce565b60405180910390f35b6102366004803603810190610231919061097a565b6105d8565b005b60016020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600060405180606001604052806040518060200160405280600081525081526020013373ffffffffffffffffffffffffffffffffffffffff1681526020014681525090508473ffffffffffffffffffffffffffffffffffffffff1663a9059cbb87866040518363ffffffff1660e01b81526004016102ea929190610be9565b602060405180830381600087803b15801561030457600080fd5b505af1158015610318573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061033c9190610920565b508573ffffffffffffffffffffffffffffffffffffffff1663de43156e82878787876040518663ffffffff1660e01b815260040161037e959493929190610c12565b600060405180830381600087803b15801561039857600080fd5b505af11580156103ac573d6000803e3d6000fd5b50505050505050505050565b60026020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b80600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055507fdba79d534382d1a8ae108e4c8ecb27c6ae42ab8b91d44eedf88bd329f3868d5e600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166040516104c99190610bce565b60405180910390a150565b80600080848152602001908152602001600020819055507f49f492222906ac486c3c1401fa545626df1f0c0e5a77a05597ea2ed66af9850d828260405161051c929190610cab565b60405180910390a15050565b60008060006105378585610667565b9150915085828260405160200161054f929190610b60565b60405160208183030381529060405280519060200120604051602001610576929190610b8c565b6040516020818303038152906040528051906020012060001c925050509392505050565b60006020528060005260406000206000915090505481565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b806001600084815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055507fd1b36d30f6248e97c473b4d1348ca164a4ef6759022f54a58ec200326c39c45d828260405161065b929190610c82565b60405180910390a15050565b6000808273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614156106d0576040517fcb1e7cfe00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff161061070a57828461070d565b83835b8092508193505050600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16141561077c576040517f78b507da00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b9250929050565b60008135905061079281610e57565b92915050565b6000815190506107a781610e6e565b92915050565b60008083601f8401126107c3576107c2610dd3565b5b8235905067ffffffffffffffff8111156107e0576107df610dce565b5b6020830191508360018202830111156107fc576107fb610dd8565b5b9250929050565b60008135905061081281610e85565b92915050565b60006020828403121561082e5761082d610de2565b5b600061083c84828501610783565b91505092915050565b60008060006060848603121561085e5761085d610de2565b5b600061086c86828701610783565b935050602061087d86828701610783565b925050604061088e86828701610783565b9150509250925092565b6000806000806000608086880312156108b4576108b3610de2565b5b60006108c288828901610783565b95505060206108d388828901610783565b94505060406108e488828901610803565b935050606086013567ffffffffffffffff81111561090557610904610ddd565b5b610911888289016107ad565b92509250509295509295909350565b60006020828403121561093657610935610de2565b5b600061094484828501610798565b91505092915050565b60006020828403121561096357610962610de2565b5b600061097184828501610803565b91505092915050565b6000806040838503121561099157610990610de2565b5b600061099f85828601610803565b92505060206109b085828601610783565b9150509250929050565b600080604083850312156109d1576109d0610de2565b5b60006109df85828601610803565b92505060206109f085828601610803565b9150509250929050565b610a0381610d0c565b82525050565b610a1281610d0c565b82525050565b610a29610a2482610d0c565b610da0565b82525050565b610a40610a3b82610d2a565b610db2565b82525050565b6000610a528385610cf0565b9350610a5f838584610d5e565b610a6883610de7565b840190509392505050565b6000610a7e82610cd4565b610a888185610cdf565b9350610a98818560208601610d6d565b610aa181610de7565b840191505092915050565b6000610ab9602083610d01565b9150610ac482610e05565b602082019050919050565b6000610adc600183610d01565b9150610ae782610e2e565b600182019050919050565b60006060830160008301518482036000860152610b0f8282610a73565b9150506020830151610b2460208601826109fa565b506040830151610b376040860182610b42565b508091505092915050565b610b4b81610d54565b82525050565b610b5a81610d54565b82525050565b6000610b6c8285610a18565b601482019150610b7c8284610a18565b6014820191508190509392505050565b6000610b9782610acf565b9150610ba38285610a18565b601482019150610bb38284610a2f565b602082019150610bc282610aac565b91508190509392505050565b6000602082019050610be36000830184610a09565b92915050565b6000604082019050610bfe6000830185610a09565b610c0b6020830184610b51565b9392505050565b60006080820190508181036000830152610c2c8188610af2565b9050610c3b6020830187610a09565b610c486040830186610b51565b8181036060830152610c5b818486610a46565b90509695505050505050565b6000602082019050610c7c6000830184610b51565b92915050565b6000604082019050610c976000830185610b51565b610ca46020830184610a09565b9392505050565b6000604082019050610cc06000830185610b51565b610ccd6020830184610b51565b9392505050565b600081519050919050565b600082825260208201905092915050565b600082825260208201905092915050565b600081905092915050565b6000610d1782610d34565b9050919050565b60008115159050919050565b6000819050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b82818337600083830152505050565b60005b83811015610d8b578082015181840152602081019050610d70565b83811115610d9a576000848401525b50505050565b6000610dab82610dbc565b9050919050565b6000819050919050565b6000610dc782610df8565b9050919050565b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b60008160601b9050919050565b7f96e8ac4277198ff8b6f785478aa9a39f403cb768dd02cbee326c3e7da348845f600082015250565b7fff00000000000000000000000000000000000000000000000000000000000000600082015250565b610e6081610d0c565b8114610e6b57600080fd5b50565b610e7781610d1e565b8114610e8257600080fd5b50565b610e8e81610d54565b8114610e9957600080fd5b5056fea26469706673582212203fa9d55135c7f24f7b5da3516688ef5fb78d92d28a850d2fe6d6fc3799422af364736f6c63430008070033", + Bin: "0x60806040523480156200001157600080fd5b50604051620010d7380380620010d7833981810160405281019062000037919062000146565b82600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555081600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080600560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055507f80699e81136d69cb8367ad52a994e25c722a86da654b561d0c14b61a777e7ac560405160405180910390a1505050620001f5565b6000815190506200014081620001db565b92915050565b600080600060608486031215620001625762000161620001d6565b5b600062000172868287016200012f565b935050602062000185868287016200012f565b925050604062000198868287016200012f565b9150509250925092565b6000620001af82620001b6565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600080fd5b620001e681620001a2565b8114620001f257600080fd5b50565b610ed280620002056000396000f3fe608060405234801561001057600080fd5b50600436106100a95760003560e01c806397770dff1161007157806397770dff14610166578063a7cb050714610182578063c63585cc1461019e578063d7fd7afb146101ce578063d936a012146101fe578063ee2815ba1461021c576100a9565b80630be15547146100ae5780633c669d55146100de578063513a9c05146100fa578063569541b91461012a578063842da36d14610148575b600080fd5b6100c860048036038101906100c3919061094d565b610238565b6040516100d59190610bce565b60405180910390f35b6100f860048036038101906100f39190610898565b61026b565b005b610114600480360381019061010f919061094d565b6103b8565b6040516101219190610bce565b60405180910390f35b6101326103eb565b60405161013f9190610bce565b60405180910390f35b610150610411565b60405161015d9190610bce565b60405180910390f35b610180600480360381019061017b9190610818565b610437565b005b61019c600480360381019061019791906109ba565b6104d4565b005b6101b860048036038101906101b39190610845565b610528565b6040516101c59190610bce565b60405180910390f35b6101e860048036038101906101e3919061094d565b61059a565b6040516101f59190610c67565b60405180910390f35b6102066105b2565b6040516102139190610bce565b60405180910390f35b6102366004803603810190610231919061097a565b6105d8565b005b60016020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600060405180606001604052806040518060200160405280600081525081526020013373ffffffffffffffffffffffffffffffffffffffff1681526020014681525090508473ffffffffffffffffffffffffffffffffffffffff1663a9059cbb87866040518363ffffffff1660e01b81526004016102ea929190610be9565b602060405180830381600087803b15801561030457600080fd5b505af1158015610318573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061033c9190610920565b508573ffffffffffffffffffffffffffffffffffffffff1663de43156e82878787876040518663ffffffff1660e01b815260040161037e959493929190610c12565b600060405180830381600087803b15801561039857600080fd5b505af11580156103ac573d6000803e3d6000fd5b50505050505050505050565b60026020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b80600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055507fdba79d534382d1a8ae108e4c8ecb27c6ae42ab8b91d44eedf88bd329f3868d5e600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166040516104c99190610bce565b60405180910390a150565b80600080848152602001908152602001600020819055507f49f492222906ac486c3c1401fa545626df1f0c0e5a77a05597ea2ed66af9850d828260405161051c929190610cab565b60405180910390a15050565b60008060006105378585610667565b9150915085828260405160200161054f929190610b60565b60405160208183030381529060405280519060200120604051602001610576929190610b8c565b6040516020818303038152906040528051906020012060001c925050509392505050565b60006020528060005260406000206000915090505481565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b806001600084815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055507fd1b36d30f6248e97c473b4d1348ca164a4ef6759022f54a58ec200326c39c45d828260405161065b929190610c82565b60405180910390a15050565b6000808273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614156106d0576040517fcb1e7cfe00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff161061070a57828461070d565b83835b8092508193505050600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16141561077c576040517f78b507da00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b9250929050565b60008135905061079281610e57565b92915050565b6000815190506107a781610e6e565b92915050565b60008083601f8401126107c3576107c2610dd3565b5b8235905067ffffffffffffffff8111156107e0576107df610dce565b5b6020830191508360018202830111156107fc576107fb610dd8565b5b9250929050565b60008135905061081281610e85565b92915050565b60006020828403121561082e5761082d610de2565b5b600061083c84828501610783565b91505092915050565b60008060006060848603121561085e5761085d610de2565b5b600061086c86828701610783565b935050602061087d86828701610783565b925050604061088e86828701610783565b9150509250925092565b6000806000806000608086880312156108b4576108b3610de2565b5b60006108c288828901610783565b95505060206108d388828901610783565b94505060406108e488828901610803565b935050606086013567ffffffffffffffff81111561090557610904610ddd565b5b610911888289016107ad565b92509250509295509295909350565b60006020828403121561093657610935610de2565b5b600061094484828501610798565b91505092915050565b60006020828403121561096357610962610de2565b5b600061097184828501610803565b91505092915050565b6000806040838503121561099157610990610de2565b5b600061099f85828601610803565b92505060206109b085828601610783565b9150509250929050565b600080604083850312156109d1576109d0610de2565b5b60006109df85828601610803565b92505060206109f085828601610803565b9150509250929050565b610a0381610d0c565b82525050565b610a1281610d0c565b82525050565b610a29610a2482610d0c565b610da0565b82525050565b610a40610a3b82610d2a565b610db2565b82525050565b6000610a528385610cf0565b9350610a5f838584610d5e565b610a6883610de7565b840190509392505050565b6000610a7e82610cd4565b610a888185610cdf565b9350610a98818560208601610d6d565b610aa181610de7565b840191505092915050565b6000610ab9602083610d01565b9150610ac482610e05565b602082019050919050565b6000610adc600183610d01565b9150610ae782610e2e565b600182019050919050565b60006060830160008301518482036000860152610b0f8282610a73565b9150506020830151610b2460208601826109fa565b506040830151610b376040860182610b42565b508091505092915050565b610b4b81610d54565b82525050565b610b5a81610d54565b82525050565b6000610b6c8285610a18565b601482019150610b7c8284610a18565b6014820191508190509392505050565b6000610b9782610acf565b9150610ba38285610a18565b601482019150610bb38284610a2f565b602082019150610bc282610aac565b91508190509392505050565b6000602082019050610be36000830184610a09565b92915050565b6000604082019050610bfe6000830185610a09565b610c0b6020830184610b51565b9392505050565b60006080820190508181036000830152610c2c8188610af2565b9050610c3b6020830187610a09565b610c486040830186610b51565b8181036060830152610c5b818486610a46565b90509695505050505050565b6000602082019050610c7c6000830184610b51565b92915050565b6000604082019050610c976000830185610b51565b610ca46020830184610a09565b9392505050565b6000604082019050610cc06000830185610b51565b610ccd6020830184610b51565b9392505050565b600081519050919050565b600082825260208201905092915050565b600082825260208201905092915050565b600081905092915050565b6000610d1782610d34565b9050919050565b60008115159050919050565b6000819050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b82818337600083830152505050565b60005b83811015610d8b578082015181840152602081019050610d70565b83811115610d9a576000848401525b50505050565b6000610dab82610dbc565b9050919050565b6000819050919050565b6000610dc782610df8565b9050919050565b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b60008160601b9050919050565b7f96e8ac4277198ff8b6f785478aa9a39f403cb768dd02cbee326c3e7da348845f600082015250565b7fff00000000000000000000000000000000000000000000000000000000000000600082015250565b610e6081610d0c565b8114610e6b57600080fd5b50565b610e7781610d1e565b8114610e8257600080fd5b50565b610e8e81610d54565b8114610e9957600080fd5b5056fea2646970667358221220e74d5405ce1c819244378f4290d048a05683c5316d06f7cdbc42ff158e71a57a64736f6c63430008070033", } // SystemContractMockABI is the input ABI used to generate the binding from. diff --git a/pkg/hardhat/console.sol/console.go b/pkg/hardhat/console.sol/console.go new file mode 100644 index 00000000..9329d210 --- /dev/null +++ b/pkg/hardhat/console.sol/console.go @@ -0,0 +1,203 @@ +// Code generated - DO NOT EDIT. +// This file is a generated binding and any manual changes will be lost. + +package console + +import ( + "errors" + "math/big" + "strings" + + ethereum "github.com/ethereum/go-ethereum" + "github.com/ethereum/go-ethereum/accounts/abi" + "github.com/ethereum/go-ethereum/accounts/abi/bind" + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/core/types" + "github.com/ethereum/go-ethereum/event" +) + +// Reference imports to suppress errors if they are not otherwise used. +var ( + _ = errors.New + _ = big.NewInt + _ = strings.NewReader + _ = ethereum.NotFound + _ = bind.Bind + _ = common.Big1 + _ = types.BloomLookup + _ = event.NewSubscription + _ = abi.ConvertType +) + +// ConsoleMetaData contains all meta data concerning the Console contract. +var ConsoleMetaData = &bind.MetaData{ + ABI: "[]", + Bin: "0x60566050600b82828239805160001a6073146043577f4e487b7100000000000000000000000000000000000000000000000000000000600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220b984f068e9b45c3f00be7595f7bc61c482d2370eb5a8fa63bd27501c6f9a6d9264736f6c63430008070033", +} + +// ConsoleABI is the input ABI used to generate the binding from. +// Deprecated: Use ConsoleMetaData.ABI instead. +var ConsoleABI = ConsoleMetaData.ABI + +// ConsoleBin is the compiled bytecode used for deploying new contracts. +// Deprecated: Use ConsoleMetaData.Bin instead. +var ConsoleBin = ConsoleMetaData.Bin + +// DeployConsole deploys a new Ethereum contract, binding an instance of Console to it. +func DeployConsole(auth *bind.TransactOpts, backend bind.ContractBackend) (common.Address, *types.Transaction, *Console, error) { + parsed, err := ConsoleMetaData.GetAbi() + if err != nil { + return common.Address{}, nil, nil, err + } + if parsed == nil { + return common.Address{}, nil, nil, errors.New("GetABI returned nil") + } + + address, tx, contract, err := bind.DeployContract(auth, *parsed, common.FromHex(ConsoleBin), backend) + if err != nil { + return common.Address{}, nil, nil, err + } + return address, tx, &Console{ConsoleCaller: ConsoleCaller{contract: contract}, ConsoleTransactor: ConsoleTransactor{contract: contract}, ConsoleFilterer: ConsoleFilterer{contract: contract}}, nil +} + +// Console is an auto generated Go binding around an Ethereum contract. +type Console struct { + ConsoleCaller // Read-only binding to the contract + ConsoleTransactor // Write-only binding to the contract + ConsoleFilterer // Log filterer for contract events +} + +// ConsoleCaller is an auto generated read-only Go binding around an Ethereum contract. +type ConsoleCaller struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// ConsoleTransactor is an auto generated write-only Go binding around an Ethereum contract. +type ConsoleTransactor struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// ConsoleFilterer is an auto generated log filtering Go binding around an Ethereum contract events. +type ConsoleFilterer struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// ConsoleSession is an auto generated Go binding around an Ethereum contract, +// with pre-set call and transact options. +type ConsoleSession struct { + Contract *Console // 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 +} + +// ConsoleCallerSession is an auto generated read-only Go binding around an Ethereum contract, +// with pre-set call options. +type ConsoleCallerSession struct { + Contract *ConsoleCaller // Generic contract caller binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session +} + +// ConsoleTransactorSession is an auto generated write-only Go binding around an Ethereum contract, +// with pre-set transact options. +type ConsoleTransactorSession struct { + Contract *ConsoleTransactor // Generic contract transactor binding to set the session for + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// ConsoleRaw is an auto generated low-level Go binding around an Ethereum contract. +type ConsoleRaw struct { + Contract *Console // Generic contract binding to access the raw methods on +} + +// ConsoleCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. +type ConsoleCallerRaw struct { + Contract *ConsoleCaller // Generic read-only contract binding to access the raw methods on +} + +// ConsoleTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. +type ConsoleTransactorRaw struct { + Contract *ConsoleTransactor // Generic write-only contract binding to access the raw methods on +} + +// NewConsole creates a new instance of Console, bound to a specific deployed contract. +func NewConsole(address common.Address, backend bind.ContractBackend) (*Console, error) { + contract, err := bindConsole(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &Console{ConsoleCaller: ConsoleCaller{contract: contract}, ConsoleTransactor: ConsoleTransactor{contract: contract}, ConsoleFilterer: ConsoleFilterer{contract: contract}}, nil +} + +// NewConsoleCaller creates a new read-only instance of Console, bound to a specific deployed contract. +func NewConsoleCaller(address common.Address, caller bind.ContractCaller) (*ConsoleCaller, error) { + contract, err := bindConsole(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &ConsoleCaller{contract: contract}, nil +} + +// NewConsoleTransactor creates a new write-only instance of Console, bound to a specific deployed contract. +func NewConsoleTransactor(address common.Address, transactor bind.ContractTransactor) (*ConsoleTransactor, error) { + contract, err := bindConsole(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &ConsoleTransactor{contract: contract}, nil +} + +// NewConsoleFilterer creates a new log filterer instance of Console, bound to a specific deployed contract. +func NewConsoleFilterer(address common.Address, filterer bind.ContractFilterer) (*ConsoleFilterer, error) { + contract, err := bindConsole(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &ConsoleFilterer{contract: contract}, nil +} + +// bindConsole binds a generic wrapper to an already deployed contract. +func bindConsole(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := ConsoleMetaData.GetAbi() + if err != nil { + return nil, err + } + return bind.NewBoundContract(address, *parsed, caller, transactor, filterer), nil +} + +// 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 (_Console *ConsoleRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _Console.Contract.ConsoleCaller.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 (_Console *ConsoleRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _Console.Contract.ConsoleTransactor.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_Console *ConsoleRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _Console.Contract.ConsoleTransactor.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 (_Console *ConsoleCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _Console.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 (_Console *ConsoleTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _Console.Contract.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_Console *ConsoleTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _Console.Contract.contract.Transact(opts, method, params...) +} diff --git a/test/prototypes/GatewayIntegration.spec.ts b/test/prototypes/GatewayIntegration.spec.ts new file mode 100644 index 00000000..2c529432 --- /dev/null +++ b/test/prototypes/GatewayIntegration.spec.ts @@ -0,0 +1,234 @@ +import { AddressZero } from "@ethersproject/constants"; +import { SignerWithAddress } from "@nomiclabs/hardhat-ethers/signers"; +import { SystemContract, ZRC20 } from "@typechain-types"; +import { expect } from "chai"; +import { Contract } from "ethers"; +import { parseEther } from "ethers/lib/utils"; +import { ethers, upgrades } from "hardhat"; + +import { FUNGIBLE_MODULE_ADDRESS } from "../test.helpers"; +const hre = require("hardhat"); + +describe("GatewayEVM GatewayZEVM integration", function () { + // EVM + let receiverEVM: Contract; + let gatewayEVM: Contract; + let token: Contract; + let custody: Contract; + let ownerEVM: any, destination: any, tssAddress: any; + + // ZEVM + let senderZEVM: Contract; + let ZRC20Contract: ZRC20; + let systemContract: SystemContract; + let gatewayZEVM: Contract; + let ownerZEVM: SignerWithAddress; + let addrs: SignerWithAddress[]; + + beforeEach(async function () { + [ownerEVM, ownerZEVM, destination, tssAddress, ...addrs] = await ethers.getSigners(); + // Prepare EVM + const TestERC20 = await ethers.getContractFactory("TestERC20"); + const ReceiverEVM = await ethers.getContractFactory("Receiver"); + const GatewayEVM = await ethers.getContractFactory("GatewayEVM"); + const Custody = await ethers.getContractFactory("ERC20CustodyNew"); + + // Deploy the contracts + token = await TestERC20.deploy("Test Token", "TTK"); + receiverEVM = await ReceiverEVM.deploy(); + gatewayEVM = await upgrades.deployProxy(GatewayEVM, [tssAddress.address], { + initializer: "initialize", + kind: "uups", + }); + custody = await Custody.deploy(gatewayEVM.address); + + gatewayEVM.setCustody(custody.address); + + // Mint initial supply to the owner + await token.mint(ownerEVM.address, ethers.utils.parseEther("1000")); + + // Transfer some tokens to the custody contract + await token.transfer(custody.address, ethers.utils.parseEther("500")); + + // Prepare ZEVM + // 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()]); + + const SystemContractFactory = await ethers.getContractFactory("SystemContractMock"); + systemContract = (await SystemContractFactory.deploy(AddressZero, AddressZero, AddressZero)) as SystemContract; + + const ZRC20Factory = await ethers.getContractFactory("ZRC20"); + ZRC20Contract = (await ZRC20Factory.connect(fungibleModuleSigner).deploy( + "TOKEN", + "TKN", + 18, + 1, + 1, + 0, + systemContract.address + )) as ZRC20; + + await systemContract.setGasCoinZRC20(1, ZRC20Contract.address); + await systemContract.setGasPrice(1, ZRC20Contract.address); + + await ZRC20Contract.connect(fungibleModuleSigner).deposit(ownerZEVM.address, parseEther("100")); + + const GatewayZEVM = await ethers.getContractFactory("GatewayZEVM"); + gatewayZEVM = await upgrades.deployProxy(GatewayZEVM, [], { + initializer: "initialize", + kind: "uups", + }); + + 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 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); + senderZEVM = await SenderZEVM.deploy(gatewayZEVM.address); + + await ZRC20Contract.connect(fungibleModuleSigner).deposit(senderZEVM.address, parseEther("100")); + }); + + it("should call Receiver contract on EVM from ZEVM account", async function () { + const str = "Hello, Hardhat!"; + const num = 42; + const flag = true; + const value = ethers.utils.parseEther("1.0"); + + // Encode the function call data and call on zevm + const message = receiverEVM.interface.encodeFunctionData("receiveA", [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); + + // Get message from events + const callTxReceipt = await callTx.wait(); + const callEvent = callTxReceipt.events[0]; + const callMessage = callEvent.args[2]; + + // Call execute on evm + const executeTx = await gatewayEVM.execute(receiverEVM.address, callMessage, { value: value }); + + // Listen for the event + await expect(executeTx).to.emit(gatewayEVM, "Executed").withArgs(receiverEVM.address, value, callMessage); + await expect(executeTx).to.emit(receiverEVM, "ReceivedA").withArgs(gatewayEVM.address, value, str, num, flag); + }); + + it("should withdraw and call Receiver contract on EVM from ZEVM account", async function () { + const str = "Hello, Hardhat!"; + const num = 42; + const flag = true; + const value = ethers.utils.parseEther("1.0"); + + // Encode the function call data and call on zevm + const message = receiverEVM.interface.encodeFunctionData("receiveA", [str, num, flag]); + const callTx = await gatewayZEVM + .connect(ownerZEVM) + .withdrawAndCall(receiverEVM.address, parseEther("1"), ZRC20Contract.address, message); + + await expect(callTx) + .to.emit(gatewayZEVM, "Withdrawal") + .withArgs( + ethers.utils.getAddress(ownerZEVM.address), + receiverEVM.address.toLowerCase(), + parseEther("1"), + 0, + await ZRC20Contract.PROTOCOL_FLAT_FEE(), + message + ); + + // Get message from events + const callTxReceipt = await callTx.wait(); + const callEvent = callTxReceipt.events.filter((e) => e.event == "Withdrawal")[0]; + const callMessage = callEvent.args[5]; + + // Call execute on evm + const executeTx = await gatewayEVM.execute(receiverEVM.address, callMessage, { value: value }); + + // Listen for the event + await expect(executeTx).to.emit(gatewayEVM, "Executed").withArgs(receiverEVM.address, value, callMessage); + await expect(executeTx).to.emit(receiverEVM, "ReceivedA").withArgs(gatewayEVM.address, value, str, num, flag); + + const balanceOfAfterWithdrawal = await ZRC20Contract.balanceOf(ownerZEVM.address); + expect(balanceOfAfterWithdrawal).to.equal(parseEther("99")); + }); + + it("should call Receiver contract on EVM from Sender contract on ZEVM", async function () { + const str = "Hello, Hardhat!"; + const num = 42; + const flag = true; + const value = ethers.utils.parseEther("1.0"); + + // Call sender function + const callTx = await senderZEVM.connect(ownerZEVM).callReceiver(receiverEVM.address, str, num, flag); + + // Get message from events + const callTxReceipt = await callTx.wait(); + const expectedMessage = receiverEVM.interface.encodeFunctionData("receiveA", [str, num, flag]); + await expect(callTx) + .to.emit(gatewayZEVM, "Call") + .withArgs(senderZEVM.address, receiverEVM.address, expectedMessage); + + const callEvent = callTxReceipt.events[0]; + const callMessage = callEvent.args[2]; + + // Call execute on evm + const executeTx = await gatewayEVM.execute(receiverEVM.address, callMessage, { value: value }); + + // Listen for the event + await expect(executeTx).to.emit(gatewayEVM, "Executed").withArgs(receiverEVM.address, value, callMessage); + await expect(executeTx).to.emit(receiverEVM, "ReceivedA").withArgs(gatewayEVM.address, value, str, num, flag); + }); + + it("should withdrawn and call Receiver contract on EVM from Sender contract on ZEVM", async function () { + const str = "Hello, Hardhat!"; + const num = 42; + const flag = true; + const value = ethers.utils.parseEther("1.0"); + + // Call sender function + const callTx = await senderZEVM + .connect(ownerZEVM) + .withdrawAndCallReceiver(receiverEVM.address, parseEther("1"), ZRC20Contract.address, str, num, flag); + + // Get message from events + const callTxReceipt = await callTx.wait(); + const expectedMessage = receiverEVM.interface.encodeFunctionData("receiveA", [str, num, flag]); + + await expect(callTx) + .to.emit(gatewayZEVM, "Withdrawal") + .withArgs( + ethers.utils.getAddress(senderZEVM.address), + receiverEVM.address.toLowerCase(), + parseEther("1"), + 0, + await ZRC20Contract.PROTOCOL_FLAT_FEE(), + expectedMessage + ); + + const callEvent = callTxReceipt.events.filter((e) => e.event == "Withdrawal")[0]; + const callMessage = callEvent.args[5]; + + // Call execute on evm + const executeTx = await gatewayEVM.execute(receiverEVM.address, callMessage, { value: value }); + + // Listen for the event + await expect(executeTx).to.emit(gatewayEVM, "Executed").withArgs(receiverEVM.address, value, callMessage); + await expect(executeTx).to.emit(receiverEVM, "ReceivedA").withArgs(gatewayEVM.address, value, str, num, flag); + + const balanceOfAfterWithdrawal = await ZRC20Contract.balanceOf(senderZEVM.address); + expect(balanceOfAfterWithdrawal).to.equal(parseEther("99")); + }); +}); diff --git a/test/prototypes/GatewayZEVM.spec.ts b/test/prototypes/GatewayZEVM.spec.ts new file mode 100644 index 00000000..92b35275 --- /dev/null +++ b/test/prototypes/GatewayZEVM.spec.ts @@ -0,0 +1,114 @@ +import { AddressZero } from "@ethersproject/constants"; +import { SignerWithAddress } from "@nomiclabs/hardhat-ethers/signers"; +import { SystemContract, ZRC20 } from "@typechain-types"; +import { expect } from "chai"; +import { BigNumber, Contract } from "ethers"; +import { parseEther } from "ethers/lib/utils"; +import { ethers, upgrades } from "hardhat"; + +import { FUNGIBLE_MODULE_ADDRESS } from "../test.helpers"; +const hre = require("hardhat"); + +describe("GatewayZEVM inbound", function () { + let ZRC20Contract: ZRC20; + let systemContract: SystemContract; + let gateway: Contract; + let owner: SignerWithAddress; + let addrs: SignerWithAddress[]; + + beforeEach(async () => { + [owner, ...addrs] = 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()]); + + const SystemContractFactory = await ethers.getContractFactory("SystemContractMock"); + systemContract = (await SystemContractFactory.deploy(AddressZero, AddressZero, AddressZero)) as SystemContract; + + const ZRC20Factory = await ethers.getContractFactory("ZRC20"); + ZRC20Contract = (await ZRC20Factory.connect(fungibleModuleSigner).deploy( + "TOKEN", + "TKN", + 18, + 1, + 1, + 0, + systemContract.address + )) as ZRC20; + + await systemContract.setGasCoinZRC20(1, ZRC20Contract.address); + await systemContract.setGasPrice(1, ZRC20Contract.address); + + await ZRC20Contract.connect(fungibleModuleSigner).deposit(owner.address, parseEther("100")); + + const Gateway = await ethers.getContractFactory("GatewayZEVM"); + gateway = await upgrades.deployProxy(Gateway, [], { + initializer: "initialize", + kind: "uups", + }); + + await ZRC20Contract.connect(owner).approve(gateway.address, parseEther("100")); + }); + + it("should withdraw zrc20 and emit event", async function () { + const tx = await gateway + .connect(owner) + .withdraw(ethers.utils.arrayify(addrs[0].address), parseEther("1"), ZRC20Contract.address); + + const balanceOfAfterWithdrawal = (await ZRC20Contract.balanceOf(owner.address)) as BigNumber; + expect(balanceOfAfterWithdrawal).to.equal(parseEther("99")); + + await expect(tx) + .to.emit(gateway, "Withdrawal") + .withArgs( + ethers.utils.getAddress(owner.address), + addrs[0].address.toLowerCase(), + parseEther("1"), + 0, + await ZRC20Contract.PROTOCOL_FLAT_FEE(), + "0x" + ); + }); + + it("should withdraw zrc20 and call and emit event with message", async function () { + let ABI = ["function hello(address to)"]; + let iface = new ethers.utils.Interface(ABI); + const message = iface.encodeFunctionData("hello", ["0x1234567890123456789012345678901234567890"]); + + const tx = await gateway + .connect(owner) + .withdrawAndCall(ethers.utils.arrayify(addrs[0].address), parseEther("1"), ZRC20Contract.address, message); + + const balanceOfAfterWithdrawal = (await ZRC20Contract.balanceOf(owner.address)) as BigNumber; + expect(balanceOfAfterWithdrawal).to.equal(parseEther("99")); + + await expect(tx) + .to.emit(gateway, "Withdrawal") + .withArgs( + ethers.utils.getAddress(owner.address), + addrs[0].address.toLowerCase(), + parseEther("1"), + 0, + await ZRC20Contract.PROTOCOL_FLAT_FEE(), + message + ); + }); + + it("should call and emit event without asset transfer", async function () { + let ABI = ["function hello(address to)"]; + let iface = new ethers.utils.Interface(ABI); + const message = iface.encodeFunctionData("hello", ["0x1234567890123456789012345678901234567890"]); + + const tx = await gateway.connect(owner).call(ethers.utils.arrayify(addrs[0].address), message); + await expect(tx) + .to.emit(gateway, "Call") + .withArgs(ethers.utils.getAddress(owner.address), addrs[0].address.toLowerCase(), message); + }); +}); diff --git a/typechain-types/contracts/prototypes/index.ts b/typechain-types/contracts/prototypes/index.ts index e5dd4614..9efb820b 100644 --- a/typechain-types/contracts/prototypes/index.ts +++ b/typechain-types/contracts/prototypes/index.ts @@ -3,3 +3,5 @@ /* eslint-disable */ import type * as evm from "./evm"; export type { evm }; +import type * as zevm from "./zevm"; +export type { zevm }; diff --git a/typechain-types/contracts/prototypes/zevm/GatewayZEVM.ts b/typechain-types/contracts/prototypes/zevm/GatewayZEVM.ts new file mode 100644 index 00000000..1b88a559 --- /dev/null +++ b/typechain-types/contracts/prototypes/zevm/GatewayZEVM.ts @@ -0,0 +1,583 @@ +/* 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 GatewayZEVMInterface extends utils.Interface { + functions: { + "FUNGIBLE_MODULE_ADDRESS()": FunctionFragment; + "call(bytes,bytes)": FunctionFragment; + "initialize()": FunctionFragment; + "owner()": FunctionFragment; + "proxiableUUID()": FunctionFragment; + "renounceOwnership()": FunctionFragment; + "transferOwnership(address)": FunctionFragment; + "upgradeTo(address)": FunctionFragment; + "upgradeToAndCall(address,bytes)": FunctionFragment; + "withdraw(bytes,uint256,address)": FunctionFragment; + "withdrawAndCall(bytes,uint256,address,bytes)": FunctionFragment; + }; + + getFunction( + nameOrSignatureOrTopic: + | "FUNGIBLE_MODULE_ADDRESS" + | "call" + | "initialize" + | "owner" + | "proxiableUUID" + | "renounceOwnership" + | "transferOwnership" + | "upgradeTo" + | "upgradeToAndCall" + | "withdraw" + | "withdrawAndCall" + ): FunctionFragment; + + encodeFunctionData( + functionFragment: "FUNGIBLE_MODULE_ADDRESS", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "call", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "initialize", + values?: undefined + ): string; + encodeFunctionData(functionFragment: "owner", values?: undefined): string; + encodeFunctionData( + functionFragment: "proxiableUUID", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "renounceOwnership", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "transferOwnership", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "upgradeTo", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "upgradeToAndCall", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "withdraw", + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ] + ): string; + encodeFunctionData( + functionFragment: "withdrawAndCall", + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ] + ): string; + + decodeFunctionResult( + functionFragment: "FUNGIBLE_MODULE_ADDRESS", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "call", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "initialize", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "owner", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "proxiableUUID", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "renounceOwnership", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "transferOwnership", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "upgradeTo", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "upgradeToAndCall", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "withdraw", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "withdrawAndCall", + data: BytesLike + ): Result; + + events: { + "AdminChanged(address,address)": EventFragment; + "BeaconUpgraded(address)": EventFragment; + "Call(address,bytes,bytes)": EventFragment; + "Initialized(uint8)": EventFragment; + "OwnershipTransferred(address,address)": EventFragment; + "Upgraded(address)": EventFragment; + "Withdrawal(address,bytes,uint256,uint256,uint256,bytes)": EventFragment; + }; + + getEvent(nameOrSignatureOrTopic: "AdminChanged"): EventFragment; + getEvent(nameOrSignatureOrTopic: "BeaconUpgraded"): EventFragment; + getEvent(nameOrSignatureOrTopic: "Call"): EventFragment; + getEvent(nameOrSignatureOrTopic: "Initialized"): EventFragment; + getEvent(nameOrSignatureOrTopic: "OwnershipTransferred"): EventFragment; + getEvent(nameOrSignatureOrTopic: "Upgraded"): EventFragment; + getEvent(nameOrSignatureOrTopic: "Withdrawal"): EventFragment; +} + +export interface AdminChangedEventObject { + previousAdmin: string; + newAdmin: string; +} +export type AdminChangedEvent = TypedEvent< + [string, string], + AdminChangedEventObject +>; + +export type AdminChangedEventFilter = TypedEventFilter; + +export interface BeaconUpgradedEventObject { + beacon: string; +} +export type BeaconUpgradedEvent = TypedEvent< + [string], + BeaconUpgradedEventObject +>; + +export type BeaconUpgradedEventFilter = TypedEventFilter; + +export interface CallEventObject { + sender: string; + receiver: string; + message: string; +} +export type CallEvent = TypedEvent<[string, string, string], CallEventObject>; + +export type CallEventFilter = TypedEventFilter; + +export interface InitializedEventObject { + version: number; +} +export type InitializedEvent = TypedEvent<[number], InitializedEventObject>; + +export type InitializedEventFilter = TypedEventFilter; + +export interface OwnershipTransferredEventObject { + previousOwner: string; + newOwner: string; +} +export type OwnershipTransferredEvent = TypedEvent< + [string, string], + OwnershipTransferredEventObject +>; + +export type OwnershipTransferredEventFilter = + TypedEventFilter; + +export interface UpgradedEventObject { + implementation: string; +} +export type UpgradedEvent = TypedEvent<[string], UpgradedEventObject>; + +export type UpgradedEventFilter = TypedEventFilter; + +export interface WithdrawalEventObject { + from: string; + to: string; + value: BigNumber; + gasfee: BigNumber; + protocolFlatFee: BigNumber; + message: string; +} +export type WithdrawalEvent = TypedEvent< + [string, string, BigNumber, BigNumber, BigNumber, string], + WithdrawalEventObject +>; + +export type WithdrawalEventFilter = TypedEventFilter; + +export interface GatewayZEVM extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + interface: GatewayZEVMInterface; + + 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: { + FUNGIBLE_MODULE_ADDRESS(overrides?: CallOverrides): Promise<[string]>; + + call( + receiver: PromiseOrValue, + message: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + initialize( + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + owner(overrides?: CallOverrides): Promise<[string]>; + + proxiableUUID(overrides?: CallOverrides): Promise<[string]>; + + renounceOwnership( + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + transferOwnership( + newOwner: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + upgradeTo( + newImplementation: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + upgradeToAndCall( + newImplementation: PromiseOrValue, + data: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + withdraw( + receiver: PromiseOrValue, + amount: PromiseOrValue, + zrc20: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + withdrawAndCall( + receiver: PromiseOrValue, + amount: PromiseOrValue, + zrc20: PromiseOrValue, + message: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + }; + + FUNGIBLE_MODULE_ADDRESS(overrides?: CallOverrides): Promise; + + call( + receiver: PromiseOrValue, + message: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + initialize( + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + owner(overrides?: CallOverrides): Promise; + + proxiableUUID(overrides?: CallOverrides): Promise; + + renounceOwnership( + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + transferOwnership( + newOwner: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + upgradeTo( + newImplementation: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + upgradeToAndCall( + newImplementation: PromiseOrValue, + data: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + withdraw( + receiver: PromiseOrValue, + amount: PromiseOrValue, + zrc20: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + withdrawAndCall( + receiver: PromiseOrValue, + amount: PromiseOrValue, + zrc20: PromiseOrValue, + message: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + callStatic: { + FUNGIBLE_MODULE_ADDRESS(overrides?: CallOverrides): Promise; + + call( + receiver: PromiseOrValue, + message: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + initialize(overrides?: CallOverrides): Promise; + + owner(overrides?: CallOverrides): Promise; + + proxiableUUID(overrides?: CallOverrides): Promise; + + renounceOwnership(overrides?: CallOverrides): Promise; + + transferOwnership( + newOwner: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + upgradeTo( + newImplementation: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + upgradeToAndCall( + newImplementation: PromiseOrValue, + data: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + withdraw( + receiver: PromiseOrValue, + amount: PromiseOrValue, + zrc20: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + withdrawAndCall( + receiver: PromiseOrValue, + amount: PromiseOrValue, + zrc20: PromiseOrValue, + message: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + }; + + filters: { + "AdminChanged(address,address)"( + previousAdmin?: null, + newAdmin?: null + ): AdminChangedEventFilter; + AdminChanged( + previousAdmin?: null, + newAdmin?: null + ): AdminChangedEventFilter; + + "BeaconUpgraded(address)"( + beacon?: PromiseOrValue | null + ): BeaconUpgradedEventFilter; + BeaconUpgraded( + beacon?: PromiseOrValue | null + ): BeaconUpgradedEventFilter; + + "Call(address,bytes,bytes)"( + sender?: PromiseOrValue | null, + receiver?: PromiseOrValue | null, + message?: null + ): CallEventFilter; + Call( + sender?: PromiseOrValue | null, + receiver?: PromiseOrValue | null, + message?: null + ): CallEventFilter; + + "Initialized(uint8)"(version?: null): InitializedEventFilter; + Initialized(version?: null): InitializedEventFilter; + + "OwnershipTransferred(address,address)"( + previousOwner?: PromiseOrValue | null, + newOwner?: PromiseOrValue | null + ): OwnershipTransferredEventFilter; + OwnershipTransferred( + previousOwner?: PromiseOrValue | null, + newOwner?: PromiseOrValue | null + ): OwnershipTransferredEventFilter; + + "Upgraded(address)"( + implementation?: PromiseOrValue | null + ): UpgradedEventFilter; + Upgraded( + implementation?: PromiseOrValue | null + ): UpgradedEventFilter; + + "Withdrawal(address,bytes,uint256,uint256,uint256,bytes)"( + from?: PromiseOrValue | null, + to?: null, + value?: null, + gasfee?: null, + protocolFlatFee?: null, + message?: null + ): WithdrawalEventFilter; + Withdrawal( + from?: PromiseOrValue | null, + to?: null, + value?: null, + gasfee?: null, + protocolFlatFee?: null, + message?: null + ): WithdrawalEventFilter; + }; + + estimateGas: { + FUNGIBLE_MODULE_ADDRESS(overrides?: CallOverrides): Promise; + + call( + receiver: PromiseOrValue, + message: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + initialize( + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + owner(overrides?: CallOverrides): Promise; + + proxiableUUID(overrides?: CallOverrides): Promise; + + renounceOwnership( + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + transferOwnership( + newOwner: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + upgradeTo( + newImplementation: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + upgradeToAndCall( + newImplementation: PromiseOrValue, + data: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + withdraw( + receiver: PromiseOrValue, + amount: PromiseOrValue, + zrc20: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + withdrawAndCall( + receiver: PromiseOrValue, + amount: PromiseOrValue, + zrc20: PromiseOrValue, + message: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + }; + + populateTransaction: { + FUNGIBLE_MODULE_ADDRESS( + overrides?: CallOverrides + ): Promise; + + call( + receiver: PromiseOrValue, + message: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + initialize( + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + owner(overrides?: CallOverrides): Promise; + + proxiableUUID(overrides?: CallOverrides): Promise; + + renounceOwnership( + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + transferOwnership( + newOwner: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + upgradeTo( + newImplementation: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + upgradeToAndCall( + newImplementation: PromiseOrValue, + data: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + withdraw( + receiver: PromiseOrValue, + amount: PromiseOrValue, + zrc20: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + withdrawAndCall( + receiver: PromiseOrValue, + amount: PromiseOrValue, + zrc20: PromiseOrValue, + message: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + }; +} diff --git a/typechain-types/contracts/prototypes/zevm/Sender.ts b/typechain-types/contracts/prototypes/zevm/Sender.ts new file mode 100644 index 00000000..35786b7c --- /dev/null +++ b/typechain-types/contracts/prototypes/zevm/Sender.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 SenderInterface 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 Sender extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + interface: SenderInterface; + + 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 new file mode 100644 index 00000000..ae132f5b --- /dev/null +++ b/typechain-types/contracts/prototypes/zevm/index.ts @@ -0,0 +1,7 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type * as interfacesSol from "./interfaces.sol"; +export type { interfacesSol }; +export type { GatewayZEVM } from "./GatewayZEVM"; +export type { Sender } from "./Sender"; diff --git a/typechain-types/contracts/prototypes/zevm/interfaces.sol/IGatewayZEVM.ts b/typechain-types/contracts/prototypes/zevm/interfaces.sol/IGatewayZEVM.ts new file mode 100644 index 00000000..c4041432 --- /dev/null +++ b/typechain-types/contracts/prototypes/zevm/interfaces.sol/IGatewayZEVM.ts @@ -0,0 +1,209 @@ +/* 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 IGatewayZEVMInterface extends utils.Interface { + functions: { + "call(bytes,bytes)": FunctionFragment; + "withdraw(bytes,uint256,address)": FunctionFragment; + "withdrawAndCall(bytes,uint256,address,bytes)": FunctionFragment; + }; + + getFunction( + nameOrSignatureOrTopic: "call" | "withdraw" | "withdrawAndCall" + ): FunctionFragment; + + encodeFunctionData( + functionFragment: "call", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "withdraw", + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ] + ): string; + encodeFunctionData( + functionFragment: "withdrawAndCall", + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ] + ): string; + + decodeFunctionResult(functionFragment: "call", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "withdraw", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "withdrawAndCall", + data: BytesLike + ): Result; + + events: {}; +} + +export interface IGatewayZEVM extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + interface: IGatewayZEVMInterface; + + 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: { + call( + receiver: PromiseOrValue, + message: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + withdraw( + receiver: PromiseOrValue, + amount: PromiseOrValue, + zrc20: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + withdrawAndCall( + receiver: PromiseOrValue, + amount: PromiseOrValue, + zrc20: PromiseOrValue, + message: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + }; + + call( + receiver: PromiseOrValue, + message: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + withdraw( + receiver: PromiseOrValue, + amount: PromiseOrValue, + zrc20: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + withdrawAndCall( + receiver: PromiseOrValue, + amount: PromiseOrValue, + zrc20: PromiseOrValue, + message: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + callStatic: { + call( + receiver: PromiseOrValue, + message: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + withdraw( + receiver: PromiseOrValue, + amount: PromiseOrValue, + zrc20: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + withdrawAndCall( + receiver: PromiseOrValue, + amount: PromiseOrValue, + zrc20: PromiseOrValue, + message: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + }; + + filters: {}; + + estimateGas: { + call( + receiver: PromiseOrValue, + message: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + withdraw( + receiver: PromiseOrValue, + amount: PromiseOrValue, + zrc20: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + withdrawAndCall( + receiver: PromiseOrValue, + amount: PromiseOrValue, + zrc20: PromiseOrValue, + message: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + }; + + populateTransaction: { + call( + receiver: PromiseOrValue, + message: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + withdraw( + receiver: PromiseOrValue, + amount: PromiseOrValue, + zrc20: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + withdrawAndCall( + receiver: PromiseOrValue, + amount: PromiseOrValue, + zrc20: PromiseOrValue, + message: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + }; +} diff --git a/typechain-types/contracts/prototypes/zevm/interfaces.sol/index.ts b/typechain-types/contracts/prototypes/zevm/interfaces.sol/index.ts new file mode 100644 index 00000000..43858d59 --- /dev/null +++ b/typechain-types/contracts/prototypes/zevm/interfaces.sol/index.ts @@ -0,0 +1,4 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +export type { IGatewayZEVM } from "./IGatewayZEVM"; diff --git a/typechain-types/contracts/zevm/interfaces/IZRC20.ts b/typechain-types/contracts/zevm/interfaces/IZRC20.ts index 78bc48f4..6052dafa 100644 --- a/typechain-types/contracts/zevm/interfaces/IZRC20.ts +++ b/typechain-types/contracts/zevm/interfaces/IZRC20.ts @@ -29,11 +29,11 @@ import type { export interface IZRC20Interface extends utils.Interface { functions: { - "PROTOCOL_FEE()": FunctionFragment; + "PROTOCOL_FLAT_FEE()": FunctionFragment; "allowance(address,address)": FunctionFragment; "approve(address,uint256)": FunctionFragment; "balanceOf(address)": FunctionFragment; - "burn(address,uint256)": FunctionFragment; + "burn(uint256)": FunctionFragment; "decreaseAllowance(address,uint256)": FunctionFragment; "deposit(address,uint256)": FunctionFragment; "increaseAllowance(address,uint256)": FunctionFragment; @@ -46,7 +46,7 @@ export interface IZRC20Interface extends utils.Interface { getFunction( nameOrSignatureOrTopic: - | "PROTOCOL_FEE" + | "PROTOCOL_FLAT_FEE" | "allowance" | "approve" | "balanceOf" @@ -62,7 +62,7 @@ export interface IZRC20Interface extends utils.Interface { ): FunctionFragment; encodeFunctionData( - functionFragment: "PROTOCOL_FEE", + functionFragment: "PROTOCOL_FLAT_FEE", values?: undefined ): string; encodeFunctionData( @@ -79,7 +79,7 @@ export interface IZRC20Interface extends utils.Interface { ): string; encodeFunctionData( functionFragment: "burn", - values: [PromiseOrValue, PromiseOrValue] + values: [PromiseOrValue] ): string; encodeFunctionData( functionFragment: "decreaseAllowance", @@ -119,7 +119,7 @@ export interface IZRC20Interface extends utils.Interface { ): string; decodeFunctionResult( - functionFragment: "PROTOCOL_FEE", + functionFragment: "PROTOCOL_FLAT_FEE", data: BytesLike ): Result; decodeFunctionResult(functionFragment: "allowance", data: BytesLike): Result; @@ -278,7 +278,7 @@ export interface IZRC20 extends BaseContract { removeListener: OnEvent; functions: { - PROTOCOL_FEE(overrides?: CallOverrides): Promise<[BigNumber]>; + PROTOCOL_FLAT_FEE(overrides?: CallOverrides): Promise<[BigNumber]>; allowance( owner: PromiseOrValue, @@ -298,7 +298,6 @@ export interface IZRC20 extends BaseContract { ): Promise<[BigNumber]>; burn( - account: PromiseOrValue, amount: PromiseOrValue, overrides?: Overrides & { from?: PromiseOrValue } ): Promise; @@ -345,7 +344,7 @@ export interface IZRC20 extends BaseContract { withdrawGasFee(overrides?: CallOverrides): Promise<[string, BigNumber]>; }; - PROTOCOL_FEE(overrides?: CallOverrides): Promise; + PROTOCOL_FLAT_FEE(overrides?: CallOverrides): Promise; allowance( owner: PromiseOrValue, @@ -365,7 +364,6 @@ export interface IZRC20 extends BaseContract { ): Promise; burn( - account: PromiseOrValue, amount: PromiseOrValue, overrides?: Overrides & { from?: PromiseOrValue } ): Promise; @@ -412,7 +410,7 @@ export interface IZRC20 extends BaseContract { withdrawGasFee(overrides?: CallOverrides): Promise<[string, BigNumber]>; callStatic: { - PROTOCOL_FEE(overrides?: CallOverrides): Promise; + PROTOCOL_FLAT_FEE(overrides?: CallOverrides): Promise; allowance( owner: PromiseOrValue, @@ -432,7 +430,6 @@ export interface IZRC20 extends BaseContract { ): Promise; burn( - account: PromiseOrValue, amount: PromiseOrValue, overrides?: CallOverrides ): Promise; @@ -547,7 +544,7 @@ export interface IZRC20 extends BaseContract { }; estimateGas: { - PROTOCOL_FEE(overrides?: CallOverrides): Promise; + PROTOCOL_FLAT_FEE(overrides?: CallOverrides): Promise; allowance( owner: PromiseOrValue, @@ -567,7 +564,6 @@ export interface IZRC20 extends BaseContract { ): Promise; burn( - account: PromiseOrValue, amount: PromiseOrValue, overrides?: Overrides & { from?: PromiseOrValue } ): Promise; @@ -615,7 +611,7 @@ export interface IZRC20 extends BaseContract { }; populateTransaction: { - PROTOCOL_FEE(overrides?: CallOverrides): Promise; + PROTOCOL_FLAT_FEE(overrides?: CallOverrides): Promise; allowance( owner: PromiseOrValue, @@ -635,7 +631,6 @@ export interface IZRC20 extends BaseContract { ): Promise; burn( - account: PromiseOrValue, amount: PromiseOrValue, overrides?: Overrides & { from?: PromiseOrValue } ): Promise; diff --git a/typechain-types/factories/contracts/prototypes/index.ts b/typechain-types/factories/contracts/prototypes/index.ts index 42f56458..33289123 100644 --- a/typechain-types/factories/contracts/prototypes/index.ts +++ b/typechain-types/factories/contracts/prototypes/index.ts @@ -2,3 +2,4 @@ /* tslint:disable */ /* eslint-disable */ export * as evm from "./evm"; +export * as zevm from "./zevm"; diff --git a/typechain-types/factories/contracts/prototypes/zevm/GatewayZEVM__factory.ts b/typechain-types/factories/contracts/prototypes/zevm/GatewayZEVM__factory.ts new file mode 100644 index 00000000..5a5efbed --- /dev/null +++ b/typechain-types/factories/contracts/prototypes/zevm/GatewayZEVM__factory.ts @@ -0,0 +1,394 @@ +/* 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 { + GatewayZEVM, + GatewayZEVMInterface, +} from "../../../../contracts/prototypes/zevm/GatewayZEVM"; + +const _abi = [ + { + inputs: [], + stateMutability: "nonpayable", + type: "constructor", + }, + { + inputs: [], + name: "GasFeeTransferFailed", + type: "error", + }, + { + inputs: [], + name: "InsufficientZRC20Amount", + type: "error", + }, + { + inputs: [], + name: "WithdrawalFailed", + 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: [], + 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", + }, +] as const; + +const _bytecode = + "0x60a06040523073ffffffffffffffffffffffffffffffffffffffff1660809073ffffffffffffffffffffffffffffffffffffffff1660601b8152503480156200004757600080fd5b50620000586200005e60201b60201c565b62000208565b600060019054906101000a900460ff1615620000b1576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401620000a8906200015c565b60405180910390fd5b60ff801660008054906101000a900460ff1660ff1614620001225760ff6000806101000a81548160ff021916908360ff1602179055507f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb384740249860ff6040516200011991906200017e565b60405180910390a15b565b6000620001336027836200019b565b91506200014082620001b9565b604082019050919050565b6200015681620001ac565b82525050565b60006020820190508181036000830152620001778162000124565b9050919050565b60006020820190506200019560008301846200014b565b92915050565b600082825260208201905092915050565b600060ff82169050919050565b7f496e697469616c697a61626c653a20636f6e747261637420697320696e69746960008201527f616c697a696e6700000000000000000000000000000000000000000000000000602082015250565b60805160601c612358620002436000396000818161038b0152818161041a0152818161052c015281816105bb015261066b01526123586000f3fe60806040526004361061009c5760003560e01c806352d1902d1161006457806352d1902d14610163578063715018a61461018e5780637993c1e0146101a55780638129fc1c146101ce5780638da5cb5b146101e5578063f2fde38b146102105761009c565b80630ac7c44c146100a1578063135390f9146100ca5780633659cfe6146100f35780633ce4a5bc1461011c5780634f1ef28614610147575b600080fd5b3480156100ad57600080fd5b506100c860048036038101906100c3919061161a565b610239565b005b3480156100d657600080fd5b506100f160048036038101906100ec9190611696565b6102a4565b005b3480156100ff57600080fd5b5061011a600480360381019061011591906114f7565b610389565b005b34801561012857600080fd5b50610131610512565b60405161013e9190611a9d565b60405180910390f35b610161600480360381019061015c9190611524565b61052a565b005b34801561016f57600080fd5b50610178610667565b6040516101859190611aef565b60405180910390f35b34801561019a57600080fd5b506101a3610720565b005b3480156101b157600080fd5b506101cc60048036038101906101c79190611705565b610734565b005b3480156101da57600080fd5b506101e361081f565b005b3480156101f157600080fd5b506101fa610965565b6040516102079190611a9d565b60405180910390f35b34801561021c57600080fd5b50610237600480360381019061023291906114f7565b61098f565b005b826040516102479190611a86565b60405180910390203373ffffffffffffffffffffffffffffffffffffffff167f2b5af078ce280d812dc2241658dc5435c93408020e5418eef55a2b536de51c0f8484604051610297929190611b0a565b60405180910390a3505050565b60006102b08383610a13565b90503373ffffffffffffffffffffffffffffffffffffffff167f1866ad2994816c79f4103e1eddacc7b085eb7c635205243a28940be69b01536d8585848673ffffffffffffffffffffffffffffffffffffffff16634d8943bb6040518163ffffffff1660e01b815260040160206040518083038186803b15801561033357600080fd5b505afa158015610347573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061036b91906117a9565b60405161037b9493929190611b91565b60405180910390a250505050565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163073ffffffffffffffffffffffffffffffffffffffff161415610418576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161040f90611c4d565b60405180910390fd5b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16610457610c99565b73ffffffffffffffffffffffffffffffffffffffff16146104ad576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016104a490611c6d565b60405180910390fd5b6104b681610cf0565b61050f81600067ffffffffffffffff8111156104d5576104d4611f25565b5b6040519080825280601f01601f1916602001820160405280156105075781602001600182028036833780820191505090505b506000610cfb565b50565b73735b14bb79463307aacbed86daf3322b1e6226ab81565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163073ffffffffffffffffffffffffffffffffffffffff1614156105b9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105b090611c4d565b60405180910390fd5b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166105f8610c99565b73ffffffffffffffffffffffffffffffffffffffff161461064e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161064590611c6d565b60405180910390fd5b61065782610cf0565b61066382826001610cfb565b5050565b60007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163073ffffffffffffffffffffffffffffffffffffffff16146106f7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106ee90611c8d565b60405180910390fd5b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc60001b905090565b610728610e78565b6107326000610ef6565b565b60006107408585610a13565b90503373ffffffffffffffffffffffffffffffffffffffff167f1866ad2994816c79f4103e1eddacc7b085eb7c635205243a28940be69b01536d8787848873ffffffffffffffffffffffffffffffffffffffff16634d8943bb6040518163ffffffff1660e01b815260040160206040518083038186803b1580156107c357600080fd5b505afa1580156107d7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107fb91906117a9565b888860405161080f96959493929190611b2e565b60405180910390a2505050505050565b60008060019054906101000a900460ff161590508080156108505750600160008054906101000a900460ff1660ff16105b8061087d575061085f30610fbc565b15801561087c5750600160008054906101000a900460ff1660ff16145b5b6108bc576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016108b390611ccd565b60405180910390fd5b60016000806101000a81548160ff021916908360ff16021790555080156108f9576001600060016101000a81548160ff0219169083151502179055505b610901610fdf565b610909611038565b80156109625760008060016101000a81548160ff0219169083151502179055507f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb384740249860016040516109599190611bf0565b60405180910390a15b50565b6000603360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b610997610e78565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415610a07576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109fe90611c2d565b60405180910390fd5b610a1081610ef6565b50565b60008060008373ffffffffffffffffffffffffffffffffffffffff1663d9eeebed6040518163ffffffff1660e01b8152600401604080518083038186803b158015610a5d57600080fd5b505afa158015610a71573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a959190611580565b915091508173ffffffffffffffffffffffffffffffffffffffff166323b872dd3373735b14bb79463307aacbed86daf3322b1e6226ab846040518463ffffffff1660e01b8152600401610aea93929190611ab8565b602060405180830381600087803b158015610b0457600080fd5b505af1158015610b18573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b3c91906115c0565b610b72576040517f0a7cd6d600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8373ffffffffffffffffffffffffffffffffffffffff166323b872dd3330886040518463ffffffff1660e01b8152600401610baf93929190611ab8565b602060405180830381600087803b158015610bc957600080fd5b505af1158015610bdd573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c0191906115c0565b508373ffffffffffffffffffffffffffffffffffffffff166342966c68866040518263ffffffff1660e01b8152600401610c3b9190611d8d565b602060405180830381600087803b158015610c5557600080fd5b505af1158015610c69573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c8d91906115c0565b50809250505092915050565b6000610cc77f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc60001b611089565b60000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b610cf8610e78565b50565b610d277f4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd914360001b611093565b60000160009054906101000a900460ff1615610d4b57610d468361109d565b610e73565b8273ffffffffffffffffffffffffffffffffffffffff166352d1902d6040518163ffffffff1660e01b815260040160206040518083038186803b158015610d9157600080fd5b505afa925050508015610dc257506040513d601f19601f82011682018060405250810190610dbf91906115ed565b60015b610e01576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610df890611ced565b60405180910390fd5b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc60001b8114610e66576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e5d90611cad565b60405180910390fd5b50610e72838383611156565b5b505050565b610e80611182565b73ffffffffffffffffffffffffffffffffffffffff16610e9e610965565b73ffffffffffffffffffffffffffffffffffffffff1614610ef4576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610eeb90611d2d565b60405180910390fd5b565b6000603360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905081603360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b6000808273ffffffffffffffffffffffffffffffffffffffff163b119050919050565b600060019054906101000a900460ff1661102e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161102590611d6d565b60405180910390fd5b61103661118a565b565b600060019054906101000a900460ff16611087576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161107e90611d6d565b60405180910390fd5b565b6000819050919050565b6000819050919050565b6110a681610fbc565b6110e5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016110dc90611d0d565b60405180910390fd5b806111127f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc60001b611089565b60000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b61115f836111eb565b60008251118061116c5750805b1561117d5761117b838361123a565b505b505050565b600033905090565b600060019054906101000a900460ff166111d9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016111d090611d6d565b60405180910390fd5b6111e96111e4611182565b610ef6565b565b6111f48161109d565b8073ffffffffffffffffffffffffffffffffffffffff167fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b60405160405180910390a250565b606061125f83836040518060600160405280602781526020016122fc60279139611267565b905092915050565b60606000808573ffffffffffffffffffffffffffffffffffffffff16856040516112919190611a86565b600060405180830381855af49150503d80600081146112cc576040519150601f19603f3d011682016040523d82523d6000602084013e6112d1565b606091505b50915091506112e2868383876112ed565b925050509392505050565b60608315611350576000835114156113485761130885610fbc565b611347576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161133e90611d4d565b60405180910390fd5b5b82905061135b565b61135a8383611363565b5b949350505050565b6000825111156113765781518083602001fd5b806040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016113aa9190611c0b565b60405180910390fd5b60006113c66113c184611dcd565b611da8565b9050828152602081018484840111156113e2576113e1611f63565b5b6113ed848285611eb2565b509392505050565b6000813590506114048161229f565b92915050565b6000815190506114198161229f565b92915050565b60008151905061142e816122b6565b92915050565b600081519050611443816122cd565b92915050565b60008083601f84011261145f5761145e611f59565b5b8235905067ffffffffffffffff81111561147c5761147b611f54565b5b60208301915083600182028301111561149857611497611f5e565b5b9250929050565b600082601f8301126114b4576114b3611f59565b5b81356114c48482602086016113b3565b91505092915050565b6000813590506114dc816122e4565b92915050565b6000815190506114f1816122e4565b92915050565b60006020828403121561150d5761150c611f6d565b5b600061151b848285016113f5565b91505092915050565b6000806040838503121561153b5761153a611f6d565b5b6000611549858286016113f5565b925050602083013567ffffffffffffffff81111561156a57611569611f68565b5b6115768582860161149f565b9150509250929050565b6000806040838503121561159757611596611f6d565b5b60006115a58582860161140a565b92505060206115b6858286016114e2565b9150509250929050565b6000602082840312156115d6576115d5611f6d565b5b60006115e48482850161141f565b91505092915050565b60006020828403121561160357611602611f6d565b5b600061161184828501611434565b91505092915050565b60008060006040848603121561163357611632611f6d565b5b600084013567ffffffffffffffff81111561165157611650611f68565b5b61165d8682870161149f565b935050602084013567ffffffffffffffff81111561167e5761167d611f68565b5b61168a86828701611449565b92509250509250925092565b6000806000606084860312156116af576116ae611f6d565b5b600084013567ffffffffffffffff8111156116cd576116cc611f68565b5b6116d98682870161149f565b93505060206116ea868287016114cd565b92505060406116fb868287016113f5565b9150509250925092565b60008060008060006080868803121561172157611720611f6d565b5b600086013567ffffffffffffffff81111561173f5761173e611f68565b5b61174b8882890161149f565b955050602061175c888289016114cd565b945050604061176d888289016113f5565b935050606086013567ffffffffffffffff81111561178e5761178d611f68565b5b61179a88828901611449565b92509250509295509295909350565b6000602082840312156117bf576117be611f6d565b5b60006117cd848285016114e2565b91505092915050565b6117df81611e41565b82525050565b6117ee81611e5f565b82525050565b60006118008385611e14565b935061180d838584611eb2565b61181683611f72565b840190509392505050565b600061182c82611dfe565b6118368185611e14565b9350611846818560208601611ec1565b61184f81611f72565b840191505092915050565b600061186582611dfe565b61186f8185611e25565b935061187f818560208601611ec1565b80840191505092915050565b61189481611ea0565b82525050565b60006118a582611e09565b6118af8185611e30565b93506118bf818560208601611ec1565b6118c881611f72565b840191505092915050565b60006118e0602683611e30565b91506118eb82611f83565b604082019050919050565b6000611903602c83611e30565b915061190e82611fd2565b604082019050919050565b6000611926602c83611e30565b915061193182612021565b604082019050919050565b6000611949603883611e30565b915061195482612070565b604082019050919050565b600061196c602983611e30565b9150611977826120bf565b604082019050919050565b600061198f602e83611e30565b915061199a8261210e565b604082019050919050565b60006119b2602e83611e30565b91506119bd8261215d565b604082019050919050565b60006119d5602d83611e30565b91506119e0826121ac565b604082019050919050565b60006119f8602083611e30565b9150611a03826121fb565b602082019050919050565b6000611a1b600083611e14565b9150611a2682612224565b600082019050919050565b6000611a3e601d83611e30565b9150611a4982612227565b602082019050919050565b6000611a61602b83611e30565b9150611a6c82612250565b604082019050919050565b611a8081611e89565b82525050565b6000611a92828461185a565b915081905092915050565b6000602082019050611ab260008301846117d6565b92915050565b6000606082019050611acd60008301866117d6565b611ada60208301856117d6565b611ae76040830184611a77565b949350505050565b6000602082019050611b0460008301846117e5565b92915050565b60006020820190508181036000830152611b258184866117f4565b90509392505050565b600060a0820190508181036000830152611b488189611821565b9050611b576020830188611a77565b611b646040830187611a77565b611b716060830186611a77565b8181036080830152611b848184866117f4565b9050979650505050505050565b600060a0820190508181036000830152611bab8187611821565b9050611bba6020830186611a77565b611bc76040830185611a77565b611bd46060830184611a77565b8181036080830152611be581611a0e565b905095945050505050565b6000602082019050611c05600083018461188b565b92915050565b60006020820190508181036000830152611c25818461189a565b905092915050565b60006020820190508181036000830152611c46816118d3565b9050919050565b60006020820190508181036000830152611c66816118f6565b9050919050565b60006020820190508181036000830152611c8681611919565b9050919050565b60006020820190508181036000830152611ca68161193c565b9050919050565b60006020820190508181036000830152611cc68161195f565b9050919050565b60006020820190508181036000830152611ce681611982565b9050919050565b60006020820190508181036000830152611d06816119a5565b9050919050565b60006020820190508181036000830152611d26816119c8565b9050919050565b60006020820190508181036000830152611d46816119eb565b9050919050565b60006020820190508181036000830152611d6681611a31565b9050919050565b60006020820190508181036000830152611d8681611a54565b9050919050565b6000602082019050611da26000830184611a77565b92915050565b6000611db2611dc3565b9050611dbe8282611ef4565b919050565b6000604051905090565b600067ffffffffffffffff821115611de857611de7611f25565b5b611df182611f72565b9050602081019050919050565b600081519050919050565b600081519050919050565b600082825260208201905092915050565b600081905092915050565b600082825260208201905092915050565b6000611e4c82611e69565b9050919050565b60008115159050919050565b6000819050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b6000611eab82611e93565b9050919050565b82818337600083830152505050565b60005b83811015611edf578082015181840152602081019050611ec4565b83811115611eee576000848401525b50505050565b611efd82611f72565b810181811067ffffffffffffffff82111715611f1c57611f1b611f25565b5b80604052505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b7f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060008201527f64656c656761746563616c6c0000000000000000000000000000000000000000602082015250565b7f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060008201527f6163746976652070726f78790000000000000000000000000000000000000000602082015250565b7f555550535570677261646561626c653a206d757374206e6f742062652063616c60008201527f6c6564207468726f7567682064656c656761746563616c6c0000000000000000602082015250565b7f45524331393637557067726164653a20756e737570706f727465642070726f7860008201527f6961626c65555549440000000000000000000000000000000000000000000000602082015250565b7f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160008201527f647920696e697469616c697a6564000000000000000000000000000000000000602082015250565b7f45524331393637557067726164653a206e657720696d706c656d656e7461746960008201527f6f6e206973206e6f742055555053000000000000000000000000000000000000602082015250565b7f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60008201527f6f74206120636f6e747261637400000000000000000000000000000000000000602082015250565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b50565b7f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000600082015250565b7f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960008201527f6e697469616c697a696e67000000000000000000000000000000000000000000602082015250565b6122a881611e41565b81146122b357600080fd5b50565b6122bf81611e53565b81146122ca57600080fd5b50565b6122d681611e5f565b81146122e157600080fd5b50565b6122ed81611e89565b81146122f857600080fd5b5056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a2646970667358221220a96ea75aa24da821773b60cdeb37abc9c0c82e869b0c543ddb8f552ae04b153164736f6c63430008070033"; + +type GatewayZEVMConstructorParams = + | [signer?: Signer] + | ConstructorParameters; + +const isSuperArgs = ( + xs: GatewayZEVMConstructorParams +): xs is ConstructorParameters => xs.length > 1; + +export class GatewayZEVM__factory extends ContractFactory { + constructor(...args: GatewayZEVMConstructorParams) { + 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): GatewayZEVM { + return super.attach(address) as GatewayZEVM; + } + override connect(signer: Signer): GatewayZEVM__factory { + return super.connect(signer) as GatewayZEVM__factory; + } + + static readonly bytecode = _bytecode; + static readonly abi = _abi; + static createInterface(): GatewayZEVMInterface { + return new utils.Interface(_abi) as GatewayZEVMInterface; + } + static connect( + address: string, + signerOrProvider: Signer | Provider + ): GatewayZEVM { + return new Contract(address, _abi, signerOrProvider) as GatewayZEVM; + } +} diff --git a/typechain-types/factories/contracts/prototypes/zevm/Sender__factory.ts b/typechain-types/factories/contracts/prototypes/zevm/Sender__factory.ts new file mode 100644 index 00000000..603503d6 --- /dev/null +++ b/typechain-types/factories/contracts/prototypes/zevm/Sender__factory.ts @@ -0,0 +1,152 @@ +/* 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 { + Sender, + SenderInterface, +} from "../../../../contracts/prototypes/zevm/Sender"; + +const _abi = [ + { + inputs: [ + { + internalType: "address", + name: "_gateway", + type: "address", + }, + ], + stateMutability: "nonpayable", + type: "constructor", + }, + { + 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 = + "0x608060405234801561001057600080fd5b50604051610b98380380610b988339818101604052810190610032919061008d565b806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050610108565b600081519050610087816100f1565b92915050565b6000602082840312156100a3576100a26100ec565b5b60006100b184828501610078565b91505092915050565b60006100c5826100cc565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600080fd5b6100fa816100ba565b811461010557600080fd5b50565b610a81806101176000396000f3fe608060405234801561001057600080fd5b50600436106100415760003560e01c80630abd890514610046578063116191b614610062578063a0a1730b14610080575b600080fd5b610060600480360381019061005b91906105c8565b61009c565b005b61006a61027a565b604051610077919061072c565b60405180910390f35b61009a60048036038101906100959190610529565b61029e565b005b60008383836040516024016100b3939291906107fa565b6040516020818303038152906040527f6fa220ad000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff838183161783525050505090508473ffffffffffffffffffffffffffffffffffffffff1663095ea7b360008054906101000a900473ffffffffffffffffffffffffffffffffffffffff16886040518363ffffffff1660e01b815260040161018d929190610747565b602060405180830381600087803b1580156101a757600080fd5b505af11580156101bb573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101df91906104fc565b5060008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16637993c1e0888888856040518563ffffffff1660e01b815260040161023f94939291906107a7565b600060405180830381600087803b15801561025957600080fd5b505af115801561026d573d6000803e3d6000fd5b5050505050505050505050565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008383836040516024016102b5939291906107fa565b6040516020818303038152906040527f6fa220ad000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050905060008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16630ac7c44c86836040518363ffffffff1660e01b815260040161038f929190610770565b600060405180830381600087803b1580156103a957600080fd5b505af11580156103bd573d6000803e3d6000fd5b505050505050505050565b60006103db6103d68461085d565b610838565b9050828152602081018484840111156103f7576103f66109e6565b5b61040284828561093f565b509392505050565b600061041d6104188461088e565b610838565b905082815260208101848484011115610439576104386109e6565b5b61044484828561093f565b509392505050565b60008135905061045b81610a06565b92915050565b60008135905061047081610a1d565b92915050565b60008151905061048581610a1d565b92915050565b600082601f8301126104a05761049f6109e1565b5b81356104b08482602086016103c8565b91505092915050565b600082601f8301126104ce576104cd6109e1565b5b81356104de84826020860161040a565b91505092915050565b6000813590506104f681610a34565b92915050565b600060208284031215610512576105116109f0565b5b600061052084828501610476565b91505092915050565b60008060008060808587031215610543576105426109f0565b5b600085013567ffffffffffffffff811115610561576105606109eb565b5b61056d8782880161048b565b945050602085013567ffffffffffffffff81111561058e5761058d6109eb565b5b61059a878288016104b9565b93505060406105ab878288016104e7565b92505060606105bc87828801610461565b91505092959194509250565b60008060008060008060c087890312156105e5576105e46109f0565b5b600087013567ffffffffffffffff811115610603576106026109eb565b5b61060f89828a0161048b565b965050602061062089828a016104e7565b955050604061063189828a0161044c565b945050606087013567ffffffffffffffff811115610652576106516109eb565b5b61065e89828a016104b9565b935050608061066f89828a016104e7565b92505060a061068089828a01610461565b9150509295509295509295565b610696816108f7565b82525050565b6106a581610909565b82525050565b60006106b6826108bf565b6106c081856108d5565b93506106d081856020860161094e565b6106d9816109f5565b840191505092915050565b60006106ef826108ca565b6106f981856108e6565b935061070981856020860161094e565b610712816109f5565b840191505092915050565b61072681610935565b82525050565b6000602082019050610741600083018461068d565b92915050565b600060408201905061075c600083018561068d565b610769602083018461071d565b9392505050565b6000604082019050818103600083015261078a81856106ab565b9050818103602083015261079e81846106ab565b90509392505050565b600060808201905081810360008301526107c181876106ab565b90506107d0602083018661071d565b6107dd604083018561068d565b81810360608301526107ef81846106ab565b905095945050505050565b6000606082019050818103600083015261081481866106e4565b9050610823602083018561071d565b610830604083018461069c565b949350505050565b6000610842610853565b905061084e8282610981565b919050565b6000604051905090565b600067ffffffffffffffff821115610878576108776109b2565b5b610881826109f5565b9050602081019050919050565b600067ffffffffffffffff8211156108a9576108a86109b2565b5b6108b2826109f5565b9050602081019050919050565b600081519050919050565b600081519050919050565b600082825260208201905092915050565b600082825260208201905092915050565b600061090282610915565b9050919050565b60008115159050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b82818337600083830152505050565b60005b8381101561096c578082015181840152602081019050610951565b8381111561097b576000848401525b50505050565b61098a826109f5565b810181811067ffffffffffffffff821117156109a9576109a86109b2565b5b80604052505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b610a0f816108f7565b8114610a1a57600080fd5b50565b610a2681610909565b8114610a3157600080fd5b50565b610a3d81610935565b8114610a4857600080fd5b5056fea2646970667358221220f68ac344070d69f2a3c87661d69a54d722816815e944d87572f521c8faceff8464736f6c63430008070033"; + +type SenderConstructorParams = + | [signer?: Signer] + | ConstructorParameters; + +const isSuperArgs = ( + xs: SenderConstructorParams +): xs is ConstructorParameters => xs.length > 1; + +export class Sender__factory extends ContractFactory { + constructor(...args: SenderConstructorParams) { + 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): Sender { + return super.attach(address) as Sender; + } + override connect(signer: Signer): Sender__factory { + return super.connect(signer) as Sender__factory; + } + + static readonly bytecode = _bytecode; + static readonly abi = _abi; + static createInterface(): SenderInterface { + return new utils.Interface(_abi) as SenderInterface; + } + static connect(address: string, signerOrProvider: Signer | Provider): Sender { + return new Contract(address, _abi, signerOrProvider) as Sender; + } +} diff --git a/typechain-types/factories/contracts/prototypes/zevm/index.ts b/typechain-types/factories/contracts/prototypes/zevm/index.ts new file mode 100644 index 00000000..d04ef17c --- /dev/null +++ b/typechain-types/factories/contracts/prototypes/zevm/index.ts @@ -0,0 +1,6 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +export * as interfacesSol from "./interfaces.sol"; +export { GatewayZEVM__factory } from "./GatewayZEVM__factory"; +export { Sender__factory } from "./Sender__factory"; diff --git a/typechain-types/factories/contracts/prototypes/zevm/interfaces.sol/IGatewayZEVM__factory.ts b/typechain-types/factories/contracts/prototypes/zevm/interfaces.sol/IGatewayZEVM__factory.ts new file mode 100644 index 00000000..7d6206b4 --- /dev/null +++ b/typechain-types/factories/contracts/prototypes/zevm/interfaces.sol/IGatewayZEVM__factory.ts @@ -0,0 +1,95 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { Contract, Signer, utils } from "ethers"; +import type { Provider } from "@ethersproject/providers"; +import type { + IGatewayZEVM, + IGatewayZEVMInterface, +} from "../../../../../contracts/prototypes/zevm/interfaces.sol/IGatewayZEVM"; + +const _abi = [ + { + inputs: [ + { + internalType: "bytes", + name: "receiver", + type: "bytes", + }, + { + internalType: "bytes", + name: "message", + type: "bytes", + }, + ], + name: "call", + outputs: [], + stateMutability: "nonpayable", + 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", + }, +] as const; + +export class IGatewayZEVM__factory { + static readonly abi = _abi; + static createInterface(): IGatewayZEVMInterface { + return new utils.Interface(_abi) as IGatewayZEVMInterface; + } + static connect( + address: string, + signerOrProvider: Signer | Provider + ): IGatewayZEVM { + return new Contract(address, _abi, signerOrProvider) as IGatewayZEVM; + } +} diff --git a/typechain-types/factories/contracts/prototypes/zevm/interfaces.sol/index.ts b/typechain-types/factories/contracts/prototypes/zevm/interfaces.sol/index.ts new file mode 100644 index 00000000..6c9d09b5 --- /dev/null +++ b/typechain-types/factories/contracts/prototypes/zevm/interfaces.sol/index.ts @@ -0,0 +1,4 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +export { IGatewayZEVM__factory } from "./IGatewayZEVM__factory"; diff --git a/typechain-types/factories/contracts/zevm/SystemContract.sol/SystemContract__factory.ts b/typechain-types/factories/contracts/zevm/SystemContract.sol/SystemContract__factory.ts index c6481503..a25f7578 100644 --- a/typechain-types/factories/contracts/zevm/SystemContract.sol/SystemContract__factory.ts +++ b/typechain-types/factories/contracts/zevm/SystemContract.sol/SystemContract__factory.ts @@ -429,7 +429,7 @@ const _abi = [ ] as const; const _bytecode = - "0x60c06040523480156200001157600080fd5b50604051620018aa380380620018aa8339818101604052810190620000379190620001ac565b73735b14bb79463307aacbed86daf3322b1e6226ab73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614620000b1576040517f2b2add3d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b82600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff1660808173ffffffffffffffffffffffffffffffffffffffff1660601b815250508073ffffffffffffffffffffffffffffffffffffffff1660a08173ffffffffffffffffffffffffffffffffffffffff1660601b815250507f80699e81136d69cb8367ad52a994e25c722a86da654b561d0c14b61a777e7ac560405160405180910390a15050506200025b565b600081519050620001a68162000241565b92915050565b600080600060608486031215620001c857620001c76200023c565b5b6000620001d88682870162000195565b9350506020620001eb8682870162000195565b9250506040620001fe8682870162000195565b9150509250925092565b600062000215826200021c565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600080fd5b6200024c8162000208565b81146200025857600080fd5b50565b60805160601c60a05160601c61161c6200028e600039600061051b0152600081816105bd0152610bc5015261161c6000f3fe608060405234801561001057600080fd5b50600436106100f55760003560e01c806397770dff11610097578063c63585cc11610066578063c63585cc1461025e578063d7fd7afb1461028e578063d936a012146102be578063ee2815ba146102dc576100f5565b806397770dff146101ec578063a7cb050714610208578063c39aca3714610224578063c62178ac14610240576100f5565b8063513a9c05116100d3578063513a9c0514610164578063569541b914610194578063842da36d146101b257806391dd645f146101d0576100f5565b80630be15547146100fa5780631f0e251b1461012a5780633ce4a5bc14610146575b600080fd5b610114600480360381019061010f9190611022565b6102f8565b60405161012191906112b1565b60405180910390f35b610144600480360381019061013f9190610ebf565b61032b565b005b61014e6104a8565b60405161015b91906112b1565b60405180910390f35b61017e60048036038101906101799190611022565b6104c0565b60405161018b91906112b1565b60405180910390f35b61019c6104f3565b6040516101a991906112b1565b60405180910390f35b6101ba610519565b6040516101c791906112b1565b60405180910390f35b6101ea60048036038101906101e5919061104f565b61053d565b005b61020660048036038101906102019190610ebf565b610697565b005b610222600480360381019061021d919061108f565b610814565b005b61023e60048036038101906102399190610f6c565b6108e1565b005b610248610b13565b60405161025591906112b1565b60405180910390f35b61027860048036038101906102739190610eec565b610b39565b60405161028591906112b1565b60405180910390f35b6102a860048036038101906102a39190611022565b610bab565b6040516102b5919061134a565b60405180910390f35b6102c6610bc3565b6040516102d391906112b1565b60405180910390f35b6102f660048036038101906102f1919061104f565b610be7565b005b60016020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b73735b14bb79463307aacbed86daf3322b1e6226ab73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146103a4576040517f2b2add3d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141561040b576040517fd92e233d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055507f3ade88e3922d64780e1bf4460d364c2970b69da813f9c0c07a1c187b5647636c600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1660405161049d91906112b1565b60405180910390a150565b73735b14bb79463307aacbed86daf3322b1e6226ab81565b60026020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b7f000000000000000000000000000000000000000000000000000000000000000081565b73735b14bb79463307aacbed86daf3322b1e6226ab73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146105b6576040517f2b2add3d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60006106057f0000000000000000000000000000000000000000000000000000000000000000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1684610b39565b9050806002600085815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055507f0ecec485166da6139b13bb7e033e9446e2d35348e80ebf1180d4afe2dba1704e838260405161068a929190611365565b60405180910390a1505050565b73735b14bb79463307aacbed86daf3322b1e6226ab73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610710576040517f2b2add3d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415610777576040517fd92e233d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055507fdba79d534382d1a8ae108e4c8ecb27c6ae42ab8b91d44eedf88bd329f3868d5e600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1660405161080991906112b1565b60405180910390a150565b73735b14bb79463307aacbed86daf3322b1e6226ab73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461088d576040517f2b2add3d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80600080848152602001908152602001600020819055507f49f492222906ac486c3c1401fa545626df1f0c0e5a77a05597ea2ed66af9850d82826040516108d592919061138e565b60405180910390a15050565b73735b14bb79463307aacbed86daf3322b1e6226ab73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461095a576040517f2b2add3d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73735b14bb79463307aacbed86daf3322b1e6226ab73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614806109d357503073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16145b15610a0a576040517f82d5d76a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8473ffffffffffffffffffffffffffffffffffffffff166347e7ef2484866040518363ffffffff1660e01b8152600401610a459291906112cc565b602060405180830381600087803b158015610a5f57600080fd5b505af1158015610a73573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a979190610f3f565b508273ffffffffffffffffffffffffffffffffffffffff1663de43156e87878786866040518663ffffffff1660e01b8152600401610ad99594939291906112f5565b600060405180830381600087803b158015610af357600080fd5b505af1158015610b07573d6000803e3d6000fd5b50505050505050505050565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000806000610b488585610cef565b91509150858282604051602001610b60929190611243565b60405160208183030381529060405280519060200120604051602001610b8792919061126f565b6040516020818303038152906040528051906020012060001c925050509392505050565b60006020528060005260406000206000915090505481565b7f000000000000000000000000000000000000000000000000000000000000000081565b73735b14bb79463307aacbed86daf3322b1e6226ab73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610c60576040517f2b2add3d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b806001600084815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055507fd1b36d30f6248e97c473b4d1348ca164a4ef6759022f54a58ec200326c39c45d8282604051610ce3929190611365565b60405180910390a15050565b6000808273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff161415610d58576040517fcb1e7cfe00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1610610d92578284610d95565b83835b8092508193505050600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610e04576040517f78b507da00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b9250929050565b600081359050610e1a816115a1565b92915050565b600081519050610e2f816115b8565b92915050565b60008083601f840112610e4b57610e4a61150e565b5b8235905067ffffffffffffffff811115610e6857610e67611509565b5b602083019150836001820283011115610e8457610e8361151d565b5b9250929050565b600060608284031215610ea157610ea0611513565b5b81905092915050565b600081359050610eb9816115cf565b92915050565b600060208284031215610ed557610ed461152c565b5b6000610ee384828501610e0b565b91505092915050565b600080600060608486031215610f0557610f0461152c565b5b6000610f1386828701610e0b565b9350506020610f2486828701610e0b565b9250506040610f3586828701610e0b565b9150509250925092565b600060208284031215610f5557610f5461152c565b5b6000610f6384828501610e20565b91505092915050565b60008060008060008060a08789031215610f8957610f8861152c565b5b600087013567ffffffffffffffff811115610fa757610fa6611522565b5b610fb389828a01610e8b565b9650506020610fc489828a01610e0b565b9550506040610fd589828a01610eaa565b9450506060610fe689828a01610e0b565b935050608087013567ffffffffffffffff81111561100757611006611522565b5b61101389828a01610e35565b92509250509295509295509295565b6000602082840312156110385761103761152c565b5b600061104684828501610eaa565b91505092915050565b600080604083850312156110665761106561152c565b5b600061107485828601610eaa565b925050602061108585828601610e0b565b9150509250929050565b600080604083850312156110a6576110a561152c565b5b60006110b485828601610eaa565b92505060206110c585828601610eaa565b9150509250929050565b6110d881611475565b82525050565b6110e781611475565b82525050565b6110fe6110f982611475565b6114d6565b82525050565b61111561111082611493565b6114e8565b82525050565b600061112783856113b7565b93506111348385846114c7565b61113d83611531565b840190509392505050565b600061115483856113c8565b93506111618385846114c7565b61116a83611531565b840190509392505050565b60006111826020836113d9565b915061118d8261154f565b602082019050919050565b60006111a56001836113d9565b91506111b082611578565b600182019050919050565b6000606083016111ce60008401846113fb565b85830360008701526111e183828461111b565b925050506111f260208401846113e4565b6111ff60208601826110cf565b5061120d604084018461145e565b61121a6040860182611225565b508091505092915050565b61122e816114bd565b82525050565b61123d816114bd565b82525050565b600061124f82856110ed565b60148201915061125f82846110ed565b6014820191508190509392505050565b600061127a82611198565b915061128682856110ed565b6014820191506112968284611104565b6020820191506112a582611175565b91508190509392505050565b60006020820190506112c660008301846110de565b92915050565b60006040820190506112e160008301856110de565b6112ee6020830184611234565b9392505050565b6000608082019050818103600083015261130f81886111bb565b905061131e60208301876110de565b61132b6040830186611234565b818103606083015261133e818486611148565b90509695505050505050565b600060208201905061135f6000830184611234565b92915050565b600060408201905061137a6000830185611234565b61138760208301846110de565b9392505050565b60006040820190506113a36000830185611234565b6113b06020830184611234565b9392505050565b600082825260208201905092915050565b600082825260208201905092915050565b600081905092915050565b60006113f36020840184610e0b565b905092915050565b6000808335600160200384360303811261141857611417611527565b5b83810192508235915060208301925067ffffffffffffffff8211156114405761143f611504565b5b60018202360384131561145657611455611518565b5b509250929050565b600061146d6020840184610eaa565b905092915050565b60006114808261149d565b9050919050565b60008115159050919050565b6000819050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b82818337600083830152505050565b60006114e1826114f2565b9050919050565b6000819050919050565b60006114fd82611542565b9050919050565b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b60008160601b9050919050565b7f96e8ac4277198ff8b6f785478aa9a39f403cb768dd02cbee326c3e7da348845f600082015250565b7fff00000000000000000000000000000000000000000000000000000000000000600082015250565b6115aa81611475565b81146115b557600080fd5b50565b6115c181611487565b81146115cc57600080fd5b50565b6115d8816114bd565b81146115e357600080fd5b5056fea2646970667358221220d4153f74dccdcf8c4e404c06ec70932b2acc46ffc5784c13399fb6b547739b2064736f6c63430008070033"; + "0x60c06040523480156200001157600080fd5b50604051620018aa380380620018aa8339818101604052810190620000379190620001ac565b73735b14bb79463307aacbed86daf3322b1e6226ab73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614620000b1576040517f2b2add3d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b82600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff1660808173ffffffffffffffffffffffffffffffffffffffff1660601b815250508073ffffffffffffffffffffffffffffffffffffffff1660a08173ffffffffffffffffffffffffffffffffffffffff1660601b815250507f80699e81136d69cb8367ad52a994e25c722a86da654b561d0c14b61a777e7ac560405160405180910390a15050506200025b565b600081519050620001a68162000241565b92915050565b600080600060608486031215620001c857620001c76200023c565b5b6000620001d88682870162000195565b9350506020620001eb8682870162000195565b9250506040620001fe8682870162000195565b9150509250925092565b600062000215826200021c565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600080fd5b6200024c8162000208565b81146200025857600080fd5b50565b60805160601c60a05160601c61161c6200028e600039600061051b0152600081816105bd0152610bc5015261161c6000f3fe608060405234801561001057600080fd5b50600436106100f55760003560e01c806397770dff11610097578063c63585cc11610066578063c63585cc1461025e578063d7fd7afb1461028e578063d936a012146102be578063ee2815ba146102dc576100f5565b806397770dff146101ec578063a7cb050714610208578063c39aca3714610224578063c62178ac14610240576100f5565b8063513a9c05116100d3578063513a9c0514610164578063569541b914610194578063842da36d146101b257806391dd645f146101d0576100f5565b80630be15547146100fa5780631f0e251b1461012a5780633ce4a5bc14610146575b600080fd5b610114600480360381019061010f9190611022565b6102f8565b60405161012191906112b1565b60405180910390f35b610144600480360381019061013f9190610ebf565b61032b565b005b61014e6104a8565b60405161015b91906112b1565b60405180910390f35b61017e60048036038101906101799190611022565b6104c0565b60405161018b91906112b1565b60405180910390f35b61019c6104f3565b6040516101a991906112b1565b60405180910390f35b6101ba610519565b6040516101c791906112b1565b60405180910390f35b6101ea60048036038101906101e5919061104f565b61053d565b005b61020660048036038101906102019190610ebf565b610697565b005b610222600480360381019061021d919061108f565b610814565b005b61023e60048036038101906102399190610f6c565b6108e1565b005b610248610b13565b60405161025591906112b1565b60405180910390f35b61027860048036038101906102739190610eec565b610b39565b60405161028591906112b1565b60405180910390f35b6102a860048036038101906102a39190611022565b610bab565b6040516102b5919061134a565b60405180910390f35b6102c6610bc3565b6040516102d391906112b1565b60405180910390f35b6102f660048036038101906102f1919061104f565b610be7565b005b60016020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b73735b14bb79463307aacbed86daf3322b1e6226ab73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146103a4576040517f2b2add3d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141561040b576040517fd92e233d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055507f3ade88e3922d64780e1bf4460d364c2970b69da813f9c0c07a1c187b5647636c600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1660405161049d91906112b1565b60405180910390a150565b73735b14bb79463307aacbed86daf3322b1e6226ab81565b60026020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b7f000000000000000000000000000000000000000000000000000000000000000081565b73735b14bb79463307aacbed86daf3322b1e6226ab73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146105b6576040517f2b2add3d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60006106057f0000000000000000000000000000000000000000000000000000000000000000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1684610b39565b9050806002600085815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055507f0ecec485166da6139b13bb7e033e9446e2d35348e80ebf1180d4afe2dba1704e838260405161068a929190611365565b60405180910390a1505050565b73735b14bb79463307aacbed86daf3322b1e6226ab73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610710576040517f2b2add3d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415610777576040517fd92e233d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055507fdba79d534382d1a8ae108e4c8ecb27c6ae42ab8b91d44eedf88bd329f3868d5e600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1660405161080991906112b1565b60405180910390a150565b73735b14bb79463307aacbed86daf3322b1e6226ab73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461088d576040517f2b2add3d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80600080848152602001908152602001600020819055507f49f492222906ac486c3c1401fa545626df1f0c0e5a77a05597ea2ed66af9850d82826040516108d592919061138e565b60405180910390a15050565b73735b14bb79463307aacbed86daf3322b1e6226ab73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461095a576040517f2b2add3d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73735b14bb79463307aacbed86daf3322b1e6226ab73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614806109d357503073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16145b15610a0a576040517f82d5d76a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8473ffffffffffffffffffffffffffffffffffffffff166347e7ef2484866040518363ffffffff1660e01b8152600401610a459291906112cc565b602060405180830381600087803b158015610a5f57600080fd5b505af1158015610a73573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a979190610f3f565b508273ffffffffffffffffffffffffffffffffffffffff1663de43156e87878786866040518663ffffffff1660e01b8152600401610ad99594939291906112f5565b600060405180830381600087803b158015610af357600080fd5b505af1158015610b07573d6000803e3d6000fd5b50505050505050505050565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000806000610b488585610cef565b91509150858282604051602001610b60929190611243565b60405160208183030381529060405280519060200120604051602001610b8792919061126f565b6040516020818303038152906040528051906020012060001c925050509392505050565b60006020528060005260406000206000915090505481565b7f000000000000000000000000000000000000000000000000000000000000000081565b73735b14bb79463307aacbed86daf3322b1e6226ab73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610c60576040517f2b2add3d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b806001600084815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055507fd1b36d30f6248e97c473b4d1348ca164a4ef6759022f54a58ec200326c39c45d8282604051610ce3929190611365565b60405180910390a15050565b6000808273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff161415610d58576040517fcb1e7cfe00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1610610d92578284610d95565b83835b8092508193505050600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610e04576040517f78b507da00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b9250929050565b600081359050610e1a816115a1565b92915050565b600081519050610e2f816115b8565b92915050565b60008083601f840112610e4b57610e4a61150e565b5b8235905067ffffffffffffffff811115610e6857610e67611509565b5b602083019150836001820283011115610e8457610e8361151d565b5b9250929050565b600060608284031215610ea157610ea0611513565b5b81905092915050565b600081359050610eb9816115cf565b92915050565b600060208284031215610ed557610ed461152c565b5b6000610ee384828501610e0b565b91505092915050565b600080600060608486031215610f0557610f0461152c565b5b6000610f1386828701610e0b565b9350506020610f2486828701610e0b565b9250506040610f3586828701610e0b565b9150509250925092565b600060208284031215610f5557610f5461152c565b5b6000610f6384828501610e20565b91505092915050565b60008060008060008060a08789031215610f8957610f8861152c565b5b600087013567ffffffffffffffff811115610fa757610fa6611522565b5b610fb389828a01610e8b565b9650506020610fc489828a01610e0b565b9550506040610fd589828a01610eaa565b9450506060610fe689828a01610e0b565b935050608087013567ffffffffffffffff81111561100757611006611522565b5b61101389828a01610e35565b92509250509295509295509295565b6000602082840312156110385761103761152c565b5b600061104684828501610eaa565b91505092915050565b600080604083850312156110665761106561152c565b5b600061107485828601610eaa565b925050602061108585828601610e0b565b9150509250929050565b600080604083850312156110a6576110a561152c565b5b60006110b485828601610eaa565b92505060206110c585828601610eaa565b9150509250929050565b6110d881611475565b82525050565b6110e781611475565b82525050565b6110fe6110f982611475565b6114d6565b82525050565b61111561111082611493565b6114e8565b82525050565b600061112783856113b7565b93506111348385846114c7565b61113d83611531565b840190509392505050565b600061115483856113c8565b93506111618385846114c7565b61116a83611531565b840190509392505050565b60006111826020836113d9565b915061118d8261154f565b602082019050919050565b60006111a56001836113d9565b91506111b082611578565b600182019050919050565b6000606083016111ce60008401846113fb565b85830360008701526111e183828461111b565b925050506111f260208401846113e4565b6111ff60208601826110cf565b5061120d604084018461145e565b61121a6040860182611225565b508091505092915050565b61122e816114bd565b82525050565b61123d816114bd565b82525050565b600061124f82856110ed565b60148201915061125f82846110ed565b6014820191508190509392505050565b600061127a82611198565b915061128682856110ed565b6014820191506112968284611104565b6020820191506112a582611175565b91508190509392505050565b60006020820190506112c660008301846110de565b92915050565b60006040820190506112e160008301856110de565b6112ee6020830184611234565b9392505050565b6000608082019050818103600083015261130f81886111bb565b905061131e60208301876110de565b61132b6040830186611234565b818103606083015261133e818486611148565b90509695505050505050565b600060208201905061135f6000830184611234565b92915050565b600060408201905061137a6000830185611234565b61138760208301846110de565b9392505050565b60006040820190506113a36000830185611234565b6113b06020830184611234565b9392505050565b600082825260208201905092915050565b600082825260208201905092915050565b600081905092915050565b60006113f36020840184610e0b565b905092915050565b6000808335600160200384360303811261141857611417611527565b5b83810192508235915060208301925067ffffffffffffffff8211156114405761143f611504565b5b60018202360384131561145657611455611518565b5b509250929050565b600061146d6020840184610eaa565b905092915050565b60006114808261149d565b9050919050565b60008115159050919050565b6000819050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b82818337600083830152505050565b60006114e1826114f2565b9050919050565b6000819050919050565b60006114fd82611542565b9050919050565b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b60008160601b9050919050565b7f96e8ac4277198ff8b6f785478aa9a39f403cb768dd02cbee326c3e7da348845f600082015250565b7fff00000000000000000000000000000000000000000000000000000000000000600082015250565b6115aa81611475565b81146115b557600080fd5b50565b6115c181611487565b81146115cc57600080fd5b50565b6115d8816114bd565b81146115e357600080fd5b5056fea26469706673582212207875ed7b29614b36fed6df17ab4d8319246cc854565244214ea9e3ec60e5598264736f6c63430008070033"; type SystemContractConstructorParams = | [signer?: Signer] diff --git a/typechain-types/factories/contracts/zevm/interfaces/IZRC20__factory.ts b/typechain-types/factories/contracts/zevm/interfaces/IZRC20__factory.ts index c3ecf326..5e878097 100644 --- a/typechain-types/factories/contracts/zevm/interfaces/IZRC20__factory.ts +++ b/typechain-types/factories/contracts/zevm/interfaces/IZRC20__factory.ts @@ -163,7 +163,7 @@ const _abi = [ }, { inputs: [], - name: "PROTOCOL_FEE", + name: "PROTOCOL_FLAT_FEE", outputs: [ { internalType: "uint256", @@ -243,11 +243,6 @@ const _abi = [ }, { inputs: [ - { - internalType: "address", - name: "account", - type: "address", - }, { internalType: "uint256", name: "amount", diff --git a/typechain-types/factories/contracts/zevm/testing/SystemContractMock.sol/SystemContractMock__factory.ts b/typechain-types/factories/contracts/zevm/testing/SystemContractMock.sol/SystemContractMock__factory.ts index f4f16134..73252fb7 100644 --- a/typechain-types/factories/contracts/zevm/testing/SystemContractMock.sol/SystemContractMock__factory.ts +++ b/typechain-types/factories/contracts/zevm/testing/SystemContractMock.sol/SystemContractMock__factory.ts @@ -332,7 +332,7 @@ const _abi = [ ] as const; const _bytecode = - "0x60806040523480156200001157600080fd5b50604051620010d7380380620010d7833981810160405281019062000037919062000146565b82600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555081600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080600560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055507f80699e81136d69cb8367ad52a994e25c722a86da654b561d0c14b61a777e7ac560405160405180910390a1505050620001f5565b6000815190506200014081620001db565b92915050565b600080600060608486031215620001625762000161620001d6565b5b600062000172868287016200012f565b935050602062000185868287016200012f565b925050604062000198868287016200012f565b9150509250925092565b6000620001af82620001b6565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600080fd5b620001e681620001a2565b8114620001f257600080fd5b50565b610ed280620002056000396000f3fe608060405234801561001057600080fd5b50600436106100a95760003560e01c806397770dff1161007157806397770dff14610166578063a7cb050714610182578063c63585cc1461019e578063d7fd7afb146101ce578063d936a012146101fe578063ee2815ba1461021c576100a9565b80630be15547146100ae5780633c669d55146100de578063513a9c05146100fa578063569541b91461012a578063842da36d14610148575b600080fd5b6100c860048036038101906100c3919061094d565b610238565b6040516100d59190610bce565b60405180910390f35b6100f860048036038101906100f39190610898565b61026b565b005b610114600480360381019061010f919061094d565b6103b8565b6040516101219190610bce565b60405180910390f35b6101326103eb565b60405161013f9190610bce565b60405180910390f35b610150610411565b60405161015d9190610bce565b60405180910390f35b610180600480360381019061017b9190610818565b610437565b005b61019c600480360381019061019791906109ba565b6104d4565b005b6101b860048036038101906101b39190610845565b610528565b6040516101c59190610bce565b60405180910390f35b6101e860048036038101906101e3919061094d565b61059a565b6040516101f59190610c67565b60405180910390f35b6102066105b2565b6040516102139190610bce565b60405180910390f35b6102366004803603810190610231919061097a565b6105d8565b005b60016020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600060405180606001604052806040518060200160405280600081525081526020013373ffffffffffffffffffffffffffffffffffffffff1681526020014681525090508473ffffffffffffffffffffffffffffffffffffffff1663a9059cbb87866040518363ffffffff1660e01b81526004016102ea929190610be9565b602060405180830381600087803b15801561030457600080fd5b505af1158015610318573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061033c9190610920565b508573ffffffffffffffffffffffffffffffffffffffff1663de43156e82878787876040518663ffffffff1660e01b815260040161037e959493929190610c12565b600060405180830381600087803b15801561039857600080fd5b505af11580156103ac573d6000803e3d6000fd5b50505050505050505050565b60026020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b80600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055507fdba79d534382d1a8ae108e4c8ecb27c6ae42ab8b91d44eedf88bd329f3868d5e600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166040516104c99190610bce565b60405180910390a150565b80600080848152602001908152602001600020819055507f49f492222906ac486c3c1401fa545626df1f0c0e5a77a05597ea2ed66af9850d828260405161051c929190610cab565b60405180910390a15050565b60008060006105378585610667565b9150915085828260405160200161054f929190610b60565b60405160208183030381529060405280519060200120604051602001610576929190610b8c565b6040516020818303038152906040528051906020012060001c925050509392505050565b60006020528060005260406000206000915090505481565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b806001600084815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055507fd1b36d30f6248e97c473b4d1348ca164a4ef6759022f54a58ec200326c39c45d828260405161065b929190610c82565b60405180910390a15050565b6000808273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614156106d0576040517fcb1e7cfe00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff161061070a57828461070d565b83835b8092508193505050600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16141561077c576040517f78b507da00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b9250929050565b60008135905061079281610e57565b92915050565b6000815190506107a781610e6e565b92915050565b60008083601f8401126107c3576107c2610dd3565b5b8235905067ffffffffffffffff8111156107e0576107df610dce565b5b6020830191508360018202830111156107fc576107fb610dd8565b5b9250929050565b60008135905061081281610e85565b92915050565b60006020828403121561082e5761082d610de2565b5b600061083c84828501610783565b91505092915050565b60008060006060848603121561085e5761085d610de2565b5b600061086c86828701610783565b935050602061087d86828701610783565b925050604061088e86828701610783565b9150509250925092565b6000806000806000608086880312156108b4576108b3610de2565b5b60006108c288828901610783565b95505060206108d388828901610783565b94505060406108e488828901610803565b935050606086013567ffffffffffffffff81111561090557610904610ddd565b5b610911888289016107ad565b92509250509295509295909350565b60006020828403121561093657610935610de2565b5b600061094484828501610798565b91505092915050565b60006020828403121561096357610962610de2565b5b600061097184828501610803565b91505092915050565b6000806040838503121561099157610990610de2565b5b600061099f85828601610803565b92505060206109b085828601610783565b9150509250929050565b600080604083850312156109d1576109d0610de2565b5b60006109df85828601610803565b92505060206109f085828601610803565b9150509250929050565b610a0381610d0c565b82525050565b610a1281610d0c565b82525050565b610a29610a2482610d0c565b610da0565b82525050565b610a40610a3b82610d2a565b610db2565b82525050565b6000610a528385610cf0565b9350610a5f838584610d5e565b610a6883610de7565b840190509392505050565b6000610a7e82610cd4565b610a888185610cdf565b9350610a98818560208601610d6d565b610aa181610de7565b840191505092915050565b6000610ab9602083610d01565b9150610ac482610e05565b602082019050919050565b6000610adc600183610d01565b9150610ae782610e2e565b600182019050919050565b60006060830160008301518482036000860152610b0f8282610a73565b9150506020830151610b2460208601826109fa565b506040830151610b376040860182610b42565b508091505092915050565b610b4b81610d54565b82525050565b610b5a81610d54565b82525050565b6000610b6c8285610a18565b601482019150610b7c8284610a18565b6014820191508190509392505050565b6000610b9782610acf565b9150610ba38285610a18565b601482019150610bb38284610a2f565b602082019150610bc282610aac565b91508190509392505050565b6000602082019050610be36000830184610a09565b92915050565b6000604082019050610bfe6000830185610a09565b610c0b6020830184610b51565b9392505050565b60006080820190508181036000830152610c2c8188610af2565b9050610c3b6020830187610a09565b610c486040830186610b51565b8181036060830152610c5b818486610a46565b90509695505050505050565b6000602082019050610c7c6000830184610b51565b92915050565b6000604082019050610c976000830185610b51565b610ca46020830184610a09565b9392505050565b6000604082019050610cc06000830185610b51565b610ccd6020830184610b51565b9392505050565b600081519050919050565b600082825260208201905092915050565b600082825260208201905092915050565b600081905092915050565b6000610d1782610d34565b9050919050565b60008115159050919050565b6000819050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b82818337600083830152505050565b60005b83811015610d8b578082015181840152602081019050610d70565b83811115610d9a576000848401525b50505050565b6000610dab82610dbc565b9050919050565b6000819050919050565b6000610dc782610df8565b9050919050565b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b60008160601b9050919050565b7f96e8ac4277198ff8b6f785478aa9a39f403cb768dd02cbee326c3e7da348845f600082015250565b7fff00000000000000000000000000000000000000000000000000000000000000600082015250565b610e6081610d0c565b8114610e6b57600080fd5b50565b610e7781610d1e565b8114610e8257600080fd5b50565b610e8e81610d54565b8114610e9957600080fd5b5056fea26469706673582212203fa9d55135c7f24f7b5da3516688ef5fb78d92d28a850d2fe6d6fc3799422af364736f6c63430008070033"; + "0x60806040523480156200001157600080fd5b50604051620010d7380380620010d7833981810160405281019062000037919062000146565b82600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555081600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080600560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055507f80699e81136d69cb8367ad52a994e25c722a86da654b561d0c14b61a777e7ac560405160405180910390a1505050620001f5565b6000815190506200014081620001db565b92915050565b600080600060608486031215620001625762000161620001d6565b5b600062000172868287016200012f565b935050602062000185868287016200012f565b925050604062000198868287016200012f565b9150509250925092565b6000620001af82620001b6565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600080fd5b620001e681620001a2565b8114620001f257600080fd5b50565b610ed280620002056000396000f3fe608060405234801561001057600080fd5b50600436106100a95760003560e01c806397770dff1161007157806397770dff14610166578063a7cb050714610182578063c63585cc1461019e578063d7fd7afb146101ce578063d936a012146101fe578063ee2815ba1461021c576100a9565b80630be15547146100ae5780633c669d55146100de578063513a9c05146100fa578063569541b91461012a578063842da36d14610148575b600080fd5b6100c860048036038101906100c3919061094d565b610238565b6040516100d59190610bce565b60405180910390f35b6100f860048036038101906100f39190610898565b61026b565b005b610114600480360381019061010f919061094d565b6103b8565b6040516101219190610bce565b60405180910390f35b6101326103eb565b60405161013f9190610bce565b60405180910390f35b610150610411565b60405161015d9190610bce565b60405180910390f35b610180600480360381019061017b9190610818565b610437565b005b61019c600480360381019061019791906109ba565b6104d4565b005b6101b860048036038101906101b39190610845565b610528565b6040516101c59190610bce565b60405180910390f35b6101e860048036038101906101e3919061094d565b61059a565b6040516101f59190610c67565b60405180910390f35b6102066105b2565b6040516102139190610bce565b60405180910390f35b6102366004803603810190610231919061097a565b6105d8565b005b60016020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600060405180606001604052806040518060200160405280600081525081526020013373ffffffffffffffffffffffffffffffffffffffff1681526020014681525090508473ffffffffffffffffffffffffffffffffffffffff1663a9059cbb87866040518363ffffffff1660e01b81526004016102ea929190610be9565b602060405180830381600087803b15801561030457600080fd5b505af1158015610318573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061033c9190610920565b508573ffffffffffffffffffffffffffffffffffffffff1663de43156e82878787876040518663ffffffff1660e01b815260040161037e959493929190610c12565b600060405180830381600087803b15801561039857600080fd5b505af11580156103ac573d6000803e3d6000fd5b50505050505050505050565b60026020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b80600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055507fdba79d534382d1a8ae108e4c8ecb27c6ae42ab8b91d44eedf88bd329f3868d5e600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166040516104c99190610bce565b60405180910390a150565b80600080848152602001908152602001600020819055507f49f492222906ac486c3c1401fa545626df1f0c0e5a77a05597ea2ed66af9850d828260405161051c929190610cab565b60405180910390a15050565b60008060006105378585610667565b9150915085828260405160200161054f929190610b60565b60405160208183030381529060405280519060200120604051602001610576929190610b8c565b6040516020818303038152906040528051906020012060001c925050509392505050565b60006020528060005260406000206000915090505481565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b806001600084815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055507fd1b36d30f6248e97c473b4d1348ca164a4ef6759022f54a58ec200326c39c45d828260405161065b929190610c82565b60405180910390a15050565b6000808273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614156106d0576040517fcb1e7cfe00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff161061070a57828461070d565b83835b8092508193505050600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16141561077c576040517f78b507da00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b9250929050565b60008135905061079281610e57565b92915050565b6000815190506107a781610e6e565b92915050565b60008083601f8401126107c3576107c2610dd3565b5b8235905067ffffffffffffffff8111156107e0576107df610dce565b5b6020830191508360018202830111156107fc576107fb610dd8565b5b9250929050565b60008135905061081281610e85565b92915050565b60006020828403121561082e5761082d610de2565b5b600061083c84828501610783565b91505092915050565b60008060006060848603121561085e5761085d610de2565b5b600061086c86828701610783565b935050602061087d86828701610783565b925050604061088e86828701610783565b9150509250925092565b6000806000806000608086880312156108b4576108b3610de2565b5b60006108c288828901610783565b95505060206108d388828901610783565b94505060406108e488828901610803565b935050606086013567ffffffffffffffff81111561090557610904610ddd565b5b610911888289016107ad565b92509250509295509295909350565b60006020828403121561093657610935610de2565b5b600061094484828501610798565b91505092915050565b60006020828403121561096357610962610de2565b5b600061097184828501610803565b91505092915050565b6000806040838503121561099157610990610de2565b5b600061099f85828601610803565b92505060206109b085828601610783565b9150509250929050565b600080604083850312156109d1576109d0610de2565b5b60006109df85828601610803565b92505060206109f085828601610803565b9150509250929050565b610a0381610d0c565b82525050565b610a1281610d0c565b82525050565b610a29610a2482610d0c565b610da0565b82525050565b610a40610a3b82610d2a565b610db2565b82525050565b6000610a528385610cf0565b9350610a5f838584610d5e565b610a6883610de7565b840190509392505050565b6000610a7e82610cd4565b610a888185610cdf565b9350610a98818560208601610d6d565b610aa181610de7565b840191505092915050565b6000610ab9602083610d01565b9150610ac482610e05565b602082019050919050565b6000610adc600183610d01565b9150610ae782610e2e565b600182019050919050565b60006060830160008301518482036000860152610b0f8282610a73565b9150506020830151610b2460208601826109fa565b506040830151610b376040860182610b42565b508091505092915050565b610b4b81610d54565b82525050565b610b5a81610d54565b82525050565b6000610b6c8285610a18565b601482019150610b7c8284610a18565b6014820191508190509392505050565b6000610b9782610acf565b9150610ba38285610a18565b601482019150610bb38284610a2f565b602082019150610bc282610aac565b91508190509392505050565b6000602082019050610be36000830184610a09565b92915050565b6000604082019050610bfe6000830185610a09565b610c0b6020830184610b51565b9392505050565b60006080820190508181036000830152610c2c8188610af2565b9050610c3b6020830187610a09565b610c486040830186610b51565b8181036060830152610c5b818486610a46565b90509695505050505050565b6000602082019050610c7c6000830184610b51565b92915050565b6000604082019050610c976000830185610b51565b610ca46020830184610a09565b9392505050565b6000604082019050610cc06000830185610b51565b610ccd6020830184610b51565b9392505050565b600081519050919050565b600082825260208201905092915050565b600082825260208201905092915050565b600081905092915050565b6000610d1782610d34565b9050919050565b60008115159050919050565b6000819050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b82818337600083830152505050565b60005b83811015610d8b578082015181840152602081019050610d70565b83811115610d9a576000848401525b50505050565b6000610dab82610dbc565b9050919050565b6000819050919050565b6000610dc782610df8565b9050919050565b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b60008160601b9050919050565b7f96e8ac4277198ff8b6f785478aa9a39f403cb768dd02cbee326c3e7da348845f600082015250565b7fff00000000000000000000000000000000000000000000000000000000000000600082015250565b610e6081610d0c565b8114610e6b57600080fd5b50565b610e7781610d1e565b8114610e8257600080fd5b50565b610e8e81610d54565b8114610e9957600080fd5b5056fea2646970667358221220e74d5405ce1c819244378f4290d048a05683c5316d06f7cdbc42ff158e71a57a64736f6c63430008070033"; type SystemContractMockConstructorParams = | [signer?: Signer] diff --git a/typechain-types/hardhat.d.ts b/typechain-types/hardhat.d.ts index 6c4d8917..cb333a18 100644 --- a/typechain-types/hardhat.d.ts +++ b/typechain-types/hardhat.d.ts @@ -356,6 +356,18 @@ declare module "hardhat/types/runtime" { name: "TestERC20", signerOrOptions?: ethers.Signer | FactoryOptions ): Promise; + getContractFactory( + name: "GatewayZEVM", + signerOrOptions?: ethers.Signer | FactoryOptions + ): Promise; + getContractFactory( + name: "IGatewayZEVM", + signerOrOptions?: ethers.Signer | FactoryOptions + ): Promise; + getContractFactory( + name: "Sender", + signerOrOptions?: ethers.Signer | FactoryOptions + ): Promise; getContractFactory( name: "ISystem", signerOrOptions?: ethers.Signer | FactoryOptions @@ -855,6 +867,21 @@ declare module "hardhat/types/runtime" { address: string, signer?: ethers.Signer ): Promise; + getContractAt( + name: "GatewayZEVM", + address: string, + signer?: ethers.Signer + ): Promise; + getContractAt( + name: "IGatewayZEVM", + address: string, + signer?: ethers.Signer + ): Promise; + getContractAt( + name: "Sender", + address: string, + signer?: ethers.Signer + ): Promise; getContractAt( name: "ISystem", address: string, diff --git a/typechain-types/index.ts b/typechain-types/index.ts index 8cf703c2..63942633 100644 --- a/typechain-types/index.ts +++ b/typechain-types/index.ts @@ -168,6 +168,12 @@ export type { Receiver } from "./contracts/prototypes/evm/Receiver"; export { Receiver__factory } from "./factories/contracts/prototypes/evm/Receiver__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 { ISystem } from "./contracts/zevm/Interfaces.sol/ISystem"; export { ISystem__factory } from "./factories/contracts/zevm/Interfaces.sol/ISystem__factory"; export type { IZRC20 } from "./contracts/zevm/Interfaces.sol/IZRC20";