diff --git a/contracts/prototypes/evm/ERC20CustodyNew.sol b/contracts/prototypes/evm/ERC20CustodyNew.sol new file mode 100644 index 00000000..dc4dc11c --- /dev/null +++ b/contracts/prototypes/evm/ERC20CustodyNew.sol @@ -0,0 +1,50 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.8.7; + +import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; +import "./interfaces.sol"; +import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; +import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; + +// As the current version, ERC20CustodyNew hold the ERC20s deposited on ZetaChain +// This version include a functionality allowing to call a contract +// ERC20Custody doesn't call smart contract directly, it passes through the Gateway contract +contract ERC20CustodyNew is ReentrancyGuard{ + using SafeERC20 for IERC20; + error ZeroAddress(); + + IGatewayEVM public gateway; + + event Withdraw(address indexed token, address indexed to, uint256 amount); + event WithdrawAndCall(address indexed token, address indexed to, uint256 amount, bytes data); + + constructor(address _gateway) { + if (_gateway == address(0)) { + revert ZeroAddress(); + } + gateway = IGatewayEVM(_gateway); + } + + // Withdraw is called by TSS address, it directly transfers the tokens to the destination address without contract call + // TODO: Finalize access control + // https://github.com/zeta-chain/protocol-contracts/issues/204 + function withdraw(address token, address to, uint256 amount) external nonReentrant { + IERC20(token).safeTransfer(to, amount); + + emit Withdraw(token, to, amount); + } + + // WithdrawAndCall is called by TSS address, it transfers the tokens and call a contract + // For this, it passes through the Gateway contract, it transfers the tokens to the Gateway contract and then calls the contract + // TODO: Finalize access control + // https://github.com/zeta-chain/protocol-contracts/issues/204 + function withdrawAndCall(address token, address to, uint256 amount, bytes calldata data) external nonReentrant { + // Transfer the tokens to the Gateway contract + IERC20(token).safeTransfer(address(gateway), amount); + + // Forward the call to the Gateway contract + gateway.executeWithERC20(token, to, amount, data); + + emit WithdrawAndCall(token, to, amount, data); + } +} \ No newline at end of file diff --git a/contracts/prototypes/evm/GatewayEVM.sol b/contracts/prototypes/evm/GatewayEVM.sol new file mode 100644 index 00000000..cd86d11b --- /dev/null +++ b/contracts/prototypes/evm/GatewayEVM.sol @@ -0,0 +1,145 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.8.7; + +import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; +import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; +import "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol"; +import "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol"; +import "@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol"; + +// The GatewayEVM contract is the endpoint to call smart contracts on external chains +// The contract doesn't hold any funds and should never have active allowances +contract GatewayEVM is Initializable, OwnableUpgradeable, UUPSUpgradeable { + using SafeERC20 for IERC20; + + error ExecutionFailed(); + error DepositFailed(); + error InsufficientETHAmount(); + error InsufficientERC20Amount(); + error ZeroAddress(); + error ApprovalFailed(); + + address public custody; + address public tssAddress; + + event Executed(address indexed destination, uint256 value, bytes data); + event ExecutedWithERC20(address indexed token, address indexed to, uint256 amount, bytes data); + event Deposit(address indexed sender, address indexed receiver, uint256 amount, address asset, bytes payload); + event Call(address indexed sender, address indexed receiver, bytes payload); + + /// @custom:oz-upgrades-unsafe-allow constructor + constructor() { + _disableInitializers(); + } + + function initialize(address _tssAddress) public initializer { + __Ownable_init(); + __UUPSUpgradeable_init(); + + if (_tssAddress == address(0)) revert ZeroAddress(); + + tssAddress = _tssAddress; + } + + function _authorizeUpgrade(address newImplementation) internal override onlyOwner() {} + + function _execute(address destination, bytes calldata data) internal returns (bytes memory) { + (bool success, bytes memory result) = destination.call{value: msg.value}(data); + + if (!success) revert ExecutionFailed(); + + return result; + } + + // Called by the TSS + // Execution without ERC20 tokens, it is payable and can be used in the case of WithdrawAndCall for Gas ZRC20 + // It can be also used for contract call without asset movement + function execute(address destination, bytes calldata data) external payable returns (bytes memory) { + bytes memory result = _execute(destination, data); + + emit Executed(destination, msg.value, data); + + return result; + } + + // Called by the ERC20Custody contract + // It call a function using ERC20 transfer + // Since the goal is to allow calling contract not designed for ZetaChain specifically, it uses ERC20 allowance system + // It provides allowance to destination contract and call destination contract. In the end, it remove remaining allowance and transfer remaining tokens back to the custody contract for security purposes + function executeWithERC20( + address token, + address to, + uint256 amount, + bytes calldata data + ) external returns (bytes memory) { + if (amount == 0) revert InsufficientETHAmount(); + // Approve the target contract to spend the tokens + if(!resetApproval(token, to)) revert ApprovalFailed(); + if(!IERC20(token).approve(to, amount)) revert ApprovalFailed(); + + // Execute the call on the target contract + bytes memory result = _execute(to, data); + + // Reset approval + if(!resetApproval(token, to)) revert ApprovalFailed(); + + // Transfer any remaining tokens back to the custody contract + uint256 remainingBalance = IERC20(token).balanceOf(address(this)); + if (remainingBalance > 0) { + IERC20(token).safeTransfer(address(custody), remainingBalance); + } + + emit ExecutedWithERC20(token, to, amount, data); + + return result; + } + + // Deposit ETH to tss + function deposit(address receiver) external payable { + if (msg.value == 0) revert InsufficientETHAmount(); + (bool deposited, ) = tssAddress.call{value: msg.value}(""); + + if (deposited == false) revert DepositFailed(); + + emit Deposit(msg.sender, receiver, msg.value, address(0), ""); + } + + // Deposit ERC20 tokens to custody + function deposit(address receiver, uint256 amount, address asset) external { + if (amount == 0) revert InsufficientERC20Amount(); + IERC20(asset).safeTransferFrom(msg.sender, address(custody), amount); + + emit Deposit(msg.sender, receiver, amount, asset, ""); + } + + // Deposit ETH to tss and call an omnichain smart contract + function depositAndCall(address receiver, bytes calldata payload) external payable { + if (msg.value == 0) revert InsufficientETHAmount(); + (bool deposited, ) = tssAddress.call{value: msg.value}(""); + + if (deposited == false) revert DepositFailed(); + + emit Deposit(msg.sender, receiver, msg.value, address(0), payload); + } + + // Deposit ERC20 tokens to custody and call an omnichain smart contract + function depositAndCall(address receiver, uint256 amount, address asset, bytes calldata payload) external { + if (amount == 0) revert InsufficientERC20Amount(); + IERC20(asset).safeTransferFrom(msg.sender, address(custody), amount); + + emit Deposit(msg.sender, receiver, amount, asset, payload); + } + + // Call an omnichain smart contract without asset transfer + function call(address receiver, bytes calldata payload) external { + emit Call(msg.sender, receiver, payload); + } + + function setCustody(address _custody) external { + custody = _custody; + } + + function resetApproval(address token, address to) private returns (bool) { + return IERC20(token).approve(to, 0); + } +} diff --git a/contracts/prototypes/evm/GatewayEVMUpgradeTest.sol b/contracts/prototypes/evm/GatewayEVMUpgradeTest.sol new file mode 100644 index 00000000..00d3342f --- /dev/null +++ b/contracts/prototypes/evm/GatewayEVMUpgradeTest.sol @@ -0,0 +1,118 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.8.7; + +import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; +import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; +import "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol"; +import "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol"; +import "@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol"; + + +// NOTE: Purpose of this contract is to test upgrade process, the only difference should be name of Executed event +// The Gateway contract is the endpoint to call smart contracts on external chains +// The contract doesn't hold any funds and should never have active allowances +contract GatewayEVMUpgradeTest is Initializable, OwnableUpgradeable, UUPSUpgradeable { + using SafeERC20 for IERC20; + + error ExecutionFailed(); + error SendFailed(); + error InsufficientETHAmount(); + error ZeroAddress(); + error ApprovalFailed(); + + address public custody; + address public tssAddress; + + event ExecutedV2(address indexed destination, uint256 value, bytes data); + event ExecutedWithERC20(address indexed token, address indexed to, uint256 amount, bytes data); + event SendERC20(bytes recipient, address indexed asset, uint256 amount); + event Send(bytes recipient, uint256 amount); + + /// @custom:oz-upgrades-unsafe-allow constructor + constructor() { + _disableInitializers(); + } + + function initialize(address _tssAddress) public initializer { + __Ownable_init(); + __UUPSUpgradeable_init(); + + if (_tssAddress == address(0)) revert ZeroAddress(); + + tssAddress = _tssAddress; + } + + function _authorizeUpgrade(address newImplementation) internal override onlyOwner() {} + + function _execute(address destination, bytes calldata data) internal returns (bytes memory) { + (bool success, bytes memory result) = destination.call{value: msg.value}(data); + + if (!success) revert ExecutionFailed(); + + return result; + } + + // Called by the TSS + // Execution without ERC20 tokens, it is payable and can be used in the case of WithdrawAndCall for Gas ZRC20 + // It can be also used for contract call without asset movement + function execute(address destination, bytes calldata data) external payable returns (bytes memory) { + bytes memory result = _execute(destination, data); + + emit ExecutedV2(destination, msg.value, data); + + return result; + } + + // Called by the ERC20Custody contract + // It call a function using ERC20 transfer + // Since the goal is to allow calling contract not designed for ZetaChain specifically, it uses ERC20 allowance system + // It provides allowance to destination contract and call destination contract. In the end, it remove remaining allowance and transfer remaining tokens back to the custody contract for security purposes + function executeWithERC20( + address token, + address to, + uint256 amount, + bytes calldata data + ) external returns (bytes memory) { + // Approve the target contract to spend the tokens + if(!IERC20(token).approve(to, 0)) revert ApprovalFailed(); + if(!IERC20(token).approve(to, amount)) revert ApprovalFailed(); + + // Execute the call on the target contract + bytes memory result = _execute(to, data); + + // Reset approval + if(!IERC20(token).approve(to, 0)) revert ApprovalFailed(); + + // Transfer any remaining tokens back to the custody contract + uint256 remainingBalance = IERC20(token).balanceOf(address(this)); + if (remainingBalance > 0) { + IERC20(token).safeTransfer(address(custody), remainingBalance); + } + + emit ExecutedWithERC20(token, to, amount, data); + + return result; + } + + // Transfer specified token amount to ERC20Custody and emits event + function sendERC20(bytes calldata recipient, address token, uint256 amount) external { + IERC20(token).safeTransferFrom(msg.sender, address(custody), amount); + + emit SendERC20(recipient, token, amount); + } + + // Transfer specified ETH amount to TSS address and emits event + function send(bytes calldata recipient, uint256 amount) external payable { + if (msg.value == 0) revert InsufficientETHAmount(); + + (bool sent, ) = tssAddress.call{value: msg.value}(""); + + if (sent == false) revert SendFailed(); + + emit Send(recipient, msg.value); + } + + function setCustody(address _custody) external { + custody = _custody; + } +} diff --git a/contracts/prototypes/evm/Receiver.sol b/contracts/prototypes/evm/Receiver.sol new file mode 100644 index 00000000..54fa499d --- /dev/null +++ b/contracts/prototypes/evm/Receiver.sol @@ -0,0 +1,37 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.8.7; + +import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; +import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; + +contract Receiver { + using SafeERC20 for IERC20; + + event ReceivedPayable(address sender, uint256 value, string str, uint256 num, bool flag); + event ReceivedNonPayable(address sender, string[] strs, uint256[] nums, bool flag); + event ReceivedERC20(address sender, uint256 amount, address token, address destination); + event ReceivedNoParams(address sender); + + // Payable function + function receivePayable(string memory str, uint256 num, bool flag) external payable { + emit ReceivedPayable(msg.sender, msg.value, str, num, flag); + } + + // Non-payable function + function receiveNonPayable(string[] memory strs, uint256[] memory nums, bool flag) external { + emit ReceivedNonPayable(msg.sender, strs, nums, flag); + } + + // Function using IERC20 + function receiveERC20(uint256 amount, address token, address destination) external { + // Transfer tokens from the Gateway contract to the destination address + IERC20(token).safeTransferFrom(msg.sender, destination, amount); + + emit ReceivedERC20(msg.sender, amount, token, destination); + } + + // Function without parameters + function receiveNoParams() external { + emit ReceivedNoParams(msg.sender); + } +} \ No newline at end of file diff --git a/contracts/prototypes/evm/TestERC20.sol b/contracts/prototypes/evm/TestERC20.sol new file mode 100644 index 00000000..6a9859c3 --- /dev/null +++ b/contracts/prototypes/evm/TestERC20.sol @@ -0,0 +1,12 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.8.7; + +import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; + +contract TestERC20 is ERC20 { + constructor(string memory name, string memory symbol) ERC20(name, symbol) {} + + function mint(address to, uint256 amount) external { + _mint(to, amount); + } +} \ No newline at end of file diff --git a/contracts/prototypes/evm/interfaces.sol b/contracts/prototypes/evm/interfaces.sol new file mode 100644 index 00000000..38d006c8 --- /dev/null +++ b/contracts/prototypes/evm/interfaces.sol @@ -0,0 +1,17 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.8.7; + +interface IGatewayEVM { + function executeWithERC20( + address token, + address to, + uint256 amount, + bytes calldata data + ) external returns (bytes memory); + + function execute(address destination, bytes calldata data) external payable returns (bytes memory); + + function sendERC20(bytes calldata recipient, address asset, uint256 amount) external; + + function send(bytes calldata recipient, uint256 amount) external payable; +} \ No newline at end of file diff --git a/contracts/prototypes/zevm/GatewayZEVM.sol b/contracts/prototypes/zevm/GatewayZEVM.sol new file mode 100644 index 00000000..8ef155e4 --- /dev/null +++ b/contracts/prototypes/zevm/GatewayZEVM.sol @@ -0,0 +1,115 @@ +// 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"; +import "../../zevm/interfaces/zContract.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 ZRC20BurnFailed(); + error ZRC20TransferFailed(); + error GasFeeTransferFailed(); + error CallerIsNotFungibleModule(); + error InvalidTarget(); + + 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(); + } + + if (!IZRC20(zrc20).transferFrom(msg.sender, address(this), amount)) { + revert ZRC20TransferFailed(); + } + + if (!IZRC20(zrc20).burn(amount)) revert ZRC20BurnFailed(); + + 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); + } + + // Deposit foreign coins into ZRC20 + // TODO: Finalize access control + // https://github.com/zeta-chain/protocol-contracts/issues/204 + function deposit( + address zrc20, + uint256 amount, + address target + ) external { + if (msg.sender != FUNGIBLE_MODULE_ADDRESS) revert CallerIsNotFungibleModule(); + if (target == FUNGIBLE_MODULE_ADDRESS || target == address(this)) revert InvalidTarget(); + + IZRC20(zrc20).deposit(target, amount); + } + + // Execute user specified contract on ZEVM + // TODO: Finalize access control + // https://github.com/zeta-chain/protocol-contracts/issues/204 + function execute( + zContext calldata context, + address zrc20, + uint256 amount, + address target, + bytes calldata message + ) external { + if (msg.sender != FUNGIBLE_MODULE_ADDRESS) revert CallerIsNotFungibleModule(); + + zContract(target).onCrossChainCall(context, zrc20, amount, message); + } + + // Deposit foreign coins into ZRC20 and call user specified contract on ZEVM + // TODO: Finalize access control + // https://github.com/zeta-chain/protocol-contracts/issues/204 + function depositAndCall( + zContext calldata context, + address zrc20, + uint256 amount, + address target, + bytes calldata message + ) external { + if (msg.sender != FUNGIBLE_MODULE_ADDRESS) revert CallerIsNotFungibleModule(); + if (target == FUNGIBLE_MODULE_ADDRESS || target == address(this)) revert InvalidTarget(); + + IZRC20(zrc20).deposit(target, amount); + zContract(target).onCrossChainCall(context, zrc20, amount, message); + } +} diff --git a/contracts/prototypes/zevm/Sender.sol b/contracts/prototypes/zevm/Sender.sol new file mode 100644 index 00000000..a39831e3 --- /dev/null +++ b/contracts/prototypes/zevm/Sender.sol @@ -0,0 +1,36 @@ +// 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; + error ApprovalFailed(); + + 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 receivePayable method + bytes memory message = abi.encodeWithSignature("receivePayable(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 receivePayable method + bytes memory message = abi.encodeWithSignature("receivePayable(string,uint256,bool)", str, num, flag); + + // Approve gateway to withdraw + if(!IZRC20(zrc20).approve(gateway, amount)) revert ApprovalFailed(); + + // Pass encoded call to gateway + IGatewayZEVM(gateway).withdrawAndCall(receiver, amount, zrc20, message); + } +} \ No newline at end of file diff --git a/contracts/prototypes/zevm/TestZContract.sol b/contracts/prototypes/zevm/TestZContract.sol new file mode 100644 index 00000000..e2aa5743 --- /dev/null +++ b/contracts/prototypes/zevm/TestZContract.sol @@ -0,0 +1,19 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.8.7; + +import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; +import "../../zevm/interfaces/zContract.sol"; + +contract TestZContract is zContract { + event ContextData(bytes origin, address sender, uint256 chainID, address msgSender, string message); + + function onCrossChainCall( + zContext calldata context, + address zrc20, + uint256 amount, + bytes calldata message + ) external override { + string memory decodedMessage = abi.decode(message, (string)); + emit ContextData(context.origin, context.sender, context.chainID, msg.sender, decodedMessage); + } +} \ No newline at end of file diff --git a/contracts/prototypes/zevm/ZRC20New.sol b/contracts/prototypes/zevm/ZRC20New.sol new file mode 100644 index 00000000..62f55ce5 --- /dev/null +++ b/contracts/prototypes/zevm/ZRC20New.sol @@ -0,0 +1,305 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.8.7; +import "../../zevm/Interfaces.sol"; + +/** + * @dev Custom errors for ZRC20 + */ +interface ZRC20Errors { + // @dev: Error thrown when caller is not the fungible module + error CallerIsNotFungibleModule(); + error InvalidSender(); + error GasFeeTransferFailed(); + error ZeroGasCoin(); + error ZeroGasPrice(); + error LowAllowance(); + error LowBalance(); + error ZeroAddress(); +} + +// NOTE: this is exactly the same as ZRC20, except gateway contract address is set at deployment +// and used to allow deposit. This is first version, it might change in the future. +contract ZRC20New is IZRC20, IZRC20Metadata, ZRC20Errors { + /// @notice Fungible address is always the same, maintained at the protocol level + address public constant FUNGIBLE_MODULE_ADDRESS = 0x735b14BB79463307AAcBED86DAf3322B1e6226aB; + /// @notice Chain id.abi + uint256 public immutable CHAIN_ID; + /// @notice Coin type, checkout Interfaces.sol. + CoinType public immutable COIN_TYPE; + /// @notice System contract address. + address public SYSTEM_CONTRACT_ADDRESS; + /// @notice Gateway contract address. + address public GATEWAY_CONTRACT_ADDRESS; + /// @notice Gas limit. + uint256 public GAS_LIMIT; + /// @notice Protocol flat fee. + uint256 public PROTOCOL_FLAT_FEE; + + mapping(address => uint256) private _balances; + mapping(address => mapping(address => uint256)) private _allowances; + uint256 private _totalSupply; + string private _name; + string private _symbol; + uint8 private _decimals; + + function _msgSender() internal view virtual returns (address) { + return msg.sender; + } + + function _msgData() internal view virtual returns (bytes calldata) { + return msg.data; + } + + /** + * @dev Only fungible module modifier. + */ + modifier onlyFungible() { + if (msg.sender != FUNGIBLE_MODULE_ADDRESS) revert CallerIsNotFungibleModule(); + _; + } + + /** + * @dev The only one allowed to deploy new ZRC20 is fungible address. + */ + constructor( + string memory name_, + string memory symbol_, + uint8 decimals_, + uint256 chainid_, + CoinType coinType_, + uint256 gasLimit_, + address systemContractAddress_, + address gatewayContractAddress_ + ) { + if (msg.sender != FUNGIBLE_MODULE_ADDRESS) revert CallerIsNotFungibleModule(); + _name = name_; + _symbol = symbol_; + _decimals = decimals_; + CHAIN_ID = chainid_; + COIN_TYPE = coinType_; + GAS_LIMIT = gasLimit_; + SYSTEM_CONTRACT_ADDRESS = systemContractAddress_; + GATEWAY_CONTRACT_ADDRESS = gatewayContractAddress_; + } + + /** + * @dev ZRC20 name + * @return name as string + */ + function name() public view virtual override returns (string memory) { + return _name; + } + + /** + * @dev ZRC20 symbol. + * @return symbol as string. + */ + function symbol() public view virtual override returns (string memory) { + return _symbol; + } + + /** + * @dev ZRC20 decimals. + * @return returns uint8 decimals. + */ + function decimals() public view virtual override returns (uint8) { + return _decimals; + } + + /** + * @dev ZRC20 total supply. + * @return returns uint256 total supply. + */ + function totalSupply() public view virtual override returns (uint256) { + return _totalSupply; + } + + /** + * @dev Returns ZRC20 balance of an account. + * @param account, account address for which balance is requested. + * @return uint256 account balance. + */ + function balanceOf(address account) public view virtual override returns (uint256) { + return _balances[account]; + } + + /** + * @dev Returns ZRC20 balance of an account. + * @param recipient, recipiuent address to which transfer is done. + * @return true/false if transfer succeeded/failed. + */ + function transfer(address recipient, uint256 amount) public virtual override returns (bool) { + _transfer(_msgSender(), recipient, amount); + return true; + } + + /** + * @dev Returns token allowance from owner to spender. + * @param owner, owner address. + * @return uint256 allowance. + */ + function allowance(address owner, address spender) public view virtual override returns (uint256) { + return _allowances[owner][spender]; + } + + /** + * @dev Approves amount transferFrom for spender. + * @param spender, spender address. + * @param amount, amount to approve. + * @return true/false if succeeded/failed. + */ + function approve(address spender, uint256 amount) public virtual override returns (bool) { + _approve(_msgSender(), spender, amount); + return true; + } + + /** + * @dev Transfers tokens from sender to recipient. + * @param sender, sender address. + * @param recipient, recipient address. + * @param amount, amount to transfer. + * @return true/false if succeeded/failed. + */ + function transferFrom(address sender, address recipient, uint256 amount) public virtual override returns (bool) { + _transfer(sender, recipient, amount); + + uint256 currentAllowance = _allowances[sender][_msgSender()]; + if (currentAllowance < amount) revert LowAllowance(); + + _approve(sender, _msgSender(), currentAllowance - amount); + + return true; + } + + /** + * @dev Burns an amount of tokens. + * @param amount, amount to burn. + * @return true/false if succeeded/failed. + */ + function burn(uint256 amount) external returns (bool) { + _burn(msg.sender, amount); + return true; + } + + function _transfer(address sender, address recipient, uint256 amount) internal virtual { + if (sender == address(0)) revert ZeroAddress(); + if (recipient == address(0)) revert ZeroAddress(); + + uint256 senderBalance = _balances[sender]; + if (senderBalance < amount) revert LowBalance(); + + _balances[sender] = senderBalance - amount; + _balances[recipient] += amount; + + emit Transfer(sender, recipient, amount); + } + + function _mint(address account, uint256 amount) internal virtual { + if (account == address(0)) revert ZeroAddress(); + + _totalSupply += amount; + _balances[account] += amount; + emit Transfer(address(0), account, amount); + } + + function _burn(address account, uint256 amount) internal virtual { + if (account == address(0)) revert ZeroAddress(); + + uint256 accountBalance = _balances[account]; + if (accountBalance < amount) revert LowBalance(); + + _balances[account] = accountBalance - amount; + _totalSupply -= amount; + + emit Transfer(account, address(0), amount); + } + + function _approve(address owner, address spender, uint256 amount) internal virtual { + if (owner == address(0)) revert ZeroAddress(); + if (spender == address(0)) revert ZeroAddress(); + + _allowances[owner][spender] = amount; + emit Approval(owner, spender, amount); + } + + /** + * @dev Deposits corresponding tokens from external chain, only callable by Fungible module. + * @param to, recipient address. + * @param amount, amount to deposit. + * @return true/false if succeeded/failed. + */ + // TODO: Finalize access control + // https://github.com/zeta-chain/protocol-contracts/issues/204 + function deposit(address to, uint256 amount) external override returns (bool) { + if (msg.sender != FUNGIBLE_MODULE_ADDRESS && msg.sender != SYSTEM_CONTRACT_ADDRESS && msg.sender != GATEWAY_CONTRACT_ADDRESS) revert InvalidSender(); + _mint(to, amount); + emit Deposit(abi.encodePacked(FUNGIBLE_MODULE_ADDRESS), to, amount); + return true; + } + + /** + * @dev Withdraws gas fees. + * @return returns the ZRC20 address for gas on the same chain of this ZRC20, and calculates the gas fee for withdraw() + */ + function withdrawGasFee() public view override returns (address, uint256) { + address gasZRC20 = ISystem(SYSTEM_CONTRACT_ADDRESS).gasCoinZRC20ByChainId(CHAIN_ID); + if (gasZRC20 == address(0)) revert ZeroGasCoin(); + + uint256 gasPrice = ISystem(SYSTEM_CONTRACT_ADDRESS).gasPriceByChainId(CHAIN_ID); + if (gasPrice == 0) { + revert ZeroGasPrice(); + } + uint256 gasFee = gasPrice * GAS_LIMIT + PROTOCOL_FLAT_FEE; + return (gasZRC20, gasFee); + } + + /** + * @dev Withraws ZRC20 tokens to external chains, this function causes cctx module to send out outbound tx to the outbound chain + * this contract should be given enough allowance of the gas ZRC20 to pay for outbound tx gas fee. + * @param to, recipient address. + * @param amount, amount to deposit. + * @return true/false if succeeded/failed. + */ + function withdraw(bytes memory to, uint256 amount) external override returns (bool) { + (address gasZRC20, uint256 gasFee) = withdrawGasFee(); + if (!IZRC20(gasZRC20).transferFrom(msg.sender, FUNGIBLE_MODULE_ADDRESS, gasFee)) { + revert GasFeeTransferFailed(); + } + _burn(msg.sender, amount); + emit Withdrawal(msg.sender, to, amount, gasFee, PROTOCOL_FLAT_FEE); + return true; + } + + /** + * @dev Updates system contract address. Can only be updated by the fungible module. + * @param addr, new system contract address. + */ + // TODO: Finalize access control + // https://github.com/zeta-chain/protocol-contracts/issues/204 + function updateSystemContractAddress(address addr) external onlyFungible { + SYSTEM_CONTRACT_ADDRESS = addr; + emit UpdatedSystemContract(addr); + } + + /** + * @dev Updates gas limit. Can only be updated by the fungible module. + * @param gasLimit, new gas limit. + */ + // TODO: Finalize access control + // https://github.com/zeta-chain/protocol-contracts/issues/204 + function updateGasLimit(uint256 gasLimit) external onlyFungible { + GAS_LIMIT = gasLimit; + emit UpdatedGasLimit(gasLimit); + } + + /** + * @dev Updates protocol flat fee. Can only be updated by the fungible module. + * @param protocolFlatFee, new protocol flat fee. + */ + // TODO: Finalize access control + // https://github.com/zeta-chain/protocol-contracts/issues/204 + function updateProtocolFlatFee(uint256 protocolFlatFee) external onlyFungible { + PROTOCOL_FLAT_FEE = protocolFlatFee; + emit UpdatedProtocolFlatFee(protocolFlatFee); + } +} diff --git a/contracts/prototypes/zevm/interfaces.sol b/contracts/prototypes/zevm/interfaces.sol new file mode 100644 index 00000000..0ac42801 --- /dev/null +++ b/contracts/prototypes/zevm/interfaces.sol @@ -0,0 +1,34 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.8.7; + +import "../../zevm/interfaces/zContract.sol"; + +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; + + function deposit( + address zrc20, + uint256 amount, + address target + ) external; + + function execute( + zContext calldata context, + address zrc20, + uint256 amount, + address target, + bytes calldata message + ) external; + + function depositAndCall( + zContext calldata context, + address zrc20, + uint256 amount, + address target, + bytes calldata message + ) external; +} \ No newline at end of file diff --git a/contracts/zevm/ZRC20.sol b/contracts/zevm/ZRC20.sol index 5e132fcf..5d758c89 100644 --- a/contracts/zevm/ZRC20.sol +++ b/contracts/zevm/ZRC20.sol @@ -235,9 +235,8 @@ contract ZRC20 is IZRC20, IZRC20Metadata, ZRC20Errors { */ function withdrawGasFee() public view override returns (address, uint256) { address gasZRC20 = ISystem(SYSTEM_CONTRACT_ADDRESS).gasCoinZRC20ByChainId(CHAIN_ID); - if (gasZRC20 == address(0)) { - revert ZeroGasCoin(); - } + if (gasZRC20 == address(0)) revert ZeroGasCoin(); + uint256 gasPrice = ISystem(SYSTEM_CONTRACT_ADDRESS).gasPriceByChainId(CHAIN_ID); if (gasPrice == 0) { revert ZeroGasPrice(); 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/docs/src/contracts/evm/tools/ZetaTokenConsumerZEVM.strategy.sol/contract.ZetaTokenConsumerZEVM.md b/docs/src/contracts/evm/tools/ZetaTokenConsumerZEVM.strategy.sol/contract.ZetaTokenConsumerZEVM.md new file mode 100644 index 00000000..05639448 --- /dev/null +++ b/docs/src/contracts/evm/tools/ZetaTokenConsumerZEVM.strategy.sol/contract.ZetaTokenConsumerZEVM.md @@ -0,0 +1,94 @@ +# ZetaTokenConsumerZEVM +[Git Source](https://github.com/zeta-chain/protocol-contracts/blob/6aed43c93d3900874969a54408401c17997e7cb9/contracts/evm/tools/ZetaTokenConsumerZEVM.strategy.sol) + +**Inherits:** +[ZetaTokenConsumer](/contracts/evm/interfaces/ZetaInterfaces.sol/interface.ZetaTokenConsumer.md), [ZetaTokenConsumerZEVMErrors](/contracts/evm/tools/ZetaTokenConsumerZEVM.strategy.sol/interface.ZetaTokenConsumerZEVMErrors.md) + +*ZetaTokenConsumer for ZEVM* + + +## State Variables +### MAX_DEADLINE + +```solidity +uint256 internal constant MAX_DEADLINE = 200; +``` + + +### WETH9Address + +```solidity +address public immutable WETH9Address; +``` + + +### uniswapV2Router + +```solidity +IUniswapV2Router02 internal immutable uniswapV2Router; +``` + + +## Functions +### constructor + + +```solidity +constructor(address WETH9Address_, address uniswapV2Router_); +``` + +### getZetaFromEth + + +```solidity +function getZetaFromEth(address destinationAddress, uint256 minAmountOut) external payable override returns (uint256); +``` + +### getZetaFromToken + + +```solidity +function getZetaFromToken( + address destinationAddress, + uint256 minAmountOut, + address inputToken, + uint256 inputTokenAmount +) external override returns (uint256); +``` + +### getEthFromZeta + + +```solidity +function getEthFromZeta(address destinationAddress, uint256 minAmountOut, uint256 zetaTokenAmount) + external + override + returns (uint256); +``` + +### getTokenFromZeta + + +```solidity +function getTokenFromZeta( + address destinationAddress, + uint256 minAmountOut, + address outputToken, + uint256 zetaTokenAmount +) external override returns (uint256); +``` + +### hasZetaLiquidity + + +```solidity +function hasZetaLiquidity() external view override returns (bool); +``` + +### receive + + +```solidity +receive() external payable; +``` + diff --git a/docs/src/contracts/evm/tools/ZetaTokenConsumerZEVM.strategy.sol/interface.ZetaTokenConsumerZEVMErrors.md b/docs/src/contracts/evm/tools/ZetaTokenConsumerZEVM.strategy.sol/interface.ZetaTokenConsumerZEVMErrors.md new file mode 100644 index 00000000..86267001 --- /dev/null +++ b/docs/src/contracts/evm/tools/ZetaTokenConsumerZEVM.strategy.sol/interface.ZetaTokenConsumerZEVMErrors.md @@ -0,0 +1,53 @@ +# ZetaTokenConsumerZEVMErrors +[Git Source](https://github.com/zeta-chain/protocol-contracts/blob/6aed43c93d3900874969a54408401c17997e7cb9/contracts/evm/tools/ZetaTokenConsumerZEVM.strategy.sol) + + +## Errors +### InputCantBeZero + +```solidity +error InputCantBeZero(); +``` + +### ErrorSendingETH + +```solidity +error ErrorSendingETH(); +``` + +### ReentrancyError + +```solidity +error ReentrancyError(); +``` + +### NotEnoughValue + +```solidity +error NotEnoughValue(); +``` + +### InputCantBeZeta + +```solidity +error InputCantBeZeta(); +``` + +### OutputCantBeZeta + +```solidity +error OutputCantBeZeta(); +``` + +### OnlyWZETAAllowed + +```solidity +error OnlyWZETAAllowed(); +``` + +### InvalidForZEVM + +```solidity +error InvalidForZEVM(); +``` + 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/hardhat.config.ts b/hardhat.config.ts index f9a48e09..263a02c4 100644 --- a/hardhat.config.ts +++ b/hardhat.config.ts @@ -3,9 +3,11 @@ import "@nomicfoundation/hardhat-verify"; import "@typechain/hardhat"; import "tsconfig-paths/register"; import "hardhat-abi-exporter"; +import "uniswap-v2-deploy-plugin"; import "solidity-coverage"; import "hardhat-gas-reporter"; import "./tasks/addresses"; +import "@openzeppelin/hardhat-upgrades"; import { getHardhatConfigNetworks } from "@zetachain/networks"; import * as dotenv from "dotenv"; diff --git a/package.json b/package.json index db5c9115..7d62bcd2 100644 --- a/package.json +++ b/package.json @@ -11,6 +11,8 @@ "@nomiclabs/hardhat-ethers": "^2.0.5", "@nomiclabs/hardhat-waffle": "^2.0.3", "@openzeppelin/contracts": "^4.8.3", + "@openzeppelin/contracts-upgradeable": "^4.8.3", + "@openzeppelin/hardhat-upgrades": "1.28.0", "@typechain/ethers-v5": "^10.1.0", "@typechain/hardhat": "^6.1.2", "@types/chai": "^4.3.1", @@ -55,7 +57,8 @@ "ts-node": "10.8.1", "tsconfig-paths": "^3.14.1", "typechain": "^8.1.0", - "typescript": "^4.6.3" + "typescript": "^4.6.3", + "uniswap-v2-deploy-plugin": "^0.0.4" }, "files": [ "contracts", @@ -82,6 +85,7 @@ "lint:sol": "solhint 'contracts/**/*.sol'", "prepublishOnly": "yarn build", "test": "npx hardhat test", + "test:prototypes": "yarn compile && npx hardhat test test/prototypes/*", "tsc:watch": "npx tsc --watch" }, "types": "./dist/lib/index.d.ts", diff --git a/pkg/contracts/prototypes/evm/erc20custodynew.sol/erc20custodynew.go b/pkg/contracts/prototypes/evm/erc20custodynew.sol/erc20custodynew.go new file mode 100644 index 00000000..aace2068 --- /dev/null +++ b/pkg/contracts/prototypes/evm/erc20custodynew.sol/erc20custodynew.go @@ -0,0 +1,585 @@ +// Code generated - DO NOT EDIT. +// This file is a generated binding and any manual changes will be lost. + +package erc20custodynew + +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 +) + +// ERC20CustodyNewMetaData contains all meta data concerning the ERC20CustodyNew contract. +var ERC20CustodyNewMetaData = &bind.MetaData{ + ABI: "[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_gateway\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"ZeroAddress\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Withdraw\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"WithdrawAndCall\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"gateway\",\"outputs\":[{\"internalType\":\"contractIGatewayEVM\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"withdraw\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"withdrawAndCall\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", + Bin: "0x60806040523480156200001157600080fd5b506040516200109038038062001090833981810160405281019062000037919062000106565b6001600081905550600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415620000a7576040517fd92e233d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550506200018b565b600081519050620001008162000171565b92915050565b6000602082840312156200011f576200011e6200016c565b5b60006200012f84828501620000ef565b91505092915050565b600062000145826200014c565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600080fd5b6200017c8162000138565b81146200018857600080fd5b50565b610ef5806200019b6000396000f3fe608060405234801561001057600080fd5b50600436106100415760003560e01c8063116191b61461004657806321fc65f214610064578063d9caed1214610080575b600080fd5b61004e61009c565b60405161005b9190610a98565b60405180910390f35b61007e600480360381019061007991906107bc565b6100c2565b005b61009a60048036038101906100959190610769565b61024a565b005b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6100ca6102ef565b610117600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16848773ffffffffffffffffffffffffffffffffffffffff1661033f9092919063ffffffff16565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16635131ab5986868686866040518663ffffffff1660e01b815260040161017a959493929190610a21565b600060405180830381600087803b15801561019457600080fd5b505af11580156101a8573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f820116820180604052508101906101d19190610871565b508373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167f85b5be9cf454e05e0bddf49315178102227c312078eefa3c00294fb4d912ae4e85858560405161023393929190610b70565b60405180910390a36102436103c5565b5050505050565b6102526102ef565b61027d82828573ffffffffffffffffffffffffffffffffffffffff1661033f9092919063ffffffff16565b8173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f9b1bfa7fa9ee420a16e124f794c35ac9f90472acc99140eb2f6447c714cad8eb836040516102da9190610b55565b60405180910390a36102ea6103c5565b505050565b60026000541415610335576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161032c90610b35565b60405180910390fd5b6002600081905550565b6103c08363a9059cbb60e01b848460405160240161035e929190610a6f565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050506103cf565b505050565b6001600081905550565b6000610431826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff166104969092919063ffffffff16565b905060008151111561049157808060200190518101906104519190610844565b610490576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161048790610b15565b60405180910390fd5b5b505050565b60606104a584846000856104ae565b90509392505050565b6060824710156104f3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016104ea90610ad5565b60405180910390fd5b6000808673ffffffffffffffffffffffffffffffffffffffff16858760405161051c9190610a0a565b60006040518083038185875af1925050503d8060008114610559576040519150601f19603f3d011682016040523d82523d6000602084013e61055e565b606091505b509150915061056f8783838761057b565b92505050949350505050565b606083156105de576000835114156105d657610596856105f1565b6105d5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105cc90610af5565b60405180910390fd5b5b8290506105e9565b6105e88383610614565b5b949350505050565b6000808273ffffffffffffffffffffffffffffffffffffffff163b119050919050565b6000825111156106275781518083602001fd5b806040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161065b9190610ab3565b60405180910390fd5b600061067761067284610bc7565b610ba2565b90508281526020810184848401111561069357610692610d6a565b5b61069e848285610cc8565b509392505050565b6000813590506106b581610e7a565b92915050565b6000815190506106ca81610e91565b92915050565b60008083601f8401126106e6576106e5610d60565b5b8235905067ffffffffffffffff81111561070357610702610d5b565b5b60208301915083600182028301111561071f5761071e610d65565b5b9250929050565b600082601f83011261073b5761073a610d60565b5b815161074b848260208601610664565b91505092915050565b60008135905061076381610ea8565b92915050565b60008060006060848603121561078257610781610d74565b5b6000610790868287016106a6565b93505060206107a1868287016106a6565b92505060406107b286828701610754565b9150509250925092565b6000806000806000608086880312156107d8576107d7610d74565b5b60006107e6888289016106a6565b95505060206107f7888289016106a6565b945050604061080888828901610754565b935050606086013567ffffffffffffffff81111561082957610828610d6f565b5b610835888289016106d0565b92509250509295509295909350565b60006020828403121561085a57610859610d74565b5b6000610868848285016106bb565b91505092915050565b60006020828403121561088757610886610d74565b5b600082015167ffffffffffffffff8111156108a5576108a4610d6f565b5b6108b184828501610726565b91505092915050565b6108c381610c3b565b82525050565b60006108d58385610c0e565b93506108e2838584610cb9565b6108eb83610d79565b840190509392505050565b600061090182610bf8565b61090b8185610c1f565b935061091b818560208601610cc8565b80840191505092915050565b61093081610c83565b82525050565b600061094182610c03565b61094b8185610c2a565b935061095b818560208601610cc8565b61096481610d79565b840191505092915050565b600061097c602683610c2a565b915061098782610d8a565b604082019050919050565b600061099f601d83610c2a565b91506109aa82610dd9565b602082019050919050565b60006109c2602a83610c2a565b91506109cd82610e02565b604082019050919050565b60006109e5601f83610c2a565b91506109f082610e51565b602082019050919050565b610a0481610c79565b82525050565b6000610a1682846108f6565b915081905092915050565b6000608082019050610a3660008301886108ba565b610a4360208301876108ba565b610a5060408301866109fb565b8181036060830152610a638184866108c9565b90509695505050505050565b6000604082019050610a8460008301856108ba565b610a9160208301846109fb565b9392505050565b6000602082019050610aad6000830184610927565b92915050565b60006020820190508181036000830152610acd8184610936565b905092915050565b60006020820190508181036000830152610aee8161096f565b9050919050565b60006020820190508181036000830152610b0e81610992565b9050919050565b60006020820190508181036000830152610b2e816109b5565b9050919050565b60006020820190508181036000830152610b4e816109d8565b9050919050565b6000602082019050610b6a60008301846109fb565b92915050565b6000604082019050610b8560008301866109fb565b8181036020830152610b988184866108c9565b9050949350505050565b6000610bac610bbd565b9050610bb88282610cfb565b919050565b6000604051905090565b600067ffffffffffffffff821115610be257610be1610d2c565b5b610beb82610d79565b9050602081019050919050565b600081519050919050565b600081519050919050565b600082825260208201905092915050565b600081905092915050565b600082825260208201905092915050565b6000610c4682610c59565b9050919050565b60008115159050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b6000610c8e82610c95565b9050919050565b6000610ca082610ca7565b9050919050565b6000610cb282610c59565b9050919050565b82818337600083830152505050565b60005b83811015610ce6578082015181840152602081019050610ccb565b83811115610cf5576000848401525b50505050565b610d0482610d79565b810181811067ffffffffffffffff82111715610d2357610d22610d2c565b5b80604052505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f416464726573733a20696e73756666696369656e742062616c616e636520666f60008201527f722063616c6c0000000000000000000000000000000000000000000000000000602082015250565b7f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000600082015250565b7f5361666545524332303a204552433230206f7065726174696f6e20646964206e60008201527f6f74207375636365656400000000000000000000000000000000000000000000602082015250565b7f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00600082015250565b610e8381610c3b565b8114610e8e57600080fd5b50565b610e9a81610c4d565b8114610ea557600080fd5b50565b610eb181610c79565b8114610ebc57600080fd5b5056fea2646970667358221220df90177bbf6ff123418400cb10905399538a40ce421b3d162daf5e7d4fa15f4864736f6c63430008070033", +} + +// ERC20CustodyNewABI is the input ABI used to generate the binding from. +// Deprecated: Use ERC20CustodyNewMetaData.ABI instead. +var ERC20CustodyNewABI = ERC20CustodyNewMetaData.ABI + +// ERC20CustodyNewBin is the compiled bytecode used for deploying new contracts. +// Deprecated: Use ERC20CustodyNewMetaData.Bin instead. +var ERC20CustodyNewBin = ERC20CustodyNewMetaData.Bin + +// DeployERC20CustodyNew deploys a new Ethereum contract, binding an instance of ERC20CustodyNew to it. +func DeployERC20CustodyNew(auth *bind.TransactOpts, backend bind.ContractBackend, _gateway common.Address) (common.Address, *types.Transaction, *ERC20CustodyNew, error) { + parsed, err := ERC20CustodyNewMetaData.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(ERC20CustodyNewBin), backend, _gateway) + if err != nil { + return common.Address{}, nil, nil, err + } + return address, tx, &ERC20CustodyNew{ERC20CustodyNewCaller: ERC20CustodyNewCaller{contract: contract}, ERC20CustodyNewTransactor: ERC20CustodyNewTransactor{contract: contract}, ERC20CustodyNewFilterer: ERC20CustodyNewFilterer{contract: contract}}, nil +} + +// ERC20CustodyNew is an auto generated Go binding around an Ethereum contract. +type ERC20CustodyNew struct { + ERC20CustodyNewCaller // Read-only binding to the contract + ERC20CustodyNewTransactor // Write-only binding to the contract + ERC20CustodyNewFilterer // Log filterer for contract events +} + +// ERC20CustodyNewCaller is an auto generated read-only Go binding around an Ethereum contract. +type ERC20CustodyNewCaller struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// ERC20CustodyNewTransactor is an auto generated write-only Go binding around an Ethereum contract. +type ERC20CustodyNewTransactor struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// ERC20CustodyNewFilterer is an auto generated log filtering Go binding around an Ethereum contract events. +type ERC20CustodyNewFilterer struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// ERC20CustodyNewSession is an auto generated Go binding around an Ethereum contract, +// with pre-set call and transact options. +type ERC20CustodyNewSession struct { + Contract *ERC20CustodyNew // 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 +} + +// ERC20CustodyNewCallerSession is an auto generated read-only Go binding around an Ethereum contract, +// with pre-set call options. +type ERC20CustodyNewCallerSession struct { + Contract *ERC20CustodyNewCaller // Generic contract caller binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session +} + +// ERC20CustodyNewTransactorSession is an auto generated write-only Go binding around an Ethereum contract, +// with pre-set transact options. +type ERC20CustodyNewTransactorSession struct { + Contract *ERC20CustodyNewTransactor // Generic contract transactor binding to set the session for + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// ERC20CustodyNewRaw is an auto generated low-level Go binding around an Ethereum contract. +type ERC20CustodyNewRaw struct { + Contract *ERC20CustodyNew // Generic contract binding to access the raw methods on +} + +// ERC20CustodyNewCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. +type ERC20CustodyNewCallerRaw struct { + Contract *ERC20CustodyNewCaller // Generic read-only contract binding to access the raw methods on +} + +// ERC20CustodyNewTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. +type ERC20CustodyNewTransactorRaw struct { + Contract *ERC20CustodyNewTransactor // Generic write-only contract binding to access the raw methods on +} + +// NewERC20CustodyNew creates a new instance of ERC20CustodyNew, bound to a specific deployed contract. +func NewERC20CustodyNew(address common.Address, backend bind.ContractBackend) (*ERC20CustodyNew, error) { + contract, err := bindERC20CustodyNew(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &ERC20CustodyNew{ERC20CustodyNewCaller: ERC20CustodyNewCaller{contract: contract}, ERC20CustodyNewTransactor: ERC20CustodyNewTransactor{contract: contract}, ERC20CustodyNewFilterer: ERC20CustodyNewFilterer{contract: contract}}, nil +} + +// NewERC20CustodyNewCaller creates a new read-only instance of ERC20CustodyNew, bound to a specific deployed contract. +func NewERC20CustodyNewCaller(address common.Address, caller bind.ContractCaller) (*ERC20CustodyNewCaller, error) { + contract, err := bindERC20CustodyNew(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &ERC20CustodyNewCaller{contract: contract}, nil +} + +// NewERC20CustodyNewTransactor creates a new write-only instance of ERC20CustodyNew, bound to a specific deployed contract. +func NewERC20CustodyNewTransactor(address common.Address, transactor bind.ContractTransactor) (*ERC20CustodyNewTransactor, error) { + contract, err := bindERC20CustodyNew(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &ERC20CustodyNewTransactor{contract: contract}, nil +} + +// NewERC20CustodyNewFilterer creates a new log filterer instance of ERC20CustodyNew, bound to a specific deployed contract. +func NewERC20CustodyNewFilterer(address common.Address, filterer bind.ContractFilterer) (*ERC20CustodyNewFilterer, error) { + contract, err := bindERC20CustodyNew(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &ERC20CustodyNewFilterer{contract: contract}, nil +} + +// bindERC20CustodyNew binds a generic wrapper to an already deployed contract. +func bindERC20CustodyNew(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := ERC20CustodyNewMetaData.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 (_ERC20CustodyNew *ERC20CustodyNewRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _ERC20CustodyNew.Contract.ERC20CustodyNewCaller.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 (_ERC20CustodyNew *ERC20CustodyNewRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _ERC20CustodyNew.Contract.ERC20CustodyNewTransactor.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_ERC20CustodyNew *ERC20CustodyNewRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _ERC20CustodyNew.Contract.ERC20CustodyNewTransactor.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 (_ERC20CustodyNew *ERC20CustodyNewCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _ERC20CustodyNew.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 (_ERC20CustodyNew *ERC20CustodyNewTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _ERC20CustodyNew.Contract.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_ERC20CustodyNew *ERC20CustodyNewTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _ERC20CustodyNew.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 (_ERC20CustodyNew *ERC20CustodyNewCaller) Gateway(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _ERC20CustodyNew.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 (_ERC20CustodyNew *ERC20CustodyNewSession) Gateway() (common.Address, error) { + return _ERC20CustodyNew.Contract.Gateway(&_ERC20CustodyNew.CallOpts) +} + +// Gateway is a free data retrieval call binding the contract method 0x116191b6. +// +// Solidity: function gateway() view returns(address) +func (_ERC20CustodyNew *ERC20CustodyNewCallerSession) Gateway() (common.Address, error) { + return _ERC20CustodyNew.Contract.Gateway(&_ERC20CustodyNew.CallOpts) +} + +// Withdraw is a paid mutator transaction binding the contract method 0xd9caed12. +// +// Solidity: function withdraw(address token, address to, uint256 amount) returns() +func (_ERC20CustodyNew *ERC20CustodyNewTransactor) Withdraw(opts *bind.TransactOpts, token common.Address, to common.Address, amount *big.Int) (*types.Transaction, error) { + return _ERC20CustodyNew.contract.Transact(opts, "withdraw", token, to, amount) +} + +// Withdraw is a paid mutator transaction binding the contract method 0xd9caed12. +// +// Solidity: function withdraw(address token, address to, uint256 amount) returns() +func (_ERC20CustodyNew *ERC20CustodyNewSession) Withdraw(token common.Address, to common.Address, amount *big.Int) (*types.Transaction, error) { + return _ERC20CustodyNew.Contract.Withdraw(&_ERC20CustodyNew.TransactOpts, token, to, amount) +} + +// Withdraw is a paid mutator transaction binding the contract method 0xd9caed12. +// +// Solidity: function withdraw(address token, address to, uint256 amount) returns() +func (_ERC20CustodyNew *ERC20CustodyNewTransactorSession) Withdraw(token common.Address, to common.Address, amount *big.Int) (*types.Transaction, error) { + return _ERC20CustodyNew.Contract.Withdraw(&_ERC20CustodyNew.TransactOpts, token, to, amount) +} + +// WithdrawAndCall is a paid mutator transaction binding the contract method 0x21fc65f2. +// +// Solidity: function withdrawAndCall(address token, address to, uint256 amount, bytes data) returns() +func (_ERC20CustodyNew *ERC20CustodyNewTransactor) WithdrawAndCall(opts *bind.TransactOpts, token common.Address, to common.Address, amount *big.Int, data []byte) (*types.Transaction, error) { + return _ERC20CustodyNew.contract.Transact(opts, "withdrawAndCall", token, to, amount, data) +} + +// WithdrawAndCall is a paid mutator transaction binding the contract method 0x21fc65f2. +// +// Solidity: function withdrawAndCall(address token, address to, uint256 amount, bytes data) returns() +func (_ERC20CustodyNew *ERC20CustodyNewSession) WithdrawAndCall(token common.Address, to common.Address, amount *big.Int, data []byte) (*types.Transaction, error) { + return _ERC20CustodyNew.Contract.WithdrawAndCall(&_ERC20CustodyNew.TransactOpts, token, to, amount, data) +} + +// WithdrawAndCall is a paid mutator transaction binding the contract method 0x21fc65f2. +// +// Solidity: function withdrawAndCall(address token, address to, uint256 amount, bytes data) returns() +func (_ERC20CustodyNew *ERC20CustodyNewTransactorSession) WithdrawAndCall(token common.Address, to common.Address, amount *big.Int, data []byte) (*types.Transaction, error) { + return _ERC20CustodyNew.Contract.WithdrawAndCall(&_ERC20CustodyNew.TransactOpts, token, to, amount, data) +} + +// ERC20CustodyNewWithdrawIterator is returned from FilterWithdraw and is used to iterate over the raw logs and unpacked data for Withdraw events raised by the ERC20CustodyNew contract. +type ERC20CustodyNewWithdrawIterator struct { + Event *ERC20CustodyNewWithdraw // 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 *ERC20CustodyNewWithdrawIterator) 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(ERC20CustodyNewWithdraw) + 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(ERC20CustodyNewWithdraw) + 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 *ERC20CustodyNewWithdrawIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *ERC20CustodyNewWithdrawIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// ERC20CustodyNewWithdraw represents a Withdraw event raised by the ERC20CustodyNew contract. +type ERC20CustodyNewWithdraw struct { + Token common.Address + To common.Address + Amount *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterWithdraw is a free log retrieval operation binding the contract event 0x9b1bfa7fa9ee420a16e124f794c35ac9f90472acc99140eb2f6447c714cad8eb. +// +// Solidity: event Withdraw(address indexed token, address indexed to, uint256 amount) +func (_ERC20CustodyNew *ERC20CustodyNewFilterer) FilterWithdraw(opts *bind.FilterOpts, token []common.Address, to []common.Address) (*ERC20CustodyNewWithdrawIterator, error) { + + var tokenRule []interface{} + for _, tokenItem := range token { + tokenRule = append(tokenRule, tokenItem) + } + var toRule []interface{} + for _, toItem := range to { + toRule = append(toRule, toItem) + } + + logs, sub, err := _ERC20CustodyNew.contract.FilterLogs(opts, "Withdraw", tokenRule, toRule) + if err != nil { + return nil, err + } + return &ERC20CustodyNewWithdrawIterator{contract: _ERC20CustodyNew.contract, event: "Withdraw", logs: logs, sub: sub}, nil +} + +// WatchWithdraw is a free log subscription operation binding the contract event 0x9b1bfa7fa9ee420a16e124f794c35ac9f90472acc99140eb2f6447c714cad8eb. +// +// Solidity: event Withdraw(address indexed token, address indexed to, uint256 amount) +func (_ERC20CustodyNew *ERC20CustodyNewFilterer) WatchWithdraw(opts *bind.WatchOpts, sink chan<- *ERC20CustodyNewWithdraw, token []common.Address, to []common.Address) (event.Subscription, error) { + + var tokenRule []interface{} + for _, tokenItem := range token { + tokenRule = append(tokenRule, tokenItem) + } + var toRule []interface{} + for _, toItem := range to { + toRule = append(toRule, toItem) + } + + logs, sub, err := _ERC20CustodyNew.contract.WatchLogs(opts, "Withdraw", tokenRule, toRule) + 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(ERC20CustodyNewWithdraw) + if err := _ERC20CustodyNew.contract.UnpackLog(event, "Withdraw", 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 +} + +// ParseWithdraw is a log parse operation binding the contract event 0x9b1bfa7fa9ee420a16e124f794c35ac9f90472acc99140eb2f6447c714cad8eb. +// +// Solidity: event Withdraw(address indexed token, address indexed to, uint256 amount) +func (_ERC20CustodyNew *ERC20CustodyNewFilterer) ParseWithdraw(log types.Log) (*ERC20CustodyNewWithdraw, error) { + event := new(ERC20CustodyNewWithdraw) + if err := _ERC20CustodyNew.contract.UnpackLog(event, "Withdraw", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// ERC20CustodyNewWithdrawAndCallIterator is returned from FilterWithdrawAndCall and is used to iterate over the raw logs and unpacked data for WithdrawAndCall events raised by the ERC20CustodyNew contract. +type ERC20CustodyNewWithdrawAndCallIterator struct { + Event *ERC20CustodyNewWithdrawAndCall // 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 *ERC20CustodyNewWithdrawAndCallIterator) 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(ERC20CustodyNewWithdrawAndCall) + 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(ERC20CustodyNewWithdrawAndCall) + 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 *ERC20CustodyNewWithdrawAndCallIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *ERC20CustodyNewWithdrawAndCallIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// ERC20CustodyNewWithdrawAndCall represents a WithdrawAndCall event raised by the ERC20CustodyNew contract. +type ERC20CustodyNewWithdrawAndCall struct { + Token common.Address + To common.Address + Amount *big.Int + Data []byte + Raw types.Log // Blockchain specific contextual infos +} + +// FilterWithdrawAndCall is a free log retrieval operation binding the contract event 0x85b5be9cf454e05e0bddf49315178102227c312078eefa3c00294fb4d912ae4e. +// +// Solidity: event WithdrawAndCall(address indexed token, address indexed to, uint256 amount, bytes data) +func (_ERC20CustodyNew *ERC20CustodyNewFilterer) FilterWithdrawAndCall(opts *bind.FilterOpts, token []common.Address, to []common.Address) (*ERC20CustodyNewWithdrawAndCallIterator, error) { + + var tokenRule []interface{} + for _, tokenItem := range token { + tokenRule = append(tokenRule, tokenItem) + } + var toRule []interface{} + for _, toItem := range to { + toRule = append(toRule, toItem) + } + + logs, sub, err := _ERC20CustodyNew.contract.FilterLogs(opts, "WithdrawAndCall", tokenRule, toRule) + if err != nil { + return nil, err + } + return &ERC20CustodyNewWithdrawAndCallIterator{contract: _ERC20CustodyNew.contract, event: "WithdrawAndCall", logs: logs, sub: sub}, nil +} + +// WatchWithdrawAndCall is a free log subscription operation binding the contract event 0x85b5be9cf454e05e0bddf49315178102227c312078eefa3c00294fb4d912ae4e. +// +// Solidity: event WithdrawAndCall(address indexed token, address indexed to, uint256 amount, bytes data) +func (_ERC20CustodyNew *ERC20CustodyNewFilterer) WatchWithdrawAndCall(opts *bind.WatchOpts, sink chan<- *ERC20CustodyNewWithdrawAndCall, token []common.Address, to []common.Address) (event.Subscription, error) { + + var tokenRule []interface{} + for _, tokenItem := range token { + tokenRule = append(tokenRule, tokenItem) + } + var toRule []interface{} + for _, toItem := range to { + toRule = append(toRule, toItem) + } + + logs, sub, err := _ERC20CustodyNew.contract.WatchLogs(opts, "WithdrawAndCall", tokenRule, toRule) + 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(ERC20CustodyNewWithdrawAndCall) + if err := _ERC20CustodyNew.contract.UnpackLog(event, "WithdrawAndCall", 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 +} + +// ParseWithdrawAndCall is a log parse operation binding the contract event 0x85b5be9cf454e05e0bddf49315178102227c312078eefa3c00294fb4d912ae4e. +// +// Solidity: event WithdrawAndCall(address indexed token, address indexed to, uint256 amount, bytes data) +func (_ERC20CustodyNew *ERC20CustodyNewFilterer) ParseWithdrawAndCall(log types.Log) (*ERC20CustodyNewWithdrawAndCall, error) { + event := new(ERC20CustodyNewWithdrawAndCall) + if err := _ERC20CustodyNew.contract.UnpackLog(event, "WithdrawAndCall", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} diff --git a/pkg/contracts/prototypes/evm/gatewayevm.sol/gatewayevm.go b/pkg/contracts/prototypes/evm/gatewayevm.sol/gatewayevm.go new file mode 100644 index 00000000..e3f1ec4e --- /dev/null +++ b/pkg/contracts/prototypes/evm/gatewayevm.sol/gatewayevm.go @@ -0,0 +1,1921 @@ +// Code generated - DO NOT EDIT. +// This file is a generated binding and any manual changes will be lost. + +package gatewayevm + +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 +) + +// GatewayEVMMetaData contains all meta data concerning the GatewayEVM contract. +var GatewayEVMMetaData = &bind.MetaData{ + ABI: "[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"ApprovalFailed\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"DepositFailed\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ExecutionFailed\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InsufficientERC20Amount\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InsufficientETHAmount\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ZeroAddress\",\"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\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"payload\",\"type\":\"bytes\"}],\"name\":\"Call\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"asset\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"payload\",\"type\":\"bytes\"}],\"name\":\"Deposit\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"destination\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"Executed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"ExecutedWithERC20\",\"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\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"payload\",\"type\":\"bytes\"}],\"name\":\"call\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"custody\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"}],\"name\":\"deposit\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"asset\",\"type\":\"address\"}],\"name\":\"deposit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"payload\",\"type\":\"bytes\"}],\"name\":\"depositAndCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"asset\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"payload\",\"type\":\"bytes\"}],\"name\":\"depositAndCall\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"destination\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"execute\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"executeWithERC20\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_tssAddress\",\"type\":\"address\"}],\"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\":\"_custody\",\"type\":\"address\"}],\"name\":\"setCustody\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"tssAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"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\"}]", + Bin: "0x60a06040523073ffffffffffffffffffffffffffffffffffffffff1660809073ffffffffffffffffffffffffffffffffffffffff1660601b8152503480156200004757600080fd5b50620000586200005e60201b60201c565b62000208565b600060019054906101000a900460ff1615620000b1576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401620000a8906200015c565b60405180910390fd5b60ff801660008054906101000a900460ff1660ff1614620001225760ff6000806101000a81548160ff021916908360ff1602179055507f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb384740249860ff6040516200011991906200017e565b60405180910390a15b565b6000620001336027836200019b565b91506200014082620001b9565b604082019050919050565b6200015681620001ac565b82525050565b60006020820190508181036000830152620001778162000124565b9050919050565b60006020820190506200019560008301846200014b565b92915050565b600082825260208201905092915050565b600060ff82169050919050565b7f496e697469616c697a61626c653a20636f6e747261637420697320696e69746960008201527f616c697a696e6700000000000000000000000000000000000000000000000000602082015250565b60805160601c61309b62000243600039600081816105fc0152818161068b01528181610785015281816108140152610bae015261309b6000f3fe6080604052600436106100fe5760003560e01c8063715018a611610095578063c4d66de811610064578063c4d66de8146102e4578063dda79b751461030d578063f2fde38b14610338578063f340fa0114610361578063f45346dc1461037d576100fe565b8063715018a6146102505780638c6f037f146102675780638da5cb5b14610290578063ae7a3a6f146102bb576100fe565b80634f1ef286116100d15780634f1ef286146101a15780635131ab59146101bd57806352d1902d146101fa5780635b11259114610225576100fe565b80631b8b921d146101035780631cff79cd1461012c57806329c59b5d1461015c5780633659cfe614610178575b600080fd5b34801561010f57600080fd5b5061012a600480360381019061012591906120fb565b6103a6565b005b610146600480360381019061014191906120fb565b610412565b604051610153919061278e565b60405180910390f35b610176600480360381019061017191906120fb565b610480565b005b34801561018457600080fd5b5061019f600480360381019061019a9190612046565b6105fa565b005b6101bb60048036038101906101b6919061215b565b610783565b005b3480156101c957600080fd5b506101e460048036038101906101df9190612073565b6108c0565b6040516101f1919061278e565b60405180910390f35b34801561020657600080fd5b5061020f610baa565b60405161021c919061274f565b60405180910390f35b34801561023157600080fd5b5061023a610c63565b60405161024791906126ab565b60405180910390f35b34801561025c57600080fd5b50610265610c89565b005b34801561027357600080fd5b5061028e6004803603810190610289919061220a565b610c9d565b005b34801561029c57600080fd5b506102a5610d99565b6040516102b291906126ab565b60405180910390f35b3480156102c757600080fd5b506102e260048036038101906102dd9190612046565b610dc3565b005b3480156102f057600080fd5b5061030b60048036038101906103069190612046565b610e07565b005b34801561031957600080fd5b50610322610ff6565b60405161032f91906126ab565b60405180910390f35b34801561034457600080fd5b5061035f600480360381019061035a9190612046565b61101c565b005b61037b60048036038101906103769190612046565b6110a0565b005b34801561038957600080fd5b506103a4600480360381019061039f91906121b7565b611214565b005b8273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f2a21062ee9199c2e205622999eeb7c3da73153674f36a0acd3f74fa6af67bde3848460405161040592919061276a565b60405180910390a3505050565b6060600061042185858561130a565b90508473ffffffffffffffffffffffffffffffffffffffff167fcaf938de11c367272220bfd1d2baa99ca46665e7bc4d85f00adb51b90fe1fa9f34868660405161046d93929190612a09565b60405180910390a2809150509392505050565b60003414156104bb576040517f7671265e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600060ca60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163460405161050390612696565b60006040518083038185875af1925050503d8060008114610540576040519150601f19603f3d011682016040523d82523d6000602084013e610545565b606091505b50509050600015158115151415610588576040517f79cacff100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8373ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f2103daedac6c1eee9e5bfbd02064d751c9ec3c03fb9bc3e4f94ca41afa38c1a434600087876040516105ec949392919061298d565b60405180910390a350505050565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163073ffffffffffffffffffffffffffffffffffffffff161415610689576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106809061280d565b60405180910390fd5b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166106c86113c1565b73ffffffffffffffffffffffffffffffffffffffff161461071e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107159061282d565b60405180910390fd5b61072781611418565b61078081600067ffffffffffffffff81111561074657610745612bca565b5b6040519080825280601f01601f1916602001820160405280156107785781602001600182028036833780820191505090505b506000611423565b50565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163073ffffffffffffffffffffffffffffffffffffffff161415610812576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016108099061280d565b60405180910390fd5b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166108516113c1565b73ffffffffffffffffffffffffffffffffffffffff16146108a7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161089e9061282d565b60405180910390fd5b6108b082611418565b6108bc82826001611423565b5050565b606060008414156108fd576040517f7671265e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61090786866115a0565b61093d576040517f8164f84200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8573ffffffffffffffffffffffffffffffffffffffff1663095ea7b386866040518363ffffffff1660e01b8152600401610978929190612726565b602060405180830381600087803b15801561099257600080fd5b505af11580156109a6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109ca9190612292565b610a00576040517f8164f84200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000610a0d86858561130a565b9050610a1987876115a0565b610a4f576040517f8164f84200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008773ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401610a8a91906126ab565b60206040518083038186803b158015610aa257600080fd5b505afa158015610ab6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ada91906122ec565b90506000811115610b3357610b3260c960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16828a73ffffffffffffffffffffffffffffffffffffffff166116389092919063ffffffff16565b5b8673ffffffffffffffffffffffffffffffffffffffff168873ffffffffffffffffffffffffffffffffffffffff167f29c40793bffd84cb810179f15d1ceec72bc7f0785514c668ba36645cf99b7382888888604051610b9493929190612a09565b60405180910390a3819250505095945050505050565b60007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163073ffffffffffffffffffffffffffffffffffffffff1614610c3a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c319061286d565b60405180910390fd5b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc60001b905090565b60ca60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b610c916116be565b610c9b600061173c565b565b6000841415610cd8576040517f951e19ed00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610d273360c960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16868673ffffffffffffffffffffffffffffffffffffffff16611802909392919063ffffffff16565b8473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f2103daedac6c1eee9e5bfbd02064d751c9ec3c03fb9bc3e4f94ca41afa38c1a486868686604051610d8a949392919061298d565b60405180910390a35050505050565b6000603360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b8060c960006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b60008060019054906101000a900460ff16159050808015610e385750600160008054906101000a900460ff1660ff16105b80610e655750610e473061188b565b158015610e645750600160008054906101000a900460ff1660ff16145b5b610ea4576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e9b906128ad565b60405180910390fd5b60016000806101000a81548160ff021916908360ff1602179055508015610ee1576001600060016101000a81548160ff0219169083151502179055505b610ee96118ae565b610ef1611907565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610f58576040517fd92e233d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8160ca60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508015610ff25760008060016101000a81548160ff0219169083151502179055507f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024986001604051610fe991906127b0565b60405180910390a15b5050565b60c960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6110246116be565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415611094576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161108b906127ed565b60405180910390fd5b61109d8161173c565b50565b60003414156110db576040517f7671265e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600060ca60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163460405161112390612696565b60006040518083038185875af1925050503d8060008114611160576040519150601f19603f3d011682016040523d82523d6000602084013e611165565b606091505b505090506000151581151514156111a8576040517f79cacff100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8173ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f2103daedac6c1eee9e5bfbd02064d751c9ec3c03fb9bc3e4f94ca41afa38c1a43460006040516112089291906129cd565b60405180910390a35050565b600082141561124f576040517f951e19ed00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61129e3360c960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16848473ffffffffffffffffffffffffffffffffffffffff16611802909392919063ffffffff16565b8273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f2103daedac6c1eee9e5bfbd02064d751c9ec3c03fb9bc3e4f94ca41afa38c1a484846040516112fd9291906129cd565b60405180910390a3505050565b60606000808573ffffffffffffffffffffffffffffffffffffffff16348686604051611337929190612666565b60006040518083038185875af1925050503d8060008114611374576040519150601f19603f3d011682016040523d82523d6000602084013e611379565b606091505b5091509150816113b5576040517facfdb44400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80925050509392505050565b60006113ef7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc60001b611958565b60000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6114206116be565b50565b61144f7f4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd914360001b611962565b60000160009054906101000a900460ff16156114735761146e8361196c565b61159b565b8273ffffffffffffffffffffffffffffffffffffffff166352d1902d6040518163ffffffff1660e01b815260040160206040518083038186803b1580156114b957600080fd5b505afa9250505080156114ea57506040513d601f19601f820116820180604052508101906114e791906122bf565b60015b611529576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611520906128cd565b60405180910390fd5b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc60001b811461158e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016115859061288d565b60405180910390fd5b5061159a838383611a25565b5b505050565b60008273ffffffffffffffffffffffffffffffffffffffff1663095ea7b38360006040518363ffffffff1660e01b81526004016115de9291906126fd565b602060405180830381600087803b1580156115f857600080fd5b505af115801561160c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116309190612292565b905092915050565b6116b98363a9059cbb60e01b8484604051602401611657929190612726565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050611a51565b505050565b6116c6611b18565b73ffffffffffffffffffffffffffffffffffffffff166116e4610d99565b73ffffffffffffffffffffffffffffffffffffffff161461173a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016117319061290d565b60405180910390fd5b565b6000603360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905081603360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b611885846323b872dd60e01b858585604051602401611823939291906126c6565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050611a51565b50505050565b6000808273ffffffffffffffffffffffffffffffffffffffff163b119050919050565b600060019054906101000a900460ff166118fd576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016118f49061294d565b60405180910390fd5b611905611b20565b565b600060019054906101000a900460ff16611956576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161194d9061294d565b60405180910390fd5b565b6000819050919050565b6000819050919050565b6119758161188b565b6119b4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016119ab906128ed565b60405180910390fd5b806119e17f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc60001b611958565b60000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b611a2e83611b81565b600082511180611a3b5750805b15611a4c57611a4a8383611bd0565b505b505050565b6000611ab3826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff16611bfd9092919063ffffffff16565b9050600081511115611b135780806020019051810190611ad39190612292565b611b12576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611b099061296d565b60405180910390fd5b5b505050565b600033905090565b600060019054906101000a900460ff16611b6f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611b669061294d565b60405180910390fd5b611b7f611b7a611b18565b61173c565b565b611b8a8161196c565b8073ffffffffffffffffffffffffffffffffffffffff167fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b60405160405180910390a250565b6060611bf5838360405180606001604052806027815260200161303f60279139611c15565b905092915050565b6060611c0c8484600085611c9b565b90509392505050565b60606000808573ffffffffffffffffffffffffffffffffffffffff1685604051611c3f919061267f565b600060405180830381855af49150503d8060008114611c7a576040519150601f19603f3d011682016040523d82523d6000602084013e611c7f565b606091505b5091509150611c9086838387611d68565b925050509392505050565b606082471015611ce0576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611cd79061284d565b60405180910390fd5b6000808673ffffffffffffffffffffffffffffffffffffffff168587604051611d09919061267f565b60006040518083038185875af1925050503d8060008114611d46576040519150601f19603f3d011682016040523d82523d6000602084013e611d4b565b606091505b5091509150611d5c87838387611dde565b92505050949350505050565b60608315611dcb57600083511415611dc357611d838561188b565b611dc2576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611db99061292d565b60405180910390fd5b5b829050611dd6565b611dd58383611e54565b5b949350505050565b60608315611e4157600083511415611e3957611df985611ea4565b611e38576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611e2f9061292d565b60405180910390fd5b5b829050611e4c565b611e4b8383611ec7565b5b949350505050565b600082511115611e675781518083602001fd5b806040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611e9b91906127cb565b60405180910390fd5b6000808273ffffffffffffffffffffffffffffffffffffffff163b119050919050565b600082511115611eda5781518083602001fd5b806040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611f0e91906127cb565b60405180910390fd5b6000611f2a611f2584612a60565b612a3b565b905082815260208101848484011115611f4657611f45612c08565b5b611f51848285612b57565b509392505050565b600081359050611f6881612fe2565b92915050565b600081519050611f7d81612ff9565b92915050565b600081519050611f9281613010565b92915050565b60008083601f840112611fae57611fad612bfe565b5b8235905067ffffffffffffffff811115611fcb57611fca612bf9565b5b602083019150836001820283011115611fe757611fe6612c03565b5b9250929050565b600082601f83011261200357612002612bfe565b5b8135612013848260208601611f17565b91505092915050565b60008135905061202b81613027565b92915050565b60008151905061204081613027565b92915050565b60006020828403121561205c5761205b612c12565b5b600061206a84828501611f59565b91505092915050565b60008060008060006080868803121561208f5761208e612c12565b5b600061209d88828901611f59565b95505060206120ae88828901611f59565b94505060406120bf8882890161201c565b935050606086013567ffffffffffffffff8111156120e0576120df612c0d565b5b6120ec88828901611f98565b92509250509295509295909350565b60008060006040848603121561211457612113612c12565b5b600061212286828701611f59565b935050602084013567ffffffffffffffff81111561214357612142612c0d565b5b61214f86828701611f98565b92509250509250925092565b6000806040838503121561217257612171612c12565b5b600061218085828601611f59565b925050602083013567ffffffffffffffff8111156121a1576121a0612c0d565b5b6121ad85828601611fee565b9150509250929050565b6000806000606084860312156121d0576121cf612c12565b5b60006121de86828701611f59565b93505060206121ef8682870161201c565b925050604061220086828701611f59565b9150509250925092565b60008060008060006080868803121561222657612225612c12565b5b600061223488828901611f59565b95505060206122458882890161201c565b945050604061225688828901611f59565b935050606086013567ffffffffffffffff81111561227757612276612c0d565b5b61228388828901611f98565b92509250509295509295909350565b6000602082840312156122a8576122a7612c12565b5b60006122b684828501611f6e565b91505092915050565b6000602082840312156122d5576122d4612c12565b5b60006122e384828501611f83565b91505092915050565b60006020828403121561230257612301612c12565b5b600061231084828501612031565b91505092915050565b61232281612ad4565b82525050565b61233181612af2565b82525050565b60006123438385612aa7565b9350612350838584612b57565b61235983612c17565b840190509392505050565b60006123708385612ab8565b935061237d838584612b57565b82840190509392505050565b600061239482612a91565b61239e8185612aa7565b93506123ae818560208601612b66565b6123b781612c17565b840191505092915050565b60006123cd82612a91565b6123d78185612ab8565b93506123e7818560208601612b66565b80840191505092915050565b6123fc81612b33565b82525050565b61240b81612b45565b82525050565b600061241c82612a9c565b6124268185612ac3565b9350612436818560208601612b66565b61243f81612c17565b840191505092915050565b6000612457602683612ac3565b915061246282612c28565b604082019050919050565b600061247a602c83612ac3565b915061248582612c77565b604082019050919050565b600061249d602c83612ac3565b91506124a882612cc6565b604082019050919050565b60006124c0602683612ac3565b91506124cb82612d15565b604082019050919050565b60006124e3603883612ac3565b91506124ee82612d64565b604082019050919050565b6000612506602983612ac3565b915061251182612db3565b604082019050919050565b6000612529602e83612ac3565b915061253482612e02565b604082019050919050565b600061254c602e83612ac3565b915061255782612e51565b604082019050919050565b600061256f602d83612ac3565b915061257a82612ea0565b604082019050919050565b6000612592602083612ac3565b915061259d82612eef565b602082019050919050565b60006125b5600083612aa7565b91506125c082612f18565b600082019050919050565b60006125d8600083612ab8565b91506125e382612f18565b600082019050919050565b60006125fb601d83612ac3565b915061260682612f1b565b602082019050919050565b600061261e602b83612ac3565b915061262982612f44565b604082019050919050565b6000612641602a83612ac3565b915061264c82612f93565b604082019050919050565b61266081612b1c565b82525050565b6000612673828486612364565b91508190509392505050565b600061268b82846123c2565b915081905092915050565b60006126a1826125cb565b9150819050919050565b60006020820190506126c06000830184612319565b92915050565b60006060820190506126db6000830186612319565b6126e86020830185612319565b6126f56040830184612657565b949350505050565b60006040820190506127126000830185612319565b61271f60208301846123f3565b9392505050565b600060408201905061273b6000830185612319565b6127486020830184612657565b9392505050565b60006020820190506127646000830184612328565b92915050565b60006020820190508181036000830152612785818486612337565b90509392505050565b600060208201905081810360008301526127a88184612389565b905092915050565b60006020820190506127c56000830184612402565b92915050565b600060208201905081810360008301526127e58184612411565b905092915050565b600060208201905081810360008301526128068161244a565b9050919050565b600060208201905081810360008301526128268161246d565b9050919050565b6000602082019050818103600083015261284681612490565b9050919050565b60006020820190508181036000830152612866816124b3565b9050919050565b60006020820190508181036000830152612886816124d6565b9050919050565b600060208201905081810360008301526128a6816124f9565b9050919050565b600060208201905081810360008301526128c68161251c565b9050919050565b600060208201905081810360008301526128e68161253f565b9050919050565b6000602082019050818103600083015261290681612562565b9050919050565b6000602082019050818103600083015261292681612585565b9050919050565b60006020820190508181036000830152612946816125ee565b9050919050565b6000602082019050818103600083015261296681612611565b9050919050565b6000602082019050818103600083015261298681612634565b9050919050565b60006060820190506129a26000830187612657565b6129af6020830186612319565b81810360408301526129c2818486612337565b905095945050505050565b60006060820190506129e26000830185612657565b6129ef6020830184612319565b8181036040830152612a00816125a8565b90509392505050565b6000604082019050612a1e6000830186612657565b8181036020830152612a31818486612337565b9050949350505050565b6000612a45612a56565b9050612a518282612b99565b919050565b6000604051905090565b600067ffffffffffffffff821115612a7b57612a7a612bca565b5b612a8482612c17565b9050602081019050919050565b600081519050919050565b600081519050919050565b600082825260208201905092915050565b600081905092915050565b600082825260208201905092915050565b6000612adf82612afc565b9050919050565b60008115159050919050565b6000819050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b6000612b3e82612b1c565b9050919050565b6000612b5082612b26565b9050919050565b82818337600083830152505050565b60005b83811015612b84578082015181840152602081019050612b69565b83811115612b93576000848401525b50505050565b612ba282612c17565b810181811067ffffffffffffffff82111715612bc157612bc0612bca565b5b80604052505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b7f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060008201527f64656c656761746563616c6c0000000000000000000000000000000000000000602082015250565b7f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060008201527f6163746976652070726f78790000000000000000000000000000000000000000602082015250565b7f416464726573733a20696e73756666696369656e742062616c616e636520666f60008201527f722063616c6c0000000000000000000000000000000000000000000000000000602082015250565b7f555550535570677261646561626c653a206d757374206e6f742062652063616c60008201527f6c6564207468726f7567682064656c656761746563616c6c0000000000000000602082015250565b7f45524331393637557067726164653a20756e737570706f727465642070726f7860008201527f6961626c65555549440000000000000000000000000000000000000000000000602082015250565b7f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160008201527f647920696e697469616c697a6564000000000000000000000000000000000000602082015250565b7f45524331393637557067726164653a206e657720696d706c656d656e7461746960008201527f6f6e206973206e6f742055555053000000000000000000000000000000000000602082015250565b7f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60008201527f6f74206120636f6e747261637400000000000000000000000000000000000000602082015250565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b50565b7f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000600082015250565b7f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960008201527f6e697469616c697a696e67000000000000000000000000000000000000000000602082015250565b7f5361666545524332303a204552433230206f7065726174696f6e20646964206e60008201527f6f74207375636365656400000000000000000000000000000000000000000000602082015250565b612feb81612ad4565b8114612ff657600080fd5b50565b61300281612ae6565b811461300d57600080fd5b50565b61301981612af2565b811461302457600080fd5b50565b61303081612b1c565b811461303b57600080fd5b5056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a2646970667358221220ce6c31e036a415fe1b2bbbacae5415c7dea6e9294c986a57647ed0eb0b94d4d064736f6c63430008070033", +} + +// GatewayEVMABI is the input ABI used to generate the binding from. +// Deprecated: Use GatewayEVMMetaData.ABI instead. +var GatewayEVMABI = GatewayEVMMetaData.ABI + +// GatewayEVMBin is the compiled bytecode used for deploying new contracts. +// Deprecated: Use GatewayEVMMetaData.Bin instead. +var GatewayEVMBin = GatewayEVMMetaData.Bin + +// DeployGatewayEVM deploys a new Ethereum contract, binding an instance of GatewayEVM to it. +func DeployGatewayEVM(auth *bind.TransactOpts, backend bind.ContractBackend) (common.Address, *types.Transaction, *GatewayEVM, error) { + parsed, err := GatewayEVMMetaData.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(GatewayEVMBin), backend) + if err != nil { + return common.Address{}, nil, nil, err + } + return address, tx, &GatewayEVM{GatewayEVMCaller: GatewayEVMCaller{contract: contract}, GatewayEVMTransactor: GatewayEVMTransactor{contract: contract}, GatewayEVMFilterer: GatewayEVMFilterer{contract: contract}}, nil +} + +// GatewayEVM is an auto generated Go binding around an Ethereum contract. +type GatewayEVM struct { + GatewayEVMCaller // Read-only binding to the contract + GatewayEVMTransactor // Write-only binding to the contract + GatewayEVMFilterer // Log filterer for contract events +} + +// GatewayEVMCaller is an auto generated read-only Go binding around an Ethereum contract. +type GatewayEVMCaller struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// GatewayEVMTransactor is an auto generated write-only Go binding around an Ethereum contract. +type GatewayEVMTransactor struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// GatewayEVMFilterer is an auto generated log filtering Go binding around an Ethereum contract events. +type GatewayEVMFilterer struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// GatewayEVMSession is an auto generated Go binding around an Ethereum contract, +// with pre-set call and transact options. +type GatewayEVMSession struct { + Contract *GatewayEVM // 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 +} + +// GatewayEVMCallerSession is an auto generated read-only Go binding around an Ethereum contract, +// with pre-set call options. +type GatewayEVMCallerSession struct { + Contract *GatewayEVMCaller // Generic contract caller binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session +} + +// GatewayEVMTransactorSession is an auto generated write-only Go binding around an Ethereum contract, +// with pre-set transact options. +type GatewayEVMTransactorSession struct { + Contract *GatewayEVMTransactor // Generic contract transactor binding to set the session for + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// GatewayEVMRaw is an auto generated low-level Go binding around an Ethereum contract. +type GatewayEVMRaw struct { + Contract *GatewayEVM // Generic contract binding to access the raw methods on +} + +// GatewayEVMCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. +type GatewayEVMCallerRaw struct { + Contract *GatewayEVMCaller // Generic read-only contract binding to access the raw methods on +} + +// GatewayEVMTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. +type GatewayEVMTransactorRaw struct { + Contract *GatewayEVMTransactor // Generic write-only contract binding to access the raw methods on +} + +// NewGatewayEVM creates a new instance of GatewayEVM, bound to a specific deployed contract. +func NewGatewayEVM(address common.Address, backend bind.ContractBackend) (*GatewayEVM, error) { + contract, err := bindGatewayEVM(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &GatewayEVM{GatewayEVMCaller: GatewayEVMCaller{contract: contract}, GatewayEVMTransactor: GatewayEVMTransactor{contract: contract}, GatewayEVMFilterer: GatewayEVMFilterer{contract: contract}}, nil +} + +// NewGatewayEVMCaller creates a new read-only instance of GatewayEVM, bound to a specific deployed contract. +func NewGatewayEVMCaller(address common.Address, caller bind.ContractCaller) (*GatewayEVMCaller, error) { + contract, err := bindGatewayEVM(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &GatewayEVMCaller{contract: contract}, nil +} + +// NewGatewayEVMTransactor creates a new write-only instance of GatewayEVM, bound to a specific deployed contract. +func NewGatewayEVMTransactor(address common.Address, transactor bind.ContractTransactor) (*GatewayEVMTransactor, error) { + contract, err := bindGatewayEVM(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &GatewayEVMTransactor{contract: contract}, nil +} + +// NewGatewayEVMFilterer creates a new log filterer instance of GatewayEVM, bound to a specific deployed contract. +func NewGatewayEVMFilterer(address common.Address, filterer bind.ContractFilterer) (*GatewayEVMFilterer, error) { + contract, err := bindGatewayEVM(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &GatewayEVMFilterer{contract: contract}, nil +} + +// bindGatewayEVM binds a generic wrapper to an already deployed contract. +func bindGatewayEVM(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := GatewayEVMMetaData.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 (_GatewayEVM *GatewayEVMRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _GatewayEVM.Contract.GatewayEVMCaller.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 (_GatewayEVM *GatewayEVMRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _GatewayEVM.Contract.GatewayEVMTransactor.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_GatewayEVM *GatewayEVMRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _GatewayEVM.Contract.GatewayEVMTransactor.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 (_GatewayEVM *GatewayEVMCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _GatewayEVM.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 (_GatewayEVM *GatewayEVMTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _GatewayEVM.Contract.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_GatewayEVM *GatewayEVMTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _GatewayEVM.Contract.contract.Transact(opts, method, params...) +} + +// Custody is a free data retrieval call binding the contract method 0xdda79b75. +// +// Solidity: function custody() view returns(address) +func (_GatewayEVM *GatewayEVMCaller) Custody(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _GatewayEVM.contract.Call(opts, &out, "custody") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// Custody is a free data retrieval call binding the contract method 0xdda79b75. +// +// Solidity: function custody() view returns(address) +func (_GatewayEVM *GatewayEVMSession) Custody() (common.Address, error) { + return _GatewayEVM.Contract.Custody(&_GatewayEVM.CallOpts) +} + +// Custody is a free data retrieval call binding the contract method 0xdda79b75. +// +// Solidity: function custody() view returns(address) +func (_GatewayEVM *GatewayEVMCallerSession) Custody() (common.Address, error) { + return _GatewayEVM.Contract.Custody(&_GatewayEVM.CallOpts) +} + +// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. +// +// Solidity: function owner() view returns(address) +func (_GatewayEVM *GatewayEVMCaller) Owner(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _GatewayEVM.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 (_GatewayEVM *GatewayEVMSession) Owner() (common.Address, error) { + return _GatewayEVM.Contract.Owner(&_GatewayEVM.CallOpts) +} + +// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. +// +// Solidity: function owner() view returns(address) +func (_GatewayEVM *GatewayEVMCallerSession) Owner() (common.Address, error) { + return _GatewayEVM.Contract.Owner(&_GatewayEVM.CallOpts) +} + +// ProxiableUUID is a free data retrieval call binding the contract method 0x52d1902d. +// +// Solidity: function proxiableUUID() view returns(bytes32) +func (_GatewayEVM *GatewayEVMCaller) ProxiableUUID(opts *bind.CallOpts) ([32]byte, error) { + var out []interface{} + err := _GatewayEVM.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 (_GatewayEVM *GatewayEVMSession) ProxiableUUID() ([32]byte, error) { + return _GatewayEVM.Contract.ProxiableUUID(&_GatewayEVM.CallOpts) +} + +// ProxiableUUID is a free data retrieval call binding the contract method 0x52d1902d. +// +// Solidity: function proxiableUUID() view returns(bytes32) +func (_GatewayEVM *GatewayEVMCallerSession) ProxiableUUID() ([32]byte, error) { + return _GatewayEVM.Contract.ProxiableUUID(&_GatewayEVM.CallOpts) +} + +// TssAddress is a free data retrieval call binding the contract method 0x5b112591. +// +// Solidity: function tssAddress() view returns(address) +func (_GatewayEVM *GatewayEVMCaller) TssAddress(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _GatewayEVM.contract.Call(opts, &out, "tssAddress") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// TssAddress is a free data retrieval call binding the contract method 0x5b112591. +// +// Solidity: function tssAddress() view returns(address) +func (_GatewayEVM *GatewayEVMSession) TssAddress() (common.Address, error) { + return _GatewayEVM.Contract.TssAddress(&_GatewayEVM.CallOpts) +} + +// TssAddress is a free data retrieval call binding the contract method 0x5b112591. +// +// Solidity: function tssAddress() view returns(address) +func (_GatewayEVM *GatewayEVMCallerSession) TssAddress() (common.Address, error) { + return _GatewayEVM.Contract.TssAddress(&_GatewayEVM.CallOpts) +} + +// Call is a paid mutator transaction binding the contract method 0x1b8b921d. +// +// Solidity: function call(address receiver, bytes payload) returns() +func (_GatewayEVM *GatewayEVMTransactor) Call(opts *bind.TransactOpts, receiver common.Address, payload []byte) (*types.Transaction, error) { + return _GatewayEVM.contract.Transact(opts, "call", receiver, payload) +} + +// Call is a paid mutator transaction binding the contract method 0x1b8b921d. +// +// Solidity: function call(address receiver, bytes payload) returns() +func (_GatewayEVM *GatewayEVMSession) Call(receiver common.Address, payload []byte) (*types.Transaction, error) { + return _GatewayEVM.Contract.Call(&_GatewayEVM.TransactOpts, receiver, payload) +} + +// Call is a paid mutator transaction binding the contract method 0x1b8b921d. +// +// Solidity: function call(address receiver, bytes payload) returns() +func (_GatewayEVM *GatewayEVMTransactorSession) Call(receiver common.Address, payload []byte) (*types.Transaction, error) { + return _GatewayEVM.Contract.Call(&_GatewayEVM.TransactOpts, receiver, payload) +} + +// Deposit is a paid mutator transaction binding the contract method 0xf340fa01. +// +// Solidity: function deposit(address receiver) payable returns() +func (_GatewayEVM *GatewayEVMTransactor) Deposit(opts *bind.TransactOpts, receiver common.Address) (*types.Transaction, error) { + return _GatewayEVM.contract.Transact(opts, "deposit", receiver) +} + +// Deposit is a paid mutator transaction binding the contract method 0xf340fa01. +// +// Solidity: function deposit(address receiver) payable returns() +func (_GatewayEVM *GatewayEVMSession) Deposit(receiver common.Address) (*types.Transaction, error) { + return _GatewayEVM.Contract.Deposit(&_GatewayEVM.TransactOpts, receiver) +} + +// Deposit is a paid mutator transaction binding the contract method 0xf340fa01. +// +// Solidity: function deposit(address receiver) payable returns() +func (_GatewayEVM *GatewayEVMTransactorSession) Deposit(receiver common.Address) (*types.Transaction, error) { + return _GatewayEVM.Contract.Deposit(&_GatewayEVM.TransactOpts, receiver) +} + +// Deposit0 is a paid mutator transaction binding the contract method 0xf45346dc. +// +// Solidity: function deposit(address receiver, uint256 amount, address asset) returns() +func (_GatewayEVM *GatewayEVMTransactor) Deposit0(opts *bind.TransactOpts, receiver common.Address, amount *big.Int, asset common.Address) (*types.Transaction, error) { + return _GatewayEVM.contract.Transact(opts, "deposit0", receiver, amount, asset) +} + +// Deposit0 is a paid mutator transaction binding the contract method 0xf45346dc. +// +// Solidity: function deposit(address receiver, uint256 amount, address asset) returns() +func (_GatewayEVM *GatewayEVMSession) Deposit0(receiver common.Address, amount *big.Int, asset common.Address) (*types.Transaction, error) { + return _GatewayEVM.Contract.Deposit0(&_GatewayEVM.TransactOpts, receiver, amount, asset) +} + +// Deposit0 is a paid mutator transaction binding the contract method 0xf45346dc. +// +// Solidity: function deposit(address receiver, uint256 amount, address asset) returns() +func (_GatewayEVM *GatewayEVMTransactorSession) Deposit0(receiver common.Address, amount *big.Int, asset common.Address) (*types.Transaction, error) { + return _GatewayEVM.Contract.Deposit0(&_GatewayEVM.TransactOpts, receiver, amount, asset) +} + +// DepositAndCall is a paid mutator transaction binding the contract method 0x29c59b5d. +// +// Solidity: function depositAndCall(address receiver, bytes payload) payable returns() +func (_GatewayEVM *GatewayEVMTransactor) DepositAndCall(opts *bind.TransactOpts, receiver common.Address, payload []byte) (*types.Transaction, error) { + return _GatewayEVM.contract.Transact(opts, "depositAndCall", receiver, payload) +} + +// DepositAndCall is a paid mutator transaction binding the contract method 0x29c59b5d. +// +// Solidity: function depositAndCall(address receiver, bytes payload) payable returns() +func (_GatewayEVM *GatewayEVMSession) DepositAndCall(receiver common.Address, payload []byte) (*types.Transaction, error) { + return _GatewayEVM.Contract.DepositAndCall(&_GatewayEVM.TransactOpts, receiver, payload) +} + +// DepositAndCall is a paid mutator transaction binding the contract method 0x29c59b5d. +// +// Solidity: function depositAndCall(address receiver, bytes payload) payable returns() +func (_GatewayEVM *GatewayEVMTransactorSession) DepositAndCall(receiver common.Address, payload []byte) (*types.Transaction, error) { + return _GatewayEVM.Contract.DepositAndCall(&_GatewayEVM.TransactOpts, receiver, payload) +} + +// DepositAndCall0 is a paid mutator transaction binding the contract method 0x8c6f037f. +// +// Solidity: function depositAndCall(address receiver, uint256 amount, address asset, bytes payload) returns() +func (_GatewayEVM *GatewayEVMTransactor) DepositAndCall0(opts *bind.TransactOpts, receiver common.Address, amount *big.Int, asset common.Address, payload []byte) (*types.Transaction, error) { + return _GatewayEVM.contract.Transact(opts, "depositAndCall0", receiver, amount, asset, payload) +} + +// DepositAndCall0 is a paid mutator transaction binding the contract method 0x8c6f037f. +// +// Solidity: function depositAndCall(address receiver, uint256 amount, address asset, bytes payload) returns() +func (_GatewayEVM *GatewayEVMSession) DepositAndCall0(receiver common.Address, amount *big.Int, asset common.Address, payload []byte) (*types.Transaction, error) { + return _GatewayEVM.Contract.DepositAndCall0(&_GatewayEVM.TransactOpts, receiver, amount, asset, payload) +} + +// DepositAndCall0 is a paid mutator transaction binding the contract method 0x8c6f037f. +// +// Solidity: function depositAndCall(address receiver, uint256 amount, address asset, bytes payload) returns() +func (_GatewayEVM *GatewayEVMTransactorSession) DepositAndCall0(receiver common.Address, amount *big.Int, asset common.Address, payload []byte) (*types.Transaction, error) { + return _GatewayEVM.Contract.DepositAndCall0(&_GatewayEVM.TransactOpts, receiver, amount, asset, payload) +} + +// Execute is a paid mutator transaction binding the contract method 0x1cff79cd. +// +// Solidity: function execute(address destination, bytes data) payable returns(bytes) +func (_GatewayEVM *GatewayEVMTransactor) Execute(opts *bind.TransactOpts, destination common.Address, data []byte) (*types.Transaction, error) { + return _GatewayEVM.contract.Transact(opts, "execute", destination, data) +} + +// Execute is a paid mutator transaction binding the contract method 0x1cff79cd. +// +// Solidity: function execute(address destination, bytes data) payable returns(bytes) +func (_GatewayEVM *GatewayEVMSession) Execute(destination common.Address, data []byte) (*types.Transaction, error) { + return _GatewayEVM.Contract.Execute(&_GatewayEVM.TransactOpts, destination, data) +} + +// Execute is a paid mutator transaction binding the contract method 0x1cff79cd. +// +// Solidity: function execute(address destination, bytes data) payable returns(bytes) +func (_GatewayEVM *GatewayEVMTransactorSession) Execute(destination common.Address, data []byte) (*types.Transaction, error) { + return _GatewayEVM.Contract.Execute(&_GatewayEVM.TransactOpts, destination, data) +} + +// ExecuteWithERC20 is a paid mutator transaction binding the contract method 0x5131ab59. +// +// Solidity: function executeWithERC20(address token, address to, uint256 amount, bytes data) returns(bytes) +func (_GatewayEVM *GatewayEVMTransactor) ExecuteWithERC20(opts *bind.TransactOpts, token common.Address, to common.Address, amount *big.Int, data []byte) (*types.Transaction, error) { + return _GatewayEVM.contract.Transact(opts, "executeWithERC20", token, to, amount, data) +} + +// ExecuteWithERC20 is a paid mutator transaction binding the contract method 0x5131ab59. +// +// Solidity: function executeWithERC20(address token, address to, uint256 amount, bytes data) returns(bytes) +func (_GatewayEVM *GatewayEVMSession) ExecuteWithERC20(token common.Address, to common.Address, amount *big.Int, data []byte) (*types.Transaction, error) { + return _GatewayEVM.Contract.ExecuteWithERC20(&_GatewayEVM.TransactOpts, token, to, amount, data) +} + +// ExecuteWithERC20 is a paid mutator transaction binding the contract method 0x5131ab59. +// +// Solidity: function executeWithERC20(address token, address to, uint256 amount, bytes data) returns(bytes) +func (_GatewayEVM *GatewayEVMTransactorSession) ExecuteWithERC20(token common.Address, to common.Address, amount *big.Int, data []byte) (*types.Transaction, error) { + return _GatewayEVM.Contract.ExecuteWithERC20(&_GatewayEVM.TransactOpts, token, to, amount, data) +} + +// Initialize is a paid mutator transaction binding the contract method 0xc4d66de8. +// +// Solidity: function initialize(address _tssAddress) returns() +func (_GatewayEVM *GatewayEVMTransactor) Initialize(opts *bind.TransactOpts, _tssAddress common.Address) (*types.Transaction, error) { + return _GatewayEVM.contract.Transact(opts, "initialize", _tssAddress) +} + +// Initialize is a paid mutator transaction binding the contract method 0xc4d66de8. +// +// Solidity: function initialize(address _tssAddress) returns() +func (_GatewayEVM *GatewayEVMSession) Initialize(_tssAddress common.Address) (*types.Transaction, error) { + return _GatewayEVM.Contract.Initialize(&_GatewayEVM.TransactOpts, _tssAddress) +} + +// Initialize is a paid mutator transaction binding the contract method 0xc4d66de8. +// +// Solidity: function initialize(address _tssAddress) returns() +func (_GatewayEVM *GatewayEVMTransactorSession) Initialize(_tssAddress common.Address) (*types.Transaction, error) { + return _GatewayEVM.Contract.Initialize(&_GatewayEVM.TransactOpts, _tssAddress) +} + +// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. +// +// Solidity: function renounceOwnership() returns() +func (_GatewayEVM *GatewayEVMTransactor) RenounceOwnership(opts *bind.TransactOpts) (*types.Transaction, error) { + return _GatewayEVM.contract.Transact(opts, "renounceOwnership") +} + +// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. +// +// Solidity: function renounceOwnership() returns() +func (_GatewayEVM *GatewayEVMSession) RenounceOwnership() (*types.Transaction, error) { + return _GatewayEVM.Contract.RenounceOwnership(&_GatewayEVM.TransactOpts) +} + +// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. +// +// Solidity: function renounceOwnership() returns() +func (_GatewayEVM *GatewayEVMTransactorSession) RenounceOwnership() (*types.Transaction, error) { + return _GatewayEVM.Contract.RenounceOwnership(&_GatewayEVM.TransactOpts) +} + +// SetCustody is a paid mutator transaction binding the contract method 0xae7a3a6f. +// +// Solidity: function setCustody(address _custody) returns() +func (_GatewayEVM *GatewayEVMTransactor) SetCustody(opts *bind.TransactOpts, _custody common.Address) (*types.Transaction, error) { + return _GatewayEVM.contract.Transact(opts, "setCustody", _custody) +} + +// SetCustody is a paid mutator transaction binding the contract method 0xae7a3a6f. +// +// Solidity: function setCustody(address _custody) returns() +func (_GatewayEVM *GatewayEVMSession) SetCustody(_custody common.Address) (*types.Transaction, error) { + return _GatewayEVM.Contract.SetCustody(&_GatewayEVM.TransactOpts, _custody) +} + +// SetCustody is a paid mutator transaction binding the contract method 0xae7a3a6f. +// +// Solidity: function setCustody(address _custody) returns() +func (_GatewayEVM *GatewayEVMTransactorSession) SetCustody(_custody common.Address) (*types.Transaction, error) { + return _GatewayEVM.Contract.SetCustody(&_GatewayEVM.TransactOpts, _custody) +} + +// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// +// Solidity: function transferOwnership(address newOwner) returns() +func (_GatewayEVM *GatewayEVMTransactor) TransferOwnership(opts *bind.TransactOpts, newOwner common.Address) (*types.Transaction, error) { + return _GatewayEVM.contract.Transact(opts, "transferOwnership", newOwner) +} + +// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// +// Solidity: function transferOwnership(address newOwner) returns() +func (_GatewayEVM *GatewayEVMSession) TransferOwnership(newOwner common.Address) (*types.Transaction, error) { + return _GatewayEVM.Contract.TransferOwnership(&_GatewayEVM.TransactOpts, newOwner) +} + +// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// +// Solidity: function transferOwnership(address newOwner) returns() +func (_GatewayEVM *GatewayEVMTransactorSession) TransferOwnership(newOwner common.Address) (*types.Transaction, error) { + return _GatewayEVM.Contract.TransferOwnership(&_GatewayEVM.TransactOpts, newOwner) +} + +// UpgradeTo is a paid mutator transaction binding the contract method 0x3659cfe6. +// +// Solidity: function upgradeTo(address newImplementation) returns() +func (_GatewayEVM *GatewayEVMTransactor) UpgradeTo(opts *bind.TransactOpts, newImplementation common.Address) (*types.Transaction, error) { + return _GatewayEVM.contract.Transact(opts, "upgradeTo", newImplementation) +} + +// UpgradeTo is a paid mutator transaction binding the contract method 0x3659cfe6. +// +// Solidity: function upgradeTo(address newImplementation) returns() +func (_GatewayEVM *GatewayEVMSession) UpgradeTo(newImplementation common.Address) (*types.Transaction, error) { + return _GatewayEVM.Contract.UpgradeTo(&_GatewayEVM.TransactOpts, newImplementation) +} + +// UpgradeTo is a paid mutator transaction binding the contract method 0x3659cfe6. +// +// Solidity: function upgradeTo(address newImplementation) returns() +func (_GatewayEVM *GatewayEVMTransactorSession) UpgradeTo(newImplementation common.Address) (*types.Transaction, error) { + return _GatewayEVM.Contract.UpgradeTo(&_GatewayEVM.TransactOpts, newImplementation) +} + +// UpgradeToAndCall is a paid mutator transaction binding the contract method 0x4f1ef286. +// +// Solidity: function upgradeToAndCall(address newImplementation, bytes data) payable returns() +func (_GatewayEVM *GatewayEVMTransactor) UpgradeToAndCall(opts *bind.TransactOpts, newImplementation common.Address, data []byte) (*types.Transaction, error) { + return _GatewayEVM.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 (_GatewayEVM *GatewayEVMSession) UpgradeToAndCall(newImplementation common.Address, data []byte) (*types.Transaction, error) { + return _GatewayEVM.Contract.UpgradeToAndCall(&_GatewayEVM.TransactOpts, newImplementation, data) +} + +// UpgradeToAndCall is a paid mutator transaction binding the contract method 0x4f1ef286. +// +// Solidity: function upgradeToAndCall(address newImplementation, bytes data) payable returns() +func (_GatewayEVM *GatewayEVMTransactorSession) UpgradeToAndCall(newImplementation common.Address, data []byte) (*types.Transaction, error) { + return _GatewayEVM.Contract.UpgradeToAndCall(&_GatewayEVM.TransactOpts, newImplementation, data) +} + +// GatewayEVMAdminChangedIterator is returned from FilterAdminChanged and is used to iterate over the raw logs and unpacked data for AdminChanged events raised by the GatewayEVM contract. +type GatewayEVMAdminChangedIterator struct { + Event *GatewayEVMAdminChanged // 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 *GatewayEVMAdminChangedIterator) 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(GatewayEVMAdminChanged) + 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(GatewayEVMAdminChanged) + 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 *GatewayEVMAdminChangedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *GatewayEVMAdminChangedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// GatewayEVMAdminChanged represents a AdminChanged event raised by the GatewayEVM contract. +type GatewayEVMAdminChanged 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 (_GatewayEVM *GatewayEVMFilterer) FilterAdminChanged(opts *bind.FilterOpts) (*GatewayEVMAdminChangedIterator, error) { + + logs, sub, err := _GatewayEVM.contract.FilterLogs(opts, "AdminChanged") + if err != nil { + return nil, err + } + return &GatewayEVMAdminChangedIterator{contract: _GatewayEVM.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 (_GatewayEVM *GatewayEVMFilterer) WatchAdminChanged(opts *bind.WatchOpts, sink chan<- *GatewayEVMAdminChanged) (event.Subscription, error) { + + logs, sub, err := _GatewayEVM.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(GatewayEVMAdminChanged) + if err := _GatewayEVM.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 (_GatewayEVM *GatewayEVMFilterer) ParseAdminChanged(log types.Log) (*GatewayEVMAdminChanged, error) { + event := new(GatewayEVMAdminChanged) + if err := _GatewayEVM.contract.UnpackLog(event, "AdminChanged", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// GatewayEVMBeaconUpgradedIterator is returned from FilterBeaconUpgraded and is used to iterate over the raw logs and unpacked data for BeaconUpgraded events raised by the GatewayEVM contract. +type GatewayEVMBeaconUpgradedIterator struct { + Event *GatewayEVMBeaconUpgraded // 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 *GatewayEVMBeaconUpgradedIterator) 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(GatewayEVMBeaconUpgraded) + 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(GatewayEVMBeaconUpgraded) + 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 *GatewayEVMBeaconUpgradedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *GatewayEVMBeaconUpgradedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// GatewayEVMBeaconUpgraded represents a BeaconUpgraded event raised by the GatewayEVM contract. +type GatewayEVMBeaconUpgraded 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 (_GatewayEVM *GatewayEVMFilterer) FilterBeaconUpgraded(opts *bind.FilterOpts, beacon []common.Address) (*GatewayEVMBeaconUpgradedIterator, error) { + + var beaconRule []interface{} + for _, beaconItem := range beacon { + beaconRule = append(beaconRule, beaconItem) + } + + logs, sub, err := _GatewayEVM.contract.FilterLogs(opts, "BeaconUpgraded", beaconRule) + if err != nil { + return nil, err + } + return &GatewayEVMBeaconUpgradedIterator{contract: _GatewayEVM.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 (_GatewayEVM *GatewayEVMFilterer) WatchBeaconUpgraded(opts *bind.WatchOpts, sink chan<- *GatewayEVMBeaconUpgraded, beacon []common.Address) (event.Subscription, error) { + + var beaconRule []interface{} + for _, beaconItem := range beacon { + beaconRule = append(beaconRule, beaconItem) + } + + logs, sub, err := _GatewayEVM.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(GatewayEVMBeaconUpgraded) + if err := _GatewayEVM.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 (_GatewayEVM *GatewayEVMFilterer) ParseBeaconUpgraded(log types.Log) (*GatewayEVMBeaconUpgraded, error) { + event := new(GatewayEVMBeaconUpgraded) + if err := _GatewayEVM.contract.UnpackLog(event, "BeaconUpgraded", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// GatewayEVMCallIterator is returned from FilterCall and is used to iterate over the raw logs and unpacked data for Call events raised by the GatewayEVM contract. +type GatewayEVMCallIterator struct { + Event *GatewayEVMCall // 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 *GatewayEVMCallIterator) 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(GatewayEVMCall) + 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(GatewayEVMCall) + 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 *GatewayEVMCallIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *GatewayEVMCallIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// GatewayEVMCall represents a Call event raised by the GatewayEVM contract. +type GatewayEVMCall struct { + Sender common.Address + Receiver common.Address + Payload []byte + Raw types.Log // Blockchain specific contextual infos +} + +// FilterCall is a free log retrieval operation binding the contract event 0x2a21062ee9199c2e205622999eeb7c3da73153674f36a0acd3f74fa6af67bde3. +// +// Solidity: event Call(address indexed sender, address indexed receiver, bytes payload) +func (_GatewayEVM *GatewayEVMFilterer) FilterCall(opts *bind.FilterOpts, sender []common.Address, receiver []common.Address) (*GatewayEVMCallIterator, 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 := _GatewayEVM.contract.FilterLogs(opts, "Call", senderRule, receiverRule) + if err != nil { + return nil, err + } + return &GatewayEVMCallIterator{contract: _GatewayEVM.contract, event: "Call", logs: logs, sub: sub}, nil +} + +// WatchCall is a free log subscription operation binding the contract event 0x2a21062ee9199c2e205622999eeb7c3da73153674f36a0acd3f74fa6af67bde3. +// +// Solidity: event Call(address indexed sender, address indexed receiver, bytes payload) +func (_GatewayEVM *GatewayEVMFilterer) WatchCall(opts *bind.WatchOpts, sink chan<- *GatewayEVMCall, sender []common.Address, receiver []common.Address) (event.Subscription, error) { + + var senderRule []interface{} + for _, senderItem := range sender { + senderRule = append(senderRule, senderItem) + } + var receiverRule []interface{} + for _, receiverItem := range receiver { + receiverRule = append(receiverRule, receiverItem) + } + + logs, sub, err := _GatewayEVM.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(GatewayEVMCall) + if err := _GatewayEVM.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 0x2a21062ee9199c2e205622999eeb7c3da73153674f36a0acd3f74fa6af67bde3. +// +// Solidity: event Call(address indexed sender, address indexed receiver, bytes payload) +func (_GatewayEVM *GatewayEVMFilterer) ParseCall(log types.Log) (*GatewayEVMCall, error) { + event := new(GatewayEVMCall) + if err := _GatewayEVM.contract.UnpackLog(event, "Call", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// GatewayEVMDepositIterator is returned from FilterDeposit and is used to iterate over the raw logs and unpacked data for Deposit events raised by the GatewayEVM contract. +type GatewayEVMDepositIterator struct { + Event *GatewayEVMDeposit // 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 *GatewayEVMDepositIterator) 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(GatewayEVMDeposit) + 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(GatewayEVMDeposit) + 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 *GatewayEVMDepositIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *GatewayEVMDepositIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// GatewayEVMDeposit represents a Deposit event raised by the GatewayEVM contract. +type GatewayEVMDeposit struct { + Sender common.Address + Receiver common.Address + Amount *big.Int + Asset common.Address + Payload []byte + Raw types.Log // Blockchain specific contextual infos +} + +// FilterDeposit is a free log retrieval operation binding the contract event 0x2103daedac6c1eee9e5bfbd02064d751c9ec3c03fb9bc3e4f94ca41afa38c1a4. +// +// Solidity: event Deposit(address indexed sender, address indexed receiver, uint256 amount, address asset, bytes payload) +func (_GatewayEVM *GatewayEVMFilterer) FilterDeposit(opts *bind.FilterOpts, sender []common.Address, receiver []common.Address) (*GatewayEVMDepositIterator, 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 := _GatewayEVM.contract.FilterLogs(opts, "Deposit", senderRule, receiverRule) + if err != nil { + return nil, err + } + return &GatewayEVMDepositIterator{contract: _GatewayEVM.contract, event: "Deposit", logs: logs, sub: sub}, nil +} + +// WatchDeposit is a free log subscription operation binding the contract event 0x2103daedac6c1eee9e5bfbd02064d751c9ec3c03fb9bc3e4f94ca41afa38c1a4. +// +// Solidity: event Deposit(address indexed sender, address indexed receiver, uint256 amount, address asset, bytes payload) +func (_GatewayEVM *GatewayEVMFilterer) WatchDeposit(opts *bind.WatchOpts, sink chan<- *GatewayEVMDeposit, sender []common.Address, receiver []common.Address) (event.Subscription, error) { + + var senderRule []interface{} + for _, senderItem := range sender { + senderRule = append(senderRule, senderItem) + } + var receiverRule []interface{} + for _, receiverItem := range receiver { + receiverRule = append(receiverRule, receiverItem) + } + + logs, sub, err := _GatewayEVM.contract.WatchLogs(opts, "Deposit", 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(GatewayEVMDeposit) + if err := _GatewayEVM.contract.UnpackLog(event, "Deposit", 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 +} + +// ParseDeposit is a log parse operation binding the contract event 0x2103daedac6c1eee9e5bfbd02064d751c9ec3c03fb9bc3e4f94ca41afa38c1a4. +// +// Solidity: event Deposit(address indexed sender, address indexed receiver, uint256 amount, address asset, bytes payload) +func (_GatewayEVM *GatewayEVMFilterer) ParseDeposit(log types.Log) (*GatewayEVMDeposit, error) { + event := new(GatewayEVMDeposit) + if err := _GatewayEVM.contract.UnpackLog(event, "Deposit", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// GatewayEVMExecutedIterator is returned from FilterExecuted and is used to iterate over the raw logs and unpacked data for Executed events raised by the GatewayEVM contract. +type GatewayEVMExecutedIterator struct { + Event *GatewayEVMExecuted // 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 *GatewayEVMExecutedIterator) 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(GatewayEVMExecuted) + 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(GatewayEVMExecuted) + 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 *GatewayEVMExecutedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *GatewayEVMExecutedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// GatewayEVMExecuted represents a Executed event raised by the GatewayEVM contract. +type GatewayEVMExecuted struct { + Destination common.Address + Value *big.Int + Data []byte + Raw types.Log // Blockchain specific contextual infos +} + +// FilterExecuted is a free log retrieval operation binding the contract event 0xcaf938de11c367272220bfd1d2baa99ca46665e7bc4d85f00adb51b90fe1fa9f. +// +// Solidity: event Executed(address indexed destination, uint256 value, bytes data) +func (_GatewayEVM *GatewayEVMFilterer) FilterExecuted(opts *bind.FilterOpts, destination []common.Address) (*GatewayEVMExecutedIterator, error) { + + var destinationRule []interface{} + for _, destinationItem := range destination { + destinationRule = append(destinationRule, destinationItem) + } + + logs, sub, err := _GatewayEVM.contract.FilterLogs(opts, "Executed", destinationRule) + if err != nil { + return nil, err + } + return &GatewayEVMExecutedIterator{contract: _GatewayEVM.contract, event: "Executed", logs: logs, sub: sub}, nil +} + +// WatchExecuted is a free log subscription operation binding the contract event 0xcaf938de11c367272220bfd1d2baa99ca46665e7bc4d85f00adb51b90fe1fa9f. +// +// Solidity: event Executed(address indexed destination, uint256 value, bytes data) +func (_GatewayEVM *GatewayEVMFilterer) WatchExecuted(opts *bind.WatchOpts, sink chan<- *GatewayEVMExecuted, destination []common.Address) (event.Subscription, error) { + + var destinationRule []interface{} + for _, destinationItem := range destination { + destinationRule = append(destinationRule, destinationItem) + } + + logs, sub, err := _GatewayEVM.contract.WatchLogs(opts, "Executed", destinationRule) + 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(GatewayEVMExecuted) + if err := _GatewayEVM.contract.UnpackLog(event, "Executed", 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 +} + +// ParseExecuted is a log parse operation binding the contract event 0xcaf938de11c367272220bfd1d2baa99ca46665e7bc4d85f00adb51b90fe1fa9f. +// +// Solidity: event Executed(address indexed destination, uint256 value, bytes data) +func (_GatewayEVM *GatewayEVMFilterer) ParseExecuted(log types.Log) (*GatewayEVMExecuted, error) { + event := new(GatewayEVMExecuted) + if err := _GatewayEVM.contract.UnpackLog(event, "Executed", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// GatewayEVMExecutedWithERC20Iterator is returned from FilterExecutedWithERC20 and is used to iterate over the raw logs and unpacked data for ExecutedWithERC20 events raised by the GatewayEVM contract. +type GatewayEVMExecutedWithERC20Iterator struct { + Event *GatewayEVMExecutedWithERC20 // 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 *GatewayEVMExecutedWithERC20Iterator) 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(GatewayEVMExecutedWithERC20) + 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(GatewayEVMExecutedWithERC20) + 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 *GatewayEVMExecutedWithERC20Iterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *GatewayEVMExecutedWithERC20Iterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// GatewayEVMExecutedWithERC20 represents a ExecutedWithERC20 event raised by the GatewayEVM contract. +type GatewayEVMExecutedWithERC20 struct { + Token common.Address + To common.Address + Amount *big.Int + Data []byte + Raw types.Log // Blockchain specific contextual infos +} + +// FilterExecutedWithERC20 is a free log retrieval operation binding the contract event 0x29c40793bffd84cb810179f15d1ceec72bc7f0785514c668ba36645cf99b7382. +// +// Solidity: event ExecutedWithERC20(address indexed token, address indexed to, uint256 amount, bytes data) +func (_GatewayEVM *GatewayEVMFilterer) FilterExecutedWithERC20(opts *bind.FilterOpts, token []common.Address, to []common.Address) (*GatewayEVMExecutedWithERC20Iterator, error) { + + var tokenRule []interface{} + for _, tokenItem := range token { + tokenRule = append(tokenRule, tokenItem) + } + var toRule []interface{} + for _, toItem := range to { + toRule = append(toRule, toItem) + } + + logs, sub, err := _GatewayEVM.contract.FilterLogs(opts, "ExecutedWithERC20", tokenRule, toRule) + if err != nil { + return nil, err + } + return &GatewayEVMExecutedWithERC20Iterator{contract: _GatewayEVM.contract, event: "ExecutedWithERC20", logs: logs, sub: sub}, nil +} + +// WatchExecutedWithERC20 is a free log subscription operation binding the contract event 0x29c40793bffd84cb810179f15d1ceec72bc7f0785514c668ba36645cf99b7382. +// +// Solidity: event ExecutedWithERC20(address indexed token, address indexed to, uint256 amount, bytes data) +func (_GatewayEVM *GatewayEVMFilterer) WatchExecutedWithERC20(opts *bind.WatchOpts, sink chan<- *GatewayEVMExecutedWithERC20, token []common.Address, to []common.Address) (event.Subscription, error) { + + var tokenRule []interface{} + for _, tokenItem := range token { + tokenRule = append(tokenRule, tokenItem) + } + var toRule []interface{} + for _, toItem := range to { + toRule = append(toRule, toItem) + } + + logs, sub, err := _GatewayEVM.contract.WatchLogs(opts, "ExecutedWithERC20", tokenRule, toRule) + 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(GatewayEVMExecutedWithERC20) + if err := _GatewayEVM.contract.UnpackLog(event, "ExecutedWithERC20", 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 +} + +// ParseExecutedWithERC20 is a log parse operation binding the contract event 0x29c40793bffd84cb810179f15d1ceec72bc7f0785514c668ba36645cf99b7382. +// +// Solidity: event ExecutedWithERC20(address indexed token, address indexed to, uint256 amount, bytes data) +func (_GatewayEVM *GatewayEVMFilterer) ParseExecutedWithERC20(log types.Log) (*GatewayEVMExecutedWithERC20, error) { + event := new(GatewayEVMExecutedWithERC20) + if err := _GatewayEVM.contract.UnpackLog(event, "ExecutedWithERC20", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// GatewayEVMInitializedIterator is returned from FilterInitialized and is used to iterate over the raw logs and unpacked data for Initialized events raised by the GatewayEVM contract. +type GatewayEVMInitializedIterator struct { + Event *GatewayEVMInitialized // 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 *GatewayEVMInitializedIterator) 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(GatewayEVMInitialized) + 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(GatewayEVMInitialized) + 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 *GatewayEVMInitializedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *GatewayEVMInitializedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// GatewayEVMInitialized represents a Initialized event raised by the GatewayEVM contract. +type GatewayEVMInitialized 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 (_GatewayEVM *GatewayEVMFilterer) FilterInitialized(opts *bind.FilterOpts) (*GatewayEVMInitializedIterator, error) { + + logs, sub, err := _GatewayEVM.contract.FilterLogs(opts, "Initialized") + if err != nil { + return nil, err + } + return &GatewayEVMInitializedIterator{contract: _GatewayEVM.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 (_GatewayEVM *GatewayEVMFilterer) WatchInitialized(opts *bind.WatchOpts, sink chan<- *GatewayEVMInitialized) (event.Subscription, error) { + + logs, sub, err := _GatewayEVM.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(GatewayEVMInitialized) + if err := _GatewayEVM.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 (_GatewayEVM *GatewayEVMFilterer) ParseInitialized(log types.Log) (*GatewayEVMInitialized, error) { + event := new(GatewayEVMInitialized) + if err := _GatewayEVM.contract.UnpackLog(event, "Initialized", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// GatewayEVMOwnershipTransferredIterator is returned from FilterOwnershipTransferred and is used to iterate over the raw logs and unpacked data for OwnershipTransferred events raised by the GatewayEVM contract. +type GatewayEVMOwnershipTransferredIterator struct { + Event *GatewayEVMOwnershipTransferred // 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 *GatewayEVMOwnershipTransferredIterator) 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(GatewayEVMOwnershipTransferred) + 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(GatewayEVMOwnershipTransferred) + 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 *GatewayEVMOwnershipTransferredIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *GatewayEVMOwnershipTransferredIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// GatewayEVMOwnershipTransferred represents a OwnershipTransferred event raised by the GatewayEVM contract. +type GatewayEVMOwnershipTransferred 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 (_GatewayEVM *GatewayEVMFilterer) FilterOwnershipTransferred(opts *bind.FilterOpts, previousOwner []common.Address, newOwner []common.Address) (*GatewayEVMOwnershipTransferredIterator, 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 := _GatewayEVM.contract.FilterLogs(opts, "OwnershipTransferred", previousOwnerRule, newOwnerRule) + if err != nil { + return nil, err + } + return &GatewayEVMOwnershipTransferredIterator{contract: _GatewayEVM.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 (_GatewayEVM *GatewayEVMFilterer) WatchOwnershipTransferred(opts *bind.WatchOpts, sink chan<- *GatewayEVMOwnershipTransferred, 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 := _GatewayEVM.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(GatewayEVMOwnershipTransferred) + if err := _GatewayEVM.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 (_GatewayEVM *GatewayEVMFilterer) ParseOwnershipTransferred(log types.Log) (*GatewayEVMOwnershipTransferred, error) { + event := new(GatewayEVMOwnershipTransferred) + if err := _GatewayEVM.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// GatewayEVMUpgradedIterator is returned from FilterUpgraded and is used to iterate over the raw logs and unpacked data for Upgraded events raised by the GatewayEVM contract. +type GatewayEVMUpgradedIterator struct { + Event *GatewayEVMUpgraded // 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 *GatewayEVMUpgradedIterator) 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(GatewayEVMUpgraded) + 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(GatewayEVMUpgraded) + 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 *GatewayEVMUpgradedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *GatewayEVMUpgradedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// GatewayEVMUpgraded represents a Upgraded event raised by the GatewayEVM contract. +type GatewayEVMUpgraded 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 (_GatewayEVM *GatewayEVMFilterer) FilterUpgraded(opts *bind.FilterOpts, implementation []common.Address) (*GatewayEVMUpgradedIterator, error) { + + var implementationRule []interface{} + for _, implementationItem := range implementation { + implementationRule = append(implementationRule, implementationItem) + } + + logs, sub, err := _GatewayEVM.contract.FilterLogs(opts, "Upgraded", implementationRule) + if err != nil { + return nil, err + } + return &GatewayEVMUpgradedIterator{contract: _GatewayEVM.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 (_GatewayEVM *GatewayEVMFilterer) WatchUpgraded(opts *bind.WatchOpts, sink chan<- *GatewayEVMUpgraded, implementation []common.Address) (event.Subscription, error) { + + var implementationRule []interface{} + for _, implementationItem := range implementation { + implementationRule = append(implementationRule, implementationItem) + } + + logs, sub, err := _GatewayEVM.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(GatewayEVMUpgraded) + if err := _GatewayEVM.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 (_GatewayEVM *GatewayEVMFilterer) ParseUpgraded(log types.Log) (*GatewayEVMUpgraded, error) { + event := new(GatewayEVMUpgraded) + if err := _GatewayEVM.contract.UnpackLog(event, "Upgraded", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} diff --git a/pkg/contracts/prototypes/evm/gatewayevmupgradetest.sol/gatewayevmupgradetest.go b/pkg/contracts/prototypes/evm/gatewayevmupgradetest.sol/gatewayevmupgradetest.go new file mode 100644 index 00000000..bc451ccc --- /dev/null +++ b/pkg/contracts/prototypes/evm/gatewayevmupgradetest.sol/gatewayevmupgradetest.go @@ -0,0 +1,1829 @@ +// Code generated - DO NOT EDIT. +// This file is a generated binding and any manual changes will be lost. + +package gatewayevmupgradetest + +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 +) + +// GatewayEVMUpgradeTestMetaData contains all meta data concerning the GatewayEVMUpgradeTest contract. +var GatewayEVMUpgradeTestMetaData = &bind.MetaData{ + ABI: "[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"ApprovalFailed\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ExecutionFailed\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InsufficientETHAmount\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"SendFailed\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ZeroAddress\",\"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\":\"destination\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"ExecutedV2\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"ExecutedWithERC20\",\"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\":false,\"internalType\":\"bytes\",\"name\":\"recipient\",\"type\":\"bytes\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Send\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"recipient\",\"type\":\"bytes\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"asset\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"SendERC20\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"implementation\",\"type\":\"address\"}],\"name\":\"Upgraded\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"custody\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"destination\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"execute\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"executeWithERC20\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_tssAddress\",\"type\":\"address\"}],\"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\":\"bytes\",\"name\":\"recipient\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"send\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"recipient\",\"type\":\"bytes\"},{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"sendERC20\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_custody\",\"type\":\"address\"}],\"name\":\"setCustody\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"tssAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"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\"}]", + Bin: "0x60a06040523073ffffffffffffffffffffffffffffffffffffffff1660809073ffffffffffffffffffffffffffffffffffffffff1660601b8152503480156200004757600080fd5b50620000586200005e60201b60201c565b62000208565b600060019054906101000a900460ff1615620000b1576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401620000a8906200015c565b60405180910390fd5b60ff801660008054906101000a900460ff1660ff1614620001225760ff6000806101000a81548160ff021916908360ff1602179055507f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb384740249860ff6040516200011991906200017e565b60405180910390a15b565b6000620001336027836200019b565b91506200014082620001b9565b604082019050919050565b6200015681620001ac565b82525050565b60006020820190508181036000830152620001778162000124565b9050919050565b60006020820190506200019560008301846200014b565b92915050565b600082825260208201905092915050565b600060ff82169050919050565b7f496e697469616c697a61626c653a20636f6e747261637420697320696e69746960008201527f616c697a696e6700000000000000000000000000000000000000000000000000602082015250565b60805160601c612c4d620002436000396000818161038701528181610416015281816105100152818161059f0152610a060152612c4d6000f3fe6080604052600436106100dd5760003560e01c80638da5cb5b1161007f578063c4d66de811610059578063c4d66de814610271578063cb0271ed1461029a578063dda79b75146102c3578063f2fde38b146102ee576100dd565b80638da5cb5b146102015780639372c4ab1461022c578063ae7a3a6f14610248576100dd565b80635131ab59116100bb5780635131ab591461015757806352d1902d146101945780635b112591146101bf578063715018a6146101ea576100dd565b80631cff79cd146100e25780633659cfe6146101125780634f1ef2861461013b575b600080fd5b6100fc60048036038101906100f79190611d45565b610317565b60405161010991906123bc565b60405180910390f35b34801561011e57600080fd5b5061013960048036038101906101349190611c90565b610385565b005b61015560048036038101906101509190611da5565b61050e565b005b34801561016357600080fd5b5061017e60048036038101906101799190611cbd565b61064b565b60405161018b91906123bc565b60405180910390f35b3480156101a057600080fd5b506101a9610a02565b6040516101b6919061236f565b60405180910390f35b3480156101cb57600080fd5b506101d4610abb565b6040516101e191906122cb565b60405180910390f35b3480156101f657600080fd5b506101ff610ae1565b005b34801561020d57600080fd5b50610216610af5565b60405161022391906122cb565b60405180910390f35b61024660048036038101906102419190611ecf565b610b1f565b005b34801561025457600080fd5b5061026f600480360381019061026a9190611c90565b610c68565b005b34801561027d57600080fd5b5061029860048036038101906102939190611c90565b610cac565b005b3480156102a657600080fd5b506102c160048036038101906102bc9190611e5b565b610e9b565b005b3480156102cf57600080fd5b506102d8610f42565b6040516102e591906122cb565b60405180910390f35b3480156102fa57600080fd5b5061031560048036038101906103109190611c90565b610f68565b005b60606000610326858585610fec565b90508473ffffffffffffffffffffffffffffffffffffffff167f373df382b9c587826f3de13f16d67f8d99f28ee947fc0924c6ef2d6d2c7e8546348686604051610372939291906125bb565b60405180910390a2809150509392505050565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163073ffffffffffffffffffffffffffffffffffffffff161415610414576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161040b9061243b565b60405180910390fd5b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166104536110a3565b73ffffffffffffffffffffffffffffffffffffffff16146104a9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016104a09061245b565b60405180910390fd5b6104b2816110fa565b61050b81600067ffffffffffffffff8111156104d1576104d061277c565b5b6040519080825280601f01601f1916602001820160405280156105035781602001600182028036833780820191505090505b506000611105565b50565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163073ffffffffffffffffffffffffffffffffffffffff16141561059d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105949061243b565b60405180910390fd5b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166105dc6110a3565b73ffffffffffffffffffffffffffffffffffffffff1614610632576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106299061245b565b60405180910390fd5b61063b826110fa565b61064782826001611105565b5050565b60608573ffffffffffffffffffffffffffffffffffffffff1663095ea7b38660006040518363ffffffff1660e01b815260040161068992919061231d565b602060405180830381600087803b1580156106a357600080fd5b505af11580156106b7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106db9190611e01565b610711576040517f8164f84200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8573ffffffffffffffffffffffffffffffffffffffff1663095ea7b386866040518363ffffffff1660e01b815260040161074c929190612346565b602060405180830381600087803b15801561076657600080fd5b505af115801561077a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061079e9190611e01565b6107d4576040517f8164f84200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60006107e1868585610fec565b90508673ffffffffffffffffffffffffffffffffffffffff1663095ea7b38760006040518363ffffffff1660e01b815260040161081f92919061231d565b602060405180830381600087803b15801561083957600080fd5b505af115801561084d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108719190611e01565b6108a7576040517f8164f84200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008773ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b81526004016108e291906122cb565b60206040518083038186803b1580156108fa57600080fd5b505afa15801561090e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109329190611f2f565b9050600081111561098b5761098a60c960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16828a73ffffffffffffffffffffffffffffffffffffffff166112829092919063ffffffff16565b5b8673ffffffffffffffffffffffffffffffffffffffff168873ffffffffffffffffffffffffffffffffffffffff167f29c40793bffd84cb810179f15d1ceec72bc7f0785514c668ba36645cf99b73828888886040516109ec939291906125bb565b60405180910390a3819250505095945050505050565b60007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163073ffffffffffffffffffffffffffffffffffffffff1614610a92576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a899061249b565b60405180910390fd5b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc60001b905090565b60ca60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b610ae9611308565b610af36000611386565b565b6000603360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6000341415610b5a576040517f7671265e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600060ca60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1634604051610ba2906122b6565b60006040518083038185875af1925050503d8060008114610bdf576040519150601f19603f3d011682016040523d82523d6000602084013e610be4565b606091505b50509050600015158115151415610c27576040517f81063e5100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b7fa93afc57f3be4641cf20c7165d11856f3b46dd376108e5fffb06f73f2b2a6d58848434604051610c5a9392919061238a565b60405180910390a150505050565b8060c960006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b60008060019054906101000a900460ff16159050808015610cdd5750600160008054906101000a900460ff1660ff16105b80610d0a5750610cec3061144c565b158015610d095750600160008054906101000a900460ff1660ff16145b5b610d49576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d40906124db565b60405180910390fd5b60016000806101000a81548160ff021916908360ff1602179055508015610d86576001600060016101000a81548160ff0219169083151502179055505b610d8e61146f565b610d966114c8565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610dfd576040517fd92e233d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8160ca60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508015610e975760008060016101000a81548160ff0219169083151502179055507f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024986001604051610e8e91906123de565b60405180910390a15b5050565b610eea3360c960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16838573ffffffffffffffffffffffffffffffffffffffff16611519909392919063ffffffff16565b8173ffffffffffffffffffffffffffffffffffffffff167f35fb30ed1b8e81eb91001dad742b13b1491a67c722e8c593a886a18500f7d9af858584604051610f349392919061238a565b60405180910390a250505050565b60c960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b610f70611308565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415610fe0576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610fd79061241b565b60405180910390fd5b610fe981611386565b50565b60606000808573ffffffffffffffffffffffffffffffffffffffff16348686604051611019929190612286565b60006040518083038185875af1925050503d8060008114611056576040519150601f19603f3d011682016040523d82523d6000602084013e61105b565b606091505b509150915081611097576040517facfdb44400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80925050509392505050565b60006110d17f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc60001b6115a2565b60000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b611102611308565b50565b6111317f4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd914360001b6115ac565b60000160009054906101000a900460ff161561115557611150836115b6565b61127d565b8273ffffffffffffffffffffffffffffffffffffffff166352d1902d6040518163ffffffff1660e01b815260040160206040518083038186803b15801561119b57600080fd5b505afa9250505080156111cc57506040513d601f19601f820116820180604052508101906111c99190611e2e565b60015b61120b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611202906124fb565b60405180910390fd5b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc60001b8114611270576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611267906124bb565b60405180910390fd5b5061127c83838361166f565b5b505050565b6113038363a9059cbb60e01b84846040516024016112a1929190612346565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff838183161783525050505061169b565b505050565b611310611762565b73ffffffffffffffffffffffffffffffffffffffff1661132e610af5565b73ffffffffffffffffffffffffffffffffffffffff1614611384576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161137b9061253b565b60405180910390fd5b565b6000603360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905081603360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b6000808273ffffffffffffffffffffffffffffffffffffffff163b119050919050565b600060019054906101000a900460ff166114be576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016114b59061257b565b60405180910390fd5b6114c661176a565b565b600060019054906101000a900460ff16611517576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161150e9061257b565b60405180910390fd5b565b61159c846323b872dd60e01b85858560405160240161153a939291906122e6565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff838183161783525050505061169b565b50505050565b6000819050919050565b6000819050919050565b6115bf8161144c565b6115fe576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016115f59061251b565b60405180910390fd5b8061162b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc60001b6115a2565b60000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b611678836117cb565b6000825111806116855750805b1561169657611694838361181a565b505b505050565b60006116fd826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff166118479092919063ffffffff16565b905060008151111561175d578080602001905181019061171d9190611e01565b61175c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016117539061259b565b60405180910390fd5b5b505050565b600033905090565b600060019054906101000a900460ff166117b9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016117b09061257b565b60405180910390fd5b6117c96117c4611762565b611386565b565b6117d4816115b6565b8073ffffffffffffffffffffffffffffffffffffffff167fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b60405160405180910390a250565b606061183f8383604051806060016040528060278152602001612bf16027913961185f565b905092915050565b606061185684846000856118e5565b90509392505050565b60606000808573ffffffffffffffffffffffffffffffffffffffff1685604051611889919061229f565b600060405180830381855af49150503d80600081146118c4576040519150601f19603f3d011682016040523d82523d6000602084013e6118c9565b606091505b50915091506118da868383876119b2565b925050509392505050565b60608247101561192a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016119219061247b565b60405180910390fd5b6000808673ffffffffffffffffffffffffffffffffffffffff168587604051611953919061229f565b60006040518083038185875af1925050503d8060008114611990576040519150601f19603f3d011682016040523d82523d6000602084013e611995565b606091505b50915091506119a687838387611a28565b92505050949350505050565b60608315611a1557600083511415611a0d576119cd8561144c565b611a0c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611a039061255b565b60405180910390fd5b5b829050611a20565b611a1f8383611a9e565b5b949350505050565b60608315611a8b57600083511415611a8357611a4385611aee565b611a82576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611a799061255b565b60405180910390fd5b5b829050611a96565b611a958383611b11565b5b949350505050565b600082511115611ab15781518083602001fd5b806040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611ae591906123f9565b60405180910390fd5b6000808273ffffffffffffffffffffffffffffffffffffffff163b119050919050565b600082511115611b245781518083602001fd5b806040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611b5891906123f9565b60405180910390fd5b6000611b74611b6f84612612565b6125ed565b905082815260208101848484011115611b9057611b8f6127ba565b5b611b9b848285612709565b509392505050565b600081359050611bb281612b94565b92915050565b600081519050611bc781612bab565b92915050565b600081519050611bdc81612bc2565b92915050565b60008083601f840112611bf857611bf76127b0565b5b8235905067ffffffffffffffff811115611c1557611c146127ab565b5b602083019150836001820283011115611c3157611c306127b5565b5b9250929050565b600082601f830112611c4d57611c4c6127b0565b5b8135611c5d848260208601611b61565b91505092915050565b600081359050611c7581612bd9565b92915050565b600081519050611c8a81612bd9565b92915050565b600060208284031215611ca657611ca56127c4565b5b6000611cb484828501611ba3565b91505092915050565b600080600080600060808688031215611cd957611cd86127c4565b5b6000611ce788828901611ba3565b9550506020611cf888828901611ba3565b9450506040611d0988828901611c66565b935050606086013567ffffffffffffffff811115611d2a57611d296127bf565b5b611d3688828901611be2565b92509250509295509295909350565b600080600060408486031215611d5e57611d5d6127c4565b5b6000611d6c86828701611ba3565b935050602084013567ffffffffffffffff811115611d8d57611d8c6127bf565b5b611d9986828701611be2565b92509250509250925092565b60008060408385031215611dbc57611dbb6127c4565b5b6000611dca85828601611ba3565b925050602083013567ffffffffffffffff811115611deb57611dea6127bf565b5b611df785828601611c38565b9150509250929050565b600060208284031215611e1757611e166127c4565b5b6000611e2584828501611bb8565b91505092915050565b600060208284031215611e4457611e436127c4565b5b6000611e5284828501611bcd565b91505092915050565b60008060008060608587031215611e7557611e746127c4565b5b600085013567ffffffffffffffff811115611e9357611e926127bf565b5b611e9f87828801611be2565b94509450506020611eb287828801611ba3565b9250506040611ec387828801611c66565b91505092959194509250565b600080600060408486031215611ee857611ee76127c4565b5b600084013567ffffffffffffffff811115611f0657611f056127bf565b5b611f1286828701611be2565b93509350506020611f2586828701611c66565b9150509250925092565b600060208284031215611f4557611f446127c4565b5b6000611f5384828501611c7b565b91505092915050565b611f6581612686565b82525050565b611f74816126a4565b82525050565b6000611f868385612659565b9350611f93838584612709565b611f9c836127c9565b840190509392505050565b6000611fb3838561266a565b9350611fc0838584612709565b82840190509392505050565b6000611fd782612643565b611fe18185612659565b9350611ff1818560208601612718565b611ffa816127c9565b840191505092915050565b600061201082612643565b61201a818561266a565b935061202a818560208601612718565b80840191505092915050565b61203f816126e5565b82525050565b61204e816126f7565b82525050565b600061205f8261264e565b6120698185612675565b9350612079818560208601612718565b612082816127c9565b840191505092915050565b600061209a602683612675565b91506120a5826127da565b604082019050919050565b60006120bd602c83612675565b91506120c882612829565b604082019050919050565b60006120e0602c83612675565b91506120eb82612878565b604082019050919050565b6000612103602683612675565b915061210e826128c7565b604082019050919050565b6000612126603883612675565b915061213182612916565b604082019050919050565b6000612149602983612675565b915061215482612965565b604082019050919050565b600061216c602e83612675565b9150612177826129b4565b604082019050919050565b600061218f602e83612675565b915061219a82612a03565b604082019050919050565b60006121b2602d83612675565b91506121bd82612a52565b604082019050919050565b60006121d5602083612675565b91506121e082612aa1565b602082019050919050565b60006121f860008361266a565b915061220382612aca565b600082019050919050565b600061221b601d83612675565b915061222682612acd565b602082019050919050565b600061223e602b83612675565b915061224982612af6565b604082019050919050565b6000612261602a83612675565b915061226c82612b45565b604082019050919050565b612280816126ce565b82525050565b6000612293828486611fa7565b91508190509392505050565b60006122ab8284612005565b915081905092915050565b60006122c1826121eb565b9150819050919050565b60006020820190506122e06000830184611f5c565b92915050565b60006060820190506122fb6000830186611f5c565b6123086020830185611f5c565b6123156040830184612277565b949350505050565b60006040820190506123326000830185611f5c565b61233f6020830184612036565b9392505050565b600060408201905061235b6000830185611f5c565b6123686020830184612277565b9392505050565b60006020820190506123846000830184611f6b565b92915050565b600060408201905081810360008301526123a5818587611f7a565b90506123b46020830184612277565b949350505050565b600060208201905081810360008301526123d68184611fcc565b905092915050565b60006020820190506123f36000830184612045565b92915050565b600060208201905081810360008301526124138184612054565b905092915050565b600060208201905081810360008301526124348161208d565b9050919050565b60006020820190508181036000830152612454816120b0565b9050919050565b60006020820190508181036000830152612474816120d3565b9050919050565b60006020820190508181036000830152612494816120f6565b9050919050565b600060208201905081810360008301526124b481612119565b9050919050565b600060208201905081810360008301526124d48161213c565b9050919050565b600060208201905081810360008301526124f48161215f565b9050919050565b6000602082019050818103600083015261251481612182565b9050919050565b60006020820190508181036000830152612534816121a5565b9050919050565b60006020820190508181036000830152612554816121c8565b9050919050565b600060208201905081810360008301526125748161220e565b9050919050565b6000602082019050818103600083015261259481612231565b9050919050565b600060208201905081810360008301526125b481612254565b9050919050565b60006040820190506125d06000830186612277565b81810360208301526125e3818486611f7a565b9050949350505050565b60006125f7612608565b9050612603828261274b565b919050565b6000604051905090565b600067ffffffffffffffff82111561262d5761262c61277c565b5b612636826127c9565b9050602081019050919050565b600081519050919050565b600081519050919050565b600082825260208201905092915050565b600081905092915050565b600082825260208201905092915050565b6000612691826126ae565b9050919050565b60008115159050919050565b6000819050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b60006126f0826126ce565b9050919050565b6000612702826126d8565b9050919050565b82818337600083830152505050565b60005b8381101561273657808201518184015260208101905061271b565b83811115612745576000848401525b50505050565b612754826127c9565b810181811067ffffffffffffffff821117156127735761277261277c565b5b80604052505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b7f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060008201527f64656c656761746563616c6c0000000000000000000000000000000000000000602082015250565b7f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060008201527f6163746976652070726f78790000000000000000000000000000000000000000602082015250565b7f416464726573733a20696e73756666696369656e742062616c616e636520666f60008201527f722063616c6c0000000000000000000000000000000000000000000000000000602082015250565b7f555550535570677261646561626c653a206d757374206e6f742062652063616c60008201527f6c6564207468726f7567682064656c656761746563616c6c0000000000000000602082015250565b7f45524331393637557067726164653a20756e737570706f727465642070726f7860008201527f6961626c65555549440000000000000000000000000000000000000000000000602082015250565b7f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160008201527f647920696e697469616c697a6564000000000000000000000000000000000000602082015250565b7f45524331393637557067726164653a206e657720696d706c656d656e7461746960008201527f6f6e206973206e6f742055555053000000000000000000000000000000000000602082015250565b7f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60008201527f6f74206120636f6e747261637400000000000000000000000000000000000000602082015250565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b50565b7f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000600082015250565b7f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960008201527f6e697469616c697a696e67000000000000000000000000000000000000000000602082015250565b7f5361666545524332303a204552433230206f7065726174696f6e20646964206e60008201527f6f74207375636365656400000000000000000000000000000000000000000000602082015250565b612b9d81612686565b8114612ba857600080fd5b50565b612bb481612698565b8114612bbf57600080fd5b50565b612bcb816126a4565b8114612bd657600080fd5b50565b612be2816126ce565b8114612bed57600080fd5b5056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a264697066735822122079a8a81715ebf41d134bb64167fb2f56e849b251fc0b7d2e8b4e5d2f3b96b57a64736f6c63430008070033", +} + +// GatewayEVMUpgradeTestABI is the input ABI used to generate the binding from. +// Deprecated: Use GatewayEVMUpgradeTestMetaData.ABI instead. +var GatewayEVMUpgradeTestABI = GatewayEVMUpgradeTestMetaData.ABI + +// GatewayEVMUpgradeTestBin is the compiled bytecode used for deploying new contracts. +// Deprecated: Use GatewayEVMUpgradeTestMetaData.Bin instead. +var GatewayEVMUpgradeTestBin = GatewayEVMUpgradeTestMetaData.Bin + +// DeployGatewayEVMUpgradeTest deploys a new Ethereum contract, binding an instance of GatewayEVMUpgradeTest to it. +func DeployGatewayEVMUpgradeTest(auth *bind.TransactOpts, backend bind.ContractBackend) (common.Address, *types.Transaction, *GatewayEVMUpgradeTest, error) { + parsed, err := GatewayEVMUpgradeTestMetaData.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(GatewayEVMUpgradeTestBin), backend) + if err != nil { + return common.Address{}, nil, nil, err + } + return address, tx, &GatewayEVMUpgradeTest{GatewayEVMUpgradeTestCaller: GatewayEVMUpgradeTestCaller{contract: contract}, GatewayEVMUpgradeTestTransactor: GatewayEVMUpgradeTestTransactor{contract: contract}, GatewayEVMUpgradeTestFilterer: GatewayEVMUpgradeTestFilterer{contract: contract}}, nil +} + +// GatewayEVMUpgradeTest is an auto generated Go binding around an Ethereum contract. +type GatewayEVMUpgradeTest struct { + GatewayEVMUpgradeTestCaller // Read-only binding to the contract + GatewayEVMUpgradeTestTransactor // Write-only binding to the contract + GatewayEVMUpgradeTestFilterer // Log filterer for contract events +} + +// GatewayEVMUpgradeTestCaller is an auto generated read-only Go binding around an Ethereum contract. +type GatewayEVMUpgradeTestCaller struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// GatewayEVMUpgradeTestTransactor is an auto generated write-only Go binding around an Ethereum contract. +type GatewayEVMUpgradeTestTransactor struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// GatewayEVMUpgradeTestFilterer is an auto generated log filtering Go binding around an Ethereum contract events. +type GatewayEVMUpgradeTestFilterer struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// GatewayEVMUpgradeTestSession is an auto generated Go binding around an Ethereum contract, +// with pre-set call and transact options. +type GatewayEVMUpgradeTestSession struct { + Contract *GatewayEVMUpgradeTest // 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 +} + +// GatewayEVMUpgradeTestCallerSession is an auto generated read-only Go binding around an Ethereum contract, +// with pre-set call options. +type GatewayEVMUpgradeTestCallerSession struct { + Contract *GatewayEVMUpgradeTestCaller // Generic contract caller binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session +} + +// GatewayEVMUpgradeTestTransactorSession is an auto generated write-only Go binding around an Ethereum contract, +// with pre-set transact options. +type GatewayEVMUpgradeTestTransactorSession struct { + Contract *GatewayEVMUpgradeTestTransactor // Generic contract transactor binding to set the session for + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// GatewayEVMUpgradeTestRaw is an auto generated low-level Go binding around an Ethereum contract. +type GatewayEVMUpgradeTestRaw struct { + Contract *GatewayEVMUpgradeTest // Generic contract binding to access the raw methods on +} + +// GatewayEVMUpgradeTestCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. +type GatewayEVMUpgradeTestCallerRaw struct { + Contract *GatewayEVMUpgradeTestCaller // Generic read-only contract binding to access the raw methods on +} + +// GatewayEVMUpgradeTestTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. +type GatewayEVMUpgradeTestTransactorRaw struct { + Contract *GatewayEVMUpgradeTestTransactor // Generic write-only contract binding to access the raw methods on +} + +// NewGatewayEVMUpgradeTest creates a new instance of GatewayEVMUpgradeTest, bound to a specific deployed contract. +func NewGatewayEVMUpgradeTest(address common.Address, backend bind.ContractBackend) (*GatewayEVMUpgradeTest, error) { + contract, err := bindGatewayEVMUpgradeTest(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &GatewayEVMUpgradeTest{GatewayEVMUpgradeTestCaller: GatewayEVMUpgradeTestCaller{contract: contract}, GatewayEVMUpgradeTestTransactor: GatewayEVMUpgradeTestTransactor{contract: contract}, GatewayEVMUpgradeTestFilterer: GatewayEVMUpgradeTestFilterer{contract: contract}}, nil +} + +// NewGatewayEVMUpgradeTestCaller creates a new read-only instance of GatewayEVMUpgradeTest, bound to a specific deployed contract. +func NewGatewayEVMUpgradeTestCaller(address common.Address, caller bind.ContractCaller) (*GatewayEVMUpgradeTestCaller, error) { + contract, err := bindGatewayEVMUpgradeTest(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &GatewayEVMUpgradeTestCaller{contract: contract}, nil +} + +// NewGatewayEVMUpgradeTestTransactor creates a new write-only instance of GatewayEVMUpgradeTest, bound to a specific deployed contract. +func NewGatewayEVMUpgradeTestTransactor(address common.Address, transactor bind.ContractTransactor) (*GatewayEVMUpgradeTestTransactor, error) { + contract, err := bindGatewayEVMUpgradeTest(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &GatewayEVMUpgradeTestTransactor{contract: contract}, nil +} + +// NewGatewayEVMUpgradeTestFilterer creates a new log filterer instance of GatewayEVMUpgradeTest, bound to a specific deployed contract. +func NewGatewayEVMUpgradeTestFilterer(address common.Address, filterer bind.ContractFilterer) (*GatewayEVMUpgradeTestFilterer, error) { + contract, err := bindGatewayEVMUpgradeTest(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &GatewayEVMUpgradeTestFilterer{contract: contract}, nil +} + +// bindGatewayEVMUpgradeTest binds a generic wrapper to an already deployed contract. +func bindGatewayEVMUpgradeTest(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := GatewayEVMUpgradeTestMetaData.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 (_GatewayEVMUpgradeTest *GatewayEVMUpgradeTestRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _GatewayEVMUpgradeTest.Contract.GatewayEVMUpgradeTestCaller.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 (_GatewayEVMUpgradeTest *GatewayEVMUpgradeTestRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _GatewayEVMUpgradeTest.Contract.GatewayEVMUpgradeTestTransactor.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_GatewayEVMUpgradeTest *GatewayEVMUpgradeTestRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _GatewayEVMUpgradeTest.Contract.GatewayEVMUpgradeTestTransactor.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 (_GatewayEVMUpgradeTest *GatewayEVMUpgradeTestCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _GatewayEVMUpgradeTest.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 (_GatewayEVMUpgradeTest *GatewayEVMUpgradeTestTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _GatewayEVMUpgradeTest.Contract.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_GatewayEVMUpgradeTest *GatewayEVMUpgradeTestTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _GatewayEVMUpgradeTest.Contract.contract.Transact(opts, method, params...) +} + +// Custody is a free data retrieval call binding the contract method 0xdda79b75. +// +// Solidity: function custody() view returns(address) +func (_GatewayEVMUpgradeTest *GatewayEVMUpgradeTestCaller) Custody(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _GatewayEVMUpgradeTest.contract.Call(opts, &out, "custody") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// Custody is a free data retrieval call binding the contract method 0xdda79b75. +// +// Solidity: function custody() view returns(address) +func (_GatewayEVMUpgradeTest *GatewayEVMUpgradeTestSession) Custody() (common.Address, error) { + return _GatewayEVMUpgradeTest.Contract.Custody(&_GatewayEVMUpgradeTest.CallOpts) +} + +// Custody is a free data retrieval call binding the contract method 0xdda79b75. +// +// Solidity: function custody() view returns(address) +func (_GatewayEVMUpgradeTest *GatewayEVMUpgradeTestCallerSession) Custody() (common.Address, error) { + return _GatewayEVMUpgradeTest.Contract.Custody(&_GatewayEVMUpgradeTest.CallOpts) +} + +// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. +// +// Solidity: function owner() view returns(address) +func (_GatewayEVMUpgradeTest *GatewayEVMUpgradeTestCaller) Owner(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _GatewayEVMUpgradeTest.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 (_GatewayEVMUpgradeTest *GatewayEVMUpgradeTestSession) Owner() (common.Address, error) { + return _GatewayEVMUpgradeTest.Contract.Owner(&_GatewayEVMUpgradeTest.CallOpts) +} + +// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. +// +// Solidity: function owner() view returns(address) +func (_GatewayEVMUpgradeTest *GatewayEVMUpgradeTestCallerSession) Owner() (common.Address, error) { + return _GatewayEVMUpgradeTest.Contract.Owner(&_GatewayEVMUpgradeTest.CallOpts) +} + +// ProxiableUUID is a free data retrieval call binding the contract method 0x52d1902d. +// +// Solidity: function proxiableUUID() view returns(bytes32) +func (_GatewayEVMUpgradeTest *GatewayEVMUpgradeTestCaller) ProxiableUUID(opts *bind.CallOpts) ([32]byte, error) { + var out []interface{} + err := _GatewayEVMUpgradeTest.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 (_GatewayEVMUpgradeTest *GatewayEVMUpgradeTestSession) ProxiableUUID() ([32]byte, error) { + return _GatewayEVMUpgradeTest.Contract.ProxiableUUID(&_GatewayEVMUpgradeTest.CallOpts) +} + +// ProxiableUUID is a free data retrieval call binding the contract method 0x52d1902d. +// +// Solidity: function proxiableUUID() view returns(bytes32) +func (_GatewayEVMUpgradeTest *GatewayEVMUpgradeTestCallerSession) ProxiableUUID() ([32]byte, error) { + return _GatewayEVMUpgradeTest.Contract.ProxiableUUID(&_GatewayEVMUpgradeTest.CallOpts) +} + +// TssAddress is a free data retrieval call binding the contract method 0x5b112591. +// +// Solidity: function tssAddress() view returns(address) +func (_GatewayEVMUpgradeTest *GatewayEVMUpgradeTestCaller) TssAddress(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _GatewayEVMUpgradeTest.contract.Call(opts, &out, "tssAddress") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// TssAddress is a free data retrieval call binding the contract method 0x5b112591. +// +// Solidity: function tssAddress() view returns(address) +func (_GatewayEVMUpgradeTest *GatewayEVMUpgradeTestSession) TssAddress() (common.Address, error) { + return _GatewayEVMUpgradeTest.Contract.TssAddress(&_GatewayEVMUpgradeTest.CallOpts) +} + +// TssAddress is a free data retrieval call binding the contract method 0x5b112591. +// +// Solidity: function tssAddress() view returns(address) +func (_GatewayEVMUpgradeTest *GatewayEVMUpgradeTestCallerSession) TssAddress() (common.Address, error) { + return _GatewayEVMUpgradeTest.Contract.TssAddress(&_GatewayEVMUpgradeTest.CallOpts) +} + +// Execute is a paid mutator transaction binding the contract method 0x1cff79cd. +// +// Solidity: function execute(address destination, bytes data) payable returns(bytes) +func (_GatewayEVMUpgradeTest *GatewayEVMUpgradeTestTransactor) Execute(opts *bind.TransactOpts, destination common.Address, data []byte) (*types.Transaction, error) { + return _GatewayEVMUpgradeTest.contract.Transact(opts, "execute", destination, data) +} + +// Execute is a paid mutator transaction binding the contract method 0x1cff79cd. +// +// Solidity: function execute(address destination, bytes data) payable returns(bytes) +func (_GatewayEVMUpgradeTest *GatewayEVMUpgradeTestSession) Execute(destination common.Address, data []byte) (*types.Transaction, error) { + return _GatewayEVMUpgradeTest.Contract.Execute(&_GatewayEVMUpgradeTest.TransactOpts, destination, data) +} + +// Execute is a paid mutator transaction binding the contract method 0x1cff79cd. +// +// Solidity: function execute(address destination, bytes data) payable returns(bytes) +func (_GatewayEVMUpgradeTest *GatewayEVMUpgradeTestTransactorSession) Execute(destination common.Address, data []byte) (*types.Transaction, error) { + return _GatewayEVMUpgradeTest.Contract.Execute(&_GatewayEVMUpgradeTest.TransactOpts, destination, data) +} + +// ExecuteWithERC20 is a paid mutator transaction binding the contract method 0x5131ab59. +// +// Solidity: function executeWithERC20(address token, address to, uint256 amount, bytes data) returns(bytes) +func (_GatewayEVMUpgradeTest *GatewayEVMUpgradeTestTransactor) ExecuteWithERC20(opts *bind.TransactOpts, token common.Address, to common.Address, amount *big.Int, data []byte) (*types.Transaction, error) { + return _GatewayEVMUpgradeTest.contract.Transact(opts, "executeWithERC20", token, to, amount, data) +} + +// ExecuteWithERC20 is a paid mutator transaction binding the contract method 0x5131ab59. +// +// Solidity: function executeWithERC20(address token, address to, uint256 amount, bytes data) returns(bytes) +func (_GatewayEVMUpgradeTest *GatewayEVMUpgradeTestSession) ExecuteWithERC20(token common.Address, to common.Address, amount *big.Int, data []byte) (*types.Transaction, error) { + return _GatewayEVMUpgradeTest.Contract.ExecuteWithERC20(&_GatewayEVMUpgradeTest.TransactOpts, token, to, amount, data) +} + +// ExecuteWithERC20 is a paid mutator transaction binding the contract method 0x5131ab59. +// +// Solidity: function executeWithERC20(address token, address to, uint256 amount, bytes data) returns(bytes) +func (_GatewayEVMUpgradeTest *GatewayEVMUpgradeTestTransactorSession) ExecuteWithERC20(token common.Address, to common.Address, amount *big.Int, data []byte) (*types.Transaction, error) { + return _GatewayEVMUpgradeTest.Contract.ExecuteWithERC20(&_GatewayEVMUpgradeTest.TransactOpts, token, to, amount, data) +} + +// Initialize is a paid mutator transaction binding the contract method 0xc4d66de8. +// +// Solidity: function initialize(address _tssAddress) returns() +func (_GatewayEVMUpgradeTest *GatewayEVMUpgradeTestTransactor) Initialize(opts *bind.TransactOpts, _tssAddress common.Address) (*types.Transaction, error) { + return _GatewayEVMUpgradeTest.contract.Transact(opts, "initialize", _tssAddress) +} + +// Initialize is a paid mutator transaction binding the contract method 0xc4d66de8. +// +// Solidity: function initialize(address _tssAddress) returns() +func (_GatewayEVMUpgradeTest *GatewayEVMUpgradeTestSession) Initialize(_tssAddress common.Address) (*types.Transaction, error) { + return _GatewayEVMUpgradeTest.Contract.Initialize(&_GatewayEVMUpgradeTest.TransactOpts, _tssAddress) +} + +// Initialize is a paid mutator transaction binding the contract method 0xc4d66de8. +// +// Solidity: function initialize(address _tssAddress) returns() +func (_GatewayEVMUpgradeTest *GatewayEVMUpgradeTestTransactorSession) Initialize(_tssAddress common.Address) (*types.Transaction, error) { + return _GatewayEVMUpgradeTest.Contract.Initialize(&_GatewayEVMUpgradeTest.TransactOpts, _tssAddress) +} + +// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. +// +// Solidity: function renounceOwnership() returns() +func (_GatewayEVMUpgradeTest *GatewayEVMUpgradeTestTransactor) RenounceOwnership(opts *bind.TransactOpts) (*types.Transaction, error) { + return _GatewayEVMUpgradeTest.contract.Transact(opts, "renounceOwnership") +} + +// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. +// +// Solidity: function renounceOwnership() returns() +func (_GatewayEVMUpgradeTest *GatewayEVMUpgradeTestSession) RenounceOwnership() (*types.Transaction, error) { + return _GatewayEVMUpgradeTest.Contract.RenounceOwnership(&_GatewayEVMUpgradeTest.TransactOpts) +} + +// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. +// +// Solidity: function renounceOwnership() returns() +func (_GatewayEVMUpgradeTest *GatewayEVMUpgradeTestTransactorSession) RenounceOwnership() (*types.Transaction, error) { + return _GatewayEVMUpgradeTest.Contract.RenounceOwnership(&_GatewayEVMUpgradeTest.TransactOpts) +} + +// Send is a paid mutator transaction binding the contract method 0x9372c4ab. +// +// Solidity: function send(bytes recipient, uint256 amount) payable returns() +func (_GatewayEVMUpgradeTest *GatewayEVMUpgradeTestTransactor) Send(opts *bind.TransactOpts, recipient []byte, amount *big.Int) (*types.Transaction, error) { + return _GatewayEVMUpgradeTest.contract.Transact(opts, "send", recipient, amount) +} + +// Send is a paid mutator transaction binding the contract method 0x9372c4ab. +// +// Solidity: function send(bytes recipient, uint256 amount) payable returns() +func (_GatewayEVMUpgradeTest *GatewayEVMUpgradeTestSession) Send(recipient []byte, amount *big.Int) (*types.Transaction, error) { + return _GatewayEVMUpgradeTest.Contract.Send(&_GatewayEVMUpgradeTest.TransactOpts, recipient, amount) +} + +// Send is a paid mutator transaction binding the contract method 0x9372c4ab. +// +// Solidity: function send(bytes recipient, uint256 amount) payable returns() +func (_GatewayEVMUpgradeTest *GatewayEVMUpgradeTestTransactorSession) Send(recipient []byte, amount *big.Int) (*types.Transaction, error) { + return _GatewayEVMUpgradeTest.Contract.Send(&_GatewayEVMUpgradeTest.TransactOpts, recipient, amount) +} + +// SendERC20 is a paid mutator transaction binding the contract method 0xcb0271ed. +// +// Solidity: function sendERC20(bytes recipient, address token, uint256 amount) returns() +func (_GatewayEVMUpgradeTest *GatewayEVMUpgradeTestTransactor) SendERC20(opts *bind.TransactOpts, recipient []byte, token common.Address, amount *big.Int) (*types.Transaction, error) { + return _GatewayEVMUpgradeTest.contract.Transact(opts, "sendERC20", recipient, token, amount) +} + +// SendERC20 is a paid mutator transaction binding the contract method 0xcb0271ed. +// +// Solidity: function sendERC20(bytes recipient, address token, uint256 amount) returns() +func (_GatewayEVMUpgradeTest *GatewayEVMUpgradeTestSession) SendERC20(recipient []byte, token common.Address, amount *big.Int) (*types.Transaction, error) { + return _GatewayEVMUpgradeTest.Contract.SendERC20(&_GatewayEVMUpgradeTest.TransactOpts, recipient, token, amount) +} + +// SendERC20 is a paid mutator transaction binding the contract method 0xcb0271ed. +// +// Solidity: function sendERC20(bytes recipient, address token, uint256 amount) returns() +func (_GatewayEVMUpgradeTest *GatewayEVMUpgradeTestTransactorSession) SendERC20(recipient []byte, token common.Address, amount *big.Int) (*types.Transaction, error) { + return _GatewayEVMUpgradeTest.Contract.SendERC20(&_GatewayEVMUpgradeTest.TransactOpts, recipient, token, amount) +} + +// SetCustody is a paid mutator transaction binding the contract method 0xae7a3a6f. +// +// Solidity: function setCustody(address _custody) returns() +func (_GatewayEVMUpgradeTest *GatewayEVMUpgradeTestTransactor) SetCustody(opts *bind.TransactOpts, _custody common.Address) (*types.Transaction, error) { + return _GatewayEVMUpgradeTest.contract.Transact(opts, "setCustody", _custody) +} + +// SetCustody is a paid mutator transaction binding the contract method 0xae7a3a6f. +// +// Solidity: function setCustody(address _custody) returns() +func (_GatewayEVMUpgradeTest *GatewayEVMUpgradeTestSession) SetCustody(_custody common.Address) (*types.Transaction, error) { + return _GatewayEVMUpgradeTest.Contract.SetCustody(&_GatewayEVMUpgradeTest.TransactOpts, _custody) +} + +// SetCustody is a paid mutator transaction binding the contract method 0xae7a3a6f. +// +// Solidity: function setCustody(address _custody) returns() +func (_GatewayEVMUpgradeTest *GatewayEVMUpgradeTestTransactorSession) SetCustody(_custody common.Address) (*types.Transaction, error) { + return _GatewayEVMUpgradeTest.Contract.SetCustody(&_GatewayEVMUpgradeTest.TransactOpts, _custody) +} + +// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// +// Solidity: function transferOwnership(address newOwner) returns() +func (_GatewayEVMUpgradeTest *GatewayEVMUpgradeTestTransactor) TransferOwnership(opts *bind.TransactOpts, newOwner common.Address) (*types.Transaction, error) { + return _GatewayEVMUpgradeTest.contract.Transact(opts, "transferOwnership", newOwner) +} + +// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// +// Solidity: function transferOwnership(address newOwner) returns() +func (_GatewayEVMUpgradeTest *GatewayEVMUpgradeTestSession) TransferOwnership(newOwner common.Address) (*types.Transaction, error) { + return _GatewayEVMUpgradeTest.Contract.TransferOwnership(&_GatewayEVMUpgradeTest.TransactOpts, newOwner) +} + +// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// +// Solidity: function transferOwnership(address newOwner) returns() +func (_GatewayEVMUpgradeTest *GatewayEVMUpgradeTestTransactorSession) TransferOwnership(newOwner common.Address) (*types.Transaction, error) { + return _GatewayEVMUpgradeTest.Contract.TransferOwnership(&_GatewayEVMUpgradeTest.TransactOpts, newOwner) +} + +// UpgradeTo is a paid mutator transaction binding the contract method 0x3659cfe6. +// +// Solidity: function upgradeTo(address newImplementation) returns() +func (_GatewayEVMUpgradeTest *GatewayEVMUpgradeTestTransactor) UpgradeTo(opts *bind.TransactOpts, newImplementation common.Address) (*types.Transaction, error) { + return _GatewayEVMUpgradeTest.contract.Transact(opts, "upgradeTo", newImplementation) +} + +// UpgradeTo is a paid mutator transaction binding the contract method 0x3659cfe6. +// +// Solidity: function upgradeTo(address newImplementation) returns() +func (_GatewayEVMUpgradeTest *GatewayEVMUpgradeTestSession) UpgradeTo(newImplementation common.Address) (*types.Transaction, error) { + return _GatewayEVMUpgradeTest.Contract.UpgradeTo(&_GatewayEVMUpgradeTest.TransactOpts, newImplementation) +} + +// UpgradeTo is a paid mutator transaction binding the contract method 0x3659cfe6. +// +// Solidity: function upgradeTo(address newImplementation) returns() +func (_GatewayEVMUpgradeTest *GatewayEVMUpgradeTestTransactorSession) UpgradeTo(newImplementation common.Address) (*types.Transaction, error) { + return _GatewayEVMUpgradeTest.Contract.UpgradeTo(&_GatewayEVMUpgradeTest.TransactOpts, newImplementation) +} + +// UpgradeToAndCall is a paid mutator transaction binding the contract method 0x4f1ef286. +// +// Solidity: function upgradeToAndCall(address newImplementation, bytes data) payable returns() +func (_GatewayEVMUpgradeTest *GatewayEVMUpgradeTestTransactor) UpgradeToAndCall(opts *bind.TransactOpts, newImplementation common.Address, data []byte) (*types.Transaction, error) { + return _GatewayEVMUpgradeTest.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 (_GatewayEVMUpgradeTest *GatewayEVMUpgradeTestSession) UpgradeToAndCall(newImplementation common.Address, data []byte) (*types.Transaction, error) { + return _GatewayEVMUpgradeTest.Contract.UpgradeToAndCall(&_GatewayEVMUpgradeTest.TransactOpts, newImplementation, data) +} + +// UpgradeToAndCall is a paid mutator transaction binding the contract method 0x4f1ef286. +// +// Solidity: function upgradeToAndCall(address newImplementation, bytes data) payable returns() +func (_GatewayEVMUpgradeTest *GatewayEVMUpgradeTestTransactorSession) UpgradeToAndCall(newImplementation common.Address, data []byte) (*types.Transaction, error) { + return _GatewayEVMUpgradeTest.Contract.UpgradeToAndCall(&_GatewayEVMUpgradeTest.TransactOpts, newImplementation, data) +} + +// GatewayEVMUpgradeTestAdminChangedIterator is returned from FilterAdminChanged and is used to iterate over the raw logs and unpacked data for AdminChanged events raised by the GatewayEVMUpgradeTest contract. +type GatewayEVMUpgradeTestAdminChangedIterator struct { + Event *GatewayEVMUpgradeTestAdminChanged // 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 *GatewayEVMUpgradeTestAdminChangedIterator) 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(GatewayEVMUpgradeTestAdminChanged) + 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(GatewayEVMUpgradeTestAdminChanged) + 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 *GatewayEVMUpgradeTestAdminChangedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *GatewayEVMUpgradeTestAdminChangedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// GatewayEVMUpgradeTestAdminChanged represents a AdminChanged event raised by the GatewayEVMUpgradeTest contract. +type GatewayEVMUpgradeTestAdminChanged 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 (_GatewayEVMUpgradeTest *GatewayEVMUpgradeTestFilterer) FilterAdminChanged(opts *bind.FilterOpts) (*GatewayEVMUpgradeTestAdminChangedIterator, error) { + + logs, sub, err := _GatewayEVMUpgradeTest.contract.FilterLogs(opts, "AdminChanged") + if err != nil { + return nil, err + } + return &GatewayEVMUpgradeTestAdminChangedIterator{contract: _GatewayEVMUpgradeTest.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 (_GatewayEVMUpgradeTest *GatewayEVMUpgradeTestFilterer) WatchAdminChanged(opts *bind.WatchOpts, sink chan<- *GatewayEVMUpgradeTestAdminChanged) (event.Subscription, error) { + + logs, sub, err := _GatewayEVMUpgradeTest.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(GatewayEVMUpgradeTestAdminChanged) + if err := _GatewayEVMUpgradeTest.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 (_GatewayEVMUpgradeTest *GatewayEVMUpgradeTestFilterer) ParseAdminChanged(log types.Log) (*GatewayEVMUpgradeTestAdminChanged, error) { + event := new(GatewayEVMUpgradeTestAdminChanged) + if err := _GatewayEVMUpgradeTest.contract.UnpackLog(event, "AdminChanged", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// GatewayEVMUpgradeTestBeaconUpgradedIterator is returned from FilterBeaconUpgraded and is used to iterate over the raw logs and unpacked data for BeaconUpgraded events raised by the GatewayEVMUpgradeTest contract. +type GatewayEVMUpgradeTestBeaconUpgradedIterator struct { + Event *GatewayEVMUpgradeTestBeaconUpgraded // 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 *GatewayEVMUpgradeTestBeaconUpgradedIterator) 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(GatewayEVMUpgradeTestBeaconUpgraded) + 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(GatewayEVMUpgradeTestBeaconUpgraded) + 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 *GatewayEVMUpgradeTestBeaconUpgradedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *GatewayEVMUpgradeTestBeaconUpgradedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// GatewayEVMUpgradeTestBeaconUpgraded represents a BeaconUpgraded event raised by the GatewayEVMUpgradeTest contract. +type GatewayEVMUpgradeTestBeaconUpgraded 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 (_GatewayEVMUpgradeTest *GatewayEVMUpgradeTestFilterer) FilterBeaconUpgraded(opts *bind.FilterOpts, beacon []common.Address) (*GatewayEVMUpgradeTestBeaconUpgradedIterator, error) { + + var beaconRule []interface{} + for _, beaconItem := range beacon { + beaconRule = append(beaconRule, beaconItem) + } + + logs, sub, err := _GatewayEVMUpgradeTest.contract.FilterLogs(opts, "BeaconUpgraded", beaconRule) + if err != nil { + return nil, err + } + return &GatewayEVMUpgradeTestBeaconUpgradedIterator{contract: _GatewayEVMUpgradeTest.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 (_GatewayEVMUpgradeTest *GatewayEVMUpgradeTestFilterer) WatchBeaconUpgraded(opts *bind.WatchOpts, sink chan<- *GatewayEVMUpgradeTestBeaconUpgraded, beacon []common.Address) (event.Subscription, error) { + + var beaconRule []interface{} + for _, beaconItem := range beacon { + beaconRule = append(beaconRule, beaconItem) + } + + logs, sub, err := _GatewayEVMUpgradeTest.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(GatewayEVMUpgradeTestBeaconUpgraded) + if err := _GatewayEVMUpgradeTest.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 (_GatewayEVMUpgradeTest *GatewayEVMUpgradeTestFilterer) ParseBeaconUpgraded(log types.Log) (*GatewayEVMUpgradeTestBeaconUpgraded, error) { + event := new(GatewayEVMUpgradeTestBeaconUpgraded) + if err := _GatewayEVMUpgradeTest.contract.UnpackLog(event, "BeaconUpgraded", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// GatewayEVMUpgradeTestExecutedV2Iterator is returned from FilterExecutedV2 and is used to iterate over the raw logs and unpacked data for ExecutedV2 events raised by the GatewayEVMUpgradeTest contract. +type GatewayEVMUpgradeTestExecutedV2Iterator struct { + Event *GatewayEVMUpgradeTestExecutedV2 // 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 *GatewayEVMUpgradeTestExecutedV2Iterator) 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(GatewayEVMUpgradeTestExecutedV2) + 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(GatewayEVMUpgradeTestExecutedV2) + 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 *GatewayEVMUpgradeTestExecutedV2Iterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *GatewayEVMUpgradeTestExecutedV2Iterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// GatewayEVMUpgradeTestExecutedV2 represents a ExecutedV2 event raised by the GatewayEVMUpgradeTest contract. +type GatewayEVMUpgradeTestExecutedV2 struct { + Destination common.Address + Value *big.Int + Data []byte + Raw types.Log // Blockchain specific contextual infos +} + +// FilterExecutedV2 is a free log retrieval operation binding the contract event 0x373df382b9c587826f3de13f16d67f8d99f28ee947fc0924c6ef2d6d2c7e8546. +// +// Solidity: event ExecutedV2(address indexed destination, uint256 value, bytes data) +func (_GatewayEVMUpgradeTest *GatewayEVMUpgradeTestFilterer) FilterExecutedV2(opts *bind.FilterOpts, destination []common.Address) (*GatewayEVMUpgradeTestExecutedV2Iterator, error) { + + var destinationRule []interface{} + for _, destinationItem := range destination { + destinationRule = append(destinationRule, destinationItem) + } + + logs, sub, err := _GatewayEVMUpgradeTest.contract.FilterLogs(opts, "ExecutedV2", destinationRule) + if err != nil { + return nil, err + } + return &GatewayEVMUpgradeTestExecutedV2Iterator{contract: _GatewayEVMUpgradeTest.contract, event: "ExecutedV2", logs: logs, sub: sub}, nil +} + +// WatchExecutedV2 is a free log subscription operation binding the contract event 0x373df382b9c587826f3de13f16d67f8d99f28ee947fc0924c6ef2d6d2c7e8546. +// +// Solidity: event ExecutedV2(address indexed destination, uint256 value, bytes data) +func (_GatewayEVMUpgradeTest *GatewayEVMUpgradeTestFilterer) WatchExecutedV2(opts *bind.WatchOpts, sink chan<- *GatewayEVMUpgradeTestExecutedV2, destination []common.Address) (event.Subscription, error) { + + var destinationRule []interface{} + for _, destinationItem := range destination { + destinationRule = append(destinationRule, destinationItem) + } + + logs, sub, err := _GatewayEVMUpgradeTest.contract.WatchLogs(opts, "ExecutedV2", destinationRule) + 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(GatewayEVMUpgradeTestExecutedV2) + if err := _GatewayEVMUpgradeTest.contract.UnpackLog(event, "ExecutedV2", 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 +} + +// ParseExecutedV2 is a log parse operation binding the contract event 0x373df382b9c587826f3de13f16d67f8d99f28ee947fc0924c6ef2d6d2c7e8546. +// +// Solidity: event ExecutedV2(address indexed destination, uint256 value, bytes data) +func (_GatewayEVMUpgradeTest *GatewayEVMUpgradeTestFilterer) ParseExecutedV2(log types.Log) (*GatewayEVMUpgradeTestExecutedV2, error) { + event := new(GatewayEVMUpgradeTestExecutedV2) + if err := _GatewayEVMUpgradeTest.contract.UnpackLog(event, "ExecutedV2", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// GatewayEVMUpgradeTestExecutedWithERC20Iterator is returned from FilterExecutedWithERC20 and is used to iterate over the raw logs and unpacked data for ExecutedWithERC20 events raised by the GatewayEVMUpgradeTest contract. +type GatewayEVMUpgradeTestExecutedWithERC20Iterator struct { + Event *GatewayEVMUpgradeTestExecutedWithERC20 // 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 *GatewayEVMUpgradeTestExecutedWithERC20Iterator) 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(GatewayEVMUpgradeTestExecutedWithERC20) + 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(GatewayEVMUpgradeTestExecutedWithERC20) + 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 *GatewayEVMUpgradeTestExecutedWithERC20Iterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *GatewayEVMUpgradeTestExecutedWithERC20Iterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// GatewayEVMUpgradeTestExecutedWithERC20 represents a ExecutedWithERC20 event raised by the GatewayEVMUpgradeTest contract. +type GatewayEVMUpgradeTestExecutedWithERC20 struct { + Token common.Address + To common.Address + Amount *big.Int + Data []byte + Raw types.Log // Blockchain specific contextual infos +} + +// FilterExecutedWithERC20 is a free log retrieval operation binding the contract event 0x29c40793bffd84cb810179f15d1ceec72bc7f0785514c668ba36645cf99b7382. +// +// Solidity: event ExecutedWithERC20(address indexed token, address indexed to, uint256 amount, bytes data) +func (_GatewayEVMUpgradeTest *GatewayEVMUpgradeTestFilterer) FilterExecutedWithERC20(opts *bind.FilterOpts, token []common.Address, to []common.Address) (*GatewayEVMUpgradeTestExecutedWithERC20Iterator, error) { + + var tokenRule []interface{} + for _, tokenItem := range token { + tokenRule = append(tokenRule, tokenItem) + } + var toRule []interface{} + for _, toItem := range to { + toRule = append(toRule, toItem) + } + + logs, sub, err := _GatewayEVMUpgradeTest.contract.FilterLogs(opts, "ExecutedWithERC20", tokenRule, toRule) + if err != nil { + return nil, err + } + return &GatewayEVMUpgradeTestExecutedWithERC20Iterator{contract: _GatewayEVMUpgradeTest.contract, event: "ExecutedWithERC20", logs: logs, sub: sub}, nil +} + +// WatchExecutedWithERC20 is a free log subscription operation binding the contract event 0x29c40793bffd84cb810179f15d1ceec72bc7f0785514c668ba36645cf99b7382. +// +// Solidity: event ExecutedWithERC20(address indexed token, address indexed to, uint256 amount, bytes data) +func (_GatewayEVMUpgradeTest *GatewayEVMUpgradeTestFilterer) WatchExecutedWithERC20(opts *bind.WatchOpts, sink chan<- *GatewayEVMUpgradeTestExecutedWithERC20, token []common.Address, to []common.Address) (event.Subscription, error) { + + var tokenRule []interface{} + for _, tokenItem := range token { + tokenRule = append(tokenRule, tokenItem) + } + var toRule []interface{} + for _, toItem := range to { + toRule = append(toRule, toItem) + } + + logs, sub, err := _GatewayEVMUpgradeTest.contract.WatchLogs(opts, "ExecutedWithERC20", tokenRule, toRule) + 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(GatewayEVMUpgradeTestExecutedWithERC20) + if err := _GatewayEVMUpgradeTest.contract.UnpackLog(event, "ExecutedWithERC20", 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 +} + +// ParseExecutedWithERC20 is a log parse operation binding the contract event 0x29c40793bffd84cb810179f15d1ceec72bc7f0785514c668ba36645cf99b7382. +// +// Solidity: event ExecutedWithERC20(address indexed token, address indexed to, uint256 amount, bytes data) +func (_GatewayEVMUpgradeTest *GatewayEVMUpgradeTestFilterer) ParseExecutedWithERC20(log types.Log) (*GatewayEVMUpgradeTestExecutedWithERC20, error) { + event := new(GatewayEVMUpgradeTestExecutedWithERC20) + if err := _GatewayEVMUpgradeTest.contract.UnpackLog(event, "ExecutedWithERC20", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// GatewayEVMUpgradeTestInitializedIterator is returned from FilterInitialized and is used to iterate over the raw logs and unpacked data for Initialized events raised by the GatewayEVMUpgradeTest contract. +type GatewayEVMUpgradeTestInitializedIterator struct { + Event *GatewayEVMUpgradeTestInitialized // 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 *GatewayEVMUpgradeTestInitializedIterator) 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(GatewayEVMUpgradeTestInitialized) + 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(GatewayEVMUpgradeTestInitialized) + 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 *GatewayEVMUpgradeTestInitializedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *GatewayEVMUpgradeTestInitializedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// GatewayEVMUpgradeTestInitialized represents a Initialized event raised by the GatewayEVMUpgradeTest contract. +type GatewayEVMUpgradeTestInitialized 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 (_GatewayEVMUpgradeTest *GatewayEVMUpgradeTestFilterer) FilterInitialized(opts *bind.FilterOpts) (*GatewayEVMUpgradeTestInitializedIterator, error) { + + logs, sub, err := _GatewayEVMUpgradeTest.contract.FilterLogs(opts, "Initialized") + if err != nil { + return nil, err + } + return &GatewayEVMUpgradeTestInitializedIterator{contract: _GatewayEVMUpgradeTest.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 (_GatewayEVMUpgradeTest *GatewayEVMUpgradeTestFilterer) WatchInitialized(opts *bind.WatchOpts, sink chan<- *GatewayEVMUpgradeTestInitialized) (event.Subscription, error) { + + logs, sub, err := _GatewayEVMUpgradeTest.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(GatewayEVMUpgradeTestInitialized) + if err := _GatewayEVMUpgradeTest.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 (_GatewayEVMUpgradeTest *GatewayEVMUpgradeTestFilterer) ParseInitialized(log types.Log) (*GatewayEVMUpgradeTestInitialized, error) { + event := new(GatewayEVMUpgradeTestInitialized) + if err := _GatewayEVMUpgradeTest.contract.UnpackLog(event, "Initialized", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// GatewayEVMUpgradeTestOwnershipTransferredIterator is returned from FilterOwnershipTransferred and is used to iterate over the raw logs and unpacked data for OwnershipTransferred events raised by the GatewayEVMUpgradeTest contract. +type GatewayEVMUpgradeTestOwnershipTransferredIterator struct { + Event *GatewayEVMUpgradeTestOwnershipTransferred // 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 *GatewayEVMUpgradeTestOwnershipTransferredIterator) 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(GatewayEVMUpgradeTestOwnershipTransferred) + 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(GatewayEVMUpgradeTestOwnershipTransferred) + 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 *GatewayEVMUpgradeTestOwnershipTransferredIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *GatewayEVMUpgradeTestOwnershipTransferredIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// GatewayEVMUpgradeTestOwnershipTransferred represents a OwnershipTransferred event raised by the GatewayEVMUpgradeTest contract. +type GatewayEVMUpgradeTestOwnershipTransferred 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 (_GatewayEVMUpgradeTest *GatewayEVMUpgradeTestFilterer) FilterOwnershipTransferred(opts *bind.FilterOpts, previousOwner []common.Address, newOwner []common.Address) (*GatewayEVMUpgradeTestOwnershipTransferredIterator, 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 := _GatewayEVMUpgradeTest.contract.FilterLogs(opts, "OwnershipTransferred", previousOwnerRule, newOwnerRule) + if err != nil { + return nil, err + } + return &GatewayEVMUpgradeTestOwnershipTransferredIterator{contract: _GatewayEVMUpgradeTest.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 (_GatewayEVMUpgradeTest *GatewayEVMUpgradeTestFilterer) WatchOwnershipTransferred(opts *bind.WatchOpts, sink chan<- *GatewayEVMUpgradeTestOwnershipTransferred, 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 := _GatewayEVMUpgradeTest.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(GatewayEVMUpgradeTestOwnershipTransferred) + if err := _GatewayEVMUpgradeTest.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 (_GatewayEVMUpgradeTest *GatewayEVMUpgradeTestFilterer) ParseOwnershipTransferred(log types.Log) (*GatewayEVMUpgradeTestOwnershipTransferred, error) { + event := new(GatewayEVMUpgradeTestOwnershipTransferred) + if err := _GatewayEVMUpgradeTest.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// GatewayEVMUpgradeTestSendIterator is returned from FilterSend and is used to iterate over the raw logs and unpacked data for Send events raised by the GatewayEVMUpgradeTest contract. +type GatewayEVMUpgradeTestSendIterator struct { + Event *GatewayEVMUpgradeTestSend // 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 *GatewayEVMUpgradeTestSendIterator) 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(GatewayEVMUpgradeTestSend) + 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(GatewayEVMUpgradeTestSend) + 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 *GatewayEVMUpgradeTestSendIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *GatewayEVMUpgradeTestSendIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// GatewayEVMUpgradeTestSend represents a Send event raised by the GatewayEVMUpgradeTest contract. +type GatewayEVMUpgradeTestSend struct { + Recipient []byte + Amount *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterSend is a free log retrieval operation binding the contract event 0xa93afc57f3be4641cf20c7165d11856f3b46dd376108e5fffb06f73f2b2a6d58. +// +// Solidity: event Send(bytes recipient, uint256 amount) +func (_GatewayEVMUpgradeTest *GatewayEVMUpgradeTestFilterer) FilterSend(opts *bind.FilterOpts) (*GatewayEVMUpgradeTestSendIterator, error) { + + logs, sub, err := _GatewayEVMUpgradeTest.contract.FilterLogs(opts, "Send") + if err != nil { + return nil, err + } + return &GatewayEVMUpgradeTestSendIterator{contract: _GatewayEVMUpgradeTest.contract, event: "Send", logs: logs, sub: sub}, nil +} + +// WatchSend is a free log subscription operation binding the contract event 0xa93afc57f3be4641cf20c7165d11856f3b46dd376108e5fffb06f73f2b2a6d58. +// +// Solidity: event Send(bytes recipient, uint256 amount) +func (_GatewayEVMUpgradeTest *GatewayEVMUpgradeTestFilterer) WatchSend(opts *bind.WatchOpts, sink chan<- *GatewayEVMUpgradeTestSend) (event.Subscription, error) { + + logs, sub, err := _GatewayEVMUpgradeTest.contract.WatchLogs(opts, "Send") + 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(GatewayEVMUpgradeTestSend) + if err := _GatewayEVMUpgradeTest.contract.UnpackLog(event, "Send", 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 +} + +// ParseSend is a log parse operation binding the contract event 0xa93afc57f3be4641cf20c7165d11856f3b46dd376108e5fffb06f73f2b2a6d58. +// +// Solidity: event Send(bytes recipient, uint256 amount) +func (_GatewayEVMUpgradeTest *GatewayEVMUpgradeTestFilterer) ParseSend(log types.Log) (*GatewayEVMUpgradeTestSend, error) { + event := new(GatewayEVMUpgradeTestSend) + if err := _GatewayEVMUpgradeTest.contract.UnpackLog(event, "Send", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// GatewayEVMUpgradeTestSendERC20Iterator is returned from FilterSendERC20 and is used to iterate over the raw logs and unpacked data for SendERC20 events raised by the GatewayEVMUpgradeTest contract. +type GatewayEVMUpgradeTestSendERC20Iterator struct { + Event *GatewayEVMUpgradeTestSendERC20 // 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 *GatewayEVMUpgradeTestSendERC20Iterator) 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(GatewayEVMUpgradeTestSendERC20) + 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(GatewayEVMUpgradeTestSendERC20) + 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 *GatewayEVMUpgradeTestSendERC20Iterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *GatewayEVMUpgradeTestSendERC20Iterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// GatewayEVMUpgradeTestSendERC20 represents a SendERC20 event raised by the GatewayEVMUpgradeTest contract. +type GatewayEVMUpgradeTestSendERC20 struct { + Recipient []byte + Asset common.Address + Amount *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterSendERC20 is a free log retrieval operation binding the contract event 0x35fb30ed1b8e81eb91001dad742b13b1491a67c722e8c593a886a18500f7d9af. +// +// Solidity: event SendERC20(bytes recipient, address indexed asset, uint256 amount) +func (_GatewayEVMUpgradeTest *GatewayEVMUpgradeTestFilterer) FilterSendERC20(opts *bind.FilterOpts, asset []common.Address) (*GatewayEVMUpgradeTestSendERC20Iterator, error) { + + var assetRule []interface{} + for _, assetItem := range asset { + assetRule = append(assetRule, assetItem) + } + + logs, sub, err := _GatewayEVMUpgradeTest.contract.FilterLogs(opts, "SendERC20", assetRule) + if err != nil { + return nil, err + } + return &GatewayEVMUpgradeTestSendERC20Iterator{contract: _GatewayEVMUpgradeTest.contract, event: "SendERC20", logs: logs, sub: sub}, nil +} + +// WatchSendERC20 is a free log subscription operation binding the contract event 0x35fb30ed1b8e81eb91001dad742b13b1491a67c722e8c593a886a18500f7d9af. +// +// Solidity: event SendERC20(bytes recipient, address indexed asset, uint256 amount) +func (_GatewayEVMUpgradeTest *GatewayEVMUpgradeTestFilterer) WatchSendERC20(opts *bind.WatchOpts, sink chan<- *GatewayEVMUpgradeTestSendERC20, asset []common.Address) (event.Subscription, error) { + + var assetRule []interface{} + for _, assetItem := range asset { + assetRule = append(assetRule, assetItem) + } + + logs, sub, err := _GatewayEVMUpgradeTest.contract.WatchLogs(opts, "SendERC20", assetRule) + 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(GatewayEVMUpgradeTestSendERC20) + if err := _GatewayEVMUpgradeTest.contract.UnpackLog(event, "SendERC20", 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 +} + +// ParseSendERC20 is a log parse operation binding the contract event 0x35fb30ed1b8e81eb91001dad742b13b1491a67c722e8c593a886a18500f7d9af. +// +// Solidity: event SendERC20(bytes recipient, address indexed asset, uint256 amount) +func (_GatewayEVMUpgradeTest *GatewayEVMUpgradeTestFilterer) ParseSendERC20(log types.Log) (*GatewayEVMUpgradeTestSendERC20, error) { + event := new(GatewayEVMUpgradeTestSendERC20) + if err := _GatewayEVMUpgradeTest.contract.UnpackLog(event, "SendERC20", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// GatewayEVMUpgradeTestUpgradedIterator is returned from FilterUpgraded and is used to iterate over the raw logs and unpacked data for Upgraded events raised by the GatewayEVMUpgradeTest contract. +type GatewayEVMUpgradeTestUpgradedIterator struct { + Event *GatewayEVMUpgradeTestUpgraded // 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 *GatewayEVMUpgradeTestUpgradedIterator) 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(GatewayEVMUpgradeTestUpgraded) + 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(GatewayEVMUpgradeTestUpgraded) + 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 *GatewayEVMUpgradeTestUpgradedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *GatewayEVMUpgradeTestUpgradedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// GatewayEVMUpgradeTestUpgraded represents a Upgraded event raised by the GatewayEVMUpgradeTest contract. +type GatewayEVMUpgradeTestUpgraded 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 (_GatewayEVMUpgradeTest *GatewayEVMUpgradeTestFilterer) FilterUpgraded(opts *bind.FilterOpts, implementation []common.Address) (*GatewayEVMUpgradeTestUpgradedIterator, error) { + + var implementationRule []interface{} + for _, implementationItem := range implementation { + implementationRule = append(implementationRule, implementationItem) + } + + logs, sub, err := _GatewayEVMUpgradeTest.contract.FilterLogs(opts, "Upgraded", implementationRule) + if err != nil { + return nil, err + } + return &GatewayEVMUpgradeTestUpgradedIterator{contract: _GatewayEVMUpgradeTest.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 (_GatewayEVMUpgradeTest *GatewayEVMUpgradeTestFilterer) WatchUpgraded(opts *bind.WatchOpts, sink chan<- *GatewayEVMUpgradeTestUpgraded, implementation []common.Address) (event.Subscription, error) { + + var implementationRule []interface{} + for _, implementationItem := range implementation { + implementationRule = append(implementationRule, implementationItem) + } + + logs, sub, err := _GatewayEVMUpgradeTest.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(GatewayEVMUpgradeTestUpgraded) + if err := _GatewayEVMUpgradeTest.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 (_GatewayEVMUpgradeTest *GatewayEVMUpgradeTestFilterer) ParseUpgraded(log types.Log) (*GatewayEVMUpgradeTestUpgraded, error) { + event := new(GatewayEVMUpgradeTestUpgraded) + if err := _GatewayEVMUpgradeTest.contract.UnpackLog(event, "Upgraded", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} diff --git a/pkg/contracts/prototypes/evm/interfaces.sol/igatewayevm.go b/pkg/contracts/prototypes/evm/interfaces.sol/igatewayevm.go new file mode 100644 index 00000000..def1e811 --- /dev/null +++ b/pkg/contracts/prototypes/evm/interfaces.sol/igatewayevm.go @@ -0,0 +1,265 @@ +// 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 +) + +// IGatewayEVMMetaData contains all meta data concerning the IGatewayEVM contract. +var IGatewayEVMMetaData = &bind.MetaData{ + ABI: "[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"destination\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"execute\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"executeWithERC20\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"recipient\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"send\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"recipient\",\"type\":\"bytes\"},{\"internalType\":\"address\",\"name\":\"asset\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"sendERC20\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", +} + +// IGatewayEVMABI is the input ABI used to generate the binding from. +// Deprecated: Use IGatewayEVMMetaData.ABI instead. +var IGatewayEVMABI = IGatewayEVMMetaData.ABI + +// IGatewayEVM is an auto generated Go binding around an Ethereum contract. +type IGatewayEVM struct { + IGatewayEVMCaller // Read-only binding to the contract + IGatewayEVMTransactor // Write-only binding to the contract + IGatewayEVMFilterer // Log filterer for contract events +} + +// IGatewayEVMCaller is an auto generated read-only Go binding around an Ethereum contract. +type IGatewayEVMCaller struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// IGatewayEVMTransactor is an auto generated write-only Go binding around an Ethereum contract. +type IGatewayEVMTransactor struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// IGatewayEVMFilterer is an auto generated log filtering Go binding around an Ethereum contract events. +type IGatewayEVMFilterer struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// IGatewayEVMSession is an auto generated Go binding around an Ethereum contract, +// with pre-set call and transact options. +type IGatewayEVMSession struct { + Contract *IGatewayEVM // 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 +} + +// IGatewayEVMCallerSession is an auto generated read-only Go binding around an Ethereum contract, +// with pre-set call options. +type IGatewayEVMCallerSession struct { + Contract *IGatewayEVMCaller // Generic contract caller binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session +} + +// IGatewayEVMTransactorSession is an auto generated write-only Go binding around an Ethereum contract, +// with pre-set transact options. +type IGatewayEVMTransactorSession struct { + Contract *IGatewayEVMTransactor // Generic contract transactor binding to set the session for + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// IGatewayEVMRaw is an auto generated low-level Go binding around an Ethereum contract. +type IGatewayEVMRaw struct { + Contract *IGatewayEVM // Generic contract binding to access the raw methods on +} + +// IGatewayEVMCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. +type IGatewayEVMCallerRaw struct { + Contract *IGatewayEVMCaller // Generic read-only contract binding to access the raw methods on +} + +// IGatewayEVMTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. +type IGatewayEVMTransactorRaw struct { + Contract *IGatewayEVMTransactor // Generic write-only contract binding to access the raw methods on +} + +// NewIGatewayEVM creates a new instance of IGatewayEVM, bound to a specific deployed contract. +func NewIGatewayEVM(address common.Address, backend bind.ContractBackend) (*IGatewayEVM, error) { + contract, err := bindIGatewayEVM(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &IGatewayEVM{IGatewayEVMCaller: IGatewayEVMCaller{contract: contract}, IGatewayEVMTransactor: IGatewayEVMTransactor{contract: contract}, IGatewayEVMFilterer: IGatewayEVMFilterer{contract: contract}}, nil +} + +// NewIGatewayEVMCaller creates a new read-only instance of IGatewayEVM, bound to a specific deployed contract. +func NewIGatewayEVMCaller(address common.Address, caller bind.ContractCaller) (*IGatewayEVMCaller, error) { + contract, err := bindIGatewayEVM(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &IGatewayEVMCaller{contract: contract}, nil +} + +// NewIGatewayEVMTransactor creates a new write-only instance of IGatewayEVM, bound to a specific deployed contract. +func NewIGatewayEVMTransactor(address common.Address, transactor bind.ContractTransactor) (*IGatewayEVMTransactor, error) { + contract, err := bindIGatewayEVM(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &IGatewayEVMTransactor{contract: contract}, nil +} + +// NewIGatewayEVMFilterer creates a new log filterer instance of IGatewayEVM, bound to a specific deployed contract. +func NewIGatewayEVMFilterer(address common.Address, filterer bind.ContractFilterer) (*IGatewayEVMFilterer, error) { + contract, err := bindIGatewayEVM(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &IGatewayEVMFilterer{contract: contract}, nil +} + +// bindIGatewayEVM binds a generic wrapper to an already deployed contract. +func bindIGatewayEVM(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := IGatewayEVMMetaData.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 (_IGatewayEVM *IGatewayEVMRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _IGatewayEVM.Contract.IGatewayEVMCaller.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 (_IGatewayEVM *IGatewayEVMRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _IGatewayEVM.Contract.IGatewayEVMTransactor.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_IGatewayEVM *IGatewayEVMRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _IGatewayEVM.Contract.IGatewayEVMTransactor.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 (_IGatewayEVM *IGatewayEVMCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _IGatewayEVM.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 (_IGatewayEVM *IGatewayEVMTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _IGatewayEVM.Contract.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_IGatewayEVM *IGatewayEVMTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _IGatewayEVM.Contract.contract.Transact(opts, method, params...) +} + +// Execute is a paid mutator transaction binding the contract method 0x1cff79cd. +// +// Solidity: function execute(address destination, bytes data) payable returns(bytes) +func (_IGatewayEVM *IGatewayEVMTransactor) Execute(opts *bind.TransactOpts, destination common.Address, data []byte) (*types.Transaction, error) { + return _IGatewayEVM.contract.Transact(opts, "execute", destination, data) +} + +// Execute is a paid mutator transaction binding the contract method 0x1cff79cd. +// +// Solidity: function execute(address destination, bytes data) payable returns(bytes) +func (_IGatewayEVM *IGatewayEVMSession) Execute(destination common.Address, data []byte) (*types.Transaction, error) { + return _IGatewayEVM.Contract.Execute(&_IGatewayEVM.TransactOpts, destination, data) +} + +// Execute is a paid mutator transaction binding the contract method 0x1cff79cd. +// +// Solidity: function execute(address destination, bytes data) payable returns(bytes) +func (_IGatewayEVM *IGatewayEVMTransactorSession) Execute(destination common.Address, data []byte) (*types.Transaction, error) { + return _IGatewayEVM.Contract.Execute(&_IGatewayEVM.TransactOpts, destination, data) +} + +// ExecuteWithERC20 is a paid mutator transaction binding the contract method 0x5131ab59. +// +// Solidity: function executeWithERC20(address token, address to, uint256 amount, bytes data) returns(bytes) +func (_IGatewayEVM *IGatewayEVMTransactor) ExecuteWithERC20(opts *bind.TransactOpts, token common.Address, to common.Address, amount *big.Int, data []byte) (*types.Transaction, error) { + return _IGatewayEVM.contract.Transact(opts, "executeWithERC20", token, to, amount, data) +} + +// ExecuteWithERC20 is a paid mutator transaction binding the contract method 0x5131ab59. +// +// Solidity: function executeWithERC20(address token, address to, uint256 amount, bytes data) returns(bytes) +func (_IGatewayEVM *IGatewayEVMSession) ExecuteWithERC20(token common.Address, to common.Address, amount *big.Int, data []byte) (*types.Transaction, error) { + return _IGatewayEVM.Contract.ExecuteWithERC20(&_IGatewayEVM.TransactOpts, token, to, amount, data) +} + +// ExecuteWithERC20 is a paid mutator transaction binding the contract method 0x5131ab59. +// +// Solidity: function executeWithERC20(address token, address to, uint256 amount, bytes data) returns(bytes) +func (_IGatewayEVM *IGatewayEVMTransactorSession) ExecuteWithERC20(token common.Address, to common.Address, amount *big.Int, data []byte) (*types.Transaction, error) { + return _IGatewayEVM.Contract.ExecuteWithERC20(&_IGatewayEVM.TransactOpts, token, to, amount, data) +} + +// Send is a paid mutator transaction binding the contract method 0x9372c4ab. +// +// Solidity: function send(bytes recipient, uint256 amount) payable returns() +func (_IGatewayEVM *IGatewayEVMTransactor) Send(opts *bind.TransactOpts, recipient []byte, amount *big.Int) (*types.Transaction, error) { + return _IGatewayEVM.contract.Transact(opts, "send", recipient, amount) +} + +// Send is a paid mutator transaction binding the contract method 0x9372c4ab. +// +// Solidity: function send(bytes recipient, uint256 amount) payable returns() +func (_IGatewayEVM *IGatewayEVMSession) Send(recipient []byte, amount *big.Int) (*types.Transaction, error) { + return _IGatewayEVM.Contract.Send(&_IGatewayEVM.TransactOpts, recipient, amount) +} + +// Send is a paid mutator transaction binding the contract method 0x9372c4ab. +// +// Solidity: function send(bytes recipient, uint256 amount) payable returns() +func (_IGatewayEVM *IGatewayEVMTransactorSession) Send(recipient []byte, amount *big.Int) (*types.Transaction, error) { + return _IGatewayEVM.Contract.Send(&_IGatewayEVM.TransactOpts, recipient, amount) +} + +// SendERC20 is a paid mutator transaction binding the contract method 0xcb0271ed. +// +// Solidity: function sendERC20(bytes recipient, address asset, uint256 amount) returns() +func (_IGatewayEVM *IGatewayEVMTransactor) SendERC20(opts *bind.TransactOpts, recipient []byte, asset common.Address, amount *big.Int) (*types.Transaction, error) { + return _IGatewayEVM.contract.Transact(opts, "sendERC20", recipient, asset, amount) +} + +// SendERC20 is a paid mutator transaction binding the contract method 0xcb0271ed. +// +// Solidity: function sendERC20(bytes recipient, address asset, uint256 amount) returns() +func (_IGatewayEVM *IGatewayEVMSession) SendERC20(recipient []byte, asset common.Address, amount *big.Int) (*types.Transaction, error) { + return _IGatewayEVM.Contract.SendERC20(&_IGatewayEVM.TransactOpts, recipient, asset, amount) +} + +// SendERC20 is a paid mutator transaction binding the contract method 0xcb0271ed. +// +// Solidity: function sendERC20(bytes recipient, address asset, uint256 amount) returns() +func (_IGatewayEVM *IGatewayEVMTransactorSession) SendERC20(recipient []byte, asset common.Address, amount *big.Int) (*types.Transaction, error) { + return _IGatewayEVM.Contract.SendERC20(&_IGatewayEVM.TransactOpts, recipient, asset, amount) +} diff --git a/pkg/contracts/prototypes/evm/receiver.sol/receiver.go b/pkg/contracts/prototypes/evm/receiver.sol/receiver.go new file mode 100644 index 00000000..8a976a45 --- /dev/null +++ b/pkg/contracts/prototypes/evm/receiver.sol/receiver.go @@ -0,0 +1,833 @@ +// Code generated - DO NOT EDIT. +// This file is a generated binding and any manual changes will be lost. + +package receiver + +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 +) + +// ReceiverMetaData contains all meta data concerning the Receiver contract. +var ReceiverMetaData = &bind.MetaData{ + ABI: "[{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"destination\",\"type\":\"address\"}],\"name\":\"ReceivedERC20\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"ReceivedNoParams\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"string[]\",\"name\":\"strs\",\"type\":\"string[]\"},{\"indexed\":false,\"internalType\":\"uint256[]\",\"name\":\"nums\",\"type\":\"uint256[]\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"flag\",\"type\":\"bool\"}],\"name\":\"ReceivedNonPayable\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"str\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"num\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"flag\",\"type\":\"bool\"}],\"name\":\"ReceivedPayable\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"destination\",\"type\":\"address\"}],\"name\":\"receiveERC20\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"receiveNoParams\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string[]\",\"name\":\"strs\",\"type\":\"string[]\"},{\"internalType\":\"uint256[]\",\"name\":\"nums\",\"type\":\"uint256[]\"},{\"internalType\":\"bool\",\"name\":\"flag\",\"type\":\"bool\"}],\"name\":\"receiveNonPayable\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"str\",\"type\":\"string\"},{\"internalType\":\"uint256\",\"name\":\"num\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"flag\",\"type\":\"bool\"}],\"name\":\"receivePayable\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"}]", + Bin: "0x608060405234801561001057600080fd5b5061108a806100206000396000f3fe60806040526004361061003f5760003560e01c8063357fc5a2146100445780636ed701691461006d578063e04d4f9714610084578063f05b6abf146100a0575b600080fd5b34801561005057600080fd5b5061006b6004803603810190610066919061085a565b6100c9565b005b34801561007957600080fd5b50610082610138565b005b61009e600480360381019061009991906107eb565b610171565b005b3480156100ac57600080fd5b506100c760048036038101906100c29190610733565b6101b5565b005b6100f63382858573ffffffffffffffffffffffffffffffffffffffff166101f7909392919063ffffffff16565b7f2b58128f24a9f59127cc5b5430d70542b22220f2d9adaa86e442b816ab98af603384848460405161012b9493929190610bb0565b60405180910390a1505050565b7fbcaadb46b82a48af60b608f58959ae6b8310d1b0a0d094c2e9ec3208ed39f2a0336040516101679190610b0b565b60405180910390a1565b7f1f1ff1f5fb41346850b2f5c04e6c767e2f1c8a525c5c0c5cdb60cdf3ca5f62fa33348585856040516101a8959493929190610bf5565b60405180910390a1505050565b7f74a53cd528a921fca7dbdee62f86819051d3cc98f214951f4238e8843f20b146338484846040516101ea9493929190610b5d565b60405180910390a1505050565b61027a846323b872dd60e01b85858560405160240161021893929190610b26565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050610280565b50505050565b60006102e2826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff166103479092919063ffffffff16565b9050600081511115610342578080602001905181019061030291906107be565b610341576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161033890610cb1565b60405180910390fd5b5b505050565b6060610356848460008561035f565b90509392505050565b6060824710156103a4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161039b90610c71565b60405180910390fd5b6000808673ffffffffffffffffffffffffffffffffffffffff1685876040516103cd9190610af4565b60006040518083038185875af1925050503d806000811461040a576040519150601f19603f3d011682016040523d82523d6000602084013e61040f565b606091505b50915091506104208783838761042c565b92505050949350505050565b6060831561048f5760008351141561048757610447856104a2565b610486576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161047d90610c91565b60405180910390fd5b5b82905061049a565b61049983836104c5565b5b949350505050565b6000808273ffffffffffffffffffffffffffffffffffffffff163b119050919050565b6000825111156104d85781518083602001fd5b806040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161050c9190610c4f565b60405180910390fd5b600061052861052384610cf6565b610cd1565b9050808382526020820190508285602086028201111561054b5761054a610f23565b5b60005b8581101561059957813567ffffffffffffffff81111561057157610570610f1e565b5b80860161057e89826106f0565b8552602085019450602084019350505060018101905061054e565b5050509392505050565b60006105b66105b184610d22565b610cd1565b905080838252602082019050828560208602820111156105d9576105d8610f23565b5b60005b8581101561060957816105ef888261071e565b8452602084019350602083019250506001810190506105dc565b5050509392505050565b600061062661062184610d4e565b610cd1565b90508281526020810184848401111561064257610641610f28565b5b61064d848285610e7c565b509392505050565b6000813590506106648161100f565b92915050565b600082601f83011261067f5761067e610f1e565b5b813561068f848260208601610515565b91505092915050565b600082601f8301126106ad576106ac610f1e565b5b81356106bd8482602086016105a3565b91505092915050565b6000813590506106d581611026565b92915050565b6000815190506106ea81611026565b92915050565b600082601f83011261070557610704610f1e565b5b8135610715848260208601610613565b91505092915050565b60008135905061072d8161103d565b92915050565b60008060006060848603121561074c5761074b610f32565b5b600084013567ffffffffffffffff81111561076a57610769610f2d565b5b6107768682870161066a565b935050602084013567ffffffffffffffff81111561079757610796610f2d565b5b6107a386828701610698565b92505060406107b4868287016106c6565b9150509250925092565b6000602082840312156107d4576107d3610f32565b5b60006107e2848285016106db565b91505092915050565b60008060006060848603121561080457610803610f32565b5b600084013567ffffffffffffffff81111561082257610821610f2d565b5b61082e868287016106f0565b935050602061083f8682870161071e565b9250506040610850868287016106c6565b9150509250925092565b60008060006060848603121561087357610872610f32565b5b60006108818682870161071e565b935050602061089286828701610655565b92505060406108a386828701610655565b9150509250925092565b60006108b983836109fb565b905092915050565b60006108cd8383610ad6565b60208301905092915050565b6108e281610e34565b82525050565b60006108f382610d9f565b6108fd8185610de5565b93508360208202850161090f85610d7f565b8060005b8581101561094b578484038952815161092c85826108ad565b945061093783610dcb565b925060208a01995050600181019050610913565b50829750879550505050505092915050565b600061096882610daa565b6109728185610df6565b935061097d83610d8f565b8060005b838110156109ae57815161099588826108c1565b97506109a083610dd8565b925050600181019050610981565b5085935050505092915050565b6109c481610e46565b82525050565b60006109d582610db5565b6109df8185610e07565b93506109ef818560208601610e8b565b80840191505092915050565b6000610a0682610dc0565b610a108185610e12565b9350610a20818560208601610e8b565b610a2981610f37565b840191505092915050565b6000610a3f82610dc0565b610a498185610e23565b9350610a59818560208601610e8b565b610a6281610f37565b840191505092915050565b6000610a7a602683610e23565b9150610a8582610f48565b604082019050919050565b6000610a9d601d83610e23565b9150610aa882610f97565b602082019050919050565b6000610ac0602a83610e23565b9150610acb82610fc0565b604082019050919050565b610adf81610e72565b82525050565b610aee81610e72565b82525050565b6000610b0082846109ca565b915081905092915050565b6000602082019050610b2060008301846108d9565b92915050565b6000606082019050610b3b60008301866108d9565b610b4860208301856108d9565b610b556040830184610ae5565b949350505050565b6000608082019050610b7260008301876108d9565b8181036020830152610b8481866108e8565b90508181036040830152610b98818561095d565b9050610ba760608301846109bb565b95945050505050565b6000608082019050610bc560008301876108d9565b610bd26020830186610ae5565b610bdf60408301856108d9565b610bec60608301846108d9565b95945050505050565b600060a082019050610c0a60008301886108d9565b610c176020830187610ae5565b8181036040830152610c298186610a34565b9050610c386060830185610ae5565b610c4560808301846109bb565b9695505050505050565b60006020820190508181036000830152610c698184610a34565b905092915050565b60006020820190508181036000830152610c8a81610a6d565b9050919050565b60006020820190508181036000830152610caa81610a90565b9050919050565b60006020820190508181036000830152610cca81610ab3565b9050919050565b6000610cdb610cec565b9050610ce78282610ebe565b919050565b6000604051905090565b600067ffffffffffffffff821115610d1157610d10610eef565b5b602082029050602081019050919050565b600067ffffffffffffffff821115610d3d57610d3c610eef565b5b602082029050602081019050919050565b600067ffffffffffffffff821115610d6957610d68610eef565b5b610d7282610f37565b9050602081019050919050565b6000819050602082019050919050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b600081905092915050565b600082825260208201905092915050565b600082825260208201905092915050565b6000610e3f82610e52565b9050919050565b60008115159050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b82818337600083830152505050565b60005b83811015610ea9578082015181840152602081019050610e8e565b83811115610eb8576000848401525b50505050565b610ec782610f37565b810181811067ffffffffffffffff82111715610ee657610ee5610eef565b5b80604052505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f416464726573733a20696e73756666696369656e742062616c616e636520666f60008201527f722063616c6c0000000000000000000000000000000000000000000000000000602082015250565b7f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000600082015250565b7f5361666545524332303a204552433230206f7065726174696f6e20646964206e60008201527f6f74207375636365656400000000000000000000000000000000000000000000602082015250565b61101881610e34565b811461102357600080fd5b50565b61102f81610e46565b811461103a57600080fd5b50565b61104681610e72565b811461105157600080fd5b5056fea264697066735822122069722b36f6aa512f9b0f76207f5b5cbc4a4f69e9581bf19d4c36cde9ee1c6c3e64736f6c63430008070033", +} + +// ReceiverABI is the input ABI used to generate the binding from. +// Deprecated: Use ReceiverMetaData.ABI instead. +var ReceiverABI = ReceiverMetaData.ABI + +// ReceiverBin is the compiled bytecode used for deploying new contracts. +// Deprecated: Use ReceiverMetaData.Bin instead. +var ReceiverBin = ReceiverMetaData.Bin + +// DeployReceiver deploys a new Ethereum contract, binding an instance of Receiver to it. +func DeployReceiver(auth *bind.TransactOpts, backend bind.ContractBackend) (common.Address, *types.Transaction, *Receiver, error) { + parsed, err := ReceiverMetaData.GetAbi() + 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(ReceiverBin), backend) + if err != nil { + return common.Address{}, nil, nil, err + } + return address, tx, &Receiver{ReceiverCaller: ReceiverCaller{contract: contract}, ReceiverTransactor: ReceiverTransactor{contract: contract}, ReceiverFilterer: ReceiverFilterer{contract: contract}}, nil +} + +// Receiver is an auto generated Go binding around an Ethereum contract. +type Receiver struct { + ReceiverCaller // Read-only binding to the contract + ReceiverTransactor // Write-only binding to the contract + ReceiverFilterer // Log filterer for contract events +} + +// ReceiverCaller is an auto generated read-only Go binding around an Ethereum contract. +type ReceiverCaller struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// ReceiverTransactor is an auto generated write-only Go binding around an Ethereum contract. +type ReceiverTransactor struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// ReceiverFilterer is an auto generated log filtering Go binding around an Ethereum contract events. +type ReceiverFilterer struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// ReceiverSession is an auto generated Go binding around an Ethereum contract, +// with pre-set call and transact options. +type ReceiverSession struct { + Contract *Receiver // Generic contract binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// ReceiverCallerSession is an auto generated read-only Go binding around an Ethereum contract, +// with pre-set call options. +type ReceiverCallerSession struct { + Contract *ReceiverCaller // Generic contract caller binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session +} + +// ReceiverTransactorSession is an auto generated write-only Go binding around an Ethereum contract, +// with pre-set transact options. +type ReceiverTransactorSession struct { + Contract *ReceiverTransactor // Generic contract transactor binding to set the session for + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// ReceiverRaw is an auto generated low-level Go binding around an Ethereum contract. +type ReceiverRaw struct { + Contract *Receiver // Generic contract binding to access the raw methods on +} + +// ReceiverCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. +type ReceiverCallerRaw struct { + Contract *ReceiverCaller // Generic read-only contract binding to access the raw methods on +} + +// ReceiverTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. +type ReceiverTransactorRaw struct { + Contract *ReceiverTransactor // Generic write-only contract binding to access the raw methods on +} + +// NewReceiver creates a new instance of Receiver, bound to a specific deployed contract. +func NewReceiver(address common.Address, backend bind.ContractBackend) (*Receiver, error) { + contract, err := bindReceiver(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &Receiver{ReceiverCaller: ReceiverCaller{contract: contract}, ReceiverTransactor: ReceiverTransactor{contract: contract}, ReceiverFilterer: ReceiverFilterer{contract: contract}}, nil +} + +// NewReceiverCaller creates a new read-only instance of Receiver, bound to a specific deployed contract. +func NewReceiverCaller(address common.Address, caller bind.ContractCaller) (*ReceiverCaller, error) { + contract, err := bindReceiver(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &ReceiverCaller{contract: contract}, nil +} + +// NewReceiverTransactor creates a new write-only instance of Receiver, bound to a specific deployed contract. +func NewReceiverTransactor(address common.Address, transactor bind.ContractTransactor) (*ReceiverTransactor, error) { + contract, err := bindReceiver(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &ReceiverTransactor{contract: contract}, nil +} + +// NewReceiverFilterer creates a new log filterer instance of Receiver, bound to a specific deployed contract. +func NewReceiverFilterer(address common.Address, filterer bind.ContractFilterer) (*ReceiverFilterer, error) { + contract, err := bindReceiver(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &ReceiverFilterer{contract: contract}, nil +} + +// bindReceiver binds a generic wrapper to an already deployed contract. +func bindReceiver(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := ReceiverMetaData.GetAbi() + 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 (_Receiver *ReceiverRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _Receiver.Contract.ReceiverCaller.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_Receiver *ReceiverRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _Receiver.Contract.ReceiverTransactor.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_Receiver *ReceiverRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _Receiver.Contract.ReceiverTransactor.contract.Transact(opts, method, params...) +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_Receiver *ReceiverCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _Receiver.Contract.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_Receiver *ReceiverTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _Receiver.Contract.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_Receiver *ReceiverTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _Receiver.Contract.contract.Transact(opts, method, params...) +} + +// ReceiveERC20 is a paid mutator transaction binding the contract method 0x357fc5a2. +// +// Solidity: function receiveERC20(uint256 amount, address token, address destination) returns() +func (_Receiver *ReceiverTransactor) ReceiveERC20(opts *bind.TransactOpts, amount *big.Int, token common.Address, destination common.Address) (*types.Transaction, error) { + return _Receiver.contract.Transact(opts, "receiveERC20", amount, token, destination) +} + +// ReceiveERC20 is a paid mutator transaction binding the contract method 0x357fc5a2. +// +// Solidity: function receiveERC20(uint256 amount, address token, address destination) returns() +func (_Receiver *ReceiverSession) ReceiveERC20(amount *big.Int, token common.Address, destination common.Address) (*types.Transaction, error) { + return _Receiver.Contract.ReceiveERC20(&_Receiver.TransactOpts, amount, token, destination) +} + +// ReceiveERC20 is a paid mutator transaction binding the contract method 0x357fc5a2. +// +// Solidity: function receiveERC20(uint256 amount, address token, address destination) returns() +func (_Receiver *ReceiverTransactorSession) ReceiveERC20(amount *big.Int, token common.Address, destination common.Address) (*types.Transaction, error) { + return _Receiver.Contract.ReceiveERC20(&_Receiver.TransactOpts, amount, token, destination) +} + +// ReceiveNoParams is a paid mutator transaction binding the contract method 0x6ed70169. +// +// Solidity: function receiveNoParams() returns() +func (_Receiver *ReceiverTransactor) ReceiveNoParams(opts *bind.TransactOpts) (*types.Transaction, error) { + return _Receiver.contract.Transact(opts, "receiveNoParams") +} + +// ReceiveNoParams is a paid mutator transaction binding the contract method 0x6ed70169. +// +// Solidity: function receiveNoParams() returns() +func (_Receiver *ReceiverSession) ReceiveNoParams() (*types.Transaction, error) { + return _Receiver.Contract.ReceiveNoParams(&_Receiver.TransactOpts) +} + +// ReceiveNoParams is a paid mutator transaction binding the contract method 0x6ed70169. +// +// Solidity: function receiveNoParams() returns() +func (_Receiver *ReceiverTransactorSession) ReceiveNoParams() (*types.Transaction, error) { + return _Receiver.Contract.ReceiveNoParams(&_Receiver.TransactOpts) +} + +// ReceiveNonPayable is a paid mutator transaction binding the contract method 0xf05b6abf. +// +// Solidity: function receiveNonPayable(string[] strs, uint256[] nums, bool flag) returns() +func (_Receiver *ReceiverTransactor) ReceiveNonPayable(opts *bind.TransactOpts, strs []string, nums []*big.Int, flag bool) (*types.Transaction, error) { + return _Receiver.contract.Transact(opts, "receiveNonPayable", strs, nums, flag) +} + +// ReceiveNonPayable is a paid mutator transaction binding the contract method 0xf05b6abf. +// +// Solidity: function receiveNonPayable(string[] strs, uint256[] nums, bool flag) returns() +func (_Receiver *ReceiverSession) ReceiveNonPayable(strs []string, nums []*big.Int, flag bool) (*types.Transaction, error) { + return _Receiver.Contract.ReceiveNonPayable(&_Receiver.TransactOpts, strs, nums, flag) +} + +// ReceiveNonPayable is a paid mutator transaction binding the contract method 0xf05b6abf. +// +// Solidity: function receiveNonPayable(string[] strs, uint256[] nums, bool flag) returns() +func (_Receiver *ReceiverTransactorSession) ReceiveNonPayable(strs []string, nums []*big.Int, flag bool) (*types.Transaction, error) { + return _Receiver.Contract.ReceiveNonPayable(&_Receiver.TransactOpts, strs, nums, flag) +} + +// ReceivePayable is a paid mutator transaction binding the contract method 0xe04d4f97. +// +// Solidity: function receivePayable(string str, uint256 num, bool flag) payable returns() +func (_Receiver *ReceiverTransactor) ReceivePayable(opts *bind.TransactOpts, str string, num *big.Int, flag bool) (*types.Transaction, error) { + return _Receiver.contract.Transact(opts, "receivePayable", str, num, flag) +} + +// ReceivePayable is a paid mutator transaction binding the contract method 0xe04d4f97. +// +// Solidity: function receivePayable(string str, uint256 num, bool flag) payable returns() +func (_Receiver *ReceiverSession) ReceivePayable(str string, num *big.Int, flag bool) (*types.Transaction, error) { + return _Receiver.Contract.ReceivePayable(&_Receiver.TransactOpts, str, num, flag) +} + +// ReceivePayable is a paid mutator transaction binding the contract method 0xe04d4f97. +// +// Solidity: function receivePayable(string str, uint256 num, bool flag) payable returns() +func (_Receiver *ReceiverTransactorSession) ReceivePayable(str string, num *big.Int, flag bool) (*types.Transaction, error) { + return _Receiver.Contract.ReceivePayable(&_Receiver.TransactOpts, str, num, flag) +} + +// ReceiverReceivedERC20Iterator is returned from FilterReceivedERC20 and is used to iterate over the raw logs and unpacked data for ReceivedERC20 events raised by the Receiver contract. +type ReceiverReceivedERC20Iterator struct { + Event *ReceiverReceivedERC20 // Event containing the contract specifics and raw log + + 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 *ReceiverReceivedERC20Iterator) 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(ReceiverReceivedERC20) + 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(ReceiverReceivedERC20) + 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 *ReceiverReceivedERC20Iterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *ReceiverReceivedERC20Iterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// ReceiverReceivedERC20 represents a ReceivedERC20 event raised by the Receiver contract. +type ReceiverReceivedERC20 struct { + Sender common.Address + Amount *big.Int + Token common.Address + Destination common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterReceivedERC20 is a free log retrieval operation binding the contract event 0x2b58128f24a9f59127cc5b5430d70542b22220f2d9adaa86e442b816ab98af60. +// +// Solidity: event ReceivedERC20(address sender, uint256 amount, address token, address destination) +func (_Receiver *ReceiverFilterer) FilterReceivedERC20(opts *bind.FilterOpts) (*ReceiverReceivedERC20Iterator, error) { + + logs, sub, err := _Receiver.contract.FilterLogs(opts, "ReceivedERC20") + if err != nil { + return nil, err + } + return &ReceiverReceivedERC20Iterator{contract: _Receiver.contract, event: "ReceivedERC20", logs: logs, sub: sub}, nil +} + +// WatchReceivedERC20 is a free log subscription operation binding the contract event 0x2b58128f24a9f59127cc5b5430d70542b22220f2d9adaa86e442b816ab98af60. +// +// Solidity: event ReceivedERC20(address sender, uint256 amount, address token, address destination) +func (_Receiver *ReceiverFilterer) WatchReceivedERC20(opts *bind.WatchOpts, sink chan<- *ReceiverReceivedERC20) (event.Subscription, error) { + + logs, sub, err := _Receiver.contract.WatchLogs(opts, "ReceivedERC20") + 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(ReceiverReceivedERC20) + if err := _Receiver.contract.UnpackLog(event, "ReceivedERC20", 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 +} + +// ParseReceivedERC20 is a log parse operation binding the contract event 0x2b58128f24a9f59127cc5b5430d70542b22220f2d9adaa86e442b816ab98af60. +// +// Solidity: event ReceivedERC20(address sender, uint256 amount, address token, address destination) +func (_Receiver *ReceiverFilterer) ParseReceivedERC20(log types.Log) (*ReceiverReceivedERC20, error) { + event := new(ReceiverReceivedERC20) + if err := _Receiver.contract.UnpackLog(event, "ReceivedERC20", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// ReceiverReceivedNoParamsIterator is returned from FilterReceivedNoParams and is used to iterate over the raw logs and unpacked data for ReceivedNoParams events raised by the Receiver contract. +type ReceiverReceivedNoParamsIterator struct { + Event *ReceiverReceivedNoParams // Event containing the contract specifics and raw log + + 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 *ReceiverReceivedNoParamsIterator) 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(ReceiverReceivedNoParams) + 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(ReceiverReceivedNoParams) + 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 *ReceiverReceivedNoParamsIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *ReceiverReceivedNoParamsIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// ReceiverReceivedNoParams represents a ReceivedNoParams event raised by the Receiver contract. +type ReceiverReceivedNoParams struct { + Sender common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterReceivedNoParams is a free log retrieval operation binding the contract event 0xbcaadb46b82a48af60b608f58959ae6b8310d1b0a0d094c2e9ec3208ed39f2a0. +// +// Solidity: event ReceivedNoParams(address sender) +func (_Receiver *ReceiverFilterer) FilterReceivedNoParams(opts *bind.FilterOpts) (*ReceiverReceivedNoParamsIterator, error) { + + logs, sub, err := _Receiver.contract.FilterLogs(opts, "ReceivedNoParams") + if err != nil { + return nil, err + } + return &ReceiverReceivedNoParamsIterator{contract: _Receiver.contract, event: "ReceivedNoParams", logs: logs, sub: sub}, nil +} + +// WatchReceivedNoParams is a free log subscription operation binding the contract event 0xbcaadb46b82a48af60b608f58959ae6b8310d1b0a0d094c2e9ec3208ed39f2a0. +// +// Solidity: event ReceivedNoParams(address sender) +func (_Receiver *ReceiverFilterer) WatchReceivedNoParams(opts *bind.WatchOpts, sink chan<- *ReceiverReceivedNoParams) (event.Subscription, error) { + + logs, sub, err := _Receiver.contract.WatchLogs(opts, "ReceivedNoParams") + 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(ReceiverReceivedNoParams) + if err := _Receiver.contract.UnpackLog(event, "ReceivedNoParams", 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 +} + +// ParseReceivedNoParams is a log parse operation binding the contract event 0xbcaadb46b82a48af60b608f58959ae6b8310d1b0a0d094c2e9ec3208ed39f2a0. +// +// Solidity: event ReceivedNoParams(address sender) +func (_Receiver *ReceiverFilterer) ParseReceivedNoParams(log types.Log) (*ReceiverReceivedNoParams, error) { + event := new(ReceiverReceivedNoParams) + if err := _Receiver.contract.UnpackLog(event, "ReceivedNoParams", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// ReceiverReceivedNonPayableIterator is returned from FilterReceivedNonPayable and is used to iterate over the raw logs and unpacked data for ReceivedNonPayable events raised by the Receiver contract. +type ReceiverReceivedNonPayableIterator struct { + Event *ReceiverReceivedNonPayable // Event containing the contract specifics and raw log + + 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 *ReceiverReceivedNonPayableIterator) 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(ReceiverReceivedNonPayable) + 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(ReceiverReceivedNonPayable) + 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 *ReceiverReceivedNonPayableIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *ReceiverReceivedNonPayableIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// ReceiverReceivedNonPayable represents a ReceivedNonPayable event raised by the Receiver contract. +type ReceiverReceivedNonPayable struct { + Sender common.Address + Strs []string + Nums []*big.Int + Flag bool + Raw types.Log // Blockchain specific contextual infos +} + +// FilterReceivedNonPayable is a free log retrieval operation binding the contract event 0x74a53cd528a921fca7dbdee62f86819051d3cc98f214951f4238e8843f20b146. +// +// Solidity: event ReceivedNonPayable(address sender, string[] strs, uint256[] nums, bool flag) +func (_Receiver *ReceiverFilterer) FilterReceivedNonPayable(opts *bind.FilterOpts) (*ReceiverReceivedNonPayableIterator, error) { + + logs, sub, err := _Receiver.contract.FilterLogs(opts, "ReceivedNonPayable") + if err != nil { + return nil, err + } + return &ReceiverReceivedNonPayableIterator{contract: _Receiver.contract, event: "ReceivedNonPayable", logs: logs, sub: sub}, nil +} + +// WatchReceivedNonPayable is a free log subscription operation binding the contract event 0x74a53cd528a921fca7dbdee62f86819051d3cc98f214951f4238e8843f20b146. +// +// Solidity: event ReceivedNonPayable(address sender, string[] strs, uint256[] nums, bool flag) +func (_Receiver *ReceiverFilterer) WatchReceivedNonPayable(opts *bind.WatchOpts, sink chan<- *ReceiverReceivedNonPayable) (event.Subscription, error) { + + logs, sub, err := _Receiver.contract.WatchLogs(opts, "ReceivedNonPayable") + 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(ReceiverReceivedNonPayable) + if err := _Receiver.contract.UnpackLog(event, "ReceivedNonPayable", 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 +} + +// ParseReceivedNonPayable is a log parse operation binding the contract event 0x74a53cd528a921fca7dbdee62f86819051d3cc98f214951f4238e8843f20b146. +// +// Solidity: event ReceivedNonPayable(address sender, string[] strs, uint256[] nums, bool flag) +func (_Receiver *ReceiverFilterer) ParseReceivedNonPayable(log types.Log) (*ReceiverReceivedNonPayable, error) { + event := new(ReceiverReceivedNonPayable) + if err := _Receiver.contract.UnpackLog(event, "ReceivedNonPayable", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// ReceiverReceivedPayableIterator is returned from FilterReceivedPayable and is used to iterate over the raw logs and unpacked data for ReceivedPayable events raised by the Receiver contract. +type ReceiverReceivedPayableIterator struct { + Event *ReceiverReceivedPayable // Event containing the contract specifics and raw log + + 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 *ReceiverReceivedPayableIterator) 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(ReceiverReceivedPayable) + 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(ReceiverReceivedPayable) + 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 *ReceiverReceivedPayableIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *ReceiverReceivedPayableIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// ReceiverReceivedPayable represents a ReceivedPayable event raised by the Receiver contract. +type ReceiverReceivedPayable struct { + Sender common.Address + Value *big.Int + Str string + Num *big.Int + Flag bool + Raw types.Log // Blockchain specific contextual infos +} + +// FilterReceivedPayable is a free log retrieval operation binding the contract event 0x1f1ff1f5fb41346850b2f5c04e6c767e2f1c8a525c5c0c5cdb60cdf3ca5f62fa. +// +// Solidity: event ReceivedPayable(address sender, uint256 value, string str, uint256 num, bool flag) +func (_Receiver *ReceiverFilterer) FilterReceivedPayable(opts *bind.FilterOpts) (*ReceiverReceivedPayableIterator, error) { + + logs, sub, err := _Receiver.contract.FilterLogs(opts, "ReceivedPayable") + if err != nil { + return nil, err + } + return &ReceiverReceivedPayableIterator{contract: _Receiver.contract, event: "ReceivedPayable", logs: logs, sub: sub}, nil +} + +// WatchReceivedPayable is a free log subscription operation binding the contract event 0x1f1ff1f5fb41346850b2f5c04e6c767e2f1c8a525c5c0c5cdb60cdf3ca5f62fa. +// +// Solidity: event ReceivedPayable(address sender, uint256 value, string str, uint256 num, bool flag) +func (_Receiver *ReceiverFilterer) WatchReceivedPayable(opts *bind.WatchOpts, sink chan<- *ReceiverReceivedPayable) (event.Subscription, error) { + + logs, sub, err := _Receiver.contract.WatchLogs(opts, "ReceivedPayable") + 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(ReceiverReceivedPayable) + if err := _Receiver.contract.UnpackLog(event, "ReceivedPayable", 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 +} + +// ParseReceivedPayable is a log parse operation binding the contract event 0x1f1ff1f5fb41346850b2f5c04e6c767e2f1c8a525c5c0c5cdb60cdf3ca5f62fa. +// +// Solidity: event ReceivedPayable(address sender, uint256 value, string str, uint256 num, bool flag) +func (_Receiver *ReceiverFilterer) ParseReceivedPayable(log types.Log) (*ReceiverReceivedPayable, error) { + event := new(ReceiverReceivedPayable) + if err := _Receiver.contract.UnpackLog(event, "ReceivedPayable", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} diff --git a/pkg/contracts/prototypes/evm/testerc20.sol/testerc20.go b/pkg/contracts/prototypes/evm/testerc20.sol/testerc20.go new file mode 100644 index 00000000..5e2a85eb --- /dev/null +++ b/pkg/contracts/prototypes/evm/testerc20.sol/testerc20.go @@ -0,0 +1,823 @@ +// Code generated - DO NOT EDIT. +// This file is a generated binding and any manual changes will be lost. + +package testerc20 + +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 +) + +// TestERC20MetaData contains all meta data concerning the TestERC20 contract. +var TestERC20MetaData = &bind.MetaData{ + ABI: "[{\"inputs\":[{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"symbol\",\"type\":\"string\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"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\":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\"},{\"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\":[],\"name\":\"decimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"subtractedValue\",\"type\":\"uint256\"}],\"name\":\"decreaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"addedValue\",\"type\":\"uint256\"}],\"name\":\"increaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"mint\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", + Bin: "0x60806040523480156200001157600080fd5b5060405162001813380380620018138339818101604052810190620000379190620001a3565b818181600390805190602001906200005192919062000075565b5080600490805190602001906200006a92919062000075565b5050505050620003ac565b8280546200008390620002bd565b90600052602060002090601f016020900481019282620000a75760008555620000f3565b82601f10620000c257805160ff1916838001178555620000f3565b82800160010185558215620000f3579182015b82811115620000f2578251825591602001919060010190620000d5565b5b50905062000102919062000106565b5090565b5b808211156200012157600081600090555060010162000107565b5090565b60006200013c620001368462000251565b62000228565b9050828152602081018484840111156200015b576200015a6200038c565b5b6200016884828562000287565b509392505050565b600082601f83011262000188576200018762000387565b5b81516200019a84826020860162000125565b91505092915050565b60008060408385031215620001bd57620001bc62000396565b5b600083015167ffffffffffffffff811115620001de57620001dd62000391565b5b620001ec8582860162000170565b925050602083015167ffffffffffffffff81111562000210576200020f62000391565b5b6200021e8582860162000170565b9150509250929050565b60006200023462000247565b9050620002428282620002f3565b919050565b6000604051905090565b600067ffffffffffffffff8211156200026f576200026e62000358565b5b6200027a826200039b565b9050602081019050919050565b60005b83811015620002a75780820151818401526020810190506200028a565b83811115620002b7576000848401525b50505050565b60006002820490506001821680620002d657607f821691505b60208210811415620002ed57620002ec62000329565b5b50919050565b620002fe826200039b565b810181811067ffffffffffffffff8211171562000320576200031f62000358565b5b80604052505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b61145780620003bc6000396000f3fe608060405234801561001057600080fd5b50600436106100b45760003560e01c806340c10f191161007157806340c10f19146101a357806370a08231146101bf57806395d89b41146101ef578063a457c2d71461020d578063a9059cbb1461023d578063dd62ed3e1461026d576100b4565b806306fdde03146100b9578063095ea7b3146100d757806318160ddd1461010757806323b872dd14610125578063313ce567146101555780633950935114610173575b600080fd5b6100c161029d565b6040516100ce9190610ecf565b60405180910390f35b6100f160048036038101906100ec9190610cf6565b61032f565b6040516100fe9190610eb4565b60405180910390f35b61010f610352565b60405161011c9190610ff1565b60405180910390f35b61013f600480360381019061013a9190610ca3565b61035c565b60405161014c9190610eb4565b60405180910390f35b61015d61038b565b60405161016a919061100c565b60405180910390f35b61018d60048036038101906101889190610cf6565b610394565b60405161019a9190610eb4565b60405180910390f35b6101bd60048036038101906101b89190610cf6565b6103cb565b005b6101d960048036038101906101d49190610c36565b6103d9565b6040516101e69190610ff1565b60405180910390f35b6101f7610421565b6040516102049190610ecf565b60405180910390f35b61022760048036038101906102229190610cf6565b6104b3565b6040516102349190610eb4565b60405180910390f35b61025760048036038101906102529190610cf6565b61052a565b6040516102649190610eb4565b60405180910390f35b61028760048036038101906102829190610c63565b61054d565b6040516102949190610ff1565b60405180910390f35b6060600380546102ac90611121565b80601f01602080910402602001604051908101604052809291908181526020018280546102d890611121565b80156103255780601f106102fa57610100808354040283529160200191610325565b820191906000526020600020905b81548152906001019060200180831161030857829003601f168201915b5050505050905090565b60008061033a6105d4565b90506103478185856105dc565b600191505092915050565b6000600254905090565b6000806103676105d4565b90506103748582856107a7565b61037f858585610833565b60019150509392505050565b60006012905090565b60008061039f6105d4565b90506103c08185856103b1858961054d565b6103bb9190611043565b6105dc565b600191505092915050565b6103d58282610aab565b5050565b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b60606004805461043090611121565b80601f016020809104026020016040519081016040528092919081815260200182805461045c90611121565b80156104a95780601f1061047e576101008083540402835291602001916104a9565b820191906000526020600020905b81548152906001019060200180831161048c57829003601f168201915b5050505050905090565b6000806104be6105d4565b905060006104cc828661054d565b905083811015610511576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161050890610fb1565b60405180910390fd5b61051e82868684036105dc565b60019250505092915050565b6000806105356105d4565b9050610542818585610833565b600191505092915050565b6000600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141561064c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161064390610f91565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156106bc576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106b390610f11565b60405180910390fd5b80600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9258360405161079a9190610ff1565b60405180910390a3505050565b60006107b3848461054d565b90507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff811461082d578181101561081f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161081690610f31565b60405180910390fd5b61082c84848484036105dc565b5b50505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156108a3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161089a90610f71565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610913576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161090a90610ef1565b60405180910390fd5b61091e838383610c02565b60008060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050818110156109a4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161099b90610f51565b60405180910390fd5b8181036000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550816000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825401925050819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef84604051610a929190610ff1565b60405180910390a3610aa5848484610c07565b50505050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610b1b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b1290610fd1565b60405180910390fd5b610b2760008383610c02565b8060026000828254610b399190611043565b92505081905550806000808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825401925050819055508173ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef83604051610bea9190610ff1565b60405180910390a3610bfe60008383610c07565b5050565b505050565b505050565b600081359050610c1b816113f3565b92915050565b600081359050610c308161140a565b92915050565b600060208284031215610c4c57610c4b6111b1565b5b6000610c5a84828501610c0c565b91505092915050565b60008060408385031215610c7a57610c796111b1565b5b6000610c8885828601610c0c565b9250506020610c9985828601610c0c565b9150509250929050565b600080600060608486031215610cbc57610cbb6111b1565b5b6000610cca86828701610c0c565b9350506020610cdb86828701610c0c565b9250506040610cec86828701610c21565b9150509250925092565b60008060408385031215610d0d57610d0c6111b1565b5b6000610d1b85828601610c0c565b9250506020610d2c85828601610c21565b9150509250929050565b610d3f816110ab565b82525050565b6000610d5082611027565b610d5a8185611032565b9350610d6a8185602086016110ee565b610d73816111b6565b840191505092915050565b6000610d8b602383611032565b9150610d96826111c7565b604082019050919050565b6000610dae602283611032565b9150610db982611216565b604082019050919050565b6000610dd1601d83611032565b9150610ddc82611265565b602082019050919050565b6000610df4602683611032565b9150610dff8261128e565b604082019050919050565b6000610e17602583611032565b9150610e22826112dd565b604082019050919050565b6000610e3a602483611032565b9150610e458261132c565b604082019050919050565b6000610e5d602583611032565b9150610e688261137b565b604082019050919050565b6000610e80601f83611032565b9150610e8b826113ca565b602082019050919050565b610e9f816110d7565b82525050565b610eae816110e1565b82525050565b6000602082019050610ec96000830184610d36565b92915050565b60006020820190508181036000830152610ee98184610d45565b905092915050565b60006020820190508181036000830152610f0a81610d7e565b9050919050565b60006020820190508181036000830152610f2a81610da1565b9050919050565b60006020820190508181036000830152610f4a81610dc4565b9050919050565b60006020820190508181036000830152610f6a81610de7565b9050919050565b60006020820190508181036000830152610f8a81610e0a565b9050919050565b60006020820190508181036000830152610faa81610e2d565b9050919050565b60006020820190508181036000830152610fca81610e50565b9050919050565b60006020820190508181036000830152610fea81610e73565b9050919050565b60006020820190506110066000830184610e96565b92915050565b60006020820190506110216000830184610ea5565b92915050565b600081519050919050565b600082825260208201905092915050565b600061104e826110d7565b9150611059836110d7565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0382111561108e5761108d611153565b5b828201905092915050565b60006110a4826110b7565b9050919050565b60008115159050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b60005b8381101561110c5780820151818401526020810190506110f1565b8381111561111b576000848401525b50505050565b6000600282049050600182168061113957607f821691505b6020821081141561114d5761114c611182565b5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b600080fd5b6000601f19601f8301169050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f766520746f20746865207a65726f20616464726560008201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a20696e73756666696369656e7420616c6c6f77616e6365000000600082015250565b7f45524332303a207472616e7366657220616d6f756e742065786365656473206260008201527f616c616e63650000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a207472616e736665722066726f6d20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f7760008201527f207a65726f000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a206d696e7420746f20746865207a65726f206164647265737300600082015250565b6113fc81611099565b811461140757600080fd5b50565b611413816110d7565b811461141e57600080fd5b5056fea2646970667358221220d4c96329400732e284f624232c8d7228fc90c00ee7b1a48a85080262107815d864736f6c63430008070033", +} + +// TestERC20ABI is the input ABI used to generate the binding from. +// Deprecated: Use TestERC20MetaData.ABI instead. +var TestERC20ABI = TestERC20MetaData.ABI + +// TestERC20Bin is the compiled bytecode used for deploying new contracts. +// Deprecated: Use TestERC20MetaData.Bin instead. +var TestERC20Bin = TestERC20MetaData.Bin + +// DeployTestERC20 deploys a new Ethereum contract, binding an instance of TestERC20 to it. +func DeployTestERC20(auth *bind.TransactOpts, backend bind.ContractBackend, name string, symbol string) (common.Address, *types.Transaction, *TestERC20, error) { + parsed, err := TestERC20MetaData.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(TestERC20Bin), backend, name, symbol) + if err != nil { + return common.Address{}, nil, nil, err + } + return address, tx, &TestERC20{TestERC20Caller: TestERC20Caller{contract: contract}, TestERC20Transactor: TestERC20Transactor{contract: contract}, TestERC20Filterer: TestERC20Filterer{contract: contract}}, nil +} + +// TestERC20 is an auto generated Go binding around an Ethereum contract. +type TestERC20 struct { + TestERC20Caller // Read-only binding to the contract + TestERC20Transactor // Write-only binding to the contract + TestERC20Filterer // Log filterer for contract events +} + +// TestERC20Caller is an auto generated read-only Go binding around an Ethereum contract. +type TestERC20Caller struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// TestERC20Transactor is an auto generated write-only Go binding around an Ethereum contract. +type TestERC20Transactor struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// TestERC20Filterer is an auto generated log filtering Go binding around an Ethereum contract events. +type TestERC20Filterer struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// TestERC20Session is an auto generated Go binding around an Ethereum contract, +// with pre-set call and transact options. +type TestERC20Session struct { + Contract *TestERC20 // 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 +} + +// TestERC20CallerSession is an auto generated read-only Go binding around an Ethereum contract, +// with pre-set call options. +type TestERC20CallerSession struct { + Contract *TestERC20Caller // Generic contract caller binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session +} + +// TestERC20TransactorSession is an auto generated write-only Go binding around an Ethereum contract, +// with pre-set transact options. +type TestERC20TransactorSession struct { + Contract *TestERC20Transactor // Generic contract transactor binding to set the session for + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// TestERC20Raw is an auto generated low-level Go binding around an Ethereum contract. +type TestERC20Raw struct { + Contract *TestERC20 // Generic contract binding to access the raw methods on +} + +// TestERC20CallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. +type TestERC20CallerRaw struct { + Contract *TestERC20Caller // Generic read-only contract binding to access the raw methods on +} + +// TestERC20TransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. +type TestERC20TransactorRaw struct { + Contract *TestERC20Transactor // Generic write-only contract binding to access the raw methods on +} + +// NewTestERC20 creates a new instance of TestERC20, bound to a specific deployed contract. +func NewTestERC20(address common.Address, backend bind.ContractBackend) (*TestERC20, error) { + contract, err := bindTestERC20(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &TestERC20{TestERC20Caller: TestERC20Caller{contract: contract}, TestERC20Transactor: TestERC20Transactor{contract: contract}, TestERC20Filterer: TestERC20Filterer{contract: contract}}, nil +} + +// NewTestERC20Caller creates a new read-only instance of TestERC20, bound to a specific deployed contract. +func NewTestERC20Caller(address common.Address, caller bind.ContractCaller) (*TestERC20Caller, error) { + contract, err := bindTestERC20(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &TestERC20Caller{contract: contract}, nil +} + +// NewTestERC20Transactor creates a new write-only instance of TestERC20, bound to a specific deployed contract. +func NewTestERC20Transactor(address common.Address, transactor bind.ContractTransactor) (*TestERC20Transactor, error) { + contract, err := bindTestERC20(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &TestERC20Transactor{contract: contract}, nil +} + +// NewTestERC20Filterer creates a new log filterer instance of TestERC20, bound to a specific deployed contract. +func NewTestERC20Filterer(address common.Address, filterer bind.ContractFilterer) (*TestERC20Filterer, error) { + contract, err := bindTestERC20(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &TestERC20Filterer{contract: contract}, nil +} + +// bindTestERC20 binds a generic wrapper to an already deployed contract. +func bindTestERC20(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := TestERC20MetaData.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 (_TestERC20 *TestERC20Raw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _TestERC20.Contract.TestERC20Caller.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 (_TestERC20 *TestERC20Raw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _TestERC20.Contract.TestERC20Transactor.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_TestERC20 *TestERC20Raw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _TestERC20.Contract.TestERC20Transactor.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 (_TestERC20 *TestERC20CallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _TestERC20.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 (_TestERC20 *TestERC20TransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _TestERC20.Contract.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_TestERC20 *TestERC20TransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _TestERC20.Contract.contract.Transact(opts, method, params...) +} + +// Allowance is a free data retrieval call binding the contract method 0xdd62ed3e. +// +// Solidity: function allowance(address owner, address spender) view returns(uint256) +func (_TestERC20 *TestERC20Caller) Allowance(opts *bind.CallOpts, owner common.Address, spender common.Address) (*big.Int, error) { + var out []interface{} + err := _TestERC20.contract.Call(opts, &out, "allowance", owner, spender) + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// Allowance is a free data retrieval call binding the contract method 0xdd62ed3e. +// +// Solidity: function allowance(address owner, address spender) view returns(uint256) +func (_TestERC20 *TestERC20Session) Allowance(owner common.Address, spender common.Address) (*big.Int, error) { + return _TestERC20.Contract.Allowance(&_TestERC20.CallOpts, owner, spender) +} + +// Allowance is a free data retrieval call binding the contract method 0xdd62ed3e. +// +// Solidity: function allowance(address owner, address spender) view returns(uint256) +func (_TestERC20 *TestERC20CallerSession) Allowance(owner common.Address, spender common.Address) (*big.Int, error) { + return _TestERC20.Contract.Allowance(&_TestERC20.CallOpts, owner, spender) +} + +// BalanceOf is a free data retrieval call binding the contract method 0x70a08231. +// +// Solidity: function balanceOf(address account) view returns(uint256) +func (_TestERC20 *TestERC20Caller) BalanceOf(opts *bind.CallOpts, account common.Address) (*big.Int, error) { + var out []interface{} + err := _TestERC20.contract.Call(opts, &out, "balanceOf", account) + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// BalanceOf is a free data retrieval call binding the contract method 0x70a08231. +// +// Solidity: function balanceOf(address account) view returns(uint256) +func (_TestERC20 *TestERC20Session) BalanceOf(account common.Address) (*big.Int, error) { + return _TestERC20.Contract.BalanceOf(&_TestERC20.CallOpts, account) +} + +// BalanceOf is a free data retrieval call binding the contract method 0x70a08231. +// +// Solidity: function balanceOf(address account) view returns(uint256) +func (_TestERC20 *TestERC20CallerSession) BalanceOf(account common.Address) (*big.Int, error) { + return _TestERC20.Contract.BalanceOf(&_TestERC20.CallOpts, account) +} + +// Decimals is a free data retrieval call binding the contract method 0x313ce567. +// +// Solidity: function decimals() view returns(uint8) +func (_TestERC20 *TestERC20Caller) Decimals(opts *bind.CallOpts) (uint8, error) { + var out []interface{} + err := _TestERC20.contract.Call(opts, &out, "decimals") + + if err != nil { + return *new(uint8), err + } + + out0 := *abi.ConvertType(out[0], new(uint8)).(*uint8) + + return out0, err + +} + +// Decimals is a free data retrieval call binding the contract method 0x313ce567. +// +// Solidity: function decimals() view returns(uint8) +func (_TestERC20 *TestERC20Session) Decimals() (uint8, error) { + return _TestERC20.Contract.Decimals(&_TestERC20.CallOpts) +} + +// Decimals is a free data retrieval call binding the contract method 0x313ce567. +// +// Solidity: function decimals() view returns(uint8) +func (_TestERC20 *TestERC20CallerSession) Decimals() (uint8, error) { + return _TestERC20.Contract.Decimals(&_TestERC20.CallOpts) +} + +// Name is a free data retrieval call binding the contract method 0x06fdde03. +// +// Solidity: function name() view returns(string) +func (_TestERC20 *TestERC20Caller) Name(opts *bind.CallOpts) (string, error) { + var out []interface{} + err := _TestERC20.contract.Call(opts, &out, "name") + + if err != nil { + return *new(string), err + } + + out0 := *abi.ConvertType(out[0], new(string)).(*string) + + return out0, err + +} + +// Name is a free data retrieval call binding the contract method 0x06fdde03. +// +// Solidity: function name() view returns(string) +func (_TestERC20 *TestERC20Session) Name() (string, error) { + return _TestERC20.Contract.Name(&_TestERC20.CallOpts) +} + +// Name is a free data retrieval call binding the contract method 0x06fdde03. +// +// Solidity: function name() view returns(string) +func (_TestERC20 *TestERC20CallerSession) Name() (string, error) { + return _TestERC20.Contract.Name(&_TestERC20.CallOpts) +} + +// Symbol is a free data retrieval call binding the contract method 0x95d89b41. +// +// Solidity: function symbol() view returns(string) +func (_TestERC20 *TestERC20Caller) Symbol(opts *bind.CallOpts) (string, error) { + var out []interface{} + err := _TestERC20.contract.Call(opts, &out, "symbol") + + if err != nil { + return *new(string), err + } + + out0 := *abi.ConvertType(out[0], new(string)).(*string) + + return out0, err + +} + +// Symbol is a free data retrieval call binding the contract method 0x95d89b41. +// +// Solidity: function symbol() view returns(string) +func (_TestERC20 *TestERC20Session) Symbol() (string, error) { + return _TestERC20.Contract.Symbol(&_TestERC20.CallOpts) +} + +// Symbol is a free data retrieval call binding the contract method 0x95d89b41. +// +// Solidity: function symbol() view returns(string) +func (_TestERC20 *TestERC20CallerSession) Symbol() (string, error) { + return _TestERC20.Contract.Symbol(&_TestERC20.CallOpts) +} + +// TotalSupply is a free data retrieval call binding the contract method 0x18160ddd. +// +// Solidity: function totalSupply() view returns(uint256) +func (_TestERC20 *TestERC20Caller) TotalSupply(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _TestERC20.contract.Call(opts, &out, "totalSupply") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// TotalSupply is a free data retrieval call binding the contract method 0x18160ddd. +// +// Solidity: function totalSupply() view returns(uint256) +func (_TestERC20 *TestERC20Session) TotalSupply() (*big.Int, error) { + return _TestERC20.Contract.TotalSupply(&_TestERC20.CallOpts) +} + +// TotalSupply is a free data retrieval call binding the contract method 0x18160ddd. +// +// Solidity: function totalSupply() view returns(uint256) +func (_TestERC20 *TestERC20CallerSession) TotalSupply() (*big.Int, error) { + return _TestERC20.Contract.TotalSupply(&_TestERC20.CallOpts) +} + +// Approve is a paid mutator transaction binding the contract method 0x095ea7b3. +// +// Solidity: function approve(address spender, uint256 amount) returns(bool) +func (_TestERC20 *TestERC20Transactor) Approve(opts *bind.TransactOpts, spender common.Address, amount *big.Int) (*types.Transaction, error) { + return _TestERC20.contract.Transact(opts, "approve", spender, amount) +} + +// Approve is a paid mutator transaction binding the contract method 0x095ea7b3. +// +// Solidity: function approve(address spender, uint256 amount) returns(bool) +func (_TestERC20 *TestERC20Session) Approve(spender common.Address, amount *big.Int) (*types.Transaction, error) { + return _TestERC20.Contract.Approve(&_TestERC20.TransactOpts, spender, amount) +} + +// Approve is a paid mutator transaction binding the contract method 0x095ea7b3. +// +// Solidity: function approve(address spender, uint256 amount) returns(bool) +func (_TestERC20 *TestERC20TransactorSession) Approve(spender common.Address, amount *big.Int) (*types.Transaction, error) { + return _TestERC20.Contract.Approve(&_TestERC20.TransactOpts, spender, amount) +} + +// DecreaseAllowance is a paid mutator transaction binding the contract method 0xa457c2d7. +// +// Solidity: function decreaseAllowance(address spender, uint256 subtractedValue) returns(bool) +func (_TestERC20 *TestERC20Transactor) DecreaseAllowance(opts *bind.TransactOpts, spender common.Address, subtractedValue *big.Int) (*types.Transaction, error) { + return _TestERC20.contract.Transact(opts, "decreaseAllowance", spender, subtractedValue) +} + +// DecreaseAllowance is a paid mutator transaction binding the contract method 0xa457c2d7. +// +// Solidity: function decreaseAllowance(address spender, uint256 subtractedValue) returns(bool) +func (_TestERC20 *TestERC20Session) DecreaseAllowance(spender common.Address, subtractedValue *big.Int) (*types.Transaction, error) { + return _TestERC20.Contract.DecreaseAllowance(&_TestERC20.TransactOpts, spender, subtractedValue) +} + +// DecreaseAllowance is a paid mutator transaction binding the contract method 0xa457c2d7. +// +// Solidity: function decreaseAllowance(address spender, uint256 subtractedValue) returns(bool) +func (_TestERC20 *TestERC20TransactorSession) DecreaseAllowance(spender common.Address, subtractedValue *big.Int) (*types.Transaction, error) { + return _TestERC20.Contract.DecreaseAllowance(&_TestERC20.TransactOpts, spender, subtractedValue) +} + +// IncreaseAllowance is a paid mutator transaction binding the contract method 0x39509351. +// +// Solidity: function increaseAllowance(address spender, uint256 addedValue) returns(bool) +func (_TestERC20 *TestERC20Transactor) IncreaseAllowance(opts *bind.TransactOpts, spender common.Address, addedValue *big.Int) (*types.Transaction, error) { + return _TestERC20.contract.Transact(opts, "increaseAllowance", spender, addedValue) +} + +// IncreaseAllowance is a paid mutator transaction binding the contract method 0x39509351. +// +// Solidity: function increaseAllowance(address spender, uint256 addedValue) returns(bool) +func (_TestERC20 *TestERC20Session) IncreaseAllowance(spender common.Address, addedValue *big.Int) (*types.Transaction, error) { + return _TestERC20.Contract.IncreaseAllowance(&_TestERC20.TransactOpts, spender, addedValue) +} + +// IncreaseAllowance is a paid mutator transaction binding the contract method 0x39509351. +// +// Solidity: function increaseAllowance(address spender, uint256 addedValue) returns(bool) +func (_TestERC20 *TestERC20TransactorSession) IncreaseAllowance(spender common.Address, addedValue *big.Int) (*types.Transaction, error) { + return _TestERC20.Contract.IncreaseAllowance(&_TestERC20.TransactOpts, spender, addedValue) +} + +// Mint is a paid mutator transaction binding the contract method 0x40c10f19. +// +// Solidity: function mint(address to, uint256 amount) returns() +func (_TestERC20 *TestERC20Transactor) Mint(opts *bind.TransactOpts, to common.Address, amount *big.Int) (*types.Transaction, error) { + return _TestERC20.contract.Transact(opts, "mint", to, amount) +} + +// Mint is a paid mutator transaction binding the contract method 0x40c10f19. +// +// Solidity: function mint(address to, uint256 amount) returns() +func (_TestERC20 *TestERC20Session) Mint(to common.Address, amount *big.Int) (*types.Transaction, error) { + return _TestERC20.Contract.Mint(&_TestERC20.TransactOpts, to, amount) +} + +// Mint is a paid mutator transaction binding the contract method 0x40c10f19. +// +// Solidity: function mint(address to, uint256 amount) returns() +func (_TestERC20 *TestERC20TransactorSession) Mint(to common.Address, amount *big.Int) (*types.Transaction, error) { + return _TestERC20.Contract.Mint(&_TestERC20.TransactOpts, to, amount) +} + +// Transfer is a paid mutator transaction binding the contract method 0xa9059cbb. +// +// Solidity: function transfer(address to, uint256 amount) returns(bool) +func (_TestERC20 *TestERC20Transactor) Transfer(opts *bind.TransactOpts, to common.Address, amount *big.Int) (*types.Transaction, error) { + return _TestERC20.contract.Transact(opts, "transfer", to, amount) +} + +// Transfer is a paid mutator transaction binding the contract method 0xa9059cbb. +// +// Solidity: function transfer(address to, uint256 amount) returns(bool) +func (_TestERC20 *TestERC20Session) Transfer(to common.Address, amount *big.Int) (*types.Transaction, error) { + return _TestERC20.Contract.Transfer(&_TestERC20.TransactOpts, to, amount) +} + +// Transfer is a paid mutator transaction binding the contract method 0xa9059cbb. +// +// Solidity: function transfer(address to, uint256 amount) returns(bool) +func (_TestERC20 *TestERC20TransactorSession) Transfer(to common.Address, amount *big.Int) (*types.Transaction, error) { + return _TestERC20.Contract.Transfer(&_TestERC20.TransactOpts, to, amount) +} + +// TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd. +// +// Solidity: function transferFrom(address from, address to, uint256 amount) returns(bool) +func (_TestERC20 *TestERC20Transactor) TransferFrom(opts *bind.TransactOpts, from common.Address, to common.Address, amount *big.Int) (*types.Transaction, error) { + return _TestERC20.contract.Transact(opts, "transferFrom", from, to, amount) +} + +// TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd. +// +// Solidity: function transferFrom(address from, address to, uint256 amount) returns(bool) +func (_TestERC20 *TestERC20Session) TransferFrom(from common.Address, to common.Address, amount *big.Int) (*types.Transaction, error) { + return _TestERC20.Contract.TransferFrom(&_TestERC20.TransactOpts, from, to, amount) +} + +// TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd. +// +// Solidity: function transferFrom(address from, address to, uint256 amount) returns(bool) +func (_TestERC20 *TestERC20TransactorSession) TransferFrom(from common.Address, to common.Address, amount *big.Int) (*types.Transaction, error) { + return _TestERC20.Contract.TransferFrom(&_TestERC20.TransactOpts, from, to, amount) +} + +// TestERC20ApprovalIterator is returned from FilterApproval and is used to iterate over the raw logs and unpacked data for Approval events raised by the TestERC20 contract. +type TestERC20ApprovalIterator struct { + Event *TestERC20Approval // 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 *TestERC20ApprovalIterator) 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(TestERC20Approval) + 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(TestERC20Approval) + 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 *TestERC20ApprovalIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *TestERC20ApprovalIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// TestERC20Approval represents a Approval event raised by the TestERC20 contract. +type TestERC20Approval struct { + Owner common.Address + Spender common.Address + Value *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterApproval is a free log retrieval operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925. +// +// Solidity: event Approval(address indexed owner, address indexed spender, uint256 value) +func (_TestERC20 *TestERC20Filterer) FilterApproval(opts *bind.FilterOpts, owner []common.Address, spender []common.Address) (*TestERC20ApprovalIterator, error) { + + var ownerRule []interface{} + for _, ownerItem := range owner { + ownerRule = append(ownerRule, ownerItem) + } + var spenderRule []interface{} + for _, spenderItem := range spender { + spenderRule = append(spenderRule, spenderItem) + } + + logs, sub, err := _TestERC20.contract.FilterLogs(opts, "Approval", ownerRule, spenderRule) + if err != nil { + return nil, err + } + return &TestERC20ApprovalIterator{contract: _TestERC20.contract, event: "Approval", logs: logs, sub: sub}, nil +} + +// WatchApproval is a free log subscription operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925. +// +// Solidity: event Approval(address indexed owner, address indexed spender, uint256 value) +func (_TestERC20 *TestERC20Filterer) WatchApproval(opts *bind.WatchOpts, sink chan<- *TestERC20Approval, owner []common.Address, spender []common.Address) (event.Subscription, error) { + + var ownerRule []interface{} + for _, ownerItem := range owner { + ownerRule = append(ownerRule, ownerItem) + } + var spenderRule []interface{} + for _, spenderItem := range spender { + spenderRule = append(spenderRule, spenderItem) + } + + logs, sub, err := _TestERC20.contract.WatchLogs(opts, "Approval", ownerRule, spenderRule) + 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(TestERC20Approval) + if err := _TestERC20.contract.UnpackLog(event, "Approval", 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 +} + +// ParseApproval is a log parse operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925. +// +// Solidity: event Approval(address indexed owner, address indexed spender, uint256 value) +func (_TestERC20 *TestERC20Filterer) ParseApproval(log types.Log) (*TestERC20Approval, error) { + event := new(TestERC20Approval) + if err := _TestERC20.contract.UnpackLog(event, "Approval", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// TestERC20TransferIterator is returned from FilterTransfer and is used to iterate over the raw logs and unpacked data for Transfer events raised by the TestERC20 contract. +type TestERC20TransferIterator struct { + Event *TestERC20Transfer // 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 *TestERC20TransferIterator) 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(TestERC20Transfer) + 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(TestERC20Transfer) + 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 *TestERC20TransferIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *TestERC20TransferIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// TestERC20Transfer represents a Transfer event raised by the TestERC20 contract. +type TestERC20Transfer struct { + From common.Address + To common.Address + Value *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterTransfer is a free log retrieval operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef. +// +// Solidity: event Transfer(address indexed from, address indexed to, uint256 value) +func (_TestERC20 *TestERC20Filterer) FilterTransfer(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*TestERC20TransferIterator, error) { + + var fromRule []interface{} + for _, fromItem := range from { + fromRule = append(fromRule, fromItem) + } + var toRule []interface{} + for _, toItem := range to { + toRule = append(toRule, toItem) + } + + logs, sub, err := _TestERC20.contract.FilterLogs(opts, "Transfer", fromRule, toRule) + if err != nil { + return nil, err + } + return &TestERC20TransferIterator{contract: _TestERC20.contract, event: "Transfer", logs: logs, sub: sub}, nil +} + +// WatchTransfer is a free log subscription operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef. +// +// Solidity: event Transfer(address indexed from, address indexed to, uint256 value) +func (_TestERC20 *TestERC20Filterer) WatchTransfer(opts *bind.WatchOpts, sink chan<- *TestERC20Transfer, from []common.Address, to []common.Address) (event.Subscription, error) { + + var fromRule []interface{} + for _, fromItem := range from { + fromRule = append(fromRule, fromItem) + } + var toRule []interface{} + for _, toItem := range to { + toRule = append(toRule, toItem) + } + + logs, sub, err := _TestERC20.contract.WatchLogs(opts, "Transfer", fromRule, toRule) + 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(TestERC20Transfer) + if err := _TestERC20.contract.UnpackLog(event, "Transfer", 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 +} + +// ParseTransfer is a log parse operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef. +// +// Solidity: event Transfer(address indexed from, address indexed to, uint256 value) +func (_TestERC20 *TestERC20Filterer) ParseTransfer(log types.Log) (*TestERC20Transfer, error) { + event := new(TestERC20Transfer) + if err := _TestERC20.contract.UnpackLog(event, "Transfer", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} 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..82c24a3b --- /dev/null +++ b/pkg/contracts/prototypes/zevm/gatewayzevm.sol/gatewayzevm.go @@ -0,0 +1,1547 @@ +// 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 +) + +// ZContext is an auto generated low-level Go binding around an user-defined struct. +type ZContext struct { + Origin []byte + Sender common.Address + ChainID *big.Int +} + +// GatewayZEVMMetaData contains all meta data concerning the GatewayZEVM contract. +var GatewayZEVMMetaData = &bind.MetaData{ + ABI: "[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"CallerIsNotFungibleModule\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"GasFeeTransferFailed\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InsufficientZRC20Amount\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidTarget\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"WithdrawalFailed\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ZRC20BurnFailed\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ZRC20TransferFailed\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"previousAdmin\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newAdmin\",\"type\":\"address\"}],\"name\":\"AdminChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"beacon\",\"type\":\"address\"}],\"name\":\"BeaconUpgraded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"bytes\",\"name\":\"receiver\",\"type\":\"bytes\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"message\",\"type\":\"bytes\"}],\"name\":\"Call\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"implementation\",\"type\":\"address\"}],\"name\":\"Upgraded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"to\",\"type\":\"bytes\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"gasfee\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"protocolFlatFee\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"message\",\"type\":\"bytes\"}],\"name\":\"Withdrawal\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"FUNGIBLE_MODULE_ADDRESS\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"receiver\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"message\",\"type\":\"bytes\"}],\"name\":\"call\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"zrc20\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"target\",\"type\":\"address\"}],\"name\":\"deposit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes\",\"name\":\"origin\",\"type\":\"bytes\"},{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"chainID\",\"type\":\"uint256\"}],\"internalType\":\"structzContext\",\"name\":\"context\",\"type\":\"tuple\"},{\"internalType\":\"address\",\"name\":\"zrc20\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"target\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"message\",\"type\":\"bytes\"}],\"name\":\"depositAndCall\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes\",\"name\":\"origin\",\"type\":\"bytes\"},{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"chainID\",\"type\":\"uint256\"}],\"internalType\":\"structzContext\",\"name\":\"context\",\"type\":\"tuple\"},{\"internalType\":\"address\",\"name\":\"zrc20\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"target\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"message\",\"type\":\"bytes\"}],\"name\":\"execute\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"proxiableUUID\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"}],\"name\":\"upgradeTo\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"upgradeToAndCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"receiver\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"zrc20\",\"type\":\"address\"}],\"name\":\"withdraw\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"receiver\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"zrc20\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"message\",\"type\":\"bytes\"}],\"name\":\"withdrawAndCall\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", + Bin: "0x60a06040523073ffffffffffffffffffffffffffffffffffffffff1660809073ffffffffffffffffffffffffffffffffffffffff1660601b8152503480156200004757600080fd5b50620000586200005e60201b60201c565b62000208565b600060019054906101000a900460ff1615620000b1576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401620000a8906200015c565b60405180910390fd5b60ff801660008054906101000a900460ff1660ff1614620001225760ff6000806101000a81548160ff021916908360ff1602179055507f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb384740249860ff6040516200011991906200017e565b60405180910390a15b565b6000620001336027836200019b565b91506200014082620001b9565b604082019050919050565b6200015681620001ac565b82525050565b60006020820190508181036000830152620001778162000124565b9050919050565b60006020820190506200019560008301846200014b565b92915050565b600082825260208201905092915050565b600060ff82169050919050565b7f496e697469616c697a61626c653a20636f6e747261637420697320696e69746960008201527f616c697a696e6700000000000000000000000000000000000000000000000000602082015250565b60805160601c612c716200024360003960008181610447015281816104d6015281816105e80152818161067701526107270152612c716000f3fe6080604052600436106100dd5760003560e01c80637993c1e01161007f578063bcf7f32b11610059578063bcf7f32b14610251578063c39aca371461027a578063f2fde38b146102a3578063f45346dc146102cc576100dd565b80637993c1e0146101e65780638129fc1c1461020f5780638da5cb5b14610226576100dd565b80633ce4a5bc116100bb5780633ce4a5bc1461015d5780634f1ef2861461018857806352d1902d146101a4578063715018a6146101cf576100dd565b80630ac7c44c146100e2578063135390f91461010b5780633659cfe614610134575b600080fd5b3480156100ee57600080fd5b5061010960048036038101906101049190611c94565b6102f5565b005b34801561011757600080fd5b50610132600480360381019061012d9190611d10565b610360565b005b34801561014057600080fd5b5061015b60048036038101906101569190611b1e565b610445565b005b34801561016957600080fd5b506101726105ce565b60405161017f9190612282565b60405180910390f35b6101a2600480360381019061019d9190611b4b565b6105e6565b005b3480156101b057600080fd5b506101b9610723565b6040516101c691906122fd565b60405180910390f35b3480156101db57600080fd5b506101e46107dc565b005b3480156101f257600080fd5b5061020d60048036038101906102089190611d7f565b6107f0565b005b34801561021b57600080fd5b506102246108db565b005b34801561023257600080fd5b5061023b610a21565b6040516102489190612282565b60405180910390f35b34801561025d57600080fd5b5061027860048036038101906102739190611e23565b610a4b565b005b34801561028657600080fd5b506102a1600480360381019061029c9190611e23565b610b3f565b005b3480156102af57600080fd5b506102ca60048036038101906102c59190611b1e565b610d71565b005b3480156102d857600080fd5b506102f360048036038101906102ee9190611be7565b610df5565b005b82604051610303919061226b565b60405180910390203373ffffffffffffffffffffffffffffffffffffffff167f2b5af078ce280d812dc2241658dc5435c93408020e5418eef55a2b536de51c0f8484604051610353929190612318565b60405180910390a3505050565b600061036c8383610fb1565b90503373ffffffffffffffffffffffffffffffffffffffff167f1866ad2994816c79f4103e1eddacc7b085eb7c635205243a28940be69b01536d8585848673ffffffffffffffffffffffffffffffffffffffff16634d8943bb6040518163ffffffff1660e01b815260040160206040518083038186803b1580156103ef57600080fd5b505afa158015610403573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104279190611ed9565b604051610437949392919061239f565b60405180910390a250505050565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163073ffffffffffffffffffffffffffffffffffffffff1614156104d4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016104cb9061245b565b60405180910390fd5b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166105136112a1565b73ffffffffffffffffffffffffffffffffffffffff1614610569576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105609061247b565b60405180910390fd5b610572816112f8565b6105cb81600067ffffffffffffffff8111156105915761059061282a565b5b6040519080825280601f01601f1916602001820160405280156105c35781602001600182028036833780820191505090505b506000611303565b50565b73735b14bb79463307aacbed86daf3322b1e6226ab81565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163073ffffffffffffffffffffffffffffffffffffffff161415610675576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161066c9061245b565b60405180910390fd5b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166106b46112a1565b73ffffffffffffffffffffffffffffffffffffffff161461070a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107019061247b565b60405180910390fd5b610713826112f8565b61071f82826001611303565b5050565b60007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163073ffffffffffffffffffffffffffffffffffffffff16146107b3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107aa9061249b565b60405180910390fd5b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc60001b905090565b6107e4611480565b6107ee60006114fe565b565b60006107fc8585610fb1565b90503373ffffffffffffffffffffffffffffffffffffffff167f1866ad2994816c79f4103e1eddacc7b085eb7c635205243a28940be69b01536d8787848873ffffffffffffffffffffffffffffffffffffffff16634d8943bb6040518163ffffffff1660e01b815260040160206040518083038186803b15801561087f57600080fd5b505afa158015610893573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108b79190611ed9565b88886040516108cb9695949392919061233c565b60405180910390a2505050505050565b60008060019054906101000a900460ff1615905080801561090c5750600160008054906101000a900460ff1660ff16105b80610939575061091b306115c4565b1580156109385750600160008054906101000a900460ff1660ff16145b5b610978576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161096f906124db565b60405180910390fd5b60016000806101000a81548160ff021916908360ff16021790555080156109b5576001600060016101000a81548160ff0219169083151502179055505b6109bd6115e7565b6109c5611640565b8015610a1e5760008060016101000a81548160ff0219169083151502179055507f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024986001604051610a1591906123fe565b60405180910390a15b50565b6000603360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b73735b14bb79463307aacbed86daf3322b1e6226ab73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610ac4576040517f2b2add3d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8273ffffffffffffffffffffffffffffffffffffffff1663de43156e87878786866040518663ffffffff1660e01b8152600401610b0595949392919061259b565b600060405180830381600087803b158015610b1f57600080fd5b505af1158015610b33573d6000803e3d6000fd5b50505050505050505050565b73735b14bb79463307aacbed86daf3322b1e6226ab73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610bb8576040517f2b2add3d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73735b14bb79463307aacbed86daf3322b1e6226ab73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161480610c3157503073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16145b15610c68576040517f82d5d76a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8473ffffffffffffffffffffffffffffffffffffffff166347e7ef2484866040518363ffffffff1660e01b8152600401610ca39291906122d4565b602060405180830381600087803b158015610cbd57600080fd5b505af1158015610cd1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610cf59190611c3a565b508273ffffffffffffffffffffffffffffffffffffffff1663de43156e87878786866040518663ffffffff1660e01b8152600401610d3795949392919061259b565b600060405180830381600087803b158015610d5157600080fd5b505af1158015610d65573d6000803e3d6000fd5b50505050505050505050565b610d79611480565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415610de9576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610de09061243b565b60405180910390fd5b610df2816114fe565b50565b73735b14bb79463307aacbed86daf3322b1e6226ab73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610e6e576040517f2b2add3d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73735b14bb79463307aacbed86daf3322b1e6226ab73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161480610ee757503073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16145b15610f1e576040517f82d5d76a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8273ffffffffffffffffffffffffffffffffffffffff166347e7ef2482846040518363ffffffff1660e01b8152600401610f599291906122d4565b602060405180830381600087803b158015610f7357600080fd5b505af1158015610f87573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fab9190611c3a565b50505050565b60008060008373ffffffffffffffffffffffffffffffffffffffff1663d9eeebed6040518163ffffffff1660e01b8152600401604080518083038186803b158015610ffb57600080fd5b505afa15801561100f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110339190611ba7565b915091508173ffffffffffffffffffffffffffffffffffffffff166323b872dd3373735b14bb79463307aacbed86daf3322b1e6226ab846040518463ffffffff1660e01b81526004016110889392919061229d565b602060405180830381600087803b1580156110a257600080fd5b505af11580156110b6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110da9190611c3a565b611110576040517f0a7cd6d600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8373ffffffffffffffffffffffffffffffffffffffff166323b872dd3330886040518463ffffffff1660e01b815260040161114d9392919061229d565b602060405180830381600087803b15801561116757600080fd5b505af115801561117b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061119f9190611c3a565b6111d5576040517f4dd9ee8d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8373ffffffffffffffffffffffffffffffffffffffff166342966c68866040518263ffffffff1660e01b815260040161120e91906125f0565b602060405180830381600087803b15801561122857600080fd5b505af115801561123c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112609190611c3a565b611296576040517f2c77e05c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b809250505092915050565b60006112cf7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc60001b611691565b60000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b611300611480565b50565b61132f7f4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd914360001b61169b565b60000160009054906101000a900460ff16156113535761134e836116a5565b61147b565b8273ffffffffffffffffffffffffffffffffffffffff166352d1902d6040518163ffffffff1660e01b815260040160206040518083038186803b15801561139957600080fd5b505afa9250505080156113ca57506040513d601f19601f820116820180604052508101906113c79190611c67565b60015b611409576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611400906124fb565b60405180910390fd5b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc60001b811461146e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611465906124bb565b60405180910390fd5b5061147a83838361175e565b5b505050565b61148861178a565b73ffffffffffffffffffffffffffffffffffffffff166114a6610a21565b73ffffffffffffffffffffffffffffffffffffffff16146114fc576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016114f39061253b565b60405180910390fd5b565b6000603360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905081603360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b6000808273ffffffffffffffffffffffffffffffffffffffff163b119050919050565b600060019054906101000a900460ff16611636576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161162d9061257b565b60405180910390fd5b61163e611792565b565b600060019054906101000a900460ff1661168f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016116869061257b565b60405180910390fd5b565b6000819050919050565b6000819050919050565b6116ae816115c4565b6116ed576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016116e49061251b565b60405180910390fd5b8061171a7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc60001b611691565b60000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b611767836117f3565b6000825111806117745750805b15611785576117838383611842565b505b505050565b600033905090565b600060019054906101000a900460ff166117e1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016117d89061257b565b60405180910390fd5b6117f16117ec61178a565b6114fe565b565b6117fc816116a5565b8073ffffffffffffffffffffffffffffffffffffffff167fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b60405160405180910390a250565b60606118678383604051806060016040528060278152602001612c156027913961186f565b905092915050565b60606000808573ffffffffffffffffffffffffffffffffffffffff1685604051611899919061226b565b600060405180830381855af49150503d80600081146118d4576040519150601f19603f3d011682016040523d82523d6000602084013e6118d9565b606091505b50915091506118ea868383876118f5565b925050509392505050565b606083156119585760008351141561195057611910856115c4565b61194f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016119469061255b565b60405180910390fd5b5b829050611963565b611962838361196b565b5b949350505050565b60008251111561197e5781518083602001fd5b806040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016119b29190612419565b60405180910390fd5b60006119ce6119c984612630565b61260b565b9050828152602081018484840111156119ea576119e9612877565b5b6119f58482856127b7565b509392505050565b600081359050611a0c81612bb8565b92915050565b600081519050611a2181612bb8565b92915050565b600081519050611a3681612bcf565b92915050565b600081519050611a4b81612be6565b92915050565b60008083601f840112611a6757611a66612863565b5b8235905067ffffffffffffffff811115611a8457611a8361285e565b5b602083019150836001820283011115611aa057611a9f612872565b5b9250929050565b600082601f830112611abc57611abb612863565b5b8135611acc8482602086016119bb565b91505092915050565b600060608284031215611aeb57611aea612868565b5b81905092915050565b600081359050611b0381612bfd565b92915050565b600081519050611b1881612bfd565b92915050565b600060208284031215611b3457611b33612886565b5b6000611b42848285016119fd565b91505092915050565b60008060408385031215611b6257611b61612886565b5b6000611b70858286016119fd565b925050602083013567ffffffffffffffff811115611b9157611b9061287c565b5b611b9d85828601611aa7565b9150509250929050565b60008060408385031215611bbe57611bbd612886565b5b6000611bcc85828601611a12565b9250506020611bdd85828601611b09565b9150509250929050565b600080600060608486031215611c0057611bff612886565b5b6000611c0e868287016119fd565b9350506020611c1f86828701611af4565b9250506040611c30868287016119fd565b9150509250925092565b600060208284031215611c5057611c4f612886565b5b6000611c5e84828501611a27565b91505092915050565b600060208284031215611c7d57611c7c612886565b5b6000611c8b84828501611a3c565b91505092915050565b600080600060408486031215611cad57611cac612886565b5b600084013567ffffffffffffffff811115611ccb57611cca61287c565b5b611cd786828701611aa7565b935050602084013567ffffffffffffffff811115611cf857611cf761287c565b5b611d0486828701611a51565b92509250509250925092565b600080600060608486031215611d2957611d28612886565b5b600084013567ffffffffffffffff811115611d4757611d4661287c565b5b611d5386828701611aa7565b9350506020611d6486828701611af4565b9250506040611d75868287016119fd565b9150509250925092565b600080600080600060808688031215611d9b57611d9a612886565b5b600086013567ffffffffffffffff811115611db957611db861287c565b5b611dc588828901611aa7565b9550506020611dd688828901611af4565b9450506040611de7888289016119fd565b935050606086013567ffffffffffffffff811115611e0857611e0761287c565b5b611e1488828901611a51565b92509250509295509295909350565b60008060008060008060a08789031215611e4057611e3f612886565b5b600087013567ffffffffffffffff811115611e5e57611e5d61287c565b5b611e6a89828a01611ad5565b9650506020611e7b89828a016119fd565b9550506040611e8c89828a01611af4565b9450506060611e9d89828a016119fd565b935050608087013567ffffffffffffffff811115611ebe57611ebd61287c565b5b611eca89828a01611a51565b92509250509295509295509295565b600060208284031215611eef57611eee612886565b5b6000611efd84828501611b09565b91505092915050565b611f0f81612746565b82525050565b611f1e81612746565b82525050565b611f2d81612764565b82525050565b6000611f3f8385612677565b9350611f4c8385846127b7565b611f558361288b565b840190509392505050565b6000611f6c8385612688565b9350611f798385846127b7565b611f828361288b565b840190509392505050565b6000611f9882612661565b611fa28185612688565b9350611fb28185602086016127c6565b611fbb8161288b565b840191505092915050565b6000611fd182612661565b611fdb8185612699565b9350611feb8185602086016127c6565b80840191505092915050565b612000816127a5565b82525050565b60006120118261266c565b61201b81856126a4565b935061202b8185602086016127c6565b6120348161288b565b840191505092915050565b600061204c6026836126a4565b91506120578261289c565b604082019050919050565b600061206f602c836126a4565b915061207a826128eb565b604082019050919050565b6000612092602c836126a4565b915061209d8261293a565b604082019050919050565b60006120b56038836126a4565b91506120c082612989565b604082019050919050565b60006120d86029836126a4565b91506120e3826129d8565b604082019050919050565b60006120fb602e836126a4565b915061210682612a27565b604082019050919050565b600061211e602e836126a4565b915061212982612a76565b604082019050919050565b6000612141602d836126a4565b915061214c82612ac5565b604082019050919050565b60006121646020836126a4565b915061216f82612b14565b602082019050919050565b6000612187600083612688565b915061219282612b3d565b600082019050919050565b60006121aa601d836126a4565b91506121b582612b40565b602082019050919050565b60006121cd602b836126a4565b91506121d882612b69565b604082019050919050565b6000606083016121f660008401846126cc565b8583036000870152612209838284611f33565b9250505061221a60208401846126b5565b6122276020860182611f06565b50612235604084018461272f565b612242604086018261224d565b508091505092915050565b6122568161278e565b82525050565b6122658161278e565b82525050565b60006122778284611fc6565b915081905092915050565b60006020820190506122976000830184611f15565b92915050565b60006060820190506122b26000830186611f15565b6122bf6020830185611f15565b6122cc604083018461225c565b949350505050565b60006040820190506122e96000830185611f15565b6122f6602083018461225c565b9392505050565b60006020820190506123126000830184611f24565b92915050565b60006020820190508181036000830152612333818486611f60565b90509392505050565b600060a08201905081810360008301526123568189611f8d565b9050612365602083018861225c565b612372604083018761225c565b61237f606083018661225c565b8181036080830152612392818486611f60565b9050979650505050505050565b600060a08201905081810360008301526123b98187611f8d565b90506123c8602083018661225c565b6123d5604083018561225c565b6123e2606083018461225c565b81810360808301526123f38161217a565b905095945050505050565b60006020820190506124136000830184611ff7565b92915050565b600060208201905081810360008301526124338184612006565b905092915050565b600060208201905081810360008301526124548161203f565b9050919050565b6000602082019050818103600083015261247481612062565b9050919050565b6000602082019050818103600083015261249481612085565b9050919050565b600060208201905081810360008301526124b4816120a8565b9050919050565b600060208201905081810360008301526124d4816120cb565b9050919050565b600060208201905081810360008301526124f4816120ee565b9050919050565b6000602082019050818103600083015261251481612111565b9050919050565b6000602082019050818103600083015261253481612134565b9050919050565b6000602082019050818103600083015261255481612157565b9050919050565b600060208201905081810360008301526125748161219d565b9050919050565b60006020820190508181036000830152612594816121c0565b9050919050565b600060808201905081810360008301526125b581886121e3565b90506125c46020830187611f15565b6125d1604083018661225c565b81810360608301526125e4818486611f60565b90509695505050505050565b6000602082019050612605600083018461225c565b92915050565b6000612615612626565b905061262182826127f9565b919050565b6000604051905090565b600067ffffffffffffffff82111561264b5761264a61282a565b5b6126548261288b565b9050602081019050919050565b600081519050919050565b600081519050919050565b600082825260208201905092915050565b600082825260208201905092915050565b600081905092915050565b600082825260208201905092915050565b60006126c460208401846119fd565b905092915050565b600080833560016020038436030381126126e9576126e8612881565b5b83810192508235915060208301925067ffffffffffffffff82111561271157612710612859565b5b6001820236038413156127275761272661286d565b5b509250929050565b600061273e6020840184611af4565b905092915050565b60006127518261276e565b9050919050565b60008115159050919050565b6000819050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b60006127b082612798565b9050919050565b82818337600083830152505050565b60005b838110156127e45780820151818401526020810190506127c9565b838111156127f3576000848401525b50505050565b6128028261288b565b810181811067ffffffffffffffff821117156128215761282061282a565b5b80604052505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b7f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060008201527f64656c656761746563616c6c0000000000000000000000000000000000000000602082015250565b7f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060008201527f6163746976652070726f78790000000000000000000000000000000000000000602082015250565b7f555550535570677261646561626c653a206d757374206e6f742062652063616c60008201527f6c6564207468726f7567682064656c656761746563616c6c0000000000000000602082015250565b7f45524331393637557067726164653a20756e737570706f727465642070726f7860008201527f6961626c65555549440000000000000000000000000000000000000000000000602082015250565b7f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160008201527f647920696e697469616c697a6564000000000000000000000000000000000000602082015250565b7f45524331393637557067726164653a206e657720696d706c656d656e7461746960008201527f6f6e206973206e6f742055555053000000000000000000000000000000000000602082015250565b7f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60008201527f6f74206120636f6e747261637400000000000000000000000000000000000000602082015250565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b50565b7f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000600082015250565b7f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960008201527f6e697469616c697a696e67000000000000000000000000000000000000000000602082015250565b612bc181612746565b8114612bcc57600080fd5b50565b612bd881612758565b8114612be357600080fd5b50565b612bef81612764565b8114612bfa57600080fd5b50565b612c068161278e565b8114612c1157600080fd5b5056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a26469706673582212200ef3180e9cedc3a1a1edef10c36506994a9e026c730e2624d2348359ce00bf2764736f6c63430008070033", +} + +// 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) +} + +// Deposit is a paid mutator transaction binding the contract method 0xf45346dc. +// +// Solidity: function deposit(address zrc20, uint256 amount, address target) returns() +func (_GatewayZEVM *GatewayZEVMTransactor) Deposit(opts *bind.TransactOpts, zrc20 common.Address, amount *big.Int, target common.Address) (*types.Transaction, error) { + return _GatewayZEVM.contract.Transact(opts, "deposit", zrc20, amount, target) +} + +// Deposit is a paid mutator transaction binding the contract method 0xf45346dc. +// +// Solidity: function deposit(address zrc20, uint256 amount, address target) returns() +func (_GatewayZEVM *GatewayZEVMSession) Deposit(zrc20 common.Address, amount *big.Int, target common.Address) (*types.Transaction, error) { + return _GatewayZEVM.Contract.Deposit(&_GatewayZEVM.TransactOpts, zrc20, amount, target) +} + +// Deposit is a paid mutator transaction binding the contract method 0xf45346dc. +// +// Solidity: function deposit(address zrc20, uint256 amount, address target) returns() +func (_GatewayZEVM *GatewayZEVMTransactorSession) Deposit(zrc20 common.Address, amount *big.Int, target common.Address) (*types.Transaction, error) { + return _GatewayZEVM.Contract.Deposit(&_GatewayZEVM.TransactOpts, zrc20, amount, target) +} + +// DepositAndCall is a paid mutator transaction binding the contract method 0xc39aca37. +// +// Solidity: function depositAndCall((bytes,address,uint256) context, address zrc20, uint256 amount, address target, bytes message) returns() +func (_GatewayZEVM *GatewayZEVMTransactor) DepositAndCall(opts *bind.TransactOpts, context ZContext, zrc20 common.Address, amount *big.Int, target common.Address, message []byte) (*types.Transaction, error) { + return _GatewayZEVM.contract.Transact(opts, "depositAndCall", context, zrc20, amount, target, message) +} + +// DepositAndCall is a paid mutator transaction binding the contract method 0xc39aca37. +// +// Solidity: function depositAndCall((bytes,address,uint256) context, address zrc20, uint256 amount, address target, bytes message) returns() +func (_GatewayZEVM *GatewayZEVMSession) DepositAndCall(context ZContext, zrc20 common.Address, amount *big.Int, target common.Address, message []byte) (*types.Transaction, error) { + return _GatewayZEVM.Contract.DepositAndCall(&_GatewayZEVM.TransactOpts, context, zrc20, amount, target, message) +} + +// DepositAndCall is a paid mutator transaction binding the contract method 0xc39aca37. +// +// Solidity: function depositAndCall((bytes,address,uint256) context, address zrc20, uint256 amount, address target, bytes message) returns() +func (_GatewayZEVM *GatewayZEVMTransactorSession) DepositAndCall(context ZContext, zrc20 common.Address, amount *big.Int, target common.Address, message []byte) (*types.Transaction, error) { + return _GatewayZEVM.Contract.DepositAndCall(&_GatewayZEVM.TransactOpts, context, zrc20, amount, target, message) +} + +// Execute is a paid mutator transaction binding the contract method 0xbcf7f32b. +// +// Solidity: function execute((bytes,address,uint256) context, address zrc20, uint256 amount, address target, bytes message) returns() +func (_GatewayZEVM *GatewayZEVMTransactor) Execute(opts *bind.TransactOpts, context ZContext, zrc20 common.Address, amount *big.Int, target common.Address, message []byte) (*types.Transaction, error) { + return _GatewayZEVM.contract.Transact(opts, "execute", context, zrc20, amount, target, message) +} + +// Execute is a paid mutator transaction binding the contract method 0xbcf7f32b. +// +// Solidity: function execute((bytes,address,uint256) context, address zrc20, uint256 amount, address target, bytes message) returns() +func (_GatewayZEVM *GatewayZEVMSession) Execute(context ZContext, zrc20 common.Address, amount *big.Int, target common.Address, message []byte) (*types.Transaction, error) { + return _GatewayZEVM.Contract.Execute(&_GatewayZEVM.TransactOpts, context, zrc20, amount, target, message) +} + +// Execute is a paid mutator transaction binding the contract method 0xbcf7f32b. +// +// Solidity: function execute((bytes,address,uint256) context, address zrc20, uint256 amount, address target, bytes message) returns() +func (_GatewayZEVM *GatewayZEVMTransactorSession) Execute(context ZContext, zrc20 common.Address, amount *big.Int, target common.Address, message []byte) (*types.Transaction, error) { + return _GatewayZEVM.Contract.Execute(&_GatewayZEVM.TransactOpts, context, zrc20, amount, target, 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..7d2b4bda --- /dev/null +++ b/pkg/contracts/prototypes/zevm/interfaces.sol/igatewayzevm.go @@ -0,0 +1,314 @@ +// 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 +) + +// ZContext is an auto generated low-level Go binding around an user-defined struct. +type ZContext struct { + Origin []byte + Sender common.Address + ChainID *big.Int +} + +// 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\":\"address\",\"name\":\"zrc20\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"target\",\"type\":\"address\"}],\"name\":\"deposit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes\",\"name\":\"origin\",\"type\":\"bytes\"},{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"chainID\",\"type\":\"uint256\"}],\"internalType\":\"structzContext\",\"name\":\"context\",\"type\":\"tuple\"},{\"internalType\":\"address\",\"name\":\"zrc20\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"target\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"message\",\"type\":\"bytes\"}],\"name\":\"depositAndCall\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes\",\"name\":\"origin\",\"type\":\"bytes\"},{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"chainID\",\"type\":\"uint256\"}],\"internalType\":\"structzContext\",\"name\":\"context\",\"type\":\"tuple\"},{\"internalType\":\"address\",\"name\":\"zrc20\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"target\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"message\",\"type\":\"bytes\"}],\"name\":\"execute\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"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) +} + +// Deposit is a paid mutator transaction binding the contract method 0xf45346dc. +// +// Solidity: function deposit(address zrc20, uint256 amount, address target) returns() +func (_IGatewayZEVM *IGatewayZEVMTransactor) Deposit(opts *bind.TransactOpts, zrc20 common.Address, amount *big.Int, target common.Address) (*types.Transaction, error) { + return _IGatewayZEVM.contract.Transact(opts, "deposit", zrc20, amount, target) +} + +// Deposit is a paid mutator transaction binding the contract method 0xf45346dc. +// +// Solidity: function deposit(address zrc20, uint256 amount, address target) returns() +func (_IGatewayZEVM *IGatewayZEVMSession) Deposit(zrc20 common.Address, amount *big.Int, target common.Address) (*types.Transaction, error) { + return _IGatewayZEVM.Contract.Deposit(&_IGatewayZEVM.TransactOpts, zrc20, amount, target) +} + +// Deposit is a paid mutator transaction binding the contract method 0xf45346dc. +// +// Solidity: function deposit(address zrc20, uint256 amount, address target) returns() +func (_IGatewayZEVM *IGatewayZEVMTransactorSession) Deposit(zrc20 common.Address, amount *big.Int, target common.Address) (*types.Transaction, error) { + return _IGatewayZEVM.Contract.Deposit(&_IGatewayZEVM.TransactOpts, zrc20, amount, target) +} + +// DepositAndCall is a paid mutator transaction binding the contract method 0xc39aca37. +// +// Solidity: function depositAndCall((bytes,address,uint256) context, address zrc20, uint256 amount, address target, bytes message) returns() +func (_IGatewayZEVM *IGatewayZEVMTransactor) DepositAndCall(opts *bind.TransactOpts, context ZContext, zrc20 common.Address, amount *big.Int, target common.Address, message []byte) (*types.Transaction, error) { + return _IGatewayZEVM.contract.Transact(opts, "depositAndCall", context, zrc20, amount, target, message) +} + +// DepositAndCall is a paid mutator transaction binding the contract method 0xc39aca37. +// +// Solidity: function depositAndCall((bytes,address,uint256) context, address zrc20, uint256 amount, address target, bytes message) returns() +func (_IGatewayZEVM *IGatewayZEVMSession) DepositAndCall(context ZContext, zrc20 common.Address, amount *big.Int, target common.Address, message []byte) (*types.Transaction, error) { + return _IGatewayZEVM.Contract.DepositAndCall(&_IGatewayZEVM.TransactOpts, context, zrc20, amount, target, message) +} + +// DepositAndCall is a paid mutator transaction binding the contract method 0xc39aca37. +// +// Solidity: function depositAndCall((bytes,address,uint256) context, address zrc20, uint256 amount, address target, bytes message) returns() +func (_IGatewayZEVM *IGatewayZEVMTransactorSession) DepositAndCall(context ZContext, zrc20 common.Address, amount *big.Int, target common.Address, message []byte) (*types.Transaction, error) { + return _IGatewayZEVM.Contract.DepositAndCall(&_IGatewayZEVM.TransactOpts, context, zrc20, amount, target, message) +} + +// Execute is a paid mutator transaction binding the contract method 0xbcf7f32b. +// +// Solidity: function execute((bytes,address,uint256) context, address zrc20, uint256 amount, address target, bytes message) returns() +func (_IGatewayZEVM *IGatewayZEVMTransactor) Execute(opts *bind.TransactOpts, context ZContext, zrc20 common.Address, amount *big.Int, target common.Address, message []byte) (*types.Transaction, error) { + return _IGatewayZEVM.contract.Transact(opts, "execute", context, zrc20, amount, target, message) +} + +// Execute is a paid mutator transaction binding the contract method 0xbcf7f32b. +// +// Solidity: function execute((bytes,address,uint256) context, address zrc20, uint256 amount, address target, bytes message) returns() +func (_IGatewayZEVM *IGatewayZEVMSession) Execute(context ZContext, zrc20 common.Address, amount *big.Int, target common.Address, message []byte) (*types.Transaction, error) { + return _IGatewayZEVM.Contract.Execute(&_IGatewayZEVM.TransactOpts, context, zrc20, amount, target, message) +} + +// Execute is a paid mutator transaction binding the contract method 0xbcf7f32b. +// +// Solidity: function execute((bytes,address,uint256) context, address zrc20, uint256 amount, address target, bytes message) returns() +func (_IGatewayZEVM *IGatewayZEVMTransactorSession) Execute(context ZContext, zrc20 common.Address, amount *big.Int, target common.Address, message []byte) (*types.Transaction, error) { + return _IGatewayZEVM.Contract.Execute(&_IGatewayZEVM.TransactOpts, context, zrc20, amount, target, 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..3f0bd6f4 --- /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\":[],\"name\":\"ApprovalFailed\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"receiver\",\"type\":\"bytes\"},{\"internalType\":\"string\",\"name\":\"str\",\"type\":\"string\"},{\"internalType\":\"uint256\",\"name\":\"num\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"flag\",\"type\":\"bool\"}],\"name\":\"callReceiver\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"gateway\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"receiver\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"zrc20\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"str\",\"type\":\"string\"},{\"internalType\":\"uint256\",\"name\":\"num\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"flag\",\"type\":\"bool\"}],\"name\":\"withdrawAndCallReceiver\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", + Bin: "0x608060405234801561001057600080fd5b50604051610bcd380380610bcd8339818101604052810190610032919061008d565b806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050610108565b600081519050610087816100f1565b92915050565b6000602082840312156100a3576100a26100ec565b5b60006100b184828501610078565b91505092915050565b60006100c5826100cc565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600080fd5b6100fa816100ba565b811461010557600080fd5b50565b610ab6806101176000396000f3fe608060405234801561001057600080fd5b50600436106100415760003560e01c80630abd890514610046578063116191b614610062578063a0a1730b14610080575b600080fd5b610060600480360381019061005b91906105fd565b61009c565b005b61006a6102af565b6040516100779190610761565b60405180910390f35b61009a6004803603810190610095919061055e565b6102d3565b005b60008383836040516024016100b39392919061082f565b6040516020818303038152906040527fe04d4f97000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff838183161783525050505090508473ffffffffffffffffffffffffffffffffffffffff1663095ea7b360008054906101000a900473ffffffffffffffffffffffffffffffffffffffff16886040518363ffffffff1660e01b815260040161018d92919061077c565b602060405180830381600087803b1580156101a757600080fd5b505af11580156101bb573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101df9190610531565b610215576040517f8164f84200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16637993c1e0888888856040518563ffffffff1660e01b815260040161027494939291906107dc565b600060405180830381600087803b15801561028e57600080fd5b505af11580156102a2573d6000803e3d6000fd5b5050505050505050505050565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008383836040516024016102ea9392919061082f565b6040516020818303038152906040527fe04d4f97000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050905060008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16630ac7c44c86836040518363ffffffff1660e01b81526004016103c49291906107a5565b600060405180830381600087803b1580156103de57600080fd5b505af11580156103f2573d6000803e3d6000fd5b505050505050505050565b600061041061040b84610892565b61086d565b90508281526020810184848401111561042c5761042b610a1b565b5b610437848285610974565b509392505050565b600061045261044d846108c3565b61086d565b90508281526020810184848401111561046e5761046d610a1b565b5b610479848285610974565b509392505050565b60008135905061049081610a3b565b92915050565b6000813590506104a581610a52565b92915050565b6000815190506104ba81610a52565b92915050565b600082601f8301126104d5576104d4610a16565b5b81356104e58482602086016103fd565b91505092915050565b600082601f83011261050357610502610a16565b5b813561051384826020860161043f565b91505092915050565b60008135905061052b81610a69565b92915050565b60006020828403121561054757610546610a25565b5b6000610555848285016104ab565b91505092915050565b6000806000806080858703121561057857610577610a25565b5b600085013567ffffffffffffffff81111561059657610595610a20565b5b6105a2878288016104c0565b945050602085013567ffffffffffffffff8111156105c3576105c2610a20565b5b6105cf878288016104ee565b93505060406105e08782880161051c565b92505060606105f187828801610496565b91505092959194509250565b60008060008060008060c0878903121561061a57610619610a25565b5b600087013567ffffffffffffffff81111561063857610637610a20565b5b61064489828a016104c0565b965050602061065589828a0161051c565b955050604061066689828a01610481565b945050606087013567ffffffffffffffff81111561068757610686610a20565b5b61069389828a016104ee565b93505060806106a489828a0161051c565b92505060a06106b589828a01610496565b9150509295509295509295565b6106cb8161092c565b82525050565b6106da8161093e565b82525050565b60006106eb826108f4565b6106f5818561090a565b9350610705818560208601610983565b61070e81610a2a565b840191505092915050565b6000610724826108ff565b61072e818561091b565b935061073e818560208601610983565b61074781610a2a565b840191505092915050565b61075b8161096a565b82525050565b600060208201905061077660008301846106c2565b92915050565b600060408201905061079160008301856106c2565b61079e6020830184610752565b9392505050565b600060408201905081810360008301526107bf81856106e0565b905081810360208301526107d381846106e0565b90509392505050565b600060808201905081810360008301526107f681876106e0565b90506108056020830186610752565b61081260408301856106c2565b818103606083015261082481846106e0565b905095945050505050565b600060608201905081810360008301526108498186610719565b90506108586020830185610752565b61086560408301846106d1565b949350505050565b6000610877610888565b905061088382826109b6565b919050565b6000604051905090565b600067ffffffffffffffff8211156108ad576108ac6109e7565b5b6108b682610a2a565b9050602081019050919050565b600067ffffffffffffffff8211156108de576108dd6109e7565b5b6108e782610a2a565b9050602081019050919050565b600081519050919050565b600081519050919050565b600082825260208201905092915050565b600082825260208201905092915050565b60006109378261094a565b9050919050565b60008115159050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b82818337600083830152505050565b60005b838110156109a1578082015181840152602081019050610986565b838111156109b0576000848401525b50505050565b6109bf82610a2a565b810181811067ffffffffffffffff821117156109de576109dd6109e7565b5b80604052505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b610a448161092c565b8114610a4f57600080fd5b50565b610a5b8161093e565b8114610a6657600080fd5b50565b610a728161096a565b8114610a7d57600080fd5b5056fea2646970667358221220ef1adb339e85463eb7fc8992fa1513ffe98ce4f59d2fb2b57db08574d1cccd0864736f6c63430008070033", +} + +// 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/prototypes/zevm/testzcontract.sol/testzcontract.go b/pkg/contracts/prototypes/zevm/testzcontract.sol/testzcontract.go new file mode 100644 index 00000000..5e4ea675 --- /dev/null +++ b/pkg/contracts/prototypes/zevm/testzcontract.sol/testzcontract.go @@ -0,0 +1,369 @@ +// Code generated - DO NOT EDIT. +// This file is a generated binding and any manual changes will be lost. + +package testzcontract + +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 +) + +// ZContext is an auto generated low-level Go binding around an user-defined struct. +type ZContext struct { + Origin []byte + Sender common.Address + ChainID *big.Int +} + +// TestZContractMetaData contains all meta data concerning the TestZContract contract. +var TestZContractMetaData = &bind.MetaData{ + ABI: "[{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"origin\",\"type\":\"bytes\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"chainID\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"msgSender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"message\",\"type\":\"string\"}],\"name\":\"ContextData\",\"type\":\"event\"},{\"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\":\"bytes\",\"name\":\"message\",\"type\":\"bytes\"}],\"name\":\"onCrossChainCall\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", + Bin: "0x608060405234801561001057600080fd5b50610647806100206000396000f3fe608060405234801561001057600080fd5b506004361061002b5760003560e01c8063de43156e14610030575b600080fd5b61004a60048036038101906100459190610251565b61004c565b005b6000828281019061005d9190610208565b90507fcdc8ee677dc5ebe680fb18cebda5e26ba5ea1f0ba504a47e2a9a2ecb476dc98e86806000019061009091906103dc565b8860200160208101906100a391906101db565b896040013533866040516100bc96959493929190610379565b60405180910390a1505050505050565b60006100df6100da84610464565b61043f565b9050828152602081018484840111156100fb576100fa6105c3565b5b6101068482856104fe565b509392505050565b60008135905061011d816105e3565b92915050565b60008083601f840112610139576101386105a5565b5b8235905067ffffffffffffffff811115610156576101556105a0565b5b602083019150836001820283011115610172576101716105b9565b5b9250929050565b600082601f83011261018e5761018d6105a5565b5b813561019e8482602086016100cc565b91505092915050565b6000606082840312156101bd576101bc6105af565b5b81905092915050565b6000813590506101d5816105fa565b92915050565b6000602082840312156101f1576101f06105cd565b5b60006101ff8482850161010e565b91505092915050565b60006020828403121561021e5761021d6105cd565b5b600082013567ffffffffffffffff81111561023c5761023b6105c8565b5b61024884828501610179565b91505092915050565b60008060008060006080868803121561026d5761026c6105cd565b5b600086013567ffffffffffffffff81111561028b5761028a6105c8565b5b610297888289016101a7565b95505060206102a88882890161010e565b94505060406102b9888289016101c6565b935050606086013567ffffffffffffffff8111156102da576102d96105c8565b5b6102e688828901610123565b92509250509295509295909350565b6102fe816104c2565b82525050565b600061031083856104a0565b935061031d8385846104fe565b610326836105d2565b840190509392505050565b600061033c82610495565b61034681856104b1565b935061035681856020860161050d565b61035f816105d2565b840191505092915050565b610373816104f4565b82525050565b600060a082019050818103600083015261039481888a610304565b90506103a360208301876102f5565b6103b0604083018661036a565b6103bd60608301856102f5565b81810360808301526103cf8184610331565b9050979650505050505050565b600080833560016020038436030381126103f9576103f86105b4565b5b80840192508235915067ffffffffffffffff82111561041b5761041a6105aa565b5b602083019250600182023603831315610437576104366105be565b5b509250929050565b600061044961045a565b90506104558282610540565b919050565b6000604051905090565b600067ffffffffffffffff82111561047f5761047e610571565b5b610488826105d2565b9050602081019050919050565b600081519050919050565b600082825260208201905092915050565b600082825260208201905092915050565b60006104cd826104d4565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b82818337600083830152505050565b60005b8381101561052b578082015181840152602081019050610510565b8381111561053a576000848401525b50505050565b610549826105d2565b810181811067ffffffffffffffff8211171561056857610567610571565b5b80604052505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b6105ec816104c2565b81146105f757600080fd5b50565b610603816104f4565b811461060e57600080fd5b5056fea2646970667358221220658b8c56b21b674d6677fa444091a4a714b74ee72bac7b4972c1063bda6d73d764736f6c63430008070033", +} + +// TestZContractABI is the input ABI used to generate the binding from. +// Deprecated: Use TestZContractMetaData.ABI instead. +var TestZContractABI = TestZContractMetaData.ABI + +// TestZContractBin is the compiled bytecode used for deploying new contracts. +// Deprecated: Use TestZContractMetaData.Bin instead. +var TestZContractBin = TestZContractMetaData.Bin + +// DeployTestZContract deploys a new Ethereum contract, binding an instance of TestZContract to it. +func DeployTestZContract(auth *bind.TransactOpts, backend bind.ContractBackend) (common.Address, *types.Transaction, *TestZContract, error) { + parsed, err := TestZContractMetaData.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(TestZContractBin), backend) + if err != nil { + return common.Address{}, nil, nil, err + } + return address, tx, &TestZContract{TestZContractCaller: TestZContractCaller{contract: contract}, TestZContractTransactor: TestZContractTransactor{contract: contract}, TestZContractFilterer: TestZContractFilterer{contract: contract}}, nil +} + +// TestZContract is an auto generated Go binding around an Ethereum contract. +type TestZContract struct { + TestZContractCaller // Read-only binding to the contract + TestZContractTransactor // Write-only binding to the contract + TestZContractFilterer // Log filterer for contract events +} + +// TestZContractCaller is an auto generated read-only Go binding around an Ethereum contract. +type TestZContractCaller struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// TestZContractTransactor is an auto generated write-only Go binding around an Ethereum contract. +type TestZContractTransactor struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// TestZContractFilterer is an auto generated log filtering Go binding around an Ethereum contract events. +type TestZContractFilterer struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// TestZContractSession is an auto generated Go binding around an Ethereum contract, +// with pre-set call and transact options. +type TestZContractSession struct { + Contract *TestZContract // 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 +} + +// TestZContractCallerSession is an auto generated read-only Go binding around an Ethereum contract, +// with pre-set call options. +type TestZContractCallerSession struct { + Contract *TestZContractCaller // Generic contract caller binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session +} + +// TestZContractTransactorSession is an auto generated write-only Go binding around an Ethereum contract, +// with pre-set transact options. +type TestZContractTransactorSession struct { + Contract *TestZContractTransactor // Generic contract transactor binding to set the session for + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// TestZContractRaw is an auto generated low-level Go binding around an Ethereum contract. +type TestZContractRaw struct { + Contract *TestZContract // Generic contract binding to access the raw methods on +} + +// TestZContractCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. +type TestZContractCallerRaw struct { + Contract *TestZContractCaller // Generic read-only contract binding to access the raw methods on +} + +// TestZContractTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. +type TestZContractTransactorRaw struct { + Contract *TestZContractTransactor // Generic write-only contract binding to access the raw methods on +} + +// NewTestZContract creates a new instance of TestZContract, bound to a specific deployed contract. +func NewTestZContract(address common.Address, backend bind.ContractBackend) (*TestZContract, error) { + contract, err := bindTestZContract(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &TestZContract{TestZContractCaller: TestZContractCaller{contract: contract}, TestZContractTransactor: TestZContractTransactor{contract: contract}, TestZContractFilterer: TestZContractFilterer{contract: contract}}, nil +} + +// NewTestZContractCaller creates a new read-only instance of TestZContract, bound to a specific deployed contract. +func NewTestZContractCaller(address common.Address, caller bind.ContractCaller) (*TestZContractCaller, error) { + contract, err := bindTestZContract(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &TestZContractCaller{contract: contract}, nil +} + +// NewTestZContractTransactor creates a new write-only instance of TestZContract, bound to a specific deployed contract. +func NewTestZContractTransactor(address common.Address, transactor bind.ContractTransactor) (*TestZContractTransactor, error) { + contract, err := bindTestZContract(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &TestZContractTransactor{contract: contract}, nil +} + +// NewTestZContractFilterer creates a new log filterer instance of TestZContract, bound to a specific deployed contract. +func NewTestZContractFilterer(address common.Address, filterer bind.ContractFilterer) (*TestZContractFilterer, error) { + contract, err := bindTestZContract(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &TestZContractFilterer{contract: contract}, nil +} + +// bindTestZContract binds a generic wrapper to an already deployed contract. +func bindTestZContract(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := TestZContractMetaData.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 (_TestZContract *TestZContractRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _TestZContract.Contract.TestZContractCaller.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 (_TestZContract *TestZContractRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _TestZContract.Contract.TestZContractTransactor.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_TestZContract *TestZContractRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _TestZContract.Contract.TestZContractTransactor.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 (_TestZContract *TestZContractCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _TestZContract.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 (_TestZContract *TestZContractTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _TestZContract.Contract.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_TestZContract *TestZContractTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _TestZContract.Contract.contract.Transact(opts, method, params...) +} + +// OnCrossChainCall is a paid mutator transaction binding the contract method 0xde43156e. +// +// Solidity: function onCrossChainCall((bytes,address,uint256) context, address zrc20, uint256 amount, bytes message) returns() +func (_TestZContract *TestZContractTransactor) OnCrossChainCall(opts *bind.TransactOpts, context ZContext, zrc20 common.Address, amount *big.Int, message []byte) (*types.Transaction, error) { + return _TestZContract.contract.Transact(opts, "onCrossChainCall", context, zrc20, amount, message) +} + +// OnCrossChainCall is a paid mutator transaction binding the contract method 0xde43156e. +// +// Solidity: function onCrossChainCall((bytes,address,uint256) context, address zrc20, uint256 amount, bytes message) returns() +func (_TestZContract *TestZContractSession) OnCrossChainCall(context ZContext, zrc20 common.Address, amount *big.Int, message []byte) (*types.Transaction, error) { + return _TestZContract.Contract.OnCrossChainCall(&_TestZContract.TransactOpts, context, zrc20, amount, message) +} + +// OnCrossChainCall is a paid mutator transaction binding the contract method 0xde43156e. +// +// Solidity: function onCrossChainCall((bytes,address,uint256) context, address zrc20, uint256 amount, bytes message) returns() +func (_TestZContract *TestZContractTransactorSession) OnCrossChainCall(context ZContext, zrc20 common.Address, amount *big.Int, message []byte) (*types.Transaction, error) { + return _TestZContract.Contract.OnCrossChainCall(&_TestZContract.TransactOpts, context, zrc20, amount, message) +} + +// TestZContractContextDataIterator is returned from FilterContextData and is used to iterate over the raw logs and unpacked data for ContextData events raised by the TestZContract contract. +type TestZContractContextDataIterator struct { + Event *TestZContractContextData // 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 *TestZContractContextDataIterator) 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(TestZContractContextData) + 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(TestZContractContextData) + 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 *TestZContractContextDataIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *TestZContractContextDataIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// TestZContractContextData represents a ContextData event raised by the TestZContract contract. +type TestZContractContextData struct { + Origin []byte + Sender common.Address + ChainID *big.Int + MsgSender common.Address + Message string + Raw types.Log // Blockchain specific contextual infos +} + +// FilterContextData is a free log retrieval operation binding the contract event 0xcdc8ee677dc5ebe680fb18cebda5e26ba5ea1f0ba504a47e2a9a2ecb476dc98e. +// +// Solidity: event ContextData(bytes origin, address sender, uint256 chainID, address msgSender, string message) +func (_TestZContract *TestZContractFilterer) FilterContextData(opts *bind.FilterOpts) (*TestZContractContextDataIterator, error) { + + logs, sub, err := _TestZContract.contract.FilterLogs(opts, "ContextData") + if err != nil { + return nil, err + } + return &TestZContractContextDataIterator{contract: _TestZContract.contract, event: "ContextData", logs: logs, sub: sub}, nil +} + +// WatchContextData is a free log subscription operation binding the contract event 0xcdc8ee677dc5ebe680fb18cebda5e26ba5ea1f0ba504a47e2a9a2ecb476dc98e. +// +// Solidity: event ContextData(bytes origin, address sender, uint256 chainID, address msgSender, string message) +func (_TestZContract *TestZContractFilterer) WatchContextData(opts *bind.WatchOpts, sink chan<- *TestZContractContextData) (event.Subscription, error) { + + logs, sub, err := _TestZContract.contract.WatchLogs(opts, "ContextData") + 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(TestZContractContextData) + if err := _TestZContract.contract.UnpackLog(event, "ContextData", 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 +} + +// ParseContextData is a log parse operation binding the contract event 0xcdc8ee677dc5ebe680fb18cebda5e26ba5ea1f0ba504a47e2a9a2ecb476dc98e. +// +// Solidity: event ContextData(bytes origin, address sender, uint256 chainID, address msgSender, string message) +func (_TestZContract *TestZContractFilterer) ParseContextData(log types.Log) (*TestZContractContextData, error) { + event := new(TestZContractContextData) + if err := _TestZContract.contract.UnpackLog(event, "ContextData", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} diff --git a/pkg/contracts/prototypes/zevm/zrc20new.sol/zrc20errors.go b/pkg/contracts/prototypes/zevm/zrc20new.sol/zrc20errors.go new file mode 100644 index 00000000..6939b531 --- /dev/null +++ b/pkg/contracts/prototypes/zevm/zrc20new.sol/zrc20errors.go @@ -0,0 +1,181 @@ +// Code generated - DO NOT EDIT. +// This file is a generated binding and any manual changes will be lost. + +package zrc20new + +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 +) + +// ZRC20ErrorsMetaData contains all meta data concerning the ZRC20Errors contract. +var ZRC20ErrorsMetaData = &bind.MetaData{ + ABI: "[{\"inputs\":[],\"name\":\"CallerIsNotFungibleModule\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"GasFeeTransferFailed\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidSender\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"LowAllowance\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"LowBalance\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ZeroAddress\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ZeroGasCoin\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ZeroGasPrice\",\"type\":\"error\"}]", +} + +// ZRC20ErrorsABI is the input ABI used to generate the binding from. +// Deprecated: Use ZRC20ErrorsMetaData.ABI instead. +var ZRC20ErrorsABI = ZRC20ErrorsMetaData.ABI + +// ZRC20Errors is an auto generated Go binding around an Ethereum contract. +type ZRC20Errors struct { + ZRC20ErrorsCaller // Read-only binding to the contract + ZRC20ErrorsTransactor // Write-only binding to the contract + ZRC20ErrorsFilterer // Log filterer for contract events +} + +// ZRC20ErrorsCaller is an auto generated read-only Go binding around an Ethereum contract. +type ZRC20ErrorsCaller struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// ZRC20ErrorsTransactor is an auto generated write-only Go binding around an Ethereum contract. +type ZRC20ErrorsTransactor struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// ZRC20ErrorsFilterer is an auto generated log filtering Go binding around an Ethereum contract events. +type ZRC20ErrorsFilterer struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// ZRC20ErrorsSession is an auto generated Go binding around an Ethereum contract, +// with pre-set call and transact options. +type ZRC20ErrorsSession struct { + Contract *ZRC20Errors // 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 +} + +// ZRC20ErrorsCallerSession is an auto generated read-only Go binding around an Ethereum contract, +// with pre-set call options. +type ZRC20ErrorsCallerSession struct { + Contract *ZRC20ErrorsCaller // Generic contract caller binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session +} + +// ZRC20ErrorsTransactorSession is an auto generated write-only Go binding around an Ethereum contract, +// with pre-set transact options. +type ZRC20ErrorsTransactorSession struct { + Contract *ZRC20ErrorsTransactor // Generic contract transactor binding to set the session for + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// ZRC20ErrorsRaw is an auto generated low-level Go binding around an Ethereum contract. +type ZRC20ErrorsRaw struct { + Contract *ZRC20Errors // Generic contract binding to access the raw methods on +} + +// ZRC20ErrorsCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. +type ZRC20ErrorsCallerRaw struct { + Contract *ZRC20ErrorsCaller // Generic read-only contract binding to access the raw methods on +} + +// ZRC20ErrorsTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. +type ZRC20ErrorsTransactorRaw struct { + Contract *ZRC20ErrorsTransactor // Generic write-only contract binding to access the raw methods on +} + +// NewZRC20Errors creates a new instance of ZRC20Errors, bound to a specific deployed contract. +func NewZRC20Errors(address common.Address, backend bind.ContractBackend) (*ZRC20Errors, error) { + contract, err := bindZRC20Errors(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &ZRC20Errors{ZRC20ErrorsCaller: ZRC20ErrorsCaller{contract: contract}, ZRC20ErrorsTransactor: ZRC20ErrorsTransactor{contract: contract}, ZRC20ErrorsFilterer: ZRC20ErrorsFilterer{contract: contract}}, nil +} + +// NewZRC20ErrorsCaller creates a new read-only instance of ZRC20Errors, bound to a specific deployed contract. +func NewZRC20ErrorsCaller(address common.Address, caller bind.ContractCaller) (*ZRC20ErrorsCaller, error) { + contract, err := bindZRC20Errors(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &ZRC20ErrorsCaller{contract: contract}, nil +} + +// NewZRC20ErrorsTransactor creates a new write-only instance of ZRC20Errors, bound to a specific deployed contract. +func NewZRC20ErrorsTransactor(address common.Address, transactor bind.ContractTransactor) (*ZRC20ErrorsTransactor, error) { + contract, err := bindZRC20Errors(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &ZRC20ErrorsTransactor{contract: contract}, nil +} + +// NewZRC20ErrorsFilterer creates a new log filterer instance of ZRC20Errors, bound to a specific deployed contract. +func NewZRC20ErrorsFilterer(address common.Address, filterer bind.ContractFilterer) (*ZRC20ErrorsFilterer, error) { + contract, err := bindZRC20Errors(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &ZRC20ErrorsFilterer{contract: contract}, nil +} + +// bindZRC20Errors binds a generic wrapper to an already deployed contract. +func bindZRC20Errors(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := ZRC20ErrorsMetaData.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 (_ZRC20Errors *ZRC20ErrorsRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _ZRC20Errors.Contract.ZRC20ErrorsCaller.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 (_ZRC20Errors *ZRC20ErrorsRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _ZRC20Errors.Contract.ZRC20ErrorsTransactor.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_ZRC20Errors *ZRC20ErrorsRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _ZRC20Errors.Contract.ZRC20ErrorsTransactor.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 (_ZRC20Errors *ZRC20ErrorsCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _ZRC20Errors.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 (_ZRC20Errors *ZRC20ErrorsTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _ZRC20Errors.Contract.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_ZRC20Errors *ZRC20ErrorsTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _ZRC20Errors.Contract.contract.Transact(opts, method, params...) +} diff --git a/pkg/contracts/prototypes/zevm/zrc20new.sol/zrc20new.go b/pkg/contracts/prototypes/zevm/zrc20new.sol/zrc20new.go new file mode 100644 index 00000000..cbf3cefc --- /dev/null +++ b/pkg/contracts/prototypes/zevm/zrc20new.sol/zrc20new.go @@ -0,0 +1,1831 @@ +// Code generated - DO NOT EDIT. +// This file is a generated binding and any manual changes will be lost. + +package zrc20new + +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 +) + +// ZRC20NewMetaData contains all meta data concerning the ZRC20New contract. +var ZRC20NewMetaData = &bind.MetaData{ + ABI: "[{\"inputs\":[{\"internalType\":\"string\",\"name\":\"name_\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"symbol_\",\"type\":\"string\"},{\"internalType\":\"uint8\",\"name\":\"decimals_\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"chainid_\",\"type\":\"uint256\"},{\"internalType\":\"enumCoinType\",\"name\":\"coinType_\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"gasLimit_\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"systemContractAddress_\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"gatewayContractAddress_\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"CallerIsNotFungibleModule\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"GasFeeTransferFailed\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidSender\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"LowAllowance\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"LowBalance\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ZeroAddress\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ZeroGasCoin\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ZeroGasPrice\",\"type\":\"error\"},{\"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\":\"CHAIN_ID\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"COIN_TYPE\",\"outputs\":[{\"internalType\":\"enumCoinType\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"FUNGIBLE_MODULE_ADDRESS\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"GAS_LIMIT\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"GATEWAY_CONTRACT_ADDRESS\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"PROTOCOL_FLAT_FEE\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"SYSTEM_CONTRACT_ADDRESS\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"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\":[],\"name\":\"decimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"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\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"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\":\"uint256\",\"name\":\"gasLimit\",\"type\":\"uint256\"}],\"name\":\"updateGasLimit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"protocolFlatFee\",\"type\":\"uint256\"}],\"name\":\"updateProtocolFlatFee\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"}],\"name\":\"updateSystemContractAddress\",\"outputs\":[],\"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\"}]", + Bin: "0x60c06040523480156200001157600080fd5b506040516200282d3803806200282d83398181016040528101906200003791906200035b565b73735b14bb79463307aacbed86daf3322b1e6226ab73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614620000b1576040517f2b2add3d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8760079080519060200190620000c9929190620001d1565b508660089080519060200190620000e2929190620001d1565b5085600960006101000a81548160ff021916908360ff16021790555084608081815250508360028111156200011c576200011b620005ae565b5b60a0816002811115620001345762000133620005ae565b5b60f81b8152505082600281905550816000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505050505050505050620006bf565b828054620001df9062000542565b90600052602060002090601f0160209004810192826200020357600085556200024f565b82601f106200021e57805160ff19168380011785556200024f565b828001600101855582156200024f579182015b828111156200024e57825182559160200191906001019062000231565b5b5090506200025e919062000262565b5090565b5b808211156200027d57600081600090555060010162000263565b5090565b60006200029862000292846200048b565b62000462565b905082815260208101848484011115620002b757620002b662000640565b5b620002c48482856200050c565b509392505050565b600081519050620002dd8162000660565b92915050565b600081519050620002f4816200067a565b92915050565b600082601f8301126200031257620003116200063b565b5b81516200032484826020860162000281565b91505092915050565b6000815190506200033e816200068b565b92915050565b6000815190506200035581620006a5565b92915050565b600080600080600080600080610100898b0312156200037f576200037e6200064a565b5b600089015167ffffffffffffffff811115620003a0576200039f62000645565b5b620003ae8b828c01620002fa565b985050602089015167ffffffffffffffff811115620003d257620003d162000645565b5b620003e08b828c01620002fa565b9750506040620003f38b828c0162000344565b9650506060620004068b828c016200032d565b9550506080620004198b828c01620002e3565b94505060a06200042c8b828c016200032d565b93505060c06200043f8b828c01620002cc565b92505060e0620004528b828c01620002cc565b9150509295985092959890939650565b60006200046e62000481565b90506200047c828262000578565b919050565b6000604051905090565b600067ffffffffffffffff821115620004a957620004a86200060c565b5b620004b4826200064f565b9050602081019050919050565b6000620004ce82620004d5565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b60005b838110156200052c5780820151818401526020810190506200050f565b838111156200053c576000848401525b50505050565b600060028204905060018216806200055b57607f821691505b60208210811415620005725762000571620005dd565b5b50919050565b62000583826200064f565b810181811067ffffffffffffffff82111715620005a557620005a46200060c565b5b80604052505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b6200066b81620004c1565b81146200067757600080fd5b50565b600381106200068857600080fd5b50565b6200069681620004f5565b8114620006a257600080fd5b50565b620006b081620004ff565b8114620006bc57600080fd5b50565b60805160a05160f81c612137620006f660003960006109580152600081816108a201528181610c250152610d5a01526121376000f3fe608060405234801561001057600080fd5b506004361061014d5760003560e01c806385e1f4d0116100c3578063d9eeebed1161007c578063d9eeebed146103cc578063dd62ed3e146103eb578063e2f535b81461041b578063eddeb12314610439578063f2441b3214610455578063f687d12a146104735761014d565b806385e1f4d0146102f657806395d89b4114610314578063a3413d0314610332578063a9059cbb14610350578063c701262614610380578063c835d7cc146103b05761014d565b8063313ce56711610115578063313ce5671461020c5780633ce4a5bc1461022a57806342966c681461024857806347e7ef24146102785780634d8943bb146102a857806370a08231146102c65761014d565b806306fdde0314610152578063091d278814610170578063095ea7b31461018e57806318160ddd146101be57806323b872dd146101dc575b600080fd5b61015a61048f565b6040516101679190611cad565b60405180910390f35b610178610521565b6040516101859190611ccf565b60405180910390f35b6101a860048036038101906101a3919061196e565b610527565b6040516101b59190611bfb565b60405180910390f35b6101c6610545565b6040516101d39190611ccf565b60405180910390f35b6101f660048036038101906101f1919061191b565b61054f565b6040516102039190611bfb565b60405180910390f35b610214610647565b6040516102219190611cea565b60405180910390f35b61023261065e565b60405161023f9190611b80565b60405180910390f35b610262600480360381019061025d9190611a37565b610676565b60405161026f9190611bfb565b60405180910390f35b610292600480360381019061028d919061196e565b61068b565b60405161029f9190611bfb565b60405180910390f35b6102b0610851565b6040516102bd9190611ccf565b60405180910390f35b6102e060048036038101906102db9190611881565b610857565b6040516102ed9190611ccf565b60405180910390f35b6102fe6108a0565b60405161030b9190611ccf565b60405180910390f35b61031c6108c4565b6040516103299190611cad565b60405180910390f35b61033a610956565b6040516103479190611c92565b60405180910390f35b61036a6004803603810190610365919061196e565b61097a565b6040516103779190611bfb565b60405180910390f35b61039a600480360381019061039591906119db565b610998565b6040516103a79190611bfb565b60405180910390f35b6103ca60048036038101906103c59190611881565b610aee565b005b6103d4610be1565b6040516103e2929190611bd2565b60405180910390f35b610405600480360381019061040091906118db565b610e4e565b6040516104129190611ccf565b60405180910390f35b610423610ed5565b6040516104309190611b80565b60405180910390f35b610453600480360381019061044e9190611a37565b610efb565b005b61045d610fb5565b60405161046a9190611b80565b60405180910390f35b61048d60048036038101906104889190611a37565b610fd9565b005b60606007805461049e90611f33565b80601f01602080910402602001604051908101604052809291908181526020018280546104ca90611f33565b80156105175780601f106104ec57610100808354040283529160200191610517565b820191906000526020600020905b8154815290600101906020018083116104fa57829003601f168201915b5050505050905090565b60025481565b600061053b610534611093565b848461109b565b6001905092915050565b6000600654905090565b600061055c848484611254565b6000600560008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006105a7611093565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205490508281101561061e576040517f10bad14700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61063b8561062a611093565b85846106369190611e43565b61109b565b60019150509392505050565b6000600960009054906101000a900460ff16905090565b73735b14bb79463307aacbed86daf3322b1e6226ab81565b600061068233836114b0565b60019050919050565b600073735b14bb79463307aacbed86daf3322b1e6226ab73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614158015610729575060008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614155b80156107835750600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614155b156107ba576040517fddb5de5e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6107c48383611668565b8273ffffffffffffffffffffffffffffffffffffffff167f67fc7bdaed5b0ec550d8706b87d60568ab70c6b781263c70101d54cd1564aab373735b14bb79463307aacbed86daf3322b1e6226ab6040516020016108219190611b65565b6040516020818303038152906040528460405161083f929190611c16565b60405180910390a26001905092915050565b60035481565b6000600460008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b7f000000000000000000000000000000000000000000000000000000000000000081565b6060600880546108d390611f33565b80601f01602080910402602001604051908101604052809291908181526020018280546108ff90611f33565b801561094c5780601f106109215761010080835404028352916020019161094c565b820191906000526020600020905b81548152906001019060200180831161092f57829003601f168201915b5050505050905090565b7f000000000000000000000000000000000000000000000000000000000000000081565b600061098e610987611093565b8484611254565b6001905092915050565b60008060006109a5610be1565b915091508173ffffffffffffffffffffffffffffffffffffffff166323b872dd3373735b14bb79463307aacbed86daf3322b1e6226ab846040518463ffffffff1660e01b81526004016109fa93929190611b9b565b602060405180830381600087803b158015610a1457600080fd5b505af1158015610a28573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a4c91906119ae565b610a82576040517f0a7cd6d600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610a8c33856114b0565b3373ffffffffffffffffffffffffffffffffffffffff167f9ffbffc04a397460ee1dbe8c9503e098090567d6b7f4b3c02a8617d800b6d955868684600354604051610ada9493929190611c46565b60405180910390a260019250505092915050565b73735b14bb79463307aacbed86daf3322b1e6226ab73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610b67576040517f2b2add3d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055507fd55614e962c5fd6ece71614f6348d702468a997a394dd5e5c1677950226d97ae81604051610bd69190611b80565b60405180910390a150565b60008060008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16630be155477f00000000000000000000000000000000000000000000000000000000000000006040518263ffffffff1660e01b8152600401610c609190611ccf565b60206040518083038186803b158015610c7857600080fd5b505afa158015610c8c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610cb091906118ae565b9050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415610d19576040517f78fff39600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663d7fd7afb7f00000000000000000000000000000000000000000000000000000000000000006040518263ffffffff1660e01b8152600401610d959190611ccf565b60206040518083038186803b158015610dad57600080fd5b505afa158015610dc1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610de59190611a64565b90506000811415610e22576040517fe661aed000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600060035460025483610e359190611de9565b610e3f9190611d93565b90508281945094505050509091565b6000600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b73735b14bb79463307aacbed86daf3322b1e6226ab73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610f74576040517f2b2add3d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b806003819055507fef13af88e424b5d15f49c77758542c1938b08b8b95b91ed0751f98ba99000d8f81604051610faa9190611ccf565b60405180910390a150565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b73735b14bb79463307aacbed86daf3322b1e6226ab73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614611052576040517f2b2add3d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b806002819055507fff5788270f43bfc1ca41c503606d2594aa3023a1a7547de403a3e2f146a4a80a816040516110889190611ccf565b60405180910390a150565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415611102576040517fd92e233d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611169576040517fd92e233d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040516112479190611ccf565b60405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156112bb576040517fd92e233d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611322576040517fd92e233d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050818110156113a0576040517ffe382aa700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b81816113ac9190611e43565b600460008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555081600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825461143e9190611d93565b925050819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040516114a29190611ccf565b60405180910390a350505050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611517576040517fd92e233d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905081811015611595576040517ffe382aa700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b81816115a19190611e43565b600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555081600660008282546115f69190611e43565b92505081905550600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405161165b9190611ccf565b60405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156116cf576040517fd92e233d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80600660008282546116e19190611d93565b9250508190555080600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282546117379190611d93565b925050819055508173ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8360405161179c9190611ccf565b60405180910390a35050565b60006117bb6117b684611d2a565b611d05565b9050828152602081018484840111156117d7576117d661207b565b5b6117e2848285611ef1565b509392505050565b6000813590506117f9816120bc565b92915050565b60008151905061180e816120bc565b92915050565b600081519050611823816120d3565b92915050565b600082601f83011261183e5761183d612076565b5b813561184e8482602086016117a8565b91505092915050565b600081359050611866816120ea565b92915050565b60008151905061187b816120ea565b92915050565b60006020828403121561189757611896612085565b5b60006118a5848285016117ea565b91505092915050565b6000602082840312156118c4576118c3612085565b5b60006118d2848285016117ff565b91505092915050565b600080604083850312156118f2576118f1612085565b5b6000611900858286016117ea565b9250506020611911858286016117ea565b9150509250929050565b60008060006060848603121561193457611933612085565b5b6000611942868287016117ea565b9350506020611953868287016117ea565b925050604061196486828701611857565b9150509250925092565b6000806040838503121561198557611984612085565b5b6000611993858286016117ea565b92505060206119a485828601611857565b9150509250929050565b6000602082840312156119c4576119c3612085565b5b60006119d284828501611814565b91505092915050565b600080604083850312156119f2576119f1612085565b5b600083013567ffffffffffffffff811115611a1057611a0f612080565b5b611a1c85828601611829565b9250506020611a2d85828601611857565b9150509250929050565b600060208284031215611a4d57611a4c612085565b5b6000611a5b84828501611857565b91505092915050565b600060208284031215611a7a57611a79612085565b5b6000611a888482850161186c565b91505092915050565b611a9a81611e77565b82525050565b611ab1611aac82611e77565b611f96565b82525050565b611ac081611e89565b82525050565b6000611ad182611d5b565b611adb8185611d71565b9350611aeb818560208601611f00565b611af48161208a565b840191505092915050565b611b0881611edf565b82525050565b6000611b1982611d66565b611b238185611d82565b9350611b33818560208601611f00565b611b3c8161208a565b840191505092915050565b611b5081611ec8565b82525050565b611b5f81611ed2565b82525050565b6000611b718284611aa0565b60148201915081905092915050565b6000602082019050611b956000830184611a91565b92915050565b6000606082019050611bb06000830186611a91565b611bbd6020830185611a91565b611bca6040830184611b47565b949350505050565b6000604082019050611be76000830185611a91565b611bf46020830184611b47565b9392505050565b6000602082019050611c106000830184611ab7565b92915050565b60006040820190508181036000830152611c308185611ac6565b9050611c3f6020830184611b47565b9392505050565b60006080820190508181036000830152611c608187611ac6565b9050611c6f6020830186611b47565b611c7c6040830185611b47565b611c896060830184611b47565b95945050505050565b6000602082019050611ca76000830184611aff565b92915050565b60006020820190508181036000830152611cc78184611b0e565b905092915050565b6000602082019050611ce46000830184611b47565b92915050565b6000602082019050611cff6000830184611b56565b92915050565b6000611d0f611d20565b9050611d1b8282611f65565b919050565b6000604051905090565b600067ffffffffffffffff821115611d4557611d44612047565b5b611d4e8261208a565b9050602081019050919050565b600081519050919050565b600081519050919050565b600082825260208201905092915050565b600082825260208201905092915050565b6000611d9e82611ec8565b9150611da983611ec8565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff03821115611dde57611ddd611fba565b5b828201905092915050565b6000611df482611ec8565b9150611dff83611ec8565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615611e3857611e37611fba565b5b828202905092915050565b6000611e4e82611ec8565b9150611e5983611ec8565b925082821015611e6c57611e6b611fba565b5b828203905092915050565b6000611e8282611ea8565b9050919050565b60008115159050919050565b6000819050611ea3826120a8565b919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b6000611eea82611e95565b9050919050565b82818337600083830152505050565b60005b83811015611f1e578082015181840152602081019050611f03565b83811115611f2d576000848401525b50505050565b60006002820490506001821680611f4b57607f821691505b60208210811415611f5f57611f5e612018565b5b50919050565b611f6e8261208a565b810181811067ffffffffffffffff82111715611f8d57611f8c612047565b5b80604052505050565b6000611fa182611fa8565b9050919050565b6000611fb38261209b565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b60008160601b9050919050565b600381106120b9576120b8611fe9565b5b50565b6120c581611e77565b81146120d057600080fd5b50565b6120dc81611e89565b81146120e757600080fd5b50565b6120f381611ec8565b81146120fe57600080fd5b5056fea264697066735822122085b4c6eb609c2ec9eedeef1680fa0db3223e3761749585aa8f078d9f9c25dbfd64736f6c63430008070033", +} + +// ZRC20NewABI is the input ABI used to generate the binding from. +// Deprecated: Use ZRC20NewMetaData.ABI instead. +var ZRC20NewABI = ZRC20NewMetaData.ABI + +// ZRC20NewBin is the compiled bytecode used for deploying new contracts. +// Deprecated: Use ZRC20NewMetaData.Bin instead. +var ZRC20NewBin = ZRC20NewMetaData.Bin + +// DeployZRC20New deploys a new Ethereum contract, binding an instance of ZRC20New to it. +func DeployZRC20New(auth *bind.TransactOpts, backend bind.ContractBackend, name_ string, symbol_ string, decimals_ uint8, chainid_ *big.Int, coinType_ uint8, gasLimit_ *big.Int, systemContractAddress_ common.Address, gatewayContractAddress_ common.Address) (common.Address, *types.Transaction, *ZRC20New, error) { + parsed, err := ZRC20NewMetaData.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(ZRC20NewBin), backend, name_, symbol_, decimals_, chainid_, coinType_, gasLimit_, systemContractAddress_, gatewayContractAddress_) + if err != nil { + return common.Address{}, nil, nil, err + } + return address, tx, &ZRC20New{ZRC20NewCaller: ZRC20NewCaller{contract: contract}, ZRC20NewTransactor: ZRC20NewTransactor{contract: contract}, ZRC20NewFilterer: ZRC20NewFilterer{contract: contract}}, nil +} + +// ZRC20New is an auto generated Go binding around an Ethereum contract. +type ZRC20New struct { + ZRC20NewCaller // Read-only binding to the contract + ZRC20NewTransactor // Write-only binding to the contract + ZRC20NewFilterer // Log filterer for contract events +} + +// ZRC20NewCaller is an auto generated read-only Go binding around an Ethereum contract. +type ZRC20NewCaller struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// ZRC20NewTransactor is an auto generated write-only Go binding around an Ethereum contract. +type ZRC20NewTransactor struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// ZRC20NewFilterer is an auto generated log filtering Go binding around an Ethereum contract events. +type ZRC20NewFilterer struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// ZRC20NewSession is an auto generated Go binding around an Ethereum contract, +// with pre-set call and transact options. +type ZRC20NewSession struct { + Contract *ZRC20New // 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 +} + +// ZRC20NewCallerSession is an auto generated read-only Go binding around an Ethereum contract, +// with pre-set call options. +type ZRC20NewCallerSession struct { + Contract *ZRC20NewCaller // Generic contract caller binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session +} + +// ZRC20NewTransactorSession is an auto generated write-only Go binding around an Ethereum contract, +// with pre-set transact options. +type ZRC20NewTransactorSession struct { + Contract *ZRC20NewTransactor // Generic contract transactor binding to set the session for + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// ZRC20NewRaw is an auto generated low-level Go binding around an Ethereum contract. +type ZRC20NewRaw struct { + Contract *ZRC20New // Generic contract binding to access the raw methods on +} + +// ZRC20NewCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. +type ZRC20NewCallerRaw struct { + Contract *ZRC20NewCaller // Generic read-only contract binding to access the raw methods on +} + +// ZRC20NewTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. +type ZRC20NewTransactorRaw struct { + Contract *ZRC20NewTransactor // Generic write-only contract binding to access the raw methods on +} + +// NewZRC20New creates a new instance of ZRC20New, bound to a specific deployed contract. +func NewZRC20New(address common.Address, backend bind.ContractBackend) (*ZRC20New, error) { + contract, err := bindZRC20New(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &ZRC20New{ZRC20NewCaller: ZRC20NewCaller{contract: contract}, ZRC20NewTransactor: ZRC20NewTransactor{contract: contract}, ZRC20NewFilterer: ZRC20NewFilterer{contract: contract}}, nil +} + +// NewZRC20NewCaller creates a new read-only instance of ZRC20New, bound to a specific deployed contract. +func NewZRC20NewCaller(address common.Address, caller bind.ContractCaller) (*ZRC20NewCaller, error) { + contract, err := bindZRC20New(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &ZRC20NewCaller{contract: contract}, nil +} + +// NewZRC20NewTransactor creates a new write-only instance of ZRC20New, bound to a specific deployed contract. +func NewZRC20NewTransactor(address common.Address, transactor bind.ContractTransactor) (*ZRC20NewTransactor, error) { + contract, err := bindZRC20New(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &ZRC20NewTransactor{contract: contract}, nil +} + +// NewZRC20NewFilterer creates a new log filterer instance of ZRC20New, bound to a specific deployed contract. +func NewZRC20NewFilterer(address common.Address, filterer bind.ContractFilterer) (*ZRC20NewFilterer, error) { + contract, err := bindZRC20New(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &ZRC20NewFilterer{contract: contract}, nil +} + +// bindZRC20New binds a generic wrapper to an already deployed contract. +func bindZRC20New(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := ZRC20NewMetaData.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 (_ZRC20New *ZRC20NewRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _ZRC20New.Contract.ZRC20NewCaller.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 (_ZRC20New *ZRC20NewRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _ZRC20New.Contract.ZRC20NewTransactor.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_ZRC20New *ZRC20NewRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _ZRC20New.Contract.ZRC20NewTransactor.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 (_ZRC20New *ZRC20NewCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _ZRC20New.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 (_ZRC20New *ZRC20NewTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _ZRC20New.Contract.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_ZRC20New *ZRC20NewTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _ZRC20New.Contract.contract.Transact(opts, method, params...) +} + +// CHAINID is a free data retrieval call binding the contract method 0x85e1f4d0. +// +// Solidity: function CHAIN_ID() view returns(uint256) +func (_ZRC20New *ZRC20NewCaller) CHAINID(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _ZRC20New.contract.Call(opts, &out, "CHAIN_ID") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// CHAINID is a free data retrieval call binding the contract method 0x85e1f4d0. +// +// Solidity: function CHAIN_ID() view returns(uint256) +func (_ZRC20New *ZRC20NewSession) CHAINID() (*big.Int, error) { + return _ZRC20New.Contract.CHAINID(&_ZRC20New.CallOpts) +} + +// CHAINID is a free data retrieval call binding the contract method 0x85e1f4d0. +// +// Solidity: function CHAIN_ID() view returns(uint256) +func (_ZRC20New *ZRC20NewCallerSession) CHAINID() (*big.Int, error) { + return _ZRC20New.Contract.CHAINID(&_ZRC20New.CallOpts) +} + +// COINTYPE is a free data retrieval call binding the contract method 0xa3413d03. +// +// Solidity: function COIN_TYPE() view returns(uint8) +func (_ZRC20New *ZRC20NewCaller) COINTYPE(opts *bind.CallOpts) (uint8, error) { + var out []interface{} + err := _ZRC20New.contract.Call(opts, &out, "COIN_TYPE") + + if err != nil { + return *new(uint8), err + } + + out0 := *abi.ConvertType(out[0], new(uint8)).(*uint8) + + return out0, err + +} + +// COINTYPE is a free data retrieval call binding the contract method 0xa3413d03. +// +// Solidity: function COIN_TYPE() view returns(uint8) +func (_ZRC20New *ZRC20NewSession) COINTYPE() (uint8, error) { + return _ZRC20New.Contract.COINTYPE(&_ZRC20New.CallOpts) +} + +// COINTYPE is a free data retrieval call binding the contract method 0xa3413d03. +// +// Solidity: function COIN_TYPE() view returns(uint8) +func (_ZRC20New *ZRC20NewCallerSession) COINTYPE() (uint8, error) { + return _ZRC20New.Contract.COINTYPE(&_ZRC20New.CallOpts) +} + +// FUNGIBLEMODULEADDRESS is a free data retrieval call binding the contract method 0x3ce4a5bc. +// +// Solidity: function FUNGIBLE_MODULE_ADDRESS() view returns(address) +func (_ZRC20New *ZRC20NewCaller) FUNGIBLEMODULEADDRESS(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _ZRC20New.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 (_ZRC20New *ZRC20NewSession) FUNGIBLEMODULEADDRESS() (common.Address, error) { + return _ZRC20New.Contract.FUNGIBLEMODULEADDRESS(&_ZRC20New.CallOpts) +} + +// FUNGIBLEMODULEADDRESS is a free data retrieval call binding the contract method 0x3ce4a5bc. +// +// Solidity: function FUNGIBLE_MODULE_ADDRESS() view returns(address) +func (_ZRC20New *ZRC20NewCallerSession) FUNGIBLEMODULEADDRESS() (common.Address, error) { + return _ZRC20New.Contract.FUNGIBLEMODULEADDRESS(&_ZRC20New.CallOpts) +} + +// GASLIMIT is a free data retrieval call binding the contract method 0x091d2788. +// +// Solidity: function GAS_LIMIT() view returns(uint256) +func (_ZRC20New *ZRC20NewCaller) GASLIMIT(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _ZRC20New.contract.Call(opts, &out, "GAS_LIMIT") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// GASLIMIT is a free data retrieval call binding the contract method 0x091d2788. +// +// Solidity: function GAS_LIMIT() view returns(uint256) +func (_ZRC20New *ZRC20NewSession) GASLIMIT() (*big.Int, error) { + return _ZRC20New.Contract.GASLIMIT(&_ZRC20New.CallOpts) +} + +// GASLIMIT is a free data retrieval call binding the contract method 0x091d2788. +// +// Solidity: function GAS_LIMIT() view returns(uint256) +func (_ZRC20New *ZRC20NewCallerSession) GASLIMIT() (*big.Int, error) { + return _ZRC20New.Contract.GASLIMIT(&_ZRC20New.CallOpts) +} + +// GATEWAYCONTRACTADDRESS is a free data retrieval call binding the contract method 0xe2f535b8. +// +// Solidity: function GATEWAY_CONTRACT_ADDRESS() view returns(address) +func (_ZRC20New *ZRC20NewCaller) GATEWAYCONTRACTADDRESS(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _ZRC20New.contract.Call(opts, &out, "GATEWAY_CONTRACT_ADDRESS") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// GATEWAYCONTRACTADDRESS is a free data retrieval call binding the contract method 0xe2f535b8. +// +// Solidity: function GATEWAY_CONTRACT_ADDRESS() view returns(address) +func (_ZRC20New *ZRC20NewSession) GATEWAYCONTRACTADDRESS() (common.Address, error) { + return _ZRC20New.Contract.GATEWAYCONTRACTADDRESS(&_ZRC20New.CallOpts) +} + +// GATEWAYCONTRACTADDRESS is a free data retrieval call binding the contract method 0xe2f535b8. +// +// Solidity: function GATEWAY_CONTRACT_ADDRESS() view returns(address) +func (_ZRC20New *ZRC20NewCallerSession) GATEWAYCONTRACTADDRESS() (common.Address, error) { + return _ZRC20New.Contract.GATEWAYCONTRACTADDRESS(&_ZRC20New.CallOpts) +} + +// PROTOCOLFLATFEE is a free data retrieval call binding the contract method 0x4d8943bb. +// +// Solidity: function PROTOCOL_FLAT_FEE() view returns(uint256) +func (_ZRC20New *ZRC20NewCaller) PROTOCOLFLATFEE(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _ZRC20New.contract.Call(opts, &out, "PROTOCOL_FLAT_FEE") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// PROTOCOLFLATFEE is a free data retrieval call binding the contract method 0x4d8943bb. +// +// Solidity: function PROTOCOL_FLAT_FEE() view returns(uint256) +func (_ZRC20New *ZRC20NewSession) PROTOCOLFLATFEE() (*big.Int, error) { + return _ZRC20New.Contract.PROTOCOLFLATFEE(&_ZRC20New.CallOpts) +} + +// PROTOCOLFLATFEE is a free data retrieval call binding the contract method 0x4d8943bb. +// +// Solidity: function PROTOCOL_FLAT_FEE() view returns(uint256) +func (_ZRC20New *ZRC20NewCallerSession) PROTOCOLFLATFEE() (*big.Int, error) { + return _ZRC20New.Contract.PROTOCOLFLATFEE(&_ZRC20New.CallOpts) +} + +// SYSTEMCONTRACTADDRESS is a free data retrieval call binding the contract method 0xf2441b32. +// +// Solidity: function SYSTEM_CONTRACT_ADDRESS() view returns(address) +func (_ZRC20New *ZRC20NewCaller) SYSTEMCONTRACTADDRESS(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _ZRC20New.contract.Call(opts, &out, "SYSTEM_CONTRACT_ADDRESS") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// SYSTEMCONTRACTADDRESS is a free data retrieval call binding the contract method 0xf2441b32. +// +// Solidity: function SYSTEM_CONTRACT_ADDRESS() view returns(address) +func (_ZRC20New *ZRC20NewSession) SYSTEMCONTRACTADDRESS() (common.Address, error) { + return _ZRC20New.Contract.SYSTEMCONTRACTADDRESS(&_ZRC20New.CallOpts) +} + +// SYSTEMCONTRACTADDRESS is a free data retrieval call binding the contract method 0xf2441b32. +// +// Solidity: function SYSTEM_CONTRACT_ADDRESS() view returns(address) +func (_ZRC20New *ZRC20NewCallerSession) SYSTEMCONTRACTADDRESS() (common.Address, error) { + return _ZRC20New.Contract.SYSTEMCONTRACTADDRESS(&_ZRC20New.CallOpts) +} + +// Allowance is a free data retrieval call binding the contract method 0xdd62ed3e. +// +// Solidity: function allowance(address owner, address spender) view returns(uint256) +func (_ZRC20New *ZRC20NewCaller) Allowance(opts *bind.CallOpts, owner common.Address, spender common.Address) (*big.Int, error) { + var out []interface{} + err := _ZRC20New.contract.Call(opts, &out, "allowance", owner, spender) + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// Allowance is a free data retrieval call binding the contract method 0xdd62ed3e. +// +// Solidity: function allowance(address owner, address spender) view returns(uint256) +func (_ZRC20New *ZRC20NewSession) Allowance(owner common.Address, spender common.Address) (*big.Int, error) { + return _ZRC20New.Contract.Allowance(&_ZRC20New.CallOpts, owner, spender) +} + +// Allowance is a free data retrieval call binding the contract method 0xdd62ed3e. +// +// Solidity: function allowance(address owner, address spender) view returns(uint256) +func (_ZRC20New *ZRC20NewCallerSession) Allowance(owner common.Address, spender common.Address) (*big.Int, error) { + return _ZRC20New.Contract.Allowance(&_ZRC20New.CallOpts, owner, spender) +} + +// BalanceOf is a free data retrieval call binding the contract method 0x70a08231. +// +// Solidity: function balanceOf(address account) view returns(uint256) +func (_ZRC20New *ZRC20NewCaller) BalanceOf(opts *bind.CallOpts, account common.Address) (*big.Int, error) { + var out []interface{} + err := _ZRC20New.contract.Call(opts, &out, "balanceOf", account) + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// BalanceOf is a free data retrieval call binding the contract method 0x70a08231. +// +// Solidity: function balanceOf(address account) view returns(uint256) +func (_ZRC20New *ZRC20NewSession) BalanceOf(account common.Address) (*big.Int, error) { + return _ZRC20New.Contract.BalanceOf(&_ZRC20New.CallOpts, account) +} + +// BalanceOf is a free data retrieval call binding the contract method 0x70a08231. +// +// Solidity: function balanceOf(address account) view returns(uint256) +func (_ZRC20New *ZRC20NewCallerSession) BalanceOf(account common.Address) (*big.Int, error) { + return _ZRC20New.Contract.BalanceOf(&_ZRC20New.CallOpts, account) +} + +// Decimals is a free data retrieval call binding the contract method 0x313ce567. +// +// Solidity: function decimals() view returns(uint8) +func (_ZRC20New *ZRC20NewCaller) Decimals(opts *bind.CallOpts) (uint8, error) { + var out []interface{} + err := _ZRC20New.contract.Call(opts, &out, "decimals") + + if err != nil { + return *new(uint8), err + } + + out0 := *abi.ConvertType(out[0], new(uint8)).(*uint8) + + return out0, err + +} + +// Decimals is a free data retrieval call binding the contract method 0x313ce567. +// +// Solidity: function decimals() view returns(uint8) +func (_ZRC20New *ZRC20NewSession) Decimals() (uint8, error) { + return _ZRC20New.Contract.Decimals(&_ZRC20New.CallOpts) +} + +// Decimals is a free data retrieval call binding the contract method 0x313ce567. +// +// Solidity: function decimals() view returns(uint8) +func (_ZRC20New *ZRC20NewCallerSession) Decimals() (uint8, error) { + return _ZRC20New.Contract.Decimals(&_ZRC20New.CallOpts) +} + +// Name is a free data retrieval call binding the contract method 0x06fdde03. +// +// Solidity: function name() view returns(string) +func (_ZRC20New *ZRC20NewCaller) Name(opts *bind.CallOpts) (string, error) { + var out []interface{} + err := _ZRC20New.contract.Call(opts, &out, "name") + + if err != nil { + return *new(string), err + } + + out0 := *abi.ConvertType(out[0], new(string)).(*string) + + return out0, err + +} + +// Name is a free data retrieval call binding the contract method 0x06fdde03. +// +// Solidity: function name() view returns(string) +func (_ZRC20New *ZRC20NewSession) Name() (string, error) { + return _ZRC20New.Contract.Name(&_ZRC20New.CallOpts) +} + +// Name is a free data retrieval call binding the contract method 0x06fdde03. +// +// Solidity: function name() view returns(string) +func (_ZRC20New *ZRC20NewCallerSession) Name() (string, error) { + return _ZRC20New.Contract.Name(&_ZRC20New.CallOpts) +} + +// Symbol is a free data retrieval call binding the contract method 0x95d89b41. +// +// Solidity: function symbol() view returns(string) +func (_ZRC20New *ZRC20NewCaller) Symbol(opts *bind.CallOpts) (string, error) { + var out []interface{} + err := _ZRC20New.contract.Call(opts, &out, "symbol") + + if err != nil { + return *new(string), err + } + + out0 := *abi.ConvertType(out[0], new(string)).(*string) + + return out0, err + +} + +// Symbol is a free data retrieval call binding the contract method 0x95d89b41. +// +// Solidity: function symbol() view returns(string) +func (_ZRC20New *ZRC20NewSession) Symbol() (string, error) { + return _ZRC20New.Contract.Symbol(&_ZRC20New.CallOpts) +} + +// Symbol is a free data retrieval call binding the contract method 0x95d89b41. +// +// Solidity: function symbol() view returns(string) +func (_ZRC20New *ZRC20NewCallerSession) Symbol() (string, error) { + return _ZRC20New.Contract.Symbol(&_ZRC20New.CallOpts) +} + +// TotalSupply is a free data retrieval call binding the contract method 0x18160ddd. +// +// Solidity: function totalSupply() view returns(uint256) +func (_ZRC20New *ZRC20NewCaller) TotalSupply(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _ZRC20New.contract.Call(opts, &out, "totalSupply") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// TotalSupply is a free data retrieval call binding the contract method 0x18160ddd. +// +// Solidity: function totalSupply() view returns(uint256) +func (_ZRC20New *ZRC20NewSession) TotalSupply() (*big.Int, error) { + return _ZRC20New.Contract.TotalSupply(&_ZRC20New.CallOpts) +} + +// TotalSupply is a free data retrieval call binding the contract method 0x18160ddd. +// +// Solidity: function totalSupply() view returns(uint256) +func (_ZRC20New *ZRC20NewCallerSession) TotalSupply() (*big.Int, error) { + return _ZRC20New.Contract.TotalSupply(&_ZRC20New.CallOpts) +} + +// WithdrawGasFee is a free data retrieval call binding the contract method 0xd9eeebed. +// +// Solidity: function withdrawGasFee() view returns(address, uint256) +func (_ZRC20New *ZRC20NewCaller) WithdrawGasFee(opts *bind.CallOpts) (common.Address, *big.Int, error) { + var out []interface{} + err := _ZRC20New.contract.Call(opts, &out, "withdrawGasFee") + + if err != nil { + return *new(common.Address), *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + out1 := *abi.ConvertType(out[1], new(*big.Int)).(**big.Int) + + return out0, out1, err + +} + +// WithdrawGasFee is a free data retrieval call binding the contract method 0xd9eeebed. +// +// Solidity: function withdrawGasFee() view returns(address, uint256) +func (_ZRC20New *ZRC20NewSession) WithdrawGasFee() (common.Address, *big.Int, error) { + return _ZRC20New.Contract.WithdrawGasFee(&_ZRC20New.CallOpts) +} + +// WithdrawGasFee is a free data retrieval call binding the contract method 0xd9eeebed. +// +// Solidity: function withdrawGasFee() view returns(address, uint256) +func (_ZRC20New *ZRC20NewCallerSession) WithdrawGasFee() (common.Address, *big.Int, error) { + return _ZRC20New.Contract.WithdrawGasFee(&_ZRC20New.CallOpts) +} + +// Approve is a paid mutator transaction binding the contract method 0x095ea7b3. +// +// Solidity: function approve(address spender, uint256 amount) returns(bool) +func (_ZRC20New *ZRC20NewTransactor) Approve(opts *bind.TransactOpts, spender common.Address, amount *big.Int) (*types.Transaction, error) { + return _ZRC20New.contract.Transact(opts, "approve", spender, amount) +} + +// Approve is a paid mutator transaction binding the contract method 0x095ea7b3. +// +// Solidity: function approve(address spender, uint256 amount) returns(bool) +func (_ZRC20New *ZRC20NewSession) Approve(spender common.Address, amount *big.Int) (*types.Transaction, error) { + return _ZRC20New.Contract.Approve(&_ZRC20New.TransactOpts, spender, amount) +} + +// Approve is a paid mutator transaction binding the contract method 0x095ea7b3. +// +// Solidity: function approve(address spender, uint256 amount) returns(bool) +func (_ZRC20New *ZRC20NewTransactorSession) Approve(spender common.Address, amount *big.Int) (*types.Transaction, error) { + return _ZRC20New.Contract.Approve(&_ZRC20New.TransactOpts, spender, amount) +} + +// Burn is a paid mutator transaction binding the contract method 0x42966c68. +// +// Solidity: function burn(uint256 amount) returns(bool) +func (_ZRC20New *ZRC20NewTransactor) Burn(opts *bind.TransactOpts, amount *big.Int) (*types.Transaction, error) { + return _ZRC20New.contract.Transact(opts, "burn", amount) +} + +// Burn is a paid mutator transaction binding the contract method 0x42966c68. +// +// Solidity: function burn(uint256 amount) returns(bool) +func (_ZRC20New *ZRC20NewSession) Burn(amount *big.Int) (*types.Transaction, error) { + return _ZRC20New.Contract.Burn(&_ZRC20New.TransactOpts, amount) +} + +// Burn is a paid mutator transaction binding the contract method 0x42966c68. +// +// Solidity: function burn(uint256 amount) returns(bool) +func (_ZRC20New *ZRC20NewTransactorSession) Burn(amount *big.Int) (*types.Transaction, error) { + return _ZRC20New.Contract.Burn(&_ZRC20New.TransactOpts, amount) +} + +// Deposit is a paid mutator transaction binding the contract method 0x47e7ef24. +// +// Solidity: function deposit(address to, uint256 amount) returns(bool) +func (_ZRC20New *ZRC20NewTransactor) Deposit(opts *bind.TransactOpts, to common.Address, amount *big.Int) (*types.Transaction, error) { + return _ZRC20New.contract.Transact(opts, "deposit", to, amount) +} + +// Deposit is a paid mutator transaction binding the contract method 0x47e7ef24. +// +// Solidity: function deposit(address to, uint256 amount) returns(bool) +func (_ZRC20New *ZRC20NewSession) Deposit(to common.Address, amount *big.Int) (*types.Transaction, error) { + return _ZRC20New.Contract.Deposit(&_ZRC20New.TransactOpts, to, amount) +} + +// Deposit is a paid mutator transaction binding the contract method 0x47e7ef24. +// +// Solidity: function deposit(address to, uint256 amount) returns(bool) +func (_ZRC20New *ZRC20NewTransactorSession) Deposit(to common.Address, amount *big.Int) (*types.Transaction, error) { + return _ZRC20New.Contract.Deposit(&_ZRC20New.TransactOpts, to, amount) +} + +// Transfer is a paid mutator transaction binding the contract method 0xa9059cbb. +// +// Solidity: function transfer(address recipient, uint256 amount) returns(bool) +func (_ZRC20New *ZRC20NewTransactor) Transfer(opts *bind.TransactOpts, recipient common.Address, amount *big.Int) (*types.Transaction, error) { + return _ZRC20New.contract.Transact(opts, "transfer", recipient, amount) +} + +// Transfer is a paid mutator transaction binding the contract method 0xa9059cbb. +// +// Solidity: function transfer(address recipient, uint256 amount) returns(bool) +func (_ZRC20New *ZRC20NewSession) Transfer(recipient common.Address, amount *big.Int) (*types.Transaction, error) { + return _ZRC20New.Contract.Transfer(&_ZRC20New.TransactOpts, recipient, amount) +} + +// Transfer is a paid mutator transaction binding the contract method 0xa9059cbb. +// +// Solidity: function transfer(address recipient, uint256 amount) returns(bool) +func (_ZRC20New *ZRC20NewTransactorSession) Transfer(recipient common.Address, amount *big.Int) (*types.Transaction, error) { + return _ZRC20New.Contract.Transfer(&_ZRC20New.TransactOpts, recipient, amount) +} + +// TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd. +// +// Solidity: function transferFrom(address sender, address recipient, uint256 amount) returns(bool) +func (_ZRC20New *ZRC20NewTransactor) TransferFrom(opts *bind.TransactOpts, sender common.Address, recipient common.Address, amount *big.Int) (*types.Transaction, error) { + return _ZRC20New.contract.Transact(opts, "transferFrom", sender, recipient, amount) +} + +// TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd. +// +// Solidity: function transferFrom(address sender, address recipient, uint256 amount) returns(bool) +func (_ZRC20New *ZRC20NewSession) TransferFrom(sender common.Address, recipient common.Address, amount *big.Int) (*types.Transaction, error) { + return _ZRC20New.Contract.TransferFrom(&_ZRC20New.TransactOpts, sender, recipient, amount) +} + +// TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd. +// +// Solidity: function transferFrom(address sender, address recipient, uint256 amount) returns(bool) +func (_ZRC20New *ZRC20NewTransactorSession) TransferFrom(sender common.Address, recipient common.Address, amount *big.Int) (*types.Transaction, error) { + return _ZRC20New.Contract.TransferFrom(&_ZRC20New.TransactOpts, sender, recipient, amount) +} + +// UpdateGasLimit is a paid mutator transaction binding the contract method 0xf687d12a. +// +// Solidity: function updateGasLimit(uint256 gasLimit) returns() +func (_ZRC20New *ZRC20NewTransactor) UpdateGasLimit(opts *bind.TransactOpts, gasLimit *big.Int) (*types.Transaction, error) { + return _ZRC20New.contract.Transact(opts, "updateGasLimit", gasLimit) +} + +// UpdateGasLimit is a paid mutator transaction binding the contract method 0xf687d12a. +// +// Solidity: function updateGasLimit(uint256 gasLimit) returns() +func (_ZRC20New *ZRC20NewSession) UpdateGasLimit(gasLimit *big.Int) (*types.Transaction, error) { + return _ZRC20New.Contract.UpdateGasLimit(&_ZRC20New.TransactOpts, gasLimit) +} + +// UpdateGasLimit is a paid mutator transaction binding the contract method 0xf687d12a. +// +// Solidity: function updateGasLimit(uint256 gasLimit) returns() +func (_ZRC20New *ZRC20NewTransactorSession) UpdateGasLimit(gasLimit *big.Int) (*types.Transaction, error) { + return _ZRC20New.Contract.UpdateGasLimit(&_ZRC20New.TransactOpts, gasLimit) +} + +// UpdateProtocolFlatFee is a paid mutator transaction binding the contract method 0xeddeb123. +// +// Solidity: function updateProtocolFlatFee(uint256 protocolFlatFee) returns() +func (_ZRC20New *ZRC20NewTransactor) UpdateProtocolFlatFee(opts *bind.TransactOpts, protocolFlatFee *big.Int) (*types.Transaction, error) { + return _ZRC20New.contract.Transact(opts, "updateProtocolFlatFee", protocolFlatFee) +} + +// UpdateProtocolFlatFee is a paid mutator transaction binding the contract method 0xeddeb123. +// +// Solidity: function updateProtocolFlatFee(uint256 protocolFlatFee) returns() +func (_ZRC20New *ZRC20NewSession) UpdateProtocolFlatFee(protocolFlatFee *big.Int) (*types.Transaction, error) { + return _ZRC20New.Contract.UpdateProtocolFlatFee(&_ZRC20New.TransactOpts, protocolFlatFee) +} + +// UpdateProtocolFlatFee is a paid mutator transaction binding the contract method 0xeddeb123. +// +// Solidity: function updateProtocolFlatFee(uint256 protocolFlatFee) returns() +func (_ZRC20New *ZRC20NewTransactorSession) UpdateProtocolFlatFee(protocolFlatFee *big.Int) (*types.Transaction, error) { + return _ZRC20New.Contract.UpdateProtocolFlatFee(&_ZRC20New.TransactOpts, protocolFlatFee) +} + +// UpdateSystemContractAddress is a paid mutator transaction binding the contract method 0xc835d7cc. +// +// Solidity: function updateSystemContractAddress(address addr) returns() +func (_ZRC20New *ZRC20NewTransactor) UpdateSystemContractAddress(opts *bind.TransactOpts, addr common.Address) (*types.Transaction, error) { + return _ZRC20New.contract.Transact(opts, "updateSystemContractAddress", addr) +} + +// UpdateSystemContractAddress is a paid mutator transaction binding the contract method 0xc835d7cc. +// +// Solidity: function updateSystemContractAddress(address addr) returns() +func (_ZRC20New *ZRC20NewSession) UpdateSystemContractAddress(addr common.Address) (*types.Transaction, error) { + return _ZRC20New.Contract.UpdateSystemContractAddress(&_ZRC20New.TransactOpts, addr) +} + +// UpdateSystemContractAddress is a paid mutator transaction binding the contract method 0xc835d7cc. +// +// Solidity: function updateSystemContractAddress(address addr) returns() +func (_ZRC20New *ZRC20NewTransactorSession) UpdateSystemContractAddress(addr common.Address) (*types.Transaction, error) { + return _ZRC20New.Contract.UpdateSystemContractAddress(&_ZRC20New.TransactOpts, addr) +} + +// Withdraw is a paid mutator transaction binding the contract method 0xc7012626. +// +// Solidity: function withdraw(bytes to, uint256 amount) returns(bool) +func (_ZRC20New *ZRC20NewTransactor) Withdraw(opts *bind.TransactOpts, to []byte, amount *big.Int) (*types.Transaction, error) { + return _ZRC20New.contract.Transact(opts, "withdraw", to, amount) +} + +// Withdraw is a paid mutator transaction binding the contract method 0xc7012626. +// +// Solidity: function withdraw(bytes to, uint256 amount) returns(bool) +func (_ZRC20New *ZRC20NewSession) Withdraw(to []byte, amount *big.Int) (*types.Transaction, error) { + return _ZRC20New.Contract.Withdraw(&_ZRC20New.TransactOpts, to, amount) +} + +// Withdraw is a paid mutator transaction binding the contract method 0xc7012626. +// +// Solidity: function withdraw(bytes to, uint256 amount) returns(bool) +func (_ZRC20New *ZRC20NewTransactorSession) Withdraw(to []byte, amount *big.Int) (*types.Transaction, error) { + return _ZRC20New.Contract.Withdraw(&_ZRC20New.TransactOpts, to, amount) +} + +// ZRC20NewApprovalIterator is returned from FilterApproval and is used to iterate over the raw logs and unpacked data for Approval events raised by the ZRC20New contract. +type ZRC20NewApprovalIterator struct { + Event *ZRC20NewApproval // 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 *ZRC20NewApprovalIterator) 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(ZRC20NewApproval) + 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(ZRC20NewApproval) + 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 *ZRC20NewApprovalIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *ZRC20NewApprovalIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// ZRC20NewApproval represents a Approval event raised by the ZRC20New contract. +type ZRC20NewApproval struct { + Owner common.Address + Spender common.Address + Value *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterApproval is a free log retrieval operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925. +// +// Solidity: event Approval(address indexed owner, address indexed spender, uint256 value) +func (_ZRC20New *ZRC20NewFilterer) FilterApproval(opts *bind.FilterOpts, owner []common.Address, spender []common.Address) (*ZRC20NewApprovalIterator, error) { + + var ownerRule []interface{} + for _, ownerItem := range owner { + ownerRule = append(ownerRule, ownerItem) + } + var spenderRule []interface{} + for _, spenderItem := range spender { + spenderRule = append(spenderRule, spenderItem) + } + + logs, sub, err := _ZRC20New.contract.FilterLogs(opts, "Approval", ownerRule, spenderRule) + if err != nil { + return nil, err + } + return &ZRC20NewApprovalIterator{contract: _ZRC20New.contract, event: "Approval", logs: logs, sub: sub}, nil +} + +// WatchApproval is a free log subscription operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925. +// +// Solidity: event Approval(address indexed owner, address indexed spender, uint256 value) +func (_ZRC20New *ZRC20NewFilterer) WatchApproval(opts *bind.WatchOpts, sink chan<- *ZRC20NewApproval, owner []common.Address, spender []common.Address) (event.Subscription, error) { + + var ownerRule []interface{} + for _, ownerItem := range owner { + ownerRule = append(ownerRule, ownerItem) + } + var spenderRule []interface{} + for _, spenderItem := range spender { + spenderRule = append(spenderRule, spenderItem) + } + + logs, sub, err := _ZRC20New.contract.WatchLogs(opts, "Approval", ownerRule, spenderRule) + 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(ZRC20NewApproval) + if err := _ZRC20New.contract.UnpackLog(event, "Approval", 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 +} + +// ParseApproval is a log parse operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925. +// +// Solidity: event Approval(address indexed owner, address indexed spender, uint256 value) +func (_ZRC20New *ZRC20NewFilterer) ParseApproval(log types.Log) (*ZRC20NewApproval, error) { + event := new(ZRC20NewApproval) + if err := _ZRC20New.contract.UnpackLog(event, "Approval", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// ZRC20NewDepositIterator is returned from FilterDeposit and is used to iterate over the raw logs and unpacked data for Deposit events raised by the ZRC20New contract. +type ZRC20NewDepositIterator struct { + Event *ZRC20NewDeposit // 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 *ZRC20NewDepositIterator) 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(ZRC20NewDeposit) + 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(ZRC20NewDeposit) + 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 *ZRC20NewDepositIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *ZRC20NewDepositIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// ZRC20NewDeposit represents a Deposit event raised by the ZRC20New contract. +type ZRC20NewDeposit struct { + From []byte + To common.Address + Value *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterDeposit is a free log retrieval operation binding the contract event 0x67fc7bdaed5b0ec550d8706b87d60568ab70c6b781263c70101d54cd1564aab3. +// +// Solidity: event Deposit(bytes from, address indexed to, uint256 value) +func (_ZRC20New *ZRC20NewFilterer) FilterDeposit(opts *bind.FilterOpts, to []common.Address) (*ZRC20NewDepositIterator, error) { + + var toRule []interface{} + for _, toItem := range to { + toRule = append(toRule, toItem) + } + + logs, sub, err := _ZRC20New.contract.FilterLogs(opts, "Deposit", toRule) + if err != nil { + return nil, err + } + return &ZRC20NewDepositIterator{contract: _ZRC20New.contract, event: "Deposit", logs: logs, sub: sub}, nil +} + +// WatchDeposit is a free log subscription operation binding the contract event 0x67fc7bdaed5b0ec550d8706b87d60568ab70c6b781263c70101d54cd1564aab3. +// +// Solidity: event Deposit(bytes from, address indexed to, uint256 value) +func (_ZRC20New *ZRC20NewFilterer) WatchDeposit(opts *bind.WatchOpts, sink chan<- *ZRC20NewDeposit, to []common.Address) (event.Subscription, error) { + + var toRule []interface{} + for _, toItem := range to { + toRule = append(toRule, toItem) + } + + logs, sub, err := _ZRC20New.contract.WatchLogs(opts, "Deposit", toRule) + 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(ZRC20NewDeposit) + if err := _ZRC20New.contract.UnpackLog(event, "Deposit", 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 +} + +// ParseDeposit is a log parse operation binding the contract event 0x67fc7bdaed5b0ec550d8706b87d60568ab70c6b781263c70101d54cd1564aab3. +// +// Solidity: event Deposit(bytes from, address indexed to, uint256 value) +func (_ZRC20New *ZRC20NewFilterer) ParseDeposit(log types.Log) (*ZRC20NewDeposit, error) { + event := new(ZRC20NewDeposit) + if err := _ZRC20New.contract.UnpackLog(event, "Deposit", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// ZRC20NewTransferIterator is returned from FilterTransfer and is used to iterate over the raw logs and unpacked data for Transfer events raised by the ZRC20New contract. +type ZRC20NewTransferIterator struct { + Event *ZRC20NewTransfer // 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 *ZRC20NewTransferIterator) 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(ZRC20NewTransfer) + 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(ZRC20NewTransfer) + 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 *ZRC20NewTransferIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *ZRC20NewTransferIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// ZRC20NewTransfer represents a Transfer event raised by the ZRC20New contract. +type ZRC20NewTransfer struct { + From common.Address + To common.Address + Value *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterTransfer is a free log retrieval operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef. +// +// Solidity: event Transfer(address indexed from, address indexed to, uint256 value) +func (_ZRC20New *ZRC20NewFilterer) FilterTransfer(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*ZRC20NewTransferIterator, error) { + + var fromRule []interface{} + for _, fromItem := range from { + fromRule = append(fromRule, fromItem) + } + var toRule []interface{} + for _, toItem := range to { + toRule = append(toRule, toItem) + } + + logs, sub, err := _ZRC20New.contract.FilterLogs(opts, "Transfer", fromRule, toRule) + if err != nil { + return nil, err + } + return &ZRC20NewTransferIterator{contract: _ZRC20New.contract, event: "Transfer", logs: logs, sub: sub}, nil +} + +// WatchTransfer is a free log subscription operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef. +// +// Solidity: event Transfer(address indexed from, address indexed to, uint256 value) +func (_ZRC20New *ZRC20NewFilterer) WatchTransfer(opts *bind.WatchOpts, sink chan<- *ZRC20NewTransfer, from []common.Address, to []common.Address) (event.Subscription, error) { + + var fromRule []interface{} + for _, fromItem := range from { + fromRule = append(fromRule, fromItem) + } + var toRule []interface{} + for _, toItem := range to { + toRule = append(toRule, toItem) + } + + logs, sub, err := _ZRC20New.contract.WatchLogs(opts, "Transfer", fromRule, toRule) + 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(ZRC20NewTransfer) + if err := _ZRC20New.contract.UnpackLog(event, "Transfer", 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 +} + +// ParseTransfer is a log parse operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef. +// +// Solidity: event Transfer(address indexed from, address indexed to, uint256 value) +func (_ZRC20New *ZRC20NewFilterer) ParseTransfer(log types.Log) (*ZRC20NewTransfer, error) { + event := new(ZRC20NewTransfer) + if err := _ZRC20New.contract.UnpackLog(event, "Transfer", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// ZRC20NewUpdatedGasLimitIterator is returned from FilterUpdatedGasLimit and is used to iterate over the raw logs and unpacked data for UpdatedGasLimit events raised by the ZRC20New contract. +type ZRC20NewUpdatedGasLimitIterator struct { + Event *ZRC20NewUpdatedGasLimit // 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 *ZRC20NewUpdatedGasLimitIterator) 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(ZRC20NewUpdatedGasLimit) + 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(ZRC20NewUpdatedGasLimit) + 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 *ZRC20NewUpdatedGasLimitIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *ZRC20NewUpdatedGasLimitIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// ZRC20NewUpdatedGasLimit represents a UpdatedGasLimit event raised by the ZRC20New contract. +type ZRC20NewUpdatedGasLimit struct { + GasLimit *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterUpdatedGasLimit is a free log retrieval operation binding the contract event 0xff5788270f43bfc1ca41c503606d2594aa3023a1a7547de403a3e2f146a4a80a. +// +// Solidity: event UpdatedGasLimit(uint256 gasLimit) +func (_ZRC20New *ZRC20NewFilterer) FilterUpdatedGasLimit(opts *bind.FilterOpts) (*ZRC20NewUpdatedGasLimitIterator, error) { + + logs, sub, err := _ZRC20New.contract.FilterLogs(opts, "UpdatedGasLimit") + if err != nil { + return nil, err + } + return &ZRC20NewUpdatedGasLimitIterator{contract: _ZRC20New.contract, event: "UpdatedGasLimit", logs: logs, sub: sub}, nil +} + +// WatchUpdatedGasLimit is a free log subscription operation binding the contract event 0xff5788270f43bfc1ca41c503606d2594aa3023a1a7547de403a3e2f146a4a80a. +// +// Solidity: event UpdatedGasLimit(uint256 gasLimit) +func (_ZRC20New *ZRC20NewFilterer) WatchUpdatedGasLimit(opts *bind.WatchOpts, sink chan<- *ZRC20NewUpdatedGasLimit) (event.Subscription, error) { + + logs, sub, err := _ZRC20New.contract.WatchLogs(opts, "UpdatedGasLimit") + 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(ZRC20NewUpdatedGasLimit) + if err := _ZRC20New.contract.UnpackLog(event, "UpdatedGasLimit", 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 +} + +// ParseUpdatedGasLimit is a log parse operation binding the contract event 0xff5788270f43bfc1ca41c503606d2594aa3023a1a7547de403a3e2f146a4a80a. +// +// Solidity: event UpdatedGasLimit(uint256 gasLimit) +func (_ZRC20New *ZRC20NewFilterer) ParseUpdatedGasLimit(log types.Log) (*ZRC20NewUpdatedGasLimit, error) { + event := new(ZRC20NewUpdatedGasLimit) + if err := _ZRC20New.contract.UnpackLog(event, "UpdatedGasLimit", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// ZRC20NewUpdatedProtocolFlatFeeIterator is returned from FilterUpdatedProtocolFlatFee and is used to iterate over the raw logs and unpacked data for UpdatedProtocolFlatFee events raised by the ZRC20New contract. +type ZRC20NewUpdatedProtocolFlatFeeIterator struct { + Event *ZRC20NewUpdatedProtocolFlatFee // 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 *ZRC20NewUpdatedProtocolFlatFeeIterator) 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(ZRC20NewUpdatedProtocolFlatFee) + 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(ZRC20NewUpdatedProtocolFlatFee) + 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 *ZRC20NewUpdatedProtocolFlatFeeIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *ZRC20NewUpdatedProtocolFlatFeeIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// ZRC20NewUpdatedProtocolFlatFee represents a UpdatedProtocolFlatFee event raised by the ZRC20New contract. +type ZRC20NewUpdatedProtocolFlatFee struct { + ProtocolFlatFee *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterUpdatedProtocolFlatFee is a free log retrieval operation binding the contract event 0xef13af88e424b5d15f49c77758542c1938b08b8b95b91ed0751f98ba99000d8f. +// +// Solidity: event UpdatedProtocolFlatFee(uint256 protocolFlatFee) +func (_ZRC20New *ZRC20NewFilterer) FilterUpdatedProtocolFlatFee(opts *bind.FilterOpts) (*ZRC20NewUpdatedProtocolFlatFeeIterator, error) { + + logs, sub, err := _ZRC20New.contract.FilterLogs(opts, "UpdatedProtocolFlatFee") + if err != nil { + return nil, err + } + return &ZRC20NewUpdatedProtocolFlatFeeIterator{contract: _ZRC20New.contract, event: "UpdatedProtocolFlatFee", logs: logs, sub: sub}, nil +} + +// WatchUpdatedProtocolFlatFee is a free log subscription operation binding the contract event 0xef13af88e424b5d15f49c77758542c1938b08b8b95b91ed0751f98ba99000d8f. +// +// Solidity: event UpdatedProtocolFlatFee(uint256 protocolFlatFee) +func (_ZRC20New *ZRC20NewFilterer) WatchUpdatedProtocolFlatFee(opts *bind.WatchOpts, sink chan<- *ZRC20NewUpdatedProtocolFlatFee) (event.Subscription, error) { + + logs, sub, err := _ZRC20New.contract.WatchLogs(opts, "UpdatedProtocolFlatFee") + 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(ZRC20NewUpdatedProtocolFlatFee) + if err := _ZRC20New.contract.UnpackLog(event, "UpdatedProtocolFlatFee", 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 +} + +// ParseUpdatedProtocolFlatFee is a log parse operation binding the contract event 0xef13af88e424b5d15f49c77758542c1938b08b8b95b91ed0751f98ba99000d8f. +// +// Solidity: event UpdatedProtocolFlatFee(uint256 protocolFlatFee) +func (_ZRC20New *ZRC20NewFilterer) ParseUpdatedProtocolFlatFee(log types.Log) (*ZRC20NewUpdatedProtocolFlatFee, error) { + event := new(ZRC20NewUpdatedProtocolFlatFee) + if err := _ZRC20New.contract.UnpackLog(event, "UpdatedProtocolFlatFee", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// ZRC20NewUpdatedSystemContractIterator is returned from FilterUpdatedSystemContract and is used to iterate over the raw logs and unpacked data for UpdatedSystemContract events raised by the ZRC20New contract. +type ZRC20NewUpdatedSystemContractIterator struct { + Event *ZRC20NewUpdatedSystemContract // 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 *ZRC20NewUpdatedSystemContractIterator) 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(ZRC20NewUpdatedSystemContract) + 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(ZRC20NewUpdatedSystemContract) + 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 *ZRC20NewUpdatedSystemContractIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *ZRC20NewUpdatedSystemContractIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// ZRC20NewUpdatedSystemContract represents a UpdatedSystemContract event raised by the ZRC20New contract. +type ZRC20NewUpdatedSystemContract struct { + SystemContract common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterUpdatedSystemContract is a free log retrieval operation binding the contract event 0xd55614e962c5fd6ece71614f6348d702468a997a394dd5e5c1677950226d97ae. +// +// Solidity: event UpdatedSystemContract(address systemContract) +func (_ZRC20New *ZRC20NewFilterer) FilterUpdatedSystemContract(opts *bind.FilterOpts) (*ZRC20NewUpdatedSystemContractIterator, error) { + + logs, sub, err := _ZRC20New.contract.FilterLogs(opts, "UpdatedSystemContract") + if err != nil { + return nil, err + } + return &ZRC20NewUpdatedSystemContractIterator{contract: _ZRC20New.contract, event: "UpdatedSystemContract", logs: logs, sub: sub}, nil +} + +// WatchUpdatedSystemContract is a free log subscription operation binding the contract event 0xd55614e962c5fd6ece71614f6348d702468a997a394dd5e5c1677950226d97ae. +// +// Solidity: event UpdatedSystemContract(address systemContract) +func (_ZRC20New *ZRC20NewFilterer) WatchUpdatedSystemContract(opts *bind.WatchOpts, sink chan<- *ZRC20NewUpdatedSystemContract) (event.Subscription, error) { + + logs, sub, err := _ZRC20New.contract.WatchLogs(opts, "UpdatedSystemContract") + 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(ZRC20NewUpdatedSystemContract) + if err := _ZRC20New.contract.UnpackLog(event, "UpdatedSystemContract", 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 +} + +// ParseUpdatedSystemContract is a log parse operation binding the contract event 0xd55614e962c5fd6ece71614f6348d702468a997a394dd5e5c1677950226d97ae. +// +// Solidity: event UpdatedSystemContract(address systemContract) +func (_ZRC20New *ZRC20NewFilterer) ParseUpdatedSystemContract(log types.Log) (*ZRC20NewUpdatedSystemContract, error) { + event := new(ZRC20NewUpdatedSystemContract) + if err := _ZRC20New.contract.UnpackLog(event, "UpdatedSystemContract", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// ZRC20NewWithdrawalIterator is returned from FilterWithdrawal and is used to iterate over the raw logs and unpacked data for Withdrawal events raised by the ZRC20New contract. +type ZRC20NewWithdrawalIterator struct { + Event *ZRC20NewWithdrawal // 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 *ZRC20NewWithdrawalIterator) 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(ZRC20NewWithdrawal) + 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(ZRC20NewWithdrawal) + 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 *ZRC20NewWithdrawalIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *ZRC20NewWithdrawalIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// ZRC20NewWithdrawal represents a Withdrawal event raised by the ZRC20New contract. +type ZRC20NewWithdrawal struct { + From common.Address + To []byte + Value *big.Int + Gasfee *big.Int + ProtocolFlatFee *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterWithdrawal is a free log retrieval operation binding the contract event 0x9ffbffc04a397460ee1dbe8c9503e098090567d6b7f4b3c02a8617d800b6d955. +// +// Solidity: event Withdrawal(address indexed from, bytes to, uint256 value, uint256 gasfee, uint256 protocolFlatFee) +func (_ZRC20New *ZRC20NewFilterer) FilterWithdrawal(opts *bind.FilterOpts, from []common.Address) (*ZRC20NewWithdrawalIterator, error) { + + var fromRule []interface{} + for _, fromItem := range from { + fromRule = append(fromRule, fromItem) + } + + logs, sub, err := _ZRC20New.contract.FilterLogs(opts, "Withdrawal", fromRule) + if err != nil { + return nil, err + } + return &ZRC20NewWithdrawalIterator{contract: _ZRC20New.contract, event: "Withdrawal", logs: logs, sub: sub}, nil +} + +// WatchWithdrawal is a free log subscription operation binding the contract event 0x9ffbffc04a397460ee1dbe8c9503e098090567d6b7f4b3c02a8617d800b6d955. +// +// Solidity: event Withdrawal(address indexed from, bytes to, uint256 value, uint256 gasfee, uint256 protocolFlatFee) +func (_ZRC20New *ZRC20NewFilterer) WatchWithdrawal(opts *bind.WatchOpts, sink chan<- *ZRC20NewWithdrawal, from []common.Address) (event.Subscription, error) { + + var fromRule []interface{} + for _, fromItem := range from { + fromRule = append(fromRule, fromItem) + } + + logs, sub, err := _ZRC20New.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(ZRC20NewWithdrawal) + if err := _ZRC20New.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 0x9ffbffc04a397460ee1dbe8c9503e098090567d6b7f4b3c02a8617d800b6d955. +// +// Solidity: event Withdrawal(address indexed from, bytes to, uint256 value, uint256 gasfee, uint256 protocolFlatFee) +func (_ZRC20New *ZRC20NewFilterer) ParseWithdrawal(log types.Log) (*ZRC20NewWithdrawal, error) { + event := new(ZRC20NewWithdrawal) + if err := _ZRC20New.contract.UnpackLog(event, "Withdrawal", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} 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/contracts/zevm/zrc20.sol/zrc20.go b/pkg/contracts/zevm/zrc20.sol/zrc20.go index 3e6c8835..be4f412e 100644 --- a/pkg/contracts/zevm/zrc20.sol/zrc20.go +++ b/pkg/contracts/zevm/zrc20.sol/zrc20.go @@ -32,7 +32,7 @@ var ( // ZRC20MetaData contains all meta data concerning the ZRC20 contract. var ZRC20MetaData = &bind.MetaData{ ABI: "[{\"inputs\":[{\"internalType\":\"string\",\"name\":\"name_\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"symbol_\",\"type\":\"string\"},{\"internalType\":\"uint8\",\"name\":\"decimals_\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"chainid_\",\"type\":\"uint256\"},{\"internalType\":\"enumCoinType\",\"name\":\"coinType_\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"gasLimit_\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"systemContractAddress_\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"CallerIsNotFungibleModule\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"GasFeeTransferFailed\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidSender\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"LowAllowance\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"LowBalance\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ZeroAddress\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ZeroGasCoin\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ZeroGasPrice\",\"type\":\"error\"},{\"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\":\"CHAIN_ID\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"COIN_TYPE\",\"outputs\":[{\"internalType\":\"enumCoinType\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"FUNGIBLE_MODULE_ADDRESS\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"GAS_LIMIT\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"PROTOCOL_FLAT_FEE\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"SYSTEM_CONTRACT_ADDRESS\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"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\":[],\"name\":\"decimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"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\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"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\":\"uint256\",\"name\":\"gasLimit\",\"type\":\"uint256\"}],\"name\":\"updateGasLimit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"protocolFlatFee\",\"type\":\"uint256\"}],\"name\":\"updateProtocolFlatFee\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"}],\"name\":\"updateSystemContractAddress\",\"outputs\":[],\"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\"}]", - Bin: "0x60c06040523480156200001157600080fd5b506040516200272c3803806200272c833981810160405281019062000037919062000319565b73735b14bb79463307aacbed86daf3322b1e6226ab73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614620000b1576040517f2b2add3d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8660069080519060200190620000c99291906200018f565b508560079080519060200190620000e29291906200018f565b5084600860006101000a81548160ff021916908360ff16021790555083608081815250508260028111156200011c576200011b62000556565b5b60a081600281111562000134576200013362000556565b5b60f81b8152505081600181905550806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505050505050505062000667565b8280546200019d90620004ea565b90600052602060002090601f016020900481019282620001c157600085556200020d565b82601f10620001dc57805160ff19168380011785556200020d565b828001600101855582156200020d579182015b828111156200020c578251825591602001919060010190620001ef565b5b5090506200021c919062000220565b5090565b5b808211156200023b57600081600090555060010162000221565b5090565b600062000256620002508462000433565b6200040a565b905082815260208101848484011115620002755762000274620005e8565b5b62000282848285620004b4565b509392505050565b6000815190506200029b8162000608565b92915050565b600081519050620002b28162000622565b92915050565b600082601f830112620002d057620002cf620005e3565b5b8151620002e28482602086016200023f565b91505092915050565b600081519050620002fc8162000633565b92915050565b60008151905062000313816200064d565b92915050565b600080600080600080600060e0888a0312156200033b576200033a620005f2565b5b600088015167ffffffffffffffff8111156200035c576200035b620005ed565b5b6200036a8a828b01620002b8565b975050602088015167ffffffffffffffff8111156200038e576200038d620005ed565b5b6200039c8a828b01620002b8565b9650506040620003af8a828b0162000302565b9550506060620003c28a828b01620002eb565b9450506080620003d58a828b01620002a1565b93505060a0620003e88a828b01620002eb565b92505060c0620003fb8a828b016200028a565b91505092959891949750929550565b60006200041662000429565b905062000424828262000520565b919050565b6000604051905090565b600067ffffffffffffffff821115620004515762000450620005b4565b5b6200045c82620005f7565b9050602081019050919050565b600062000476826200047d565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b60005b83811015620004d4578082015181840152602081019050620004b7565b83811115620004e4576000848401525b50505050565b600060028204905060018216806200050357607f821691505b602082108114156200051a576200051962000585565b5b50919050565b6200052b82620005f7565b810181811067ffffffffffffffff821117156200054d576200054c620005b4565b5b80604052505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b620006138162000469565b81146200061f57600080fd5b50565b600381106200063057600080fd5b50565b6200063e816200049d565b81146200064a57600080fd5b50565b6200065881620004a7565b81146200066457600080fd5b50565b60805160a05160f81c61208e6200069e60003960006108d501526000818161081f01528181610ba20152610cd7015261208e6000f3fe608060405234801561001057600080fd5b50600436106101425760003560e01c806385e1f4d0116100b8578063c835d7cc1161007c578063c835d7cc146103a5578063d9eeebed146103c1578063dd62ed3e146103e0578063eddeb12314610410578063f2441b321461042c578063f687d12a1461044a57610142565b806385e1f4d0146102eb57806395d89b4114610309578063a3413d0314610327578063a9059cbb14610345578063c70126261461037557610142565b8063313ce5671161010a578063313ce567146102015780633ce4a5bc1461021f57806342966c681461023d57806347e7ef241461026d5780634d8943bb1461029d57806370a08231146102bb57610142565b806306fdde0314610147578063091d278814610165578063095ea7b31461018357806318160ddd146101b357806323b872dd146101d1575b600080fd5b61014f610466565b60405161015c9190611c04565b60405180910390f35b61016d6104f8565b60405161017a9190611c26565b60405180910390f35b61019d600480360381019061019891906118c5565b6104fe565b6040516101aa9190611b52565b60405180910390f35b6101bb61051c565b6040516101c89190611c26565b60405180910390f35b6101eb60048036038101906101e69190611872565b610526565b6040516101f89190611b52565b60405180910390f35b61020961061e565b6040516102169190611c41565b60405180910390f35b610227610635565b6040516102349190611ad7565b60405180910390f35b6102576004803603810190610252919061198e565b61064d565b6040516102649190611b52565b60405180910390f35b610287600480360381019061028291906118c5565b610662565b6040516102949190611b52565b60405180910390f35b6102a56107ce565b6040516102b29190611c26565b60405180910390f35b6102d560048036038101906102d091906117d8565b6107d4565b6040516102e29190611c26565b60405180910390f35b6102f361081d565b6040516103009190611c26565b60405180910390f35b610311610841565b60405161031e9190611c04565b60405180910390f35b61032f6108d3565b60405161033c9190611be9565b60405180910390f35b61035f600480360381019061035a91906118c5565b6108f7565b60405161036c9190611b52565b60405180910390f35b61038f600480360381019061038a9190611932565b610915565b60405161039c9190611b52565b60405180910390f35b6103bf60048036038101906103ba91906117d8565b610a6b565b005b6103c9610b5e565b6040516103d7929190611b29565b60405180910390f35b6103fa60048036038101906103f59190611832565b610dcb565b6040516104079190611c26565b60405180910390f35b61042a6004803603810190610425919061198e565b610e52565b005b610434610f0c565b6040516104419190611ad7565b60405180910390f35b610464600480360381019061045f919061198e565b610f30565b005b60606006805461047590611e8a565b80601f01602080910402602001604051908101604052809291908181526020018280546104a190611e8a565b80156104ee5780601f106104c3576101008083540402835291602001916104ee565b820191906000526020600020905b8154815290600101906020018083116104d157829003601f168201915b5050505050905090565b60015481565b600061051261050b610fea565b8484610ff2565b6001905092915050565b6000600554905090565b60006105338484846111ab565b6000600460008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600061057e610fea565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050828110156105f5576040517f10bad14700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61061285610601610fea565b858461060d9190611d9a565b610ff2565b60019150509392505050565b6000600860009054906101000a900460ff16905090565b73735b14bb79463307aacbed86daf3322b1e6226ab81565b60006106593383611407565b60019050919050565b600073735b14bb79463307aacbed86daf3322b1e6226ab73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614158015610700575060008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614155b15610737576040517fddb5de5e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61074183836115bf565b8273ffffffffffffffffffffffffffffffffffffffff167f67fc7bdaed5b0ec550d8706b87d60568ab70c6b781263c70101d54cd1564aab373735b14bb79463307aacbed86daf3322b1e6226ab60405160200161079e9190611abc565b604051602081830303815290604052846040516107bc929190611b6d565b60405180910390a26001905092915050565b60025481565b6000600360008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b7f000000000000000000000000000000000000000000000000000000000000000081565b60606007805461085090611e8a565b80601f016020809104026020016040519081016040528092919081815260200182805461087c90611e8a565b80156108c95780601f1061089e576101008083540402835291602001916108c9565b820191906000526020600020905b8154815290600101906020018083116108ac57829003601f168201915b5050505050905090565b7f000000000000000000000000000000000000000000000000000000000000000081565b600061090b610904610fea565b84846111ab565b6001905092915050565b6000806000610922610b5e565b915091508173ffffffffffffffffffffffffffffffffffffffff166323b872dd3373735b14bb79463307aacbed86daf3322b1e6226ab846040518463ffffffff1660e01b815260040161097793929190611af2565b602060405180830381600087803b15801561099157600080fd5b505af11580156109a5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109c99190611905565b6109ff576040517f0a7cd6d600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610a093385611407565b3373ffffffffffffffffffffffffffffffffffffffff167f9ffbffc04a397460ee1dbe8c9503e098090567d6b7f4b3c02a8617d800b6d955868684600254604051610a579493929190611b9d565b60405180910390a260019250505092915050565b73735b14bb79463307aacbed86daf3322b1e6226ab73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610ae4576040517f2b2add3d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055507fd55614e962c5fd6ece71614f6348d702468a997a394dd5e5c1677950226d97ae81604051610b539190611ad7565b60405180910390a150565b60008060008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16630be155477f00000000000000000000000000000000000000000000000000000000000000006040518263ffffffff1660e01b8152600401610bdd9190611c26565b60206040518083038186803b158015610bf557600080fd5b505afa158015610c09573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c2d9190611805565b9050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415610c96576040517f78fff39600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663d7fd7afb7f00000000000000000000000000000000000000000000000000000000000000006040518263ffffffff1660e01b8152600401610d129190611c26565b60206040518083038186803b158015610d2a57600080fd5b505afa158015610d3e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d6291906119bb565b90506000811415610d9f576040517fe661aed000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600060025460015483610db29190611d40565b610dbc9190611cea565b90508281945094505050509091565b6000600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b73735b14bb79463307aacbed86daf3322b1e6226ab73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610ecb576040517f2b2add3d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b806002819055507fef13af88e424b5d15f49c77758542c1938b08b8b95b91ed0751f98ba99000d8f81604051610f019190611c26565b60405180910390a150565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b73735b14bb79463307aacbed86daf3322b1e6226ab73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610fa9576040517f2b2add3d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b806001819055507fff5788270f43bfc1ca41c503606d2594aa3023a1a7547de403a3e2f146a4a80a81604051610fdf9190611c26565b60405180910390a150565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415611059576040517fd92e233d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156110c0576040517fd92e233d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9258360405161119e9190611c26565b60405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415611212576040517fd92e233d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611279576040517fd92e233d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050818110156112f7576040517ffe382aa700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b81816113039190611d9a565b600360008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555081600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282546113959190611cea565b925050819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040516113f99190611c26565b60405180910390a350505050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16141561146e576040517fd92e233d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050818110156114ec576040517ffe382aa700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b81816114f89190611d9a565b600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550816005600082825461154d9190611d9a565b92505081905550600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040516115b29190611c26565b60405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611626576040517fd92e233d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80600560008282546116389190611cea565b9250508190555080600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825461168e9190611cea565b925050819055508173ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040516116f39190611c26565b60405180910390a35050565b600061171261170d84611c81565b611c5c565b90508281526020810184848401111561172e5761172d611fd2565b5b611739848285611e48565b509392505050565b60008135905061175081612013565b92915050565b60008151905061176581612013565b92915050565b60008151905061177a8161202a565b92915050565b600082601f83011261179557611794611fcd565b5b81356117a58482602086016116ff565b91505092915050565b6000813590506117bd81612041565b92915050565b6000815190506117d281612041565b92915050565b6000602082840312156117ee576117ed611fdc565b5b60006117fc84828501611741565b91505092915050565b60006020828403121561181b5761181a611fdc565b5b600061182984828501611756565b91505092915050565b6000806040838503121561184957611848611fdc565b5b600061185785828601611741565b925050602061186885828601611741565b9150509250929050565b60008060006060848603121561188b5761188a611fdc565b5b600061189986828701611741565b93505060206118aa86828701611741565b92505060406118bb868287016117ae565b9150509250925092565b600080604083850312156118dc576118db611fdc565b5b60006118ea85828601611741565b92505060206118fb858286016117ae565b9150509250929050565b60006020828403121561191b5761191a611fdc565b5b60006119298482850161176b565b91505092915050565b6000806040838503121561194957611948611fdc565b5b600083013567ffffffffffffffff81111561196757611966611fd7565b5b61197385828601611780565b9250506020611984858286016117ae565b9150509250929050565b6000602082840312156119a4576119a3611fdc565b5b60006119b2848285016117ae565b91505092915050565b6000602082840312156119d1576119d0611fdc565b5b60006119df848285016117c3565b91505092915050565b6119f181611dce565b82525050565b611a08611a0382611dce565b611eed565b82525050565b611a1781611de0565b82525050565b6000611a2882611cb2565b611a328185611cc8565b9350611a42818560208601611e57565b611a4b81611fe1565b840191505092915050565b611a5f81611e36565b82525050565b6000611a7082611cbd565b611a7a8185611cd9565b9350611a8a818560208601611e57565b611a9381611fe1565b840191505092915050565b611aa781611e1f565b82525050565b611ab681611e29565b82525050565b6000611ac882846119f7565b60148201915081905092915050565b6000602082019050611aec60008301846119e8565b92915050565b6000606082019050611b0760008301866119e8565b611b1460208301856119e8565b611b216040830184611a9e565b949350505050565b6000604082019050611b3e60008301856119e8565b611b4b6020830184611a9e565b9392505050565b6000602082019050611b676000830184611a0e565b92915050565b60006040820190508181036000830152611b878185611a1d565b9050611b966020830184611a9e565b9392505050565b60006080820190508181036000830152611bb78187611a1d565b9050611bc66020830186611a9e565b611bd36040830185611a9e565b611be06060830184611a9e565b95945050505050565b6000602082019050611bfe6000830184611a56565b92915050565b60006020820190508181036000830152611c1e8184611a65565b905092915050565b6000602082019050611c3b6000830184611a9e565b92915050565b6000602082019050611c566000830184611aad565b92915050565b6000611c66611c77565b9050611c728282611ebc565b919050565b6000604051905090565b600067ffffffffffffffff821115611c9c57611c9b611f9e565b5b611ca582611fe1565b9050602081019050919050565b600081519050919050565b600081519050919050565b600082825260208201905092915050565b600082825260208201905092915050565b6000611cf582611e1f565b9150611d0083611e1f565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff03821115611d3557611d34611f11565b5b828201905092915050565b6000611d4b82611e1f565b9150611d5683611e1f565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615611d8f57611d8e611f11565b5b828202905092915050565b6000611da582611e1f565b9150611db083611e1f565b925082821015611dc357611dc2611f11565b5b828203905092915050565b6000611dd982611dff565b9050919050565b60008115159050919050565b6000819050611dfa82611fff565b919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b6000611e4182611dec565b9050919050565b82818337600083830152505050565b60005b83811015611e75578082015181840152602081019050611e5a565b83811115611e84576000848401525b50505050565b60006002820490506001821680611ea257607f821691505b60208210811415611eb657611eb5611f6f565b5b50919050565b611ec582611fe1565b810181811067ffffffffffffffff82111715611ee457611ee3611f9e565b5b80604052505050565b6000611ef882611eff565b9050919050565b6000611f0a82611ff2565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b60008160601b9050919050565b600381106120105761200f611f40565b5b50565b61201c81611dce565b811461202757600080fd5b50565b61203381611de0565b811461203e57600080fd5b50565b61204a81611e1f565b811461205557600080fd5b5056fea2646970667358221220edaf9ed98354e71aa84b95b4433f47537dd491d72f649020c367c23ec482327064736f6c63430008070033", + Bin: "0x60c06040523480156200001157600080fd5b506040516200272c3803806200272c833981810160405281019062000037919062000319565b73735b14bb79463307aacbed86daf3322b1e6226ab73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614620000b1576040517f2b2add3d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8660069080519060200190620000c99291906200018f565b508560079080519060200190620000e29291906200018f565b5084600860006101000a81548160ff021916908360ff16021790555083608081815250508260028111156200011c576200011b62000556565b5b60a081600281111562000134576200013362000556565b5b60f81b8152505081600181905550806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505050505050505062000667565b8280546200019d90620004ea565b90600052602060002090601f016020900481019282620001c157600085556200020d565b82601f10620001dc57805160ff19168380011785556200020d565b828001600101855582156200020d579182015b828111156200020c578251825591602001919060010190620001ef565b5b5090506200021c919062000220565b5090565b5b808211156200023b57600081600090555060010162000221565b5090565b600062000256620002508462000433565b6200040a565b905082815260208101848484011115620002755762000274620005e8565b5b62000282848285620004b4565b509392505050565b6000815190506200029b8162000608565b92915050565b600081519050620002b28162000622565b92915050565b600082601f830112620002d057620002cf620005e3565b5b8151620002e28482602086016200023f565b91505092915050565b600081519050620002fc8162000633565b92915050565b60008151905062000313816200064d565b92915050565b600080600080600080600060e0888a0312156200033b576200033a620005f2565b5b600088015167ffffffffffffffff8111156200035c576200035b620005ed565b5b6200036a8a828b01620002b8565b975050602088015167ffffffffffffffff8111156200038e576200038d620005ed565b5b6200039c8a828b01620002b8565b9650506040620003af8a828b0162000302565b9550506060620003c28a828b01620002eb565b9450506080620003d58a828b01620002a1565b93505060a0620003e88a828b01620002eb565b92505060c0620003fb8a828b016200028a565b91505092959891949750929550565b60006200041662000429565b905062000424828262000520565b919050565b6000604051905090565b600067ffffffffffffffff821115620004515762000450620005b4565b5b6200045c82620005f7565b9050602081019050919050565b600062000476826200047d565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b60005b83811015620004d4578082015181840152602081019050620004b7565b83811115620004e4576000848401525b50505050565b600060028204905060018216806200050357607f821691505b602082108114156200051a576200051962000585565b5b50919050565b6200052b82620005f7565b810181811067ffffffffffffffff821117156200054d576200054c620005b4565b5b80604052505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b620006138162000469565b81146200061f57600080fd5b50565b600381106200063057600080fd5b50565b6200063e816200049d565b81146200064a57600080fd5b50565b6200065881620004a7565b81146200066457600080fd5b50565b60805160a05160f81c61208e6200069e60003960006108d501526000818161081f01528181610ba20152610cd7015261208e6000f3fe608060405234801561001057600080fd5b50600436106101425760003560e01c806385e1f4d0116100b8578063c835d7cc1161007c578063c835d7cc146103a5578063d9eeebed146103c1578063dd62ed3e146103e0578063eddeb12314610410578063f2441b321461042c578063f687d12a1461044a57610142565b806385e1f4d0146102eb57806395d89b4114610309578063a3413d0314610327578063a9059cbb14610345578063c70126261461037557610142565b8063313ce5671161010a578063313ce567146102015780633ce4a5bc1461021f57806342966c681461023d57806347e7ef241461026d5780634d8943bb1461029d57806370a08231146102bb57610142565b806306fdde0314610147578063091d278814610165578063095ea7b31461018357806318160ddd146101b357806323b872dd146101d1575b600080fd5b61014f610466565b60405161015c9190611c04565b60405180910390f35b61016d6104f8565b60405161017a9190611c26565b60405180910390f35b61019d600480360381019061019891906118c5565b6104fe565b6040516101aa9190611b52565b60405180910390f35b6101bb61051c565b6040516101c89190611c26565b60405180910390f35b6101eb60048036038101906101e69190611872565b610526565b6040516101f89190611b52565b60405180910390f35b61020961061e565b6040516102169190611c41565b60405180910390f35b610227610635565b6040516102349190611ad7565b60405180910390f35b6102576004803603810190610252919061198e565b61064d565b6040516102649190611b52565b60405180910390f35b610287600480360381019061028291906118c5565b610662565b6040516102949190611b52565b60405180910390f35b6102a56107ce565b6040516102b29190611c26565b60405180910390f35b6102d560048036038101906102d091906117d8565b6107d4565b6040516102e29190611c26565b60405180910390f35b6102f361081d565b6040516103009190611c26565b60405180910390f35b610311610841565b60405161031e9190611c04565b60405180910390f35b61032f6108d3565b60405161033c9190611be9565b60405180910390f35b61035f600480360381019061035a91906118c5565b6108f7565b60405161036c9190611b52565b60405180910390f35b61038f600480360381019061038a9190611932565b610915565b60405161039c9190611b52565b60405180910390f35b6103bf60048036038101906103ba91906117d8565b610a6b565b005b6103c9610b5e565b6040516103d7929190611b29565b60405180910390f35b6103fa60048036038101906103f59190611832565b610dcb565b6040516104079190611c26565b60405180910390f35b61042a6004803603810190610425919061198e565b610e52565b005b610434610f0c565b6040516104419190611ad7565b60405180910390f35b610464600480360381019061045f919061198e565b610f30565b005b60606006805461047590611e8a565b80601f01602080910402602001604051908101604052809291908181526020018280546104a190611e8a565b80156104ee5780601f106104c3576101008083540402835291602001916104ee565b820191906000526020600020905b8154815290600101906020018083116104d157829003601f168201915b5050505050905090565b60015481565b600061051261050b610fea565b8484610ff2565b6001905092915050565b6000600554905090565b60006105338484846111ab565b6000600460008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600061057e610fea565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050828110156105f5576040517f10bad14700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61061285610601610fea565b858461060d9190611d9a565b610ff2565b60019150509392505050565b6000600860009054906101000a900460ff16905090565b73735b14bb79463307aacbed86daf3322b1e6226ab81565b60006106593383611407565b60019050919050565b600073735b14bb79463307aacbed86daf3322b1e6226ab73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614158015610700575060008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614155b15610737576040517fddb5de5e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61074183836115bf565b8273ffffffffffffffffffffffffffffffffffffffff167f67fc7bdaed5b0ec550d8706b87d60568ab70c6b781263c70101d54cd1564aab373735b14bb79463307aacbed86daf3322b1e6226ab60405160200161079e9190611abc565b604051602081830303815290604052846040516107bc929190611b6d565b60405180910390a26001905092915050565b60025481565b6000600360008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b7f000000000000000000000000000000000000000000000000000000000000000081565b60606007805461085090611e8a565b80601f016020809104026020016040519081016040528092919081815260200182805461087c90611e8a565b80156108c95780601f1061089e576101008083540402835291602001916108c9565b820191906000526020600020905b8154815290600101906020018083116108ac57829003601f168201915b5050505050905090565b7f000000000000000000000000000000000000000000000000000000000000000081565b600061090b610904610fea565b84846111ab565b6001905092915050565b6000806000610922610b5e565b915091508173ffffffffffffffffffffffffffffffffffffffff166323b872dd3373735b14bb79463307aacbed86daf3322b1e6226ab846040518463ffffffff1660e01b815260040161097793929190611af2565b602060405180830381600087803b15801561099157600080fd5b505af11580156109a5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109c99190611905565b6109ff576040517f0a7cd6d600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610a093385611407565b3373ffffffffffffffffffffffffffffffffffffffff167f9ffbffc04a397460ee1dbe8c9503e098090567d6b7f4b3c02a8617d800b6d955868684600254604051610a579493929190611b9d565b60405180910390a260019250505092915050565b73735b14bb79463307aacbed86daf3322b1e6226ab73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610ae4576040517f2b2add3d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055507fd55614e962c5fd6ece71614f6348d702468a997a394dd5e5c1677950226d97ae81604051610b539190611ad7565b60405180910390a150565b60008060008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16630be155477f00000000000000000000000000000000000000000000000000000000000000006040518263ffffffff1660e01b8152600401610bdd9190611c26565b60206040518083038186803b158015610bf557600080fd5b505afa158015610c09573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c2d9190611805565b9050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415610c96576040517f78fff39600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663d7fd7afb7f00000000000000000000000000000000000000000000000000000000000000006040518263ffffffff1660e01b8152600401610d129190611c26565b60206040518083038186803b158015610d2a57600080fd5b505afa158015610d3e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d6291906119bb565b90506000811415610d9f576040517fe661aed000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600060025460015483610db29190611d40565b610dbc9190611cea565b90508281945094505050509091565b6000600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b73735b14bb79463307aacbed86daf3322b1e6226ab73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610ecb576040517f2b2add3d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b806002819055507fef13af88e424b5d15f49c77758542c1938b08b8b95b91ed0751f98ba99000d8f81604051610f019190611c26565b60405180910390a150565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b73735b14bb79463307aacbed86daf3322b1e6226ab73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610fa9576040517f2b2add3d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b806001819055507fff5788270f43bfc1ca41c503606d2594aa3023a1a7547de403a3e2f146a4a80a81604051610fdf9190611c26565b60405180910390a150565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415611059576040517fd92e233d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156110c0576040517fd92e233d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9258360405161119e9190611c26565b60405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415611212576040517fd92e233d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611279576040517fd92e233d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050818110156112f7576040517ffe382aa700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b81816113039190611d9a565b600360008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555081600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282546113959190611cea565b925050819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040516113f99190611c26565b60405180910390a350505050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16141561146e576040517fd92e233d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050818110156114ec576040517ffe382aa700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b81816114f89190611d9a565b600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550816005600082825461154d9190611d9a565b92505081905550600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040516115b29190611c26565b60405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611626576040517fd92e233d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80600560008282546116389190611cea565b9250508190555080600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825461168e9190611cea565b925050819055508173ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040516116f39190611c26565b60405180910390a35050565b600061171261170d84611c81565b611c5c565b90508281526020810184848401111561172e5761172d611fd2565b5b611739848285611e48565b509392505050565b60008135905061175081612013565b92915050565b60008151905061176581612013565b92915050565b60008151905061177a8161202a565b92915050565b600082601f83011261179557611794611fcd565b5b81356117a58482602086016116ff565b91505092915050565b6000813590506117bd81612041565b92915050565b6000815190506117d281612041565b92915050565b6000602082840312156117ee576117ed611fdc565b5b60006117fc84828501611741565b91505092915050565b60006020828403121561181b5761181a611fdc565b5b600061182984828501611756565b91505092915050565b6000806040838503121561184957611848611fdc565b5b600061185785828601611741565b925050602061186885828601611741565b9150509250929050565b60008060006060848603121561188b5761188a611fdc565b5b600061189986828701611741565b93505060206118aa86828701611741565b92505060406118bb868287016117ae565b9150509250925092565b600080604083850312156118dc576118db611fdc565b5b60006118ea85828601611741565b92505060206118fb858286016117ae565b9150509250929050565b60006020828403121561191b5761191a611fdc565b5b60006119298482850161176b565b91505092915050565b6000806040838503121561194957611948611fdc565b5b600083013567ffffffffffffffff81111561196757611966611fd7565b5b61197385828601611780565b9250506020611984858286016117ae565b9150509250929050565b6000602082840312156119a4576119a3611fdc565b5b60006119b2848285016117ae565b91505092915050565b6000602082840312156119d1576119d0611fdc565b5b60006119df848285016117c3565b91505092915050565b6119f181611dce565b82525050565b611a08611a0382611dce565b611eed565b82525050565b611a1781611de0565b82525050565b6000611a2882611cb2565b611a328185611cc8565b9350611a42818560208601611e57565b611a4b81611fe1565b840191505092915050565b611a5f81611e36565b82525050565b6000611a7082611cbd565b611a7a8185611cd9565b9350611a8a818560208601611e57565b611a9381611fe1565b840191505092915050565b611aa781611e1f565b82525050565b611ab681611e29565b82525050565b6000611ac882846119f7565b60148201915081905092915050565b6000602082019050611aec60008301846119e8565b92915050565b6000606082019050611b0760008301866119e8565b611b1460208301856119e8565b611b216040830184611a9e565b949350505050565b6000604082019050611b3e60008301856119e8565b611b4b6020830184611a9e565b9392505050565b6000602082019050611b676000830184611a0e565b92915050565b60006040820190508181036000830152611b878185611a1d565b9050611b966020830184611a9e565b9392505050565b60006080820190508181036000830152611bb78187611a1d565b9050611bc66020830186611a9e565b611bd36040830185611a9e565b611be06060830184611a9e565b95945050505050565b6000602082019050611bfe6000830184611a56565b92915050565b60006020820190508181036000830152611c1e8184611a65565b905092915050565b6000602082019050611c3b6000830184611a9e565b92915050565b6000602082019050611c566000830184611aad565b92915050565b6000611c66611c77565b9050611c728282611ebc565b919050565b6000604051905090565b600067ffffffffffffffff821115611c9c57611c9b611f9e565b5b611ca582611fe1565b9050602081019050919050565b600081519050919050565b600081519050919050565b600082825260208201905092915050565b600082825260208201905092915050565b6000611cf582611e1f565b9150611d0083611e1f565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff03821115611d3557611d34611f11565b5b828201905092915050565b6000611d4b82611e1f565b9150611d5683611e1f565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615611d8f57611d8e611f11565b5b828202905092915050565b6000611da582611e1f565b9150611db083611e1f565b925082821015611dc357611dc2611f11565b5b828203905092915050565b6000611dd982611dff565b9050919050565b60008115159050919050565b6000819050611dfa82611fff565b919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b6000611e4182611dec565b9050919050565b82818337600083830152505050565b60005b83811015611e75578082015181840152602081019050611e5a565b83811115611e84576000848401525b50505050565b60006002820490506001821680611ea257607f821691505b60208210811415611eb657611eb5611f6f565b5b50919050565b611ec582611fe1565b810181811067ffffffffffffffff82111715611ee457611ee3611f9e565b5b80604052505050565b6000611ef882611eff565b9050919050565b6000611f0a82611ff2565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b60008160601b9050919050565b600381106120105761200f611f40565b5b50565b61201c81611dce565b811461202757600080fd5b50565b61203381611de0565b811461203e57600080fd5b50565b61204a81611e1f565b811461205557600080fd5b5056fea26469706673582212208ce130e2f149fc0b271fdd04857861bac756c56912ebde23032f8703b14b250764736f6c63430008070033", } // ZRC20ABI is the input ABI used to generate the binding from. diff --git a/pkg/openzeppelin/contracts-upgradeable/access/ownableupgradeable.sol/ownableupgradeable.go b/pkg/openzeppelin/contracts-upgradeable/access/ownableupgradeable.sol/ownableupgradeable.go new file mode 100644 index 00000000..1aa60b6a --- /dev/null +++ b/pkg/openzeppelin/contracts-upgradeable/access/ownableupgradeable.sol/ownableupgradeable.go @@ -0,0 +1,541 @@ +// Code generated - DO NOT EDIT. +// This file is a generated binding and any manual changes will be lost. + +package ownableupgradeable + +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 +) + +// OwnableUpgradeableMetaData contains all meta data concerning the OwnableUpgradeable contract. +var OwnableUpgradeableMetaData = &bind.MetaData{ + ABI: "[{\"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\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"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\"}]", +} + +// OwnableUpgradeableABI is the input ABI used to generate the binding from. +// Deprecated: Use OwnableUpgradeableMetaData.ABI instead. +var OwnableUpgradeableABI = OwnableUpgradeableMetaData.ABI + +// OwnableUpgradeable is an auto generated Go binding around an Ethereum contract. +type OwnableUpgradeable struct { + OwnableUpgradeableCaller // Read-only binding to the contract + OwnableUpgradeableTransactor // Write-only binding to the contract + OwnableUpgradeableFilterer // Log filterer for contract events +} + +// OwnableUpgradeableCaller is an auto generated read-only Go binding around an Ethereum contract. +type OwnableUpgradeableCaller struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// OwnableUpgradeableTransactor is an auto generated write-only Go binding around an Ethereum contract. +type OwnableUpgradeableTransactor struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// OwnableUpgradeableFilterer is an auto generated log filtering Go binding around an Ethereum contract events. +type OwnableUpgradeableFilterer struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// OwnableUpgradeableSession is an auto generated Go binding around an Ethereum contract, +// with pre-set call and transact options. +type OwnableUpgradeableSession struct { + Contract *OwnableUpgradeable // 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 +} + +// OwnableUpgradeableCallerSession is an auto generated read-only Go binding around an Ethereum contract, +// with pre-set call options. +type OwnableUpgradeableCallerSession struct { + Contract *OwnableUpgradeableCaller // Generic contract caller binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session +} + +// OwnableUpgradeableTransactorSession is an auto generated write-only Go binding around an Ethereum contract, +// with pre-set transact options. +type OwnableUpgradeableTransactorSession struct { + Contract *OwnableUpgradeableTransactor // Generic contract transactor binding to set the session for + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// OwnableUpgradeableRaw is an auto generated low-level Go binding around an Ethereum contract. +type OwnableUpgradeableRaw struct { + Contract *OwnableUpgradeable // Generic contract binding to access the raw methods on +} + +// OwnableUpgradeableCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. +type OwnableUpgradeableCallerRaw struct { + Contract *OwnableUpgradeableCaller // Generic read-only contract binding to access the raw methods on +} + +// OwnableUpgradeableTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. +type OwnableUpgradeableTransactorRaw struct { + Contract *OwnableUpgradeableTransactor // Generic write-only contract binding to access the raw methods on +} + +// NewOwnableUpgradeable creates a new instance of OwnableUpgradeable, bound to a specific deployed contract. +func NewOwnableUpgradeable(address common.Address, backend bind.ContractBackend) (*OwnableUpgradeable, error) { + contract, err := bindOwnableUpgradeable(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &OwnableUpgradeable{OwnableUpgradeableCaller: OwnableUpgradeableCaller{contract: contract}, OwnableUpgradeableTransactor: OwnableUpgradeableTransactor{contract: contract}, OwnableUpgradeableFilterer: OwnableUpgradeableFilterer{contract: contract}}, nil +} + +// NewOwnableUpgradeableCaller creates a new read-only instance of OwnableUpgradeable, bound to a specific deployed contract. +func NewOwnableUpgradeableCaller(address common.Address, caller bind.ContractCaller) (*OwnableUpgradeableCaller, error) { + contract, err := bindOwnableUpgradeable(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &OwnableUpgradeableCaller{contract: contract}, nil +} + +// NewOwnableUpgradeableTransactor creates a new write-only instance of OwnableUpgradeable, bound to a specific deployed contract. +func NewOwnableUpgradeableTransactor(address common.Address, transactor bind.ContractTransactor) (*OwnableUpgradeableTransactor, error) { + contract, err := bindOwnableUpgradeable(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &OwnableUpgradeableTransactor{contract: contract}, nil +} + +// NewOwnableUpgradeableFilterer creates a new log filterer instance of OwnableUpgradeable, bound to a specific deployed contract. +func NewOwnableUpgradeableFilterer(address common.Address, filterer bind.ContractFilterer) (*OwnableUpgradeableFilterer, error) { + contract, err := bindOwnableUpgradeable(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &OwnableUpgradeableFilterer{contract: contract}, nil +} + +// bindOwnableUpgradeable binds a generic wrapper to an already deployed contract. +func bindOwnableUpgradeable(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := OwnableUpgradeableMetaData.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 (_OwnableUpgradeable *OwnableUpgradeableRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _OwnableUpgradeable.Contract.OwnableUpgradeableCaller.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 (_OwnableUpgradeable *OwnableUpgradeableRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _OwnableUpgradeable.Contract.OwnableUpgradeableTransactor.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_OwnableUpgradeable *OwnableUpgradeableRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _OwnableUpgradeable.Contract.OwnableUpgradeableTransactor.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 (_OwnableUpgradeable *OwnableUpgradeableCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _OwnableUpgradeable.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 (_OwnableUpgradeable *OwnableUpgradeableTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _OwnableUpgradeable.Contract.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_OwnableUpgradeable *OwnableUpgradeableTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _OwnableUpgradeable.Contract.contract.Transact(opts, method, params...) +} + +// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. +// +// Solidity: function owner() view returns(address) +func (_OwnableUpgradeable *OwnableUpgradeableCaller) Owner(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _OwnableUpgradeable.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 (_OwnableUpgradeable *OwnableUpgradeableSession) Owner() (common.Address, error) { + return _OwnableUpgradeable.Contract.Owner(&_OwnableUpgradeable.CallOpts) +} + +// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. +// +// Solidity: function owner() view returns(address) +func (_OwnableUpgradeable *OwnableUpgradeableCallerSession) Owner() (common.Address, error) { + return _OwnableUpgradeable.Contract.Owner(&_OwnableUpgradeable.CallOpts) +} + +// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. +// +// Solidity: function renounceOwnership() returns() +func (_OwnableUpgradeable *OwnableUpgradeableTransactor) RenounceOwnership(opts *bind.TransactOpts) (*types.Transaction, error) { + return _OwnableUpgradeable.contract.Transact(opts, "renounceOwnership") +} + +// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. +// +// Solidity: function renounceOwnership() returns() +func (_OwnableUpgradeable *OwnableUpgradeableSession) RenounceOwnership() (*types.Transaction, error) { + return _OwnableUpgradeable.Contract.RenounceOwnership(&_OwnableUpgradeable.TransactOpts) +} + +// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. +// +// Solidity: function renounceOwnership() returns() +func (_OwnableUpgradeable *OwnableUpgradeableTransactorSession) RenounceOwnership() (*types.Transaction, error) { + return _OwnableUpgradeable.Contract.RenounceOwnership(&_OwnableUpgradeable.TransactOpts) +} + +// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// +// Solidity: function transferOwnership(address newOwner) returns() +func (_OwnableUpgradeable *OwnableUpgradeableTransactor) TransferOwnership(opts *bind.TransactOpts, newOwner common.Address) (*types.Transaction, error) { + return _OwnableUpgradeable.contract.Transact(opts, "transferOwnership", newOwner) +} + +// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// +// Solidity: function transferOwnership(address newOwner) returns() +func (_OwnableUpgradeable *OwnableUpgradeableSession) TransferOwnership(newOwner common.Address) (*types.Transaction, error) { + return _OwnableUpgradeable.Contract.TransferOwnership(&_OwnableUpgradeable.TransactOpts, newOwner) +} + +// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// +// Solidity: function transferOwnership(address newOwner) returns() +func (_OwnableUpgradeable *OwnableUpgradeableTransactorSession) TransferOwnership(newOwner common.Address) (*types.Transaction, error) { + return _OwnableUpgradeable.Contract.TransferOwnership(&_OwnableUpgradeable.TransactOpts, newOwner) +} + +// OwnableUpgradeableInitializedIterator is returned from FilterInitialized and is used to iterate over the raw logs and unpacked data for Initialized events raised by the OwnableUpgradeable contract. +type OwnableUpgradeableInitializedIterator struct { + Event *OwnableUpgradeableInitialized // 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 *OwnableUpgradeableInitializedIterator) 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(OwnableUpgradeableInitialized) + 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(OwnableUpgradeableInitialized) + 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 *OwnableUpgradeableInitializedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *OwnableUpgradeableInitializedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// OwnableUpgradeableInitialized represents a Initialized event raised by the OwnableUpgradeable contract. +type OwnableUpgradeableInitialized 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 (_OwnableUpgradeable *OwnableUpgradeableFilterer) FilterInitialized(opts *bind.FilterOpts) (*OwnableUpgradeableInitializedIterator, error) { + + logs, sub, err := _OwnableUpgradeable.contract.FilterLogs(opts, "Initialized") + if err != nil { + return nil, err + } + return &OwnableUpgradeableInitializedIterator{contract: _OwnableUpgradeable.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 (_OwnableUpgradeable *OwnableUpgradeableFilterer) WatchInitialized(opts *bind.WatchOpts, sink chan<- *OwnableUpgradeableInitialized) (event.Subscription, error) { + + logs, sub, err := _OwnableUpgradeable.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(OwnableUpgradeableInitialized) + if err := _OwnableUpgradeable.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 (_OwnableUpgradeable *OwnableUpgradeableFilterer) ParseInitialized(log types.Log) (*OwnableUpgradeableInitialized, error) { + event := new(OwnableUpgradeableInitialized) + if err := _OwnableUpgradeable.contract.UnpackLog(event, "Initialized", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// OwnableUpgradeableOwnershipTransferredIterator is returned from FilterOwnershipTransferred and is used to iterate over the raw logs and unpacked data for OwnershipTransferred events raised by the OwnableUpgradeable contract. +type OwnableUpgradeableOwnershipTransferredIterator struct { + Event *OwnableUpgradeableOwnershipTransferred // 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 *OwnableUpgradeableOwnershipTransferredIterator) 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(OwnableUpgradeableOwnershipTransferred) + 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(OwnableUpgradeableOwnershipTransferred) + 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 *OwnableUpgradeableOwnershipTransferredIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *OwnableUpgradeableOwnershipTransferredIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// OwnableUpgradeableOwnershipTransferred represents a OwnershipTransferred event raised by the OwnableUpgradeable contract. +type OwnableUpgradeableOwnershipTransferred 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 (_OwnableUpgradeable *OwnableUpgradeableFilterer) FilterOwnershipTransferred(opts *bind.FilterOpts, previousOwner []common.Address, newOwner []common.Address) (*OwnableUpgradeableOwnershipTransferredIterator, 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 := _OwnableUpgradeable.contract.FilterLogs(opts, "OwnershipTransferred", previousOwnerRule, newOwnerRule) + if err != nil { + return nil, err + } + return &OwnableUpgradeableOwnershipTransferredIterator{contract: _OwnableUpgradeable.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 (_OwnableUpgradeable *OwnableUpgradeableFilterer) WatchOwnershipTransferred(opts *bind.WatchOpts, sink chan<- *OwnableUpgradeableOwnershipTransferred, 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 := _OwnableUpgradeable.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(OwnableUpgradeableOwnershipTransferred) + if err := _OwnableUpgradeable.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 (_OwnableUpgradeable *OwnableUpgradeableFilterer) ParseOwnershipTransferred(log types.Log) (*OwnableUpgradeableOwnershipTransferred, error) { + event := new(OwnableUpgradeableOwnershipTransferred) + if err := _OwnableUpgradeable.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} diff --git a/pkg/openzeppelin/contracts-upgradeable/interfaces/ierc1967upgradeable.sol/ierc1967upgradeable.go b/pkg/openzeppelin/contracts-upgradeable/interfaces/ierc1967upgradeable.sol/ierc1967upgradeable.go new file mode 100644 index 00000000..59892999 --- /dev/null +++ b/pkg/openzeppelin/contracts-upgradeable/interfaces/ierc1967upgradeable.sol/ierc1967upgradeable.go @@ -0,0 +1,604 @@ +// Code generated - DO NOT EDIT. +// This file is a generated binding and any manual changes will be lost. + +package ierc1967upgradeable + +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 +) + +// IERC1967UpgradeableMetaData contains all meta data concerning the IERC1967Upgradeable contract. +var IERC1967UpgradeableMetaData = &bind.MetaData{ + ABI: "[{\"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\":\"implementation\",\"type\":\"address\"}],\"name\":\"Upgraded\",\"type\":\"event\"}]", +} + +// IERC1967UpgradeableABI is the input ABI used to generate the binding from. +// Deprecated: Use IERC1967UpgradeableMetaData.ABI instead. +var IERC1967UpgradeableABI = IERC1967UpgradeableMetaData.ABI + +// IERC1967Upgradeable is an auto generated Go binding around an Ethereum contract. +type IERC1967Upgradeable struct { + IERC1967UpgradeableCaller // Read-only binding to the contract + IERC1967UpgradeableTransactor // Write-only binding to the contract + IERC1967UpgradeableFilterer // Log filterer for contract events +} + +// IERC1967UpgradeableCaller is an auto generated read-only Go binding around an Ethereum contract. +type IERC1967UpgradeableCaller struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// IERC1967UpgradeableTransactor is an auto generated write-only Go binding around an Ethereum contract. +type IERC1967UpgradeableTransactor struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// IERC1967UpgradeableFilterer is an auto generated log filtering Go binding around an Ethereum contract events. +type IERC1967UpgradeableFilterer struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// IERC1967UpgradeableSession is an auto generated Go binding around an Ethereum contract, +// with pre-set call and transact options. +type IERC1967UpgradeableSession struct { + Contract *IERC1967Upgradeable // 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 +} + +// IERC1967UpgradeableCallerSession is an auto generated read-only Go binding around an Ethereum contract, +// with pre-set call options. +type IERC1967UpgradeableCallerSession struct { + Contract *IERC1967UpgradeableCaller // Generic contract caller binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session +} + +// IERC1967UpgradeableTransactorSession is an auto generated write-only Go binding around an Ethereum contract, +// with pre-set transact options. +type IERC1967UpgradeableTransactorSession struct { + Contract *IERC1967UpgradeableTransactor // Generic contract transactor binding to set the session for + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// IERC1967UpgradeableRaw is an auto generated low-level Go binding around an Ethereum contract. +type IERC1967UpgradeableRaw struct { + Contract *IERC1967Upgradeable // Generic contract binding to access the raw methods on +} + +// IERC1967UpgradeableCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. +type IERC1967UpgradeableCallerRaw struct { + Contract *IERC1967UpgradeableCaller // Generic read-only contract binding to access the raw methods on +} + +// IERC1967UpgradeableTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. +type IERC1967UpgradeableTransactorRaw struct { + Contract *IERC1967UpgradeableTransactor // Generic write-only contract binding to access the raw methods on +} + +// NewIERC1967Upgradeable creates a new instance of IERC1967Upgradeable, bound to a specific deployed contract. +func NewIERC1967Upgradeable(address common.Address, backend bind.ContractBackend) (*IERC1967Upgradeable, error) { + contract, err := bindIERC1967Upgradeable(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &IERC1967Upgradeable{IERC1967UpgradeableCaller: IERC1967UpgradeableCaller{contract: contract}, IERC1967UpgradeableTransactor: IERC1967UpgradeableTransactor{contract: contract}, IERC1967UpgradeableFilterer: IERC1967UpgradeableFilterer{contract: contract}}, nil +} + +// NewIERC1967UpgradeableCaller creates a new read-only instance of IERC1967Upgradeable, bound to a specific deployed contract. +func NewIERC1967UpgradeableCaller(address common.Address, caller bind.ContractCaller) (*IERC1967UpgradeableCaller, error) { + contract, err := bindIERC1967Upgradeable(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &IERC1967UpgradeableCaller{contract: contract}, nil +} + +// NewIERC1967UpgradeableTransactor creates a new write-only instance of IERC1967Upgradeable, bound to a specific deployed contract. +func NewIERC1967UpgradeableTransactor(address common.Address, transactor bind.ContractTransactor) (*IERC1967UpgradeableTransactor, error) { + contract, err := bindIERC1967Upgradeable(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &IERC1967UpgradeableTransactor{contract: contract}, nil +} + +// NewIERC1967UpgradeableFilterer creates a new log filterer instance of IERC1967Upgradeable, bound to a specific deployed contract. +func NewIERC1967UpgradeableFilterer(address common.Address, filterer bind.ContractFilterer) (*IERC1967UpgradeableFilterer, error) { + contract, err := bindIERC1967Upgradeable(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &IERC1967UpgradeableFilterer{contract: contract}, nil +} + +// bindIERC1967Upgradeable binds a generic wrapper to an already deployed contract. +func bindIERC1967Upgradeable(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := IERC1967UpgradeableMetaData.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 (_IERC1967Upgradeable *IERC1967UpgradeableRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _IERC1967Upgradeable.Contract.IERC1967UpgradeableCaller.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 (_IERC1967Upgradeable *IERC1967UpgradeableRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _IERC1967Upgradeable.Contract.IERC1967UpgradeableTransactor.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_IERC1967Upgradeable *IERC1967UpgradeableRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _IERC1967Upgradeable.Contract.IERC1967UpgradeableTransactor.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 (_IERC1967Upgradeable *IERC1967UpgradeableCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _IERC1967Upgradeable.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 (_IERC1967Upgradeable *IERC1967UpgradeableTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _IERC1967Upgradeable.Contract.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_IERC1967Upgradeable *IERC1967UpgradeableTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _IERC1967Upgradeable.Contract.contract.Transact(opts, method, params...) +} + +// IERC1967UpgradeableAdminChangedIterator is returned from FilterAdminChanged and is used to iterate over the raw logs and unpacked data for AdminChanged events raised by the IERC1967Upgradeable contract. +type IERC1967UpgradeableAdminChangedIterator struct { + Event *IERC1967UpgradeableAdminChanged // 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 *IERC1967UpgradeableAdminChangedIterator) 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(IERC1967UpgradeableAdminChanged) + 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(IERC1967UpgradeableAdminChanged) + 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 *IERC1967UpgradeableAdminChangedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *IERC1967UpgradeableAdminChangedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// IERC1967UpgradeableAdminChanged represents a AdminChanged event raised by the IERC1967Upgradeable contract. +type IERC1967UpgradeableAdminChanged 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 (_IERC1967Upgradeable *IERC1967UpgradeableFilterer) FilterAdminChanged(opts *bind.FilterOpts) (*IERC1967UpgradeableAdminChangedIterator, error) { + + logs, sub, err := _IERC1967Upgradeable.contract.FilterLogs(opts, "AdminChanged") + if err != nil { + return nil, err + } + return &IERC1967UpgradeableAdminChangedIterator{contract: _IERC1967Upgradeable.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 (_IERC1967Upgradeable *IERC1967UpgradeableFilterer) WatchAdminChanged(opts *bind.WatchOpts, sink chan<- *IERC1967UpgradeableAdminChanged) (event.Subscription, error) { + + logs, sub, err := _IERC1967Upgradeable.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(IERC1967UpgradeableAdminChanged) + if err := _IERC1967Upgradeable.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 (_IERC1967Upgradeable *IERC1967UpgradeableFilterer) ParseAdminChanged(log types.Log) (*IERC1967UpgradeableAdminChanged, error) { + event := new(IERC1967UpgradeableAdminChanged) + if err := _IERC1967Upgradeable.contract.UnpackLog(event, "AdminChanged", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// IERC1967UpgradeableBeaconUpgradedIterator is returned from FilterBeaconUpgraded and is used to iterate over the raw logs and unpacked data for BeaconUpgraded events raised by the IERC1967Upgradeable contract. +type IERC1967UpgradeableBeaconUpgradedIterator struct { + Event *IERC1967UpgradeableBeaconUpgraded // 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 *IERC1967UpgradeableBeaconUpgradedIterator) 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(IERC1967UpgradeableBeaconUpgraded) + 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(IERC1967UpgradeableBeaconUpgraded) + 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 *IERC1967UpgradeableBeaconUpgradedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *IERC1967UpgradeableBeaconUpgradedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// IERC1967UpgradeableBeaconUpgraded represents a BeaconUpgraded event raised by the IERC1967Upgradeable contract. +type IERC1967UpgradeableBeaconUpgraded 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 (_IERC1967Upgradeable *IERC1967UpgradeableFilterer) FilterBeaconUpgraded(opts *bind.FilterOpts, beacon []common.Address) (*IERC1967UpgradeableBeaconUpgradedIterator, error) { + + var beaconRule []interface{} + for _, beaconItem := range beacon { + beaconRule = append(beaconRule, beaconItem) + } + + logs, sub, err := _IERC1967Upgradeable.contract.FilterLogs(opts, "BeaconUpgraded", beaconRule) + if err != nil { + return nil, err + } + return &IERC1967UpgradeableBeaconUpgradedIterator{contract: _IERC1967Upgradeable.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 (_IERC1967Upgradeable *IERC1967UpgradeableFilterer) WatchBeaconUpgraded(opts *bind.WatchOpts, sink chan<- *IERC1967UpgradeableBeaconUpgraded, beacon []common.Address) (event.Subscription, error) { + + var beaconRule []interface{} + for _, beaconItem := range beacon { + beaconRule = append(beaconRule, beaconItem) + } + + logs, sub, err := _IERC1967Upgradeable.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(IERC1967UpgradeableBeaconUpgraded) + if err := _IERC1967Upgradeable.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 (_IERC1967Upgradeable *IERC1967UpgradeableFilterer) ParseBeaconUpgraded(log types.Log) (*IERC1967UpgradeableBeaconUpgraded, error) { + event := new(IERC1967UpgradeableBeaconUpgraded) + if err := _IERC1967Upgradeable.contract.UnpackLog(event, "BeaconUpgraded", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// IERC1967UpgradeableUpgradedIterator is returned from FilterUpgraded and is used to iterate over the raw logs and unpacked data for Upgraded events raised by the IERC1967Upgradeable contract. +type IERC1967UpgradeableUpgradedIterator struct { + Event *IERC1967UpgradeableUpgraded // 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 *IERC1967UpgradeableUpgradedIterator) 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(IERC1967UpgradeableUpgraded) + 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(IERC1967UpgradeableUpgraded) + 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 *IERC1967UpgradeableUpgradedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *IERC1967UpgradeableUpgradedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// IERC1967UpgradeableUpgraded represents a Upgraded event raised by the IERC1967Upgradeable contract. +type IERC1967UpgradeableUpgraded 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 (_IERC1967Upgradeable *IERC1967UpgradeableFilterer) FilterUpgraded(opts *bind.FilterOpts, implementation []common.Address) (*IERC1967UpgradeableUpgradedIterator, error) { + + var implementationRule []interface{} + for _, implementationItem := range implementation { + implementationRule = append(implementationRule, implementationItem) + } + + logs, sub, err := _IERC1967Upgradeable.contract.FilterLogs(opts, "Upgraded", implementationRule) + if err != nil { + return nil, err + } + return &IERC1967UpgradeableUpgradedIterator{contract: _IERC1967Upgradeable.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 (_IERC1967Upgradeable *IERC1967UpgradeableFilterer) WatchUpgraded(opts *bind.WatchOpts, sink chan<- *IERC1967UpgradeableUpgraded, implementation []common.Address) (event.Subscription, error) { + + var implementationRule []interface{} + for _, implementationItem := range implementation { + implementationRule = append(implementationRule, implementationItem) + } + + logs, sub, err := _IERC1967Upgradeable.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(IERC1967UpgradeableUpgraded) + if err := _IERC1967Upgradeable.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 (_IERC1967Upgradeable *IERC1967UpgradeableFilterer) ParseUpgraded(log types.Log) (*IERC1967UpgradeableUpgraded, error) { + event := new(IERC1967UpgradeableUpgraded) + if err := _IERC1967Upgradeable.contract.UnpackLog(event, "Upgraded", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} diff --git a/pkg/openzeppelin/contracts-upgradeable/proxy/beacon/ibeaconupgradeable.sol/ibeaconupgradeable.go b/pkg/openzeppelin/contracts-upgradeable/proxy/beacon/ibeaconupgradeable.sol/ibeaconupgradeable.go new file mode 100644 index 00000000..a4a138b4 --- /dev/null +++ b/pkg/openzeppelin/contracts-upgradeable/proxy/beacon/ibeaconupgradeable.sol/ibeaconupgradeable.go @@ -0,0 +1,212 @@ +// Code generated - DO NOT EDIT. +// This file is a generated binding and any manual changes will be lost. + +package ibeaconupgradeable + +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 +) + +// IBeaconUpgradeableMetaData contains all meta data concerning the IBeaconUpgradeable contract. +var IBeaconUpgradeableMetaData = &bind.MetaData{ + ABI: "[{\"inputs\":[],\"name\":\"implementation\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"}]", +} + +// IBeaconUpgradeableABI is the input ABI used to generate the binding from. +// Deprecated: Use IBeaconUpgradeableMetaData.ABI instead. +var IBeaconUpgradeableABI = IBeaconUpgradeableMetaData.ABI + +// IBeaconUpgradeable is an auto generated Go binding around an Ethereum contract. +type IBeaconUpgradeable struct { + IBeaconUpgradeableCaller // Read-only binding to the contract + IBeaconUpgradeableTransactor // Write-only binding to the contract + IBeaconUpgradeableFilterer // Log filterer for contract events +} + +// IBeaconUpgradeableCaller is an auto generated read-only Go binding around an Ethereum contract. +type IBeaconUpgradeableCaller struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// IBeaconUpgradeableTransactor is an auto generated write-only Go binding around an Ethereum contract. +type IBeaconUpgradeableTransactor struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// IBeaconUpgradeableFilterer is an auto generated log filtering Go binding around an Ethereum contract events. +type IBeaconUpgradeableFilterer struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// IBeaconUpgradeableSession is an auto generated Go binding around an Ethereum contract, +// with pre-set call and transact options. +type IBeaconUpgradeableSession struct { + Contract *IBeaconUpgradeable // 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 +} + +// IBeaconUpgradeableCallerSession is an auto generated read-only Go binding around an Ethereum contract, +// with pre-set call options. +type IBeaconUpgradeableCallerSession struct { + Contract *IBeaconUpgradeableCaller // Generic contract caller binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session +} + +// IBeaconUpgradeableTransactorSession is an auto generated write-only Go binding around an Ethereum contract, +// with pre-set transact options. +type IBeaconUpgradeableTransactorSession struct { + Contract *IBeaconUpgradeableTransactor // Generic contract transactor binding to set the session for + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// IBeaconUpgradeableRaw is an auto generated low-level Go binding around an Ethereum contract. +type IBeaconUpgradeableRaw struct { + Contract *IBeaconUpgradeable // Generic contract binding to access the raw methods on +} + +// IBeaconUpgradeableCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. +type IBeaconUpgradeableCallerRaw struct { + Contract *IBeaconUpgradeableCaller // Generic read-only contract binding to access the raw methods on +} + +// IBeaconUpgradeableTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. +type IBeaconUpgradeableTransactorRaw struct { + Contract *IBeaconUpgradeableTransactor // Generic write-only contract binding to access the raw methods on +} + +// NewIBeaconUpgradeable creates a new instance of IBeaconUpgradeable, bound to a specific deployed contract. +func NewIBeaconUpgradeable(address common.Address, backend bind.ContractBackend) (*IBeaconUpgradeable, error) { + contract, err := bindIBeaconUpgradeable(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &IBeaconUpgradeable{IBeaconUpgradeableCaller: IBeaconUpgradeableCaller{contract: contract}, IBeaconUpgradeableTransactor: IBeaconUpgradeableTransactor{contract: contract}, IBeaconUpgradeableFilterer: IBeaconUpgradeableFilterer{contract: contract}}, nil +} + +// NewIBeaconUpgradeableCaller creates a new read-only instance of IBeaconUpgradeable, bound to a specific deployed contract. +func NewIBeaconUpgradeableCaller(address common.Address, caller bind.ContractCaller) (*IBeaconUpgradeableCaller, error) { + contract, err := bindIBeaconUpgradeable(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &IBeaconUpgradeableCaller{contract: contract}, nil +} + +// NewIBeaconUpgradeableTransactor creates a new write-only instance of IBeaconUpgradeable, bound to a specific deployed contract. +func NewIBeaconUpgradeableTransactor(address common.Address, transactor bind.ContractTransactor) (*IBeaconUpgradeableTransactor, error) { + contract, err := bindIBeaconUpgradeable(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &IBeaconUpgradeableTransactor{contract: contract}, nil +} + +// NewIBeaconUpgradeableFilterer creates a new log filterer instance of IBeaconUpgradeable, bound to a specific deployed contract. +func NewIBeaconUpgradeableFilterer(address common.Address, filterer bind.ContractFilterer) (*IBeaconUpgradeableFilterer, error) { + contract, err := bindIBeaconUpgradeable(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &IBeaconUpgradeableFilterer{contract: contract}, nil +} + +// bindIBeaconUpgradeable binds a generic wrapper to an already deployed contract. +func bindIBeaconUpgradeable(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := IBeaconUpgradeableMetaData.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 (_IBeaconUpgradeable *IBeaconUpgradeableRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _IBeaconUpgradeable.Contract.IBeaconUpgradeableCaller.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 (_IBeaconUpgradeable *IBeaconUpgradeableRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _IBeaconUpgradeable.Contract.IBeaconUpgradeableTransactor.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_IBeaconUpgradeable *IBeaconUpgradeableRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _IBeaconUpgradeable.Contract.IBeaconUpgradeableTransactor.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 (_IBeaconUpgradeable *IBeaconUpgradeableCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _IBeaconUpgradeable.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 (_IBeaconUpgradeable *IBeaconUpgradeableTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _IBeaconUpgradeable.Contract.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_IBeaconUpgradeable *IBeaconUpgradeableTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _IBeaconUpgradeable.Contract.contract.Transact(opts, method, params...) +} + +// Implementation is a free data retrieval call binding the contract method 0x5c60da1b. +// +// Solidity: function implementation() view returns(address) +func (_IBeaconUpgradeable *IBeaconUpgradeableCaller) Implementation(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _IBeaconUpgradeable.contract.Call(opts, &out, "implementation") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// Implementation is a free data retrieval call binding the contract method 0x5c60da1b. +// +// Solidity: function implementation() view returns(address) +func (_IBeaconUpgradeable *IBeaconUpgradeableSession) Implementation() (common.Address, error) { + return _IBeaconUpgradeable.Contract.Implementation(&_IBeaconUpgradeable.CallOpts) +} + +// Implementation is a free data retrieval call binding the contract method 0x5c60da1b. +// +// Solidity: function implementation() view returns(address) +func (_IBeaconUpgradeable *IBeaconUpgradeableCallerSession) Implementation() (common.Address, error) { + return _IBeaconUpgradeable.Contract.Implementation(&_IBeaconUpgradeable.CallOpts) +} diff --git a/pkg/openzeppelin/contracts-upgradeable/proxy/erc1967/erc1967upgradeupgradeable.sol/erc1967upgradeupgradeable.go b/pkg/openzeppelin/contracts-upgradeable/proxy/erc1967/erc1967upgradeupgradeable.sol/erc1967upgradeupgradeable.go new file mode 100644 index 00000000..597aa411 --- /dev/null +++ b/pkg/openzeppelin/contracts-upgradeable/proxy/erc1967/erc1967upgradeupgradeable.sol/erc1967upgradeupgradeable.go @@ -0,0 +1,738 @@ +// Code generated - DO NOT EDIT. +// This file is a generated binding and any manual changes will be lost. + +package erc1967upgradeupgradeable + +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 +) + +// ERC1967UpgradeUpgradeableMetaData contains all meta data concerning the ERC1967UpgradeUpgradeable contract. +var ERC1967UpgradeUpgradeableMetaData = &bind.MetaData{ + ABI: "[{\"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\":false,\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"implementation\",\"type\":\"address\"}],\"name\":\"Upgraded\",\"type\":\"event\"}]", +} + +// ERC1967UpgradeUpgradeableABI is the input ABI used to generate the binding from. +// Deprecated: Use ERC1967UpgradeUpgradeableMetaData.ABI instead. +var ERC1967UpgradeUpgradeableABI = ERC1967UpgradeUpgradeableMetaData.ABI + +// ERC1967UpgradeUpgradeable is an auto generated Go binding around an Ethereum contract. +type ERC1967UpgradeUpgradeable struct { + ERC1967UpgradeUpgradeableCaller // Read-only binding to the contract + ERC1967UpgradeUpgradeableTransactor // Write-only binding to the contract + ERC1967UpgradeUpgradeableFilterer // Log filterer for contract events +} + +// ERC1967UpgradeUpgradeableCaller is an auto generated read-only Go binding around an Ethereum contract. +type ERC1967UpgradeUpgradeableCaller struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// ERC1967UpgradeUpgradeableTransactor is an auto generated write-only Go binding around an Ethereum contract. +type ERC1967UpgradeUpgradeableTransactor struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// ERC1967UpgradeUpgradeableFilterer is an auto generated log filtering Go binding around an Ethereum contract events. +type ERC1967UpgradeUpgradeableFilterer struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// ERC1967UpgradeUpgradeableSession is an auto generated Go binding around an Ethereum contract, +// with pre-set call and transact options. +type ERC1967UpgradeUpgradeableSession struct { + Contract *ERC1967UpgradeUpgradeable // 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 +} + +// ERC1967UpgradeUpgradeableCallerSession is an auto generated read-only Go binding around an Ethereum contract, +// with pre-set call options. +type ERC1967UpgradeUpgradeableCallerSession struct { + Contract *ERC1967UpgradeUpgradeableCaller // Generic contract caller binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session +} + +// ERC1967UpgradeUpgradeableTransactorSession is an auto generated write-only Go binding around an Ethereum contract, +// with pre-set transact options. +type ERC1967UpgradeUpgradeableTransactorSession struct { + Contract *ERC1967UpgradeUpgradeableTransactor // Generic contract transactor binding to set the session for + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// ERC1967UpgradeUpgradeableRaw is an auto generated low-level Go binding around an Ethereum contract. +type ERC1967UpgradeUpgradeableRaw struct { + Contract *ERC1967UpgradeUpgradeable // Generic contract binding to access the raw methods on +} + +// ERC1967UpgradeUpgradeableCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. +type ERC1967UpgradeUpgradeableCallerRaw struct { + Contract *ERC1967UpgradeUpgradeableCaller // Generic read-only contract binding to access the raw methods on +} + +// ERC1967UpgradeUpgradeableTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. +type ERC1967UpgradeUpgradeableTransactorRaw struct { + Contract *ERC1967UpgradeUpgradeableTransactor // Generic write-only contract binding to access the raw methods on +} + +// NewERC1967UpgradeUpgradeable creates a new instance of ERC1967UpgradeUpgradeable, bound to a specific deployed contract. +func NewERC1967UpgradeUpgradeable(address common.Address, backend bind.ContractBackend) (*ERC1967UpgradeUpgradeable, error) { + contract, err := bindERC1967UpgradeUpgradeable(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &ERC1967UpgradeUpgradeable{ERC1967UpgradeUpgradeableCaller: ERC1967UpgradeUpgradeableCaller{contract: contract}, ERC1967UpgradeUpgradeableTransactor: ERC1967UpgradeUpgradeableTransactor{contract: contract}, ERC1967UpgradeUpgradeableFilterer: ERC1967UpgradeUpgradeableFilterer{contract: contract}}, nil +} + +// NewERC1967UpgradeUpgradeableCaller creates a new read-only instance of ERC1967UpgradeUpgradeable, bound to a specific deployed contract. +func NewERC1967UpgradeUpgradeableCaller(address common.Address, caller bind.ContractCaller) (*ERC1967UpgradeUpgradeableCaller, error) { + contract, err := bindERC1967UpgradeUpgradeable(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &ERC1967UpgradeUpgradeableCaller{contract: contract}, nil +} + +// NewERC1967UpgradeUpgradeableTransactor creates a new write-only instance of ERC1967UpgradeUpgradeable, bound to a specific deployed contract. +func NewERC1967UpgradeUpgradeableTransactor(address common.Address, transactor bind.ContractTransactor) (*ERC1967UpgradeUpgradeableTransactor, error) { + contract, err := bindERC1967UpgradeUpgradeable(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &ERC1967UpgradeUpgradeableTransactor{contract: contract}, nil +} + +// NewERC1967UpgradeUpgradeableFilterer creates a new log filterer instance of ERC1967UpgradeUpgradeable, bound to a specific deployed contract. +func NewERC1967UpgradeUpgradeableFilterer(address common.Address, filterer bind.ContractFilterer) (*ERC1967UpgradeUpgradeableFilterer, error) { + contract, err := bindERC1967UpgradeUpgradeable(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &ERC1967UpgradeUpgradeableFilterer{contract: contract}, nil +} + +// bindERC1967UpgradeUpgradeable binds a generic wrapper to an already deployed contract. +func bindERC1967UpgradeUpgradeable(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := ERC1967UpgradeUpgradeableMetaData.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 (_ERC1967UpgradeUpgradeable *ERC1967UpgradeUpgradeableRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _ERC1967UpgradeUpgradeable.Contract.ERC1967UpgradeUpgradeableCaller.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 (_ERC1967UpgradeUpgradeable *ERC1967UpgradeUpgradeableRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _ERC1967UpgradeUpgradeable.Contract.ERC1967UpgradeUpgradeableTransactor.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_ERC1967UpgradeUpgradeable *ERC1967UpgradeUpgradeableRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _ERC1967UpgradeUpgradeable.Contract.ERC1967UpgradeUpgradeableTransactor.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 (_ERC1967UpgradeUpgradeable *ERC1967UpgradeUpgradeableCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _ERC1967UpgradeUpgradeable.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 (_ERC1967UpgradeUpgradeable *ERC1967UpgradeUpgradeableTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _ERC1967UpgradeUpgradeable.Contract.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_ERC1967UpgradeUpgradeable *ERC1967UpgradeUpgradeableTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _ERC1967UpgradeUpgradeable.Contract.contract.Transact(opts, method, params...) +} + +// ERC1967UpgradeUpgradeableAdminChangedIterator is returned from FilterAdminChanged and is used to iterate over the raw logs and unpacked data for AdminChanged events raised by the ERC1967UpgradeUpgradeable contract. +type ERC1967UpgradeUpgradeableAdminChangedIterator struct { + Event *ERC1967UpgradeUpgradeableAdminChanged // 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 *ERC1967UpgradeUpgradeableAdminChangedIterator) 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(ERC1967UpgradeUpgradeableAdminChanged) + 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(ERC1967UpgradeUpgradeableAdminChanged) + 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 *ERC1967UpgradeUpgradeableAdminChangedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *ERC1967UpgradeUpgradeableAdminChangedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// ERC1967UpgradeUpgradeableAdminChanged represents a AdminChanged event raised by the ERC1967UpgradeUpgradeable contract. +type ERC1967UpgradeUpgradeableAdminChanged 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 (_ERC1967UpgradeUpgradeable *ERC1967UpgradeUpgradeableFilterer) FilterAdminChanged(opts *bind.FilterOpts) (*ERC1967UpgradeUpgradeableAdminChangedIterator, error) { + + logs, sub, err := _ERC1967UpgradeUpgradeable.contract.FilterLogs(opts, "AdminChanged") + if err != nil { + return nil, err + } + return &ERC1967UpgradeUpgradeableAdminChangedIterator{contract: _ERC1967UpgradeUpgradeable.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 (_ERC1967UpgradeUpgradeable *ERC1967UpgradeUpgradeableFilterer) WatchAdminChanged(opts *bind.WatchOpts, sink chan<- *ERC1967UpgradeUpgradeableAdminChanged) (event.Subscription, error) { + + logs, sub, err := _ERC1967UpgradeUpgradeable.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(ERC1967UpgradeUpgradeableAdminChanged) + if err := _ERC1967UpgradeUpgradeable.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 (_ERC1967UpgradeUpgradeable *ERC1967UpgradeUpgradeableFilterer) ParseAdminChanged(log types.Log) (*ERC1967UpgradeUpgradeableAdminChanged, error) { + event := new(ERC1967UpgradeUpgradeableAdminChanged) + if err := _ERC1967UpgradeUpgradeable.contract.UnpackLog(event, "AdminChanged", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// ERC1967UpgradeUpgradeableBeaconUpgradedIterator is returned from FilterBeaconUpgraded and is used to iterate over the raw logs and unpacked data for BeaconUpgraded events raised by the ERC1967UpgradeUpgradeable contract. +type ERC1967UpgradeUpgradeableBeaconUpgradedIterator struct { + Event *ERC1967UpgradeUpgradeableBeaconUpgraded // 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 *ERC1967UpgradeUpgradeableBeaconUpgradedIterator) 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(ERC1967UpgradeUpgradeableBeaconUpgraded) + 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(ERC1967UpgradeUpgradeableBeaconUpgraded) + 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 *ERC1967UpgradeUpgradeableBeaconUpgradedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *ERC1967UpgradeUpgradeableBeaconUpgradedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// ERC1967UpgradeUpgradeableBeaconUpgraded represents a BeaconUpgraded event raised by the ERC1967UpgradeUpgradeable contract. +type ERC1967UpgradeUpgradeableBeaconUpgraded 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 (_ERC1967UpgradeUpgradeable *ERC1967UpgradeUpgradeableFilterer) FilterBeaconUpgraded(opts *bind.FilterOpts, beacon []common.Address) (*ERC1967UpgradeUpgradeableBeaconUpgradedIterator, error) { + + var beaconRule []interface{} + for _, beaconItem := range beacon { + beaconRule = append(beaconRule, beaconItem) + } + + logs, sub, err := _ERC1967UpgradeUpgradeable.contract.FilterLogs(opts, "BeaconUpgraded", beaconRule) + if err != nil { + return nil, err + } + return &ERC1967UpgradeUpgradeableBeaconUpgradedIterator{contract: _ERC1967UpgradeUpgradeable.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 (_ERC1967UpgradeUpgradeable *ERC1967UpgradeUpgradeableFilterer) WatchBeaconUpgraded(opts *bind.WatchOpts, sink chan<- *ERC1967UpgradeUpgradeableBeaconUpgraded, beacon []common.Address) (event.Subscription, error) { + + var beaconRule []interface{} + for _, beaconItem := range beacon { + beaconRule = append(beaconRule, beaconItem) + } + + logs, sub, err := _ERC1967UpgradeUpgradeable.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(ERC1967UpgradeUpgradeableBeaconUpgraded) + if err := _ERC1967UpgradeUpgradeable.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 (_ERC1967UpgradeUpgradeable *ERC1967UpgradeUpgradeableFilterer) ParseBeaconUpgraded(log types.Log) (*ERC1967UpgradeUpgradeableBeaconUpgraded, error) { + event := new(ERC1967UpgradeUpgradeableBeaconUpgraded) + if err := _ERC1967UpgradeUpgradeable.contract.UnpackLog(event, "BeaconUpgraded", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// ERC1967UpgradeUpgradeableInitializedIterator is returned from FilterInitialized and is used to iterate over the raw logs and unpacked data for Initialized events raised by the ERC1967UpgradeUpgradeable contract. +type ERC1967UpgradeUpgradeableInitializedIterator struct { + Event *ERC1967UpgradeUpgradeableInitialized // 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 *ERC1967UpgradeUpgradeableInitializedIterator) 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(ERC1967UpgradeUpgradeableInitialized) + 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(ERC1967UpgradeUpgradeableInitialized) + 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 *ERC1967UpgradeUpgradeableInitializedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *ERC1967UpgradeUpgradeableInitializedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// ERC1967UpgradeUpgradeableInitialized represents a Initialized event raised by the ERC1967UpgradeUpgradeable contract. +type ERC1967UpgradeUpgradeableInitialized 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 (_ERC1967UpgradeUpgradeable *ERC1967UpgradeUpgradeableFilterer) FilterInitialized(opts *bind.FilterOpts) (*ERC1967UpgradeUpgradeableInitializedIterator, error) { + + logs, sub, err := _ERC1967UpgradeUpgradeable.contract.FilterLogs(opts, "Initialized") + if err != nil { + return nil, err + } + return &ERC1967UpgradeUpgradeableInitializedIterator{contract: _ERC1967UpgradeUpgradeable.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 (_ERC1967UpgradeUpgradeable *ERC1967UpgradeUpgradeableFilterer) WatchInitialized(opts *bind.WatchOpts, sink chan<- *ERC1967UpgradeUpgradeableInitialized) (event.Subscription, error) { + + logs, sub, err := _ERC1967UpgradeUpgradeable.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(ERC1967UpgradeUpgradeableInitialized) + if err := _ERC1967UpgradeUpgradeable.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 (_ERC1967UpgradeUpgradeable *ERC1967UpgradeUpgradeableFilterer) ParseInitialized(log types.Log) (*ERC1967UpgradeUpgradeableInitialized, error) { + event := new(ERC1967UpgradeUpgradeableInitialized) + if err := _ERC1967UpgradeUpgradeable.contract.UnpackLog(event, "Initialized", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// ERC1967UpgradeUpgradeableUpgradedIterator is returned from FilterUpgraded and is used to iterate over the raw logs and unpacked data for Upgraded events raised by the ERC1967UpgradeUpgradeable contract. +type ERC1967UpgradeUpgradeableUpgradedIterator struct { + Event *ERC1967UpgradeUpgradeableUpgraded // 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 *ERC1967UpgradeUpgradeableUpgradedIterator) 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(ERC1967UpgradeUpgradeableUpgraded) + 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(ERC1967UpgradeUpgradeableUpgraded) + 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 *ERC1967UpgradeUpgradeableUpgradedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *ERC1967UpgradeUpgradeableUpgradedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// ERC1967UpgradeUpgradeableUpgraded represents a Upgraded event raised by the ERC1967UpgradeUpgradeable contract. +type ERC1967UpgradeUpgradeableUpgraded 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 (_ERC1967UpgradeUpgradeable *ERC1967UpgradeUpgradeableFilterer) FilterUpgraded(opts *bind.FilterOpts, implementation []common.Address) (*ERC1967UpgradeUpgradeableUpgradedIterator, error) { + + var implementationRule []interface{} + for _, implementationItem := range implementation { + implementationRule = append(implementationRule, implementationItem) + } + + logs, sub, err := _ERC1967UpgradeUpgradeable.contract.FilterLogs(opts, "Upgraded", implementationRule) + if err != nil { + return nil, err + } + return &ERC1967UpgradeUpgradeableUpgradedIterator{contract: _ERC1967UpgradeUpgradeable.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 (_ERC1967UpgradeUpgradeable *ERC1967UpgradeUpgradeableFilterer) WatchUpgraded(opts *bind.WatchOpts, sink chan<- *ERC1967UpgradeUpgradeableUpgraded, implementation []common.Address) (event.Subscription, error) { + + var implementationRule []interface{} + for _, implementationItem := range implementation { + implementationRule = append(implementationRule, implementationItem) + } + + logs, sub, err := _ERC1967UpgradeUpgradeable.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(ERC1967UpgradeUpgradeableUpgraded) + if err := _ERC1967UpgradeUpgradeable.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 (_ERC1967UpgradeUpgradeable *ERC1967UpgradeUpgradeableFilterer) ParseUpgraded(log types.Log) (*ERC1967UpgradeUpgradeableUpgraded, error) { + event := new(ERC1967UpgradeUpgradeableUpgraded) + if err := _ERC1967UpgradeUpgradeable.contract.UnpackLog(event, "Upgraded", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} diff --git a/pkg/openzeppelin/contracts-upgradeable/proxy/utils/initializable.sol/initializable.go b/pkg/openzeppelin/contracts-upgradeable/proxy/utils/initializable.sol/initializable.go new file mode 100644 index 00000000..4ac5afe3 --- /dev/null +++ b/pkg/openzeppelin/contracts-upgradeable/proxy/utils/initializable.sol/initializable.go @@ -0,0 +1,315 @@ +// Code generated - DO NOT EDIT. +// This file is a generated binding and any manual changes will be lost. + +package initializable + +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 +) + +// InitializableMetaData contains all meta data concerning the Initializable contract. +var InitializableMetaData = &bind.MetaData{ + ABI: "[{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"}],\"name\":\"Initialized\",\"type\":\"event\"}]", +} + +// InitializableABI is the input ABI used to generate the binding from. +// Deprecated: Use InitializableMetaData.ABI instead. +var InitializableABI = InitializableMetaData.ABI + +// Initializable is an auto generated Go binding around an Ethereum contract. +type Initializable struct { + InitializableCaller // Read-only binding to the contract + InitializableTransactor // Write-only binding to the contract + InitializableFilterer // Log filterer for contract events +} + +// InitializableCaller is an auto generated read-only Go binding around an Ethereum contract. +type InitializableCaller struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// InitializableTransactor is an auto generated write-only Go binding around an Ethereum contract. +type InitializableTransactor struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// InitializableFilterer is an auto generated log filtering Go binding around an Ethereum contract events. +type InitializableFilterer struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// InitializableSession is an auto generated Go binding around an Ethereum contract, +// with pre-set call and transact options. +type InitializableSession struct { + Contract *Initializable // 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 +} + +// InitializableCallerSession is an auto generated read-only Go binding around an Ethereum contract, +// with pre-set call options. +type InitializableCallerSession struct { + Contract *InitializableCaller // Generic contract caller binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session +} + +// InitializableTransactorSession is an auto generated write-only Go binding around an Ethereum contract, +// with pre-set transact options. +type InitializableTransactorSession struct { + Contract *InitializableTransactor // Generic contract transactor binding to set the session for + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// InitializableRaw is an auto generated low-level Go binding around an Ethereum contract. +type InitializableRaw struct { + Contract *Initializable // Generic contract binding to access the raw methods on +} + +// InitializableCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. +type InitializableCallerRaw struct { + Contract *InitializableCaller // Generic read-only contract binding to access the raw methods on +} + +// InitializableTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. +type InitializableTransactorRaw struct { + Contract *InitializableTransactor // Generic write-only contract binding to access the raw methods on +} + +// NewInitializable creates a new instance of Initializable, bound to a specific deployed contract. +func NewInitializable(address common.Address, backend bind.ContractBackend) (*Initializable, error) { + contract, err := bindInitializable(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &Initializable{InitializableCaller: InitializableCaller{contract: contract}, InitializableTransactor: InitializableTransactor{contract: contract}, InitializableFilterer: InitializableFilterer{contract: contract}}, nil +} + +// NewInitializableCaller creates a new read-only instance of Initializable, bound to a specific deployed contract. +func NewInitializableCaller(address common.Address, caller bind.ContractCaller) (*InitializableCaller, error) { + contract, err := bindInitializable(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &InitializableCaller{contract: contract}, nil +} + +// NewInitializableTransactor creates a new write-only instance of Initializable, bound to a specific deployed contract. +func NewInitializableTransactor(address common.Address, transactor bind.ContractTransactor) (*InitializableTransactor, error) { + contract, err := bindInitializable(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &InitializableTransactor{contract: contract}, nil +} + +// NewInitializableFilterer creates a new log filterer instance of Initializable, bound to a specific deployed contract. +func NewInitializableFilterer(address common.Address, filterer bind.ContractFilterer) (*InitializableFilterer, error) { + contract, err := bindInitializable(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &InitializableFilterer{contract: contract}, nil +} + +// bindInitializable binds a generic wrapper to an already deployed contract. +func bindInitializable(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := InitializableMetaData.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 (_Initializable *InitializableRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _Initializable.Contract.InitializableCaller.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 (_Initializable *InitializableRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _Initializable.Contract.InitializableTransactor.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_Initializable *InitializableRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _Initializable.Contract.InitializableTransactor.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 (_Initializable *InitializableCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _Initializable.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 (_Initializable *InitializableTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _Initializable.Contract.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_Initializable *InitializableTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _Initializable.Contract.contract.Transact(opts, method, params...) +} + +// InitializableInitializedIterator is returned from FilterInitialized and is used to iterate over the raw logs and unpacked data for Initialized events raised by the Initializable contract. +type InitializableInitializedIterator struct { + Event *InitializableInitialized // 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 *InitializableInitializedIterator) 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(InitializableInitialized) + 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(InitializableInitialized) + 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 *InitializableInitializedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *InitializableInitializedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// InitializableInitialized represents a Initialized event raised by the Initializable contract. +type InitializableInitialized 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 (_Initializable *InitializableFilterer) FilterInitialized(opts *bind.FilterOpts) (*InitializableInitializedIterator, error) { + + logs, sub, err := _Initializable.contract.FilterLogs(opts, "Initialized") + if err != nil { + return nil, err + } + return &InitializableInitializedIterator{contract: _Initializable.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 (_Initializable *InitializableFilterer) WatchInitialized(opts *bind.WatchOpts, sink chan<- *InitializableInitialized) (event.Subscription, error) { + + logs, sub, err := _Initializable.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(InitializableInitialized) + if err := _Initializable.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 (_Initializable *InitializableFilterer) ParseInitialized(log types.Log) (*InitializableInitialized, error) { + event := new(InitializableInitialized) + if err := _Initializable.contract.UnpackLog(event, "Initialized", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} diff --git a/pkg/openzeppelin/contracts-upgradeable/proxy/utils/uupsupgradeable.sol/uupsupgradeable.go b/pkg/openzeppelin/contracts-upgradeable/proxy/utils/uupsupgradeable.sol/uupsupgradeable.go new file mode 100644 index 00000000..f91be08a --- /dev/null +++ b/pkg/openzeppelin/contracts-upgradeable/proxy/utils/uupsupgradeable.sol/uupsupgradeable.go @@ -0,0 +1,811 @@ +// Code generated - DO NOT EDIT. +// This file is a generated binding and any manual changes will be lost. + +package uupsupgradeable + +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 +) + +// UUPSUpgradeableMetaData contains all meta data concerning the UUPSUpgradeable contract. +var UUPSUpgradeableMetaData = &bind.MetaData{ + ABI: "[{\"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\":false,\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"implementation\",\"type\":\"address\"}],\"name\":\"Upgraded\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"proxiableUUID\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"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\"}]", +} + +// UUPSUpgradeableABI is the input ABI used to generate the binding from. +// Deprecated: Use UUPSUpgradeableMetaData.ABI instead. +var UUPSUpgradeableABI = UUPSUpgradeableMetaData.ABI + +// UUPSUpgradeable is an auto generated Go binding around an Ethereum contract. +type UUPSUpgradeable struct { + UUPSUpgradeableCaller // Read-only binding to the contract + UUPSUpgradeableTransactor // Write-only binding to the contract + UUPSUpgradeableFilterer // Log filterer for contract events +} + +// UUPSUpgradeableCaller is an auto generated read-only Go binding around an Ethereum contract. +type UUPSUpgradeableCaller struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// UUPSUpgradeableTransactor is an auto generated write-only Go binding around an Ethereum contract. +type UUPSUpgradeableTransactor struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// UUPSUpgradeableFilterer is an auto generated log filtering Go binding around an Ethereum contract events. +type UUPSUpgradeableFilterer struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// UUPSUpgradeableSession is an auto generated Go binding around an Ethereum contract, +// with pre-set call and transact options. +type UUPSUpgradeableSession struct { + Contract *UUPSUpgradeable // 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 +} + +// UUPSUpgradeableCallerSession is an auto generated read-only Go binding around an Ethereum contract, +// with pre-set call options. +type UUPSUpgradeableCallerSession struct { + Contract *UUPSUpgradeableCaller // Generic contract caller binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session +} + +// UUPSUpgradeableTransactorSession is an auto generated write-only Go binding around an Ethereum contract, +// with pre-set transact options. +type UUPSUpgradeableTransactorSession struct { + Contract *UUPSUpgradeableTransactor // Generic contract transactor binding to set the session for + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// UUPSUpgradeableRaw is an auto generated low-level Go binding around an Ethereum contract. +type UUPSUpgradeableRaw struct { + Contract *UUPSUpgradeable // Generic contract binding to access the raw methods on +} + +// UUPSUpgradeableCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. +type UUPSUpgradeableCallerRaw struct { + Contract *UUPSUpgradeableCaller // Generic read-only contract binding to access the raw methods on +} + +// UUPSUpgradeableTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. +type UUPSUpgradeableTransactorRaw struct { + Contract *UUPSUpgradeableTransactor // Generic write-only contract binding to access the raw methods on +} + +// NewUUPSUpgradeable creates a new instance of UUPSUpgradeable, bound to a specific deployed contract. +func NewUUPSUpgradeable(address common.Address, backend bind.ContractBackend) (*UUPSUpgradeable, error) { + contract, err := bindUUPSUpgradeable(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &UUPSUpgradeable{UUPSUpgradeableCaller: UUPSUpgradeableCaller{contract: contract}, UUPSUpgradeableTransactor: UUPSUpgradeableTransactor{contract: contract}, UUPSUpgradeableFilterer: UUPSUpgradeableFilterer{contract: contract}}, nil +} + +// NewUUPSUpgradeableCaller creates a new read-only instance of UUPSUpgradeable, bound to a specific deployed contract. +func NewUUPSUpgradeableCaller(address common.Address, caller bind.ContractCaller) (*UUPSUpgradeableCaller, error) { + contract, err := bindUUPSUpgradeable(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &UUPSUpgradeableCaller{contract: contract}, nil +} + +// NewUUPSUpgradeableTransactor creates a new write-only instance of UUPSUpgradeable, bound to a specific deployed contract. +func NewUUPSUpgradeableTransactor(address common.Address, transactor bind.ContractTransactor) (*UUPSUpgradeableTransactor, error) { + contract, err := bindUUPSUpgradeable(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &UUPSUpgradeableTransactor{contract: contract}, nil +} + +// NewUUPSUpgradeableFilterer creates a new log filterer instance of UUPSUpgradeable, bound to a specific deployed contract. +func NewUUPSUpgradeableFilterer(address common.Address, filterer bind.ContractFilterer) (*UUPSUpgradeableFilterer, error) { + contract, err := bindUUPSUpgradeable(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &UUPSUpgradeableFilterer{contract: contract}, nil +} + +// bindUUPSUpgradeable binds a generic wrapper to an already deployed contract. +func bindUUPSUpgradeable(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := UUPSUpgradeableMetaData.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 (_UUPSUpgradeable *UUPSUpgradeableRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _UUPSUpgradeable.Contract.UUPSUpgradeableCaller.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 (_UUPSUpgradeable *UUPSUpgradeableRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _UUPSUpgradeable.Contract.UUPSUpgradeableTransactor.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_UUPSUpgradeable *UUPSUpgradeableRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _UUPSUpgradeable.Contract.UUPSUpgradeableTransactor.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 (_UUPSUpgradeable *UUPSUpgradeableCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _UUPSUpgradeable.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 (_UUPSUpgradeable *UUPSUpgradeableTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _UUPSUpgradeable.Contract.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_UUPSUpgradeable *UUPSUpgradeableTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _UUPSUpgradeable.Contract.contract.Transact(opts, method, params...) +} + +// ProxiableUUID is a free data retrieval call binding the contract method 0x52d1902d. +// +// Solidity: function proxiableUUID() view returns(bytes32) +func (_UUPSUpgradeable *UUPSUpgradeableCaller) ProxiableUUID(opts *bind.CallOpts) ([32]byte, error) { + var out []interface{} + err := _UUPSUpgradeable.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 (_UUPSUpgradeable *UUPSUpgradeableSession) ProxiableUUID() ([32]byte, error) { + return _UUPSUpgradeable.Contract.ProxiableUUID(&_UUPSUpgradeable.CallOpts) +} + +// ProxiableUUID is a free data retrieval call binding the contract method 0x52d1902d. +// +// Solidity: function proxiableUUID() view returns(bytes32) +func (_UUPSUpgradeable *UUPSUpgradeableCallerSession) ProxiableUUID() ([32]byte, error) { + return _UUPSUpgradeable.Contract.ProxiableUUID(&_UUPSUpgradeable.CallOpts) +} + +// UpgradeTo is a paid mutator transaction binding the contract method 0x3659cfe6. +// +// Solidity: function upgradeTo(address newImplementation) returns() +func (_UUPSUpgradeable *UUPSUpgradeableTransactor) UpgradeTo(opts *bind.TransactOpts, newImplementation common.Address) (*types.Transaction, error) { + return _UUPSUpgradeable.contract.Transact(opts, "upgradeTo", newImplementation) +} + +// UpgradeTo is a paid mutator transaction binding the contract method 0x3659cfe6. +// +// Solidity: function upgradeTo(address newImplementation) returns() +func (_UUPSUpgradeable *UUPSUpgradeableSession) UpgradeTo(newImplementation common.Address) (*types.Transaction, error) { + return _UUPSUpgradeable.Contract.UpgradeTo(&_UUPSUpgradeable.TransactOpts, newImplementation) +} + +// UpgradeTo is a paid mutator transaction binding the contract method 0x3659cfe6. +// +// Solidity: function upgradeTo(address newImplementation) returns() +func (_UUPSUpgradeable *UUPSUpgradeableTransactorSession) UpgradeTo(newImplementation common.Address) (*types.Transaction, error) { + return _UUPSUpgradeable.Contract.UpgradeTo(&_UUPSUpgradeable.TransactOpts, newImplementation) +} + +// UpgradeToAndCall is a paid mutator transaction binding the contract method 0x4f1ef286. +// +// Solidity: function upgradeToAndCall(address newImplementation, bytes data) payable returns() +func (_UUPSUpgradeable *UUPSUpgradeableTransactor) UpgradeToAndCall(opts *bind.TransactOpts, newImplementation common.Address, data []byte) (*types.Transaction, error) { + return _UUPSUpgradeable.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 (_UUPSUpgradeable *UUPSUpgradeableSession) UpgradeToAndCall(newImplementation common.Address, data []byte) (*types.Transaction, error) { + return _UUPSUpgradeable.Contract.UpgradeToAndCall(&_UUPSUpgradeable.TransactOpts, newImplementation, data) +} + +// UpgradeToAndCall is a paid mutator transaction binding the contract method 0x4f1ef286. +// +// Solidity: function upgradeToAndCall(address newImplementation, bytes data) payable returns() +func (_UUPSUpgradeable *UUPSUpgradeableTransactorSession) UpgradeToAndCall(newImplementation common.Address, data []byte) (*types.Transaction, error) { + return _UUPSUpgradeable.Contract.UpgradeToAndCall(&_UUPSUpgradeable.TransactOpts, newImplementation, data) +} + +// UUPSUpgradeableAdminChangedIterator is returned from FilterAdminChanged and is used to iterate over the raw logs and unpacked data for AdminChanged events raised by the UUPSUpgradeable contract. +type UUPSUpgradeableAdminChangedIterator struct { + Event *UUPSUpgradeableAdminChanged // 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 *UUPSUpgradeableAdminChangedIterator) 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(UUPSUpgradeableAdminChanged) + 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(UUPSUpgradeableAdminChanged) + 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 *UUPSUpgradeableAdminChangedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *UUPSUpgradeableAdminChangedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// UUPSUpgradeableAdminChanged represents a AdminChanged event raised by the UUPSUpgradeable contract. +type UUPSUpgradeableAdminChanged 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 (_UUPSUpgradeable *UUPSUpgradeableFilterer) FilterAdminChanged(opts *bind.FilterOpts) (*UUPSUpgradeableAdminChangedIterator, error) { + + logs, sub, err := _UUPSUpgradeable.contract.FilterLogs(opts, "AdminChanged") + if err != nil { + return nil, err + } + return &UUPSUpgradeableAdminChangedIterator{contract: _UUPSUpgradeable.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 (_UUPSUpgradeable *UUPSUpgradeableFilterer) WatchAdminChanged(opts *bind.WatchOpts, sink chan<- *UUPSUpgradeableAdminChanged) (event.Subscription, error) { + + logs, sub, err := _UUPSUpgradeable.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(UUPSUpgradeableAdminChanged) + if err := _UUPSUpgradeable.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 (_UUPSUpgradeable *UUPSUpgradeableFilterer) ParseAdminChanged(log types.Log) (*UUPSUpgradeableAdminChanged, error) { + event := new(UUPSUpgradeableAdminChanged) + if err := _UUPSUpgradeable.contract.UnpackLog(event, "AdminChanged", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// UUPSUpgradeableBeaconUpgradedIterator is returned from FilterBeaconUpgraded and is used to iterate over the raw logs and unpacked data for BeaconUpgraded events raised by the UUPSUpgradeable contract. +type UUPSUpgradeableBeaconUpgradedIterator struct { + Event *UUPSUpgradeableBeaconUpgraded // 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 *UUPSUpgradeableBeaconUpgradedIterator) 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(UUPSUpgradeableBeaconUpgraded) + 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(UUPSUpgradeableBeaconUpgraded) + 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 *UUPSUpgradeableBeaconUpgradedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *UUPSUpgradeableBeaconUpgradedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// UUPSUpgradeableBeaconUpgraded represents a BeaconUpgraded event raised by the UUPSUpgradeable contract. +type UUPSUpgradeableBeaconUpgraded 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 (_UUPSUpgradeable *UUPSUpgradeableFilterer) FilterBeaconUpgraded(opts *bind.FilterOpts, beacon []common.Address) (*UUPSUpgradeableBeaconUpgradedIterator, error) { + + var beaconRule []interface{} + for _, beaconItem := range beacon { + beaconRule = append(beaconRule, beaconItem) + } + + logs, sub, err := _UUPSUpgradeable.contract.FilterLogs(opts, "BeaconUpgraded", beaconRule) + if err != nil { + return nil, err + } + return &UUPSUpgradeableBeaconUpgradedIterator{contract: _UUPSUpgradeable.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 (_UUPSUpgradeable *UUPSUpgradeableFilterer) WatchBeaconUpgraded(opts *bind.WatchOpts, sink chan<- *UUPSUpgradeableBeaconUpgraded, beacon []common.Address) (event.Subscription, error) { + + var beaconRule []interface{} + for _, beaconItem := range beacon { + beaconRule = append(beaconRule, beaconItem) + } + + logs, sub, err := _UUPSUpgradeable.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(UUPSUpgradeableBeaconUpgraded) + if err := _UUPSUpgradeable.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 (_UUPSUpgradeable *UUPSUpgradeableFilterer) ParseBeaconUpgraded(log types.Log) (*UUPSUpgradeableBeaconUpgraded, error) { + event := new(UUPSUpgradeableBeaconUpgraded) + if err := _UUPSUpgradeable.contract.UnpackLog(event, "BeaconUpgraded", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// UUPSUpgradeableInitializedIterator is returned from FilterInitialized and is used to iterate over the raw logs and unpacked data for Initialized events raised by the UUPSUpgradeable contract. +type UUPSUpgradeableInitializedIterator struct { + Event *UUPSUpgradeableInitialized // 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 *UUPSUpgradeableInitializedIterator) 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(UUPSUpgradeableInitialized) + 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(UUPSUpgradeableInitialized) + 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 *UUPSUpgradeableInitializedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *UUPSUpgradeableInitializedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// UUPSUpgradeableInitialized represents a Initialized event raised by the UUPSUpgradeable contract. +type UUPSUpgradeableInitialized 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 (_UUPSUpgradeable *UUPSUpgradeableFilterer) FilterInitialized(opts *bind.FilterOpts) (*UUPSUpgradeableInitializedIterator, error) { + + logs, sub, err := _UUPSUpgradeable.contract.FilterLogs(opts, "Initialized") + if err != nil { + return nil, err + } + return &UUPSUpgradeableInitializedIterator{contract: _UUPSUpgradeable.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 (_UUPSUpgradeable *UUPSUpgradeableFilterer) WatchInitialized(opts *bind.WatchOpts, sink chan<- *UUPSUpgradeableInitialized) (event.Subscription, error) { + + logs, sub, err := _UUPSUpgradeable.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(UUPSUpgradeableInitialized) + if err := _UUPSUpgradeable.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 (_UUPSUpgradeable *UUPSUpgradeableFilterer) ParseInitialized(log types.Log) (*UUPSUpgradeableInitialized, error) { + event := new(UUPSUpgradeableInitialized) + if err := _UUPSUpgradeable.contract.UnpackLog(event, "Initialized", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// UUPSUpgradeableUpgradedIterator is returned from FilterUpgraded and is used to iterate over the raw logs and unpacked data for Upgraded events raised by the UUPSUpgradeable contract. +type UUPSUpgradeableUpgradedIterator struct { + Event *UUPSUpgradeableUpgraded // 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 *UUPSUpgradeableUpgradedIterator) 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(UUPSUpgradeableUpgraded) + 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(UUPSUpgradeableUpgraded) + 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 *UUPSUpgradeableUpgradedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *UUPSUpgradeableUpgradedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// UUPSUpgradeableUpgraded represents a Upgraded event raised by the UUPSUpgradeable contract. +type UUPSUpgradeableUpgraded 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 (_UUPSUpgradeable *UUPSUpgradeableFilterer) FilterUpgraded(opts *bind.FilterOpts, implementation []common.Address) (*UUPSUpgradeableUpgradedIterator, error) { + + var implementationRule []interface{} + for _, implementationItem := range implementation { + implementationRule = append(implementationRule, implementationItem) + } + + logs, sub, err := _UUPSUpgradeable.contract.FilterLogs(opts, "Upgraded", implementationRule) + if err != nil { + return nil, err + } + return &UUPSUpgradeableUpgradedIterator{contract: _UUPSUpgradeable.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 (_UUPSUpgradeable *UUPSUpgradeableFilterer) WatchUpgraded(opts *bind.WatchOpts, sink chan<- *UUPSUpgradeableUpgraded, implementation []common.Address) (event.Subscription, error) { + + var implementationRule []interface{} + for _, implementationItem := range implementation { + implementationRule = append(implementationRule, implementationItem) + } + + logs, sub, err := _UUPSUpgradeable.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(UUPSUpgradeableUpgraded) + if err := _UUPSUpgradeable.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 (_UUPSUpgradeable *UUPSUpgradeableFilterer) ParseUpgraded(log types.Log) (*UUPSUpgradeableUpgraded, error) { + event := new(UUPSUpgradeableUpgraded) + if err := _UUPSUpgradeable.contract.UnpackLog(event, "Upgraded", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} diff --git a/pkg/openzeppelin/contracts-upgradeable/utils/addressupgradeable.sol/addressupgradeable.go b/pkg/openzeppelin/contracts-upgradeable/utils/addressupgradeable.sol/addressupgradeable.go new file mode 100644 index 00000000..4b250099 --- /dev/null +++ b/pkg/openzeppelin/contracts-upgradeable/utils/addressupgradeable.sol/addressupgradeable.go @@ -0,0 +1,203 @@ +// Code generated - DO NOT EDIT. +// This file is a generated binding and any manual changes will be lost. + +package addressupgradeable + +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 +) + +// AddressUpgradeableMetaData contains all meta data concerning the AddressUpgradeable contract. +var AddressUpgradeableMetaData = &bind.MetaData{ + ABI: "[]", + Bin: "0x60566050600b82828239805160001a6073146043577f4e487b7100000000000000000000000000000000000000000000000000000000600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220bb9977b6b2ae9fdaa9573cc7ef606484b9a47ba5e63f00c602b173471d15b20a64736f6c63430008070033", +} + +// AddressUpgradeableABI is the input ABI used to generate the binding from. +// Deprecated: Use AddressUpgradeableMetaData.ABI instead. +var AddressUpgradeableABI = AddressUpgradeableMetaData.ABI + +// AddressUpgradeableBin is the compiled bytecode used for deploying new contracts. +// Deprecated: Use AddressUpgradeableMetaData.Bin instead. +var AddressUpgradeableBin = AddressUpgradeableMetaData.Bin + +// DeployAddressUpgradeable deploys a new Ethereum contract, binding an instance of AddressUpgradeable to it. +func DeployAddressUpgradeable(auth *bind.TransactOpts, backend bind.ContractBackend) (common.Address, *types.Transaction, *AddressUpgradeable, error) { + parsed, err := AddressUpgradeableMetaData.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(AddressUpgradeableBin), backend) + if err != nil { + return common.Address{}, nil, nil, err + } + return address, tx, &AddressUpgradeable{AddressUpgradeableCaller: AddressUpgradeableCaller{contract: contract}, AddressUpgradeableTransactor: AddressUpgradeableTransactor{contract: contract}, AddressUpgradeableFilterer: AddressUpgradeableFilterer{contract: contract}}, nil +} + +// AddressUpgradeable is an auto generated Go binding around an Ethereum contract. +type AddressUpgradeable struct { + AddressUpgradeableCaller // Read-only binding to the contract + AddressUpgradeableTransactor // Write-only binding to the contract + AddressUpgradeableFilterer // Log filterer for contract events +} + +// AddressUpgradeableCaller is an auto generated read-only Go binding around an Ethereum contract. +type AddressUpgradeableCaller struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// AddressUpgradeableTransactor is an auto generated write-only Go binding around an Ethereum contract. +type AddressUpgradeableTransactor struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// AddressUpgradeableFilterer is an auto generated log filtering Go binding around an Ethereum contract events. +type AddressUpgradeableFilterer struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// AddressUpgradeableSession is an auto generated Go binding around an Ethereum contract, +// with pre-set call and transact options. +type AddressUpgradeableSession struct { + Contract *AddressUpgradeable // 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 +} + +// AddressUpgradeableCallerSession is an auto generated read-only Go binding around an Ethereum contract, +// with pre-set call options. +type AddressUpgradeableCallerSession struct { + Contract *AddressUpgradeableCaller // Generic contract caller binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session +} + +// AddressUpgradeableTransactorSession is an auto generated write-only Go binding around an Ethereum contract, +// with pre-set transact options. +type AddressUpgradeableTransactorSession struct { + Contract *AddressUpgradeableTransactor // Generic contract transactor binding to set the session for + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// AddressUpgradeableRaw is an auto generated low-level Go binding around an Ethereum contract. +type AddressUpgradeableRaw struct { + Contract *AddressUpgradeable // Generic contract binding to access the raw methods on +} + +// AddressUpgradeableCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. +type AddressUpgradeableCallerRaw struct { + Contract *AddressUpgradeableCaller // Generic read-only contract binding to access the raw methods on +} + +// AddressUpgradeableTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. +type AddressUpgradeableTransactorRaw struct { + Contract *AddressUpgradeableTransactor // Generic write-only contract binding to access the raw methods on +} + +// NewAddressUpgradeable creates a new instance of AddressUpgradeable, bound to a specific deployed contract. +func NewAddressUpgradeable(address common.Address, backend bind.ContractBackend) (*AddressUpgradeable, error) { + contract, err := bindAddressUpgradeable(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &AddressUpgradeable{AddressUpgradeableCaller: AddressUpgradeableCaller{contract: contract}, AddressUpgradeableTransactor: AddressUpgradeableTransactor{contract: contract}, AddressUpgradeableFilterer: AddressUpgradeableFilterer{contract: contract}}, nil +} + +// NewAddressUpgradeableCaller creates a new read-only instance of AddressUpgradeable, bound to a specific deployed contract. +func NewAddressUpgradeableCaller(address common.Address, caller bind.ContractCaller) (*AddressUpgradeableCaller, error) { + contract, err := bindAddressUpgradeable(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &AddressUpgradeableCaller{contract: contract}, nil +} + +// NewAddressUpgradeableTransactor creates a new write-only instance of AddressUpgradeable, bound to a specific deployed contract. +func NewAddressUpgradeableTransactor(address common.Address, transactor bind.ContractTransactor) (*AddressUpgradeableTransactor, error) { + contract, err := bindAddressUpgradeable(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &AddressUpgradeableTransactor{contract: contract}, nil +} + +// NewAddressUpgradeableFilterer creates a new log filterer instance of AddressUpgradeable, bound to a specific deployed contract. +func NewAddressUpgradeableFilterer(address common.Address, filterer bind.ContractFilterer) (*AddressUpgradeableFilterer, error) { + contract, err := bindAddressUpgradeable(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &AddressUpgradeableFilterer{contract: contract}, nil +} + +// bindAddressUpgradeable binds a generic wrapper to an already deployed contract. +func bindAddressUpgradeable(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := AddressUpgradeableMetaData.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 (_AddressUpgradeable *AddressUpgradeableRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _AddressUpgradeable.Contract.AddressUpgradeableCaller.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 (_AddressUpgradeable *AddressUpgradeableRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _AddressUpgradeable.Contract.AddressUpgradeableTransactor.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_AddressUpgradeable *AddressUpgradeableRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _AddressUpgradeable.Contract.AddressUpgradeableTransactor.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 (_AddressUpgradeable *AddressUpgradeableCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _AddressUpgradeable.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 (_AddressUpgradeable *AddressUpgradeableTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _AddressUpgradeable.Contract.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_AddressUpgradeable *AddressUpgradeableTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _AddressUpgradeable.Contract.contract.Transact(opts, method, params...) +} diff --git a/pkg/openzeppelin/contracts-upgradeable/utils/contextupgradeable.sol/contextupgradeable.go b/pkg/openzeppelin/contracts-upgradeable/utils/contextupgradeable.sol/contextupgradeable.go new file mode 100644 index 00000000..bcd2aa90 --- /dev/null +++ b/pkg/openzeppelin/contracts-upgradeable/utils/contextupgradeable.sol/contextupgradeable.go @@ -0,0 +1,315 @@ +// Code generated - DO NOT EDIT. +// This file is a generated binding and any manual changes will be lost. + +package contextupgradeable + +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 +) + +// ContextUpgradeableMetaData contains all meta data concerning the ContextUpgradeable contract. +var ContextUpgradeableMetaData = &bind.MetaData{ + ABI: "[{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"}],\"name\":\"Initialized\",\"type\":\"event\"}]", +} + +// ContextUpgradeableABI is the input ABI used to generate the binding from. +// Deprecated: Use ContextUpgradeableMetaData.ABI instead. +var ContextUpgradeableABI = ContextUpgradeableMetaData.ABI + +// ContextUpgradeable is an auto generated Go binding around an Ethereum contract. +type ContextUpgradeable struct { + ContextUpgradeableCaller // Read-only binding to the contract + ContextUpgradeableTransactor // Write-only binding to the contract + ContextUpgradeableFilterer // Log filterer for contract events +} + +// ContextUpgradeableCaller is an auto generated read-only Go binding around an Ethereum contract. +type ContextUpgradeableCaller struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// ContextUpgradeableTransactor is an auto generated write-only Go binding around an Ethereum contract. +type ContextUpgradeableTransactor struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// ContextUpgradeableFilterer is an auto generated log filtering Go binding around an Ethereum contract events. +type ContextUpgradeableFilterer struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// ContextUpgradeableSession is an auto generated Go binding around an Ethereum contract, +// with pre-set call and transact options. +type ContextUpgradeableSession struct { + Contract *ContextUpgradeable // 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 +} + +// ContextUpgradeableCallerSession is an auto generated read-only Go binding around an Ethereum contract, +// with pre-set call options. +type ContextUpgradeableCallerSession struct { + Contract *ContextUpgradeableCaller // Generic contract caller binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session +} + +// ContextUpgradeableTransactorSession is an auto generated write-only Go binding around an Ethereum contract, +// with pre-set transact options. +type ContextUpgradeableTransactorSession struct { + Contract *ContextUpgradeableTransactor // Generic contract transactor binding to set the session for + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// ContextUpgradeableRaw is an auto generated low-level Go binding around an Ethereum contract. +type ContextUpgradeableRaw struct { + Contract *ContextUpgradeable // Generic contract binding to access the raw methods on +} + +// ContextUpgradeableCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. +type ContextUpgradeableCallerRaw struct { + Contract *ContextUpgradeableCaller // Generic read-only contract binding to access the raw methods on +} + +// ContextUpgradeableTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. +type ContextUpgradeableTransactorRaw struct { + Contract *ContextUpgradeableTransactor // Generic write-only contract binding to access the raw methods on +} + +// NewContextUpgradeable creates a new instance of ContextUpgradeable, bound to a specific deployed contract. +func NewContextUpgradeable(address common.Address, backend bind.ContractBackend) (*ContextUpgradeable, error) { + contract, err := bindContextUpgradeable(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &ContextUpgradeable{ContextUpgradeableCaller: ContextUpgradeableCaller{contract: contract}, ContextUpgradeableTransactor: ContextUpgradeableTransactor{contract: contract}, ContextUpgradeableFilterer: ContextUpgradeableFilterer{contract: contract}}, nil +} + +// NewContextUpgradeableCaller creates a new read-only instance of ContextUpgradeable, bound to a specific deployed contract. +func NewContextUpgradeableCaller(address common.Address, caller bind.ContractCaller) (*ContextUpgradeableCaller, error) { + contract, err := bindContextUpgradeable(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &ContextUpgradeableCaller{contract: contract}, nil +} + +// NewContextUpgradeableTransactor creates a new write-only instance of ContextUpgradeable, bound to a specific deployed contract. +func NewContextUpgradeableTransactor(address common.Address, transactor bind.ContractTransactor) (*ContextUpgradeableTransactor, error) { + contract, err := bindContextUpgradeable(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &ContextUpgradeableTransactor{contract: contract}, nil +} + +// NewContextUpgradeableFilterer creates a new log filterer instance of ContextUpgradeable, bound to a specific deployed contract. +func NewContextUpgradeableFilterer(address common.Address, filterer bind.ContractFilterer) (*ContextUpgradeableFilterer, error) { + contract, err := bindContextUpgradeable(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &ContextUpgradeableFilterer{contract: contract}, nil +} + +// bindContextUpgradeable binds a generic wrapper to an already deployed contract. +func bindContextUpgradeable(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := ContextUpgradeableMetaData.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 (_ContextUpgradeable *ContextUpgradeableRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _ContextUpgradeable.Contract.ContextUpgradeableCaller.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 (_ContextUpgradeable *ContextUpgradeableRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _ContextUpgradeable.Contract.ContextUpgradeableTransactor.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_ContextUpgradeable *ContextUpgradeableRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _ContextUpgradeable.Contract.ContextUpgradeableTransactor.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 (_ContextUpgradeable *ContextUpgradeableCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _ContextUpgradeable.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 (_ContextUpgradeable *ContextUpgradeableTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _ContextUpgradeable.Contract.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_ContextUpgradeable *ContextUpgradeableTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _ContextUpgradeable.Contract.contract.Transact(opts, method, params...) +} + +// ContextUpgradeableInitializedIterator is returned from FilterInitialized and is used to iterate over the raw logs and unpacked data for Initialized events raised by the ContextUpgradeable contract. +type ContextUpgradeableInitializedIterator struct { + Event *ContextUpgradeableInitialized // 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 *ContextUpgradeableInitializedIterator) 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(ContextUpgradeableInitialized) + 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(ContextUpgradeableInitialized) + 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 *ContextUpgradeableInitializedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *ContextUpgradeableInitializedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// ContextUpgradeableInitialized represents a Initialized event raised by the ContextUpgradeable contract. +type ContextUpgradeableInitialized 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 (_ContextUpgradeable *ContextUpgradeableFilterer) FilterInitialized(opts *bind.FilterOpts) (*ContextUpgradeableInitializedIterator, error) { + + logs, sub, err := _ContextUpgradeable.contract.FilterLogs(opts, "Initialized") + if err != nil { + return nil, err + } + return &ContextUpgradeableInitializedIterator{contract: _ContextUpgradeable.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 (_ContextUpgradeable *ContextUpgradeableFilterer) WatchInitialized(opts *bind.WatchOpts, sink chan<- *ContextUpgradeableInitialized) (event.Subscription, error) { + + logs, sub, err := _ContextUpgradeable.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(ContextUpgradeableInitialized) + if err := _ContextUpgradeable.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 (_ContextUpgradeable *ContextUpgradeableFilterer) ParseInitialized(log types.Log) (*ContextUpgradeableInitialized, error) { + event := new(ContextUpgradeableInitialized) + if err := _ContextUpgradeable.contract.UnpackLog(event, "Initialized", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} diff --git a/pkg/openzeppelin/contracts-upgradeable/utils/storageslotupgradeable.sol/storageslotupgradeable.go b/pkg/openzeppelin/contracts-upgradeable/utils/storageslotupgradeable.sol/storageslotupgradeable.go new file mode 100644 index 00000000..5e1b607e --- /dev/null +++ b/pkg/openzeppelin/contracts-upgradeable/utils/storageslotupgradeable.sol/storageslotupgradeable.go @@ -0,0 +1,203 @@ +// Code generated - DO NOT EDIT. +// This file is a generated binding and any manual changes will be lost. + +package storageslotupgradeable + +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 +) + +// StorageSlotUpgradeableMetaData contains all meta data concerning the StorageSlotUpgradeable contract. +var StorageSlotUpgradeableMetaData = &bind.MetaData{ + ABI: "[]", + Bin: "0x60566050600b82828239805160001a6073146043577f4e487b7100000000000000000000000000000000000000000000000000000000600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220e18234fba4711fe8a78c85843309b44a2dc320c8280807033ee03f351f0af3ae64736f6c63430008070033", +} + +// StorageSlotUpgradeableABI is the input ABI used to generate the binding from. +// Deprecated: Use StorageSlotUpgradeableMetaData.ABI instead. +var StorageSlotUpgradeableABI = StorageSlotUpgradeableMetaData.ABI + +// StorageSlotUpgradeableBin is the compiled bytecode used for deploying new contracts. +// Deprecated: Use StorageSlotUpgradeableMetaData.Bin instead. +var StorageSlotUpgradeableBin = StorageSlotUpgradeableMetaData.Bin + +// DeployStorageSlotUpgradeable deploys a new Ethereum contract, binding an instance of StorageSlotUpgradeable to it. +func DeployStorageSlotUpgradeable(auth *bind.TransactOpts, backend bind.ContractBackend) (common.Address, *types.Transaction, *StorageSlotUpgradeable, error) { + parsed, err := StorageSlotUpgradeableMetaData.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(StorageSlotUpgradeableBin), backend) + if err != nil { + return common.Address{}, nil, nil, err + } + return address, tx, &StorageSlotUpgradeable{StorageSlotUpgradeableCaller: StorageSlotUpgradeableCaller{contract: contract}, StorageSlotUpgradeableTransactor: StorageSlotUpgradeableTransactor{contract: contract}, StorageSlotUpgradeableFilterer: StorageSlotUpgradeableFilterer{contract: contract}}, nil +} + +// StorageSlotUpgradeable is an auto generated Go binding around an Ethereum contract. +type StorageSlotUpgradeable struct { + StorageSlotUpgradeableCaller // Read-only binding to the contract + StorageSlotUpgradeableTransactor // Write-only binding to the contract + StorageSlotUpgradeableFilterer // Log filterer for contract events +} + +// StorageSlotUpgradeableCaller is an auto generated read-only Go binding around an Ethereum contract. +type StorageSlotUpgradeableCaller struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// StorageSlotUpgradeableTransactor is an auto generated write-only Go binding around an Ethereum contract. +type StorageSlotUpgradeableTransactor struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// StorageSlotUpgradeableFilterer is an auto generated log filtering Go binding around an Ethereum contract events. +type StorageSlotUpgradeableFilterer struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// StorageSlotUpgradeableSession is an auto generated Go binding around an Ethereum contract, +// with pre-set call and transact options. +type StorageSlotUpgradeableSession struct { + Contract *StorageSlotUpgradeable // 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 +} + +// StorageSlotUpgradeableCallerSession is an auto generated read-only Go binding around an Ethereum contract, +// with pre-set call options. +type StorageSlotUpgradeableCallerSession struct { + Contract *StorageSlotUpgradeableCaller // Generic contract caller binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session +} + +// StorageSlotUpgradeableTransactorSession is an auto generated write-only Go binding around an Ethereum contract, +// with pre-set transact options. +type StorageSlotUpgradeableTransactorSession struct { + Contract *StorageSlotUpgradeableTransactor // Generic contract transactor binding to set the session for + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// StorageSlotUpgradeableRaw is an auto generated low-level Go binding around an Ethereum contract. +type StorageSlotUpgradeableRaw struct { + Contract *StorageSlotUpgradeable // Generic contract binding to access the raw methods on +} + +// StorageSlotUpgradeableCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. +type StorageSlotUpgradeableCallerRaw struct { + Contract *StorageSlotUpgradeableCaller // Generic read-only contract binding to access the raw methods on +} + +// StorageSlotUpgradeableTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. +type StorageSlotUpgradeableTransactorRaw struct { + Contract *StorageSlotUpgradeableTransactor // Generic write-only contract binding to access the raw methods on +} + +// NewStorageSlotUpgradeable creates a new instance of StorageSlotUpgradeable, bound to a specific deployed contract. +func NewStorageSlotUpgradeable(address common.Address, backend bind.ContractBackend) (*StorageSlotUpgradeable, error) { + contract, err := bindStorageSlotUpgradeable(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &StorageSlotUpgradeable{StorageSlotUpgradeableCaller: StorageSlotUpgradeableCaller{contract: contract}, StorageSlotUpgradeableTransactor: StorageSlotUpgradeableTransactor{contract: contract}, StorageSlotUpgradeableFilterer: StorageSlotUpgradeableFilterer{contract: contract}}, nil +} + +// NewStorageSlotUpgradeableCaller creates a new read-only instance of StorageSlotUpgradeable, bound to a specific deployed contract. +func NewStorageSlotUpgradeableCaller(address common.Address, caller bind.ContractCaller) (*StorageSlotUpgradeableCaller, error) { + contract, err := bindStorageSlotUpgradeable(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &StorageSlotUpgradeableCaller{contract: contract}, nil +} + +// NewStorageSlotUpgradeableTransactor creates a new write-only instance of StorageSlotUpgradeable, bound to a specific deployed contract. +func NewStorageSlotUpgradeableTransactor(address common.Address, transactor bind.ContractTransactor) (*StorageSlotUpgradeableTransactor, error) { + contract, err := bindStorageSlotUpgradeable(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &StorageSlotUpgradeableTransactor{contract: contract}, nil +} + +// NewStorageSlotUpgradeableFilterer creates a new log filterer instance of StorageSlotUpgradeable, bound to a specific deployed contract. +func NewStorageSlotUpgradeableFilterer(address common.Address, filterer bind.ContractFilterer) (*StorageSlotUpgradeableFilterer, error) { + contract, err := bindStorageSlotUpgradeable(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &StorageSlotUpgradeableFilterer{contract: contract}, nil +} + +// bindStorageSlotUpgradeable binds a generic wrapper to an already deployed contract. +func bindStorageSlotUpgradeable(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := StorageSlotUpgradeableMetaData.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 (_StorageSlotUpgradeable *StorageSlotUpgradeableRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _StorageSlotUpgradeable.Contract.StorageSlotUpgradeableCaller.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 (_StorageSlotUpgradeable *StorageSlotUpgradeableRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _StorageSlotUpgradeable.Contract.StorageSlotUpgradeableTransactor.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_StorageSlotUpgradeable *StorageSlotUpgradeableRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _StorageSlotUpgradeable.Contract.StorageSlotUpgradeableTransactor.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 (_StorageSlotUpgradeable *StorageSlotUpgradeableCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _StorageSlotUpgradeable.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 (_StorageSlotUpgradeable *StorageSlotUpgradeableTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _StorageSlotUpgradeable.Contract.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_StorageSlotUpgradeable *StorageSlotUpgradeableTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _StorageSlotUpgradeable.Contract.contract.Transact(opts, method, params...) +} diff --git a/test/prototypes/GatewayEVM.spec.ts b/test/prototypes/GatewayEVM.spec.ts new file mode 100644 index 00000000..7a5ba2e8 --- /dev/null +++ b/test/prototypes/GatewayEVM.spec.ts @@ -0,0 +1,311 @@ +import { expect } from "chai"; +import { BigNumber, Contract } from "ethers"; +import { ethers, upgrades } from "hardhat"; + +describe("GatewayEVM inbound", function () { + let receiver: Contract; + let gateway: Contract; + let token: Contract; + let custody: Contract; + let owner: any, destination: any, tssAddress: any; + + beforeEach(async function () { + const TestERC20 = await ethers.getContractFactory("TestERC20"); + const Receiver = await ethers.getContractFactory("Receiver"); + const Gateway = await ethers.getContractFactory("GatewayEVM"); + const Custody = await ethers.getContractFactory("ERC20CustodyNew"); + [owner, destination, tssAddress] = await ethers.getSigners(); + + // Deploy the contracts + token = await TestERC20.deploy("Test Token", "TTK"); + receiver = await Receiver.deploy(); + gateway = await upgrades.deployProxy(Gateway, [tssAddress.address], { + initializer: "initialize", + kind: "uups", + }); + custody = await Custody.deploy(gateway.address); + + gateway.setCustody(custody.address); + + // Mint initial supply to the owner + await token.mint(owner.address, ethers.utils.parseEther("1000")); + + // Transfer some tokens to the custody contract + await token.transfer(custody.address, ethers.utils.parseEther("500")); + }); + + it("should forward call to Receiver's receiveA function", async function () { + const str = "Hello, Hardhat!"; + const num = 42; + const flag = true; + const value = ethers.utils.parseEther("1.0"); + + // Encode the function call data + const data = receiver.interface.encodeFunctionData("receivePayable", [str, num, flag]); + + // Call execute on the Gateway contract + const tx = await gateway.execute(receiver.address, data, { value: value }); + + // Listen for the event + await expect(tx).to.emit(gateway, "Executed").withArgs(receiver.address, value, data); + await expect(tx).to.emit(receiver, "ReceivedPayable").withArgs(gateway.address, value, str, num, flag); + }); + + it("should forward call to Receiver's receiveNonPayable function", async function () { + const strs = ["Hello", "Hardhat"]; + const nums = [1, 2, 3]; + const flag = false; + const data = receiver.interface.encodeFunctionData("receiveNonPayable", [strs, nums, flag]); + const tx = await gateway.execute(receiver.address, data); + await expect(tx).to.emit(receiver, "ReceivedNonPayable").withArgs(gateway.address, strs, nums, flag); + }); + + it("should forward call with withdrawAndCall and give allowance to destination contract", async function () { + const amount = ethers.utils.parseEther("100"); + + // Encode the function call data for receiveERC20 + const data = receiver.interface.encodeFunctionData("receiveERC20", [amount, token.address, destination.address]); + + // Withdraw and call + const tx = await custody.withdrawAndCall(token.address, receiver.address, amount, data); + + // Verify the event was emitted + await expect(tx) + .to.emit(receiver, "ReceivedERC20") + .withArgs(gateway.address, amount, token.address, destination.address); + + // Verify that the tokens were transferred to the destination address + const receiverBalance = await token.balanceOf(destination.address); + expect(receiverBalance).to.equal(amount); + + // Verify that the remaining tokens were refunded to the Custody contract + const remainingBalance = await token.balanceOf(custody.address); + expect(remainingBalance).to.equal(ethers.utils.parseEther("400")); + + // Verify that the approval was reset + const allowance = await token.allowance(gateway.address, receiver.address); + expect(allowance).to.equal(0); + }); + + it("should forward call to Receiver's receiveNoParams function", async function () { + const data = receiver.interface.encodeFunctionData("receiveNoParams"); + + // Execute the call + const tx = await gateway.execute(receiver.address, data); + + // Verify the event was emitted + await expect(tx).to.emit(receiver, "ReceivedNoParams").withArgs(gateway.address); + }); + + it("should forward call to Receiver's receiveNoParams function through withdrawAndCall and return ERC20 tokens to custody", async function () { + const amount = ethers.utils.parseEther("100"); + + // Encode the function call data for receiveNoParams + const data = receiver.interface.encodeFunctionData("receiveNoParams"); + + // Withdraw and call + await custody.withdrawAndCall(token.address, receiver.address, amount, data); + + // Verify the event was emitted + await expect(custody.withdrawAndCall(token.address, receiver.address, amount, data)) + .to.emit(receiver, "ReceivedNoParams") + .withArgs(gateway.address); + + // Verify that the remaining tokens were refunded to the Custody contract + const remainingBalance = await token.balanceOf(custody.address); + expect(remainingBalance).to.equal(ethers.utils.parseEther("500")); + + // Verify that the approval was reset + const allowance = await token.allowance(gateway.address, receiver.address); + expect(allowance).to.equal(0); + }); +}); + +describe("GatewayEVM inbound", function () { + let gateway: Contract; + let token: Contract; + let custody: Contract; + let owner: any, destination: any, tssAddress: any; + + beforeEach(async function () { + const TestERC20 = await ethers.getContractFactory("TestERC20"); + const Gateway = await ethers.getContractFactory("GatewayEVM"); + const Custody = await ethers.getContractFactory("ERC20CustodyNew"); + [owner, destination, tssAddress] = await ethers.getSigners(); + + // Deploy the contracts + token = await TestERC20.deploy("Test Token", "TTK"); + gateway = await upgrades.deployProxy(Gateway, [tssAddress.address], { + initializer: "initialize", + kind: "uups", + }); + custody = await Custody.deploy(gateway.address); + + gateway.setCustody(custody.address); + + // Mint initial supply to the owner + await token.mint(owner.address, ethers.utils.parseEther("1000")); + }); + + it("should deposit erc20 to custody and emit event", async function () { + const amount = ethers.utils.parseEther("100"); + + const custodyBalanceBefore = await token.balanceOf(custody.address); + expect(custodyBalanceBefore).to.equal(0); + + await token.approve(gateway.address, amount); + + const tx = await gateway["deposit(address,uint256,address)"](destination.address, amount, token.address); + + const custodyBalanceAfter = await token.balanceOf(custody.address); + expect(custodyBalanceAfter).to.equal(amount); + + const ownerBalanceAfter = await token.balanceOf(owner.address); + expect(ownerBalanceAfter).to.equal(ethers.utils.parseEther("900")); + + await expect(tx) + .to.emit(gateway, "Deposit") + .withArgs( + ethers.utils.getAddress(owner.address), + ethers.utils.getAddress(destination.address), + amount, + ethers.utils.getAddress(token.address), + "0x" + ); + }); + + it("should fail to deposit erc20 to custody and emit event if amount is 0", async function () { + const amount = ethers.utils.parseEther("0"); + await token.approve(gateway.address, amount); + + await expect( + gateway["deposit(address,uint256,address)"](destination.address, amount, token.address) + ).to.be.revertedWith("InsufficientERC20Amount"); + }); + + it("should deposit eth to tss and emit event", async function () { + const amount = ethers.utils.parseEther("100"); + + const tssAddressBalanceBefore = (await ethers.provider.getBalance(tssAddress.address)) as BigNumber; + + const tx = await gateway["deposit(address)"](destination.address, { value: amount }); + + const tssAddressBalanceAfter = await ethers.provider.getBalance(tssAddress.address); + expect(tssAddressBalanceAfter).to.equal(tssAddressBalanceBefore.add(amount)); + + await expect(tx) + .to.emit(gateway, "Deposit") + .withArgs( + ethers.utils.getAddress(owner.address), + ethers.utils.getAddress(destination.address), + amount, + ethers.constants.AddressZero, + "0x" + ); + }); + + it("should fail to deposit eth to tss and emit event if amount is 0", async function () { + const amount = ethers.utils.parseEther("0"); + + await expect(gateway["deposit(address)"](destination.address, { value: amount })).to.be.revertedWith( + "InsufficientETHAmount" + ); + }); + + it("should deposit erc20 to custody and emit event with payload", async function () { + const amount = ethers.utils.parseEther("100"); + + const custodyBalanceBefore = await token.balanceOf(custody.address); + expect(custodyBalanceBefore).to.equal(0); + + let ABI = ["function hello(address to)"]; + let iface = new ethers.utils.Interface(ABI); + const payload = iface.encodeFunctionData("hello", ["0x1234567890123456789012345678901234567890"]); + + await token.approve(gateway.address, amount); + + const tx = await gateway["depositAndCall(address,uint256,address,bytes)"]( + destination.address, + amount, + token.address, + payload + ); + + const custodyBalanceAfter = await token.balanceOf(custody.address); + expect(custodyBalanceAfter).to.equal(amount); + + const ownerBalanceAfter = await token.balanceOf(owner.address); + expect(ownerBalanceAfter).to.equal(ethers.utils.parseEther("900")); + + await expect(tx) + .to.emit(gateway, "Deposit") + .withArgs( + ethers.utils.getAddress(owner.address), + ethers.utils.getAddress(destination.address), + amount, + ethers.utils.getAddress(token.address), + payload + ); + }); + + it("should fail to deposit erc20 to custody and emit event with payload if amount is 0", async function () { + const amount = ethers.utils.parseEther("0"); + + let ABI = ["function hello(address to)"]; + let iface = new ethers.utils.Interface(ABI); + const payload = iface.encodeFunctionData("hello", ["0x1234567890123456789012345678901234567890"]); + + await expect( + gateway["depositAndCall(address,uint256,address,bytes)"](destination.address, amount, token.address, payload) + ).to.be.revertedWith("InsufficientERC20Amount"); + }); + + it("should deposit eth to tss and emit event with payload", async function () { + const amount = ethers.utils.parseEther("100"); + + let ABI = ["function hello(address to)"]; + let iface = new ethers.utils.Interface(ABI); + const payload = iface.encodeFunctionData("hello", ["0x1234567890123456789012345678901234567890"]); + + const tssAddressBalanceBefore = (await ethers.provider.getBalance(tssAddress.address)) as BigNumber; + + const tx = await gateway["depositAndCall(address,bytes)"](destination.address, payload, { value: amount }); + + const tssAddressBalanceAfter = await ethers.provider.getBalance(tssAddress.address); + expect(tssAddressBalanceAfter).to.equal(tssAddressBalanceBefore.add(amount)); + + await expect(tx) + .to.emit(gateway, "Deposit") + .withArgs( + ethers.utils.getAddress(owner.address), + ethers.utils.getAddress(destination.address), + amount, + ethers.constants.AddressZero, + payload + ); + }); + + it("should fail to deposit eth to tss and emit event with payload if amount is 0", async function () { + const amount = ethers.utils.parseEther("0"); + + let ABI = ["function hello(address to)"]; + let iface = new ethers.utils.Interface(ABI); + const payload = iface.encodeFunctionData("hello", ["0x1234567890123456789012345678901234567890"]); + + await expect( + gateway["depositAndCall(address,bytes)"](destination.address, payload, { value: amount }) + ).to.be.revertedWith("InsufficientETHAmount"); + }); + + it("should call and emit with payload and without asset transfer", async function () { + let ABI = ["function hello(address to)"]; + let iface = new ethers.utils.Interface(ABI); + const payload = iface.encodeFunctionData("hello", ["0x1234567890123456789012345678901234567890"]); + + const tx = await gateway.call(destination.address, payload); + + await expect(tx) + .to.emit(gateway, "Call") + .withArgs(ethers.utils.getAddress(owner.address), ethers.utils.getAddress(destination.address), payload); + }); +}); diff --git a/test/prototypes/GatewayEVMUniswap.spec.ts b/test/prototypes/GatewayEVMUniswap.spec.ts new file mode 100644 index 00000000..c4e392fa --- /dev/null +++ b/test/prototypes/GatewayEVMUniswap.spec.ts @@ -0,0 +1,99 @@ +import { expect } from "chai"; +import { Contract } from "ethers"; +import { ethers, upgrades } from "hardhat"; +import { UniswapV2Deployer } from "uniswap-v2-deploy-plugin"; + +import { + ERC20, + ERC20CustodyNew, + GatewayEVM, + Receiver, + TestERC20, + UniswapV2Factory, + UniswapV2Pair, + UniswapV2Router02, +} from "../../typechain-types"; + +describe("Uniswap Integration with GatewayEVM", function () { + let tokenA: TestERC20; + let tokenB: TestERC20; + let factory: UniswapV2Factory; + let router: UniswapV2Router02; + let pair: UniswapV2Pair; + let custody: ERC20CustodyNew; + let gateway: GatewayEVM; + let owner, addr1, addr2; + let tssAddress; + + beforeEach(async function () { + [owner, addr1, addr2, tssAddress] = await ethers.getSigners(); + + // Deploy TestERC20 tokens + const TestERC20 = await ethers.getContractFactory("TestERC20"); + tokenA = (await TestERC20.deploy("Token A", "TKA")) as TestERC20; + tokenB = (await TestERC20.deploy("Token B", "TKB")) as TestERC20; + await tokenA.mint(owner.address, ethers.utils.parseEther("1000")); + await tokenB.mint(owner.address, ethers.utils.parseEther("1000")); + + const { factory: newFactory, router: newRouter, weth9: weth } = await UniswapV2Deployer.deploy(owner); + + factory = newFactory; + router = newRouter; + + // Approve Router to move tokens + await tokenA.approve(router.address, ethers.utils.parseEther("1000")); + await tokenB.approve(router.address, ethers.utils.parseEther("1000")); + + // Add Liquidity + await router.addLiquidity( + tokenA.address, + tokenB.address, + ethers.utils.parseEther("500"), + ethers.utils.parseEther("500"), + 0, + 0, + owner.address, + Math.floor(Date.now() / 1000) + 60 * 20 + ); + + // Deploy Gateway and Custody Contracts + const Gateway = await ethers.getContractFactory("GatewayEVM"); + const ERC20CustodyNew = await ethers.getContractFactory("ERC20CustodyNew"); + gateway = (await upgrades.deployProxy(Gateway, [tssAddress.address], { + initializer: "initialize", + kind: "uups", + })) as GatewayEVM; + custody = (await ERC20CustodyNew.deploy(gateway.address)) as ERC20CustodyNew; + + // Transfer some tokens to the custody contract + await tokenA.transfer(custody.address, ethers.utils.parseEther("100")); + await tokenB.transfer(custody.address, ethers.utils.parseEther("100")); + }); + + it("should perform a token swap on Uniswap and transfer the output tokens to a destination address", async function () { + const amountIn = ethers.utils.parseEther("50"); + + const data = router.interface.encodeFunctionData("swapExactTokensForTokens", [ + amountIn, + 0, + [tokenA.address, tokenB.address], + addr2.address, + Math.floor(Date.now() / 1000) + 60 * 20, + ]); + + // Withdraw and call + await custody.withdrawAndCall(tokenA.address, router.address, amountIn, data); + + // Verify the destination address received the tokens + const destBalance = await tokenB.balanceOf(addr2.address); + expect(destBalance).to.be.gt(0); + + // Verify the remaining tokens are refunded to the Custody contract + const remainingBalance = await tokenA.balanceOf(custody.address); + expect(remainingBalance).to.equal(ethers.utils.parseEther("50")); + + // Verify the approval was reset + const allowance = await tokenA.allowance(gateway.address, router.address); + expect(allowance).to.equal(0); + }); +}); diff --git a/test/prototypes/GatewayEVMUpgrade.spec.ts b/test/prototypes/GatewayEVMUpgrade.spec.ts new file mode 100644 index 00000000..bc46a4df --- /dev/null +++ b/test/prototypes/GatewayEVMUpgrade.spec.ts @@ -0,0 +1,73 @@ +import { expect } from "chai"; +import { Contract } from "ethers"; +import { ethers, upgrades } from "hardhat"; + +describe("GatewayEVM upgrade", function () { + let receiver: Contract; + let gateway: Contract; + let token: Contract; + let custody: Contract; + let owner: any, destination: any, randomSigner: any, tssAddress: any; + + beforeEach(async function () { + const TestERC20 = await ethers.getContractFactory("TestERC20"); + const Receiver = await ethers.getContractFactory("Receiver"); + const Gateway = await ethers.getContractFactory("GatewayEVM"); + const Custody = await ethers.getContractFactory("ERC20CustodyNew"); + [owner, destination, randomSigner, tssAddress] = await ethers.getSigners(); + + // Deploy the contracts + token = await TestERC20.deploy("Test Token", "TTK"); + receiver = await Receiver.deploy(); + gateway = await upgrades.deployProxy(Gateway, [tssAddress.address], { + initializer: "initialize", + kind: "uups", + }); + custody = await Custody.deploy(gateway.address); + + gateway.setCustody(custody.address); + + // Mint initial supply to the owner + await token.mint(owner.address, ethers.utils.parseEther("1000")); + + // Transfer some tokens to the custody contract + await token.transfer(custody.address, ethers.utils.parseEther("500")); + }); + + it("should upgrade and forward call to Receiver's receiveA function", async function () { + const custodyBeforeUpgrade = await gateway.custody(); + const tssAddressBeforeUpgrade = await gateway.tssAddress(); + + // Upgrade Gateway contract + // Fail to upgrade if not using owner account + let GatewayUpgradeTest = await ethers.getContractFactory("GatewayEVMUpgradeTest", randomSigner); + await expect(upgrades.upgradeProxy(gateway.address, GatewayUpgradeTest)).to.be.revertedWith( + "Ownable: caller is not the owner" + ); + + // Upgrade with owner account + GatewayUpgradeTest = await ethers.getContractFactory("GatewayEVMUpgradeTest", owner); + + const gatewayUpgradeTest = await upgrades.upgradeProxy(gateway.address, GatewayUpgradeTest); + + // Forward call + const str = "Hello, Hardhat!"; + const num = 42; + const flag = true; + const value = ethers.utils.parseEther("1.0"); + + // Encode the function call data + const data = receiver.interface.encodeFunctionData("receivePayable", [str, num, flag]); + + // Call execute on the GatewayV2 contract + const tx = await gatewayUpgradeTest.execute(receiver.address, data, { value: value }); + + // Listen for the event + await expect(tx).to.emit(gatewayUpgradeTest, "ExecutedV2").withArgs(receiver.address, value, data); + await expect(tx).to.emit(receiver, "ReceivedPayable").withArgs(gatewayUpgradeTest.address, value, str, num, flag); + + // Check that storage is not changed + expect(await gatewayUpgradeTest.custody()).to.equal(custodyBeforeUpgrade); + expect(await gatewayUpgradeTest.tssAddress()).to.equal(tssAddressBeforeUpgrade); + }); +}); diff --git a/test/prototypes/GatewayIntegration.spec.ts b/test/prototypes/GatewayIntegration.spec.ts new file mode 100644 index 00000000..bd81a9e3 --- /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("receivePayable", [str, num, flag]); + const callTx = await gatewayZEVM.connect(ownerZEVM).call(ethers.utils.arrayify(addrs[0].address), message); + await expect(callTx).to.emit(gatewayZEVM, "Call").withArgs(ownerZEVM.address, addrs[0].address, message); + + // 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, "ReceivedPayable").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("receivePayable", [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, "ReceivedPayable").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("receivePayable", [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, "ReceivedPayable").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("receivePayable", [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, "ReceivedPayable").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..f215e762 --- /dev/null +++ b/test/prototypes/GatewayZEVM.spec.ts @@ -0,0 +1,186 @@ +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", function () { + let ZRC20Contract: ZRC20; + let systemContract: SystemContract; + let gateway: Contract; + let testZContract: Contract; + let owner: SignerWithAddress; + let fungibleModuleSigner: 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 + 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 Gateway = await ethers.getContractFactory("GatewayZEVM"); + gateway = await upgrades.deployProxy(Gateway, [], { + initializer: "initialize", + kind: "uups", + }); + + const ZRC20Factory = await ethers.getContractFactory("ZRC20New"); + ZRC20Contract = (await ZRC20Factory.connect(fungibleModuleSigner).deploy( + "TOKEN", + "TKN", + 18, + 1, + 1, + 0, + systemContract.address, + gateway.address + )) as ZRC20; + + await systemContract.setGasCoinZRC20(1, ZRC20Contract.address); + await systemContract.setGasPrice(1, ZRC20Contract.address); + + await ZRC20Contract.connect(fungibleModuleSigner).deposit(owner.address, parseEther("100")); + + await ZRC20Contract.connect(owner).approve(gateway.address, parseEther("100")); + + const TestZContract = await ethers.getContractFactory("TestZContract"); + testZContract = await TestZContract.deploy(); + }); + + describe("GatewayZEVM inbound", function () { + 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); + }); + }); + + describe("GatewayZEVM outbound", function () { + it("should deposit", async function () { + const balanceBeforeDeposit = (await ZRC20Contract.balanceOf(addrs[0].address)) as BigNumber; + expect(balanceBeforeDeposit).to.equal(parseEther("0")); + + await gateway.connect(fungibleModuleSigner).deposit(ZRC20Contract.address, parseEther("1"), addrs[0].address); + + const balanceAfterDeposit = (await ZRC20Contract.balanceOf(addrs[0].address)) as BigNumber; + expect(balanceAfterDeposit).to.equal(parseEther("1")); + }); + + it("execute zContract", async function () { + const message = ethers.utils.defaultAbiCoder.encode(["string"], ["hello"]); + const tx = await gateway + .connect(fungibleModuleSigner) + .execute( + [gateway.address, fungibleModuleSigner.address, 1], + ZRC20Contract.address, + parseEther("1"), + testZContract.address, + message + ); + + await expect(tx) + .to.emit(testZContract, "ContextData") + .withArgs( + gateway.address.toLowerCase(), + ethers.utils.getAddress(fungibleModuleSigner.address), + 1, + ethers.utils.getAddress(gateway.address), + "hello" + ); + }); + + it("should deposit and call zContract", async function () { + const balanceBeforeDeposit = (await ZRC20Contract.balanceOf(testZContract.address)) as BigNumber; + expect(balanceBeforeDeposit).to.equal(parseEther("0")); + + const message = ethers.utils.defaultAbiCoder.encode(["string"], ["hello"]); + const tx = await gateway + .connect(fungibleModuleSigner) + .depositAndCall( + [gateway.address, fungibleModuleSigner.address, 1], + ZRC20Contract.address, + parseEther("1"), + testZContract.address, + message + ); + + const balanceAfterDeposit = (await ZRC20Contract.balanceOf(testZContract.address)) as BigNumber; + expect(balanceAfterDeposit).to.equal(parseEther("1")); + + await expect(tx) + .to.emit(testZContract, "ContextData") + .withArgs( + gateway.address.toLowerCase(), + ethers.utils.getAddress(fungibleModuleSigner.address), + 1, + ethers.utils.getAddress(gateway.address), + "hello" + ); + }); + }); +}); diff --git a/typechain-types/@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.ts b/typechain-types/@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.ts new file mode 100644 index 00000000..4ebb8a9b --- /dev/null +++ b/typechain-types/@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.ts @@ -0,0 +1,188 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type { + BaseContract, + BigNumber, + BytesLike, + CallOverrides, + ContractTransaction, + Overrides, + 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 OwnableUpgradeableInterface extends utils.Interface { + functions: { + "owner()": FunctionFragment; + "renounceOwnership()": FunctionFragment; + "transferOwnership(address)": FunctionFragment; + }; + + getFunction( + nameOrSignatureOrTopic: "owner" | "renounceOwnership" | "transferOwnership" + ): FunctionFragment; + + encodeFunctionData(functionFragment: "owner", values?: undefined): string; + encodeFunctionData( + functionFragment: "renounceOwnership", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "transferOwnership", + values: [PromiseOrValue] + ): string; + + decodeFunctionResult(functionFragment: "owner", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "renounceOwnership", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "transferOwnership", + data: BytesLike + ): Result; + + events: { + "Initialized(uint8)": EventFragment; + "OwnershipTransferred(address,address)": EventFragment; + }; + + getEvent(nameOrSignatureOrTopic: "Initialized"): EventFragment; + getEvent(nameOrSignatureOrTopic: "OwnershipTransferred"): EventFragment; +} + +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 OwnableUpgradeable extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + interface: OwnableUpgradeableInterface; + + 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: { + owner(overrides?: CallOverrides): Promise<[string]>; + + renounceOwnership( + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + transferOwnership( + newOwner: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + }; + + owner(overrides?: CallOverrides): Promise; + + renounceOwnership( + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + transferOwnership( + newOwner: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + callStatic: { + owner(overrides?: CallOverrides): Promise; + + renounceOwnership(overrides?: CallOverrides): Promise; + + transferOwnership( + newOwner: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + }; + + filters: { + "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; + }; + + estimateGas: { + owner(overrides?: CallOverrides): Promise; + + renounceOwnership( + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + transferOwnership( + newOwner: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + }; + + populateTransaction: { + owner(overrides?: CallOverrides): Promise; + + renounceOwnership( + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + transferOwnership( + newOwner: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + }; +} diff --git a/typechain-types/@openzeppelin/contracts-upgradeable/access/index.ts b/typechain-types/@openzeppelin/contracts-upgradeable/access/index.ts new file mode 100644 index 00000000..5b7d8440 --- /dev/null +++ b/typechain-types/@openzeppelin/contracts-upgradeable/access/index.ts @@ -0,0 +1,4 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +export type { OwnableUpgradeable } from "./OwnableUpgradeable"; diff --git a/typechain-types/@openzeppelin/contracts-upgradeable/index.ts b/typechain-types/@openzeppelin/contracts-upgradeable/index.ts new file mode 100644 index 00000000..14e80f09 --- /dev/null +++ b/typechain-types/@openzeppelin/contracts-upgradeable/index.ts @@ -0,0 +1,11 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type * as access from "./access"; +export type { access }; +import type * as interfaces from "./interfaces"; +export type { interfaces }; +import type * as proxy from "./proxy"; +export type { proxy }; +import type * as utils from "./utils"; +export type { utils }; diff --git a/typechain-types/@openzeppelin/contracts-upgradeable/interfaces/IERC1967Upgradeable.ts b/typechain-types/@openzeppelin/contracts-upgradeable/interfaces/IERC1967Upgradeable.ts new file mode 100644 index 00000000..dea1e073 --- /dev/null +++ b/typechain-types/@openzeppelin/contracts-upgradeable/interfaces/IERC1967Upgradeable.ts @@ -0,0 +1,115 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type { BaseContract, Signer, utils } from "ethers"; +import type { EventFragment } from "@ethersproject/abi"; +import type { Listener, Provider } from "@ethersproject/providers"; +import type { + TypedEventFilter, + TypedEvent, + TypedListener, + OnEvent, + PromiseOrValue, +} from "../../../common"; + +export interface IERC1967UpgradeableInterface extends utils.Interface { + functions: {}; + + events: { + "AdminChanged(address,address)": EventFragment; + "BeaconUpgraded(address)": EventFragment; + "Upgraded(address)": EventFragment; + }; + + getEvent(nameOrSignatureOrTopic: "AdminChanged"): EventFragment; + getEvent(nameOrSignatureOrTopic: "BeaconUpgraded"): EventFragment; + getEvent(nameOrSignatureOrTopic: "Upgraded"): 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 UpgradedEventObject { + implementation: string; +} +export type UpgradedEvent = TypedEvent<[string], UpgradedEventObject>; + +export type UpgradedEventFilter = TypedEventFilter; + +export interface IERC1967Upgradeable extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + interface: IERC1967UpgradeableInterface; + + 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: {}; + + callStatic: {}; + + 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; + + "Upgraded(address)"( + implementation?: PromiseOrValue | null + ): UpgradedEventFilter; + Upgraded( + implementation?: PromiseOrValue | null + ): UpgradedEventFilter; + }; + + estimateGas: {}; + + populateTransaction: {}; +} diff --git a/typechain-types/@openzeppelin/contracts-upgradeable/interfaces/draft-IERC1822Upgradeable.sol/IERC1822ProxiableUpgradeable.ts b/typechain-types/@openzeppelin/contracts-upgradeable/interfaces/draft-IERC1822Upgradeable.sol/IERC1822ProxiableUpgradeable.ts new file mode 100644 index 00000000..12802780 --- /dev/null +++ b/typechain-types/@openzeppelin/contracts-upgradeable/interfaces/draft-IERC1822Upgradeable.sol/IERC1822ProxiableUpgradeable.ts @@ -0,0 +1,88 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type { + BaseContract, + BigNumber, + BytesLike, + CallOverrides, + 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 IERC1822ProxiableUpgradeableInterface extends utils.Interface { + functions: { + "proxiableUUID()": FunctionFragment; + }; + + getFunction(nameOrSignatureOrTopic: "proxiableUUID"): FunctionFragment; + + encodeFunctionData( + functionFragment: "proxiableUUID", + values?: undefined + ): string; + + decodeFunctionResult( + functionFragment: "proxiableUUID", + data: BytesLike + ): Result; + + events: {}; +} + +export interface IERC1822ProxiableUpgradeable extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + interface: IERC1822ProxiableUpgradeableInterface; + + 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: { + proxiableUUID(overrides?: CallOverrides): Promise<[string]>; + }; + + proxiableUUID(overrides?: CallOverrides): Promise; + + callStatic: { + proxiableUUID(overrides?: CallOverrides): Promise; + }; + + filters: {}; + + estimateGas: { + proxiableUUID(overrides?: CallOverrides): Promise; + }; + + populateTransaction: { + proxiableUUID(overrides?: CallOverrides): Promise; + }; +} diff --git a/typechain-types/@openzeppelin/contracts-upgradeable/interfaces/draft-IERC1822Upgradeable.sol/index.ts b/typechain-types/@openzeppelin/contracts-upgradeable/interfaces/draft-IERC1822Upgradeable.sol/index.ts new file mode 100644 index 00000000..694b98f2 --- /dev/null +++ b/typechain-types/@openzeppelin/contracts-upgradeable/interfaces/draft-IERC1822Upgradeable.sol/index.ts @@ -0,0 +1,4 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +export type { IERC1822ProxiableUpgradeable } from "./IERC1822ProxiableUpgradeable"; diff --git a/typechain-types/@openzeppelin/contracts-upgradeable/interfaces/index.ts b/typechain-types/@openzeppelin/contracts-upgradeable/interfaces/index.ts new file mode 100644 index 00000000..794471a3 --- /dev/null +++ b/typechain-types/@openzeppelin/contracts-upgradeable/interfaces/index.ts @@ -0,0 +1,6 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type * as draftIerc1822UpgradeableSol from "./draft-IERC1822Upgradeable.sol"; +export type { draftIerc1822UpgradeableSol }; +export type { IERC1967Upgradeable } from "./IERC1967Upgradeable"; diff --git a/typechain-types/@openzeppelin/contracts-upgradeable/proxy/ERC1967/ERC1967UpgradeUpgradeable.ts b/typechain-types/@openzeppelin/contracts-upgradeable/proxy/ERC1967/ERC1967UpgradeUpgradeable.ts new file mode 100644 index 00000000..8c87141f --- /dev/null +++ b/typechain-types/@openzeppelin/contracts-upgradeable/proxy/ERC1967/ERC1967UpgradeUpgradeable.ts @@ -0,0 +1,127 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type { BaseContract, Signer, utils } from "ethers"; +import type { EventFragment } from "@ethersproject/abi"; +import type { Listener, Provider } from "@ethersproject/providers"; +import type { + TypedEventFilter, + TypedEvent, + TypedListener, + OnEvent, + PromiseOrValue, +} from "../../../../common"; + +export interface ERC1967UpgradeUpgradeableInterface extends utils.Interface { + functions: {}; + + events: { + "AdminChanged(address,address)": EventFragment; + "BeaconUpgraded(address)": EventFragment; + "Initialized(uint8)": EventFragment; + "Upgraded(address)": EventFragment; + }; + + getEvent(nameOrSignatureOrTopic: "AdminChanged"): EventFragment; + getEvent(nameOrSignatureOrTopic: "BeaconUpgraded"): EventFragment; + getEvent(nameOrSignatureOrTopic: "Initialized"): EventFragment; + getEvent(nameOrSignatureOrTopic: "Upgraded"): 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 InitializedEventObject { + version: number; +} +export type InitializedEvent = TypedEvent<[number], InitializedEventObject>; + +export type InitializedEventFilter = TypedEventFilter; + +export interface UpgradedEventObject { + implementation: string; +} +export type UpgradedEvent = TypedEvent<[string], UpgradedEventObject>; + +export type UpgradedEventFilter = TypedEventFilter; + +export interface ERC1967UpgradeUpgradeable extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + interface: ERC1967UpgradeUpgradeableInterface; + + 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: {}; + + callStatic: {}; + + 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; + + "Initialized(uint8)"(version?: null): InitializedEventFilter; + Initialized(version?: null): InitializedEventFilter; + + "Upgraded(address)"( + implementation?: PromiseOrValue | null + ): UpgradedEventFilter; + Upgraded( + implementation?: PromiseOrValue | null + ): UpgradedEventFilter; + }; + + estimateGas: {}; + + populateTransaction: {}; +} diff --git a/typechain-types/@openzeppelin/contracts-upgradeable/proxy/ERC1967/index.ts b/typechain-types/@openzeppelin/contracts-upgradeable/proxy/ERC1967/index.ts new file mode 100644 index 00000000..3c90548c --- /dev/null +++ b/typechain-types/@openzeppelin/contracts-upgradeable/proxy/ERC1967/index.ts @@ -0,0 +1,4 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +export type { ERC1967UpgradeUpgradeable } from "./ERC1967UpgradeUpgradeable"; diff --git a/typechain-types/@openzeppelin/contracts-upgradeable/proxy/beacon/IBeaconUpgradeable.ts b/typechain-types/@openzeppelin/contracts-upgradeable/proxy/beacon/IBeaconUpgradeable.ts new file mode 100644 index 00000000..b8c9d2e4 --- /dev/null +++ b/typechain-types/@openzeppelin/contracts-upgradeable/proxy/beacon/IBeaconUpgradeable.ts @@ -0,0 +1,88 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type { + BaseContract, + BigNumber, + BytesLike, + CallOverrides, + 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 IBeaconUpgradeableInterface extends utils.Interface { + functions: { + "implementation()": FunctionFragment; + }; + + getFunction(nameOrSignatureOrTopic: "implementation"): FunctionFragment; + + encodeFunctionData( + functionFragment: "implementation", + values?: undefined + ): string; + + decodeFunctionResult( + functionFragment: "implementation", + data: BytesLike + ): Result; + + events: {}; +} + +export interface IBeaconUpgradeable extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + interface: IBeaconUpgradeableInterface; + + 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: { + implementation(overrides?: CallOverrides): Promise<[string]>; + }; + + implementation(overrides?: CallOverrides): Promise; + + callStatic: { + implementation(overrides?: CallOverrides): Promise; + }; + + filters: {}; + + estimateGas: { + implementation(overrides?: CallOverrides): Promise; + }; + + populateTransaction: { + implementation(overrides?: CallOverrides): Promise; + }; +} diff --git a/typechain-types/@openzeppelin/contracts-upgradeable/proxy/beacon/index.ts b/typechain-types/@openzeppelin/contracts-upgradeable/proxy/beacon/index.ts new file mode 100644 index 00000000..51fb2a5e --- /dev/null +++ b/typechain-types/@openzeppelin/contracts-upgradeable/proxy/beacon/index.ts @@ -0,0 +1,4 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +export type { IBeaconUpgradeable } from "./IBeaconUpgradeable"; diff --git a/typechain-types/@openzeppelin/contracts-upgradeable/proxy/index.ts b/typechain-types/@openzeppelin/contracts-upgradeable/proxy/index.ts new file mode 100644 index 00000000..c2433d8f --- /dev/null +++ b/typechain-types/@openzeppelin/contracts-upgradeable/proxy/index.ts @@ -0,0 +1,9 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type * as erc1967 from "./ERC1967"; +export type { erc1967 }; +import type * as beacon from "./beacon"; +export type { beacon }; +import type * as utils from "./utils"; +export type { utils }; diff --git a/typechain-types/@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.ts b/typechain-types/@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.ts new file mode 100644 index 00000000..a97ca26e --- /dev/null +++ b/typechain-types/@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.ts @@ -0,0 +1,70 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type { BaseContract, Signer, utils } from "ethers"; +import type { EventFragment } from "@ethersproject/abi"; +import type { Listener, Provider } from "@ethersproject/providers"; +import type { + TypedEventFilter, + TypedEvent, + TypedListener, + OnEvent, + PromiseOrValue, +} from "../../../../common"; + +export interface InitializableInterface extends utils.Interface { + functions: {}; + + events: { + "Initialized(uint8)": EventFragment; + }; + + getEvent(nameOrSignatureOrTopic: "Initialized"): EventFragment; +} + +export interface InitializedEventObject { + version: number; +} +export type InitializedEvent = TypedEvent<[number], InitializedEventObject>; + +export type InitializedEventFilter = TypedEventFilter; + +export interface Initializable extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + interface: InitializableInterface; + + 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: {}; + + callStatic: {}; + + filters: { + "Initialized(uint8)"(version?: null): InitializedEventFilter; + Initialized(version?: null): InitializedEventFilter; + }; + + estimateGas: {}; + + populateTransaction: {}; +} diff --git a/typechain-types/@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.ts b/typechain-types/@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.ts new file mode 100644 index 00000000..352a25fa --- /dev/null +++ b/typechain-types/@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.ts @@ -0,0 +1,238 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type { + BaseContract, + BigNumber, + 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 UUPSUpgradeableInterface extends utils.Interface { + functions: { + "proxiableUUID()": FunctionFragment; + "upgradeTo(address)": FunctionFragment; + "upgradeToAndCall(address,bytes)": FunctionFragment; + }; + + getFunction( + nameOrSignatureOrTopic: "proxiableUUID" | "upgradeTo" | "upgradeToAndCall" + ): FunctionFragment; + + encodeFunctionData( + functionFragment: "proxiableUUID", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "upgradeTo", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "upgradeToAndCall", + values: [PromiseOrValue, PromiseOrValue] + ): string; + + decodeFunctionResult( + functionFragment: "proxiableUUID", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "upgradeTo", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "upgradeToAndCall", + data: BytesLike + ): Result; + + events: { + "AdminChanged(address,address)": EventFragment; + "BeaconUpgraded(address)": EventFragment; + "Initialized(uint8)": EventFragment; + "Upgraded(address)": EventFragment; + }; + + getEvent(nameOrSignatureOrTopic: "AdminChanged"): EventFragment; + getEvent(nameOrSignatureOrTopic: "BeaconUpgraded"): EventFragment; + getEvent(nameOrSignatureOrTopic: "Initialized"): EventFragment; + getEvent(nameOrSignatureOrTopic: "Upgraded"): 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 InitializedEventObject { + version: number; +} +export type InitializedEvent = TypedEvent<[number], InitializedEventObject>; + +export type InitializedEventFilter = TypedEventFilter; + +export interface UpgradedEventObject { + implementation: string; +} +export type UpgradedEvent = TypedEvent<[string], UpgradedEventObject>; + +export type UpgradedEventFilter = TypedEventFilter; + +export interface UUPSUpgradeable extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + interface: UUPSUpgradeableInterface; + + 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: { + proxiableUUID(overrides?: CallOverrides): Promise<[string]>; + + upgradeTo( + newImplementation: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + upgradeToAndCall( + newImplementation: PromiseOrValue, + data: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + }; + + proxiableUUID(overrides?: CallOverrides): Promise; + + upgradeTo( + newImplementation: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + upgradeToAndCall( + newImplementation: PromiseOrValue, + data: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + callStatic: { + proxiableUUID(overrides?: CallOverrides): Promise; + + upgradeTo( + newImplementation: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + upgradeToAndCall( + newImplementation: PromiseOrValue, + data: 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; + + "Initialized(uint8)"(version?: null): InitializedEventFilter; + Initialized(version?: null): InitializedEventFilter; + + "Upgraded(address)"( + implementation?: PromiseOrValue | null + ): UpgradedEventFilter; + Upgraded( + implementation?: PromiseOrValue | null + ): UpgradedEventFilter; + }; + + estimateGas: { + proxiableUUID(overrides?: CallOverrides): Promise; + + upgradeTo( + newImplementation: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + upgradeToAndCall( + newImplementation: PromiseOrValue, + data: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + }; + + populateTransaction: { + proxiableUUID(overrides?: CallOverrides): Promise; + + upgradeTo( + newImplementation: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + upgradeToAndCall( + newImplementation: PromiseOrValue, + data: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + }; +} diff --git a/typechain-types/@openzeppelin/contracts-upgradeable/proxy/utils/index.ts b/typechain-types/@openzeppelin/contracts-upgradeable/proxy/utils/index.ts new file mode 100644 index 00000000..f23837ba --- /dev/null +++ b/typechain-types/@openzeppelin/contracts-upgradeable/proxy/utils/index.ts @@ -0,0 +1,5 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +export type { Initializable } from "./Initializable"; +export type { UUPSUpgradeable } from "./UUPSUpgradeable"; diff --git a/typechain-types/@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.ts b/typechain-types/@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.ts new file mode 100644 index 00000000..6886700d --- /dev/null +++ b/typechain-types/@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.ts @@ -0,0 +1,70 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type { BaseContract, Signer, utils } from "ethers"; +import type { EventFragment } from "@ethersproject/abi"; +import type { Listener, Provider } from "@ethersproject/providers"; +import type { + TypedEventFilter, + TypedEvent, + TypedListener, + OnEvent, + PromiseOrValue, +} from "../../../common"; + +export interface ContextUpgradeableInterface extends utils.Interface { + functions: {}; + + events: { + "Initialized(uint8)": EventFragment; + }; + + getEvent(nameOrSignatureOrTopic: "Initialized"): EventFragment; +} + +export interface InitializedEventObject { + version: number; +} +export type InitializedEvent = TypedEvent<[number], InitializedEventObject>; + +export type InitializedEventFilter = TypedEventFilter; + +export interface ContextUpgradeable extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + interface: ContextUpgradeableInterface; + + 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: {}; + + callStatic: {}; + + filters: { + "Initialized(uint8)"(version?: null): InitializedEventFilter; + Initialized(version?: null): InitializedEventFilter; + }; + + estimateGas: {}; + + populateTransaction: {}; +} diff --git a/typechain-types/@openzeppelin/contracts-upgradeable/utils/index.ts b/typechain-types/@openzeppelin/contracts-upgradeable/utils/index.ts new file mode 100644 index 00000000..749da396 --- /dev/null +++ b/typechain-types/@openzeppelin/contracts-upgradeable/utils/index.ts @@ -0,0 +1,4 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +export type { ContextUpgradeable } from "./ContextUpgradeable"; diff --git a/typechain-types/@openzeppelin/index.ts b/typechain-types/@openzeppelin/index.ts index a11e4ca2..f34b8770 100644 --- a/typechain-types/@openzeppelin/index.ts +++ b/typechain-types/@openzeppelin/index.ts @@ -3,3 +3,5 @@ /* eslint-disable */ import type * as contracts from "./contracts"; export type { contracts }; +import type * as contractsUpgradeable from "./contracts-upgradeable"; +export type { contractsUpgradeable }; diff --git a/typechain-types/contracts/index.ts b/typechain-types/contracts/index.ts index 9efb820b..6fa2e250 100644 --- a/typechain-types/contracts/index.ts +++ b/typechain-types/contracts/index.ts @@ -3,5 +3,7 @@ /* eslint-disable */ import type * as evm from "./evm"; export type { evm }; +import type * as prototypes from "./prototypes"; +export type { prototypes }; import type * as zevm from "./zevm"; export type { zevm }; diff --git a/typechain-types/contracts/prototypes/ERC20Custody.ts b/typechain-types/contracts/prototypes/ERC20Custody.ts new file mode 100644 index 00000000..f1b2b774 --- /dev/null +++ b/typechain-types/contracts/prototypes/ERC20Custody.ts @@ -0,0 +1,245 @@ +/* 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, + EventFragment, +} from "@ethersproject/abi"; +import type { Listener, Provider } from "@ethersproject/providers"; +import type { + TypedEventFilter, + TypedEvent, + TypedListener, + OnEvent, + PromiseOrValue, +} from "../../common"; + +export interface ERC20CustodyInterface extends utils.Interface { + functions: { + "gateway()": FunctionFragment; + "withdraw(address,address,uint256)": FunctionFragment; + "withdrawAndCall(address,address,uint256,bytes)": FunctionFragment; + }; + + getFunction( + nameOrSignatureOrTopic: "gateway" | "withdraw" | "withdrawAndCall" + ): FunctionFragment; + + encodeFunctionData(functionFragment: "gateway", values?: undefined): string; + encodeFunctionData( + functionFragment: "withdraw", + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ] + ): string; + encodeFunctionData( + functionFragment: "withdrawAndCall", + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ] + ): string; + + decodeFunctionResult(functionFragment: "gateway", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "withdraw", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "withdrawAndCall", + data: BytesLike + ): Result; + + events: { + "Withdraw(address,address,uint256)": EventFragment; + "WithdrawAndCall(address,address,uint256,bytes)": EventFragment; + }; + + getEvent(nameOrSignatureOrTopic: "Withdraw"): EventFragment; + getEvent(nameOrSignatureOrTopic: "WithdrawAndCall"): EventFragment; +} + +export interface WithdrawEventObject { + token: string; + to: string; + amount: BigNumber; +} +export type WithdrawEvent = TypedEvent< + [string, string, BigNumber], + WithdrawEventObject +>; + +export type WithdrawEventFilter = TypedEventFilter; + +export interface WithdrawAndCallEventObject { + token: string; + to: string; + amount: BigNumber; + data: string; +} +export type WithdrawAndCallEvent = TypedEvent< + [string, string, BigNumber, string], + WithdrawAndCallEventObject +>; + +export type WithdrawAndCallEventFilter = TypedEventFilter; + +export interface ERC20Custody extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + interface: ERC20CustodyInterface; + + 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: { + gateway(overrides?: CallOverrides): Promise<[string]>; + + withdraw( + token: PromiseOrValue, + to: PromiseOrValue, + amount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + withdrawAndCall( + token: PromiseOrValue, + to: PromiseOrValue, + amount: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + }; + + gateway(overrides?: CallOverrides): Promise; + + withdraw( + token: PromiseOrValue, + to: PromiseOrValue, + amount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + withdrawAndCall( + token: PromiseOrValue, + to: PromiseOrValue, + amount: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + callStatic: { + gateway(overrides?: CallOverrides): Promise; + + withdraw( + token: PromiseOrValue, + to: PromiseOrValue, + amount: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + withdrawAndCall( + token: PromiseOrValue, + to: PromiseOrValue, + amount: PromiseOrValue, + data: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + }; + + filters: { + "Withdraw(address,address,uint256)"( + token?: PromiseOrValue | null, + to?: PromiseOrValue | null, + amount?: null + ): WithdrawEventFilter; + Withdraw( + token?: PromiseOrValue | null, + to?: PromiseOrValue | null, + amount?: null + ): WithdrawEventFilter; + + "WithdrawAndCall(address,address,uint256,bytes)"( + token?: PromiseOrValue | null, + to?: PromiseOrValue | null, + amount?: null, + data?: null + ): WithdrawAndCallEventFilter; + WithdrawAndCall( + token?: PromiseOrValue | null, + to?: PromiseOrValue | null, + amount?: null, + data?: null + ): WithdrawAndCallEventFilter; + }; + + estimateGas: { + gateway(overrides?: CallOverrides): Promise; + + withdraw( + token: PromiseOrValue, + to: PromiseOrValue, + amount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + withdrawAndCall( + token: PromiseOrValue, + to: PromiseOrValue, + amount: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + }; + + populateTransaction: { + gateway(overrides?: CallOverrides): Promise; + + withdraw( + token: PromiseOrValue, + to: PromiseOrValue, + amount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + withdrawAndCall( + token: PromiseOrValue, + to: PromiseOrValue, + amount: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + }; +} diff --git a/typechain-types/contracts/prototypes/ERC20CustodyNew.ts b/typechain-types/contracts/prototypes/ERC20CustodyNew.ts new file mode 100644 index 00000000..c2f1889d --- /dev/null +++ b/typechain-types/contracts/prototypes/ERC20CustodyNew.ts @@ -0,0 +1,245 @@ +/* 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, + EventFragment, +} from "@ethersproject/abi"; +import type { Listener, Provider } from "@ethersproject/providers"; +import type { + TypedEventFilter, + TypedEvent, + TypedListener, + OnEvent, + PromiseOrValue, +} from "../../common"; + +export interface ERC20CustodyNewInterface extends utils.Interface { + functions: { + "gateway()": FunctionFragment; + "withdraw(address,address,uint256)": FunctionFragment; + "withdrawAndCall(address,address,uint256,bytes)": FunctionFragment; + }; + + getFunction( + nameOrSignatureOrTopic: "gateway" | "withdraw" | "withdrawAndCall" + ): FunctionFragment; + + encodeFunctionData(functionFragment: "gateway", values?: undefined): string; + encodeFunctionData( + functionFragment: "withdraw", + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ] + ): string; + encodeFunctionData( + functionFragment: "withdrawAndCall", + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ] + ): string; + + decodeFunctionResult(functionFragment: "gateway", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "withdraw", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "withdrawAndCall", + data: BytesLike + ): Result; + + events: { + "Withdraw(address,address,uint256)": EventFragment; + "WithdrawAndCall(address,address,uint256,bytes)": EventFragment; + }; + + getEvent(nameOrSignatureOrTopic: "Withdraw"): EventFragment; + getEvent(nameOrSignatureOrTopic: "WithdrawAndCall"): EventFragment; +} + +export interface WithdrawEventObject { + token: string; + to: string; + amount: BigNumber; +} +export type WithdrawEvent = TypedEvent< + [string, string, BigNumber], + WithdrawEventObject +>; + +export type WithdrawEventFilter = TypedEventFilter; + +export interface WithdrawAndCallEventObject { + token: string; + to: string; + amount: BigNumber; + data: string; +} +export type WithdrawAndCallEvent = TypedEvent< + [string, string, BigNumber, string], + WithdrawAndCallEventObject +>; + +export type WithdrawAndCallEventFilter = TypedEventFilter; + +export interface ERC20CustodyNew extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + interface: ERC20CustodyNewInterface; + + 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: { + gateway(overrides?: CallOverrides): Promise<[string]>; + + withdraw( + token: PromiseOrValue, + to: PromiseOrValue, + amount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + withdrawAndCall( + token: PromiseOrValue, + to: PromiseOrValue, + amount: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + }; + + gateway(overrides?: CallOverrides): Promise; + + withdraw( + token: PromiseOrValue, + to: PromiseOrValue, + amount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + withdrawAndCall( + token: PromiseOrValue, + to: PromiseOrValue, + amount: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + callStatic: { + gateway(overrides?: CallOverrides): Promise; + + withdraw( + token: PromiseOrValue, + to: PromiseOrValue, + amount: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + withdrawAndCall( + token: PromiseOrValue, + to: PromiseOrValue, + amount: PromiseOrValue, + data: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + }; + + filters: { + "Withdraw(address,address,uint256)"( + token?: PromiseOrValue | null, + to?: PromiseOrValue | null, + amount?: null + ): WithdrawEventFilter; + Withdraw( + token?: PromiseOrValue | null, + to?: PromiseOrValue | null, + amount?: null + ): WithdrawEventFilter; + + "WithdrawAndCall(address,address,uint256,bytes)"( + token?: PromiseOrValue | null, + to?: PromiseOrValue | null, + amount?: null, + data?: null + ): WithdrawAndCallEventFilter; + WithdrawAndCall( + token?: PromiseOrValue | null, + to?: PromiseOrValue | null, + amount?: null, + data?: null + ): WithdrawAndCallEventFilter; + }; + + estimateGas: { + gateway(overrides?: CallOverrides): Promise; + + withdraw( + token: PromiseOrValue, + to: PromiseOrValue, + amount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + withdrawAndCall( + token: PromiseOrValue, + to: PromiseOrValue, + amount: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + }; + + populateTransaction: { + gateway(overrides?: CallOverrides): Promise; + + withdraw( + token: PromiseOrValue, + to: PromiseOrValue, + amount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + withdrawAndCall( + token: PromiseOrValue, + to: PromiseOrValue, + amount: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + }; +} diff --git a/typechain-types/contracts/prototypes/Gateway.ts b/typechain-types/contracts/prototypes/Gateway.ts new file mode 100644 index 00000000..5e76a81a --- /dev/null +++ b/typechain-types/contracts/prototypes/Gateway.ts @@ -0,0 +1,704 @@ +/* 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 GatewayInterface extends utils.Interface { + functions: { + "custody()": FunctionFragment; + "execute(address,bytes)": FunctionFragment; + "executeWithERC20(address,address,uint256,bytes)": FunctionFragment; + "initialize(address)": FunctionFragment; + "owner()": FunctionFragment; + "proxiableUUID()": FunctionFragment; + "renounceOwnership()": FunctionFragment; + "send(bytes,uint256)": FunctionFragment; + "sendERC20(bytes,address,uint256)": FunctionFragment; + "setCustody(address)": FunctionFragment; + "transferOwnership(address)": FunctionFragment; + "tssAddress()": FunctionFragment; + "upgradeTo(address)": FunctionFragment; + "upgradeToAndCall(address,bytes)": FunctionFragment; + }; + + getFunction( + nameOrSignatureOrTopic: + | "custody" + | "execute" + | "executeWithERC20" + | "initialize" + | "owner" + | "proxiableUUID" + | "renounceOwnership" + | "send" + | "sendERC20" + | "setCustody" + | "transferOwnership" + | "tssAddress" + | "upgradeTo" + | "upgradeToAndCall" + ): FunctionFragment; + + encodeFunctionData(functionFragment: "custody", values?: undefined): string; + encodeFunctionData( + functionFragment: "execute", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "executeWithERC20", + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ] + ): string; + encodeFunctionData( + functionFragment: "initialize", + values: [PromiseOrValue] + ): string; + encodeFunctionData(functionFragment: "owner", values?: undefined): string; + encodeFunctionData( + functionFragment: "proxiableUUID", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "renounceOwnership", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "send", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "sendERC20", + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ] + ): string; + encodeFunctionData( + functionFragment: "setCustody", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "transferOwnership", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "tssAddress", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "upgradeTo", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "upgradeToAndCall", + values: [PromiseOrValue, PromiseOrValue] + ): string; + + decodeFunctionResult(functionFragment: "custody", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "execute", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "executeWithERC20", + 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: "send", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "sendERC20", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "setCustody", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "transferOwnership", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "tssAddress", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "upgradeTo", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "upgradeToAndCall", + data: BytesLike + ): Result; + + events: { + "AdminChanged(address,address)": EventFragment; + "BeaconUpgraded(address)": EventFragment; + "Executed(address,uint256,bytes)": EventFragment; + "ExecutedWithERC20(address,address,uint256,bytes)": EventFragment; + "Initialized(uint8)": EventFragment; + "OwnershipTransferred(address,address)": EventFragment; + "Send(bytes,uint256)": EventFragment; + "SendERC20(bytes,address,uint256)": EventFragment; + "Upgraded(address)": EventFragment; + }; + + getEvent(nameOrSignatureOrTopic: "AdminChanged"): EventFragment; + getEvent(nameOrSignatureOrTopic: "BeaconUpgraded"): EventFragment; + getEvent(nameOrSignatureOrTopic: "Executed"): EventFragment; + getEvent(nameOrSignatureOrTopic: "ExecutedWithERC20"): EventFragment; + getEvent(nameOrSignatureOrTopic: "Initialized"): EventFragment; + getEvent(nameOrSignatureOrTopic: "OwnershipTransferred"): EventFragment; + getEvent(nameOrSignatureOrTopic: "Send"): EventFragment; + getEvent(nameOrSignatureOrTopic: "SendERC20"): EventFragment; + getEvent(nameOrSignatureOrTopic: "Upgraded"): 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 ExecutedEventObject { + destination: string; + value: BigNumber; + data: string; +} +export type ExecutedEvent = TypedEvent< + [string, BigNumber, string], + ExecutedEventObject +>; + +export type ExecutedEventFilter = TypedEventFilter; + +export interface ExecutedWithERC20EventObject { + token: string; + to: string; + amount: BigNumber; + data: string; +} +export type ExecutedWithERC20Event = TypedEvent< + [string, string, BigNumber, string], + ExecutedWithERC20EventObject +>; + +export type ExecutedWithERC20EventFilter = + 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 SendEventObject { + recipient: string; + amount: BigNumber; +} +export type SendEvent = TypedEvent<[string, BigNumber], SendEventObject>; + +export type SendEventFilter = TypedEventFilter; + +export interface SendERC20EventObject { + recipient: string; + asset: string; + amount: BigNumber; +} +export type SendERC20Event = TypedEvent< + [string, string, BigNumber], + SendERC20EventObject +>; + +export type SendERC20EventFilter = TypedEventFilter; + +export interface UpgradedEventObject { + implementation: string; +} +export type UpgradedEvent = TypedEvent<[string], UpgradedEventObject>; + +export type UpgradedEventFilter = TypedEventFilter; + +export interface Gateway extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + interface: GatewayInterface; + + 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: { + custody(overrides?: CallOverrides): Promise<[string]>; + + execute( + destination: PromiseOrValue, + data: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + executeWithERC20( + token: PromiseOrValue, + to: PromiseOrValue, + amount: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + initialize( + _tssAddress: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + owner(overrides?: CallOverrides): Promise<[string]>; + + proxiableUUID(overrides?: CallOverrides): Promise<[string]>; + + renounceOwnership( + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + send( + recipient: PromiseOrValue, + amount: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + sendERC20( + recipient: PromiseOrValue, + token: PromiseOrValue, + amount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setCustody( + _custody: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + transferOwnership( + newOwner: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + tssAddress(overrides?: CallOverrides): Promise<[string]>; + + upgradeTo( + newImplementation: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + upgradeToAndCall( + newImplementation: PromiseOrValue, + data: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + }; + + custody(overrides?: CallOverrides): Promise; + + execute( + destination: PromiseOrValue, + data: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + executeWithERC20( + token: PromiseOrValue, + to: PromiseOrValue, + amount: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + initialize( + _tssAddress: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + owner(overrides?: CallOverrides): Promise; + + proxiableUUID(overrides?: CallOverrides): Promise; + + renounceOwnership( + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + send( + recipient: PromiseOrValue, + amount: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + sendERC20( + recipient: PromiseOrValue, + token: PromiseOrValue, + amount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setCustody( + _custody: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + transferOwnership( + newOwner: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + tssAddress(overrides?: CallOverrides): Promise; + + upgradeTo( + newImplementation: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + upgradeToAndCall( + newImplementation: PromiseOrValue, + data: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + callStatic: { + custody(overrides?: CallOverrides): Promise; + + execute( + destination: PromiseOrValue, + data: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + executeWithERC20( + token: PromiseOrValue, + to: PromiseOrValue, + amount: PromiseOrValue, + data: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + initialize( + _tssAddress: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + owner(overrides?: CallOverrides): Promise; + + proxiableUUID(overrides?: CallOverrides): Promise; + + renounceOwnership(overrides?: CallOverrides): Promise; + + send( + recipient: PromiseOrValue, + amount: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + sendERC20( + recipient: PromiseOrValue, + token: PromiseOrValue, + amount: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + setCustody( + _custody: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + transferOwnership( + newOwner: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + tssAddress(overrides?: CallOverrides): Promise; + + upgradeTo( + newImplementation: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + upgradeToAndCall( + newImplementation: PromiseOrValue, + data: 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; + + "Executed(address,uint256,bytes)"( + destination?: PromiseOrValue | null, + value?: null, + data?: null + ): ExecutedEventFilter; + Executed( + destination?: PromiseOrValue | null, + value?: null, + data?: null + ): ExecutedEventFilter; + + "ExecutedWithERC20(address,address,uint256,bytes)"( + token?: PromiseOrValue | null, + to?: PromiseOrValue | null, + amount?: null, + data?: null + ): ExecutedWithERC20EventFilter; + ExecutedWithERC20( + token?: PromiseOrValue | null, + to?: PromiseOrValue | null, + amount?: null, + data?: null + ): ExecutedWithERC20EventFilter; + + "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; + + "Send(bytes,uint256)"(recipient?: null, amount?: null): SendEventFilter; + Send(recipient?: null, amount?: null): SendEventFilter; + + "SendERC20(bytes,address,uint256)"( + recipient?: null, + asset?: PromiseOrValue | null, + amount?: null + ): SendERC20EventFilter; + SendERC20( + recipient?: null, + asset?: PromiseOrValue | null, + amount?: null + ): SendERC20EventFilter; + + "Upgraded(address)"( + implementation?: PromiseOrValue | null + ): UpgradedEventFilter; + Upgraded( + implementation?: PromiseOrValue | null + ): UpgradedEventFilter; + }; + + estimateGas: { + custody(overrides?: CallOverrides): Promise; + + execute( + destination: PromiseOrValue, + data: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + executeWithERC20( + token: PromiseOrValue, + to: PromiseOrValue, + amount: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + initialize( + _tssAddress: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + owner(overrides?: CallOverrides): Promise; + + proxiableUUID(overrides?: CallOverrides): Promise; + + renounceOwnership( + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + send( + recipient: PromiseOrValue, + amount: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + sendERC20( + recipient: PromiseOrValue, + token: PromiseOrValue, + amount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setCustody( + _custody: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + transferOwnership( + newOwner: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + tssAddress(overrides?: CallOverrides): Promise; + + upgradeTo( + newImplementation: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + upgradeToAndCall( + newImplementation: PromiseOrValue, + data: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + }; + + populateTransaction: { + custody(overrides?: CallOverrides): Promise; + + execute( + destination: PromiseOrValue, + data: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + executeWithERC20( + token: PromiseOrValue, + to: PromiseOrValue, + amount: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + initialize( + _tssAddress: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + owner(overrides?: CallOverrides): Promise; + + proxiableUUID(overrides?: CallOverrides): Promise; + + renounceOwnership( + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + send( + recipient: PromiseOrValue, + amount: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + sendERC20( + recipient: PromiseOrValue, + token: PromiseOrValue, + amount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setCustody( + _custody: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + transferOwnership( + newOwner: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + tssAddress(overrides?: CallOverrides): Promise; + + upgradeTo( + newImplementation: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + upgradeToAndCall( + newImplementation: PromiseOrValue, + data: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + }; +} diff --git a/typechain-types/contracts/prototypes/GatewayUpgradeTest.ts b/typechain-types/contracts/prototypes/GatewayUpgradeTest.ts new file mode 100644 index 00000000..d870814a --- /dev/null +++ b/typechain-types/contracts/prototypes/GatewayUpgradeTest.ts @@ -0,0 +1,559 @@ +/* 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 GatewayUpgradeTestInterface extends utils.Interface { + functions: { + "custody()": FunctionFragment; + "execute(address,bytes)": FunctionFragment; + "executeWithERC20(address,address,uint256,bytes)": FunctionFragment; + "initialize()": FunctionFragment; + "owner()": FunctionFragment; + "proxiableUUID()": FunctionFragment; + "renounceOwnership()": FunctionFragment; + "setCustody(address)": FunctionFragment; + "transferOwnership(address)": FunctionFragment; + "upgradeTo(address)": FunctionFragment; + "upgradeToAndCall(address,bytes)": FunctionFragment; + }; + + getFunction( + nameOrSignatureOrTopic: + | "custody" + | "execute" + | "executeWithERC20" + | "initialize" + | "owner" + | "proxiableUUID" + | "renounceOwnership" + | "setCustody" + | "transferOwnership" + | "upgradeTo" + | "upgradeToAndCall" + ): FunctionFragment; + + encodeFunctionData(functionFragment: "custody", values?: undefined): string; + encodeFunctionData( + functionFragment: "execute", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "executeWithERC20", + values: [ + PromiseOrValue, + PromiseOrValue, + 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: "setCustody", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "transferOwnership", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "upgradeTo", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "upgradeToAndCall", + values: [PromiseOrValue, PromiseOrValue] + ): string; + + decodeFunctionResult(functionFragment: "custody", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "execute", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "executeWithERC20", + 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: "setCustody", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "transferOwnership", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "upgradeTo", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "upgradeToAndCall", + data: BytesLike + ): Result; + + events: { + "AdminChanged(address,address)": EventFragment; + "BeaconUpgraded(address)": EventFragment; + "ExecutedV2(address,uint256,bytes)": EventFragment; + "ExecutedWithERC20V2(address,address,uint256,bytes)": EventFragment; + "Initialized(uint8)": EventFragment; + "OwnershipTransferred(address,address)": EventFragment; + "Upgraded(address)": EventFragment; + }; + + getEvent(nameOrSignatureOrTopic: "AdminChanged"): EventFragment; + getEvent(nameOrSignatureOrTopic: "BeaconUpgraded"): EventFragment; + getEvent(nameOrSignatureOrTopic: "ExecutedV2"): EventFragment; + getEvent(nameOrSignatureOrTopic: "ExecutedWithERC20V2"): EventFragment; + getEvent(nameOrSignatureOrTopic: "Initialized"): EventFragment; + getEvent(nameOrSignatureOrTopic: "OwnershipTransferred"): EventFragment; + getEvent(nameOrSignatureOrTopic: "Upgraded"): 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 ExecutedV2EventObject { + destination: string; + value: BigNumber; + data: string; +} +export type ExecutedV2Event = TypedEvent< + [string, BigNumber, string], + ExecutedV2EventObject +>; + +export type ExecutedV2EventFilter = TypedEventFilter; + +export interface ExecutedWithERC20V2EventObject { + token: string; + to: string; + amount: BigNumber; + data: string; +} +export type ExecutedWithERC20V2Event = TypedEvent< + [string, string, BigNumber, string], + ExecutedWithERC20V2EventObject +>; + +export type ExecutedWithERC20V2EventFilter = + 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 GatewayUpgradeTest extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + interface: GatewayUpgradeTestInterface; + + 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: { + custody(overrides?: CallOverrides): Promise<[string]>; + + execute( + destination: PromiseOrValue, + data: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + executeWithERC20( + token: PromiseOrValue, + to: PromiseOrValue, + amount: PromiseOrValue, + data: 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; + + setCustody( + _custody: PromiseOrValue, + 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; + }; + + custody(overrides?: CallOverrides): Promise; + + execute( + destination: PromiseOrValue, + data: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + executeWithERC20( + token: PromiseOrValue, + to: PromiseOrValue, + amount: PromiseOrValue, + data: 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; + + setCustody( + _custody: PromiseOrValue, + 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; + + callStatic: { + custody(overrides?: CallOverrides): Promise; + + execute( + destination: PromiseOrValue, + data: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + executeWithERC20( + token: PromiseOrValue, + to: PromiseOrValue, + amount: PromiseOrValue, + data: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + initialize(overrides?: CallOverrides): Promise; + + owner(overrides?: CallOverrides): Promise; + + proxiableUUID(overrides?: CallOverrides): Promise; + + renounceOwnership(overrides?: CallOverrides): Promise; + + setCustody( + _custody: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + transferOwnership( + newOwner: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + upgradeTo( + newImplementation: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + upgradeToAndCall( + newImplementation: PromiseOrValue, + data: 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; + + "ExecutedV2(address,uint256,bytes)"( + destination?: PromiseOrValue | null, + value?: null, + data?: null + ): ExecutedV2EventFilter; + ExecutedV2( + destination?: PromiseOrValue | null, + value?: null, + data?: null + ): ExecutedV2EventFilter; + + "ExecutedWithERC20V2(address,address,uint256,bytes)"( + token?: PromiseOrValue | null, + to?: PromiseOrValue | null, + amount?: null, + data?: null + ): ExecutedWithERC20V2EventFilter; + ExecutedWithERC20V2( + token?: PromiseOrValue | null, + to?: PromiseOrValue | null, + amount?: null, + data?: null + ): ExecutedWithERC20V2EventFilter; + + "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; + }; + + estimateGas: { + custody(overrides?: CallOverrides): Promise; + + execute( + destination: PromiseOrValue, + data: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + executeWithERC20( + token: PromiseOrValue, + to: PromiseOrValue, + amount: PromiseOrValue, + data: 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; + + setCustody( + _custody: PromiseOrValue, + 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; + }; + + populateTransaction: { + custody(overrides?: CallOverrides): Promise; + + execute( + destination: PromiseOrValue, + data: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + executeWithERC20( + token: PromiseOrValue, + to: PromiseOrValue, + amount: PromiseOrValue, + data: 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; + + setCustody( + _custody: PromiseOrValue, + 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; + }; +} diff --git a/typechain-types/contracts/prototypes/GatewayV2.sol/Gateway.ts b/typechain-types/contracts/prototypes/GatewayV2.sol/Gateway.ts new file mode 100644 index 00000000..52121e90 --- /dev/null +++ b/typechain-types/contracts/prototypes/GatewayV2.sol/Gateway.ts @@ -0,0 +1,559 @@ +/* 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 GatewayInterface extends utils.Interface { + functions: { + "custody()": FunctionFragment; + "execute(address,bytes)": FunctionFragment; + "executeWithERC20(address,address,uint256,bytes)": FunctionFragment; + "initialize()": FunctionFragment; + "owner()": FunctionFragment; + "proxiableUUID()": FunctionFragment; + "renounceOwnership()": FunctionFragment; + "setCustody(address)": FunctionFragment; + "transferOwnership(address)": FunctionFragment; + "upgradeTo(address)": FunctionFragment; + "upgradeToAndCall(address,bytes)": FunctionFragment; + }; + + getFunction( + nameOrSignatureOrTopic: + | "custody" + | "execute" + | "executeWithERC20" + | "initialize" + | "owner" + | "proxiableUUID" + | "renounceOwnership" + | "setCustody" + | "transferOwnership" + | "upgradeTo" + | "upgradeToAndCall" + ): FunctionFragment; + + encodeFunctionData(functionFragment: "custody", values?: undefined): string; + encodeFunctionData( + functionFragment: "execute", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "executeWithERC20", + values: [ + PromiseOrValue, + PromiseOrValue, + 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: "setCustody", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "transferOwnership", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "upgradeTo", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "upgradeToAndCall", + values: [PromiseOrValue, PromiseOrValue] + ): string; + + decodeFunctionResult(functionFragment: "custody", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "execute", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "executeWithERC20", + 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: "setCustody", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "transferOwnership", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "upgradeTo", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "upgradeToAndCall", + data: BytesLike + ): Result; + + events: { + "AdminChanged(address,address)": EventFragment; + "BeaconUpgraded(address)": EventFragment; + "ExecutedV2(address,uint256,bytes)": EventFragment; + "ExecutedWithERC20V2(address,address,uint256,bytes)": EventFragment; + "Initialized(uint8)": EventFragment; + "OwnershipTransferred(address,address)": EventFragment; + "Upgraded(address)": EventFragment; + }; + + getEvent(nameOrSignatureOrTopic: "AdminChanged"): EventFragment; + getEvent(nameOrSignatureOrTopic: "BeaconUpgraded"): EventFragment; + getEvent(nameOrSignatureOrTopic: "ExecutedV2"): EventFragment; + getEvent(nameOrSignatureOrTopic: "ExecutedWithERC20V2"): EventFragment; + getEvent(nameOrSignatureOrTopic: "Initialized"): EventFragment; + getEvent(nameOrSignatureOrTopic: "OwnershipTransferred"): EventFragment; + getEvent(nameOrSignatureOrTopic: "Upgraded"): 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 ExecutedV2EventObject { + destination: string; + value: BigNumber; + data: string; +} +export type ExecutedV2Event = TypedEvent< + [string, BigNumber, string], + ExecutedV2EventObject +>; + +export type ExecutedV2EventFilter = TypedEventFilter; + +export interface ExecutedWithERC20V2EventObject { + token: string; + to: string; + amount: BigNumber; + data: string; +} +export type ExecutedWithERC20V2Event = TypedEvent< + [string, string, BigNumber, string], + ExecutedWithERC20V2EventObject +>; + +export type ExecutedWithERC20V2EventFilter = + 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 Gateway extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + interface: GatewayInterface; + + 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: { + custody(overrides?: CallOverrides): Promise<[string]>; + + execute( + destination: PromiseOrValue, + data: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + executeWithERC20( + token: PromiseOrValue, + to: PromiseOrValue, + amount: PromiseOrValue, + data: 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; + + setCustody( + _custody: PromiseOrValue, + 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; + }; + + custody(overrides?: CallOverrides): Promise; + + execute( + destination: PromiseOrValue, + data: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + executeWithERC20( + token: PromiseOrValue, + to: PromiseOrValue, + amount: PromiseOrValue, + data: 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; + + setCustody( + _custody: PromiseOrValue, + 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; + + callStatic: { + custody(overrides?: CallOverrides): Promise; + + execute( + destination: PromiseOrValue, + data: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + executeWithERC20( + token: PromiseOrValue, + to: PromiseOrValue, + amount: PromiseOrValue, + data: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + initialize(overrides?: CallOverrides): Promise; + + owner(overrides?: CallOverrides): Promise; + + proxiableUUID(overrides?: CallOverrides): Promise; + + renounceOwnership(overrides?: CallOverrides): Promise; + + setCustody( + _custody: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + transferOwnership( + newOwner: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + upgradeTo( + newImplementation: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + upgradeToAndCall( + newImplementation: PromiseOrValue, + data: 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; + + "ExecutedV2(address,uint256,bytes)"( + destination?: PromiseOrValue | null, + value?: null, + data?: null + ): ExecutedV2EventFilter; + ExecutedV2( + destination?: PromiseOrValue | null, + value?: null, + data?: null + ): ExecutedV2EventFilter; + + "ExecutedWithERC20V2(address,address,uint256,bytes)"( + token?: PromiseOrValue | null, + to?: PromiseOrValue | null, + amount?: null, + data?: null + ): ExecutedWithERC20V2EventFilter; + ExecutedWithERC20V2( + token?: PromiseOrValue | null, + to?: PromiseOrValue | null, + amount?: null, + data?: null + ): ExecutedWithERC20V2EventFilter; + + "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; + }; + + estimateGas: { + custody(overrides?: CallOverrides): Promise; + + execute( + destination: PromiseOrValue, + data: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + executeWithERC20( + token: PromiseOrValue, + to: PromiseOrValue, + amount: PromiseOrValue, + data: 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; + + setCustody( + _custody: PromiseOrValue, + 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; + }; + + populateTransaction: { + custody(overrides?: CallOverrides): Promise; + + execute( + destination: PromiseOrValue, + data: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + executeWithERC20( + token: PromiseOrValue, + to: PromiseOrValue, + amount: PromiseOrValue, + data: 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; + + setCustody( + _custody: PromiseOrValue, + 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; + }; +} diff --git a/typechain-types/contracts/prototypes/GatewayV2.sol/GatewayV2.ts b/typechain-types/contracts/prototypes/GatewayV2.sol/GatewayV2.ts new file mode 100644 index 00000000..a3b2787d --- /dev/null +++ b/typechain-types/contracts/prototypes/GatewayV2.sol/GatewayV2.ts @@ -0,0 +1,559 @@ +/* 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 GatewayV2Interface extends utils.Interface { + functions: { + "custody()": FunctionFragment; + "execute(address,bytes)": FunctionFragment; + "executeWithERC20(address,address,uint256,bytes)": FunctionFragment; + "initialize()": FunctionFragment; + "owner()": FunctionFragment; + "proxiableUUID()": FunctionFragment; + "renounceOwnership()": FunctionFragment; + "setCustody(address)": FunctionFragment; + "transferOwnership(address)": FunctionFragment; + "upgradeTo(address)": FunctionFragment; + "upgradeToAndCall(address,bytes)": FunctionFragment; + }; + + getFunction( + nameOrSignatureOrTopic: + | "custody" + | "execute" + | "executeWithERC20" + | "initialize" + | "owner" + | "proxiableUUID" + | "renounceOwnership" + | "setCustody" + | "transferOwnership" + | "upgradeTo" + | "upgradeToAndCall" + ): FunctionFragment; + + encodeFunctionData(functionFragment: "custody", values?: undefined): string; + encodeFunctionData( + functionFragment: "execute", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "executeWithERC20", + values: [ + PromiseOrValue, + PromiseOrValue, + 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: "setCustody", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "transferOwnership", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "upgradeTo", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "upgradeToAndCall", + values: [PromiseOrValue, PromiseOrValue] + ): string; + + decodeFunctionResult(functionFragment: "custody", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "execute", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "executeWithERC20", + 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: "setCustody", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "transferOwnership", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "upgradeTo", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "upgradeToAndCall", + data: BytesLike + ): Result; + + events: { + "AdminChanged(address,address)": EventFragment; + "BeaconUpgraded(address)": EventFragment; + "ExecutedV2(address,uint256,bytes)": EventFragment; + "ExecutedWithERC20V2(address,address,uint256,bytes)": EventFragment; + "Initialized(uint8)": EventFragment; + "OwnershipTransferred(address,address)": EventFragment; + "Upgraded(address)": EventFragment; + }; + + getEvent(nameOrSignatureOrTopic: "AdminChanged"): EventFragment; + getEvent(nameOrSignatureOrTopic: "BeaconUpgraded"): EventFragment; + getEvent(nameOrSignatureOrTopic: "ExecutedV2"): EventFragment; + getEvent(nameOrSignatureOrTopic: "ExecutedWithERC20V2"): EventFragment; + getEvent(nameOrSignatureOrTopic: "Initialized"): EventFragment; + getEvent(nameOrSignatureOrTopic: "OwnershipTransferred"): EventFragment; + getEvent(nameOrSignatureOrTopic: "Upgraded"): 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 ExecutedV2EventObject { + destination: string; + value: BigNumber; + data: string; +} +export type ExecutedV2Event = TypedEvent< + [string, BigNumber, string], + ExecutedV2EventObject +>; + +export type ExecutedV2EventFilter = TypedEventFilter; + +export interface ExecutedWithERC20V2EventObject { + token: string; + to: string; + amount: BigNumber; + data: string; +} +export type ExecutedWithERC20V2Event = TypedEvent< + [string, string, BigNumber, string], + ExecutedWithERC20V2EventObject +>; + +export type ExecutedWithERC20V2EventFilter = + 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 GatewayV2 extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + interface: GatewayV2Interface; + + 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: { + custody(overrides?: CallOverrides): Promise<[string]>; + + execute( + destination: PromiseOrValue, + data: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + executeWithERC20( + token: PromiseOrValue, + to: PromiseOrValue, + amount: PromiseOrValue, + data: 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; + + setCustody( + _custody: PromiseOrValue, + 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; + }; + + custody(overrides?: CallOverrides): Promise; + + execute( + destination: PromiseOrValue, + data: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + executeWithERC20( + token: PromiseOrValue, + to: PromiseOrValue, + amount: PromiseOrValue, + data: 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; + + setCustody( + _custody: PromiseOrValue, + 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; + + callStatic: { + custody(overrides?: CallOverrides): Promise; + + execute( + destination: PromiseOrValue, + data: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + executeWithERC20( + token: PromiseOrValue, + to: PromiseOrValue, + amount: PromiseOrValue, + data: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + initialize(overrides?: CallOverrides): Promise; + + owner(overrides?: CallOverrides): Promise; + + proxiableUUID(overrides?: CallOverrides): Promise; + + renounceOwnership(overrides?: CallOverrides): Promise; + + setCustody( + _custody: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + transferOwnership( + newOwner: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + upgradeTo( + newImplementation: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + upgradeToAndCall( + newImplementation: PromiseOrValue, + data: 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; + + "ExecutedV2(address,uint256,bytes)"( + destination?: PromiseOrValue | null, + value?: null, + data?: null + ): ExecutedV2EventFilter; + ExecutedV2( + destination?: PromiseOrValue | null, + value?: null, + data?: null + ): ExecutedV2EventFilter; + + "ExecutedWithERC20V2(address,address,uint256,bytes)"( + token?: PromiseOrValue | null, + to?: PromiseOrValue | null, + amount?: null, + data?: null + ): ExecutedWithERC20V2EventFilter; + ExecutedWithERC20V2( + token?: PromiseOrValue | null, + to?: PromiseOrValue | null, + amount?: null, + data?: null + ): ExecutedWithERC20V2EventFilter; + + "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; + }; + + estimateGas: { + custody(overrides?: CallOverrides): Promise; + + execute( + destination: PromiseOrValue, + data: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + executeWithERC20( + token: PromiseOrValue, + to: PromiseOrValue, + amount: PromiseOrValue, + data: 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; + + setCustody( + _custody: PromiseOrValue, + 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; + }; + + populateTransaction: { + custody(overrides?: CallOverrides): Promise; + + execute( + destination: PromiseOrValue, + data: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + executeWithERC20( + token: PromiseOrValue, + to: PromiseOrValue, + amount: PromiseOrValue, + data: 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; + + setCustody( + _custody: PromiseOrValue, + 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; + }; +} diff --git a/typechain-types/contracts/prototypes/GatewayV2.sol/index.ts b/typechain-types/contracts/prototypes/GatewayV2.sol/index.ts new file mode 100644 index 00000000..cc062d9c --- /dev/null +++ b/typechain-types/contracts/prototypes/GatewayV2.sol/index.ts @@ -0,0 +1,5 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +export type { Gateway } from "./Gateway"; +export type { GatewayV2 } from "./GatewayV2"; diff --git a/typechain-types/contracts/prototypes/GatewayV2.ts b/typechain-types/contracts/prototypes/GatewayV2.ts new file mode 100644 index 00000000..9d367e00 --- /dev/null +++ b/typechain-types/contracts/prototypes/GatewayV2.ts @@ -0,0 +1,559 @@ +/* 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 GatewayV2Interface extends utils.Interface { + functions: { + "custody()": FunctionFragment; + "execute(address,bytes)": FunctionFragment; + "executeWithERC20(address,address,uint256,bytes)": FunctionFragment; + "initialize()": FunctionFragment; + "owner()": FunctionFragment; + "proxiableUUID()": FunctionFragment; + "renounceOwnership()": FunctionFragment; + "setCustody(address)": FunctionFragment; + "transferOwnership(address)": FunctionFragment; + "upgradeTo(address)": FunctionFragment; + "upgradeToAndCall(address,bytes)": FunctionFragment; + }; + + getFunction( + nameOrSignatureOrTopic: + | "custody" + | "execute" + | "executeWithERC20" + | "initialize" + | "owner" + | "proxiableUUID" + | "renounceOwnership" + | "setCustody" + | "transferOwnership" + | "upgradeTo" + | "upgradeToAndCall" + ): FunctionFragment; + + encodeFunctionData(functionFragment: "custody", values?: undefined): string; + encodeFunctionData( + functionFragment: "execute", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "executeWithERC20", + values: [ + PromiseOrValue, + PromiseOrValue, + 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: "setCustody", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "transferOwnership", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "upgradeTo", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "upgradeToAndCall", + values: [PromiseOrValue, PromiseOrValue] + ): string; + + decodeFunctionResult(functionFragment: "custody", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "execute", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "executeWithERC20", + 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: "setCustody", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "transferOwnership", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "upgradeTo", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "upgradeToAndCall", + data: BytesLike + ): Result; + + events: { + "AdminChanged(address,address)": EventFragment; + "BeaconUpgraded(address)": EventFragment; + "ExecutedV2(address,uint256,bytes)": EventFragment; + "ExecutedWithERC20V2(address,address,uint256,bytes)": EventFragment; + "Initialized(uint8)": EventFragment; + "OwnershipTransferred(address,address)": EventFragment; + "Upgraded(address)": EventFragment; + }; + + getEvent(nameOrSignatureOrTopic: "AdminChanged"): EventFragment; + getEvent(nameOrSignatureOrTopic: "BeaconUpgraded"): EventFragment; + getEvent(nameOrSignatureOrTopic: "ExecutedV2"): EventFragment; + getEvent(nameOrSignatureOrTopic: "ExecutedWithERC20V2"): EventFragment; + getEvent(nameOrSignatureOrTopic: "Initialized"): EventFragment; + getEvent(nameOrSignatureOrTopic: "OwnershipTransferred"): EventFragment; + getEvent(nameOrSignatureOrTopic: "Upgraded"): 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 ExecutedV2EventObject { + destination: string; + value: BigNumber; + data: string; +} +export type ExecutedV2Event = TypedEvent< + [string, BigNumber, string], + ExecutedV2EventObject +>; + +export type ExecutedV2EventFilter = TypedEventFilter; + +export interface ExecutedWithERC20V2EventObject { + token: string; + to: string; + amount: BigNumber; + data: string; +} +export type ExecutedWithERC20V2Event = TypedEvent< + [string, string, BigNumber, string], + ExecutedWithERC20V2EventObject +>; + +export type ExecutedWithERC20V2EventFilter = + 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 GatewayV2 extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + interface: GatewayV2Interface; + + 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: { + custody(overrides?: CallOverrides): Promise<[string]>; + + execute( + destination: PromiseOrValue, + data: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + executeWithERC20( + token: PromiseOrValue, + to: PromiseOrValue, + amount: PromiseOrValue, + data: 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; + + setCustody( + _custody: PromiseOrValue, + 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; + }; + + custody(overrides?: CallOverrides): Promise; + + execute( + destination: PromiseOrValue, + data: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + executeWithERC20( + token: PromiseOrValue, + to: PromiseOrValue, + amount: PromiseOrValue, + data: 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; + + setCustody( + _custody: PromiseOrValue, + 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; + + callStatic: { + custody(overrides?: CallOverrides): Promise; + + execute( + destination: PromiseOrValue, + data: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + executeWithERC20( + token: PromiseOrValue, + to: PromiseOrValue, + amount: PromiseOrValue, + data: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + initialize(overrides?: CallOverrides): Promise; + + owner(overrides?: CallOverrides): Promise; + + proxiableUUID(overrides?: CallOverrides): Promise; + + renounceOwnership(overrides?: CallOverrides): Promise; + + setCustody( + _custody: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + transferOwnership( + newOwner: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + upgradeTo( + newImplementation: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + upgradeToAndCall( + newImplementation: PromiseOrValue, + data: 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; + + "ExecutedV2(address,uint256,bytes)"( + destination?: PromiseOrValue | null, + value?: null, + data?: null + ): ExecutedV2EventFilter; + ExecutedV2( + destination?: PromiseOrValue | null, + value?: null, + data?: null + ): ExecutedV2EventFilter; + + "ExecutedWithERC20V2(address,address,uint256,bytes)"( + token?: PromiseOrValue | null, + to?: PromiseOrValue | null, + amount?: null, + data?: null + ): ExecutedWithERC20V2EventFilter; + ExecutedWithERC20V2( + token?: PromiseOrValue | null, + to?: PromiseOrValue | null, + amount?: null, + data?: null + ): ExecutedWithERC20V2EventFilter; + + "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; + }; + + estimateGas: { + custody(overrides?: CallOverrides): Promise; + + execute( + destination: PromiseOrValue, + data: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + executeWithERC20( + token: PromiseOrValue, + to: PromiseOrValue, + amount: PromiseOrValue, + data: 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; + + setCustody( + _custody: PromiseOrValue, + 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; + }; + + populateTransaction: { + custody(overrides?: CallOverrides): Promise; + + execute( + destination: PromiseOrValue, + data: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + executeWithERC20( + token: PromiseOrValue, + to: PromiseOrValue, + amount: PromiseOrValue, + data: 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; + + setCustody( + _custody: PromiseOrValue, + 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; + }; +} diff --git a/typechain-types/contracts/prototypes/Receiver.ts b/typechain-types/contracts/prototypes/Receiver.ts new file mode 100644 index 00000000..4e82b83e --- /dev/null +++ b/typechain-types/contracts/prototypes/Receiver.ts @@ -0,0 +1,336 @@ +/* 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 ReceiverInterface extends utils.Interface { + functions: { + "receiveA(string,uint256,bool)": FunctionFragment; + "receiveB(string[],uint256[],bool)": FunctionFragment; + "receiveC(uint256,address,address)": FunctionFragment; + "receiveD()": FunctionFragment; + }; + + getFunction( + nameOrSignatureOrTopic: "receiveA" | "receiveB" | "receiveC" | "receiveD" + ): FunctionFragment; + + encodeFunctionData( + functionFragment: "receiveA", + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ] + ): string; + encodeFunctionData( + functionFragment: "receiveB", + values: [ + PromiseOrValue[], + PromiseOrValue[], + PromiseOrValue + ] + ): string; + encodeFunctionData( + functionFragment: "receiveC", + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ] + ): string; + encodeFunctionData(functionFragment: "receiveD", values?: undefined): string; + + decodeFunctionResult(functionFragment: "receiveA", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "receiveB", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "receiveC", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "receiveD", data: BytesLike): Result; + + events: { + "ReceivedA(address,uint256,string,uint256,bool)": EventFragment; + "ReceivedB(address,string[],uint256[],bool)": EventFragment; + "ReceivedC(address,uint256,address,address)": EventFragment; + "ReceivedD(address)": EventFragment; + }; + + getEvent(nameOrSignatureOrTopic: "ReceivedA"): EventFragment; + getEvent(nameOrSignatureOrTopic: "ReceivedB"): EventFragment; + getEvent(nameOrSignatureOrTopic: "ReceivedC"): EventFragment; + getEvent(nameOrSignatureOrTopic: "ReceivedD"): EventFragment; +} + +export interface ReceivedAEventObject { + sender: string; + value: BigNumber; + str: string; + num: BigNumber; + flag: boolean; +} +export type ReceivedAEvent = TypedEvent< + [string, BigNumber, string, BigNumber, boolean], + ReceivedAEventObject +>; + +export type ReceivedAEventFilter = TypedEventFilter; + +export interface ReceivedBEventObject { + sender: string; + strs: string[]; + nums: BigNumber[]; + flag: boolean; +} +export type ReceivedBEvent = TypedEvent< + [string, string[], BigNumber[], boolean], + ReceivedBEventObject +>; + +export type ReceivedBEventFilter = TypedEventFilter; + +export interface ReceivedCEventObject { + sender: string; + amount: BigNumber; + token: string; + destination: string; +} +export type ReceivedCEvent = TypedEvent< + [string, BigNumber, string, string], + ReceivedCEventObject +>; + +export type ReceivedCEventFilter = TypedEventFilter; + +export interface ReceivedDEventObject { + sender: string; +} +export type ReceivedDEvent = TypedEvent<[string], ReceivedDEventObject>; + +export type ReceivedDEventFilter = TypedEventFilter; + +export interface Receiver extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + interface: ReceiverInterface; + + 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: { + receiveA( + str: PromiseOrValue, + num: PromiseOrValue, + flag: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + receiveB( + strs: PromiseOrValue[], + nums: PromiseOrValue[], + flag: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + receiveC( + amount: PromiseOrValue, + token: PromiseOrValue, + destination: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + receiveD( + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + }; + + receiveA( + str: PromiseOrValue, + num: PromiseOrValue, + flag: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + receiveB( + strs: PromiseOrValue[], + nums: PromiseOrValue[], + flag: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + receiveC( + amount: PromiseOrValue, + token: PromiseOrValue, + destination: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + receiveD( + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + callStatic: { + receiveA( + str: PromiseOrValue, + num: PromiseOrValue, + flag: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + receiveB( + strs: PromiseOrValue[], + nums: PromiseOrValue[], + flag: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + receiveC( + amount: PromiseOrValue, + token: PromiseOrValue, + destination: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + receiveD(overrides?: CallOverrides): Promise; + }; + + filters: { + "ReceivedA(address,uint256,string,uint256,bool)"( + sender?: null, + value?: null, + str?: null, + num?: null, + flag?: null + ): ReceivedAEventFilter; + ReceivedA( + sender?: null, + value?: null, + str?: null, + num?: null, + flag?: null + ): ReceivedAEventFilter; + + "ReceivedB(address,string[],uint256[],bool)"( + sender?: null, + strs?: null, + nums?: null, + flag?: null + ): ReceivedBEventFilter; + ReceivedB( + sender?: null, + strs?: null, + nums?: null, + flag?: null + ): ReceivedBEventFilter; + + "ReceivedC(address,uint256,address,address)"( + sender?: null, + amount?: null, + token?: null, + destination?: null + ): ReceivedCEventFilter; + ReceivedC( + sender?: null, + amount?: null, + token?: null, + destination?: null + ): ReceivedCEventFilter; + + "ReceivedD(address)"(sender?: null): ReceivedDEventFilter; + ReceivedD(sender?: null): ReceivedDEventFilter; + }; + + estimateGas: { + receiveA( + str: PromiseOrValue, + num: PromiseOrValue, + flag: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + receiveB( + strs: PromiseOrValue[], + nums: PromiseOrValue[], + flag: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + receiveC( + amount: PromiseOrValue, + token: PromiseOrValue, + destination: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + receiveD( + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + }; + + populateTransaction: { + receiveA( + str: PromiseOrValue, + num: PromiseOrValue, + flag: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + receiveB( + strs: PromiseOrValue[], + nums: PromiseOrValue[], + flag: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + receiveC( + amount: PromiseOrValue, + token: PromiseOrValue, + destination: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + receiveD( + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + }; +} diff --git a/typechain-types/contracts/prototypes/TestERC20.ts b/typechain-types/contracts/prototypes/TestERC20.ts new file mode 100644 index 00000000..580edbbc --- /dev/null +++ b/typechain-types/contracts/prototypes/TestERC20.ts @@ -0,0 +1,501 @@ +/* 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, + EventFragment, +} from "@ethersproject/abi"; +import type { Listener, Provider } from "@ethersproject/providers"; +import type { + TypedEventFilter, + TypedEvent, + TypedListener, + OnEvent, + PromiseOrValue, +} from "../../common"; + +export interface TestERC20Interface extends utils.Interface { + functions: { + "allowance(address,address)": FunctionFragment; + "approve(address,uint256)": FunctionFragment; + "balanceOf(address)": FunctionFragment; + "decimals()": FunctionFragment; + "decreaseAllowance(address,uint256)": FunctionFragment; + "increaseAllowance(address,uint256)": FunctionFragment; + "mint(address,uint256)": FunctionFragment; + "name()": FunctionFragment; + "symbol()": FunctionFragment; + "totalSupply()": FunctionFragment; + "transfer(address,uint256)": FunctionFragment; + "transferFrom(address,address,uint256)": FunctionFragment; + }; + + getFunction( + nameOrSignatureOrTopic: + | "allowance" + | "approve" + | "balanceOf" + | "decimals" + | "decreaseAllowance" + | "increaseAllowance" + | "mint" + | "name" + | "symbol" + | "totalSupply" + | "transfer" + | "transferFrom" + ): FunctionFragment; + + encodeFunctionData( + functionFragment: "allowance", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "approve", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "balanceOf", + values: [PromiseOrValue] + ): string; + encodeFunctionData(functionFragment: "decimals", values?: undefined): string; + encodeFunctionData( + functionFragment: "decreaseAllowance", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "increaseAllowance", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "mint", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData(functionFragment: "name", values?: undefined): string; + encodeFunctionData(functionFragment: "symbol", values?: undefined): string; + encodeFunctionData( + functionFragment: "totalSupply", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "transfer", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "transferFrom", + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ] + ): string; + + decodeFunctionResult(functionFragment: "allowance", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "approve", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "balanceOf", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "decimals", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "decreaseAllowance", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "increaseAllowance", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "mint", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "name", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "symbol", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "totalSupply", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "transfer", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "transferFrom", + data: BytesLike + ): Result; + + events: { + "Approval(address,address,uint256)": EventFragment; + "Transfer(address,address,uint256)": EventFragment; + }; + + getEvent(nameOrSignatureOrTopic: "Approval"): EventFragment; + getEvent(nameOrSignatureOrTopic: "Transfer"): EventFragment; +} + +export interface ApprovalEventObject { + owner: string; + spender: string; + value: BigNumber; +} +export type ApprovalEvent = TypedEvent< + [string, string, BigNumber], + ApprovalEventObject +>; + +export type ApprovalEventFilter = TypedEventFilter; + +export interface TransferEventObject { + from: string; + to: string; + value: BigNumber; +} +export type TransferEvent = TypedEvent< + [string, string, BigNumber], + TransferEventObject +>; + +export type TransferEventFilter = TypedEventFilter; + +export interface TestERC20 extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + interface: TestERC20Interface; + + 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: { + allowance( + owner: PromiseOrValue, + spender: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + approve( + spender: PromiseOrValue, + amount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + balanceOf( + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + decimals(overrides?: CallOverrides): Promise<[number]>; + + decreaseAllowance( + spender: PromiseOrValue, + subtractedValue: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + increaseAllowance( + spender: PromiseOrValue, + addedValue: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + mint( + to: PromiseOrValue, + amount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + name(overrides?: CallOverrides): Promise<[string]>; + + symbol(overrides?: CallOverrides): Promise<[string]>; + + totalSupply(overrides?: CallOverrides): Promise<[BigNumber]>; + + transfer( + to: PromiseOrValue, + amount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + transferFrom( + from: PromiseOrValue, + to: PromiseOrValue, + amount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + }; + + allowance( + owner: PromiseOrValue, + spender: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + approve( + spender: PromiseOrValue, + amount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + balanceOf( + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + decimals(overrides?: CallOverrides): Promise; + + decreaseAllowance( + spender: PromiseOrValue, + subtractedValue: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + increaseAllowance( + spender: PromiseOrValue, + addedValue: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + mint( + to: PromiseOrValue, + amount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + name(overrides?: CallOverrides): Promise; + + symbol(overrides?: CallOverrides): Promise; + + totalSupply(overrides?: CallOverrides): Promise; + + transfer( + to: PromiseOrValue, + amount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + transferFrom( + from: PromiseOrValue, + to: PromiseOrValue, + amount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + callStatic: { + allowance( + owner: PromiseOrValue, + spender: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + approve( + spender: PromiseOrValue, + amount: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + balanceOf( + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + decimals(overrides?: CallOverrides): Promise; + + decreaseAllowance( + spender: PromiseOrValue, + subtractedValue: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + increaseAllowance( + spender: PromiseOrValue, + addedValue: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + mint( + to: PromiseOrValue, + amount: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + name(overrides?: CallOverrides): Promise; + + symbol(overrides?: CallOverrides): Promise; + + totalSupply(overrides?: CallOverrides): Promise; + + transfer( + to: PromiseOrValue, + amount: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + transferFrom( + from: PromiseOrValue, + to: PromiseOrValue, + amount: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + }; + + filters: { + "Approval(address,address,uint256)"( + owner?: PromiseOrValue | null, + spender?: PromiseOrValue | null, + value?: null + ): ApprovalEventFilter; + Approval( + owner?: PromiseOrValue | null, + spender?: PromiseOrValue | null, + value?: null + ): ApprovalEventFilter; + + "Transfer(address,address,uint256)"( + from?: PromiseOrValue | null, + to?: PromiseOrValue | null, + value?: null + ): TransferEventFilter; + Transfer( + from?: PromiseOrValue | null, + to?: PromiseOrValue | null, + value?: null + ): TransferEventFilter; + }; + + estimateGas: { + allowance( + owner: PromiseOrValue, + spender: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + approve( + spender: PromiseOrValue, + amount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + balanceOf( + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + decimals(overrides?: CallOverrides): Promise; + + decreaseAllowance( + spender: PromiseOrValue, + subtractedValue: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + increaseAllowance( + spender: PromiseOrValue, + addedValue: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + mint( + to: PromiseOrValue, + amount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + name(overrides?: CallOverrides): Promise; + + symbol(overrides?: CallOverrides): Promise; + + totalSupply(overrides?: CallOverrides): Promise; + + transfer( + to: PromiseOrValue, + amount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + transferFrom( + from: PromiseOrValue, + to: PromiseOrValue, + amount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + }; + + populateTransaction: { + allowance( + owner: PromiseOrValue, + spender: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + approve( + spender: PromiseOrValue, + amount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + balanceOf( + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + decimals(overrides?: CallOverrides): Promise; + + decreaseAllowance( + spender: PromiseOrValue, + subtractedValue: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + increaseAllowance( + spender: PromiseOrValue, + addedValue: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + mint( + to: PromiseOrValue, + amount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + name(overrides?: CallOverrides): Promise; + + symbol(overrides?: CallOverrides): Promise; + + totalSupply(overrides?: CallOverrides): Promise; + + transfer( + to: PromiseOrValue, + amount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + transferFrom( + from: PromiseOrValue, + to: PromiseOrValue, + amount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + }; +} diff --git a/typechain-types/contracts/prototypes/WETH9.ts b/typechain-types/contracts/prototypes/WETH9.ts new file mode 100644 index 00000000..cc4355f3 --- /dev/null +++ b/typechain-types/contracts/prototypes/WETH9.ts @@ -0,0 +1,480 @@ +/* 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 WETH9Interface extends utils.Interface { + functions: { + "allowance(address,address)": FunctionFragment; + "approve(address,uint256)": FunctionFragment; + "balanceOf(address)": FunctionFragment; + "decimals()": FunctionFragment; + "deposit()": FunctionFragment; + "name()": FunctionFragment; + "symbol()": FunctionFragment; + "totalSupply()": FunctionFragment; + "transfer(address,uint256)": FunctionFragment; + "transferFrom(address,address,uint256)": FunctionFragment; + "withdraw(uint256)": FunctionFragment; + }; + + getFunction( + nameOrSignatureOrTopic: + | "allowance" + | "approve" + | "balanceOf" + | "decimals" + | "deposit" + | "name" + | "symbol" + | "totalSupply" + | "transfer" + | "transferFrom" + | "withdraw" + ): FunctionFragment; + + encodeFunctionData( + functionFragment: "allowance", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "approve", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "balanceOf", + values: [PromiseOrValue] + ): string; + encodeFunctionData(functionFragment: "decimals", values?: undefined): string; + encodeFunctionData(functionFragment: "deposit", values?: undefined): string; + encodeFunctionData(functionFragment: "name", values?: undefined): string; + encodeFunctionData(functionFragment: "symbol", values?: undefined): string; + encodeFunctionData( + functionFragment: "totalSupply", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "transfer", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "transferFrom", + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ] + ): string; + encodeFunctionData( + functionFragment: "withdraw", + values: [PromiseOrValue] + ): string; + + decodeFunctionResult(functionFragment: "allowance", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "approve", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "balanceOf", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "decimals", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "deposit", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "name", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "symbol", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "totalSupply", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "transfer", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "transferFrom", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "withdraw", data: BytesLike): Result; + + events: { + "Approval(address,address,uint256)": EventFragment; + "Deposit(address,uint256)": EventFragment; + "Transfer(address,address,uint256)": EventFragment; + "Withdrawal(address,uint256)": EventFragment; + }; + + getEvent(nameOrSignatureOrTopic: "Approval"): EventFragment; + getEvent(nameOrSignatureOrTopic: "Deposit"): EventFragment; + getEvent(nameOrSignatureOrTopic: "Transfer"): EventFragment; + getEvent(nameOrSignatureOrTopic: "Withdrawal"): EventFragment; +} + +export interface ApprovalEventObject { + src: string; + guy: string; + wad: BigNumber; +} +export type ApprovalEvent = TypedEvent< + [string, string, BigNumber], + ApprovalEventObject +>; + +export type ApprovalEventFilter = TypedEventFilter; + +export interface DepositEventObject { + dst: string; + wad: BigNumber; +} +export type DepositEvent = TypedEvent<[string, BigNumber], DepositEventObject>; + +export type DepositEventFilter = TypedEventFilter; + +export interface TransferEventObject { + src: string; + dst: string; + wad: BigNumber; +} +export type TransferEvent = TypedEvent< + [string, string, BigNumber], + TransferEventObject +>; + +export type TransferEventFilter = TypedEventFilter; + +export interface WithdrawalEventObject { + src: string; + wad: BigNumber; +} +export type WithdrawalEvent = TypedEvent< + [string, BigNumber], + WithdrawalEventObject +>; + +export type WithdrawalEventFilter = TypedEventFilter; + +export interface WETH9 extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + interface: WETH9Interface; + + 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: { + allowance( + arg0: PromiseOrValue, + arg1: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + approve( + guy: PromiseOrValue, + wad: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + balanceOf( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + decimals(overrides?: CallOverrides): Promise<[number]>; + + deposit( + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + name(overrides?: CallOverrides): Promise<[string]>; + + symbol(overrides?: CallOverrides): Promise<[string]>; + + totalSupply(overrides?: CallOverrides): Promise<[BigNumber]>; + + transfer( + dst: PromiseOrValue, + wad: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + transferFrom( + src: PromiseOrValue, + dst: PromiseOrValue, + wad: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + withdraw( + wad: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + }; + + allowance( + arg0: PromiseOrValue, + arg1: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + approve( + guy: PromiseOrValue, + wad: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + balanceOf( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + decimals(overrides?: CallOverrides): Promise; + + deposit( + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + name(overrides?: CallOverrides): Promise; + + symbol(overrides?: CallOverrides): Promise; + + totalSupply(overrides?: CallOverrides): Promise; + + transfer( + dst: PromiseOrValue, + wad: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + transferFrom( + src: PromiseOrValue, + dst: PromiseOrValue, + wad: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + withdraw( + wad: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + callStatic: { + allowance( + arg0: PromiseOrValue, + arg1: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + approve( + guy: PromiseOrValue, + wad: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + balanceOf( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + decimals(overrides?: CallOverrides): Promise; + + deposit(overrides?: CallOverrides): Promise; + + name(overrides?: CallOverrides): Promise; + + symbol(overrides?: CallOverrides): Promise; + + totalSupply(overrides?: CallOverrides): Promise; + + transfer( + dst: PromiseOrValue, + wad: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + transferFrom( + src: PromiseOrValue, + dst: PromiseOrValue, + wad: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + withdraw( + wad: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + }; + + filters: { + "Approval(address,address,uint256)"( + src?: PromiseOrValue | null, + guy?: PromiseOrValue | null, + wad?: null + ): ApprovalEventFilter; + Approval( + src?: PromiseOrValue | null, + guy?: PromiseOrValue | null, + wad?: null + ): ApprovalEventFilter; + + "Deposit(address,uint256)"( + dst?: PromiseOrValue | null, + wad?: null + ): DepositEventFilter; + Deposit( + dst?: PromiseOrValue | null, + wad?: null + ): DepositEventFilter; + + "Transfer(address,address,uint256)"( + src?: PromiseOrValue | null, + dst?: PromiseOrValue | null, + wad?: null + ): TransferEventFilter; + Transfer( + src?: PromiseOrValue | null, + dst?: PromiseOrValue | null, + wad?: null + ): TransferEventFilter; + + "Withdrawal(address,uint256)"( + src?: PromiseOrValue | null, + wad?: null + ): WithdrawalEventFilter; + Withdrawal( + src?: PromiseOrValue | null, + wad?: null + ): WithdrawalEventFilter; + }; + + estimateGas: { + allowance( + arg0: PromiseOrValue, + arg1: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + approve( + guy: PromiseOrValue, + wad: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + balanceOf( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + decimals(overrides?: CallOverrides): Promise; + + deposit( + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + name(overrides?: CallOverrides): Promise; + + symbol(overrides?: CallOverrides): Promise; + + totalSupply(overrides?: CallOverrides): Promise; + + transfer( + dst: PromiseOrValue, + wad: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + transferFrom( + src: PromiseOrValue, + dst: PromiseOrValue, + wad: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + withdraw( + wad: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + }; + + populateTransaction: { + allowance( + arg0: PromiseOrValue, + arg1: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + approve( + guy: PromiseOrValue, + wad: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + balanceOf( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + decimals(overrides?: CallOverrides): Promise; + + deposit( + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + name(overrides?: CallOverrides): Promise; + + symbol(overrides?: CallOverrides): Promise; + + totalSupply(overrides?: CallOverrides): Promise; + + transfer( + dst: PromiseOrValue, + wad: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + transferFrom( + src: PromiseOrValue, + dst: PromiseOrValue, + wad: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + withdraw( + wad: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + }; +} diff --git a/typechain-types/contracts/prototypes/evm/ERC20CustodyNew.ts b/typechain-types/contracts/prototypes/evm/ERC20CustodyNew.ts new file mode 100644 index 00000000..7e4eb491 --- /dev/null +++ b/typechain-types/contracts/prototypes/evm/ERC20CustodyNew.ts @@ -0,0 +1,245 @@ +/* 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, + EventFragment, +} from "@ethersproject/abi"; +import type { Listener, Provider } from "@ethersproject/providers"; +import type { + TypedEventFilter, + TypedEvent, + TypedListener, + OnEvent, + PromiseOrValue, +} from "../../../common"; + +export interface ERC20CustodyNewInterface extends utils.Interface { + functions: { + "gateway()": FunctionFragment; + "withdraw(address,address,uint256)": FunctionFragment; + "withdrawAndCall(address,address,uint256,bytes)": FunctionFragment; + }; + + getFunction( + nameOrSignatureOrTopic: "gateway" | "withdraw" | "withdrawAndCall" + ): FunctionFragment; + + encodeFunctionData(functionFragment: "gateway", values?: undefined): string; + encodeFunctionData( + functionFragment: "withdraw", + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ] + ): string; + encodeFunctionData( + functionFragment: "withdrawAndCall", + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ] + ): string; + + decodeFunctionResult(functionFragment: "gateway", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "withdraw", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "withdrawAndCall", + data: BytesLike + ): Result; + + events: { + "Withdraw(address,address,uint256)": EventFragment; + "WithdrawAndCall(address,address,uint256,bytes)": EventFragment; + }; + + getEvent(nameOrSignatureOrTopic: "Withdraw"): EventFragment; + getEvent(nameOrSignatureOrTopic: "WithdrawAndCall"): EventFragment; +} + +export interface WithdrawEventObject { + token: string; + to: string; + amount: BigNumber; +} +export type WithdrawEvent = TypedEvent< + [string, string, BigNumber], + WithdrawEventObject +>; + +export type WithdrawEventFilter = TypedEventFilter; + +export interface WithdrawAndCallEventObject { + token: string; + to: string; + amount: BigNumber; + data: string; +} +export type WithdrawAndCallEvent = TypedEvent< + [string, string, BigNumber, string], + WithdrawAndCallEventObject +>; + +export type WithdrawAndCallEventFilter = TypedEventFilter; + +export interface ERC20CustodyNew extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + interface: ERC20CustodyNewInterface; + + 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: { + gateway(overrides?: CallOverrides): Promise<[string]>; + + withdraw( + token: PromiseOrValue, + to: PromiseOrValue, + amount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + withdrawAndCall( + token: PromiseOrValue, + to: PromiseOrValue, + amount: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + }; + + gateway(overrides?: CallOverrides): Promise; + + withdraw( + token: PromiseOrValue, + to: PromiseOrValue, + amount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + withdrawAndCall( + token: PromiseOrValue, + to: PromiseOrValue, + amount: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + callStatic: { + gateway(overrides?: CallOverrides): Promise; + + withdraw( + token: PromiseOrValue, + to: PromiseOrValue, + amount: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + withdrawAndCall( + token: PromiseOrValue, + to: PromiseOrValue, + amount: PromiseOrValue, + data: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + }; + + filters: { + "Withdraw(address,address,uint256)"( + token?: PromiseOrValue | null, + to?: PromiseOrValue | null, + amount?: null + ): WithdrawEventFilter; + Withdraw( + token?: PromiseOrValue | null, + to?: PromiseOrValue | null, + amount?: null + ): WithdrawEventFilter; + + "WithdrawAndCall(address,address,uint256,bytes)"( + token?: PromiseOrValue | null, + to?: PromiseOrValue | null, + amount?: null, + data?: null + ): WithdrawAndCallEventFilter; + WithdrawAndCall( + token?: PromiseOrValue | null, + to?: PromiseOrValue | null, + amount?: null, + data?: null + ): WithdrawAndCallEventFilter; + }; + + estimateGas: { + gateway(overrides?: CallOverrides): Promise; + + withdraw( + token: PromiseOrValue, + to: PromiseOrValue, + amount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + withdrawAndCall( + token: PromiseOrValue, + to: PromiseOrValue, + amount: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + }; + + populateTransaction: { + gateway(overrides?: CallOverrides): Promise; + + withdraw( + token: PromiseOrValue, + to: PromiseOrValue, + amount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + withdrawAndCall( + token: PromiseOrValue, + to: PromiseOrValue, + amount: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + }; +} diff --git a/typechain-types/contracts/prototypes/evm/Gateway.ts b/typechain-types/contracts/prototypes/evm/Gateway.ts new file mode 100644 index 00000000..b016bda1 --- /dev/null +++ b/typechain-types/contracts/prototypes/evm/Gateway.ts @@ -0,0 +1,704 @@ +/* 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 GatewayInterface extends utils.Interface { + functions: { + "custody()": FunctionFragment; + "execute(address,bytes)": FunctionFragment; + "executeWithERC20(address,address,uint256,bytes)": FunctionFragment; + "initialize(address)": FunctionFragment; + "owner()": FunctionFragment; + "proxiableUUID()": FunctionFragment; + "renounceOwnership()": FunctionFragment; + "send(bytes,uint256)": FunctionFragment; + "sendERC20(bytes,address,uint256)": FunctionFragment; + "setCustody(address)": FunctionFragment; + "transferOwnership(address)": FunctionFragment; + "tssAddress()": FunctionFragment; + "upgradeTo(address)": FunctionFragment; + "upgradeToAndCall(address,bytes)": FunctionFragment; + }; + + getFunction( + nameOrSignatureOrTopic: + | "custody" + | "execute" + | "executeWithERC20" + | "initialize" + | "owner" + | "proxiableUUID" + | "renounceOwnership" + | "send" + | "sendERC20" + | "setCustody" + | "transferOwnership" + | "tssAddress" + | "upgradeTo" + | "upgradeToAndCall" + ): FunctionFragment; + + encodeFunctionData(functionFragment: "custody", values?: undefined): string; + encodeFunctionData( + functionFragment: "execute", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "executeWithERC20", + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ] + ): string; + encodeFunctionData( + functionFragment: "initialize", + values: [PromiseOrValue] + ): string; + encodeFunctionData(functionFragment: "owner", values?: undefined): string; + encodeFunctionData( + functionFragment: "proxiableUUID", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "renounceOwnership", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "send", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "sendERC20", + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ] + ): string; + encodeFunctionData( + functionFragment: "setCustody", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "transferOwnership", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "tssAddress", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "upgradeTo", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "upgradeToAndCall", + values: [PromiseOrValue, PromiseOrValue] + ): string; + + decodeFunctionResult(functionFragment: "custody", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "execute", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "executeWithERC20", + 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: "send", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "sendERC20", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "setCustody", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "transferOwnership", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "tssAddress", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "upgradeTo", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "upgradeToAndCall", + data: BytesLike + ): Result; + + events: { + "AdminChanged(address,address)": EventFragment; + "BeaconUpgraded(address)": EventFragment; + "Executed(address,uint256,bytes)": EventFragment; + "ExecutedWithERC20(address,address,uint256,bytes)": EventFragment; + "Initialized(uint8)": EventFragment; + "OwnershipTransferred(address,address)": EventFragment; + "Send(bytes,uint256)": EventFragment; + "SendERC20(bytes,address,uint256)": EventFragment; + "Upgraded(address)": EventFragment; + }; + + getEvent(nameOrSignatureOrTopic: "AdminChanged"): EventFragment; + getEvent(nameOrSignatureOrTopic: "BeaconUpgraded"): EventFragment; + getEvent(nameOrSignatureOrTopic: "Executed"): EventFragment; + getEvent(nameOrSignatureOrTopic: "ExecutedWithERC20"): EventFragment; + getEvent(nameOrSignatureOrTopic: "Initialized"): EventFragment; + getEvent(nameOrSignatureOrTopic: "OwnershipTransferred"): EventFragment; + getEvent(nameOrSignatureOrTopic: "Send"): EventFragment; + getEvent(nameOrSignatureOrTopic: "SendERC20"): EventFragment; + getEvent(nameOrSignatureOrTopic: "Upgraded"): 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 ExecutedEventObject { + destination: string; + value: BigNumber; + data: string; +} +export type ExecutedEvent = TypedEvent< + [string, BigNumber, string], + ExecutedEventObject +>; + +export type ExecutedEventFilter = TypedEventFilter; + +export interface ExecutedWithERC20EventObject { + token: string; + to: string; + amount: BigNumber; + data: string; +} +export type ExecutedWithERC20Event = TypedEvent< + [string, string, BigNumber, string], + ExecutedWithERC20EventObject +>; + +export type ExecutedWithERC20EventFilter = + 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 SendEventObject { + recipient: string; + amount: BigNumber; +} +export type SendEvent = TypedEvent<[string, BigNumber], SendEventObject>; + +export type SendEventFilter = TypedEventFilter; + +export interface SendERC20EventObject { + recipient: string; + asset: string; + amount: BigNumber; +} +export type SendERC20Event = TypedEvent< + [string, string, BigNumber], + SendERC20EventObject +>; + +export type SendERC20EventFilter = TypedEventFilter; + +export interface UpgradedEventObject { + implementation: string; +} +export type UpgradedEvent = TypedEvent<[string], UpgradedEventObject>; + +export type UpgradedEventFilter = TypedEventFilter; + +export interface Gateway extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + interface: GatewayInterface; + + 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: { + custody(overrides?: CallOverrides): Promise<[string]>; + + execute( + destination: PromiseOrValue, + data: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + executeWithERC20( + token: PromiseOrValue, + to: PromiseOrValue, + amount: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + initialize( + _tssAddress: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + owner(overrides?: CallOverrides): Promise<[string]>; + + proxiableUUID(overrides?: CallOverrides): Promise<[string]>; + + renounceOwnership( + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + send( + recipient: PromiseOrValue, + amount: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + sendERC20( + recipient: PromiseOrValue, + token: PromiseOrValue, + amount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setCustody( + _custody: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + transferOwnership( + newOwner: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + tssAddress(overrides?: CallOverrides): Promise<[string]>; + + upgradeTo( + newImplementation: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + upgradeToAndCall( + newImplementation: PromiseOrValue, + data: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + }; + + custody(overrides?: CallOverrides): Promise; + + execute( + destination: PromiseOrValue, + data: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + executeWithERC20( + token: PromiseOrValue, + to: PromiseOrValue, + amount: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + initialize( + _tssAddress: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + owner(overrides?: CallOverrides): Promise; + + proxiableUUID(overrides?: CallOverrides): Promise; + + renounceOwnership( + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + send( + recipient: PromiseOrValue, + amount: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + sendERC20( + recipient: PromiseOrValue, + token: PromiseOrValue, + amount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setCustody( + _custody: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + transferOwnership( + newOwner: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + tssAddress(overrides?: CallOverrides): Promise; + + upgradeTo( + newImplementation: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + upgradeToAndCall( + newImplementation: PromiseOrValue, + data: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + callStatic: { + custody(overrides?: CallOverrides): Promise; + + execute( + destination: PromiseOrValue, + data: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + executeWithERC20( + token: PromiseOrValue, + to: PromiseOrValue, + amount: PromiseOrValue, + data: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + initialize( + _tssAddress: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + owner(overrides?: CallOverrides): Promise; + + proxiableUUID(overrides?: CallOverrides): Promise; + + renounceOwnership(overrides?: CallOverrides): Promise; + + send( + recipient: PromiseOrValue, + amount: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + sendERC20( + recipient: PromiseOrValue, + token: PromiseOrValue, + amount: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + setCustody( + _custody: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + transferOwnership( + newOwner: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + tssAddress(overrides?: CallOverrides): Promise; + + upgradeTo( + newImplementation: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + upgradeToAndCall( + newImplementation: PromiseOrValue, + data: 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; + + "Executed(address,uint256,bytes)"( + destination?: PromiseOrValue | null, + value?: null, + data?: null + ): ExecutedEventFilter; + Executed( + destination?: PromiseOrValue | null, + value?: null, + data?: null + ): ExecutedEventFilter; + + "ExecutedWithERC20(address,address,uint256,bytes)"( + token?: PromiseOrValue | null, + to?: PromiseOrValue | null, + amount?: null, + data?: null + ): ExecutedWithERC20EventFilter; + ExecutedWithERC20( + token?: PromiseOrValue | null, + to?: PromiseOrValue | null, + amount?: null, + data?: null + ): ExecutedWithERC20EventFilter; + + "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; + + "Send(bytes,uint256)"(recipient?: null, amount?: null): SendEventFilter; + Send(recipient?: null, amount?: null): SendEventFilter; + + "SendERC20(bytes,address,uint256)"( + recipient?: null, + asset?: PromiseOrValue | null, + amount?: null + ): SendERC20EventFilter; + SendERC20( + recipient?: null, + asset?: PromiseOrValue | null, + amount?: null + ): SendERC20EventFilter; + + "Upgraded(address)"( + implementation?: PromiseOrValue | null + ): UpgradedEventFilter; + Upgraded( + implementation?: PromiseOrValue | null + ): UpgradedEventFilter; + }; + + estimateGas: { + custody(overrides?: CallOverrides): Promise; + + execute( + destination: PromiseOrValue, + data: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + executeWithERC20( + token: PromiseOrValue, + to: PromiseOrValue, + amount: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + initialize( + _tssAddress: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + owner(overrides?: CallOverrides): Promise; + + proxiableUUID(overrides?: CallOverrides): Promise; + + renounceOwnership( + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + send( + recipient: PromiseOrValue, + amount: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + sendERC20( + recipient: PromiseOrValue, + token: PromiseOrValue, + amount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setCustody( + _custody: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + transferOwnership( + newOwner: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + tssAddress(overrides?: CallOverrides): Promise; + + upgradeTo( + newImplementation: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + upgradeToAndCall( + newImplementation: PromiseOrValue, + data: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + }; + + populateTransaction: { + custody(overrides?: CallOverrides): Promise; + + execute( + destination: PromiseOrValue, + data: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + executeWithERC20( + token: PromiseOrValue, + to: PromiseOrValue, + amount: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + initialize( + _tssAddress: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + owner(overrides?: CallOverrides): Promise; + + proxiableUUID(overrides?: CallOverrides): Promise; + + renounceOwnership( + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + send( + recipient: PromiseOrValue, + amount: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + sendERC20( + recipient: PromiseOrValue, + token: PromiseOrValue, + amount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setCustody( + _custody: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + transferOwnership( + newOwner: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + tssAddress(overrides?: CallOverrides): Promise; + + upgradeTo( + newImplementation: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + upgradeToAndCall( + newImplementation: PromiseOrValue, + data: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + }; +} diff --git a/typechain-types/contracts/prototypes/evm/GatewayEVM.ts b/typechain-types/contracts/prototypes/evm/GatewayEVM.ts new file mode 100644 index 00000000..45ca3f7f --- /dev/null +++ b/typechain-types/contracts/prototypes/evm/GatewayEVM.ts @@ -0,0 +1,852 @@ +/* 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 GatewayEVMInterface extends utils.Interface { + functions: { + "call(address,bytes)": FunctionFragment; + "custody()": FunctionFragment; + "deposit(address)": FunctionFragment; + "deposit(address,uint256,address)": FunctionFragment; + "depositAndCall(address,bytes)": FunctionFragment; + "depositAndCall(address,uint256,address,bytes)": FunctionFragment; + "execute(address,bytes)": FunctionFragment; + "executeWithERC20(address,address,uint256,bytes)": FunctionFragment; + "initialize(address)": FunctionFragment; + "owner()": FunctionFragment; + "proxiableUUID()": FunctionFragment; + "renounceOwnership()": FunctionFragment; + "setCustody(address)": FunctionFragment; + "transferOwnership(address)": FunctionFragment; + "tssAddress()": FunctionFragment; + "upgradeTo(address)": FunctionFragment; + "upgradeToAndCall(address,bytes)": FunctionFragment; + }; + + getFunction( + nameOrSignatureOrTopic: + | "call" + | "custody" + | "deposit(address)" + | "deposit(address,uint256,address)" + | "depositAndCall(address,bytes)" + | "depositAndCall(address,uint256,address,bytes)" + | "execute" + | "executeWithERC20" + | "initialize" + | "owner" + | "proxiableUUID" + | "renounceOwnership" + | "setCustody" + | "transferOwnership" + | "tssAddress" + | "upgradeTo" + | "upgradeToAndCall" + ): FunctionFragment; + + encodeFunctionData( + functionFragment: "call", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData(functionFragment: "custody", values?: undefined): string; + encodeFunctionData( + functionFragment: "deposit(address)", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "deposit(address,uint256,address)", + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ] + ): string; + encodeFunctionData( + functionFragment: "depositAndCall(address,bytes)", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "depositAndCall(address,uint256,address,bytes)", + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ] + ): string; + encodeFunctionData( + functionFragment: "execute", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "executeWithERC20", + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ] + ): string; + encodeFunctionData( + functionFragment: "initialize", + values: [PromiseOrValue] + ): string; + encodeFunctionData(functionFragment: "owner", values?: undefined): string; + encodeFunctionData( + functionFragment: "proxiableUUID", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "renounceOwnership", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "setCustody", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "transferOwnership", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "tssAddress", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "upgradeTo", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "upgradeToAndCall", + values: [PromiseOrValue, PromiseOrValue] + ): string; + + decodeFunctionResult(functionFragment: "call", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "custody", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "deposit(address)", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "deposit(address,uint256,address)", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "depositAndCall(address,bytes)", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "depositAndCall(address,uint256,address,bytes)", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "execute", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "executeWithERC20", + 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: "setCustody", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "transferOwnership", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "tssAddress", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "upgradeTo", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "upgradeToAndCall", + data: BytesLike + ): Result; + + events: { + "AdminChanged(address,address)": EventFragment; + "BeaconUpgraded(address)": EventFragment; + "Call(address,address,bytes)": EventFragment; + "Deposit(address,address,uint256,address,bytes)": EventFragment; + "Executed(address,uint256,bytes)": EventFragment; + "ExecutedWithERC20(address,address,uint256,bytes)": EventFragment; + "Initialized(uint8)": EventFragment; + "OwnershipTransferred(address,address)": EventFragment; + "Upgraded(address)": EventFragment; + }; + + getEvent(nameOrSignatureOrTopic: "AdminChanged"): EventFragment; + getEvent(nameOrSignatureOrTopic: "BeaconUpgraded"): EventFragment; + getEvent(nameOrSignatureOrTopic: "Call"): EventFragment; + getEvent(nameOrSignatureOrTopic: "Deposit"): EventFragment; + getEvent(nameOrSignatureOrTopic: "Executed"): EventFragment; + getEvent(nameOrSignatureOrTopic: "ExecutedWithERC20"): EventFragment; + getEvent(nameOrSignatureOrTopic: "Initialized"): EventFragment; + getEvent(nameOrSignatureOrTopic: "OwnershipTransferred"): EventFragment; + getEvent(nameOrSignatureOrTopic: "Upgraded"): 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; + payload: string; +} +export type CallEvent = TypedEvent<[string, string, string], CallEventObject>; + +export type CallEventFilter = TypedEventFilter; + +export interface DepositEventObject { + sender: string; + receiver: string; + amount: BigNumber; + asset: string; + payload: string; +} +export type DepositEvent = TypedEvent< + [string, string, BigNumber, string, string], + DepositEventObject +>; + +export type DepositEventFilter = TypedEventFilter; + +export interface ExecutedEventObject { + destination: string; + value: BigNumber; + data: string; +} +export type ExecutedEvent = TypedEvent< + [string, BigNumber, string], + ExecutedEventObject +>; + +export type ExecutedEventFilter = TypedEventFilter; + +export interface ExecutedWithERC20EventObject { + token: string; + to: string; + amount: BigNumber; + data: string; +} +export type ExecutedWithERC20Event = TypedEvent< + [string, string, BigNumber, string], + ExecutedWithERC20EventObject +>; + +export type ExecutedWithERC20EventFilter = + 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 GatewayEVM extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + interface: GatewayEVMInterface; + + 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, + payload: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + custody(overrides?: CallOverrides): Promise<[string]>; + + "deposit(address)"( + receiver: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + "deposit(address,uint256,address)"( + receiver: PromiseOrValue, + amount: PromiseOrValue, + asset: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + "depositAndCall(address,bytes)"( + receiver: PromiseOrValue, + payload: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + "depositAndCall(address,uint256,address,bytes)"( + receiver: PromiseOrValue, + amount: PromiseOrValue, + asset: PromiseOrValue, + payload: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + execute( + destination: PromiseOrValue, + data: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + executeWithERC20( + token: PromiseOrValue, + to: PromiseOrValue, + amount: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + initialize( + _tssAddress: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + owner(overrides?: CallOverrides): Promise<[string]>; + + proxiableUUID(overrides?: CallOverrides): Promise<[string]>; + + renounceOwnership( + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setCustody( + _custody: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + transferOwnership( + newOwner: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + tssAddress(overrides?: CallOverrides): Promise<[string]>; + + upgradeTo( + newImplementation: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + upgradeToAndCall( + newImplementation: PromiseOrValue, + data: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + }; + + call( + receiver: PromiseOrValue, + payload: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + custody(overrides?: CallOverrides): Promise; + + "deposit(address)"( + receiver: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + "deposit(address,uint256,address)"( + receiver: PromiseOrValue, + amount: PromiseOrValue, + asset: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + "depositAndCall(address,bytes)"( + receiver: PromiseOrValue, + payload: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + "depositAndCall(address,uint256,address,bytes)"( + receiver: PromiseOrValue, + amount: PromiseOrValue, + asset: PromiseOrValue, + payload: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + execute( + destination: PromiseOrValue, + data: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + executeWithERC20( + token: PromiseOrValue, + to: PromiseOrValue, + amount: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + initialize( + _tssAddress: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + owner(overrides?: CallOverrides): Promise; + + proxiableUUID(overrides?: CallOverrides): Promise; + + renounceOwnership( + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setCustody( + _custody: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + transferOwnership( + newOwner: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + tssAddress(overrides?: CallOverrides): Promise; + + upgradeTo( + newImplementation: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + upgradeToAndCall( + newImplementation: PromiseOrValue, + data: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + callStatic: { + call( + receiver: PromiseOrValue, + payload: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + custody(overrides?: CallOverrides): Promise; + + "deposit(address)"( + receiver: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + "deposit(address,uint256,address)"( + receiver: PromiseOrValue, + amount: PromiseOrValue, + asset: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + "depositAndCall(address,bytes)"( + receiver: PromiseOrValue, + payload: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + "depositAndCall(address,uint256,address,bytes)"( + receiver: PromiseOrValue, + amount: PromiseOrValue, + asset: PromiseOrValue, + payload: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + execute( + destination: PromiseOrValue, + data: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + executeWithERC20( + token: PromiseOrValue, + to: PromiseOrValue, + amount: PromiseOrValue, + data: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + initialize( + _tssAddress: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + owner(overrides?: CallOverrides): Promise; + + proxiableUUID(overrides?: CallOverrides): Promise; + + renounceOwnership(overrides?: CallOverrides): Promise; + + setCustody( + _custody: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + transferOwnership( + newOwner: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + tssAddress(overrides?: CallOverrides): Promise; + + upgradeTo( + newImplementation: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + upgradeToAndCall( + newImplementation: PromiseOrValue, + data: 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,address,bytes)"( + sender?: PromiseOrValue | null, + receiver?: PromiseOrValue | null, + payload?: null + ): CallEventFilter; + Call( + sender?: PromiseOrValue | null, + receiver?: PromiseOrValue | null, + payload?: null + ): CallEventFilter; + + "Deposit(address,address,uint256,address,bytes)"( + sender?: PromiseOrValue | null, + receiver?: PromiseOrValue | null, + amount?: null, + asset?: null, + payload?: null + ): DepositEventFilter; + Deposit( + sender?: PromiseOrValue | null, + receiver?: PromiseOrValue | null, + amount?: null, + asset?: null, + payload?: null + ): DepositEventFilter; + + "Executed(address,uint256,bytes)"( + destination?: PromiseOrValue | null, + value?: null, + data?: null + ): ExecutedEventFilter; + Executed( + destination?: PromiseOrValue | null, + value?: null, + data?: null + ): ExecutedEventFilter; + + "ExecutedWithERC20(address,address,uint256,bytes)"( + token?: PromiseOrValue | null, + to?: PromiseOrValue | null, + amount?: null, + data?: null + ): ExecutedWithERC20EventFilter; + ExecutedWithERC20( + token?: PromiseOrValue | null, + to?: PromiseOrValue | null, + amount?: null, + data?: null + ): ExecutedWithERC20EventFilter; + + "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; + }; + + estimateGas: { + call( + receiver: PromiseOrValue, + payload: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + custody(overrides?: CallOverrides): Promise; + + "deposit(address)"( + receiver: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + "deposit(address,uint256,address)"( + receiver: PromiseOrValue, + amount: PromiseOrValue, + asset: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + "depositAndCall(address,bytes)"( + receiver: PromiseOrValue, + payload: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + "depositAndCall(address,uint256,address,bytes)"( + receiver: PromiseOrValue, + amount: PromiseOrValue, + asset: PromiseOrValue, + payload: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + execute( + destination: PromiseOrValue, + data: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + executeWithERC20( + token: PromiseOrValue, + to: PromiseOrValue, + amount: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + initialize( + _tssAddress: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + owner(overrides?: CallOverrides): Promise; + + proxiableUUID(overrides?: CallOverrides): Promise; + + renounceOwnership( + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setCustody( + _custody: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + transferOwnership( + newOwner: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + tssAddress(overrides?: CallOverrides): Promise; + + upgradeTo( + newImplementation: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + upgradeToAndCall( + newImplementation: PromiseOrValue, + data: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + }; + + populateTransaction: { + call( + receiver: PromiseOrValue, + payload: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + custody(overrides?: CallOverrides): Promise; + + "deposit(address)"( + receiver: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + "deposit(address,uint256,address)"( + receiver: PromiseOrValue, + amount: PromiseOrValue, + asset: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + "depositAndCall(address,bytes)"( + receiver: PromiseOrValue, + payload: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + "depositAndCall(address,uint256,address,bytes)"( + receiver: PromiseOrValue, + amount: PromiseOrValue, + asset: PromiseOrValue, + payload: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + execute( + destination: PromiseOrValue, + data: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + executeWithERC20( + token: PromiseOrValue, + to: PromiseOrValue, + amount: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + initialize( + _tssAddress: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + owner(overrides?: CallOverrides): Promise; + + proxiableUUID(overrides?: CallOverrides): Promise; + + renounceOwnership( + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setCustody( + _custody: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + transferOwnership( + newOwner: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + tssAddress(overrides?: CallOverrides): Promise; + + upgradeTo( + newImplementation: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + upgradeToAndCall( + newImplementation: PromiseOrValue, + data: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + }; +} diff --git a/typechain-types/contracts/prototypes/evm/GatewayEVMUpgradeTest.ts b/typechain-types/contracts/prototypes/evm/GatewayEVMUpgradeTest.ts new file mode 100644 index 00000000..27f1c7e1 --- /dev/null +++ b/typechain-types/contracts/prototypes/evm/GatewayEVMUpgradeTest.ts @@ -0,0 +1,704 @@ +/* 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 GatewayEVMUpgradeTestInterface extends utils.Interface { + functions: { + "custody()": FunctionFragment; + "execute(address,bytes)": FunctionFragment; + "executeWithERC20(address,address,uint256,bytes)": FunctionFragment; + "initialize(address)": FunctionFragment; + "owner()": FunctionFragment; + "proxiableUUID()": FunctionFragment; + "renounceOwnership()": FunctionFragment; + "send(bytes,uint256)": FunctionFragment; + "sendERC20(bytes,address,uint256)": FunctionFragment; + "setCustody(address)": FunctionFragment; + "transferOwnership(address)": FunctionFragment; + "tssAddress()": FunctionFragment; + "upgradeTo(address)": FunctionFragment; + "upgradeToAndCall(address,bytes)": FunctionFragment; + }; + + getFunction( + nameOrSignatureOrTopic: + | "custody" + | "execute" + | "executeWithERC20" + | "initialize" + | "owner" + | "proxiableUUID" + | "renounceOwnership" + | "send" + | "sendERC20" + | "setCustody" + | "transferOwnership" + | "tssAddress" + | "upgradeTo" + | "upgradeToAndCall" + ): FunctionFragment; + + encodeFunctionData(functionFragment: "custody", values?: undefined): string; + encodeFunctionData( + functionFragment: "execute", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "executeWithERC20", + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ] + ): string; + encodeFunctionData( + functionFragment: "initialize", + values: [PromiseOrValue] + ): string; + encodeFunctionData(functionFragment: "owner", values?: undefined): string; + encodeFunctionData( + functionFragment: "proxiableUUID", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "renounceOwnership", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "send", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "sendERC20", + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ] + ): string; + encodeFunctionData( + functionFragment: "setCustody", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "transferOwnership", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "tssAddress", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "upgradeTo", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "upgradeToAndCall", + values: [PromiseOrValue, PromiseOrValue] + ): string; + + decodeFunctionResult(functionFragment: "custody", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "execute", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "executeWithERC20", + 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: "send", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "sendERC20", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "setCustody", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "transferOwnership", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "tssAddress", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "upgradeTo", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "upgradeToAndCall", + data: BytesLike + ): Result; + + events: { + "AdminChanged(address,address)": EventFragment; + "BeaconUpgraded(address)": EventFragment; + "ExecutedV2(address,uint256,bytes)": EventFragment; + "ExecutedWithERC20(address,address,uint256,bytes)": EventFragment; + "Initialized(uint8)": EventFragment; + "OwnershipTransferred(address,address)": EventFragment; + "Send(bytes,uint256)": EventFragment; + "SendERC20(bytes,address,uint256)": EventFragment; + "Upgraded(address)": EventFragment; + }; + + getEvent(nameOrSignatureOrTopic: "AdminChanged"): EventFragment; + getEvent(nameOrSignatureOrTopic: "BeaconUpgraded"): EventFragment; + getEvent(nameOrSignatureOrTopic: "ExecutedV2"): EventFragment; + getEvent(nameOrSignatureOrTopic: "ExecutedWithERC20"): EventFragment; + getEvent(nameOrSignatureOrTopic: "Initialized"): EventFragment; + getEvent(nameOrSignatureOrTopic: "OwnershipTransferred"): EventFragment; + getEvent(nameOrSignatureOrTopic: "Send"): EventFragment; + getEvent(nameOrSignatureOrTopic: "SendERC20"): EventFragment; + getEvent(nameOrSignatureOrTopic: "Upgraded"): 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 ExecutedV2EventObject { + destination: string; + value: BigNumber; + data: string; +} +export type ExecutedV2Event = TypedEvent< + [string, BigNumber, string], + ExecutedV2EventObject +>; + +export type ExecutedV2EventFilter = TypedEventFilter; + +export interface ExecutedWithERC20EventObject { + token: string; + to: string; + amount: BigNumber; + data: string; +} +export type ExecutedWithERC20Event = TypedEvent< + [string, string, BigNumber, string], + ExecutedWithERC20EventObject +>; + +export type ExecutedWithERC20EventFilter = + 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 SendEventObject { + recipient: string; + amount: BigNumber; +} +export type SendEvent = TypedEvent<[string, BigNumber], SendEventObject>; + +export type SendEventFilter = TypedEventFilter; + +export interface SendERC20EventObject { + recipient: string; + asset: string; + amount: BigNumber; +} +export type SendERC20Event = TypedEvent< + [string, string, BigNumber], + SendERC20EventObject +>; + +export type SendERC20EventFilter = TypedEventFilter; + +export interface UpgradedEventObject { + implementation: string; +} +export type UpgradedEvent = TypedEvent<[string], UpgradedEventObject>; + +export type UpgradedEventFilter = TypedEventFilter; + +export interface GatewayEVMUpgradeTest extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + interface: GatewayEVMUpgradeTestInterface; + + 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: { + custody(overrides?: CallOverrides): Promise<[string]>; + + execute( + destination: PromiseOrValue, + data: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + executeWithERC20( + token: PromiseOrValue, + to: PromiseOrValue, + amount: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + initialize( + _tssAddress: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + owner(overrides?: CallOverrides): Promise<[string]>; + + proxiableUUID(overrides?: CallOverrides): Promise<[string]>; + + renounceOwnership( + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + send( + recipient: PromiseOrValue, + amount: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + sendERC20( + recipient: PromiseOrValue, + token: PromiseOrValue, + amount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setCustody( + _custody: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + transferOwnership( + newOwner: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + tssAddress(overrides?: CallOverrides): Promise<[string]>; + + upgradeTo( + newImplementation: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + upgradeToAndCall( + newImplementation: PromiseOrValue, + data: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + }; + + custody(overrides?: CallOverrides): Promise; + + execute( + destination: PromiseOrValue, + data: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + executeWithERC20( + token: PromiseOrValue, + to: PromiseOrValue, + amount: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + initialize( + _tssAddress: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + owner(overrides?: CallOverrides): Promise; + + proxiableUUID(overrides?: CallOverrides): Promise; + + renounceOwnership( + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + send( + recipient: PromiseOrValue, + amount: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + sendERC20( + recipient: PromiseOrValue, + token: PromiseOrValue, + amount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setCustody( + _custody: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + transferOwnership( + newOwner: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + tssAddress(overrides?: CallOverrides): Promise; + + upgradeTo( + newImplementation: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + upgradeToAndCall( + newImplementation: PromiseOrValue, + data: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + callStatic: { + custody(overrides?: CallOverrides): Promise; + + execute( + destination: PromiseOrValue, + data: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + executeWithERC20( + token: PromiseOrValue, + to: PromiseOrValue, + amount: PromiseOrValue, + data: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + initialize( + _tssAddress: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + owner(overrides?: CallOverrides): Promise; + + proxiableUUID(overrides?: CallOverrides): Promise; + + renounceOwnership(overrides?: CallOverrides): Promise; + + send( + recipient: PromiseOrValue, + amount: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + sendERC20( + recipient: PromiseOrValue, + token: PromiseOrValue, + amount: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + setCustody( + _custody: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + transferOwnership( + newOwner: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + tssAddress(overrides?: CallOverrides): Promise; + + upgradeTo( + newImplementation: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + upgradeToAndCall( + newImplementation: PromiseOrValue, + data: 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; + + "ExecutedV2(address,uint256,bytes)"( + destination?: PromiseOrValue | null, + value?: null, + data?: null + ): ExecutedV2EventFilter; + ExecutedV2( + destination?: PromiseOrValue | null, + value?: null, + data?: null + ): ExecutedV2EventFilter; + + "ExecutedWithERC20(address,address,uint256,bytes)"( + token?: PromiseOrValue | null, + to?: PromiseOrValue | null, + amount?: null, + data?: null + ): ExecutedWithERC20EventFilter; + ExecutedWithERC20( + token?: PromiseOrValue | null, + to?: PromiseOrValue | null, + amount?: null, + data?: null + ): ExecutedWithERC20EventFilter; + + "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; + + "Send(bytes,uint256)"(recipient?: null, amount?: null): SendEventFilter; + Send(recipient?: null, amount?: null): SendEventFilter; + + "SendERC20(bytes,address,uint256)"( + recipient?: null, + asset?: PromiseOrValue | null, + amount?: null + ): SendERC20EventFilter; + SendERC20( + recipient?: null, + asset?: PromiseOrValue | null, + amount?: null + ): SendERC20EventFilter; + + "Upgraded(address)"( + implementation?: PromiseOrValue | null + ): UpgradedEventFilter; + Upgraded( + implementation?: PromiseOrValue | null + ): UpgradedEventFilter; + }; + + estimateGas: { + custody(overrides?: CallOverrides): Promise; + + execute( + destination: PromiseOrValue, + data: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + executeWithERC20( + token: PromiseOrValue, + to: PromiseOrValue, + amount: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + initialize( + _tssAddress: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + owner(overrides?: CallOverrides): Promise; + + proxiableUUID(overrides?: CallOverrides): Promise; + + renounceOwnership( + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + send( + recipient: PromiseOrValue, + amount: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + sendERC20( + recipient: PromiseOrValue, + token: PromiseOrValue, + amount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setCustody( + _custody: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + transferOwnership( + newOwner: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + tssAddress(overrides?: CallOverrides): Promise; + + upgradeTo( + newImplementation: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + upgradeToAndCall( + newImplementation: PromiseOrValue, + data: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + }; + + populateTransaction: { + custody(overrides?: CallOverrides): Promise; + + execute( + destination: PromiseOrValue, + data: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + executeWithERC20( + token: PromiseOrValue, + to: PromiseOrValue, + amount: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + initialize( + _tssAddress: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + owner(overrides?: CallOverrides): Promise; + + proxiableUUID(overrides?: CallOverrides): Promise; + + renounceOwnership( + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + send( + recipient: PromiseOrValue, + amount: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + sendERC20( + recipient: PromiseOrValue, + token: PromiseOrValue, + amount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setCustody( + _custody: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + transferOwnership( + newOwner: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + tssAddress(overrides?: CallOverrides): Promise; + + upgradeTo( + newImplementation: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + upgradeToAndCall( + newImplementation: PromiseOrValue, + data: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + }; +} diff --git a/typechain-types/contracts/prototypes/evm/GatewayUpgradeTest.ts b/typechain-types/contracts/prototypes/evm/GatewayUpgradeTest.ts new file mode 100644 index 00000000..e3880b5e --- /dev/null +++ b/typechain-types/contracts/prototypes/evm/GatewayUpgradeTest.ts @@ -0,0 +1,704 @@ +/* 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 GatewayUpgradeTestInterface extends utils.Interface { + functions: { + "custody()": FunctionFragment; + "execute(address,bytes)": FunctionFragment; + "executeWithERC20(address,address,uint256,bytes)": FunctionFragment; + "initialize(address)": FunctionFragment; + "owner()": FunctionFragment; + "proxiableUUID()": FunctionFragment; + "renounceOwnership()": FunctionFragment; + "send(bytes,uint256)": FunctionFragment; + "sendERC20(bytes,address,uint256)": FunctionFragment; + "setCustody(address)": FunctionFragment; + "transferOwnership(address)": FunctionFragment; + "tssAddress()": FunctionFragment; + "upgradeTo(address)": FunctionFragment; + "upgradeToAndCall(address,bytes)": FunctionFragment; + }; + + getFunction( + nameOrSignatureOrTopic: + | "custody" + | "execute" + | "executeWithERC20" + | "initialize" + | "owner" + | "proxiableUUID" + | "renounceOwnership" + | "send" + | "sendERC20" + | "setCustody" + | "transferOwnership" + | "tssAddress" + | "upgradeTo" + | "upgradeToAndCall" + ): FunctionFragment; + + encodeFunctionData(functionFragment: "custody", values?: undefined): string; + encodeFunctionData( + functionFragment: "execute", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "executeWithERC20", + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ] + ): string; + encodeFunctionData( + functionFragment: "initialize", + values: [PromiseOrValue] + ): string; + encodeFunctionData(functionFragment: "owner", values?: undefined): string; + encodeFunctionData( + functionFragment: "proxiableUUID", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "renounceOwnership", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "send", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "sendERC20", + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ] + ): string; + encodeFunctionData( + functionFragment: "setCustody", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "transferOwnership", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "tssAddress", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "upgradeTo", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "upgradeToAndCall", + values: [PromiseOrValue, PromiseOrValue] + ): string; + + decodeFunctionResult(functionFragment: "custody", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "execute", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "executeWithERC20", + 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: "send", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "sendERC20", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "setCustody", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "transferOwnership", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "tssAddress", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "upgradeTo", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "upgradeToAndCall", + data: BytesLike + ): Result; + + events: { + "AdminChanged(address,address)": EventFragment; + "BeaconUpgraded(address)": EventFragment; + "ExecutedV2(address,uint256,bytes)": EventFragment; + "ExecutedWithERC20(address,address,uint256,bytes)": EventFragment; + "Initialized(uint8)": EventFragment; + "OwnershipTransferred(address,address)": EventFragment; + "Send(bytes,uint256)": EventFragment; + "SendERC20(bytes,address,uint256)": EventFragment; + "Upgraded(address)": EventFragment; + }; + + getEvent(nameOrSignatureOrTopic: "AdminChanged"): EventFragment; + getEvent(nameOrSignatureOrTopic: "BeaconUpgraded"): EventFragment; + getEvent(nameOrSignatureOrTopic: "ExecutedV2"): EventFragment; + getEvent(nameOrSignatureOrTopic: "ExecutedWithERC20"): EventFragment; + getEvent(nameOrSignatureOrTopic: "Initialized"): EventFragment; + getEvent(nameOrSignatureOrTopic: "OwnershipTransferred"): EventFragment; + getEvent(nameOrSignatureOrTopic: "Send"): EventFragment; + getEvent(nameOrSignatureOrTopic: "SendERC20"): EventFragment; + getEvent(nameOrSignatureOrTopic: "Upgraded"): 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 ExecutedV2EventObject { + destination: string; + value: BigNumber; + data: string; +} +export type ExecutedV2Event = TypedEvent< + [string, BigNumber, string], + ExecutedV2EventObject +>; + +export type ExecutedV2EventFilter = TypedEventFilter; + +export interface ExecutedWithERC20EventObject { + token: string; + to: string; + amount: BigNumber; + data: string; +} +export type ExecutedWithERC20Event = TypedEvent< + [string, string, BigNumber, string], + ExecutedWithERC20EventObject +>; + +export type ExecutedWithERC20EventFilter = + 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 SendEventObject { + recipient: string; + amount: BigNumber; +} +export type SendEvent = TypedEvent<[string, BigNumber], SendEventObject>; + +export type SendEventFilter = TypedEventFilter; + +export interface SendERC20EventObject { + recipient: string; + asset: string; + amount: BigNumber; +} +export type SendERC20Event = TypedEvent< + [string, string, BigNumber], + SendERC20EventObject +>; + +export type SendERC20EventFilter = TypedEventFilter; + +export interface UpgradedEventObject { + implementation: string; +} +export type UpgradedEvent = TypedEvent<[string], UpgradedEventObject>; + +export type UpgradedEventFilter = TypedEventFilter; + +export interface GatewayUpgradeTest extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + interface: GatewayUpgradeTestInterface; + + 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: { + custody(overrides?: CallOverrides): Promise<[string]>; + + execute( + destination: PromiseOrValue, + data: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + executeWithERC20( + token: PromiseOrValue, + to: PromiseOrValue, + amount: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + initialize( + _tssAddress: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + owner(overrides?: CallOverrides): Promise<[string]>; + + proxiableUUID(overrides?: CallOverrides): Promise<[string]>; + + renounceOwnership( + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + send( + recipient: PromiseOrValue, + amount: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + sendERC20( + recipient: PromiseOrValue, + token: PromiseOrValue, + amount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setCustody( + _custody: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + transferOwnership( + newOwner: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + tssAddress(overrides?: CallOverrides): Promise<[string]>; + + upgradeTo( + newImplementation: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + upgradeToAndCall( + newImplementation: PromiseOrValue, + data: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + }; + + custody(overrides?: CallOverrides): Promise; + + execute( + destination: PromiseOrValue, + data: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + executeWithERC20( + token: PromiseOrValue, + to: PromiseOrValue, + amount: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + initialize( + _tssAddress: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + owner(overrides?: CallOverrides): Promise; + + proxiableUUID(overrides?: CallOverrides): Promise; + + renounceOwnership( + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + send( + recipient: PromiseOrValue, + amount: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + sendERC20( + recipient: PromiseOrValue, + token: PromiseOrValue, + amount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setCustody( + _custody: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + transferOwnership( + newOwner: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + tssAddress(overrides?: CallOverrides): Promise; + + upgradeTo( + newImplementation: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + upgradeToAndCall( + newImplementation: PromiseOrValue, + data: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + callStatic: { + custody(overrides?: CallOverrides): Promise; + + execute( + destination: PromiseOrValue, + data: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + executeWithERC20( + token: PromiseOrValue, + to: PromiseOrValue, + amount: PromiseOrValue, + data: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + initialize( + _tssAddress: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + owner(overrides?: CallOverrides): Promise; + + proxiableUUID(overrides?: CallOverrides): Promise; + + renounceOwnership(overrides?: CallOverrides): Promise; + + send( + recipient: PromiseOrValue, + amount: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + sendERC20( + recipient: PromiseOrValue, + token: PromiseOrValue, + amount: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + setCustody( + _custody: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + transferOwnership( + newOwner: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + tssAddress(overrides?: CallOverrides): Promise; + + upgradeTo( + newImplementation: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + upgradeToAndCall( + newImplementation: PromiseOrValue, + data: 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; + + "ExecutedV2(address,uint256,bytes)"( + destination?: PromiseOrValue | null, + value?: null, + data?: null + ): ExecutedV2EventFilter; + ExecutedV2( + destination?: PromiseOrValue | null, + value?: null, + data?: null + ): ExecutedV2EventFilter; + + "ExecutedWithERC20(address,address,uint256,bytes)"( + token?: PromiseOrValue | null, + to?: PromiseOrValue | null, + amount?: null, + data?: null + ): ExecutedWithERC20EventFilter; + ExecutedWithERC20( + token?: PromiseOrValue | null, + to?: PromiseOrValue | null, + amount?: null, + data?: null + ): ExecutedWithERC20EventFilter; + + "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; + + "Send(bytes,uint256)"(recipient?: null, amount?: null): SendEventFilter; + Send(recipient?: null, amount?: null): SendEventFilter; + + "SendERC20(bytes,address,uint256)"( + recipient?: null, + asset?: PromiseOrValue | null, + amount?: null + ): SendERC20EventFilter; + SendERC20( + recipient?: null, + asset?: PromiseOrValue | null, + amount?: null + ): SendERC20EventFilter; + + "Upgraded(address)"( + implementation?: PromiseOrValue | null + ): UpgradedEventFilter; + Upgraded( + implementation?: PromiseOrValue | null + ): UpgradedEventFilter; + }; + + estimateGas: { + custody(overrides?: CallOverrides): Promise; + + execute( + destination: PromiseOrValue, + data: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + executeWithERC20( + token: PromiseOrValue, + to: PromiseOrValue, + amount: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + initialize( + _tssAddress: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + owner(overrides?: CallOverrides): Promise; + + proxiableUUID(overrides?: CallOverrides): Promise; + + renounceOwnership( + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + send( + recipient: PromiseOrValue, + amount: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + sendERC20( + recipient: PromiseOrValue, + token: PromiseOrValue, + amount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setCustody( + _custody: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + transferOwnership( + newOwner: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + tssAddress(overrides?: CallOverrides): Promise; + + upgradeTo( + newImplementation: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + upgradeToAndCall( + newImplementation: PromiseOrValue, + data: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + }; + + populateTransaction: { + custody(overrides?: CallOverrides): Promise; + + execute( + destination: PromiseOrValue, + data: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + executeWithERC20( + token: PromiseOrValue, + to: PromiseOrValue, + amount: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + initialize( + _tssAddress: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + owner(overrides?: CallOverrides): Promise; + + proxiableUUID(overrides?: CallOverrides): Promise; + + renounceOwnership( + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + send( + recipient: PromiseOrValue, + amount: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + sendERC20( + recipient: PromiseOrValue, + token: PromiseOrValue, + amount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setCustody( + _custody: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + transferOwnership( + newOwner: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + tssAddress(overrides?: CallOverrides): Promise; + + upgradeTo( + newImplementation: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + upgradeToAndCall( + newImplementation: PromiseOrValue, + data: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + }; +} diff --git a/typechain-types/contracts/prototypes/evm/Receiver.ts b/typechain-types/contracts/prototypes/evm/Receiver.ts new file mode 100644 index 00000000..99e27603 --- /dev/null +++ b/typechain-types/contracts/prototypes/evm/Receiver.ts @@ -0,0 +1,360 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type { + BaseContract, + BigNumber, + BigNumberish, + BytesLike, + CallOverrides, + ContractTransaction, + Overrides, + PayableOverrides, + PopulatedTransaction, + Signer, + utils, +} from "ethers"; +import type { + FunctionFragment, + Result, + EventFragment, +} from "@ethersproject/abi"; +import type { Listener, Provider } from "@ethersproject/providers"; +import type { + TypedEventFilter, + TypedEvent, + TypedListener, + OnEvent, + PromiseOrValue, +} from "../../../common"; + +export interface ReceiverInterface extends utils.Interface { + functions: { + "receiveERC20(uint256,address,address)": FunctionFragment; + "receiveNoParams()": FunctionFragment; + "receiveNonPayable(string[],uint256[],bool)": FunctionFragment; + "receivePayable(string,uint256,bool)": FunctionFragment; + }; + + getFunction( + nameOrSignatureOrTopic: + | "receiveERC20" + | "receiveNoParams" + | "receiveNonPayable" + | "receivePayable" + ): FunctionFragment; + + encodeFunctionData( + functionFragment: "receiveERC20", + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ] + ): string; + encodeFunctionData( + functionFragment: "receiveNoParams", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "receiveNonPayable", + values: [ + PromiseOrValue[], + PromiseOrValue[], + PromiseOrValue + ] + ): string; + encodeFunctionData( + functionFragment: "receivePayable", + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ] + ): string; + + decodeFunctionResult( + functionFragment: "receiveERC20", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "receiveNoParams", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "receiveNonPayable", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "receivePayable", + data: BytesLike + ): Result; + + events: { + "ReceivedERC20(address,uint256,address,address)": EventFragment; + "ReceivedNoParams(address)": EventFragment; + "ReceivedNonPayable(address,string[],uint256[],bool)": EventFragment; + "ReceivedPayable(address,uint256,string,uint256,bool)": EventFragment; + }; + + getEvent(nameOrSignatureOrTopic: "ReceivedERC20"): EventFragment; + getEvent(nameOrSignatureOrTopic: "ReceivedNoParams"): EventFragment; + getEvent(nameOrSignatureOrTopic: "ReceivedNonPayable"): EventFragment; + getEvent(nameOrSignatureOrTopic: "ReceivedPayable"): EventFragment; +} + +export interface ReceivedERC20EventObject { + sender: string; + amount: BigNumber; + token: string; + destination: string; +} +export type ReceivedERC20Event = TypedEvent< + [string, BigNumber, string, string], + ReceivedERC20EventObject +>; + +export type ReceivedERC20EventFilter = TypedEventFilter; + +export interface ReceivedNoParamsEventObject { + sender: string; +} +export type ReceivedNoParamsEvent = TypedEvent< + [string], + ReceivedNoParamsEventObject +>; + +export type ReceivedNoParamsEventFilter = + TypedEventFilter; + +export interface ReceivedNonPayableEventObject { + sender: string; + strs: string[]; + nums: BigNumber[]; + flag: boolean; +} +export type ReceivedNonPayableEvent = TypedEvent< + [string, string[], BigNumber[], boolean], + ReceivedNonPayableEventObject +>; + +export type ReceivedNonPayableEventFilter = + TypedEventFilter; + +export interface ReceivedPayableEventObject { + sender: string; + value: BigNumber; + str: string; + num: BigNumber; + flag: boolean; +} +export type ReceivedPayableEvent = TypedEvent< + [string, BigNumber, string, BigNumber, boolean], + ReceivedPayableEventObject +>; + +export type ReceivedPayableEventFilter = TypedEventFilter; + +export interface Receiver extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + interface: ReceiverInterface; + + queryFilter( + event: TypedEventFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>; + + listeners( + eventFilter?: TypedEventFilter + ): Array>; + listeners(eventName?: string): Array; + removeAllListeners( + eventFilter: TypedEventFilter + ): this; + removeAllListeners(eventName?: string): this; + off: OnEvent; + on: OnEvent; + once: OnEvent; + removeListener: OnEvent; + + functions: { + receiveERC20( + amount: PromiseOrValue, + token: PromiseOrValue, + destination: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + receiveNoParams( + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + receiveNonPayable( + strs: PromiseOrValue[], + nums: PromiseOrValue[], + flag: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + receivePayable( + str: PromiseOrValue, + num: PromiseOrValue, + flag: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + }; + + receiveERC20( + amount: PromiseOrValue, + token: PromiseOrValue, + destination: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + receiveNoParams( + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + receiveNonPayable( + strs: PromiseOrValue[], + nums: PromiseOrValue[], + flag: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + receivePayable( + str: PromiseOrValue, + num: PromiseOrValue, + flag: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + callStatic: { + receiveERC20( + amount: PromiseOrValue, + token: PromiseOrValue, + destination: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + receiveNoParams(overrides?: CallOverrides): Promise; + + receiveNonPayable( + strs: PromiseOrValue[], + nums: PromiseOrValue[], + flag: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + receivePayable( + str: PromiseOrValue, + num: PromiseOrValue, + flag: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + }; + + filters: { + "ReceivedERC20(address,uint256,address,address)"( + sender?: null, + amount?: null, + token?: null, + destination?: null + ): ReceivedERC20EventFilter; + ReceivedERC20( + sender?: null, + amount?: null, + token?: null, + destination?: null + ): ReceivedERC20EventFilter; + + "ReceivedNoParams(address)"(sender?: null): ReceivedNoParamsEventFilter; + ReceivedNoParams(sender?: null): ReceivedNoParamsEventFilter; + + "ReceivedNonPayable(address,string[],uint256[],bool)"( + sender?: null, + strs?: null, + nums?: null, + flag?: null + ): ReceivedNonPayableEventFilter; + ReceivedNonPayable( + sender?: null, + strs?: null, + nums?: null, + flag?: null + ): ReceivedNonPayableEventFilter; + + "ReceivedPayable(address,uint256,string,uint256,bool)"( + sender?: null, + value?: null, + str?: null, + num?: null, + flag?: null + ): ReceivedPayableEventFilter; + ReceivedPayable( + sender?: null, + value?: null, + str?: null, + num?: null, + flag?: null + ): ReceivedPayableEventFilter; + }; + + estimateGas: { + receiveERC20( + amount: PromiseOrValue, + token: PromiseOrValue, + destination: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + receiveNoParams( + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + receiveNonPayable( + strs: PromiseOrValue[], + nums: PromiseOrValue[], + flag: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + receivePayable( + str: PromiseOrValue, + num: PromiseOrValue, + flag: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + }; + + populateTransaction: { + receiveERC20( + amount: PromiseOrValue, + token: PromiseOrValue, + destination: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + receiveNoParams( + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + receiveNonPayable( + strs: PromiseOrValue[], + nums: PromiseOrValue[], + flag: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + receivePayable( + str: PromiseOrValue, + num: PromiseOrValue, + flag: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + }; +} diff --git a/typechain-types/contracts/prototypes/evm/TestERC20.ts b/typechain-types/contracts/prototypes/evm/TestERC20.ts new file mode 100644 index 00000000..e72cddfe --- /dev/null +++ b/typechain-types/contracts/prototypes/evm/TestERC20.ts @@ -0,0 +1,501 @@ +/* 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, + EventFragment, +} from "@ethersproject/abi"; +import type { Listener, Provider } from "@ethersproject/providers"; +import type { + TypedEventFilter, + TypedEvent, + TypedListener, + OnEvent, + PromiseOrValue, +} from "../../../common"; + +export interface TestERC20Interface extends utils.Interface { + functions: { + "allowance(address,address)": FunctionFragment; + "approve(address,uint256)": FunctionFragment; + "balanceOf(address)": FunctionFragment; + "decimals()": FunctionFragment; + "decreaseAllowance(address,uint256)": FunctionFragment; + "increaseAllowance(address,uint256)": FunctionFragment; + "mint(address,uint256)": FunctionFragment; + "name()": FunctionFragment; + "symbol()": FunctionFragment; + "totalSupply()": FunctionFragment; + "transfer(address,uint256)": FunctionFragment; + "transferFrom(address,address,uint256)": FunctionFragment; + }; + + getFunction( + nameOrSignatureOrTopic: + | "allowance" + | "approve" + | "balanceOf" + | "decimals" + | "decreaseAllowance" + | "increaseAllowance" + | "mint" + | "name" + | "symbol" + | "totalSupply" + | "transfer" + | "transferFrom" + ): FunctionFragment; + + encodeFunctionData( + functionFragment: "allowance", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "approve", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "balanceOf", + values: [PromiseOrValue] + ): string; + encodeFunctionData(functionFragment: "decimals", values?: undefined): string; + encodeFunctionData( + functionFragment: "decreaseAllowance", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "increaseAllowance", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "mint", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData(functionFragment: "name", values?: undefined): string; + encodeFunctionData(functionFragment: "symbol", values?: undefined): string; + encodeFunctionData( + functionFragment: "totalSupply", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "transfer", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "transferFrom", + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ] + ): string; + + decodeFunctionResult(functionFragment: "allowance", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "approve", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "balanceOf", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "decimals", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "decreaseAllowance", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "increaseAllowance", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "mint", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "name", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "symbol", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "totalSupply", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "transfer", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "transferFrom", + data: BytesLike + ): Result; + + events: { + "Approval(address,address,uint256)": EventFragment; + "Transfer(address,address,uint256)": EventFragment; + }; + + getEvent(nameOrSignatureOrTopic: "Approval"): EventFragment; + getEvent(nameOrSignatureOrTopic: "Transfer"): EventFragment; +} + +export interface ApprovalEventObject { + owner: string; + spender: string; + value: BigNumber; +} +export type ApprovalEvent = TypedEvent< + [string, string, BigNumber], + ApprovalEventObject +>; + +export type ApprovalEventFilter = TypedEventFilter; + +export interface TransferEventObject { + from: string; + to: string; + value: BigNumber; +} +export type TransferEvent = TypedEvent< + [string, string, BigNumber], + TransferEventObject +>; + +export type TransferEventFilter = TypedEventFilter; + +export interface TestERC20 extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + interface: TestERC20Interface; + + 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: { + allowance( + owner: PromiseOrValue, + spender: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + approve( + spender: PromiseOrValue, + amount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + balanceOf( + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + decimals(overrides?: CallOverrides): Promise<[number]>; + + decreaseAllowance( + spender: PromiseOrValue, + subtractedValue: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + increaseAllowance( + spender: PromiseOrValue, + addedValue: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + mint( + to: PromiseOrValue, + amount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + name(overrides?: CallOverrides): Promise<[string]>; + + symbol(overrides?: CallOverrides): Promise<[string]>; + + totalSupply(overrides?: CallOverrides): Promise<[BigNumber]>; + + transfer( + to: PromiseOrValue, + amount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + transferFrom( + from: PromiseOrValue, + to: PromiseOrValue, + amount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + }; + + allowance( + owner: PromiseOrValue, + spender: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + approve( + spender: PromiseOrValue, + amount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + balanceOf( + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + decimals(overrides?: CallOverrides): Promise; + + decreaseAllowance( + spender: PromiseOrValue, + subtractedValue: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + increaseAllowance( + spender: PromiseOrValue, + addedValue: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + mint( + to: PromiseOrValue, + amount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + name(overrides?: CallOverrides): Promise; + + symbol(overrides?: CallOverrides): Promise; + + totalSupply(overrides?: CallOverrides): Promise; + + transfer( + to: PromiseOrValue, + amount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + transferFrom( + from: PromiseOrValue, + to: PromiseOrValue, + amount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + callStatic: { + allowance( + owner: PromiseOrValue, + spender: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + approve( + spender: PromiseOrValue, + amount: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + balanceOf( + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + decimals(overrides?: CallOverrides): Promise; + + decreaseAllowance( + spender: PromiseOrValue, + subtractedValue: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + increaseAllowance( + spender: PromiseOrValue, + addedValue: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + mint( + to: PromiseOrValue, + amount: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + name(overrides?: CallOverrides): Promise; + + symbol(overrides?: CallOverrides): Promise; + + totalSupply(overrides?: CallOverrides): Promise; + + transfer( + to: PromiseOrValue, + amount: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + transferFrom( + from: PromiseOrValue, + to: PromiseOrValue, + amount: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + }; + + filters: { + "Approval(address,address,uint256)"( + owner?: PromiseOrValue | null, + spender?: PromiseOrValue | null, + value?: null + ): ApprovalEventFilter; + Approval( + owner?: PromiseOrValue | null, + spender?: PromiseOrValue | null, + value?: null + ): ApprovalEventFilter; + + "Transfer(address,address,uint256)"( + from?: PromiseOrValue | null, + to?: PromiseOrValue | null, + value?: null + ): TransferEventFilter; + Transfer( + from?: PromiseOrValue | null, + to?: PromiseOrValue | null, + value?: null + ): TransferEventFilter; + }; + + estimateGas: { + allowance( + owner: PromiseOrValue, + spender: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + approve( + spender: PromiseOrValue, + amount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + balanceOf( + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + decimals(overrides?: CallOverrides): Promise; + + decreaseAllowance( + spender: PromiseOrValue, + subtractedValue: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + increaseAllowance( + spender: PromiseOrValue, + addedValue: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + mint( + to: PromiseOrValue, + amount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + name(overrides?: CallOverrides): Promise; + + symbol(overrides?: CallOverrides): Promise; + + totalSupply(overrides?: CallOverrides): Promise; + + transfer( + to: PromiseOrValue, + amount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + transferFrom( + from: PromiseOrValue, + to: PromiseOrValue, + amount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + }; + + populateTransaction: { + allowance( + owner: PromiseOrValue, + spender: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + approve( + spender: PromiseOrValue, + amount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + balanceOf( + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + decimals(overrides?: CallOverrides): Promise; + + decreaseAllowance( + spender: PromiseOrValue, + subtractedValue: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + increaseAllowance( + spender: PromiseOrValue, + addedValue: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + mint( + to: PromiseOrValue, + amount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + name(overrides?: CallOverrides): Promise; + + symbol(overrides?: CallOverrides): Promise; + + totalSupply(overrides?: CallOverrides): Promise; + + transfer( + to: PromiseOrValue, + amount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + transferFrom( + from: PromiseOrValue, + to: PromiseOrValue, + amount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + }; +} diff --git a/typechain-types/contracts/prototypes/evm/index.ts b/typechain-types/contracts/prototypes/evm/index.ts new file mode 100644 index 00000000..356b9286 --- /dev/null +++ b/typechain-types/contracts/prototypes/evm/index.ts @@ -0,0 +1,10 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type * as interfacesSol from "./interfaces.sol"; +export type { interfacesSol }; +export type { ERC20CustodyNew } from "./ERC20CustodyNew"; +export type { GatewayEVM } from "./GatewayEVM"; +export type { GatewayEVMUpgradeTest } from "./GatewayEVMUpgradeTest"; +export type { Receiver } from "./Receiver"; +export type { TestERC20 } from "./TestERC20"; diff --git a/typechain-types/contracts/prototypes/evm/interfaces.sol/IGateway.ts b/typechain-types/contracts/prototypes/evm/interfaces.sol/IGateway.ts new file mode 100644 index 00000000..9eb52ca6 --- /dev/null +++ b/typechain-types/contracts/prototypes/evm/interfaces.sol/IGateway.ts @@ -0,0 +1,250 @@ +/* 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 } from "@ethersproject/abi"; +import type { Listener, Provider } from "@ethersproject/providers"; +import type { + TypedEventFilter, + TypedEvent, + TypedListener, + OnEvent, + PromiseOrValue, +} from "../../../../common"; + +export interface IGatewayInterface extends utils.Interface { + functions: { + "execute(address,bytes)": FunctionFragment; + "executeWithERC20(address,address,uint256,bytes)": FunctionFragment; + "send(bytes,uint256)": FunctionFragment; + "sendERC20(bytes,address,uint256)": FunctionFragment; + }; + + getFunction( + nameOrSignatureOrTopic: + | "execute" + | "executeWithERC20" + | "send" + | "sendERC20" + ): FunctionFragment; + + encodeFunctionData( + functionFragment: "execute", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "executeWithERC20", + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ] + ): string; + encodeFunctionData( + functionFragment: "send", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "sendERC20", + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ] + ): string; + + decodeFunctionResult(functionFragment: "execute", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "executeWithERC20", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "send", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "sendERC20", data: BytesLike): Result; + + events: {}; +} + +export interface IGateway extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + interface: IGatewayInterface; + + 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: { + execute( + destination: PromiseOrValue, + data: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + executeWithERC20( + token: PromiseOrValue, + to: PromiseOrValue, + amount: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + send( + recipient: PromiseOrValue, + amount: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + sendERC20( + recipient: PromiseOrValue, + asset: PromiseOrValue, + amount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + }; + + execute( + destination: PromiseOrValue, + data: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + executeWithERC20( + token: PromiseOrValue, + to: PromiseOrValue, + amount: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + send( + recipient: PromiseOrValue, + amount: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + sendERC20( + recipient: PromiseOrValue, + asset: PromiseOrValue, + amount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + callStatic: { + execute( + destination: PromiseOrValue, + data: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + executeWithERC20( + token: PromiseOrValue, + to: PromiseOrValue, + amount: PromiseOrValue, + data: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + send( + recipient: PromiseOrValue, + amount: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + sendERC20( + recipient: PromiseOrValue, + asset: PromiseOrValue, + amount: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + }; + + filters: {}; + + estimateGas: { + execute( + destination: PromiseOrValue, + data: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + executeWithERC20( + token: PromiseOrValue, + to: PromiseOrValue, + amount: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + send( + recipient: PromiseOrValue, + amount: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + sendERC20( + recipient: PromiseOrValue, + asset: PromiseOrValue, + amount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + }; + + populateTransaction: { + execute( + destination: PromiseOrValue, + data: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + executeWithERC20( + token: PromiseOrValue, + to: PromiseOrValue, + amount: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + send( + recipient: PromiseOrValue, + amount: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + sendERC20( + recipient: PromiseOrValue, + asset: PromiseOrValue, + amount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + }; +} diff --git a/typechain-types/contracts/prototypes/evm/interfaces.sol/IGatewayEVM.ts b/typechain-types/contracts/prototypes/evm/interfaces.sol/IGatewayEVM.ts new file mode 100644 index 00000000..2c88b298 --- /dev/null +++ b/typechain-types/contracts/prototypes/evm/interfaces.sol/IGatewayEVM.ts @@ -0,0 +1,250 @@ +/* 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 } from "@ethersproject/abi"; +import type { Listener, Provider } from "@ethersproject/providers"; +import type { + TypedEventFilter, + TypedEvent, + TypedListener, + OnEvent, + PromiseOrValue, +} from "../../../../common"; + +export interface IGatewayEVMInterface extends utils.Interface { + functions: { + "execute(address,bytes)": FunctionFragment; + "executeWithERC20(address,address,uint256,bytes)": FunctionFragment; + "send(bytes,uint256)": FunctionFragment; + "sendERC20(bytes,address,uint256)": FunctionFragment; + }; + + getFunction( + nameOrSignatureOrTopic: + | "execute" + | "executeWithERC20" + | "send" + | "sendERC20" + ): FunctionFragment; + + encodeFunctionData( + functionFragment: "execute", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "executeWithERC20", + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ] + ): string; + encodeFunctionData( + functionFragment: "send", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "sendERC20", + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ] + ): string; + + decodeFunctionResult(functionFragment: "execute", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "executeWithERC20", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "send", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "sendERC20", data: BytesLike): Result; + + events: {}; +} + +export interface IGatewayEVM extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + interface: IGatewayEVMInterface; + + 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: { + execute( + destination: PromiseOrValue, + data: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + executeWithERC20( + token: PromiseOrValue, + to: PromiseOrValue, + amount: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + send( + recipient: PromiseOrValue, + amount: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + sendERC20( + recipient: PromiseOrValue, + asset: PromiseOrValue, + amount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + }; + + execute( + destination: PromiseOrValue, + data: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + executeWithERC20( + token: PromiseOrValue, + to: PromiseOrValue, + amount: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + send( + recipient: PromiseOrValue, + amount: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + sendERC20( + recipient: PromiseOrValue, + asset: PromiseOrValue, + amount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + callStatic: { + execute( + destination: PromiseOrValue, + data: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + executeWithERC20( + token: PromiseOrValue, + to: PromiseOrValue, + amount: PromiseOrValue, + data: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + send( + recipient: PromiseOrValue, + amount: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + sendERC20( + recipient: PromiseOrValue, + asset: PromiseOrValue, + amount: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + }; + + filters: {}; + + estimateGas: { + execute( + destination: PromiseOrValue, + data: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + executeWithERC20( + token: PromiseOrValue, + to: PromiseOrValue, + amount: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + send( + recipient: PromiseOrValue, + amount: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + sendERC20( + recipient: PromiseOrValue, + asset: PromiseOrValue, + amount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + }; + + populateTransaction: { + execute( + destination: PromiseOrValue, + data: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + executeWithERC20( + token: PromiseOrValue, + to: PromiseOrValue, + amount: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + send( + recipient: PromiseOrValue, + amount: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + sendERC20( + recipient: PromiseOrValue, + asset: PromiseOrValue, + amount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + }; +} diff --git a/typechain-types/contracts/prototypes/evm/interfaces.sol/index.ts b/typechain-types/contracts/prototypes/evm/interfaces.sol/index.ts new file mode 100644 index 00000000..a354144f --- /dev/null +++ b/typechain-types/contracts/prototypes/evm/interfaces.sol/index.ts @@ -0,0 +1,4 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +export type { IGatewayEVM } from "./IGatewayEVM"; diff --git a/typechain-types/contracts/prototypes/index.ts b/typechain-types/contracts/prototypes/index.ts new file mode 100644 index 00000000..9efb820b --- /dev/null +++ b/typechain-types/contracts/prototypes/index.ts @@ -0,0 +1,7 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* 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/interfaces.sol/IGateway.ts b/typechain-types/contracts/prototypes/interfaces.sol/IGateway.ts new file mode 100644 index 00000000..969095cb --- /dev/null +++ b/typechain-types/contracts/prototypes/interfaces.sol/IGateway.ts @@ -0,0 +1,165 @@ +/* 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 } from "@ethersproject/abi"; +import type { Listener, Provider } from "@ethersproject/providers"; +import type { + TypedEventFilter, + TypedEvent, + TypedListener, + OnEvent, + PromiseOrValue, +} from "../../../common"; + +export interface IGatewayInterface extends utils.Interface { + functions: { + "execute(address,bytes)": FunctionFragment; + "executeWithERC20(address,address,uint256,bytes)": FunctionFragment; + }; + + getFunction( + nameOrSignatureOrTopic: "execute" | "executeWithERC20" + ): FunctionFragment; + + encodeFunctionData( + functionFragment: "execute", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "executeWithERC20", + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ] + ): string; + + decodeFunctionResult(functionFragment: "execute", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "executeWithERC20", + data: BytesLike + ): Result; + + events: {}; +} + +export interface IGateway extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + interface: IGatewayInterface; + + 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: { + execute( + destination: PromiseOrValue, + data: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + executeWithERC20( + token: PromiseOrValue, + to: PromiseOrValue, + amount: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + }; + + execute( + destination: PromiseOrValue, + data: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + executeWithERC20( + token: PromiseOrValue, + to: PromiseOrValue, + amount: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + callStatic: { + execute( + destination: PromiseOrValue, + data: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + executeWithERC20( + token: PromiseOrValue, + to: PromiseOrValue, + amount: PromiseOrValue, + data: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + }; + + filters: {}; + + estimateGas: { + execute( + destination: PromiseOrValue, + data: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + executeWithERC20( + token: PromiseOrValue, + to: PromiseOrValue, + amount: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + }; + + populateTransaction: { + execute( + destination: PromiseOrValue, + data: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + executeWithERC20( + token: PromiseOrValue, + to: PromiseOrValue, + amount: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + }; +} diff --git a/typechain-types/contracts/prototypes/interfaces.sol/index.ts b/typechain-types/contracts/prototypes/interfaces.sol/index.ts new file mode 100644 index 00000000..878cfe66 --- /dev/null +++ b/typechain-types/contracts/prototypes/interfaces.sol/index.ts @@ -0,0 +1,4 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +export type { IGateway } from "./IGateway"; diff --git a/typechain-types/contracts/prototypes/zevm/GatewayZEVM.ts b/typechain-types/contracts/prototypes/zevm/GatewayZEVM.ts new file mode 100644 index 00000000..04d1fed5 --- /dev/null +++ b/typechain-types/contracts/prototypes/zevm/GatewayZEVM.ts @@ -0,0 +1,760 @@ +/* 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 type ZContextStruct = { + origin: PromiseOrValue; + sender: PromiseOrValue; + chainID: PromiseOrValue; +}; + +export type ZContextStructOutput = [string, string, BigNumber] & { + origin: string; + sender: string; + chainID: BigNumber; +}; + +export interface GatewayZEVMInterface extends utils.Interface { + functions: { + "FUNGIBLE_MODULE_ADDRESS()": FunctionFragment; + "call(bytes,bytes)": FunctionFragment; + "deposit(address,uint256,address)": FunctionFragment; + "depositAndCall((bytes,address,uint256),address,uint256,address,bytes)": FunctionFragment; + "execute((bytes,address,uint256),address,uint256,address,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" + | "deposit" + | "depositAndCall" + | "execute" + | "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: "deposit", + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ] + ): string; + encodeFunctionData( + functionFragment: "depositAndCall", + values: [ + ZContextStruct, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ] + ): string; + encodeFunctionData( + functionFragment: "execute", + values: [ + ZContextStruct, + PromiseOrValue, + PromiseOrValue, + 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: "deposit", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "depositAndCall", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "execute", 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; + + deposit( + zrc20: PromiseOrValue, + amount: PromiseOrValue, + target: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + depositAndCall( + context: ZContextStruct, + zrc20: PromiseOrValue, + amount: PromiseOrValue, + target: PromiseOrValue, + message: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + execute( + context: ZContextStruct, + zrc20: PromiseOrValue, + amount: PromiseOrValue, + target: 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; + + deposit( + zrc20: PromiseOrValue, + amount: PromiseOrValue, + target: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + depositAndCall( + context: ZContextStruct, + zrc20: PromiseOrValue, + amount: PromiseOrValue, + target: PromiseOrValue, + message: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + execute( + context: ZContextStruct, + zrc20: PromiseOrValue, + amount: PromiseOrValue, + target: 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; + + deposit( + zrc20: PromiseOrValue, + amount: PromiseOrValue, + target: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + depositAndCall( + context: ZContextStruct, + zrc20: PromiseOrValue, + amount: PromiseOrValue, + target: PromiseOrValue, + message: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + execute( + context: ZContextStruct, + zrc20: PromiseOrValue, + amount: PromiseOrValue, + target: 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; + + deposit( + zrc20: PromiseOrValue, + amount: PromiseOrValue, + target: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + depositAndCall( + context: ZContextStruct, + zrc20: PromiseOrValue, + amount: PromiseOrValue, + target: PromiseOrValue, + message: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + execute( + context: ZContextStruct, + zrc20: PromiseOrValue, + amount: PromiseOrValue, + target: 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; + + deposit( + zrc20: PromiseOrValue, + amount: PromiseOrValue, + target: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + depositAndCall( + context: ZContextStruct, + zrc20: PromiseOrValue, + amount: PromiseOrValue, + target: PromiseOrValue, + message: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + execute( + context: ZContextStruct, + zrc20: PromiseOrValue, + amount: PromiseOrValue, + target: 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/TestZContract.ts b/typechain-types/contracts/prototypes/zevm/TestZContract.ts new file mode 100644 index 00000000..609bab74 --- /dev/null +++ b/typechain-types/contracts/prototypes/zevm/TestZContract.ts @@ -0,0 +1,175 @@ +/* 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, + EventFragment, +} from "@ethersproject/abi"; +import type { Listener, Provider } from "@ethersproject/providers"; +import type { + TypedEventFilter, + TypedEvent, + TypedListener, + OnEvent, + PromiseOrValue, +} from "../../../common"; + +export type ZContextStruct = { + origin: PromiseOrValue; + sender: PromiseOrValue; + chainID: PromiseOrValue; +}; + +export type ZContextStructOutput = [string, string, BigNumber] & { + origin: string; + sender: string; + chainID: BigNumber; +}; + +export interface TestZContractInterface extends utils.Interface { + functions: { + "onCrossChainCall((bytes,address,uint256),address,uint256,bytes)": FunctionFragment; + }; + + getFunction(nameOrSignatureOrTopic: "onCrossChainCall"): FunctionFragment; + + encodeFunctionData( + functionFragment: "onCrossChainCall", + values: [ + ZContextStruct, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ] + ): string; + + decodeFunctionResult( + functionFragment: "onCrossChainCall", + data: BytesLike + ): Result; + + events: { + "ContextData(bytes,address,uint256,address,string)": EventFragment; + }; + + getEvent(nameOrSignatureOrTopic: "ContextData"): EventFragment; +} + +export interface ContextDataEventObject { + origin: string; + sender: string; + chainID: BigNumber; + msgSender: string; + message: string; +} +export type ContextDataEvent = TypedEvent< + [string, string, BigNumber, string, string], + ContextDataEventObject +>; + +export type ContextDataEventFilter = TypedEventFilter; + +export interface TestZContract extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + interface: TestZContractInterface; + + 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: { + onCrossChainCall( + context: ZContextStruct, + zrc20: PromiseOrValue, + amount: PromiseOrValue, + message: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + }; + + onCrossChainCall( + context: ZContextStruct, + zrc20: PromiseOrValue, + amount: PromiseOrValue, + message: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + callStatic: { + onCrossChainCall( + context: ZContextStruct, + zrc20: PromiseOrValue, + amount: PromiseOrValue, + message: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + }; + + filters: { + "ContextData(bytes,address,uint256,address,string)"( + origin?: null, + sender?: null, + chainID?: null, + msgSender?: null, + message?: null + ): ContextDataEventFilter; + ContextData( + origin?: null, + sender?: null, + chainID?: null, + msgSender?: null, + message?: null + ): ContextDataEventFilter; + }; + + estimateGas: { + onCrossChainCall( + context: ZContextStruct, + zrc20: PromiseOrValue, + amount: PromiseOrValue, + message: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + }; + + populateTransaction: { + onCrossChainCall( + context: ZContextStruct, + zrc20: PromiseOrValue, + amount: PromiseOrValue, + message: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + }; +} diff --git a/typechain-types/contracts/prototypes/zevm/ZRC20New.sol/ZRC20Errors.ts b/typechain-types/contracts/prototypes/zevm/ZRC20New.sol/ZRC20Errors.ts new file mode 100644 index 00000000..097645d4 --- /dev/null +++ b/typechain-types/contracts/prototypes/zevm/ZRC20New.sol/ZRC20Errors.ts @@ -0,0 +1,56 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type { BaseContract, Signer, utils } from "ethers"; + +import type { Listener, Provider } from "@ethersproject/providers"; +import type { + TypedEventFilter, + TypedEvent, + TypedListener, + OnEvent, + PromiseOrValue, +} from "../../../../common"; + +export interface ZRC20ErrorsInterface extends utils.Interface { + functions: {}; + + events: {}; +} + +export interface ZRC20Errors extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + interface: ZRC20ErrorsInterface; + + 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: {}; + + callStatic: {}; + + filters: {}; + + estimateGas: {}; + + populateTransaction: {}; +} diff --git a/typechain-types/contracts/prototypes/zevm/ZRC20New.sol/ZRC20New.ts b/typechain-types/contracts/prototypes/zevm/ZRC20New.sol/ZRC20New.ts new file mode 100644 index 00000000..7acc65b2 --- /dev/null +++ b/typechain-types/contracts/prototypes/zevm/ZRC20New.sol/ZRC20New.ts @@ -0,0 +1,854 @@ +/* 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, + EventFragment, +} from "@ethersproject/abi"; +import type { Listener, Provider } from "@ethersproject/providers"; +import type { + TypedEventFilter, + TypedEvent, + TypedListener, + OnEvent, + PromiseOrValue, +} from "../../../../common"; + +export interface ZRC20NewInterface extends utils.Interface { + functions: { + "CHAIN_ID()": FunctionFragment; + "COIN_TYPE()": FunctionFragment; + "FUNGIBLE_MODULE_ADDRESS()": FunctionFragment; + "GAS_LIMIT()": FunctionFragment; + "GATEWAY_CONTRACT_ADDRESS()": FunctionFragment; + "PROTOCOL_FLAT_FEE()": FunctionFragment; + "SYSTEM_CONTRACT_ADDRESS()": FunctionFragment; + "allowance(address,address)": FunctionFragment; + "approve(address,uint256)": FunctionFragment; + "balanceOf(address)": FunctionFragment; + "burn(uint256)": FunctionFragment; + "decimals()": FunctionFragment; + "deposit(address,uint256)": FunctionFragment; + "name()": FunctionFragment; + "symbol()": FunctionFragment; + "totalSupply()": FunctionFragment; + "transfer(address,uint256)": FunctionFragment; + "transferFrom(address,address,uint256)": FunctionFragment; + "updateGasLimit(uint256)": FunctionFragment; + "updateProtocolFlatFee(uint256)": FunctionFragment; + "updateSystemContractAddress(address)": FunctionFragment; + "withdraw(bytes,uint256)": FunctionFragment; + "withdrawGasFee()": FunctionFragment; + }; + + getFunction( + nameOrSignatureOrTopic: + | "CHAIN_ID" + | "COIN_TYPE" + | "FUNGIBLE_MODULE_ADDRESS" + | "GAS_LIMIT" + | "GATEWAY_CONTRACT_ADDRESS" + | "PROTOCOL_FLAT_FEE" + | "SYSTEM_CONTRACT_ADDRESS" + | "allowance" + | "approve" + | "balanceOf" + | "burn" + | "decimals" + | "deposit" + | "name" + | "symbol" + | "totalSupply" + | "transfer" + | "transferFrom" + | "updateGasLimit" + | "updateProtocolFlatFee" + | "updateSystemContractAddress" + | "withdraw" + | "withdrawGasFee" + ): FunctionFragment; + + encodeFunctionData(functionFragment: "CHAIN_ID", values?: undefined): string; + encodeFunctionData(functionFragment: "COIN_TYPE", values?: undefined): string; + encodeFunctionData( + functionFragment: "FUNGIBLE_MODULE_ADDRESS", + values?: undefined + ): string; + encodeFunctionData(functionFragment: "GAS_LIMIT", values?: undefined): string; + encodeFunctionData( + functionFragment: "GATEWAY_CONTRACT_ADDRESS", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "PROTOCOL_FLAT_FEE", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "SYSTEM_CONTRACT_ADDRESS", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "allowance", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "approve", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "balanceOf", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "burn", + values: [PromiseOrValue] + ): string; + encodeFunctionData(functionFragment: "decimals", values?: undefined): string; + encodeFunctionData( + functionFragment: "deposit", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData(functionFragment: "name", values?: undefined): string; + encodeFunctionData(functionFragment: "symbol", values?: undefined): string; + encodeFunctionData( + functionFragment: "totalSupply", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "transfer", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "transferFrom", + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ] + ): string; + encodeFunctionData( + functionFragment: "updateGasLimit", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "updateProtocolFlatFee", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "updateSystemContractAddress", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "withdraw", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "withdrawGasFee", + values?: undefined + ): string; + + decodeFunctionResult(functionFragment: "CHAIN_ID", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "COIN_TYPE", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "FUNGIBLE_MODULE_ADDRESS", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "GAS_LIMIT", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "GATEWAY_CONTRACT_ADDRESS", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "PROTOCOL_FLAT_FEE", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "SYSTEM_CONTRACT_ADDRESS", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "allowance", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "approve", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "balanceOf", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "burn", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "decimals", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "deposit", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "name", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "symbol", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "totalSupply", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "transfer", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "transferFrom", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "updateGasLimit", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "updateProtocolFlatFee", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "updateSystemContractAddress", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "withdraw", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "withdrawGasFee", + data: BytesLike + ): Result; + + events: { + "Approval(address,address,uint256)": EventFragment; + "Deposit(bytes,address,uint256)": EventFragment; + "Transfer(address,address,uint256)": EventFragment; + "UpdatedGasLimit(uint256)": EventFragment; + "UpdatedProtocolFlatFee(uint256)": EventFragment; + "UpdatedSystemContract(address)": EventFragment; + "Withdrawal(address,bytes,uint256,uint256,uint256)": EventFragment; + }; + + getEvent(nameOrSignatureOrTopic: "Approval"): EventFragment; + getEvent(nameOrSignatureOrTopic: "Deposit"): EventFragment; + getEvent(nameOrSignatureOrTopic: "Transfer"): EventFragment; + getEvent(nameOrSignatureOrTopic: "UpdatedGasLimit"): EventFragment; + getEvent(nameOrSignatureOrTopic: "UpdatedProtocolFlatFee"): EventFragment; + getEvent(nameOrSignatureOrTopic: "UpdatedSystemContract"): EventFragment; + getEvent(nameOrSignatureOrTopic: "Withdrawal"): EventFragment; +} + +export interface ApprovalEventObject { + owner: string; + spender: string; + value: BigNumber; +} +export type ApprovalEvent = TypedEvent< + [string, string, BigNumber], + ApprovalEventObject +>; + +export type ApprovalEventFilter = TypedEventFilter; + +export interface DepositEventObject { + from: string; + to: string; + value: BigNumber; +} +export type DepositEvent = TypedEvent< + [string, string, BigNumber], + DepositEventObject +>; + +export type DepositEventFilter = TypedEventFilter; + +export interface TransferEventObject { + from: string; + to: string; + value: BigNumber; +} +export type TransferEvent = TypedEvent< + [string, string, BigNumber], + TransferEventObject +>; + +export type TransferEventFilter = TypedEventFilter; + +export interface UpdatedGasLimitEventObject { + gasLimit: BigNumber; +} +export type UpdatedGasLimitEvent = TypedEvent< + [BigNumber], + UpdatedGasLimitEventObject +>; + +export type UpdatedGasLimitEventFilter = TypedEventFilter; + +export interface UpdatedProtocolFlatFeeEventObject { + protocolFlatFee: BigNumber; +} +export type UpdatedProtocolFlatFeeEvent = TypedEvent< + [BigNumber], + UpdatedProtocolFlatFeeEventObject +>; + +export type UpdatedProtocolFlatFeeEventFilter = + TypedEventFilter; + +export interface UpdatedSystemContractEventObject { + systemContract: string; +} +export type UpdatedSystemContractEvent = TypedEvent< + [string], + UpdatedSystemContractEventObject +>; + +export type UpdatedSystemContractEventFilter = + TypedEventFilter; + +export interface WithdrawalEventObject { + from: string; + to: string; + value: BigNumber; + gasfee: BigNumber; + protocolFlatFee: BigNumber; +} +export type WithdrawalEvent = TypedEvent< + [string, string, BigNumber, BigNumber, BigNumber], + WithdrawalEventObject +>; + +export type WithdrawalEventFilter = TypedEventFilter; + +export interface ZRC20New extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + interface: ZRC20NewInterface; + + 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: { + CHAIN_ID(overrides?: CallOverrides): Promise<[BigNumber]>; + + COIN_TYPE(overrides?: CallOverrides): Promise<[number]>; + + FUNGIBLE_MODULE_ADDRESS(overrides?: CallOverrides): Promise<[string]>; + + GAS_LIMIT(overrides?: CallOverrides): Promise<[BigNumber]>; + + GATEWAY_CONTRACT_ADDRESS(overrides?: CallOverrides): Promise<[string]>; + + PROTOCOL_FLAT_FEE(overrides?: CallOverrides): Promise<[BigNumber]>; + + SYSTEM_CONTRACT_ADDRESS(overrides?: CallOverrides): Promise<[string]>; + + allowance( + owner: PromiseOrValue, + spender: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + approve( + spender: PromiseOrValue, + amount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + balanceOf( + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + burn( + amount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + decimals(overrides?: CallOverrides): Promise<[number]>; + + deposit( + to: PromiseOrValue, + amount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + name(overrides?: CallOverrides): Promise<[string]>; + + symbol(overrides?: CallOverrides): Promise<[string]>; + + totalSupply(overrides?: CallOverrides): Promise<[BigNumber]>; + + transfer( + recipient: PromiseOrValue, + amount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + transferFrom( + sender: PromiseOrValue, + recipient: PromiseOrValue, + amount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + updateGasLimit( + gasLimit: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + updateProtocolFlatFee( + protocolFlatFee: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + updateSystemContractAddress( + addr: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + withdraw( + to: PromiseOrValue, + amount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + withdrawGasFee(overrides?: CallOverrides): Promise<[string, BigNumber]>; + }; + + CHAIN_ID(overrides?: CallOverrides): Promise; + + COIN_TYPE(overrides?: CallOverrides): Promise; + + FUNGIBLE_MODULE_ADDRESS(overrides?: CallOverrides): Promise; + + GAS_LIMIT(overrides?: CallOverrides): Promise; + + GATEWAY_CONTRACT_ADDRESS(overrides?: CallOverrides): Promise; + + PROTOCOL_FLAT_FEE(overrides?: CallOverrides): Promise; + + SYSTEM_CONTRACT_ADDRESS(overrides?: CallOverrides): Promise; + + allowance( + owner: PromiseOrValue, + spender: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + approve( + spender: PromiseOrValue, + amount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + balanceOf( + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + burn( + amount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + decimals(overrides?: CallOverrides): Promise; + + deposit( + to: PromiseOrValue, + amount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + name(overrides?: CallOverrides): Promise; + + symbol(overrides?: CallOverrides): Promise; + + totalSupply(overrides?: CallOverrides): Promise; + + transfer( + recipient: PromiseOrValue, + amount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + transferFrom( + sender: PromiseOrValue, + recipient: PromiseOrValue, + amount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + updateGasLimit( + gasLimit: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + updateProtocolFlatFee( + protocolFlatFee: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + updateSystemContractAddress( + addr: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + withdraw( + to: PromiseOrValue, + amount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + withdrawGasFee(overrides?: CallOverrides): Promise<[string, BigNumber]>; + + callStatic: { + CHAIN_ID(overrides?: CallOverrides): Promise; + + COIN_TYPE(overrides?: CallOverrides): Promise; + + FUNGIBLE_MODULE_ADDRESS(overrides?: CallOverrides): Promise; + + GAS_LIMIT(overrides?: CallOverrides): Promise; + + GATEWAY_CONTRACT_ADDRESS(overrides?: CallOverrides): Promise; + + PROTOCOL_FLAT_FEE(overrides?: CallOverrides): Promise; + + SYSTEM_CONTRACT_ADDRESS(overrides?: CallOverrides): Promise; + + allowance( + owner: PromiseOrValue, + spender: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + approve( + spender: PromiseOrValue, + amount: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + balanceOf( + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + burn( + amount: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + decimals(overrides?: CallOverrides): Promise; + + deposit( + to: PromiseOrValue, + amount: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + name(overrides?: CallOverrides): Promise; + + symbol(overrides?: CallOverrides): Promise; + + totalSupply(overrides?: CallOverrides): Promise; + + transfer( + recipient: PromiseOrValue, + amount: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + transferFrom( + sender: PromiseOrValue, + recipient: PromiseOrValue, + amount: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + updateGasLimit( + gasLimit: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + updateProtocolFlatFee( + protocolFlatFee: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + updateSystemContractAddress( + addr: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + withdraw( + to: PromiseOrValue, + amount: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + withdrawGasFee(overrides?: CallOverrides): Promise<[string, BigNumber]>; + }; + + filters: { + "Approval(address,address,uint256)"( + owner?: PromiseOrValue | null, + spender?: PromiseOrValue | null, + value?: null + ): ApprovalEventFilter; + Approval( + owner?: PromiseOrValue | null, + spender?: PromiseOrValue | null, + value?: null + ): ApprovalEventFilter; + + "Deposit(bytes,address,uint256)"( + from?: null, + to?: PromiseOrValue | null, + value?: null + ): DepositEventFilter; + Deposit( + from?: null, + to?: PromiseOrValue | null, + value?: null + ): DepositEventFilter; + + "Transfer(address,address,uint256)"( + from?: PromiseOrValue | null, + to?: PromiseOrValue | null, + value?: null + ): TransferEventFilter; + Transfer( + from?: PromiseOrValue | null, + to?: PromiseOrValue | null, + value?: null + ): TransferEventFilter; + + "UpdatedGasLimit(uint256)"(gasLimit?: null): UpdatedGasLimitEventFilter; + UpdatedGasLimit(gasLimit?: null): UpdatedGasLimitEventFilter; + + "UpdatedProtocolFlatFee(uint256)"( + protocolFlatFee?: null + ): UpdatedProtocolFlatFeeEventFilter; + UpdatedProtocolFlatFee( + protocolFlatFee?: null + ): UpdatedProtocolFlatFeeEventFilter; + + "UpdatedSystemContract(address)"( + systemContract?: null + ): UpdatedSystemContractEventFilter; + UpdatedSystemContract( + systemContract?: null + ): UpdatedSystemContractEventFilter; + + "Withdrawal(address,bytes,uint256,uint256,uint256)"( + from?: PromiseOrValue | null, + to?: null, + value?: null, + gasfee?: null, + protocolFlatFee?: null + ): WithdrawalEventFilter; + Withdrawal( + from?: PromiseOrValue | null, + to?: null, + value?: null, + gasfee?: null, + protocolFlatFee?: null + ): WithdrawalEventFilter; + }; + + estimateGas: { + CHAIN_ID(overrides?: CallOverrides): Promise; + + COIN_TYPE(overrides?: CallOverrides): Promise; + + FUNGIBLE_MODULE_ADDRESS(overrides?: CallOverrides): Promise; + + GAS_LIMIT(overrides?: CallOverrides): Promise; + + GATEWAY_CONTRACT_ADDRESS(overrides?: CallOverrides): Promise; + + PROTOCOL_FLAT_FEE(overrides?: CallOverrides): Promise; + + SYSTEM_CONTRACT_ADDRESS(overrides?: CallOverrides): Promise; + + allowance( + owner: PromiseOrValue, + spender: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + approve( + spender: PromiseOrValue, + amount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + balanceOf( + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + burn( + amount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + decimals(overrides?: CallOverrides): Promise; + + deposit( + to: PromiseOrValue, + amount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + name(overrides?: CallOverrides): Promise; + + symbol(overrides?: CallOverrides): Promise; + + totalSupply(overrides?: CallOverrides): Promise; + + transfer( + recipient: PromiseOrValue, + amount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + transferFrom( + sender: PromiseOrValue, + recipient: PromiseOrValue, + amount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + updateGasLimit( + gasLimit: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + updateProtocolFlatFee( + protocolFlatFee: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + updateSystemContractAddress( + addr: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + withdraw( + to: PromiseOrValue, + amount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + withdrawGasFee(overrides?: CallOverrides): Promise; + }; + + populateTransaction: { + CHAIN_ID(overrides?: CallOverrides): Promise; + + COIN_TYPE(overrides?: CallOverrides): Promise; + + FUNGIBLE_MODULE_ADDRESS( + overrides?: CallOverrides + ): Promise; + + GAS_LIMIT(overrides?: CallOverrides): Promise; + + GATEWAY_CONTRACT_ADDRESS( + overrides?: CallOverrides + ): Promise; + + PROTOCOL_FLAT_FEE(overrides?: CallOverrides): Promise; + + SYSTEM_CONTRACT_ADDRESS( + overrides?: CallOverrides + ): Promise; + + allowance( + owner: PromiseOrValue, + spender: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + approve( + spender: PromiseOrValue, + amount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + balanceOf( + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + burn( + amount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + decimals(overrides?: CallOverrides): Promise; + + deposit( + to: PromiseOrValue, + amount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + name(overrides?: CallOverrides): Promise; + + symbol(overrides?: CallOverrides): Promise; + + totalSupply(overrides?: CallOverrides): Promise; + + transfer( + recipient: PromiseOrValue, + amount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + transferFrom( + sender: PromiseOrValue, + recipient: PromiseOrValue, + amount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + updateGasLimit( + gasLimit: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + updateProtocolFlatFee( + protocolFlatFee: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + updateSystemContractAddress( + addr: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + withdraw( + to: PromiseOrValue, + amount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + withdrawGasFee(overrides?: CallOverrides): Promise; + }; +} diff --git a/typechain-types/contracts/prototypes/zevm/ZRC20New.sol/index.ts b/typechain-types/contracts/prototypes/zevm/ZRC20New.sol/index.ts new file mode 100644 index 00000000..ea6138df --- /dev/null +++ b/typechain-types/contracts/prototypes/zevm/ZRC20New.sol/index.ts @@ -0,0 +1,5 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +export type { ZRC20Errors } from "./ZRC20Errors"; +export type { ZRC20New } from "./ZRC20New"; diff --git a/typechain-types/contracts/prototypes/zevm/index.ts b/typechain-types/contracts/prototypes/zevm/index.ts new file mode 100644 index 00000000..0bf18c3c --- /dev/null +++ b/typechain-types/contracts/prototypes/zevm/index.ts @@ -0,0 +1,10 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type * as zrc20NewSol from "./ZRC20New.sol"; +export type { zrc20NewSol }; +import type * as interfacesSol from "./interfaces.sol"; +export type { interfacesSol }; +export type { GatewayZEVM } from "./GatewayZEVM"; +export type { Sender } from "./Sender"; +export type { TestZContract } from "./TestZContract"; 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..12f1fa68 --- /dev/null +++ b/typechain-types/contracts/prototypes/zevm/interfaces.sol/IGatewayZEVM.ts @@ -0,0 +1,389 @@ +/* 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 type ZContextStruct = { + origin: PromiseOrValue; + sender: PromiseOrValue; + chainID: PromiseOrValue; +}; + +export type ZContextStructOutput = [string, string, BigNumber] & { + origin: string; + sender: string; + chainID: BigNumber; +}; + +export interface IGatewayZEVMInterface extends utils.Interface { + functions: { + "call(bytes,bytes)": FunctionFragment; + "deposit(address,uint256,address)": FunctionFragment; + "depositAndCall((bytes,address,uint256),address,uint256,address,bytes)": FunctionFragment; + "execute((bytes,address,uint256),address,uint256,address,bytes)": FunctionFragment; + "withdraw(bytes,uint256,address)": FunctionFragment; + "withdrawAndCall(bytes,uint256,address,bytes)": FunctionFragment; + }; + + getFunction( + nameOrSignatureOrTopic: + | "call" + | "deposit" + | "depositAndCall" + | "execute" + | "withdraw" + | "withdrawAndCall" + ): FunctionFragment; + + encodeFunctionData( + functionFragment: "call", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "deposit", + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ] + ): string; + encodeFunctionData( + functionFragment: "depositAndCall", + values: [ + ZContextStruct, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ] + ): string; + encodeFunctionData( + functionFragment: "execute", + values: [ + ZContextStruct, + PromiseOrValue, + PromiseOrValue, + 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: "deposit", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "depositAndCall", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "execute", 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; + + deposit( + zrc20: PromiseOrValue, + amount: PromiseOrValue, + target: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + depositAndCall( + context: ZContextStruct, + zrc20: PromiseOrValue, + amount: PromiseOrValue, + target: PromiseOrValue, + message: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + execute( + context: ZContextStruct, + zrc20: PromiseOrValue, + amount: PromiseOrValue, + target: 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; + + deposit( + zrc20: PromiseOrValue, + amount: PromiseOrValue, + target: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + depositAndCall( + context: ZContextStruct, + zrc20: PromiseOrValue, + amount: PromiseOrValue, + target: PromiseOrValue, + message: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + execute( + context: ZContextStruct, + zrc20: PromiseOrValue, + amount: PromiseOrValue, + target: 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; + + deposit( + zrc20: PromiseOrValue, + amount: PromiseOrValue, + target: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + depositAndCall( + context: ZContextStruct, + zrc20: PromiseOrValue, + amount: PromiseOrValue, + target: PromiseOrValue, + message: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + execute( + context: ZContextStruct, + zrc20: PromiseOrValue, + amount: PromiseOrValue, + target: 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; + + deposit( + zrc20: PromiseOrValue, + amount: PromiseOrValue, + target: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + depositAndCall( + context: ZContextStruct, + zrc20: PromiseOrValue, + amount: PromiseOrValue, + target: PromiseOrValue, + message: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + execute( + context: ZContextStruct, + zrc20: PromiseOrValue, + amount: PromiseOrValue, + target: 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; + + deposit( + zrc20: PromiseOrValue, + amount: PromiseOrValue, + target: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + depositAndCall( + context: ZContextStruct, + zrc20: PromiseOrValue, + amount: PromiseOrValue, + target: PromiseOrValue, + message: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + execute( + context: ZContextStruct, + zrc20: PromiseOrValue, + amount: PromiseOrValue, + target: 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/@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable__factory.ts b/typechain-types/factories/@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable__factory.ts new file mode 100644 index 00000000..c4c6be30 --- /dev/null +++ b/typechain-types/factories/@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable__factory.ts @@ -0,0 +1,91 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { Contract, Signer, utils } from "ethers"; +import type { Provider } from "@ethersproject/providers"; +import type { + OwnableUpgradeable, + OwnableUpgradeableInterface, +} from "../../../../@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable"; + +const _abi = [ + { + 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", + }, + { + inputs: [], + name: "owner", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + 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", + }, +] as const; + +export class OwnableUpgradeable__factory { + static readonly abi = _abi; + static createInterface(): OwnableUpgradeableInterface { + return new utils.Interface(_abi) as OwnableUpgradeableInterface; + } + static connect( + address: string, + signerOrProvider: Signer | Provider + ): OwnableUpgradeable { + return new Contract(address, _abi, signerOrProvider) as OwnableUpgradeable; + } +} diff --git a/typechain-types/factories/@openzeppelin/contracts-upgradeable/access/index.ts b/typechain-types/factories/@openzeppelin/contracts-upgradeable/access/index.ts new file mode 100644 index 00000000..bf4b29cc --- /dev/null +++ b/typechain-types/factories/@openzeppelin/contracts-upgradeable/access/index.ts @@ -0,0 +1,4 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +export { OwnableUpgradeable__factory } from "./OwnableUpgradeable__factory"; diff --git a/typechain-types/factories/@openzeppelin/contracts-upgradeable/index.ts b/typechain-types/factories/@openzeppelin/contracts-upgradeable/index.ts new file mode 100644 index 00000000..aedb8d87 --- /dev/null +++ b/typechain-types/factories/@openzeppelin/contracts-upgradeable/index.ts @@ -0,0 +1,7 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +export * as access from "./access"; +export * as interfaces from "./interfaces"; +export * as proxy from "./proxy"; +export * as utils from "./utils"; diff --git a/typechain-types/factories/@openzeppelin/contracts-upgradeable/interfaces/IERC1967Upgradeable__factory.ts b/typechain-types/factories/@openzeppelin/contracts-upgradeable/interfaces/IERC1967Upgradeable__factory.ts new file mode 100644 index 00000000..ed24d198 --- /dev/null +++ b/typechain-types/factories/@openzeppelin/contracts-upgradeable/interfaces/IERC1967Upgradeable__factory.ts @@ -0,0 +1,71 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { Contract, Signer, utils } from "ethers"; +import type { Provider } from "@ethersproject/providers"; +import type { + IERC1967Upgradeable, + IERC1967UpgradeableInterface, +} from "../../../../@openzeppelin/contracts-upgradeable/interfaces/IERC1967Upgradeable"; + +const _abi = [ + { + 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: "implementation", + type: "address", + }, + ], + name: "Upgraded", + type: "event", + }, +] as const; + +export class IERC1967Upgradeable__factory { + static readonly abi = _abi; + static createInterface(): IERC1967UpgradeableInterface { + return new utils.Interface(_abi) as IERC1967UpgradeableInterface; + } + static connect( + address: string, + signerOrProvider: Signer | Provider + ): IERC1967Upgradeable { + return new Contract(address, _abi, signerOrProvider) as IERC1967Upgradeable; + } +} diff --git a/typechain-types/factories/@openzeppelin/contracts-upgradeable/interfaces/draft-IERC1822Upgradeable.sol/IERC1822ProxiableUpgradeable__factory.ts b/typechain-types/factories/@openzeppelin/contracts-upgradeable/interfaces/draft-IERC1822Upgradeable.sol/IERC1822ProxiableUpgradeable__factory.ts new file mode 100644 index 00000000..6ad7eecf --- /dev/null +++ b/typechain-types/factories/@openzeppelin/contracts-upgradeable/interfaces/draft-IERC1822Upgradeable.sol/IERC1822ProxiableUpgradeable__factory.ts @@ -0,0 +1,43 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { Contract, Signer, utils } from "ethers"; +import type { Provider } from "@ethersproject/providers"; +import type { + IERC1822ProxiableUpgradeable, + IERC1822ProxiableUpgradeableInterface, +} from "../../../../../@openzeppelin/contracts-upgradeable/interfaces/draft-IERC1822Upgradeable.sol/IERC1822ProxiableUpgradeable"; + +const _abi = [ + { + inputs: [], + name: "proxiableUUID", + outputs: [ + { + internalType: "bytes32", + name: "", + type: "bytes32", + }, + ], + stateMutability: "view", + type: "function", + }, +] as const; + +export class IERC1822ProxiableUpgradeable__factory { + static readonly abi = _abi; + static createInterface(): IERC1822ProxiableUpgradeableInterface { + return new utils.Interface(_abi) as IERC1822ProxiableUpgradeableInterface; + } + static connect( + address: string, + signerOrProvider: Signer | Provider + ): IERC1822ProxiableUpgradeable { + return new Contract( + address, + _abi, + signerOrProvider + ) as IERC1822ProxiableUpgradeable; + } +} diff --git a/typechain-types/factories/@openzeppelin/contracts-upgradeable/interfaces/draft-IERC1822Upgradeable.sol/index.ts b/typechain-types/factories/@openzeppelin/contracts-upgradeable/interfaces/draft-IERC1822Upgradeable.sol/index.ts new file mode 100644 index 00000000..7db58c5b --- /dev/null +++ b/typechain-types/factories/@openzeppelin/contracts-upgradeable/interfaces/draft-IERC1822Upgradeable.sol/index.ts @@ -0,0 +1,4 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +export { IERC1822ProxiableUpgradeable__factory } from "./IERC1822ProxiableUpgradeable__factory"; diff --git a/typechain-types/factories/@openzeppelin/contracts-upgradeable/interfaces/index.ts b/typechain-types/factories/@openzeppelin/contracts-upgradeable/interfaces/index.ts new file mode 100644 index 00000000..d81fc631 --- /dev/null +++ b/typechain-types/factories/@openzeppelin/contracts-upgradeable/interfaces/index.ts @@ -0,0 +1,5 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +export * as draftIerc1822UpgradeableSol from "./draft-IERC1822Upgradeable.sol"; +export { IERC1967Upgradeable__factory } from "./IERC1967Upgradeable__factory"; diff --git a/typechain-types/factories/@openzeppelin/contracts-upgradeable/proxy/ERC1967/ERC1967UpgradeUpgradeable__factory.ts b/typechain-types/factories/@openzeppelin/contracts-upgradeable/proxy/ERC1967/ERC1967UpgradeUpgradeable__factory.ts new file mode 100644 index 00000000..5a270bdb --- /dev/null +++ b/typechain-types/factories/@openzeppelin/contracts-upgradeable/proxy/ERC1967/ERC1967UpgradeUpgradeable__factory.ts @@ -0,0 +1,88 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { Contract, Signer, utils } from "ethers"; +import type { Provider } from "@ethersproject/providers"; +import type { + ERC1967UpgradeUpgradeable, + ERC1967UpgradeUpgradeableInterface, +} from "../../../../../@openzeppelin/contracts-upgradeable/proxy/ERC1967/ERC1967UpgradeUpgradeable"; + +const _abi = [ + { + 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: false, + internalType: "uint8", + name: "version", + type: "uint8", + }, + ], + name: "Initialized", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "implementation", + type: "address", + }, + ], + name: "Upgraded", + type: "event", + }, +] as const; + +export class ERC1967UpgradeUpgradeable__factory { + static readonly abi = _abi; + static createInterface(): ERC1967UpgradeUpgradeableInterface { + return new utils.Interface(_abi) as ERC1967UpgradeUpgradeableInterface; + } + static connect( + address: string, + signerOrProvider: Signer | Provider + ): ERC1967UpgradeUpgradeable { + return new Contract( + address, + _abi, + signerOrProvider + ) as ERC1967UpgradeUpgradeable; + } +} diff --git a/typechain-types/factories/@openzeppelin/contracts-upgradeable/proxy/ERC1967/index.ts b/typechain-types/factories/@openzeppelin/contracts-upgradeable/proxy/ERC1967/index.ts new file mode 100644 index 00000000..12fe8742 --- /dev/null +++ b/typechain-types/factories/@openzeppelin/contracts-upgradeable/proxy/ERC1967/index.ts @@ -0,0 +1,4 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +export { ERC1967UpgradeUpgradeable__factory } from "./ERC1967UpgradeUpgradeable__factory"; diff --git a/typechain-types/factories/@openzeppelin/contracts-upgradeable/proxy/beacon/IBeaconUpgradeable__factory.ts b/typechain-types/factories/@openzeppelin/contracts-upgradeable/proxy/beacon/IBeaconUpgradeable__factory.ts new file mode 100644 index 00000000..fe2170dd --- /dev/null +++ b/typechain-types/factories/@openzeppelin/contracts-upgradeable/proxy/beacon/IBeaconUpgradeable__factory.ts @@ -0,0 +1,39 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { Contract, Signer, utils } from "ethers"; +import type { Provider } from "@ethersproject/providers"; +import type { + IBeaconUpgradeable, + IBeaconUpgradeableInterface, +} from "../../../../../@openzeppelin/contracts-upgradeable/proxy/beacon/IBeaconUpgradeable"; + +const _abi = [ + { + inputs: [], + name: "implementation", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, +] as const; + +export class IBeaconUpgradeable__factory { + static readonly abi = _abi; + static createInterface(): IBeaconUpgradeableInterface { + return new utils.Interface(_abi) as IBeaconUpgradeableInterface; + } + static connect( + address: string, + signerOrProvider: Signer | Provider + ): IBeaconUpgradeable { + return new Contract(address, _abi, signerOrProvider) as IBeaconUpgradeable; + } +} diff --git a/typechain-types/factories/@openzeppelin/contracts-upgradeable/proxy/beacon/index.ts b/typechain-types/factories/@openzeppelin/contracts-upgradeable/proxy/beacon/index.ts new file mode 100644 index 00000000..5b72d318 --- /dev/null +++ b/typechain-types/factories/@openzeppelin/contracts-upgradeable/proxy/beacon/index.ts @@ -0,0 +1,4 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +export { IBeaconUpgradeable__factory } from "./IBeaconUpgradeable__factory"; diff --git a/typechain-types/factories/@openzeppelin/contracts-upgradeable/proxy/index.ts b/typechain-types/factories/@openzeppelin/contracts-upgradeable/proxy/index.ts new file mode 100644 index 00000000..4ac4c845 --- /dev/null +++ b/typechain-types/factories/@openzeppelin/contracts-upgradeable/proxy/index.ts @@ -0,0 +1,6 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +export * as erc1967 from "./ERC1967"; +export * as beacon from "./beacon"; +export * as utils from "./utils"; diff --git a/typechain-types/factories/@openzeppelin/contracts-upgradeable/proxy/utils/Initializable__factory.ts b/typechain-types/factories/@openzeppelin/contracts-upgradeable/proxy/utils/Initializable__factory.ts new file mode 100644 index 00000000..2f225279 --- /dev/null +++ b/typechain-types/factories/@openzeppelin/contracts-upgradeable/proxy/utils/Initializable__factory.ts @@ -0,0 +1,39 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { Contract, Signer, utils } from "ethers"; +import type { Provider } from "@ethersproject/providers"; +import type { + Initializable, + InitializableInterface, +} from "../../../../../@openzeppelin/contracts-upgradeable/proxy/utils/Initializable"; + +const _abi = [ + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint8", + name: "version", + type: "uint8", + }, + ], + name: "Initialized", + type: "event", + }, +] as const; + +export class Initializable__factory { + static readonly abi = _abi; + static createInterface(): InitializableInterface { + return new utils.Interface(_abi) as InitializableInterface; + } + static connect( + address: string, + signerOrProvider: Signer | Provider + ): Initializable { + return new Contract(address, _abi, signerOrProvider) as Initializable; + } +} diff --git a/typechain-types/factories/@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable__factory.ts b/typechain-types/factories/@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable__factory.ts new file mode 100644 index 00000000..ba25b481 --- /dev/null +++ b/typechain-types/factories/@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable__factory.ts @@ -0,0 +1,128 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { Contract, Signer, utils } from "ethers"; +import type { Provider } from "@ethersproject/providers"; +import type { + UUPSUpgradeable, + UUPSUpgradeableInterface, +} from "../../../../../@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable"; + +const _abi = [ + { + 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: false, + internalType: "uint8", + name: "version", + type: "uint8", + }, + ], + name: "Initialized", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "implementation", + type: "address", + }, + ], + name: "Upgraded", + type: "event", + }, + { + inputs: [], + name: "proxiableUUID", + outputs: [ + { + internalType: "bytes32", + name: "", + type: "bytes32", + }, + ], + stateMutability: "view", + 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", + }, +] as const; + +export class UUPSUpgradeable__factory { + static readonly abi = _abi; + static createInterface(): UUPSUpgradeableInterface { + return new utils.Interface(_abi) as UUPSUpgradeableInterface; + } + static connect( + address: string, + signerOrProvider: Signer | Provider + ): UUPSUpgradeable { + return new Contract(address, _abi, signerOrProvider) as UUPSUpgradeable; + } +} diff --git a/typechain-types/factories/@openzeppelin/contracts-upgradeable/proxy/utils/index.ts b/typechain-types/factories/@openzeppelin/contracts-upgradeable/proxy/utils/index.ts new file mode 100644 index 00000000..a192d15d --- /dev/null +++ b/typechain-types/factories/@openzeppelin/contracts-upgradeable/proxy/utils/index.ts @@ -0,0 +1,5 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +export { Initializable__factory } from "./Initializable__factory"; +export { UUPSUpgradeable__factory } from "./UUPSUpgradeable__factory"; diff --git a/typechain-types/factories/@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable__factory.ts b/typechain-types/factories/@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable__factory.ts new file mode 100644 index 00000000..6b02b4d3 --- /dev/null +++ b/typechain-types/factories/@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable__factory.ts @@ -0,0 +1,39 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { Contract, Signer, utils } from "ethers"; +import type { Provider } from "@ethersproject/providers"; +import type { + ContextUpgradeable, + ContextUpgradeableInterface, +} from "../../../../@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable"; + +const _abi = [ + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint8", + name: "version", + type: "uint8", + }, + ], + name: "Initialized", + type: "event", + }, +] as const; + +export class ContextUpgradeable__factory { + static readonly abi = _abi; + static createInterface(): ContextUpgradeableInterface { + return new utils.Interface(_abi) as ContextUpgradeableInterface; + } + static connect( + address: string, + signerOrProvider: Signer | Provider + ): ContextUpgradeable { + return new Contract(address, _abi, signerOrProvider) as ContextUpgradeable; + } +} diff --git a/typechain-types/factories/@openzeppelin/contracts-upgradeable/utils/index.ts b/typechain-types/factories/@openzeppelin/contracts-upgradeable/utils/index.ts new file mode 100644 index 00000000..3ff42aef --- /dev/null +++ b/typechain-types/factories/@openzeppelin/contracts-upgradeable/utils/index.ts @@ -0,0 +1,4 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +export { ContextUpgradeable__factory } from "./ContextUpgradeable__factory"; diff --git a/typechain-types/factories/@openzeppelin/index.ts b/typechain-types/factories/@openzeppelin/index.ts index 6397da09..6923c15a 100644 --- a/typechain-types/factories/@openzeppelin/index.ts +++ b/typechain-types/factories/@openzeppelin/index.ts @@ -2,3 +2,4 @@ /* tslint:disable */ /* eslint-disable */ export * as contracts from "./contracts"; +export * as contractsUpgradeable from "./contracts-upgradeable"; diff --git a/typechain-types/factories/contracts/index.ts b/typechain-types/factories/contracts/index.ts index 33289123..bcdd9858 100644 --- a/typechain-types/factories/contracts/index.ts +++ b/typechain-types/factories/contracts/index.ts @@ -2,4 +2,5 @@ /* tslint:disable */ /* eslint-disable */ export * as evm from "./evm"; +export * as prototypes from "./prototypes"; export * as zevm from "./zevm"; diff --git a/typechain-types/factories/contracts/prototypes/ERC20CustodyNew__factory.ts b/typechain-types/factories/contracts/prototypes/ERC20CustodyNew__factory.ts new file mode 100644 index 00000000..8dc23c23 --- /dev/null +++ b/typechain-types/factories/contracts/prototypes/ERC20CustodyNew__factory.ts @@ -0,0 +1,196 @@ +/* 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 { + ERC20CustodyNew, + ERC20CustodyNewInterface, +} from "../../../contracts/prototypes/ERC20CustodyNew"; + +const _abi = [ + { + inputs: [ + { + internalType: "address", + name: "_gateway", + type: "address", + }, + ], + stateMutability: "nonpayable", + type: "constructor", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "token", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "to", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "amount", + type: "uint256", + }, + ], + name: "Withdraw", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "token", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "to", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "amount", + type: "uint256", + }, + { + indexed: false, + internalType: "bytes", + name: "data", + type: "bytes", + }, + ], + name: "WithdrawAndCall", + type: "event", + }, + { + inputs: [], + name: "gateway", + outputs: [ + { + internalType: "contract IGateway", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "token", + type: "address", + }, + { + internalType: "address", + name: "to", + type: "address", + }, + { + internalType: "uint256", + name: "amount", + type: "uint256", + }, + ], + name: "withdraw", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "token", + type: "address", + }, + { + internalType: "address", + name: "to", + type: "address", + }, + { + internalType: "uint256", + name: "amount", + type: "uint256", + }, + { + internalType: "bytes", + name: "data", + type: "bytes", + }, + ], + name: "withdrawAndCall", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, +] as const; + +const _bytecode = + "0x608060405234801561001057600080fd5b50604051610a66380380610a668339818101604052810190610032919061008d565b806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050610108565b600081519050610087816100f1565b92915050565b6000602082840312156100a3576100a26100ec565b5b60006100b184828501610078565b91505092915050565b60006100c5826100cc565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600080fd5b6100fa816100ba565b811461010557600080fd5b50565b61094f806101176000396000f3fe608060405234801561001057600080fd5b50600436106100415760003560e01c8063116191b61461004657806321fc65f214610064578063d9caed1214610080575b600080fd5b61004e61009c565b60405161005b91906106b6565b60405180910390f35b61007e600480360381019061007991906104e7565b6100c0565b005b61009a60048036038101906100959190610494565b610297565b005b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b8473ffffffffffffffffffffffffffffffffffffffff1663a9059cbb60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff16856040518363ffffffff1660e01b815260040161011b92919061068d565b602060405180830381600087803b15801561013557600080fd5b505af1158015610149573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061016d919061056f565b5060008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16635131ab5986868686866040518663ffffffff1660e01b81526004016101cf95949392919061063f565b600060405180830381600087803b1580156101e957600080fd5b505af11580156101fd573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f82011682018060405250810190610226919061059c565b508373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167f85b5be9cf454e05e0bddf49315178102227c312078eefa3c00294fb4d912ae4e858585604051610288939291906106ec565b60405180910390a35050505050565b8273ffffffffffffffffffffffffffffffffffffffff1663a9059cbb83836040518363ffffffff1660e01b81526004016102d292919061068d565b602060405180830381600087803b1580156102ec57600080fd5b505af1158015610300573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610324919061056f565b508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f9b1bfa7fa9ee420a16e124f794c35ac9f90472acc99140eb2f6447c714cad8eb8360405161038291906106d1565b60405180910390a3505050565b60006103a261039d84610743565b61071e565b9050828152602081018484840111156103be576103bd6108b4565b5b6103c9848285610812565b509392505050565b6000813590506103e0816108d4565b92915050565b6000815190506103f5816108eb565b92915050565b60008083601f840112610411576104106108aa565b5b8235905067ffffffffffffffff81111561042e5761042d6108a5565b5b60208301915083600182028301111561044a576104496108af565b5b9250929050565b600082601f830112610466576104656108aa565b5b815161047684826020860161038f565b91505092915050565b60008135905061048e81610902565b92915050565b6000806000606084860312156104ad576104ac6108be565b5b60006104bb868287016103d1565b93505060206104cc868287016103d1565b92505060406104dd8682870161047f565b9150509250925092565b600080600080600060808688031215610503576105026108be565b5b6000610511888289016103d1565b9550506020610522888289016103d1565b94505060406105338882890161047f565b935050606086013567ffffffffffffffff811115610554576105536108b9565b5b610560888289016103fb565b92509250509295509295909350565b600060208284031215610585576105846108be565b5b6000610593848285016103e6565b91505092915050565b6000602082840312156105b2576105b16108be565b5b600082015167ffffffffffffffff8111156105d0576105cf6108b9565b5b6105dc84828501610451565b91505092915050565b6105ee81610785565b82525050565b60006106008385610774565b935061060d838584610803565b610616836108c3565b840190509392505050565b61062a816107cd565b82525050565b610639816107c3565b82525050565b600060808201905061065460008301886105e5565b61066160208301876105e5565b61066e6040830186610630565b81810360608301526106818184866105f4565b90509695505050505050565b60006040820190506106a260008301856105e5565b6106af6020830184610630565b9392505050565b60006020820190506106cb6000830184610621565b92915050565b60006020820190506106e66000830184610630565b92915050565b60006040820190506107016000830186610630565b81810360208301526107148184866105f4565b9050949350505050565b6000610728610739565b90506107348282610845565b919050565b6000604051905090565b600067ffffffffffffffff82111561075e5761075d610876565b5b610767826108c3565b9050602081019050919050565b600082825260208201905092915050565b6000610790826107a3565b9050919050565b60008115159050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b60006107d8826107df565b9050919050565b60006107ea826107f1565b9050919050565b60006107fc826107a3565b9050919050565b82818337600083830152505050565b60005b83811015610830578082015181840152602081019050610815565b8381111561083f576000848401525b50505050565b61084e826108c3565b810181811067ffffffffffffffff8211171561086d5761086c610876565b5b80604052505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b6108dd81610785565b81146108e857600080fd5b50565b6108f481610797565b81146108ff57600080fd5b50565b61090b816107c3565b811461091657600080fd5b5056fea26469706673582212203656518e4aa8f541dde5a4d09490f8b82b1ab5258bd18825341fe0e14e94eab164736f6c63430008070033"; + +type ERC20CustodyNewConstructorParams = + | [signer?: Signer] + | ConstructorParameters; + +const isSuperArgs = ( + xs: ERC20CustodyNewConstructorParams +): xs is ConstructorParameters => xs.length > 1; + +export class ERC20CustodyNew__factory extends ContractFactory { + constructor(...args: ERC20CustodyNewConstructorParams) { + 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): ERC20CustodyNew { + return super.attach(address) as ERC20CustodyNew; + } + override connect(signer: Signer): ERC20CustodyNew__factory { + return super.connect(signer) as ERC20CustodyNew__factory; + } + + static readonly bytecode = _bytecode; + static readonly abi = _abi; + static createInterface(): ERC20CustodyNewInterface { + return new utils.Interface(_abi) as ERC20CustodyNewInterface; + } + static connect( + address: string, + signerOrProvider: Signer | Provider + ): ERC20CustodyNew { + return new Contract(address, _abi, signerOrProvider) as ERC20CustodyNew; + } +} diff --git a/typechain-types/factories/contracts/prototypes/ERC20Custody__factory.ts b/typechain-types/factories/contracts/prototypes/ERC20Custody__factory.ts new file mode 100644 index 00000000..ab89fca7 --- /dev/null +++ b/typechain-types/factories/contracts/prototypes/ERC20Custody__factory.ts @@ -0,0 +1,196 @@ +/* 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 { + ERC20Custody, + ERC20CustodyInterface, +} from "../../../contracts/prototypes/ERC20Custody"; + +const _abi = [ + { + inputs: [ + { + internalType: "address", + name: "_gateway", + type: "address", + }, + ], + stateMutability: "nonpayable", + type: "constructor", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "token", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "to", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "amount", + type: "uint256", + }, + ], + name: "Withdraw", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "token", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "to", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "amount", + type: "uint256", + }, + { + indexed: false, + internalType: "bytes", + name: "data", + type: "bytes", + }, + ], + name: "WithdrawAndCall", + type: "event", + }, + { + inputs: [], + name: "gateway", + outputs: [ + { + internalType: "contract Gateway", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "token", + type: "address", + }, + { + internalType: "address", + name: "to", + type: "address", + }, + { + internalType: "uint256", + name: "amount", + type: "uint256", + }, + ], + name: "withdraw", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "token", + type: "address", + }, + { + internalType: "address", + name: "to", + type: "address", + }, + { + internalType: "uint256", + name: "amount", + type: "uint256", + }, + { + internalType: "bytes", + name: "data", + type: "bytes", + }, + ], + name: "withdrawAndCall", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, +] as const; + +const _bytecode = + "0x608060405234801561001057600080fd5b50604051610a66380380610a668339818101604052810190610032919061008d565b806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050610108565b600081519050610087816100f1565b92915050565b6000602082840312156100a3576100a26100ec565b5b60006100b184828501610078565b91505092915050565b60006100c5826100cc565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600080fd5b6100fa816100ba565b811461010557600080fd5b50565b61094f806101176000396000f3fe608060405234801561001057600080fd5b50600436106100415760003560e01c8063116191b61461004657806321fc65f214610064578063d9caed1214610080575b600080fd5b61004e61009c565b60405161005b91906106b6565b60405180910390f35b61007e600480360381019061007991906104e7565b6100c0565b005b61009a60048036038101906100959190610494565b610297565b005b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b8473ffffffffffffffffffffffffffffffffffffffff1663a9059cbb60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff16856040518363ffffffff1660e01b815260040161011b92919061068d565b602060405180830381600087803b15801561013557600080fd5b505af1158015610149573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061016d919061056f565b5060008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16635131ab5986868686866040518663ffffffff1660e01b81526004016101cf95949392919061063f565b600060405180830381600087803b1580156101e957600080fd5b505af11580156101fd573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f82011682018060405250810190610226919061059c565b508373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167f85b5be9cf454e05e0bddf49315178102227c312078eefa3c00294fb4d912ae4e858585604051610288939291906106ec565b60405180910390a35050505050565b8273ffffffffffffffffffffffffffffffffffffffff1663a9059cbb83836040518363ffffffff1660e01b81526004016102d292919061068d565b602060405180830381600087803b1580156102ec57600080fd5b505af1158015610300573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610324919061056f565b508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f9b1bfa7fa9ee420a16e124f794c35ac9f90472acc99140eb2f6447c714cad8eb8360405161038291906106d1565b60405180910390a3505050565b60006103a261039d84610743565b61071e565b9050828152602081018484840111156103be576103bd6108b4565b5b6103c9848285610812565b509392505050565b6000813590506103e0816108d4565b92915050565b6000815190506103f5816108eb565b92915050565b60008083601f840112610411576104106108aa565b5b8235905067ffffffffffffffff81111561042e5761042d6108a5565b5b60208301915083600182028301111561044a576104496108af565b5b9250929050565b600082601f830112610466576104656108aa565b5b815161047684826020860161038f565b91505092915050565b60008135905061048e81610902565b92915050565b6000806000606084860312156104ad576104ac6108be565b5b60006104bb868287016103d1565b93505060206104cc868287016103d1565b92505060406104dd8682870161047f565b9150509250925092565b600080600080600060808688031215610503576105026108be565b5b6000610511888289016103d1565b9550506020610522888289016103d1565b94505060406105338882890161047f565b935050606086013567ffffffffffffffff811115610554576105536108b9565b5b610560888289016103fb565b92509250509295509295909350565b600060208284031215610585576105846108be565b5b6000610593848285016103e6565b91505092915050565b6000602082840312156105b2576105b16108be565b5b600082015167ffffffffffffffff8111156105d0576105cf6108b9565b5b6105dc84828501610451565b91505092915050565b6105ee81610785565b82525050565b60006106008385610774565b935061060d838584610803565b610616836108c3565b840190509392505050565b61062a816107cd565b82525050565b610639816107c3565b82525050565b600060808201905061065460008301886105e5565b61066160208301876105e5565b61066e6040830186610630565b81810360608301526106818184866105f4565b90509695505050505050565b60006040820190506106a260008301856105e5565b6106af6020830184610630565b9392505050565b60006020820190506106cb6000830184610621565b92915050565b60006020820190506106e66000830184610630565b92915050565b60006040820190506107016000830186610630565b81810360208301526107148184866105f4565b9050949350505050565b6000610728610739565b90506107348282610845565b919050565b6000604051905090565b600067ffffffffffffffff82111561075e5761075d610876565b5b610767826108c3565b9050602081019050919050565b600082825260208201905092915050565b6000610790826107a3565b9050919050565b60008115159050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b60006107d8826107df565b9050919050565b60006107ea826107f1565b9050919050565b60006107fc826107a3565b9050919050565b82818337600083830152505050565b60005b83811015610830578082015181840152602081019050610815565b8381111561083f576000848401525b50505050565b61084e826108c3565b810181811067ffffffffffffffff8211171561086d5761086c610876565b5b80604052505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b6108dd81610785565b81146108e857600080fd5b50565b6108f481610797565b81146108ff57600080fd5b50565b61090b816107c3565b811461091657600080fd5b5056fea2646970667358221220cb809fd2ac9895fe37c1796ed199ed89d6354f2770a02612b93ed2e3ae0dab2864736f6c63430008070033"; + +type ERC20CustodyConstructorParams = + | [signer?: Signer] + | ConstructorParameters; + +const isSuperArgs = ( + xs: ERC20CustodyConstructorParams +): xs is ConstructorParameters => xs.length > 1; + +export class ERC20Custody__factory extends ContractFactory { + constructor(...args: ERC20CustodyConstructorParams) { + 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): ERC20Custody { + return super.attach(address) as ERC20Custody; + } + override connect(signer: Signer): ERC20Custody__factory { + return super.connect(signer) as ERC20Custody__factory; + } + + static readonly bytecode = _bytecode; + static readonly abi = _abi; + static createInterface(): ERC20CustodyInterface { + return new utils.Interface(_abi) as ERC20CustodyInterface; + } + static connect( + address: string, + signerOrProvider: Signer | Provider + ): ERC20Custody { + return new Contract(address, _abi, signerOrProvider) as ERC20Custody; + } +} diff --git a/typechain-types/factories/contracts/prototypes/GatewayUpgradeTest__factory.ts b/typechain-types/factories/contracts/prototypes/GatewayUpgradeTest__factory.ts new file mode 100644 index 00000000..09a34d87 --- /dev/null +++ b/typechain-types/factories/contracts/prototypes/GatewayUpgradeTest__factory.ts @@ -0,0 +1,374 @@ +/* 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 { + GatewayUpgradeTest, + GatewayUpgradeTestInterface, +} from "../../../contracts/prototypes/GatewayUpgradeTest"; + +const _abi = [ + { + inputs: [], + stateMutability: "nonpayable", + type: "constructor", + }, + { + inputs: [], + name: "ExecutionFailed", + 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: "destination", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "value", + type: "uint256", + }, + { + indexed: false, + internalType: "bytes", + name: "data", + type: "bytes", + }, + ], + name: "ExecutedV2", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "token", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "to", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "amount", + type: "uint256", + }, + { + indexed: false, + internalType: "bytes", + name: "data", + type: "bytes", + }, + ], + name: "ExecutedWithERC20V2", + 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", + }, + { + inputs: [], + name: "custody", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "destination", + type: "address", + }, + { + internalType: "bytes", + name: "data", + type: "bytes", + }, + ], + name: "execute", + outputs: [ + { + internalType: "bytes", + name: "", + type: "bytes", + }, + ], + stateMutability: "payable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "token", + type: "address", + }, + { + internalType: "address", + name: "to", + type: "address", + }, + { + internalType: "uint256", + name: "amount", + type: "uint256", + }, + { + internalType: "bytes", + name: "data", + type: "bytes", + }, + ], + name: "executeWithERC20", + outputs: [ + { + internalType: "bytes", + name: "", + type: "bytes", + }, + ], + 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: "_custody", + type: "address", + }, + ], + name: "setCustody", + 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", + }, +] as const; + +const _bytecode = + "0x60a06040523073ffffffffffffffffffffffffffffffffffffffff1660809073ffffffffffffffffffffffffffffffffffffffff1660601b8152503480156200004757600080fd5b50620000586200005e60201b60201c565b62000208565b600060019054906101000a900460ff1615620000b1576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401620000a8906200015c565b60405180910390fd5b60ff801660008054906101000a900460ff1660ff1614620001225760ff6000806101000a81548160ff021916908360ff1602179055507f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb384740249860ff6040516200011991906200017e565b60405180910390a15b565b6000620001336027836200019b565b91506200014082620001b9565b604082019050919050565b6200015681620001ac565b82525050565b60006020820190508181036000830152620001778162000124565b9050919050565b60006020820190506200019560008301846200014b565b92915050565b600082825260208201905092915050565b600060ff82169050919050565b7f496e697469616c697a61626c653a20636f6e747261637420697320696e69746960008201527f616c697a696e6700000000000000000000000000000000000000000000000000602082015250565b60805160601c6121c062000243600039600081816102c4015281816103530152818161044d015281816104dc015261087801526121c06000f3fe60806040526004361061009c5760003560e01c8063715018a611610064578063715018a61461017e5780638129fc1c146101955780638da5cb5b146101ac578063ae7a3a6f146101d7578063dda79b7514610200578063f2fde38b1461022b5761009c565b80631cff79cd146100a15780633659cfe6146100d15780634f1ef286146100fa5780635131ab591461011657806352d1902d14610153575b600080fd5b6100bb60048036038101906100b69190611554565b610254565b6040516100c89190611a10565b60405180910390f35b3480156100dd57600080fd5b506100f860048036038101906100f3919061149f565b6102c2565b005b610114600480360381019061010f91906115b4565b61044b565b005b34801561012257600080fd5b5061013d600480360381019061013891906114cc565b610588565b60405161014a9190611a10565b60405180910390f35b34801561015f57600080fd5b50610168610874565b60405161017591906119f5565b60405180910390f35b34801561018a57600080fd5b5061019361092d565b005b3480156101a157600080fd5b506101aa610941565b005b3480156101b857600080fd5b506101c1610a87565b6040516101ce9190611988565b60405180910390f35b3480156101e357600080fd5b506101fe60048036038101906101f9919061149f565b610ab1565b005b34801561020c57600080fd5b50610215610af5565b6040516102229190611988565b60405180910390f35b34801561023757600080fd5b50610252600480360381019061024d919061149f565b610b1b565b005b60606000610263858585610b9f565b90508473ffffffffffffffffffffffffffffffffffffffff167f373df382b9c587826f3de13f16d67f8d99f28ee947fc0924c6ef2d6d2c7e85463486866040516102af93929190611bcf565b60405180910390a2809150509392505050565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163073ffffffffffffffffffffffffffffffffffffffff161415610351576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161034890611a8f565b60405180910390fd5b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16610390610c56565b73ffffffffffffffffffffffffffffffffffffffff16146103e6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016103dd90611aaf565b60405180910390fd5b6103ef81610cad565b61044881600067ffffffffffffffff81111561040e5761040d611d90565b5b6040519080825280601f01601f1916602001820160405280156104405781602001600182028036833780820191505090505b506000610cb8565b50565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163073ffffffffffffffffffffffffffffffffffffffff1614156104da576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016104d190611a8f565b60405180910390fd5b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16610519610c56565b73ffffffffffffffffffffffffffffffffffffffff161461056f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161056690611aaf565b60405180910390fd5b61057882610cad565b61058482826001610cb8565b5050565b60608573ffffffffffffffffffffffffffffffffffffffff1663095ea7b386866040518363ffffffff1660e01b81526004016105c59291906119cc565b602060405180830381600087803b1580156105df57600080fd5b505af11580156105f3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106179190611610565b506000610625868585610b9f565b90508673ffffffffffffffffffffffffffffffffffffffff1663095ea7b38760006040518363ffffffff1660e01b81526004016106639291906119a3565b602060405180830381600087803b15801561067d57600080fd5b505af1158015610691573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106b59190611610565b5060008773ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b81526004016106f19190611988565b60206040518083038186803b15801561070957600080fd5b505afa15801561071d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610741919061166a565b905060008111156107fd578773ffffffffffffffffffffffffffffffffffffffff1663a9059cbb60c960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16836040518363ffffffff1660e01b81526004016107a99291906119cc565b602060405180830381600087803b1580156107c357600080fd5b505af11580156107d7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107fb9190611610565b505b8673ffffffffffffffffffffffffffffffffffffffff168873ffffffffffffffffffffffffffffffffffffffff167f887e0acc3616142401641abfc50d7d7ae169b6ce55d8dc06ff5e21501ddb341b88888860405161085e93929190611bcf565b60405180910390a3819250505095945050505050565b60007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163073ffffffffffffffffffffffffffffffffffffffff1614610904576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016108fb90611acf565b60405180910390fd5b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc60001b905090565b610935610e35565b61093f6000610eb3565b565b60008060019054906101000a900460ff161590508080156109725750600160008054906101000a900460ff1660ff16105b8061099f575061098130610f79565b15801561099e5750600160008054906101000a900460ff1660ff16145b5b6109de576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109d590611b0f565b60405180910390fd5b60016000806101000a81548160ff021916908360ff1602179055508015610a1b576001600060016101000a81548160ff0219169083151502179055505b610a23610f9c565b610a2b610ff5565b8015610a845760008060016101000a81548160ff0219169083151502179055507f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024986001604051610a7b9190611a32565b60405180910390a15b50565b6000603360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b8060c960006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b60c960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b610b23610e35565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415610b93576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b8a90611a6f565b60405180910390fd5b610b9c81610eb3565b50565b60606000808573ffffffffffffffffffffffffffffffffffffffff16348686604051610bcc929190611958565b60006040518083038185875af1925050503d8060008114610c09576040519150601f19603f3d011682016040523d82523d6000602084013e610c0e565b606091505b509150915081610c4a576040517facfdb44400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80925050509392505050565b6000610c847f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc60001b611046565b60000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b610cb5610e35565b50565b610ce47f4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd914360001b611050565b60000160009054906101000a900460ff1615610d0857610d038361105a565b610e30565b8273ffffffffffffffffffffffffffffffffffffffff166352d1902d6040518163ffffffff1660e01b815260040160206040518083038186803b158015610d4e57600080fd5b505afa925050508015610d7f57506040513d601f19601f82011682018060405250810190610d7c919061163d565b60015b610dbe576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610db590611b2f565b60405180910390fd5b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc60001b8114610e23576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e1a90611aef565b60405180910390fd5b50610e2f838383611113565b5b505050565b610e3d61113f565b73ffffffffffffffffffffffffffffffffffffffff16610e5b610a87565b73ffffffffffffffffffffffffffffffffffffffff1614610eb1576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ea890611b6f565b60405180910390fd5b565b6000603360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905081603360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b6000808273ffffffffffffffffffffffffffffffffffffffff163b119050919050565b600060019054906101000a900460ff16610feb576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610fe290611baf565b60405180910390fd5b610ff3611147565b565b600060019054906101000a900460ff16611044576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161103b90611baf565b60405180910390fd5b565b6000819050919050565b6000819050919050565b61106381610f79565b6110a2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161109990611b4f565b60405180910390fd5b806110cf7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc60001b611046565b60000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b61111c836111a8565b6000825111806111295750805b1561113a5761113883836111f7565b505b505050565b600033905090565b600060019054906101000a900460ff16611196576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161118d90611baf565b60405180910390fd5b6111a66111a161113f565b610eb3565b565b6111b18161105a565b8073ffffffffffffffffffffffffffffffffffffffff167fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b60405160405180910390a250565b606061121c838360405180606001604052806027815260200161216460279139611224565b905092915050565b60606000808573ffffffffffffffffffffffffffffffffffffffff168560405161124e9190611971565b600060405180830381855af49150503d8060008114611289576040519150601f19603f3d011682016040523d82523d6000602084013e61128e565b606091505b509150915061129f868383876112aa565b925050509392505050565b6060831561130d57600083511415611305576112c585610f79565b611304576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016112fb90611b8f565b60405180910390fd5b5b829050611318565b6113178383611320565b5b949350505050565b6000825111156113335781518083602001fd5b806040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016113679190611a4d565b60405180910390fd5b600061138361137e84611c26565b611c01565b90508281526020810184848401111561139f5761139e611dce565b5b6113aa848285611d1d565b509392505050565b6000813590506113c181612107565b92915050565b6000815190506113d68161211e565b92915050565b6000815190506113eb81612135565b92915050565b60008083601f84011261140757611406611dc4565b5b8235905067ffffffffffffffff81111561142457611423611dbf565b5b6020830191508360018202830111156114405761143f611dc9565b5b9250929050565b600082601f83011261145c5761145b611dc4565b5b813561146c848260208601611370565b91505092915050565b6000813590506114848161214c565b92915050565b6000815190506114998161214c565b92915050565b6000602082840312156114b5576114b4611dd8565b5b60006114c3848285016113b2565b91505092915050565b6000806000806000608086880312156114e8576114e7611dd8565b5b60006114f6888289016113b2565b9550506020611507888289016113b2565b945050604061151888828901611475565b935050606086013567ffffffffffffffff81111561153957611538611dd3565b5b611545888289016113f1565b92509250509295509295909350565b60008060006040848603121561156d5761156c611dd8565b5b600061157b868287016113b2565b935050602084013567ffffffffffffffff81111561159c5761159b611dd3565b5b6115a8868287016113f1565b92509250509250925092565b600080604083850312156115cb576115ca611dd8565b5b60006115d9858286016113b2565b925050602083013567ffffffffffffffff8111156115fa576115f9611dd3565b5b61160685828601611447565b9150509250929050565b60006020828403121561162657611625611dd8565b5b6000611634848285016113c7565b91505092915050565b60006020828403121561165357611652611dd8565b5b6000611661848285016113dc565b91505092915050565b6000602082840312156116805761167f611dd8565b5b600061168e8482850161148a565b91505092915050565b6116a081611c9a565b82525050565b6116af81611cb8565b82525050565b60006116c18385611c6d565b93506116ce838584611d1d565b6116d783611ddd565b840190509392505050565b60006116ee8385611c7e565b93506116fb838584611d1d565b82840190509392505050565b600061171282611c57565b61171c8185611c6d565b935061172c818560208601611d2c565b61173581611ddd565b840191505092915050565b600061174b82611c57565b6117558185611c7e565b9350611765818560208601611d2c565b80840191505092915050565b61177a81611cf9565b82525050565b61178981611d0b565b82525050565b600061179a82611c62565b6117a48185611c89565b93506117b4818560208601611d2c565b6117bd81611ddd565b840191505092915050565b60006117d5602683611c89565b91506117e082611dee565b604082019050919050565b60006117f8602c83611c89565b915061180382611e3d565b604082019050919050565b600061181b602c83611c89565b915061182682611e8c565b604082019050919050565b600061183e603883611c89565b915061184982611edb565b604082019050919050565b6000611861602983611c89565b915061186c82611f2a565b604082019050919050565b6000611884602e83611c89565b915061188f82611f79565b604082019050919050565b60006118a7602e83611c89565b91506118b282611fc8565b604082019050919050565b60006118ca602d83611c89565b91506118d582612017565b604082019050919050565b60006118ed602083611c89565b91506118f882612066565b602082019050919050565b6000611910601d83611c89565b915061191b8261208f565b602082019050919050565b6000611933602b83611c89565b915061193e826120b8565b604082019050919050565b61195281611ce2565b82525050565b60006119658284866116e2565b91508190509392505050565b600061197d8284611740565b915081905092915050565b600060208201905061199d6000830184611697565b92915050565b60006040820190506119b86000830185611697565b6119c56020830184611771565b9392505050565b60006040820190506119e16000830185611697565b6119ee6020830184611949565b9392505050565b6000602082019050611a0a60008301846116a6565b92915050565b60006020820190508181036000830152611a2a8184611707565b905092915050565b6000602082019050611a476000830184611780565b92915050565b60006020820190508181036000830152611a67818461178f565b905092915050565b60006020820190508181036000830152611a88816117c8565b9050919050565b60006020820190508181036000830152611aa8816117eb565b9050919050565b60006020820190508181036000830152611ac88161180e565b9050919050565b60006020820190508181036000830152611ae881611831565b9050919050565b60006020820190508181036000830152611b0881611854565b9050919050565b60006020820190508181036000830152611b2881611877565b9050919050565b60006020820190508181036000830152611b488161189a565b9050919050565b60006020820190508181036000830152611b68816118bd565b9050919050565b60006020820190508181036000830152611b88816118e0565b9050919050565b60006020820190508181036000830152611ba881611903565b9050919050565b60006020820190508181036000830152611bc881611926565b9050919050565b6000604082019050611be46000830186611949565b8181036020830152611bf78184866116b5565b9050949350505050565b6000611c0b611c1c565b9050611c178282611d5f565b919050565b6000604051905090565b600067ffffffffffffffff821115611c4157611c40611d90565b5b611c4a82611ddd565b9050602081019050919050565b600081519050919050565b600081519050919050565b600082825260208201905092915050565b600081905092915050565b600082825260208201905092915050565b6000611ca582611cc2565b9050919050565b60008115159050919050565b6000819050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b6000611d0482611ce2565b9050919050565b6000611d1682611cec565b9050919050565b82818337600083830152505050565b60005b83811015611d4a578082015181840152602081019050611d2f565b83811115611d59576000848401525b50505050565b611d6882611ddd565b810181811067ffffffffffffffff82111715611d8757611d86611d90565b5b80604052505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b7f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060008201527f64656c656761746563616c6c0000000000000000000000000000000000000000602082015250565b7f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060008201527f6163746976652070726f78790000000000000000000000000000000000000000602082015250565b7f555550535570677261646561626c653a206d757374206e6f742062652063616c60008201527f6c6564207468726f7567682064656c656761746563616c6c0000000000000000602082015250565b7f45524331393637557067726164653a20756e737570706f727465642070726f7860008201527f6961626c65555549440000000000000000000000000000000000000000000000602082015250565b7f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160008201527f647920696e697469616c697a6564000000000000000000000000000000000000602082015250565b7f45524331393637557067726164653a206e657720696d706c656d656e7461746960008201527f6f6e206973206e6f742055555053000000000000000000000000000000000000602082015250565b7f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60008201527f6f74206120636f6e747261637400000000000000000000000000000000000000602082015250565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b7f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000600082015250565b7f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960008201527f6e697469616c697a696e67000000000000000000000000000000000000000000602082015250565b61211081611c9a565b811461211b57600080fd5b50565b61212781611cac565b811461213257600080fd5b50565b61213e81611cb8565b811461214957600080fd5b50565b61215581611ce2565b811461216057600080fd5b5056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a26469706673582212202a6bc713190b6dd8d6ca2e7230a1fbf1a51901427e8b2269756c2b4888fc2cd164736f6c63430008070033"; + +type GatewayUpgradeTestConstructorParams = + | [signer?: Signer] + | ConstructorParameters; + +const isSuperArgs = ( + xs: GatewayUpgradeTestConstructorParams +): xs is ConstructorParameters => xs.length > 1; + +export class GatewayUpgradeTest__factory extends ContractFactory { + constructor(...args: GatewayUpgradeTestConstructorParams) { + 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): GatewayUpgradeTest { + return super.attach(address) as GatewayUpgradeTest; + } + override connect(signer: Signer): GatewayUpgradeTest__factory { + return super.connect(signer) as GatewayUpgradeTest__factory; + } + + static readonly bytecode = _bytecode; + static readonly abi = _abi; + static createInterface(): GatewayUpgradeTestInterface { + return new utils.Interface(_abi) as GatewayUpgradeTestInterface; + } + static connect( + address: string, + signerOrProvider: Signer | Provider + ): GatewayUpgradeTest { + return new Contract(address, _abi, signerOrProvider) as GatewayUpgradeTest; + } +} diff --git a/typechain-types/factories/contracts/prototypes/GatewayV2.sol/GatewayV2__factory.ts b/typechain-types/factories/contracts/prototypes/GatewayV2.sol/GatewayV2__factory.ts new file mode 100644 index 00000000..9f8e5fb0 --- /dev/null +++ b/typechain-types/factories/contracts/prototypes/GatewayV2.sol/GatewayV2__factory.ts @@ -0,0 +1,374 @@ +/* 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 { + GatewayV2, + GatewayV2Interface, +} from "../../../../contracts/prototypes/GatewayV2.sol/GatewayV2"; + +const _abi = [ + { + inputs: [], + stateMutability: "nonpayable", + type: "constructor", + }, + { + inputs: [], + name: "ExecutionFailed", + 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: "destination", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "value", + type: "uint256", + }, + { + indexed: false, + internalType: "bytes", + name: "data", + type: "bytes", + }, + ], + name: "ExecutedV2", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "token", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "to", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "amount", + type: "uint256", + }, + { + indexed: false, + internalType: "bytes", + name: "data", + type: "bytes", + }, + ], + name: "ExecutedWithERC20V2", + 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", + }, + { + inputs: [], + name: "custody", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "destination", + type: "address", + }, + { + internalType: "bytes", + name: "data", + type: "bytes", + }, + ], + name: "execute", + outputs: [ + { + internalType: "bytes", + name: "", + type: "bytes", + }, + ], + stateMutability: "payable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "token", + type: "address", + }, + { + internalType: "address", + name: "to", + type: "address", + }, + { + internalType: "uint256", + name: "amount", + type: "uint256", + }, + { + internalType: "bytes", + name: "data", + type: "bytes", + }, + ], + name: "executeWithERC20", + outputs: [ + { + internalType: "bytes", + name: "", + type: "bytes", + }, + ], + 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: "_custody", + type: "address", + }, + ], + name: "setCustody", + 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", + }, +] as const; + +const _bytecode = + "0x60a06040523073ffffffffffffffffffffffffffffffffffffffff1660809073ffffffffffffffffffffffffffffffffffffffff1660601b8152503480156200004757600080fd5b50620000586200005e60201b60201c565b62000208565b600060019054906101000a900460ff1615620000b1576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401620000a8906200015c565b60405180910390fd5b60ff801660008054906101000a900460ff1660ff1614620001225760ff6000806101000a81548160ff021916908360ff1602179055507f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb384740249860ff6040516200011991906200017e565b60405180910390a15b565b6000620001336027836200019b565b91506200014082620001b9565b604082019050919050565b6200015681620001ac565b82525050565b60006020820190508181036000830152620001778162000124565b9050919050565b60006020820190506200019560008301846200014b565b92915050565b600082825260208201905092915050565b600060ff82169050919050565b7f496e697469616c697a61626c653a20636f6e747261637420697320696e69746960008201527f616c697a696e6700000000000000000000000000000000000000000000000000602082015250565b60805160601c6121c062000243600039600081816102c4015281816103530152818161044d015281816104dc015261087801526121c06000f3fe60806040526004361061009c5760003560e01c8063715018a611610064578063715018a61461017e5780638129fc1c146101955780638da5cb5b146101ac578063ae7a3a6f146101d7578063dda79b7514610200578063f2fde38b1461022b5761009c565b80631cff79cd146100a15780633659cfe6146100d15780634f1ef286146100fa5780635131ab591461011657806352d1902d14610153575b600080fd5b6100bb60048036038101906100b69190611554565b610254565b6040516100c89190611a10565b60405180910390f35b3480156100dd57600080fd5b506100f860048036038101906100f3919061149f565b6102c2565b005b610114600480360381019061010f91906115b4565b61044b565b005b34801561012257600080fd5b5061013d600480360381019061013891906114cc565b610588565b60405161014a9190611a10565b60405180910390f35b34801561015f57600080fd5b50610168610874565b60405161017591906119f5565b60405180910390f35b34801561018a57600080fd5b5061019361092d565b005b3480156101a157600080fd5b506101aa610941565b005b3480156101b857600080fd5b506101c1610a87565b6040516101ce9190611988565b60405180910390f35b3480156101e357600080fd5b506101fe60048036038101906101f9919061149f565b610ab1565b005b34801561020c57600080fd5b50610215610af5565b6040516102229190611988565b60405180910390f35b34801561023757600080fd5b50610252600480360381019061024d919061149f565b610b1b565b005b60606000610263858585610b9f565b90508473ffffffffffffffffffffffffffffffffffffffff167f373df382b9c587826f3de13f16d67f8d99f28ee947fc0924c6ef2d6d2c7e85463486866040516102af93929190611bcf565b60405180910390a2809150509392505050565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163073ffffffffffffffffffffffffffffffffffffffff161415610351576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161034890611a8f565b60405180910390fd5b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16610390610c56565b73ffffffffffffffffffffffffffffffffffffffff16146103e6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016103dd90611aaf565b60405180910390fd5b6103ef81610cad565b61044881600067ffffffffffffffff81111561040e5761040d611d90565b5b6040519080825280601f01601f1916602001820160405280156104405781602001600182028036833780820191505090505b506000610cb8565b50565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163073ffffffffffffffffffffffffffffffffffffffff1614156104da576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016104d190611a8f565b60405180910390fd5b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16610519610c56565b73ffffffffffffffffffffffffffffffffffffffff161461056f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161056690611aaf565b60405180910390fd5b61057882610cad565b61058482826001610cb8565b5050565b60608573ffffffffffffffffffffffffffffffffffffffff1663095ea7b386866040518363ffffffff1660e01b81526004016105c59291906119cc565b602060405180830381600087803b1580156105df57600080fd5b505af11580156105f3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106179190611610565b506000610625868585610b9f565b90508673ffffffffffffffffffffffffffffffffffffffff1663095ea7b38760006040518363ffffffff1660e01b81526004016106639291906119a3565b602060405180830381600087803b15801561067d57600080fd5b505af1158015610691573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106b59190611610565b5060008773ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b81526004016106f19190611988565b60206040518083038186803b15801561070957600080fd5b505afa15801561071d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610741919061166a565b905060008111156107fd578773ffffffffffffffffffffffffffffffffffffffff1663a9059cbb60c960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16836040518363ffffffff1660e01b81526004016107a99291906119cc565b602060405180830381600087803b1580156107c357600080fd5b505af11580156107d7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107fb9190611610565b505b8673ffffffffffffffffffffffffffffffffffffffff168873ffffffffffffffffffffffffffffffffffffffff167f887e0acc3616142401641abfc50d7d7ae169b6ce55d8dc06ff5e21501ddb341b88888860405161085e93929190611bcf565b60405180910390a3819250505095945050505050565b60007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163073ffffffffffffffffffffffffffffffffffffffff1614610904576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016108fb90611acf565b60405180910390fd5b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc60001b905090565b610935610e35565b61093f6000610eb3565b565b60008060019054906101000a900460ff161590508080156109725750600160008054906101000a900460ff1660ff16105b8061099f575061098130610f79565b15801561099e5750600160008054906101000a900460ff1660ff16145b5b6109de576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109d590611b0f565b60405180910390fd5b60016000806101000a81548160ff021916908360ff1602179055508015610a1b576001600060016101000a81548160ff0219169083151502179055505b610a23610f9c565b610a2b610ff5565b8015610a845760008060016101000a81548160ff0219169083151502179055507f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024986001604051610a7b9190611a32565b60405180910390a15b50565b6000603360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b8060c960006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b60c960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b610b23610e35565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415610b93576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b8a90611a6f565b60405180910390fd5b610b9c81610eb3565b50565b60606000808573ffffffffffffffffffffffffffffffffffffffff16348686604051610bcc929190611958565b60006040518083038185875af1925050503d8060008114610c09576040519150601f19603f3d011682016040523d82523d6000602084013e610c0e565b606091505b509150915081610c4a576040517facfdb44400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80925050509392505050565b6000610c847f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc60001b611046565b60000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b610cb5610e35565b50565b610ce47f4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd914360001b611050565b60000160009054906101000a900460ff1615610d0857610d038361105a565b610e30565b8273ffffffffffffffffffffffffffffffffffffffff166352d1902d6040518163ffffffff1660e01b815260040160206040518083038186803b158015610d4e57600080fd5b505afa925050508015610d7f57506040513d601f19601f82011682018060405250810190610d7c919061163d565b60015b610dbe576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610db590611b2f565b60405180910390fd5b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc60001b8114610e23576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e1a90611aef565b60405180910390fd5b50610e2f838383611113565b5b505050565b610e3d61113f565b73ffffffffffffffffffffffffffffffffffffffff16610e5b610a87565b73ffffffffffffffffffffffffffffffffffffffff1614610eb1576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ea890611b6f565b60405180910390fd5b565b6000603360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905081603360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b6000808273ffffffffffffffffffffffffffffffffffffffff163b119050919050565b600060019054906101000a900460ff16610feb576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610fe290611baf565b60405180910390fd5b610ff3611147565b565b600060019054906101000a900460ff16611044576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161103b90611baf565b60405180910390fd5b565b6000819050919050565b6000819050919050565b61106381610f79565b6110a2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161109990611b4f565b60405180910390fd5b806110cf7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc60001b611046565b60000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b61111c836111a8565b6000825111806111295750805b1561113a5761113883836111f7565b505b505050565b600033905090565b600060019054906101000a900460ff16611196576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161118d90611baf565b60405180910390fd5b6111a66111a161113f565b610eb3565b565b6111b18161105a565b8073ffffffffffffffffffffffffffffffffffffffff167fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b60405160405180910390a250565b606061121c838360405180606001604052806027815260200161216460279139611224565b905092915050565b60606000808573ffffffffffffffffffffffffffffffffffffffff168560405161124e9190611971565b600060405180830381855af49150503d8060008114611289576040519150601f19603f3d011682016040523d82523d6000602084013e61128e565b606091505b509150915061129f868383876112aa565b925050509392505050565b6060831561130d57600083511415611305576112c585610f79565b611304576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016112fb90611b8f565b60405180910390fd5b5b829050611318565b6113178383611320565b5b949350505050565b6000825111156113335781518083602001fd5b806040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016113679190611a4d565b60405180910390fd5b600061138361137e84611c26565b611c01565b90508281526020810184848401111561139f5761139e611dce565b5b6113aa848285611d1d565b509392505050565b6000813590506113c181612107565b92915050565b6000815190506113d68161211e565b92915050565b6000815190506113eb81612135565b92915050565b60008083601f84011261140757611406611dc4565b5b8235905067ffffffffffffffff81111561142457611423611dbf565b5b6020830191508360018202830111156114405761143f611dc9565b5b9250929050565b600082601f83011261145c5761145b611dc4565b5b813561146c848260208601611370565b91505092915050565b6000813590506114848161214c565b92915050565b6000815190506114998161214c565b92915050565b6000602082840312156114b5576114b4611dd8565b5b60006114c3848285016113b2565b91505092915050565b6000806000806000608086880312156114e8576114e7611dd8565b5b60006114f6888289016113b2565b9550506020611507888289016113b2565b945050604061151888828901611475565b935050606086013567ffffffffffffffff81111561153957611538611dd3565b5b611545888289016113f1565b92509250509295509295909350565b60008060006040848603121561156d5761156c611dd8565b5b600061157b868287016113b2565b935050602084013567ffffffffffffffff81111561159c5761159b611dd3565b5b6115a8868287016113f1565b92509250509250925092565b600080604083850312156115cb576115ca611dd8565b5b60006115d9858286016113b2565b925050602083013567ffffffffffffffff8111156115fa576115f9611dd3565b5b61160685828601611447565b9150509250929050565b60006020828403121561162657611625611dd8565b5b6000611634848285016113c7565b91505092915050565b60006020828403121561165357611652611dd8565b5b6000611661848285016113dc565b91505092915050565b6000602082840312156116805761167f611dd8565b5b600061168e8482850161148a565b91505092915050565b6116a081611c9a565b82525050565b6116af81611cb8565b82525050565b60006116c18385611c6d565b93506116ce838584611d1d565b6116d783611ddd565b840190509392505050565b60006116ee8385611c7e565b93506116fb838584611d1d565b82840190509392505050565b600061171282611c57565b61171c8185611c6d565b935061172c818560208601611d2c565b61173581611ddd565b840191505092915050565b600061174b82611c57565b6117558185611c7e565b9350611765818560208601611d2c565b80840191505092915050565b61177a81611cf9565b82525050565b61178981611d0b565b82525050565b600061179a82611c62565b6117a48185611c89565b93506117b4818560208601611d2c565b6117bd81611ddd565b840191505092915050565b60006117d5602683611c89565b91506117e082611dee565b604082019050919050565b60006117f8602c83611c89565b915061180382611e3d565b604082019050919050565b600061181b602c83611c89565b915061182682611e8c565b604082019050919050565b600061183e603883611c89565b915061184982611edb565b604082019050919050565b6000611861602983611c89565b915061186c82611f2a565b604082019050919050565b6000611884602e83611c89565b915061188f82611f79565b604082019050919050565b60006118a7602e83611c89565b91506118b282611fc8565b604082019050919050565b60006118ca602d83611c89565b91506118d582612017565b604082019050919050565b60006118ed602083611c89565b91506118f882612066565b602082019050919050565b6000611910601d83611c89565b915061191b8261208f565b602082019050919050565b6000611933602b83611c89565b915061193e826120b8565b604082019050919050565b61195281611ce2565b82525050565b60006119658284866116e2565b91508190509392505050565b600061197d8284611740565b915081905092915050565b600060208201905061199d6000830184611697565b92915050565b60006040820190506119b86000830185611697565b6119c56020830184611771565b9392505050565b60006040820190506119e16000830185611697565b6119ee6020830184611949565b9392505050565b6000602082019050611a0a60008301846116a6565b92915050565b60006020820190508181036000830152611a2a8184611707565b905092915050565b6000602082019050611a476000830184611780565b92915050565b60006020820190508181036000830152611a67818461178f565b905092915050565b60006020820190508181036000830152611a88816117c8565b9050919050565b60006020820190508181036000830152611aa8816117eb565b9050919050565b60006020820190508181036000830152611ac88161180e565b9050919050565b60006020820190508181036000830152611ae881611831565b9050919050565b60006020820190508181036000830152611b0881611854565b9050919050565b60006020820190508181036000830152611b2881611877565b9050919050565b60006020820190508181036000830152611b488161189a565b9050919050565b60006020820190508181036000830152611b68816118bd565b9050919050565b60006020820190508181036000830152611b88816118e0565b9050919050565b60006020820190508181036000830152611ba881611903565b9050919050565b60006020820190508181036000830152611bc881611926565b9050919050565b6000604082019050611be46000830186611949565b8181036020830152611bf78184866116b5565b9050949350505050565b6000611c0b611c1c565b9050611c178282611d5f565b919050565b6000604051905090565b600067ffffffffffffffff821115611c4157611c40611d90565b5b611c4a82611ddd565b9050602081019050919050565b600081519050919050565b600081519050919050565b600082825260208201905092915050565b600081905092915050565b600082825260208201905092915050565b6000611ca582611cc2565b9050919050565b60008115159050919050565b6000819050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b6000611d0482611ce2565b9050919050565b6000611d1682611cec565b9050919050565b82818337600083830152505050565b60005b83811015611d4a578082015181840152602081019050611d2f565b83811115611d59576000848401525b50505050565b611d6882611ddd565b810181811067ffffffffffffffff82111715611d8757611d86611d90565b5b80604052505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b7f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060008201527f64656c656761746563616c6c0000000000000000000000000000000000000000602082015250565b7f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060008201527f6163746976652070726f78790000000000000000000000000000000000000000602082015250565b7f555550535570677261646561626c653a206d757374206e6f742062652063616c60008201527f6c6564207468726f7567682064656c656761746563616c6c0000000000000000602082015250565b7f45524331393637557067726164653a20756e737570706f727465642070726f7860008201527f6961626c65555549440000000000000000000000000000000000000000000000602082015250565b7f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160008201527f647920696e697469616c697a6564000000000000000000000000000000000000602082015250565b7f45524331393637557067726164653a206e657720696d706c656d656e7461746960008201527f6f6e206973206e6f742055555053000000000000000000000000000000000000602082015250565b7f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60008201527f6f74206120636f6e747261637400000000000000000000000000000000000000602082015250565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b7f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000600082015250565b7f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960008201527f6e697469616c697a696e67000000000000000000000000000000000000000000602082015250565b61211081611c9a565b811461211b57600080fd5b50565b61212781611cac565b811461213257600080fd5b50565b61213e81611cb8565b811461214957600080fd5b50565b61215581611ce2565b811461216057600080fd5b5056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a2646970667358221220a349306a7d1588b676f5b6e95783cf1d798266d946f8cdd77432870e89cdcd4f64736f6c63430008070033"; + +type GatewayV2ConstructorParams = + | [signer?: Signer] + | ConstructorParameters; + +const isSuperArgs = ( + xs: GatewayV2ConstructorParams +): xs is ConstructorParameters => xs.length > 1; + +export class GatewayV2__factory extends ContractFactory { + constructor(...args: GatewayV2ConstructorParams) { + 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): GatewayV2 { + return super.attach(address) as GatewayV2; + } + override connect(signer: Signer): GatewayV2__factory { + return super.connect(signer) as GatewayV2__factory; + } + + static readonly bytecode = _bytecode; + static readonly abi = _abi; + static createInterface(): GatewayV2Interface { + return new utils.Interface(_abi) as GatewayV2Interface; + } + static connect( + address: string, + signerOrProvider: Signer | Provider + ): GatewayV2 { + return new Contract(address, _abi, signerOrProvider) as GatewayV2; + } +} diff --git a/typechain-types/factories/contracts/prototypes/GatewayV2.sol/Gateway__factory.ts b/typechain-types/factories/contracts/prototypes/GatewayV2.sol/Gateway__factory.ts new file mode 100644 index 00000000..509a9f46 --- /dev/null +++ b/typechain-types/factories/contracts/prototypes/GatewayV2.sol/Gateway__factory.ts @@ -0,0 +1,374 @@ +/* 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 { + Gateway, + GatewayInterface, +} from "../../../../contracts/prototypes/GatewayV2.sol/Gateway"; + +const _abi = [ + { + inputs: [], + stateMutability: "nonpayable", + type: "constructor", + }, + { + inputs: [], + name: "ExecutionFailed", + 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: "destination", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "value", + type: "uint256", + }, + { + indexed: false, + internalType: "bytes", + name: "data", + type: "bytes", + }, + ], + name: "ExecutedV2", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "token", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "to", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "amount", + type: "uint256", + }, + { + indexed: false, + internalType: "bytes", + name: "data", + type: "bytes", + }, + ], + name: "ExecutedWithERC20V2", + 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", + }, + { + inputs: [], + name: "custody", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "destination", + type: "address", + }, + { + internalType: "bytes", + name: "data", + type: "bytes", + }, + ], + name: "execute", + outputs: [ + { + internalType: "bytes", + name: "", + type: "bytes", + }, + ], + stateMutability: "payable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "token", + type: "address", + }, + { + internalType: "address", + name: "to", + type: "address", + }, + { + internalType: "uint256", + name: "amount", + type: "uint256", + }, + { + internalType: "bytes", + name: "data", + type: "bytes", + }, + ], + name: "executeWithERC20", + outputs: [ + { + internalType: "bytes", + name: "", + type: "bytes", + }, + ], + 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: "_custody", + type: "address", + }, + ], + name: "setCustody", + 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", + }, +] as const; + +const _bytecode = + "0x60a06040523073ffffffffffffffffffffffffffffffffffffffff1660809073ffffffffffffffffffffffffffffffffffffffff1660601b8152503480156200004757600080fd5b50620000586200005e60201b60201c565b62000208565b600060019054906101000a900460ff1615620000b1576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401620000a8906200015c565b60405180910390fd5b60ff801660008054906101000a900460ff1660ff1614620001225760ff6000806101000a81548160ff021916908360ff1602179055507f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb384740249860ff6040516200011991906200017e565b60405180910390a15b565b6000620001336027836200019b565b91506200014082620001b9565b604082019050919050565b6200015681620001ac565b82525050565b60006020820190508181036000830152620001778162000124565b9050919050565b60006020820190506200019560008301846200014b565b92915050565b600082825260208201905092915050565b600060ff82169050919050565b7f496e697469616c697a61626c653a20636f6e747261637420697320696e69746960008201527f616c697a696e6700000000000000000000000000000000000000000000000000602082015250565b60805160601c6121c062000243600039600081816102c4015281816103530152818161044d015281816104dc015261087801526121c06000f3fe60806040526004361061009c5760003560e01c8063715018a611610064578063715018a61461017e5780638129fc1c146101955780638da5cb5b146101ac578063ae7a3a6f146101d7578063dda79b7514610200578063f2fde38b1461022b5761009c565b80631cff79cd146100a15780633659cfe6146100d15780634f1ef286146100fa5780635131ab591461011657806352d1902d14610153575b600080fd5b6100bb60048036038101906100b69190611554565b610254565b6040516100c89190611a10565b60405180910390f35b3480156100dd57600080fd5b506100f860048036038101906100f3919061149f565b6102c2565b005b610114600480360381019061010f91906115b4565b61044b565b005b34801561012257600080fd5b5061013d600480360381019061013891906114cc565b610588565b60405161014a9190611a10565b60405180910390f35b34801561015f57600080fd5b50610168610874565b60405161017591906119f5565b60405180910390f35b34801561018a57600080fd5b5061019361092d565b005b3480156101a157600080fd5b506101aa610941565b005b3480156101b857600080fd5b506101c1610a87565b6040516101ce9190611988565b60405180910390f35b3480156101e357600080fd5b506101fe60048036038101906101f9919061149f565b610ab1565b005b34801561020c57600080fd5b50610215610af5565b6040516102229190611988565b60405180910390f35b34801561023757600080fd5b50610252600480360381019061024d919061149f565b610b1b565b005b60606000610263858585610b9f565b90508473ffffffffffffffffffffffffffffffffffffffff167f373df382b9c587826f3de13f16d67f8d99f28ee947fc0924c6ef2d6d2c7e85463486866040516102af93929190611bcf565b60405180910390a2809150509392505050565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163073ffffffffffffffffffffffffffffffffffffffff161415610351576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161034890611a8f565b60405180910390fd5b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16610390610c56565b73ffffffffffffffffffffffffffffffffffffffff16146103e6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016103dd90611aaf565b60405180910390fd5b6103ef81610cad565b61044881600067ffffffffffffffff81111561040e5761040d611d90565b5b6040519080825280601f01601f1916602001820160405280156104405781602001600182028036833780820191505090505b506000610cb8565b50565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163073ffffffffffffffffffffffffffffffffffffffff1614156104da576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016104d190611a8f565b60405180910390fd5b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16610519610c56565b73ffffffffffffffffffffffffffffffffffffffff161461056f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161056690611aaf565b60405180910390fd5b61057882610cad565b61058482826001610cb8565b5050565b60608573ffffffffffffffffffffffffffffffffffffffff1663095ea7b386866040518363ffffffff1660e01b81526004016105c59291906119cc565b602060405180830381600087803b1580156105df57600080fd5b505af11580156105f3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106179190611610565b506000610625868585610b9f565b90508673ffffffffffffffffffffffffffffffffffffffff1663095ea7b38760006040518363ffffffff1660e01b81526004016106639291906119a3565b602060405180830381600087803b15801561067d57600080fd5b505af1158015610691573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106b59190611610565b5060008773ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b81526004016106f19190611988565b60206040518083038186803b15801561070957600080fd5b505afa15801561071d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610741919061166a565b905060008111156107fd578773ffffffffffffffffffffffffffffffffffffffff1663a9059cbb60c960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16836040518363ffffffff1660e01b81526004016107a99291906119cc565b602060405180830381600087803b1580156107c357600080fd5b505af11580156107d7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107fb9190611610565b505b8673ffffffffffffffffffffffffffffffffffffffff168873ffffffffffffffffffffffffffffffffffffffff167f887e0acc3616142401641abfc50d7d7ae169b6ce55d8dc06ff5e21501ddb341b88888860405161085e93929190611bcf565b60405180910390a3819250505095945050505050565b60007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163073ffffffffffffffffffffffffffffffffffffffff1614610904576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016108fb90611acf565b60405180910390fd5b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc60001b905090565b610935610e35565b61093f6000610eb3565b565b60008060019054906101000a900460ff161590508080156109725750600160008054906101000a900460ff1660ff16105b8061099f575061098130610f79565b15801561099e5750600160008054906101000a900460ff1660ff16145b5b6109de576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109d590611b0f565b60405180910390fd5b60016000806101000a81548160ff021916908360ff1602179055508015610a1b576001600060016101000a81548160ff0219169083151502179055505b610a23610f9c565b610a2b610ff5565b8015610a845760008060016101000a81548160ff0219169083151502179055507f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024986001604051610a7b9190611a32565b60405180910390a15b50565b6000603360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b8060c960006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b60c960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b610b23610e35565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415610b93576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b8a90611a6f565b60405180910390fd5b610b9c81610eb3565b50565b60606000808573ffffffffffffffffffffffffffffffffffffffff16348686604051610bcc929190611958565b60006040518083038185875af1925050503d8060008114610c09576040519150601f19603f3d011682016040523d82523d6000602084013e610c0e565b606091505b509150915081610c4a576040517facfdb44400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80925050509392505050565b6000610c847f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc60001b611046565b60000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b610cb5610e35565b50565b610ce47f4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd914360001b611050565b60000160009054906101000a900460ff1615610d0857610d038361105a565b610e30565b8273ffffffffffffffffffffffffffffffffffffffff166352d1902d6040518163ffffffff1660e01b815260040160206040518083038186803b158015610d4e57600080fd5b505afa925050508015610d7f57506040513d601f19601f82011682018060405250810190610d7c919061163d565b60015b610dbe576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610db590611b2f565b60405180910390fd5b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc60001b8114610e23576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e1a90611aef565b60405180910390fd5b50610e2f838383611113565b5b505050565b610e3d61113f565b73ffffffffffffffffffffffffffffffffffffffff16610e5b610a87565b73ffffffffffffffffffffffffffffffffffffffff1614610eb1576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ea890611b6f565b60405180910390fd5b565b6000603360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905081603360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b6000808273ffffffffffffffffffffffffffffffffffffffff163b119050919050565b600060019054906101000a900460ff16610feb576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610fe290611baf565b60405180910390fd5b610ff3611147565b565b600060019054906101000a900460ff16611044576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161103b90611baf565b60405180910390fd5b565b6000819050919050565b6000819050919050565b61106381610f79565b6110a2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161109990611b4f565b60405180910390fd5b806110cf7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc60001b611046565b60000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b61111c836111a8565b6000825111806111295750805b1561113a5761113883836111f7565b505b505050565b600033905090565b600060019054906101000a900460ff16611196576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161118d90611baf565b60405180910390fd5b6111a66111a161113f565b610eb3565b565b6111b18161105a565b8073ffffffffffffffffffffffffffffffffffffffff167fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b60405160405180910390a250565b606061121c838360405180606001604052806027815260200161216460279139611224565b905092915050565b60606000808573ffffffffffffffffffffffffffffffffffffffff168560405161124e9190611971565b600060405180830381855af49150503d8060008114611289576040519150601f19603f3d011682016040523d82523d6000602084013e61128e565b606091505b509150915061129f868383876112aa565b925050509392505050565b6060831561130d57600083511415611305576112c585610f79565b611304576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016112fb90611b8f565b60405180910390fd5b5b829050611318565b6113178383611320565b5b949350505050565b6000825111156113335781518083602001fd5b806040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016113679190611a4d565b60405180910390fd5b600061138361137e84611c26565b611c01565b90508281526020810184848401111561139f5761139e611dce565b5b6113aa848285611d1d565b509392505050565b6000813590506113c181612107565b92915050565b6000815190506113d68161211e565b92915050565b6000815190506113eb81612135565b92915050565b60008083601f84011261140757611406611dc4565b5b8235905067ffffffffffffffff81111561142457611423611dbf565b5b6020830191508360018202830111156114405761143f611dc9565b5b9250929050565b600082601f83011261145c5761145b611dc4565b5b813561146c848260208601611370565b91505092915050565b6000813590506114848161214c565b92915050565b6000815190506114998161214c565b92915050565b6000602082840312156114b5576114b4611dd8565b5b60006114c3848285016113b2565b91505092915050565b6000806000806000608086880312156114e8576114e7611dd8565b5b60006114f6888289016113b2565b9550506020611507888289016113b2565b945050604061151888828901611475565b935050606086013567ffffffffffffffff81111561153957611538611dd3565b5b611545888289016113f1565b92509250509295509295909350565b60008060006040848603121561156d5761156c611dd8565b5b600061157b868287016113b2565b935050602084013567ffffffffffffffff81111561159c5761159b611dd3565b5b6115a8868287016113f1565b92509250509250925092565b600080604083850312156115cb576115ca611dd8565b5b60006115d9858286016113b2565b925050602083013567ffffffffffffffff8111156115fa576115f9611dd3565b5b61160685828601611447565b9150509250929050565b60006020828403121561162657611625611dd8565b5b6000611634848285016113c7565b91505092915050565b60006020828403121561165357611652611dd8565b5b6000611661848285016113dc565b91505092915050565b6000602082840312156116805761167f611dd8565b5b600061168e8482850161148a565b91505092915050565b6116a081611c9a565b82525050565b6116af81611cb8565b82525050565b60006116c18385611c6d565b93506116ce838584611d1d565b6116d783611ddd565b840190509392505050565b60006116ee8385611c7e565b93506116fb838584611d1d565b82840190509392505050565b600061171282611c57565b61171c8185611c6d565b935061172c818560208601611d2c565b61173581611ddd565b840191505092915050565b600061174b82611c57565b6117558185611c7e565b9350611765818560208601611d2c565b80840191505092915050565b61177a81611cf9565b82525050565b61178981611d0b565b82525050565b600061179a82611c62565b6117a48185611c89565b93506117b4818560208601611d2c565b6117bd81611ddd565b840191505092915050565b60006117d5602683611c89565b91506117e082611dee565b604082019050919050565b60006117f8602c83611c89565b915061180382611e3d565b604082019050919050565b600061181b602c83611c89565b915061182682611e8c565b604082019050919050565b600061183e603883611c89565b915061184982611edb565b604082019050919050565b6000611861602983611c89565b915061186c82611f2a565b604082019050919050565b6000611884602e83611c89565b915061188f82611f79565b604082019050919050565b60006118a7602e83611c89565b91506118b282611fc8565b604082019050919050565b60006118ca602d83611c89565b91506118d582612017565b604082019050919050565b60006118ed602083611c89565b91506118f882612066565b602082019050919050565b6000611910601d83611c89565b915061191b8261208f565b602082019050919050565b6000611933602b83611c89565b915061193e826120b8565b604082019050919050565b61195281611ce2565b82525050565b60006119658284866116e2565b91508190509392505050565b600061197d8284611740565b915081905092915050565b600060208201905061199d6000830184611697565b92915050565b60006040820190506119b86000830185611697565b6119c56020830184611771565b9392505050565b60006040820190506119e16000830185611697565b6119ee6020830184611949565b9392505050565b6000602082019050611a0a60008301846116a6565b92915050565b60006020820190508181036000830152611a2a8184611707565b905092915050565b6000602082019050611a476000830184611780565b92915050565b60006020820190508181036000830152611a67818461178f565b905092915050565b60006020820190508181036000830152611a88816117c8565b9050919050565b60006020820190508181036000830152611aa8816117eb565b9050919050565b60006020820190508181036000830152611ac88161180e565b9050919050565b60006020820190508181036000830152611ae881611831565b9050919050565b60006020820190508181036000830152611b0881611854565b9050919050565b60006020820190508181036000830152611b2881611877565b9050919050565b60006020820190508181036000830152611b488161189a565b9050919050565b60006020820190508181036000830152611b68816118bd565b9050919050565b60006020820190508181036000830152611b88816118e0565b9050919050565b60006020820190508181036000830152611ba881611903565b9050919050565b60006020820190508181036000830152611bc881611926565b9050919050565b6000604082019050611be46000830186611949565b8181036020830152611bf78184866116b5565b9050949350505050565b6000611c0b611c1c565b9050611c178282611d5f565b919050565b6000604051905090565b600067ffffffffffffffff821115611c4157611c40611d90565b5b611c4a82611ddd565b9050602081019050919050565b600081519050919050565b600081519050919050565b600082825260208201905092915050565b600081905092915050565b600082825260208201905092915050565b6000611ca582611cc2565b9050919050565b60008115159050919050565b6000819050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b6000611d0482611ce2565b9050919050565b6000611d1682611cec565b9050919050565b82818337600083830152505050565b60005b83811015611d4a578082015181840152602081019050611d2f565b83811115611d59576000848401525b50505050565b611d6882611ddd565b810181811067ffffffffffffffff82111715611d8757611d86611d90565b5b80604052505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b7f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060008201527f64656c656761746563616c6c0000000000000000000000000000000000000000602082015250565b7f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060008201527f6163746976652070726f78790000000000000000000000000000000000000000602082015250565b7f555550535570677261646561626c653a206d757374206e6f742062652063616c60008201527f6c6564207468726f7567682064656c656761746563616c6c0000000000000000602082015250565b7f45524331393637557067726164653a20756e737570706f727465642070726f7860008201527f6961626c65555549440000000000000000000000000000000000000000000000602082015250565b7f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160008201527f647920696e697469616c697a6564000000000000000000000000000000000000602082015250565b7f45524331393637557067726164653a206e657720696d706c656d656e7461746960008201527f6f6e206973206e6f742055555053000000000000000000000000000000000000602082015250565b7f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60008201527f6f74206120636f6e747261637400000000000000000000000000000000000000602082015250565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b7f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000600082015250565b7f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960008201527f6e697469616c697a696e67000000000000000000000000000000000000000000602082015250565b61211081611c9a565b811461211b57600080fd5b50565b61212781611cac565b811461213257600080fd5b50565b61213e81611cb8565b811461214957600080fd5b50565b61215581611ce2565b811461216057600080fd5b5056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a2646970667358221220213f444e22fb8d2fd03bb477d5cc3358e8755ef51e023e5b9d5f77bcc506f84f64736f6c63430008070033"; + +type GatewayConstructorParams = + | [signer?: Signer] + | ConstructorParameters; + +const isSuperArgs = ( + xs: GatewayConstructorParams +): xs is ConstructorParameters => xs.length > 1; + +export class Gateway__factory extends ContractFactory { + constructor(...args: GatewayConstructorParams) { + 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): Gateway { + return super.attach(address) as Gateway; + } + override connect(signer: Signer): Gateway__factory { + return super.connect(signer) as Gateway__factory; + } + + static readonly bytecode = _bytecode; + static readonly abi = _abi; + static createInterface(): GatewayInterface { + return new utils.Interface(_abi) as GatewayInterface; + } + static connect( + address: string, + signerOrProvider: Signer | Provider + ): Gateway { + return new Contract(address, _abi, signerOrProvider) as Gateway; + } +} diff --git a/typechain-types/factories/contracts/prototypes/GatewayV2.sol/index.ts b/typechain-types/factories/contracts/prototypes/GatewayV2.sol/index.ts new file mode 100644 index 00000000..3e3376ed --- /dev/null +++ b/typechain-types/factories/contracts/prototypes/GatewayV2.sol/index.ts @@ -0,0 +1,5 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +export { Gateway__factory } from "./Gateway__factory"; +export { GatewayV2__factory } from "./GatewayV2__factory"; diff --git a/typechain-types/factories/contracts/prototypes/GatewayV2__factory.ts b/typechain-types/factories/contracts/prototypes/GatewayV2__factory.ts new file mode 100644 index 00000000..b07067d2 --- /dev/null +++ b/typechain-types/factories/contracts/prototypes/GatewayV2__factory.ts @@ -0,0 +1,374 @@ +/* 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 { + GatewayV2, + GatewayV2Interface, +} from "../../../contracts/prototypes/GatewayV2"; + +const _abi = [ + { + inputs: [], + stateMutability: "nonpayable", + type: "constructor", + }, + { + inputs: [], + name: "ExecutionFailed", + 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: "destination", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "value", + type: "uint256", + }, + { + indexed: false, + internalType: "bytes", + name: "data", + type: "bytes", + }, + ], + name: "ExecutedV2", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "token", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "to", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "amount", + type: "uint256", + }, + { + indexed: false, + internalType: "bytes", + name: "data", + type: "bytes", + }, + ], + name: "ExecutedWithERC20V2", + 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", + }, + { + inputs: [], + name: "custody", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "destination", + type: "address", + }, + { + internalType: "bytes", + name: "data", + type: "bytes", + }, + ], + name: "execute", + outputs: [ + { + internalType: "bytes", + name: "", + type: "bytes", + }, + ], + stateMutability: "payable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "token", + type: "address", + }, + { + internalType: "address", + name: "to", + type: "address", + }, + { + internalType: "uint256", + name: "amount", + type: "uint256", + }, + { + internalType: "bytes", + name: "data", + type: "bytes", + }, + ], + name: "executeWithERC20", + outputs: [ + { + internalType: "bytes", + name: "", + type: "bytes", + }, + ], + 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: "_custody", + type: "address", + }, + ], + name: "setCustody", + 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", + }, +] as const; + +const _bytecode = + "0x60a06040523073ffffffffffffffffffffffffffffffffffffffff1660809073ffffffffffffffffffffffffffffffffffffffff1660601b8152503480156200004757600080fd5b50620000586200005e60201b60201c565b62000208565b600060019054906101000a900460ff1615620000b1576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401620000a8906200015c565b60405180910390fd5b60ff801660008054906101000a900460ff1660ff1614620001225760ff6000806101000a81548160ff021916908360ff1602179055507f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb384740249860ff6040516200011991906200017e565b60405180910390a15b565b6000620001336027836200019b565b91506200014082620001b9565b604082019050919050565b6200015681620001ac565b82525050565b60006020820190508181036000830152620001778162000124565b9050919050565b60006020820190506200019560008301846200014b565b92915050565b600082825260208201905092915050565b600060ff82169050919050565b7f496e697469616c697a61626c653a20636f6e747261637420697320696e69746960008201527f616c697a696e6700000000000000000000000000000000000000000000000000602082015250565b60805160601c6121c062000243600039600081816102c4015281816103530152818161044d015281816104dc015261087801526121c06000f3fe60806040526004361061009c5760003560e01c8063715018a611610064578063715018a61461017e5780638129fc1c146101955780638da5cb5b146101ac578063ae7a3a6f146101d7578063dda79b7514610200578063f2fde38b1461022b5761009c565b80631cff79cd146100a15780633659cfe6146100d15780634f1ef286146100fa5780635131ab591461011657806352d1902d14610153575b600080fd5b6100bb60048036038101906100b69190611554565b610254565b6040516100c89190611a10565b60405180910390f35b3480156100dd57600080fd5b506100f860048036038101906100f3919061149f565b6102c2565b005b610114600480360381019061010f91906115b4565b61044b565b005b34801561012257600080fd5b5061013d600480360381019061013891906114cc565b610588565b60405161014a9190611a10565b60405180910390f35b34801561015f57600080fd5b50610168610874565b60405161017591906119f5565b60405180910390f35b34801561018a57600080fd5b5061019361092d565b005b3480156101a157600080fd5b506101aa610941565b005b3480156101b857600080fd5b506101c1610a87565b6040516101ce9190611988565b60405180910390f35b3480156101e357600080fd5b506101fe60048036038101906101f9919061149f565b610ab1565b005b34801561020c57600080fd5b50610215610af5565b6040516102229190611988565b60405180910390f35b34801561023757600080fd5b50610252600480360381019061024d919061149f565b610b1b565b005b60606000610263858585610b9f565b90508473ffffffffffffffffffffffffffffffffffffffff167f373df382b9c587826f3de13f16d67f8d99f28ee947fc0924c6ef2d6d2c7e85463486866040516102af93929190611bcf565b60405180910390a2809150509392505050565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163073ffffffffffffffffffffffffffffffffffffffff161415610351576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161034890611a8f565b60405180910390fd5b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16610390610c56565b73ffffffffffffffffffffffffffffffffffffffff16146103e6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016103dd90611aaf565b60405180910390fd5b6103ef81610cad565b61044881600067ffffffffffffffff81111561040e5761040d611d90565b5b6040519080825280601f01601f1916602001820160405280156104405781602001600182028036833780820191505090505b506000610cb8565b50565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163073ffffffffffffffffffffffffffffffffffffffff1614156104da576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016104d190611a8f565b60405180910390fd5b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16610519610c56565b73ffffffffffffffffffffffffffffffffffffffff161461056f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161056690611aaf565b60405180910390fd5b61057882610cad565b61058482826001610cb8565b5050565b60608573ffffffffffffffffffffffffffffffffffffffff1663095ea7b386866040518363ffffffff1660e01b81526004016105c59291906119cc565b602060405180830381600087803b1580156105df57600080fd5b505af11580156105f3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106179190611610565b506000610625868585610b9f565b90508673ffffffffffffffffffffffffffffffffffffffff1663095ea7b38760006040518363ffffffff1660e01b81526004016106639291906119a3565b602060405180830381600087803b15801561067d57600080fd5b505af1158015610691573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106b59190611610565b5060008773ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b81526004016106f19190611988565b60206040518083038186803b15801561070957600080fd5b505afa15801561071d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610741919061166a565b905060008111156107fd578773ffffffffffffffffffffffffffffffffffffffff1663a9059cbb60c960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16836040518363ffffffff1660e01b81526004016107a99291906119cc565b602060405180830381600087803b1580156107c357600080fd5b505af11580156107d7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107fb9190611610565b505b8673ffffffffffffffffffffffffffffffffffffffff168873ffffffffffffffffffffffffffffffffffffffff167f887e0acc3616142401641abfc50d7d7ae169b6ce55d8dc06ff5e21501ddb341b88888860405161085e93929190611bcf565b60405180910390a3819250505095945050505050565b60007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163073ffffffffffffffffffffffffffffffffffffffff1614610904576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016108fb90611acf565b60405180910390fd5b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc60001b905090565b610935610e35565b61093f6000610eb3565b565b60008060019054906101000a900460ff161590508080156109725750600160008054906101000a900460ff1660ff16105b8061099f575061098130610f79565b15801561099e5750600160008054906101000a900460ff1660ff16145b5b6109de576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109d590611b0f565b60405180910390fd5b60016000806101000a81548160ff021916908360ff1602179055508015610a1b576001600060016101000a81548160ff0219169083151502179055505b610a23610f9c565b610a2b610ff5565b8015610a845760008060016101000a81548160ff0219169083151502179055507f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024986001604051610a7b9190611a32565b60405180910390a15b50565b6000603360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b8060c960006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b60c960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b610b23610e35565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415610b93576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b8a90611a6f565b60405180910390fd5b610b9c81610eb3565b50565b60606000808573ffffffffffffffffffffffffffffffffffffffff16348686604051610bcc929190611958565b60006040518083038185875af1925050503d8060008114610c09576040519150601f19603f3d011682016040523d82523d6000602084013e610c0e565b606091505b509150915081610c4a576040517facfdb44400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80925050509392505050565b6000610c847f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc60001b611046565b60000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b610cb5610e35565b50565b610ce47f4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd914360001b611050565b60000160009054906101000a900460ff1615610d0857610d038361105a565b610e30565b8273ffffffffffffffffffffffffffffffffffffffff166352d1902d6040518163ffffffff1660e01b815260040160206040518083038186803b158015610d4e57600080fd5b505afa925050508015610d7f57506040513d601f19601f82011682018060405250810190610d7c919061163d565b60015b610dbe576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610db590611b2f565b60405180910390fd5b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc60001b8114610e23576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e1a90611aef565b60405180910390fd5b50610e2f838383611113565b5b505050565b610e3d61113f565b73ffffffffffffffffffffffffffffffffffffffff16610e5b610a87565b73ffffffffffffffffffffffffffffffffffffffff1614610eb1576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ea890611b6f565b60405180910390fd5b565b6000603360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905081603360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b6000808273ffffffffffffffffffffffffffffffffffffffff163b119050919050565b600060019054906101000a900460ff16610feb576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610fe290611baf565b60405180910390fd5b610ff3611147565b565b600060019054906101000a900460ff16611044576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161103b90611baf565b60405180910390fd5b565b6000819050919050565b6000819050919050565b61106381610f79565b6110a2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161109990611b4f565b60405180910390fd5b806110cf7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc60001b611046565b60000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b61111c836111a8565b6000825111806111295750805b1561113a5761113883836111f7565b505b505050565b600033905090565b600060019054906101000a900460ff16611196576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161118d90611baf565b60405180910390fd5b6111a66111a161113f565b610eb3565b565b6111b18161105a565b8073ffffffffffffffffffffffffffffffffffffffff167fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b60405160405180910390a250565b606061121c838360405180606001604052806027815260200161216460279139611224565b905092915050565b60606000808573ffffffffffffffffffffffffffffffffffffffff168560405161124e9190611971565b600060405180830381855af49150503d8060008114611289576040519150601f19603f3d011682016040523d82523d6000602084013e61128e565b606091505b509150915061129f868383876112aa565b925050509392505050565b6060831561130d57600083511415611305576112c585610f79565b611304576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016112fb90611b8f565b60405180910390fd5b5b829050611318565b6113178383611320565b5b949350505050565b6000825111156113335781518083602001fd5b806040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016113679190611a4d565b60405180910390fd5b600061138361137e84611c26565b611c01565b90508281526020810184848401111561139f5761139e611dce565b5b6113aa848285611d1d565b509392505050565b6000813590506113c181612107565b92915050565b6000815190506113d68161211e565b92915050565b6000815190506113eb81612135565b92915050565b60008083601f84011261140757611406611dc4565b5b8235905067ffffffffffffffff81111561142457611423611dbf565b5b6020830191508360018202830111156114405761143f611dc9565b5b9250929050565b600082601f83011261145c5761145b611dc4565b5b813561146c848260208601611370565b91505092915050565b6000813590506114848161214c565b92915050565b6000815190506114998161214c565b92915050565b6000602082840312156114b5576114b4611dd8565b5b60006114c3848285016113b2565b91505092915050565b6000806000806000608086880312156114e8576114e7611dd8565b5b60006114f6888289016113b2565b9550506020611507888289016113b2565b945050604061151888828901611475565b935050606086013567ffffffffffffffff81111561153957611538611dd3565b5b611545888289016113f1565b92509250509295509295909350565b60008060006040848603121561156d5761156c611dd8565b5b600061157b868287016113b2565b935050602084013567ffffffffffffffff81111561159c5761159b611dd3565b5b6115a8868287016113f1565b92509250509250925092565b600080604083850312156115cb576115ca611dd8565b5b60006115d9858286016113b2565b925050602083013567ffffffffffffffff8111156115fa576115f9611dd3565b5b61160685828601611447565b9150509250929050565b60006020828403121561162657611625611dd8565b5b6000611634848285016113c7565b91505092915050565b60006020828403121561165357611652611dd8565b5b6000611661848285016113dc565b91505092915050565b6000602082840312156116805761167f611dd8565b5b600061168e8482850161148a565b91505092915050565b6116a081611c9a565b82525050565b6116af81611cb8565b82525050565b60006116c18385611c6d565b93506116ce838584611d1d565b6116d783611ddd565b840190509392505050565b60006116ee8385611c7e565b93506116fb838584611d1d565b82840190509392505050565b600061171282611c57565b61171c8185611c6d565b935061172c818560208601611d2c565b61173581611ddd565b840191505092915050565b600061174b82611c57565b6117558185611c7e565b9350611765818560208601611d2c565b80840191505092915050565b61177a81611cf9565b82525050565b61178981611d0b565b82525050565b600061179a82611c62565b6117a48185611c89565b93506117b4818560208601611d2c565b6117bd81611ddd565b840191505092915050565b60006117d5602683611c89565b91506117e082611dee565b604082019050919050565b60006117f8602c83611c89565b915061180382611e3d565b604082019050919050565b600061181b602c83611c89565b915061182682611e8c565b604082019050919050565b600061183e603883611c89565b915061184982611edb565b604082019050919050565b6000611861602983611c89565b915061186c82611f2a565b604082019050919050565b6000611884602e83611c89565b915061188f82611f79565b604082019050919050565b60006118a7602e83611c89565b91506118b282611fc8565b604082019050919050565b60006118ca602d83611c89565b91506118d582612017565b604082019050919050565b60006118ed602083611c89565b91506118f882612066565b602082019050919050565b6000611910601d83611c89565b915061191b8261208f565b602082019050919050565b6000611933602b83611c89565b915061193e826120b8565b604082019050919050565b61195281611ce2565b82525050565b60006119658284866116e2565b91508190509392505050565b600061197d8284611740565b915081905092915050565b600060208201905061199d6000830184611697565b92915050565b60006040820190506119b86000830185611697565b6119c56020830184611771565b9392505050565b60006040820190506119e16000830185611697565b6119ee6020830184611949565b9392505050565b6000602082019050611a0a60008301846116a6565b92915050565b60006020820190508181036000830152611a2a8184611707565b905092915050565b6000602082019050611a476000830184611780565b92915050565b60006020820190508181036000830152611a67818461178f565b905092915050565b60006020820190508181036000830152611a88816117c8565b9050919050565b60006020820190508181036000830152611aa8816117eb565b9050919050565b60006020820190508181036000830152611ac88161180e565b9050919050565b60006020820190508181036000830152611ae881611831565b9050919050565b60006020820190508181036000830152611b0881611854565b9050919050565b60006020820190508181036000830152611b2881611877565b9050919050565b60006020820190508181036000830152611b488161189a565b9050919050565b60006020820190508181036000830152611b68816118bd565b9050919050565b60006020820190508181036000830152611b88816118e0565b9050919050565b60006020820190508181036000830152611ba881611903565b9050919050565b60006020820190508181036000830152611bc881611926565b9050919050565b6000604082019050611be46000830186611949565b8181036020830152611bf78184866116b5565b9050949350505050565b6000611c0b611c1c565b9050611c178282611d5f565b919050565b6000604051905090565b600067ffffffffffffffff821115611c4157611c40611d90565b5b611c4a82611ddd565b9050602081019050919050565b600081519050919050565b600081519050919050565b600082825260208201905092915050565b600081905092915050565b600082825260208201905092915050565b6000611ca582611cc2565b9050919050565b60008115159050919050565b6000819050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b6000611d0482611ce2565b9050919050565b6000611d1682611cec565b9050919050565b82818337600083830152505050565b60005b83811015611d4a578082015181840152602081019050611d2f565b83811115611d59576000848401525b50505050565b611d6882611ddd565b810181811067ffffffffffffffff82111715611d8757611d86611d90565b5b80604052505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b7f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060008201527f64656c656761746563616c6c0000000000000000000000000000000000000000602082015250565b7f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060008201527f6163746976652070726f78790000000000000000000000000000000000000000602082015250565b7f555550535570677261646561626c653a206d757374206e6f742062652063616c60008201527f6c6564207468726f7567682064656c656761746563616c6c0000000000000000602082015250565b7f45524331393637557067726164653a20756e737570706f727465642070726f7860008201527f6961626c65555549440000000000000000000000000000000000000000000000602082015250565b7f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160008201527f647920696e697469616c697a6564000000000000000000000000000000000000602082015250565b7f45524331393637557067726164653a206e657720696d706c656d656e7461746960008201527f6f6e206973206e6f742055555053000000000000000000000000000000000000602082015250565b7f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60008201527f6f74206120636f6e747261637400000000000000000000000000000000000000602082015250565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b7f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000600082015250565b7f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960008201527f6e697469616c697a696e67000000000000000000000000000000000000000000602082015250565b61211081611c9a565b811461211b57600080fd5b50565b61212781611cac565b811461213257600080fd5b50565b61213e81611cb8565b811461214957600080fd5b50565b61215581611ce2565b811461216057600080fd5b5056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a2646970667358221220a349306a7d1588b676f5b6e95783cf1d798266d946f8cdd77432870e89cdcd4f64736f6c63430008070033"; + +type GatewayV2ConstructorParams = + | [signer?: Signer] + | ConstructorParameters; + +const isSuperArgs = ( + xs: GatewayV2ConstructorParams +): xs is ConstructorParameters => xs.length > 1; + +export class GatewayV2__factory extends ContractFactory { + constructor(...args: GatewayV2ConstructorParams) { + 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): GatewayV2 { + return super.attach(address) as GatewayV2; + } + override connect(signer: Signer): GatewayV2__factory { + return super.connect(signer) as GatewayV2__factory; + } + + static readonly bytecode = _bytecode; + static readonly abi = _abi; + static createInterface(): GatewayV2Interface { + return new utils.Interface(_abi) as GatewayV2Interface; + } + static connect( + address: string, + signerOrProvider: Signer | Provider + ): GatewayV2 { + return new Contract(address, _abi, signerOrProvider) as GatewayV2; + } +} diff --git a/typechain-types/factories/contracts/prototypes/Gateway__factory.ts b/typechain-types/factories/contracts/prototypes/Gateway__factory.ts new file mode 100644 index 00000000..ff914666 --- /dev/null +++ b/typechain-types/factories/contracts/prototypes/Gateway__factory.ts @@ -0,0 +1,560 @@ +/* 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 { + Gateway, + GatewayInterface, +} from "../../../contracts/prototypes/Gateway"; + +const _abi = [ + { + inputs: [], + stateMutability: "nonpayable", + type: "constructor", + }, + { + inputs: [], + name: "ExecutionFailed", + type: "error", + }, + { + inputs: [], + name: "InsufficientETHAmount", + type: "error", + }, + { + inputs: [], + name: "SendFailed", + 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: 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: "destination", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "value", + type: "uint256", + }, + { + indexed: false, + internalType: "bytes", + name: "data", + type: "bytes", + }, + ], + name: "Executed", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "token", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "to", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "amount", + type: "uint256", + }, + { + indexed: false, + internalType: "bytes", + name: "data", + type: "bytes", + }, + ], + name: "ExecutedWithERC20", + 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: false, + internalType: "bytes", + name: "recipient", + type: "bytes", + }, + { + indexed: false, + internalType: "uint256", + name: "amount", + type: "uint256", + }, + ], + name: "Send", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "bytes", + name: "recipient", + type: "bytes", + }, + { + indexed: true, + internalType: "address", + name: "asset", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "amount", + type: "uint256", + }, + ], + name: "SendERC20", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "implementation", + type: "address", + }, + ], + name: "Upgraded", + type: "event", + }, + { + inputs: [], + name: "custody", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "destination", + type: "address", + }, + { + internalType: "bytes", + name: "data", + type: "bytes", + }, + ], + name: "execute", + outputs: [ + { + internalType: "bytes", + name: "", + type: "bytes", + }, + ], + stateMutability: "payable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "token", + type: "address", + }, + { + internalType: "address", + name: "to", + type: "address", + }, + { + internalType: "uint256", + name: "amount", + type: "uint256", + }, + { + internalType: "bytes", + name: "data", + type: "bytes", + }, + ], + name: "executeWithERC20", + outputs: [ + { + internalType: "bytes", + name: "", + type: "bytes", + }, + ], + 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: "_tssAddress", + type: "address", + }, + ], + 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: "bytes", + name: "recipient", + type: "bytes", + }, + { + internalType: "uint256", + name: "amount", + type: "uint256", + }, + ], + name: "send", + outputs: [], + stateMutability: "payable", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes", + name: "recipient", + type: "bytes", + }, + { + internalType: "address", + name: "token", + type: "address", + }, + { + internalType: "uint256", + name: "amount", + type: "uint256", + }, + ], + name: "sendERC20", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_custody", + type: "address", + }, + ], + name: "setCustody", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "newOwner", + type: "address", + }, + ], + name: "transferOwnership", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "tssAddress", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + 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", + }, +] as const; + +const _bytecode = + "0x60a06040523073ffffffffffffffffffffffffffffffffffffffff1660809073ffffffffffffffffffffffffffffffffffffffff1660601b8152503480156200004757600080fd5b50620000586200005e60201b60201c565b62000208565b600060019054906101000a900460ff1615620000b1576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401620000a8906200015c565b60405180910390fd5b60ff801660008054906101000a900460ff1660ff1614620001225760ff6000806101000a81548160ff021916908360ff1602179055507f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb384740249860ff6040516200011991906200017e565b60405180910390a15b565b6000620001336027836200019b565b91506200014082620001b9565b604082019050919050565b6200015681620001ac565b82525050565b60006020820190508181036000830152620001778162000124565b9050919050565b60006020820190506200019560008301846200014b565b92915050565b600082825260208201905092915050565b600060ff82169050919050565b7f496e697469616c697a61626c653a20636f6e747261637420697320696e69746960008201527f616c697a696e6700000000000000000000000000000000000000000000000000602082015250565b60805160601c6126b5620002436000396000818161038701528181610416015281816105100152818161059f015261093b01526126b56000f3fe6080604052600436106100dd5760003560e01c80638da5cb5b1161007f578063c4d66de811610059578063c4d66de814610271578063cb0271ed1461029a578063dda79b75146102c3578063f2fde38b146102ee576100dd565b80638da5cb5b146102015780639372c4ab1461022c578063ae7a3a6f14610248576100dd565b80635131ab59116100bb5780635131ab591461015757806352d1902d146101945780635b112591146101bf578063715018a6146101ea576100dd565b80631cff79cd146100e25780633659cfe6146101125780634f1ef2861461013b575b600080fd5b6100fc60048036038101906100f791906118d1565b610317565b6040516101099190611f02565b60405180910390f35b34801561011e57600080fd5b506101396004803603810190610134919061181c565b610385565b005b61015560048036038101906101509190611931565b61050e565b005b34801561016357600080fd5b5061017e60048036038101906101799190611849565b61064b565b60405161018b9190611f02565b60405180910390f35b3480156101a057600080fd5b506101a9610937565b6040516101b69190611eb5565b60405180910390f35b3480156101cb57600080fd5b506101d46109f0565b6040516101e19190611e11565b60405180910390f35b3480156101f657600080fd5b506101ff610a16565b005b34801561020d57600080fd5b50610216610a2a565b6040516102239190611e11565b60405180910390f35b61024660048036038101906102419190611a5b565b610a54565b005b34801561025457600080fd5b5061026f600480360381019061026a919061181c565b610b9c565b005b34801561027d57600080fd5b506102986004803603810190610293919061181c565b610be0565b005b3480156102a657600080fd5b506102c160048036038101906102bc91906119e7565b610d68565b005b3480156102cf57600080fd5b506102d8610e72565b6040516102e59190611e11565b60405180910390f35b3480156102fa57600080fd5b506103156004803603810190610310919061181c565b610e98565b005b60606000610326858585610f1c565b90508473ffffffffffffffffffffffffffffffffffffffff167fcaf938de11c367272220bfd1d2baa99ca46665e7bc4d85f00adb51b90fe1fa9f348686604051610372939291906120c1565b60405180910390a2809150509392505050565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163073ffffffffffffffffffffffffffffffffffffffff161415610414576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161040b90611f81565b60405180910390fd5b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16610453610fd3565b73ffffffffffffffffffffffffffffffffffffffff16146104a9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016104a090611fa1565b60405180910390fd5b6104b28161102a565b61050b81600067ffffffffffffffff8111156104d1576104d0612282565b5b6040519080825280601f01601f1916602001820160405280156105035781602001600182028036833780820191505090505b506000611035565b50565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163073ffffffffffffffffffffffffffffffffffffffff16141561059d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161059490611f81565b60405180910390fd5b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166105dc610fd3565b73ffffffffffffffffffffffffffffffffffffffff1614610632576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062990611fa1565b60405180910390fd5b61063b8261102a565b61064782826001611035565b5050565b60608573ffffffffffffffffffffffffffffffffffffffff1663095ea7b386866040518363ffffffff1660e01b8152600401610688929190611e8c565b602060405180830381600087803b1580156106a257600080fd5b505af11580156106b6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106da919061198d565b5060006106e8868585610f1c565b90508673ffffffffffffffffffffffffffffffffffffffff1663095ea7b38760006040518363ffffffff1660e01b8152600401610726929190611e63565b602060405180830381600087803b15801561074057600080fd5b505af1158015610754573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610778919061198d565b5060008773ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b81526004016107b49190611e11565b60206040518083038186803b1580156107cc57600080fd5b505afa1580156107e0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108049190611abb565b905060008111156108c0578773ffffffffffffffffffffffffffffffffffffffff1663a9059cbb60c960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16836040518363ffffffff1660e01b815260040161086c929190611e8c565b602060405180830381600087803b15801561088657600080fd5b505af115801561089a573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108be919061198d565b505b8673ffffffffffffffffffffffffffffffffffffffff168873ffffffffffffffffffffffffffffffffffffffff167f29c40793bffd84cb810179f15d1ceec72bc7f0785514c668ba36645cf99b7382888888604051610921939291906120c1565b60405180910390a3819250505095945050505050565b60007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163073ffffffffffffffffffffffffffffffffffffffff16146109c7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109be90611fc1565b60405180910390fd5b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc60001b905090565b60ca60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b610a1e6111b2565b610a286000611230565b565b6000603360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b80341015610a8e576040517f7671265e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600060ca60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1682604051610ad690611dfc565b60006040518083038185875af1925050503d8060008114610b13576040519150601f19603f3d011682016040523d82523d6000602084013e610b18565b606091505b50509050600015158115151415610b5b576040517f81063e5100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b7fa93afc57f3be4641cf20c7165d11856f3b46dd376108e5fffb06f73f2b2a6d58848484604051610b8e93929190611ed0565b60405180910390a150505050565b8060c960006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b60008060019054906101000a900460ff16159050808015610c115750600160008054906101000a900460ff1660ff16105b80610c3e5750610c20306112f6565b158015610c3d5750600160008054906101000a900460ff1660ff16145b5b610c7d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c7490612001565b60405180910390fd5b60016000806101000a81548160ff021916908360ff1602179055508015610cba576001600060016101000a81548160ff0219169083151502179055505b610cc2611319565b610cca611372565b8160ca60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508015610d645760008060016101000a81548160ff0219169083151502179055507f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024986001604051610d5b9190611f24565b60405180910390a15b5050565b8173ffffffffffffffffffffffffffffffffffffffff166323b872dd3360c960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16846040518463ffffffff1660e01b8152600401610dc793929190611e2c565b602060405180830381600087803b158015610de157600080fd5b505af1158015610df5573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e19919061198d565b508173ffffffffffffffffffffffffffffffffffffffff167f35fb30ed1b8e81eb91001dad742b13b1491a67c722e8c593a886a18500f7d9af858584604051610e6493929190611ed0565b60405180910390a250505050565b60c960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b610ea06111b2565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415610f10576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f0790611f61565b60405180910390fd5b610f1981611230565b50565b60606000808573ffffffffffffffffffffffffffffffffffffffff16348686604051610f49929190611dcc565b60006040518083038185875af1925050503d8060008114610f86576040519150601f19603f3d011682016040523d82523d6000602084013e610f8b565b606091505b509150915081610fc7576040517facfdb44400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80925050509392505050565b60006110017f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc60001b6113c3565b60000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6110326111b2565b50565b6110617f4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd914360001b6113cd565b60000160009054906101000a900460ff161561108557611080836113d7565b6111ad565b8273ffffffffffffffffffffffffffffffffffffffff166352d1902d6040518163ffffffff1660e01b815260040160206040518083038186803b1580156110cb57600080fd5b505afa9250505080156110fc57506040513d601f19601f820116820180604052508101906110f991906119ba565b60015b61113b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161113290612021565b60405180910390fd5b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc60001b81146111a0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161119790611fe1565b60405180910390fd5b506111ac838383611490565b5b505050565b6111ba6114bc565b73ffffffffffffffffffffffffffffffffffffffff166111d8610a2a565b73ffffffffffffffffffffffffffffffffffffffff161461122e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161122590612061565b60405180910390fd5b565b6000603360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905081603360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b6000808273ffffffffffffffffffffffffffffffffffffffff163b119050919050565b600060019054906101000a900460ff16611368576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161135f906120a1565b60405180910390fd5b6113706114c4565b565b600060019054906101000a900460ff166113c1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016113b8906120a1565b60405180910390fd5b565b6000819050919050565b6000819050919050565b6113e0816112f6565b61141f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161141690612041565b60405180910390fd5b8061144c7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc60001b6113c3565b60000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b61149983611525565b6000825111806114a65750805b156114b7576114b58383611574565b505b505050565b600033905090565b600060019054906101000a900460ff16611513576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161150a906120a1565b60405180910390fd5b61152361151e6114bc565b611230565b565b61152e816113d7565b8073ffffffffffffffffffffffffffffffffffffffff167fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b60405160405180910390a250565b60606115998383604051806060016040528060278152602001612659602791396115a1565b905092915050565b60606000808573ffffffffffffffffffffffffffffffffffffffff16856040516115cb9190611de5565b600060405180830381855af49150503d8060008114611606576040519150601f19603f3d011682016040523d82523d6000602084013e61160b565b606091505b509150915061161c86838387611627565b925050509392505050565b6060831561168a5760008351141561168257611642856112f6565b611681576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161167890612081565b60405180910390fd5b5b829050611695565b611694838361169d565b5b949350505050565b6000825111156116b05781518083602001fd5b806040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016116e49190611f3f565b60405180910390fd5b60006117006116fb84612118565b6120f3565b90508281526020810184848401111561171c5761171b6122c0565b5b61172784828561220f565b509392505050565b60008135905061173e816125fc565b92915050565b60008151905061175381612613565b92915050565b6000815190506117688161262a565b92915050565b60008083601f840112611784576117836122b6565b5b8235905067ffffffffffffffff8111156117a1576117a06122b1565b5b6020830191508360018202830111156117bd576117bc6122bb565b5b9250929050565b600082601f8301126117d9576117d86122b6565b5b81356117e98482602086016116ed565b91505092915050565b60008135905061180181612641565b92915050565b60008151905061181681612641565b92915050565b600060208284031215611832576118316122ca565b5b60006118408482850161172f565b91505092915050565b600080600080600060808688031215611865576118646122ca565b5b60006118738882890161172f565b95505060206118848882890161172f565b9450506040611895888289016117f2565b935050606086013567ffffffffffffffff8111156118b6576118b56122c5565b5b6118c28882890161176e565b92509250509295509295909350565b6000806000604084860312156118ea576118e96122ca565b5b60006118f88682870161172f565b935050602084013567ffffffffffffffff811115611919576119186122c5565b5b6119258682870161176e565b92509250509250925092565b60008060408385031215611948576119476122ca565b5b60006119568582860161172f565b925050602083013567ffffffffffffffff811115611977576119766122c5565b5b611983858286016117c4565b9150509250929050565b6000602082840312156119a3576119a26122ca565b5b60006119b184828501611744565b91505092915050565b6000602082840312156119d0576119cf6122ca565b5b60006119de84828501611759565b91505092915050565b60008060008060608587031215611a0157611a006122ca565b5b600085013567ffffffffffffffff811115611a1f57611a1e6122c5565b5b611a2b8782880161176e565b94509450506020611a3e8782880161172f565b9250506040611a4f878288016117f2565b91505092959194509250565b600080600060408486031215611a7457611a736122ca565b5b600084013567ffffffffffffffff811115611a9257611a916122c5565b5b611a9e8682870161176e565b93509350506020611ab1868287016117f2565b9150509250925092565b600060208284031215611ad157611ad06122ca565b5b6000611adf84828501611807565b91505092915050565b611af18161218c565b82525050565b611b00816121aa565b82525050565b6000611b12838561215f565b9350611b1f83858461220f565b611b28836122cf565b840190509392505050565b6000611b3f8385612170565b9350611b4c83858461220f565b82840190509392505050565b6000611b6382612149565b611b6d818561215f565b9350611b7d81856020860161221e565b611b86816122cf565b840191505092915050565b6000611b9c82612149565b611ba68185612170565b9350611bb681856020860161221e565b80840191505092915050565b611bcb816121eb565b82525050565b611bda816121fd565b82525050565b6000611beb82612154565b611bf5818561217b565b9350611c0581856020860161221e565b611c0e816122cf565b840191505092915050565b6000611c2660268361217b565b9150611c31826122e0565b604082019050919050565b6000611c49602c8361217b565b9150611c548261232f565b604082019050919050565b6000611c6c602c8361217b565b9150611c778261237e565b604082019050919050565b6000611c8f60388361217b565b9150611c9a826123cd565b604082019050919050565b6000611cb260298361217b565b9150611cbd8261241c565b604082019050919050565b6000611cd5602e8361217b565b9150611ce08261246b565b604082019050919050565b6000611cf8602e8361217b565b9150611d03826124ba565b604082019050919050565b6000611d1b602d8361217b565b9150611d2682612509565b604082019050919050565b6000611d3e60208361217b565b9150611d4982612558565b602082019050919050565b6000611d61600083612170565b9150611d6c82612581565b600082019050919050565b6000611d84601d8361217b565b9150611d8f82612584565b602082019050919050565b6000611da7602b8361217b565b9150611db2826125ad565b604082019050919050565b611dc6816121d4565b82525050565b6000611dd9828486611b33565b91508190509392505050565b6000611df18284611b91565b915081905092915050565b6000611e0782611d54565b9150819050919050565b6000602082019050611e266000830184611ae8565b92915050565b6000606082019050611e416000830186611ae8565b611e4e6020830185611ae8565b611e5b6040830184611dbd565b949350505050565b6000604082019050611e786000830185611ae8565b611e856020830184611bc2565b9392505050565b6000604082019050611ea16000830185611ae8565b611eae6020830184611dbd565b9392505050565b6000602082019050611eca6000830184611af7565b92915050565b60006040820190508181036000830152611eeb818587611b06565b9050611efa6020830184611dbd565b949350505050565b60006020820190508181036000830152611f1c8184611b58565b905092915050565b6000602082019050611f396000830184611bd1565b92915050565b60006020820190508181036000830152611f598184611be0565b905092915050565b60006020820190508181036000830152611f7a81611c19565b9050919050565b60006020820190508181036000830152611f9a81611c3c565b9050919050565b60006020820190508181036000830152611fba81611c5f565b9050919050565b60006020820190508181036000830152611fda81611c82565b9050919050565b60006020820190508181036000830152611ffa81611ca5565b9050919050565b6000602082019050818103600083015261201a81611cc8565b9050919050565b6000602082019050818103600083015261203a81611ceb565b9050919050565b6000602082019050818103600083015261205a81611d0e565b9050919050565b6000602082019050818103600083015261207a81611d31565b9050919050565b6000602082019050818103600083015261209a81611d77565b9050919050565b600060208201905081810360008301526120ba81611d9a565b9050919050565b60006040820190506120d66000830186611dbd565b81810360208301526120e9818486611b06565b9050949350505050565b60006120fd61210e565b90506121098282612251565b919050565b6000604051905090565b600067ffffffffffffffff82111561213357612132612282565b5b61213c826122cf565b9050602081019050919050565b600081519050919050565b600081519050919050565b600082825260208201905092915050565b600081905092915050565b600082825260208201905092915050565b6000612197826121b4565b9050919050565b60008115159050919050565b6000819050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b60006121f6826121d4565b9050919050565b6000612208826121de565b9050919050565b82818337600083830152505050565b60005b8381101561223c578082015181840152602081019050612221565b8381111561224b576000848401525b50505050565b61225a826122cf565b810181811067ffffffffffffffff8211171561227957612278612282565b5b80604052505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b7f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060008201527f64656c656761746563616c6c0000000000000000000000000000000000000000602082015250565b7f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060008201527f6163746976652070726f78790000000000000000000000000000000000000000602082015250565b7f555550535570677261646561626c653a206d757374206e6f742062652063616c60008201527f6c6564207468726f7567682064656c656761746563616c6c0000000000000000602082015250565b7f45524331393637557067726164653a20756e737570706f727465642070726f7860008201527f6961626c65555549440000000000000000000000000000000000000000000000602082015250565b7f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160008201527f647920696e697469616c697a6564000000000000000000000000000000000000602082015250565b7f45524331393637557067726164653a206e657720696d706c656d656e7461746960008201527f6f6e206973206e6f742055555053000000000000000000000000000000000000602082015250565b7f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60008201527f6f74206120636f6e747261637400000000000000000000000000000000000000602082015250565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b50565b7f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000600082015250565b7f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960008201527f6e697469616c697a696e67000000000000000000000000000000000000000000602082015250565b6126058161218c565b811461261057600080fd5b50565b61261c8161219e565b811461262757600080fd5b50565b612633816121aa565b811461263e57600080fd5b50565b61264a816121d4565b811461265557600080fd5b5056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a26469706673582212201e7cbd929e55cc43e5cdc66ed6524d47d8a9264ddfb58047ebf2e1dd71bfa92e64736f6c63430008070033"; + +type GatewayConstructorParams = + | [signer?: Signer] + | ConstructorParameters; + +const isSuperArgs = ( + xs: GatewayConstructorParams +): xs is ConstructorParameters => xs.length > 1; + +export class Gateway__factory extends ContractFactory { + constructor(...args: GatewayConstructorParams) { + 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): Gateway { + return super.attach(address) as Gateway; + } + override connect(signer: Signer): Gateway__factory { + return super.connect(signer) as Gateway__factory; + } + + static readonly bytecode = _bytecode; + static readonly abi = _abi; + static createInterface(): GatewayInterface { + return new utils.Interface(_abi) as GatewayInterface; + } + static connect( + address: string, + signerOrProvider: Signer | Provider + ): Gateway { + return new Contract(address, _abi, signerOrProvider) as Gateway; + } +} diff --git a/typechain-types/factories/contracts/prototypes/Receiver__factory.ts b/typechain-types/factories/contracts/prototypes/Receiver__factory.ts new file mode 100644 index 00000000..bd3f76e9 --- /dev/null +++ b/typechain-types/factories/contracts/prototypes/Receiver__factory.ts @@ -0,0 +1,251 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import { Signer, utils, Contract, ContractFactory, Overrides } from "ethers"; +import type { Provider, TransactionRequest } from "@ethersproject/providers"; +import type { PromiseOrValue } from "../../../common"; +import type { + Receiver, + ReceiverInterface, +} from "../../../contracts/prototypes/Receiver"; + +const _abi = [ + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "sender", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "value", + type: "uint256", + }, + { + indexed: false, + internalType: "string", + name: "str", + type: "string", + }, + { + indexed: false, + internalType: "uint256", + name: "num", + type: "uint256", + }, + { + indexed: false, + internalType: "bool", + name: "flag", + type: "bool", + }, + ], + name: "ReceivedA", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "sender", + type: "address", + }, + { + indexed: false, + internalType: "string[]", + name: "strs", + type: "string[]", + }, + { + indexed: false, + internalType: "uint256[]", + name: "nums", + type: "uint256[]", + }, + { + indexed: false, + internalType: "bool", + name: "flag", + type: "bool", + }, + ], + name: "ReceivedB", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "sender", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "amount", + type: "uint256", + }, + { + indexed: false, + internalType: "address", + name: "token", + type: "address", + }, + { + indexed: false, + internalType: "address", + name: "destination", + type: "address", + }, + ], + name: "ReceivedC", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "sender", + type: "address", + }, + ], + name: "ReceivedD", + type: "event", + }, + { + inputs: [ + { + internalType: "string", + name: "str", + type: "string", + }, + { + internalType: "uint256", + name: "num", + type: "uint256", + }, + { + internalType: "bool", + name: "flag", + type: "bool", + }, + ], + name: "receiveA", + outputs: [], + stateMutability: "payable", + type: "function", + }, + { + inputs: [ + { + internalType: "string[]", + name: "strs", + type: "string[]", + }, + { + internalType: "uint256[]", + name: "nums", + type: "uint256[]", + }, + { + internalType: "bool", + name: "flag", + type: "bool", + }, + ], + name: "receiveB", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "amount", + type: "uint256", + }, + { + internalType: "address", + name: "token", + type: "address", + }, + { + internalType: "address", + name: "destination", + type: "address", + }, + ], + name: "receiveC", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "receiveD", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, +] as const; + +const _bytecode = + "0x608060405234801561001057600080fd5b50610bbf806100206000396000f3fe60806040526004361061003f5760003560e01c806352df08b6146100445780636fa220ad1461006d57806386c4519214610089578063f5db6b39146100a0575b600080fd5b34801561005057600080fd5b5061006b6004803603810190610066919061059f565b6100c9565b005b61008760048036038101906100829190610530565b61019b565b005b34801561009557600080fd5b5061009e6101df565b005b3480156100ac57600080fd5b506100c760048036038101906100c29190610478565b610218565b005b8173ffffffffffffffffffffffffffffffffffffffff166323b872dd3383866040518463ffffffff1660e01b8152600401610106939291906107ba565b602060405180830381600087803b15801561012057600080fd5b505af1158015610134573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101589190610503565b507fe8077791e8d0f63b9e4c0b6d386cbbf6c65e1acb2a103019edba9d1cc0b329003384848460405161018e9493929190610844565b60405180910390a1505050565b7f87d67858b5cc03bdd16a3fcc56773bd59410e946cff7193cf374402c6e8fb6ee33348585856040516101d2959493929190610889565b60405180910390a1505050565b7fcf0e6f18d967cb5a3ca7781d74b1d66411d1b8984e2dd2a066709c204a66d8623360405161020e919061079f565b60405180910390a1565b7f463b3e5d6969d17b19e10c4ca95f5f1b6fdef8678f980af98071bd38f0d885c23384848460405161024d94939291906107f1565b60405180910390a1505050565b600061026d61026884610908565b6108e3565b905080838252602082019050828560208602820111156102905761028f610b1f565b5b60005b858110156102de57813567ffffffffffffffff8111156102b6576102b5610b1a565b5b8086016102c38982610435565b85526020850194506020840193505050600181019050610293565b5050509392505050565b60006102fb6102f684610934565b6108e3565b9050808382526020820190508285602086028201111561031e5761031d610b1f565b5b60005b8581101561034e57816103348882610463565b845260208401935060208301925050600181019050610321565b5050509392505050565b600061036b61036684610960565b6108e3565b90508281526020810184848401111561038757610386610b24565b5b610392848285610a78565b509392505050565b6000813590506103a981610b44565b92915050565b600082601f8301126103c4576103c3610b1a565b5b81356103d484826020860161025a565b91505092915050565b600082601f8301126103f2576103f1610b1a565b5b81356104028482602086016102e8565b91505092915050565b60008135905061041a81610b5b565b92915050565b60008151905061042f81610b5b565b92915050565b600082601f83011261044a57610449610b1a565b5b813561045a848260208601610358565b91505092915050565b60008135905061047281610b72565b92915050565b60008060006060848603121561049157610490610b2e565b5b600084013567ffffffffffffffff8111156104af576104ae610b29565b5b6104bb868287016103af565b935050602084013567ffffffffffffffff8111156104dc576104db610b29565b5b6104e8868287016103dd565b92505060406104f98682870161040b565b9150509250925092565b60006020828403121561051957610518610b2e565b5b600061052784828501610420565b91505092915050565b60008060006060848603121561054957610548610b2e565b5b600084013567ffffffffffffffff81111561056757610566610b29565b5b61057386828701610435565b935050602061058486828701610463565b92505060406105958682870161040b565b9150509250925092565b6000806000606084860312156105b8576105b7610b2e565b5b60006105c686828701610463565b93505060206105d78682870161039a565b92505060406105e88682870161039a565b9150509250925092565b60006105fe838361070f565b905092915050565b60006106128383610781565b60208301905092915050565b61062781610a30565b82525050565b6000610638826109b1565b61064281856109ec565b93508360208202850161065485610991565b8060005b85811015610690578484038952815161067185826105f2565b945061067c836109d2565b925060208a01995050600181019050610658565b50829750879550505050505092915050565b60006106ad826109bc565b6106b781856109fd565b93506106c2836109a1565b8060005b838110156106f35781516106da8882610606565b97506106e5836109df565b9250506001810190506106c6565b5085935050505092915050565b61070981610a42565b82525050565b600061071a826109c7565b6107248185610a0e565b9350610734818560208601610a87565b61073d81610b33565b840191505092915050565b6000610753826109c7565b61075d8185610a1f565b935061076d818560208601610a87565b61077681610b33565b840191505092915050565b61078a81610a6e565b82525050565b61079981610a6e565b82525050565b60006020820190506107b4600083018461061e565b92915050565b60006060820190506107cf600083018661061e565b6107dc602083018561061e565b6107e96040830184610790565b949350505050565b6000608082019050610806600083018761061e565b8181036020830152610818818661062d565b9050818103604083015261082c81856106a2565b905061083b6060830184610700565b95945050505050565b6000608082019050610859600083018761061e565b6108666020830186610790565b610873604083018561061e565b610880606083018461061e565b95945050505050565b600060a08201905061089e600083018861061e565b6108ab6020830187610790565b81810360408301526108bd8186610748565b90506108cc6060830185610790565b6108d96080830184610700565b9695505050505050565b60006108ed6108fe565b90506108f98282610aba565b919050565b6000604051905090565b600067ffffffffffffffff82111561092357610922610aeb565b5b602082029050602081019050919050565b600067ffffffffffffffff82111561094f5761094e610aeb565b5b602082029050602081019050919050565b600067ffffffffffffffff82111561097b5761097a610aeb565b5b61098482610b33565b9050602081019050919050565b6000819050602082019050919050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b600082825260208201905092915050565b600082825260208201905092915050565b6000610a3b82610a4e565b9050919050565b60008115159050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b82818337600083830152505050565b60005b83811015610aa5578082015181840152602081019050610a8a565b83811115610ab4576000848401525b50505050565b610ac382610b33565b810181811067ffffffffffffffff82111715610ae257610ae1610aeb565b5b80604052505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b610b4d81610a30565b8114610b5857600080fd5b50565b610b6481610a42565b8114610b6f57600080fd5b50565b610b7b81610a6e565b8114610b8657600080fd5b5056fea264697066735822122071e33ff7a639cea7ba0e3fa2cb4106a312f1b8080d32e972b0ef4823ad974cf264736f6c63430008070033"; + +type ReceiverConstructorParams = + | [signer?: Signer] + | ConstructorParameters; + +const isSuperArgs = ( + xs: ReceiverConstructorParams +): xs is ConstructorParameters => xs.length > 1; + +export class Receiver__factory extends ContractFactory { + constructor(...args: ReceiverConstructorParams) { + 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): Receiver { + return super.attach(address) as Receiver; + } + override connect(signer: Signer): Receiver__factory { + return super.connect(signer) as Receiver__factory; + } + + static readonly bytecode = _bytecode; + static readonly abi = _abi; + static createInterface(): ReceiverInterface { + return new utils.Interface(_abi) as ReceiverInterface; + } + static connect( + address: string, + signerOrProvider: Signer | Provider + ): Receiver { + return new Contract(address, _abi, signerOrProvider) as Receiver; + } +} diff --git a/typechain-types/factories/contracts/prototypes/TestERC20__factory.ts b/typechain-types/factories/contracts/prototypes/TestERC20__factory.ts new file mode 100644 index 00000000..f5181c5f --- /dev/null +++ b/typechain-types/factories/contracts/prototypes/TestERC20__factory.ts @@ -0,0 +1,371 @@ +/* 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 { + TestERC20, + TestERC20Interface, +} from "../../../contracts/prototypes/TestERC20"; + +const _abi = [ + { + inputs: [ + { + internalType: "string", + name: "name", + type: "string", + }, + { + internalType: "string", + name: "symbol", + type: "string", + }, + ], + stateMutability: "nonpayable", + type: "constructor", + }, + { + 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: 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", + }, + { + 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: [], + name: "decimals", + outputs: [ + { + internalType: "uint8", + name: "", + type: "uint8", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "spender", + type: "address", + }, + { + internalType: "uint256", + name: "subtractedValue", + type: "uint256", + }, + ], + name: "decreaseAllowance", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "spender", + type: "address", + }, + { + internalType: "uint256", + name: "addedValue", + type: "uint256", + }, + ], + name: "increaseAllowance", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "to", + type: "address", + }, + { + internalType: "uint256", + name: "amount", + type: "uint256", + }, + ], + name: "mint", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "name", + outputs: [ + { + internalType: "string", + name: "", + type: "string", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "symbol", + outputs: [ + { + internalType: "string", + name: "", + type: "string", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "totalSupply", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "to", + type: "address", + }, + { + internalType: "uint256", + name: "amount", + type: "uint256", + }, + ], + name: "transfer", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "from", + type: "address", + }, + { + internalType: "address", + name: "to", + type: "address", + }, + { + internalType: "uint256", + name: "amount", + type: "uint256", + }, + ], + name: "transferFrom", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, +] as const; + +const _bytecode = + "0x60806040523480156200001157600080fd5b5060405162001813380380620018138339818101604052810190620000379190620001a3565b818181600390805190602001906200005192919062000075565b5080600490805190602001906200006a92919062000075565b5050505050620003ac565b8280546200008390620002bd565b90600052602060002090601f016020900481019282620000a75760008555620000f3565b82601f10620000c257805160ff1916838001178555620000f3565b82800160010185558215620000f3579182015b82811115620000f2578251825591602001919060010190620000d5565b5b50905062000102919062000106565b5090565b5b808211156200012157600081600090555060010162000107565b5090565b60006200013c620001368462000251565b62000228565b9050828152602081018484840111156200015b576200015a6200038c565b5b6200016884828562000287565b509392505050565b600082601f83011262000188576200018762000387565b5b81516200019a84826020860162000125565b91505092915050565b60008060408385031215620001bd57620001bc62000396565b5b600083015167ffffffffffffffff811115620001de57620001dd62000391565b5b620001ec8582860162000170565b925050602083015167ffffffffffffffff81111562000210576200020f62000391565b5b6200021e8582860162000170565b9150509250929050565b60006200023462000247565b9050620002428282620002f3565b919050565b6000604051905090565b600067ffffffffffffffff8211156200026f576200026e62000358565b5b6200027a826200039b565b9050602081019050919050565b60005b83811015620002a75780820151818401526020810190506200028a565b83811115620002b7576000848401525b50505050565b60006002820490506001821680620002d657607f821691505b60208210811415620002ed57620002ec62000329565b5b50919050565b620002fe826200039b565b810181811067ffffffffffffffff8211171562000320576200031f62000358565b5b80604052505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b61145780620003bc6000396000f3fe608060405234801561001057600080fd5b50600436106100b45760003560e01c806340c10f191161007157806340c10f19146101a357806370a08231146101bf57806395d89b41146101ef578063a457c2d71461020d578063a9059cbb1461023d578063dd62ed3e1461026d576100b4565b806306fdde03146100b9578063095ea7b3146100d757806318160ddd1461010757806323b872dd14610125578063313ce567146101555780633950935114610173575b600080fd5b6100c161029d565b6040516100ce9190610ecf565b60405180910390f35b6100f160048036038101906100ec9190610cf6565b61032f565b6040516100fe9190610eb4565b60405180910390f35b61010f610352565b60405161011c9190610ff1565b60405180910390f35b61013f600480360381019061013a9190610ca3565b61035c565b60405161014c9190610eb4565b60405180910390f35b61015d61038b565b60405161016a919061100c565b60405180910390f35b61018d60048036038101906101889190610cf6565b610394565b60405161019a9190610eb4565b60405180910390f35b6101bd60048036038101906101b89190610cf6565b6103cb565b005b6101d960048036038101906101d49190610c36565b6103d9565b6040516101e69190610ff1565b60405180910390f35b6101f7610421565b6040516102049190610ecf565b60405180910390f35b61022760048036038101906102229190610cf6565b6104b3565b6040516102349190610eb4565b60405180910390f35b61025760048036038101906102529190610cf6565b61052a565b6040516102649190610eb4565b60405180910390f35b61028760048036038101906102829190610c63565b61054d565b6040516102949190610ff1565b60405180910390f35b6060600380546102ac90611121565b80601f01602080910402602001604051908101604052809291908181526020018280546102d890611121565b80156103255780601f106102fa57610100808354040283529160200191610325565b820191906000526020600020905b81548152906001019060200180831161030857829003601f168201915b5050505050905090565b60008061033a6105d4565b90506103478185856105dc565b600191505092915050565b6000600254905090565b6000806103676105d4565b90506103748582856107a7565b61037f858585610833565b60019150509392505050565b60006012905090565b60008061039f6105d4565b90506103c08185856103b1858961054d565b6103bb9190611043565b6105dc565b600191505092915050565b6103d58282610aab565b5050565b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b60606004805461043090611121565b80601f016020809104026020016040519081016040528092919081815260200182805461045c90611121565b80156104a95780601f1061047e576101008083540402835291602001916104a9565b820191906000526020600020905b81548152906001019060200180831161048c57829003601f168201915b5050505050905090565b6000806104be6105d4565b905060006104cc828661054d565b905083811015610511576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161050890610fb1565b60405180910390fd5b61051e82868684036105dc565b60019250505092915050565b6000806105356105d4565b9050610542818585610833565b600191505092915050565b6000600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141561064c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161064390610f91565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156106bc576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106b390610f11565b60405180910390fd5b80600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9258360405161079a9190610ff1565b60405180910390a3505050565b60006107b3848461054d565b90507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff811461082d578181101561081f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161081690610f31565b60405180910390fd5b61082c84848484036105dc565b5b50505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156108a3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161089a90610f71565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610913576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161090a90610ef1565b60405180910390fd5b61091e838383610c02565b60008060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050818110156109a4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161099b90610f51565b60405180910390fd5b8181036000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550816000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825401925050819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef84604051610a929190610ff1565b60405180910390a3610aa5848484610c07565b50505050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610b1b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b1290610fd1565b60405180910390fd5b610b2760008383610c02565b8060026000828254610b399190611043565b92505081905550806000808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825401925050819055508173ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef83604051610bea9190610ff1565b60405180910390a3610bfe60008383610c07565b5050565b505050565b505050565b600081359050610c1b816113f3565b92915050565b600081359050610c308161140a565b92915050565b600060208284031215610c4c57610c4b6111b1565b5b6000610c5a84828501610c0c565b91505092915050565b60008060408385031215610c7a57610c796111b1565b5b6000610c8885828601610c0c565b9250506020610c9985828601610c0c565b9150509250929050565b600080600060608486031215610cbc57610cbb6111b1565b5b6000610cca86828701610c0c565b9350506020610cdb86828701610c0c565b9250506040610cec86828701610c21565b9150509250925092565b60008060408385031215610d0d57610d0c6111b1565b5b6000610d1b85828601610c0c565b9250506020610d2c85828601610c21565b9150509250929050565b610d3f816110ab565b82525050565b6000610d5082611027565b610d5a8185611032565b9350610d6a8185602086016110ee565b610d73816111b6565b840191505092915050565b6000610d8b602383611032565b9150610d96826111c7565b604082019050919050565b6000610dae602283611032565b9150610db982611216565b604082019050919050565b6000610dd1601d83611032565b9150610ddc82611265565b602082019050919050565b6000610df4602683611032565b9150610dff8261128e565b604082019050919050565b6000610e17602583611032565b9150610e22826112dd565b604082019050919050565b6000610e3a602483611032565b9150610e458261132c565b604082019050919050565b6000610e5d602583611032565b9150610e688261137b565b604082019050919050565b6000610e80601f83611032565b9150610e8b826113ca565b602082019050919050565b610e9f816110d7565b82525050565b610eae816110e1565b82525050565b6000602082019050610ec96000830184610d36565b92915050565b60006020820190508181036000830152610ee98184610d45565b905092915050565b60006020820190508181036000830152610f0a81610d7e565b9050919050565b60006020820190508181036000830152610f2a81610da1565b9050919050565b60006020820190508181036000830152610f4a81610dc4565b9050919050565b60006020820190508181036000830152610f6a81610de7565b9050919050565b60006020820190508181036000830152610f8a81610e0a565b9050919050565b60006020820190508181036000830152610faa81610e2d565b9050919050565b60006020820190508181036000830152610fca81610e50565b9050919050565b60006020820190508181036000830152610fea81610e73565b9050919050565b60006020820190506110066000830184610e96565b92915050565b60006020820190506110216000830184610ea5565b92915050565b600081519050919050565b600082825260208201905092915050565b600061104e826110d7565b9150611059836110d7565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0382111561108e5761108d611153565b5b828201905092915050565b60006110a4826110b7565b9050919050565b60008115159050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b60005b8381101561110c5780820151818401526020810190506110f1565b8381111561111b576000848401525b50505050565b6000600282049050600182168061113957607f821691505b6020821081141561114d5761114c611182565b5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b600080fd5b6000601f19601f8301169050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f766520746f20746865207a65726f20616464726560008201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a20696e73756666696369656e7420616c6c6f77616e6365000000600082015250565b7f45524332303a207472616e7366657220616d6f756e742065786365656473206260008201527f616c616e63650000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a207472616e736665722066726f6d20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f7760008201527f207a65726f000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a206d696e7420746f20746865207a65726f206164647265737300600082015250565b6113fc81611099565b811461140757600080fd5b50565b611413816110d7565b811461141e57600080fd5b5056fea2646970667358221220fbf11f91cf796c0a9cb08e9bb25ad1c8c2a857df80f7507d9fd3d5493eb4f35a64736f6c63430008070033"; + +type TestERC20ConstructorParams = + | [signer?: Signer] + | ConstructorParameters; + +const isSuperArgs = ( + xs: TestERC20ConstructorParams +): xs is ConstructorParameters => xs.length > 1; + +export class TestERC20__factory extends ContractFactory { + constructor(...args: TestERC20ConstructorParams) { + if (isSuperArgs(args)) { + super(...args); + } else { + super(_abi, _bytecode, args[0]); + } + } + + override deploy( + name: PromiseOrValue, + symbol: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise { + return super.deploy(name, symbol, overrides || {}) as Promise; + } + override getDeployTransaction( + name: PromiseOrValue, + symbol: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): TransactionRequest { + return super.getDeployTransaction(name, symbol, overrides || {}); + } + override attach(address: string): TestERC20 { + return super.attach(address) as TestERC20; + } + override connect(signer: Signer): TestERC20__factory { + return super.connect(signer) as TestERC20__factory; + } + + static readonly bytecode = _bytecode; + static readonly abi = _abi; + static createInterface(): TestERC20Interface { + return new utils.Interface(_abi) as TestERC20Interface; + } + static connect( + address: string, + signerOrProvider: Signer | Provider + ): TestERC20 { + return new Contract(address, _abi, signerOrProvider) as TestERC20; + } +} diff --git a/typechain-types/factories/contracts/prototypes/WETH9__factory.ts b/typechain-types/factories/contracts/prototypes/WETH9__factory.ts new file mode 100644 index 00000000..756734af --- /dev/null +++ b/typechain-types/factories/contracts/prototypes/WETH9__factory.ts @@ -0,0 +1,340 @@ +/* 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 { + WETH9, + WETH9Interface, +} from "../../../contracts/prototypes/WETH9"; + +const _abi = [ + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "src", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "guy", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "wad", + type: "uint256", + }, + ], + name: "Approval", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "dst", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "wad", + type: "uint256", + }, + ], + name: "Deposit", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "src", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "dst", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "wad", + type: "uint256", + }, + ], + name: "Transfer", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "src", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "wad", + type: "uint256", + }, + ], + name: "Withdrawal", + type: "event", + }, + { + inputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + { + internalType: "address", + name: "", + type: "address", + }, + ], + name: "allowance", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "guy", + type: "address", + }, + { + internalType: "uint256", + name: "wad", + type: "uint256", + }, + ], + name: "approve", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + name: "balanceOf", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "decimals", + outputs: [ + { + internalType: "uint8", + name: "", + type: "uint8", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "deposit", + outputs: [], + stateMutability: "payable", + type: "function", + }, + { + inputs: [], + name: "name", + outputs: [ + { + internalType: "string", + name: "", + type: "string", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "symbol", + outputs: [ + { + internalType: "string", + name: "", + type: "string", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "totalSupply", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "dst", + type: "address", + }, + { + internalType: "uint256", + name: "wad", + type: "uint256", + }, + ], + name: "transfer", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "src", + type: "address", + }, + { + internalType: "address", + name: "dst", + type: "address", + }, + { + internalType: "uint256", + name: "wad", + type: "uint256", + }, + ], + name: "transferFrom", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "wad", + type: "uint256", + }, + ], + name: "withdraw", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, +] as const; + +const _bytecode = + "0x60c0604052600d60808190526c2bb930b83832b21022ba3432b960991b60a090815261002e916000919061007a565b50604080518082019091526004808252630ae8aa8960e31b602090920191825261005a9160019161007a565b506002805460ff1916601217905534801561007457600080fd5b50610115565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106100bb57805160ff19168380011785556100e8565b828001600101855582156100e8579182015b828111156100e85782518255916020019190600101906100cd565b506100f49291506100f8565b5090565b61011291905b808211156100f457600081556001016100fe565b90565b6108b3806101246000396000f3fe6080604052600436106100bc5760003560e01c8063313ce56711610074578063a9059cbb1161004e578063a9059cbb146102c8578063d0e30db01461030e578063dd62ed3e14610316576100bc565b8063313ce5671461024857806370a082311461027357806395d89b41146102b3576100bc565b806318160ddd116100a557806318160ddd146101a557806323b872dd146101cc5780632e1a7d4d1461021c576100bc565b806306fdde03146100c1578063095ea7b31461014b575b600080fd5b3480156100cd57600080fd5b506100d661035e565b6040805160208082528351818301528351919283929083019185019080838360005b838110156101105781810151838201526020016100f8565b50505050905090810190601f16801561013d5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561015757600080fd5b506101916004803603604081101561016e57600080fd5b5073ffffffffffffffffffffffffffffffffffffffff813516906020013561040a565b604080519115158252519081900360200190f35b3480156101b157600080fd5b506101ba61047d565b60408051918252519081900360200190f35b3480156101d857600080fd5b50610191600480360360608110156101ef57600080fd5b5073ffffffffffffffffffffffffffffffffffffffff813581169160208101359091169060400135610481565b34801561022857600080fd5b506102466004803603602081101561023f57600080fd5b5035610699565b005b34801561025457600080fd5b5061025d61076a565b6040805160ff9092168252519081900360200190f35b34801561027f57600080fd5b506101ba6004803603602081101561029657600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16610773565b3480156102bf57600080fd5b506100d6610785565b3480156102d457600080fd5b50610191600480360360408110156102eb57600080fd5b5073ffffffffffffffffffffffffffffffffffffffff81351690602001356107fd565b610246610811565b34801561032257600080fd5b506101ba6004803603604081101561033957600080fd5b5073ffffffffffffffffffffffffffffffffffffffff81358116916020013516610860565b6000805460408051602060026001851615610100027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0190941693909304601f810184900484028201840190925281815292918301828280156104025780601f106103d757610100808354040283529160200191610402565b820191906000526020600020905b8154815290600101906020018083116103e557829003601f168201915b505050505081565b33600081815260046020908152604080832073ffffffffffffffffffffffffffffffffffffffff8716808552908352818420869055815186815291519394909390927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925928290030190a350600192915050565b4790565b73ffffffffffffffffffffffffffffffffffffffff83166000908152600360205260408120548211156104ef57604080517f08c379a0000000000000000000000000000000000000000000000000000000008152602060048201526000602482015290519081900360640190fd5b73ffffffffffffffffffffffffffffffffffffffff84163314801590610565575073ffffffffffffffffffffffffffffffffffffffff841660009081526004602090815260408083203384529091529020547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff14155b1561061b5773ffffffffffffffffffffffffffffffffffffffff841660009081526004602090815260408083203384529091529020548211156105e357604080517f08c379a0000000000000000000000000000000000000000000000000000000008152602060048201526000602482015290519081900360640190fd5b73ffffffffffffffffffffffffffffffffffffffff841660009081526004602090815260408083203384529091529020805483900390555b73ffffffffffffffffffffffffffffffffffffffff808516600081815260036020908152604080832080548890039055938716808352918490208054870190558351868152935191937fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef929081900390910190a35060019392505050565b336000908152600360205260409020548111156106f157604080517f08c379a0000000000000000000000000000000000000000000000000000000008152602060048201526000602482015290519081900360640190fd5b33600081815260036020526040808220805485900390555183156108fc0291849190818181858888f19350505050158015610730573d6000803e3d6000fd5b5060408051828152905133917f7fcf532c15f0a6db0bd6d0e038bea71d30d808c7d98cb3bf7268a95bf5081b65919081900360200190a250565b60025460ff1681565b60036020526000908152604090205481565b60018054604080516020600284861615610100027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0190941693909304601f810184900484028201840190925281815292918301828280156104025780601f106103d757610100808354040283529160200191610402565b600061080a338484610481565b9392505050565b33600081815260036020908152604091829020805434908101909155825190815291517fe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c9281900390910190a2565b60046020908152600092835260408084209091529082529020548156fea264697066735822122099293912112e50e68e1ad037d9f6a633955e9c0d7bc152fdf5024d741236eb3b64736f6c63430006060033"; + +type WETH9ConstructorParams = + | [signer?: Signer] + | ConstructorParameters; + +const isSuperArgs = ( + xs: WETH9ConstructorParams +): xs is ConstructorParameters => xs.length > 1; + +export class WETH9__factory extends ContractFactory { + constructor(...args: WETH9ConstructorParams) { + 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): WETH9 { + return super.attach(address) as WETH9; + } + override connect(signer: Signer): WETH9__factory { + return super.connect(signer) as WETH9__factory; + } + + static readonly bytecode = _bytecode; + static readonly abi = _abi; + static createInterface(): WETH9Interface { + return new utils.Interface(_abi) as WETH9Interface; + } + static connect(address: string, signerOrProvider: Signer | Provider): WETH9 { + return new Contract(address, _abi, signerOrProvider) as WETH9; + } +} diff --git a/typechain-types/factories/contracts/prototypes/evm/ERC20CustodyNew__factory.ts b/typechain-types/factories/contracts/prototypes/evm/ERC20CustodyNew__factory.ts new file mode 100644 index 00000000..bb608540 --- /dev/null +++ b/typechain-types/factories/contracts/prototypes/evm/ERC20CustodyNew__factory.ts @@ -0,0 +1,201 @@ +/* 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 { + ERC20CustodyNew, + ERC20CustodyNewInterface, +} from "../../../../contracts/prototypes/evm/ERC20CustodyNew"; + +const _abi = [ + { + inputs: [ + { + internalType: "address", + name: "_gateway", + type: "address", + }, + ], + stateMutability: "nonpayable", + type: "constructor", + }, + { + inputs: [], + name: "ZeroAddress", + type: "error", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "token", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "to", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "amount", + type: "uint256", + }, + ], + name: "Withdraw", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "token", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "to", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "amount", + type: "uint256", + }, + { + indexed: false, + internalType: "bytes", + name: "data", + type: "bytes", + }, + ], + name: "WithdrawAndCall", + type: "event", + }, + { + inputs: [], + name: "gateway", + outputs: [ + { + internalType: "contract IGatewayEVM", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "token", + type: "address", + }, + { + internalType: "address", + name: "to", + type: "address", + }, + { + internalType: "uint256", + name: "amount", + type: "uint256", + }, + ], + name: "withdraw", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "token", + type: "address", + }, + { + internalType: "address", + name: "to", + type: "address", + }, + { + internalType: "uint256", + name: "amount", + type: "uint256", + }, + { + internalType: "bytes", + name: "data", + type: "bytes", + }, + ], + name: "withdrawAndCall", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, +] as const; + +const _bytecode = + "0x60806040523480156200001157600080fd5b506040516200109038038062001090833981810160405281019062000037919062000106565b6001600081905550600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415620000a7576040517fd92e233d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550506200018b565b600081519050620001008162000171565b92915050565b6000602082840312156200011f576200011e6200016c565b5b60006200012f84828501620000ef565b91505092915050565b600062000145826200014c565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600080fd5b6200017c8162000138565b81146200018857600080fd5b50565b610ef5806200019b6000396000f3fe608060405234801561001057600080fd5b50600436106100415760003560e01c8063116191b61461004657806321fc65f214610064578063d9caed1214610080575b600080fd5b61004e61009c565b60405161005b9190610a98565b60405180910390f35b61007e600480360381019061007991906107bc565b6100c2565b005b61009a60048036038101906100959190610769565b61024a565b005b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6100ca6102ef565b610117600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16848773ffffffffffffffffffffffffffffffffffffffff1661033f9092919063ffffffff16565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16635131ab5986868686866040518663ffffffff1660e01b815260040161017a959493929190610a21565b600060405180830381600087803b15801561019457600080fd5b505af11580156101a8573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f820116820180604052508101906101d19190610871565b508373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167f85b5be9cf454e05e0bddf49315178102227c312078eefa3c00294fb4d912ae4e85858560405161023393929190610b70565b60405180910390a36102436103c5565b5050505050565b6102526102ef565b61027d82828573ffffffffffffffffffffffffffffffffffffffff1661033f9092919063ffffffff16565b8173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f9b1bfa7fa9ee420a16e124f794c35ac9f90472acc99140eb2f6447c714cad8eb836040516102da9190610b55565b60405180910390a36102ea6103c5565b505050565b60026000541415610335576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161032c90610b35565b60405180910390fd5b6002600081905550565b6103c08363a9059cbb60e01b848460405160240161035e929190610a6f565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050506103cf565b505050565b6001600081905550565b6000610431826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff166104969092919063ffffffff16565b905060008151111561049157808060200190518101906104519190610844565b610490576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161048790610b15565b60405180910390fd5b5b505050565b60606104a584846000856104ae565b90509392505050565b6060824710156104f3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016104ea90610ad5565b60405180910390fd5b6000808673ffffffffffffffffffffffffffffffffffffffff16858760405161051c9190610a0a565b60006040518083038185875af1925050503d8060008114610559576040519150601f19603f3d011682016040523d82523d6000602084013e61055e565b606091505b509150915061056f8783838761057b565b92505050949350505050565b606083156105de576000835114156105d657610596856105f1565b6105d5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105cc90610af5565b60405180910390fd5b5b8290506105e9565b6105e88383610614565b5b949350505050565b6000808273ffffffffffffffffffffffffffffffffffffffff163b119050919050565b6000825111156106275781518083602001fd5b806040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161065b9190610ab3565b60405180910390fd5b600061067761067284610bc7565b610ba2565b90508281526020810184848401111561069357610692610d6a565b5b61069e848285610cc8565b509392505050565b6000813590506106b581610e7a565b92915050565b6000815190506106ca81610e91565b92915050565b60008083601f8401126106e6576106e5610d60565b5b8235905067ffffffffffffffff81111561070357610702610d5b565b5b60208301915083600182028301111561071f5761071e610d65565b5b9250929050565b600082601f83011261073b5761073a610d60565b5b815161074b848260208601610664565b91505092915050565b60008135905061076381610ea8565b92915050565b60008060006060848603121561078257610781610d74565b5b6000610790868287016106a6565b93505060206107a1868287016106a6565b92505060406107b286828701610754565b9150509250925092565b6000806000806000608086880312156107d8576107d7610d74565b5b60006107e6888289016106a6565b95505060206107f7888289016106a6565b945050604061080888828901610754565b935050606086013567ffffffffffffffff81111561082957610828610d6f565b5b610835888289016106d0565b92509250509295509295909350565b60006020828403121561085a57610859610d74565b5b6000610868848285016106bb565b91505092915050565b60006020828403121561088757610886610d74565b5b600082015167ffffffffffffffff8111156108a5576108a4610d6f565b5b6108b184828501610726565b91505092915050565b6108c381610c3b565b82525050565b60006108d58385610c0e565b93506108e2838584610cb9565b6108eb83610d79565b840190509392505050565b600061090182610bf8565b61090b8185610c1f565b935061091b818560208601610cc8565b80840191505092915050565b61093081610c83565b82525050565b600061094182610c03565b61094b8185610c2a565b935061095b818560208601610cc8565b61096481610d79565b840191505092915050565b600061097c602683610c2a565b915061098782610d8a565b604082019050919050565b600061099f601d83610c2a565b91506109aa82610dd9565b602082019050919050565b60006109c2602a83610c2a565b91506109cd82610e02565b604082019050919050565b60006109e5601f83610c2a565b91506109f082610e51565b602082019050919050565b610a0481610c79565b82525050565b6000610a1682846108f6565b915081905092915050565b6000608082019050610a3660008301886108ba565b610a4360208301876108ba565b610a5060408301866109fb565b8181036060830152610a638184866108c9565b90509695505050505050565b6000604082019050610a8460008301856108ba565b610a9160208301846109fb565b9392505050565b6000602082019050610aad6000830184610927565b92915050565b60006020820190508181036000830152610acd8184610936565b905092915050565b60006020820190508181036000830152610aee8161096f565b9050919050565b60006020820190508181036000830152610b0e81610992565b9050919050565b60006020820190508181036000830152610b2e816109b5565b9050919050565b60006020820190508181036000830152610b4e816109d8565b9050919050565b6000602082019050610b6a60008301846109fb565b92915050565b6000604082019050610b8560008301866109fb565b8181036020830152610b988184866108c9565b9050949350505050565b6000610bac610bbd565b9050610bb88282610cfb565b919050565b6000604051905090565b600067ffffffffffffffff821115610be257610be1610d2c565b5b610beb82610d79565b9050602081019050919050565b600081519050919050565b600081519050919050565b600082825260208201905092915050565b600081905092915050565b600082825260208201905092915050565b6000610c4682610c59565b9050919050565b60008115159050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b6000610c8e82610c95565b9050919050565b6000610ca082610ca7565b9050919050565b6000610cb282610c59565b9050919050565b82818337600083830152505050565b60005b83811015610ce6578082015181840152602081019050610ccb565b83811115610cf5576000848401525b50505050565b610d0482610d79565b810181811067ffffffffffffffff82111715610d2357610d22610d2c565b5b80604052505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f416464726573733a20696e73756666696369656e742062616c616e636520666f60008201527f722063616c6c0000000000000000000000000000000000000000000000000000602082015250565b7f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000600082015250565b7f5361666545524332303a204552433230206f7065726174696f6e20646964206e60008201527f6f74207375636365656400000000000000000000000000000000000000000000602082015250565b7f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00600082015250565b610e8381610c3b565b8114610e8e57600080fd5b50565b610e9a81610c4d565b8114610ea557600080fd5b50565b610eb181610c79565b8114610ebc57600080fd5b5056fea2646970667358221220df90177bbf6ff123418400cb10905399538a40ce421b3d162daf5e7d4fa15f4864736f6c63430008070033"; + +type ERC20CustodyNewConstructorParams = + | [signer?: Signer] + | ConstructorParameters; + +const isSuperArgs = ( + xs: ERC20CustodyNewConstructorParams +): xs is ConstructorParameters => xs.length > 1; + +export class ERC20CustodyNew__factory extends ContractFactory { + constructor(...args: ERC20CustodyNewConstructorParams) { + 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): ERC20CustodyNew { + return super.attach(address) as ERC20CustodyNew; + } + override connect(signer: Signer): ERC20CustodyNew__factory { + return super.connect(signer) as ERC20CustodyNew__factory; + } + + static readonly bytecode = _bytecode; + static readonly abi = _abi; + static createInterface(): ERC20CustodyNewInterface { + return new utils.Interface(_abi) as ERC20CustodyNewInterface; + } + static connect( + address: string, + signerOrProvider: Signer | Provider + ): ERC20CustodyNew { + return new Contract(address, _abi, signerOrProvider) as ERC20CustodyNew; + } +} diff --git a/typechain-types/factories/contracts/prototypes/evm/GatewayEVMUpgradeTest__factory.ts b/typechain-types/factories/contracts/prototypes/evm/GatewayEVMUpgradeTest__factory.ts new file mode 100644 index 00000000..3f58fa3f --- /dev/null +++ b/typechain-types/factories/contracts/prototypes/evm/GatewayEVMUpgradeTest__factory.ts @@ -0,0 +1,502 @@ +/* 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 { + GatewayEVMUpgradeTest, + GatewayEVMUpgradeTestInterface, +} from "../../../../contracts/prototypes/evm/GatewayEVMUpgradeTest"; + +const _abi = [ + { + inputs: [], + stateMutability: "nonpayable", + type: "constructor", + }, + { + inputs: [], + name: "ApprovalFailed", + type: "error", + }, + { + inputs: [], + name: "ExecutionFailed", + type: "error", + }, + { + inputs: [], + name: "InsufficientETHAmount", + type: "error", + }, + { + inputs: [], + name: "SendFailed", + type: "error", + }, + { + inputs: [], + name: "ZeroAddress", + 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: "destination", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "value", + type: "uint256", + }, + { + indexed: false, + internalType: "bytes", + name: "data", + type: "bytes", + }, + ], + name: "ExecutedV2", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "token", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "to", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "amount", + type: "uint256", + }, + { + indexed: false, + internalType: "bytes", + name: "data", + type: "bytes", + }, + ], + name: "ExecutedWithERC20", + 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: false, + internalType: "bytes", + name: "recipient", + type: "bytes", + }, + { + indexed: false, + internalType: "uint256", + name: "amount", + type: "uint256", + }, + ], + name: "Send", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "bytes", + name: "recipient", + type: "bytes", + }, + { + indexed: true, + internalType: "address", + name: "asset", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "amount", + type: "uint256", + }, + ], + name: "SendERC20", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "implementation", + type: "address", + }, + ], + name: "Upgraded", + type: "event", + }, + { + inputs: [], + name: "custody", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "destination", + type: "address", + }, + { + internalType: "bytes", + name: "data", + type: "bytes", + }, + ], + name: "execute", + outputs: [ + { + internalType: "bytes", + name: "", + type: "bytes", + }, + ], + stateMutability: "payable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "token", + type: "address", + }, + { + internalType: "address", + name: "to", + type: "address", + }, + { + internalType: "uint256", + name: "amount", + type: "uint256", + }, + { + internalType: "bytes", + name: "data", + type: "bytes", + }, + ], + name: "executeWithERC20", + outputs: [ + { + internalType: "bytes", + name: "", + type: "bytes", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_tssAddress", + type: "address", + }, + ], + 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: "bytes", + name: "recipient", + type: "bytes", + }, + { + internalType: "uint256", + name: "amount", + type: "uint256", + }, + ], + name: "send", + outputs: [], + stateMutability: "payable", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes", + name: "recipient", + type: "bytes", + }, + { + internalType: "address", + name: "token", + type: "address", + }, + { + internalType: "uint256", + name: "amount", + type: "uint256", + }, + ], + name: "sendERC20", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_custody", + type: "address", + }, + ], + name: "setCustody", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "newOwner", + type: "address", + }, + ], + name: "transferOwnership", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "tssAddress", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + 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", + }, +] as const; + +const _bytecode = + "0x60a06040523073ffffffffffffffffffffffffffffffffffffffff1660809073ffffffffffffffffffffffffffffffffffffffff1660601b8152503480156200004757600080fd5b50620000586200005e60201b60201c565b62000208565b600060019054906101000a900460ff1615620000b1576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401620000a8906200015c565b60405180910390fd5b60ff801660008054906101000a900460ff1660ff1614620001225760ff6000806101000a81548160ff021916908360ff1602179055507f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb384740249860ff6040516200011991906200017e565b60405180910390a15b565b6000620001336027836200019b565b91506200014082620001b9565b604082019050919050565b6200015681620001ac565b82525050565b60006020820190508181036000830152620001778162000124565b9050919050565b60006020820190506200019560008301846200014b565b92915050565b600082825260208201905092915050565b600060ff82169050919050565b7f496e697469616c697a61626c653a20636f6e747261637420697320696e69746960008201527f616c697a696e6700000000000000000000000000000000000000000000000000602082015250565b60805160601c612c4d620002436000396000818161038701528181610416015281816105100152818161059f0152610a060152612c4d6000f3fe6080604052600436106100dd5760003560e01c80638da5cb5b1161007f578063c4d66de811610059578063c4d66de814610271578063cb0271ed1461029a578063dda79b75146102c3578063f2fde38b146102ee576100dd565b80638da5cb5b146102015780639372c4ab1461022c578063ae7a3a6f14610248576100dd565b80635131ab59116100bb5780635131ab591461015757806352d1902d146101945780635b112591146101bf578063715018a6146101ea576100dd565b80631cff79cd146100e25780633659cfe6146101125780634f1ef2861461013b575b600080fd5b6100fc60048036038101906100f79190611d45565b610317565b60405161010991906123bc565b60405180910390f35b34801561011e57600080fd5b5061013960048036038101906101349190611c90565b610385565b005b61015560048036038101906101509190611da5565b61050e565b005b34801561016357600080fd5b5061017e60048036038101906101799190611cbd565b61064b565b60405161018b91906123bc565b60405180910390f35b3480156101a057600080fd5b506101a9610a02565b6040516101b6919061236f565b60405180910390f35b3480156101cb57600080fd5b506101d4610abb565b6040516101e191906122cb565b60405180910390f35b3480156101f657600080fd5b506101ff610ae1565b005b34801561020d57600080fd5b50610216610af5565b60405161022391906122cb565b60405180910390f35b61024660048036038101906102419190611ecf565b610b1f565b005b34801561025457600080fd5b5061026f600480360381019061026a9190611c90565b610c68565b005b34801561027d57600080fd5b5061029860048036038101906102939190611c90565b610cac565b005b3480156102a657600080fd5b506102c160048036038101906102bc9190611e5b565b610e9b565b005b3480156102cf57600080fd5b506102d8610f42565b6040516102e591906122cb565b60405180910390f35b3480156102fa57600080fd5b5061031560048036038101906103109190611c90565b610f68565b005b60606000610326858585610fec565b90508473ffffffffffffffffffffffffffffffffffffffff167f373df382b9c587826f3de13f16d67f8d99f28ee947fc0924c6ef2d6d2c7e8546348686604051610372939291906125bb565b60405180910390a2809150509392505050565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163073ffffffffffffffffffffffffffffffffffffffff161415610414576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161040b9061243b565b60405180910390fd5b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166104536110a3565b73ffffffffffffffffffffffffffffffffffffffff16146104a9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016104a09061245b565b60405180910390fd5b6104b2816110fa565b61050b81600067ffffffffffffffff8111156104d1576104d061277c565b5b6040519080825280601f01601f1916602001820160405280156105035781602001600182028036833780820191505090505b506000611105565b50565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163073ffffffffffffffffffffffffffffffffffffffff16141561059d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105949061243b565b60405180910390fd5b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166105dc6110a3565b73ffffffffffffffffffffffffffffffffffffffff1614610632576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106299061245b565b60405180910390fd5b61063b826110fa565b61064782826001611105565b5050565b60608573ffffffffffffffffffffffffffffffffffffffff1663095ea7b38660006040518363ffffffff1660e01b815260040161068992919061231d565b602060405180830381600087803b1580156106a357600080fd5b505af11580156106b7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106db9190611e01565b610711576040517f8164f84200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8573ffffffffffffffffffffffffffffffffffffffff1663095ea7b386866040518363ffffffff1660e01b815260040161074c929190612346565b602060405180830381600087803b15801561076657600080fd5b505af115801561077a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061079e9190611e01565b6107d4576040517f8164f84200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60006107e1868585610fec565b90508673ffffffffffffffffffffffffffffffffffffffff1663095ea7b38760006040518363ffffffff1660e01b815260040161081f92919061231d565b602060405180830381600087803b15801561083957600080fd5b505af115801561084d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108719190611e01565b6108a7576040517f8164f84200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008773ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b81526004016108e291906122cb565b60206040518083038186803b1580156108fa57600080fd5b505afa15801561090e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109329190611f2f565b9050600081111561098b5761098a60c960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16828a73ffffffffffffffffffffffffffffffffffffffff166112829092919063ffffffff16565b5b8673ffffffffffffffffffffffffffffffffffffffff168873ffffffffffffffffffffffffffffffffffffffff167f29c40793bffd84cb810179f15d1ceec72bc7f0785514c668ba36645cf99b73828888886040516109ec939291906125bb565b60405180910390a3819250505095945050505050565b60007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163073ffffffffffffffffffffffffffffffffffffffff1614610a92576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a899061249b565b60405180910390fd5b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc60001b905090565b60ca60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b610ae9611308565b610af36000611386565b565b6000603360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6000341415610b5a576040517f7671265e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600060ca60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1634604051610ba2906122b6565b60006040518083038185875af1925050503d8060008114610bdf576040519150601f19603f3d011682016040523d82523d6000602084013e610be4565b606091505b50509050600015158115151415610c27576040517f81063e5100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b7fa93afc57f3be4641cf20c7165d11856f3b46dd376108e5fffb06f73f2b2a6d58848434604051610c5a9392919061238a565b60405180910390a150505050565b8060c960006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b60008060019054906101000a900460ff16159050808015610cdd5750600160008054906101000a900460ff1660ff16105b80610d0a5750610cec3061144c565b158015610d095750600160008054906101000a900460ff1660ff16145b5b610d49576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d40906124db565b60405180910390fd5b60016000806101000a81548160ff021916908360ff1602179055508015610d86576001600060016101000a81548160ff0219169083151502179055505b610d8e61146f565b610d966114c8565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610dfd576040517fd92e233d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8160ca60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508015610e975760008060016101000a81548160ff0219169083151502179055507f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024986001604051610e8e91906123de565b60405180910390a15b5050565b610eea3360c960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16838573ffffffffffffffffffffffffffffffffffffffff16611519909392919063ffffffff16565b8173ffffffffffffffffffffffffffffffffffffffff167f35fb30ed1b8e81eb91001dad742b13b1491a67c722e8c593a886a18500f7d9af858584604051610f349392919061238a565b60405180910390a250505050565b60c960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b610f70611308565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415610fe0576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610fd79061241b565b60405180910390fd5b610fe981611386565b50565b60606000808573ffffffffffffffffffffffffffffffffffffffff16348686604051611019929190612286565b60006040518083038185875af1925050503d8060008114611056576040519150601f19603f3d011682016040523d82523d6000602084013e61105b565b606091505b509150915081611097576040517facfdb44400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80925050509392505050565b60006110d17f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc60001b6115a2565b60000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b611102611308565b50565b6111317f4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd914360001b6115ac565b60000160009054906101000a900460ff161561115557611150836115b6565b61127d565b8273ffffffffffffffffffffffffffffffffffffffff166352d1902d6040518163ffffffff1660e01b815260040160206040518083038186803b15801561119b57600080fd5b505afa9250505080156111cc57506040513d601f19601f820116820180604052508101906111c99190611e2e565b60015b61120b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611202906124fb565b60405180910390fd5b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc60001b8114611270576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611267906124bb565b60405180910390fd5b5061127c83838361166f565b5b505050565b6113038363a9059cbb60e01b84846040516024016112a1929190612346565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff838183161783525050505061169b565b505050565b611310611762565b73ffffffffffffffffffffffffffffffffffffffff1661132e610af5565b73ffffffffffffffffffffffffffffffffffffffff1614611384576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161137b9061253b565b60405180910390fd5b565b6000603360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905081603360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b6000808273ffffffffffffffffffffffffffffffffffffffff163b119050919050565b600060019054906101000a900460ff166114be576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016114b59061257b565b60405180910390fd5b6114c661176a565b565b600060019054906101000a900460ff16611517576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161150e9061257b565b60405180910390fd5b565b61159c846323b872dd60e01b85858560405160240161153a939291906122e6565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff838183161783525050505061169b565b50505050565b6000819050919050565b6000819050919050565b6115bf8161144c565b6115fe576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016115f59061251b565b60405180910390fd5b8061162b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc60001b6115a2565b60000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b611678836117cb565b6000825111806116855750805b1561169657611694838361181a565b505b505050565b60006116fd826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff166118479092919063ffffffff16565b905060008151111561175d578080602001905181019061171d9190611e01565b61175c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016117539061259b565b60405180910390fd5b5b505050565b600033905090565b600060019054906101000a900460ff166117b9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016117b09061257b565b60405180910390fd5b6117c96117c4611762565b611386565b565b6117d4816115b6565b8073ffffffffffffffffffffffffffffffffffffffff167fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b60405160405180910390a250565b606061183f8383604051806060016040528060278152602001612bf16027913961185f565b905092915050565b606061185684846000856118e5565b90509392505050565b60606000808573ffffffffffffffffffffffffffffffffffffffff1685604051611889919061229f565b600060405180830381855af49150503d80600081146118c4576040519150601f19603f3d011682016040523d82523d6000602084013e6118c9565b606091505b50915091506118da868383876119b2565b925050509392505050565b60608247101561192a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016119219061247b565b60405180910390fd5b6000808673ffffffffffffffffffffffffffffffffffffffff168587604051611953919061229f565b60006040518083038185875af1925050503d8060008114611990576040519150601f19603f3d011682016040523d82523d6000602084013e611995565b606091505b50915091506119a687838387611a28565b92505050949350505050565b60608315611a1557600083511415611a0d576119cd8561144c565b611a0c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611a039061255b565b60405180910390fd5b5b829050611a20565b611a1f8383611a9e565b5b949350505050565b60608315611a8b57600083511415611a8357611a4385611aee565b611a82576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611a799061255b565b60405180910390fd5b5b829050611a96565b611a958383611b11565b5b949350505050565b600082511115611ab15781518083602001fd5b806040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611ae591906123f9565b60405180910390fd5b6000808273ffffffffffffffffffffffffffffffffffffffff163b119050919050565b600082511115611b245781518083602001fd5b806040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611b5891906123f9565b60405180910390fd5b6000611b74611b6f84612612565b6125ed565b905082815260208101848484011115611b9057611b8f6127ba565b5b611b9b848285612709565b509392505050565b600081359050611bb281612b94565b92915050565b600081519050611bc781612bab565b92915050565b600081519050611bdc81612bc2565b92915050565b60008083601f840112611bf857611bf76127b0565b5b8235905067ffffffffffffffff811115611c1557611c146127ab565b5b602083019150836001820283011115611c3157611c306127b5565b5b9250929050565b600082601f830112611c4d57611c4c6127b0565b5b8135611c5d848260208601611b61565b91505092915050565b600081359050611c7581612bd9565b92915050565b600081519050611c8a81612bd9565b92915050565b600060208284031215611ca657611ca56127c4565b5b6000611cb484828501611ba3565b91505092915050565b600080600080600060808688031215611cd957611cd86127c4565b5b6000611ce788828901611ba3565b9550506020611cf888828901611ba3565b9450506040611d0988828901611c66565b935050606086013567ffffffffffffffff811115611d2a57611d296127bf565b5b611d3688828901611be2565b92509250509295509295909350565b600080600060408486031215611d5e57611d5d6127c4565b5b6000611d6c86828701611ba3565b935050602084013567ffffffffffffffff811115611d8d57611d8c6127bf565b5b611d9986828701611be2565b92509250509250925092565b60008060408385031215611dbc57611dbb6127c4565b5b6000611dca85828601611ba3565b925050602083013567ffffffffffffffff811115611deb57611dea6127bf565b5b611df785828601611c38565b9150509250929050565b600060208284031215611e1757611e166127c4565b5b6000611e2584828501611bb8565b91505092915050565b600060208284031215611e4457611e436127c4565b5b6000611e5284828501611bcd565b91505092915050565b60008060008060608587031215611e7557611e746127c4565b5b600085013567ffffffffffffffff811115611e9357611e926127bf565b5b611e9f87828801611be2565b94509450506020611eb287828801611ba3565b9250506040611ec387828801611c66565b91505092959194509250565b600080600060408486031215611ee857611ee76127c4565b5b600084013567ffffffffffffffff811115611f0657611f056127bf565b5b611f1286828701611be2565b93509350506020611f2586828701611c66565b9150509250925092565b600060208284031215611f4557611f446127c4565b5b6000611f5384828501611c7b565b91505092915050565b611f6581612686565b82525050565b611f74816126a4565b82525050565b6000611f868385612659565b9350611f93838584612709565b611f9c836127c9565b840190509392505050565b6000611fb3838561266a565b9350611fc0838584612709565b82840190509392505050565b6000611fd782612643565b611fe18185612659565b9350611ff1818560208601612718565b611ffa816127c9565b840191505092915050565b600061201082612643565b61201a818561266a565b935061202a818560208601612718565b80840191505092915050565b61203f816126e5565b82525050565b61204e816126f7565b82525050565b600061205f8261264e565b6120698185612675565b9350612079818560208601612718565b612082816127c9565b840191505092915050565b600061209a602683612675565b91506120a5826127da565b604082019050919050565b60006120bd602c83612675565b91506120c882612829565b604082019050919050565b60006120e0602c83612675565b91506120eb82612878565b604082019050919050565b6000612103602683612675565b915061210e826128c7565b604082019050919050565b6000612126603883612675565b915061213182612916565b604082019050919050565b6000612149602983612675565b915061215482612965565b604082019050919050565b600061216c602e83612675565b9150612177826129b4565b604082019050919050565b600061218f602e83612675565b915061219a82612a03565b604082019050919050565b60006121b2602d83612675565b91506121bd82612a52565b604082019050919050565b60006121d5602083612675565b91506121e082612aa1565b602082019050919050565b60006121f860008361266a565b915061220382612aca565b600082019050919050565b600061221b601d83612675565b915061222682612acd565b602082019050919050565b600061223e602b83612675565b915061224982612af6565b604082019050919050565b6000612261602a83612675565b915061226c82612b45565b604082019050919050565b612280816126ce565b82525050565b6000612293828486611fa7565b91508190509392505050565b60006122ab8284612005565b915081905092915050565b60006122c1826121eb565b9150819050919050565b60006020820190506122e06000830184611f5c565b92915050565b60006060820190506122fb6000830186611f5c565b6123086020830185611f5c565b6123156040830184612277565b949350505050565b60006040820190506123326000830185611f5c565b61233f6020830184612036565b9392505050565b600060408201905061235b6000830185611f5c565b6123686020830184612277565b9392505050565b60006020820190506123846000830184611f6b565b92915050565b600060408201905081810360008301526123a5818587611f7a565b90506123b46020830184612277565b949350505050565b600060208201905081810360008301526123d68184611fcc565b905092915050565b60006020820190506123f36000830184612045565b92915050565b600060208201905081810360008301526124138184612054565b905092915050565b600060208201905081810360008301526124348161208d565b9050919050565b60006020820190508181036000830152612454816120b0565b9050919050565b60006020820190508181036000830152612474816120d3565b9050919050565b60006020820190508181036000830152612494816120f6565b9050919050565b600060208201905081810360008301526124b481612119565b9050919050565b600060208201905081810360008301526124d48161213c565b9050919050565b600060208201905081810360008301526124f48161215f565b9050919050565b6000602082019050818103600083015261251481612182565b9050919050565b60006020820190508181036000830152612534816121a5565b9050919050565b60006020820190508181036000830152612554816121c8565b9050919050565b600060208201905081810360008301526125748161220e565b9050919050565b6000602082019050818103600083015261259481612231565b9050919050565b600060208201905081810360008301526125b481612254565b9050919050565b60006040820190506125d06000830186612277565b81810360208301526125e3818486611f7a565b9050949350505050565b60006125f7612608565b9050612603828261274b565b919050565b6000604051905090565b600067ffffffffffffffff82111561262d5761262c61277c565b5b612636826127c9565b9050602081019050919050565b600081519050919050565b600081519050919050565b600082825260208201905092915050565b600081905092915050565b600082825260208201905092915050565b6000612691826126ae565b9050919050565b60008115159050919050565b6000819050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b60006126f0826126ce565b9050919050565b6000612702826126d8565b9050919050565b82818337600083830152505050565b60005b8381101561273657808201518184015260208101905061271b565b83811115612745576000848401525b50505050565b612754826127c9565b810181811067ffffffffffffffff821117156127735761277261277c565b5b80604052505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b7f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060008201527f64656c656761746563616c6c0000000000000000000000000000000000000000602082015250565b7f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060008201527f6163746976652070726f78790000000000000000000000000000000000000000602082015250565b7f416464726573733a20696e73756666696369656e742062616c616e636520666f60008201527f722063616c6c0000000000000000000000000000000000000000000000000000602082015250565b7f555550535570677261646561626c653a206d757374206e6f742062652063616c60008201527f6c6564207468726f7567682064656c656761746563616c6c0000000000000000602082015250565b7f45524331393637557067726164653a20756e737570706f727465642070726f7860008201527f6961626c65555549440000000000000000000000000000000000000000000000602082015250565b7f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160008201527f647920696e697469616c697a6564000000000000000000000000000000000000602082015250565b7f45524331393637557067726164653a206e657720696d706c656d656e7461746960008201527f6f6e206973206e6f742055555053000000000000000000000000000000000000602082015250565b7f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60008201527f6f74206120636f6e747261637400000000000000000000000000000000000000602082015250565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b50565b7f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000600082015250565b7f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960008201527f6e697469616c697a696e67000000000000000000000000000000000000000000602082015250565b7f5361666545524332303a204552433230206f7065726174696f6e20646964206e60008201527f6f74207375636365656400000000000000000000000000000000000000000000602082015250565b612b9d81612686565b8114612ba857600080fd5b50565b612bb481612698565b8114612bbf57600080fd5b50565b612bcb816126a4565b8114612bd657600080fd5b50565b612be2816126ce565b8114612bed57600080fd5b5056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a264697066735822122079a8a81715ebf41d134bb64167fb2f56e849b251fc0b7d2e8b4e5d2f3b96b57a64736f6c63430008070033"; + +type GatewayEVMUpgradeTestConstructorParams = + | [signer?: Signer] + | ConstructorParameters; + +const isSuperArgs = ( + xs: GatewayEVMUpgradeTestConstructorParams +): xs is ConstructorParameters => xs.length > 1; + +export class GatewayEVMUpgradeTest__factory extends ContractFactory { + constructor(...args: GatewayEVMUpgradeTestConstructorParams) { + 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): GatewayEVMUpgradeTest { + return super.attach(address) as GatewayEVMUpgradeTest; + } + override connect(signer: Signer): GatewayEVMUpgradeTest__factory { + return super.connect(signer) as GatewayEVMUpgradeTest__factory; + } + + static readonly bytecode = _bytecode; + static readonly abi = _abi; + static createInterface(): GatewayEVMUpgradeTestInterface { + return new utils.Interface(_abi) as GatewayEVMUpgradeTestInterface; + } + static connect( + address: string, + signerOrProvider: Signer | Provider + ): GatewayEVMUpgradeTest { + return new Contract( + address, + _abi, + signerOrProvider + ) as GatewayEVMUpgradeTest; + } +} diff --git a/typechain-types/factories/contracts/prototypes/evm/GatewayEVM__factory.ts b/typechain-types/factories/contracts/prototypes/evm/GatewayEVM__factory.ts new file mode 100644 index 00000000..39557383 --- /dev/null +++ b/typechain-types/factories/contracts/prototypes/evm/GatewayEVM__factory.ts @@ -0,0 +1,580 @@ +/* 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 { + GatewayEVM, + GatewayEVMInterface, +} from "../../../../contracts/prototypes/evm/GatewayEVM"; + +const _abi = [ + { + inputs: [], + stateMutability: "nonpayable", + type: "constructor", + }, + { + inputs: [], + name: "ApprovalFailed", + type: "error", + }, + { + inputs: [], + name: "DepositFailed", + type: "error", + }, + { + inputs: [], + name: "ExecutionFailed", + type: "error", + }, + { + inputs: [], + name: "InsufficientERC20Amount", + type: "error", + }, + { + inputs: [], + name: "InsufficientETHAmount", + type: "error", + }, + { + inputs: [], + name: "ZeroAddress", + 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: "address", + name: "receiver", + type: "address", + }, + { + indexed: false, + internalType: "bytes", + name: "payload", + type: "bytes", + }, + ], + name: "Call", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "sender", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "receiver", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "amount", + type: "uint256", + }, + { + indexed: false, + internalType: "address", + name: "asset", + type: "address", + }, + { + indexed: false, + internalType: "bytes", + name: "payload", + type: "bytes", + }, + ], + name: "Deposit", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "destination", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "value", + type: "uint256", + }, + { + indexed: false, + internalType: "bytes", + name: "data", + type: "bytes", + }, + ], + name: "Executed", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "token", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "to", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "amount", + type: "uint256", + }, + { + indexed: false, + internalType: "bytes", + name: "data", + type: "bytes", + }, + ], + name: "ExecutedWithERC20", + 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", + }, + { + inputs: [ + { + internalType: "address", + name: "receiver", + type: "address", + }, + { + internalType: "bytes", + name: "payload", + type: "bytes", + }, + ], + name: "call", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "custody", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "receiver", + type: "address", + }, + ], + name: "deposit", + outputs: [], + stateMutability: "payable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "receiver", + type: "address", + }, + { + internalType: "uint256", + name: "amount", + type: "uint256", + }, + { + internalType: "address", + name: "asset", + type: "address", + }, + ], + name: "deposit", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "receiver", + type: "address", + }, + { + internalType: "bytes", + name: "payload", + type: "bytes", + }, + ], + name: "depositAndCall", + outputs: [], + stateMutability: "payable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "receiver", + type: "address", + }, + { + internalType: "uint256", + name: "amount", + type: "uint256", + }, + { + internalType: "address", + name: "asset", + type: "address", + }, + { + internalType: "bytes", + name: "payload", + type: "bytes", + }, + ], + name: "depositAndCall", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "destination", + type: "address", + }, + { + internalType: "bytes", + name: "data", + type: "bytes", + }, + ], + name: "execute", + outputs: [ + { + internalType: "bytes", + name: "", + type: "bytes", + }, + ], + stateMutability: "payable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "token", + type: "address", + }, + { + internalType: "address", + name: "to", + type: "address", + }, + { + internalType: "uint256", + name: "amount", + type: "uint256", + }, + { + internalType: "bytes", + name: "data", + type: "bytes", + }, + ], + name: "executeWithERC20", + outputs: [ + { + internalType: "bytes", + name: "", + type: "bytes", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_tssAddress", + type: "address", + }, + ], + 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: "_custody", + type: "address", + }, + ], + name: "setCustody", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "newOwner", + type: "address", + }, + ], + name: "transferOwnership", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "tssAddress", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + 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", + }, +] as const; + +const _bytecode = + "0x60a06040523073ffffffffffffffffffffffffffffffffffffffff1660809073ffffffffffffffffffffffffffffffffffffffff1660601b8152503480156200004757600080fd5b50620000586200005e60201b60201c565b62000208565b600060019054906101000a900460ff1615620000b1576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401620000a8906200015c565b60405180910390fd5b60ff801660008054906101000a900460ff1660ff1614620001225760ff6000806101000a81548160ff021916908360ff1602179055507f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb384740249860ff6040516200011991906200017e565b60405180910390a15b565b6000620001336027836200019b565b91506200014082620001b9565b604082019050919050565b6200015681620001ac565b82525050565b60006020820190508181036000830152620001778162000124565b9050919050565b60006020820190506200019560008301846200014b565b92915050565b600082825260208201905092915050565b600060ff82169050919050565b7f496e697469616c697a61626c653a20636f6e747261637420697320696e69746960008201527f616c697a696e6700000000000000000000000000000000000000000000000000602082015250565b60805160601c61309b62000243600039600081816105fc0152818161068b01528181610785015281816108140152610bae015261309b6000f3fe6080604052600436106100fe5760003560e01c8063715018a611610095578063c4d66de811610064578063c4d66de8146102e4578063dda79b751461030d578063f2fde38b14610338578063f340fa0114610361578063f45346dc1461037d576100fe565b8063715018a6146102505780638c6f037f146102675780638da5cb5b14610290578063ae7a3a6f146102bb576100fe565b80634f1ef286116100d15780634f1ef286146101a15780635131ab59146101bd57806352d1902d146101fa5780635b11259114610225576100fe565b80631b8b921d146101035780631cff79cd1461012c57806329c59b5d1461015c5780633659cfe614610178575b600080fd5b34801561010f57600080fd5b5061012a600480360381019061012591906120fb565b6103a6565b005b610146600480360381019061014191906120fb565b610412565b604051610153919061278e565b60405180910390f35b610176600480360381019061017191906120fb565b610480565b005b34801561018457600080fd5b5061019f600480360381019061019a9190612046565b6105fa565b005b6101bb60048036038101906101b6919061215b565b610783565b005b3480156101c957600080fd5b506101e460048036038101906101df9190612073565b6108c0565b6040516101f1919061278e565b60405180910390f35b34801561020657600080fd5b5061020f610baa565b60405161021c919061274f565b60405180910390f35b34801561023157600080fd5b5061023a610c63565b60405161024791906126ab565b60405180910390f35b34801561025c57600080fd5b50610265610c89565b005b34801561027357600080fd5b5061028e6004803603810190610289919061220a565b610c9d565b005b34801561029c57600080fd5b506102a5610d99565b6040516102b291906126ab565b60405180910390f35b3480156102c757600080fd5b506102e260048036038101906102dd9190612046565b610dc3565b005b3480156102f057600080fd5b5061030b60048036038101906103069190612046565b610e07565b005b34801561031957600080fd5b50610322610ff6565b60405161032f91906126ab565b60405180910390f35b34801561034457600080fd5b5061035f600480360381019061035a9190612046565b61101c565b005b61037b60048036038101906103769190612046565b6110a0565b005b34801561038957600080fd5b506103a4600480360381019061039f91906121b7565b611214565b005b8273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f2a21062ee9199c2e205622999eeb7c3da73153674f36a0acd3f74fa6af67bde3848460405161040592919061276a565b60405180910390a3505050565b6060600061042185858561130a565b90508473ffffffffffffffffffffffffffffffffffffffff167fcaf938de11c367272220bfd1d2baa99ca46665e7bc4d85f00adb51b90fe1fa9f34868660405161046d93929190612a09565b60405180910390a2809150509392505050565b60003414156104bb576040517f7671265e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600060ca60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163460405161050390612696565b60006040518083038185875af1925050503d8060008114610540576040519150601f19603f3d011682016040523d82523d6000602084013e610545565b606091505b50509050600015158115151415610588576040517f79cacff100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8373ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f2103daedac6c1eee9e5bfbd02064d751c9ec3c03fb9bc3e4f94ca41afa38c1a434600087876040516105ec949392919061298d565b60405180910390a350505050565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163073ffffffffffffffffffffffffffffffffffffffff161415610689576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106809061280d565b60405180910390fd5b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166106c86113c1565b73ffffffffffffffffffffffffffffffffffffffff161461071e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107159061282d565b60405180910390fd5b61072781611418565b61078081600067ffffffffffffffff81111561074657610745612bca565b5b6040519080825280601f01601f1916602001820160405280156107785781602001600182028036833780820191505090505b506000611423565b50565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163073ffffffffffffffffffffffffffffffffffffffff161415610812576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016108099061280d565b60405180910390fd5b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166108516113c1565b73ffffffffffffffffffffffffffffffffffffffff16146108a7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161089e9061282d565b60405180910390fd5b6108b082611418565b6108bc82826001611423565b5050565b606060008414156108fd576040517f7671265e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61090786866115a0565b61093d576040517f8164f84200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8573ffffffffffffffffffffffffffffffffffffffff1663095ea7b386866040518363ffffffff1660e01b8152600401610978929190612726565b602060405180830381600087803b15801561099257600080fd5b505af11580156109a6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109ca9190612292565b610a00576040517f8164f84200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000610a0d86858561130a565b9050610a1987876115a0565b610a4f576040517f8164f84200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008773ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401610a8a91906126ab565b60206040518083038186803b158015610aa257600080fd5b505afa158015610ab6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ada91906122ec565b90506000811115610b3357610b3260c960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16828a73ffffffffffffffffffffffffffffffffffffffff166116389092919063ffffffff16565b5b8673ffffffffffffffffffffffffffffffffffffffff168873ffffffffffffffffffffffffffffffffffffffff167f29c40793bffd84cb810179f15d1ceec72bc7f0785514c668ba36645cf99b7382888888604051610b9493929190612a09565b60405180910390a3819250505095945050505050565b60007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163073ffffffffffffffffffffffffffffffffffffffff1614610c3a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c319061286d565b60405180910390fd5b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc60001b905090565b60ca60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b610c916116be565b610c9b600061173c565b565b6000841415610cd8576040517f951e19ed00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610d273360c960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16868673ffffffffffffffffffffffffffffffffffffffff16611802909392919063ffffffff16565b8473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f2103daedac6c1eee9e5bfbd02064d751c9ec3c03fb9bc3e4f94ca41afa38c1a486868686604051610d8a949392919061298d565b60405180910390a35050505050565b6000603360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b8060c960006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b60008060019054906101000a900460ff16159050808015610e385750600160008054906101000a900460ff1660ff16105b80610e655750610e473061188b565b158015610e645750600160008054906101000a900460ff1660ff16145b5b610ea4576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e9b906128ad565b60405180910390fd5b60016000806101000a81548160ff021916908360ff1602179055508015610ee1576001600060016101000a81548160ff0219169083151502179055505b610ee96118ae565b610ef1611907565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610f58576040517fd92e233d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8160ca60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508015610ff25760008060016101000a81548160ff0219169083151502179055507f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024986001604051610fe991906127b0565b60405180910390a15b5050565b60c960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6110246116be565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415611094576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161108b906127ed565b60405180910390fd5b61109d8161173c565b50565b60003414156110db576040517f7671265e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600060ca60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163460405161112390612696565b60006040518083038185875af1925050503d8060008114611160576040519150601f19603f3d011682016040523d82523d6000602084013e611165565b606091505b505090506000151581151514156111a8576040517f79cacff100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8173ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f2103daedac6c1eee9e5bfbd02064d751c9ec3c03fb9bc3e4f94ca41afa38c1a43460006040516112089291906129cd565b60405180910390a35050565b600082141561124f576040517f951e19ed00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61129e3360c960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16848473ffffffffffffffffffffffffffffffffffffffff16611802909392919063ffffffff16565b8273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f2103daedac6c1eee9e5bfbd02064d751c9ec3c03fb9bc3e4f94ca41afa38c1a484846040516112fd9291906129cd565b60405180910390a3505050565b60606000808573ffffffffffffffffffffffffffffffffffffffff16348686604051611337929190612666565b60006040518083038185875af1925050503d8060008114611374576040519150601f19603f3d011682016040523d82523d6000602084013e611379565b606091505b5091509150816113b5576040517facfdb44400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80925050509392505050565b60006113ef7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc60001b611958565b60000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6114206116be565b50565b61144f7f4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd914360001b611962565b60000160009054906101000a900460ff16156114735761146e8361196c565b61159b565b8273ffffffffffffffffffffffffffffffffffffffff166352d1902d6040518163ffffffff1660e01b815260040160206040518083038186803b1580156114b957600080fd5b505afa9250505080156114ea57506040513d601f19601f820116820180604052508101906114e791906122bf565b60015b611529576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611520906128cd565b60405180910390fd5b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc60001b811461158e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016115859061288d565b60405180910390fd5b5061159a838383611a25565b5b505050565b60008273ffffffffffffffffffffffffffffffffffffffff1663095ea7b38360006040518363ffffffff1660e01b81526004016115de9291906126fd565b602060405180830381600087803b1580156115f857600080fd5b505af115801561160c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116309190612292565b905092915050565b6116b98363a9059cbb60e01b8484604051602401611657929190612726565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050611a51565b505050565b6116c6611b18565b73ffffffffffffffffffffffffffffffffffffffff166116e4610d99565b73ffffffffffffffffffffffffffffffffffffffff161461173a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016117319061290d565b60405180910390fd5b565b6000603360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905081603360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b611885846323b872dd60e01b858585604051602401611823939291906126c6565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050611a51565b50505050565b6000808273ffffffffffffffffffffffffffffffffffffffff163b119050919050565b600060019054906101000a900460ff166118fd576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016118f49061294d565b60405180910390fd5b611905611b20565b565b600060019054906101000a900460ff16611956576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161194d9061294d565b60405180910390fd5b565b6000819050919050565b6000819050919050565b6119758161188b565b6119b4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016119ab906128ed565b60405180910390fd5b806119e17f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc60001b611958565b60000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b611a2e83611b81565b600082511180611a3b5750805b15611a4c57611a4a8383611bd0565b505b505050565b6000611ab3826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff16611bfd9092919063ffffffff16565b9050600081511115611b135780806020019051810190611ad39190612292565b611b12576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611b099061296d565b60405180910390fd5b5b505050565b600033905090565b600060019054906101000a900460ff16611b6f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611b669061294d565b60405180910390fd5b611b7f611b7a611b18565b61173c565b565b611b8a8161196c565b8073ffffffffffffffffffffffffffffffffffffffff167fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b60405160405180910390a250565b6060611bf5838360405180606001604052806027815260200161303f60279139611c15565b905092915050565b6060611c0c8484600085611c9b565b90509392505050565b60606000808573ffffffffffffffffffffffffffffffffffffffff1685604051611c3f919061267f565b600060405180830381855af49150503d8060008114611c7a576040519150601f19603f3d011682016040523d82523d6000602084013e611c7f565b606091505b5091509150611c9086838387611d68565b925050509392505050565b606082471015611ce0576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611cd79061284d565b60405180910390fd5b6000808673ffffffffffffffffffffffffffffffffffffffff168587604051611d09919061267f565b60006040518083038185875af1925050503d8060008114611d46576040519150601f19603f3d011682016040523d82523d6000602084013e611d4b565b606091505b5091509150611d5c87838387611dde565b92505050949350505050565b60608315611dcb57600083511415611dc357611d838561188b565b611dc2576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611db99061292d565b60405180910390fd5b5b829050611dd6565b611dd58383611e54565b5b949350505050565b60608315611e4157600083511415611e3957611df985611ea4565b611e38576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611e2f9061292d565b60405180910390fd5b5b829050611e4c565b611e4b8383611ec7565b5b949350505050565b600082511115611e675781518083602001fd5b806040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611e9b91906127cb565b60405180910390fd5b6000808273ffffffffffffffffffffffffffffffffffffffff163b119050919050565b600082511115611eda5781518083602001fd5b806040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611f0e91906127cb565b60405180910390fd5b6000611f2a611f2584612a60565b612a3b565b905082815260208101848484011115611f4657611f45612c08565b5b611f51848285612b57565b509392505050565b600081359050611f6881612fe2565b92915050565b600081519050611f7d81612ff9565b92915050565b600081519050611f9281613010565b92915050565b60008083601f840112611fae57611fad612bfe565b5b8235905067ffffffffffffffff811115611fcb57611fca612bf9565b5b602083019150836001820283011115611fe757611fe6612c03565b5b9250929050565b600082601f83011261200357612002612bfe565b5b8135612013848260208601611f17565b91505092915050565b60008135905061202b81613027565b92915050565b60008151905061204081613027565b92915050565b60006020828403121561205c5761205b612c12565b5b600061206a84828501611f59565b91505092915050565b60008060008060006080868803121561208f5761208e612c12565b5b600061209d88828901611f59565b95505060206120ae88828901611f59565b94505060406120bf8882890161201c565b935050606086013567ffffffffffffffff8111156120e0576120df612c0d565b5b6120ec88828901611f98565b92509250509295509295909350565b60008060006040848603121561211457612113612c12565b5b600061212286828701611f59565b935050602084013567ffffffffffffffff81111561214357612142612c0d565b5b61214f86828701611f98565b92509250509250925092565b6000806040838503121561217257612171612c12565b5b600061218085828601611f59565b925050602083013567ffffffffffffffff8111156121a1576121a0612c0d565b5b6121ad85828601611fee565b9150509250929050565b6000806000606084860312156121d0576121cf612c12565b5b60006121de86828701611f59565b93505060206121ef8682870161201c565b925050604061220086828701611f59565b9150509250925092565b60008060008060006080868803121561222657612225612c12565b5b600061223488828901611f59565b95505060206122458882890161201c565b945050604061225688828901611f59565b935050606086013567ffffffffffffffff81111561227757612276612c0d565b5b61228388828901611f98565b92509250509295509295909350565b6000602082840312156122a8576122a7612c12565b5b60006122b684828501611f6e565b91505092915050565b6000602082840312156122d5576122d4612c12565b5b60006122e384828501611f83565b91505092915050565b60006020828403121561230257612301612c12565b5b600061231084828501612031565b91505092915050565b61232281612ad4565b82525050565b61233181612af2565b82525050565b60006123438385612aa7565b9350612350838584612b57565b61235983612c17565b840190509392505050565b60006123708385612ab8565b935061237d838584612b57565b82840190509392505050565b600061239482612a91565b61239e8185612aa7565b93506123ae818560208601612b66565b6123b781612c17565b840191505092915050565b60006123cd82612a91565b6123d78185612ab8565b93506123e7818560208601612b66565b80840191505092915050565b6123fc81612b33565b82525050565b61240b81612b45565b82525050565b600061241c82612a9c565b6124268185612ac3565b9350612436818560208601612b66565b61243f81612c17565b840191505092915050565b6000612457602683612ac3565b915061246282612c28565b604082019050919050565b600061247a602c83612ac3565b915061248582612c77565b604082019050919050565b600061249d602c83612ac3565b91506124a882612cc6565b604082019050919050565b60006124c0602683612ac3565b91506124cb82612d15565b604082019050919050565b60006124e3603883612ac3565b91506124ee82612d64565b604082019050919050565b6000612506602983612ac3565b915061251182612db3565b604082019050919050565b6000612529602e83612ac3565b915061253482612e02565b604082019050919050565b600061254c602e83612ac3565b915061255782612e51565b604082019050919050565b600061256f602d83612ac3565b915061257a82612ea0565b604082019050919050565b6000612592602083612ac3565b915061259d82612eef565b602082019050919050565b60006125b5600083612aa7565b91506125c082612f18565b600082019050919050565b60006125d8600083612ab8565b91506125e382612f18565b600082019050919050565b60006125fb601d83612ac3565b915061260682612f1b565b602082019050919050565b600061261e602b83612ac3565b915061262982612f44565b604082019050919050565b6000612641602a83612ac3565b915061264c82612f93565b604082019050919050565b61266081612b1c565b82525050565b6000612673828486612364565b91508190509392505050565b600061268b82846123c2565b915081905092915050565b60006126a1826125cb565b9150819050919050565b60006020820190506126c06000830184612319565b92915050565b60006060820190506126db6000830186612319565b6126e86020830185612319565b6126f56040830184612657565b949350505050565b60006040820190506127126000830185612319565b61271f60208301846123f3565b9392505050565b600060408201905061273b6000830185612319565b6127486020830184612657565b9392505050565b60006020820190506127646000830184612328565b92915050565b60006020820190508181036000830152612785818486612337565b90509392505050565b600060208201905081810360008301526127a88184612389565b905092915050565b60006020820190506127c56000830184612402565b92915050565b600060208201905081810360008301526127e58184612411565b905092915050565b600060208201905081810360008301526128068161244a565b9050919050565b600060208201905081810360008301526128268161246d565b9050919050565b6000602082019050818103600083015261284681612490565b9050919050565b60006020820190508181036000830152612866816124b3565b9050919050565b60006020820190508181036000830152612886816124d6565b9050919050565b600060208201905081810360008301526128a6816124f9565b9050919050565b600060208201905081810360008301526128c68161251c565b9050919050565b600060208201905081810360008301526128e68161253f565b9050919050565b6000602082019050818103600083015261290681612562565b9050919050565b6000602082019050818103600083015261292681612585565b9050919050565b60006020820190508181036000830152612946816125ee565b9050919050565b6000602082019050818103600083015261296681612611565b9050919050565b6000602082019050818103600083015261298681612634565b9050919050565b60006060820190506129a26000830187612657565b6129af6020830186612319565b81810360408301526129c2818486612337565b905095945050505050565b60006060820190506129e26000830185612657565b6129ef6020830184612319565b8181036040830152612a00816125a8565b90509392505050565b6000604082019050612a1e6000830186612657565b8181036020830152612a31818486612337565b9050949350505050565b6000612a45612a56565b9050612a518282612b99565b919050565b6000604051905090565b600067ffffffffffffffff821115612a7b57612a7a612bca565b5b612a8482612c17565b9050602081019050919050565b600081519050919050565b600081519050919050565b600082825260208201905092915050565b600081905092915050565b600082825260208201905092915050565b6000612adf82612afc565b9050919050565b60008115159050919050565b6000819050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b6000612b3e82612b1c565b9050919050565b6000612b5082612b26565b9050919050565b82818337600083830152505050565b60005b83811015612b84578082015181840152602081019050612b69565b83811115612b93576000848401525b50505050565b612ba282612c17565b810181811067ffffffffffffffff82111715612bc157612bc0612bca565b5b80604052505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b7f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060008201527f64656c656761746563616c6c0000000000000000000000000000000000000000602082015250565b7f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060008201527f6163746976652070726f78790000000000000000000000000000000000000000602082015250565b7f416464726573733a20696e73756666696369656e742062616c616e636520666f60008201527f722063616c6c0000000000000000000000000000000000000000000000000000602082015250565b7f555550535570677261646561626c653a206d757374206e6f742062652063616c60008201527f6c6564207468726f7567682064656c656761746563616c6c0000000000000000602082015250565b7f45524331393637557067726164653a20756e737570706f727465642070726f7860008201527f6961626c65555549440000000000000000000000000000000000000000000000602082015250565b7f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160008201527f647920696e697469616c697a6564000000000000000000000000000000000000602082015250565b7f45524331393637557067726164653a206e657720696d706c656d656e7461746960008201527f6f6e206973206e6f742055555053000000000000000000000000000000000000602082015250565b7f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60008201527f6f74206120636f6e747261637400000000000000000000000000000000000000602082015250565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b50565b7f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000600082015250565b7f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960008201527f6e697469616c697a696e67000000000000000000000000000000000000000000602082015250565b7f5361666545524332303a204552433230206f7065726174696f6e20646964206e60008201527f6f74207375636365656400000000000000000000000000000000000000000000602082015250565b612feb81612ad4565b8114612ff657600080fd5b50565b61300281612ae6565b811461300d57600080fd5b50565b61301981612af2565b811461302457600080fd5b50565b61303081612b1c565b811461303b57600080fd5b5056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a2646970667358221220ce6c31e036a415fe1b2bbbacae5415c7dea6e9294c986a57647ed0eb0b94d4d064736f6c63430008070033"; + +type GatewayEVMConstructorParams = + | [signer?: Signer] + | ConstructorParameters; + +const isSuperArgs = ( + xs: GatewayEVMConstructorParams +): xs is ConstructorParameters => xs.length > 1; + +export class GatewayEVM__factory extends ContractFactory { + constructor(...args: GatewayEVMConstructorParams) { + 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): GatewayEVM { + return super.attach(address) as GatewayEVM; + } + override connect(signer: Signer): GatewayEVM__factory { + return super.connect(signer) as GatewayEVM__factory; + } + + static readonly bytecode = _bytecode; + static readonly abi = _abi; + static createInterface(): GatewayEVMInterface { + return new utils.Interface(_abi) as GatewayEVMInterface; + } + static connect( + address: string, + signerOrProvider: Signer | Provider + ): GatewayEVM { + return new Contract(address, _abi, signerOrProvider) as GatewayEVM; + } +} diff --git a/typechain-types/factories/contracts/prototypes/evm/GatewayUpgradeTest__factory.ts b/typechain-types/factories/contracts/prototypes/evm/GatewayUpgradeTest__factory.ts new file mode 100644 index 00000000..1bf811e3 --- /dev/null +++ b/typechain-types/factories/contracts/prototypes/evm/GatewayUpgradeTest__factory.ts @@ -0,0 +1,488 @@ +/* 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 { + GatewayUpgradeTest, + GatewayUpgradeTestInterface, +} from "../../../../contracts/prototypes/evm/GatewayUpgradeTest"; + +const _abi = [ + { + inputs: [], + stateMutability: "nonpayable", + type: "constructor", + }, + { + inputs: [], + name: "ExecutionFailed", + type: "error", + }, + { + inputs: [], + name: "InsufficientETHAmount", + type: "error", + }, + { + inputs: [], + name: "SendFailed", + 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: "destination", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "value", + type: "uint256", + }, + { + indexed: false, + internalType: "bytes", + name: "data", + type: "bytes", + }, + ], + name: "ExecutedV2", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "token", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "to", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "amount", + type: "uint256", + }, + { + indexed: false, + internalType: "bytes", + name: "data", + type: "bytes", + }, + ], + name: "ExecutedWithERC20", + 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: false, + internalType: "bytes", + name: "recipient", + type: "bytes", + }, + { + indexed: false, + internalType: "uint256", + name: "amount", + type: "uint256", + }, + ], + name: "Send", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "bytes", + name: "recipient", + type: "bytes", + }, + { + indexed: true, + internalType: "address", + name: "asset", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "amount", + type: "uint256", + }, + ], + name: "SendERC20", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "implementation", + type: "address", + }, + ], + name: "Upgraded", + type: "event", + }, + { + inputs: [], + name: "custody", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "destination", + type: "address", + }, + { + internalType: "bytes", + name: "data", + type: "bytes", + }, + ], + name: "execute", + outputs: [ + { + internalType: "bytes", + name: "", + type: "bytes", + }, + ], + stateMutability: "payable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "token", + type: "address", + }, + { + internalType: "address", + name: "to", + type: "address", + }, + { + internalType: "uint256", + name: "amount", + type: "uint256", + }, + { + internalType: "bytes", + name: "data", + type: "bytes", + }, + ], + name: "executeWithERC20", + outputs: [ + { + internalType: "bytes", + name: "", + type: "bytes", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_tssAddress", + type: "address", + }, + ], + 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: "bytes", + name: "recipient", + type: "bytes", + }, + { + internalType: "uint256", + name: "amount", + type: "uint256", + }, + ], + name: "send", + outputs: [], + stateMutability: "payable", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes", + name: "recipient", + type: "bytes", + }, + { + internalType: "address", + name: "token", + type: "address", + }, + { + internalType: "uint256", + name: "amount", + type: "uint256", + }, + ], + name: "sendERC20", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_custody", + type: "address", + }, + ], + name: "setCustody", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "newOwner", + type: "address", + }, + ], + name: "transferOwnership", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "tssAddress", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + 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", + }, +] as const; + +const _bytecode = + "0x60a06040523073ffffffffffffffffffffffffffffffffffffffff1660809073ffffffffffffffffffffffffffffffffffffffff1660601b8152503480156200004757600080fd5b50620000586200005e60201b60201c565b62000208565b600060019054906101000a900460ff1615620000b1576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401620000a8906200015c565b60405180910390fd5b60ff801660008054906101000a900460ff1660ff1614620001225760ff6000806101000a81548160ff021916908360ff1602179055507f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb384740249860ff6040516200011991906200017e565b60405180910390a15b565b6000620001336027836200019b565b91506200014082620001b9565b604082019050919050565b6200015681620001ac565b82525050565b60006020820190508181036000830152620001778162000124565b9050919050565b60006020820190506200019560008301846200014b565b92915050565b600082825260208201905092915050565b600060ff82169050919050565b7f496e697469616c697a61626c653a20636f6e747261637420697320696e69746960008201527f616c697a696e6700000000000000000000000000000000000000000000000000602082015250565b60805160601c6126b5620002436000396000818161038701528181610416015281816105100152818161059f015261093b01526126b56000f3fe6080604052600436106100dd5760003560e01c80638da5cb5b1161007f578063c4d66de811610059578063c4d66de814610271578063cb0271ed1461029a578063dda79b75146102c3578063f2fde38b146102ee576100dd565b80638da5cb5b146102015780639372c4ab1461022c578063ae7a3a6f14610248576100dd565b80635131ab59116100bb5780635131ab591461015757806352d1902d146101945780635b112591146101bf578063715018a6146101ea576100dd565b80631cff79cd146100e25780633659cfe6146101125780634f1ef2861461013b575b600080fd5b6100fc60048036038101906100f791906118d1565b610317565b6040516101099190611f02565b60405180910390f35b34801561011e57600080fd5b506101396004803603810190610134919061181c565b610385565b005b61015560048036038101906101509190611931565b61050e565b005b34801561016357600080fd5b5061017e60048036038101906101799190611849565b61064b565b60405161018b9190611f02565b60405180910390f35b3480156101a057600080fd5b506101a9610937565b6040516101b69190611eb5565b60405180910390f35b3480156101cb57600080fd5b506101d46109f0565b6040516101e19190611e11565b60405180910390f35b3480156101f657600080fd5b506101ff610a16565b005b34801561020d57600080fd5b50610216610a2a565b6040516102239190611e11565b60405180910390f35b61024660048036038101906102419190611a5b565b610a54565b005b34801561025457600080fd5b5061026f600480360381019061026a919061181c565b610b9c565b005b34801561027d57600080fd5b506102986004803603810190610293919061181c565b610be0565b005b3480156102a657600080fd5b506102c160048036038101906102bc91906119e7565b610d68565b005b3480156102cf57600080fd5b506102d8610e72565b6040516102e59190611e11565b60405180910390f35b3480156102fa57600080fd5b506103156004803603810190610310919061181c565b610e98565b005b60606000610326858585610f1c565b90508473ffffffffffffffffffffffffffffffffffffffff167f373df382b9c587826f3de13f16d67f8d99f28ee947fc0924c6ef2d6d2c7e8546348686604051610372939291906120c1565b60405180910390a2809150509392505050565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163073ffffffffffffffffffffffffffffffffffffffff161415610414576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161040b90611f81565b60405180910390fd5b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16610453610fd3565b73ffffffffffffffffffffffffffffffffffffffff16146104a9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016104a090611fa1565b60405180910390fd5b6104b28161102a565b61050b81600067ffffffffffffffff8111156104d1576104d0612282565b5b6040519080825280601f01601f1916602001820160405280156105035781602001600182028036833780820191505090505b506000611035565b50565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163073ffffffffffffffffffffffffffffffffffffffff16141561059d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161059490611f81565b60405180910390fd5b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166105dc610fd3565b73ffffffffffffffffffffffffffffffffffffffff1614610632576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062990611fa1565b60405180910390fd5b61063b8261102a565b61064782826001611035565b5050565b60608573ffffffffffffffffffffffffffffffffffffffff1663095ea7b386866040518363ffffffff1660e01b8152600401610688929190611e8c565b602060405180830381600087803b1580156106a257600080fd5b505af11580156106b6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106da919061198d565b5060006106e8868585610f1c565b90508673ffffffffffffffffffffffffffffffffffffffff1663095ea7b38760006040518363ffffffff1660e01b8152600401610726929190611e63565b602060405180830381600087803b15801561074057600080fd5b505af1158015610754573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610778919061198d565b5060008773ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b81526004016107b49190611e11565b60206040518083038186803b1580156107cc57600080fd5b505afa1580156107e0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108049190611abb565b905060008111156108c0578773ffffffffffffffffffffffffffffffffffffffff1663a9059cbb60c960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16836040518363ffffffff1660e01b815260040161086c929190611e8c565b602060405180830381600087803b15801561088657600080fd5b505af115801561089a573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108be919061198d565b505b8673ffffffffffffffffffffffffffffffffffffffff168873ffffffffffffffffffffffffffffffffffffffff167f29c40793bffd84cb810179f15d1ceec72bc7f0785514c668ba36645cf99b7382888888604051610921939291906120c1565b60405180910390a3819250505095945050505050565b60007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163073ffffffffffffffffffffffffffffffffffffffff16146109c7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109be90611fc1565b60405180910390fd5b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc60001b905090565b60ca60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b610a1e6111b2565b610a286000611230565b565b6000603360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b80341015610a8e576040517f7671265e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600060ca60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1682604051610ad690611dfc565b60006040518083038185875af1925050503d8060008114610b13576040519150601f19603f3d011682016040523d82523d6000602084013e610b18565b606091505b50509050600015158115151415610b5b576040517f81063e5100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b7fa93afc57f3be4641cf20c7165d11856f3b46dd376108e5fffb06f73f2b2a6d58848484604051610b8e93929190611ed0565b60405180910390a150505050565b8060c960006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b60008060019054906101000a900460ff16159050808015610c115750600160008054906101000a900460ff1660ff16105b80610c3e5750610c20306112f6565b158015610c3d5750600160008054906101000a900460ff1660ff16145b5b610c7d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c7490612001565b60405180910390fd5b60016000806101000a81548160ff021916908360ff1602179055508015610cba576001600060016101000a81548160ff0219169083151502179055505b610cc2611319565b610cca611372565b8160ca60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508015610d645760008060016101000a81548160ff0219169083151502179055507f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024986001604051610d5b9190611f24565b60405180910390a15b5050565b8173ffffffffffffffffffffffffffffffffffffffff166323b872dd3360c960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16846040518463ffffffff1660e01b8152600401610dc793929190611e2c565b602060405180830381600087803b158015610de157600080fd5b505af1158015610df5573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e19919061198d565b508173ffffffffffffffffffffffffffffffffffffffff167f35fb30ed1b8e81eb91001dad742b13b1491a67c722e8c593a886a18500f7d9af858584604051610e6493929190611ed0565b60405180910390a250505050565b60c960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b610ea06111b2565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415610f10576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f0790611f61565b60405180910390fd5b610f1981611230565b50565b60606000808573ffffffffffffffffffffffffffffffffffffffff16348686604051610f49929190611dcc565b60006040518083038185875af1925050503d8060008114610f86576040519150601f19603f3d011682016040523d82523d6000602084013e610f8b565b606091505b509150915081610fc7576040517facfdb44400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80925050509392505050565b60006110017f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc60001b6113c3565b60000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6110326111b2565b50565b6110617f4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd914360001b6113cd565b60000160009054906101000a900460ff161561108557611080836113d7565b6111ad565b8273ffffffffffffffffffffffffffffffffffffffff166352d1902d6040518163ffffffff1660e01b815260040160206040518083038186803b1580156110cb57600080fd5b505afa9250505080156110fc57506040513d601f19601f820116820180604052508101906110f991906119ba565b60015b61113b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161113290612021565b60405180910390fd5b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc60001b81146111a0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161119790611fe1565b60405180910390fd5b506111ac838383611490565b5b505050565b6111ba6114bc565b73ffffffffffffffffffffffffffffffffffffffff166111d8610a2a565b73ffffffffffffffffffffffffffffffffffffffff161461122e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161122590612061565b60405180910390fd5b565b6000603360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905081603360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b6000808273ffffffffffffffffffffffffffffffffffffffff163b119050919050565b600060019054906101000a900460ff16611368576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161135f906120a1565b60405180910390fd5b6113706114c4565b565b600060019054906101000a900460ff166113c1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016113b8906120a1565b60405180910390fd5b565b6000819050919050565b6000819050919050565b6113e0816112f6565b61141f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161141690612041565b60405180910390fd5b8061144c7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc60001b6113c3565b60000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b61149983611525565b6000825111806114a65750805b156114b7576114b58383611574565b505b505050565b600033905090565b600060019054906101000a900460ff16611513576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161150a906120a1565b60405180910390fd5b61152361151e6114bc565b611230565b565b61152e816113d7565b8073ffffffffffffffffffffffffffffffffffffffff167fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b60405160405180910390a250565b60606115998383604051806060016040528060278152602001612659602791396115a1565b905092915050565b60606000808573ffffffffffffffffffffffffffffffffffffffff16856040516115cb9190611de5565b600060405180830381855af49150503d8060008114611606576040519150601f19603f3d011682016040523d82523d6000602084013e61160b565b606091505b509150915061161c86838387611627565b925050509392505050565b6060831561168a5760008351141561168257611642856112f6565b611681576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161167890612081565b60405180910390fd5b5b829050611695565b611694838361169d565b5b949350505050565b6000825111156116b05781518083602001fd5b806040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016116e49190611f3f565b60405180910390fd5b60006117006116fb84612118565b6120f3565b90508281526020810184848401111561171c5761171b6122c0565b5b61172784828561220f565b509392505050565b60008135905061173e816125fc565b92915050565b60008151905061175381612613565b92915050565b6000815190506117688161262a565b92915050565b60008083601f840112611784576117836122b6565b5b8235905067ffffffffffffffff8111156117a1576117a06122b1565b5b6020830191508360018202830111156117bd576117bc6122bb565b5b9250929050565b600082601f8301126117d9576117d86122b6565b5b81356117e98482602086016116ed565b91505092915050565b60008135905061180181612641565b92915050565b60008151905061181681612641565b92915050565b600060208284031215611832576118316122ca565b5b60006118408482850161172f565b91505092915050565b600080600080600060808688031215611865576118646122ca565b5b60006118738882890161172f565b95505060206118848882890161172f565b9450506040611895888289016117f2565b935050606086013567ffffffffffffffff8111156118b6576118b56122c5565b5b6118c28882890161176e565b92509250509295509295909350565b6000806000604084860312156118ea576118e96122ca565b5b60006118f88682870161172f565b935050602084013567ffffffffffffffff811115611919576119186122c5565b5b6119258682870161176e565b92509250509250925092565b60008060408385031215611948576119476122ca565b5b60006119568582860161172f565b925050602083013567ffffffffffffffff811115611977576119766122c5565b5b611983858286016117c4565b9150509250929050565b6000602082840312156119a3576119a26122ca565b5b60006119b184828501611744565b91505092915050565b6000602082840312156119d0576119cf6122ca565b5b60006119de84828501611759565b91505092915050565b60008060008060608587031215611a0157611a006122ca565b5b600085013567ffffffffffffffff811115611a1f57611a1e6122c5565b5b611a2b8782880161176e565b94509450506020611a3e8782880161172f565b9250506040611a4f878288016117f2565b91505092959194509250565b600080600060408486031215611a7457611a736122ca565b5b600084013567ffffffffffffffff811115611a9257611a916122c5565b5b611a9e8682870161176e565b93509350506020611ab1868287016117f2565b9150509250925092565b600060208284031215611ad157611ad06122ca565b5b6000611adf84828501611807565b91505092915050565b611af18161218c565b82525050565b611b00816121aa565b82525050565b6000611b12838561215f565b9350611b1f83858461220f565b611b28836122cf565b840190509392505050565b6000611b3f8385612170565b9350611b4c83858461220f565b82840190509392505050565b6000611b6382612149565b611b6d818561215f565b9350611b7d81856020860161221e565b611b86816122cf565b840191505092915050565b6000611b9c82612149565b611ba68185612170565b9350611bb681856020860161221e565b80840191505092915050565b611bcb816121eb565b82525050565b611bda816121fd565b82525050565b6000611beb82612154565b611bf5818561217b565b9350611c0581856020860161221e565b611c0e816122cf565b840191505092915050565b6000611c2660268361217b565b9150611c31826122e0565b604082019050919050565b6000611c49602c8361217b565b9150611c548261232f565b604082019050919050565b6000611c6c602c8361217b565b9150611c778261237e565b604082019050919050565b6000611c8f60388361217b565b9150611c9a826123cd565b604082019050919050565b6000611cb260298361217b565b9150611cbd8261241c565b604082019050919050565b6000611cd5602e8361217b565b9150611ce08261246b565b604082019050919050565b6000611cf8602e8361217b565b9150611d03826124ba565b604082019050919050565b6000611d1b602d8361217b565b9150611d2682612509565b604082019050919050565b6000611d3e60208361217b565b9150611d4982612558565b602082019050919050565b6000611d61600083612170565b9150611d6c82612581565b600082019050919050565b6000611d84601d8361217b565b9150611d8f82612584565b602082019050919050565b6000611da7602b8361217b565b9150611db2826125ad565b604082019050919050565b611dc6816121d4565b82525050565b6000611dd9828486611b33565b91508190509392505050565b6000611df18284611b91565b915081905092915050565b6000611e0782611d54565b9150819050919050565b6000602082019050611e266000830184611ae8565b92915050565b6000606082019050611e416000830186611ae8565b611e4e6020830185611ae8565b611e5b6040830184611dbd565b949350505050565b6000604082019050611e786000830185611ae8565b611e856020830184611bc2565b9392505050565b6000604082019050611ea16000830185611ae8565b611eae6020830184611dbd565b9392505050565b6000602082019050611eca6000830184611af7565b92915050565b60006040820190508181036000830152611eeb818587611b06565b9050611efa6020830184611dbd565b949350505050565b60006020820190508181036000830152611f1c8184611b58565b905092915050565b6000602082019050611f396000830184611bd1565b92915050565b60006020820190508181036000830152611f598184611be0565b905092915050565b60006020820190508181036000830152611f7a81611c19565b9050919050565b60006020820190508181036000830152611f9a81611c3c565b9050919050565b60006020820190508181036000830152611fba81611c5f565b9050919050565b60006020820190508181036000830152611fda81611c82565b9050919050565b60006020820190508181036000830152611ffa81611ca5565b9050919050565b6000602082019050818103600083015261201a81611cc8565b9050919050565b6000602082019050818103600083015261203a81611ceb565b9050919050565b6000602082019050818103600083015261205a81611d0e565b9050919050565b6000602082019050818103600083015261207a81611d31565b9050919050565b6000602082019050818103600083015261209a81611d77565b9050919050565b600060208201905081810360008301526120ba81611d9a565b9050919050565b60006040820190506120d66000830186611dbd565b81810360208301526120e9818486611b06565b9050949350505050565b60006120fd61210e565b90506121098282612251565b919050565b6000604051905090565b600067ffffffffffffffff82111561213357612132612282565b5b61213c826122cf565b9050602081019050919050565b600081519050919050565b600081519050919050565b600082825260208201905092915050565b600081905092915050565b600082825260208201905092915050565b6000612197826121b4565b9050919050565b60008115159050919050565b6000819050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b60006121f6826121d4565b9050919050565b6000612208826121de565b9050919050565b82818337600083830152505050565b60005b8381101561223c578082015181840152602081019050612221565b8381111561224b576000848401525b50505050565b61225a826122cf565b810181811067ffffffffffffffff8211171561227957612278612282565b5b80604052505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b7f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060008201527f64656c656761746563616c6c0000000000000000000000000000000000000000602082015250565b7f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060008201527f6163746976652070726f78790000000000000000000000000000000000000000602082015250565b7f555550535570677261646561626c653a206d757374206e6f742062652063616c60008201527f6c6564207468726f7567682064656c656761746563616c6c0000000000000000602082015250565b7f45524331393637557067726164653a20756e737570706f727465642070726f7860008201527f6961626c65555549440000000000000000000000000000000000000000000000602082015250565b7f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160008201527f647920696e697469616c697a6564000000000000000000000000000000000000602082015250565b7f45524331393637557067726164653a206e657720696d706c656d656e7461746960008201527f6f6e206973206e6f742055555053000000000000000000000000000000000000602082015250565b7f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60008201527f6f74206120636f6e747261637400000000000000000000000000000000000000602082015250565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b50565b7f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000600082015250565b7f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960008201527f6e697469616c697a696e67000000000000000000000000000000000000000000602082015250565b6126058161218c565b811461261057600080fd5b50565b61261c8161219e565b811461262757600080fd5b50565b612633816121aa565b811461263e57600080fd5b50565b61264a816121d4565b811461265557600080fd5b5056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a2646970667358221220f9e6a4cee513b2822548c38bc338fc47226488d211aa133e6b4c074eac2122a764736f6c63430008070033"; + +type GatewayUpgradeTestConstructorParams = + | [signer?: Signer] + | ConstructorParameters; + +const isSuperArgs = ( + xs: GatewayUpgradeTestConstructorParams +): xs is ConstructorParameters => xs.length > 1; + +export class GatewayUpgradeTest__factory extends ContractFactory { + constructor(...args: GatewayUpgradeTestConstructorParams) { + 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): GatewayUpgradeTest { + return super.attach(address) as GatewayUpgradeTest; + } + override connect(signer: Signer): GatewayUpgradeTest__factory { + return super.connect(signer) as GatewayUpgradeTest__factory; + } + + static readonly bytecode = _bytecode; + static readonly abi = _abi; + static createInterface(): GatewayUpgradeTestInterface { + return new utils.Interface(_abi) as GatewayUpgradeTestInterface; + } + static connect( + address: string, + signerOrProvider: Signer | Provider + ): GatewayUpgradeTest { + return new Contract(address, _abi, signerOrProvider) as GatewayUpgradeTest; + } +} diff --git a/typechain-types/factories/contracts/prototypes/evm/Gateway__factory.ts b/typechain-types/factories/contracts/prototypes/evm/Gateway__factory.ts new file mode 100644 index 00000000..a19f6505 --- /dev/null +++ b/typechain-types/factories/contracts/prototypes/evm/Gateway__factory.ts @@ -0,0 +1,488 @@ +/* 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 { + Gateway, + GatewayInterface, +} from "../../../../contracts/prototypes/evm/Gateway"; + +const _abi = [ + { + inputs: [], + stateMutability: "nonpayable", + type: "constructor", + }, + { + inputs: [], + name: "ExecutionFailed", + type: "error", + }, + { + inputs: [], + name: "InsufficientETHAmount", + type: "error", + }, + { + inputs: [], + name: "SendFailed", + 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: "destination", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "value", + type: "uint256", + }, + { + indexed: false, + internalType: "bytes", + name: "data", + type: "bytes", + }, + ], + name: "Executed", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "token", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "to", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "amount", + type: "uint256", + }, + { + indexed: false, + internalType: "bytes", + name: "data", + type: "bytes", + }, + ], + name: "ExecutedWithERC20", + 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: false, + internalType: "bytes", + name: "recipient", + type: "bytes", + }, + { + indexed: false, + internalType: "uint256", + name: "amount", + type: "uint256", + }, + ], + name: "Send", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "bytes", + name: "recipient", + type: "bytes", + }, + { + indexed: true, + internalType: "address", + name: "asset", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "amount", + type: "uint256", + }, + ], + name: "SendERC20", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "implementation", + type: "address", + }, + ], + name: "Upgraded", + type: "event", + }, + { + inputs: [], + name: "custody", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "destination", + type: "address", + }, + { + internalType: "bytes", + name: "data", + type: "bytes", + }, + ], + name: "execute", + outputs: [ + { + internalType: "bytes", + name: "", + type: "bytes", + }, + ], + stateMutability: "payable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "token", + type: "address", + }, + { + internalType: "address", + name: "to", + type: "address", + }, + { + internalType: "uint256", + name: "amount", + type: "uint256", + }, + { + internalType: "bytes", + name: "data", + type: "bytes", + }, + ], + name: "executeWithERC20", + outputs: [ + { + internalType: "bytes", + name: "", + type: "bytes", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_tssAddress", + type: "address", + }, + ], + 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: "bytes", + name: "recipient", + type: "bytes", + }, + { + internalType: "uint256", + name: "amount", + type: "uint256", + }, + ], + name: "send", + outputs: [], + stateMutability: "payable", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes", + name: "recipient", + type: "bytes", + }, + { + internalType: "address", + name: "token", + type: "address", + }, + { + internalType: "uint256", + name: "amount", + type: "uint256", + }, + ], + name: "sendERC20", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_custody", + type: "address", + }, + ], + name: "setCustody", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "newOwner", + type: "address", + }, + ], + name: "transferOwnership", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "tssAddress", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + 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", + }, +] as const; + +const _bytecode = + "0x60a06040523073ffffffffffffffffffffffffffffffffffffffff1660809073ffffffffffffffffffffffffffffffffffffffff1660601b8152503480156200004757600080fd5b50620000586200005e60201b60201c565b62000208565b600060019054906101000a900460ff1615620000b1576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401620000a8906200015c565b60405180910390fd5b60ff801660008054906101000a900460ff1660ff1614620001225760ff6000806101000a81548160ff021916908360ff1602179055507f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb384740249860ff6040516200011991906200017e565b60405180910390a15b565b6000620001336027836200019b565b91506200014082620001b9565b604082019050919050565b6200015681620001ac565b82525050565b60006020820190508181036000830152620001778162000124565b9050919050565b60006020820190506200019560008301846200014b565b92915050565b600082825260208201905092915050565b600060ff82169050919050565b7f496e697469616c697a61626c653a20636f6e747261637420697320696e69746960008201527f616c697a696e6700000000000000000000000000000000000000000000000000602082015250565b60805160601c6126b5620002436000396000818161038701528181610416015281816105100152818161059f015261093b01526126b56000f3fe6080604052600436106100dd5760003560e01c80638da5cb5b1161007f578063c4d66de811610059578063c4d66de814610271578063cb0271ed1461029a578063dda79b75146102c3578063f2fde38b146102ee576100dd565b80638da5cb5b146102015780639372c4ab1461022c578063ae7a3a6f14610248576100dd565b80635131ab59116100bb5780635131ab591461015757806352d1902d146101945780635b112591146101bf578063715018a6146101ea576100dd565b80631cff79cd146100e25780633659cfe6146101125780634f1ef2861461013b575b600080fd5b6100fc60048036038101906100f791906118d1565b610317565b6040516101099190611f02565b60405180910390f35b34801561011e57600080fd5b506101396004803603810190610134919061181c565b610385565b005b61015560048036038101906101509190611931565b61050e565b005b34801561016357600080fd5b5061017e60048036038101906101799190611849565b61064b565b60405161018b9190611f02565b60405180910390f35b3480156101a057600080fd5b506101a9610937565b6040516101b69190611eb5565b60405180910390f35b3480156101cb57600080fd5b506101d46109f0565b6040516101e19190611e11565b60405180910390f35b3480156101f657600080fd5b506101ff610a16565b005b34801561020d57600080fd5b50610216610a2a565b6040516102239190611e11565b60405180910390f35b61024660048036038101906102419190611a5b565b610a54565b005b34801561025457600080fd5b5061026f600480360381019061026a919061181c565b610b9c565b005b34801561027d57600080fd5b506102986004803603810190610293919061181c565b610be0565b005b3480156102a657600080fd5b506102c160048036038101906102bc91906119e7565b610d68565b005b3480156102cf57600080fd5b506102d8610e72565b6040516102e59190611e11565b60405180910390f35b3480156102fa57600080fd5b506103156004803603810190610310919061181c565b610e98565b005b60606000610326858585610f1c565b90508473ffffffffffffffffffffffffffffffffffffffff167fcaf938de11c367272220bfd1d2baa99ca46665e7bc4d85f00adb51b90fe1fa9f348686604051610372939291906120c1565b60405180910390a2809150509392505050565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163073ffffffffffffffffffffffffffffffffffffffff161415610414576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161040b90611f81565b60405180910390fd5b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16610453610fd3565b73ffffffffffffffffffffffffffffffffffffffff16146104a9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016104a090611fa1565b60405180910390fd5b6104b28161102a565b61050b81600067ffffffffffffffff8111156104d1576104d0612282565b5b6040519080825280601f01601f1916602001820160405280156105035781602001600182028036833780820191505090505b506000611035565b50565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163073ffffffffffffffffffffffffffffffffffffffff16141561059d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161059490611f81565b60405180910390fd5b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166105dc610fd3565b73ffffffffffffffffffffffffffffffffffffffff1614610632576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062990611fa1565b60405180910390fd5b61063b8261102a565b61064782826001611035565b5050565b60608573ffffffffffffffffffffffffffffffffffffffff1663095ea7b386866040518363ffffffff1660e01b8152600401610688929190611e8c565b602060405180830381600087803b1580156106a257600080fd5b505af11580156106b6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106da919061198d565b5060006106e8868585610f1c565b90508673ffffffffffffffffffffffffffffffffffffffff1663095ea7b38760006040518363ffffffff1660e01b8152600401610726929190611e63565b602060405180830381600087803b15801561074057600080fd5b505af1158015610754573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610778919061198d565b5060008773ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b81526004016107b49190611e11565b60206040518083038186803b1580156107cc57600080fd5b505afa1580156107e0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108049190611abb565b905060008111156108c0578773ffffffffffffffffffffffffffffffffffffffff1663a9059cbb60c960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16836040518363ffffffff1660e01b815260040161086c929190611e8c565b602060405180830381600087803b15801561088657600080fd5b505af115801561089a573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108be919061198d565b505b8673ffffffffffffffffffffffffffffffffffffffff168873ffffffffffffffffffffffffffffffffffffffff167f29c40793bffd84cb810179f15d1ceec72bc7f0785514c668ba36645cf99b7382888888604051610921939291906120c1565b60405180910390a3819250505095945050505050565b60007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163073ffffffffffffffffffffffffffffffffffffffff16146109c7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109be90611fc1565b60405180910390fd5b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc60001b905090565b60ca60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b610a1e6111b2565b610a286000611230565b565b6000603360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b80341015610a8e576040517f7671265e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600060ca60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1682604051610ad690611dfc565b60006040518083038185875af1925050503d8060008114610b13576040519150601f19603f3d011682016040523d82523d6000602084013e610b18565b606091505b50509050600015158115151415610b5b576040517f81063e5100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b7fa93afc57f3be4641cf20c7165d11856f3b46dd376108e5fffb06f73f2b2a6d58848484604051610b8e93929190611ed0565b60405180910390a150505050565b8060c960006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b60008060019054906101000a900460ff16159050808015610c115750600160008054906101000a900460ff1660ff16105b80610c3e5750610c20306112f6565b158015610c3d5750600160008054906101000a900460ff1660ff16145b5b610c7d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c7490612001565b60405180910390fd5b60016000806101000a81548160ff021916908360ff1602179055508015610cba576001600060016101000a81548160ff0219169083151502179055505b610cc2611319565b610cca611372565b8160ca60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508015610d645760008060016101000a81548160ff0219169083151502179055507f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024986001604051610d5b9190611f24565b60405180910390a15b5050565b8173ffffffffffffffffffffffffffffffffffffffff166323b872dd3360c960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16846040518463ffffffff1660e01b8152600401610dc793929190611e2c565b602060405180830381600087803b158015610de157600080fd5b505af1158015610df5573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e19919061198d565b508173ffffffffffffffffffffffffffffffffffffffff167f35fb30ed1b8e81eb91001dad742b13b1491a67c722e8c593a886a18500f7d9af858584604051610e6493929190611ed0565b60405180910390a250505050565b60c960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b610ea06111b2565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415610f10576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f0790611f61565b60405180910390fd5b610f1981611230565b50565b60606000808573ffffffffffffffffffffffffffffffffffffffff16348686604051610f49929190611dcc565b60006040518083038185875af1925050503d8060008114610f86576040519150601f19603f3d011682016040523d82523d6000602084013e610f8b565b606091505b509150915081610fc7576040517facfdb44400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80925050509392505050565b60006110017f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc60001b6113c3565b60000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6110326111b2565b50565b6110617f4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd914360001b6113cd565b60000160009054906101000a900460ff161561108557611080836113d7565b6111ad565b8273ffffffffffffffffffffffffffffffffffffffff166352d1902d6040518163ffffffff1660e01b815260040160206040518083038186803b1580156110cb57600080fd5b505afa9250505080156110fc57506040513d601f19601f820116820180604052508101906110f991906119ba565b60015b61113b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161113290612021565b60405180910390fd5b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc60001b81146111a0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161119790611fe1565b60405180910390fd5b506111ac838383611490565b5b505050565b6111ba6114bc565b73ffffffffffffffffffffffffffffffffffffffff166111d8610a2a565b73ffffffffffffffffffffffffffffffffffffffff161461122e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161122590612061565b60405180910390fd5b565b6000603360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905081603360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b6000808273ffffffffffffffffffffffffffffffffffffffff163b119050919050565b600060019054906101000a900460ff16611368576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161135f906120a1565b60405180910390fd5b6113706114c4565b565b600060019054906101000a900460ff166113c1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016113b8906120a1565b60405180910390fd5b565b6000819050919050565b6000819050919050565b6113e0816112f6565b61141f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161141690612041565b60405180910390fd5b8061144c7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc60001b6113c3565b60000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b61149983611525565b6000825111806114a65750805b156114b7576114b58383611574565b505b505050565b600033905090565b600060019054906101000a900460ff16611513576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161150a906120a1565b60405180910390fd5b61152361151e6114bc565b611230565b565b61152e816113d7565b8073ffffffffffffffffffffffffffffffffffffffff167fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b60405160405180910390a250565b60606115998383604051806060016040528060278152602001612659602791396115a1565b905092915050565b60606000808573ffffffffffffffffffffffffffffffffffffffff16856040516115cb9190611de5565b600060405180830381855af49150503d8060008114611606576040519150601f19603f3d011682016040523d82523d6000602084013e61160b565b606091505b509150915061161c86838387611627565b925050509392505050565b6060831561168a5760008351141561168257611642856112f6565b611681576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161167890612081565b60405180910390fd5b5b829050611695565b611694838361169d565b5b949350505050565b6000825111156116b05781518083602001fd5b806040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016116e49190611f3f565b60405180910390fd5b60006117006116fb84612118565b6120f3565b90508281526020810184848401111561171c5761171b6122c0565b5b61172784828561220f565b509392505050565b60008135905061173e816125fc565b92915050565b60008151905061175381612613565b92915050565b6000815190506117688161262a565b92915050565b60008083601f840112611784576117836122b6565b5b8235905067ffffffffffffffff8111156117a1576117a06122b1565b5b6020830191508360018202830111156117bd576117bc6122bb565b5b9250929050565b600082601f8301126117d9576117d86122b6565b5b81356117e98482602086016116ed565b91505092915050565b60008135905061180181612641565b92915050565b60008151905061181681612641565b92915050565b600060208284031215611832576118316122ca565b5b60006118408482850161172f565b91505092915050565b600080600080600060808688031215611865576118646122ca565b5b60006118738882890161172f565b95505060206118848882890161172f565b9450506040611895888289016117f2565b935050606086013567ffffffffffffffff8111156118b6576118b56122c5565b5b6118c28882890161176e565b92509250509295509295909350565b6000806000604084860312156118ea576118e96122ca565b5b60006118f88682870161172f565b935050602084013567ffffffffffffffff811115611919576119186122c5565b5b6119258682870161176e565b92509250509250925092565b60008060408385031215611948576119476122ca565b5b60006119568582860161172f565b925050602083013567ffffffffffffffff811115611977576119766122c5565b5b611983858286016117c4565b9150509250929050565b6000602082840312156119a3576119a26122ca565b5b60006119b184828501611744565b91505092915050565b6000602082840312156119d0576119cf6122ca565b5b60006119de84828501611759565b91505092915050565b60008060008060608587031215611a0157611a006122ca565b5b600085013567ffffffffffffffff811115611a1f57611a1e6122c5565b5b611a2b8782880161176e565b94509450506020611a3e8782880161172f565b9250506040611a4f878288016117f2565b91505092959194509250565b600080600060408486031215611a7457611a736122ca565b5b600084013567ffffffffffffffff811115611a9257611a916122c5565b5b611a9e8682870161176e565b93509350506020611ab1868287016117f2565b9150509250925092565b600060208284031215611ad157611ad06122ca565b5b6000611adf84828501611807565b91505092915050565b611af18161218c565b82525050565b611b00816121aa565b82525050565b6000611b12838561215f565b9350611b1f83858461220f565b611b28836122cf565b840190509392505050565b6000611b3f8385612170565b9350611b4c83858461220f565b82840190509392505050565b6000611b6382612149565b611b6d818561215f565b9350611b7d81856020860161221e565b611b86816122cf565b840191505092915050565b6000611b9c82612149565b611ba68185612170565b9350611bb681856020860161221e565b80840191505092915050565b611bcb816121eb565b82525050565b611bda816121fd565b82525050565b6000611beb82612154565b611bf5818561217b565b9350611c0581856020860161221e565b611c0e816122cf565b840191505092915050565b6000611c2660268361217b565b9150611c31826122e0565b604082019050919050565b6000611c49602c8361217b565b9150611c548261232f565b604082019050919050565b6000611c6c602c8361217b565b9150611c778261237e565b604082019050919050565b6000611c8f60388361217b565b9150611c9a826123cd565b604082019050919050565b6000611cb260298361217b565b9150611cbd8261241c565b604082019050919050565b6000611cd5602e8361217b565b9150611ce08261246b565b604082019050919050565b6000611cf8602e8361217b565b9150611d03826124ba565b604082019050919050565b6000611d1b602d8361217b565b9150611d2682612509565b604082019050919050565b6000611d3e60208361217b565b9150611d4982612558565b602082019050919050565b6000611d61600083612170565b9150611d6c82612581565b600082019050919050565b6000611d84601d8361217b565b9150611d8f82612584565b602082019050919050565b6000611da7602b8361217b565b9150611db2826125ad565b604082019050919050565b611dc6816121d4565b82525050565b6000611dd9828486611b33565b91508190509392505050565b6000611df18284611b91565b915081905092915050565b6000611e0782611d54565b9150819050919050565b6000602082019050611e266000830184611ae8565b92915050565b6000606082019050611e416000830186611ae8565b611e4e6020830185611ae8565b611e5b6040830184611dbd565b949350505050565b6000604082019050611e786000830185611ae8565b611e856020830184611bc2565b9392505050565b6000604082019050611ea16000830185611ae8565b611eae6020830184611dbd565b9392505050565b6000602082019050611eca6000830184611af7565b92915050565b60006040820190508181036000830152611eeb818587611b06565b9050611efa6020830184611dbd565b949350505050565b60006020820190508181036000830152611f1c8184611b58565b905092915050565b6000602082019050611f396000830184611bd1565b92915050565b60006020820190508181036000830152611f598184611be0565b905092915050565b60006020820190508181036000830152611f7a81611c19565b9050919050565b60006020820190508181036000830152611f9a81611c3c565b9050919050565b60006020820190508181036000830152611fba81611c5f565b9050919050565b60006020820190508181036000830152611fda81611c82565b9050919050565b60006020820190508181036000830152611ffa81611ca5565b9050919050565b6000602082019050818103600083015261201a81611cc8565b9050919050565b6000602082019050818103600083015261203a81611ceb565b9050919050565b6000602082019050818103600083015261205a81611d0e565b9050919050565b6000602082019050818103600083015261207a81611d31565b9050919050565b6000602082019050818103600083015261209a81611d77565b9050919050565b600060208201905081810360008301526120ba81611d9a565b9050919050565b60006040820190506120d66000830186611dbd565b81810360208301526120e9818486611b06565b9050949350505050565b60006120fd61210e565b90506121098282612251565b919050565b6000604051905090565b600067ffffffffffffffff82111561213357612132612282565b5b61213c826122cf565b9050602081019050919050565b600081519050919050565b600081519050919050565b600082825260208201905092915050565b600081905092915050565b600082825260208201905092915050565b6000612197826121b4565b9050919050565b60008115159050919050565b6000819050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b60006121f6826121d4565b9050919050565b6000612208826121de565b9050919050565b82818337600083830152505050565b60005b8381101561223c578082015181840152602081019050612221565b8381111561224b576000848401525b50505050565b61225a826122cf565b810181811067ffffffffffffffff8211171561227957612278612282565b5b80604052505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b7f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060008201527f64656c656761746563616c6c0000000000000000000000000000000000000000602082015250565b7f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060008201527f6163746976652070726f78790000000000000000000000000000000000000000602082015250565b7f555550535570677261646561626c653a206d757374206e6f742062652063616c60008201527f6c6564207468726f7567682064656c656761746563616c6c0000000000000000602082015250565b7f45524331393637557067726164653a20756e737570706f727465642070726f7860008201527f6961626c65555549440000000000000000000000000000000000000000000000602082015250565b7f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160008201527f647920696e697469616c697a6564000000000000000000000000000000000000602082015250565b7f45524331393637557067726164653a206e657720696d706c656d656e7461746960008201527f6f6e206973206e6f742055555053000000000000000000000000000000000000602082015250565b7f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60008201527f6f74206120636f6e747261637400000000000000000000000000000000000000602082015250565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b50565b7f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000600082015250565b7f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960008201527f6e697469616c697a696e67000000000000000000000000000000000000000000602082015250565b6126058161218c565b811461261057600080fd5b50565b61261c8161219e565b811461262757600080fd5b50565b612633816121aa565b811461263e57600080fd5b50565b61264a816121d4565b811461265557600080fd5b5056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a2646970667358221220723434571cc9cd7e95021f49aa480cf09a88e70f379bcd364628ebd80d926ab464736f6c63430008070033"; + +type GatewayConstructorParams = + | [signer?: Signer] + | ConstructorParameters; + +const isSuperArgs = ( + xs: GatewayConstructorParams +): xs is ConstructorParameters => xs.length > 1; + +export class Gateway__factory extends ContractFactory { + constructor(...args: GatewayConstructorParams) { + 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): Gateway { + return super.attach(address) as Gateway; + } + override connect(signer: Signer): Gateway__factory { + return super.connect(signer) as Gateway__factory; + } + + static readonly bytecode = _bytecode; + static readonly abi = _abi; + static createInterface(): GatewayInterface { + return new utils.Interface(_abi) as GatewayInterface; + } + static connect( + address: string, + signerOrProvider: Signer | Provider + ): Gateway { + return new Contract(address, _abi, signerOrProvider) as Gateway; + } +} diff --git a/typechain-types/factories/contracts/prototypes/evm/Receiver__factory.ts b/typechain-types/factories/contracts/prototypes/evm/Receiver__factory.ts new file mode 100644 index 00000000..bdb9e619 --- /dev/null +++ b/typechain-types/factories/contracts/prototypes/evm/Receiver__factory.ts @@ -0,0 +1,251 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import { Signer, utils, Contract, ContractFactory, Overrides } from "ethers"; +import type { Provider, TransactionRequest } from "@ethersproject/providers"; +import type { PromiseOrValue } from "../../../../common"; +import type { + Receiver, + ReceiverInterface, +} from "../../../../contracts/prototypes/evm/Receiver"; + +const _abi = [ + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "sender", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "amount", + type: "uint256", + }, + { + indexed: false, + internalType: "address", + name: "token", + type: "address", + }, + { + indexed: false, + internalType: "address", + name: "destination", + type: "address", + }, + ], + name: "ReceivedERC20", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "sender", + type: "address", + }, + ], + name: "ReceivedNoParams", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "sender", + type: "address", + }, + { + indexed: false, + internalType: "string[]", + name: "strs", + type: "string[]", + }, + { + indexed: false, + internalType: "uint256[]", + name: "nums", + type: "uint256[]", + }, + { + indexed: false, + internalType: "bool", + name: "flag", + type: "bool", + }, + ], + name: "ReceivedNonPayable", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "sender", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "value", + type: "uint256", + }, + { + indexed: false, + internalType: "string", + name: "str", + type: "string", + }, + { + indexed: false, + internalType: "uint256", + name: "num", + type: "uint256", + }, + { + indexed: false, + internalType: "bool", + name: "flag", + type: "bool", + }, + ], + name: "ReceivedPayable", + type: "event", + }, + { + inputs: [ + { + internalType: "uint256", + name: "amount", + type: "uint256", + }, + { + internalType: "address", + name: "token", + type: "address", + }, + { + internalType: "address", + name: "destination", + type: "address", + }, + ], + name: "receiveERC20", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "receiveNoParams", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "string[]", + name: "strs", + type: "string[]", + }, + { + internalType: "uint256[]", + name: "nums", + type: "uint256[]", + }, + { + internalType: "bool", + name: "flag", + type: "bool", + }, + ], + name: "receiveNonPayable", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "string", + name: "str", + type: "string", + }, + { + internalType: "uint256", + name: "num", + type: "uint256", + }, + { + internalType: "bool", + name: "flag", + type: "bool", + }, + ], + name: "receivePayable", + outputs: [], + stateMutability: "payable", + type: "function", + }, +] as const; + +const _bytecode = + "0x608060405234801561001057600080fd5b5061108a806100206000396000f3fe60806040526004361061003f5760003560e01c8063357fc5a2146100445780636ed701691461006d578063e04d4f9714610084578063f05b6abf146100a0575b600080fd5b34801561005057600080fd5b5061006b6004803603810190610066919061085a565b6100c9565b005b34801561007957600080fd5b50610082610138565b005b61009e600480360381019061009991906107eb565b610171565b005b3480156100ac57600080fd5b506100c760048036038101906100c29190610733565b6101b5565b005b6100f63382858573ffffffffffffffffffffffffffffffffffffffff166101f7909392919063ffffffff16565b7f2b58128f24a9f59127cc5b5430d70542b22220f2d9adaa86e442b816ab98af603384848460405161012b9493929190610bb0565b60405180910390a1505050565b7fbcaadb46b82a48af60b608f58959ae6b8310d1b0a0d094c2e9ec3208ed39f2a0336040516101679190610b0b565b60405180910390a1565b7f1f1ff1f5fb41346850b2f5c04e6c767e2f1c8a525c5c0c5cdb60cdf3ca5f62fa33348585856040516101a8959493929190610bf5565b60405180910390a1505050565b7f74a53cd528a921fca7dbdee62f86819051d3cc98f214951f4238e8843f20b146338484846040516101ea9493929190610b5d565b60405180910390a1505050565b61027a846323b872dd60e01b85858560405160240161021893929190610b26565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050610280565b50505050565b60006102e2826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff166103479092919063ffffffff16565b9050600081511115610342578080602001905181019061030291906107be565b610341576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161033890610cb1565b60405180910390fd5b5b505050565b6060610356848460008561035f565b90509392505050565b6060824710156103a4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161039b90610c71565b60405180910390fd5b6000808673ffffffffffffffffffffffffffffffffffffffff1685876040516103cd9190610af4565b60006040518083038185875af1925050503d806000811461040a576040519150601f19603f3d011682016040523d82523d6000602084013e61040f565b606091505b50915091506104208783838761042c565b92505050949350505050565b6060831561048f5760008351141561048757610447856104a2565b610486576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161047d90610c91565b60405180910390fd5b5b82905061049a565b61049983836104c5565b5b949350505050565b6000808273ffffffffffffffffffffffffffffffffffffffff163b119050919050565b6000825111156104d85781518083602001fd5b806040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161050c9190610c4f565b60405180910390fd5b600061052861052384610cf6565b610cd1565b9050808382526020820190508285602086028201111561054b5761054a610f23565b5b60005b8581101561059957813567ffffffffffffffff81111561057157610570610f1e565b5b80860161057e89826106f0565b8552602085019450602084019350505060018101905061054e565b5050509392505050565b60006105b66105b184610d22565b610cd1565b905080838252602082019050828560208602820111156105d9576105d8610f23565b5b60005b8581101561060957816105ef888261071e565b8452602084019350602083019250506001810190506105dc565b5050509392505050565b600061062661062184610d4e565b610cd1565b90508281526020810184848401111561064257610641610f28565b5b61064d848285610e7c565b509392505050565b6000813590506106648161100f565b92915050565b600082601f83011261067f5761067e610f1e565b5b813561068f848260208601610515565b91505092915050565b600082601f8301126106ad576106ac610f1e565b5b81356106bd8482602086016105a3565b91505092915050565b6000813590506106d581611026565b92915050565b6000815190506106ea81611026565b92915050565b600082601f83011261070557610704610f1e565b5b8135610715848260208601610613565b91505092915050565b60008135905061072d8161103d565b92915050565b60008060006060848603121561074c5761074b610f32565b5b600084013567ffffffffffffffff81111561076a57610769610f2d565b5b6107768682870161066a565b935050602084013567ffffffffffffffff81111561079757610796610f2d565b5b6107a386828701610698565b92505060406107b4868287016106c6565b9150509250925092565b6000602082840312156107d4576107d3610f32565b5b60006107e2848285016106db565b91505092915050565b60008060006060848603121561080457610803610f32565b5b600084013567ffffffffffffffff81111561082257610821610f2d565b5b61082e868287016106f0565b935050602061083f8682870161071e565b9250506040610850868287016106c6565b9150509250925092565b60008060006060848603121561087357610872610f32565b5b60006108818682870161071e565b935050602061089286828701610655565b92505060406108a386828701610655565b9150509250925092565b60006108b983836109fb565b905092915050565b60006108cd8383610ad6565b60208301905092915050565b6108e281610e34565b82525050565b60006108f382610d9f565b6108fd8185610de5565b93508360208202850161090f85610d7f565b8060005b8581101561094b578484038952815161092c85826108ad565b945061093783610dcb565b925060208a01995050600181019050610913565b50829750879550505050505092915050565b600061096882610daa565b6109728185610df6565b935061097d83610d8f565b8060005b838110156109ae57815161099588826108c1565b97506109a083610dd8565b925050600181019050610981565b5085935050505092915050565b6109c481610e46565b82525050565b60006109d582610db5565b6109df8185610e07565b93506109ef818560208601610e8b565b80840191505092915050565b6000610a0682610dc0565b610a108185610e12565b9350610a20818560208601610e8b565b610a2981610f37565b840191505092915050565b6000610a3f82610dc0565b610a498185610e23565b9350610a59818560208601610e8b565b610a6281610f37565b840191505092915050565b6000610a7a602683610e23565b9150610a8582610f48565b604082019050919050565b6000610a9d601d83610e23565b9150610aa882610f97565b602082019050919050565b6000610ac0602a83610e23565b9150610acb82610fc0565b604082019050919050565b610adf81610e72565b82525050565b610aee81610e72565b82525050565b6000610b0082846109ca565b915081905092915050565b6000602082019050610b2060008301846108d9565b92915050565b6000606082019050610b3b60008301866108d9565b610b4860208301856108d9565b610b556040830184610ae5565b949350505050565b6000608082019050610b7260008301876108d9565b8181036020830152610b8481866108e8565b90508181036040830152610b98818561095d565b9050610ba760608301846109bb565b95945050505050565b6000608082019050610bc560008301876108d9565b610bd26020830186610ae5565b610bdf60408301856108d9565b610bec60608301846108d9565b95945050505050565b600060a082019050610c0a60008301886108d9565b610c176020830187610ae5565b8181036040830152610c298186610a34565b9050610c386060830185610ae5565b610c4560808301846109bb565b9695505050505050565b60006020820190508181036000830152610c698184610a34565b905092915050565b60006020820190508181036000830152610c8a81610a6d565b9050919050565b60006020820190508181036000830152610caa81610a90565b9050919050565b60006020820190508181036000830152610cca81610ab3565b9050919050565b6000610cdb610cec565b9050610ce78282610ebe565b919050565b6000604051905090565b600067ffffffffffffffff821115610d1157610d10610eef565b5b602082029050602081019050919050565b600067ffffffffffffffff821115610d3d57610d3c610eef565b5b602082029050602081019050919050565b600067ffffffffffffffff821115610d6957610d68610eef565b5b610d7282610f37565b9050602081019050919050565b6000819050602082019050919050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b600081905092915050565b600082825260208201905092915050565b600082825260208201905092915050565b6000610e3f82610e52565b9050919050565b60008115159050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b82818337600083830152505050565b60005b83811015610ea9578082015181840152602081019050610e8e565b83811115610eb8576000848401525b50505050565b610ec782610f37565b810181811067ffffffffffffffff82111715610ee657610ee5610eef565b5b80604052505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f416464726573733a20696e73756666696369656e742062616c616e636520666f60008201527f722063616c6c0000000000000000000000000000000000000000000000000000602082015250565b7f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000600082015250565b7f5361666545524332303a204552433230206f7065726174696f6e20646964206e60008201527f6f74207375636365656400000000000000000000000000000000000000000000602082015250565b61101881610e34565b811461102357600080fd5b50565b61102f81610e46565b811461103a57600080fd5b50565b61104681610e72565b811461105157600080fd5b5056fea264697066735822122069722b36f6aa512f9b0f76207f5b5cbc4a4f69e9581bf19d4c36cde9ee1c6c3e64736f6c63430008070033"; + +type ReceiverConstructorParams = + | [signer?: Signer] + | ConstructorParameters; + +const isSuperArgs = ( + xs: ReceiverConstructorParams +): xs is ConstructorParameters => xs.length > 1; + +export class Receiver__factory extends ContractFactory { + constructor(...args: ReceiverConstructorParams) { + 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): Receiver { + return super.attach(address) as Receiver; + } + override connect(signer: Signer): Receiver__factory { + return super.connect(signer) as Receiver__factory; + } + + static readonly bytecode = _bytecode; + static readonly abi = _abi; + static createInterface(): ReceiverInterface { + return new utils.Interface(_abi) as ReceiverInterface; + } + static connect( + address: string, + signerOrProvider: Signer | Provider + ): Receiver { + return new Contract(address, _abi, signerOrProvider) as Receiver; + } +} diff --git a/typechain-types/factories/contracts/prototypes/evm/TestERC20__factory.ts b/typechain-types/factories/contracts/prototypes/evm/TestERC20__factory.ts new file mode 100644 index 00000000..d6f04373 --- /dev/null +++ b/typechain-types/factories/contracts/prototypes/evm/TestERC20__factory.ts @@ -0,0 +1,371 @@ +/* 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 { + TestERC20, + TestERC20Interface, +} from "../../../../contracts/prototypes/evm/TestERC20"; + +const _abi = [ + { + inputs: [ + { + internalType: "string", + name: "name", + type: "string", + }, + { + internalType: "string", + name: "symbol", + type: "string", + }, + ], + stateMutability: "nonpayable", + type: "constructor", + }, + { + 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: 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", + }, + { + 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: [], + name: "decimals", + outputs: [ + { + internalType: "uint8", + name: "", + type: "uint8", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "spender", + type: "address", + }, + { + internalType: "uint256", + name: "subtractedValue", + type: "uint256", + }, + ], + name: "decreaseAllowance", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "spender", + type: "address", + }, + { + internalType: "uint256", + name: "addedValue", + type: "uint256", + }, + ], + name: "increaseAllowance", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "to", + type: "address", + }, + { + internalType: "uint256", + name: "amount", + type: "uint256", + }, + ], + name: "mint", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "name", + outputs: [ + { + internalType: "string", + name: "", + type: "string", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "symbol", + outputs: [ + { + internalType: "string", + name: "", + type: "string", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "totalSupply", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "to", + type: "address", + }, + { + internalType: "uint256", + name: "amount", + type: "uint256", + }, + ], + name: "transfer", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "from", + type: "address", + }, + { + internalType: "address", + name: "to", + type: "address", + }, + { + internalType: "uint256", + name: "amount", + type: "uint256", + }, + ], + name: "transferFrom", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, +] as const; + +const _bytecode = + "0x60806040523480156200001157600080fd5b5060405162001813380380620018138339818101604052810190620000379190620001a3565b818181600390805190602001906200005192919062000075565b5080600490805190602001906200006a92919062000075565b5050505050620003ac565b8280546200008390620002bd565b90600052602060002090601f016020900481019282620000a75760008555620000f3565b82601f10620000c257805160ff1916838001178555620000f3565b82800160010185558215620000f3579182015b82811115620000f2578251825591602001919060010190620000d5565b5b50905062000102919062000106565b5090565b5b808211156200012157600081600090555060010162000107565b5090565b60006200013c620001368462000251565b62000228565b9050828152602081018484840111156200015b576200015a6200038c565b5b6200016884828562000287565b509392505050565b600082601f83011262000188576200018762000387565b5b81516200019a84826020860162000125565b91505092915050565b60008060408385031215620001bd57620001bc62000396565b5b600083015167ffffffffffffffff811115620001de57620001dd62000391565b5b620001ec8582860162000170565b925050602083015167ffffffffffffffff81111562000210576200020f62000391565b5b6200021e8582860162000170565b9150509250929050565b60006200023462000247565b9050620002428282620002f3565b919050565b6000604051905090565b600067ffffffffffffffff8211156200026f576200026e62000358565b5b6200027a826200039b565b9050602081019050919050565b60005b83811015620002a75780820151818401526020810190506200028a565b83811115620002b7576000848401525b50505050565b60006002820490506001821680620002d657607f821691505b60208210811415620002ed57620002ec62000329565b5b50919050565b620002fe826200039b565b810181811067ffffffffffffffff8211171562000320576200031f62000358565b5b80604052505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b61145780620003bc6000396000f3fe608060405234801561001057600080fd5b50600436106100b45760003560e01c806340c10f191161007157806340c10f19146101a357806370a08231146101bf57806395d89b41146101ef578063a457c2d71461020d578063a9059cbb1461023d578063dd62ed3e1461026d576100b4565b806306fdde03146100b9578063095ea7b3146100d757806318160ddd1461010757806323b872dd14610125578063313ce567146101555780633950935114610173575b600080fd5b6100c161029d565b6040516100ce9190610ecf565b60405180910390f35b6100f160048036038101906100ec9190610cf6565b61032f565b6040516100fe9190610eb4565b60405180910390f35b61010f610352565b60405161011c9190610ff1565b60405180910390f35b61013f600480360381019061013a9190610ca3565b61035c565b60405161014c9190610eb4565b60405180910390f35b61015d61038b565b60405161016a919061100c565b60405180910390f35b61018d60048036038101906101889190610cf6565b610394565b60405161019a9190610eb4565b60405180910390f35b6101bd60048036038101906101b89190610cf6565b6103cb565b005b6101d960048036038101906101d49190610c36565b6103d9565b6040516101e69190610ff1565b60405180910390f35b6101f7610421565b6040516102049190610ecf565b60405180910390f35b61022760048036038101906102229190610cf6565b6104b3565b6040516102349190610eb4565b60405180910390f35b61025760048036038101906102529190610cf6565b61052a565b6040516102649190610eb4565b60405180910390f35b61028760048036038101906102829190610c63565b61054d565b6040516102949190610ff1565b60405180910390f35b6060600380546102ac90611121565b80601f01602080910402602001604051908101604052809291908181526020018280546102d890611121565b80156103255780601f106102fa57610100808354040283529160200191610325565b820191906000526020600020905b81548152906001019060200180831161030857829003601f168201915b5050505050905090565b60008061033a6105d4565b90506103478185856105dc565b600191505092915050565b6000600254905090565b6000806103676105d4565b90506103748582856107a7565b61037f858585610833565b60019150509392505050565b60006012905090565b60008061039f6105d4565b90506103c08185856103b1858961054d565b6103bb9190611043565b6105dc565b600191505092915050565b6103d58282610aab565b5050565b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b60606004805461043090611121565b80601f016020809104026020016040519081016040528092919081815260200182805461045c90611121565b80156104a95780601f1061047e576101008083540402835291602001916104a9565b820191906000526020600020905b81548152906001019060200180831161048c57829003601f168201915b5050505050905090565b6000806104be6105d4565b905060006104cc828661054d565b905083811015610511576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161050890610fb1565b60405180910390fd5b61051e82868684036105dc565b60019250505092915050565b6000806105356105d4565b9050610542818585610833565b600191505092915050565b6000600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141561064c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161064390610f91565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156106bc576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106b390610f11565b60405180910390fd5b80600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9258360405161079a9190610ff1565b60405180910390a3505050565b60006107b3848461054d565b90507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff811461082d578181101561081f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161081690610f31565b60405180910390fd5b61082c84848484036105dc565b5b50505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156108a3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161089a90610f71565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610913576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161090a90610ef1565b60405180910390fd5b61091e838383610c02565b60008060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050818110156109a4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161099b90610f51565b60405180910390fd5b8181036000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550816000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825401925050819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef84604051610a929190610ff1565b60405180910390a3610aa5848484610c07565b50505050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610b1b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b1290610fd1565b60405180910390fd5b610b2760008383610c02565b8060026000828254610b399190611043565b92505081905550806000808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825401925050819055508173ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef83604051610bea9190610ff1565b60405180910390a3610bfe60008383610c07565b5050565b505050565b505050565b600081359050610c1b816113f3565b92915050565b600081359050610c308161140a565b92915050565b600060208284031215610c4c57610c4b6111b1565b5b6000610c5a84828501610c0c565b91505092915050565b60008060408385031215610c7a57610c796111b1565b5b6000610c8885828601610c0c565b9250506020610c9985828601610c0c565b9150509250929050565b600080600060608486031215610cbc57610cbb6111b1565b5b6000610cca86828701610c0c565b9350506020610cdb86828701610c0c565b9250506040610cec86828701610c21565b9150509250925092565b60008060408385031215610d0d57610d0c6111b1565b5b6000610d1b85828601610c0c565b9250506020610d2c85828601610c21565b9150509250929050565b610d3f816110ab565b82525050565b6000610d5082611027565b610d5a8185611032565b9350610d6a8185602086016110ee565b610d73816111b6565b840191505092915050565b6000610d8b602383611032565b9150610d96826111c7565b604082019050919050565b6000610dae602283611032565b9150610db982611216565b604082019050919050565b6000610dd1601d83611032565b9150610ddc82611265565b602082019050919050565b6000610df4602683611032565b9150610dff8261128e565b604082019050919050565b6000610e17602583611032565b9150610e22826112dd565b604082019050919050565b6000610e3a602483611032565b9150610e458261132c565b604082019050919050565b6000610e5d602583611032565b9150610e688261137b565b604082019050919050565b6000610e80601f83611032565b9150610e8b826113ca565b602082019050919050565b610e9f816110d7565b82525050565b610eae816110e1565b82525050565b6000602082019050610ec96000830184610d36565b92915050565b60006020820190508181036000830152610ee98184610d45565b905092915050565b60006020820190508181036000830152610f0a81610d7e565b9050919050565b60006020820190508181036000830152610f2a81610da1565b9050919050565b60006020820190508181036000830152610f4a81610dc4565b9050919050565b60006020820190508181036000830152610f6a81610de7565b9050919050565b60006020820190508181036000830152610f8a81610e0a565b9050919050565b60006020820190508181036000830152610faa81610e2d565b9050919050565b60006020820190508181036000830152610fca81610e50565b9050919050565b60006020820190508181036000830152610fea81610e73565b9050919050565b60006020820190506110066000830184610e96565b92915050565b60006020820190506110216000830184610ea5565b92915050565b600081519050919050565b600082825260208201905092915050565b600061104e826110d7565b9150611059836110d7565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0382111561108e5761108d611153565b5b828201905092915050565b60006110a4826110b7565b9050919050565b60008115159050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b60005b8381101561110c5780820151818401526020810190506110f1565b8381111561111b576000848401525b50505050565b6000600282049050600182168061113957607f821691505b6020821081141561114d5761114c611182565b5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b600080fd5b6000601f19601f8301169050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f766520746f20746865207a65726f20616464726560008201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a20696e73756666696369656e7420616c6c6f77616e6365000000600082015250565b7f45524332303a207472616e7366657220616d6f756e742065786365656473206260008201527f616c616e63650000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a207472616e736665722066726f6d20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f7760008201527f207a65726f000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a206d696e7420746f20746865207a65726f206164647265737300600082015250565b6113fc81611099565b811461140757600080fd5b50565b611413816110d7565b811461141e57600080fd5b5056fea2646970667358221220d4c96329400732e284f624232c8d7228fc90c00ee7b1a48a85080262107815d864736f6c63430008070033"; + +type TestERC20ConstructorParams = + | [signer?: Signer] + | ConstructorParameters; + +const isSuperArgs = ( + xs: TestERC20ConstructorParams +): xs is ConstructorParameters => xs.length > 1; + +export class TestERC20__factory extends ContractFactory { + constructor(...args: TestERC20ConstructorParams) { + if (isSuperArgs(args)) { + super(...args); + } else { + super(_abi, _bytecode, args[0]); + } + } + + override deploy( + name: PromiseOrValue, + symbol: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise { + return super.deploy(name, symbol, overrides || {}) as Promise; + } + override getDeployTransaction( + name: PromiseOrValue, + symbol: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): TransactionRequest { + return super.getDeployTransaction(name, symbol, overrides || {}); + } + override attach(address: string): TestERC20 { + return super.attach(address) as TestERC20; + } + override connect(signer: Signer): TestERC20__factory { + return super.connect(signer) as TestERC20__factory; + } + + static readonly bytecode = _bytecode; + static readonly abi = _abi; + static createInterface(): TestERC20Interface { + return new utils.Interface(_abi) as TestERC20Interface; + } + static connect( + address: string, + signerOrProvider: Signer | Provider + ): TestERC20 { + return new Contract(address, _abi, signerOrProvider) as TestERC20; + } +} diff --git a/typechain-types/factories/contracts/prototypes/evm/index.ts b/typechain-types/factories/contracts/prototypes/evm/index.ts new file mode 100644 index 00000000..d00427f1 --- /dev/null +++ b/typechain-types/factories/contracts/prototypes/evm/index.ts @@ -0,0 +1,9 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +export * as interfacesSol from "./interfaces.sol"; +export { ERC20CustodyNew__factory } from "./ERC20CustodyNew__factory"; +export { GatewayEVM__factory } from "./GatewayEVM__factory"; +export { GatewayEVMUpgradeTest__factory } from "./GatewayEVMUpgradeTest__factory"; +export { Receiver__factory } from "./Receiver__factory"; +export { TestERC20__factory } from "./TestERC20__factory"; diff --git a/typechain-types/factories/contracts/prototypes/evm/interfaces.sol/IGatewayEVM__factory.ts b/typechain-types/factories/contracts/prototypes/evm/interfaces.sol/IGatewayEVM__factory.ts new file mode 100644 index 00000000..d901f6b5 --- /dev/null +++ b/typechain-types/factories/contracts/prototypes/evm/interfaces.sol/IGatewayEVM__factory.ts @@ -0,0 +1,125 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { Contract, Signer, utils } from "ethers"; +import type { Provider } from "@ethersproject/providers"; +import type { + IGatewayEVM, + IGatewayEVMInterface, +} from "../../../../../contracts/prototypes/evm/interfaces.sol/IGatewayEVM"; + +const _abi = [ + { + inputs: [ + { + internalType: "address", + name: "destination", + type: "address", + }, + { + internalType: "bytes", + name: "data", + type: "bytes", + }, + ], + name: "execute", + outputs: [ + { + internalType: "bytes", + name: "", + type: "bytes", + }, + ], + stateMutability: "payable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "token", + type: "address", + }, + { + internalType: "address", + name: "to", + type: "address", + }, + { + internalType: "uint256", + name: "amount", + type: "uint256", + }, + { + internalType: "bytes", + name: "data", + type: "bytes", + }, + ], + name: "executeWithERC20", + outputs: [ + { + internalType: "bytes", + name: "", + type: "bytes", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes", + name: "recipient", + type: "bytes", + }, + { + internalType: "uint256", + name: "amount", + type: "uint256", + }, + ], + name: "send", + outputs: [], + stateMutability: "payable", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes", + name: "recipient", + type: "bytes", + }, + { + internalType: "address", + name: "asset", + type: "address", + }, + { + internalType: "uint256", + name: "amount", + type: "uint256", + }, + ], + name: "sendERC20", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, +] as const; + +export class IGatewayEVM__factory { + static readonly abi = _abi; + static createInterface(): IGatewayEVMInterface { + return new utils.Interface(_abi) as IGatewayEVMInterface; + } + static connect( + address: string, + signerOrProvider: Signer | Provider + ): IGatewayEVM { + return new Contract(address, _abi, signerOrProvider) as IGatewayEVM; + } +} diff --git a/typechain-types/factories/contracts/prototypes/evm/interfaces.sol/IGateway__factory.ts b/typechain-types/factories/contracts/prototypes/evm/interfaces.sol/IGateway__factory.ts new file mode 100644 index 00000000..e612fd3e --- /dev/null +++ b/typechain-types/factories/contracts/prototypes/evm/interfaces.sol/IGateway__factory.ts @@ -0,0 +1,125 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { Contract, Signer, utils } from "ethers"; +import type { Provider } from "@ethersproject/providers"; +import type { + IGateway, + IGatewayInterface, +} from "../../../../../contracts/prototypes/evm/interfaces.sol/IGateway"; + +const _abi = [ + { + inputs: [ + { + internalType: "address", + name: "destination", + type: "address", + }, + { + internalType: "bytes", + name: "data", + type: "bytes", + }, + ], + name: "execute", + outputs: [ + { + internalType: "bytes", + name: "", + type: "bytes", + }, + ], + stateMutability: "payable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "token", + type: "address", + }, + { + internalType: "address", + name: "to", + type: "address", + }, + { + internalType: "uint256", + name: "amount", + type: "uint256", + }, + { + internalType: "bytes", + name: "data", + type: "bytes", + }, + ], + name: "executeWithERC20", + outputs: [ + { + internalType: "bytes", + name: "", + type: "bytes", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes", + name: "recipient", + type: "bytes", + }, + { + internalType: "uint256", + name: "amount", + type: "uint256", + }, + ], + name: "send", + outputs: [], + stateMutability: "payable", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes", + name: "recipient", + type: "bytes", + }, + { + internalType: "address", + name: "asset", + type: "address", + }, + { + internalType: "uint256", + name: "amount", + type: "uint256", + }, + ], + name: "sendERC20", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, +] as const; + +export class IGateway__factory { + static readonly abi = _abi; + static createInterface(): IGatewayInterface { + return new utils.Interface(_abi) as IGatewayInterface; + } + static connect( + address: string, + signerOrProvider: Signer | Provider + ): IGateway { + return new Contract(address, _abi, signerOrProvider) as IGateway; + } +} diff --git a/typechain-types/factories/contracts/prototypes/evm/interfaces.sol/index.ts b/typechain-types/factories/contracts/prototypes/evm/interfaces.sol/index.ts new file mode 100644 index 00000000..1b765f1f --- /dev/null +++ b/typechain-types/factories/contracts/prototypes/evm/interfaces.sol/index.ts @@ -0,0 +1,4 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +export { IGatewayEVM__factory } from "./IGatewayEVM__factory"; diff --git a/typechain-types/factories/contracts/prototypes/index.ts b/typechain-types/factories/contracts/prototypes/index.ts new file mode 100644 index 00000000..33289123 --- /dev/null +++ b/typechain-types/factories/contracts/prototypes/index.ts @@ -0,0 +1,5 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +export * as evm from "./evm"; +export * as zevm from "./zevm"; diff --git a/typechain-types/factories/contracts/prototypes/interfaces.sol/IGateway__factory.ts b/typechain-types/factories/contracts/prototypes/interfaces.sol/IGateway__factory.ts new file mode 100644 index 00000000..20c69449 --- /dev/null +++ b/typechain-types/factories/contracts/prototypes/interfaces.sol/IGateway__factory.ts @@ -0,0 +1,84 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { Contract, Signer, utils } from "ethers"; +import type { Provider } from "@ethersproject/providers"; +import type { + IGateway, + IGatewayInterface, +} from "../../../../contracts/prototypes/interfaces.sol/IGateway"; + +const _abi = [ + { + inputs: [ + { + internalType: "address", + name: "destination", + type: "address", + }, + { + internalType: "bytes", + name: "data", + type: "bytes", + }, + ], + name: "execute", + outputs: [ + { + internalType: "bytes", + name: "", + type: "bytes", + }, + ], + stateMutability: "payable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "token", + type: "address", + }, + { + internalType: "address", + name: "to", + type: "address", + }, + { + internalType: "uint256", + name: "amount", + type: "uint256", + }, + { + internalType: "bytes", + name: "data", + type: "bytes", + }, + ], + name: "executeWithERC20", + outputs: [ + { + internalType: "bytes", + name: "", + type: "bytes", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, +] as const; + +export class IGateway__factory { + static readonly abi = _abi; + static createInterface(): IGatewayInterface { + return new utils.Interface(_abi) as IGatewayInterface; + } + static connect( + address: string, + signerOrProvider: Signer | Provider + ): IGateway { + return new Contract(address, _abi, signerOrProvider) as IGateway; + } +} diff --git a/typechain-types/factories/contracts/prototypes/interfaces.sol/index.ts b/typechain-types/factories/contracts/prototypes/interfaces.sol/index.ts new file mode 100644 index 00000000..d3a5c88a --- /dev/null +++ b/typechain-types/factories/contracts/prototypes/interfaces.sol/index.ts @@ -0,0 +1,4 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +export { IGateway__factory } from "./IGateway__factory"; 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..34a40dc1 --- /dev/null +++ b/typechain-types/factories/contracts/prototypes/zevm/GatewayZEVM__factory.ts @@ -0,0 +1,537 @@ +/* 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: "CallerIsNotFungibleModule", + type: "error", + }, + { + inputs: [], + name: "GasFeeTransferFailed", + type: "error", + }, + { + inputs: [], + name: "InsufficientZRC20Amount", + type: "error", + }, + { + inputs: [], + name: "InvalidTarget", + type: "error", + }, + { + inputs: [], + name: "WithdrawalFailed", + type: "error", + }, + { + inputs: [], + name: "ZRC20BurnFailed", + type: "error", + }, + { + inputs: [], + name: "ZRC20TransferFailed", + type: "error", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "previousAdmin", + type: "address", + }, + { + indexed: false, + internalType: "address", + name: "newAdmin", + type: "address", + }, + ], + name: "AdminChanged", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "beacon", + type: "address", + }, + ], + name: "BeaconUpgraded", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "sender", + type: "address", + }, + { + indexed: true, + internalType: "bytes", + name: "receiver", + type: "bytes", + }, + { + indexed: false, + internalType: "bytes", + name: "message", + type: "bytes", + }, + ], + name: "Call", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint8", + name: "version", + type: "uint8", + }, + ], + name: "Initialized", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "previousOwner", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "newOwner", + type: "address", + }, + ], + name: "OwnershipTransferred", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "implementation", + type: "address", + }, + ], + name: "Upgraded", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "from", + type: "address", + }, + { + indexed: false, + internalType: "bytes", + name: "to", + type: "bytes", + }, + { + indexed: false, + internalType: "uint256", + name: "value", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "gasfee", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "protocolFlatFee", + type: "uint256", + }, + { + indexed: false, + internalType: "bytes", + name: "message", + type: "bytes", + }, + ], + name: "Withdrawal", + type: "event", + }, + { + inputs: [], + name: "FUNGIBLE_MODULE_ADDRESS", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes", + name: "receiver", + type: "bytes", + }, + { + internalType: "bytes", + name: "message", + type: "bytes", + }, + ], + name: "call", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "zrc20", + type: "address", + }, + { + internalType: "uint256", + name: "amount", + type: "uint256", + }, + { + internalType: "address", + name: "target", + type: "address", + }, + ], + name: "deposit", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + components: [ + { + internalType: "bytes", + name: "origin", + type: "bytes", + }, + { + internalType: "address", + name: "sender", + type: "address", + }, + { + internalType: "uint256", + name: "chainID", + type: "uint256", + }, + ], + internalType: "struct zContext", + name: "context", + type: "tuple", + }, + { + internalType: "address", + name: "zrc20", + type: "address", + }, + { + internalType: "uint256", + name: "amount", + type: "uint256", + }, + { + internalType: "address", + name: "target", + type: "address", + }, + { + internalType: "bytes", + name: "message", + type: "bytes", + }, + ], + name: "depositAndCall", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + components: [ + { + internalType: "bytes", + name: "origin", + type: "bytes", + }, + { + internalType: "address", + name: "sender", + type: "address", + }, + { + internalType: "uint256", + name: "chainID", + type: "uint256", + }, + ], + internalType: "struct zContext", + name: "context", + type: "tuple", + }, + { + internalType: "address", + name: "zrc20", + type: "address", + }, + { + internalType: "uint256", + name: "amount", + type: "uint256", + }, + { + internalType: "address", + name: "target", + type: "address", + }, + { + internalType: "bytes", + name: "message", + type: "bytes", + }, + ], + name: "execute", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "initialize", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "owner", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "proxiableUUID", + outputs: [ + { + internalType: "bytes32", + name: "", + type: "bytes32", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "renounceOwnership", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "newOwner", + type: "address", + }, + ], + name: "transferOwnership", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "newImplementation", + type: "address", + }, + ], + name: "upgradeTo", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "newImplementation", + type: "address", + }, + { + internalType: "bytes", + name: "data", + type: "bytes", + }, + ], + name: "upgradeToAndCall", + outputs: [], + stateMutability: "payable", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes", + name: "receiver", + type: "bytes", + }, + { + internalType: "uint256", + name: "amount", + type: "uint256", + }, + { + internalType: "address", + name: "zrc20", + type: "address", + }, + ], + name: "withdraw", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes", + name: "receiver", + type: "bytes", + }, + { + internalType: "uint256", + name: "amount", + type: "uint256", + }, + { + internalType: "address", + name: "zrc20", + type: "address", + }, + { + internalType: "bytes", + name: "message", + type: "bytes", + }, + ], + name: "withdrawAndCall", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, +] as const; + +const _bytecode = + "0x60a06040523073ffffffffffffffffffffffffffffffffffffffff1660809073ffffffffffffffffffffffffffffffffffffffff1660601b8152503480156200004757600080fd5b50620000586200005e60201b60201c565b62000208565b600060019054906101000a900460ff1615620000b1576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401620000a8906200015c565b60405180910390fd5b60ff801660008054906101000a900460ff1660ff1614620001225760ff6000806101000a81548160ff021916908360ff1602179055507f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb384740249860ff6040516200011991906200017e565b60405180910390a15b565b6000620001336027836200019b565b91506200014082620001b9565b604082019050919050565b6200015681620001ac565b82525050565b60006020820190508181036000830152620001778162000124565b9050919050565b60006020820190506200019560008301846200014b565b92915050565b600082825260208201905092915050565b600060ff82169050919050565b7f496e697469616c697a61626c653a20636f6e747261637420697320696e69746960008201527f616c697a696e6700000000000000000000000000000000000000000000000000602082015250565b60805160601c612c716200024360003960008181610447015281816104d6015281816105e80152818161067701526107270152612c716000f3fe6080604052600436106100dd5760003560e01c80637993c1e01161007f578063bcf7f32b11610059578063bcf7f32b14610251578063c39aca371461027a578063f2fde38b146102a3578063f45346dc146102cc576100dd565b80637993c1e0146101e65780638129fc1c1461020f5780638da5cb5b14610226576100dd565b80633ce4a5bc116100bb5780633ce4a5bc1461015d5780634f1ef2861461018857806352d1902d146101a4578063715018a6146101cf576100dd565b80630ac7c44c146100e2578063135390f91461010b5780633659cfe614610134575b600080fd5b3480156100ee57600080fd5b5061010960048036038101906101049190611c94565b6102f5565b005b34801561011757600080fd5b50610132600480360381019061012d9190611d10565b610360565b005b34801561014057600080fd5b5061015b60048036038101906101569190611b1e565b610445565b005b34801561016957600080fd5b506101726105ce565b60405161017f9190612282565b60405180910390f35b6101a2600480360381019061019d9190611b4b565b6105e6565b005b3480156101b057600080fd5b506101b9610723565b6040516101c691906122fd565b60405180910390f35b3480156101db57600080fd5b506101e46107dc565b005b3480156101f257600080fd5b5061020d60048036038101906102089190611d7f565b6107f0565b005b34801561021b57600080fd5b506102246108db565b005b34801561023257600080fd5b5061023b610a21565b6040516102489190612282565b60405180910390f35b34801561025d57600080fd5b5061027860048036038101906102739190611e23565b610a4b565b005b34801561028657600080fd5b506102a1600480360381019061029c9190611e23565b610b3f565b005b3480156102af57600080fd5b506102ca60048036038101906102c59190611b1e565b610d71565b005b3480156102d857600080fd5b506102f360048036038101906102ee9190611be7565b610df5565b005b82604051610303919061226b565b60405180910390203373ffffffffffffffffffffffffffffffffffffffff167f2b5af078ce280d812dc2241658dc5435c93408020e5418eef55a2b536de51c0f8484604051610353929190612318565b60405180910390a3505050565b600061036c8383610fb1565b90503373ffffffffffffffffffffffffffffffffffffffff167f1866ad2994816c79f4103e1eddacc7b085eb7c635205243a28940be69b01536d8585848673ffffffffffffffffffffffffffffffffffffffff16634d8943bb6040518163ffffffff1660e01b815260040160206040518083038186803b1580156103ef57600080fd5b505afa158015610403573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104279190611ed9565b604051610437949392919061239f565b60405180910390a250505050565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163073ffffffffffffffffffffffffffffffffffffffff1614156104d4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016104cb9061245b565b60405180910390fd5b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166105136112a1565b73ffffffffffffffffffffffffffffffffffffffff1614610569576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105609061247b565b60405180910390fd5b610572816112f8565b6105cb81600067ffffffffffffffff8111156105915761059061282a565b5b6040519080825280601f01601f1916602001820160405280156105c35781602001600182028036833780820191505090505b506000611303565b50565b73735b14bb79463307aacbed86daf3322b1e6226ab81565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163073ffffffffffffffffffffffffffffffffffffffff161415610675576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161066c9061245b565b60405180910390fd5b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166106b46112a1565b73ffffffffffffffffffffffffffffffffffffffff161461070a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107019061247b565b60405180910390fd5b610713826112f8565b61071f82826001611303565b5050565b60007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163073ffffffffffffffffffffffffffffffffffffffff16146107b3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107aa9061249b565b60405180910390fd5b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc60001b905090565b6107e4611480565b6107ee60006114fe565b565b60006107fc8585610fb1565b90503373ffffffffffffffffffffffffffffffffffffffff167f1866ad2994816c79f4103e1eddacc7b085eb7c635205243a28940be69b01536d8787848873ffffffffffffffffffffffffffffffffffffffff16634d8943bb6040518163ffffffff1660e01b815260040160206040518083038186803b15801561087f57600080fd5b505afa158015610893573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108b79190611ed9565b88886040516108cb9695949392919061233c565b60405180910390a2505050505050565b60008060019054906101000a900460ff1615905080801561090c5750600160008054906101000a900460ff1660ff16105b80610939575061091b306115c4565b1580156109385750600160008054906101000a900460ff1660ff16145b5b610978576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161096f906124db565b60405180910390fd5b60016000806101000a81548160ff021916908360ff16021790555080156109b5576001600060016101000a81548160ff0219169083151502179055505b6109bd6115e7565b6109c5611640565b8015610a1e5760008060016101000a81548160ff0219169083151502179055507f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024986001604051610a1591906123fe565b60405180910390a15b50565b6000603360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b73735b14bb79463307aacbed86daf3322b1e6226ab73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610ac4576040517f2b2add3d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8273ffffffffffffffffffffffffffffffffffffffff1663de43156e87878786866040518663ffffffff1660e01b8152600401610b0595949392919061259b565b600060405180830381600087803b158015610b1f57600080fd5b505af1158015610b33573d6000803e3d6000fd5b50505050505050505050565b73735b14bb79463307aacbed86daf3322b1e6226ab73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610bb8576040517f2b2add3d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73735b14bb79463307aacbed86daf3322b1e6226ab73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161480610c3157503073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16145b15610c68576040517f82d5d76a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8473ffffffffffffffffffffffffffffffffffffffff166347e7ef2484866040518363ffffffff1660e01b8152600401610ca39291906122d4565b602060405180830381600087803b158015610cbd57600080fd5b505af1158015610cd1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610cf59190611c3a565b508273ffffffffffffffffffffffffffffffffffffffff1663de43156e87878786866040518663ffffffff1660e01b8152600401610d3795949392919061259b565b600060405180830381600087803b158015610d5157600080fd5b505af1158015610d65573d6000803e3d6000fd5b50505050505050505050565b610d79611480565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415610de9576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610de09061243b565b60405180910390fd5b610df2816114fe565b50565b73735b14bb79463307aacbed86daf3322b1e6226ab73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610e6e576040517f2b2add3d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73735b14bb79463307aacbed86daf3322b1e6226ab73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161480610ee757503073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16145b15610f1e576040517f82d5d76a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8273ffffffffffffffffffffffffffffffffffffffff166347e7ef2482846040518363ffffffff1660e01b8152600401610f599291906122d4565b602060405180830381600087803b158015610f7357600080fd5b505af1158015610f87573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fab9190611c3a565b50505050565b60008060008373ffffffffffffffffffffffffffffffffffffffff1663d9eeebed6040518163ffffffff1660e01b8152600401604080518083038186803b158015610ffb57600080fd5b505afa15801561100f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110339190611ba7565b915091508173ffffffffffffffffffffffffffffffffffffffff166323b872dd3373735b14bb79463307aacbed86daf3322b1e6226ab846040518463ffffffff1660e01b81526004016110889392919061229d565b602060405180830381600087803b1580156110a257600080fd5b505af11580156110b6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110da9190611c3a565b611110576040517f0a7cd6d600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8373ffffffffffffffffffffffffffffffffffffffff166323b872dd3330886040518463ffffffff1660e01b815260040161114d9392919061229d565b602060405180830381600087803b15801561116757600080fd5b505af115801561117b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061119f9190611c3a565b6111d5576040517f4dd9ee8d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8373ffffffffffffffffffffffffffffffffffffffff166342966c68866040518263ffffffff1660e01b815260040161120e91906125f0565b602060405180830381600087803b15801561122857600080fd5b505af115801561123c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112609190611c3a565b611296576040517f2c77e05c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b809250505092915050565b60006112cf7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc60001b611691565b60000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b611300611480565b50565b61132f7f4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd914360001b61169b565b60000160009054906101000a900460ff16156113535761134e836116a5565b61147b565b8273ffffffffffffffffffffffffffffffffffffffff166352d1902d6040518163ffffffff1660e01b815260040160206040518083038186803b15801561139957600080fd5b505afa9250505080156113ca57506040513d601f19601f820116820180604052508101906113c79190611c67565b60015b611409576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611400906124fb565b60405180910390fd5b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc60001b811461146e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611465906124bb565b60405180910390fd5b5061147a83838361175e565b5b505050565b61148861178a565b73ffffffffffffffffffffffffffffffffffffffff166114a6610a21565b73ffffffffffffffffffffffffffffffffffffffff16146114fc576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016114f39061253b565b60405180910390fd5b565b6000603360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905081603360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b6000808273ffffffffffffffffffffffffffffffffffffffff163b119050919050565b600060019054906101000a900460ff16611636576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161162d9061257b565b60405180910390fd5b61163e611792565b565b600060019054906101000a900460ff1661168f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016116869061257b565b60405180910390fd5b565b6000819050919050565b6000819050919050565b6116ae816115c4565b6116ed576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016116e49061251b565b60405180910390fd5b8061171a7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc60001b611691565b60000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b611767836117f3565b6000825111806117745750805b15611785576117838383611842565b505b505050565b600033905090565b600060019054906101000a900460ff166117e1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016117d89061257b565b60405180910390fd5b6117f16117ec61178a565b6114fe565b565b6117fc816116a5565b8073ffffffffffffffffffffffffffffffffffffffff167fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b60405160405180910390a250565b60606118678383604051806060016040528060278152602001612c156027913961186f565b905092915050565b60606000808573ffffffffffffffffffffffffffffffffffffffff1685604051611899919061226b565b600060405180830381855af49150503d80600081146118d4576040519150601f19603f3d011682016040523d82523d6000602084013e6118d9565b606091505b50915091506118ea868383876118f5565b925050509392505050565b606083156119585760008351141561195057611910856115c4565b61194f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016119469061255b565b60405180910390fd5b5b829050611963565b611962838361196b565b5b949350505050565b60008251111561197e5781518083602001fd5b806040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016119b29190612419565b60405180910390fd5b60006119ce6119c984612630565b61260b565b9050828152602081018484840111156119ea576119e9612877565b5b6119f58482856127b7565b509392505050565b600081359050611a0c81612bb8565b92915050565b600081519050611a2181612bb8565b92915050565b600081519050611a3681612bcf565b92915050565b600081519050611a4b81612be6565b92915050565b60008083601f840112611a6757611a66612863565b5b8235905067ffffffffffffffff811115611a8457611a8361285e565b5b602083019150836001820283011115611aa057611a9f612872565b5b9250929050565b600082601f830112611abc57611abb612863565b5b8135611acc8482602086016119bb565b91505092915050565b600060608284031215611aeb57611aea612868565b5b81905092915050565b600081359050611b0381612bfd565b92915050565b600081519050611b1881612bfd565b92915050565b600060208284031215611b3457611b33612886565b5b6000611b42848285016119fd565b91505092915050565b60008060408385031215611b6257611b61612886565b5b6000611b70858286016119fd565b925050602083013567ffffffffffffffff811115611b9157611b9061287c565b5b611b9d85828601611aa7565b9150509250929050565b60008060408385031215611bbe57611bbd612886565b5b6000611bcc85828601611a12565b9250506020611bdd85828601611b09565b9150509250929050565b600080600060608486031215611c0057611bff612886565b5b6000611c0e868287016119fd565b9350506020611c1f86828701611af4565b9250506040611c30868287016119fd565b9150509250925092565b600060208284031215611c5057611c4f612886565b5b6000611c5e84828501611a27565b91505092915050565b600060208284031215611c7d57611c7c612886565b5b6000611c8b84828501611a3c565b91505092915050565b600080600060408486031215611cad57611cac612886565b5b600084013567ffffffffffffffff811115611ccb57611cca61287c565b5b611cd786828701611aa7565b935050602084013567ffffffffffffffff811115611cf857611cf761287c565b5b611d0486828701611a51565b92509250509250925092565b600080600060608486031215611d2957611d28612886565b5b600084013567ffffffffffffffff811115611d4757611d4661287c565b5b611d5386828701611aa7565b9350506020611d6486828701611af4565b9250506040611d75868287016119fd565b9150509250925092565b600080600080600060808688031215611d9b57611d9a612886565b5b600086013567ffffffffffffffff811115611db957611db861287c565b5b611dc588828901611aa7565b9550506020611dd688828901611af4565b9450506040611de7888289016119fd565b935050606086013567ffffffffffffffff811115611e0857611e0761287c565b5b611e1488828901611a51565b92509250509295509295909350565b60008060008060008060a08789031215611e4057611e3f612886565b5b600087013567ffffffffffffffff811115611e5e57611e5d61287c565b5b611e6a89828a01611ad5565b9650506020611e7b89828a016119fd565b9550506040611e8c89828a01611af4565b9450506060611e9d89828a016119fd565b935050608087013567ffffffffffffffff811115611ebe57611ebd61287c565b5b611eca89828a01611a51565b92509250509295509295509295565b600060208284031215611eef57611eee612886565b5b6000611efd84828501611b09565b91505092915050565b611f0f81612746565b82525050565b611f1e81612746565b82525050565b611f2d81612764565b82525050565b6000611f3f8385612677565b9350611f4c8385846127b7565b611f558361288b565b840190509392505050565b6000611f6c8385612688565b9350611f798385846127b7565b611f828361288b565b840190509392505050565b6000611f9882612661565b611fa28185612688565b9350611fb28185602086016127c6565b611fbb8161288b565b840191505092915050565b6000611fd182612661565b611fdb8185612699565b9350611feb8185602086016127c6565b80840191505092915050565b612000816127a5565b82525050565b60006120118261266c565b61201b81856126a4565b935061202b8185602086016127c6565b6120348161288b565b840191505092915050565b600061204c6026836126a4565b91506120578261289c565b604082019050919050565b600061206f602c836126a4565b915061207a826128eb565b604082019050919050565b6000612092602c836126a4565b915061209d8261293a565b604082019050919050565b60006120b56038836126a4565b91506120c082612989565b604082019050919050565b60006120d86029836126a4565b91506120e3826129d8565b604082019050919050565b60006120fb602e836126a4565b915061210682612a27565b604082019050919050565b600061211e602e836126a4565b915061212982612a76565b604082019050919050565b6000612141602d836126a4565b915061214c82612ac5565b604082019050919050565b60006121646020836126a4565b915061216f82612b14565b602082019050919050565b6000612187600083612688565b915061219282612b3d565b600082019050919050565b60006121aa601d836126a4565b91506121b582612b40565b602082019050919050565b60006121cd602b836126a4565b91506121d882612b69565b604082019050919050565b6000606083016121f660008401846126cc565b8583036000870152612209838284611f33565b9250505061221a60208401846126b5565b6122276020860182611f06565b50612235604084018461272f565b612242604086018261224d565b508091505092915050565b6122568161278e565b82525050565b6122658161278e565b82525050565b60006122778284611fc6565b915081905092915050565b60006020820190506122976000830184611f15565b92915050565b60006060820190506122b26000830186611f15565b6122bf6020830185611f15565b6122cc604083018461225c565b949350505050565b60006040820190506122e96000830185611f15565b6122f6602083018461225c565b9392505050565b60006020820190506123126000830184611f24565b92915050565b60006020820190508181036000830152612333818486611f60565b90509392505050565b600060a08201905081810360008301526123568189611f8d565b9050612365602083018861225c565b612372604083018761225c565b61237f606083018661225c565b8181036080830152612392818486611f60565b9050979650505050505050565b600060a08201905081810360008301526123b98187611f8d565b90506123c8602083018661225c565b6123d5604083018561225c565b6123e2606083018461225c565b81810360808301526123f38161217a565b905095945050505050565b60006020820190506124136000830184611ff7565b92915050565b600060208201905081810360008301526124338184612006565b905092915050565b600060208201905081810360008301526124548161203f565b9050919050565b6000602082019050818103600083015261247481612062565b9050919050565b6000602082019050818103600083015261249481612085565b9050919050565b600060208201905081810360008301526124b4816120a8565b9050919050565b600060208201905081810360008301526124d4816120cb565b9050919050565b600060208201905081810360008301526124f4816120ee565b9050919050565b6000602082019050818103600083015261251481612111565b9050919050565b6000602082019050818103600083015261253481612134565b9050919050565b6000602082019050818103600083015261255481612157565b9050919050565b600060208201905081810360008301526125748161219d565b9050919050565b60006020820190508181036000830152612594816121c0565b9050919050565b600060808201905081810360008301526125b581886121e3565b90506125c46020830187611f15565b6125d1604083018661225c565b81810360608301526125e4818486611f60565b90509695505050505050565b6000602082019050612605600083018461225c565b92915050565b6000612615612626565b905061262182826127f9565b919050565b6000604051905090565b600067ffffffffffffffff82111561264b5761264a61282a565b5b6126548261288b565b9050602081019050919050565b600081519050919050565b600081519050919050565b600082825260208201905092915050565b600082825260208201905092915050565b600081905092915050565b600082825260208201905092915050565b60006126c460208401846119fd565b905092915050565b600080833560016020038436030381126126e9576126e8612881565b5b83810192508235915060208301925067ffffffffffffffff82111561271157612710612859565b5b6001820236038413156127275761272661286d565b5b509250929050565b600061273e6020840184611af4565b905092915050565b60006127518261276e565b9050919050565b60008115159050919050565b6000819050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b60006127b082612798565b9050919050565b82818337600083830152505050565b60005b838110156127e45780820151818401526020810190506127c9565b838111156127f3576000848401525b50505050565b6128028261288b565b810181811067ffffffffffffffff821117156128215761282061282a565b5b80604052505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b7f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060008201527f64656c656761746563616c6c0000000000000000000000000000000000000000602082015250565b7f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060008201527f6163746976652070726f78790000000000000000000000000000000000000000602082015250565b7f555550535570677261646561626c653a206d757374206e6f742062652063616c60008201527f6c6564207468726f7567682064656c656761746563616c6c0000000000000000602082015250565b7f45524331393637557067726164653a20756e737570706f727465642070726f7860008201527f6961626c65555549440000000000000000000000000000000000000000000000602082015250565b7f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160008201527f647920696e697469616c697a6564000000000000000000000000000000000000602082015250565b7f45524331393637557067726164653a206e657720696d706c656d656e7461746960008201527f6f6e206973206e6f742055555053000000000000000000000000000000000000602082015250565b7f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60008201527f6f74206120636f6e747261637400000000000000000000000000000000000000602082015250565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b50565b7f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000600082015250565b7f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960008201527f6e697469616c697a696e67000000000000000000000000000000000000000000602082015250565b612bc181612746565b8114612bcc57600080fd5b50565b612bd881612758565b8114612be357600080fd5b50565b612bef81612764565b8114612bfa57600080fd5b50565b612c068161278e565b8114612c1157600080fd5b5056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a26469706673582212200ef3180e9cedc3a1a1edef10c36506994a9e026c730e2624d2348359ce00bf2764736f6c63430008070033"; + +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..3e8d5164 --- /dev/null +++ b/typechain-types/factories/contracts/prototypes/zevm/Sender__factory.ts @@ -0,0 +1,157 @@ +/* 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: [], + name: "ApprovalFailed", + type: "error", + }, + { + inputs: [ + { + internalType: "bytes", + name: "receiver", + type: "bytes", + }, + { + internalType: "string", + name: "str", + type: "string", + }, + { + internalType: "uint256", + name: "num", + type: "uint256", + }, + { + internalType: "bool", + name: "flag", + type: "bool", + }, + ], + name: "callReceiver", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "gateway", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes", + name: "receiver", + type: "bytes", + }, + { + internalType: "uint256", + name: "amount", + type: "uint256", + }, + { + internalType: "address", + name: "zrc20", + type: "address", + }, + { + internalType: "string", + name: "str", + type: "string", + }, + { + internalType: "uint256", + name: "num", + type: "uint256", + }, + { + internalType: "bool", + name: "flag", + type: "bool", + }, + ], + name: "withdrawAndCallReceiver", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, +] as const; + +const _bytecode = + "0x608060405234801561001057600080fd5b50604051610bcd380380610bcd8339818101604052810190610032919061008d565b806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050610108565b600081519050610087816100f1565b92915050565b6000602082840312156100a3576100a26100ec565b5b60006100b184828501610078565b91505092915050565b60006100c5826100cc565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600080fd5b6100fa816100ba565b811461010557600080fd5b50565b610ab6806101176000396000f3fe608060405234801561001057600080fd5b50600436106100415760003560e01c80630abd890514610046578063116191b614610062578063a0a1730b14610080575b600080fd5b610060600480360381019061005b91906105fd565b61009c565b005b61006a6102af565b6040516100779190610761565b60405180910390f35b61009a6004803603810190610095919061055e565b6102d3565b005b60008383836040516024016100b39392919061082f565b6040516020818303038152906040527fe04d4f97000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff838183161783525050505090508473ffffffffffffffffffffffffffffffffffffffff1663095ea7b360008054906101000a900473ffffffffffffffffffffffffffffffffffffffff16886040518363ffffffff1660e01b815260040161018d92919061077c565b602060405180830381600087803b1580156101a757600080fd5b505af11580156101bb573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101df9190610531565b610215576040517f8164f84200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16637993c1e0888888856040518563ffffffff1660e01b815260040161027494939291906107dc565b600060405180830381600087803b15801561028e57600080fd5b505af11580156102a2573d6000803e3d6000fd5b5050505050505050505050565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008383836040516024016102ea9392919061082f565b6040516020818303038152906040527fe04d4f97000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050905060008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16630ac7c44c86836040518363ffffffff1660e01b81526004016103c49291906107a5565b600060405180830381600087803b1580156103de57600080fd5b505af11580156103f2573d6000803e3d6000fd5b505050505050505050565b600061041061040b84610892565b61086d565b90508281526020810184848401111561042c5761042b610a1b565b5b610437848285610974565b509392505050565b600061045261044d846108c3565b61086d565b90508281526020810184848401111561046e5761046d610a1b565b5b610479848285610974565b509392505050565b60008135905061049081610a3b565b92915050565b6000813590506104a581610a52565b92915050565b6000815190506104ba81610a52565b92915050565b600082601f8301126104d5576104d4610a16565b5b81356104e58482602086016103fd565b91505092915050565b600082601f83011261050357610502610a16565b5b813561051384826020860161043f565b91505092915050565b60008135905061052b81610a69565b92915050565b60006020828403121561054757610546610a25565b5b6000610555848285016104ab565b91505092915050565b6000806000806080858703121561057857610577610a25565b5b600085013567ffffffffffffffff81111561059657610595610a20565b5b6105a2878288016104c0565b945050602085013567ffffffffffffffff8111156105c3576105c2610a20565b5b6105cf878288016104ee565b93505060406105e08782880161051c565b92505060606105f187828801610496565b91505092959194509250565b60008060008060008060c0878903121561061a57610619610a25565b5b600087013567ffffffffffffffff81111561063857610637610a20565b5b61064489828a016104c0565b965050602061065589828a0161051c565b955050604061066689828a01610481565b945050606087013567ffffffffffffffff81111561068757610686610a20565b5b61069389828a016104ee565b93505060806106a489828a0161051c565b92505060a06106b589828a01610496565b9150509295509295509295565b6106cb8161092c565b82525050565b6106da8161093e565b82525050565b60006106eb826108f4565b6106f5818561090a565b9350610705818560208601610983565b61070e81610a2a565b840191505092915050565b6000610724826108ff565b61072e818561091b565b935061073e818560208601610983565b61074781610a2a565b840191505092915050565b61075b8161096a565b82525050565b600060208201905061077660008301846106c2565b92915050565b600060408201905061079160008301856106c2565b61079e6020830184610752565b9392505050565b600060408201905081810360008301526107bf81856106e0565b905081810360208301526107d381846106e0565b90509392505050565b600060808201905081810360008301526107f681876106e0565b90506108056020830186610752565b61081260408301856106c2565b818103606083015261082481846106e0565b905095945050505050565b600060608201905081810360008301526108498186610719565b90506108586020830185610752565b61086560408301846106d1565b949350505050565b6000610877610888565b905061088382826109b6565b919050565b6000604051905090565b600067ffffffffffffffff8211156108ad576108ac6109e7565b5b6108b682610a2a565b9050602081019050919050565b600067ffffffffffffffff8211156108de576108dd6109e7565b5b6108e782610a2a565b9050602081019050919050565b600081519050919050565b600081519050919050565b600082825260208201905092915050565b600082825260208201905092915050565b60006109378261094a565b9050919050565b60008115159050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b82818337600083830152505050565b60005b838110156109a1578082015181840152602081019050610986565b838111156109b0576000848401525b50505050565b6109bf82610a2a565b810181811067ffffffffffffffff821117156109de576109dd6109e7565b5b80604052505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b610a448161092c565b8114610a4f57600080fd5b50565b610a5b8161093e565b8114610a6657600080fd5b50565b610a728161096a565b8114610a7d57600080fd5b5056fea2646970667358221220ef1adb339e85463eb7fc8992fa1513ffe98ce4f59d2fb2b57db08574d1cccd0864736f6c63430008070033"; + +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/TestZContract__factory.ts b/typechain-types/factories/contracts/prototypes/zevm/TestZContract__factory.ts new file mode 100644 index 00000000..d7849ee2 --- /dev/null +++ b/typechain-types/factories/contracts/prototypes/zevm/TestZContract__factory.ts @@ -0,0 +1,145 @@ +/* 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 { + TestZContract, + TestZContractInterface, +} from "../../../../contracts/prototypes/zevm/TestZContract"; + +const _abi = [ + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "bytes", + name: "origin", + type: "bytes", + }, + { + indexed: false, + internalType: "address", + name: "sender", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "chainID", + type: "uint256", + }, + { + indexed: false, + internalType: "address", + name: "msgSender", + type: "address", + }, + { + indexed: false, + internalType: "string", + name: "message", + type: "string", + }, + ], + name: "ContextData", + type: "event", + }, + { + inputs: [ + { + components: [ + { + internalType: "bytes", + name: "origin", + type: "bytes", + }, + { + internalType: "address", + name: "sender", + type: "address", + }, + { + internalType: "uint256", + name: "chainID", + type: "uint256", + }, + ], + internalType: "struct zContext", + name: "context", + type: "tuple", + }, + { + 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", + }, +] as const; + +const _bytecode = + "0x608060405234801561001057600080fd5b50610647806100206000396000f3fe608060405234801561001057600080fd5b506004361061002b5760003560e01c8063de43156e14610030575b600080fd5b61004a60048036038101906100459190610251565b61004c565b005b6000828281019061005d9190610208565b90507fcdc8ee677dc5ebe680fb18cebda5e26ba5ea1f0ba504a47e2a9a2ecb476dc98e86806000019061009091906103dc565b8860200160208101906100a391906101db565b896040013533866040516100bc96959493929190610379565b60405180910390a1505050505050565b60006100df6100da84610464565b61043f565b9050828152602081018484840111156100fb576100fa6105c3565b5b6101068482856104fe565b509392505050565b60008135905061011d816105e3565b92915050565b60008083601f840112610139576101386105a5565b5b8235905067ffffffffffffffff811115610156576101556105a0565b5b602083019150836001820283011115610172576101716105b9565b5b9250929050565b600082601f83011261018e5761018d6105a5565b5b813561019e8482602086016100cc565b91505092915050565b6000606082840312156101bd576101bc6105af565b5b81905092915050565b6000813590506101d5816105fa565b92915050565b6000602082840312156101f1576101f06105cd565b5b60006101ff8482850161010e565b91505092915050565b60006020828403121561021e5761021d6105cd565b5b600082013567ffffffffffffffff81111561023c5761023b6105c8565b5b61024884828501610179565b91505092915050565b60008060008060006080868803121561026d5761026c6105cd565b5b600086013567ffffffffffffffff81111561028b5761028a6105c8565b5b610297888289016101a7565b95505060206102a88882890161010e565b94505060406102b9888289016101c6565b935050606086013567ffffffffffffffff8111156102da576102d96105c8565b5b6102e688828901610123565b92509250509295509295909350565b6102fe816104c2565b82525050565b600061031083856104a0565b935061031d8385846104fe565b610326836105d2565b840190509392505050565b600061033c82610495565b61034681856104b1565b935061035681856020860161050d565b61035f816105d2565b840191505092915050565b610373816104f4565b82525050565b600060a082019050818103600083015261039481888a610304565b90506103a360208301876102f5565b6103b0604083018661036a565b6103bd60608301856102f5565b81810360808301526103cf8184610331565b9050979650505050505050565b600080833560016020038436030381126103f9576103f86105b4565b5b80840192508235915067ffffffffffffffff82111561041b5761041a6105aa565b5b602083019250600182023603831315610437576104366105be565b5b509250929050565b600061044961045a565b90506104558282610540565b919050565b6000604051905090565b600067ffffffffffffffff82111561047f5761047e610571565b5b610488826105d2565b9050602081019050919050565b600081519050919050565b600082825260208201905092915050565b600082825260208201905092915050565b60006104cd826104d4565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b82818337600083830152505050565b60005b8381101561052b578082015181840152602081019050610510565b8381111561053a576000848401525b50505050565b610549826105d2565b810181811067ffffffffffffffff8211171561056857610567610571565b5b80604052505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b6105ec816104c2565b81146105f757600080fd5b50565b610603816104f4565b811461060e57600080fd5b5056fea2646970667358221220658b8c56b21b674d6677fa444091a4a714b74ee72bac7b4972c1063bda6d73d764736f6c63430008070033"; + +type TestZContractConstructorParams = + | [signer?: Signer] + | ConstructorParameters; + +const isSuperArgs = ( + xs: TestZContractConstructorParams +): xs is ConstructorParameters => xs.length > 1; + +export class TestZContract__factory extends ContractFactory { + constructor(...args: TestZContractConstructorParams) { + 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): TestZContract { + return super.attach(address) as TestZContract; + } + override connect(signer: Signer): TestZContract__factory { + return super.connect(signer) as TestZContract__factory; + } + + static readonly bytecode = _bytecode; + static readonly abi = _abi; + static createInterface(): TestZContractInterface { + return new utils.Interface(_abi) as TestZContractInterface; + } + static connect( + address: string, + signerOrProvider: Signer | Provider + ): TestZContract { + return new Contract(address, _abi, signerOrProvider) as TestZContract; + } +} diff --git a/typechain-types/factories/contracts/prototypes/zevm/ZRC20New.sol/ZRC20Errors__factory.ts b/typechain-types/factories/contracts/prototypes/zevm/ZRC20New.sol/ZRC20Errors__factory.ts new file mode 100644 index 00000000..299c388e --- /dev/null +++ b/typechain-types/factories/contracts/prototypes/zevm/ZRC20New.sol/ZRC20Errors__factory.ts @@ -0,0 +1,66 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { Contract, Signer, utils } from "ethers"; +import type { Provider } from "@ethersproject/providers"; +import type { + ZRC20Errors, + ZRC20ErrorsInterface, +} from "../../../../../contracts/prototypes/zevm/ZRC20New.sol/ZRC20Errors"; + +const _abi = [ + { + inputs: [], + name: "CallerIsNotFungibleModule", + type: "error", + }, + { + inputs: [], + name: "GasFeeTransferFailed", + type: "error", + }, + { + inputs: [], + name: "InvalidSender", + type: "error", + }, + { + inputs: [], + name: "LowAllowance", + type: "error", + }, + { + inputs: [], + name: "LowBalance", + type: "error", + }, + { + inputs: [], + name: "ZeroAddress", + type: "error", + }, + { + inputs: [], + name: "ZeroGasCoin", + type: "error", + }, + { + inputs: [], + name: "ZeroGasPrice", + type: "error", + }, +] as const; + +export class ZRC20Errors__factory { + static readonly abi = _abi; + static createInterface(): ZRC20ErrorsInterface { + return new utils.Interface(_abi) as ZRC20ErrorsInterface; + } + static connect( + address: string, + signerOrProvider: Signer | Provider + ): ZRC20Errors { + return new Contract(address, _abi, signerOrProvider) as ZRC20Errors; + } +} diff --git a/typechain-types/factories/contracts/prototypes/zevm/ZRC20New.sol/ZRC20New__factory.ts b/typechain-types/factories/contracts/prototypes/zevm/ZRC20New.sol/ZRC20New__factory.ts new file mode 100644 index 00000000..2bb551e4 --- /dev/null +++ b/typechain-types/factories/contracts/prototypes/zevm/ZRC20New.sol/ZRC20New__factory.ts @@ -0,0 +1,730 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import { + Signer, + utils, + Contract, + ContractFactory, + BigNumberish, + Overrides, +} from "ethers"; +import type { Provider, TransactionRequest } from "@ethersproject/providers"; +import type { PromiseOrValue } from "../../../../../common"; +import type { + ZRC20New, + ZRC20NewInterface, +} from "../../../../../contracts/prototypes/zevm/ZRC20New.sol/ZRC20New"; + +const _abi = [ + { + inputs: [ + { + internalType: "string", + name: "name_", + type: "string", + }, + { + internalType: "string", + name: "symbol_", + type: "string", + }, + { + internalType: "uint8", + name: "decimals_", + type: "uint8", + }, + { + internalType: "uint256", + name: "chainid_", + type: "uint256", + }, + { + internalType: "enum CoinType", + name: "coinType_", + type: "uint8", + }, + { + internalType: "uint256", + name: "gasLimit_", + type: "uint256", + }, + { + internalType: "address", + name: "systemContractAddress_", + type: "address", + }, + { + internalType: "address", + name: "gatewayContractAddress_", + type: "address", + }, + ], + stateMutability: "nonpayable", + type: "constructor", + }, + { + inputs: [], + name: "CallerIsNotFungibleModule", + type: "error", + }, + { + inputs: [], + name: "GasFeeTransferFailed", + type: "error", + }, + { + inputs: [], + name: "InvalidSender", + type: "error", + }, + { + inputs: [], + name: "LowAllowance", + type: "error", + }, + { + inputs: [], + name: "LowBalance", + type: "error", + }, + { + inputs: [], + name: "ZeroAddress", + type: "error", + }, + { + inputs: [], + name: "ZeroGasCoin", + type: "error", + }, + { + inputs: [], + name: "ZeroGasPrice", + type: "error", + }, + { + 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: "CHAIN_ID", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "COIN_TYPE", + outputs: [ + { + internalType: "enum CoinType", + name: "", + type: "uint8", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "FUNGIBLE_MODULE_ADDRESS", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "GAS_LIMIT", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "GATEWAY_CONTRACT_ADDRESS", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "PROTOCOL_FLAT_FEE", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "SYSTEM_CONTRACT_ADDRESS", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + 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: [], + name: "decimals", + outputs: [ + { + internalType: "uint8", + name: "", + type: "uint8", + }, + ], + stateMutability: "view", + 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: [], + name: "name", + outputs: [ + { + internalType: "string", + name: "", + type: "string", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "symbol", + outputs: [ + { + internalType: "string", + name: "", + type: "string", + }, + ], + stateMutability: "view", + 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: "uint256", + name: "gasLimit", + type: "uint256", + }, + ], + name: "updateGasLimit", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "protocolFlatFee", + type: "uint256", + }, + ], + name: "updateProtocolFlatFee", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "addr", + type: "address", + }, + ], + name: "updateSystemContractAddress", + outputs: [], + 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", + }, +] as const; + +const _bytecode = + "0x60c06040523480156200001157600080fd5b506040516200282d3803806200282d83398181016040528101906200003791906200035b565b73735b14bb79463307aacbed86daf3322b1e6226ab73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614620000b1576040517f2b2add3d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8760079080519060200190620000c9929190620001d1565b508660089080519060200190620000e2929190620001d1565b5085600960006101000a81548160ff021916908360ff16021790555084608081815250508360028111156200011c576200011b620005ae565b5b60a0816002811115620001345762000133620005ae565b5b60f81b8152505082600281905550816000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505050505050505050620006bf565b828054620001df9062000542565b90600052602060002090601f0160209004810192826200020357600085556200024f565b82601f106200021e57805160ff19168380011785556200024f565b828001600101855582156200024f579182015b828111156200024e57825182559160200191906001019062000231565b5b5090506200025e919062000262565b5090565b5b808211156200027d57600081600090555060010162000263565b5090565b60006200029862000292846200048b565b62000462565b905082815260208101848484011115620002b757620002b662000640565b5b620002c48482856200050c565b509392505050565b600081519050620002dd8162000660565b92915050565b600081519050620002f4816200067a565b92915050565b600082601f8301126200031257620003116200063b565b5b81516200032484826020860162000281565b91505092915050565b6000815190506200033e816200068b565b92915050565b6000815190506200035581620006a5565b92915050565b600080600080600080600080610100898b0312156200037f576200037e6200064a565b5b600089015167ffffffffffffffff811115620003a0576200039f62000645565b5b620003ae8b828c01620002fa565b985050602089015167ffffffffffffffff811115620003d257620003d162000645565b5b620003e08b828c01620002fa565b9750506040620003f38b828c0162000344565b9650506060620004068b828c016200032d565b9550506080620004198b828c01620002e3565b94505060a06200042c8b828c016200032d565b93505060c06200043f8b828c01620002cc565b92505060e0620004528b828c01620002cc565b9150509295985092959890939650565b60006200046e62000481565b90506200047c828262000578565b919050565b6000604051905090565b600067ffffffffffffffff821115620004a957620004a86200060c565b5b620004b4826200064f565b9050602081019050919050565b6000620004ce82620004d5565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b60005b838110156200052c5780820151818401526020810190506200050f565b838111156200053c576000848401525b50505050565b600060028204905060018216806200055b57607f821691505b60208210811415620005725762000571620005dd565b5b50919050565b62000583826200064f565b810181811067ffffffffffffffff82111715620005a557620005a46200060c565b5b80604052505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b6200066b81620004c1565b81146200067757600080fd5b50565b600381106200068857600080fd5b50565b6200069681620004f5565b8114620006a257600080fd5b50565b620006b081620004ff565b8114620006bc57600080fd5b50565b60805160a05160f81c612137620006f660003960006109580152600081816108a201528181610c250152610d5a01526121376000f3fe608060405234801561001057600080fd5b506004361061014d5760003560e01c806385e1f4d0116100c3578063d9eeebed1161007c578063d9eeebed146103cc578063dd62ed3e146103eb578063e2f535b81461041b578063eddeb12314610439578063f2441b3214610455578063f687d12a146104735761014d565b806385e1f4d0146102f657806395d89b4114610314578063a3413d0314610332578063a9059cbb14610350578063c701262614610380578063c835d7cc146103b05761014d565b8063313ce56711610115578063313ce5671461020c5780633ce4a5bc1461022a57806342966c681461024857806347e7ef24146102785780634d8943bb146102a857806370a08231146102c65761014d565b806306fdde0314610152578063091d278814610170578063095ea7b31461018e57806318160ddd146101be57806323b872dd146101dc575b600080fd5b61015a61048f565b6040516101679190611cad565b60405180910390f35b610178610521565b6040516101859190611ccf565b60405180910390f35b6101a860048036038101906101a3919061196e565b610527565b6040516101b59190611bfb565b60405180910390f35b6101c6610545565b6040516101d39190611ccf565b60405180910390f35b6101f660048036038101906101f1919061191b565b61054f565b6040516102039190611bfb565b60405180910390f35b610214610647565b6040516102219190611cea565b60405180910390f35b61023261065e565b60405161023f9190611b80565b60405180910390f35b610262600480360381019061025d9190611a37565b610676565b60405161026f9190611bfb565b60405180910390f35b610292600480360381019061028d919061196e565b61068b565b60405161029f9190611bfb565b60405180910390f35b6102b0610851565b6040516102bd9190611ccf565b60405180910390f35b6102e060048036038101906102db9190611881565b610857565b6040516102ed9190611ccf565b60405180910390f35b6102fe6108a0565b60405161030b9190611ccf565b60405180910390f35b61031c6108c4565b6040516103299190611cad565b60405180910390f35b61033a610956565b6040516103479190611c92565b60405180910390f35b61036a6004803603810190610365919061196e565b61097a565b6040516103779190611bfb565b60405180910390f35b61039a600480360381019061039591906119db565b610998565b6040516103a79190611bfb565b60405180910390f35b6103ca60048036038101906103c59190611881565b610aee565b005b6103d4610be1565b6040516103e2929190611bd2565b60405180910390f35b610405600480360381019061040091906118db565b610e4e565b6040516104129190611ccf565b60405180910390f35b610423610ed5565b6040516104309190611b80565b60405180910390f35b610453600480360381019061044e9190611a37565b610efb565b005b61045d610fb5565b60405161046a9190611b80565b60405180910390f35b61048d60048036038101906104889190611a37565b610fd9565b005b60606007805461049e90611f33565b80601f01602080910402602001604051908101604052809291908181526020018280546104ca90611f33565b80156105175780601f106104ec57610100808354040283529160200191610517565b820191906000526020600020905b8154815290600101906020018083116104fa57829003601f168201915b5050505050905090565b60025481565b600061053b610534611093565b848461109b565b6001905092915050565b6000600654905090565b600061055c848484611254565b6000600560008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006105a7611093565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205490508281101561061e576040517f10bad14700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61063b8561062a611093565b85846106369190611e43565b61109b565b60019150509392505050565b6000600960009054906101000a900460ff16905090565b73735b14bb79463307aacbed86daf3322b1e6226ab81565b600061068233836114b0565b60019050919050565b600073735b14bb79463307aacbed86daf3322b1e6226ab73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614158015610729575060008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614155b80156107835750600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614155b156107ba576040517fddb5de5e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6107c48383611668565b8273ffffffffffffffffffffffffffffffffffffffff167f67fc7bdaed5b0ec550d8706b87d60568ab70c6b781263c70101d54cd1564aab373735b14bb79463307aacbed86daf3322b1e6226ab6040516020016108219190611b65565b6040516020818303038152906040528460405161083f929190611c16565b60405180910390a26001905092915050565b60035481565b6000600460008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b7f000000000000000000000000000000000000000000000000000000000000000081565b6060600880546108d390611f33565b80601f01602080910402602001604051908101604052809291908181526020018280546108ff90611f33565b801561094c5780601f106109215761010080835404028352916020019161094c565b820191906000526020600020905b81548152906001019060200180831161092f57829003601f168201915b5050505050905090565b7f000000000000000000000000000000000000000000000000000000000000000081565b600061098e610987611093565b8484611254565b6001905092915050565b60008060006109a5610be1565b915091508173ffffffffffffffffffffffffffffffffffffffff166323b872dd3373735b14bb79463307aacbed86daf3322b1e6226ab846040518463ffffffff1660e01b81526004016109fa93929190611b9b565b602060405180830381600087803b158015610a1457600080fd5b505af1158015610a28573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a4c91906119ae565b610a82576040517f0a7cd6d600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610a8c33856114b0565b3373ffffffffffffffffffffffffffffffffffffffff167f9ffbffc04a397460ee1dbe8c9503e098090567d6b7f4b3c02a8617d800b6d955868684600354604051610ada9493929190611c46565b60405180910390a260019250505092915050565b73735b14bb79463307aacbed86daf3322b1e6226ab73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610b67576040517f2b2add3d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055507fd55614e962c5fd6ece71614f6348d702468a997a394dd5e5c1677950226d97ae81604051610bd69190611b80565b60405180910390a150565b60008060008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16630be155477f00000000000000000000000000000000000000000000000000000000000000006040518263ffffffff1660e01b8152600401610c609190611ccf565b60206040518083038186803b158015610c7857600080fd5b505afa158015610c8c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610cb091906118ae565b9050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415610d19576040517f78fff39600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663d7fd7afb7f00000000000000000000000000000000000000000000000000000000000000006040518263ffffffff1660e01b8152600401610d959190611ccf565b60206040518083038186803b158015610dad57600080fd5b505afa158015610dc1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610de59190611a64565b90506000811415610e22576040517fe661aed000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600060035460025483610e359190611de9565b610e3f9190611d93565b90508281945094505050509091565b6000600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b73735b14bb79463307aacbed86daf3322b1e6226ab73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610f74576040517f2b2add3d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b806003819055507fef13af88e424b5d15f49c77758542c1938b08b8b95b91ed0751f98ba99000d8f81604051610faa9190611ccf565b60405180910390a150565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b73735b14bb79463307aacbed86daf3322b1e6226ab73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614611052576040517f2b2add3d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b806002819055507fff5788270f43bfc1ca41c503606d2594aa3023a1a7547de403a3e2f146a4a80a816040516110889190611ccf565b60405180910390a150565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415611102576040517fd92e233d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611169576040517fd92e233d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040516112479190611ccf565b60405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156112bb576040517fd92e233d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611322576040517fd92e233d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050818110156113a0576040517ffe382aa700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b81816113ac9190611e43565b600460008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555081600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825461143e9190611d93565b925050819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040516114a29190611ccf565b60405180910390a350505050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611517576040517fd92e233d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905081811015611595576040517ffe382aa700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b81816115a19190611e43565b600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555081600660008282546115f69190611e43565b92505081905550600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405161165b9190611ccf565b60405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156116cf576040517fd92e233d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80600660008282546116e19190611d93565b9250508190555080600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282546117379190611d93565b925050819055508173ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8360405161179c9190611ccf565b60405180910390a35050565b60006117bb6117b684611d2a565b611d05565b9050828152602081018484840111156117d7576117d661207b565b5b6117e2848285611ef1565b509392505050565b6000813590506117f9816120bc565b92915050565b60008151905061180e816120bc565b92915050565b600081519050611823816120d3565b92915050565b600082601f83011261183e5761183d612076565b5b813561184e8482602086016117a8565b91505092915050565b600081359050611866816120ea565b92915050565b60008151905061187b816120ea565b92915050565b60006020828403121561189757611896612085565b5b60006118a5848285016117ea565b91505092915050565b6000602082840312156118c4576118c3612085565b5b60006118d2848285016117ff565b91505092915050565b600080604083850312156118f2576118f1612085565b5b6000611900858286016117ea565b9250506020611911858286016117ea565b9150509250929050565b60008060006060848603121561193457611933612085565b5b6000611942868287016117ea565b9350506020611953868287016117ea565b925050604061196486828701611857565b9150509250925092565b6000806040838503121561198557611984612085565b5b6000611993858286016117ea565b92505060206119a485828601611857565b9150509250929050565b6000602082840312156119c4576119c3612085565b5b60006119d284828501611814565b91505092915050565b600080604083850312156119f2576119f1612085565b5b600083013567ffffffffffffffff811115611a1057611a0f612080565b5b611a1c85828601611829565b9250506020611a2d85828601611857565b9150509250929050565b600060208284031215611a4d57611a4c612085565b5b6000611a5b84828501611857565b91505092915050565b600060208284031215611a7a57611a79612085565b5b6000611a888482850161186c565b91505092915050565b611a9a81611e77565b82525050565b611ab1611aac82611e77565b611f96565b82525050565b611ac081611e89565b82525050565b6000611ad182611d5b565b611adb8185611d71565b9350611aeb818560208601611f00565b611af48161208a565b840191505092915050565b611b0881611edf565b82525050565b6000611b1982611d66565b611b238185611d82565b9350611b33818560208601611f00565b611b3c8161208a565b840191505092915050565b611b5081611ec8565b82525050565b611b5f81611ed2565b82525050565b6000611b718284611aa0565b60148201915081905092915050565b6000602082019050611b956000830184611a91565b92915050565b6000606082019050611bb06000830186611a91565b611bbd6020830185611a91565b611bca6040830184611b47565b949350505050565b6000604082019050611be76000830185611a91565b611bf46020830184611b47565b9392505050565b6000602082019050611c106000830184611ab7565b92915050565b60006040820190508181036000830152611c308185611ac6565b9050611c3f6020830184611b47565b9392505050565b60006080820190508181036000830152611c608187611ac6565b9050611c6f6020830186611b47565b611c7c6040830185611b47565b611c896060830184611b47565b95945050505050565b6000602082019050611ca76000830184611aff565b92915050565b60006020820190508181036000830152611cc78184611b0e565b905092915050565b6000602082019050611ce46000830184611b47565b92915050565b6000602082019050611cff6000830184611b56565b92915050565b6000611d0f611d20565b9050611d1b8282611f65565b919050565b6000604051905090565b600067ffffffffffffffff821115611d4557611d44612047565b5b611d4e8261208a565b9050602081019050919050565b600081519050919050565b600081519050919050565b600082825260208201905092915050565b600082825260208201905092915050565b6000611d9e82611ec8565b9150611da983611ec8565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff03821115611dde57611ddd611fba565b5b828201905092915050565b6000611df482611ec8565b9150611dff83611ec8565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615611e3857611e37611fba565b5b828202905092915050565b6000611e4e82611ec8565b9150611e5983611ec8565b925082821015611e6c57611e6b611fba565b5b828203905092915050565b6000611e8282611ea8565b9050919050565b60008115159050919050565b6000819050611ea3826120a8565b919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b6000611eea82611e95565b9050919050565b82818337600083830152505050565b60005b83811015611f1e578082015181840152602081019050611f03565b83811115611f2d576000848401525b50505050565b60006002820490506001821680611f4b57607f821691505b60208210811415611f5f57611f5e612018565b5b50919050565b611f6e8261208a565b810181811067ffffffffffffffff82111715611f8d57611f8c612047565b5b80604052505050565b6000611fa182611fa8565b9050919050565b6000611fb38261209b565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b60008160601b9050919050565b600381106120b9576120b8611fe9565b5b50565b6120c581611e77565b81146120d057600080fd5b50565b6120dc81611e89565b81146120e757600080fd5b50565b6120f381611ec8565b81146120fe57600080fd5b5056fea264697066735822122085b4c6eb609c2ec9eedeef1680fa0db3223e3761749585aa8f078d9f9c25dbfd64736f6c63430008070033"; + +type ZRC20NewConstructorParams = + | [signer?: Signer] + | ConstructorParameters; + +const isSuperArgs = ( + xs: ZRC20NewConstructorParams +): xs is ConstructorParameters => xs.length > 1; + +export class ZRC20New__factory extends ContractFactory { + constructor(...args: ZRC20NewConstructorParams) { + if (isSuperArgs(args)) { + super(...args); + } else { + super(_abi, _bytecode, args[0]); + } + } + + override deploy( + name_: PromiseOrValue, + symbol_: PromiseOrValue, + decimals_: PromiseOrValue, + chainid_: PromiseOrValue, + coinType_: PromiseOrValue, + gasLimit_: PromiseOrValue, + systemContractAddress_: PromiseOrValue, + gatewayContractAddress_: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise { + return super.deploy( + name_, + symbol_, + decimals_, + chainid_, + coinType_, + gasLimit_, + systemContractAddress_, + gatewayContractAddress_, + overrides || {} + ) as Promise; + } + override getDeployTransaction( + name_: PromiseOrValue, + symbol_: PromiseOrValue, + decimals_: PromiseOrValue, + chainid_: PromiseOrValue, + coinType_: PromiseOrValue, + gasLimit_: PromiseOrValue, + systemContractAddress_: PromiseOrValue, + gatewayContractAddress_: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): TransactionRequest { + return super.getDeployTransaction( + name_, + symbol_, + decimals_, + chainid_, + coinType_, + gasLimit_, + systemContractAddress_, + gatewayContractAddress_, + overrides || {} + ); + } + override attach(address: string): ZRC20New { + return super.attach(address) as ZRC20New; + } + override connect(signer: Signer): ZRC20New__factory { + return super.connect(signer) as ZRC20New__factory; + } + + static readonly bytecode = _bytecode; + static readonly abi = _abi; + static createInterface(): ZRC20NewInterface { + return new utils.Interface(_abi) as ZRC20NewInterface; + } + static connect( + address: string, + signerOrProvider: Signer | Provider + ): ZRC20New { + return new Contract(address, _abi, signerOrProvider) as ZRC20New; + } +} diff --git a/typechain-types/factories/contracts/prototypes/zevm/ZRC20New.sol/index.ts b/typechain-types/factories/contracts/prototypes/zevm/ZRC20New.sol/index.ts new file mode 100644 index 00000000..7e4b987c --- /dev/null +++ b/typechain-types/factories/contracts/prototypes/zevm/ZRC20New.sol/index.ts @@ -0,0 +1,5 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +export { ZRC20Errors__factory } from "./ZRC20Errors__factory"; +export { ZRC20New__factory } from "./ZRC20New__factory"; 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..54162241 --- /dev/null +++ b/typechain-types/factories/contracts/prototypes/zevm/index.ts @@ -0,0 +1,8 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +export * as zrc20NewSol from "./ZRC20New.sol"; +export * as interfacesSol from "./interfaces.sol"; +export { GatewayZEVM__factory } from "./GatewayZEVM__factory"; +export { Sender__factory } from "./Sender__factory"; +export { TestZContract__factory } from "./TestZContract__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..aef304ee --- /dev/null +++ b/typechain-types/factories/contracts/prototypes/zevm/interfaces.sol/IGatewayZEVM__factory.ts @@ -0,0 +1,218 @@ +/* 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: "address", + name: "zrc20", + type: "address", + }, + { + internalType: "uint256", + name: "amount", + type: "uint256", + }, + { + internalType: "address", + name: "target", + type: "address", + }, + ], + name: "deposit", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + components: [ + { + internalType: "bytes", + name: "origin", + type: "bytes", + }, + { + internalType: "address", + name: "sender", + type: "address", + }, + { + internalType: "uint256", + name: "chainID", + type: "uint256", + }, + ], + internalType: "struct zContext", + name: "context", + type: "tuple", + }, + { + internalType: "address", + name: "zrc20", + type: "address", + }, + { + internalType: "uint256", + name: "amount", + type: "uint256", + }, + { + internalType: "address", + name: "target", + type: "address", + }, + { + internalType: "bytes", + name: "message", + type: "bytes", + }, + ], + name: "depositAndCall", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + components: [ + { + internalType: "bytes", + name: "origin", + type: "bytes", + }, + { + internalType: "address", + name: "sender", + type: "address", + }, + { + internalType: "uint256", + name: "chainID", + type: "uint256", + }, + ], + internalType: "struct zContext", + name: "context", + type: "tuple", + }, + { + internalType: "address", + name: "zrc20", + type: "address", + }, + { + internalType: "uint256", + name: "amount", + type: "uint256", + }, + { + internalType: "address", + name: "target", + type: "address", + }, + { + internalType: "bytes", + name: "message", + type: "bytes", + }, + ], + name: "execute", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + 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/ZRC20.sol/ZRC20__factory.ts b/typechain-types/factories/contracts/zevm/ZRC20.sol/ZRC20__factory.ts index d517d8a9..10c29867 100644 --- a/typechain-types/factories/contracts/zevm/ZRC20.sol/ZRC20__factory.ts +++ b/typechain-types/factories/contracts/zevm/ZRC20.sol/ZRC20__factory.ts @@ -626,7 +626,7 @@ const _abi = [ ] as const; const _bytecode = - "0x60c06040523480156200001157600080fd5b506040516200272c3803806200272c833981810160405281019062000037919062000319565b73735b14bb79463307aacbed86daf3322b1e6226ab73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614620000b1576040517f2b2add3d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8660069080519060200190620000c99291906200018f565b508560079080519060200190620000e29291906200018f565b5084600860006101000a81548160ff021916908360ff16021790555083608081815250508260028111156200011c576200011b62000556565b5b60a081600281111562000134576200013362000556565b5b60f81b8152505081600181905550806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505050505050505062000667565b8280546200019d90620004ea565b90600052602060002090601f016020900481019282620001c157600085556200020d565b82601f10620001dc57805160ff19168380011785556200020d565b828001600101855582156200020d579182015b828111156200020c578251825591602001919060010190620001ef565b5b5090506200021c919062000220565b5090565b5b808211156200023b57600081600090555060010162000221565b5090565b600062000256620002508462000433565b6200040a565b905082815260208101848484011115620002755762000274620005e8565b5b62000282848285620004b4565b509392505050565b6000815190506200029b8162000608565b92915050565b600081519050620002b28162000622565b92915050565b600082601f830112620002d057620002cf620005e3565b5b8151620002e28482602086016200023f565b91505092915050565b600081519050620002fc8162000633565b92915050565b60008151905062000313816200064d565b92915050565b600080600080600080600060e0888a0312156200033b576200033a620005f2565b5b600088015167ffffffffffffffff8111156200035c576200035b620005ed565b5b6200036a8a828b01620002b8565b975050602088015167ffffffffffffffff8111156200038e576200038d620005ed565b5b6200039c8a828b01620002b8565b9650506040620003af8a828b0162000302565b9550506060620003c28a828b01620002eb565b9450506080620003d58a828b01620002a1565b93505060a0620003e88a828b01620002eb565b92505060c0620003fb8a828b016200028a565b91505092959891949750929550565b60006200041662000429565b905062000424828262000520565b919050565b6000604051905090565b600067ffffffffffffffff821115620004515762000450620005b4565b5b6200045c82620005f7565b9050602081019050919050565b600062000476826200047d565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b60005b83811015620004d4578082015181840152602081019050620004b7565b83811115620004e4576000848401525b50505050565b600060028204905060018216806200050357607f821691505b602082108114156200051a576200051962000585565b5b50919050565b6200052b82620005f7565b810181811067ffffffffffffffff821117156200054d576200054c620005b4565b5b80604052505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b620006138162000469565b81146200061f57600080fd5b50565b600381106200063057600080fd5b50565b6200063e816200049d565b81146200064a57600080fd5b50565b6200065881620004a7565b81146200066457600080fd5b50565b60805160a05160f81c61208e6200069e60003960006108d501526000818161081f01528181610ba20152610cd7015261208e6000f3fe608060405234801561001057600080fd5b50600436106101425760003560e01c806385e1f4d0116100b8578063c835d7cc1161007c578063c835d7cc146103a5578063d9eeebed146103c1578063dd62ed3e146103e0578063eddeb12314610410578063f2441b321461042c578063f687d12a1461044a57610142565b806385e1f4d0146102eb57806395d89b4114610309578063a3413d0314610327578063a9059cbb14610345578063c70126261461037557610142565b8063313ce5671161010a578063313ce567146102015780633ce4a5bc1461021f57806342966c681461023d57806347e7ef241461026d5780634d8943bb1461029d57806370a08231146102bb57610142565b806306fdde0314610147578063091d278814610165578063095ea7b31461018357806318160ddd146101b357806323b872dd146101d1575b600080fd5b61014f610466565b60405161015c9190611c04565b60405180910390f35b61016d6104f8565b60405161017a9190611c26565b60405180910390f35b61019d600480360381019061019891906118c5565b6104fe565b6040516101aa9190611b52565b60405180910390f35b6101bb61051c565b6040516101c89190611c26565b60405180910390f35b6101eb60048036038101906101e69190611872565b610526565b6040516101f89190611b52565b60405180910390f35b61020961061e565b6040516102169190611c41565b60405180910390f35b610227610635565b6040516102349190611ad7565b60405180910390f35b6102576004803603810190610252919061198e565b61064d565b6040516102649190611b52565b60405180910390f35b610287600480360381019061028291906118c5565b610662565b6040516102949190611b52565b60405180910390f35b6102a56107ce565b6040516102b29190611c26565b60405180910390f35b6102d560048036038101906102d091906117d8565b6107d4565b6040516102e29190611c26565b60405180910390f35b6102f361081d565b6040516103009190611c26565b60405180910390f35b610311610841565b60405161031e9190611c04565b60405180910390f35b61032f6108d3565b60405161033c9190611be9565b60405180910390f35b61035f600480360381019061035a91906118c5565b6108f7565b60405161036c9190611b52565b60405180910390f35b61038f600480360381019061038a9190611932565b610915565b60405161039c9190611b52565b60405180910390f35b6103bf60048036038101906103ba91906117d8565b610a6b565b005b6103c9610b5e565b6040516103d7929190611b29565b60405180910390f35b6103fa60048036038101906103f59190611832565b610dcb565b6040516104079190611c26565b60405180910390f35b61042a6004803603810190610425919061198e565b610e52565b005b610434610f0c565b6040516104419190611ad7565b60405180910390f35b610464600480360381019061045f919061198e565b610f30565b005b60606006805461047590611e8a565b80601f01602080910402602001604051908101604052809291908181526020018280546104a190611e8a565b80156104ee5780601f106104c3576101008083540402835291602001916104ee565b820191906000526020600020905b8154815290600101906020018083116104d157829003601f168201915b5050505050905090565b60015481565b600061051261050b610fea565b8484610ff2565b6001905092915050565b6000600554905090565b60006105338484846111ab565b6000600460008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600061057e610fea565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050828110156105f5576040517f10bad14700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61061285610601610fea565b858461060d9190611d9a565b610ff2565b60019150509392505050565b6000600860009054906101000a900460ff16905090565b73735b14bb79463307aacbed86daf3322b1e6226ab81565b60006106593383611407565b60019050919050565b600073735b14bb79463307aacbed86daf3322b1e6226ab73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614158015610700575060008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614155b15610737576040517fddb5de5e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61074183836115bf565b8273ffffffffffffffffffffffffffffffffffffffff167f67fc7bdaed5b0ec550d8706b87d60568ab70c6b781263c70101d54cd1564aab373735b14bb79463307aacbed86daf3322b1e6226ab60405160200161079e9190611abc565b604051602081830303815290604052846040516107bc929190611b6d565b60405180910390a26001905092915050565b60025481565b6000600360008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b7f000000000000000000000000000000000000000000000000000000000000000081565b60606007805461085090611e8a565b80601f016020809104026020016040519081016040528092919081815260200182805461087c90611e8a565b80156108c95780601f1061089e576101008083540402835291602001916108c9565b820191906000526020600020905b8154815290600101906020018083116108ac57829003601f168201915b5050505050905090565b7f000000000000000000000000000000000000000000000000000000000000000081565b600061090b610904610fea565b84846111ab565b6001905092915050565b6000806000610922610b5e565b915091508173ffffffffffffffffffffffffffffffffffffffff166323b872dd3373735b14bb79463307aacbed86daf3322b1e6226ab846040518463ffffffff1660e01b815260040161097793929190611af2565b602060405180830381600087803b15801561099157600080fd5b505af11580156109a5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109c99190611905565b6109ff576040517f0a7cd6d600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610a093385611407565b3373ffffffffffffffffffffffffffffffffffffffff167f9ffbffc04a397460ee1dbe8c9503e098090567d6b7f4b3c02a8617d800b6d955868684600254604051610a579493929190611b9d565b60405180910390a260019250505092915050565b73735b14bb79463307aacbed86daf3322b1e6226ab73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610ae4576040517f2b2add3d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055507fd55614e962c5fd6ece71614f6348d702468a997a394dd5e5c1677950226d97ae81604051610b539190611ad7565b60405180910390a150565b60008060008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16630be155477f00000000000000000000000000000000000000000000000000000000000000006040518263ffffffff1660e01b8152600401610bdd9190611c26565b60206040518083038186803b158015610bf557600080fd5b505afa158015610c09573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c2d9190611805565b9050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415610c96576040517f78fff39600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663d7fd7afb7f00000000000000000000000000000000000000000000000000000000000000006040518263ffffffff1660e01b8152600401610d129190611c26565b60206040518083038186803b158015610d2a57600080fd5b505afa158015610d3e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d6291906119bb565b90506000811415610d9f576040517fe661aed000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600060025460015483610db29190611d40565b610dbc9190611cea565b90508281945094505050509091565b6000600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b73735b14bb79463307aacbed86daf3322b1e6226ab73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610ecb576040517f2b2add3d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b806002819055507fef13af88e424b5d15f49c77758542c1938b08b8b95b91ed0751f98ba99000d8f81604051610f019190611c26565b60405180910390a150565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b73735b14bb79463307aacbed86daf3322b1e6226ab73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610fa9576040517f2b2add3d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b806001819055507fff5788270f43bfc1ca41c503606d2594aa3023a1a7547de403a3e2f146a4a80a81604051610fdf9190611c26565b60405180910390a150565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415611059576040517fd92e233d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156110c0576040517fd92e233d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9258360405161119e9190611c26565b60405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415611212576040517fd92e233d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611279576040517fd92e233d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050818110156112f7576040517ffe382aa700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b81816113039190611d9a565b600360008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555081600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282546113959190611cea565b925050819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040516113f99190611c26565b60405180910390a350505050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16141561146e576040517fd92e233d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050818110156114ec576040517ffe382aa700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b81816114f89190611d9a565b600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550816005600082825461154d9190611d9a565b92505081905550600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040516115b29190611c26565b60405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611626576040517fd92e233d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80600560008282546116389190611cea565b9250508190555080600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825461168e9190611cea565b925050819055508173ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040516116f39190611c26565b60405180910390a35050565b600061171261170d84611c81565b611c5c565b90508281526020810184848401111561172e5761172d611fd2565b5b611739848285611e48565b509392505050565b60008135905061175081612013565b92915050565b60008151905061176581612013565b92915050565b60008151905061177a8161202a565b92915050565b600082601f83011261179557611794611fcd565b5b81356117a58482602086016116ff565b91505092915050565b6000813590506117bd81612041565b92915050565b6000815190506117d281612041565b92915050565b6000602082840312156117ee576117ed611fdc565b5b60006117fc84828501611741565b91505092915050565b60006020828403121561181b5761181a611fdc565b5b600061182984828501611756565b91505092915050565b6000806040838503121561184957611848611fdc565b5b600061185785828601611741565b925050602061186885828601611741565b9150509250929050565b60008060006060848603121561188b5761188a611fdc565b5b600061189986828701611741565b93505060206118aa86828701611741565b92505060406118bb868287016117ae565b9150509250925092565b600080604083850312156118dc576118db611fdc565b5b60006118ea85828601611741565b92505060206118fb858286016117ae565b9150509250929050565b60006020828403121561191b5761191a611fdc565b5b60006119298482850161176b565b91505092915050565b6000806040838503121561194957611948611fdc565b5b600083013567ffffffffffffffff81111561196757611966611fd7565b5b61197385828601611780565b9250506020611984858286016117ae565b9150509250929050565b6000602082840312156119a4576119a3611fdc565b5b60006119b2848285016117ae565b91505092915050565b6000602082840312156119d1576119d0611fdc565b5b60006119df848285016117c3565b91505092915050565b6119f181611dce565b82525050565b611a08611a0382611dce565b611eed565b82525050565b611a1781611de0565b82525050565b6000611a2882611cb2565b611a328185611cc8565b9350611a42818560208601611e57565b611a4b81611fe1565b840191505092915050565b611a5f81611e36565b82525050565b6000611a7082611cbd565b611a7a8185611cd9565b9350611a8a818560208601611e57565b611a9381611fe1565b840191505092915050565b611aa781611e1f565b82525050565b611ab681611e29565b82525050565b6000611ac882846119f7565b60148201915081905092915050565b6000602082019050611aec60008301846119e8565b92915050565b6000606082019050611b0760008301866119e8565b611b1460208301856119e8565b611b216040830184611a9e565b949350505050565b6000604082019050611b3e60008301856119e8565b611b4b6020830184611a9e565b9392505050565b6000602082019050611b676000830184611a0e565b92915050565b60006040820190508181036000830152611b878185611a1d565b9050611b966020830184611a9e565b9392505050565b60006080820190508181036000830152611bb78187611a1d565b9050611bc66020830186611a9e565b611bd36040830185611a9e565b611be06060830184611a9e565b95945050505050565b6000602082019050611bfe6000830184611a56565b92915050565b60006020820190508181036000830152611c1e8184611a65565b905092915050565b6000602082019050611c3b6000830184611a9e565b92915050565b6000602082019050611c566000830184611aad565b92915050565b6000611c66611c77565b9050611c728282611ebc565b919050565b6000604051905090565b600067ffffffffffffffff821115611c9c57611c9b611f9e565b5b611ca582611fe1565b9050602081019050919050565b600081519050919050565b600081519050919050565b600082825260208201905092915050565b600082825260208201905092915050565b6000611cf582611e1f565b9150611d0083611e1f565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff03821115611d3557611d34611f11565b5b828201905092915050565b6000611d4b82611e1f565b9150611d5683611e1f565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615611d8f57611d8e611f11565b5b828202905092915050565b6000611da582611e1f565b9150611db083611e1f565b925082821015611dc357611dc2611f11565b5b828203905092915050565b6000611dd982611dff565b9050919050565b60008115159050919050565b6000819050611dfa82611fff565b919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b6000611e4182611dec565b9050919050565b82818337600083830152505050565b60005b83811015611e75578082015181840152602081019050611e5a565b83811115611e84576000848401525b50505050565b60006002820490506001821680611ea257607f821691505b60208210811415611eb657611eb5611f6f565b5b50919050565b611ec582611fe1565b810181811067ffffffffffffffff82111715611ee457611ee3611f9e565b5b80604052505050565b6000611ef882611eff565b9050919050565b6000611f0a82611ff2565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b60008160601b9050919050565b600381106120105761200f611f40565b5b50565b61201c81611dce565b811461202757600080fd5b50565b61203381611de0565b811461203e57600080fd5b50565b61204a81611e1f565b811461205557600080fd5b5056fea2646970667358221220edaf9ed98354e71aa84b95b4433f47537dd491d72f649020c367c23ec482327064736f6c63430008070033"; + "0x60c06040523480156200001157600080fd5b506040516200272c3803806200272c833981810160405281019062000037919062000319565b73735b14bb79463307aacbed86daf3322b1e6226ab73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614620000b1576040517f2b2add3d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8660069080519060200190620000c99291906200018f565b508560079080519060200190620000e29291906200018f565b5084600860006101000a81548160ff021916908360ff16021790555083608081815250508260028111156200011c576200011b62000556565b5b60a081600281111562000134576200013362000556565b5b60f81b8152505081600181905550806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505050505050505062000667565b8280546200019d90620004ea565b90600052602060002090601f016020900481019282620001c157600085556200020d565b82601f10620001dc57805160ff19168380011785556200020d565b828001600101855582156200020d579182015b828111156200020c578251825591602001919060010190620001ef565b5b5090506200021c919062000220565b5090565b5b808211156200023b57600081600090555060010162000221565b5090565b600062000256620002508462000433565b6200040a565b905082815260208101848484011115620002755762000274620005e8565b5b62000282848285620004b4565b509392505050565b6000815190506200029b8162000608565b92915050565b600081519050620002b28162000622565b92915050565b600082601f830112620002d057620002cf620005e3565b5b8151620002e28482602086016200023f565b91505092915050565b600081519050620002fc8162000633565b92915050565b60008151905062000313816200064d565b92915050565b600080600080600080600060e0888a0312156200033b576200033a620005f2565b5b600088015167ffffffffffffffff8111156200035c576200035b620005ed565b5b6200036a8a828b01620002b8565b975050602088015167ffffffffffffffff8111156200038e576200038d620005ed565b5b6200039c8a828b01620002b8565b9650506040620003af8a828b0162000302565b9550506060620003c28a828b01620002eb565b9450506080620003d58a828b01620002a1565b93505060a0620003e88a828b01620002eb565b92505060c0620003fb8a828b016200028a565b91505092959891949750929550565b60006200041662000429565b905062000424828262000520565b919050565b6000604051905090565b600067ffffffffffffffff821115620004515762000450620005b4565b5b6200045c82620005f7565b9050602081019050919050565b600062000476826200047d565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b60005b83811015620004d4578082015181840152602081019050620004b7565b83811115620004e4576000848401525b50505050565b600060028204905060018216806200050357607f821691505b602082108114156200051a576200051962000585565b5b50919050565b6200052b82620005f7565b810181811067ffffffffffffffff821117156200054d576200054c620005b4565b5b80604052505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b620006138162000469565b81146200061f57600080fd5b50565b600381106200063057600080fd5b50565b6200063e816200049d565b81146200064a57600080fd5b50565b6200065881620004a7565b81146200066457600080fd5b50565b60805160a05160f81c61208e6200069e60003960006108d501526000818161081f01528181610ba20152610cd7015261208e6000f3fe608060405234801561001057600080fd5b50600436106101425760003560e01c806385e1f4d0116100b8578063c835d7cc1161007c578063c835d7cc146103a5578063d9eeebed146103c1578063dd62ed3e146103e0578063eddeb12314610410578063f2441b321461042c578063f687d12a1461044a57610142565b806385e1f4d0146102eb57806395d89b4114610309578063a3413d0314610327578063a9059cbb14610345578063c70126261461037557610142565b8063313ce5671161010a578063313ce567146102015780633ce4a5bc1461021f57806342966c681461023d57806347e7ef241461026d5780634d8943bb1461029d57806370a08231146102bb57610142565b806306fdde0314610147578063091d278814610165578063095ea7b31461018357806318160ddd146101b357806323b872dd146101d1575b600080fd5b61014f610466565b60405161015c9190611c04565b60405180910390f35b61016d6104f8565b60405161017a9190611c26565b60405180910390f35b61019d600480360381019061019891906118c5565b6104fe565b6040516101aa9190611b52565b60405180910390f35b6101bb61051c565b6040516101c89190611c26565b60405180910390f35b6101eb60048036038101906101e69190611872565b610526565b6040516101f89190611b52565b60405180910390f35b61020961061e565b6040516102169190611c41565b60405180910390f35b610227610635565b6040516102349190611ad7565b60405180910390f35b6102576004803603810190610252919061198e565b61064d565b6040516102649190611b52565b60405180910390f35b610287600480360381019061028291906118c5565b610662565b6040516102949190611b52565b60405180910390f35b6102a56107ce565b6040516102b29190611c26565b60405180910390f35b6102d560048036038101906102d091906117d8565b6107d4565b6040516102e29190611c26565b60405180910390f35b6102f361081d565b6040516103009190611c26565b60405180910390f35b610311610841565b60405161031e9190611c04565b60405180910390f35b61032f6108d3565b60405161033c9190611be9565b60405180910390f35b61035f600480360381019061035a91906118c5565b6108f7565b60405161036c9190611b52565b60405180910390f35b61038f600480360381019061038a9190611932565b610915565b60405161039c9190611b52565b60405180910390f35b6103bf60048036038101906103ba91906117d8565b610a6b565b005b6103c9610b5e565b6040516103d7929190611b29565b60405180910390f35b6103fa60048036038101906103f59190611832565b610dcb565b6040516104079190611c26565b60405180910390f35b61042a6004803603810190610425919061198e565b610e52565b005b610434610f0c565b6040516104419190611ad7565b60405180910390f35b610464600480360381019061045f919061198e565b610f30565b005b60606006805461047590611e8a565b80601f01602080910402602001604051908101604052809291908181526020018280546104a190611e8a565b80156104ee5780601f106104c3576101008083540402835291602001916104ee565b820191906000526020600020905b8154815290600101906020018083116104d157829003601f168201915b5050505050905090565b60015481565b600061051261050b610fea565b8484610ff2565b6001905092915050565b6000600554905090565b60006105338484846111ab565b6000600460008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600061057e610fea565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050828110156105f5576040517f10bad14700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61061285610601610fea565b858461060d9190611d9a565b610ff2565b60019150509392505050565b6000600860009054906101000a900460ff16905090565b73735b14bb79463307aacbed86daf3322b1e6226ab81565b60006106593383611407565b60019050919050565b600073735b14bb79463307aacbed86daf3322b1e6226ab73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614158015610700575060008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614155b15610737576040517fddb5de5e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61074183836115bf565b8273ffffffffffffffffffffffffffffffffffffffff167f67fc7bdaed5b0ec550d8706b87d60568ab70c6b781263c70101d54cd1564aab373735b14bb79463307aacbed86daf3322b1e6226ab60405160200161079e9190611abc565b604051602081830303815290604052846040516107bc929190611b6d565b60405180910390a26001905092915050565b60025481565b6000600360008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b7f000000000000000000000000000000000000000000000000000000000000000081565b60606007805461085090611e8a565b80601f016020809104026020016040519081016040528092919081815260200182805461087c90611e8a565b80156108c95780601f1061089e576101008083540402835291602001916108c9565b820191906000526020600020905b8154815290600101906020018083116108ac57829003601f168201915b5050505050905090565b7f000000000000000000000000000000000000000000000000000000000000000081565b600061090b610904610fea565b84846111ab565b6001905092915050565b6000806000610922610b5e565b915091508173ffffffffffffffffffffffffffffffffffffffff166323b872dd3373735b14bb79463307aacbed86daf3322b1e6226ab846040518463ffffffff1660e01b815260040161097793929190611af2565b602060405180830381600087803b15801561099157600080fd5b505af11580156109a5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109c99190611905565b6109ff576040517f0a7cd6d600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610a093385611407565b3373ffffffffffffffffffffffffffffffffffffffff167f9ffbffc04a397460ee1dbe8c9503e098090567d6b7f4b3c02a8617d800b6d955868684600254604051610a579493929190611b9d565b60405180910390a260019250505092915050565b73735b14bb79463307aacbed86daf3322b1e6226ab73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610ae4576040517f2b2add3d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055507fd55614e962c5fd6ece71614f6348d702468a997a394dd5e5c1677950226d97ae81604051610b539190611ad7565b60405180910390a150565b60008060008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16630be155477f00000000000000000000000000000000000000000000000000000000000000006040518263ffffffff1660e01b8152600401610bdd9190611c26565b60206040518083038186803b158015610bf557600080fd5b505afa158015610c09573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c2d9190611805565b9050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415610c96576040517f78fff39600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663d7fd7afb7f00000000000000000000000000000000000000000000000000000000000000006040518263ffffffff1660e01b8152600401610d129190611c26565b60206040518083038186803b158015610d2a57600080fd5b505afa158015610d3e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d6291906119bb565b90506000811415610d9f576040517fe661aed000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600060025460015483610db29190611d40565b610dbc9190611cea565b90508281945094505050509091565b6000600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b73735b14bb79463307aacbed86daf3322b1e6226ab73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610ecb576040517f2b2add3d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b806002819055507fef13af88e424b5d15f49c77758542c1938b08b8b95b91ed0751f98ba99000d8f81604051610f019190611c26565b60405180910390a150565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b73735b14bb79463307aacbed86daf3322b1e6226ab73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610fa9576040517f2b2add3d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b806001819055507fff5788270f43bfc1ca41c503606d2594aa3023a1a7547de403a3e2f146a4a80a81604051610fdf9190611c26565b60405180910390a150565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415611059576040517fd92e233d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156110c0576040517fd92e233d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9258360405161119e9190611c26565b60405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415611212576040517fd92e233d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611279576040517fd92e233d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050818110156112f7576040517ffe382aa700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b81816113039190611d9a565b600360008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555081600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282546113959190611cea565b925050819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040516113f99190611c26565b60405180910390a350505050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16141561146e576040517fd92e233d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050818110156114ec576040517ffe382aa700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b81816114f89190611d9a565b600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550816005600082825461154d9190611d9a565b92505081905550600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040516115b29190611c26565b60405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611626576040517fd92e233d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80600560008282546116389190611cea565b9250508190555080600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825461168e9190611cea565b925050819055508173ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040516116f39190611c26565b60405180910390a35050565b600061171261170d84611c81565b611c5c565b90508281526020810184848401111561172e5761172d611fd2565b5b611739848285611e48565b509392505050565b60008135905061175081612013565b92915050565b60008151905061176581612013565b92915050565b60008151905061177a8161202a565b92915050565b600082601f83011261179557611794611fcd565b5b81356117a58482602086016116ff565b91505092915050565b6000813590506117bd81612041565b92915050565b6000815190506117d281612041565b92915050565b6000602082840312156117ee576117ed611fdc565b5b60006117fc84828501611741565b91505092915050565b60006020828403121561181b5761181a611fdc565b5b600061182984828501611756565b91505092915050565b6000806040838503121561184957611848611fdc565b5b600061185785828601611741565b925050602061186885828601611741565b9150509250929050565b60008060006060848603121561188b5761188a611fdc565b5b600061189986828701611741565b93505060206118aa86828701611741565b92505060406118bb868287016117ae565b9150509250925092565b600080604083850312156118dc576118db611fdc565b5b60006118ea85828601611741565b92505060206118fb858286016117ae565b9150509250929050565b60006020828403121561191b5761191a611fdc565b5b60006119298482850161176b565b91505092915050565b6000806040838503121561194957611948611fdc565b5b600083013567ffffffffffffffff81111561196757611966611fd7565b5b61197385828601611780565b9250506020611984858286016117ae565b9150509250929050565b6000602082840312156119a4576119a3611fdc565b5b60006119b2848285016117ae565b91505092915050565b6000602082840312156119d1576119d0611fdc565b5b60006119df848285016117c3565b91505092915050565b6119f181611dce565b82525050565b611a08611a0382611dce565b611eed565b82525050565b611a1781611de0565b82525050565b6000611a2882611cb2565b611a328185611cc8565b9350611a42818560208601611e57565b611a4b81611fe1565b840191505092915050565b611a5f81611e36565b82525050565b6000611a7082611cbd565b611a7a8185611cd9565b9350611a8a818560208601611e57565b611a9381611fe1565b840191505092915050565b611aa781611e1f565b82525050565b611ab681611e29565b82525050565b6000611ac882846119f7565b60148201915081905092915050565b6000602082019050611aec60008301846119e8565b92915050565b6000606082019050611b0760008301866119e8565b611b1460208301856119e8565b611b216040830184611a9e565b949350505050565b6000604082019050611b3e60008301856119e8565b611b4b6020830184611a9e565b9392505050565b6000602082019050611b676000830184611a0e565b92915050565b60006040820190508181036000830152611b878185611a1d565b9050611b966020830184611a9e565b9392505050565b60006080820190508181036000830152611bb78187611a1d565b9050611bc66020830186611a9e565b611bd36040830185611a9e565b611be06060830184611a9e565b95945050505050565b6000602082019050611bfe6000830184611a56565b92915050565b60006020820190508181036000830152611c1e8184611a65565b905092915050565b6000602082019050611c3b6000830184611a9e565b92915050565b6000602082019050611c566000830184611aad565b92915050565b6000611c66611c77565b9050611c728282611ebc565b919050565b6000604051905090565b600067ffffffffffffffff821115611c9c57611c9b611f9e565b5b611ca582611fe1565b9050602081019050919050565b600081519050919050565b600081519050919050565b600082825260208201905092915050565b600082825260208201905092915050565b6000611cf582611e1f565b9150611d0083611e1f565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff03821115611d3557611d34611f11565b5b828201905092915050565b6000611d4b82611e1f565b9150611d5683611e1f565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615611d8f57611d8e611f11565b5b828202905092915050565b6000611da582611e1f565b9150611db083611e1f565b925082821015611dc357611dc2611f11565b5b828203905092915050565b6000611dd982611dff565b9050919050565b60008115159050919050565b6000819050611dfa82611fff565b919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b6000611e4182611dec565b9050919050565b82818337600083830152505050565b60005b83811015611e75578082015181840152602081019050611e5a565b83811115611e84576000848401525b50505050565b60006002820490506001821680611ea257607f821691505b60208210811415611eb657611eb5611f6f565b5b50919050565b611ec582611fe1565b810181811067ffffffffffffffff82111715611ee457611ee3611f9e565b5b80604052505050565b6000611ef882611eff565b9050919050565b6000611f0a82611ff2565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b60008160601b9050919050565b600381106120105761200f611f40565b5b50565b61201c81611dce565b811461202757600080fd5b50565b61203381611de0565b811461203e57600080fd5b50565b61204a81611e1f565b811461205557600080fd5b5056fea26469706673582212208ce130e2f149fc0b271fdd04857861bac756c56912ebde23032f8703b14b250764736f6c63430008070033"; type ZRC20ConstructorParams = | [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 08c44b83..e7b1e088 100644 --- a/typechain-types/hardhat.d.ts +++ b/typechain-types/hardhat.d.ts @@ -12,6 +12,38 @@ import * as Contracts from "."; declare module "hardhat/types/runtime" { interface HardhatEthersHelpers extends HardhatEthersHelpersBase { + getContractFactory( + name: "OwnableUpgradeable", + signerOrOptions?: ethers.Signer | FactoryOptions + ): Promise; + getContractFactory( + name: "IERC1822ProxiableUpgradeable", + signerOrOptions?: ethers.Signer | FactoryOptions + ): Promise; + getContractFactory( + name: "IERC1967Upgradeable", + signerOrOptions?: ethers.Signer | FactoryOptions + ): Promise; + getContractFactory( + name: "IBeaconUpgradeable", + signerOrOptions?: ethers.Signer | FactoryOptions + ): Promise; + getContractFactory( + name: "ERC1967UpgradeUpgradeable", + signerOrOptions?: ethers.Signer | FactoryOptions + ): Promise; + getContractFactory( + name: "Initializable", + signerOrOptions?: ethers.Signer | FactoryOptions + ): Promise; + getContractFactory( + name: "UUPSUpgradeable", + signerOrOptions?: ethers.Signer | FactoryOptions + ): Promise; + getContractFactory( + name: "ContextUpgradeable", + signerOrOptions?: ethers.Signer | FactoryOptions + ): Promise; getContractFactory( name: "Ownable", signerOrOptions?: ethers.Signer | FactoryOptions @@ -300,6 +332,54 @@ declare module "hardhat/types/runtime" { name: "ZetaConnectorNonEth", signerOrOptions?: ethers.Signer | FactoryOptions ): Promise; + getContractFactory( + name: "ERC20CustodyNew", + signerOrOptions?: ethers.Signer | FactoryOptions + ): Promise; + getContractFactory( + name: "GatewayEVM", + signerOrOptions?: ethers.Signer | FactoryOptions + ): Promise; + getContractFactory( + name: "GatewayEVMUpgradeTest", + signerOrOptions?: ethers.Signer | FactoryOptions + ): Promise; + getContractFactory( + name: "IGatewayEVM", + signerOrOptions?: ethers.Signer | FactoryOptions + ): Promise; + getContractFactory( + name: "Receiver", + signerOrOptions?: ethers.Signer | FactoryOptions + ): Promise; + getContractFactory( + 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: "TestZContract", + signerOrOptions?: ethers.Signer | FactoryOptions + ): Promise; + getContractFactory( + name: "ZRC20Errors", + signerOrOptions?: ethers.Signer | FactoryOptions + ): Promise; + getContractFactory( + name: "ZRC20New", + signerOrOptions?: ethers.Signer | FactoryOptions + ): Promise; getContractFactory( name: "ISystem", signerOrOptions?: ethers.Signer | FactoryOptions @@ -369,6 +449,46 @@ declare module "hardhat/types/runtime" { signerOrOptions?: ethers.Signer | FactoryOptions ): Promise; + getContractAt( + name: "OwnableUpgradeable", + address: string, + signer?: ethers.Signer + ): Promise; + getContractAt( + name: "IERC1822ProxiableUpgradeable", + address: string, + signer?: ethers.Signer + ): Promise; + getContractAt( + name: "IERC1967Upgradeable", + address: string, + signer?: ethers.Signer + ): Promise; + getContractAt( + name: "IBeaconUpgradeable", + address: string, + signer?: ethers.Signer + ): Promise; + getContractAt( + name: "ERC1967UpgradeUpgradeable", + address: string, + signer?: ethers.Signer + ): Promise; + getContractAt( + name: "Initializable", + address: string, + signer?: ethers.Signer + ): Promise; + getContractAt( + name: "UUPSUpgradeable", + address: string, + signer?: ethers.Signer + ): Promise; + getContractAt( + name: "ContextUpgradeable", + address: string, + signer?: ethers.Signer + ): Promise; getContractAt( name: "Ownable", address: string, @@ -729,6 +849,66 @@ declare module "hardhat/types/runtime" { address: string, signer?: ethers.Signer ): Promise; + getContractAt( + name: "ERC20CustodyNew", + address: string, + signer?: ethers.Signer + ): Promise; + getContractAt( + name: "GatewayEVM", + address: string, + signer?: ethers.Signer + ): Promise; + getContractAt( + name: "GatewayEVMUpgradeTest", + address: string, + signer?: ethers.Signer + ): Promise; + getContractAt( + name: "IGatewayEVM", + address: string, + signer?: ethers.Signer + ): Promise; + getContractAt( + name: "Receiver", + address: string, + signer?: ethers.Signer + ): Promise; + getContractAt( + name: "TestERC20", + 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: "TestZContract", + address: string, + signer?: ethers.Signer + ): Promise; + getContractAt( + name: "ZRC20Errors", + address: string, + signer?: ethers.Signer + ): Promise; + getContractAt( + name: "ZRC20New", + address: string, + signer?: ethers.Signer + ): Promise; getContractAt( name: "ISystem", address: string, diff --git a/typechain-types/index.ts b/typechain-types/index.ts index c86b173d..a2eabf95 100644 --- a/typechain-types/index.ts +++ b/typechain-types/index.ts @@ -8,6 +8,22 @@ export type { uniswap }; import type * as contracts from "./contracts"; export type { contracts }; export * as factories from "./factories"; +export type { OwnableUpgradeable } from "./@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable"; +export { OwnableUpgradeable__factory } from "./factories/@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable__factory"; +export type { IERC1822ProxiableUpgradeable } from "./@openzeppelin/contracts-upgradeable/interfaces/draft-IERC1822Upgradeable.sol/IERC1822ProxiableUpgradeable"; +export { IERC1822ProxiableUpgradeable__factory } from "./factories/@openzeppelin/contracts-upgradeable/interfaces/draft-IERC1822Upgradeable.sol/IERC1822ProxiableUpgradeable__factory"; +export type { IERC1967Upgradeable } from "./@openzeppelin/contracts-upgradeable/interfaces/IERC1967Upgradeable"; +export { IERC1967Upgradeable__factory } from "./factories/@openzeppelin/contracts-upgradeable/interfaces/IERC1967Upgradeable__factory"; +export type { IBeaconUpgradeable } from "./@openzeppelin/contracts-upgradeable/proxy/beacon/IBeaconUpgradeable"; +export { IBeaconUpgradeable__factory } from "./factories/@openzeppelin/contracts-upgradeable/proxy/beacon/IBeaconUpgradeable__factory"; +export type { ERC1967UpgradeUpgradeable } from "./@openzeppelin/contracts-upgradeable/proxy/ERC1967/ERC1967UpgradeUpgradeable"; +export { ERC1967UpgradeUpgradeable__factory } from "./factories/@openzeppelin/contracts-upgradeable/proxy/ERC1967/ERC1967UpgradeUpgradeable__factory"; +export type { Initializable } from "./@openzeppelin/contracts-upgradeable/proxy/utils/Initializable"; +export { Initializable__factory } from "./factories/@openzeppelin/contracts-upgradeable/proxy/utils/Initializable__factory"; +export type { UUPSUpgradeable } from "./@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable"; +export { UUPSUpgradeable__factory } from "./factories/@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable__factory"; +export type { ContextUpgradeable } from "./@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable"; +export { ContextUpgradeable__factory } from "./factories/@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable__factory"; export type { Ownable } from "./@openzeppelin/contracts/access/Ownable"; export { Ownable__factory } from "./factories/@openzeppelin/contracts/access/Ownable__factory"; export type { Ownable2Step } from "./@openzeppelin/contracts/access/Ownable2Step"; @@ -140,6 +156,30 @@ export type { ZetaConnectorEth } from "./contracts/evm/ZetaConnector.eth.sol/Zet export { ZetaConnectorEth__factory } from "./factories/contracts/evm/ZetaConnector.eth.sol/ZetaConnectorEth__factory"; export type { ZetaConnectorNonEth } from "./contracts/evm/ZetaConnector.non-eth.sol/ZetaConnectorNonEth"; export { ZetaConnectorNonEth__factory } from "./factories/contracts/evm/ZetaConnector.non-eth.sol/ZetaConnectorNonEth__factory"; +export type { ERC20CustodyNew } from "./contracts/prototypes/evm/ERC20CustodyNew"; +export { ERC20CustodyNew__factory } from "./factories/contracts/prototypes/evm/ERC20CustodyNew__factory"; +export type { GatewayEVM } from "./contracts/prototypes/evm/GatewayEVM"; +export { GatewayEVM__factory } from "./factories/contracts/prototypes/evm/GatewayEVM__factory"; +export type { GatewayEVMUpgradeTest } from "./contracts/prototypes/evm/GatewayEVMUpgradeTest"; +export { GatewayEVMUpgradeTest__factory } from "./factories/contracts/prototypes/evm/GatewayEVMUpgradeTest__factory"; +export type { IGatewayEVM } from "./contracts/prototypes/evm/interfaces.sol/IGatewayEVM"; +export { IGatewayEVM__factory } from "./factories/contracts/prototypes/evm/interfaces.sol/IGatewayEVM__factory"; +export type { Receiver } from "./contracts/prototypes/evm/Receiver"; +export { Receiver__factory } from "./factories/contracts/prototypes/evm/Receiver__factory"; +export type { 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 { TestZContract } from "./contracts/prototypes/zevm/TestZContract"; +export { TestZContract__factory } from "./factories/contracts/prototypes/zevm/TestZContract__factory"; +export type { ZRC20Errors } from "./contracts/prototypes/zevm/ZRC20New.sol/ZRC20Errors"; +export { ZRC20Errors__factory } from "./factories/contracts/prototypes/zevm/ZRC20New.sol/ZRC20Errors__factory"; +export type { ZRC20New } from "./contracts/prototypes/zevm/ZRC20New.sol/ZRC20New"; +export { ZRC20New__factory } from "./factories/contracts/prototypes/zevm/ZRC20New.sol/ZRC20New__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"; @@ -160,5 +200,3 @@ export type { ZetaConnectorZEVM } from "./contracts/zevm/ZetaConnectorZEVM.sol/Z export { ZetaConnectorZEVM__factory } from "./factories/contracts/zevm/ZetaConnectorZEVM.sol/ZetaConnectorZEVM__factory"; export type { ZRC20 } from "./contracts/zevm/ZRC20.sol/ZRC20"; export { ZRC20__factory } from "./factories/contracts/zevm/ZRC20.sol/ZRC20__factory"; -export type { ZRC20Errors } from "./contracts/zevm/ZRC20.sol/ZRC20Errors"; -export { ZRC20Errors__factory } from "./factories/contracts/zevm/ZRC20.sol/ZRC20Errors__factory"; diff --git a/yarn.lock b/yarn.lock index 3dadaa0a..3e45fd86 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2,6 +2,39 @@ # yarn lockfile v1 +"@aws-crypto/sha256-js@1.2.2": + version "1.2.2" + resolved "https://registry.yarnpkg.com/@aws-crypto/sha256-js/-/sha256-js-1.2.2.tgz#02acd1a1fda92896fc5a28ec7c6e164644ea32fc" + integrity sha512-Nr1QJIbW/afYYGzYvrF70LtaHrIRtd4TNAglX8BvlfxJLZ45SAmueIKYl5tWoNBPzp65ymXGFK0Bb1vZUpuc9g== + dependencies: + "@aws-crypto/util" "^1.2.2" + "@aws-sdk/types" "^3.1.0" + tslib "^1.11.1" + +"@aws-crypto/util@^1.2.2": + version "1.2.2" + resolved "https://registry.yarnpkg.com/@aws-crypto/util/-/util-1.2.2.tgz#b28f7897730eb6538b21c18bd4de22d0ea09003c" + integrity sha512-H8PjG5WJ4wz0UXAFXeJjWCW1vkvIJ3qUUD+rGRwJ2/hj+xT58Qle2MTql/2MGzkU+1JLAFuR6aJpLAjHwhmwwg== + dependencies: + "@aws-sdk/types" "^3.1.0" + "@aws-sdk/util-utf8-browser" "^3.0.0" + tslib "^1.11.1" + +"@aws-sdk/types@^3.1.0": + version "3.598.0" + resolved "https://registry.yarnpkg.com/@aws-sdk/types/-/types-3.598.0.tgz#b840d2446dee19a2a4731e6166f2327915d846db" + integrity sha512-742uRl6z7u0LFmZwDrFP6r1wlZcgVPw+/TilluDJmCAR8BgRw3IR+743kUXKBGd8QZDRW2n6v/PYsi/AWCDDMQ== + dependencies: + "@smithy/types" "^3.1.0" + tslib "^2.6.2" + +"@aws-sdk/util-utf8-browser@^3.0.0": + version "3.259.0" + resolved "https://registry.yarnpkg.com/@aws-sdk/util-utf8-browser/-/util-utf8-browser-3.259.0.tgz#3275a6f5eb334f96ca76635b961d3c50259fd9ff" + integrity sha512-UvFa/vR+e19XookZF8RzFZBrw2EUkQWxiBW0yYQAhvk3C+QVGl0H3ouca8LDBlBfQKXwmW3huo/59H8rwb1wJw== + dependencies: + tslib "^2.3.1" + "@babel/code-frame@^7.0.0": version "7.21.4" resolved "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.21.4.tgz" @@ -1560,16 +1593,74 @@ resolved "https://registry.npmjs.org/@nomiclabs/hardhat-waffle/-/hardhat-waffle-2.0.5.tgz" integrity sha512-U1RH9OQ1mWYQfb+moX5aTgGjpVVlOcpiFI47wwnaGG4kLhcTy90cNiapoqZenxcRAITVbr0/+QSduINL5EsUIQ== +"@openzeppelin/contracts-upgradeable@^4.8.3": + version "4.9.6" + resolved "https://registry.yarnpkg.com/@openzeppelin/contracts-upgradeable/-/contracts-upgradeable-4.9.6.tgz#38b21708a719da647de4bb0e4802ee235a0d24df" + integrity sha512-m4iHazOsOCv1DgM7eD7GupTJ+NFVujRZt1wzddDPSVGpWdKq1SKkla5htKG7+IS4d2XOCtzkUNwRZ7Vq5aEUMA== + "@openzeppelin/contracts@3.4.2-solc-0.7": version "3.4.2-solc-0.7" resolved "https://registry.npmjs.org/@openzeppelin/contracts/-/contracts-3.4.2-solc-0.7.tgz" integrity sha512-W6QmqgkADuFcTLzHL8vVoNBtkwjvQRpYIAom7KiUNoLKghyx3FgH0GBjt8NRvigV1ZmMOBllvE1By1C+bi8WpA== +"@openzeppelin/contracts@^4.3.2": + version "4.9.6" + resolved "https://registry.yarnpkg.com/@openzeppelin/contracts/-/contracts-4.9.6.tgz#2a880a24eb19b4f8b25adc2a5095f2aa27f39677" + integrity sha512-xSmezSupL+y9VkHZJGDoCBpmnB2ogM13ccaYDWqJTfS3dbuHkgjuwDFUmaFauBCboQMGB/S5UqUl2y54X99BmA== + "@openzeppelin/contracts@^4.8.3": version "4.8.3" resolved "https://registry.npmjs.org/@openzeppelin/contracts/-/contracts-4.8.3.tgz" integrity sha512-bQHV8R9Me8IaJoJ2vPG4rXcL7seB7YVuskr4f+f5RyOStSZetwzkWtoqDMl5erkBJy0lDRUnIR2WIkPiC0GJlg== +"@openzeppelin/defender-base-client@^1.46.0": + version "1.54.6" + resolved "https://registry.yarnpkg.com/@openzeppelin/defender-base-client/-/defender-base-client-1.54.6.tgz#b65a90dba49375ac1439d638832382344067a0b9" + integrity sha512-PTef+rMxkM5VQ7sLwLKSjp2DBakYQd661ZJiSRywx+q/nIpm3B/HYGcz5wPZCA5O/QcEP6TatXXDoeMwimbcnw== + dependencies: + amazon-cognito-identity-js "^6.0.1" + async-retry "^1.3.3" + axios "^1.4.0" + lodash "^4.17.19" + node-fetch "^2.6.0" + +"@openzeppelin/hardhat-upgrades@1.28.0": + version "1.28.0" + resolved "https://registry.yarnpkg.com/@openzeppelin/hardhat-upgrades/-/hardhat-upgrades-1.28.0.tgz#6361f313a8a879d8a08a5e395acf0933bc190950" + integrity sha512-7sb/Jf+X+uIufOBnmHR0FJVWuxEs2lpxjJnLNN6eCJCP8nD0v+Ot5lTOW2Qb/GFnh+fLvJtEkhkowz4ZQ57+zQ== + dependencies: + "@openzeppelin/defender-base-client" "^1.46.0" + "@openzeppelin/platform-deploy-client" "^0.8.0" + "@openzeppelin/upgrades-core" "^1.27.0" + chalk "^4.1.0" + debug "^4.1.1" + proper-lockfile "^4.1.1" + +"@openzeppelin/platform-deploy-client@^0.8.0": + version "0.8.0" + resolved "https://registry.yarnpkg.com/@openzeppelin/platform-deploy-client/-/platform-deploy-client-0.8.0.tgz#af6596275a19c283d6145f0128cc1247d18223c1" + integrity sha512-POx3AsnKwKSV/ZLOU/gheksj0Lq7Is1q2F3pKmcFjGZiibf+4kjGxr4eSMrT+2qgKYZQH1ZLQZ+SkbguD8fTvA== + dependencies: + "@ethersproject/abi" "^5.6.3" + "@openzeppelin/defender-base-client" "^1.46.0" + axios "^0.21.2" + lodash "^4.17.19" + node-fetch "^2.6.0" + +"@openzeppelin/upgrades-core@^1.27.0": + version "1.34.1" + resolved "https://registry.yarnpkg.com/@openzeppelin/upgrades-core/-/upgrades-core-1.34.1.tgz#660301692e706c7e701395467267128cc43c1de9" + integrity sha512-LV3hHm60htmP3HJjn2VoGqXNPn1RLFSSInRyXNbm15Z2oWKGxOfAWSC4+okRckum0yVB5g3k4/SEyqjsJRB07A== + dependencies: + cbor "^9.0.0" + chalk "^4.1.0" + compare-versions "^6.0.0" + debug "^4.1.1" + ethereumjs-util "^7.0.3" + minimist "^1.2.7" + proper-lockfile "^4.1.1" + solidity-ast "^0.4.51" + "@pnpm/config.env-replace@^1.1.0": version "1.1.0" resolved "https://registry.npmjs.org/@pnpm/config.env-replace/-/config.env-replace-1.1.0.tgz" @@ -1745,6 +1836,13 @@ resolved "https://registry.npmjs.org/@sindresorhus/is/-/is-5.6.0.tgz" integrity sha512-TV7t8GKYaJWsn00tFDqBw8+Uqmr8A0fRU1tvTQhyZzGv0sJCGRQL3JGMI3ucuKo3XIZdUP+Lx7/gh2t3lewy7g== +"@smithy/types@^3.1.0": + version "3.2.0" + resolved "https://registry.yarnpkg.com/@smithy/types/-/types-3.2.0.tgz#1350fe8a50d5e35e12ffb34be46d946860b2b5ab" + integrity sha512-cKyeKAPazZRVqm7QPvcPD2jEIt2wqDPAL1KJKb0f/5I7uhollvsWZuZKLclmyP6a+Jwmr3OV3t+X0pZUUHS9BA== + dependencies: + tslib "^2.6.2" + "@solidity-parser/parser@^0.14.0": version "0.14.5" resolved "https://registry.npmjs.org/@solidity-parser/parser/-/parser-0.14.5.tgz" @@ -2145,7 +2243,7 @@ resolved "https://registry.npmjs.org/@uniswap/v2-core/-/v2-core-1.0.1.tgz" integrity sha512-MtybtkUPSyysqLY2U210NBDeCHX+ltHt3oADGdjqoThZaFRDKwM6k1Nb3F0A3hk5hwuQvytFWhrWHOEq6nVJ8Q== -"@uniswap/v2-periphery@^1.1.0-beta.0": +"@uniswap/v2-periphery@1.1.0-beta.0", "@uniswap/v2-periphery@^1.1.0-beta.0": version "1.1.0-beta.0" resolved "https://registry.npmjs.org/@uniswap/v2-periphery/-/v2-periphery-1.1.0-beta.0.tgz" integrity sha512-6dkwAMKza8nzqYiXEr2D86dgW3TTavUvCR0w2Tu33bAbM8Ah43LKAzH7oKKPRT5VJQaMi1jtkGs1E8JPor1n5g== @@ -2313,6 +2411,17 @@ ajv@^8.0.1: require-from-string "^2.0.2" uri-js "^4.2.2" +amazon-cognito-identity-js@^6.0.1: + version "6.3.12" + resolved "https://registry.yarnpkg.com/amazon-cognito-identity-js/-/amazon-cognito-identity-js-6.3.12.tgz#af73df033094ad4c679c19cf6122b90058021619" + integrity sha512-s7NKDZgx336cp+oDeUtB2ZzT8jWJp/v2LWuYl+LQtMEODe22RF1IJ4nRiDATp+rp1pTffCZcm44Quw4jx2bqNg== + dependencies: + "@aws-crypto/sha256-js" "1.2.2" + buffer "4.9.2" + fast-base64-decode "^1.0.0" + isomorphic-unfetch "^3.0.0" + js-cookie "^2.2.1" + amdefine@>=0.0.4: version "1.0.1" resolved "https://registry.npmjs.org/amdefine/-/amdefine-1.0.1.tgz" @@ -2452,6 +2561,14 @@ array-buffer-byte-length@^1.0.0: call-bind "^1.0.2" is-array-buffer "^3.0.1" +array-buffer-byte-length@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/array-buffer-byte-length/-/array-buffer-byte-length-1.0.1.tgz#1e5583ec16763540a27ae52eed99ff899223568f" + integrity sha512-ahC5W1xgou+KTXix4sAO8Ki12Q+jf4i0+tmk3sC+zgcynshkHxzpXdImBehiUYKKKDwvfFiJl1tZt6ewscS1Mg== + dependencies: + call-bind "^1.0.5" + is-array-buffer "^3.0.4" + array-includes@^3.1.6: version "3.1.6" resolved "https://registry.npmjs.org/array-includes/-/array-includes-3.1.6.tgz" @@ -2483,6 +2600,18 @@ array-unique@^0.3.2: resolved "https://registry.npmjs.org/array-unique/-/array-unique-0.3.2.tgz" integrity sha512-SleRWjh9JUud2wH1hPs9rZBZ33H6T9HOiL0uwGnGx9FpE6wKGyfWugmbkEOIs6qWrZhg0LWeLziLrEwQJhs5mQ== +array.prototype.findlast@^1.2.2: + version "1.2.5" + resolved "https://registry.yarnpkg.com/array.prototype.findlast/-/array.prototype.findlast-1.2.5.tgz#3e4fbcb30a15a7f5bf64cf2faae22d139c2e4904" + integrity sha512-CVvd6FHg1Z3POpBLxO6E6zr+rSKEQ9L6rZHAaY7lLfhKsWYUBBOuMs0e9o24oopj6H+geRCX0YJ+TJLBK2eHyQ== + dependencies: + call-bind "^1.0.7" + define-properties "^1.2.1" + es-abstract "^1.23.2" + es-errors "^1.3.0" + es-object-atoms "^1.0.0" + es-shim-unscopables "^1.0.2" + array.prototype.flat@^1.2.3, array.prototype.flat@^1.3.1: version "1.3.1" resolved "https://registry.npmjs.org/array.prototype.flat/-/array.prototype.flat-1.3.1.tgz" @@ -2514,6 +2643,20 @@ array.prototype.reduce@^1.0.5: es-array-method-boxes-properly "^1.0.0" is-string "^1.0.7" +arraybuffer.prototype.slice@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/arraybuffer.prototype.slice/-/arraybuffer.prototype.slice-1.0.3.tgz#097972f4255e41bc3425e37dc3f6421cf9aefde6" + integrity sha512-bMxMKAjg13EBSVscxTaYA4mRc5t1UAXa2kXiGTNfZ079HIWXEkKmkgFrh/nJqamaLSrXO5H4WFFkPEaLJWbs3A== + dependencies: + array-buffer-byte-length "^1.0.1" + call-bind "^1.0.5" + define-properties "^1.2.1" + es-abstract "^1.22.3" + es-errors "^1.2.1" + get-intrinsic "^1.2.3" + is-array-buffer "^3.0.4" + is-shared-array-buffer "^1.0.2" + arrify@^1.0.0, arrify@^1.0.1: version "1.0.1" resolved "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz" @@ -2568,6 +2711,13 @@ async-eventemitter@^0.2.4: dependencies: async "^2.4.0" +async-retry@^1.3.3: + version "1.3.3" + resolved "https://registry.yarnpkg.com/async-retry/-/async-retry-1.3.3.tgz#0e7f36c04d8478e7a58bdbed80cedf977785f280" + integrity sha512-wfr/jstw9xNi/0teMHrRW7dsz3Lt5ARhYNZ2ewpadnhaIp5mbALhOAP+EAdsC7t4Z6wqsDVv9+W6gm1Dk9mEyw== + dependencies: + retry "0.13.1" + async@1.x: version "1.5.2" resolved "https://registry.npmjs.org/async/-/async-1.5.2.tgz" @@ -2600,6 +2750,13 @@ available-typed-arrays@^1.0.5: resolved "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.5.tgz" integrity sha512-DMD0KiN46eipeziST1LPP/STfDU0sufISXmjSgvVsoU2tqxctQeASejWcfNtxYKqETM1UxQ8sp2OrSBWpHY6sw== +available-typed-arrays@^1.0.7: + version "1.0.7" + resolved "https://registry.yarnpkg.com/available-typed-arrays/-/available-typed-arrays-1.0.7.tgz#a5cc375d6a03c2efc87a553f3e0b1522def14846" + integrity sha512-wvUjBtSGN7+7SjNpq/9M2Tg350UZD3q62IFZLbRAR1bSMlCo1ZaeW+BJ+D090e4hIIZLBcTDWe4Mh4jvUDajzQ== + dependencies: + possible-typed-array-names "^1.0.0" + aws-sign2@~0.7.0: version "0.7.0" resolved "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz" @@ -2610,6 +2767,22 @@ aws4@^1.8.0: resolved "https://registry.npmjs.org/aws4/-/aws4-1.12.0.tgz" integrity sha512-NmWvPnx0F1SfrQbYwOi7OeaNGokp9XhzNioJ/CSBs8Qa4vxug81mhJEAVZwxXuBmYB5KDRfMq/F3RR0BIU7sWg== +axios@^0.21.2: + version "0.21.4" + resolved "https://registry.yarnpkg.com/axios/-/axios-0.21.4.tgz#c67b90dc0568e5c1cf2b0b858c43ba28e2eda575" + integrity sha512-ut5vewkiu8jjGBdqpM44XxjuCjq9LAKeHVmoVfHVzy8eHgxxq8SbAVQNovDA8mVi05kP0Ea/n/UzcSHcTJQfNg== + dependencies: + follow-redirects "^1.14.0" + +axios@^1.4.0: + version "1.7.2" + resolved "https://registry.yarnpkg.com/axios/-/axios-1.7.2.tgz#b625db8a7051fbea61c35a3cbb3a1daa7b9c7621" + integrity sha512-2A8QhOMrbomlDuiLeK9XibIBzuHeRcqqNOHp0Cyp5EoJ1IFDh+XZH3A6BkXtv0K4gFGCI0Y4BM7B1wOEi0Rmgw== + dependencies: + follow-redirects "^1.15.6" + form-data "^4.0.0" + proxy-from-env "^1.1.0" + axios@^1.6.5: version "1.6.5" resolved "https://registry.npmjs.org/axios/-/axios-1.6.5.tgz" @@ -2639,9 +2812,9 @@ base-x@^3.0.2: dependencies: safe-buffer "^5.0.1" -base64-js@^1.3.1: +base64-js@^1.0.2, base64-js@^1.3.1: version "1.5.1" - resolved "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz" + resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.5.1.tgz#1b1b440160a5bf7ad40b650f095963481903930a" integrity sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA== base64-sol@1.0.1: @@ -2873,6 +3046,15 @@ buffer-xor@^2.0.1: dependencies: safe-buffer "^5.1.1" +buffer@4.9.2: + version "4.9.2" + resolved "https://registry.yarnpkg.com/buffer/-/buffer-4.9.2.tgz#230ead344002988644841ab0244af8c44bbe3ef8" + integrity sha512-xq+q3SRMOxGivLhBNaUdC64hDTQwejJ+H0T/NB1XMtTVEwNTrfFF3gAxiyW0Bu/xWEGhjVKgUcMhCrUy2+uCWg== + dependencies: + base64-js "^1.0.2" + ieee754 "^1.1.4" + isarray "^1.0.0" + buffer@^5.5.0, buffer@^5.6.0: version "5.7.1" resolved "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz" @@ -2949,6 +3131,17 @@ call-bind@^1.0.0, call-bind@^1.0.2: function-bind "^1.1.1" get-intrinsic "^1.0.2" +call-bind@^1.0.5, call-bind@^1.0.6, call-bind@^1.0.7: + version "1.0.7" + resolved "https://registry.yarnpkg.com/call-bind/-/call-bind-1.0.7.tgz#06016599c40c56498c18769d2730be242b6fa3b9" + integrity sha512-GHTSNSYICQ7scH7sZ+M2rFopRoLh8t2bLSW6BbgrtLsahOIB5iyAVJf9GjWK3cYTDaMj4XdBpM1cA6pIS0Kv2w== + dependencies: + es-define-property "^1.0.0" + es-errors "^1.3.0" + function-bind "^1.1.2" + get-intrinsic "^1.2.4" + set-function-length "^1.2.1" + callsites@^3.0.0: version "3.1.0" resolved "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz" @@ -3005,6 +3198,13 @@ cbor@^8.1.0: dependencies: nofilter "^3.1.0" +cbor@^9.0.0: + version "9.0.2" + resolved "https://registry.yarnpkg.com/cbor/-/cbor-9.0.2.tgz#536b4f2d544411e70ec2b19a2453f10f83cd9fdb" + integrity sha512-JPypkxsB10s9QOWwa6zwPzqE1Md3vqpPc+cai4sAecuCsRyAtAl/pMyhPlMbT/xtPnm2dznJZYRLui57qiRhaQ== + dependencies: + nofilter "^3.1.0" + chai-as-promised@^7.1.1: version "7.1.1" resolved "https://registry.npmjs.org/chai-as-promised/-/chai-as-promised-7.1.1.tgz" @@ -3306,6 +3506,11 @@ commander@^8.1.0: resolved "https://registry.npmjs.org/commander/-/commander-8.3.0.tgz" integrity sha512-OkTL9umf+He2DZkUq8f8J9of7yL6RJKI24dVITBmNfZBmri9zYZQrKkuXiKhyfPSu8tUhnVBB1iKXevvnlR4Ww== +compare-versions@^6.0.0: + version "6.1.0" + resolved "https://registry.yarnpkg.com/compare-versions/-/compare-versions-6.1.0.tgz#3f2131e3ae93577df111dba133e6db876ffe127a" + integrity sha512-LNZQXhqUvqUTotpZ00qLSaify3b4VFD588aRr8MKFw4CMUr98ytzCW5wDH5qx/DEY5kCDXcbcRuCqL0szEf2tg== + component-emitter@^1.2.1: version "1.3.0" resolved "https://registry.npmjs.org/component-emitter/-/component-emitter-1.3.0.tgz" @@ -3479,6 +3684,33 @@ dashdash@^1.12.0: dependencies: assert-plus "^1.0.0" +data-view-buffer@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/data-view-buffer/-/data-view-buffer-1.0.1.tgz#8ea6326efec17a2e42620696e671d7d5a8bc66b2" + integrity sha512-0lht7OugA5x3iJLOWFhWK/5ehONdprk0ISXqVFn/NFrDu+cuc8iADFrGQz5BnRK7LLU3JmkbXSxaqX+/mXYtUA== + dependencies: + call-bind "^1.0.6" + es-errors "^1.3.0" + is-data-view "^1.0.1" + +data-view-byte-length@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/data-view-byte-length/-/data-view-byte-length-1.0.1.tgz#90721ca95ff280677eb793749fce1011347669e2" + integrity sha512-4J7wRJD3ABAzr8wP+OcIcqq2dlUKp4DVflx++hs5h5ZKydWMI6/D/fAot+yh6g2tHh8fLFTvNOaVN357NvSrOQ== + dependencies: + call-bind "^1.0.7" + es-errors "^1.3.0" + is-data-view "^1.0.1" + +data-view-byte-offset@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/data-view-byte-offset/-/data-view-byte-offset-1.0.0.tgz#5e0bbfb4828ed2d1b9b400cd8a7d119bca0ff18a" + integrity sha512-t/Ygsytq+R995EJ5PZlD4Cu56sWa8InXySaViRzw9apusqsOO2bQP+SbYzAhR0pFKoB+43lYy8rWban9JSuXnA== + dependencies: + call-bind "^1.0.6" + es-errors "^1.3.0" + is-data-view "^1.0.1" + death@^1.1.0: version "1.1.0" resolved "https://registry.npmjs.org/death/-/death-1.1.0.tgz" @@ -3584,6 +3816,15 @@ deferred-leveldown@~5.3.0: abstract-leveldown "~6.2.1" inherits "^2.0.3" +define-data-property@^1.0.1, define-data-property@^1.1.4: + version "1.1.4" + resolved "https://registry.yarnpkg.com/define-data-property/-/define-data-property-1.1.4.tgz#894dc141bb7d3060ae4366f6a0107e68fbe48c5e" + integrity sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A== + dependencies: + es-define-property "^1.0.0" + es-errors "^1.3.0" + gopd "^1.0.1" + define-properties@^1.1.2, define-properties@^1.1.3, define-properties@^1.1.4: version "1.2.0" resolved "https://registry.npmjs.org/define-properties/-/define-properties-1.2.0.tgz" @@ -3592,6 +3833,15 @@ define-properties@^1.1.2, define-properties@^1.1.3, define-properties@^1.1.4: has-property-descriptors "^1.0.0" object-keys "^1.1.1" +define-properties@^1.2.0, define-properties@^1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/define-properties/-/define-properties-1.2.1.tgz#10781cc616eb951a80a034bafcaa7377f6af2b6c" + integrity sha512-8QmQKqEASLd5nx0U1B1okLElbUuuttJ/AnYmRXbbbGDWh6uS208EjD4Xqq/I9wK7u0v6O08XhTWnt5XtEbR6Dg== + dependencies: + define-data-property "^1.0.1" + has-property-descriptors "^1.0.0" + object-keys "^1.1.1" + define-property@^0.2.5: version "0.2.5" resolved "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz" @@ -3840,11 +4090,82 @@ es-abstract@^1.19.0, es-abstract@^1.20.4: unbox-primitive "^1.0.2" which-typed-array "^1.1.9" +es-abstract@^1.22.1, es-abstract@^1.22.3, es-abstract@^1.23.0, es-abstract@^1.23.2: + version "1.23.3" + resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.23.3.tgz#8f0c5a35cd215312573c5a27c87dfd6c881a0aa0" + integrity sha512-e+HfNH61Bj1X9/jLc5v1owaLYuHdeHHSQlkhCBiTK8rBvKaULl/beGMxwrMXjpYrv4pz22BlY570vVePA2ho4A== + dependencies: + array-buffer-byte-length "^1.0.1" + arraybuffer.prototype.slice "^1.0.3" + available-typed-arrays "^1.0.7" + call-bind "^1.0.7" + data-view-buffer "^1.0.1" + data-view-byte-length "^1.0.1" + data-view-byte-offset "^1.0.0" + es-define-property "^1.0.0" + es-errors "^1.3.0" + es-object-atoms "^1.0.0" + es-set-tostringtag "^2.0.3" + es-to-primitive "^1.2.1" + function.prototype.name "^1.1.6" + get-intrinsic "^1.2.4" + get-symbol-description "^1.0.2" + globalthis "^1.0.3" + gopd "^1.0.1" + has-property-descriptors "^1.0.2" + has-proto "^1.0.3" + has-symbols "^1.0.3" + hasown "^2.0.2" + internal-slot "^1.0.7" + is-array-buffer "^3.0.4" + is-callable "^1.2.7" + is-data-view "^1.0.1" + is-negative-zero "^2.0.3" + is-regex "^1.1.4" + is-shared-array-buffer "^1.0.3" + is-string "^1.0.7" + is-typed-array "^1.1.13" + is-weakref "^1.0.2" + object-inspect "^1.13.1" + object-keys "^1.1.1" + object.assign "^4.1.5" + regexp.prototype.flags "^1.5.2" + safe-array-concat "^1.1.2" + safe-regex-test "^1.0.3" + string.prototype.trim "^1.2.9" + string.prototype.trimend "^1.0.8" + string.prototype.trimstart "^1.0.8" + typed-array-buffer "^1.0.2" + typed-array-byte-length "^1.0.1" + typed-array-byte-offset "^1.0.2" + typed-array-length "^1.0.6" + unbox-primitive "^1.0.2" + which-typed-array "^1.1.15" + es-array-method-boxes-properly@^1.0.0: version "1.0.0" resolved "https://registry.npmjs.org/es-array-method-boxes-properly/-/es-array-method-boxes-properly-1.0.0.tgz" integrity sha512-wd6JXUmyHmt8T5a2xreUwKcGPq6f1f+WwIJkijUqiGcJz1qqnZgP6XIK+QyIWU5lT7imeNxUll48bziG+TSYcA== +es-define-property@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/es-define-property/-/es-define-property-1.0.0.tgz#c7faefbdff8b2696cf5f46921edfb77cc4ba3845" + integrity sha512-jxayLKShrEqqzJ0eumQbVhTYQM27CfT1T35+gCgDFoL82JLsXqTJ76zv6A0YLOgEnLUMvLzsDsGIrl8NFpT2gQ== + dependencies: + get-intrinsic "^1.2.4" + +es-errors@^1.2.1, es-errors@^1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/es-errors/-/es-errors-1.3.0.tgz#05f75a25dab98e4fb1dcd5e1472c0546d5057c8f" + integrity sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw== + +es-object-atoms@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/es-object-atoms/-/es-object-atoms-1.0.0.tgz#ddb55cd47ac2e240701260bc2a8e31ecb643d941" + integrity sha512-MZ4iQ6JwHOBQjahnjwaC1ZtIBH+2ohjamzAO3oaHcXYup7qxjF2fixyH+Q71voWHeOkI2q/TnJao/KfXYIZWbw== + dependencies: + es-errors "^1.3.0" + es-set-tostringtag@^2.0.1: version "2.0.1" resolved "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.0.1.tgz" @@ -3854,6 +4175,15 @@ es-set-tostringtag@^2.0.1: has "^1.0.3" has-tostringtag "^1.0.0" +es-set-tostringtag@^2.0.3: + version "2.0.3" + resolved "https://registry.yarnpkg.com/es-set-tostringtag/-/es-set-tostringtag-2.0.3.tgz#8bb60f0a440c2e4281962428438d58545af39777" + integrity sha512-3T8uNMC3OQTHkFUsFq8r/BwAXLHvU/9O9mE0fBc/MY5iq/8H7ncvO947LmYA6ldWw9Uh8Yhf25zu6n7nML5QWQ== + dependencies: + get-intrinsic "^1.2.4" + has-tostringtag "^1.0.2" + hasown "^2.0.1" + es-shim-unscopables@^1.0.0: version "1.0.0" resolved "https://registry.npmjs.org/es-shim-unscopables/-/es-shim-unscopables-1.0.0.tgz" @@ -3861,6 +4191,13 @@ es-shim-unscopables@^1.0.0: dependencies: has "^1.0.3" +es-shim-unscopables@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/es-shim-unscopables/-/es-shim-unscopables-1.0.2.tgz#1f6942e71ecc7835ed1c8a83006d8771a63a3763" + integrity sha512-J3yBRXCzDu4ULnQwxyToo/OjdMx6akgVC7K6few0a7F/0wLtmKKN7I73AH5T2836UuXRqN7Qg+IIUw/+YJksRw== + dependencies: + hasown "^2.0.0" + es-to-primitive@^1.2.1: version "1.2.1" resolved "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz" @@ -4270,7 +4607,7 @@ ethereumjs-util@^6.0.0, ethereumjs-util@^6.2.1: ethjs-util "0.1.6" rlp "^2.2.3" -ethereumjs-util@^7.1.1, ethereumjs-util@^7.1.3, ethereumjs-util@^7.1.4, ethereumjs-util@^7.1.5: +ethereumjs-util@^7.0.3, ethereumjs-util@^7.1.1, ethereumjs-util@^7.1.3, ethereumjs-util@^7.1.4, ethereumjs-util@^7.1.5: version "7.1.5" resolved "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-7.1.5.tgz" integrity sha512-SDl5kKrQAudFBUe5OJM9Ac6WmMyYmXX/6sTmLZ3ffG2eY6ZIGBes3pEDxNN6V72WyOw4CPD5RomKdsa8DAAwLg== @@ -4502,6 +4839,11 @@ extsprintf@^1.2.0: resolved "https://registry.npmjs.org/extsprintf/-/extsprintf-1.4.1.tgz" integrity sha512-Wrk35e8ydCKDj/ArClo1VrPVmN8zph5V4AtHwIuHhvMXsKf73UT3BOD+azBIW+3wOJ4FhEH7zyaJCFvChjYvMA== +fast-base64-decode@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/fast-base64-decode/-/fast-base64-decode-1.0.0.tgz#b434a0dd7d92b12b43f26819300d2dafb83ee418" + integrity sha512-qwaScUgUGBYeDNRnbc/KyllVU88Jk1pRHPStuF/lO7B0/RTRLj7U0lkdTAutlBblY08rwZDff6tNU9cjv6j//Q== + fast-deep-equal@^3.1.1, fast-deep-equal@^3.1.3: version "3.1.3" resolved "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz" @@ -4672,6 +5014,11 @@ follow-redirects@^1.12.1: resolved "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.2.tgz" integrity sha512-VQLG33o04KaQ8uYi2tVNbdrWp1QWxNNea+nmIB4EVM28v0hmP17z7aG1+wAkNzVq4KeXTq3221ye5qTJP91JwA== +follow-redirects@^1.14.0, follow-redirects@^1.15.6: + version "1.15.6" + resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.15.6.tgz#7f815c0cda4249c74ff09e95ef97c23b5fd0399b" + integrity sha512-wWN62YITEaOpSK584EZXJafH1AGpO8RVgElfkuXbTOrPX4fIfOyEpW/CsiNd8JdYrAoOvafRTOEnvsO++qCqFA== + follow-redirects@^1.15.4: version "1.15.4" resolved "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.4.tgz" @@ -4831,6 +5178,11 @@ function-bind@^1.1.1: resolved "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz" integrity sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A== +function-bind@^1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.2.tgz#2c02d864d97f3ea6c8830c464cbd11ab6eab7a1c" + integrity sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA== + function.prototype.name@^1.1.5: version "1.1.5" resolved "https://registry.npmjs.org/function.prototype.name/-/function.prototype.name-1.1.5.tgz" @@ -4841,12 +5193,22 @@ function.prototype.name@^1.1.5: es-abstract "^1.19.0" functions-have-names "^1.2.2" +function.prototype.name@^1.1.6: + version "1.1.6" + resolved "https://registry.yarnpkg.com/function.prototype.name/-/function.prototype.name-1.1.6.tgz#cdf315b7d90ee77a4c6ee216c3c3362da07533fd" + integrity sha512-Z5kx79swU5P27WEayXM1tBi5Ze/lbIyiNgU3qyXUOf9b2rgXYyF9Dy9Cx+IQv/Lc8WCG6L82zwUPpSS9hGehIg== + dependencies: + call-bind "^1.0.2" + define-properties "^1.2.0" + es-abstract "^1.22.1" + functions-have-names "^1.2.3" + functional-red-black-tree@^1.0.1, functional-red-black-tree@~1.0.1: version "1.0.1" resolved "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz" integrity sha512-dsKNQNdj6xA3T+QlADDA7mOSlX0qiMINjn0cgr+eGHGsbSHzTabcIogz2+p/iqP1Xs6EP/sS2SbqH+brGTbq0g== -functions-have-names@^1.2.2: +functions-have-names@^1.2.2, functions-have-names@^1.2.3: version "1.2.3" resolved "https://registry.npmjs.org/functions-have-names/-/functions-have-names-1.2.3.tgz" integrity sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ== @@ -4887,6 +5249,17 @@ get-intrinsic@^1.0.2, get-intrinsic@^1.1.1, get-intrinsic@^1.1.3, get-intrinsic@ has "^1.0.3" has-symbols "^1.0.3" +get-intrinsic@^1.2.1, get-intrinsic@^1.2.3, get-intrinsic@^1.2.4: + version "1.2.4" + resolved "https://registry.yarnpkg.com/get-intrinsic/-/get-intrinsic-1.2.4.tgz#e385f5a4b5227d449c3eabbad05494ef0abbeadd" + integrity sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ== + dependencies: + es-errors "^1.3.0" + function-bind "^1.1.2" + has-proto "^1.0.1" + has-symbols "^1.0.3" + hasown "^2.0.0" + get-port@^3.1.0: version "3.2.0" resolved "https://registry.npmjs.org/get-port/-/get-port-3.2.0.tgz" @@ -4905,6 +5278,15 @@ get-symbol-description@^1.0.0: call-bind "^1.0.2" get-intrinsic "^1.1.1" +get-symbol-description@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/get-symbol-description/-/get-symbol-description-1.0.2.tgz#533744d5aa20aca4e079c8e5daf7fd44202821f5" + integrity sha512-g0QYk1dZBxGwk+Ngc+ltRH2IBp2f7zBkBMBJZCDerh6EhlhSR6+9irMCuT/09zD6qkarHUSn529sK/yL4S27mg== + dependencies: + call-bind "^1.0.5" + es-errors "^1.3.0" + get-intrinsic "^1.2.4" + get-value@^2.0.3, get-value@^2.0.6: version "2.0.6" resolved "https://registry.npmjs.org/get-value/-/get-value-2.0.6.tgz" @@ -5127,7 +5509,7 @@ graceful-fs@4.2.10: resolved "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.10.tgz" integrity sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA== -graceful-fs@^4.1.11, graceful-fs@^4.1.2, graceful-fs@^4.1.5, graceful-fs@^4.1.6, graceful-fs@^4.1.9, graceful-fs@^4.2.0, graceful-fs@^4.2.10: +graceful-fs@^4.1.11, graceful-fs@^4.1.2, graceful-fs@^4.1.5, graceful-fs@^4.1.6, graceful-fs@^4.1.9, graceful-fs@^4.2.0, graceful-fs@^4.2.10, graceful-fs@^4.2.4: version "4.2.11" resolved "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz" integrity sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ== @@ -5272,11 +5654,23 @@ has-property-descriptors@^1.0.0: dependencies: get-intrinsic "^1.1.1" +has-property-descriptors@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz#963ed7d071dc7bf5f084c5bfbe0d1b6222586854" + integrity sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg== + dependencies: + es-define-property "^1.0.0" + has-proto@^1.0.1: version "1.0.1" resolved "https://registry.npmjs.org/has-proto/-/has-proto-1.0.1.tgz" integrity sha512-7qE+iP+O+bgF9clE5+UoBFzE65mlBiVj3tKCrlNQ0Ogwm0BjpT/gK4SlLYDMybDh5I3TCTKnPPa0oMG7JDYrhg== +has-proto@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/has-proto/-/has-proto-1.0.3.tgz#b31ddfe9b0e6e9914536a6ab286426d0214f77fd" + integrity sha512-SJ1amZAJUiZS+PhsVLf5tGydlaVB8EdFpaSO4gmiUKUOxk8qzn5AIy4ZeJUmh22znIdk/uMAUT2pl3FxzVUH+Q== + has-symbols@^1.0.0, has-symbols@^1.0.2, has-symbols@^1.0.3: version "1.0.3" resolved "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz" @@ -5289,6 +5683,13 @@ has-tostringtag@^1.0.0: dependencies: has-symbols "^1.0.2" +has-tostringtag@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/has-tostringtag/-/has-tostringtag-1.0.2.tgz#2cdc42d40bef2e5b4eeab7c01a73c54ce7ab5abc" + integrity sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw== + dependencies: + has-symbols "^1.0.3" + has-value@^0.3.1: version "0.3.1" resolved "https://registry.npmjs.org/has-value/-/has-value-0.3.1.tgz" @@ -5352,6 +5753,13 @@ hash.js@1.1.7, hash.js@^1.0.0, hash.js@^1.0.3, hash.js@^1.1.7: inherits "^2.0.3" minimalistic-assert "^1.0.1" +hasown@^2.0.0, hasown@^2.0.1, hasown@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/hasown/-/hasown-2.0.2.tgz#003eaf91be7adc372e84ec59dc37252cedb80003" + integrity sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ== + dependencies: + function-bind "^1.1.2" + he@1.2.0: version "1.2.0" resolved "https://registry.npmjs.org/he/-/he-1.2.0.tgz" @@ -5453,9 +5861,9 @@ iconv-lite@0.4.24, iconv-lite@^0.4.24: dependencies: safer-buffer ">= 2.1.2 < 3" -ieee754@^1.1.13, ieee754@^1.2.1: +ieee754@^1.1.13, ieee754@^1.1.4, ieee754@^1.2.1: version "1.2.1" - resolved "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz" + resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.2.1.tgz#8eb7a10a63fff25d15a57b001586d177d1b0d352" integrity sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA== ignore@^5.1.1, ignore@^5.2.0, ignore@^5.2.4: @@ -5549,6 +5957,15 @@ internal-slot@^1.0.5: has "^1.0.3" side-channel "^1.0.4" +internal-slot@^1.0.7: + version "1.0.7" + resolved "https://registry.yarnpkg.com/internal-slot/-/internal-slot-1.0.7.tgz#c06dcca3ed874249881007b0a5523b172a190802" + integrity sha512-NGnrKwXzSms2qUUih/ILZ5JBqNTSa1+ZmP6flaIp6KmSElgE9qdndzS3cqjrDovwFdmwsGsLdeFgB6suw+1e9g== + dependencies: + es-errors "^1.3.0" + hasown "^2.0.0" + side-channel "^1.0.4" + interpret@^1.0.0: version "1.4.0" resolved "https://registry.npmjs.org/interpret/-/interpret-1.4.0.tgz" @@ -5584,6 +6001,14 @@ is-array-buffer@^3.0.1, is-array-buffer@^3.0.2: get-intrinsic "^1.2.0" is-typed-array "^1.1.10" +is-array-buffer@^3.0.4: + version "3.0.4" + resolved "https://registry.yarnpkg.com/is-array-buffer/-/is-array-buffer-3.0.4.tgz#7a1f92b3d61edd2bc65d24f130530ea93d7fae98" + integrity sha512-wcjaerHw0ydZwfhiKbXJWLDY8A7yV7KhjQOpb83hGgGfId/aQa4TOvwyzn2PuswW2gPCYEL/nEAiSVpdOj1lXw== + dependencies: + call-bind "^1.0.2" + get-intrinsic "^1.2.1" + is-arrayish@^0.2.1: version "0.2.1" resolved "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz" @@ -5668,6 +6093,13 @@ is-data-descriptor@^1.0.0: dependencies: kind-of "^6.0.0" +is-data-view@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/is-data-view/-/is-data-view-1.0.1.tgz#4b4d3a511b70f3dc26d42c03ca9ca515d847759f" + integrity sha512-AHkaJrsUVW6wq6JS8y3JnM/GJF/9cf+k20+iDzlSaJrinEo5+7vRiteOSwBhHRiAyQATN1AmY4hwzxJKPmYf+w== + dependencies: + is-typed-array "^1.1.13" + is-date-object@^1.0.1: version "1.0.5" resolved "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.5.tgz" @@ -5766,6 +6198,11 @@ is-negative-zero@^2.0.2: resolved "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.2.tgz" integrity sha512-dqJvarLawXsFbNDeJW7zAz8ItJ9cd28YufuuFzh0G8pNHjJMnY08Dv7sYX2uF5UpQOwieAeOExEYAWWfu7ZZUA== +is-negative-zero@^2.0.3: + version "2.0.3" + resolved "https://registry.yarnpkg.com/is-negative-zero/-/is-negative-zero-2.0.3.tgz#ced903a027aca6381b777a5743069d7376a49747" + integrity sha512-5KoIu2Ngpyek75jXodFvnafB6DJgr3u8uuK0LEZJjrU19DrMD3EVERaR8sjz8CCGgpZvxPl9SuE1GMVPFHx1mw== + is-number-object@^1.0.4: version "1.0.7" resolved "https://registry.npmjs.org/is-number-object/-/is-number-object-1.0.7.tgz" @@ -5854,6 +6291,13 @@ is-shared-array-buffer@^1.0.2: dependencies: call-bind "^1.0.2" +is-shared-array-buffer@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/is-shared-array-buffer/-/is-shared-array-buffer-1.0.3.tgz#1237f1cba059cdb62431d378dcc37d9680181688" + integrity sha512-nA2hv5XIhLR3uVzDDfCIknerhx8XUKnstuOERPNNIinXG7v9u+ohXF67vxm4TPTEPU6lm61ZkwP3c9PCB97rhg== + dependencies: + call-bind "^1.0.7" + is-string@^1.0.5, is-string@^1.0.7: version "1.0.7" resolved "https://registry.npmjs.org/is-string/-/is-string-1.0.7.tgz" @@ -5886,6 +6330,13 @@ is-typed-array@^1.1.10, is-typed-array@^1.1.9: gopd "^1.0.1" has-tostringtag "^1.0.0" +is-typed-array@^1.1.13: + version "1.1.13" + resolved "https://registry.yarnpkg.com/is-typed-array/-/is-typed-array-1.1.13.tgz#d6c5ca56df62334959322d7d7dd1cca50debe229" + integrity sha512-uZ25/bUAlUY5fR4OKT4rZQEBrzQWYV9ZJYGGsUmEJ6thodVJ1HX64ePQ6Z0qPWP+m+Uq6e9UugrE38jeYsDSMw== + dependencies: + which-typed-array "^1.1.14" + is-typedarray@~1.0.0: version "1.0.0" resolved "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz" @@ -5913,11 +6364,16 @@ is-windows@^1.0.0, is-windows@^1.0.2: resolved "https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz" integrity sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA== -isarray@1.0.0, isarray@~1.0.0: +isarray@1.0.0, isarray@^1.0.0, isarray@~1.0.0: version "1.0.0" - resolved "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz" + resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11" integrity sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ== +isarray@^2.0.5: + version "2.0.5" + resolved "https://registry.yarnpkg.com/isarray/-/isarray-2.0.5.tgz#8af1e4c1221244cc62459faf38940d4e644a5723" + integrity sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw== + isexe@^2.0.0: version "2.0.0" resolved "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz" @@ -5935,11 +6391,24 @@ isobject@^3.0.0, isobject@^3.0.1: resolved "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz" integrity sha512-WhB9zCku7EGTj/HQQRz5aUQEUeoQZH2bWcltRErOpymJ4boYE6wL9Tbr23krRPSZ+C5zqNSrSw+Cc7sZZ4b7vg== +isomorphic-unfetch@^3.0.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/isomorphic-unfetch/-/isomorphic-unfetch-3.1.0.tgz#87341d5f4f7b63843d468438128cb087b7c3e98f" + integrity sha512-geDJjpoZ8N0kWexiwkX8F9NkTsXhetLPVbZFQ+JTW239QNOwvB0gniuR1Wc6f0AMTn7/mFGyXvHTifrCp/GH8Q== + dependencies: + node-fetch "^2.6.1" + unfetch "^4.2.0" + isstream@~0.1.2: version "0.1.2" resolved "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz" integrity sha512-Yljz7ffyPbrLpLngrMtZ7NduUgVvi6wG9RJ9IUcyCd59YQ911PBJphODUcbOVbqYfxe1wuYf/LJ8PauMRwsM/g== +js-cookie@^2.2.1: + version "2.2.1" + resolved "https://registry.yarnpkg.com/js-cookie/-/js-cookie-2.2.1.tgz#69e106dc5d5806894562902aa5baec3744e9b2b8" + integrity sha512-HvdH2LzI/EAZcUwA8+0nKNtWHqS+ZmijLA30RwZA0bo7ToCckjK5MkGhjED9KoRcXO6BaGI3I9UIzSA1FKFPOQ== + js-sdsl@^4.1.4: version "4.4.0" resolved "https://registry.npmjs.org/js-sdsl/-/js-sdsl-4.4.0.tgz" @@ -6691,9 +7160,9 @@ minimist-options@4.1.0, minimist-options@^4.0.2: is-plain-obj "^1.1.0" kind-of "^6.0.3" -minimist@^1.1.0, minimist@^1.2.0, minimist@^1.2.5, minimist@^1.2.6: +minimist@^1.1.0, minimist@^1.2.0, minimist@^1.2.5, minimist@^1.2.6, minimist@^1.2.7: version "1.2.8" - resolved "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz" + resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.8.tgz#c1a464e7693302e082a075cee0c057741ac4772c" integrity sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA== mixin-deep@^1.2.0: @@ -6894,6 +7363,13 @@ node-environment-flags@1.0.6: object.getownpropertydescriptors "^2.0.3" semver "^5.7.0" +node-fetch@^2.6.0, node-fetch@^2.6.1: + version "2.7.0" + resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.7.0.tgz#d0f0fa6e3e2dc1d27efcd8ad99d550bda94d187d" + integrity sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A== + dependencies: + whatwg-url "^5.0.0" + node-fetch@^2.6.7: version "2.6.9" resolved "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.9.tgz" @@ -6997,6 +7473,11 @@ object-inspect@^1.12.3, object-inspect@^1.9.0: resolved "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.3.tgz" integrity sha512-geUvdk7c+eizMNUDkRpW1wJwgfOiOeHbxBR/hLXK1aT6zmVSO0jsQcs7fj6MGw89jC/cjGfLcNOrtMYtGqm81g== +object-inspect@^1.13.1: + version "1.13.2" + resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.13.2.tgz#dea0088467fb991e67af4058147a24824a3043ff" + integrity sha512-IRZSRuzJiynemAXPYtPe5BoI/RESNYR7TYm50MC5Mqbd3Jmw5y790sErYw3V6SryFJD64b74qQQs9wn5Bg/k3g== + object-keys@^1.0.11, object-keys@^1.1.1: version "1.1.1" resolved "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz" @@ -7029,6 +7510,16 @@ object.assign@^4.1.4: has-symbols "^1.0.3" object-keys "^1.1.1" +object.assign@^4.1.5: + version "4.1.5" + resolved "https://registry.yarnpkg.com/object.assign/-/object.assign-4.1.5.tgz#3a833f9ab7fdb80fc9e8d2300c803d216d8fdbb0" + integrity sha512-byy+U7gp+FVwmyzKPYhW2h5l3crpmGsxl7X2s8y43IgxvG4g3QZ6CffDtsNQy1WsmZpQbO+ybo0AlW7TY6DcBQ== + dependencies: + call-bind "^1.0.5" + define-properties "^1.2.1" + has-symbols "^1.0.3" + object-keys "^1.1.1" + object.getownpropertydescriptors@^2.0.3: version "2.1.5" resolved "https://registry.npmjs.org/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.1.5.tgz" @@ -7361,6 +7852,11 @@ posix-character-classes@^0.1.0: resolved "https://registry.npmjs.org/posix-character-classes/-/posix-character-classes-0.1.1.tgz" integrity sha512-xTgYBc3fuo7Yt7JbiuFxSYGToMoz8fLoE6TC9Wx1P/u+LfeThMOAqmuyECnlBaaJb+u1m9hHiXUEtwW4OzfUJg== +possible-typed-array-names@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/possible-typed-array-names/-/possible-typed-array-names-1.0.0.tgz#89bb63c6fada2c3e90adc4a647beeeb39cc7bf8f" + integrity sha512-d7Uw+eZoloe0EHDIYoe+bQ5WXnGMOpmiZFTuMWCwpjzzkL2nTjcKiAk4hh8TjnGye2TwWOk3UXucZ+3rbmBa8Q== + preferred-pm@^3.0.0: version "3.0.3" resolved "https://registry.npmjs.org/preferred-pm/-/preferred-pm-3.0.3.tgz" @@ -7410,6 +7906,15 @@ promise@^8.0.0: dependencies: asap "~2.0.6" +proper-lockfile@^4.1.1: + version "4.1.2" + resolved "https://registry.yarnpkg.com/proper-lockfile/-/proper-lockfile-4.1.2.tgz#c8b9de2af6b2f1601067f98e01ac66baa223141f" + integrity sha512-TjNPblN4BwAWMXU8s9AEz4JmQxnD1NNL7bNOY/AKUzyamc379FWASUhc/K1pL2noVb+XmZKLL68cjzLsiOAMaA== + dependencies: + graceful-fs "^4.2.4" + retry "^0.12.0" + signal-exit "^3.0.2" + proto-list@~1.2.1: version "1.2.4" resolved "https://registry.npmjs.org/proto-list/-/proto-list-1.2.4.tgz" @@ -7675,6 +8180,16 @@ regexp.prototype.flags@^1.4.3: define-properties "^1.1.3" functions-have-names "^1.2.2" +regexp.prototype.flags@^1.5.2: + version "1.5.2" + resolved "https://registry.yarnpkg.com/regexp.prototype.flags/-/regexp.prototype.flags-1.5.2.tgz#138f644a3350f981a858c44f6bb1a61ff59be334" + integrity sha512-NcDiDkTLuPR+++OCKB0nWafEmhg/Da8aUPLPMQbK+bxKKCm1/S5he+AqYa4PlMCVBalb4/yxIRub6qkEx5yJbw== + dependencies: + call-bind "^1.0.6" + define-properties "^1.2.1" + es-errors "^1.3.0" + set-function-name "^2.0.1" + regexpp@^3.0.0: version "3.2.0" resolved "https://registry.npmjs.org/regexpp/-/regexpp-3.2.0.tgz" @@ -7860,6 +8375,16 @@ ret@~0.1.10: resolved "https://registry.npmjs.org/ret/-/ret-0.1.15.tgz" integrity sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg== +retry@0.13.1: + version "0.13.1" + resolved "https://registry.yarnpkg.com/retry/-/retry-0.13.1.tgz#185b1587acf67919d63b357349e03537b2484658" + integrity sha512-XQBQ3I8W1Cge0Seh+6gjj03LbmRFWuoszgK9ooCpwYIrhhoO80pfq4cUkU5DkknwfOfFteRwlZ56PYOGYyFWdg== + +retry@^0.12.0: + version "0.12.0" + resolved "https://registry.yarnpkg.com/retry/-/retry-0.12.0.tgz#1b42a6266a21f07421d1b0b54b7dc167b01c013b" + integrity sha512-9LkiTwjUh6rT555DtE9rTX+BKByPfrMzEAtnlEtdEwr3Nkffwiihqe2bWADg+OQRjt9gl6ICdmB/ZFDCGAtSow== + reusify@^1.0.4: version "1.0.4" resolved "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz" @@ -7932,6 +8457,16 @@ rxjs@^7.2.0, rxjs@^7.5.5: dependencies: tslib "^2.1.0" +safe-array-concat@^1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/safe-array-concat/-/safe-array-concat-1.1.2.tgz#81d77ee0c4e8b863635227c721278dd524c20edb" + integrity sha512-vj6RsCsWBCf19jIeHEfkRMw8DPiBb+DMXklQ/1SGDHOMlHdPUkZXFQ2YdplS23zESTijAcurb1aSgJA3AgMu1Q== + dependencies: + call-bind "^1.0.7" + get-intrinsic "^1.2.4" + has-symbols "^1.0.3" + isarray "^2.0.5" + safe-buffer@^5.0.1, safe-buffer@^5.1.0, safe-buffer@^5.1.1, safe-buffer@^5.1.2, safe-buffer@^5.2.0, safe-buffer@~5.2.0: version "5.2.1" resolved "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz" @@ -7951,6 +8486,15 @@ safe-regex-test@^1.0.0: get-intrinsic "^1.1.3" is-regex "^1.1.4" +safe-regex-test@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/safe-regex-test/-/safe-regex-test-1.0.3.tgz#a5b4c0f06e0ab50ea2c395c14d8371232924c377" + integrity sha512-CdASjNJPvRa7roO6Ra/gLYBTzYzzPyyBXxIMdGW3USQLyjWEls2RgW5UBTXaQVp+OrpeCK3bLem8smtmheoRuw== + dependencies: + call-bind "^1.0.6" + es-errors "^1.3.0" + is-regex "^1.1.4" + safe-regex@^1.1.0: version "1.1.0" resolved "https://registry.npmjs.org/safe-regex/-/safe-regex-1.1.0.tgz" @@ -8060,6 +8604,28 @@ set-blocking@^2.0.0: resolved "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz" integrity sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw== +set-function-length@^1.2.1: + version "1.2.2" + resolved "https://registry.yarnpkg.com/set-function-length/-/set-function-length-1.2.2.tgz#aac72314198eaed975cf77b2c3b6b880695e5449" + integrity sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg== + dependencies: + define-data-property "^1.1.4" + es-errors "^1.3.0" + function-bind "^1.1.2" + get-intrinsic "^1.2.4" + gopd "^1.0.1" + has-property-descriptors "^1.0.2" + +set-function-name@^2.0.1: + version "2.0.2" + resolved "https://registry.yarnpkg.com/set-function-name/-/set-function-name-2.0.2.tgz#16a705c5a0dc2f5e638ca96d8a8cd4e1c2b90985" + integrity sha512-7PGFlmtwsEADb0WYyvCMa1t+yke6daIG4Wirafur5kcf+MhUnPms1UeR0CKQdTZD81yESwMHbtn+TR+dMviakQ== + dependencies: + define-data-property "^1.1.4" + es-errors "^1.3.0" + functions-have-names "^1.2.3" + has-property-descriptors "^1.0.2" + set-value@^2.0.0, set-value@^2.0.1: version "2.0.1" resolved "https://registry.npmjs.org/set-value/-/set-value-2.0.1.tgz" @@ -8268,6 +8834,13 @@ solhint@^5.0.1: optionalDependencies: prettier "^2.8.3" +solidity-ast@^0.4.51: + version "0.4.56" + resolved "https://registry.yarnpkg.com/solidity-ast/-/solidity-ast-0.4.56.tgz#94fe296f12e8de1a3bed319bc06db8d05a113d7a" + integrity sha512-HgmsA/Gfklm/M8GFbCX/J1qkVH0spXHgALCNZ8fA8x5X+MFdn/8CP2gr5OVyXjXw6RZTPC/Sxl2RUDQOXyNMeA== + dependencies: + array.prototype.findlast "^1.2.2" + solidity-coverage@^0.8.12: version "0.8.12" resolved "https://registry.yarnpkg.com/solidity-coverage/-/solidity-coverage-0.8.12.tgz#c4fa2f64eff8ada7a1387b235d6b5b0e6c6985ed" @@ -8472,6 +9045,16 @@ string.prototype.trim@^1.2.7: define-properties "^1.1.4" es-abstract "^1.20.4" +string.prototype.trim@^1.2.9: + version "1.2.9" + resolved "https://registry.yarnpkg.com/string.prototype.trim/-/string.prototype.trim-1.2.9.tgz#b6fa326d72d2c78b6df02f7759c73f8f6274faa4" + integrity sha512-klHuCNxiMZ8MlsOihJhJEBJAiMVqU3Z2nEXWfWnIqjN0gEFS9J9+IxKozWWtQGcgoa1WUZzLjKPTr4ZHNFTFxw== + dependencies: + call-bind "^1.0.7" + define-properties "^1.2.1" + es-abstract "^1.23.0" + es-object-atoms "^1.0.0" + string.prototype.trimend@^1.0.6: version "1.0.6" resolved "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.6.tgz" @@ -8481,6 +9064,15 @@ string.prototype.trimend@^1.0.6: define-properties "^1.1.4" es-abstract "^1.20.4" +string.prototype.trimend@^1.0.8: + version "1.0.8" + resolved "https://registry.yarnpkg.com/string.prototype.trimend/-/string.prototype.trimend-1.0.8.tgz#3651b8513719e8a9f48de7f2f77640b26652b229" + integrity sha512-p73uL5VCHCO2BZZ6krwwQE3kCzM7NKmis8S//xEC6fQonchbum4eP6kR4DLEjQFO3Wnj3Fuo8NM0kOSjVdHjZQ== + dependencies: + call-bind "^1.0.7" + define-properties "^1.2.1" + es-object-atoms "^1.0.0" + string.prototype.trimstart@^1.0.6: version "1.0.6" resolved "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.6.tgz" @@ -8490,6 +9082,15 @@ string.prototype.trimstart@^1.0.6: define-properties "^1.1.4" es-abstract "^1.20.4" +string.prototype.trimstart@^1.0.8: + version "1.0.8" + resolved "https://registry.yarnpkg.com/string.prototype.trimstart/-/string.prototype.trimstart-1.0.8.tgz#7ee834dda8c7c17eff3118472bb35bfedaa34dde" + integrity sha512-UXSH262CSZY1tfu3G3Secr6uGLCFVPMhIqHjlgCUtCCcgihYc/xKs9djMTMUOb2j1mVSeU8EU6NWc/iQKU6Gfg== + dependencies: + call-bind "^1.0.7" + define-properties "^1.2.1" + es-object-atoms "^1.0.0" + string_decoder@^1.1.1: version "1.3.0" resolved "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz" @@ -8812,9 +9413,9 @@ tsconfig-paths@^3.14.1, tsconfig-paths@^3.5.0: minimist "^1.2.6" strip-bom "^3.0.0" -tslib@^1.8.1, tslib@^1.9.3: +tslib@^1.11.1, tslib@^1.8.1, tslib@^1.9.3: version "1.14.1" - resolved "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz" + resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00" integrity sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg== tslib@^2.1.0: @@ -8822,6 +9423,11 @@ tslib@^2.1.0: resolved "https://registry.npmjs.org/tslib/-/tslib-2.5.0.tgz" integrity sha512-336iVw3rtn2BUK7ORdIAHTyxHGRIHVReokCR3XjbckJMK7ms8FysBfhLR8IXnAgy7T0PTPNBWKiH514FOW/WSg== +tslib@^2.3.1, tslib@^2.6.2: + version "2.6.3" + resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.6.3.tgz#0438f810ad7a9edcde7a241c3d80db693c8cbfe0" + integrity sha512-xNvxJEOUiWPGhUuUdQgAJPKOOJfGnIyKySOc09XkKsgdUV/3E2zvwZYdejjmRgPCgcym1juLH3226yA7sEFJKQ== + tsort@0.0.1: version "0.0.1" resolved "https://registry.npmjs.org/tsort/-/tsort-0.0.1.tgz" @@ -8939,6 +9545,38 @@ typechain@^8.0.0, typechain@^8.1.0: ts-command-line-args "^2.2.0" ts-essentials "^7.0.1" +typed-array-buffer@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/typed-array-buffer/-/typed-array-buffer-1.0.2.tgz#1867c5d83b20fcb5ccf32649e5e2fc7424474ff3" + integrity sha512-gEymJYKZtKXzzBzM4jqa9w6Q1Jjm7x2d+sh19AdsD4wqnMPDYyvwpsIc2Q/835kHuo3BEQ7CjelGhfTsoBb2MQ== + dependencies: + call-bind "^1.0.7" + es-errors "^1.3.0" + is-typed-array "^1.1.13" + +typed-array-byte-length@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/typed-array-byte-length/-/typed-array-byte-length-1.0.1.tgz#d92972d3cff99a3fa2e765a28fcdc0f1d89dec67" + integrity sha512-3iMJ9q0ao7WE9tWcaYKIptkNBuOIcZCCT0d4MRvuuH88fEoEH62IuQe0OtraD3ebQEoTRk8XCBoknUNc1Y67pw== + dependencies: + call-bind "^1.0.7" + for-each "^0.3.3" + gopd "^1.0.1" + has-proto "^1.0.3" + is-typed-array "^1.1.13" + +typed-array-byte-offset@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/typed-array-byte-offset/-/typed-array-byte-offset-1.0.2.tgz#f9ec1acb9259f395093e4567eb3c28a580d02063" + integrity sha512-Ous0vodHa56FviZucS2E63zkgtgrACj7omjwd/8lTEMEPFFyjfixMZ1ZXenpgCFBBt4EC1J2XsyVS2gkG0eTFA== + dependencies: + available-typed-arrays "^1.0.7" + call-bind "^1.0.7" + for-each "^0.3.3" + gopd "^1.0.1" + has-proto "^1.0.3" + is-typed-array "^1.1.13" + typed-array-length@^1.0.4: version "1.0.4" resolved "https://registry.npmjs.org/typed-array-length/-/typed-array-length-1.0.4.tgz" @@ -8948,6 +9586,18 @@ typed-array-length@^1.0.4: for-each "^0.3.3" is-typed-array "^1.1.9" +typed-array-length@^1.0.6: + version "1.0.6" + resolved "https://registry.yarnpkg.com/typed-array-length/-/typed-array-length-1.0.6.tgz#57155207c76e64a3457482dfdc1c9d1d3c4c73a3" + integrity sha512-/OxDN6OtAk5KBpGb28T+HZc2M+ADtvRxXrKKbUwtsLgdoxgX13hyy7ek6bFRl5+aBs2yZzB0c4CnQfAtVypW/g== + dependencies: + call-bind "^1.0.7" + for-each "^0.3.3" + gopd "^1.0.1" + has-proto "^1.0.3" + is-typed-array "^1.1.13" + possible-typed-array-names "^1.0.0" + typedarray@^0.0.6: version "0.0.6" resolved "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz" @@ -8990,6 +9640,11 @@ undici@^5.14.0: dependencies: busboy "^1.6.0" +unfetch@^4.2.0: + version "4.2.0" + resolved "https://registry.yarnpkg.com/unfetch/-/unfetch-4.2.0.tgz#7e21b0ef7d363d8d9af0fb929a5555f6ef97a3be" + integrity sha512-F9p7yYCn6cIW9El1zi0HI6vqpeIvBsr3dSuRO6Xuppb1u5rXpCPmMvLSyECLhybr9isec8Ohl0hPekMVrEinDA== + union-value@^1.0.0: version "1.0.1" resolved "https://registry.npmjs.org/union-value/-/union-value-1.0.1.tgz" @@ -9000,6 +9655,15 @@ union-value@^1.0.0: is-extendable "^0.1.1" set-value "^2.0.1" +uniswap-v2-deploy-plugin@^0.0.4: + version "0.0.4" + resolved "https://registry.yarnpkg.com/uniswap-v2-deploy-plugin/-/uniswap-v2-deploy-plugin-0.0.4.tgz#9eeb1e48ecd3f02b195210fd1eebbe624ee87ad9" + integrity sha512-4+1tfxul77SedONq1hwQixF2vwH/zy9KLj9XcA3QYPN5SUcp5ZgGYZFxPAmZJOEDAAWBz2oHJT26oLjbyuZrVg== + dependencies: + "@openzeppelin/contracts" "^4.3.2" + "@uniswap/v2-core" "^1.0.1" + "@uniswap/v2-periphery" "1.1.0-beta.0" + universalify@^0.1.0: version "0.1.2" resolved "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz" @@ -9165,6 +9829,17 @@ which-pm@2.0.0: load-yaml-file "^0.2.0" path-exists "^4.0.0" +which-typed-array@^1.1.14, which-typed-array@^1.1.15: + version "1.1.15" + resolved "https://registry.yarnpkg.com/which-typed-array/-/which-typed-array-1.1.15.tgz#264859e9b11a649b388bfaaf4f767df1f779b38d" + integrity sha512-oV0jmFtUky6CXfkqehVvBP/LSWJ2sy4vWMioiENyJLePrBO/yKyV9OyJySfAKosh+RYkIl5zJCNZ8/4JncrpdA== + dependencies: + available-typed-arrays "^1.0.7" + call-bind "^1.0.7" + for-each "^0.3.3" + gopd "^1.0.1" + has-tostringtag "^1.0.2" + which-typed-array@^1.1.9: version "1.1.9" resolved "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.9.tgz"