diff --git a/.env.example b/.env.example deleted file mode 100644 index 5135833ea..000000000 --- a/.env.example +++ /dev/null @@ -1,2 +0,0 @@ -user_private_key= -user_address= \ No newline at end of file diff --git a/.env.testnet b/.env.testnet deleted file mode 100644 index dfcdcc6cb..000000000 --- a/.env.testnet +++ /dev/null @@ -1,22 +0,0 @@ -# Subnet A (Dispatch) -subnet_a_rpc_url=https://subnets.avax.network/dispatch/testnet/rpc -subnet_a_subnet_id=7WtoAMPhrmh5KosDUsFL9yTcvw7YSxiKHPpdfs4JsgW47oZT5 -subnet_a_blockchain_id=2D8RG4UpSXbPbvPCAWppNJyqTG2i2CAXSkTgmTBBvs7GKNZjsY -subnet_a_teleporter_registry_address=0xf86cb19ad8405aefa7d09c778215d2cb6ebfb228 - -# Subnet B (Echo) -subnet_b_rpc_url=https://subnets.avax.network/echo/testnet/rpc -subnet_b_subnet_id=i9gFpZQHPLcGfZaQLiwFAStddQD7iTKBpFfurPFJsXm1CkTZK -subnet_b_blockchain_id=98qnjenm7MBd8G2cPZoRvZrgJC33JGSAAKghsQ6eojbLCeRNp -subnet_b_teleporter_registry_address=0xf86cb19ad8405aefa7d09c778215d2cb6ebfb228 - -# C-Chain -c_chain_rpc_url=https://api.avax-test.network/ext/bc/C/rpc -c_chain_subnet_id=11111111111111111111111111111111LpoYY -c_chain_blockchain_id=yH8D7ThNJkxmtkuv2jgBa4P1Rn3Qpr4pPr7QYNfcdoS6k6HWp -c_chain_teleporter_registry_address=0xf86cb19ad8405aefa7d09c778215d2cb6ebfb228 - -# Teleporter Contract -teleporter_contract_address=0x253b2784c75e510dD0fF1da844684a1aC0aa5fcf -warp_messenger_precompile_addr=0x0200000000000000000000000000000000000005 - diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index b9a206780..a46408e01 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -42,7 +42,7 @@ jobs: - name: Setup Go uses: actions/setup-go@v5 with: - go-version-file: 'go.mod' + go-version-file: "go.mod" - name: Run Go unit tests run: | @@ -61,7 +61,7 @@ jobs: - name: Setup Go uses: actions/setup-go@v5 with: - go-version-file: 'go.mod' + go-version-file: "go.mod" - name: Install Foundry run: ./scripts/install_foundry.sh @@ -71,7 +71,7 @@ jobs: run: | export PATH=$PATH:$HOME/.foundry/bin export PATH="$PATH:$GOPATH/bin" - ./scripts/local/e2e_test.sh --components teleporter + ./scripts/e2e_test.sh --components teleporter governance_e2e: name: governance-e2e-tests @@ -95,7 +95,7 @@ jobs: run: | export PATH=$PATH:$HOME/.foundry/bin export PATH="$PATH:$GOPATH/bin" - ./scripts/local/e2e_test.sh --components governance + ./scripts/e2e_test.sh --components governance validator_manager_e2e: name: validator-manager-e2e-tests @@ -119,4 +119,28 @@ jobs: run: | export PATH=$PATH:$HOME/.foundry/bin export PATH="$PATH:$GOPATH/bin" - ./scripts/local/e2e_test.sh --components validator-manager + ./scripts/e2e_test.sh --components validator-manager + + ictt_e2e: + name: ictt-e2e-tests + runs-on: ubuntu-22.04 + steps: + - name: Checkout repositories and submodules + uses: actions/checkout@v4 + with: + submodules: recursive + + - name: Setup Go + uses: actions/setup-go@v5 + with: + go-version-file: 'go.mod' + + - name: Install Foundry + run: ./scripts/install_foundry.sh + + - name: Run E2E Tests + # Forge installs to BASE_DIR, but updates the PATH definition in $HOME/.bashrc + run: | + export PATH=$PATH:$HOME/.foundry/bin + export PATH="$PATH:$GOPATH/bin" + ./scripts/e2e_test.sh --components ictt diff --git a/.gitignore b/.gitignore index babc5dac1..189e54cea 100644 --- a/.gitignore +++ b/.gitignore @@ -34,9 +34,6 @@ contracts/pkg docker-compose-test-local.yml docker-compose-run-local.yml -# Environment and configuration values -.env - # Ginkgo main.log server.log diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 194294ad1..d9f4c8306 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -36,7 +36,7 @@ To start developing on Teleporter, you'll need Solidity >= v0.8.25. [Foundry](ht - Run the end-to-end tests ```sh -./scripts/local/e2e_test.sh +./scripts/e2e_test.sh ``` - Run the Solidity and Golang linters diff --git a/README.md b/README.md index 6ce84efb9..6ee349a1b 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,6 @@ To get started with using Teleporter, see [How to Deploy Teleporter Enabled Subn - [Structure](#structure) - [E2E tests](#e2e-tests) - [Run specific E2E tests](#run-specific-e2e-tests) - - [Run the E2E tests on another network](#run-the-e2e-tests-on-another-network) - [Upgradability](#upgradability) - [Deploy Teleporter to a Subnet](#deploy-teleporter-to-a-subnet) - [Deploy TeleporterRegistry to a Subnet](#deploy-teleporterregistry-to-a-subnet) @@ -67,7 +66,7 @@ Release versions follow the [semver](https://semver.org/) convention of incompat - `scripts/` includes bash scripts for interacting with Teleporter in various environments, as well as utility scripts. - `abi_bindings.sh` generates ABI bindings for the contracts in `contracts/` and outputs them to `abi-bindings/`. - `lint.sh` performs Solidity and Golang linting. - - `scripts/local/` includes scripts for running Teleporter in Docker. + - `scripts/` includes scripts for running Teleporter in Docker. - `docker/` includes configurations for a local, containerized setup of Teleporter. ## E2E tests @@ -79,7 +78,7 @@ To run the E2E tests locally, you'll need to install Gingko following the instru Then run the following command from the root of the repository: ```bash -./scripts/local/e2e_test.sh +./scripts/e2e_test.sh ``` ### Run specific E2E tests @@ -87,13 +86,13 @@ Then run the following command from the root of the repository: To run a specific E2E test, specify the environment variable `GINKGO_FOCUS`, which will then look for test descriptions that match the provided input. For example, to run the `Calculate Teleporter message IDs` test: ```bash -GINKGO_FOCUS="Calculate Teleporter message IDs" ./scripts/local/e2e_test.sh +GINKGO_FOCUS="Calculate Teleporter message IDs" ./scripts/e2e_test.sh ``` A substring of the full test description can be used as well: ```bash -GINKGO_FOCUS="Calculate Teleporter" ./scripts/local/e2e_test.sh +GINKGO_FOCUS="Calculate Teleporter" ./scripts/e2e_test.sh ``` The E2E tests also supports `GINKGO_LABEL_FILTER`, making it easy to group test cases and run them together. For example, to run all E2E tests for the example cross chain applications: @@ -107,20 +106,9 @@ The E2E tests also supports `GINKGO_LABEL_FILTER`, making it easy to group test ``` ```bash -GINKGO_LABEL_FILTER="cross chain apps" ./scripts/local/e2e_test.sh +GINKGO_LABEL_FILTER="cross chain apps" ./scripts/e2e_test.sh ``` -### Run the E2E tests on another network - -The same E2E test flows can be executed against external network by setting the proper environment variables in `.env.testnet` and `.env`, and running the following commands: - -```bash -cp .env.example .env # Set proper values after copying. -./scripts/testnet/run_testnet_e2e_flows.sh -``` - -The user wallet set in `.env` must have native tokens for each of the Subnets used in order for the test flows to be able to send transactions on those networks. The [Avalanche Testnet Faucet](https://core.app/tools/testnet-faucet) can be used to obtain native tokens for certain public testnet Subnets. - ## Upgradability The Teleporter contract is non-upgradeable and can not be changed once it is deployed. This provides immutability to the contracts, and ensures that the contract's behavior at each address is unchanging. However, to allow for new features and potential bug fixes, new versions of the Teleporter contract can be deployed to different addresses. The [TeleporterRegistry](./contracts/teleporter/TeleporterRegistry.sol) is used to keep track of the deployed versions of Teleporter, and to provide a standard interface for dApps to interact with the different Teleporter versions. diff --git a/abi-bindings/go/ProxyAdmin/ProxyAdmin.go b/abi-bindings/go/ProxyAdmin/ProxyAdmin.go index 97af9cc14..3709781cf 100644 --- a/abi-bindings/go/ProxyAdmin/ProxyAdmin.go +++ b/abi-bindings/go/ProxyAdmin/ProxyAdmin.go @@ -32,7 +32,7 @@ var ( // ProxyAdminMetaData contains all meta data concerning the ProxyAdmin contract. var ProxyAdminMetaData = &bind.MetaData{ ABI: "[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"initialOwner\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"OwnableInvalidOwner\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"OwnableUnauthorizedAccount\",\"type\":\"error\"},{\"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\":\"UPGRADE_INTERFACE_VERSION\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"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\"},{\"inputs\":[{\"internalType\":\"contractITransparentUpgradeableProxy\",\"name\":\"proxy\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"implementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"upgradeAndCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"}]", - Bin: "0x608060405234801561000f575f80fd5b506040516104fc3803806104fc83398101604081905261002e916100bb565b806001600160a01b03811661005c57604051631e4fbdf760e01b81525f600482015260240160405180910390fd5b6100658161006c565b50506100e8565b5f80546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b5f602082840312156100cb575f80fd5b81516001600160a01b03811681146100e1575f80fd5b9392505050565b610407806100f55f395ff3fe608060405260043610610049575f3560e01c8063715018a61461004d5780638da5cb5b146100635780639623609d1461008e578063ad3cb1cc146100a1578063f2fde38b146100de575b5f80fd5b348015610058575f80fd5b506100616100fd565b005b34801561006e575f80fd5b505f546040516001600160a01b0390911681526020015b60405180910390f35b61006161009c366004610260565b610110565b3480156100ac575f80fd5b506100d1604051806040016040528060058152602001640352e302e360dc1b81525081565b6040516100859190610372565b3480156100e9575f80fd5b506100616100f836600461038b565b61017b565b6101056101bd565b61010e5f6101e9565b565b6101186101bd565b60405163278f794360e11b81526001600160a01b03841690634f1ef28690349061014890869086906004016103a6565b5f604051808303818588803b15801561015f575f80fd5b505af1158015610171573d5f803e3d5ffd5b5050505050505050565b6101836101bd565b6001600160a01b0381166101b157604051631e4fbdf760e01b81525f60048201526024015b60405180910390fd5b6101ba816101e9565b50565b5f546001600160a01b0316331461010e5760405163118cdaa760e01b81523360048201526024016101a8565b5f80546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6001600160a01b03811681146101ba575f80fd5b634e487b7160e01b5f52604160045260245ffd5b5f805f60608486031215610272575f80fd5b833561027d81610238565b9250602084013561028d81610238565b9150604084013567ffffffffffffffff808211156102a9575f80fd5b818601915086601f8301126102bc575f80fd5b8135818111156102ce576102ce61024c565b604051601f8201601f19908116603f011681019083821181831017156102f6576102f661024c565b8160405282815289602084870101111561030e575f80fd5b826020860160208301375f6020848301015280955050505050509250925092565b5f81518084525f5b8181101561035357602081850181015186830182015201610337565b505f602082860101526020601f19601f83011685010191505092915050565b602081525f610384602083018461032f565b9392505050565b5f6020828403121561039b575f80fd5b813561038481610238565b6001600160a01b03831681526040602082018190525f906103c99083018461032f565b94935050505056fea2646970667358221220fea62b74dfd4f98bcc69d84445b5612e608ed96dbfab472cf9b9af0c45894ae364736f6c63430008190033", + Bin: "0x608060405234801561000f575f80fd5b506040516104fc3803806104fc83398101604081905261002e916100bb565b806001600160a01b03811661005c57604051631e4fbdf760e01b81525f600482015260240160405180910390fd5b6100658161006c565b50506100e8565b5f80546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b5f602082840312156100cb575f80fd5b81516001600160a01b03811681146100e1575f80fd5b9392505050565b610407806100f55f395ff3fe608060405260043610610049575f3560e01c8063715018a61461004d5780638da5cb5b146100635780639623609d1461008e578063ad3cb1cc146100a1578063f2fde38b146100de575b5f80fd5b348015610058575f80fd5b506100616100fd565b005b34801561006e575f80fd5b505f546040516001600160a01b0390911681526020015b60405180910390f35b61006161009c366004610260565b610110565b3480156100ac575f80fd5b506100d1604051806040016040528060058152602001640352e302e360dc1b81525081565b6040516100859190610372565b3480156100e9575f80fd5b506100616100f836600461038b565b61017b565b6101056101bd565b61010e5f6101e9565b565b6101186101bd565b60405163278f794360e11b81526001600160a01b03841690634f1ef28690349061014890869086906004016103a6565b5f604051808303818588803b15801561015f575f80fd5b505af1158015610171573d5f803e3d5ffd5b5050505050505050565b6101836101bd565b6001600160a01b0381166101b157604051631e4fbdf760e01b81525f60048201526024015b60405180910390fd5b6101ba816101e9565b50565b5f546001600160a01b0316331461010e5760405163118cdaa760e01b81523360048201526024016101a8565b5f80546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6001600160a01b03811681146101ba575f80fd5b634e487b7160e01b5f52604160045260245ffd5b5f805f60608486031215610272575f80fd5b833561027d81610238565b9250602084013561028d81610238565b9150604084013567ffffffffffffffff808211156102a9575f80fd5b818601915086601f8301126102bc575f80fd5b8135818111156102ce576102ce61024c565b604051601f8201601f19908116603f011681019083821181831017156102f6576102f661024c565b8160405282815289602084870101111561030e575f80fd5b826020860160208301375f6020848301015280955050505050509250925092565b5f81518084525f5b8181101561035357602081850181015186830182015201610337565b505f602082860101526020601f19601f83011685010191505092915050565b602081525f610384602083018461032f565b9392505050565b5f6020828403121561039b575f80fd5b813561038481610238565b6001600160a01b03831681526040602082018190525f906103c99083018461032f565b94935050505056fea2646970667358221220d59a4e8733dc17249b11e0c0a7cde5355ac9476021592bb25155b31d6330456e64736f6c63430008190033", } // ProxyAdminABI is the input ABI used to generate the binding from. diff --git a/abi-bindings/go/TransparentUpgradeableProxy/TransparentUpgradeableProxy.go b/abi-bindings/go/TransparentUpgradeableProxy/TransparentUpgradeableProxy.go index cb0ec7800..d5f60915f 100644 --- a/abi-bindings/go/TransparentUpgradeableProxy/TransparentUpgradeableProxy.go +++ b/abi-bindings/go/TransparentUpgradeableProxy/TransparentUpgradeableProxy.go @@ -32,7 +32,7 @@ var ( // TransparentUpgradeableProxyMetaData contains all meta data concerning the TransparentUpgradeableProxy contract. var TransparentUpgradeableProxyMetaData = &bind.MetaData{ ABI: "[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_logic\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"initialOwner\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"stateMutability\":\"payable\",\"type\":\"constructor\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"target\",\"type\":\"address\"}],\"name\":\"AddressEmptyCode\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"admin\",\"type\":\"address\"}],\"name\":\"ERC1967InvalidAdmin\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"implementation\",\"type\":\"address\"}],\"name\":\"ERC1967InvalidImplementation\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ERC1967NonPayable\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"FailedInnerCall\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ProxyDeniedAdminAccess\",\"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\":\"implementation\",\"type\":\"address\"}],\"name\":\"Upgraded\",\"type\":\"event\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"}]", - Bin: "0x60a0604052604051610e0d380380610e0d8339810160408190526100229161038c565b828161002e828261008c565b50508160405161003d9061032e565b6001600160a01b039091168152602001604051809103905ff080158015610066573d5f803e3d5ffd5b506001600160a01b031660805261008461007f60805190565b6100ea565b505050610471565b61009582610157565b6040516001600160a01b038316907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b905f90a28051156100de576100d982826101d5565b505050565b6100e6610248565b5050565b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f6101295f80516020610ded833981519152546001600160a01b031690565b604080516001600160a01b03928316815291841660208301520160405180910390a161015481610269565b50565b806001600160a01b03163b5f0361019157604051634c9c8ce360e01b81526001600160a01b03821660048201526024015b60405180910390fd5b807f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5b80546001600160a01b0319166001600160a01b039290921691909117905550565b60605f80846001600160a01b0316846040516101f19190610456565b5f60405180830381855af49150503d805f8114610229576040519150601f19603f3d011682016040523d82523d5f602084013e61022e565b606091505b50909250905061023f8583836102a6565b95945050505050565b34156102675760405163b398979f60e01b815260040160405180910390fd5b565b6001600160a01b03811661029257604051633173bdd160e11b81525f6004820152602401610188565b805f80516020610ded8339815191526101b4565b6060826102bb576102b682610305565b6102fe565b81511580156102d257506001600160a01b0384163b155b156102fb57604051639996b31560e01b81526001600160a01b0385166004820152602401610188565b50805b9392505050565b8051156103155780518082602001fd5b604051630a12f52160e11b815260040160405180910390fd5b6104fc806108f183390190565b80516001600160a01b0381168114610351575f80fd5b919050565b634e487b7160e01b5f52604160045260245ffd5b5f5b8381101561038457818101518382015260200161036c565b50505f910152565b5f805f6060848603121561039e575f80fd5b6103a78461033b565b92506103b56020850161033b565b60408501519092506001600160401b03808211156103d1575f80fd5b818601915086601f8301126103e4575f80fd5b8151818111156103f6576103f6610356565b604051601f8201601f19908116603f0116810190838211818310171561041e5761041e610356565b81604052828152896020848701011115610436575f80fd5b61044783602083016020880161036a565b80955050505050509250925092565b5f825161046781846020870161036a565b9190910192915050565b6080516104696104885f395f601001526104695ff3fe608060405261000c61000e565b005b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316330361007a575f356001600160e01b03191663278f794360e11b14610070576040516334ad5dbb60e21b815260040160405180910390fd5b610078610082565b565b6100786100b0565b5f806100913660048184610303565b81019061009e919061033e565b915091506100ac82826100c0565b5050565b6100786100bb61011a565b610151565b6100c98261016f565b6040516001600160a01b038316907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b905f90a28051156101125761010d82826101ea565b505050565b6100ac61025c565b5f61014c7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b905090565b365f80375f80365f845af43d5f803e80801561016b573d5ff35b3d5ffd5b806001600160a01b03163b5f036101a957604051634c9c8ce360e01b81526001600160a01b03821660048201526024015b60405180910390fd5b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80546001600160a01b0319166001600160a01b0392909216919091179055565b60605f80846001600160a01b0316846040516102069190610407565b5f60405180830381855af49150503d805f811461023e576040519150601f19603f3d011682016040523d82523d5f602084013e610243565b606091505b509150915061025385838361027b565b95945050505050565b34156100785760405163b398979f60e01b815260040160405180910390fd5b6060826102905761028b826102da565b6102d3565b81511580156102a757506001600160a01b0384163b155b156102d057604051639996b31560e01b81526001600160a01b03851660048201526024016101a0565b50805b9392505050565b8051156102ea5780518082602001fd5b604051630a12f52160e11b815260040160405180910390fd5b5f8085851115610311575f80fd5b8386111561031d575f80fd5b5050820193919092039150565b634e487b7160e01b5f52604160045260245ffd5b5f806040838503121561034f575f80fd5b82356001600160a01b0381168114610365575f80fd5b9150602083013567ffffffffffffffff80821115610381575f80fd5b818501915085601f830112610394575f80fd5b8135818111156103a6576103a661032a565b604051601f8201601f19908116603f011681019083821181831017156103ce576103ce61032a565b816040528281528860208487010111156103e6575f80fd5b826020860160208301375f6020848301015280955050505050509250929050565b5f82515f5b81811015610426576020818601810151858301520161040c565b505f92019182525091905056fea264697066735822122038547b7be2e8dc97a709b274eea3f2cd650f3a37e1292e546ca26aa7d84d361e64736f6c63430008190033608060405234801561000f575f80fd5b506040516104fc3803806104fc83398101604081905261002e916100bb565b806001600160a01b03811661005c57604051631e4fbdf760e01b81525f600482015260240160405180910390fd5b6100658161006c565b50506100e8565b5f80546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b5f602082840312156100cb575f80fd5b81516001600160a01b03811681146100e1575f80fd5b9392505050565b610407806100f55f395ff3fe608060405260043610610049575f3560e01c8063715018a61461004d5780638da5cb5b146100635780639623609d1461008e578063ad3cb1cc146100a1578063f2fde38b146100de575b5f80fd5b348015610058575f80fd5b506100616100fd565b005b34801561006e575f80fd5b505f546040516001600160a01b0390911681526020015b60405180910390f35b61006161009c366004610260565b610110565b3480156100ac575f80fd5b506100d1604051806040016040528060058152602001640352e302e360dc1b81525081565b6040516100859190610372565b3480156100e9575f80fd5b506100616100f836600461038b565b61017b565b6101056101bd565b61010e5f6101e9565b565b6101186101bd565b60405163278f794360e11b81526001600160a01b03841690634f1ef28690349061014890869086906004016103a6565b5f604051808303818588803b15801561015f575f80fd5b505af1158015610171573d5f803e3d5ffd5b5050505050505050565b6101836101bd565b6001600160a01b0381166101b157604051631e4fbdf760e01b81525f60048201526024015b60405180910390fd5b6101ba816101e9565b50565b5f546001600160a01b0316331461010e5760405163118cdaa760e01b81523360048201526024016101a8565b5f80546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6001600160a01b03811681146101ba575f80fd5b634e487b7160e01b5f52604160045260245ffd5b5f805f60608486031215610272575f80fd5b833561027d81610238565b9250602084013561028d81610238565b9150604084013567ffffffffffffffff808211156102a9575f80fd5b818601915086601f8301126102bc575f80fd5b8135818111156102ce576102ce61024c565b604051601f8201601f19908116603f011681019083821181831017156102f6576102f661024c565b8160405282815289602084870101111561030e575f80fd5b826020860160208301375f6020848301015280955050505050509250925092565b5f81518084525f5b8181101561035357602081850181015186830182015201610337565b505f602082860101526020601f19601f83011685010191505092915050565b602081525f610384602083018461032f565b9392505050565b5f6020828403121561039b575f80fd5b813561038481610238565b6001600160a01b03831681526040602082018190525f906103c99083018461032f565b94935050505056fea2646970667358221220fea62b74dfd4f98bcc69d84445b5612e608ed96dbfab472cf9b9af0c45894ae364736f6c63430008190033b53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103", + Bin: "0x60a0604052604051610e0d380380610e0d8339810160408190526100229161038c565b828161002e828261008c565b50508160405161003d9061032e565b6001600160a01b039091168152602001604051809103905ff080158015610066573d5f803e3d5ffd5b506001600160a01b031660805261008461007f60805190565b6100ea565b505050610471565b61009582610157565b6040516001600160a01b038316907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b905f90a28051156100de576100d982826101d5565b505050565b6100e6610248565b5050565b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f6101295f80516020610ded833981519152546001600160a01b031690565b604080516001600160a01b03928316815291841660208301520160405180910390a161015481610269565b50565b806001600160a01b03163b5f0361019157604051634c9c8ce360e01b81526001600160a01b03821660048201526024015b60405180910390fd5b807f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5b80546001600160a01b0319166001600160a01b039290921691909117905550565b60605f80846001600160a01b0316846040516101f19190610456565b5f60405180830381855af49150503d805f8114610229576040519150601f19603f3d011682016040523d82523d5f602084013e61022e565b606091505b50909250905061023f8583836102a6565b95945050505050565b34156102675760405163b398979f60e01b815260040160405180910390fd5b565b6001600160a01b03811661029257604051633173bdd160e11b81525f6004820152602401610188565b805f80516020610ded8339815191526101b4565b6060826102bb576102b682610305565b6102fe565b81511580156102d257506001600160a01b0384163b155b156102fb57604051639996b31560e01b81526001600160a01b0385166004820152602401610188565b50805b9392505050565b8051156103155780518082602001fd5b604051630a12f52160e11b815260040160405180910390fd5b6104fc806108f183390190565b80516001600160a01b0381168114610351575f80fd5b919050565b634e487b7160e01b5f52604160045260245ffd5b5f5b8381101561038457818101518382015260200161036c565b50505f910152565b5f805f6060848603121561039e575f80fd5b6103a78461033b565b92506103b56020850161033b565b60408501519092506001600160401b03808211156103d1575f80fd5b818601915086601f8301126103e4575f80fd5b8151818111156103f6576103f6610356565b604051601f8201601f19908116603f0116810190838211818310171561041e5761041e610356565b81604052828152896020848701011115610436575f80fd5b61044783602083016020880161036a565b80955050505050509250925092565b5f825161046781846020870161036a565b9190910192915050565b6080516104696104885f395f601001526104695ff3fe608060405261000c61000e565b005b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316330361007a575f356001600160e01b03191663278f794360e11b14610070576040516334ad5dbb60e21b815260040160405180910390fd5b610078610082565b565b6100786100b0565b5f806100913660048184610303565b81019061009e919061033e565b915091506100ac82826100c0565b5050565b6100786100bb61011a565b610151565b6100c98261016f565b6040516001600160a01b038316907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b905f90a28051156101125761010d82826101ea565b505050565b6100ac61025c565b5f61014c7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b905090565b365f80375f80365f845af43d5f803e80801561016b573d5ff35b3d5ffd5b806001600160a01b03163b5f036101a957604051634c9c8ce360e01b81526001600160a01b03821660048201526024015b60405180910390fd5b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80546001600160a01b0319166001600160a01b0392909216919091179055565b60605f80846001600160a01b0316846040516102069190610407565b5f60405180830381855af49150503d805f811461023e576040519150601f19603f3d011682016040523d82523d5f602084013e610243565b606091505b509150915061025385838361027b565b95945050505050565b34156100785760405163b398979f60e01b815260040160405180910390fd5b6060826102905761028b826102da565b6102d3565b81511580156102a757506001600160a01b0384163b155b156102d057604051639996b31560e01b81526001600160a01b03851660048201526024016101a0565b50805b9392505050565b8051156102ea5780518082602001fd5b604051630a12f52160e11b815260040160405180910390fd5b5f8085851115610311575f80fd5b8386111561031d575f80fd5b5050820193919092039150565b634e487b7160e01b5f52604160045260245ffd5b5f806040838503121561034f575f80fd5b82356001600160a01b0381168114610365575f80fd5b9150602083013567ffffffffffffffff80821115610381575f80fd5b818501915085601f830112610394575f80fd5b8135818111156103a6576103a661032a565b604051601f8201601f19908116603f011681019083821181831017156103ce576103ce61032a565b816040528281528860208487010111156103e6575f80fd5b826020860160208301375f6020848301015280955050505050509250929050565b5f82515f5b81811015610426576020818601810151858301520161040c565b505f92019182525091905056fea2646970667358221220625f778065ac20e59b0e4b6eed7a7975160f78a005a445285c44ed04f51527e764736f6c63430008190033608060405234801561000f575f80fd5b506040516104fc3803806104fc83398101604081905261002e916100bb565b806001600160a01b03811661005c57604051631e4fbdf760e01b81525f600482015260240160405180910390fd5b6100658161006c565b50506100e8565b5f80546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b5f602082840312156100cb575f80fd5b81516001600160a01b03811681146100e1575f80fd5b9392505050565b610407806100f55f395ff3fe608060405260043610610049575f3560e01c8063715018a61461004d5780638da5cb5b146100635780639623609d1461008e578063ad3cb1cc146100a1578063f2fde38b146100de575b5f80fd5b348015610058575f80fd5b506100616100fd565b005b34801561006e575f80fd5b505f546040516001600160a01b0390911681526020015b60405180910390f35b61006161009c366004610260565b610110565b3480156100ac575f80fd5b506100d1604051806040016040528060058152602001640352e302e360dc1b81525081565b6040516100859190610372565b3480156100e9575f80fd5b506100616100f836600461038b565b61017b565b6101056101bd565b61010e5f6101e9565b565b6101186101bd565b60405163278f794360e11b81526001600160a01b03841690634f1ef28690349061014890869086906004016103a6565b5f604051808303818588803b15801561015f575f80fd5b505af1158015610171573d5f803e3d5ffd5b5050505050505050565b6101836101bd565b6001600160a01b0381166101b157604051631e4fbdf760e01b81525f60048201526024015b60405180910390fd5b6101ba816101e9565b50565b5f546001600160a01b0316331461010e5760405163118cdaa760e01b81523360048201526024016101a8565b5f80546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6001600160a01b03811681146101ba575f80fd5b634e487b7160e01b5f52604160045260245ffd5b5f805f60608486031215610272575f80fd5b833561027d81610238565b9250602084013561028d81610238565b9150604084013567ffffffffffffffff808211156102a9575f80fd5b818601915086601f8301126102bc575f80fd5b8135818111156102ce576102ce61024c565b604051601f8201601f19908116603f011681019083821181831017156102f6576102f661024c565b8160405282815289602084870101111561030e575f80fd5b826020860160208301375f6020848301015280955050505050509250925092565b5f81518084525f5b8181101561035357602081850181015186830182015201610337565b505f602082860101526020601f19601f83011685010191505092915050565b602081525f610384602083018461032f565b9392505050565b5f6020828403121561039b575f80fd5b813561038481610238565b6001600160a01b03831681526040602082018190525f906103c99083018461032f565b94935050505056fea2646970667358221220d59a4e8733dc17249b11e0c0a7cde5355ac9476021592bb25155b31d6330456e64736f6c63430008190033b53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103", } // TransparentUpgradeableProxyABI is the input ABI used to generate the binding from. diff --git a/abi-bindings/go/governance/ValidatorSetSig/ValidatorSetSig.go b/abi-bindings/go/governance/ValidatorSetSig/ValidatorSetSig.go index baab584d0..a3dee70ed 100644 --- a/abi-bindings/go/governance/ValidatorSetSig/ValidatorSetSig.go +++ b/abi-bindings/go/governance/ValidatorSetSig/ValidatorSetSig.go @@ -42,7 +42,7 @@ type ValidatorSetSigMessage struct { // ValidatorSetSigMetaData contains all meta data concerning the ValidatorSetSig contract. var ValidatorSetSigMetaData = &bind.MetaData{ ABI: "[{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"validatorBlockchainID_\",\"type\":\"bytes32\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"ReentrancyGuardReentrantCall\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"targetContractAddress\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"nonce\",\"type\":\"uint256\"}],\"name\":\"Delivered\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"VALIDATORS_SOURCE_ADDRESS\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"WARP_MESSENGER\",\"outputs\":[{\"internalType\":\"contractIWarpMessenger\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"blockchainID\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"messageIndex\",\"type\":\"uint32\"}],\"name\":\"executeCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"targetContractAddress\",\"type\":\"address\"}],\"name\":\"nonces\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"nonce\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"targetBlockchainID\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"validatorSetSigAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"targetContractAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"nonce\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"payload\",\"type\":\"bytes\"}],\"internalType\":\"structValidatorSetSigMessage\",\"name\":\"message\",\"type\":\"tuple\"}],\"name\":\"validateMessage\",\"outputs\":[],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"validatorBlockchainID\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}]", - Bin: "0x60c060405234801561000f575f80fd5b50604051610b76380380610b7683398101604081905261002e916100b2565b60015f5560808190526040805163084279ef60e31b8152905173020000000000000000000000000000000000000591634213cf789160048083019260209291908290030181865afa158015610085573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906100a991906100b2565b60a052506100c9565b5f602082840312156100c2575f80fd5b5051919050565b60805160a051610a7e6100f85f395f818161017701526104ba01525f818161012a01526102790152610a7e5ff3fe608060405260043610610071575f3560e01c80637ecebe001161004c5780637ecebe00146100e05780638d6e579d14610119578063b771b3bc1461014c578063d127dc9b14610166575f80fd5b80630731775d1461007c5780635433da42146100ac5780637d969c34146100c1575f80fd5b3661007857005b5f80fd5b348015610087575f80fd5b5061008f5f81565b6040516001600160a01b0390911681526020015b60405180910390f35b6100bf6100ba366004610642565b610199565b005b3480156100cc575f80fd5b506100bf6100db36600461079a565b6104b6565b3480156100eb575f80fd5b5061010b6100fa366004610842565b60016020525f908152604090205481565b6040519081526020016100a3565b348015610124575f80fd5b5061010b7f000000000000000000000000000000000000000000000000000000000000000081565b348015610157575f80fd5b5061008f6005600160991b0181565b348015610171575f80fd5b5061010b7f000000000000000000000000000000000000000000000000000000000000000081565b6101a161061a565b6040516306f8253560e41b815263ffffffff821660048201525f9081906005600160991b0190636f825350906024015f60405180830381865afa1580156101ea573d5f803e3d5ffd5b505050506040513d5f823e601f3d908101601f1916820160405261021191908101906108c9565b91509150806102755760405162461bcd60e51b815260206004820152602560248201527f56616c696461746f725365745369673a20696e76616c69642077617270206d65604482015264737361676560d81b60648201526084015b60405180910390fd5b81517f0000000000000000000000000000000000000000000000000000000000000000146102f45760405162461bcd60e51b815260206004820152602660248201527f56616c696461746f725365745369673a20696e76616c696420736f75726365436044820152651a185a5b925160d21b606482015260840161026c565b60208201516001600160a01b0316156103655760405162461bcd60e51b815260206004820152602d60248201527f56616c696461746f725365745369673a206e6f6e2d7a65726f206f726967696e60448201526c53656e6465724164647265737360981b606482015260840161026c565b5f826040015180602001905181019061037e9190610969565b9050610389816104b6565b6060810151610399906001610a08565b604080830180516001600160a01b039081165f9081526001602052838120949094559051608085015160a0860151935191909216926103d791610a2d565b5f6040518083038185875af1925050503d805f8114610411576040519150601f19603f3d011682016040523d82523d5f602084013e610416565b606091505b50509050806104675760405162461bcd60e51b815260206004820152601c60248201527f56616c696461746f725365745369673a2063616c6c206661696c656400000000604482015260640161026c565b816060015182604001516001600160a01b03167f5942a9a3968c7d49fc51c027041544ea295f5c1e395d6d8aa35c4369959f8ed960405160405180910390a3505050506104b360015f55565b50565b80517f00000000000000000000000000000000000000000000000000000000000000001461053a5760405162461bcd60e51b815260206004820152602b60248201527f56616c696461746f725365745369673a20696e76616c6964207461726765744260448201526a1b1bd8dad8da185a5b925160aa1b606482015260840161026c565b60208101516001600160a01b031630146105ae5760405162461bcd60e51b815260206004820152602f60248201527f56616c696461746f725365745369673a20696e76616c69642076616c6964617460448201526e6f725365745369674164647265737360881b606482015260840161026c565b60608101516040808301516001600160a01b03165f90815260016020522054146104b35760405162461bcd60e51b815260206004820152601e60248201527f56616c696461746f725365745369673a20696e76616c6964206e6f6e63650000604482015260640161026c565b60025f540361063c57604051633ee5aeb560e01b815260040160405180910390fd5b60025f55565b5f60208284031215610652575f80fd5b813563ffffffff81168114610665575f80fd5b9392505050565b634e487b7160e01b5f52604160045260245ffd5b60405160c0810167ffffffffffffffff811182821017156106a3576106a361066c565b60405290565b6040516060810167ffffffffffffffff811182821017156106a3576106a361066c565b604051601f8201601f1916810167ffffffffffffffff811182821017156106f5576106f561066c565b604052919050565b6001600160a01b03811681146104b3575f80fd5b803561071c816106fd565b919050565b5f67ffffffffffffffff82111561073a5761073a61066c565b50601f01601f191660200190565b5f82601f830112610757575f80fd5b813561076a61076582610721565b6106cc565b81815284602083860101111561077e575f80fd5b816020850160208301375f918101602001919091529392505050565b5f602082840312156107aa575f80fd5b813567ffffffffffffffff808211156107c1575f80fd5b9083019060c082860312156107d4575f80fd5b6107dc610680565b823581526107ec60208401610711565b60208201526107fd60408401610711565b6040820152606083013560608201526080830135608082015260a083013582811115610827575f80fd5b61083387828601610748565b60a08301525095945050505050565b5f60208284031215610852575f80fd5b8135610665816106fd565b5f5b8381101561087757818101518382015260200161085f565b50505f910152565b5f82601f83011261088e575f80fd5b815161089c61076582610721565b8181528460208386010111156108b0575f80fd5b6108c182602083016020870161085d565b949350505050565b5f80604083850312156108da575f80fd5b825167ffffffffffffffff808211156108f1575f80fd5b9084019060608287031215610904575f80fd5b61090c6106a9565b82518152602083015161091e816106fd565b6020820152604083015182811115610934575f80fd5b6109408882860161087f565b6040830152508094505050506020830151801515811461095e575f80fd5b809150509250929050565b5f60208284031215610979575f80fd5b815167ffffffffffffffff80821115610990575f80fd5b9083019060c082860312156109a3575f80fd5b6109ab610680565b8251815260208301516109bd816106fd565b602082015260408301516109d0816106fd565b80604083015250606083015160608201526080830151608082015260a0830151828111156109fc575f80fd5b6108338782860161087f565b80820180821115610a2757634e487b7160e01b5f52601160045260245ffd5b92915050565b5f8251610a3e81846020870161085d565b919091019291505056fea2646970667358221220cf36c30fc2c9cbe627ab36b69583784c46490d2569cab6de0c12dfbd4ad1a52864736f6c63430008190033", + Bin: "0x60c060405234801561000f575f80fd5b50604051610b76380380610b7683398101604081905261002e916100b2565b60015f5560808190526040805163084279ef60e31b8152905173020000000000000000000000000000000000000591634213cf789160048083019260209291908290030181865afa158015610085573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906100a991906100b2565b60a052506100c9565b5f602082840312156100c2575f80fd5b5051919050565b60805160a051610a7e6100f85f395f818161017701526104ba01525f818161012a01526102790152610a7e5ff3fe608060405260043610610071575f3560e01c80637ecebe001161004c5780637ecebe00146100e05780638d6e579d14610119578063b771b3bc1461014c578063d127dc9b14610166575f80fd5b80630731775d1461007c5780635433da42146100ac5780637d969c34146100c1575f80fd5b3661007857005b5f80fd5b348015610087575f80fd5b5061008f5f81565b6040516001600160a01b0390911681526020015b60405180910390f35b6100bf6100ba366004610642565b610199565b005b3480156100cc575f80fd5b506100bf6100db36600461079a565b6104b6565b3480156100eb575f80fd5b5061010b6100fa366004610842565b60016020525f908152604090205481565b6040519081526020016100a3565b348015610124575f80fd5b5061010b7f000000000000000000000000000000000000000000000000000000000000000081565b348015610157575f80fd5b5061008f6005600160991b0181565b348015610171575f80fd5b5061010b7f000000000000000000000000000000000000000000000000000000000000000081565b6101a161061a565b6040516306f8253560e41b815263ffffffff821660048201525f9081906005600160991b0190636f825350906024015f60405180830381865afa1580156101ea573d5f803e3d5ffd5b505050506040513d5f823e601f3d908101601f1916820160405261021191908101906108c9565b91509150806102755760405162461bcd60e51b815260206004820152602560248201527f56616c696461746f725365745369673a20696e76616c69642077617270206d65604482015264737361676560d81b60648201526084015b60405180910390fd5b81517f0000000000000000000000000000000000000000000000000000000000000000146102f45760405162461bcd60e51b815260206004820152602660248201527f56616c696461746f725365745369673a20696e76616c696420736f75726365436044820152651a185a5b925160d21b606482015260840161026c565b60208201516001600160a01b0316156103655760405162461bcd60e51b815260206004820152602d60248201527f56616c696461746f725365745369673a206e6f6e2d7a65726f206f726967696e60448201526c53656e6465724164647265737360981b606482015260840161026c565b5f826040015180602001905181019061037e9190610969565b9050610389816104b6565b6060810151610399906001610a08565b604080830180516001600160a01b039081165f9081526001602052838120949094559051608085015160a0860151935191909216926103d791610a2d565b5f6040518083038185875af1925050503d805f8114610411576040519150601f19603f3d011682016040523d82523d5f602084013e610416565b606091505b50509050806104675760405162461bcd60e51b815260206004820152601c60248201527f56616c696461746f725365745369673a2063616c6c206661696c656400000000604482015260640161026c565b816060015182604001516001600160a01b03167f5942a9a3968c7d49fc51c027041544ea295f5c1e395d6d8aa35c4369959f8ed960405160405180910390a3505050506104b360015f55565b50565b80517f00000000000000000000000000000000000000000000000000000000000000001461053a5760405162461bcd60e51b815260206004820152602b60248201527f56616c696461746f725365745369673a20696e76616c6964207461726765744260448201526a1b1bd8dad8da185a5b925160aa1b606482015260840161026c565b60208101516001600160a01b031630146105ae5760405162461bcd60e51b815260206004820152602f60248201527f56616c696461746f725365745369673a20696e76616c69642076616c6964617460448201526e6f725365745369674164647265737360881b606482015260840161026c565b60608101516040808301516001600160a01b03165f90815260016020522054146104b35760405162461bcd60e51b815260206004820152601e60248201527f56616c696461746f725365745369673a20696e76616c6964206e6f6e63650000604482015260640161026c565b60025f540361063c57604051633ee5aeb560e01b815260040160405180910390fd5b60025f55565b5f60208284031215610652575f80fd5b813563ffffffff81168114610665575f80fd5b9392505050565b634e487b7160e01b5f52604160045260245ffd5b60405160c0810167ffffffffffffffff811182821017156106a3576106a361066c565b60405290565b6040516060810167ffffffffffffffff811182821017156106a3576106a361066c565b604051601f8201601f1916810167ffffffffffffffff811182821017156106f5576106f561066c565b604052919050565b6001600160a01b03811681146104b3575f80fd5b803561071c816106fd565b919050565b5f67ffffffffffffffff82111561073a5761073a61066c565b50601f01601f191660200190565b5f82601f830112610757575f80fd5b813561076a61076582610721565b6106cc565b81815284602083860101111561077e575f80fd5b816020850160208301375f918101602001919091529392505050565b5f602082840312156107aa575f80fd5b813567ffffffffffffffff808211156107c1575f80fd5b9083019060c082860312156107d4575f80fd5b6107dc610680565b823581526107ec60208401610711565b60208201526107fd60408401610711565b6040820152606083013560608201526080830135608082015260a083013582811115610827575f80fd5b61083387828601610748565b60a08301525095945050505050565b5f60208284031215610852575f80fd5b8135610665816106fd565b5f5b8381101561087757818101518382015260200161085f565b50505f910152565b5f82601f83011261088e575f80fd5b815161089c61076582610721565b8181528460208386010111156108b0575f80fd5b6108c182602083016020870161085d565b949350505050565b5f80604083850312156108da575f80fd5b825167ffffffffffffffff808211156108f1575f80fd5b9084019060608287031215610904575f80fd5b61090c6106a9565b82518152602083015161091e816106fd565b6020820152604083015182811115610934575f80fd5b6109408882860161087f565b6040830152508094505050506020830151801515811461095e575f80fd5b809150509250929050565b5f60208284031215610979575f80fd5b815167ffffffffffffffff80821115610990575f80fd5b9083019060c082860312156109a3575f80fd5b6109ab610680565b8251815260208301516109bd816106fd565b602082015260408301516109d0816106fd565b80604083015250606083015160608201526080830151608082015260a0830151828111156109fc575f80fd5b6108338782860161087f565b80820180821115610a2757634e487b7160e01b5f52601160045260245ffd5b92915050565b5f8251610a3e81846020870161085d565b919091019291505056fea2646970667358221220b37908d0698377f4a4cfd2a85b528b65bbfde731fa649fdc7fa8fcd5fbad682864736f6c63430008190033", } // ValidatorSetSigABI is the input ABI used to generate the binding from. diff --git a/abi-bindings/go/ictt/TokenHome/ERC20TokenHome/ERC20TokenHome.go b/abi-bindings/go/ictt/TokenHome/ERC20TokenHome/ERC20TokenHome.go new file mode 100644 index 000000000..66399d77f --- /dev/null +++ b/abi-bindings/go/ictt/TokenHome/ERC20TokenHome/ERC20TokenHome.go @@ -0,0 +1,2833 @@ +// Code generated - DO NOT EDIT. +// This file is a generated binding and any manual changes will be lost. + +package erc20tokenhome + +import ( + "errors" + "math/big" + "strings" + + "github.com/ava-labs/subnet-evm/accounts/abi" + "github.com/ava-labs/subnet-evm/accounts/abi/bind" + "github.com/ava-labs/subnet-evm/core/types" + "github.com/ava-labs/subnet-evm/interfaces" + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/event" +) + +// Reference imports to suppress errors if they are not otherwise used. +var ( + _ = errors.New + _ = big.NewInt + _ = strings.NewReader + _ = interfaces.NotFound + _ = bind.Bind + _ = common.Big1 + _ = types.BloomLookup + _ = event.NewSubscription + _ = abi.ConvertType +) + +// RemoteTokenTransferrerSettings is an auto generated low-level Go binding around an user-defined struct. +type RemoteTokenTransferrerSettings struct { + Registered bool + CollateralNeeded *big.Int + TokenMultiplier *big.Int + MultiplyOnRemote bool +} + +// SendAndCallInput is an auto generated low-level Go binding around an user-defined struct. +type SendAndCallInput struct { + DestinationBlockchainID [32]byte + DestinationTokenTransferrerAddress common.Address + RecipientContract common.Address + RecipientPayload []byte + RequiredGasLimit *big.Int + RecipientGasLimit *big.Int + MultiHopFallback common.Address + FallbackRecipient common.Address + PrimaryFeeTokenAddress common.Address + PrimaryFee *big.Int + SecondaryFee *big.Int +} + +// SendTokensInput is an auto generated low-level Go binding around an user-defined struct. +type SendTokensInput struct { + DestinationBlockchainID [32]byte + DestinationTokenTransferrerAddress common.Address + Recipient common.Address + PrimaryFeeTokenAddress common.Address + PrimaryFee *big.Int + SecondaryFee *big.Int + RequiredGasLimit *big.Int + MultiHopFallback common.Address +} + +// ERC20TokenHomeMetaData contains all meta data concerning the ERC20TokenHome contract. +var ERC20TokenHomeMetaData = &bind.MetaData{ + ABI: "[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"teleporterRegistryAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"teleporterManager\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"minTeleporterVersion\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"tokenAddress\",\"type\":\"address\"},{\"internalType\":\"uint8\",\"name\":\"tokenDecimals\",\"type\":\"uint8\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"target\",\"type\":\"address\"}],\"name\":\"AddressEmptyCode\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"AddressInsufficientBalance\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"FailedInnerCall\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidInitialization\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotInitializing\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"OwnableInvalidOwner\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"OwnableUnauthorizedAccount\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ReentrancyGuardReentrantCall\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"SafeERC20FailedOperation\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"recipientContract\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"CallFailed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"recipientContract\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"CallSucceeded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"remoteBlockchainID\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"remoteTokenTransferrerAddress\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"remaining\",\"type\":\"uint256\"}],\"name\":\"CollateralAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"version\",\"type\":\"uint64\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"oldMinTeleporterVersion\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"newMinTeleporterVersion\",\"type\":\"uint256\"}],\"name\":\"MinTeleporterVersionUpdated\",\"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\":\"bytes32\",\"name\":\"remoteBlockchainID\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"remoteTokenTransferrerAddress\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"initialCollateralNeeded\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"tokenDecimals\",\"type\":\"uint8\"}],\"name\":\"RemoteRegistered\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"teleporterAddress\",\"type\":\"address\"}],\"name\":\"TeleporterAddressPaused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"teleporterAddress\",\"type\":\"address\"}],\"name\":\"TeleporterAddressUnpaused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"teleporterMessageID\",\"type\":\"bytes32\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"destinationBlockchainID\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"destinationTokenTransferrerAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"recipientContract\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"recipientPayload\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"requiredGasLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"recipientGasLimit\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"multiHopFallback\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"fallbackRecipient\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"primaryFeeTokenAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"primaryFee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"secondaryFee\",\"type\":\"uint256\"}],\"indexed\":false,\"internalType\":\"structSendAndCallInput\",\"name\":\"input\",\"type\":\"tuple\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"TokensAndCallRouted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"teleporterMessageID\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"destinationBlockchainID\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"destinationTokenTransferrerAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"recipientContract\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"recipientPayload\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"requiredGasLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"recipientGasLimit\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"multiHopFallback\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"fallbackRecipient\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"primaryFeeTokenAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"primaryFee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"secondaryFee\",\"type\":\"uint256\"}],\"indexed\":false,\"internalType\":\"structSendAndCallInput\",\"name\":\"input\",\"type\":\"tuple\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"TokensAndCallSent\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"teleporterMessageID\",\"type\":\"bytes32\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"destinationBlockchainID\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"destinationTokenTransferrerAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"primaryFeeTokenAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"primaryFee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"secondaryFee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"requiredGasLimit\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"multiHopFallback\",\"type\":\"address\"}],\"indexed\":false,\"internalType\":\"structSendTokensInput\",\"name\":\"input\",\"type\":\"tuple\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"TokensRouted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"teleporterMessageID\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"destinationBlockchainID\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"destinationTokenTransferrerAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"primaryFeeTokenAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"primaryFee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"secondaryFee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"requiredGasLimit\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"multiHopFallback\",\"type\":\"address\"}],\"indexed\":false,\"internalType\":\"structSendTokensInput\",\"name\":\"input\",\"type\":\"tuple\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"TokensSent\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"TokensWithdrawn\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"ERC20_TOKEN_HOME_STORAGE_LOCATION\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"TELEPORTER_REGISTRY_APP_STORAGE_LOCATION\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"TOKEN_HOME_STORAGE_LOCATION\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"remoteBlockchainID\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"remoteTokenTransferrerAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"addCollateral\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getBlockchainID\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getMinTeleporterVersion\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"remoteBlockchainID\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"remoteTokenTransferrerAddress\",\"type\":\"address\"}],\"name\":\"getRemoteTokenTransferrerSettings\",\"outputs\":[{\"components\":[{\"internalType\":\"bool\",\"name\":\"registered\",\"type\":\"bool\"},{\"internalType\":\"uint256\",\"name\":\"collateralNeeded\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"tokenMultiplier\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"multiplyOnRemote\",\"type\":\"bool\"}],\"internalType\":\"structRemoteTokenTransferrerSettings\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getTokenAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"remoteBlockchainID\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"remoteTokenTransferrerAddress\",\"type\":\"address\"}],\"name\":\"getTransferredBalance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"teleporterRegistryAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"teleporterManager\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"minTeleporterVersion\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"tokenAddress\",\"type\":\"address\"},{\"internalType\":\"uint8\",\"name\":\"tokenDecimals\",\"type\":\"uint8\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"teleporterAddress\",\"type\":\"address\"}],\"name\":\"isTeleporterAddressPaused\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"teleporterAddress\",\"type\":\"address\"}],\"name\":\"pauseTeleporterAddress\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"sourceBlockchainID\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"originSenderAddress\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"message\",\"type\":\"bytes\"}],\"name\":\"receiveTeleporterMessage\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"destinationBlockchainID\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"destinationTokenTransferrerAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"primaryFeeTokenAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"primaryFee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"secondaryFee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"requiredGasLimit\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"multiHopFallback\",\"type\":\"address\"}],\"internalType\":\"structSendTokensInput\",\"name\":\"input\",\"type\":\"tuple\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"send\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"destinationBlockchainID\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"destinationTokenTransferrerAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"recipientContract\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"recipientPayload\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"requiredGasLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"recipientGasLimit\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"multiHopFallback\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"fallbackRecipient\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"primaryFeeTokenAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"primaryFee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"secondaryFee\",\"type\":\"uint256\"}],\"internalType\":\"structSendAndCallInput\",\"name\":\"input\",\"type\":\"tuple\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"sendAndCall\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"teleporterAddress\",\"type\":\"address\"}],\"name\":\"unpauseTeleporterAddress\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"version\",\"type\":\"uint256\"}],\"name\":\"updateMinTeleporterVersion\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", + Bin: "0x608060405234801561000f575f80fd5b5060405161502438038061502483398101604081905261002e91610893565b61003b8585858585610048565b505050505061090d565b50565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00805468010000000000000000810460ff1615906001600160401b03165f811580156100915750825b90505f826001600160401b031660011480156100ac5750303b155b9050811580156100ba575080155b156100d85760405163f92ee8a960e01b815260040160405180910390fd5b84546001600160401b0319166001178555831561010657845460ff60401b1916680100000000000000001785555b6101138a8a8a8a8a610165565b831561015957845460ff60401b19168555604051600181527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b50505050505050505050565b61016d61018a565b61017a85858585856101da565b610183826101ff565b5050505050565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a005468010000000000000000900460ff166101d857604051631afcd79f60e31b815260040160405180910390fd5b565b6101e261018a565b6101ed858585610248565b6101f5610268565b6101838282610278565b61020761018a565b7f914a9547f6c3ddce1d5efbd9e687708f0d1d408ce129e8e1a88bce4f40e2950080546001600160a01b0319166001600160a01b0392909216919091179055565b61025061018a565b61025a8382610404565b6102638261042a565b505050565b61027061018a565b6101d861043b565b61028061018a565b6001600160a01b0382166102db5760405162461bcd60e51b815260206004820152601d60248201527f546f6b656e486f6d653a207a65726f20746f6b656e206164647265737300000060448201526064015b60405180910390fd5b60128160ff16111561033a5760405162461bcd60e51b815260206004820152602260248201527f546f6b656e486f6d653a20746f6b656e20646563696d616c7320746f6f2068696044820152610ced60f31b60648201526084016102d2565b5f7f9316912b5a9db88acbe872c934fdd0a46c436c6dcba332d649c4d57c7bc9e60090507302000000000000000000000000000000000000056001600160a01b0316634213cf786040518163ffffffff1660e01b8152600401602060405180830381865afa1580156103ae573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906103d291906108f6565b8155600101805460ff909216600160a01b026001600160a81b03199092166001600160a01b0390931692909217179055565b61040c61018a565b610414610465565b61041c610475565b610426828261047d565b5050565b61043261018a565b61004581610607565b5f7fd2f1ed38b7d242bfb8b41862afb813a15193219a4bc717f2056607593e6c75005b6001905550565b61046d61018a565b6101d8610641565b6101d861018a565b61048561018a565b6001600160a01b0382166105015760405162461bcd60e51b815260206004820152603760248201527f54656c65706f7274657252656769737472794170703a207a65726f2054656c6560448201527f706f72746572207265676973747279206164647265737300000000000000000060648201526084016102d2565b5f7fde77a4dc7391f6f8f2d9567915d687d3aee79e7a1fc7300392f2727e9a0f1d0090505f8390505f816001600160a01b031663c07f47d46040518163ffffffff1660e01b8152600401602060405180830381865afa158015610566573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061058a91906108f6565b116105df5760405162461bcd60e51b815260206004820152603260248201525f80516020615004833981519152604482015271656c65706f7274657220726567697374727960701b60648201526084016102d2565b81546001600160a01b0319166001600160a01b03821617825561060183610670565b50505050565b61060f61018a565b6001600160a01b03811661063857604051631e4fbdf760e01b81525f60048201526024016102d2565b61004581610808565b61064961018a565b5f7f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f0061045e565b7fde77a4dc7391f6f8f2d9567915d687d3aee79e7a1fc7300392f2727e9a0f1d0080546040805163301fd1f560e21b815290515f926001600160a01b03169163c07f47d49160048083019260209291908290030181865afa1580156106d7573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906106fb91906108f6565b60028301549091508184111561075a5760405162461bcd60e51b815260206004820152603160248201525f8051602061500483398151915260448201527032b632b837b93a32b9103b32b939b4b7b760791b60648201526084016102d2565b8084116107cf5760405162461bcd60e51b815260206004820152603f60248201527f54656c65706f7274657252656769737472794170703a206e6f7420677265617460448201527f6572207468616e2063757272656e74206d696e696d756d2076657273696f6e0060648201526084016102d2565b60028301849055604051849082907fa9a7ef57e41f05b4c15480842f5f0c27edfcbb553fed281f7c4068452cc1c02d905f90a350505050565b7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c19930080546001600160a01b031981166001600160a01b03848116918217845560405192169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0905f90a3505050565b80516001600160a01b038116811461088e575f80fd5b919050565b5f805f805f60a086880312156108a7575f80fd5b6108b086610878565b94506108be60208701610878565b9350604086015192506108d360608701610878565b9150608086015160ff811681146108e8575f80fd5b809150509295509295909350565b5f60208284031215610906575f80fd5b5051919050565b6146ea8061091a5f395ff3fe608060405234801561000f575f80fd5b5060043610610127575f3560e01c806365690038116100a9578063c8511ada1161006e578063c8511ada146102b4578063c868efaa14610388578063d2cc7a701461039b578063f2fde38b146103c2578063fd658268146103d5575f80fd5b80636569003814610232578063715018a6146102455780638da5cb5b1461024d578063909a6ac01461027d5780639731429714610291575f80fd5b80634511243e116100ef5780634511243e146101d15780634797735f146101e45780635d16225d146101f85780635eb995141461020b57806362e3901b1461021e575f80fd5b806310fe9ae81461012b578063154d625a146101745780632b0d8f18146101955780633bb03890146101aa5780634213cf78146101bd575b5f80fd5b7f9316912b5a9db88acbe872c934fdd0a46c436c6dcba332d649c4d57c7bc9e601546001600160a01b03165b6040516001600160a01b0390911681526020015b60405180910390f35b61018761018236600461368c565b6103e8565b60405190815260200161016b565b6101a86101a33660046136ba565b610430565b005b6101a86101b83660046136e3565b610532565b5f8051602061461583398151915254610187565b6101a86101df3660046136ba565b610646565b6101875f8051602061467583398151915281565b6101a8610206366004613747565b610735565b6101a8610219366004613776565b610751565b6101875f8051602061461583398151915281565b6101a861024036600461378d565b610765565b6101a861078e565b7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300546001600160a01b0316610157565b6101875f8051602061469583398151915281565b6102a461029f3660046136ba565b6107a1565b604051901515815260200161016b565b6103516102c236600461368c565b60408051608080820183525f808352602080840182905283850182905260609384018290529581525f8051602061463583398151915286528381206001600160a01b039590951681529385529282902082519384018352805460ff9081161515855260018201549585019590955260028101549284019290925260039091015490921615159181019190915290565b60405161016b9190815115158152602080830151908201526040808301519082015260609182015115159181019190915260800190565b6101a86103963660046137d3565b6107c1565b7fde77a4dc7391f6f8f2d9567915d687d3aee79e7a1fc7300392f2727e9a0f1d0254610187565b6101a86103d03660046136ba565b61097e565b6101a86103e3366004613854565b6109b8565b5f8281527f9316912b5a9db88acbe872c934fdd0a46c436c6dcba332d649c4d57c7bc9e603602090815260408083206001600160a01b03851684529091529020545b92915050565b5f805160206146958339815191526104466109c8565b6001600160a01b0382166104755760405162461bcd60e51b815260040161046c90613889565b60405180910390fd5b61047f81836109d0565b156104e25760405162461bcd60e51b815260206004820152602d60248201527f54656c65706f7274657252656769737472794170703a2061646472657373206160448201526c1b1c9958591e481c185d5cd959609a1b606482015260840161046c565b6001600160a01b0382165f81815260018381016020526040808320805460ff1916909217909155517f933f93e57a222e6330362af8b376d0a8725b6901e9a2fb86d00f169702b28a4c9190a25050565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a008054600160401b810460ff1615906001600160401b03165f811580156105765750825b90505f826001600160401b031660011480156105915750303b155b90508115801561059f575080155b156105bd5760405163f92ee8a960e01b815260040160405180910390fd5b845467ffffffffffffffff1916600117855583156105e757845460ff60401b1916600160401b1785555b6105f48a8a8a8a8a6109f1565b831561063a57845460ff60401b19168555604051600181527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b50505050505050505050565b5f8051602061469583398151915261065c6109c8565b6001600160a01b0382166106825760405162461bcd60e51b815260040161046c90613889565b61068c81836109d0565b6106ea5760405162461bcd60e51b815260206004820152602960248201527f54656c65706f7274657252656769737472794170703a2061646472657373206e6044820152681bdd081c185d5cd95960ba1b606482015260840161046c565b6001600160a01b0382165f818152600183016020526040808220805460ff19169055517f844e2f3154214672229235858fd029d1dfd543901c6d05931f0bc2480a2d72c39190a25050565b61074d61074736849003840184613989565b82610a16565b5050565b6107596109c8565b61076281610c27565b50565b61074d61077d5f805160206146158339815191525490565b303361078886613a8b565b85610dbf565b610796610fcb565b61079f5f611026565b565b5f5f805160206146958339815191526107ba81846109d0565b9392505050565b6107c9611096565b5f5f8051602061469583398151915260028101548154919250906001600160a01b0316634c1f08ce336040516001600160e01b031960e084901b1681526001600160a01b039091166004820152602401602060405180830381865afa158015610834573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906108589190613b59565b10156108bf5760405162461bcd60e51b815260206004820152603060248201527f54656c65706f7274657252656769737472794170703a20696e76616c6964205460448201526f32b632b837b93a32b91039b2b73232b960811b606482015260840161046c565b6108c981336109d0565b1561092f5760405162461bcd60e51b815260206004820152603060248201527f54656c65706f7274657252656769737472794170703a2054656c65706f72746560448201526f1c881859191c995cdcc81c185d5cd95960821b606482015260840161046c565b61096f858585858080601f0160208091040260200160405190810160405280939291908181526020018383808284375f920191909152506110e092505050565b506109786114d3565b50505050565b610986610fcb565b6001600160a01b0381166109af57604051631e4fbdf760e01b81525f600482015260240161046c565b61076281611026565b6109c38383836114fd565b505050565b61079f610fcb565b6001600160a01b03165f908152600191909101602052604090205460ff1690565b6109f96116ed565b610a068585858585611736565b610a0f8261175b565b5050505050565b5f805160206146558339815191528054600114610a455760405162461bcd60e51b815260040161046c90613b70565b60028155610a5283611791565b60e08301516001600160a01b031615610a7d5760405162461bcd60e51b815260040161046c90613bb4565b5f80610a9b855f01518660200151868860600151896080015161183a565b915091505f604051806040016040528060016004811115610abe57610abe613bfa565b8152602001604051806040016040528089604001516001600160a01b0316815260200186815250604051602001610af59190613c0e565b60405160208183030381529060405281525090505f610bd46040518060c00160405280895f0151815260200189602001516001600160a01b0316815260200160405180604001604052808b606001516001600160a01b031681526020018781525081526020018960c0015181526020015f6001600160401b03811115610b7d57610b7d6138d7565b604051908082528060200260200182016040528015610ba6578160200160208202803683370190505b50815260200184604051602001610bbd9190613c7b565b6040516020818303038152906040528152506119ff565b9050336001600160a01b0316817f93f19bf1ec58a15dc643b37e7e18a1c13e85e06cd11929e283154691ace9fb528987604051610c12929190613cbd565b60405180910390a35050600190925550505050565b5f8051602061469583398151915280546040805163301fd1f560e21b815290515f926001600160a01b03169163c07f47d49160048083019260209291908290030181865afa158015610c7b573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610c9f9190613b59565b600283015490915081841115610d115760405162461bcd60e51b815260206004820152603160248201527f54656c65706f7274657252656769737472794170703a20696e76616c6964205460448201527032b632b837b93a32b9103b32b939b4b7b760791b606482015260840161046c565b808411610d865760405162461bcd60e51b815260206004820152603f60248201527f54656c65706f7274657252656769737472794170703a206e6f7420677265617460448201527f6572207468616e2063757272656e74206d696e696d756d2076657273696f6e00606482015260840161046c565b60028301849055604051849082907fa9a7ef57e41f05b4c15480842f5f0c27edfcbb553fed281f7c4068452cc1c02d905f90a350505050565b5f805160206146558339815191528054600114610dee5760405162461bcd60e51b815260040161046c90613b70565b60028155610dfb83611b1a565b60c08301516001600160a01b031615610e265760405162461bcd60e51b815260040161046c90613bb4565b5f80610e46855f015186602001518688610100015189610120015161183a565b915091505f604051806040016040528060026004811115610e6957610e69613bfa565b81526020016040518061010001604052808c81526020018b6001600160a01b031681526020018a6001600160a01b0316815260200189604001516001600160a01b03168152602001868152602001896060015181526020018960a0015181526020018960e001516001600160a01b0316815250604051602001610eec9190613d3e565b60405160208183030381529060405281525090505f610f756040518060c00160405280895f0151815260200189602001516001600160a01b0316815260200160405180604001604052808b61010001516001600160a01b03168152602001878152508152602001896080015181526020015f6001600160401b03811115610b7d57610b7d6138d7565b9050876001600160a01b0316817f5d76dff81bf773b908b050fa113d39f7d8135bb4175398f313ea19cd3a1a0b168987604051610fb3929190613ddc565b60405180910390a35050600190925550505050505050565b33610ffd7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300546001600160a01b031690565b6001600160a01b03161461079f5760405163118cdaa760e01b815233600482015260240161046c565b7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c19930080546001600160a01b031981166001600160a01b03848116918217845560405192169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0905f90a3505050565b7f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f008054600119016110da57604051633ee5aeb560e01b815260040160405180910390fd5b60029055565b5f5f8051602061461583398151915290505f828060200190518101906111069190613f00565b905060018151600481111561111d5761111d613bfa565b03611165575f816020015180602001905181019061113b9190613f88565b90505f61114d87878460200151611cff565b905061115c825f015182611d8a565b50505050505050565b60028151600481111561117a5761117a613bfa565b03611293575f81602001518060200190518101906111989190613fc0565b90505f6111aa87878460800151611cff565b825190915087146112105760405162461bcd60e51b815260206004820152602a60248201527f546f6b656e486f6d653a206d69736d61746368656420736f7572636520626c6f60448201526918dad8da185a5b88125160b21b606482015260840161046c565b856001600160a01b031682602001516001600160a01b0316146112895760405162461bcd60e51b815260206004820152602b60248201527f546f6b656e486f6d653a206d69736d617463686564206f726967696e2073656e60448201526a646572206164647265737360a81b606482015260840161046c565b61115c8282611ded565b6003815160048111156112a8576112a8613bfa565b0361137c575f81602001518060200190518101906112c6919061408a565b90505f806112de888885606001518660800151611fcd565b91509150611372604051806101000160405280855f0151815260200185602001516001600160a01b0316815260200185604001516001600160a01b03168152602001876001015f9054906101000a90046001600160a01b03166001600160a01b031681526020018381526020015f81526020018560a0015181526020018560c001516001600160a01b031681525083612078565b5050505050505050565b60048151600481111561139157611391613bfa565b0361148c575f81602001518060200190518101906113af9190614123565b90505f806113c888888560800151866101400151611fcd565b915091506113728888855f01516040518061016001604052808860200151815260200188604001516001600160a01b0316815260200188606001516001600160a01b031681526020018860a00151815260200188610100015181526020018860c0015181526020018861012001516001600160a01b031681526020018860e001516001600160a01b031681526020018a6001015f9054906101000a90046001600160a01b03166001600160a01b031681526020018681526020015f81525086612203565b5f815160048111156114a0576114a0613bfa565b03610a0f575f81602001518060200190518101906114be919061421b565b90506114cb8686836123e0565b505050505050565b5f7f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f005b6001905550565b5f80516020614655833981519152805460011461152c5760405162461bcd60e51b815260040161046c90613b70565b60028082555f8581525f80516020614635833981519152602090815260408083206001600160a01b03881684528252918290208251608081018452815460ff9081161515808352600184015494830194909452948201549381019390935260030154909216151560608201525f80516020614615833981519152916115c35760405162461bcd60e51b815260040161046c90614281565b5f8160200151116116205760405162461bcd60e51b815260206004820152602160248201527f546f6b656e486f6d653a207a65726f20636f6c6c61746572616c206e656564656044820152601960fa1b606482015260840161046c565b611629846127e7565b93505f80826020015186106116585760208301515f925061164a90876142ca565b90508260200151955061166b565b85836020015161166891906142ca565b91505b5f88815260028501602090815260408083206001600160a01b038b168085529083529281902060010185905580518981529182018590528a917f6769a5f9bfc8b6e0db839ab981cbf9239274ae72d2d035081a9157d43bd33cb6910160405180910390a380156116df576116df3382611d8a565b505060019092555050505050565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0054600160401b900460ff1661079f57604051631afcd79f60e31b815260040160405180910390fd5b61173e6116ed565b61174985858561280e565b611751612829565b610a0f8282612839565b6117636116ed565b5f8051602061467583398151915280546001600160a01b0319166001600160a01b0392909216919091179055565b60408101516001600160a01b03166117f55760405162461bcd60e51b815260206004820152602160248201527f546f6b656e486f6d653a207a65726f20726563697069656e74206164647265736044820152607360f81b606482015260840161046c565b5f8160c00151116118185760405162461bcd60e51b815260040161046c906142dd565b60a0810151156107625760405162461bcd60e51b815260040161046c9061431f565b5f8581525f80516020614635833981519152602090815260408083206001600160a01b038816845282528083208151608081018352815460ff90811615158083526001840154958301959095526002830154938201939093526003909101549091161515606082015282915f8051602061461583398151915291906118d15760405162461bcd60e51b815260040161046c90614281565b6020810151156119335760405162461bcd60e51b815260206004820152602760248201527f546f6b656e486f6d653a20636f6c6c61746572616c206e656564656420666f726044820152662072656d6f746560c81b606482015260840161046c565b61193c876127e7565b965084156119525761194f8633876129a0565b94505b5f611966826040015183606001518a612af9565b90505f81116119b75760405162461bcd60e51b815260206004820152601d60248201527f546f6b656e486f6d653a207a65726f207363616c656420616d6f756e74000000604482015260640161046c565b5f8a815260038401602090815260408083206001600160a01b038d168452909152812080548392906119ea908490614360565b90915550909a95995094975050505050505050565b5f80611a09612b0f565b60408401516020015190915015611aae576040830151516001600160a01b0316611a8b5760405162461bcd60e51b815260206004820152602d60248201527f54656c65706f7274657252656769737472794170703a207a65726f206665652060448201526c746f6b656e206164647265737360981b606482015260840161046c565b604083015160208101519051611aae916001600160a01b03909116908390612bff565b604051630624488560e41b81526001600160a01b03821690636244885090611ada908690600401614373565b6020604051808303815f875af1158015611af6573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906107ba9190613b59565b60408101516001600160a01b0316611b875760405162461bcd60e51b815260206004820152602a60248201527f546f6b656e486f6d653a207a65726f20726563697069656e7420636f6e7472616044820152696374206164647265737360b01b606482015260840161046c565b5f816080015111611baa5760405162461bcd60e51b815260040161046c906142dd565b5f8160a0015111611c095760405162461bcd60e51b815260206004820152602360248201527f546f6b656e486f6d653a207a65726f20726563697069656e7420676173206c696044820152621b5a5d60ea1b606482015260840161046c565b80608001518160a0015110611c6f5760405162461bcd60e51b815260206004820152602660248201527f546f6b656e486f6d653a20696e76616c696420726563697069656e7420676173604482015265081b1a5b5a5d60d21b606482015260840161046c565b60e08101516001600160a01b0316611cdc5760405162461bcd60e51b815260206004820152602a60248201527f546f6b656e486f6d653a207a65726f2066616c6c6261636b20726563697069656044820152696e74206164647265737360b01b606482015260840161046c565b610140810151156107625760405162461bcd60e51b815260040161046c9061431f565b5f8381525f80516020614635833981519152602090815260408083206001600160a01b038616845282528083208151608081018352815460ff9081161515825260018301549482019490945260028201549281019290925260030154909116151560608201525f8051602061461583398151915290611d8081878787612c86565b9695505050505050565b6040518181525f80516020614675833981519152906001600160a01b038416907f6352c5382c4a4578e712449ca65e83cdb392d045dfcf1cad9615189db2da244b9060200160405180910390a280546109c3906001600160a01b03168484612d7d565b5f80516020614675833981519152805460608401516001600160a01b0390911690611e1a90829085612bff565b5f845f01518560200151866040015184878960a00151604051602401611e459695949392919061442a565b60408051601f198184030181529190526020810180516001600160e01b03166394395edd60e01b17905260c086015160608701519192505f91611e89919084612ddc565b6060870151604051636eb1769f60e11b81523060048201526001600160a01b0391821660248201529192505f919085169063dd62ed3e90604401602060405180830381865afa158015611ede573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611f029190613b59565b9050611f138488606001515f612de9565b8115611f655786606001516001600160a01b03167f104deb555f67e63782bb817bc26c39050894645f9b9f29c4be8ae68d0e8b7ff487604051611f5891815260200190565b60405180910390a2611fad565b86606001516001600160a01b03167fb9eaeae386d339f8115782f297a9e5f0e13fb587cd6b0d502f113cb8dd4d6cb087604051611fa491815260200190565b60405180910390a25b801561115c5760e087015161115c906001600160a01b0386169083612d7d565b5f8481525f80516020614635833981519152602090815260408083206001600160a01b038716845282528083208151608081018352815460ff90811615158252600183015494820194909452600282015492810192909252600301549091161515606082015281905f805160206146158339815191529082612051828a8a8a612c86565b90505f6120678360400151846060015189612e78565b919a91995090975050505050505050565b5f8051602061465583398151915280546001146120a75760405162461bcd60e51b815260040161046c90613b70565b600281556120b483611791565b5f6120cc845f01518560200151858760800151612e85565b9050805f036120e9576120e38460e0015184611d8a565b506121fb565b604080518082019091525f908060018152602001604051806040016040528088604001516001600160a01b031681526020018581525060405160200161212f9190613c0e565b60405160208183030381529060405281525090505f6121bb6040518060c00160405280885f0151815260200188602001516001600160a01b0316815260200160405180604001604052808a606001516001600160a01b031681526020018a6080015181525081526020018860c0015181526020015f6001600160401b03811115610b7d57610b7d6138d7565b9050807f825080857c76cef4a1629c0705a7f8b4ef0282ddcafde0b6715c4fb34b68aaf087856040516121ef929190613cbd565b60405180910390a25050505b600190555050565b5f8051602061465583398151915280546001146122325760405162461bcd60e51b815260040161046c90613b70565b6002815561223f83611b1a565b5f612258845f0151856020015185876101200151612e85565b9050805f036122755761226f8460c0015184611d8a565b506123d5565b604080518082019091525f9080600281526020016040518061010001604052808b81526020018a6001600160a01b03168152602001896001600160a01b0316815260200188604001516001600160a01b03168152602001858152602001886060015181526020018860a0015181526020018860e001516001600160a01b03168152506040516020016123079190613d3e565b60405160208183030381529060405281525090505f6123956040518060c00160405280885f0151815260200188602001516001600160a01b0316815260200160405180604001604052808a61010001516001600160a01b031681526020018a61012001518152508152602001886080015181526020015f6001600160401b03811115610b7d57610b7d6138d7565b9050807f42eff9005856e3c586b096d67211a566dc926052119fd7cc08023c70937ecb3087856040516123c9929190613ddc565b60405180910390a25050505b600190555050505050565b5f80516020614615833981519152836124475760405162461bcd60e51b8152602060048201526024808201527f546f6b656e486f6d653a207a65726f2072656d6f746520626c6f636b636861696044820152631b88125160e21b606482015260840161046c565b805484036124af5760405162461bcd60e51b815260206004820152602f60248201527f546f6b656e486f6d653a2063616e6e6f742072656769737465722072656d6f7460448201526e329037b71039b0b6b29031b430b4b760891b606482015260840161046c565b6001600160a01b03831661251e5760405162461bcd60e51b815260206004820152603060248201527f546f6b656e486f6d653a207a65726f2072656d6f746520746f6b656e2074726160448201526f6e73666572726572206164647265737360801b606482015260840161046c565b5f84815260028201602090815260408083206001600160a01b038716845290915290205460ff161561259e5760405162461bcd60e51b8152602060048201526024808201527f546f6b656e486f6d653a2072656d6f746520616c726561647920726567697374604482015263195c995960e21b606482015260840161046c565b6012826040015160ff1611156126085760405162461bcd60e51b815260206004820152602960248201527f546f6b656e486f6d653a2072656d6f746520746f6b656e20646563696d616c73604482015268040e8dede40d0d2ced60bb1b606482015260840161046c565b6001810154602083015160ff908116600160a01b909204161461267c5760405162461bcd60e51b815260206004820152602660248201527f546f6b656e486f6d653a20696e76616c696420686f6d6520746f6b656e20646560448201526563696d616c7360d01b606482015260840161046c565b5f8061269d8360010160149054906101000a900460ff168560400151612ff6565b915091505f6126b08383875f0151612e78565b90508180156126ca575084516126c790849061447e565b15155b156126dd576126da600182614360565b90505b6040518060800160405280600115158152602001828152602001848152602001831515815250846002015f8981526020019081526020015f205f886001600160a01b03166001600160a01b031681526020019081526020015f205f820151815f015f6101000a81548160ff02191690831515021790555060208201518160010155604082015181600201556060820151816003015f6101000a81548160ff021916908315150217905550905050856001600160a01b0316877ff229b02a51a4c8d5ef03a096ae0dd727d7b48b710d21b50ebebb560eef739b908388604001516040516127d692919091825260ff16602082015260400190565b60405180910390a350505050505050565b5f8051602061467583398151915280545f91906107ba906001600160a01b031633856129a0565b6128166116ed565b612820838261303e565b6109c382613060565b6128316116ed565b61079f613071565b6128416116ed565b6001600160a01b0382166128975760405162461bcd60e51b815260206004820152601d60248201527f546f6b656e486f6d653a207a65726f20746f6b656e2061646472657373000000604482015260640161046c565b60128160ff1611156128f65760405162461bcd60e51b815260206004820152602260248201527f546f6b656e486f6d653a20746f6b656e20646563696d616c7320746f6f2068696044820152610ced60f31b606482015260840161046c565b5f5f8051602061461583398151915290506005600160991b016001600160a01b0316634213cf786040518163ffffffff1660e01b8152600401602060405180830381865afa15801561294a573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061296e9190613b59565b8155600101805460ff909216600160a01b026001600160a81b03199092166001600160a01b0390931692909217179055565b6040516370a0823160e01b81523060048201525f9081906001600160a01b038616906370a0823190602401602060405180830381865afa1580156129e6573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612a0a9190613b59565b9050612a216001600160a01b038616853086613085565b6040516370a0823160e01b81523060048201525f906001600160a01b038716906370a0823190602401602060405180830381865afa158015612a65573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612a899190613b59565b9050818111612aef5760405162461bcd60e51b815260206004820152602c60248201527f5361666545524332305472616e7366657246726f6d3a2062616c616e6365206e60448201526b1bdd081a5b98dc99585cd95960a21b606482015260840161046c565b611d8082826142ca565b5f612b0784848460016130be565b949350505050565b5f8051602061469583398151915280546040805163d820e64f60e01b815290515f939284926001600160a01b039091169163d820e64f916004808201926020929091908290030181865afa158015612b69573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612b8d9190614491565b9050612b9982826109d0565b1561042a5760405162461bcd60e51b815260206004820152603060248201527f54656c65706f7274657252656769737472794170703a2054656c65706f72746560448201526f1c881cd95b991a5b99c81c185d5cd95960821b606482015260840161046c565b604051636eb1769f60e11b81523060048201526001600160a01b0383811660248301525f919085169063dd62ed3e90604401602060405180830381865afa158015612c4c573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612c709190613b59565b90506109788484612c818585614360565b612de9565b83515f90612ca65760405162461bcd60e51b815260040161046c90614281565b602085015115612d045760405162461bcd60e51b8152602060048201526024808201527f546f6b656e486f6d653a2072656d6f7465206e6f7420636f6c6c61746572616c6044820152631a5e995960e21b606482015260840161046c565b612d0f8484846130e5565b5f612d238660400151876060015185612e78565b90505f8111612d745760405162461bcd60e51b815260206004820152601c60248201527f546f6b656e486f6d653a207a65726f20746f6b656e20616d6f756e7400000000604482015260640161046c565b95945050505050565b6040516001600160a01b038381166024830152604482018390526109c391859182169063a9059cbb906064015b604051602081830303815290604052915060e01b6020820180516001600160e01b0383818316178352505050506131d2565b5f612b07845f8585613233565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663095ea7b360e01b179052612e3a8482613303565b610978576040516001600160a01b0384811660248301525f6044830152612e6e91869182169063095ea7b390606401612daa565b61097884826131d2565b5f612b078484845f6130be565b5f8481525f80516020614635833981519152602090815260408083206001600160a01b038716845282528083208151608081018352815460ff9081161580158352600184015495830195909552600283015493820193909352600390910154909116151560608201525f805160206146158339815191529180612f0b57505f8160200151115b15612f1a575f92505050612b07565b838511612f7e5760405162461bcd60e51b815260206004820152602c60248201527f546f6b656e486f6d653a20696e73756666696369656e7420616d6f756e74207460448201526b6f20636f766572206665657360a01b606482015260840161046c565b612f8884866142ca565b94505f612f9e8260400151836060015188612af9565b9050805f03612fb2575f9350505050612b07565b5f88815260038401602090815260408083206001600160a01b038b16845290915281208054839290612fe5908490614360565b909155509098975050505050505050565b5f8060ff8085169084161181816130195761301185876144ac565b60ff16613027565b61302386866144ac565b60ff165b61303290600a6145a5565b96919550909350505050565b6130466116ed565b61304e6133a0565b6130566133b0565b61074d82826133b8565b6130686116ed565b6107628161353c565b5f5f805160206146558339815191526114f6565b6040516001600160a01b0384811660248301528381166044830152606482018390526109789186918216906323b872dd90608401612daa565b5f811515841515036130db576130d485846145b0565b9050612b07565b612d7485846145c7565b5f8381527f9316912b5a9db88acbe872c934fdd0a46c436c6dcba332d649c4d57c7bc9e603602090815260408083206001600160a01b03861684529091529020545f80516020614615833981519152908281101561319c5760405162461bcd60e51b815260206004820152602e60248201527f546f6b656e486f6d653a20696e73756666696369656e7420746f6b656e20747260448201526d616e736665722062616c616e636560901b606482015260840161046c565b6131a683826142ca565b5f9586526003909201602090815260408087206001600160a01b03909616875294905250919092205550565b5f6131e66001600160a01b03841683613544565b905080515f1415801561320a57508080602001905181019061320891906145da565b155b156109c357604051635274afe760e01b81526001600160a01b038416600482015260240161046c565b5f845a10156132845760405162461bcd60e51b815260206004820152601b60248201527f43616c6c5574696c733a20696e73756666696369656e74206761730000000000604482015260640161046c565b834710156132d45760405162461bcd60e51b815260206004820152601d60248201527f43616c6c5574696c733a20696e73756666696369656e742076616c7565000000604482015260640161046c565b826001600160a01b03163b5f036132ec57505f612b07565b5f805f84516020860188888bf19695505050505050565b5f805f846001600160a01b03168460405161331e91906145f9565b5f604051808303815f865af19150503d805f8114613357576040519150601f19603f3d011682016040523d82523d5f602084013e61335c565b606091505b509150915081801561338657508051158061338657508080602001905181019061338691906145da565b8015612d745750505050506001600160a01b03163b151590565b6133a86116ed565b61079f613551565b61079f6116ed565b6133c06116ed565b6001600160a01b03821661343c5760405162461bcd60e51b815260206004820152603760248201527f54656c65706f7274657252656769737472794170703a207a65726f2054656c6560448201527f706f727465722072656769737472792061646472657373000000000000000000606482015260840161046c565b5f5f8051602061469583398151915290505f8390505f816001600160a01b031663c07f47d46040518163ffffffff1660e01b8152600401602060405180830381865afa15801561348e573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906134b29190613b59565b1161351a5760405162461bcd60e51b815260206004820152603260248201527f54656c65706f7274657252656769737472794170703a20696e76616c69642054604482015271656c65706f7274657220726567697374727960701b606482015260840161046c565b81546001600160a01b0319166001600160a01b03821617825561097883610c27565b6109866116ed565b60606107ba83835f613559565b6114d36116ed565b60608147101561357e5760405163cd78605960e01b815230600482015260240161046c565b5f80856001600160a01b0316848660405161359991906145f9565b5f6040518083038185875af1925050503d805f81146135d3576040519150601f19603f3d011682016040523d82523d5f602084013e6135d8565b606091505b5091509150611d808683836060826135f8576135f38261363f565b6107ba565b815115801561360f57506001600160a01b0384163b155b1561363857604051639996b31560e01b81526001600160a01b038516600482015260240161046c565b50806107ba565b80511561364f5780518082602001fd5b604051630a12f52160e11b815260040160405180910390fd5b6001600160a01b0381168114610762575f80fd5b803561368781613668565b919050565b5f806040838503121561369d575f80fd5b8235915060208301356136af81613668565b809150509250929050565b5f602082840312156136ca575f80fd5b81356107ba81613668565b60ff81168114610762575f80fd5b5f805f805f60a086880312156136f7575f80fd5b853561370281613668565b9450602086013561371281613668565b935060408601359250606086013561372981613668565b91506080860135613739816136d5565b809150509295509295909350565b5f8082840361012081121561375a575f80fd5b61010080821215613769575f80fd5b9395938601359450505050565b5f60208284031215613786575f80fd5b5035919050565b5f806040838503121561379e575f80fd5b82356001600160401b038111156137b3575f80fd5b830161016081860312156137c5575f80fd5b946020939093013593505050565b5f805f80606085870312156137e6575f80fd5b8435935060208501356137f881613668565b925060408501356001600160401b0380821115613813575f80fd5b818701915087601f830112613826575f80fd5b813581811115613834575f80fd5b886020828501011115613845575f80fd5b95989497505060200194505050565b5f805f60608486031215613866575f80fd5b83359250602084013561387881613668565b929592945050506040919091013590565b6020808252602e908201527f54656c65706f7274657252656769737472794170703a207a65726f2054656c6560408201526d706f72746572206164647265737360901b606082015260800190565b634e487b7160e01b5f52604160045260245ffd5b60405161010081016001600160401b038111828210171561390e5761390e6138d7565b60405290565b60405161016081016001600160401b038111828210171561390e5761390e6138d7565b604080519081016001600160401b038111828210171561390e5761390e6138d7565b604051601f8201601f191681016001600160401b0381118282101715613981576139816138d7565b604052919050565b5f610100828403121561399a575f80fd5b6139a26138eb565b8235815260208301356139b481613668565b602082015260408301356139c781613668565b60408201526139d86060840161367c565b60608201526080830135608082015260a083013560a082015260c083013560c0820152613a0760e0840161367c565b60e08201529392505050565b5f6001600160401b03821115613a2b57613a2b6138d7565b50601f01601f191660200190565b5f82601f830112613a48575f80fd5b8135613a5b613a5682613a13565b613959565b818152846020838601011115613a6f575f80fd5b816020850160208301375f918101602001919091529392505050565b5f6101608236031215613a9c575f80fd5b613aa4613914565b82358152613ab46020840161367c565b6020820152613ac56040840161367c565b604082015260608301356001600160401b03811115613ae2575f80fd5b613aee36828601613a39565b6060830152506080830135608082015260a083013560a0820152613b1460c0840161367c565b60c0820152613b2560e0840161367c565b60e0820152610100613b3881850161367c565b90820152610120838101359082015261014092830135928101929092525090565b5f60208284031215613b69575f80fd5b5051919050565b60208082526024908201527f53656e645265656e7472616e637947756172643a2073656e64207265656e7472604082015263616e637960e01b606082015260800190565b60208082526026908201527f546f6b656e486f6d653a206e6f6e2d7a65726f206d756c74692d686f702066616040820152656c6c6261636b60d01b606082015260800190565b634e487b7160e01b5f52602160045260245ffd5b81516001600160a01b03168152602080830151908201526040810161042a565b5f5b83811015613c48578181015183820152602001613c30565b50505f910152565b5f8151808452613c67816020860160208601613c2e565b601f01601f19169290920160200192915050565b602081525f825160058110613c9e57634e487b7160e01b5f52602160045260245ffd5b806020840152506020830151604080840152612b076060840182613c50565b5f6101208201905083518252602084015160018060a01b03808216602085015280604087015116604085015280606087015116606085015250506080840151608083015260a084015160a083015260c084015160c083015260e0840151613d2f60e08401826001600160a01b03169052565b50826101008301529392505050565b60208152815160208201525f602083015160018060a01b03808216604085015280604086015116606085015250506060830151613d8660808401826001600160a01b03169052565b50608083015160a083015260a08301516101008060c0850152613dad610120850183613c50565b915060c085015160e085015260e0850151613dd2828601826001600160a01b03169052565b5090949350505050565b60408152825160408201525f6020840151613e0260608401826001600160a01b03169052565b5060408401516001600160a01b03166080830152606084015161016060a08401819052613e336101a0850183613c50565b9150608086015160c085015260a086015160e085015260c0860151610100613e65818701836001600160a01b03169052565b60e08801519150610120613e83818801846001600160a01b03169052565b90880151915061014090613ea1878301846001600160a01b03169052565b880151928601929092525090940151610180830152506020015290565b5f82601f830112613ecd575f80fd5b8151613edb613a5682613a13565b818152846020838601011115613eef575f80fd5b612b07826020830160208701613c2e565b5f60208284031215613f10575f80fd5b81516001600160401b0380821115613f26575f80fd5b9083019060408286031215613f39575f80fd5b613f41613937565b825160058110613f4f575f80fd5b8152602083015182811115613f62575f80fd5b613f6e87828601613ebe565b60208301525095945050505050565b805161368781613668565b5f60408284031215613f98575f80fd5b613fa0613937565b8251613fab81613668565b81526020928301519281019290925250919050565b5f60208284031215613fd0575f80fd5b81516001600160401b0380821115613fe6575f80fd5b908301906101008286031215613ffa575f80fd5b6140026138eb565b8251815261401260208401613f7d565b602082015261402360408401613f7d565b604082015261403460608401613f7d565b60608201526080830151608082015260a083015182811115614054575f80fd5b61406087828601613ebe565b60a08301525060c083015160c082015261407c60e08401613f7d565b60e082015295945050505050565b5f60e0828403121561409a575f80fd5b60405160e081018181106001600160401b03821117156140bc576140bc6138d7565b6040528251815260208301516140d181613668565b602082015260408301516140e481613668565b80604083015250606083015160608201526080830151608082015260a083015160a082015260c083015161411781613668565b60c08201529392505050565b5f60208284031215614133575f80fd5b81516001600160401b0380821115614149575f80fd5b90830190610160828603121561415d575f80fd5b614165613914565b61416e83613f7d565b81526020830151602082015261418660408401613f7d565b604082015261419760608401613f7d565b60608201526080830151608082015260a0830151828111156141b7575f80fd5b6141c387828601613ebe565b60a08301525060c083015160c08201526141df60e08401613f7d565b60e0820152610100838101519082015261012091506141ff828401613f7d565b9181019190915261014091820151918101919091529392505050565b5f6060828403121561422b575f80fd5b604051606081018181106001600160401b038211171561424d5761424d6138d7565b604052825181526020830151614262816136d5565b60208201526040830151614275816136d5565b60408201529392505050565b6020808252818101527f546f6b656e486f6d653a2072656d6f7465206e6f742072656769737465726564604082015260600190565b634e487b7160e01b5f52601160045260245ffd5b8181038181111561042a5761042a6142b6565b60208082526022908201527f546f6b656e486f6d653a207a65726f20726571756972656420676173206c696d6040820152611a5d60f21b606082015260800190565b60208082526021908201527f546f6b656e486f6d653a206e6f6e2d7a65726f207365636f6e646172792066656040820152606560f81b606082015260800190565b8082018082111561042a5761042a6142b6565b6020808252825182820152828101516001600160a01b039081166040808501919091528401518051821660608501528083015160808501525f929161010085019190606087015160a0870152608087015160e060c08801528051938490528401925f92506101208701905b80841015614400578451831682529385019360019390930192908501906143de565b5060a0880151878203601f190160e0890152945061441e8186613c50565b98975050505050505050565b8681526001600160a01b0386811660208301528581166040830152841660608201526080810183905260c060a082018190525f9061441e90830184613c50565b634e487b7160e01b5f52601260045260245ffd5b5f8261448c5761448c61446a565b500690565b5f602082840312156144a1575f80fd5b81516107ba81613668565b60ff828116828216039081111561042a5761042a6142b6565b600181815b808511156144ff57815f19048211156144e5576144e56142b6565b808516156144f257918102915b93841c93908002906144ca565b509250929050565b5f826145155750600161042a565b8161452157505f61042a565b816001811461453757600281146145415761455d565b600191505061042a565b60ff841115614552576145526142b6565b50506001821b61042a565b5060208310610133831016604e8410600b8410161715614580575081810a61042a565b61458a83836144c5565b805f190482111561459d5761459d6142b6565b029392505050565b5f6107ba8383614507565b808202811582820484141761042a5761042a6142b6565b5f826145d5576145d561446a565b500490565b5f602082840312156145ea575f80fd5b815180151581146107ba575f80fd5b5f825161460a818460208701613c2e565b919091019291505056fe9316912b5a9db88acbe872c934fdd0a46c436c6dcba332d649c4d57c7bc9e6009316912b5a9db88acbe872c934fdd0a46c436c6dcba332d649c4d57c7bc9e602d2f1ed38b7d242bfb8b41862afb813a15193219a4bc717f2056607593e6c7500914a9547f6c3ddce1d5efbd9e687708f0d1d408ce129e8e1a88bce4f40e29500de77a4dc7391f6f8f2d9567915d687d3aee79e7a1fc7300392f2727e9a0f1d00a2646970667358221220eed07797a6ba88dde0a2fe869683f192fbb93dec6ee27cf4eee014b4907fe4f764736f6c6343000819003354656c65706f7274657252656769737472794170703a20696e76616c69642054", +} + +// ERC20TokenHomeABI is the input ABI used to generate the binding from. +// Deprecated: Use ERC20TokenHomeMetaData.ABI instead. +var ERC20TokenHomeABI = ERC20TokenHomeMetaData.ABI + +// ERC20TokenHomeBin is the compiled bytecode used for deploying new contracts. +// Deprecated: Use ERC20TokenHomeMetaData.Bin instead. +var ERC20TokenHomeBin = ERC20TokenHomeMetaData.Bin + +// DeployERC20TokenHome deploys a new Ethereum contract, binding an instance of ERC20TokenHome to it. +func DeployERC20TokenHome(auth *bind.TransactOpts, backend bind.ContractBackend, teleporterRegistryAddress common.Address, teleporterManager common.Address, minTeleporterVersion *big.Int, tokenAddress common.Address, tokenDecimals uint8) (common.Address, *types.Transaction, *ERC20TokenHome, error) { + parsed, err := ERC20TokenHomeMetaData.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(ERC20TokenHomeBin), backend, teleporterRegistryAddress, teleporterManager, minTeleporterVersion, tokenAddress, tokenDecimals) + if err != nil { + return common.Address{}, nil, nil, err + } + return address, tx, &ERC20TokenHome{ERC20TokenHomeCaller: ERC20TokenHomeCaller{contract: contract}, ERC20TokenHomeTransactor: ERC20TokenHomeTransactor{contract: contract}, ERC20TokenHomeFilterer: ERC20TokenHomeFilterer{contract: contract}}, nil +} + +// ERC20TokenHome is an auto generated Go binding around an Ethereum contract. +type ERC20TokenHome struct { + ERC20TokenHomeCaller // Read-only binding to the contract + ERC20TokenHomeTransactor // Write-only binding to the contract + ERC20TokenHomeFilterer // Log filterer for contract events +} + +// ERC20TokenHomeCaller is an auto generated read-only Go binding around an Ethereum contract. +type ERC20TokenHomeCaller struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// ERC20TokenHomeTransactor is an auto generated write-only Go binding around an Ethereum contract. +type ERC20TokenHomeTransactor struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// ERC20TokenHomeFilterer is an auto generated log filtering Go binding around an Ethereum contract events. +type ERC20TokenHomeFilterer struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// ERC20TokenHomeSession is an auto generated Go binding around an Ethereum contract, +// with pre-set call and transact options. +type ERC20TokenHomeSession struct { + Contract *ERC20TokenHome // 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 +} + +// ERC20TokenHomeCallerSession is an auto generated read-only Go binding around an Ethereum contract, +// with pre-set call options. +type ERC20TokenHomeCallerSession struct { + Contract *ERC20TokenHomeCaller // Generic contract caller binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session +} + +// ERC20TokenHomeTransactorSession is an auto generated write-only Go binding around an Ethereum contract, +// with pre-set transact options. +type ERC20TokenHomeTransactorSession struct { + Contract *ERC20TokenHomeTransactor // Generic contract transactor binding to set the session for + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// ERC20TokenHomeRaw is an auto generated low-level Go binding around an Ethereum contract. +type ERC20TokenHomeRaw struct { + Contract *ERC20TokenHome // Generic contract binding to access the raw methods on +} + +// ERC20TokenHomeCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. +type ERC20TokenHomeCallerRaw struct { + Contract *ERC20TokenHomeCaller // Generic read-only contract binding to access the raw methods on +} + +// ERC20TokenHomeTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. +type ERC20TokenHomeTransactorRaw struct { + Contract *ERC20TokenHomeTransactor // Generic write-only contract binding to access the raw methods on +} + +// NewERC20TokenHome creates a new instance of ERC20TokenHome, bound to a specific deployed contract. +func NewERC20TokenHome(address common.Address, backend bind.ContractBackend) (*ERC20TokenHome, error) { + contract, err := bindERC20TokenHome(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &ERC20TokenHome{ERC20TokenHomeCaller: ERC20TokenHomeCaller{contract: contract}, ERC20TokenHomeTransactor: ERC20TokenHomeTransactor{contract: contract}, ERC20TokenHomeFilterer: ERC20TokenHomeFilterer{contract: contract}}, nil +} + +// NewERC20TokenHomeCaller creates a new read-only instance of ERC20TokenHome, bound to a specific deployed contract. +func NewERC20TokenHomeCaller(address common.Address, caller bind.ContractCaller) (*ERC20TokenHomeCaller, error) { + contract, err := bindERC20TokenHome(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &ERC20TokenHomeCaller{contract: contract}, nil +} + +// NewERC20TokenHomeTransactor creates a new write-only instance of ERC20TokenHome, bound to a specific deployed contract. +func NewERC20TokenHomeTransactor(address common.Address, transactor bind.ContractTransactor) (*ERC20TokenHomeTransactor, error) { + contract, err := bindERC20TokenHome(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &ERC20TokenHomeTransactor{contract: contract}, nil +} + +// NewERC20TokenHomeFilterer creates a new log filterer instance of ERC20TokenHome, bound to a specific deployed contract. +func NewERC20TokenHomeFilterer(address common.Address, filterer bind.ContractFilterer) (*ERC20TokenHomeFilterer, error) { + contract, err := bindERC20TokenHome(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &ERC20TokenHomeFilterer{contract: contract}, nil +} + +// bindERC20TokenHome binds a generic wrapper to an already deployed contract. +func bindERC20TokenHome(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := ERC20TokenHomeMetaData.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 (_ERC20TokenHome *ERC20TokenHomeRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _ERC20TokenHome.Contract.ERC20TokenHomeCaller.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 (_ERC20TokenHome *ERC20TokenHomeRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _ERC20TokenHome.Contract.ERC20TokenHomeTransactor.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_ERC20TokenHome *ERC20TokenHomeRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _ERC20TokenHome.Contract.ERC20TokenHomeTransactor.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 (_ERC20TokenHome *ERC20TokenHomeCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _ERC20TokenHome.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 (_ERC20TokenHome *ERC20TokenHomeTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _ERC20TokenHome.Contract.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_ERC20TokenHome *ERC20TokenHomeTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _ERC20TokenHome.Contract.contract.Transact(opts, method, params...) +} + +// ERC20TOKENHOMESTORAGELOCATION is a free data retrieval call binding the contract method 0x4797735f. +// +// Solidity: function ERC20_TOKEN_HOME_STORAGE_LOCATION() view returns(bytes32) +func (_ERC20TokenHome *ERC20TokenHomeCaller) ERC20TOKENHOMESTORAGELOCATION(opts *bind.CallOpts) ([32]byte, error) { + var out []interface{} + err := _ERC20TokenHome.contract.Call(opts, &out, "ERC20_TOKEN_HOME_STORAGE_LOCATION") + + if err != nil { + return *new([32]byte), err + } + + out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) + + return out0, err + +} + +// ERC20TOKENHOMESTORAGELOCATION is a free data retrieval call binding the contract method 0x4797735f. +// +// Solidity: function ERC20_TOKEN_HOME_STORAGE_LOCATION() view returns(bytes32) +func (_ERC20TokenHome *ERC20TokenHomeSession) ERC20TOKENHOMESTORAGELOCATION() ([32]byte, error) { + return _ERC20TokenHome.Contract.ERC20TOKENHOMESTORAGELOCATION(&_ERC20TokenHome.CallOpts) +} + +// ERC20TOKENHOMESTORAGELOCATION is a free data retrieval call binding the contract method 0x4797735f. +// +// Solidity: function ERC20_TOKEN_HOME_STORAGE_LOCATION() view returns(bytes32) +func (_ERC20TokenHome *ERC20TokenHomeCallerSession) ERC20TOKENHOMESTORAGELOCATION() ([32]byte, error) { + return _ERC20TokenHome.Contract.ERC20TOKENHOMESTORAGELOCATION(&_ERC20TokenHome.CallOpts) +} + +// TELEPORTERREGISTRYAPPSTORAGELOCATION is a free data retrieval call binding the contract method 0x909a6ac0. +// +// Solidity: function TELEPORTER_REGISTRY_APP_STORAGE_LOCATION() view returns(bytes32) +func (_ERC20TokenHome *ERC20TokenHomeCaller) TELEPORTERREGISTRYAPPSTORAGELOCATION(opts *bind.CallOpts) ([32]byte, error) { + var out []interface{} + err := _ERC20TokenHome.contract.Call(opts, &out, "TELEPORTER_REGISTRY_APP_STORAGE_LOCATION") + + if err != nil { + return *new([32]byte), err + } + + out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) + + return out0, err + +} + +// TELEPORTERREGISTRYAPPSTORAGELOCATION is a free data retrieval call binding the contract method 0x909a6ac0. +// +// Solidity: function TELEPORTER_REGISTRY_APP_STORAGE_LOCATION() view returns(bytes32) +func (_ERC20TokenHome *ERC20TokenHomeSession) TELEPORTERREGISTRYAPPSTORAGELOCATION() ([32]byte, error) { + return _ERC20TokenHome.Contract.TELEPORTERREGISTRYAPPSTORAGELOCATION(&_ERC20TokenHome.CallOpts) +} + +// TELEPORTERREGISTRYAPPSTORAGELOCATION is a free data retrieval call binding the contract method 0x909a6ac0. +// +// Solidity: function TELEPORTER_REGISTRY_APP_STORAGE_LOCATION() view returns(bytes32) +func (_ERC20TokenHome *ERC20TokenHomeCallerSession) TELEPORTERREGISTRYAPPSTORAGELOCATION() ([32]byte, error) { + return _ERC20TokenHome.Contract.TELEPORTERREGISTRYAPPSTORAGELOCATION(&_ERC20TokenHome.CallOpts) +} + +// TOKENHOMESTORAGELOCATION is a free data retrieval call binding the contract method 0x62e3901b. +// +// Solidity: function TOKEN_HOME_STORAGE_LOCATION() view returns(bytes32) +func (_ERC20TokenHome *ERC20TokenHomeCaller) TOKENHOMESTORAGELOCATION(opts *bind.CallOpts) ([32]byte, error) { + var out []interface{} + err := _ERC20TokenHome.contract.Call(opts, &out, "TOKEN_HOME_STORAGE_LOCATION") + + if err != nil { + return *new([32]byte), err + } + + out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) + + return out0, err + +} + +// TOKENHOMESTORAGELOCATION is a free data retrieval call binding the contract method 0x62e3901b. +// +// Solidity: function TOKEN_HOME_STORAGE_LOCATION() view returns(bytes32) +func (_ERC20TokenHome *ERC20TokenHomeSession) TOKENHOMESTORAGELOCATION() ([32]byte, error) { + return _ERC20TokenHome.Contract.TOKENHOMESTORAGELOCATION(&_ERC20TokenHome.CallOpts) +} + +// TOKENHOMESTORAGELOCATION is a free data retrieval call binding the contract method 0x62e3901b. +// +// Solidity: function TOKEN_HOME_STORAGE_LOCATION() view returns(bytes32) +func (_ERC20TokenHome *ERC20TokenHomeCallerSession) TOKENHOMESTORAGELOCATION() ([32]byte, error) { + return _ERC20TokenHome.Contract.TOKENHOMESTORAGELOCATION(&_ERC20TokenHome.CallOpts) +} + +// GetBlockchainID is a free data retrieval call binding the contract method 0x4213cf78. +// +// Solidity: function getBlockchainID() view returns(bytes32) +func (_ERC20TokenHome *ERC20TokenHomeCaller) GetBlockchainID(opts *bind.CallOpts) ([32]byte, error) { + var out []interface{} + err := _ERC20TokenHome.contract.Call(opts, &out, "getBlockchainID") + + if err != nil { + return *new([32]byte), err + } + + out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) + + return out0, err + +} + +// GetBlockchainID is a free data retrieval call binding the contract method 0x4213cf78. +// +// Solidity: function getBlockchainID() view returns(bytes32) +func (_ERC20TokenHome *ERC20TokenHomeSession) GetBlockchainID() ([32]byte, error) { + return _ERC20TokenHome.Contract.GetBlockchainID(&_ERC20TokenHome.CallOpts) +} + +// GetBlockchainID is a free data retrieval call binding the contract method 0x4213cf78. +// +// Solidity: function getBlockchainID() view returns(bytes32) +func (_ERC20TokenHome *ERC20TokenHomeCallerSession) GetBlockchainID() ([32]byte, error) { + return _ERC20TokenHome.Contract.GetBlockchainID(&_ERC20TokenHome.CallOpts) +} + +// GetMinTeleporterVersion is a free data retrieval call binding the contract method 0xd2cc7a70. +// +// Solidity: function getMinTeleporterVersion() view returns(uint256) +func (_ERC20TokenHome *ERC20TokenHomeCaller) GetMinTeleporterVersion(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _ERC20TokenHome.contract.Call(opts, &out, "getMinTeleporterVersion") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// GetMinTeleporterVersion is a free data retrieval call binding the contract method 0xd2cc7a70. +// +// Solidity: function getMinTeleporterVersion() view returns(uint256) +func (_ERC20TokenHome *ERC20TokenHomeSession) GetMinTeleporterVersion() (*big.Int, error) { + return _ERC20TokenHome.Contract.GetMinTeleporterVersion(&_ERC20TokenHome.CallOpts) +} + +// GetMinTeleporterVersion is a free data retrieval call binding the contract method 0xd2cc7a70. +// +// Solidity: function getMinTeleporterVersion() view returns(uint256) +func (_ERC20TokenHome *ERC20TokenHomeCallerSession) GetMinTeleporterVersion() (*big.Int, error) { + return _ERC20TokenHome.Contract.GetMinTeleporterVersion(&_ERC20TokenHome.CallOpts) +} + +// GetRemoteTokenTransferrerSettings is a free data retrieval call binding the contract method 0xc8511ada. +// +// Solidity: function getRemoteTokenTransferrerSettings(bytes32 remoteBlockchainID, address remoteTokenTransferrerAddress) view returns((bool,uint256,uint256,bool)) +func (_ERC20TokenHome *ERC20TokenHomeCaller) GetRemoteTokenTransferrerSettings(opts *bind.CallOpts, remoteBlockchainID [32]byte, remoteTokenTransferrerAddress common.Address) (RemoteTokenTransferrerSettings, error) { + var out []interface{} + err := _ERC20TokenHome.contract.Call(opts, &out, "getRemoteTokenTransferrerSettings", remoteBlockchainID, remoteTokenTransferrerAddress) + + if err != nil { + return *new(RemoteTokenTransferrerSettings), err + } + + out0 := *abi.ConvertType(out[0], new(RemoteTokenTransferrerSettings)).(*RemoteTokenTransferrerSettings) + + return out0, err + +} + +// GetRemoteTokenTransferrerSettings is a free data retrieval call binding the contract method 0xc8511ada. +// +// Solidity: function getRemoteTokenTransferrerSettings(bytes32 remoteBlockchainID, address remoteTokenTransferrerAddress) view returns((bool,uint256,uint256,bool)) +func (_ERC20TokenHome *ERC20TokenHomeSession) GetRemoteTokenTransferrerSettings(remoteBlockchainID [32]byte, remoteTokenTransferrerAddress common.Address) (RemoteTokenTransferrerSettings, error) { + return _ERC20TokenHome.Contract.GetRemoteTokenTransferrerSettings(&_ERC20TokenHome.CallOpts, remoteBlockchainID, remoteTokenTransferrerAddress) +} + +// GetRemoteTokenTransferrerSettings is a free data retrieval call binding the contract method 0xc8511ada. +// +// Solidity: function getRemoteTokenTransferrerSettings(bytes32 remoteBlockchainID, address remoteTokenTransferrerAddress) view returns((bool,uint256,uint256,bool)) +func (_ERC20TokenHome *ERC20TokenHomeCallerSession) GetRemoteTokenTransferrerSettings(remoteBlockchainID [32]byte, remoteTokenTransferrerAddress common.Address) (RemoteTokenTransferrerSettings, error) { + return _ERC20TokenHome.Contract.GetRemoteTokenTransferrerSettings(&_ERC20TokenHome.CallOpts, remoteBlockchainID, remoteTokenTransferrerAddress) +} + +// GetTokenAddress is a free data retrieval call binding the contract method 0x10fe9ae8. +// +// Solidity: function getTokenAddress() view returns(address) +func (_ERC20TokenHome *ERC20TokenHomeCaller) GetTokenAddress(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _ERC20TokenHome.contract.Call(opts, &out, "getTokenAddress") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// GetTokenAddress is a free data retrieval call binding the contract method 0x10fe9ae8. +// +// Solidity: function getTokenAddress() view returns(address) +func (_ERC20TokenHome *ERC20TokenHomeSession) GetTokenAddress() (common.Address, error) { + return _ERC20TokenHome.Contract.GetTokenAddress(&_ERC20TokenHome.CallOpts) +} + +// GetTokenAddress is a free data retrieval call binding the contract method 0x10fe9ae8. +// +// Solidity: function getTokenAddress() view returns(address) +func (_ERC20TokenHome *ERC20TokenHomeCallerSession) GetTokenAddress() (common.Address, error) { + return _ERC20TokenHome.Contract.GetTokenAddress(&_ERC20TokenHome.CallOpts) +} + +// GetTransferredBalance is a free data retrieval call binding the contract method 0x154d625a. +// +// Solidity: function getTransferredBalance(bytes32 remoteBlockchainID, address remoteTokenTransferrerAddress) view returns(uint256) +func (_ERC20TokenHome *ERC20TokenHomeCaller) GetTransferredBalance(opts *bind.CallOpts, remoteBlockchainID [32]byte, remoteTokenTransferrerAddress common.Address) (*big.Int, error) { + var out []interface{} + err := _ERC20TokenHome.contract.Call(opts, &out, "getTransferredBalance", remoteBlockchainID, remoteTokenTransferrerAddress) + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// GetTransferredBalance is a free data retrieval call binding the contract method 0x154d625a. +// +// Solidity: function getTransferredBalance(bytes32 remoteBlockchainID, address remoteTokenTransferrerAddress) view returns(uint256) +func (_ERC20TokenHome *ERC20TokenHomeSession) GetTransferredBalance(remoteBlockchainID [32]byte, remoteTokenTransferrerAddress common.Address) (*big.Int, error) { + return _ERC20TokenHome.Contract.GetTransferredBalance(&_ERC20TokenHome.CallOpts, remoteBlockchainID, remoteTokenTransferrerAddress) +} + +// GetTransferredBalance is a free data retrieval call binding the contract method 0x154d625a. +// +// Solidity: function getTransferredBalance(bytes32 remoteBlockchainID, address remoteTokenTransferrerAddress) view returns(uint256) +func (_ERC20TokenHome *ERC20TokenHomeCallerSession) GetTransferredBalance(remoteBlockchainID [32]byte, remoteTokenTransferrerAddress common.Address) (*big.Int, error) { + return _ERC20TokenHome.Contract.GetTransferredBalance(&_ERC20TokenHome.CallOpts, remoteBlockchainID, remoteTokenTransferrerAddress) +} + +// IsTeleporterAddressPaused is a free data retrieval call binding the contract method 0x97314297. +// +// Solidity: function isTeleporterAddressPaused(address teleporterAddress) view returns(bool) +func (_ERC20TokenHome *ERC20TokenHomeCaller) IsTeleporterAddressPaused(opts *bind.CallOpts, teleporterAddress common.Address) (bool, error) { + var out []interface{} + err := _ERC20TokenHome.contract.Call(opts, &out, "isTeleporterAddressPaused", teleporterAddress) + + if err != nil { + return *new(bool), err + } + + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + + return out0, err + +} + +// IsTeleporterAddressPaused is a free data retrieval call binding the contract method 0x97314297. +// +// Solidity: function isTeleporterAddressPaused(address teleporterAddress) view returns(bool) +func (_ERC20TokenHome *ERC20TokenHomeSession) IsTeleporterAddressPaused(teleporterAddress common.Address) (bool, error) { + return _ERC20TokenHome.Contract.IsTeleporterAddressPaused(&_ERC20TokenHome.CallOpts, teleporterAddress) +} + +// IsTeleporterAddressPaused is a free data retrieval call binding the contract method 0x97314297. +// +// Solidity: function isTeleporterAddressPaused(address teleporterAddress) view returns(bool) +func (_ERC20TokenHome *ERC20TokenHomeCallerSession) IsTeleporterAddressPaused(teleporterAddress common.Address) (bool, error) { + return _ERC20TokenHome.Contract.IsTeleporterAddressPaused(&_ERC20TokenHome.CallOpts, teleporterAddress) +} + +// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. +// +// Solidity: function owner() view returns(address) +func (_ERC20TokenHome *ERC20TokenHomeCaller) Owner(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _ERC20TokenHome.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 (_ERC20TokenHome *ERC20TokenHomeSession) Owner() (common.Address, error) { + return _ERC20TokenHome.Contract.Owner(&_ERC20TokenHome.CallOpts) +} + +// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. +// +// Solidity: function owner() view returns(address) +func (_ERC20TokenHome *ERC20TokenHomeCallerSession) Owner() (common.Address, error) { + return _ERC20TokenHome.Contract.Owner(&_ERC20TokenHome.CallOpts) +} + +// AddCollateral is a paid mutator transaction binding the contract method 0xfd658268. +// +// Solidity: function addCollateral(bytes32 remoteBlockchainID, address remoteTokenTransferrerAddress, uint256 amount) returns() +func (_ERC20TokenHome *ERC20TokenHomeTransactor) AddCollateral(opts *bind.TransactOpts, remoteBlockchainID [32]byte, remoteTokenTransferrerAddress common.Address, amount *big.Int) (*types.Transaction, error) { + return _ERC20TokenHome.contract.Transact(opts, "addCollateral", remoteBlockchainID, remoteTokenTransferrerAddress, amount) +} + +// AddCollateral is a paid mutator transaction binding the contract method 0xfd658268. +// +// Solidity: function addCollateral(bytes32 remoteBlockchainID, address remoteTokenTransferrerAddress, uint256 amount) returns() +func (_ERC20TokenHome *ERC20TokenHomeSession) AddCollateral(remoteBlockchainID [32]byte, remoteTokenTransferrerAddress common.Address, amount *big.Int) (*types.Transaction, error) { + return _ERC20TokenHome.Contract.AddCollateral(&_ERC20TokenHome.TransactOpts, remoteBlockchainID, remoteTokenTransferrerAddress, amount) +} + +// AddCollateral is a paid mutator transaction binding the contract method 0xfd658268. +// +// Solidity: function addCollateral(bytes32 remoteBlockchainID, address remoteTokenTransferrerAddress, uint256 amount) returns() +func (_ERC20TokenHome *ERC20TokenHomeTransactorSession) AddCollateral(remoteBlockchainID [32]byte, remoteTokenTransferrerAddress common.Address, amount *big.Int) (*types.Transaction, error) { + return _ERC20TokenHome.Contract.AddCollateral(&_ERC20TokenHome.TransactOpts, remoteBlockchainID, remoteTokenTransferrerAddress, amount) +} + +// Initialize is a paid mutator transaction binding the contract method 0x3bb03890. +// +// Solidity: function initialize(address teleporterRegistryAddress, address teleporterManager, uint256 minTeleporterVersion, address tokenAddress, uint8 tokenDecimals) returns() +func (_ERC20TokenHome *ERC20TokenHomeTransactor) Initialize(opts *bind.TransactOpts, teleporterRegistryAddress common.Address, teleporterManager common.Address, minTeleporterVersion *big.Int, tokenAddress common.Address, tokenDecimals uint8) (*types.Transaction, error) { + return _ERC20TokenHome.contract.Transact(opts, "initialize", teleporterRegistryAddress, teleporterManager, minTeleporterVersion, tokenAddress, tokenDecimals) +} + +// Initialize is a paid mutator transaction binding the contract method 0x3bb03890. +// +// Solidity: function initialize(address teleporterRegistryAddress, address teleporterManager, uint256 minTeleporterVersion, address tokenAddress, uint8 tokenDecimals) returns() +func (_ERC20TokenHome *ERC20TokenHomeSession) Initialize(teleporterRegistryAddress common.Address, teleporterManager common.Address, minTeleporterVersion *big.Int, tokenAddress common.Address, tokenDecimals uint8) (*types.Transaction, error) { + return _ERC20TokenHome.Contract.Initialize(&_ERC20TokenHome.TransactOpts, teleporterRegistryAddress, teleporterManager, minTeleporterVersion, tokenAddress, tokenDecimals) +} + +// Initialize is a paid mutator transaction binding the contract method 0x3bb03890. +// +// Solidity: function initialize(address teleporterRegistryAddress, address teleporterManager, uint256 minTeleporterVersion, address tokenAddress, uint8 tokenDecimals) returns() +func (_ERC20TokenHome *ERC20TokenHomeTransactorSession) Initialize(teleporterRegistryAddress common.Address, teleporterManager common.Address, minTeleporterVersion *big.Int, tokenAddress common.Address, tokenDecimals uint8) (*types.Transaction, error) { + return _ERC20TokenHome.Contract.Initialize(&_ERC20TokenHome.TransactOpts, teleporterRegistryAddress, teleporterManager, minTeleporterVersion, tokenAddress, tokenDecimals) +} + +// PauseTeleporterAddress is a paid mutator transaction binding the contract method 0x2b0d8f18. +// +// Solidity: function pauseTeleporterAddress(address teleporterAddress) returns() +func (_ERC20TokenHome *ERC20TokenHomeTransactor) PauseTeleporterAddress(opts *bind.TransactOpts, teleporterAddress common.Address) (*types.Transaction, error) { + return _ERC20TokenHome.contract.Transact(opts, "pauseTeleporterAddress", teleporterAddress) +} + +// PauseTeleporterAddress is a paid mutator transaction binding the contract method 0x2b0d8f18. +// +// Solidity: function pauseTeleporterAddress(address teleporterAddress) returns() +func (_ERC20TokenHome *ERC20TokenHomeSession) PauseTeleporterAddress(teleporterAddress common.Address) (*types.Transaction, error) { + return _ERC20TokenHome.Contract.PauseTeleporterAddress(&_ERC20TokenHome.TransactOpts, teleporterAddress) +} + +// PauseTeleporterAddress is a paid mutator transaction binding the contract method 0x2b0d8f18. +// +// Solidity: function pauseTeleporterAddress(address teleporterAddress) returns() +func (_ERC20TokenHome *ERC20TokenHomeTransactorSession) PauseTeleporterAddress(teleporterAddress common.Address) (*types.Transaction, error) { + return _ERC20TokenHome.Contract.PauseTeleporterAddress(&_ERC20TokenHome.TransactOpts, teleporterAddress) +} + +// ReceiveTeleporterMessage is a paid mutator transaction binding the contract method 0xc868efaa. +// +// Solidity: function receiveTeleporterMessage(bytes32 sourceBlockchainID, address originSenderAddress, bytes message) returns() +func (_ERC20TokenHome *ERC20TokenHomeTransactor) ReceiveTeleporterMessage(opts *bind.TransactOpts, sourceBlockchainID [32]byte, originSenderAddress common.Address, message []byte) (*types.Transaction, error) { + return _ERC20TokenHome.contract.Transact(opts, "receiveTeleporterMessage", sourceBlockchainID, originSenderAddress, message) +} + +// ReceiveTeleporterMessage is a paid mutator transaction binding the contract method 0xc868efaa. +// +// Solidity: function receiveTeleporterMessage(bytes32 sourceBlockchainID, address originSenderAddress, bytes message) returns() +func (_ERC20TokenHome *ERC20TokenHomeSession) ReceiveTeleporterMessage(sourceBlockchainID [32]byte, originSenderAddress common.Address, message []byte) (*types.Transaction, error) { + return _ERC20TokenHome.Contract.ReceiveTeleporterMessage(&_ERC20TokenHome.TransactOpts, sourceBlockchainID, originSenderAddress, message) +} + +// ReceiveTeleporterMessage is a paid mutator transaction binding the contract method 0xc868efaa. +// +// Solidity: function receiveTeleporterMessage(bytes32 sourceBlockchainID, address originSenderAddress, bytes message) returns() +func (_ERC20TokenHome *ERC20TokenHomeTransactorSession) ReceiveTeleporterMessage(sourceBlockchainID [32]byte, originSenderAddress common.Address, message []byte) (*types.Transaction, error) { + return _ERC20TokenHome.Contract.ReceiveTeleporterMessage(&_ERC20TokenHome.TransactOpts, sourceBlockchainID, originSenderAddress, message) +} + +// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. +// +// Solidity: function renounceOwnership() returns() +func (_ERC20TokenHome *ERC20TokenHomeTransactor) RenounceOwnership(opts *bind.TransactOpts) (*types.Transaction, error) { + return _ERC20TokenHome.contract.Transact(opts, "renounceOwnership") +} + +// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. +// +// Solidity: function renounceOwnership() returns() +func (_ERC20TokenHome *ERC20TokenHomeSession) RenounceOwnership() (*types.Transaction, error) { + return _ERC20TokenHome.Contract.RenounceOwnership(&_ERC20TokenHome.TransactOpts) +} + +// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. +// +// Solidity: function renounceOwnership() returns() +func (_ERC20TokenHome *ERC20TokenHomeTransactorSession) RenounceOwnership() (*types.Transaction, error) { + return _ERC20TokenHome.Contract.RenounceOwnership(&_ERC20TokenHome.TransactOpts) +} + +// Send is a paid mutator transaction binding the contract method 0x5d16225d. +// +// Solidity: function send((bytes32,address,address,address,uint256,uint256,uint256,address) input, uint256 amount) returns() +func (_ERC20TokenHome *ERC20TokenHomeTransactor) Send(opts *bind.TransactOpts, input SendTokensInput, amount *big.Int) (*types.Transaction, error) { + return _ERC20TokenHome.contract.Transact(opts, "send", input, amount) +} + +// Send is a paid mutator transaction binding the contract method 0x5d16225d. +// +// Solidity: function send((bytes32,address,address,address,uint256,uint256,uint256,address) input, uint256 amount) returns() +func (_ERC20TokenHome *ERC20TokenHomeSession) Send(input SendTokensInput, amount *big.Int) (*types.Transaction, error) { + return _ERC20TokenHome.Contract.Send(&_ERC20TokenHome.TransactOpts, input, amount) +} + +// Send is a paid mutator transaction binding the contract method 0x5d16225d. +// +// Solidity: function send((bytes32,address,address,address,uint256,uint256,uint256,address) input, uint256 amount) returns() +func (_ERC20TokenHome *ERC20TokenHomeTransactorSession) Send(input SendTokensInput, amount *big.Int) (*types.Transaction, error) { + return _ERC20TokenHome.Contract.Send(&_ERC20TokenHome.TransactOpts, input, amount) +} + +// SendAndCall is a paid mutator transaction binding the contract method 0x65690038. +// +// Solidity: function sendAndCall((bytes32,address,address,bytes,uint256,uint256,address,address,address,uint256,uint256) input, uint256 amount) returns() +func (_ERC20TokenHome *ERC20TokenHomeTransactor) SendAndCall(opts *bind.TransactOpts, input SendAndCallInput, amount *big.Int) (*types.Transaction, error) { + return _ERC20TokenHome.contract.Transact(opts, "sendAndCall", input, amount) +} + +// SendAndCall is a paid mutator transaction binding the contract method 0x65690038. +// +// Solidity: function sendAndCall((bytes32,address,address,bytes,uint256,uint256,address,address,address,uint256,uint256) input, uint256 amount) returns() +func (_ERC20TokenHome *ERC20TokenHomeSession) SendAndCall(input SendAndCallInput, amount *big.Int) (*types.Transaction, error) { + return _ERC20TokenHome.Contract.SendAndCall(&_ERC20TokenHome.TransactOpts, input, amount) +} + +// SendAndCall is a paid mutator transaction binding the contract method 0x65690038. +// +// Solidity: function sendAndCall((bytes32,address,address,bytes,uint256,uint256,address,address,address,uint256,uint256) input, uint256 amount) returns() +func (_ERC20TokenHome *ERC20TokenHomeTransactorSession) SendAndCall(input SendAndCallInput, amount *big.Int) (*types.Transaction, error) { + return _ERC20TokenHome.Contract.SendAndCall(&_ERC20TokenHome.TransactOpts, input, amount) +} + +// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// +// Solidity: function transferOwnership(address newOwner) returns() +func (_ERC20TokenHome *ERC20TokenHomeTransactor) TransferOwnership(opts *bind.TransactOpts, newOwner common.Address) (*types.Transaction, error) { + return _ERC20TokenHome.contract.Transact(opts, "transferOwnership", newOwner) +} + +// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// +// Solidity: function transferOwnership(address newOwner) returns() +func (_ERC20TokenHome *ERC20TokenHomeSession) TransferOwnership(newOwner common.Address) (*types.Transaction, error) { + return _ERC20TokenHome.Contract.TransferOwnership(&_ERC20TokenHome.TransactOpts, newOwner) +} + +// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// +// Solidity: function transferOwnership(address newOwner) returns() +func (_ERC20TokenHome *ERC20TokenHomeTransactorSession) TransferOwnership(newOwner common.Address) (*types.Transaction, error) { + return _ERC20TokenHome.Contract.TransferOwnership(&_ERC20TokenHome.TransactOpts, newOwner) +} + +// UnpauseTeleporterAddress is a paid mutator transaction binding the contract method 0x4511243e. +// +// Solidity: function unpauseTeleporterAddress(address teleporterAddress) returns() +func (_ERC20TokenHome *ERC20TokenHomeTransactor) UnpauseTeleporterAddress(opts *bind.TransactOpts, teleporterAddress common.Address) (*types.Transaction, error) { + return _ERC20TokenHome.contract.Transact(opts, "unpauseTeleporterAddress", teleporterAddress) +} + +// UnpauseTeleporterAddress is a paid mutator transaction binding the contract method 0x4511243e. +// +// Solidity: function unpauseTeleporterAddress(address teleporterAddress) returns() +func (_ERC20TokenHome *ERC20TokenHomeSession) UnpauseTeleporterAddress(teleporterAddress common.Address) (*types.Transaction, error) { + return _ERC20TokenHome.Contract.UnpauseTeleporterAddress(&_ERC20TokenHome.TransactOpts, teleporterAddress) +} + +// UnpauseTeleporterAddress is a paid mutator transaction binding the contract method 0x4511243e. +// +// Solidity: function unpauseTeleporterAddress(address teleporterAddress) returns() +func (_ERC20TokenHome *ERC20TokenHomeTransactorSession) UnpauseTeleporterAddress(teleporterAddress common.Address) (*types.Transaction, error) { + return _ERC20TokenHome.Contract.UnpauseTeleporterAddress(&_ERC20TokenHome.TransactOpts, teleporterAddress) +} + +// UpdateMinTeleporterVersion is a paid mutator transaction binding the contract method 0x5eb99514. +// +// Solidity: function updateMinTeleporterVersion(uint256 version) returns() +func (_ERC20TokenHome *ERC20TokenHomeTransactor) UpdateMinTeleporterVersion(opts *bind.TransactOpts, version *big.Int) (*types.Transaction, error) { + return _ERC20TokenHome.contract.Transact(opts, "updateMinTeleporterVersion", version) +} + +// UpdateMinTeleporterVersion is a paid mutator transaction binding the contract method 0x5eb99514. +// +// Solidity: function updateMinTeleporterVersion(uint256 version) returns() +func (_ERC20TokenHome *ERC20TokenHomeSession) UpdateMinTeleporterVersion(version *big.Int) (*types.Transaction, error) { + return _ERC20TokenHome.Contract.UpdateMinTeleporterVersion(&_ERC20TokenHome.TransactOpts, version) +} + +// UpdateMinTeleporterVersion is a paid mutator transaction binding the contract method 0x5eb99514. +// +// Solidity: function updateMinTeleporterVersion(uint256 version) returns() +func (_ERC20TokenHome *ERC20TokenHomeTransactorSession) UpdateMinTeleporterVersion(version *big.Int) (*types.Transaction, error) { + return _ERC20TokenHome.Contract.UpdateMinTeleporterVersion(&_ERC20TokenHome.TransactOpts, version) +} + +// ERC20TokenHomeCallFailedIterator is returned from FilterCallFailed and is used to iterate over the raw logs and unpacked data for CallFailed events raised by the ERC20TokenHome contract. +type ERC20TokenHomeCallFailedIterator struct { + Event *ERC20TokenHomeCallFailed // 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 interfaces.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 *ERC20TokenHomeCallFailedIterator) 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(ERC20TokenHomeCallFailed) + 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(ERC20TokenHomeCallFailed) + 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 *ERC20TokenHomeCallFailedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *ERC20TokenHomeCallFailedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// ERC20TokenHomeCallFailed represents a CallFailed event raised by the ERC20TokenHome contract. +type ERC20TokenHomeCallFailed struct { + RecipientContract common.Address + Amount *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterCallFailed is a free log retrieval operation binding the contract event 0xb9eaeae386d339f8115782f297a9e5f0e13fb587cd6b0d502f113cb8dd4d6cb0. +// +// Solidity: event CallFailed(address indexed recipientContract, uint256 amount) +func (_ERC20TokenHome *ERC20TokenHomeFilterer) FilterCallFailed(opts *bind.FilterOpts, recipientContract []common.Address) (*ERC20TokenHomeCallFailedIterator, error) { + + var recipientContractRule []interface{} + for _, recipientContractItem := range recipientContract { + recipientContractRule = append(recipientContractRule, recipientContractItem) + } + + logs, sub, err := _ERC20TokenHome.contract.FilterLogs(opts, "CallFailed", recipientContractRule) + if err != nil { + return nil, err + } + return &ERC20TokenHomeCallFailedIterator{contract: _ERC20TokenHome.contract, event: "CallFailed", logs: logs, sub: sub}, nil +} + +// WatchCallFailed is a free log subscription operation binding the contract event 0xb9eaeae386d339f8115782f297a9e5f0e13fb587cd6b0d502f113cb8dd4d6cb0. +// +// Solidity: event CallFailed(address indexed recipientContract, uint256 amount) +func (_ERC20TokenHome *ERC20TokenHomeFilterer) WatchCallFailed(opts *bind.WatchOpts, sink chan<- *ERC20TokenHomeCallFailed, recipientContract []common.Address) (event.Subscription, error) { + + var recipientContractRule []interface{} + for _, recipientContractItem := range recipientContract { + recipientContractRule = append(recipientContractRule, recipientContractItem) + } + + logs, sub, err := _ERC20TokenHome.contract.WatchLogs(opts, "CallFailed", recipientContractRule) + 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(ERC20TokenHomeCallFailed) + if err := _ERC20TokenHome.contract.UnpackLog(event, "CallFailed", 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 +} + +// ParseCallFailed is a log parse operation binding the contract event 0xb9eaeae386d339f8115782f297a9e5f0e13fb587cd6b0d502f113cb8dd4d6cb0. +// +// Solidity: event CallFailed(address indexed recipientContract, uint256 amount) +func (_ERC20TokenHome *ERC20TokenHomeFilterer) ParseCallFailed(log types.Log) (*ERC20TokenHomeCallFailed, error) { + event := new(ERC20TokenHomeCallFailed) + if err := _ERC20TokenHome.contract.UnpackLog(event, "CallFailed", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// ERC20TokenHomeCallSucceededIterator is returned from FilterCallSucceeded and is used to iterate over the raw logs and unpacked data for CallSucceeded events raised by the ERC20TokenHome contract. +type ERC20TokenHomeCallSucceededIterator struct { + Event *ERC20TokenHomeCallSucceeded // 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 interfaces.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 *ERC20TokenHomeCallSucceededIterator) 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(ERC20TokenHomeCallSucceeded) + 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(ERC20TokenHomeCallSucceeded) + 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 *ERC20TokenHomeCallSucceededIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *ERC20TokenHomeCallSucceededIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// ERC20TokenHomeCallSucceeded represents a CallSucceeded event raised by the ERC20TokenHome contract. +type ERC20TokenHomeCallSucceeded struct { + RecipientContract common.Address + Amount *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterCallSucceeded is a free log retrieval operation binding the contract event 0x104deb555f67e63782bb817bc26c39050894645f9b9f29c4be8ae68d0e8b7ff4. +// +// Solidity: event CallSucceeded(address indexed recipientContract, uint256 amount) +func (_ERC20TokenHome *ERC20TokenHomeFilterer) FilterCallSucceeded(opts *bind.FilterOpts, recipientContract []common.Address) (*ERC20TokenHomeCallSucceededIterator, error) { + + var recipientContractRule []interface{} + for _, recipientContractItem := range recipientContract { + recipientContractRule = append(recipientContractRule, recipientContractItem) + } + + logs, sub, err := _ERC20TokenHome.contract.FilterLogs(opts, "CallSucceeded", recipientContractRule) + if err != nil { + return nil, err + } + return &ERC20TokenHomeCallSucceededIterator{contract: _ERC20TokenHome.contract, event: "CallSucceeded", logs: logs, sub: sub}, nil +} + +// WatchCallSucceeded is a free log subscription operation binding the contract event 0x104deb555f67e63782bb817bc26c39050894645f9b9f29c4be8ae68d0e8b7ff4. +// +// Solidity: event CallSucceeded(address indexed recipientContract, uint256 amount) +func (_ERC20TokenHome *ERC20TokenHomeFilterer) WatchCallSucceeded(opts *bind.WatchOpts, sink chan<- *ERC20TokenHomeCallSucceeded, recipientContract []common.Address) (event.Subscription, error) { + + var recipientContractRule []interface{} + for _, recipientContractItem := range recipientContract { + recipientContractRule = append(recipientContractRule, recipientContractItem) + } + + logs, sub, err := _ERC20TokenHome.contract.WatchLogs(opts, "CallSucceeded", recipientContractRule) + 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(ERC20TokenHomeCallSucceeded) + if err := _ERC20TokenHome.contract.UnpackLog(event, "CallSucceeded", 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 +} + +// ParseCallSucceeded is a log parse operation binding the contract event 0x104deb555f67e63782bb817bc26c39050894645f9b9f29c4be8ae68d0e8b7ff4. +// +// Solidity: event CallSucceeded(address indexed recipientContract, uint256 amount) +func (_ERC20TokenHome *ERC20TokenHomeFilterer) ParseCallSucceeded(log types.Log) (*ERC20TokenHomeCallSucceeded, error) { + event := new(ERC20TokenHomeCallSucceeded) + if err := _ERC20TokenHome.contract.UnpackLog(event, "CallSucceeded", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// ERC20TokenHomeCollateralAddedIterator is returned from FilterCollateralAdded and is used to iterate over the raw logs and unpacked data for CollateralAdded events raised by the ERC20TokenHome contract. +type ERC20TokenHomeCollateralAddedIterator struct { + Event *ERC20TokenHomeCollateralAdded // 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 interfaces.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 *ERC20TokenHomeCollateralAddedIterator) 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(ERC20TokenHomeCollateralAdded) + 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(ERC20TokenHomeCollateralAdded) + 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 *ERC20TokenHomeCollateralAddedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *ERC20TokenHomeCollateralAddedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// ERC20TokenHomeCollateralAdded represents a CollateralAdded event raised by the ERC20TokenHome contract. +type ERC20TokenHomeCollateralAdded struct { + RemoteBlockchainID [32]byte + RemoteTokenTransferrerAddress common.Address + Amount *big.Int + Remaining *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterCollateralAdded is a free log retrieval operation binding the contract event 0x6769a5f9bfc8b6e0db839ab981cbf9239274ae72d2d035081a9157d43bd33cb6. +// +// Solidity: event CollateralAdded(bytes32 indexed remoteBlockchainID, address indexed remoteTokenTransferrerAddress, uint256 amount, uint256 remaining) +func (_ERC20TokenHome *ERC20TokenHomeFilterer) FilterCollateralAdded(opts *bind.FilterOpts, remoteBlockchainID [][32]byte, remoteTokenTransferrerAddress []common.Address) (*ERC20TokenHomeCollateralAddedIterator, error) { + + var remoteBlockchainIDRule []interface{} + for _, remoteBlockchainIDItem := range remoteBlockchainID { + remoteBlockchainIDRule = append(remoteBlockchainIDRule, remoteBlockchainIDItem) + } + var remoteTokenTransferrerAddressRule []interface{} + for _, remoteTokenTransferrerAddressItem := range remoteTokenTransferrerAddress { + remoteTokenTransferrerAddressRule = append(remoteTokenTransferrerAddressRule, remoteTokenTransferrerAddressItem) + } + + logs, sub, err := _ERC20TokenHome.contract.FilterLogs(opts, "CollateralAdded", remoteBlockchainIDRule, remoteTokenTransferrerAddressRule) + if err != nil { + return nil, err + } + return &ERC20TokenHomeCollateralAddedIterator{contract: _ERC20TokenHome.contract, event: "CollateralAdded", logs: logs, sub: sub}, nil +} + +// WatchCollateralAdded is a free log subscription operation binding the contract event 0x6769a5f9bfc8b6e0db839ab981cbf9239274ae72d2d035081a9157d43bd33cb6. +// +// Solidity: event CollateralAdded(bytes32 indexed remoteBlockchainID, address indexed remoteTokenTransferrerAddress, uint256 amount, uint256 remaining) +func (_ERC20TokenHome *ERC20TokenHomeFilterer) WatchCollateralAdded(opts *bind.WatchOpts, sink chan<- *ERC20TokenHomeCollateralAdded, remoteBlockchainID [][32]byte, remoteTokenTransferrerAddress []common.Address) (event.Subscription, error) { + + var remoteBlockchainIDRule []interface{} + for _, remoteBlockchainIDItem := range remoteBlockchainID { + remoteBlockchainIDRule = append(remoteBlockchainIDRule, remoteBlockchainIDItem) + } + var remoteTokenTransferrerAddressRule []interface{} + for _, remoteTokenTransferrerAddressItem := range remoteTokenTransferrerAddress { + remoteTokenTransferrerAddressRule = append(remoteTokenTransferrerAddressRule, remoteTokenTransferrerAddressItem) + } + + logs, sub, err := _ERC20TokenHome.contract.WatchLogs(opts, "CollateralAdded", remoteBlockchainIDRule, remoteTokenTransferrerAddressRule) + 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(ERC20TokenHomeCollateralAdded) + if err := _ERC20TokenHome.contract.UnpackLog(event, "CollateralAdded", 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 +} + +// ParseCollateralAdded is a log parse operation binding the contract event 0x6769a5f9bfc8b6e0db839ab981cbf9239274ae72d2d035081a9157d43bd33cb6. +// +// Solidity: event CollateralAdded(bytes32 indexed remoteBlockchainID, address indexed remoteTokenTransferrerAddress, uint256 amount, uint256 remaining) +func (_ERC20TokenHome *ERC20TokenHomeFilterer) ParseCollateralAdded(log types.Log) (*ERC20TokenHomeCollateralAdded, error) { + event := new(ERC20TokenHomeCollateralAdded) + if err := _ERC20TokenHome.contract.UnpackLog(event, "CollateralAdded", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// ERC20TokenHomeInitializedIterator is returned from FilterInitialized and is used to iterate over the raw logs and unpacked data for Initialized events raised by the ERC20TokenHome contract. +type ERC20TokenHomeInitializedIterator struct { + Event *ERC20TokenHomeInitialized // 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 interfaces.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 *ERC20TokenHomeInitializedIterator) 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(ERC20TokenHomeInitialized) + 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(ERC20TokenHomeInitialized) + 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 *ERC20TokenHomeInitializedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *ERC20TokenHomeInitializedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// ERC20TokenHomeInitialized represents a Initialized event raised by the ERC20TokenHome contract. +type ERC20TokenHomeInitialized struct { + Version uint64 + Raw types.Log // Blockchain specific contextual infos +} + +// FilterInitialized is a free log retrieval operation binding the contract event 0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2. +// +// Solidity: event Initialized(uint64 version) +func (_ERC20TokenHome *ERC20TokenHomeFilterer) FilterInitialized(opts *bind.FilterOpts) (*ERC20TokenHomeInitializedIterator, error) { + + logs, sub, err := _ERC20TokenHome.contract.FilterLogs(opts, "Initialized") + if err != nil { + return nil, err + } + return &ERC20TokenHomeInitializedIterator{contract: _ERC20TokenHome.contract, event: "Initialized", logs: logs, sub: sub}, nil +} + +// WatchInitialized is a free log subscription operation binding the contract event 0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2. +// +// Solidity: event Initialized(uint64 version) +func (_ERC20TokenHome *ERC20TokenHomeFilterer) WatchInitialized(opts *bind.WatchOpts, sink chan<- *ERC20TokenHomeInitialized) (event.Subscription, error) { + + logs, sub, err := _ERC20TokenHome.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(ERC20TokenHomeInitialized) + if err := _ERC20TokenHome.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 0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2. +// +// Solidity: event Initialized(uint64 version) +func (_ERC20TokenHome *ERC20TokenHomeFilterer) ParseInitialized(log types.Log) (*ERC20TokenHomeInitialized, error) { + event := new(ERC20TokenHomeInitialized) + if err := _ERC20TokenHome.contract.UnpackLog(event, "Initialized", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// ERC20TokenHomeMinTeleporterVersionUpdatedIterator is returned from FilterMinTeleporterVersionUpdated and is used to iterate over the raw logs and unpacked data for MinTeleporterVersionUpdated events raised by the ERC20TokenHome contract. +type ERC20TokenHomeMinTeleporterVersionUpdatedIterator struct { + Event *ERC20TokenHomeMinTeleporterVersionUpdated // 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 interfaces.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 *ERC20TokenHomeMinTeleporterVersionUpdatedIterator) 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(ERC20TokenHomeMinTeleporterVersionUpdated) + 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(ERC20TokenHomeMinTeleporterVersionUpdated) + 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 *ERC20TokenHomeMinTeleporterVersionUpdatedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *ERC20TokenHomeMinTeleporterVersionUpdatedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// ERC20TokenHomeMinTeleporterVersionUpdated represents a MinTeleporterVersionUpdated event raised by the ERC20TokenHome contract. +type ERC20TokenHomeMinTeleporterVersionUpdated struct { + OldMinTeleporterVersion *big.Int + NewMinTeleporterVersion *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterMinTeleporterVersionUpdated is a free log retrieval operation binding the contract event 0xa9a7ef57e41f05b4c15480842f5f0c27edfcbb553fed281f7c4068452cc1c02d. +// +// Solidity: event MinTeleporterVersionUpdated(uint256 indexed oldMinTeleporterVersion, uint256 indexed newMinTeleporterVersion) +func (_ERC20TokenHome *ERC20TokenHomeFilterer) FilterMinTeleporterVersionUpdated(opts *bind.FilterOpts, oldMinTeleporterVersion []*big.Int, newMinTeleporterVersion []*big.Int) (*ERC20TokenHomeMinTeleporterVersionUpdatedIterator, error) { + + var oldMinTeleporterVersionRule []interface{} + for _, oldMinTeleporterVersionItem := range oldMinTeleporterVersion { + oldMinTeleporterVersionRule = append(oldMinTeleporterVersionRule, oldMinTeleporterVersionItem) + } + var newMinTeleporterVersionRule []interface{} + for _, newMinTeleporterVersionItem := range newMinTeleporterVersion { + newMinTeleporterVersionRule = append(newMinTeleporterVersionRule, newMinTeleporterVersionItem) + } + + logs, sub, err := _ERC20TokenHome.contract.FilterLogs(opts, "MinTeleporterVersionUpdated", oldMinTeleporterVersionRule, newMinTeleporterVersionRule) + if err != nil { + return nil, err + } + return &ERC20TokenHomeMinTeleporterVersionUpdatedIterator{contract: _ERC20TokenHome.contract, event: "MinTeleporterVersionUpdated", logs: logs, sub: sub}, nil +} + +// WatchMinTeleporterVersionUpdated is a free log subscription operation binding the contract event 0xa9a7ef57e41f05b4c15480842f5f0c27edfcbb553fed281f7c4068452cc1c02d. +// +// Solidity: event MinTeleporterVersionUpdated(uint256 indexed oldMinTeleporterVersion, uint256 indexed newMinTeleporterVersion) +func (_ERC20TokenHome *ERC20TokenHomeFilterer) WatchMinTeleporterVersionUpdated(opts *bind.WatchOpts, sink chan<- *ERC20TokenHomeMinTeleporterVersionUpdated, oldMinTeleporterVersion []*big.Int, newMinTeleporterVersion []*big.Int) (event.Subscription, error) { + + var oldMinTeleporterVersionRule []interface{} + for _, oldMinTeleporterVersionItem := range oldMinTeleporterVersion { + oldMinTeleporterVersionRule = append(oldMinTeleporterVersionRule, oldMinTeleporterVersionItem) + } + var newMinTeleporterVersionRule []interface{} + for _, newMinTeleporterVersionItem := range newMinTeleporterVersion { + newMinTeleporterVersionRule = append(newMinTeleporterVersionRule, newMinTeleporterVersionItem) + } + + logs, sub, err := _ERC20TokenHome.contract.WatchLogs(opts, "MinTeleporterVersionUpdated", oldMinTeleporterVersionRule, newMinTeleporterVersionRule) + 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(ERC20TokenHomeMinTeleporterVersionUpdated) + if err := _ERC20TokenHome.contract.UnpackLog(event, "MinTeleporterVersionUpdated", 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 +} + +// ParseMinTeleporterVersionUpdated is a log parse operation binding the contract event 0xa9a7ef57e41f05b4c15480842f5f0c27edfcbb553fed281f7c4068452cc1c02d. +// +// Solidity: event MinTeleporterVersionUpdated(uint256 indexed oldMinTeleporterVersion, uint256 indexed newMinTeleporterVersion) +func (_ERC20TokenHome *ERC20TokenHomeFilterer) ParseMinTeleporterVersionUpdated(log types.Log) (*ERC20TokenHomeMinTeleporterVersionUpdated, error) { + event := new(ERC20TokenHomeMinTeleporterVersionUpdated) + if err := _ERC20TokenHome.contract.UnpackLog(event, "MinTeleporterVersionUpdated", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// ERC20TokenHomeOwnershipTransferredIterator is returned from FilterOwnershipTransferred and is used to iterate over the raw logs and unpacked data for OwnershipTransferred events raised by the ERC20TokenHome contract. +type ERC20TokenHomeOwnershipTransferredIterator struct { + Event *ERC20TokenHomeOwnershipTransferred // 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 interfaces.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 *ERC20TokenHomeOwnershipTransferredIterator) 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(ERC20TokenHomeOwnershipTransferred) + 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(ERC20TokenHomeOwnershipTransferred) + 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 *ERC20TokenHomeOwnershipTransferredIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *ERC20TokenHomeOwnershipTransferredIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// ERC20TokenHomeOwnershipTransferred represents a OwnershipTransferred event raised by the ERC20TokenHome contract. +type ERC20TokenHomeOwnershipTransferred 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 (_ERC20TokenHome *ERC20TokenHomeFilterer) FilterOwnershipTransferred(opts *bind.FilterOpts, previousOwner []common.Address, newOwner []common.Address) (*ERC20TokenHomeOwnershipTransferredIterator, 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 := _ERC20TokenHome.contract.FilterLogs(opts, "OwnershipTransferred", previousOwnerRule, newOwnerRule) + if err != nil { + return nil, err + } + return &ERC20TokenHomeOwnershipTransferredIterator{contract: _ERC20TokenHome.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 (_ERC20TokenHome *ERC20TokenHomeFilterer) WatchOwnershipTransferred(opts *bind.WatchOpts, sink chan<- *ERC20TokenHomeOwnershipTransferred, 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 := _ERC20TokenHome.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(ERC20TokenHomeOwnershipTransferred) + if err := _ERC20TokenHome.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 (_ERC20TokenHome *ERC20TokenHomeFilterer) ParseOwnershipTransferred(log types.Log) (*ERC20TokenHomeOwnershipTransferred, error) { + event := new(ERC20TokenHomeOwnershipTransferred) + if err := _ERC20TokenHome.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// ERC20TokenHomeRemoteRegisteredIterator is returned from FilterRemoteRegistered and is used to iterate over the raw logs and unpacked data for RemoteRegistered events raised by the ERC20TokenHome contract. +type ERC20TokenHomeRemoteRegisteredIterator struct { + Event *ERC20TokenHomeRemoteRegistered // 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 interfaces.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 *ERC20TokenHomeRemoteRegisteredIterator) 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(ERC20TokenHomeRemoteRegistered) + 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(ERC20TokenHomeRemoteRegistered) + 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 *ERC20TokenHomeRemoteRegisteredIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *ERC20TokenHomeRemoteRegisteredIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// ERC20TokenHomeRemoteRegistered represents a RemoteRegistered event raised by the ERC20TokenHome contract. +type ERC20TokenHomeRemoteRegistered struct { + RemoteBlockchainID [32]byte + RemoteTokenTransferrerAddress common.Address + InitialCollateralNeeded *big.Int + TokenDecimals uint8 + Raw types.Log // Blockchain specific contextual infos +} + +// FilterRemoteRegistered is a free log retrieval operation binding the contract event 0xf229b02a51a4c8d5ef03a096ae0dd727d7b48b710d21b50ebebb560eef739b90. +// +// Solidity: event RemoteRegistered(bytes32 indexed remoteBlockchainID, address indexed remoteTokenTransferrerAddress, uint256 initialCollateralNeeded, uint8 tokenDecimals) +func (_ERC20TokenHome *ERC20TokenHomeFilterer) FilterRemoteRegistered(opts *bind.FilterOpts, remoteBlockchainID [][32]byte, remoteTokenTransferrerAddress []common.Address) (*ERC20TokenHomeRemoteRegisteredIterator, error) { + + var remoteBlockchainIDRule []interface{} + for _, remoteBlockchainIDItem := range remoteBlockchainID { + remoteBlockchainIDRule = append(remoteBlockchainIDRule, remoteBlockchainIDItem) + } + var remoteTokenTransferrerAddressRule []interface{} + for _, remoteTokenTransferrerAddressItem := range remoteTokenTransferrerAddress { + remoteTokenTransferrerAddressRule = append(remoteTokenTransferrerAddressRule, remoteTokenTransferrerAddressItem) + } + + logs, sub, err := _ERC20TokenHome.contract.FilterLogs(opts, "RemoteRegistered", remoteBlockchainIDRule, remoteTokenTransferrerAddressRule) + if err != nil { + return nil, err + } + return &ERC20TokenHomeRemoteRegisteredIterator{contract: _ERC20TokenHome.contract, event: "RemoteRegistered", logs: logs, sub: sub}, nil +} + +// WatchRemoteRegistered is a free log subscription operation binding the contract event 0xf229b02a51a4c8d5ef03a096ae0dd727d7b48b710d21b50ebebb560eef739b90. +// +// Solidity: event RemoteRegistered(bytes32 indexed remoteBlockchainID, address indexed remoteTokenTransferrerAddress, uint256 initialCollateralNeeded, uint8 tokenDecimals) +func (_ERC20TokenHome *ERC20TokenHomeFilterer) WatchRemoteRegistered(opts *bind.WatchOpts, sink chan<- *ERC20TokenHomeRemoteRegistered, remoteBlockchainID [][32]byte, remoteTokenTransferrerAddress []common.Address) (event.Subscription, error) { + + var remoteBlockchainIDRule []interface{} + for _, remoteBlockchainIDItem := range remoteBlockchainID { + remoteBlockchainIDRule = append(remoteBlockchainIDRule, remoteBlockchainIDItem) + } + var remoteTokenTransferrerAddressRule []interface{} + for _, remoteTokenTransferrerAddressItem := range remoteTokenTransferrerAddress { + remoteTokenTransferrerAddressRule = append(remoteTokenTransferrerAddressRule, remoteTokenTransferrerAddressItem) + } + + logs, sub, err := _ERC20TokenHome.contract.WatchLogs(opts, "RemoteRegistered", remoteBlockchainIDRule, remoteTokenTransferrerAddressRule) + 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(ERC20TokenHomeRemoteRegistered) + if err := _ERC20TokenHome.contract.UnpackLog(event, "RemoteRegistered", 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 +} + +// ParseRemoteRegistered is a log parse operation binding the contract event 0xf229b02a51a4c8d5ef03a096ae0dd727d7b48b710d21b50ebebb560eef739b90. +// +// Solidity: event RemoteRegistered(bytes32 indexed remoteBlockchainID, address indexed remoteTokenTransferrerAddress, uint256 initialCollateralNeeded, uint8 tokenDecimals) +func (_ERC20TokenHome *ERC20TokenHomeFilterer) ParseRemoteRegistered(log types.Log) (*ERC20TokenHomeRemoteRegistered, error) { + event := new(ERC20TokenHomeRemoteRegistered) + if err := _ERC20TokenHome.contract.UnpackLog(event, "RemoteRegistered", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// ERC20TokenHomeTeleporterAddressPausedIterator is returned from FilterTeleporterAddressPaused and is used to iterate over the raw logs and unpacked data for TeleporterAddressPaused events raised by the ERC20TokenHome contract. +type ERC20TokenHomeTeleporterAddressPausedIterator struct { + Event *ERC20TokenHomeTeleporterAddressPaused // 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 interfaces.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 *ERC20TokenHomeTeleporterAddressPausedIterator) 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(ERC20TokenHomeTeleporterAddressPaused) + 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(ERC20TokenHomeTeleporterAddressPaused) + 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 *ERC20TokenHomeTeleporterAddressPausedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *ERC20TokenHomeTeleporterAddressPausedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// ERC20TokenHomeTeleporterAddressPaused represents a TeleporterAddressPaused event raised by the ERC20TokenHome contract. +type ERC20TokenHomeTeleporterAddressPaused struct { + TeleporterAddress common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterTeleporterAddressPaused is a free log retrieval operation binding the contract event 0x933f93e57a222e6330362af8b376d0a8725b6901e9a2fb86d00f169702b28a4c. +// +// Solidity: event TeleporterAddressPaused(address indexed teleporterAddress) +func (_ERC20TokenHome *ERC20TokenHomeFilterer) FilterTeleporterAddressPaused(opts *bind.FilterOpts, teleporterAddress []common.Address) (*ERC20TokenHomeTeleporterAddressPausedIterator, error) { + + var teleporterAddressRule []interface{} + for _, teleporterAddressItem := range teleporterAddress { + teleporterAddressRule = append(teleporterAddressRule, teleporterAddressItem) + } + + logs, sub, err := _ERC20TokenHome.contract.FilterLogs(opts, "TeleporterAddressPaused", teleporterAddressRule) + if err != nil { + return nil, err + } + return &ERC20TokenHomeTeleporterAddressPausedIterator{contract: _ERC20TokenHome.contract, event: "TeleporterAddressPaused", logs: logs, sub: sub}, nil +} + +// WatchTeleporterAddressPaused is a free log subscription operation binding the contract event 0x933f93e57a222e6330362af8b376d0a8725b6901e9a2fb86d00f169702b28a4c. +// +// Solidity: event TeleporterAddressPaused(address indexed teleporterAddress) +func (_ERC20TokenHome *ERC20TokenHomeFilterer) WatchTeleporterAddressPaused(opts *bind.WatchOpts, sink chan<- *ERC20TokenHomeTeleporterAddressPaused, teleporterAddress []common.Address) (event.Subscription, error) { + + var teleporterAddressRule []interface{} + for _, teleporterAddressItem := range teleporterAddress { + teleporterAddressRule = append(teleporterAddressRule, teleporterAddressItem) + } + + logs, sub, err := _ERC20TokenHome.contract.WatchLogs(opts, "TeleporterAddressPaused", teleporterAddressRule) + 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(ERC20TokenHomeTeleporterAddressPaused) + if err := _ERC20TokenHome.contract.UnpackLog(event, "TeleporterAddressPaused", 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 +} + +// ParseTeleporterAddressPaused is a log parse operation binding the contract event 0x933f93e57a222e6330362af8b376d0a8725b6901e9a2fb86d00f169702b28a4c. +// +// Solidity: event TeleporterAddressPaused(address indexed teleporterAddress) +func (_ERC20TokenHome *ERC20TokenHomeFilterer) ParseTeleporterAddressPaused(log types.Log) (*ERC20TokenHomeTeleporterAddressPaused, error) { + event := new(ERC20TokenHomeTeleporterAddressPaused) + if err := _ERC20TokenHome.contract.UnpackLog(event, "TeleporterAddressPaused", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// ERC20TokenHomeTeleporterAddressUnpausedIterator is returned from FilterTeleporterAddressUnpaused and is used to iterate over the raw logs and unpacked data for TeleporterAddressUnpaused events raised by the ERC20TokenHome contract. +type ERC20TokenHomeTeleporterAddressUnpausedIterator struct { + Event *ERC20TokenHomeTeleporterAddressUnpaused // 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 interfaces.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 *ERC20TokenHomeTeleporterAddressUnpausedIterator) 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(ERC20TokenHomeTeleporterAddressUnpaused) + 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(ERC20TokenHomeTeleporterAddressUnpaused) + 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 *ERC20TokenHomeTeleporterAddressUnpausedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *ERC20TokenHomeTeleporterAddressUnpausedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// ERC20TokenHomeTeleporterAddressUnpaused represents a TeleporterAddressUnpaused event raised by the ERC20TokenHome contract. +type ERC20TokenHomeTeleporterAddressUnpaused struct { + TeleporterAddress common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterTeleporterAddressUnpaused is a free log retrieval operation binding the contract event 0x844e2f3154214672229235858fd029d1dfd543901c6d05931f0bc2480a2d72c3. +// +// Solidity: event TeleporterAddressUnpaused(address indexed teleporterAddress) +func (_ERC20TokenHome *ERC20TokenHomeFilterer) FilterTeleporterAddressUnpaused(opts *bind.FilterOpts, teleporterAddress []common.Address) (*ERC20TokenHomeTeleporterAddressUnpausedIterator, error) { + + var teleporterAddressRule []interface{} + for _, teleporterAddressItem := range teleporterAddress { + teleporterAddressRule = append(teleporterAddressRule, teleporterAddressItem) + } + + logs, sub, err := _ERC20TokenHome.contract.FilterLogs(opts, "TeleporterAddressUnpaused", teleporterAddressRule) + if err != nil { + return nil, err + } + return &ERC20TokenHomeTeleporterAddressUnpausedIterator{contract: _ERC20TokenHome.contract, event: "TeleporterAddressUnpaused", logs: logs, sub: sub}, nil +} + +// WatchTeleporterAddressUnpaused is a free log subscription operation binding the contract event 0x844e2f3154214672229235858fd029d1dfd543901c6d05931f0bc2480a2d72c3. +// +// Solidity: event TeleporterAddressUnpaused(address indexed teleporterAddress) +func (_ERC20TokenHome *ERC20TokenHomeFilterer) WatchTeleporterAddressUnpaused(opts *bind.WatchOpts, sink chan<- *ERC20TokenHomeTeleporterAddressUnpaused, teleporterAddress []common.Address) (event.Subscription, error) { + + var teleporterAddressRule []interface{} + for _, teleporterAddressItem := range teleporterAddress { + teleporterAddressRule = append(teleporterAddressRule, teleporterAddressItem) + } + + logs, sub, err := _ERC20TokenHome.contract.WatchLogs(opts, "TeleporterAddressUnpaused", teleporterAddressRule) + 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(ERC20TokenHomeTeleporterAddressUnpaused) + if err := _ERC20TokenHome.contract.UnpackLog(event, "TeleporterAddressUnpaused", 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 +} + +// ParseTeleporterAddressUnpaused is a log parse operation binding the contract event 0x844e2f3154214672229235858fd029d1dfd543901c6d05931f0bc2480a2d72c3. +// +// Solidity: event TeleporterAddressUnpaused(address indexed teleporterAddress) +func (_ERC20TokenHome *ERC20TokenHomeFilterer) ParseTeleporterAddressUnpaused(log types.Log) (*ERC20TokenHomeTeleporterAddressUnpaused, error) { + event := new(ERC20TokenHomeTeleporterAddressUnpaused) + if err := _ERC20TokenHome.contract.UnpackLog(event, "TeleporterAddressUnpaused", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// ERC20TokenHomeTokensAndCallRoutedIterator is returned from FilterTokensAndCallRouted and is used to iterate over the raw logs and unpacked data for TokensAndCallRouted events raised by the ERC20TokenHome contract. +type ERC20TokenHomeTokensAndCallRoutedIterator struct { + Event *ERC20TokenHomeTokensAndCallRouted // 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 interfaces.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 *ERC20TokenHomeTokensAndCallRoutedIterator) 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(ERC20TokenHomeTokensAndCallRouted) + 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(ERC20TokenHomeTokensAndCallRouted) + 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 *ERC20TokenHomeTokensAndCallRoutedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *ERC20TokenHomeTokensAndCallRoutedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// ERC20TokenHomeTokensAndCallRouted represents a TokensAndCallRouted event raised by the ERC20TokenHome contract. +type ERC20TokenHomeTokensAndCallRouted struct { + TeleporterMessageID [32]byte + Input SendAndCallInput + Amount *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterTokensAndCallRouted is a free log retrieval operation binding the contract event 0x42eff9005856e3c586b096d67211a566dc926052119fd7cc08023c70937ecb30. +// +// Solidity: event TokensAndCallRouted(bytes32 indexed teleporterMessageID, (bytes32,address,address,bytes,uint256,uint256,address,address,address,uint256,uint256) input, uint256 amount) +func (_ERC20TokenHome *ERC20TokenHomeFilterer) FilterTokensAndCallRouted(opts *bind.FilterOpts, teleporterMessageID [][32]byte) (*ERC20TokenHomeTokensAndCallRoutedIterator, error) { + + var teleporterMessageIDRule []interface{} + for _, teleporterMessageIDItem := range teleporterMessageID { + teleporterMessageIDRule = append(teleporterMessageIDRule, teleporterMessageIDItem) + } + + logs, sub, err := _ERC20TokenHome.contract.FilterLogs(opts, "TokensAndCallRouted", teleporterMessageIDRule) + if err != nil { + return nil, err + } + return &ERC20TokenHomeTokensAndCallRoutedIterator{contract: _ERC20TokenHome.contract, event: "TokensAndCallRouted", logs: logs, sub: sub}, nil +} + +// WatchTokensAndCallRouted is a free log subscription operation binding the contract event 0x42eff9005856e3c586b096d67211a566dc926052119fd7cc08023c70937ecb30. +// +// Solidity: event TokensAndCallRouted(bytes32 indexed teleporterMessageID, (bytes32,address,address,bytes,uint256,uint256,address,address,address,uint256,uint256) input, uint256 amount) +func (_ERC20TokenHome *ERC20TokenHomeFilterer) WatchTokensAndCallRouted(opts *bind.WatchOpts, sink chan<- *ERC20TokenHomeTokensAndCallRouted, teleporterMessageID [][32]byte) (event.Subscription, error) { + + var teleporterMessageIDRule []interface{} + for _, teleporterMessageIDItem := range teleporterMessageID { + teleporterMessageIDRule = append(teleporterMessageIDRule, teleporterMessageIDItem) + } + + logs, sub, err := _ERC20TokenHome.contract.WatchLogs(opts, "TokensAndCallRouted", teleporterMessageIDRule) + 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(ERC20TokenHomeTokensAndCallRouted) + if err := _ERC20TokenHome.contract.UnpackLog(event, "TokensAndCallRouted", 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 +} + +// ParseTokensAndCallRouted is a log parse operation binding the contract event 0x42eff9005856e3c586b096d67211a566dc926052119fd7cc08023c70937ecb30. +// +// Solidity: event TokensAndCallRouted(bytes32 indexed teleporterMessageID, (bytes32,address,address,bytes,uint256,uint256,address,address,address,uint256,uint256) input, uint256 amount) +func (_ERC20TokenHome *ERC20TokenHomeFilterer) ParseTokensAndCallRouted(log types.Log) (*ERC20TokenHomeTokensAndCallRouted, error) { + event := new(ERC20TokenHomeTokensAndCallRouted) + if err := _ERC20TokenHome.contract.UnpackLog(event, "TokensAndCallRouted", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// ERC20TokenHomeTokensAndCallSentIterator is returned from FilterTokensAndCallSent and is used to iterate over the raw logs and unpacked data for TokensAndCallSent events raised by the ERC20TokenHome contract. +type ERC20TokenHomeTokensAndCallSentIterator struct { + Event *ERC20TokenHomeTokensAndCallSent // 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 interfaces.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 *ERC20TokenHomeTokensAndCallSentIterator) 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(ERC20TokenHomeTokensAndCallSent) + 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(ERC20TokenHomeTokensAndCallSent) + 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 *ERC20TokenHomeTokensAndCallSentIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *ERC20TokenHomeTokensAndCallSentIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// ERC20TokenHomeTokensAndCallSent represents a TokensAndCallSent event raised by the ERC20TokenHome contract. +type ERC20TokenHomeTokensAndCallSent struct { + TeleporterMessageID [32]byte + Sender common.Address + Input SendAndCallInput + Amount *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterTokensAndCallSent is a free log retrieval operation binding the contract event 0x5d76dff81bf773b908b050fa113d39f7d8135bb4175398f313ea19cd3a1a0b16. +// +// Solidity: event TokensAndCallSent(bytes32 indexed teleporterMessageID, address indexed sender, (bytes32,address,address,bytes,uint256,uint256,address,address,address,uint256,uint256) input, uint256 amount) +func (_ERC20TokenHome *ERC20TokenHomeFilterer) FilterTokensAndCallSent(opts *bind.FilterOpts, teleporterMessageID [][32]byte, sender []common.Address) (*ERC20TokenHomeTokensAndCallSentIterator, error) { + + var teleporterMessageIDRule []interface{} + for _, teleporterMessageIDItem := range teleporterMessageID { + teleporterMessageIDRule = append(teleporterMessageIDRule, teleporterMessageIDItem) + } + var senderRule []interface{} + for _, senderItem := range sender { + senderRule = append(senderRule, senderItem) + } + + logs, sub, err := _ERC20TokenHome.contract.FilterLogs(opts, "TokensAndCallSent", teleporterMessageIDRule, senderRule) + if err != nil { + return nil, err + } + return &ERC20TokenHomeTokensAndCallSentIterator{contract: _ERC20TokenHome.contract, event: "TokensAndCallSent", logs: logs, sub: sub}, nil +} + +// WatchTokensAndCallSent is a free log subscription operation binding the contract event 0x5d76dff81bf773b908b050fa113d39f7d8135bb4175398f313ea19cd3a1a0b16. +// +// Solidity: event TokensAndCallSent(bytes32 indexed teleporterMessageID, address indexed sender, (bytes32,address,address,bytes,uint256,uint256,address,address,address,uint256,uint256) input, uint256 amount) +func (_ERC20TokenHome *ERC20TokenHomeFilterer) WatchTokensAndCallSent(opts *bind.WatchOpts, sink chan<- *ERC20TokenHomeTokensAndCallSent, teleporterMessageID [][32]byte, sender []common.Address) (event.Subscription, error) { + + var teleporterMessageIDRule []interface{} + for _, teleporterMessageIDItem := range teleporterMessageID { + teleporterMessageIDRule = append(teleporterMessageIDRule, teleporterMessageIDItem) + } + var senderRule []interface{} + for _, senderItem := range sender { + senderRule = append(senderRule, senderItem) + } + + logs, sub, err := _ERC20TokenHome.contract.WatchLogs(opts, "TokensAndCallSent", teleporterMessageIDRule, senderRule) + 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(ERC20TokenHomeTokensAndCallSent) + if err := _ERC20TokenHome.contract.UnpackLog(event, "TokensAndCallSent", 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 +} + +// ParseTokensAndCallSent is a log parse operation binding the contract event 0x5d76dff81bf773b908b050fa113d39f7d8135bb4175398f313ea19cd3a1a0b16. +// +// Solidity: event TokensAndCallSent(bytes32 indexed teleporterMessageID, address indexed sender, (bytes32,address,address,bytes,uint256,uint256,address,address,address,uint256,uint256) input, uint256 amount) +func (_ERC20TokenHome *ERC20TokenHomeFilterer) ParseTokensAndCallSent(log types.Log) (*ERC20TokenHomeTokensAndCallSent, error) { + event := new(ERC20TokenHomeTokensAndCallSent) + if err := _ERC20TokenHome.contract.UnpackLog(event, "TokensAndCallSent", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// ERC20TokenHomeTokensRoutedIterator is returned from FilterTokensRouted and is used to iterate over the raw logs and unpacked data for TokensRouted events raised by the ERC20TokenHome contract. +type ERC20TokenHomeTokensRoutedIterator struct { + Event *ERC20TokenHomeTokensRouted // 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 interfaces.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 *ERC20TokenHomeTokensRoutedIterator) 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(ERC20TokenHomeTokensRouted) + 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(ERC20TokenHomeTokensRouted) + 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 *ERC20TokenHomeTokensRoutedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *ERC20TokenHomeTokensRoutedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// ERC20TokenHomeTokensRouted represents a TokensRouted event raised by the ERC20TokenHome contract. +type ERC20TokenHomeTokensRouted struct { + TeleporterMessageID [32]byte + Input SendTokensInput + Amount *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterTokensRouted is a free log retrieval operation binding the contract event 0x825080857c76cef4a1629c0705a7f8b4ef0282ddcafde0b6715c4fb34b68aaf0. +// +// Solidity: event TokensRouted(bytes32 indexed teleporterMessageID, (bytes32,address,address,address,uint256,uint256,uint256,address) input, uint256 amount) +func (_ERC20TokenHome *ERC20TokenHomeFilterer) FilterTokensRouted(opts *bind.FilterOpts, teleporterMessageID [][32]byte) (*ERC20TokenHomeTokensRoutedIterator, error) { + + var teleporterMessageIDRule []interface{} + for _, teleporterMessageIDItem := range teleporterMessageID { + teleporterMessageIDRule = append(teleporterMessageIDRule, teleporterMessageIDItem) + } + + logs, sub, err := _ERC20TokenHome.contract.FilterLogs(opts, "TokensRouted", teleporterMessageIDRule) + if err != nil { + return nil, err + } + return &ERC20TokenHomeTokensRoutedIterator{contract: _ERC20TokenHome.contract, event: "TokensRouted", logs: logs, sub: sub}, nil +} + +// WatchTokensRouted is a free log subscription operation binding the contract event 0x825080857c76cef4a1629c0705a7f8b4ef0282ddcafde0b6715c4fb34b68aaf0. +// +// Solidity: event TokensRouted(bytes32 indexed teleporterMessageID, (bytes32,address,address,address,uint256,uint256,uint256,address) input, uint256 amount) +func (_ERC20TokenHome *ERC20TokenHomeFilterer) WatchTokensRouted(opts *bind.WatchOpts, sink chan<- *ERC20TokenHomeTokensRouted, teleporterMessageID [][32]byte) (event.Subscription, error) { + + var teleporterMessageIDRule []interface{} + for _, teleporterMessageIDItem := range teleporterMessageID { + teleporterMessageIDRule = append(teleporterMessageIDRule, teleporterMessageIDItem) + } + + logs, sub, err := _ERC20TokenHome.contract.WatchLogs(opts, "TokensRouted", teleporterMessageIDRule) + 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(ERC20TokenHomeTokensRouted) + if err := _ERC20TokenHome.contract.UnpackLog(event, "TokensRouted", 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 +} + +// ParseTokensRouted is a log parse operation binding the contract event 0x825080857c76cef4a1629c0705a7f8b4ef0282ddcafde0b6715c4fb34b68aaf0. +// +// Solidity: event TokensRouted(bytes32 indexed teleporterMessageID, (bytes32,address,address,address,uint256,uint256,uint256,address) input, uint256 amount) +func (_ERC20TokenHome *ERC20TokenHomeFilterer) ParseTokensRouted(log types.Log) (*ERC20TokenHomeTokensRouted, error) { + event := new(ERC20TokenHomeTokensRouted) + if err := _ERC20TokenHome.contract.UnpackLog(event, "TokensRouted", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// ERC20TokenHomeTokensSentIterator is returned from FilterTokensSent and is used to iterate over the raw logs and unpacked data for TokensSent events raised by the ERC20TokenHome contract. +type ERC20TokenHomeTokensSentIterator struct { + Event *ERC20TokenHomeTokensSent // 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 interfaces.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 *ERC20TokenHomeTokensSentIterator) 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(ERC20TokenHomeTokensSent) + 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(ERC20TokenHomeTokensSent) + 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 *ERC20TokenHomeTokensSentIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *ERC20TokenHomeTokensSentIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// ERC20TokenHomeTokensSent represents a TokensSent event raised by the ERC20TokenHome contract. +type ERC20TokenHomeTokensSent struct { + TeleporterMessageID [32]byte + Sender common.Address + Input SendTokensInput + Amount *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterTokensSent is a free log retrieval operation binding the contract event 0x93f19bf1ec58a15dc643b37e7e18a1c13e85e06cd11929e283154691ace9fb52. +// +// Solidity: event TokensSent(bytes32 indexed teleporterMessageID, address indexed sender, (bytes32,address,address,address,uint256,uint256,uint256,address) input, uint256 amount) +func (_ERC20TokenHome *ERC20TokenHomeFilterer) FilterTokensSent(opts *bind.FilterOpts, teleporterMessageID [][32]byte, sender []common.Address) (*ERC20TokenHomeTokensSentIterator, error) { + + var teleporterMessageIDRule []interface{} + for _, teleporterMessageIDItem := range teleporterMessageID { + teleporterMessageIDRule = append(teleporterMessageIDRule, teleporterMessageIDItem) + } + var senderRule []interface{} + for _, senderItem := range sender { + senderRule = append(senderRule, senderItem) + } + + logs, sub, err := _ERC20TokenHome.contract.FilterLogs(opts, "TokensSent", teleporterMessageIDRule, senderRule) + if err != nil { + return nil, err + } + return &ERC20TokenHomeTokensSentIterator{contract: _ERC20TokenHome.contract, event: "TokensSent", logs: logs, sub: sub}, nil +} + +// WatchTokensSent is a free log subscription operation binding the contract event 0x93f19bf1ec58a15dc643b37e7e18a1c13e85e06cd11929e283154691ace9fb52. +// +// Solidity: event TokensSent(bytes32 indexed teleporterMessageID, address indexed sender, (bytes32,address,address,address,uint256,uint256,uint256,address) input, uint256 amount) +func (_ERC20TokenHome *ERC20TokenHomeFilterer) WatchTokensSent(opts *bind.WatchOpts, sink chan<- *ERC20TokenHomeTokensSent, teleporterMessageID [][32]byte, sender []common.Address) (event.Subscription, error) { + + var teleporterMessageIDRule []interface{} + for _, teleporterMessageIDItem := range teleporterMessageID { + teleporterMessageIDRule = append(teleporterMessageIDRule, teleporterMessageIDItem) + } + var senderRule []interface{} + for _, senderItem := range sender { + senderRule = append(senderRule, senderItem) + } + + logs, sub, err := _ERC20TokenHome.contract.WatchLogs(opts, "TokensSent", teleporterMessageIDRule, senderRule) + 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(ERC20TokenHomeTokensSent) + if err := _ERC20TokenHome.contract.UnpackLog(event, "TokensSent", 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 +} + +// ParseTokensSent is a log parse operation binding the contract event 0x93f19bf1ec58a15dc643b37e7e18a1c13e85e06cd11929e283154691ace9fb52. +// +// Solidity: event TokensSent(bytes32 indexed teleporterMessageID, address indexed sender, (bytes32,address,address,address,uint256,uint256,uint256,address) input, uint256 amount) +func (_ERC20TokenHome *ERC20TokenHomeFilterer) ParseTokensSent(log types.Log) (*ERC20TokenHomeTokensSent, error) { + event := new(ERC20TokenHomeTokensSent) + if err := _ERC20TokenHome.contract.UnpackLog(event, "TokensSent", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// ERC20TokenHomeTokensWithdrawnIterator is returned from FilterTokensWithdrawn and is used to iterate over the raw logs and unpacked data for TokensWithdrawn events raised by the ERC20TokenHome contract. +type ERC20TokenHomeTokensWithdrawnIterator struct { + Event *ERC20TokenHomeTokensWithdrawn // 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 interfaces.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 *ERC20TokenHomeTokensWithdrawnIterator) 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(ERC20TokenHomeTokensWithdrawn) + 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(ERC20TokenHomeTokensWithdrawn) + 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 *ERC20TokenHomeTokensWithdrawnIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *ERC20TokenHomeTokensWithdrawnIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// ERC20TokenHomeTokensWithdrawn represents a TokensWithdrawn event raised by the ERC20TokenHome contract. +type ERC20TokenHomeTokensWithdrawn struct { + Recipient common.Address + Amount *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterTokensWithdrawn is a free log retrieval operation binding the contract event 0x6352c5382c4a4578e712449ca65e83cdb392d045dfcf1cad9615189db2da244b. +// +// Solidity: event TokensWithdrawn(address indexed recipient, uint256 amount) +func (_ERC20TokenHome *ERC20TokenHomeFilterer) FilterTokensWithdrawn(opts *bind.FilterOpts, recipient []common.Address) (*ERC20TokenHomeTokensWithdrawnIterator, error) { + + var recipientRule []interface{} + for _, recipientItem := range recipient { + recipientRule = append(recipientRule, recipientItem) + } + + logs, sub, err := _ERC20TokenHome.contract.FilterLogs(opts, "TokensWithdrawn", recipientRule) + if err != nil { + return nil, err + } + return &ERC20TokenHomeTokensWithdrawnIterator{contract: _ERC20TokenHome.contract, event: "TokensWithdrawn", logs: logs, sub: sub}, nil +} + +// WatchTokensWithdrawn is a free log subscription operation binding the contract event 0x6352c5382c4a4578e712449ca65e83cdb392d045dfcf1cad9615189db2da244b. +// +// Solidity: event TokensWithdrawn(address indexed recipient, uint256 amount) +func (_ERC20TokenHome *ERC20TokenHomeFilterer) WatchTokensWithdrawn(opts *bind.WatchOpts, sink chan<- *ERC20TokenHomeTokensWithdrawn, recipient []common.Address) (event.Subscription, error) { + + var recipientRule []interface{} + for _, recipientItem := range recipient { + recipientRule = append(recipientRule, recipientItem) + } + + logs, sub, err := _ERC20TokenHome.contract.WatchLogs(opts, "TokensWithdrawn", recipientRule) + 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(ERC20TokenHomeTokensWithdrawn) + if err := _ERC20TokenHome.contract.UnpackLog(event, "TokensWithdrawn", 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 +} + +// ParseTokensWithdrawn is a log parse operation binding the contract event 0x6352c5382c4a4578e712449ca65e83cdb392d045dfcf1cad9615189db2da244b. +// +// Solidity: event TokensWithdrawn(address indexed recipient, uint256 amount) +func (_ERC20TokenHome *ERC20TokenHomeFilterer) ParseTokensWithdrawn(log types.Log) (*ERC20TokenHomeTokensWithdrawn, error) { + event := new(ERC20TokenHomeTokensWithdrawn) + if err := _ERC20TokenHome.contract.UnpackLog(event, "TokensWithdrawn", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} diff --git a/abi-bindings/go/ictt/TokenHome/ERC20TokenHomeUpgradeable/ERC20TokenHomeUpgradeable.go b/abi-bindings/go/ictt/TokenHome/ERC20TokenHomeUpgradeable/ERC20TokenHomeUpgradeable.go new file mode 100644 index 000000000..4f6b39cf1 --- /dev/null +++ b/abi-bindings/go/ictt/TokenHome/ERC20TokenHomeUpgradeable/ERC20TokenHomeUpgradeable.go @@ -0,0 +1,2833 @@ +// Code generated - DO NOT EDIT. +// This file is a generated binding and any manual changes will be lost. + +package erc20tokenhomeupgradeable + +import ( + "errors" + "math/big" + "strings" + + "github.com/ava-labs/subnet-evm/accounts/abi" + "github.com/ava-labs/subnet-evm/accounts/abi/bind" + "github.com/ava-labs/subnet-evm/core/types" + "github.com/ava-labs/subnet-evm/interfaces" + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/event" +) + +// Reference imports to suppress errors if they are not otherwise used. +var ( + _ = errors.New + _ = big.NewInt + _ = strings.NewReader + _ = interfaces.NotFound + _ = bind.Bind + _ = common.Big1 + _ = types.BloomLookup + _ = event.NewSubscription + _ = abi.ConvertType +) + +// RemoteTokenTransferrerSettings is an auto generated low-level Go binding around an user-defined struct. +type RemoteTokenTransferrerSettings struct { + Registered bool + CollateralNeeded *big.Int + TokenMultiplier *big.Int + MultiplyOnRemote bool +} + +// SendAndCallInput is an auto generated low-level Go binding around an user-defined struct. +type SendAndCallInput struct { + DestinationBlockchainID [32]byte + DestinationTokenTransferrerAddress common.Address + RecipientContract common.Address + RecipientPayload []byte + RequiredGasLimit *big.Int + RecipientGasLimit *big.Int + MultiHopFallback common.Address + FallbackRecipient common.Address + PrimaryFeeTokenAddress common.Address + PrimaryFee *big.Int + SecondaryFee *big.Int +} + +// SendTokensInput is an auto generated low-level Go binding around an user-defined struct. +type SendTokensInput struct { + DestinationBlockchainID [32]byte + DestinationTokenTransferrerAddress common.Address + Recipient common.Address + PrimaryFeeTokenAddress common.Address + PrimaryFee *big.Int + SecondaryFee *big.Int + RequiredGasLimit *big.Int + MultiHopFallback common.Address +} + +// ERC20TokenHomeUpgradeableMetaData contains all meta data concerning the ERC20TokenHomeUpgradeable contract. +var ERC20TokenHomeUpgradeableMetaData = &bind.MetaData{ + ABI: "[{\"inputs\":[{\"internalType\":\"enumICMInitializable\",\"name\":\"init\",\"type\":\"uint8\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"target\",\"type\":\"address\"}],\"name\":\"AddressEmptyCode\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"AddressInsufficientBalance\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"FailedInnerCall\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidInitialization\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotInitializing\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"OwnableInvalidOwner\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"OwnableUnauthorizedAccount\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ReentrancyGuardReentrantCall\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"SafeERC20FailedOperation\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"recipientContract\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"CallFailed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"recipientContract\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"CallSucceeded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"remoteBlockchainID\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"remoteTokenTransferrerAddress\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"remaining\",\"type\":\"uint256\"}],\"name\":\"CollateralAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"version\",\"type\":\"uint64\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"oldMinTeleporterVersion\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"newMinTeleporterVersion\",\"type\":\"uint256\"}],\"name\":\"MinTeleporterVersionUpdated\",\"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\":\"bytes32\",\"name\":\"remoteBlockchainID\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"remoteTokenTransferrerAddress\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"initialCollateralNeeded\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"tokenDecimals\",\"type\":\"uint8\"}],\"name\":\"RemoteRegistered\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"teleporterAddress\",\"type\":\"address\"}],\"name\":\"TeleporterAddressPaused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"teleporterAddress\",\"type\":\"address\"}],\"name\":\"TeleporterAddressUnpaused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"teleporterMessageID\",\"type\":\"bytes32\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"destinationBlockchainID\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"destinationTokenTransferrerAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"recipientContract\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"recipientPayload\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"requiredGasLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"recipientGasLimit\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"multiHopFallback\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"fallbackRecipient\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"primaryFeeTokenAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"primaryFee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"secondaryFee\",\"type\":\"uint256\"}],\"indexed\":false,\"internalType\":\"structSendAndCallInput\",\"name\":\"input\",\"type\":\"tuple\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"TokensAndCallRouted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"teleporterMessageID\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"destinationBlockchainID\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"destinationTokenTransferrerAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"recipientContract\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"recipientPayload\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"requiredGasLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"recipientGasLimit\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"multiHopFallback\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"fallbackRecipient\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"primaryFeeTokenAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"primaryFee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"secondaryFee\",\"type\":\"uint256\"}],\"indexed\":false,\"internalType\":\"structSendAndCallInput\",\"name\":\"input\",\"type\":\"tuple\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"TokensAndCallSent\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"teleporterMessageID\",\"type\":\"bytes32\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"destinationBlockchainID\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"destinationTokenTransferrerAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"primaryFeeTokenAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"primaryFee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"secondaryFee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"requiredGasLimit\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"multiHopFallback\",\"type\":\"address\"}],\"indexed\":false,\"internalType\":\"structSendTokensInput\",\"name\":\"input\",\"type\":\"tuple\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"TokensRouted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"teleporterMessageID\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"destinationBlockchainID\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"destinationTokenTransferrerAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"primaryFeeTokenAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"primaryFee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"secondaryFee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"requiredGasLimit\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"multiHopFallback\",\"type\":\"address\"}],\"indexed\":false,\"internalType\":\"structSendTokensInput\",\"name\":\"input\",\"type\":\"tuple\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"TokensSent\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"TokensWithdrawn\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"ERC20_TOKEN_HOME_STORAGE_LOCATION\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"TELEPORTER_REGISTRY_APP_STORAGE_LOCATION\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"TOKEN_HOME_STORAGE_LOCATION\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"remoteBlockchainID\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"remoteTokenTransferrerAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"addCollateral\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getBlockchainID\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getMinTeleporterVersion\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"remoteBlockchainID\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"remoteTokenTransferrerAddress\",\"type\":\"address\"}],\"name\":\"getRemoteTokenTransferrerSettings\",\"outputs\":[{\"components\":[{\"internalType\":\"bool\",\"name\":\"registered\",\"type\":\"bool\"},{\"internalType\":\"uint256\",\"name\":\"collateralNeeded\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"tokenMultiplier\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"multiplyOnRemote\",\"type\":\"bool\"}],\"internalType\":\"structRemoteTokenTransferrerSettings\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getTokenAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"remoteBlockchainID\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"remoteTokenTransferrerAddress\",\"type\":\"address\"}],\"name\":\"getTransferredBalance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"teleporterRegistryAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"teleporterManager\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"minTeleporterVersion\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"tokenAddress\",\"type\":\"address\"},{\"internalType\":\"uint8\",\"name\":\"tokenDecimals\",\"type\":\"uint8\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"teleporterAddress\",\"type\":\"address\"}],\"name\":\"isTeleporterAddressPaused\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"teleporterAddress\",\"type\":\"address\"}],\"name\":\"pauseTeleporterAddress\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"sourceBlockchainID\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"originSenderAddress\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"message\",\"type\":\"bytes\"}],\"name\":\"receiveTeleporterMessage\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"destinationBlockchainID\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"destinationTokenTransferrerAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"primaryFeeTokenAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"primaryFee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"secondaryFee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"requiredGasLimit\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"multiHopFallback\",\"type\":\"address\"}],\"internalType\":\"structSendTokensInput\",\"name\":\"input\",\"type\":\"tuple\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"send\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"destinationBlockchainID\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"destinationTokenTransferrerAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"recipientContract\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"recipientPayload\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"requiredGasLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"recipientGasLimit\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"multiHopFallback\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"fallbackRecipient\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"primaryFeeTokenAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"primaryFee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"secondaryFee\",\"type\":\"uint256\"}],\"internalType\":\"structSendAndCallInput\",\"name\":\"input\",\"type\":\"tuple\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"sendAndCall\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"teleporterAddress\",\"type\":\"address\"}],\"name\":\"unpauseTeleporterAddress\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"version\",\"type\":\"uint256\"}],\"name\":\"updateMinTeleporterVersion\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", + Bin: "0x608060405234801561000f575f80fd5b5060405161483738038061483783398101604081905261002e91610107565b60018160018111156100425761004261012c565b0361004f5761004f610055565b50610140565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00805468010000000000000000900460ff16156100a55760405163f92ee8a960e01b815260040160405180910390fd5b80546001600160401b03908116146101045780546001600160401b0319166001600160401b0390811782556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b50565b5f60208284031215610117575f80fd5b815160028110610125575f80fd5b9392505050565b634e487b7160e01b5f52602160045260245ffd5b6146ea8061014d5f395ff3fe608060405234801561000f575f80fd5b5060043610610127575f3560e01c806365690038116100a9578063c8511ada1161006e578063c8511ada146102b4578063c868efaa14610388578063d2cc7a701461039b578063f2fde38b146103c2578063fd658268146103d5575f80fd5b80636569003814610232578063715018a6146102455780638da5cb5b1461024d578063909a6ac01461027d5780639731429714610291575f80fd5b80634511243e116100ef5780634511243e146101d15780634797735f146101e45780635d16225d146101f85780635eb995141461020b57806362e3901b1461021e575f80fd5b806310fe9ae81461012b578063154d625a146101745780632b0d8f18146101955780633bb03890146101aa5780634213cf78146101bd575b5f80fd5b7f9316912b5a9db88acbe872c934fdd0a46c436c6dcba332d649c4d57c7bc9e601546001600160a01b03165b6040516001600160a01b0390911681526020015b60405180910390f35b61018761018236600461368c565b6103e8565b60405190815260200161016b565b6101a86101a33660046136ba565b610430565b005b6101a86101b83660046136e3565b610532565b5f8051602061461583398151915254610187565b6101a86101df3660046136ba565b610646565b6101875f8051602061467583398151915281565b6101a8610206366004613747565b610735565b6101a8610219366004613776565b610751565b6101875f8051602061461583398151915281565b6101a861024036600461378d565b610765565b6101a861078e565b7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300546001600160a01b0316610157565b6101875f8051602061469583398151915281565b6102a461029f3660046136ba565b6107a1565b604051901515815260200161016b565b6103516102c236600461368c565b60408051608080820183525f808352602080840182905283850182905260609384018290529581525f8051602061463583398151915286528381206001600160a01b039590951681529385529282902082519384018352805460ff9081161515855260018201549585019590955260028101549284019290925260039091015490921615159181019190915290565b60405161016b9190815115158152602080830151908201526040808301519082015260609182015115159181019190915260800190565b6101a86103963660046137d3565b6107c1565b7fde77a4dc7391f6f8f2d9567915d687d3aee79e7a1fc7300392f2727e9a0f1d0254610187565b6101a86103d03660046136ba565b61097e565b6101a86103e3366004613854565b6109b8565b5f8281527f9316912b5a9db88acbe872c934fdd0a46c436c6dcba332d649c4d57c7bc9e603602090815260408083206001600160a01b03851684529091529020545b92915050565b5f805160206146958339815191526104466109c8565b6001600160a01b0382166104755760405162461bcd60e51b815260040161046c90613889565b60405180910390fd5b61047f81836109d0565b156104e25760405162461bcd60e51b815260206004820152602d60248201527f54656c65706f7274657252656769737472794170703a2061646472657373206160448201526c1b1c9958591e481c185d5cd959609a1b606482015260840161046c565b6001600160a01b0382165f81815260018381016020526040808320805460ff1916909217909155517f933f93e57a222e6330362af8b376d0a8725b6901e9a2fb86d00f169702b28a4c9190a25050565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a008054600160401b810460ff1615906001600160401b03165f811580156105765750825b90505f826001600160401b031660011480156105915750303b155b90508115801561059f575080155b156105bd5760405163f92ee8a960e01b815260040160405180910390fd5b845467ffffffffffffffff1916600117855583156105e757845460ff60401b1916600160401b1785555b6105f48a8a8a8a8a6109f1565b831561063a57845460ff60401b19168555604051600181527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b50505050505050505050565b5f8051602061469583398151915261065c6109c8565b6001600160a01b0382166106825760405162461bcd60e51b815260040161046c90613889565b61068c81836109d0565b6106ea5760405162461bcd60e51b815260206004820152602960248201527f54656c65706f7274657252656769737472794170703a2061646472657373206e6044820152681bdd081c185d5cd95960ba1b606482015260840161046c565b6001600160a01b0382165f818152600183016020526040808220805460ff19169055517f844e2f3154214672229235858fd029d1dfd543901c6d05931f0bc2480a2d72c39190a25050565b61074d61074736849003840184613989565b82610a16565b5050565b6107596109c8565b61076281610c27565b50565b61074d61077d5f805160206146158339815191525490565b303361078886613a8b565b85610dbf565b610796610fcb565b61079f5f611026565b565b5f5f805160206146958339815191526107ba81846109d0565b9392505050565b6107c9611096565b5f5f8051602061469583398151915260028101548154919250906001600160a01b0316634c1f08ce336040516001600160e01b031960e084901b1681526001600160a01b039091166004820152602401602060405180830381865afa158015610834573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906108589190613b59565b10156108bf5760405162461bcd60e51b815260206004820152603060248201527f54656c65706f7274657252656769737472794170703a20696e76616c6964205460448201526f32b632b837b93a32b91039b2b73232b960811b606482015260840161046c565b6108c981336109d0565b1561092f5760405162461bcd60e51b815260206004820152603060248201527f54656c65706f7274657252656769737472794170703a2054656c65706f72746560448201526f1c881859191c995cdcc81c185d5cd95960821b606482015260840161046c565b61096f858585858080601f0160208091040260200160405190810160405280939291908181526020018383808284375f920191909152506110e092505050565b506109786114d3565b50505050565b610986610fcb565b6001600160a01b0381166109af57604051631e4fbdf760e01b81525f600482015260240161046c565b61076281611026565b6109c38383836114fd565b505050565b61079f610fcb565b6001600160a01b03165f908152600191909101602052604090205460ff1690565b6109f96116ed565b610a068585858585611736565b610a0f8261175b565b5050505050565b5f805160206146558339815191528054600114610a455760405162461bcd60e51b815260040161046c90613b70565b60028155610a5283611791565b60e08301516001600160a01b031615610a7d5760405162461bcd60e51b815260040161046c90613bb4565b5f80610a9b855f01518660200151868860600151896080015161183a565b915091505f604051806040016040528060016004811115610abe57610abe613bfa565b8152602001604051806040016040528089604001516001600160a01b0316815260200186815250604051602001610af59190613c0e565b60405160208183030381529060405281525090505f610bd46040518060c00160405280895f0151815260200189602001516001600160a01b0316815260200160405180604001604052808b606001516001600160a01b031681526020018781525081526020018960c0015181526020015f6001600160401b03811115610b7d57610b7d6138d7565b604051908082528060200260200182016040528015610ba6578160200160208202803683370190505b50815260200184604051602001610bbd9190613c7b565b6040516020818303038152906040528152506119ff565b9050336001600160a01b0316817f93f19bf1ec58a15dc643b37e7e18a1c13e85e06cd11929e283154691ace9fb528987604051610c12929190613cbd565b60405180910390a35050600190925550505050565b5f8051602061469583398151915280546040805163301fd1f560e21b815290515f926001600160a01b03169163c07f47d49160048083019260209291908290030181865afa158015610c7b573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610c9f9190613b59565b600283015490915081841115610d115760405162461bcd60e51b815260206004820152603160248201527f54656c65706f7274657252656769737472794170703a20696e76616c6964205460448201527032b632b837b93a32b9103b32b939b4b7b760791b606482015260840161046c565b808411610d865760405162461bcd60e51b815260206004820152603f60248201527f54656c65706f7274657252656769737472794170703a206e6f7420677265617460448201527f6572207468616e2063757272656e74206d696e696d756d2076657273696f6e00606482015260840161046c565b60028301849055604051849082907fa9a7ef57e41f05b4c15480842f5f0c27edfcbb553fed281f7c4068452cc1c02d905f90a350505050565b5f805160206146558339815191528054600114610dee5760405162461bcd60e51b815260040161046c90613b70565b60028155610dfb83611b1a565b60c08301516001600160a01b031615610e265760405162461bcd60e51b815260040161046c90613bb4565b5f80610e46855f015186602001518688610100015189610120015161183a565b915091505f604051806040016040528060026004811115610e6957610e69613bfa565b81526020016040518061010001604052808c81526020018b6001600160a01b031681526020018a6001600160a01b0316815260200189604001516001600160a01b03168152602001868152602001896060015181526020018960a0015181526020018960e001516001600160a01b0316815250604051602001610eec9190613d3e565b60405160208183030381529060405281525090505f610f756040518060c00160405280895f0151815260200189602001516001600160a01b0316815260200160405180604001604052808b61010001516001600160a01b03168152602001878152508152602001896080015181526020015f6001600160401b03811115610b7d57610b7d6138d7565b9050876001600160a01b0316817f5d76dff81bf773b908b050fa113d39f7d8135bb4175398f313ea19cd3a1a0b168987604051610fb3929190613ddc565b60405180910390a35050600190925550505050505050565b33610ffd7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300546001600160a01b031690565b6001600160a01b03161461079f5760405163118cdaa760e01b815233600482015260240161046c565b7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c19930080546001600160a01b031981166001600160a01b03848116918217845560405192169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0905f90a3505050565b7f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f008054600119016110da57604051633ee5aeb560e01b815260040160405180910390fd5b60029055565b5f5f8051602061461583398151915290505f828060200190518101906111069190613f00565b905060018151600481111561111d5761111d613bfa565b03611165575f816020015180602001905181019061113b9190613f88565b90505f61114d87878460200151611cff565b905061115c825f015182611d8a565b50505050505050565b60028151600481111561117a5761117a613bfa565b03611293575f81602001518060200190518101906111989190613fc0565b90505f6111aa87878460800151611cff565b825190915087146112105760405162461bcd60e51b815260206004820152602a60248201527f546f6b656e486f6d653a206d69736d61746368656420736f7572636520626c6f60448201526918dad8da185a5b88125160b21b606482015260840161046c565b856001600160a01b031682602001516001600160a01b0316146112895760405162461bcd60e51b815260206004820152602b60248201527f546f6b656e486f6d653a206d69736d617463686564206f726967696e2073656e60448201526a646572206164647265737360a81b606482015260840161046c565b61115c8282611ded565b6003815160048111156112a8576112a8613bfa565b0361137c575f81602001518060200190518101906112c6919061408a565b90505f806112de888885606001518660800151611fcd565b91509150611372604051806101000160405280855f0151815260200185602001516001600160a01b0316815260200185604001516001600160a01b03168152602001876001015f9054906101000a90046001600160a01b03166001600160a01b031681526020018381526020015f81526020018560a0015181526020018560c001516001600160a01b031681525083612078565b5050505050505050565b60048151600481111561139157611391613bfa565b0361148c575f81602001518060200190518101906113af9190614123565b90505f806113c888888560800151866101400151611fcd565b915091506113728888855f01516040518061016001604052808860200151815260200188604001516001600160a01b0316815260200188606001516001600160a01b031681526020018860a00151815260200188610100015181526020018860c0015181526020018861012001516001600160a01b031681526020018860e001516001600160a01b031681526020018a6001015f9054906101000a90046001600160a01b03166001600160a01b031681526020018681526020015f81525086612203565b5f815160048111156114a0576114a0613bfa565b03610a0f575f81602001518060200190518101906114be919061421b565b90506114cb8686836123e0565b505050505050565b5f7f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f005b6001905550565b5f80516020614655833981519152805460011461152c5760405162461bcd60e51b815260040161046c90613b70565b60028082555f8581525f80516020614635833981519152602090815260408083206001600160a01b03881684528252918290208251608081018452815460ff9081161515808352600184015494830194909452948201549381019390935260030154909216151560608201525f80516020614615833981519152916115c35760405162461bcd60e51b815260040161046c90614281565b5f8160200151116116205760405162461bcd60e51b815260206004820152602160248201527f546f6b656e486f6d653a207a65726f20636f6c6c61746572616c206e656564656044820152601960fa1b606482015260840161046c565b611629846127e7565b93505f80826020015186106116585760208301515f925061164a90876142ca565b90508260200151955061166b565b85836020015161166891906142ca565b91505b5f88815260028501602090815260408083206001600160a01b038b168085529083529281902060010185905580518981529182018590528a917f6769a5f9bfc8b6e0db839ab981cbf9239274ae72d2d035081a9157d43bd33cb6910160405180910390a380156116df576116df3382611d8a565b505060019092555050505050565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0054600160401b900460ff1661079f57604051631afcd79f60e31b815260040160405180910390fd5b61173e6116ed565b61174985858561280e565b611751612829565b610a0f8282612839565b6117636116ed565b5f8051602061467583398151915280546001600160a01b0319166001600160a01b0392909216919091179055565b60408101516001600160a01b03166117f55760405162461bcd60e51b815260206004820152602160248201527f546f6b656e486f6d653a207a65726f20726563697069656e74206164647265736044820152607360f81b606482015260840161046c565b5f8160c00151116118185760405162461bcd60e51b815260040161046c906142dd565b60a0810151156107625760405162461bcd60e51b815260040161046c9061431f565b5f8581525f80516020614635833981519152602090815260408083206001600160a01b038816845282528083208151608081018352815460ff90811615158083526001840154958301959095526002830154938201939093526003909101549091161515606082015282915f8051602061461583398151915291906118d15760405162461bcd60e51b815260040161046c90614281565b6020810151156119335760405162461bcd60e51b815260206004820152602760248201527f546f6b656e486f6d653a20636f6c6c61746572616c206e656564656420666f726044820152662072656d6f746560c81b606482015260840161046c565b61193c876127e7565b965084156119525761194f8633876129a0565b94505b5f611966826040015183606001518a612af9565b90505f81116119b75760405162461bcd60e51b815260206004820152601d60248201527f546f6b656e486f6d653a207a65726f207363616c656420616d6f756e74000000604482015260640161046c565b5f8a815260038401602090815260408083206001600160a01b038d168452909152812080548392906119ea908490614360565b90915550909a95995094975050505050505050565b5f80611a09612b0f565b60408401516020015190915015611aae576040830151516001600160a01b0316611a8b5760405162461bcd60e51b815260206004820152602d60248201527f54656c65706f7274657252656769737472794170703a207a65726f206665652060448201526c746f6b656e206164647265737360981b606482015260840161046c565b604083015160208101519051611aae916001600160a01b03909116908390612bff565b604051630624488560e41b81526001600160a01b03821690636244885090611ada908690600401614373565b6020604051808303815f875af1158015611af6573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906107ba9190613b59565b60408101516001600160a01b0316611b875760405162461bcd60e51b815260206004820152602a60248201527f546f6b656e486f6d653a207a65726f20726563697069656e7420636f6e7472616044820152696374206164647265737360b01b606482015260840161046c565b5f816080015111611baa5760405162461bcd60e51b815260040161046c906142dd565b5f8160a0015111611c095760405162461bcd60e51b815260206004820152602360248201527f546f6b656e486f6d653a207a65726f20726563697069656e7420676173206c696044820152621b5a5d60ea1b606482015260840161046c565b80608001518160a0015110611c6f5760405162461bcd60e51b815260206004820152602660248201527f546f6b656e486f6d653a20696e76616c696420726563697069656e7420676173604482015265081b1a5b5a5d60d21b606482015260840161046c565b60e08101516001600160a01b0316611cdc5760405162461bcd60e51b815260206004820152602a60248201527f546f6b656e486f6d653a207a65726f2066616c6c6261636b20726563697069656044820152696e74206164647265737360b01b606482015260840161046c565b610140810151156107625760405162461bcd60e51b815260040161046c9061431f565b5f8381525f80516020614635833981519152602090815260408083206001600160a01b038616845282528083208151608081018352815460ff9081161515825260018301549482019490945260028201549281019290925260030154909116151560608201525f8051602061461583398151915290611d8081878787612c86565b9695505050505050565b6040518181525f80516020614675833981519152906001600160a01b038416907f6352c5382c4a4578e712449ca65e83cdb392d045dfcf1cad9615189db2da244b9060200160405180910390a280546109c3906001600160a01b03168484612d7d565b5f80516020614675833981519152805460608401516001600160a01b0390911690611e1a90829085612bff565b5f845f01518560200151866040015184878960a00151604051602401611e459695949392919061442a565b60408051601f198184030181529190526020810180516001600160e01b03166394395edd60e01b17905260c086015160608701519192505f91611e89919084612ddc565b6060870151604051636eb1769f60e11b81523060048201526001600160a01b0391821660248201529192505f919085169063dd62ed3e90604401602060405180830381865afa158015611ede573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611f029190613b59565b9050611f138488606001515f612de9565b8115611f655786606001516001600160a01b03167f104deb555f67e63782bb817bc26c39050894645f9b9f29c4be8ae68d0e8b7ff487604051611f5891815260200190565b60405180910390a2611fad565b86606001516001600160a01b03167fb9eaeae386d339f8115782f297a9e5f0e13fb587cd6b0d502f113cb8dd4d6cb087604051611fa491815260200190565b60405180910390a25b801561115c5760e087015161115c906001600160a01b0386169083612d7d565b5f8481525f80516020614635833981519152602090815260408083206001600160a01b038716845282528083208151608081018352815460ff90811615158252600183015494820194909452600282015492810192909252600301549091161515606082015281905f805160206146158339815191529082612051828a8a8a612c86565b90505f6120678360400151846060015189612e78565b919a91995090975050505050505050565b5f8051602061465583398151915280546001146120a75760405162461bcd60e51b815260040161046c90613b70565b600281556120b483611791565b5f6120cc845f01518560200151858760800151612e85565b9050805f036120e9576120e38460e0015184611d8a565b506121fb565b604080518082019091525f908060018152602001604051806040016040528088604001516001600160a01b031681526020018581525060405160200161212f9190613c0e565b60405160208183030381529060405281525090505f6121bb6040518060c00160405280885f0151815260200188602001516001600160a01b0316815260200160405180604001604052808a606001516001600160a01b031681526020018a6080015181525081526020018860c0015181526020015f6001600160401b03811115610b7d57610b7d6138d7565b9050807f825080857c76cef4a1629c0705a7f8b4ef0282ddcafde0b6715c4fb34b68aaf087856040516121ef929190613cbd565b60405180910390a25050505b600190555050565b5f8051602061465583398151915280546001146122325760405162461bcd60e51b815260040161046c90613b70565b6002815561223f83611b1a565b5f612258845f0151856020015185876101200151612e85565b9050805f036122755761226f8460c0015184611d8a565b506123d5565b604080518082019091525f9080600281526020016040518061010001604052808b81526020018a6001600160a01b03168152602001896001600160a01b0316815260200188604001516001600160a01b03168152602001858152602001886060015181526020018860a0015181526020018860e001516001600160a01b03168152506040516020016123079190613d3e565b60405160208183030381529060405281525090505f6123956040518060c00160405280885f0151815260200188602001516001600160a01b0316815260200160405180604001604052808a61010001516001600160a01b031681526020018a61012001518152508152602001886080015181526020015f6001600160401b03811115610b7d57610b7d6138d7565b9050807f42eff9005856e3c586b096d67211a566dc926052119fd7cc08023c70937ecb3087856040516123c9929190613ddc565b60405180910390a25050505b600190555050505050565b5f80516020614615833981519152836124475760405162461bcd60e51b8152602060048201526024808201527f546f6b656e486f6d653a207a65726f2072656d6f746520626c6f636b636861696044820152631b88125160e21b606482015260840161046c565b805484036124af5760405162461bcd60e51b815260206004820152602f60248201527f546f6b656e486f6d653a2063616e6e6f742072656769737465722072656d6f7460448201526e329037b71039b0b6b29031b430b4b760891b606482015260840161046c565b6001600160a01b03831661251e5760405162461bcd60e51b815260206004820152603060248201527f546f6b656e486f6d653a207a65726f2072656d6f746520746f6b656e2074726160448201526f6e73666572726572206164647265737360801b606482015260840161046c565b5f84815260028201602090815260408083206001600160a01b038716845290915290205460ff161561259e5760405162461bcd60e51b8152602060048201526024808201527f546f6b656e486f6d653a2072656d6f746520616c726561647920726567697374604482015263195c995960e21b606482015260840161046c565b6012826040015160ff1611156126085760405162461bcd60e51b815260206004820152602960248201527f546f6b656e486f6d653a2072656d6f746520746f6b656e20646563696d616c73604482015268040e8dede40d0d2ced60bb1b606482015260840161046c565b6001810154602083015160ff908116600160a01b909204161461267c5760405162461bcd60e51b815260206004820152602660248201527f546f6b656e486f6d653a20696e76616c696420686f6d6520746f6b656e20646560448201526563696d616c7360d01b606482015260840161046c565b5f8061269d8360010160149054906101000a900460ff168560400151612ff6565b915091505f6126b08383875f0151612e78565b90508180156126ca575084516126c790849061447e565b15155b156126dd576126da600182614360565b90505b6040518060800160405280600115158152602001828152602001848152602001831515815250846002015f8981526020019081526020015f205f886001600160a01b03166001600160a01b031681526020019081526020015f205f820151815f015f6101000a81548160ff02191690831515021790555060208201518160010155604082015181600201556060820151816003015f6101000a81548160ff021916908315150217905550905050856001600160a01b0316877ff229b02a51a4c8d5ef03a096ae0dd727d7b48b710d21b50ebebb560eef739b908388604001516040516127d692919091825260ff16602082015260400190565b60405180910390a350505050505050565b5f8051602061467583398151915280545f91906107ba906001600160a01b031633856129a0565b6128166116ed565b612820838261303e565b6109c382613060565b6128316116ed565b61079f613071565b6128416116ed565b6001600160a01b0382166128975760405162461bcd60e51b815260206004820152601d60248201527f546f6b656e486f6d653a207a65726f20746f6b656e2061646472657373000000604482015260640161046c565b60128160ff1611156128f65760405162461bcd60e51b815260206004820152602260248201527f546f6b656e486f6d653a20746f6b656e20646563696d616c7320746f6f2068696044820152610ced60f31b606482015260840161046c565b5f5f8051602061461583398151915290506005600160991b016001600160a01b0316634213cf786040518163ffffffff1660e01b8152600401602060405180830381865afa15801561294a573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061296e9190613b59565b8155600101805460ff909216600160a01b026001600160a81b03199092166001600160a01b0390931692909217179055565b6040516370a0823160e01b81523060048201525f9081906001600160a01b038616906370a0823190602401602060405180830381865afa1580156129e6573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612a0a9190613b59565b9050612a216001600160a01b038616853086613085565b6040516370a0823160e01b81523060048201525f906001600160a01b038716906370a0823190602401602060405180830381865afa158015612a65573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612a899190613b59565b9050818111612aef5760405162461bcd60e51b815260206004820152602c60248201527f5361666545524332305472616e7366657246726f6d3a2062616c616e6365206e60448201526b1bdd081a5b98dc99585cd95960a21b606482015260840161046c565b611d8082826142ca565b5f612b0784848460016130be565b949350505050565b5f8051602061469583398151915280546040805163d820e64f60e01b815290515f939284926001600160a01b039091169163d820e64f916004808201926020929091908290030181865afa158015612b69573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612b8d9190614491565b9050612b9982826109d0565b1561042a5760405162461bcd60e51b815260206004820152603060248201527f54656c65706f7274657252656769737472794170703a2054656c65706f72746560448201526f1c881cd95b991a5b99c81c185d5cd95960821b606482015260840161046c565b604051636eb1769f60e11b81523060048201526001600160a01b0383811660248301525f919085169063dd62ed3e90604401602060405180830381865afa158015612c4c573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612c709190613b59565b90506109788484612c818585614360565b612de9565b83515f90612ca65760405162461bcd60e51b815260040161046c90614281565b602085015115612d045760405162461bcd60e51b8152602060048201526024808201527f546f6b656e486f6d653a2072656d6f7465206e6f7420636f6c6c61746572616c6044820152631a5e995960e21b606482015260840161046c565b612d0f8484846130e5565b5f612d238660400151876060015185612e78565b90505f8111612d745760405162461bcd60e51b815260206004820152601c60248201527f546f6b656e486f6d653a207a65726f20746f6b656e20616d6f756e7400000000604482015260640161046c565b95945050505050565b6040516001600160a01b038381166024830152604482018390526109c391859182169063a9059cbb906064015b604051602081830303815290604052915060e01b6020820180516001600160e01b0383818316178352505050506131d2565b5f612b07845f8585613233565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663095ea7b360e01b179052612e3a8482613303565b610978576040516001600160a01b0384811660248301525f6044830152612e6e91869182169063095ea7b390606401612daa565b61097884826131d2565b5f612b078484845f6130be565b5f8481525f80516020614635833981519152602090815260408083206001600160a01b038716845282528083208151608081018352815460ff9081161580158352600184015495830195909552600283015493820193909352600390910154909116151560608201525f805160206146158339815191529180612f0b57505f8160200151115b15612f1a575f92505050612b07565b838511612f7e5760405162461bcd60e51b815260206004820152602c60248201527f546f6b656e486f6d653a20696e73756666696369656e7420616d6f756e74207460448201526b6f20636f766572206665657360a01b606482015260840161046c565b612f8884866142ca565b94505f612f9e8260400151836060015188612af9565b9050805f03612fb2575f9350505050612b07565b5f88815260038401602090815260408083206001600160a01b038b16845290915281208054839290612fe5908490614360565b909155509098975050505050505050565b5f8060ff8085169084161181816130195761301185876144ac565b60ff16613027565b61302386866144ac565b60ff165b61303290600a6145a5565b96919550909350505050565b6130466116ed565b61304e6133a0565b6130566133b0565b61074d82826133b8565b6130686116ed565b6107628161353c565b5f5f805160206146558339815191526114f6565b6040516001600160a01b0384811660248301528381166044830152606482018390526109789186918216906323b872dd90608401612daa565b5f811515841515036130db576130d485846145b0565b9050612b07565b612d7485846145c7565b5f8381527f9316912b5a9db88acbe872c934fdd0a46c436c6dcba332d649c4d57c7bc9e603602090815260408083206001600160a01b03861684529091529020545f80516020614615833981519152908281101561319c5760405162461bcd60e51b815260206004820152602e60248201527f546f6b656e486f6d653a20696e73756666696369656e7420746f6b656e20747260448201526d616e736665722062616c616e636560901b606482015260840161046c565b6131a683826142ca565b5f9586526003909201602090815260408087206001600160a01b03909616875294905250919092205550565b5f6131e66001600160a01b03841683613544565b905080515f1415801561320a57508080602001905181019061320891906145da565b155b156109c357604051635274afe760e01b81526001600160a01b038416600482015260240161046c565b5f845a10156132845760405162461bcd60e51b815260206004820152601b60248201527f43616c6c5574696c733a20696e73756666696369656e74206761730000000000604482015260640161046c565b834710156132d45760405162461bcd60e51b815260206004820152601d60248201527f43616c6c5574696c733a20696e73756666696369656e742076616c7565000000604482015260640161046c565b826001600160a01b03163b5f036132ec57505f612b07565b5f805f84516020860188888bf19695505050505050565b5f805f846001600160a01b03168460405161331e91906145f9565b5f604051808303815f865af19150503d805f8114613357576040519150601f19603f3d011682016040523d82523d5f602084013e61335c565b606091505b509150915081801561338657508051158061338657508080602001905181019061338691906145da565b8015612d745750505050506001600160a01b03163b151590565b6133a86116ed565b61079f613551565b61079f6116ed565b6133c06116ed565b6001600160a01b03821661343c5760405162461bcd60e51b815260206004820152603760248201527f54656c65706f7274657252656769737472794170703a207a65726f2054656c6560448201527f706f727465722072656769737472792061646472657373000000000000000000606482015260840161046c565b5f5f8051602061469583398151915290505f8390505f816001600160a01b031663c07f47d46040518163ffffffff1660e01b8152600401602060405180830381865afa15801561348e573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906134b29190613b59565b1161351a5760405162461bcd60e51b815260206004820152603260248201527f54656c65706f7274657252656769737472794170703a20696e76616c69642054604482015271656c65706f7274657220726567697374727960701b606482015260840161046c565b81546001600160a01b0319166001600160a01b03821617825561097883610c27565b6109866116ed565b60606107ba83835f613559565b6114d36116ed565b60608147101561357e5760405163cd78605960e01b815230600482015260240161046c565b5f80856001600160a01b0316848660405161359991906145f9565b5f6040518083038185875af1925050503d805f81146135d3576040519150601f19603f3d011682016040523d82523d5f602084013e6135d8565b606091505b5091509150611d808683836060826135f8576135f38261363f565b6107ba565b815115801561360f57506001600160a01b0384163b155b1561363857604051639996b31560e01b81526001600160a01b038516600482015260240161046c565b50806107ba565b80511561364f5780518082602001fd5b604051630a12f52160e11b815260040160405180910390fd5b6001600160a01b0381168114610762575f80fd5b803561368781613668565b919050565b5f806040838503121561369d575f80fd5b8235915060208301356136af81613668565b809150509250929050565b5f602082840312156136ca575f80fd5b81356107ba81613668565b60ff81168114610762575f80fd5b5f805f805f60a086880312156136f7575f80fd5b853561370281613668565b9450602086013561371281613668565b935060408601359250606086013561372981613668565b91506080860135613739816136d5565b809150509295509295909350565b5f8082840361012081121561375a575f80fd5b61010080821215613769575f80fd5b9395938601359450505050565b5f60208284031215613786575f80fd5b5035919050565b5f806040838503121561379e575f80fd5b82356001600160401b038111156137b3575f80fd5b830161016081860312156137c5575f80fd5b946020939093013593505050565b5f805f80606085870312156137e6575f80fd5b8435935060208501356137f881613668565b925060408501356001600160401b0380821115613813575f80fd5b818701915087601f830112613826575f80fd5b813581811115613834575f80fd5b886020828501011115613845575f80fd5b95989497505060200194505050565b5f805f60608486031215613866575f80fd5b83359250602084013561387881613668565b929592945050506040919091013590565b6020808252602e908201527f54656c65706f7274657252656769737472794170703a207a65726f2054656c6560408201526d706f72746572206164647265737360901b606082015260800190565b634e487b7160e01b5f52604160045260245ffd5b60405161010081016001600160401b038111828210171561390e5761390e6138d7565b60405290565b60405161016081016001600160401b038111828210171561390e5761390e6138d7565b604080519081016001600160401b038111828210171561390e5761390e6138d7565b604051601f8201601f191681016001600160401b0381118282101715613981576139816138d7565b604052919050565b5f610100828403121561399a575f80fd5b6139a26138eb565b8235815260208301356139b481613668565b602082015260408301356139c781613668565b60408201526139d86060840161367c565b60608201526080830135608082015260a083013560a082015260c083013560c0820152613a0760e0840161367c565b60e08201529392505050565b5f6001600160401b03821115613a2b57613a2b6138d7565b50601f01601f191660200190565b5f82601f830112613a48575f80fd5b8135613a5b613a5682613a13565b613959565b818152846020838601011115613a6f575f80fd5b816020850160208301375f918101602001919091529392505050565b5f6101608236031215613a9c575f80fd5b613aa4613914565b82358152613ab46020840161367c565b6020820152613ac56040840161367c565b604082015260608301356001600160401b03811115613ae2575f80fd5b613aee36828601613a39565b6060830152506080830135608082015260a083013560a0820152613b1460c0840161367c565b60c0820152613b2560e0840161367c565b60e0820152610100613b3881850161367c565b90820152610120838101359082015261014092830135928101929092525090565b5f60208284031215613b69575f80fd5b5051919050565b60208082526024908201527f53656e645265656e7472616e637947756172643a2073656e64207265656e7472604082015263616e637960e01b606082015260800190565b60208082526026908201527f546f6b656e486f6d653a206e6f6e2d7a65726f206d756c74692d686f702066616040820152656c6c6261636b60d01b606082015260800190565b634e487b7160e01b5f52602160045260245ffd5b81516001600160a01b03168152602080830151908201526040810161042a565b5f5b83811015613c48578181015183820152602001613c30565b50505f910152565b5f8151808452613c67816020860160208601613c2e565b601f01601f19169290920160200192915050565b602081525f825160058110613c9e57634e487b7160e01b5f52602160045260245ffd5b806020840152506020830151604080840152612b076060840182613c50565b5f6101208201905083518252602084015160018060a01b03808216602085015280604087015116604085015280606087015116606085015250506080840151608083015260a084015160a083015260c084015160c083015260e0840151613d2f60e08401826001600160a01b03169052565b50826101008301529392505050565b60208152815160208201525f602083015160018060a01b03808216604085015280604086015116606085015250506060830151613d8660808401826001600160a01b03169052565b50608083015160a083015260a08301516101008060c0850152613dad610120850183613c50565b915060c085015160e085015260e0850151613dd2828601826001600160a01b03169052565b5090949350505050565b60408152825160408201525f6020840151613e0260608401826001600160a01b03169052565b5060408401516001600160a01b03166080830152606084015161016060a08401819052613e336101a0850183613c50565b9150608086015160c085015260a086015160e085015260c0860151610100613e65818701836001600160a01b03169052565b60e08801519150610120613e83818801846001600160a01b03169052565b90880151915061014090613ea1878301846001600160a01b03169052565b880151928601929092525090940151610180830152506020015290565b5f82601f830112613ecd575f80fd5b8151613edb613a5682613a13565b818152846020838601011115613eef575f80fd5b612b07826020830160208701613c2e565b5f60208284031215613f10575f80fd5b81516001600160401b0380821115613f26575f80fd5b9083019060408286031215613f39575f80fd5b613f41613937565b825160058110613f4f575f80fd5b8152602083015182811115613f62575f80fd5b613f6e87828601613ebe565b60208301525095945050505050565b805161368781613668565b5f60408284031215613f98575f80fd5b613fa0613937565b8251613fab81613668565b81526020928301519281019290925250919050565b5f60208284031215613fd0575f80fd5b81516001600160401b0380821115613fe6575f80fd5b908301906101008286031215613ffa575f80fd5b6140026138eb565b8251815261401260208401613f7d565b602082015261402360408401613f7d565b604082015261403460608401613f7d565b60608201526080830151608082015260a083015182811115614054575f80fd5b61406087828601613ebe565b60a08301525060c083015160c082015261407c60e08401613f7d565b60e082015295945050505050565b5f60e0828403121561409a575f80fd5b60405160e081018181106001600160401b03821117156140bc576140bc6138d7565b6040528251815260208301516140d181613668565b602082015260408301516140e481613668565b80604083015250606083015160608201526080830151608082015260a083015160a082015260c083015161411781613668565b60c08201529392505050565b5f60208284031215614133575f80fd5b81516001600160401b0380821115614149575f80fd5b90830190610160828603121561415d575f80fd5b614165613914565b61416e83613f7d565b81526020830151602082015261418660408401613f7d565b604082015261419760608401613f7d565b60608201526080830151608082015260a0830151828111156141b7575f80fd5b6141c387828601613ebe565b60a08301525060c083015160c08201526141df60e08401613f7d565b60e0820152610100838101519082015261012091506141ff828401613f7d565b9181019190915261014091820151918101919091529392505050565b5f6060828403121561422b575f80fd5b604051606081018181106001600160401b038211171561424d5761424d6138d7565b604052825181526020830151614262816136d5565b60208201526040830151614275816136d5565b60408201529392505050565b6020808252818101527f546f6b656e486f6d653a2072656d6f7465206e6f742072656769737465726564604082015260600190565b634e487b7160e01b5f52601160045260245ffd5b8181038181111561042a5761042a6142b6565b60208082526022908201527f546f6b656e486f6d653a207a65726f20726571756972656420676173206c696d6040820152611a5d60f21b606082015260800190565b60208082526021908201527f546f6b656e486f6d653a206e6f6e2d7a65726f207365636f6e646172792066656040820152606560f81b606082015260800190565b8082018082111561042a5761042a6142b6565b6020808252825182820152828101516001600160a01b039081166040808501919091528401518051821660608501528083015160808501525f929161010085019190606087015160a0870152608087015160e060c08801528051938490528401925f92506101208701905b80841015614400578451831682529385019360019390930192908501906143de565b5060a0880151878203601f190160e0890152945061441e8186613c50565b98975050505050505050565b8681526001600160a01b0386811660208301528581166040830152841660608201526080810183905260c060a082018190525f9061441e90830184613c50565b634e487b7160e01b5f52601260045260245ffd5b5f8261448c5761448c61446a565b500690565b5f602082840312156144a1575f80fd5b81516107ba81613668565b60ff828116828216039081111561042a5761042a6142b6565b600181815b808511156144ff57815f19048211156144e5576144e56142b6565b808516156144f257918102915b93841c93908002906144ca565b509250929050565b5f826145155750600161042a565b8161452157505f61042a565b816001811461453757600281146145415761455d565b600191505061042a565b60ff841115614552576145526142b6565b50506001821b61042a565b5060208310610133831016604e8410600b8410161715614580575081810a61042a565b61458a83836144c5565b805f190482111561459d5761459d6142b6565b029392505050565b5f6107ba8383614507565b808202811582820484141761042a5761042a6142b6565b5f826145d5576145d561446a565b500490565b5f602082840312156145ea575f80fd5b815180151581146107ba575f80fd5b5f825161460a818460208701613c2e565b919091019291505056fe9316912b5a9db88acbe872c934fdd0a46c436c6dcba332d649c4d57c7bc9e6009316912b5a9db88acbe872c934fdd0a46c436c6dcba332d649c4d57c7bc9e602d2f1ed38b7d242bfb8b41862afb813a15193219a4bc717f2056607593e6c7500914a9547f6c3ddce1d5efbd9e687708f0d1d408ce129e8e1a88bce4f40e29500de77a4dc7391f6f8f2d9567915d687d3aee79e7a1fc7300392f2727e9a0f1d00a264697066735822122092823e322ffd6798cab6557064b56065b8e2030ffe7407f37af4b50111e2a56364736f6c63430008190033", +} + +// ERC20TokenHomeUpgradeableABI is the input ABI used to generate the binding from. +// Deprecated: Use ERC20TokenHomeUpgradeableMetaData.ABI instead. +var ERC20TokenHomeUpgradeableABI = ERC20TokenHomeUpgradeableMetaData.ABI + +// ERC20TokenHomeUpgradeableBin is the compiled bytecode used for deploying new contracts. +// Deprecated: Use ERC20TokenHomeUpgradeableMetaData.Bin instead. +var ERC20TokenHomeUpgradeableBin = ERC20TokenHomeUpgradeableMetaData.Bin + +// DeployERC20TokenHomeUpgradeable deploys a new Ethereum contract, binding an instance of ERC20TokenHomeUpgradeable to it. +func DeployERC20TokenHomeUpgradeable(auth *bind.TransactOpts, backend bind.ContractBackend, init uint8) (common.Address, *types.Transaction, *ERC20TokenHomeUpgradeable, error) { + parsed, err := ERC20TokenHomeUpgradeableMetaData.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(ERC20TokenHomeUpgradeableBin), backend, init) + if err != nil { + return common.Address{}, nil, nil, err + } + return address, tx, &ERC20TokenHomeUpgradeable{ERC20TokenHomeUpgradeableCaller: ERC20TokenHomeUpgradeableCaller{contract: contract}, ERC20TokenHomeUpgradeableTransactor: ERC20TokenHomeUpgradeableTransactor{contract: contract}, ERC20TokenHomeUpgradeableFilterer: ERC20TokenHomeUpgradeableFilterer{contract: contract}}, nil +} + +// ERC20TokenHomeUpgradeable is an auto generated Go binding around an Ethereum contract. +type ERC20TokenHomeUpgradeable struct { + ERC20TokenHomeUpgradeableCaller // Read-only binding to the contract + ERC20TokenHomeUpgradeableTransactor // Write-only binding to the contract + ERC20TokenHomeUpgradeableFilterer // Log filterer for contract events +} + +// ERC20TokenHomeUpgradeableCaller is an auto generated read-only Go binding around an Ethereum contract. +type ERC20TokenHomeUpgradeableCaller struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// ERC20TokenHomeUpgradeableTransactor is an auto generated write-only Go binding around an Ethereum contract. +type ERC20TokenHomeUpgradeableTransactor struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// ERC20TokenHomeUpgradeableFilterer is an auto generated log filtering Go binding around an Ethereum contract events. +type ERC20TokenHomeUpgradeableFilterer struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// ERC20TokenHomeUpgradeableSession is an auto generated Go binding around an Ethereum contract, +// with pre-set call and transact options. +type ERC20TokenHomeUpgradeableSession struct { + Contract *ERC20TokenHomeUpgradeable // 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 +} + +// ERC20TokenHomeUpgradeableCallerSession is an auto generated read-only Go binding around an Ethereum contract, +// with pre-set call options. +type ERC20TokenHomeUpgradeableCallerSession struct { + Contract *ERC20TokenHomeUpgradeableCaller // Generic contract caller binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session +} + +// ERC20TokenHomeUpgradeableTransactorSession is an auto generated write-only Go binding around an Ethereum contract, +// with pre-set transact options. +type ERC20TokenHomeUpgradeableTransactorSession struct { + Contract *ERC20TokenHomeUpgradeableTransactor // Generic contract transactor binding to set the session for + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// ERC20TokenHomeUpgradeableRaw is an auto generated low-level Go binding around an Ethereum contract. +type ERC20TokenHomeUpgradeableRaw struct { + Contract *ERC20TokenHomeUpgradeable // Generic contract binding to access the raw methods on +} + +// ERC20TokenHomeUpgradeableCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. +type ERC20TokenHomeUpgradeableCallerRaw struct { + Contract *ERC20TokenHomeUpgradeableCaller // Generic read-only contract binding to access the raw methods on +} + +// ERC20TokenHomeUpgradeableTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. +type ERC20TokenHomeUpgradeableTransactorRaw struct { + Contract *ERC20TokenHomeUpgradeableTransactor // Generic write-only contract binding to access the raw methods on +} + +// NewERC20TokenHomeUpgradeable creates a new instance of ERC20TokenHomeUpgradeable, bound to a specific deployed contract. +func NewERC20TokenHomeUpgradeable(address common.Address, backend bind.ContractBackend) (*ERC20TokenHomeUpgradeable, error) { + contract, err := bindERC20TokenHomeUpgradeable(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &ERC20TokenHomeUpgradeable{ERC20TokenHomeUpgradeableCaller: ERC20TokenHomeUpgradeableCaller{contract: contract}, ERC20TokenHomeUpgradeableTransactor: ERC20TokenHomeUpgradeableTransactor{contract: contract}, ERC20TokenHomeUpgradeableFilterer: ERC20TokenHomeUpgradeableFilterer{contract: contract}}, nil +} + +// NewERC20TokenHomeUpgradeableCaller creates a new read-only instance of ERC20TokenHomeUpgradeable, bound to a specific deployed contract. +func NewERC20TokenHomeUpgradeableCaller(address common.Address, caller bind.ContractCaller) (*ERC20TokenHomeUpgradeableCaller, error) { + contract, err := bindERC20TokenHomeUpgradeable(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &ERC20TokenHomeUpgradeableCaller{contract: contract}, nil +} + +// NewERC20TokenHomeUpgradeableTransactor creates a new write-only instance of ERC20TokenHomeUpgradeable, bound to a specific deployed contract. +func NewERC20TokenHomeUpgradeableTransactor(address common.Address, transactor bind.ContractTransactor) (*ERC20TokenHomeUpgradeableTransactor, error) { + contract, err := bindERC20TokenHomeUpgradeable(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &ERC20TokenHomeUpgradeableTransactor{contract: contract}, nil +} + +// NewERC20TokenHomeUpgradeableFilterer creates a new log filterer instance of ERC20TokenHomeUpgradeable, bound to a specific deployed contract. +func NewERC20TokenHomeUpgradeableFilterer(address common.Address, filterer bind.ContractFilterer) (*ERC20TokenHomeUpgradeableFilterer, error) { + contract, err := bindERC20TokenHomeUpgradeable(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &ERC20TokenHomeUpgradeableFilterer{contract: contract}, nil +} + +// bindERC20TokenHomeUpgradeable binds a generic wrapper to an already deployed contract. +func bindERC20TokenHomeUpgradeable(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := ERC20TokenHomeUpgradeableMetaData.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 (_ERC20TokenHomeUpgradeable *ERC20TokenHomeUpgradeableRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _ERC20TokenHomeUpgradeable.Contract.ERC20TokenHomeUpgradeableCaller.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 (_ERC20TokenHomeUpgradeable *ERC20TokenHomeUpgradeableRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _ERC20TokenHomeUpgradeable.Contract.ERC20TokenHomeUpgradeableTransactor.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_ERC20TokenHomeUpgradeable *ERC20TokenHomeUpgradeableRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _ERC20TokenHomeUpgradeable.Contract.ERC20TokenHomeUpgradeableTransactor.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 (_ERC20TokenHomeUpgradeable *ERC20TokenHomeUpgradeableCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _ERC20TokenHomeUpgradeable.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 (_ERC20TokenHomeUpgradeable *ERC20TokenHomeUpgradeableTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _ERC20TokenHomeUpgradeable.Contract.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_ERC20TokenHomeUpgradeable *ERC20TokenHomeUpgradeableTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _ERC20TokenHomeUpgradeable.Contract.contract.Transact(opts, method, params...) +} + +// ERC20TOKENHOMESTORAGELOCATION is a free data retrieval call binding the contract method 0x4797735f. +// +// Solidity: function ERC20_TOKEN_HOME_STORAGE_LOCATION() view returns(bytes32) +func (_ERC20TokenHomeUpgradeable *ERC20TokenHomeUpgradeableCaller) ERC20TOKENHOMESTORAGELOCATION(opts *bind.CallOpts) ([32]byte, error) { + var out []interface{} + err := _ERC20TokenHomeUpgradeable.contract.Call(opts, &out, "ERC20_TOKEN_HOME_STORAGE_LOCATION") + + if err != nil { + return *new([32]byte), err + } + + out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) + + return out0, err + +} + +// ERC20TOKENHOMESTORAGELOCATION is a free data retrieval call binding the contract method 0x4797735f. +// +// Solidity: function ERC20_TOKEN_HOME_STORAGE_LOCATION() view returns(bytes32) +func (_ERC20TokenHomeUpgradeable *ERC20TokenHomeUpgradeableSession) ERC20TOKENHOMESTORAGELOCATION() ([32]byte, error) { + return _ERC20TokenHomeUpgradeable.Contract.ERC20TOKENHOMESTORAGELOCATION(&_ERC20TokenHomeUpgradeable.CallOpts) +} + +// ERC20TOKENHOMESTORAGELOCATION is a free data retrieval call binding the contract method 0x4797735f. +// +// Solidity: function ERC20_TOKEN_HOME_STORAGE_LOCATION() view returns(bytes32) +func (_ERC20TokenHomeUpgradeable *ERC20TokenHomeUpgradeableCallerSession) ERC20TOKENHOMESTORAGELOCATION() ([32]byte, error) { + return _ERC20TokenHomeUpgradeable.Contract.ERC20TOKENHOMESTORAGELOCATION(&_ERC20TokenHomeUpgradeable.CallOpts) +} + +// TELEPORTERREGISTRYAPPSTORAGELOCATION is a free data retrieval call binding the contract method 0x909a6ac0. +// +// Solidity: function TELEPORTER_REGISTRY_APP_STORAGE_LOCATION() view returns(bytes32) +func (_ERC20TokenHomeUpgradeable *ERC20TokenHomeUpgradeableCaller) TELEPORTERREGISTRYAPPSTORAGELOCATION(opts *bind.CallOpts) ([32]byte, error) { + var out []interface{} + err := _ERC20TokenHomeUpgradeable.contract.Call(opts, &out, "TELEPORTER_REGISTRY_APP_STORAGE_LOCATION") + + if err != nil { + return *new([32]byte), err + } + + out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) + + return out0, err + +} + +// TELEPORTERREGISTRYAPPSTORAGELOCATION is a free data retrieval call binding the contract method 0x909a6ac0. +// +// Solidity: function TELEPORTER_REGISTRY_APP_STORAGE_LOCATION() view returns(bytes32) +func (_ERC20TokenHomeUpgradeable *ERC20TokenHomeUpgradeableSession) TELEPORTERREGISTRYAPPSTORAGELOCATION() ([32]byte, error) { + return _ERC20TokenHomeUpgradeable.Contract.TELEPORTERREGISTRYAPPSTORAGELOCATION(&_ERC20TokenHomeUpgradeable.CallOpts) +} + +// TELEPORTERREGISTRYAPPSTORAGELOCATION is a free data retrieval call binding the contract method 0x909a6ac0. +// +// Solidity: function TELEPORTER_REGISTRY_APP_STORAGE_LOCATION() view returns(bytes32) +func (_ERC20TokenHomeUpgradeable *ERC20TokenHomeUpgradeableCallerSession) TELEPORTERREGISTRYAPPSTORAGELOCATION() ([32]byte, error) { + return _ERC20TokenHomeUpgradeable.Contract.TELEPORTERREGISTRYAPPSTORAGELOCATION(&_ERC20TokenHomeUpgradeable.CallOpts) +} + +// TOKENHOMESTORAGELOCATION is a free data retrieval call binding the contract method 0x62e3901b. +// +// Solidity: function TOKEN_HOME_STORAGE_LOCATION() view returns(bytes32) +func (_ERC20TokenHomeUpgradeable *ERC20TokenHomeUpgradeableCaller) TOKENHOMESTORAGELOCATION(opts *bind.CallOpts) ([32]byte, error) { + var out []interface{} + err := _ERC20TokenHomeUpgradeable.contract.Call(opts, &out, "TOKEN_HOME_STORAGE_LOCATION") + + if err != nil { + return *new([32]byte), err + } + + out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) + + return out0, err + +} + +// TOKENHOMESTORAGELOCATION is a free data retrieval call binding the contract method 0x62e3901b. +// +// Solidity: function TOKEN_HOME_STORAGE_LOCATION() view returns(bytes32) +func (_ERC20TokenHomeUpgradeable *ERC20TokenHomeUpgradeableSession) TOKENHOMESTORAGELOCATION() ([32]byte, error) { + return _ERC20TokenHomeUpgradeable.Contract.TOKENHOMESTORAGELOCATION(&_ERC20TokenHomeUpgradeable.CallOpts) +} + +// TOKENHOMESTORAGELOCATION is a free data retrieval call binding the contract method 0x62e3901b. +// +// Solidity: function TOKEN_HOME_STORAGE_LOCATION() view returns(bytes32) +func (_ERC20TokenHomeUpgradeable *ERC20TokenHomeUpgradeableCallerSession) TOKENHOMESTORAGELOCATION() ([32]byte, error) { + return _ERC20TokenHomeUpgradeable.Contract.TOKENHOMESTORAGELOCATION(&_ERC20TokenHomeUpgradeable.CallOpts) +} + +// GetBlockchainID is a free data retrieval call binding the contract method 0x4213cf78. +// +// Solidity: function getBlockchainID() view returns(bytes32) +func (_ERC20TokenHomeUpgradeable *ERC20TokenHomeUpgradeableCaller) GetBlockchainID(opts *bind.CallOpts) ([32]byte, error) { + var out []interface{} + err := _ERC20TokenHomeUpgradeable.contract.Call(opts, &out, "getBlockchainID") + + if err != nil { + return *new([32]byte), err + } + + out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) + + return out0, err + +} + +// GetBlockchainID is a free data retrieval call binding the contract method 0x4213cf78. +// +// Solidity: function getBlockchainID() view returns(bytes32) +func (_ERC20TokenHomeUpgradeable *ERC20TokenHomeUpgradeableSession) GetBlockchainID() ([32]byte, error) { + return _ERC20TokenHomeUpgradeable.Contract.GetBlockchainID(&_ERC20TokenHomeUpgradeable.CallOpts) +} + +// GetBlockchainID is a free data retrieval call binding the contract method 0x4213cf78. +// +// Solidity: function getBlockchainID() view returns(bytes32) +func (_ERC20TokenHomeUpgradeable *ERC20TokenHomeUpgradeableCallerSession) GetBlockchainID() ([32]byte, error) { + return _ERC20TokenHomeUpgradeable.Contract.GetBlockchainID(&_ERC20TokenHomeUpgradeable.CallOpts) +} + +// GetMinTeleporterVersion is a free data retrieval call binding the contract method 0xd2cc7a70. +// +// Solidity: function getMinTeleporterVersion() view returns(uint256) +func (_ERC20TokenHomeUpgradeable *ERC20TokenHomeUpgradeableCaller) GetMinTeleporterVersion(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _ERC20TokenHomeUpgradeable.contract.Call(opts, &out, "getMinTeleporterVersion") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// GetMinTeleporterVersion is a free data retrieval call binding the contract method 0xd2cc7a70. +// +// Solidity: function getMinTeleporterVersion() view returns(uint256) +func (_ERC20TokenHomeUpgradeable *ERC20TokenHomeUpgradeableSession) GetMinTeleporterVersion() (*big.Int, error) { + return _ERC20TokenHomeUpgradeable.Contract.GetMinTeleporterVersion(&_ERC20TokenHomeUpgradeable.CallOpts) +} + +// GetMinTeleporterVersion is a free data retrieval call binding the contract method 0xd2cc7a70. +// +// Solidity: function getMinTeleporterVersion() view returns(uint256) +func (_ERC20TokenHomeUpgradeable *ERC20TokenHomeUpgradeableCallerSession) GetMinTeleporterVersion() (*big.Int, error) { + return _ERC20TokenHomeUpgradeable.Contract.GetMinTeleporterVersion(&_ERC20TokenHomeUpgradeable.CallOpts) +} + +// GetRemoteTokenTransferrerSettings is a free data retrieval call binding the contract method 0xc8511ada. +// +// Solidity: function getRemoteTokenTransferrerSettings(bytes32 remoteBlockchainID, address remoteTokenTransferrerAddress) view returns((bool,uint256,uint256,bool)) +func (_ERC20TokenHomeUpgradeable *ERC20TokenHomeUpgradeableCaller) GetRemoteTokenTransferrerSettings(opts *bind.CallOpts, remoteBlockchainID [32]byte, remoteTokenTransferrerAddress common.Address) (RemoteTokenTransferrerSettings, error) { + var out []interface{} + err := _ERC20TokenHomeUpgradeable.contract.Call(opts, &out, "getRemoteTokenTransferrerSettings", remoteBlockchainID, remoteTokenTransferrerAddress) + + if err != nil { + return *new(RemoteTokenTransferrerSettings), err + } + + out0 := *abi.ConvertType(out[0], new(RemoteTokenTransferrerSettings)).(*RemoteTokenTransferrerSettings) + + return out0, err + +} + +// GetRemoteTokenTransferrerSettings is a free data retrieval call binding the contract method 0xc8511ada. +// +// Solidity: function getRemoteTokenTransferrerSettings(bytes32 remoteBlockchainID, address remoteTokenTransferrerAddress) view returns((bool,uint256,uint256,bool)) +func (_ERC20TokenHomeUpgradeable *ERC20TokenHomeUpgradeableSession) GetRemoteTokenTransferrerSettings(remoteBlockchainID [32]byte, remoteTokenTransferrerAddress common.Address) (RemoteTokenTransferrerSettings, error) { + return _ERC20TokenHomeUpgradeable.Contract.GetRemoteTokenTransferrerSettings(&_ERC20TokenHomeUpgradeable.CallOpts, remoteBlockchainID, remoteTokenTransferrerAddress) +} + +// GetRemoteTokenTransferrerSettings is a free data retrieval call binding the contract method 0xc8511ada. +// +// Solidity: function getRemoteTokenTransferrerSettings(bytes32 remoteBlockchainID, address remoteTokenTransferrerAddress) view returns((bool,uint256,uint256,bool)) +func (_ERC20TokenHomeUpgradeable *ERC20TokenHomeUpgradeableCallerSession) GetRemoteTokenTransferrerSettings(remoteBlockchainID [32]byte, remoteTokenTransferrerAddress common.Address) (RemoteTokenTransferrerSettings, error) { + return _ERC20TokenHomeUpgradeable.Contract.GetRemoteTokenTransferrerSettings(&_ERC20TokenHomeUpgradeable.CallOpts, remoteBlockchainID, remoteTokenTransferrerAddress) +} + +// GetTokenAddress is a free data retrieval call binding the contract method 0x10fe9ae8. +// +// Solidity: function getTokenAddress() view returns(address) +func (_ERC20TokenHomeUpgradeable *ERC20TokenHomeUpgradeableCaller) GetTokenAddress(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _ERC20TokenHomeUpgradeable.contract.Call(opts, &out, "getTokenAddress") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// GetTokenAddress is a free data retrieval call binding the contract method 0x10fe9ae8. +// +// Solidity: function getTokenAddress() view returns(address) +func (_ERC20TokenHomeUpgradeable *ERC20TokenHomeUpgradeableSession) GetTokenAddress() (common.Address, error) { + return _ERC20TokenHomeUpgradeable.Contract.GetTokenAddress(&_ERC20TokenHomeUpgradeable.CallOpts) +} + +// GetTokenAddress is a free data retrieval call binding the contract method 0x10fe9ae8. +// +// Solidity: function getTokenAddress() view returns(address) +func (_ERC20TokenHomeUpgradeable *ERC20TokenHomeUpgradeableCallerSession) GetTokenAddress() (common.Address, error) { + return _ERC20TokenHomeUpgradeable.Contract.GetTokenAddress(&_ERC20TokenHomeUpgradeable.CallOpts) +} + +// GetTransferredBalance is a free data retrieval call binding the contract method 0x154d625a. +// +// Solidity: function getTransferredBalance(bytes32 remoteBlockchainID, address remoteTokenTransferrerAddress) view returns(uint256) +func (_ERC20TokenHomeUpgradeable *ERC20TokenHomeUpgradeableCaller) GetTransferredBalance(opts *bind.CallOpts, remoteBlockchainID [32]byte, remoteTokenTransferrerAddress common.Address) (*big.Int, error) { + var out []interface{} + err := _ERC20TokenHomeUpgradeable.contract.Call(opts, &out, "getTransferredBalance", remoteBlockchainID, remoteTokenTransferrerAddress) + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// GetTransferredBalance is a free data retrieval call binding the contract method 0x154d625a. +// +// Solidity: function getTransferredBalance(bytes32 remoteBlockchainID, address remoteTokenTransferrerAddress) view returns(uint256) +func (_ERC20TokenHomeUpgradeable *ERC20TokenHomeUpgradeableSession) GetTransferredBalance(remoteBlockchainID [32]byte, remoteTokenTransferrerAddress common.Address) (*big.Int, error) { + return _ERC20TokenHomeUpgradeable.Contract.GetTransferredBalance(&_ERC20TokenHomeUpgradeable.CallOpts, remoteBlockchainID, remoteTokenTransferrerAddress) +} + +// GetTransferredBalance is a free data retrieval call binding the contract method 0x154d625a. +// +// Solidity: function getTransferredBalance(bytes32 remoteBlockchainID, address remoteTokenTransferrerAddress) view returns(uint256) +func (_ERC20TokenHomeUpgradeable *ERC20TokenHomeUpgradeableCallerSession) GetTransferredBalance(remoteBlockchainID [32]byte, remoteTokenTransferrerAddress common.Address) (*big.Int, error) { + return _ERC20TokenHomeUpgradeable.Contract.GetTransferredBalance(&_ERC20TokenHomeUpgradeable.CallOpts, remoteBlockchainID, remoteTokenTransferrerAddress) +} + +// IsTeleporterAddressPaused is a free data retrieval call binding the contract method 0x97314297. +// +// Solidity: function isTeleporterAddressPaused(address teleporterAddress) view returns(bool) +func (_ERC20TokenHomeUpgradeable *ERC20TokenHomeUpgradeableCaller) IsTeleporterAddressPaused(opts *bind.CallOpts, teleporterAddress common.Address) (bool, error) { + var out []interface{} + err := _ERC20TokenHomeUpgradeable.contract.Call(opts, &out, "isTeleporterAddressPaused", teleporterAddress) + + if err != nil { + return *new(bool), err + } + + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + + return out0, err + +} + +// IsTeleporterAddressPaused is a free data retrieval call binding the contract method 0x97314297. +// +// Solidity: function isTeleporterAddressPaused(address teleporterAddress) view returns(bool) +func (_ERC20TokenHomeUpgradeable *ERC20TokenHomeUpgradeableSession) IsTeleporterAddressPaused(teleporterAddress common.Address) (bool, error) { + return _ERC20TokenHomeUpgradeable.Contract.IsTeleporterAddressPaused(&_ERC20TokenHomeUpgradeable.CallOpts, teleporterAddress) +} + +// IsTeleporterAddressPaused is a free data retrieval call binding the contract method 0x97314297. +// +// Solidity: function isTeleporterAddressPaused(address teleporterAddress) view returns(bool) +func (_ERC20TokenHomeUpgradeable *ERC20TokenHomeUpgradeableCallerSession) IsTeleporterAddressPaused(teleporterAddress common.Address) (bool, error) { + return _ERC20TokenHomeUpgradeable.Contract.IsTeleporterAddressPaused(&_ERC20TokenHomeUpgradeable.CallOpts, teleporterAddress) +} + +// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. +// +// Solidity: function owner() view returns(address) +func (_ERC20TokenHomeUpgradeable *ERC20TokenHomeUpgradeableCaller) Owner(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _ERC20TokenHomeUpgradeable.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 (_ERC20TokenHomeUpgradeable *ERC20TokenHomeUpgradeableSession) Owner() (common.Address, error) { + return _ERC20TokenHomeUpgradeable.Contract.Owner(&_ERC20TokenHomeUpgradeable.CallOpts) +} + +// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. +// +// Solidity: function owner() view returns(address) +func (_ERC20TokenHomeUpgradeable *ERC20TokenHomeUpgradeableCallerSession) Owner() (common.Address, error) { + return _ERC20TokenHomeUpgradeable.Contract.Owner(&_ERC20TokenHomeUpgradeable.CallOpts) +} + +// AddCollateral is a paid mutator transaction binding the contract method 0xfd658268. +// +// Solidity: function addCollateral(bytes32 remoteBlockchainID, address remoteTokenTransferrerAddress, uint256 amount) returns() +func (_ERC20TokenHomeUpgradeable *ERC20TokenHomeUpgradeableTransactor) AddCollateral(opts *bind.TransactOpts, remoteBlockchainID [32]byte, remoteTokenTransferrerAddress common.Address, amount *big.Int) (*types.Transaction, error) { + return _ERC20TokenHomeUpgradeable.contract.Transact(opts, "addCollateral", remoteBlockchainID, remoteTokenTransferrerAddress, amount) +} + +// AddCollateral is a paid mutator transaction binding the contract method 0xfd658268. +// +// Solidity: function addCollateral(bytes32 remoteBlockchainID, address remoteTokenTransferrerAddress, uint256 amount) returns() +func (_ERC20TokenHomeUpgradeable *ERC20TokenHomeUpgradeableSession) AddCollateral(remoteBlockchainID [32]byte, remoteTokenTransferrerAddress common.Address, amount *big.Int) (*types.Transaction, error) { + return _ERC20TokenHomeUpgradeable.Contract.AddCollateral(&_ERC20TokenHomeUpgradeable.TransactOpts, remoteBlockchainID, remoteTokenTransferrerAddress, amount) +} + +// AddCollateral is a paid mutator transaction binding the contract method 0xfd658268. +// +// Solidity: function addCollateral(bytes32 remoteBlockchainID, address remoteTokenTransferrerAddress, uint256 amount) returns() +func (_ERC20TokenHomeUpgradeable *ERC20TokenHomeUpgradeableTransactorSession) AddCollateral(remoteBlockchainID [32]byte, remoteTokenTransferrerAddress common.Address, amount *big.Int) (*types.Transaction, error) { + return _ERC20TokenHomeUpgradeable.Contract.AddCollateral(&_ERC20TokenHomeUpgradeable.TransactOpts, remoteBlockchainID, remoteTokenTransferrerAddress, amount) +} + +// Initialize is a paid mutator transaction binding the contract method 0x3bb03890. +// +// Solidity: function initialize(address teleporterRegistryAddress, address teleporterManager, uint256 minTeleporterVersion, address tokenAddress, uint8 tokenDecimals) returns() +func (_ERC20TokenHomeUpgradeable *ERC20TokenHomeUpgradeableTransactor) Initialize(opts *bind.TransactOpts, teleporterRegistryAddress common.Address, teleporterManager common.Address, minTeleporterVersion *big.Int, tokenAddress common.Address, tokenDecimals uint8) (*types.Transaction, error) { + return _ERC20TokenHomeUpgradeable.contract.Transact(opts, "initialize", teleporterRegistryAddress, teleporterManager, minTeleporterVersion, tokenAddress, tokenDecimals) +} + +// Initialize is a paid mutator transaction binding the contract method 0x3bb03890. +// +// Solidity: function initialize(address teleporterRegistryAddress, address teleporterManager, uint256 minTeleporterVersion, address tokenAddress, uint8 tokenDecimals) returns() +func (_ERC20TokenHomeUpgradeable *ERC20TokenHomeUpgradeableSession) Initialize(teleporterRegistryAddress common.Address, teleporterManager common.Address, minTeleporterVersion *big.Int, tokenAddress common.Address, tokenDecimals uint8) (*types.Transaction, error) { + return _ERC20TokenHomeUpgradeable.Contract.Initialize(&_ERC20TokenHomeUpgradeable.TransactOpts, teleporterRegistryAddress, teleporterManager, minTeleporterVersion, tokenAddress, tokenDecimals) +} + +// Initialize is a paid mutator transaction binding the contract method 0x3bb03890. +// +// Solidity: function initialize(address teleporterRegistryAddress, address teleporterManager, uint256 minTeleporterVersion, address tokenAddress, uint8 tokenDecimals) returns() +func (_ERC20TokenHomeUpgradeable *ERC20TokenHomeUpgradeableTransactorSession) Initialize(teleporterRegistryAddress common.Address, teleporterManager common.Address, minTeleporterVersion *big.Int, tokenAddress common.Address, tokenDecimals uint8) (*types.Transaction, error) { + return _ERC20TokenHomeUpgradeable.Contract.Initialize(&_ERC20TokenHomeUpgradeable.TransactOpts, teleporterRegistryAddress, teleporterManager, minTeleporterVersion, tokenAddress, tokenDecimals) +} + +// PauseTeleporterAddress is a paid mutator transaction binding the contract method 0x2b0d8f18. +// +// Solidity: function pauseTeleporterAddress(address teleporterAddress) returns() +func (_ERC20TokenHomeUpgradeable *ERC20TokenHomeUpgradeableTransactor) PauseTeleporterAddress(opts *bind.TransactOpts, teleporterAddress common.Address) (*types.Transaction, error) { + return _ERC20TokenHomeUpgradeable.contract.Transact(opts, "pauseTeleporterAddress", teleporterAddress) +} + +// PauseTeleporterAddress is a paid mutator transaction binding the contract method 0x2b0d8f18. +// +// Solidity: function pauseTeleporterAddress(address teleporterAddress) returns() +func (_ERC20TokenHomeUpgradeable *ERC20TokenHomeUpgradeableSession) PauseTeleporterAddress(teleporterAddress common.Address) (*types.Transaction, error) { + return _ERC20TokenHomeUpgradeable.Contract.PauseTeleporterAddress(&_ERC20TokenHomeUpgradeable.TransactOpts, teleporterAddress) +} + +// PauseTeleporterAddress is a paid mutator transaction binding the contract method 0x2b0d8f18. +// +// Solidity: function pauseTeleporterAddress(address teleporterAddress) returns() +func (_ERC20TokenHomeUpgradeable *ERC20TokenHomeUpgradeableTransactorSession) PauseTeleporterAddress(teleporterAddress common.Address) (*types.Transaction, error) { + return _ERC20TokenHomeUpgradeable.Contract.PauseTeleporterAddress(&_ERC20TokenHomeUpgradeable.TransactOpts, teleporterAddress) +} + +// ReceiveTeleporterMessage is a paid mutator transaction binding the contract method 0xc868efaa. +// +// Solidity: function receiveTeleporterMessage(bytes32 sourceBlockchainID, address originSenderAddress, bytes message) returns() +func (_ERC20TokenHomeUpgradeable *ERC20TokenHomeUpgradeableTransactor) ReceiveTeleporterMessage(opts *bind.TransactOpts, sourceBlockchainID [32]byte, originSenderAddress common.Address, message []byte) (*types.Transaction, error) { + return _ERC20TokenHomeUpgradeable.contract.Transact(opts, "receiveTeleporterMessage", sourceBlockchainID, originSenderAddress, message) +} + +// ReceiveTeleporterMessage is a paid mutator transaction binding the contract method 0xc868efaa. +// +// Solidity: function receiveTeleporterMessage(bytes32 sourceBlockchainID, address originSenderAddress, bytes message) returns() +func (_ERC20TokenHomeUpgradeable *ERC20TokenHomeUpgradeableSession) ReceiveTeleporterMessage(sourceBlockchainID [32]byte, originSenderAddress common.Address, message []byte) (*types.Transaction, error) { + return _ERC20TokenHomeUpgradeable.Contract.ReceiveTeleporterMessage(&_ERC20TokenHomeUpgradeable.TransactOpts, sourceBlockchainID, originSenderAddress, message) +} + +// ReceiveTeleporterMessage is a paid mutator transaction binding the contract method 0xc868efaa. +// +// Solidity: function receiveTeleporterMessage(bytes32 sourceBlockchainID, address originSenderAddress, bytes message) returns() +func (_ERC20TokenHomeUpgradeable *ERC20TokenHomeUpgradeableTransactorSession) ReceiveTeleporterMessage(sourceBlockchainID [32]byte, originSenderAddress common.Address, message []byte) (*types.Transaction, error) { + return _ERC20TokenHomeUpgradeable.Contract.ReceiveTeleporterMessage(&_ERC20TokenHomeUpgradeable.TransactOpts, sourceBlockchainID, originSenderAddress, message) +} + +// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. +// +// Solidity: function renounceOwnership() returns() +func (_ERC20TokenHomeUpgradeable *ERC20TokenHomeUpgradeableTransactor) RenounceOwnership(opts *bind.TransactOpts) (*types.Transaction, error) { + return _ERC20TokenHomeUpgradeable.contract.Transact(opts, "renounceOwnership") +} + +// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. +// +// Solidity: function renounceOwnership() returns() +func (_ERC20TokenHomeUpgradeable *ERC20TokenHomeUpgradeableSession) RenounceOwnership() (*types.Transaction, error) { + return _ERC20TokenHomeUpgradeable.Contract.RenounceOwnership(&_ERC20TokenHomeUpgradeable.TransactOpts) +} + +// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. +// +// Solidity: function renounceOwnership() returns() +func (_ERC20TokenHomeUpgradeable *ERC20TokenHomeUpgradeableTransactorSession) RenounceOwnership() (*types.Transaction, error) { + return _ERC20TokenHomeUpgradeable.Contract.RenounceOwnership(&_ERC20TokenHomeUpgradeable.TransactOpts) +} + +// Send is a paid mutator transaction binding the contract method 0x5d16225d. +// +// Solidity: function send((bytes32,address,address,address,uint256,uint256,uint256,address) input, uint256 amount) returns() +func (_ERC20TokenHomeUpgradeable *ERC20TokenHomeUpgradeableTransactor) Send(opts *bind.TransactOpts, input SendTokensInput, amount *big.Int) (*types.Transaction, error) { + return _ERC20TokenHomeUpgradeable.contract.Transact(opts, "send", input, amount) +} + +// Send is a paid mutator transaction binding the contract method 0x5d16225d. +// +// Solidity: function send((bytes32,address,address,address,uint256,uint256,uint256,address) input, uint256 amount) returns() +func (_ERC20TokenHomeUpgradeable *ERC20TokenHomeUpgradeableSession) Send(input SendTokensInput, amount *big.Int) (*types.Transaction, error) { + return _ERC20TokenHomeUpgradeable.Contract.Send(&_ERC20TokenHomeUpgradeable.TransactOpts, input, amount) +} + +// Send is a paid mutator transaction binding the contract method 0x5d16225d. +// +// Solidity: function send((bytes32,address,address,address,uint256,uint256,uint256,address) input, uint256 amount) returns() +func (_ERC20TokenHomeUpgradeable *ERC20TokenHomeUpgradeableTransactorSession) Send(input SendTokensInput, amount *big.Int) (*types.Transaction, error) { + return _ERC20TokenHomeUpgradeable.Contract.Send(&_ERC20TokenHomeUpgradeable.TransactOpts, input, amount) +} + +// SendAndCall is a paid mutator transaction binding the contract method 0x65690038. +// +// Solidity: function sendAndCall((bytes32,address,address,bytes,uint256,uint256,address,address,address,uint256,uint256) input, uint256 amount) returns() +func (_ERC20TokenHomeUpgradeable *ERC20TokenHomeUpgradeableTransactor) SendAndCall(opts *bind.TransactOpts, input SendAndCallInput, amount *big.Int) (*types.Transaction, error) { + return _ERC20TokenHomeUpgradeable.contract.Transact(opts, "sendAndCall", input, amount) +} + +// SendAndCall is a paid mutator transaction binding the contract method 0x65690038. +// +// Solidity: function sendAndCall((bytes32,address,address,bytes,uint256,uint256,address,address,address,uint256,uint256) input, uint256 amount) returns() +func (_ERC20TokenHomeUpgradeable *ERC20TokenHomeUpgradeableSession) SendAndCall(input SendAndCallInput, amount *big.Int) (*types.Transaction, error) { + return _ERC20TokenHomeUpgradeable.Contract.SendAndCall(&_ERC20TokenHomeUpgradeable.TransactOpts, input, amount) +} + +// SendAndCall is a paid mutator transaction binding the contract method 0x65690038. +// +// Solidity: function sendAndCall((bytes32,address,address,bytes,uint256,uint256,address,address,address,uint256,uint256) input, uint256 amount) returns() +func (_ERC20TokenHomeUpgradeable *ERC20TokenHomeUpgradeableTransactorSession) SendAndCall(input SendAndCallInput, amount *big.Int) (*types.Transaction, error) { + return _ERC20TokenHomeUpgradeable.Contract.SendAndCall(&_ERC20TokenHomeUpgradeable.TransactOpts, input, amount) +} + +// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// +// Solidity: function transferOwnership(address newOwner) returns() +func (_ERC20TokenHomeUpgradeable *ERC20TokenHomeUpgradeableTransactor) TransferOwnership(opts *bind.TransactOpts, newOwner common.Address) (*types.Transaction, error) { + return _ERC20TokenHomeUpgradeable.contract.Transact(opts, "transferOwnership", newOwner) +} + +// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// +// Solidity: function transferOwnership(address newOwner) returns() +func (_ERC20TokenHomeUpgradeable *ERC20TokenHomeUpgradeableSession) TransferOwnership(newOwner common.Address) (*types.Transaction, error) { + return _ERC20TokenHomeUpgradeable.Contract.TransferOwnership(&_ERC20TokenHomeUpgradeable.TransactOpts, newOwner) +} + +// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// +// Solidity: function transferOwnership(address newOwner) returns() +func (_ERC20TokenHomeUpgradeable *ERC20TokenHomeUpgradeableTransactorSession) TransferOwnership(newOwner common.Address) (*types.Transaction, error) { + return _ERC20TokenHomeUpgradeable.Contract.TransferOwnership(&_ERC20TokenHomeUpgradeable.TransactOpts, newOwner) +} + +// UnpauseTeleporterAddress is a paid mutator transaction binding the contract method 0x4511243e. +// +// Solidity: function unpauseTeleporterAddress(address teleporterAddress) returns() +func (_ERC20TokenHomeUpgradeable *ERC20TokenHomeUpgradeableTransactor) UnpauseTeleporterAddress(opts *bind.TransactOpts, teleporterAddress common.Address) (*types.Transaction, error) { + return _ERC20TokenHomeUpgradeable.contract.Transact(opts, "unpauseTeleporterAddress", teleporterAddress) +} + +// UnpauseTeleporterAddress is a paid mutator transaction binding the contract method 0x4511243e. +// +// Solidity: function unpauseTeleporterAddress(address teleporterAddress) returns() +func (_ERC20TokenHomeUpgradeable *ERC20TokenHomeUpgradeableSession) UnpauseTeleporterAddress(teleporterAddress common.Address) (*types.Transaction, error) { + return _ERC20TokenHomeUpgradeable.Contract.UnpauseTeleporterAddress(&_ERC20TokenHomeUpgradeable.TransactOpts, teleporterAddress) +} + +// UnpauseTeleporterAddress is a paid mutator transaction binding the contract method 0x4511243e. +// +// Solidity: function unpauseTeleporterAddress(address teleporterAddress) returns() +func (_ERC20TokenHomeUpgradeable *ERC20TokenHomeUpgradeableTransactorSession) UnpauseTeleporterAddress(teleporterAddress common.Address) (*types.Transaction, error) { + return _ERC20TokenHomeUpgradeable.Contract.UnpauseTeleporterAddress(&_ERC20TokenHomeUpgradeable.TransactOpts, teleporterAddress) +} + +// UpdateMinTeleporterVersion is a paid mutator transaction binding the contract method 0x5eb99514. +// +// Solidity: function updateMinTeleporterVersion(uint256 version) returns() +func (_ERC20TokenHomeUpgradeable *ERC20TokenHomeUpgradeableTransactor) UpdateMinTeleporterVersion(opts *bind.TransactOpts, version *big.Int) (*types.Transaction, error) { + return _ERC20TokenHomeUpgradeable.contract.Transact(opts, "updateMinTeleporterVersion", version) +} + +// UpdateMinTeleporterVersion is a paid mutator transaction binding the contract method 0x5eb99514. +// +// Solidity: function updateMinTeleporterVersion(uint256 version) returns() +func (_ERC20TokenHomeUpgradeable *ERC20TokenHomeUpgradeableSession) UpdateMinTeleporterVersion(version *big.Int) (*types.Transaction, error) { + return _ERC20TokenHomeUpgradeable.Contract.UpdateMinTeleporterVersion(&_ERC20TokenHomeUpgradeable.TransactOpts, version) +} + +// UpdateMinTeleporterVersion is a paid mutator transaction binding the contract method 0x5eb99514. +// +// Solidity: function updateMinTeleporterVersion(uint256 version) returns() +func (_ERC20TokenHomeUpgradeable *ERC20TokenHomeUpgradeableTransactorSession) UpdateMinTeleporterVersion(version *big.Int) (*types.Transaction, error) { + return _ERC20TokenHomeUpgradeable.Contract.UpdateMinTeleporterVersion(&_ERC20TokenHomeUpgradeable.TransactOpts, version) +} + +// ERC20TokenHomeUpgradeableCallFailedIterator is returned from FilterCallFailed and is used to iterate over the raw logs and unpacked data for CallFailed events raised by the ERC20TokenHomeUpgradeable contract. +type ERC20TokenHomeUpgradeableCallFailedIterator struct { + Event *ERC20TokenHomeUpgradeableCallFailed // 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 interfaces.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 *ERC20TokenHomeUpgradeableCallFailedIterator) 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(ERC20TokenHomeUpgradeableCallFailed) + 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(ERC20TokenHomeUpgradeableCallFailed) + 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 *ERC20TokenHomeUpgradeableCallFailedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *ERC20TokenHomeUpgradeableCallFailedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// ERC20TokenHomeUpgradeableCallFailed represents a CallFailed event raised by the ERC20TokenHomeUpgradeable contract. +type ERC20TokenHomeUpgradeableCallFailed struct { + RecipientContract common.Address + Amount *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterCallFailed is a free log retrieval operation binding the contract event 0xb9eaeae386d339f8115782f297a9e5f0e13fb587cd6b0d502f113cb8dd4d6cb0. +// +// Solidity: event CallFailed(address indexed recipientContract, uint256 amount) +func (_ERC20TokenHomeUpgradeable *ERC20TokenHomeUpgradeableFilterer) FilterCallFailed(opts *bind.FilterOpts, recipientContract []common.Address) (*ERC20TokenHomeUpgradeableCallFailedIterator, error) { + + var recipientContractRule []interface{} + for _, recipientContractItem := range recipientContract { + recipientContractRule = append(recipientContractRule, recipientContractItem) + } + + logs, sub, err := _ERC20TokenHomeUpgradeable.contract.FilterLogs(opts, "CallFailed", recipientContractRule) + if err != nil { + return nil, err + } + return &ERC20TokenHomeUpgradeableCallFailedIterator{contract: _ERC20TokenHomeUpgradeable.contract, event: "CallFailed", logs: logs, sub: sub}, nil +} + +// WatchCallFailed is a free log subscription operation binding the contract event 0xb9eaeae386d339f8115782f297a9e5f0e13fb587cd6b0d502f113cb8dd4d6cb0. +// +// Solidity: event CallFailed(address indexed recipientContract, uint256 amount) +func (_ERC20TokenHomeUpgradeable *ERC20TokenHomeUpgradeableFilterer) WatchCallFailed(opts *bind.WatchOpts, sink chan<- *ERC20TokenHomeUpgradeableCallFailed, recipientContract []common.Address) (event.Subscription, error) { + + var recipientContractRule []interface{} + for _, recipientContractItem := range recipientContract { + recipientContractRule = append(recipientContractRule, recipientContractItem) + } + + logs, sub, err := _ERC20TokenHomeUpgradeable.contract.WatchLogs(opts, "CallFailed", recipientContractRule) + 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(ERC20TokenHomeUpgradeableCallFailed) + if err := _ERC20TokenHomeUpgradeable.contract.UnpackLog(event, "CallFailed", 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 +} + +// ParseCallFailed is a log parse operation binding the contract event 0xb9eaeae386d339f8115782f297a9e5f0e13fb587cd6b0d502f113cb8dd4d6cb0. +// +// Solidity: event CallFailed(address indexed recipientContract, uint256 amount) +func (_ERC20TokenHomeUpgradeable *ERC20TokenHomeUpgradeableFilterer) ParseCallFailed(log types.Log) (*ERC20TokenHomeUpgradeableCallFailed, error) { + event := new(ERC20TokenHomeUpgradeableCallFailed) + if err := _ERC20TokenHomeUpgradeable.contract.UnpackLog(event, "CallFailed", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// ERC20TokenHomeUpgradeableCallSucceededIterator is returned from FilterCallSucceeded and is used to iterate over the raw logs and unpacked data for CallSucceeded events raised by the ERC20TokenHomeUpgradeable contract. +type ERC20TokenHomeUpgradeableCallSucceededIterator struct { + Event *ERC20TokenHomeUpgradeableCallSucceeded // 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 interfaces.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 *ERC20TokenHomeUpgradeableCallSucceededIterator) 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(ERC20TokenHomeUpgradeableCallSucceeded) + 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(ERC20TokenHomeUpgradeableCallSucceeded) + 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 *ERC20TokenHomeUpgradeableCallSucceededIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *ERC20TokenHomeUpgradeableCallSucceededIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// ERC20TokenHomeUpgradeableCallSucceeded represents a CallSucceeded event raised by the ERC20TokenHomeUpgradeable contract. +type ERC20TokenHomeUpgradeableCallSucceeded struct { + RecipientContract common.Address + Amount *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterCallSucceeded is a free log retrieval operation binding the contract event 0x104deb555f67e63782bb817bc26c39050894645f9b9f29c4be8ae68d0e8b7ff4. +// +// Solidity: event CallSucceeded(address indexed recipientContract, uint256 amount) +func (_ERC20TokenHomeUpgradeable *ERC20TokenHomeUpgradeableFilterer) FilterCallSucceeded(opts *bind.FilterOpts, recipientContract []common.Address) (*ERC20TokenHomeUpgradeableCallSucceededIterator, error) { + + var recipientContractRule []interface{} + for _, recipientContractItem := range recipientContract { + recipientContractRule = append(recipientContractRule, recipientContractItem) + } + + logs, sub, err := _ERC20TokenHomeUpgradeable.contract.FilterLogs(opts, "CallSucceeded", recipientContractRule) + if err != nil { + return nil, err + } + return &ERC20TokenHomeUpgradeableCallSucceededIterator{contract: _ERC20TokenHomeUpgradeable.contract, event: "CallSucceeded", logs: logs, sub: sub}, nil +} + +// WatchCallSucceeded is a free log subscription operation binding the contract event 0x104deb555f67e63782bb817bc26c39050894645f9b9f29c4be8ae68d0e8b7ff4. +// +// Solidity: event CallSucceeded(address indexed recipientContract, uint256 amount) +func (_ERC20TokenHomeUpgradeable *ERC20TokenHomeUpgradeableFilterer) WatchCallSucceeded(opts *bind.WatchOpts, sink chan<- *ERC20TokenHomeUpgradeableCallSucceeded, recipientContract []common.Address) (event.Subscription, error) { + + var recipientContractRule []interface{} + for _, recipientContractItem := range recipientContract { + recipientContractRule = append(recipientContractRule, recipientContractItem) + } + + logs, sub, err := _ERC20TokenHomeUpgradeable.contract.WatchLogs(opts, "CallSucceeded", recipientContractRule) + 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(ERC20TokenHomeUpgradeableCallSucceeded) + if err := _ERC20TokenHomeUpgradeable.contract.UnpackLog(event, "CallSucceeded", 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 +} + +// ParseCallSucceeded is a log parse operation binding the contract event 0x104deb555f67e63782bb817bc26c39050894645f9b9f29c4be8ae68d0e8b7ff4. +// +// Solidity: event CallSucceeded(address indexed recipientContract, uint256 amount) +func (_ERC20TokenHomeUpgradeable *ERC20TokenHomeUpgradeableFilterer) ParseCallSucceeded(log types.Log) (*ERC20TokenHomeUpgradeableCallSucceeded, error) { + event := new(ERC20TokenHomeUpgradeableCallSucceeded) + if err := _ERC20TokenHomeUpgradeable.contract.UnpackLog(event, "CallSucceeded", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// ERC20TokenHomeUpgradeableCollateralAddedIterator is returned from FilterCollateralAdded and is used to iterate over the raw logs and unpacked data for CollateralAdded events raised by the ERC20TokenHomeUpgradeable contract. +type ERC20TokenHomeUpgradeableCollateralAddedIterator struct { + Event *ERC20TokenHomeUpgradeableCollateralAdded // 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 interfaces.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 *ERC20TokenHomeUpgradeableCollateralAddedIterator) 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(ERC20TokenHomeUpgradeableCollateralAdded) + 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(ERC20TokenHomeUpgradeableCollateralAdded) + 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 *ERC20TokenHomeUpgradeableCollateralAddedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *ERC20TokenHomeUpgradeableCollateralAddedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// ERC20TokenHomeUpgradeableCollateralAdded represents a CollateralAdded event raised by the ERC20TokenHomeUpgradeable contract. +type ERC20TokenHomeUpgradeableCollateralAdded struct { + RemoteBlockchainID [32]byte + RemoteTokenTransferrerAddress common.Address + Amount *big.Int + Remaining *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterCollateralAdded is a free log retrieval operation binding the contract event 0x6769a5f9bfc8b6e0db839ab981cbf9239274ae72d2d035081a9157d43bd33cb6. +// +// Solidity: event CollateralAdded(bytes32 indexed remoteBlockchainID, address indexed remoteTokenTransferrerAddress, uint256 amount, uint256 remaining) +func (_ERC20TokenHomeUpgradeable *ERC20TokenHomeUpgradeableFilterer) FilterCollateralAdded(opts *bind.FilterOpts, remoteBlockchainID [][32]byte, remoteTokenTransferrerAddress []common.Address) (*ERC20TokenHomeUpgradeableCollateralAddedIterator, error) { + + var remoteBlockchainIDRule []interface{} + for _, remoteBlockchainIDItem := range remoteBlockchainID { + remoteBlockchainIDRule = append(remoteBlockchainIDRule, remoteBlockchainIDItem) + } + var remoteTokenTransferrerAddressRule []interface{} + for _, remoteTokenTransferrerAddressItem := range remoteTokenTransferrerAddress { + remoteTokenTransferrerAddressRule = append(remoteTokenTransferrerAddressRule, remoteTokenTransferrerAddressItem) + } + + logs, sub, err := _ERC20TokenHomeUpgradeable.contract.FilterLogs(opts, "CollateralAdded", remoteBlockchainIDRule, remoteTokenTransferrerAddressRule) + if err != nil { + return nil, err + } + return &ERC20TokenHomeUpgradeableCollateralAddedIterator{contract: _ERC20TokenHomeUpgradeable.contract, event: "CollateralAdded", logs: logs, sub: sub}, nil +} + +// WatchCollateralAdded is a free log subscription operation binding the contract event 0x6769a5f9bfc8b6e0db839ab981cbf9239274ae72d2d035081a9157d43bd33cb6. +// +// Solidity: event CollateralAdded(bytes32 indexed remoteBlockchainID, address indexed remoteTokenTransferrerAddress, uint256 amount, uint256 remaining) +func (_ERC20TokenHomeUpgradeable *ERC20TokenHomeUpgradeableFilterer) WatchCollateralAdded(opts *bind.WatchOpts, sink chan<- *ERC20TokenHomeUpgradeableCollateralAdded, remoteBlockchainID [][32]byte, remoteTokenTransferrerAddress []common.Address) (event.Subscription, error) { + + var remoteBlockchainIDRule []interface{} + for _, remoteBlockchainIDItem := range remoteBlockchainID { + remoteBlockchainIDRule = append(remoteBlockchainIDRule, remoteBlockchainIDItem) + } + var remoteTokenTransferrerAddressRule []interface{} + for _, remoteTokenTransferrerAddressItem := range remoteTokenTransferrerAddress { + remoteTokenTransferrerAddressRule = append(remoteTokenTransferrerAddressRule, remoteTokenTransferrerAddressItem) + } + + logs, sub, err := _ERC20TokenHomeUpgradeable.contract.WatchLogs(opts, "CollateralAdded", remoteBlockchainIDRule, remoteTokenTransferrerAddressRule) + 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(ERC20TokenHomeUpgradeableCollateralAdded) + if err := _ERC20TokenHomeUpgradeable.contract.UnpackLog(event, "CollateralAdded", 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 +} + +// ParseCollateralAdded is a log parse operation binding the contract event 0x6769a5f9bfc8b6e0db839ab981cbf9239274ae72d2d035081a9157d43bd33cb6. +// +// Solidity: event CollateralAdded(bytes32 indexed remoteBlockchainID, address indexed remoteTokenTransferrerAddress, uint256 amount, uint256 remaining) +func (_ERC20TokenHomeUpgradeable *ERC20TokenHomeUpgradeableFilterer) ParseCollateralAdded(log types.Log) (*ERC20TokenHomeUpgradeableCollateralAdded, error) { + event := new(ERC20TokenHomeUpgradeableCollateralAdded) + if err := _ERC20TokenHomeUpgradeable.contract.UnpackLog(event, "CollateralAdded", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// ERC20TokenHomeUpgradeableInitializedIterator is returned from FilterInitialized and is used to iterate over the raw logs and unpacked data for Initialized events raised by the ERC20TokenHomeUpgradeable contract. +type ERC20TokenHomeUpgradeableInitializedIterator struct { + Event *ERC20TokenHomeUpgradeableInitialized // 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 interfaces.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 *ERC20TokenHomeUpgradeableInitializedIterator) 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(ERC20TokenHomeUpgradeableInitialized) + 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(ERC20TokenHomeUpgradeableInitialized) + 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 *ERC20TokenHomeUpgradeableInitializedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *ERC20TokenHomeUpgradeableInitializedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// ERC20TokenHomeUpgradeableInitialized represents a Initialized event raised by the ERC20TokenHomeUpgradeable contract. +type ERC20TokenHomeUpgradeableInitialized struct { + Version uint64 + Raw types.Log // Blockchain specific contextual infos +} + +// FilterInitialized is a free log retrieval operation binding the contract event 0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2. +// +// Solidity: event Initialized(uint64 version) +func (_ERC20TokenHomeUpgradeable *ERC20TokenHomeUpgradeableFilterer) FilterInitialized(opts *bind.FilterOpts) (*ERC20TokenHomeUpgradeableInitializedIterator, error) { + + logs, sub, err := _ERC20TokenHomeUpgradeable.contract.FilterLogs(opts, "Initialized") + if err != nil { + return nil, err + } + return &ERC20TokenHomeUpgradeableInitializedIterator{contract: _ERC20TokenHomeUpgradeable.contract, event: "Initialized", logs: logs, sub: sub}, nil +} + +// WatchInitialized is a free log subscription operation binding the contract event 0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2. +// +// Solidity: event Initialized(uint64 version) +func (_ERC20TokenHomeUpgradeable *ERC20TokenHomeUpgradeableFilterer) WatchInitialized(opts *bind.WatchOpts, sink chan<- *ERC20TokenHomeUpgradeableInitialized) (event.Subscription, error) { + + logs, sub, err := _ERC20TokenHomeUpgradeable.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(ERC20TokenHomeUpgradeableInitialized) + if err := _ERC20TokenHomeUpgradeable.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 0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2. +// +// Solidity: event Initialized(uint64 version) +func (_ERC20TokenHomeUpgradeable *ERC20TokenHomeUpgradeableFilterer) ParseInitialized(log types.Log) (*ERC20TokenHomeUpgradeableInitialized, error) { + event := new(ERC20TokenHomeUpgradeableInitialized) + if err := _ERC20TokenHomeUpgradeable.contract.UnpackLog(event, "Initialized", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// ERC20TokenHomeUpgradeableMinTeleporterVersionUpdatedIterator is returned from FilterMinTeleporterVersionUpdated and is used to iterate over the raw logs and unpacked data for MinTeleporterVersionUpdated events raised by the ERC20TokenHomeUpgradeable contract. +type ERC20TokenHomeUpgradeableMinTeleporterVersionUpdatedIterator struct { + Event *ERC20TokenHomeUpgradeableMinTeleporterVersionUpdated // 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 interfaces.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 *ERC20TokenHomeUpgradeableMinTeleporterVersionUpdatedIterator) 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(ERC20TokenHomeUpgradeableMinTeleporterVersionUpdated) + 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(ERC20TokenHomeUpgradeableMinTeleporterVersionUpdated) + 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 *ERC20TokenHomeUpgradeableMinTeleporterVersionUpdatedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *ERC20TokenHomeUpgradeableMinTeleporterVersionUpdatedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// ERC20TokenHomeUpgradeableMinTeleporterVersionUpdated represents a MinTeleporterVersionUpdated event raised by the ERC20TokenHomeUpgradeable contract. +type ERC20TokenHomeUpgradeableMinTeleporterVersionUpdated struct { + OldMinTeleporterVersion *big.Int + NewMinTeleporterVersion *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterMinTeleporterVersionUpdated is a free log retrieval operation binding the contract event 0xa9a7ef57e41f05b4c15480842f5f0c27edfcbb553fed281f7c4068452cc1c02d. +// +// Solidity: event MinTeleporterVersionUpdated(uint256 indexed oldMinTeleporterVersion, uint256 indexed newMinTeleporterVersion) +func (_ERC20TokenHomeUpgradeable *ERC20TokenHomeUpgradeableFilterer) FilterMinTeleporterVersionUpdated(opts *bind.FilterOpts, oldMinTeleporterVersion []*big.Int, newMinTeleporterVersion []*big.Int) (*ERC20TokenHomeUpgradeableMinTeleporterVersionUpdatedIterator, error) { + + var oldMinTeleporterVersionRule []interface{} + for _, oldMinTeleporterVersionItem := range oldMinTeleporterVersion { + oldMinTeleporterVersionRule = append(oldMinTeleporterVersionRule, oldMinTeleporterVersionItem) + } + var newMinTeleporterVersionRule []interface{} + for _, newMinTeleporterVersionItem := range newMinTeleporterVersion { + newMinTeleporterVersionRule = append(newMinTeleporterVersionRule, newMinTeleporterVersionItem) + } + + logs, sub, err := _ERC20TokenHomeUpgradeable.contract.FilterLogs(opts, "MinTeleporterVersionUpdated", oldMinTeleporterVersionRule, newMinTeleporterVersionRule) + if err != nil { + return nil, err + } + return &ERC20TokenHomeUpgradeableMinTeleporterVersionUpdatedIterator{contract: _ERC20TokenHomeUpgradeable.contract, event: "MinTeleporterVersionUpdated", logs: logs, sub: sub}, nil +} + +// WatchMinTeleporterVersionUpdated is a free log subscription operation binding the contract event 0xa9a7ef57e41f05b4c15480842f5f0c27edfcbb553fed281f7c4068452cc1c02d. +// +// Solidity: event MinTeleporterVersionUpdated(uint256 indexed oldMinTeleporterVersion, uint256 indexed newMinTeleporterVersion) +func (_ERC20TokenHomeUpgradeable *ERC20TokenHomeUpgradeableFilterer) WatchMinTeleporterVersionUpdated(opts *bind.WatchOpts, sink chan<- *ERC20TokenHomeUpgradeableMinTeleporterVersionUpdated, oldMinTeleporterVersion []*big.Int, newMinTeleporterVersion []*big.Int) (event.Subscription, error) { + + var oldMinTeleporterVersionRule []interface{} + for _, oldMinTeleporterVersionItem := range oldMinTeleporterVersion { + oldMinTeleporterVersionRule = append(oldMinTeleporterVersionRule, oldMinTeleporterVersionItem) + } + var newMinTeleporterVersionRule []interface{} + for _, newMinTeleporterVersionItem := range newMinTeleporterVersion { + newMinTeleporterVersionRule = append(newMinTeleporterVersionRule, newMinTeleporterVersionItem) + } + + logs, sub, err := _ERC20TokenHomeUpgradeable.contract.WatchLogs(opts, "MinTeleporterVersionUpdated", oldMinTeleporterVersionRule, newMinTeleporterVersionRule) + 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(ERC20TokenHomeUpgradeableMinTeleporterVersionUpdated) + if err := _ERC20TokenHomeUpgradeable.contract.UnpackLog(event, "MinTeleporterVersionUpdated", 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 +} + +// ParseMinTeleporterVersionUpdated is a log parse operation binding the contract event 0xa9a7ef57e41f05b4c15480842f5f0c27edfcbb553fed281f7c4068452cc1c02d. +// +// Solidity: event MinTeleporterVersionUpdated(uint256 indexed oldMinTeleporterVersion, uint256 indexed newMinTeleporterVersion) +func (_ERC20TokenHomeUpgradeable *ERC20TokenHomeUpgradeableFilterer) ParseMinTeleporterVersionUpdated(log types.Log) (*ERC20TokenHomeUpgradeableMinTeleporterVersionUpdated, error) { + event := new(ERC20TokenHomeUpgradeableMinTeleporterVersionUpdated) + if err := _ERC20TokenHomeUpgradeable.contract.UnpackLog(event, "MinTeleporterVersionUpdated", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// ERC20TokenHomeUpgradeableOwnershipTransferredIterator is returned from FilterOwnershipTransferred and is used to iterate over the raw logs and unpacked data for OwnershipTransferred events raised by the ERC20TokenHomeUpgradeable contract. +type ERC20TokenHomeUpgradeableOwnershipTransferredIterator struct { + Event *ERC20TokenHomeUpgradeableOwnershipTransferred // 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 interfaces.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 *ERC20TokenHomeUpgradeableOwnershipTransferredIterator) 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(ERC20TokenHomeUpgradeableOwnershipTransferred) + 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(ERC20TokenHomeUpgradeableOwnershipTransferred) + 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 *ERC20TokenHomeUpgradeableOwnershipTransferredIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *ERC20TokenHomeUpgradeableOwnershipTransferredIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// ERC20TokenHomeUpgradeableOwnershipTransferred represents a OwnershipTransferred event raised by the ERC20TokenHomeUpgradeable contract. +type ERC20TokenHomeUpgradeableOwnershipTransferred 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 (_ERC20TokenHomeUpgradeable *ERC20TokenHomeUpgradeableFilterer) FilterOwnershipTransferred(opts *bind.FilterOpts, previousOwner []common.Address, newOwner []common.Address) (*ERC20TokenHomeUpgradeableOwnershipTransferredIterator, 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 := _ERC20TokenHomeUpgradeable.contract.FilterLogs(opts, "OwnershipTransferred", previousOwnerRule, newOwnerRule) + if err != nil { + return nil, err + } + return &ERC20TokenHomeUpgradeableOwnershipTransferredIterator{contract: _ERC20TokenHomeUpgradeable.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 (_ERC20TokenHomeUpgradeable *ERC20TokenHomeUpgradeableFilterer) WatchOwnershipTransferred(opts *bind.WatchOpts, sink chan<- *ERC20TokenHomeUpgradeableOwnershipTransferred, 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 := _ERC20TokenHomeUpgradeable.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(ERC20TokenHomeUpgradeableOwnershipTransferred) + if err := _ERC20TokenHomeUpgradeable.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 (_ERC20TokenHomeUpgradeable *ERC20TokenHomeUpgradeableFilterer) ParseOwnershipTransferred(log types.Log) (*ERC20TokenHomeUpgradeableOwnershipTransferred, error) { + event := new(ERC20TokenHomeUpgradeableOwnershipTransferred) + if err := _ERC20TokenHomeUpgradeable.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// ERC20TokenHomeUpgradeableRemoteRegisteredIterator is returned from FilterRemoteRegistered and is used to iterate over the raw logs and unpacked data for RemoteRegistered events raised by the ERC20TokenHomeUpgradeable contract. +type ERC20TokenHomeUpgradeableRemoteRegisteredIterator struct { + Event *ERC20TokenHomeUpgradeableRemoteRegistered // 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 interfaces.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 *ERC20TokenHomeUpgradeableRemoteRegisteredIterator) 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(ERC20TokenHomeUpgradeableRemoteRegistered) + 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(ERC20TokenHomeUpgradeableRemoteRegistered) + 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 *ERC20TokenHomeUpgradeableRemoteRegisteredIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *ERC20TokenHomeUpgradeableRemoteRegisteredIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// ERC20TokenHomeUpgradeableRemoteRegistered represents a RemoteRegistered event raised by the ERC20TokenHomeUpgradeable contract. +type ERC20TokenHomeUpgradeableRemoteRegistered struct { + RemoteBlockchainID [32]byte + RemoteTokenTransferrerAddress common.Address + InitialCollateralNeeded *big.Int + TokenDecimals uint8 + Raw types.Log // Blockchain specific contextual infos +} + +// FilterRemoteRegistered is a free log retrieval operation binding the contract event 0xf229b02a51a4c8d5ef03a096ae0dd727d7b48b710d21b50ebebb560eef739b90. +// +// Solidity: event RemoteRegistered(bytes32 indexed remoteBlockchainID, address indexed remoteTokenTransferrerAddress, uint256 initialCollateralNeeded, uint8 tokenDecimals) +func (_ERC20TokenHomeUpgradeable *ERC20TokenHomeUpgradeableFilterer) FilterRemoteRegistered(opts *bind.FilterOpts, remoteBlockchainID [][32]byte, remoteTokenTransferrerAddress []common.Address) (*ERC20TokenHomeUpgradeableRemoteRegisteredIterator, error) { + + var remoteBlockchainIDRule []interface{} + for _, remoteBlockchainIDItem := range remoteBlockchainID { + remoteBlockchainIDRule = append(remoteBlockchainIDRule, remoteBlockchainIDItem) + } + var remoteTokenTransferrerAddressRule []interface{} + for _, remoteTokenTransferrerAddressItem := range remoteTokenTransferrerAddress { + remoteTokenTransferrerAddressRule = append(remoteTokenTransferrerAddressRule, remoteTokenTransferrerAddressItem) + } + + logs, sub, err := _ERC20TokenHomeUpgradeable.contract.FilterLogs(opts, "RemoteRegistered", remoteBlockchainIDRule, remoteTokenTransferrerAddressRule) + if err != nil { + return nil, err + } + return &ERC20TokenHomeUpgradeableRemoteRegisteredIterator{contract: _ERC20TokenHomeUpgradeable.contract, event: "RemoteRegistered", logs: logs, sub: sub}, nil +} + +// WatchRemoteRegistered is a free log subscription operation binding the contract event 0xf229b02a51a4c8d5ef03a096ae0dd727d7b48b710d21b50ebebb560eef739b90. +// +// Solidity: event RemoteRegistered(bytes32 indexed remoteBlockchainID, address indexed remoteTokenTransferrerAddress, uint256 initialCollateralNeeded, uint8 tokenDecimals) +func (_ERC20TokenHomeUpgradeable *ERC20TokenHomeUpgradeableFilterer) WatchRemoteRegistered(opts *bind.WatchOpts, sink chan<- *ERC20TokenHomeUpgradeableRemoteRegistered, remoteBlockchainID [][32]byte, remoteTokenTransferrerAddress []common.Address) (event.Subscription, error) { + + var remoteBlockchainIDRule []interface{} + for _, remoteBlockchainIDItem := range remoteBlockchainID { + remoteBlockchainIDRule = append(remoteBlockchainIDRule, remoteBlockchainIDItem) + } + var remoteTokenTransferrerAddressRule []interface{} + for _, remoteTokenTransferrerAddressItem := range remoteTokenTransferrerAddress { + remoteTokenTransferrerAddressRule = append(remoteTokenTransferrerAddressRule, remoteTokenTransferrerAddressItem) + } + + logs, sub, err := _ERC20TokenHomeUpgradeable.contract.WatchLogs(opts, "RemoteRegistered", remoteBlockchainIDRule, remoteTokenTransferrerAddressRule) + 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(ERC20TokenHomeUpgradeableRemoteRegistered) + if err := _ERC20TokenHomeUpgradeable.contract.UnpackLog(event, "RemoteRegistered", 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 +} + +// ParseRemoteRegistered is a log parse operation binding the contract event 0xf229b02a51a4c8d5ef03a096ae0dd727d7b48b710d21b50ebebb560eef739b90. +// +// Solidity: event RemoteRegistered(bytes32 indexed remoteBlockchainID, address indexed remoteTokenTransferrerAddress, uint256 initialCollateralNeeded, uint8 tokenDecimals) +func (_ERC20TokenHomeUpgradeable *ERC20TokenHomeUpgradeableFilterer) ParseRemoteRegistered(log types.Log) (*ERC20TokenHomeUpgradeableRemoteRegistered, error) { + event := new(ERC20TokenHomeUpgradeableRemoteRegistered) + if err := _ERC20TokenHomeUpgradeable.contract.UnpackLog(event, "RemoteRegistered", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// ERC20TokenHomeUpgradeableTeleporterAddressPausedIterator is returned from FilterTeleporterAddressPaused and is used to iterate over the raw logs and unpacked data for TeleporterAddressPaused events raised by the ERC20TokenHomeUpgradeable contract. +type ERC20TokenHomeUpgradeableTeleporterAddressPausedIterator struct { + Event *ERC20TokenHomeUpgradeableTeleporterAddressPaused // 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 interfaces.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 *ERC20TokenHomeUpgradeableTeleporterAddressPausedIterator) 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(ERC20TokenHomeUpgradeableTeleporterAddressPaused) + 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(ERC20TokenHomeUpgradeableTeleporterAddressPaused) + 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 *ERC20TokenHomeUpgradeableTeleporterAddressPausedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *ERC20TokenHomeUpgradeableTeleporterAddressPausedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// ERC20TokenHomeUpgradeableTeleporterAddressPaused represents a TeleporterAddressPaused event raised by the ERC20TokenHomeUpgradeable contract. +type ERC20TokenHomeUpgradeableTeleporterAddressPaused struct { + TeleporterAddress common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterTeleporterAddressPaused is a free log retrieval operation binding the contract event 0x933f93e57a222e6330362af8b376d0a8725b6901e9a2fb86d00f169702b28a4c. +// +// Solidity: event TeleporterAddressPaused(address indexed teleporterAddress) +func (_ERC20TokenHomeUpgradeable *ERC20TokenHomeUpgradeableFilterer) FilterTeleporterAddressPaused(opts *bind.FilterOpts, teleporterAddress []common.Address) (*ERC20TokenHomeUpgradeableTeleporterAddressPausedIterator, error) { + + var teleporterAddressRule []interface{} + for _, teleporterAddressItem := range teleporterAddress { + teleporterAddressRule = append(teleporterAddressRule, teleporterAddressItem) + } + + logs, sub, err := _ERC20TokenHomeUpgradeable.contract.FilterLogs(opts, "TeleporterAddressPaused", teleporterAddressRule) + if err != nil { + return nil, err + } + return &ERC20TokenHomeUpgradeableTeleporterAddressPausedIterator{contract: _ERC20TokenHomeUpgradeable.contract, event: "TeleporterAddressPaused", logs: logs, sub: sub}, nil +} + +// WatchTeleporterAddressPaused is a free log subscription operation binding the contract event 0x933f93e57a222e6330362af8b376d0a8725b6901e9a2fb86d00f169702b28a4c. +// +// Solidity: event TeleporterAddressPaused(address indexed teleporterAddress) +func (_ERC20TokenHomeUpgradeable *ERC20TokenHomeUpgradeableFilterer) WatchTeleporterAddressPaused(opts *bind.WatchOpts, sink chan<- *ERC20TokenHomeUpgradeableTeleporterAddressPaused, teleporterAddress []common.Address) (event.Subscription, error) { + + var teleporterAddressRule []interface{} + for _, teleporterAddressItem := range teleporterAddress { + teleporterAddressRule = append(teleporterAddressRule, teleporterAddressItem) + } + + logs, sub, err := _ERC20TokenHomeUpgradeable.contract.WatchLogs(opts, "TeleporterAddressPaused", teleporterAddressRule) + 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(ERC20TokenHomeUpgradeableTeleporterAddressPaused) + if err := _ERC20TokenHomeUpgradeable.contract.UnpackLog(event, "TeleporterAddressPaused", 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 +} + +// ParseTeleporterAddressPaused is a log parse operation binding the contract event 0x933f93e57a222e6330362af8b376d0a8725b6901e9a2fb86d00f169702b28a4c. +// +// Solidity: event TeleporterAddressPaused(address indexed teleporterAddress) +func (_ERC20TokenHomeUpgradeable *ERC20TokenHomeUpgradeableFilterer) ParseTeleporterAddressPaused(log types.Log) (*ERC20TokenHomeUpgradeableTeleporterAddressPaused, error) { + event := new(ERC20TokenHomeUpgradeableTeleporterAddressPaused) + if err := _ERC20TokenHomeUpgradeable.contract.UnpackLog(event, "TeleporterAddressPaused", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// ERC20TokenHomeUpgradeableTeleporterAddressUnpausedIterator is returned from FilterTeleporterAddressUnpaused and is used to iterate over the raw logs and unpacked data for TeleporterAddressUnpaused events raised by the ERC20TokenHomeUpgradeable contract. +type ERC20TokenHomeUpgradeableTeleporterAddressUnpausedIterator struct { + Event *ERC20TokenHomeUpgradeableTeleporterAddressUnpaused // 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 interfaces.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 *ERC20TokenHomeUpgradeableTeleporterAddressUnpausedIterator) 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(ERC20TokenHomeUpgradeableTeleporterAddressUnpaused) + 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(ERC20TokenHomeUpgradeableTeleporterAddressUnpaused) + 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 *ERC20TokenHomeUpgradeableTeleporterAddressUnpausedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *ERC20TokenHomeUpgradeableTeleporterAddressUnpausedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// ERC20TokenHomeUpgradeableTeleporterAddressUnpaused represents a TeleporterAddressUnpaused event raised by the ERC20TokenHomeUpgradeable contract. +type ERC20TokenHomeUpgradeableTeleporterAddressUnpaused struct { + TeleporterAddress common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterTeleporterAddressUnpaused is a free log retrieval operation binding the contract event 0x844e2f3154214672229235858fd029d1dfd543901c6d05931f0bc2480a2d72c3. +// +// Solidity: event TeleporterAddressUnpaused(address indexed teleporterAddress) +func (_ERC20TokenHomeUpgradeable *ERC20TokenHomeUpgradeableFilterer) FilterTeleporterAddressUnpaused(opts *bind.FilterOpts, teleporterAddress []common.Address) (*ERC20TokenHomeUpgradeableTeleporterAddressUnpausedIterator, error) { + + var teleporterAddressRule []interface{} + for _, teleporterAddressItem := range teleporterAddress { + teleporterAddressRule = append(teleporterAddressRule, teleporterAddressItem) + } + + logs, sub, err := _ERC20TokenHomeUpgradeable.contract.FilterLogs(opts, "TeleporterAddressUnpaused", teleporterAddressRule) + if err != nil { + return nil, err + } + return &ERC20TokenHomeUpgradeableTeleporterAddressUnpausedIterator{contract: _ERC20TokenHomeUpgradeable.contract, event: "TeleporterAddressUnpaused", logs: logs, sub: sub}, nil +} + +// WatchTeleporterAddressUnpaused is a free log subscription operation binding the contract event 0x844e2f3154214672229235858fd029d1dfd543901c6d05931f0bc2480a2d72c3. +// +// Solidity: event TeleporterAddressUnpaused(address indexed teleporterAddress) +func (_ERC20TokenHomeUpgradeable *ERC20TokenHomeUpgradeableFilterer) WatchTeleporterAddressUnpaused(opts *bind.WatchOpts, sink chan<- *ERC20TokenHomeUpgradeableTeleporterAddressUnpaused, teleporterAddress []common.Address) (event.Subscription, error) { + + var teleporterAddressRule []interface{} + for _, teleporterAddressItem := range teleporterAddress { + teleporterAddressRule = append(teleporterAddressRule, teleporterAddressItem) + } + + logs, sub, err := _ERC20TokenHomeUpgradeable.contract.WatchLogs(opts, "TeleporterAddressUnpaused", teleporterAddressRule) + 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(ERC20TokenHomeUpgradeableTeleporterAddressUnpaused) + if err := _ERC20TokenHomeUpgradeable.contract.UnpackLog(event, "TeleporterAddressUnpaused", 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 +} + +// ParseTeleporterAddressUnpaused is a log parse operation binding the contract event 0x844e2f3154214672229235858fd029d1dfd543901c6d05931f0bc2480a2d72c3. +// +// Solidity: event TeleporterAddressUnpaused(address indexed teleporterAddress) +func (_ERC20TokenHomeUpgradeable *ERC20TokenHomeUpgradeableFilterer) ParseTeleporterAddressUnpaused(log types.Log) (*ERC20TokenHomeUpgradeableTeleporterAddressUnpaused, error) { + event := new(ERC20TokenHomeUpgradeableTeleporterAddressUnpaused) + if err := _ERC20TokenHomeUpgradeable.contract.UnpackLog(event, "TeleporterAddressUnpaused", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// ERC20TokenHomeUpgradeableTokensAndCallRoutedIterator is returned from FilterTokensAndCallRouted and is used to iterate over the raw logs and unpacked data for TokensAndCallRouted events raised by the ERC20TokenHomeUpgradeable contract. +type ERC20TokenHomeUpgradeableTokensAndCallRoutedIterator struct { + Event *ERC20TokenHomeUpgradeableTokensAndCallRouted // 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 interfaces.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 *ERC20TokenHomeUpgradeableTokensAndCallRoutedIterator) 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(ERC20TokenHomeUpgradeableTokensAndCallRouted) + 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(ERC20TokenHomeUpgradeableTokensAndCallRouted) + 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 *ERC20TokenHomeUpgradeableTokensAndCallRoutedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *ERC20TokenHomeUpgradeableTokensAndCallRoutedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// ERC20TokenHomeUpgradeableTokensAndCallRouted represents a TokensAndCallRouted event raised by the ERC20TokenHomeUpgradeable contract. +type ERC20TokenHomeUpgradeableTokensAndCallRouted struct { + TeleporterMessageID [32]byte + Input SendAndCallInput + Amount *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterTokensAndCallRouted is a free log retrieval operation binding the contract event 0x42eff9005856e3c586b096d67211a566dc926052119fd7cc08023c70937ecb30. +// +// Solidity: event TokensAndCallRouted(bytes32 indexed teleporterMessageID, (bytes32,address,address,bytes,uint256,uint256,address,address,address,uint256,uint256) input, uint256 amount) +func (_ERC20TokenHomeUpgradeable *ERC20TokenHomeUpgradeableFilterer) FilterTokensAndCallRouted(opts *bind.FilterOpts, teleporterMessageID [][32]byte) (*ERC20TokenHomeUpgradeableTokensAndCallRoutedIterator, error) { + + var teleporterMessageIDRule []interface{} + for _, teleporterMessageIDItem := range teleporterMessageID { + teleporterMessageIDRule = append(teleporterMessageIDRule, teleporterMessageIDItem) + } + + logs, sub, err := _ERC20TokenHomeUpgradeable.contract.FilterLogs(opts, "TokensAndCallRouted", teleporterMessageIDRule) + if err != nil { + return nil, err + } + return &ERC20TokenHomeUpgradeableTokensAndCallRoutedIterator{contract: _ERC20TokenHomeUpgradeable.contract, event: "TokensAndCallRouted", logs: logs, sub: sub}, nil +} + +// WatchTokensAndCallRouted is a free log subscription operation binding the contract event 0x42eff9005856e3c586b096d67211a566dc926052119fd7cc08023c70937ecb30. +// +// Solidity: event TokensAndCallRouted(bytes32 indexed teleporterMessageID, (bytes32,address,address,bytes,uint256,uint256,address,address,address,uint256,uint256) input, uint256 amount) +func (_ERC20TokenHomeUpgradeable *ERC20TokenHomeUpgradeableFilterer) WatchTokensAndCallRouted(opts *bind.WatchOpts, sink chan<- *ERC20TokenHomeUpgradeableTokensAndCallRouted, teleporterMessageID [][32]byte) (event.Subscription, error) { + + var teleporterMessageIDRule []interface{} + for _, teleporterMessageIDItem := range teleporterMessageID { + teleporterMessageIDRule = append(teleporterMessageIDRule, teleporterMessageIDItem) + } + + logs, sub, err := _ERC20TokenHomeUpgradeable.contract.WatchLogs(opts, "TokensAndCallRouted", teleporterMessageIDRule) + 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(ERC20TokenHomeUpgradeableTokensAndCallRouted) + if err := _ERC20TokenHomeUpgradeable.contract.UnpackLog(event, "TokensAndCallRouted", 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 +} + +// ParseTokensAndCallRouted is a log parse operation binding the contract event 0x42eff9005856e3c586b096d67211a566dc926052119fd7cc08023c70937ecb30. +// +// Solidity: event TokensAndCallRouted(bytes32 indexed teleporterMessageID, (bytes32,address,address,bytes,uint256,uint256,address,address,address,uint256,uint256) input, uint256 amount) +func (_ERC20TokenHomeUpgradeable *ERC20TokenHomeUpgradeableFilterer) ParseTokensAndCallRouted(log types.Log) (*ERC20TokenHomeUpgradeableTokensAndCallRouted, error) { + event := new(ERC20TokenHomeUpgradeableTokensAndCallRouted) + if err := _ERC20TokenHomeUpgradeable.contract.UnpackLog(event, "TokensAndCallRouted", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// ERC20TokenHomeUpgradeableTokensAndCallSentIterator is returned from FilterTokensAndCallSent and is used to iterate over the raw logs and unpacked data for TokensAndCallSent events raised by the ERC20TokenHomeUpgradeable contract. +type ERC20TokenHomeUpgradeableTokensAndCallSentIterator struct { + Event *ERC20TokenHomeUpgradeableTokensAndCallSent // 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 interfaces.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 *ERC20TokenHomeUpgradeableTokensAndCallSentIterator) 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(ERC20TokenHomeUpgradeableTokensAndCallSent) + 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(ERC20TokenHomeUpgradeableTokensAndCallSent) + 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 *ERC20TokenHomeUpgradeableTokensAndCallSentIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *ERC20TokenHomeUpgradeableTokensAndCallSentIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// ERC20TokenHomeUpgradeableTokensAndCallSent represents a TokensAndCallSent event raised by the ERC20TokenHomeUpgradeable contract. +type ERC20TokenHomeUpgradeableTokensAndCallSent struct { + TeleporterMessageID [32]byte + Sender common.Address + Input SendAndCallInput + Amount *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterTokensAndCallSent is a free log retrieval operation binding the contract event 0x5d76dff81bf773b908b050fa113d39f7d8135bb4175398f313ea19cd3a1a0b16. +// +// Solidity: event TokensAndCallSent(bytes32 indexed teleporterMessageID, address indexed sender, (bytes32,address,address,bytes,uint256,uint256,address,address,address,uint256,uint256) input, uint256 amount) +func (_ERC20TokenHomeUpgradeable *ERC20TokenHomeUpgradeableFilterer) FilterTokensAndCallSent(opts *bind.FilterOpts, teleporterMessageID [][32]byte, sender []common.Address) (*ERC20TokenHomeUpgradeableTokensAndCallSentIterator, error) { + + var teleporterMessageIDRule []interface{} + for _, teleporterMessageIDItem := range teleporterMessageID { + teleporterMessageIDRule = append(teleporterMessageIDRule, teleporterMessageIDItem) + } + var senderRule []interface{} + for _, senderItem := range sender { + senderRule = append(senderRule, senderItem) + } + + logs, sub, err := _ERC20TokenHomeUpgradeable.contract.FilterLogs(opts, "TokensAndCallSent", teleporterMessageIDRule, senderRule) + if err != nil { + return nil, err + } + return &ERC20TokenHomeUpgradeableTokensAndCallSentIterator{contract: _ERC20TokenHomeUpgradeable.contract, event: "TokensAndCallSent", logs: logs, sub: sub}, nil +} + +// WatchTokensAndCallSent is a free log subscription operation binding the contract event 0x5d76dff81bf773b908b050fa113d39f7d8135bb4175398f313ea19cd3a1a0b16. +// +// Solidity: event TokensAndCallSent(bytes32 indexed teleporterMessageID, address indexed sender, (bytes32,address,address,bytes,uint256,uint256,address,address,address,uint256,uint256) input, uint256 amount) +func (_ERC20TokenHomeUpgradeable *ERC20TokenHomeUpgradeableFilterer) WatchTokensAndCallSent(opts *bind.WatchOpts, sink chan<- *ERC20TokenHomeUpgradeableTokensAndCallSent, teleporterMessageID [][32]byte, sender []common.Address) (event.Subscription, error) { + + var teleporterMessageIDRule []interface{} + for _, teleporterMessageIDItem := range teleporterMessageID { + teleporterMessageIDRule = append(teleporterMessageIDRule, teleporterMessageIDItem) + } + var senderRule []interface{} + for _, senderItem := range sender { + senderRule = append(senderRule, senderItem) + } + + logs, sub, err := _ERC20TokenHomeUpgradeable.contract.WatchLogs(opts, "TokensAndCallSent", teleporterMessageIDRule, senderRule) + 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(ERC20TokenHomeUpgradeableTokensAndCallSent) + if err := _ERC20TokenHomeUpgradeable.contract.UnpackLog(event, "TokensAndCallSent", 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 +} + +// ParseTokensAndCallSent is a log parse operation binding the contract event 0x5d76dff81bf773b908b050fa113d39f7d8135bb4175398f313ea19cd3a1a0b16. +// +// Solidity: event TokensAndCallSent(bytes32 indexed teleporterMessageID, address indexed sender, (bytes32,address,address,bytes,uint256,uint256,address,address,address,uint256,uint256) input, uint256 amount) +func (_ERC20TokenHomeUpgradeable *ERC20TokenHomeUpgradeableFilterer) ParseTokensAndCallSent(log types.Log) (*ERC20TokenHomeUpgradeableTokensAndCallSent, error) { + event := new(ERC20TokenHomeUpgradeableTokensAndCallSent) + if err := _ERC20TokenHomeUpgradeable.contract.UnpackLog(event, "TokensAndCallSent", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// ERC20TokenHomeUpgradeableTokensRoutedIterator is returned from FilterTokensRouted and is used to iterate over the raw logs and unpacked data for TokensRouted events raised by the ERC20TokenHomeUpgradeable contract. +type ERC20TokenHomeUpgradeableTokensRoutedIterator struct { + Event *ERC20TokenHomeUpgradeableTokensRouted // 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 interfaces.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 *ERC20TokenHomeUpgradeableTokensRoutedIterator) 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(ERC20TokenHomeUpgradeableTokensRouted) + 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(ERC20TokenHomeUpgradeableTokensRouted) + 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 *ERC20TokenHomeUpgradeableTokensRoutedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *ERC20TokenHomeUpgradeableTokensRoutedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// ERC20TokenHomeUpgradeableTokensRouted represents a TokensRouted event raised by the ERC20TokenHomeUpgradeable contract. +type ERC20TokenHomeUpgradeableTokensRouted struct { + TeleporterMessageID [32]byte + Input SendTokensInput + Amount *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterTokensRouted is a free log retrieval operation binding the contract event 0x825080857c76cef4a1629c0705a7f8b4ef0282ddcafde0b6715c4fb34b68aaf0. +// +// Solidity: event TokensRouted(bytes32 indexed teleporterMessageID, (bytes32,address,address,address,uint256,uint256,uint256,address) input, uint256 amount) +func (_ERC20TokenHomeUpgradeable *ERC20TokenHomeUpgradeableFilterer) FilterTokensRouted(opts *bind.FilterOpts, teleporterMessageID [][32]byte) (*ERC20TokenHomeUpgradeableTokensRoutedIterator, error) { + + var teleporterMessageIDRule []interface{} + for _, teleporterMessageIDItem := range teleporterMessageID { + teleporterMessageIDRule = append(teleporterMessageIDRule, teleporterMessageIDItem) + } + + logs, sub, err := _ERC20TokenHomeUpgradeable.contract.FilterLogs(opts, "TokensRouted", teleporterMessageIDRule) + if err != nil { + return nil, err + } + return &ERC20TokenHomeUpgradeableTokensRoutedIterator{contract: _ERC20TokenHomeUpgradeable.contract, event: "TokensRouted", logs: logs, sub: sub}, nil +} + +// WatchTokensRouted is a free log subscription operation binding the contract event 0x825080857c76cef4a1629c0705a7f8b4ef0282ddcafde0b6715c4fb34b68aaf0. +// +// Solidity: event TokensRouted(bytes32 indexed teleporterMessageID, (bytes32,address,address,address,uint256,uint256,uint256,address) input, uint256 amount) +func (_ERC20TokenHomeUpgradeable *ERC20TokenHomeUpgradeableFilterer) WatchTokensRouted(opts *bind.WatchOpts, sink chan<- *ERC20TokenHomeUpgradeableTokensRouted, teleporterMessageID [][32]byte) (event.Subscription, error) { + + var teleporterMessageIDRule []interface{} + for _, teleporterMessageIDItem := range teleporterMessageID { + teleporterMessageIDRule = append(teleporterMessageIDRule, teleporterMessageIDItem) + } + + logs, sub, err := _ERC20TokenHomeUpgradeable.contract.WatchLogs(opts, "TokensRouted", teleporterMessageIDRule) + 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(ERC20TokenHomeUpgradeableTokensRouted) + if err := _ERC20TokenHomeUpgradeable.contract.UnpackLog(event, "TokensRouted", 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 +} + +// ParseTokensRouted is a log parse operation binding the contract event 0x825080857c76cef4a1629c0705a7f8b4ef0282ddcafde0b6715c4fb34b68aaf0. +// +// Solidity: event TokensRouted(bytes32 indexed teleporterMessageID, (bytes32,address,address,address,uint256,uint256,uint256,address) input, uint256 amount) +func (_ERC20TokenHomeUpgradeable *ERC20TokenHomeUpgradeableFilterer) ParseTokensRouted(log types.Log) (*ERC20TokenHomeUpgradeableTokensRouted, error) { + event := new(ERC20TokenHomeUpgradeableTokensRouted) + if err := _ERC20TokenHomeUpgradeable.contract.UnpackLog(event, "TokensRouted", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// ERC20TokenHomeUpgradeableTokensSentIterator is returned from FilterTokensSent and is used to iterate over the raw logs and unpacked data for TokensSent events raised by the ERC20TokenHomeUpgradeable contract. +type ERC20TokenHomeUpgradeableTokensSentIterator struct { + Event *ERC20TokenHomeUpgradeableTokensSent // 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 interfaces.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 *ERC20TokenHomeUpgradeableTokensSentIterator) 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(ERC20TokenHomeUpgradeableTokensSent) + 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(ERC20TokenHomeUpgradeableTokensSent) + 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 *ERC20TokenHomeUpgradeableTokensSentIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *ERC20TokenHomeUpgradeableTokensSentIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// ERC20TokenHomeUpgradeableTokensSent represents a TokensSent event raised by the ERC20TokenHomeUpgradeable contract. +type ERC20TokenHomeUpgradeableTokensSent struct { + TeleporterMessageID [32]byte + Sender common.Address + Input SendTokensInput + Amount *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterTokensSent is a free log retrieval operation binding the contract event 0x93f19bf1ec58a15dc643b37e7e18a1c13e85e06cd11929e283154691ace9fb52. +// +// Solidity: event TokensSent(bytes32 indexed teleporterMessageID, address indexed sender, (bytes32,address,address,address,uint256,uint256,uint256,address) input, uint256 amount) +func (_ERC20TokenHomeUpgradeable *ERC20TokenHomeUpgradeableFilterer) FilterTokensSent(opts *bind.FilterOpts, teleporterMessageID [][32]byte, sender []common.Address) (*ERC20TokenHomeUpgradeableTokensSentIterator, error) { + + var teleporterMessageIDRule []interface{} + for _, teleporterMessageIDItem := range teleporterMessageID { + teleporterMessageIDRule = append(teleporterMessageIDRule, teleporterMessageIDItem) + } + var senderRule []interface{} + for _, senderItem := range sender { + senderRule = append(senderRule, senderItem) + } + + logs, sub, err := _ERC20TokenHomeUpgradeable.contract.FilterLogs(opts, "TokensSent", teleporterMessageIDRule, senderRule) + if err != nil { + return nil, err + } + return &ERC20TokenHomeUpgradeableTokensSentIterator{contract: _ERC20TokenHomeUpgradeable.contract, event: "TokensSent", logs: logs, sub: sub}, nil +} + +// WatchTokensSent is a free log subscription operation binding the contract event 0x93f19bf1ec58a15dc643b37e7e18a1c13e85e06cd11929e283154691ace9fb52. +// +// Solidity: event TokensSent(bytes32 indexed teleporterMessageID, address indexed sender, (bytes32,address,address,address,uint256,uint256,uint256,address) input, uint256 amount) +func (_ERC20TokenHomeUpgradeable *ERC20TokenHomeUpgradeableFilterer) WatchTokensSent(opts *bind.WatchOpts, sink chan<- *ERC20TokenHomeUpgradeableTokensSent, teleporterMessageID [][32]byte, sender []common.Address) (event.Subscription, error) { + + var teleporterMessageIDRule []interface{} + for _, teleporterMessageIDItem := range teleporterMessageID { + teleporterMessageIDRule = append(teleporterMessageIDRule, teleporterMessageIDItem) + } + var senderRule []interface{} + for _, senderItem := range sender { + senderRule = append(senderRule, senderItem) + } + + logs, sub, err := _ERC20TokenHomeUpgradeable.contract.WatchLogs(opts, "TokensSent", teleporterMessageIDRule, senderRule) + 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(ERC20TokenHomeUpgradeableTokensSent) + if err := _ERC20TokenHomeUpgradeable.contract.UnpackLog(event, "TokensSent", 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 +} + +// ParseTokensSent is a log parse operation binding the contract event 0x93f19bf1ec58a15dc643b37e7e18a1c13e85e06cd11929e283154691ace9fb52. +// +// Solidity: event TokensSent(bytes32 indexed teleporterMessageID, address indexed sender, (bytes32,address,address,address,uint256,uint256,uint256,address) input, uint256 amount) +func (_ERC20TokenHomeUpgradeable *ERC20TokenHomeUpgradeableFilterer) ParseTokensSent(log types.Log) (*ERC20TokenHomeUpgradeableTokensSent, error) { + event := new(ERC20TokenHomeUpgradeableTokensSent) + if err := _ERC20TokenHomeUpgradeable.contract.UnpackLog(event, "TokensSent", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// ERC20TokenHomeUpgradeableTokensWithdrawnIterator is returned from FilterTokensWithdrawn and is used to iterate over the raw logs and unpacked data for TokensWithdrawn events raised by the ERC20TokenHomeUpgradeable contract. +type ERC20TokenHomeUpgradeableTokensWithdrawnIterator struct { + Event *ERC20TokenHomeUpgradeableTokensWithdrawn // 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 interfaces.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 *ERC20TokenHomeUpgradeableTokensWithdrawnIterator) 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(ERC20TokenHomeUpgradeableTokensWithdrawn) + 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(ERC20TokenHomeUpgradeableTokensWithdrawn) + 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 *ERC20TokenHomeUpgradeableTokensWithdrawnIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *ERC20TokenHomeUpgradeableTokensWithdrawnIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// ERC20TokenHomeUpgradeableTokensWithdrawn represents a TokensWithdrawn event raised by the ERC20TokenHomeUpgradeable contract. +type ERC20TokenHomeUpgradeableTokensWithdrawn struct { + Recipient common.Address + Amount *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterTokensWithdrawn is a free log retrieval operation binding the contract event 0x6352c5382c4a4578e712449ca65e83cdb392d045dfcf1cad9615189db2da244b. +// +// Solidity: event TokensWithdrawn(address indexed recipient, uint256 amount) +func (_ERC20TokenHomeUpgradeable *ERC20TokenHomeUpgradeableFilterer) FilterTokensWithdrawn(opts *bind.FilterOpts, recipient []common.Address) (*ERC20TokenHomeUpgradeableTokensWithdrawnIterator, error) { + + var recipientRule []interface{} + for _, recipientItem := range recipient { + recipientRule = append(recipientRule, recipientItem) + } + + logs, sub, err := _ERC20TokenHomeUpgradeable.contract.FilterLogs(opts, "TokensWithdrawn", recipientRule) + if err != nil { + return nil, err + } + return &ERC20TokenHomeUpgradeableTokensWithdrawnIterator{contract: _ERC20TokenHomeUpgradeable.contract, event: "TokensWithdrawn", logs: logs, sub: sub}, nil +} + +// WatchTokensWithdrawn is a free log subscription operation binding the contract event 0x6352c5382c4a4578e712449ca65e83cdb392d045dfcf1cad9615189db2da244b. +// +// Solidity: event TokensWithdrawn(address indexed recipient, uint256 amount) +func (_ERC20TokenHomeUpgradeable *ERC20TokenHomeUpgradeableFilterer) WatchTokensWithdrawn(opts *bind.WatchOpts, sink chan<- *ERC20TokenHomeUpgradeableTokensWithdrawn, recipient []common.Address) (event.Subscription, error) { + + var recipientRule []interface{} + for _, recipientItem := range recipient { + recipientRule = append(recipientRule, recipientItem) + } + + logs, sub, err := _ERC20TokenHomeUpgradeable.contract.WatchLogs(opts, "TokensWithdrawn", recipientRule) + 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(ERC20TokenHomeUpgradeableTokensWithdrawn) + if err := _ERC20TokenHomeUpgradeable.contract.UnpackLog(event, "TokensWithdrawn", 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 +} + +// ParseTokensWithdrawn is a log parse operation binding the contract event 0x6352c5382c4a4578e712449ca65e83cdb392d045dfcf1cad9615189db2da244b. +// +// Solidity: event TokensWithdrawn(address indexed recipient, uint256 amount) +func (_ERC20TokenHomeUpgradeable *ERC20TokenHomeUpgradeableFilterer) ParseTokensWithdrawn(log types.Log) (*ERC20TokenHomeUpgradeableTokensWithdrawn, error) { + event := new(ERC20TokenHomeUpgradeableTokensWithdrawn) + if err := _ERC20TokenHomeUpgradeable.contract.UnpackLog(event, "TokensWithdrawn", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} diff --git a/abi-bindings/go/ictt/TokenHome/NativeTokenHome/NativeTokenHome.go b/abi-bindings/go/ictt/TokenHome/NativeTokenHome/NativeTokenHome.go new file mode 100644 index 000000000..09af00c19 --- /dev/null +++ b/abi-bindings/go/ictt/TokenHome/NativeTokenHome/NativeTokenHome.go @@ -0,0 +1,2854 @@ +// Code generated - DO NOT EDIT. +// This file is a generated binding and any manual changes will be lost. + +package nativetokenhome + +import ( + "errors" + "math/big" + "strings" + + "github.com/ava-labs/subnet-evm/accounts/abi" + "github.com/ava-labs/subnet-evm/accounts/abi/bind" + "github.com/ava-labs/subnet-evm/core/types" + "github.com/ava-labs/subnet-evm/interfaces" + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/event" +) + +// Reference imports to suppress errors if they are not otherwise used. +var ( + _ = errors.New + _ = big.NewInt + _ = strings.NewReader + _ = interfaces.NotFound + _ = bind.Bind + _ = common.Big1 + _ = types.BloomLookup + _ = event.NewSubscription + _ = abi.ConvertType +) + +// RemoteTokenTransferrerSettings is an auto generated low-level Go binding around an user-defined struct. +type RemoteTokenTransferrerSettings struct { + Registered bool + CollateralNeeded *big.Int + TokenMultiplier *big.Int + MultiplyOnRemote bool +} + +// SendAndCallInput is an auto generated low-level Go binding around an user-defined struct. +type SendAndCallInput struct { + DestinationBlockchainID [32]byte + DestinationTokenTransferrerAddress common.Address + RecipientContract common.Address + RecipientPayload []byte + RequiredGasLimit *big.Int + RecipientGasLimit *big.Int + MultiHopFallback common.Address + FallbackRecipient common.Address + PrimaryFeeTokenAddress common.Address + PrimaryFee *big.Int + SecondaryFee *big.Int +} + +// SendTokensInput is an auto generated low-level Go binding around an user-defined struct. +type SendTokensInput struct { + DestinationBlockchainID [32]byte + DestinationTokenTransferrerAddress common.Address + Recipient common.Address + PrimaryFeeTokenAddress common.Address + PrimaryFee *big.Int + SecondaryFee *big.Int + RequiredGasLimit *big.Int + MultiHopFallback common.Address +} + +// NativeTokenHomeMetaData contains all meta data concerning the NativeTokenHome contract. +var NativeTokenHomeMetaData = &bind.MetaData{ + ABI: "[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"teleporterRegistryAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"teleporterManager\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"minTeleporterVersion\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"wrappedTokenAddress\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"target\",\"type\":\"address\"}],\"name\":\"AddressEmptyCode\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"AddressInsufficientBalance\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"FailedInnerCall\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidInitialization\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotInitializing\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"OwnableInvalidOwner\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"OwnableUnauthorizedAccount\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ReentrancyGuardReentrantCall\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"SafeERC20FailedOperation\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"recipientContract\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"CallFailed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"recipientContract\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"CallSucceeded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"remoteBlockchainID\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"remoteTokenTransferrerAddress\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"remaining\",\"type\":\"uint256\"}],\"name\":\"CollateralAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"version\",\"type\":\"uint64\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"oldMinTeleporterVersion\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"newMinTeleporterVersion\",\"type\":\"uint256\"}],\"name\":\"MinTeleporterVersionUpdated\",\"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\":\"bytes32\",\"name\":\"remoteBlockchainID\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"remoteTokenTransferrerAddress\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"initialCollateralNeeded\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"tokenDecimals\",\"type\":\"uint8\"}],\"name\":\"RemoteRegistered\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"teleporterAddress\",\"type\":\"address\"}],\"name\":\"TeleporterAddressPaused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"teleporterAddress\",\"type\":\"address\"}],\"name\":\"TeleporterAddressUnpaused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"teleporterMessageID\",\"type\":\"bytes32\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"destinationBlockchainID\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"destinationTokenTransferrerAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"recipientContract\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"recipientPayload\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"requiredGasLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"recipientGasLimit\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"multiHopFallback\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"fallbackRecipient\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"primaryFeeTokenAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"primaryFee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"secondaryFee\",\"type\":\"uint256\"}],\"indexed\":false,\"internalType\":\"structSendAndCallInput\",\"name\":\"input\",\"type\":\"tuple\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"TokensAndCallRouted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"teleporterMessageID\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"destinationBlockchainID\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"destinationTokenTransferrerAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"recipientContract\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"recipientPayload\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"requiredGasLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"recipientGasLimit\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"multiHopFallback\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"fallbackRecipient\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"primaryFeeTokenAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"primaryFee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"secondaryFee\",\"type\":\"uint256\"}],\"indexed\":false,\"internalType\":\"structSendAndCallInput\",\"name\":\"input\",\"type\":\"tuple\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"TokensAndCallSent\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"teleporterMessageID\",\"type\":\"bytes32\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"destinationBlockchainID\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"destinationTokenTransferrerAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"primaryFeeTokenAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"primaryFee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"secondaryFee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"requiredGasLimit\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"multiHopFallback\",\"type\":\"address\"}],\"indexed\":false,\"internalType\":\"structSendTokensInput\",\"name\":\"input\",\"type\":\"tuple\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"TokensRouted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"teleporterMessageID\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"destinationBlockchainID\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"destinationTokenTransferrerAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"primaryFeeTokenAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"primaryFee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"secondaryFee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"requiredGasLimit\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"multiHopFallback\",\"type\":\"address\"}],\"indexed\":false,\"internalType\":\"structSendTokensInput\",\"name\":\"input\",\"type\":\"tuple\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"TokensSent\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"TokensWithdrawn\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"NATIVE_TOKEN_HOME_STORAGE_LOCATION\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"TELEPORTER_REGISTRY_APP_STORAGE_LOCATION\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"TOKEN_HOME_STORAGE_LOCATION\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"remoteBlockchainID\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"remoteTokenTransferrerAddress\",\"type\":\"address\"}],\"name\":\"addCollateral\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getBlockchainID\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getMinTeleporterVersion\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"remoteBlockchainID\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"remoteTokenTransferrerAddress\",\"type\":\"address\"}],\"name\":\"getRemoteTokenTransferrerSettings\",\"outputs\":[{\"components\":[{\"internalType\":\"bool\",\"name\":\"registered\",\"type\":\"bool\"},{\"internalType\":\"uint256\",\"name\":\"collateralNeeded\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"tokenMultiplier\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"multiplyOnRemote\",\"type\":\"bool\"}],\"internalType\":\"structRemoteTokenTransferrerSettings\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getTokenAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"remoteBlockchainID\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"remoteTokenTransferrerAddress\",\"type\":\"address\"}],\"name\":\"getTransferredBalance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"teleporterRegistryAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"teleporterManager\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"minTeleporterVersion\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"wrappedTokenAddress\",\"type\":\"address\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"teleporterAddress\",\"type\":\"address\"}],\"name\":\"isTeleporterAddressPaused\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"teleporterAddress\",\"type\":\"address\"}],\"name\":\"pauseTeleporterAddress\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"sourceBlockchainID\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"originSenderAddress\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"message\",\"type\":\"bytes\"}],\"name\":\"receiveTeleporterMessage\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"destinationBlockchainID\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"destinationTokenTransferrerAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"primaryFeeTokenAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"primaryFee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"secondaryFee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"requiredGasLimit\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"multiHopFallback\",\"type\":\"address\"}],\"internalType\":\"structSendTokensInput\",\"name\":\"input\",\"type\":\"tuple\"}],\"name\":\"send\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"destinationBlockchainID\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"destinationTokenTransferrerAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"recipientContract\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"recipientPayload\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"requiredGasLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"recipientGasLimit\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"multiHopFallback\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"fallbackRecipient\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"primaryFeeTokenAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"primaryFee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"secondaryFee\",\"type\":\"uint256\"}],\"internalType\":\"structSendAndCallInput\",\"name\":\"input\",\"type\":\"tuple\"}],\"name\":\"sendAndCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"teleporterAddress\",\"type\":\"address\"}],\"name\":\"unpauseTeleporterAddress\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"version\",\"type\":\"uint256\"}],\"name\":\"updateMinTeleporterVersion\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}]", + Bin: "0x608060405234801561000f575f80fd5b506040516152c13803806152c183398101604081905261002e91610890565b61003a84848484610046565b505050506108f1565b50565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00805468010000000000000000810460ff1615906001600160401b03165f8115801561008f5750825b90505f826001600160401b031660011480156100aa5750303b155b9050811580156100b8575080155b156100d65760405163f92ee8a960e01b815260040160405180910390fd5b84546001600160401b0319166001178555831561010457845460ff60401b1916680100000000000000001785555b61011089898989610161565b831561015657845460ff60401b19168555604051600181527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b505050505050505050565b610169610186565b6101778484848460126101d6565b61018081610202565b50505050565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a005468010000000000000000900460ff166101d457604051631afcd79f60e31b815260040160405180910390fd5b565b6101de610186565b6101e985858561024b565b6101f161026b565b6101fb828261027b565b5050505050565b61020a610186565b7f3b5030f10c94fcbdaa3022348ff0b82dbd4c0c71339e41ff59d0bdc92179d60080546001600160a01b0319166001600160a01b0392909216919091179055565b610253610186565b61025d8382610407565b6102668261042d565b505050565b610273610186565b6101d461043e565b610283610186565b6001600160a01b0382166102de5760405162461bcd60e51b815260206004820152601d60248201527f546f6b656e486f6d653a207a65726f20746f6b656e206164647265737300000060448201526064015b60405180910390fd5b60128160ff16111561033d5760405162461bcd60e51b815260206004820152602260248201527f546f6b656e486f6d653a20746f6b656e20646563696d616c7320746f6f2068696044820152610ced60f31b60648201526084016102d5565b5f7f9316912b5a9db88acbe872c934fdd0a46c436c6dcba332d649c4d57c7bc9e60090507302000000000000000000000000000000000000056001600160a01b0316634213cf786040518163ffffffff1660e01b8152600401602060405180830381865afa1580156103b1573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906103d591906108da565b8155600101805460ff909216600160a01b026001600160a81b03199092166001600160a01b0390931692909217179055565b61040f610186565b610417610468565b61041f610478565b6104298282610480565b5050565b610435610186565b61004381610604565b5f7fd2f1ed38b7d242bfb8b41862afb813a15193219a4bc717f2056607593e6c75005b6001905550565b610470610186565b6101d461063e565b6101d4610186565b610488610186565b6001600160a01b0382166105045760405162461bcd60e51b815260206004820152603760248201527f54656c65706f7274657252656769737472794170703a207a65726f2054656c6560448201527f706f72746572207265676973747279206164647265737300000000000000000060648201526084016102d5565b5f7fde77a4dc7391f6f8f2d9567915d687d3aee79e7a1fc7300392f2727e9a0f1d0090505f8390505f816001600160a01b031663c07f47d46040518163ffffffff1660e01b8152600401602060405180830381865afa158015610569573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061058d91906108da565b116105e25760405162461bcd60e51b815260206004820152603260248201525f805160206152a1833981519152604482015271656c65706f7274657220726567697374727960701b60648201526084016102d5565b81546001600160a01b0319166001600160a01b0382161782556101808361066d565b61060c610186565b6001600160a01b03811661063557604051631e4fbdf760e01b81525f60048201526024016102d5565b61004381610805565b610646610186565b5f7f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f00610461565b7fde77a4dc7391f6f8f2d9567915d687d3aee79e7a1fc7300392f2727e9a0f1d0080546040805163301fd1f560e21b815290515f926001600160a01b03169163c07f47d49160048083019260209291908290030181865afa1580156106d4573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906106f891906108da565b6002830154909150818411156107575760405162461bcd60e51b815260206004820152603160248201525f805160206152a183398151915260448201527032b632b837b93a32b9103b32b939b4b7b760791b60648201526084016102d5565b8084116107cc5760405162461bcd60e51b815260206004820152603f60248201527f54656c65706f7274657252656769737472794170703a206e6f7420677265617460448201527f6572207468616e2063757272656e74206d696e696d756d2076657273696f6e0060648201526084016102d5565b60028301849055604051849082907fa9a7ef57e41f05b4c15480842f5f0c27edfcbb553fed281f7c4068452cc1c02d905f90a350505050565b7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c19930080546001600160a01b031981166001600160a01b03848116918217845560405192169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0905f90a3505050565b80516001600160a01b038116811461088b575f80fd5b919050565b5f805f80608085870312156108a3575f80fd5b6108ac85610875565b93506108ba60208601610875565b9250604085015191506108cf60608601610875565b905092959194509250565b5f602082840312156108ea575f80fd5b5051919050565b6149a3806108fe5f395ff3fe60806040526004361061011e575f3560e01c80638da5cb5b1161009d578063c8511ada11610062578063c8511ada146103d5578063c868efaa146104b5578063d2cc7a70146104d4578063efb5b95e14610507578063f2fde38b14610527575f80fd5b80638da5cb5b14610318578063909a6ac0146103545780639731429714610374578063b0b78b26146103a3578063be203094146103b6575f80fd5b80635eb99514116100e35780635eb995141461029f57806362e3901b146102be5780636e6eef8d146102de578063715018a6146102f15780638bf2fa9414610305575f80fd5b806310fe9ae8146101bf578063154d625a146102145780632b0d8f18146102415780634213cf78146102605780634511243e14610280575f80fd5b366101bb577f9316912b5a9db88acbe872c934fdd0a46c436c6dcba332d649c4d57c7bc9e601546001600160a01b031633146101b95760405162461bcd60e51b815260206004820152602f60248201527f4e6174697665546f6b656e486f6d653a20696e76616c6964207265636569766560448201526e103830bcb0b136329039b2b73232b960891b60648201526084015b60405180910390fd5b005b5f80fd5b3480156101ca575f80fd5b507f9316912b5a9db88acbe872c934fdd0a46c436c6dcba332d649c4d57c7bc9e601546001600160a01b03165b6040516001600160a01b0390911681526020015b60405180910390f35b34801561021f575f80fd5b5061023361022e3660046139c6565b610546565b60405190815260200161020b565b34801561024c575f80fd5b506101b961025b3660046139f4565b61058e565b34801561026b575f80fd5b505f805160206148ce83398151915254610233565b34801561028b575f80fd5b506101b961029a3660046139f4565b610687565b3480156102aa575f80fd5b506101b96102b9366004613a0f565b610776565b3480156102c9575f80fd5b506102335f805160206148ce83398151915281565b6101b96102ec366004613a26565b61078a565b3480156102fc575f80fd5b506101b96107b3565b6101b9610313366004613a5d565b6107c6565b348015610323575f80fd5b507f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300546001600160a01b03166101f7565b34801561035f575f80fd5b506102335f8051602061494e83398151915281565b34801561037f575f80fd5b5061039361038e3660046139f4565b6107de565b604051901515815260200161020b565b6101b96103b13660046139c6565b6107fe565b3480156103c1575f80fd5b506101b96103d0366004613a74565b61080d565b3480156103e0575f80fd5b5061047e6103ef3660046139c6565b60408051608080820183525f808352602080840182905283850182905260609384018290529581525f8051602061490e83398151915286528381206001600160a01b039590951681529385529282902082519384018352805460ff9081161515855260018201549585019590955260028101549284019290925260039091015490921615159181019190915290565b60405161020b9190815115158152602080830151908201526040808301519082015260609182015115159181019190915260800190565b3480156104c0575f80fd5b506101b96104cf366004613ac4565b61091f565b3480156104df575f80fd5b507fde77a4dc7391f6f8f2d9567915d687d3aee79e7a1fc7300392f2727e9a0f1d0254610233565b348015610512575f80fd5b506102335f805160206148ee83398151915281565b348015610532575f80fd5b506101b96105413660046139f4565b610adc565b5f8281527f9316912b5a9db88acbe872c934fdd0a46c436c6dcba332d649c4d57c7bc9e603602090815260408083206001600160a01b03851684529091529020545b92915050565b5f8051602061494e8339815191526105a4610b16565b6001600160a01b0382166105ca5760405162461bcd60e51b81526004016101b090613b45565b6105d48183610b1e565b156106375760405162461bcd60e51b815260206004820152602d60248201527f54656c65706f7274657252656769737472794170703a2061646472657373206160448201526c1b1c9958591e481c185d5cd959609a1b60648201526084016101b0565b6001600160a01b0382165f81815260018381016020526040808320805460ff1916909217909155517f933f93e57a222e6330362af8b376d0a8725b6901e9a2fb86d00f169702b28a4c9190a25050565b5f8051602061494e83398151915261069d610b16565b6001600160a01b0382166106c35760405162461bcd60e51b81526004016101b090613b45565b6106cd8183610b1e565b61072b5760405162461bcd60e51b815260206004820152602960248201527f54656c65706f7274657252656769737472794170703a2061646472657373206e6044820152681bdd081c185d5cd95960ba1b60648201526084016101b0565b6001600160a01b0382165f818152600183016020526040808220805460ff19169055517f844e2f3154214672229235858fd029d1dfd543901c6d05931f0bc2480a2d72c39190a25050565b61077e610b16565b61078781610b3f565b50565b6107876107a25f805160206148ce8339815191525490565b30336107ad85613cbd565b34610cd7565b6107bb610f3a565b6107c45f610f95565b565b6107876107d836839003830183613d8b565b34611005565b5f5f8051602061494e8339815191526107f78184610b1e565b9392505050565b6108098282346111bf565b5050565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a008054600160401b810460ff1615906001600160401b03165f811580156108515750825b90505f826001600160401b0316600114801561086c5750303b155b90508115801561087a575080155b156108985760405163f92ee8a960e01b815260040160405180910390fd5b845467ffffffffffffffff1916600117855583156108c257845460ff60401b1916600160401b1785555b6108ce898989896113af565b831561091457845460ff60401b19168555604051600181527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b505050505050505050565b6109276113ce565b5f5f8051602061494e83398151915260028101548154919250906001600160a01b0316634c1f08ce336040516001600160e01b031960e084901b1681526001600160a01b039091166004820152602401602060405180830381865afa158015610992573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906109b69190613e15565b1015610a1d5760405162461bcd60e51b815260206004820152603060248201527f54656c65706f7274657252656769737472794170703a20696e76616c6964205460448201526f32b632b837b93a32b91039b2b73232b960811b60648201526084016101b0565b610a278133610b1e565b15610a8d5760405162461bcd60e51b815260206004820152603060248201527f54656c65706f7274657252656769737472794170703a2054656c65706f72746560448201526f1c881859191c995cdcc81c185d5cd95960821b60648201526084016101b0565b610acd858585858080601f0160208091040260200160405190810160405280939291908181526020018383808284375f9201919091525061141892505050565b50610ad661180c565b50505050565b610ae4610f3a565b6001600160a01b038116610b0d57604051631e4fbdf760e01b81525f60048201526024016101b0565b61078781610f95565b6107c4610f3a565b6001600160a01b03165f908152600191909101602052604090205460ff1690565b5f8051602061494e83398151915280546040805163301fd1f560e21b815290515f926001600160a01b03169163c07f47d49160048083019260209291908290030181865afa158015610b93573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610bb79190613e15565b600283015490915081841115610c295760405162461bcd60e51b815260206004820152603160248201527f54656c65706f7274657252656769737472794170703a20696e76616c6964205460448201527032b632b837b93a32b9103b32b939b4b7b760791b60648201526084016101b0565b808411610c9e5760405162461bcd60e51b815260206004820152603f60248201527f54656c65706f7274657252656769737472794170703a206e6f7420677265617460448201527f6572207468616e2063757272656e74206d696e696d756d2076657273696f6e0060648201526084016101b0565b60028301849055604051849082907fa9a7ef57e41f05b4c15480842f5f0c27edfcbb553fed281f7c4068452cc1c02d905f90a350505050565b5f8051602061492e8339815191528054600114610d065760405162461bcd60e51b81526004016101b090613e2c565b60028155610d1383611836565b60c08301516001600160a01b031615610d3e5760405162461bcd60e51b81526004016101b090613e70565b5f80610d5e855f0151866020015186886101000151896101200151611a1b565b915091505f604051806040016040528060026004811115610d8157610d81613eb6565b81526020016040518061010001604052808c81526020018b6001600160a01b031681526020018a6001600160a01b0316815260200189604001516001600160a01b03168152602001868152602001896060015181526020018960a0015181526020018960e001516001600160a01b0316815250604051602001610e049190613f17565b60405160208183030381529060405281525090505f610ee46040518060c00160405280895f0151815260200189602001516001600160a01b0316815260200160405180604001604052808b61010001516001600160a01b03168152602001878152508152602001896080015181526020015f6001600160401b03811115610e8d57610e8d613b93565b604051908082528060200260200182016040528015610eb6578160200160208202803683370190505b50815260200184604051602001610ecd9190613fb5565b604051602081830303815290604052815250611be0565b9050876001600160a01b0316817f5d76dff81bf773b908b050fa113d39f7d8135bb4175398f313ea19cd3a1a0b168987604051610f22929190613ff7565b60405180910390a35050600190925550505050505050565b33610f6c7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300546001600160a01b031690565b6001600160a01b0316146107c45760405163118cdaa760e01b81523360048201526024016101b0565b7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c19930080546001600160a01b031981166001600160a01b03848116918217845560405192169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0905f90a3505050565b5f8051602061492e83398151915280546001146110345760405162461bcd60e51b81526004016101b090613e2c565b6002815561104183611cfb565b60e08301516001600160a01b03161561106c5760405162461bcd60e51b81526004016101b090613e70565b5f8061108a855f015186602001518688606001518960800151611a1b565b915091505f6040518060400160405280600160048111156110ad576110ad613eb6565b8152602001604051806040016040528089604001516001600160a01b03168152602001868152506040516020016110e491906140d9565b60405160208183030381529060405281525090505f61116c6040518060c00160405280895f0151815260200189602001516001600160a01b0316815260200160405180604001604052808b606001516001600160a01b031681526020018781525081526020018960c0015181526020015f6001600160401b03811115610e8d57610e8d613b93565b9050336001600160a01b0316817f93f19bf1ec58a15dc643b37e7e18a1c13e85e06cd11929e283154691ace9fb5289876040516111aa9291906140f9565b60405180910390a35050600190925550505050565b5f8051602061492e83398151915280546001146111ee5760405162461bcd60e51b81526004016101b090613e2c565b60028082555f8581525f8051602061490e833981519152602090815260408083206001600160a01b03881684528252918290208251608081018452815460ff9081161515808352600184015494830194909452948201549381019390935260030154909216151560608201525f805160206148ce833981519152916112855760405162461bcd60e51b81526004016101b09061417a565b5f8160200151116112e25760405162461bcd60e51b815260206004820152602160248201527f546f6b656e486f6d653a207a65726f20636f6c6c61746572616c206e656564656044820152601960fa1b60648201526084016101b0565b6112eb84611da4565b93505f808260200151861061131a5760208301515f925061130c90876141c3565b90508260200151955061132d565b85836020015161132a91906141c3565b91505b5f88815260028501602090815260408083206001600160a01b038b168085529083529281902060010185905580518981529182018590528a917f6769a5f9bfc8b6e0db839ab981cbf9239274ae72d2d035081a9157d43bd33cb6910160405180910390a380156113a1576113a13382611dca565b505060019092555050505050565b6113b7611e88565b6113c5848484846012611ed1565b610ad681611ef6565b7f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f0080546001190161141257604051633ee5aeb560e01b815260040160405180910390fd5b60029055565b5f5f805160206148ce83398151915290505f8280602001905181019061143e9190614218565b905060018151600481111561145557611455613eb6565b0361149d575f816020015180602001905181019061147391906142a0565b90505f61148587878460200151611f2c565b9050611494825f015182611dca565b50505050505050565b6002815160048111156114b2576114b2613eb6565b036115cb575f81602001518060200190518101906114d091906142d8565b90505f6114e287878460800151611f2c565b825190915087146115485760405162461bcd60e51b815260206004820152602a60248201527f546f6b656e486f6d653a206d69736d61746368656420736f7572636520626c6f60448201526918dad8da185a5b88125160b21b60648201526084016101b0565b856001600160a01b031682602001516001600160a01b0316146115c15760405162461bcd60e51b815260206004820152602b60248201527f546f6b656e486f6d653a206d69736d617463686564206f726967696e2073656e60448201526a646572206164647265737360a81b60648201526084016101b0565b6114948282611fb7565b6003815160048111156115e0576115e0613eb6565b036116b4575f81602001518060200190518101906115fe91906143a2565b90505f8061161688888560600151866080015161213d565b915091506116aa604051806101000160405280855f0151815260200185602001516001600160a01b0316815260200185604001516001600160a01b03168152602001876001015f9054906101000a90046001600160a01b03166001600160a01b031681526020018381526020015f81526020018560a0015181526020018560c001516001600160a01b0316815250836121e8565b5050505050505050565b6004815160048111156116c9576116c9613eb6565b036117c4575f81602001518060200190518101906116e7919061443b565b90505f806117008888856080015186610140015161213d565b915091506116aa8888855f01516040518061016001604052808860200151815260200188604001516001600160a01b0316815260200188606001516001600160a01b031681526020018860a00151815260200188610100015181526020018860c0015181526020018861012001516001600160a01b031681526020018860e001516001600160a01b031681526020018a6001015f9054906101000a90046001600160a01b03166001600160a01b031681526020018681526020015f81525086612373565b5f815160048111156117d8576117d8613eb6565b03611805575f81602001518060200190518101906117f69190614543565b9050611803868683612550565b505b5050505050565b5f7f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f005b6001905550565b60408101516001600160a01b03166118a35760405162461bcd60e51b815260206004820152602a60248201527f546f6b656e486f6d653a207a65726f20726563697069656e7420636f6e7472616044820152696374206164647265737360b01b60648201526084016101b0565b5f8160800151116118c65760405162461bcd60e51b81526004016101b0906145a5565b5f8160a00151116119255760405162461bcd60e51b815260206004820152602360248201527f546f6b656e486f6d653a207a65726f20726563697069656e7420676173206c696044820152621b5a5d60ea1b60648201526084016101b0565b80608001518160a001511061198b5760405162461bcd60e51b815260206004820152602660248201527f546f6b656e486f6d653a20696e76616c696420726563697069656e7420676173604482015265081b1a5b5a5d60d21b60648201526084016101b0565b60e08101516001600160a01b03166119f85760405162461bcd60e51b815260206004820152602a60248201527f546f6b656e486f6d653a207a65726f2066616c6c6261636b20726563697069656044820152696e74206164647265737360b01b60648201526084016101b0565b610140810151156107875760405162461bcd60e51b81526004016101b0906145e7565b5f8581525f8051602061490e833981519152602090815260408083206001600160a01b038816845282528083208151608081018352815460ff90811615158083526001840154958301959095526002830154938201939093526003909101549091161515606082015282915f805160206148ce8339815191529190611ab25760405162461bcd60e51b81526004016101b09061417a565b602081015115611b145760405162461bcd60e51b815260206004820152602760248201527f546f6b656e486f6d653a20636f6c6c61746572616c206e656564656420666f726044820152662072656d6f746560c81b60648201526084016101b0565b611b1d87611da4565b96508415611b3357611b30863387612957565b94505b5f611b47826040015183606001518a612ab0565b90505f8111611b985760405162461bcd60e51b815260206004820152601d60248201527f546f6b656e486f6d653a207a65726f207363616c656420616d6f756e7400000060448201526064016101b0565b5f8a815260038401602090815260408083206001600160a01b038d16845290915281208054839290611bcb908490614628565b90915550909a95995094975050505050505050565b5f80611bea612ac6565b60408401516020015190915015611c8f576040830151516001600160a01b0316611c6c5760405162461bcd60e51b815260206004820152602d60248201527f54656c65706f7274657252656769737472794170703a207a65726f206665652060448201526c746f6b656e206164647265737360981b60648201526084016101b0565b604083015160208101519051611c8f916001600160a01b03909116908390612bb6565b604051630624488560e41b81526001600160a01b03821690636244885090611cbb90869060040161463b565b6020604051808303815f875af1158015611cd7573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906107f79190613e15565b60408101516001600160a01b0316611d5f5760405162461bcd60e51b815260206004820152602160248201527f546f6b656e486f6d653a207a65726f20726563697069656e74206164647265736044820152607360f81b60648201526084016101b0565b5f8160c0015111611d825760405162461bcd60e51b81526004016101b0906145a5565b60a0810151156107875760405162461bcd60e51b81526004016101b0906145e7565b5f805160206148ee83398151915280545f91906107f7906001600160a01b031684612c3d565b6040518181525f805160206148ee833981519152906001600160a01b038416907f6352c5382c4a4578e712449ca65e83cdb392d045dfcf1cad9615189db2da244b9060200160405180910390a28054604051632e1a7d4d60e01b8152600481018490526001600160a01b0390911690632e1a7d4d906024015f604051808303815f87803b158015611e59575f80fd5b505af1158015611e6b573d5f803e3d5ffd5b50611e83925050506001600160a01b03841683612de2565b505050565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0054600160401b900460ff166107c457604051631afcd79f60e31b815260040160405180910390fd5b611ed9611e88565b611ee4858585612e75565b611eec612e90565b6118058282612ea0565b611efe611e88565b5f805160206148ee83398151915280546001600160a01b0319166001600160a01b0392909216919091179055565b5f8381525f8051602061490e833981519152602090815260408083206001600160a01b038616845282528083208151608081018352815460ff9081161515825260018301549482019490945260028201549281019290925260030154909116151560608201525f805160206148ce83398151915290611fad81878787613007565b9695505050505050565b5f5f805160206148ee8339815191528054604051632e1a7d4d60e01b8152600481018590529192506001600160a01b031690632e1a7d4d906024015f604051808303815f87803b158015612009575f80fd5b505af115801561201b573d5f803e3d5ffd5b50508451602086015160408088015160a089015191515f965061204495509091906024016146f2565b60408051601f198184030181529190526020810180516001600160e01b031663161b12ff60e11b17905260c085015160608601519192505f9161208a91908690856130f5565b905080156120de5784606001516001600160a01b03167f104deb555f67e63782bb817bc26c39050894645f9b9f29c4be8ae68d0e8b7ff4856040516120d191815260200190565b60405180910390a2611805565b84606001516001600160a01b03167fb9eaeae386d339f8115782f297a9e5f0e13fb587cd6b0d502f113cb8dd4d6cb08560405161211d91815260200190565b60405180910390a260e0850151611805906001600160a01b031685612de2565b5f8481525f8051602061490e833981519152602090815260408083206001600160a01b038716845282528083208151608081018352815460ff90811615158252600183015494820194909452600282015492810192909252600301549091161515606082015281905f805160206148ce83398151915290826121c1828a8a8a613007565b90505f6121d783604001518460600151896131c5565b919a91995090975050505050505050565b5f8051602061492e83398151915280546001146122175760405162461bcd60e51b81526004016101b090613e2c565b6002815561222483611cfb565b5f61223c845f015185602001518587608001516131d2565b9050805f03612259576122538460e0015184611dca565b5061236b565b604080518082019091525f908060018152602001604051806040016040528088604001516001600160a01b031681526020018581525060405160200161229f91906140d9565b60405160208183030381529060405281525090505f61232b6040518060c00160405280885f0151815260200188602001516001600160a01b0316815260200160405180604001604052808a606001516001600160a01b031681526020018a6080015181525081526020018860c0015181526020015f6001600160401b03811115610e8d57610e8d613b93565b9050807f825080857c76cef4a1629c0705a7f8b4ef0282ddcafde0b6715c4fb34b68aaf0878560405161235f9291906140f9565b60405180910390a25050505b600190555050565b5f8051602061492e83398151915280546001146123a25760405162461bcd60e51b81526004016101b090613e2c565b600281556123af83611836565b5f6123c8845f01518560200151858761012001516131d2565b9050805f036123e5576123df8460c0015184611dca565b50612545565b604080518082019091525f9080600281526020016040518061010001604052808b81526020018a6001600160a01b03168152602001896001600160a01b0316815260200188604001516001600160a01b03168152602001858152602001886060015181526020018860a0015181526020018860e001516001600160a01b03168152506040516020016124779190613f17565b60405160208183030381529060405281525090505f6125056040518060c00160405280885f0151815260200188602001516001600160a01b0316815260200160405180604001604052808a61010001516001600160a01b031681526020018a61012001518152508152602001886080015181526020015f6001600160401b03811115610e8d57610e8d613b93565b9050807f42eff9005856e3c586b096d67211a566dc926052119fd7cc08023c70937ecb308785604051612539929190613ff7565b60405180910390a25050505b600190555050505050565b5f805160206148ce833981519152836125b75760405162461bcd60e51b8152602060048201526024808201527f546f6b656e486f6d653a207a65726f2072656d6f746520626c6f636b636861696044820152631b88125160e21b60648201526084016101b0565b8054840361261f5760405162461bcd60e51b815260206004820152602f60248201527f546f6b656e486f6d653a2063616e6e6f742072656769737465722072656d6f7460448201526e329037b71039b0b6b29031b430b4b760891b60648201526084016101b0565b6001600160a01b03831661268e5760405162461bcd60e51b815260206004820152603060248201527f546f6b656e486f6d653a207a65726f2072656d6f746520746f6b656e2074726160448201526f6e73666572726572206164647265737360801b60648201526084016101b0565b5f84815260028201602090815260408083206001600160a01b038716845290915290205460ff161561270e5760405162461bcd60e51b8152602060048201526024808201527f546f6b656e486f6d653a2072656d6f746520616c726561647920726567697374604482015263195c995960e21b60648201526084016101b0565b6012826040015160ff1611156127785760405162461bcd60e51b815260206004820152602960248201527f546f6b656e486f6d653a2072656d6f746520746f6b656e20646563696d616c73604482015268040e8dede40d0d2ced60bb1b60648201526084016101b0565b6001810154602083015160ff908116600160a01b90920416146127ec5760405162461bcd60e51b815260206004820152602660248201527f546f6b656e486f6d653a20696e76616c696420686f6d6520746f6b656e20646560448201526563696d616c7360d01b60648201526084016101b0565b5f8061280d8360010160149054906101000a900460ff168560400151613343565b915091505f6128208383875f01516131c5565b905081801561283a57508451612837908490614737565b15155b1561284d5761284a600182614628565b90505b6040518060800160405280600115158152602001828152602001848152602001831515815250846002015f8981526020019081526020015f205f886001600160a01b03166001600160a01b031681526020019081526020015f205f820151815f015f6101000a81548160ff02191690831515021790555060208201518160010155604082015181600201556060820151816003015f6101000a81548160ff021916908315150217905550905050856001600160a01b0316877ff229b02a51a4c8d5ef03a096ae0dd727d7b48b710d21b50ebebb560eef739b9083886040015160405161294692919091825260ff16602082015260400190565b60405180910390a350505050505050565b6040516370a0823160e01b81523060048201525f9081906001600160a01b038616906370a0823190602401602060405180830381865afa15801561299d573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906129c19190613e15565b90506129d86001600160a01b03861685308661338b565b6040516370a0823160e01b81523060048201525f906001600160a01b038716906370a0823190602401602060405180830381865afa158015612a1c573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612a409190613e15565b9050818111612aa65760405162461bcd60e51b815260206004820152602c60248201527f5361666545524332305472616e7366657246726f6d3a2062616c616e6365206e60448201526b1bdd081a5b98dc99585cd95960a21b60648201526084016101b0565b611fad82826141c3565b5f612abe84848460016133f2565b949350505050565b5f8051602061494e83398151915280546040805163d820e64f60e01b815290515f939284926001600160a01b039091169163d820e64f916004808201926020929091908290030181865afa158015612b20573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612b44919061474a565b9050612b508282610b1e565b156105885760405162461bcd60e51b815260206004820152603060248201527f54656c65706f7274657252656769737472794170703a2054656c65706f72746560448201526f1c881cd95b991a5b99c81c185d5cd95960821b60648201526084016101b0565b604051636eb1769f60e11b81523060048201526001600160a01b0383811660248301525f919085169063dd62ed3e90604401602060405180830381865afa158015612c03573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612c279190613e15565b9050610ad68484612c388585614628565b613419565b6040516370a0823160e01b81523060048201525f9081906001600160a01b038516906370a0823190602401602060405180830381865afa158015612c83573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612ca79190613e15565b9050836001600160a01b031663d0e30db0846040518263ffffffff1660e01b81526004015f604051808303818588803b158015612ce2575f80fd5b505af1158015612cf4573d5f803e3d5ffd5b50506040516370a0823160e01b81523060048201525f93506001600160a01b03881692506370a082319150602401602060405180830381865afa158015612d3d573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612d619190613e15565b9050818111612dcf5760405162461bcd60e51b815260206004820152603460248201527f53616665577261707065644e6174697665546f6b656e4465706f7369743a2062604482015273185b185b98d9481b9bdd081a5b98dc99585cd95960621b60648201526084016101b0565b612dd982826141c3565b95945050505050565b80471015612e055760405163cd78605960e01b81523060048201526024016101b0565b5f826001600160a01b0316826040515f6040518083038185875af1925050503d805f8114612e4e576040519150601f19603f3d011682016040523d82523d5f602084013e612e53565b606091505b5050905080611e8357604051630a12f52160e11b815260040160405180910390fd5b612e7d611e88565b612e8783826134a8565b611e83826134ca565b612e98611e88565b6107c46134db565b612ea8611e88565b6001600160a01b038216612efe5760405162461bcd60e51b815260206004820152601d60248201527f546f6b656e486f6d653a207a65726f20746f6b656e206164647265737300000060448201526064016101b0565b60128160ff161115612f5d5760405162461bcd60e51b815260206004820152602260248201527f546f6b656e486f6d653a20746f6b656e20646563696d616c7320746f6f2068696044820152610ced60f31b60648201526084016101b0565b5f5f805160206148ce83398151915290506005600160991b016001600160a01b0316634213cf786040518163ffffffff1660e01b8152600401602060405180830381865afa158015612fb1573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612fd59190613e15565b8155600101805460ff909216600160a01b026001600160a81b03199092166001600160a01b0390931692909217179055565b83515f906130275760405162461bcd60e51b81526004016101b09061417a565b6020850151156130855760405162461bcd60e51b8152602060048201526024808201527f546f6b656e486f6d653a2072656d6f7465206e6f7420636f6c6c61746572616c6044820152631a5e995960e21b60648201526084016101b0565b6130908484846134ef565b5f6130a486604001518760600151856131c5565b90505f8111612dd95760405162461bcd60e51b815260206004820152601c60248201527f546f6b656e486f6d653a207a65726f20746f6b656e20616d6f756e740000000060448201526064016101b0565b5f845a10156131465760405162461bcd60e51b815260206004820152601b60248201527f43616c6c5574696c733a20696e73756666696369656e7420676173000000000060448201526064016101b0565b834710156131965760405162461bcd60e51b815260206004820152601d60248201527f43616c6c5574696c733a20696e73756666696369656e742076616c756500000060448201526064016101b0565b826001600160a01b03163b5f036131ae57505f612abe565b5f805f84516020860188888bf19695505050505050565b5f612abe8484845f6133f2565b5f8481525f8051602061490e833981519152602090815260408083206001600160a01b038716845282528083208151608081018352815460ff9081161580158352600184015495830195909552600283015493820193909352600390910154909116151560608201525f805160206148ce833981519152918061325857505f8160200151115b15613267575f92505050612abe565b8385116132cb5760405162461bcd60e51b815260206004820152602c60248201527f546f6b656e486f6d653a20696e73756666696369656e7420616d6f756e74207460448201526b6f20636f766572206665657360a01b60648201526084016101b0565b6132d584866141c3565b94505f6132eb8260400151836060015188612ab0565b9050805f036132ff575f9350505050612abe565b5f88815260038401602090815260408083206001600160a01b038b16845290915281208054839290613332908490614628565b909155509098975050505050505050565b5f8060ff8085169084161181816133665761335e8587614765565b60ff16613374565b6133708686614765565b60ff165b61337f90600a61485e565b96919550909350505050565b6040516001600160a01b038481166024830152838116604483015260648201839052610ad69186918216906323b872dd906084015b604051602081830303815290604052915060e01b6020820180516001600160e01b0383818316178352505050506135dc565b5f8115158415150361340f576134088584614869565b9050612abe565b612dd98584614880565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663095ea7b360e01b17905261346a848261363d565b610ad6576040516001600160a01b0384811660248301525f604483015261349e91869182169063095ea7b3906064016133c0565b610ad684826135dc565b6134b0611e88565b6134b86136da565b6134c06136ea565b61080982826136f2565b6134d2611e88565b61078781613876565b5f5f8051602061492e83398151915261182f565b5f8381527f9316912b5a9db88acbe872c934fdd0a46c436c6dcba332d649c4d57c7bc9e603602090815260408083206001600160a01b03861684529091529020545f805160206148ce83398151915290828110156135a65760405162461bcd60e51b815260206004820152602e60248201527f546f6b656e486f6d653a20696e73756666696369656e7420746f6b656e20747260448201526d616e736665722062616c616e636560901b60648201526084016101b0565b6135b083826141c3565b5f9586526003909201602090815260408087206001600160a01b03909616875294905250919092205550565b5f6135f06001600160a01b0384168361387e565b905080515f141580156136145750808060200190518101906136129190614893565b155b15611e8357604051635274afe760e01b81526001600160a01b03841660048201526024016101b0565b5f805f846001600160a01b03168460405161365891906148b2565b5f604051808303815f865af19150503d805f8114613691576040519150601f19603f3d011682016040523d82523d5f602084013e613696565b606091505b50915091508180156136c05750805115806136c05750808060200190518101906136c09190614893565b8015612dd95750505050506001600160a01b03163b151590565b6136e2611e88565b6107c461388b565b6107c4611e88565b6136fa611e88565b6001600160a01b0382166137765760405162461bcd60e51b815260206004820152603760248201527f54656c65706f7274657252656769737472794170703a207a65726f2054656c6560448201527f706f72746572207265676973747279206164647265737300000000000000000060648201526084016101b0565b5f5f8051602061494e83398151915290505f8390505f816001600160a01b031663c07f47d46040518163ffffffff1660e01b8152600401602060405180830381865afa1580156137c8573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906137ec9190613e15565b116138545760405162461bcd60e51b815260206004820152603260248201527f54656c65706f7274657252656769737472794170703a20696e76616c69642054604482015271656c65706f7274657220726567697374727960701b60648201526084016101b0565b81546001600160a01b0319166001600160a01b038216178255610ad683610b3f565b610ae4611e88565b60606107f783835f613893565b61180c611e88565b6060814710156138b85760405163cd78605960e01b81523060048201526024016101b0565b5f80856001600160a01b031684866040516138d391906148b2565b5f6040518083038185875af1925050503d805f811461390d576040519150601f19603f3d011682016040523d82523d5f602084013e613912565b606091505b5091509150611fad8683836060826139325761392d82613979565b6107f7565b815115801561394957506001600160a01b0384163b155b1561397257604051639996b31560e01b81526001600160a01b03851660048201526024016101b0565b50806107f7565b8051156139895780518082602001fd5b604051630a12f52160e11b815260040160405180910390fd5b6001600160a01b0381168114610787575f80fd5b80356139c1816139a2565b919050565b5f80604083850312156139d7575f80fd5b8235915060208301356139e9816139a2565b809150509250929050565b5f60208284031215613a04575f80fd5b81356107f7816139a2565b5f60208284031215613a1f575f80fd5b5035919050565b5f60208284031215613a36575f80fd5b81356001600160401b03811115613a4b575f80fd5b820161016081850312156107f7575f80fd5b5f6101008284031215613a6e575f80fd5b50919050565b5f805f8060808587031215613a87575f80fd5b8435613a92816139a2565b93506020850135613aa2816139a2565b9250604085013591506060850135613ab9816139a2565b939692955090935050565b5f805f8060608587031215613ad7575f80fd5b843593506020850135613ae9816139a2565b925060408501356001600160401b0380821115613b04575f80fd5b818701915087601f830112613b17575f80fd5b813581811115613b25575f80fd5b886020828501011115613b36575f80fd5b95989497505060200194505050565b6020808252602e908201527f54656c65706f7274657252656769737472794170703a207a65726f2054656c6560408201526d706f72746572206164647265737360901b606082015260800190565b634e487b7160e01b5f52604160045260245ffd5b60405161016081016001600160401b0381118282101715613bca57613bca613b93565b60405290565b60405161010081016001600160401b0381118282101715613bca57613bca613b93565b604080519081016001600160401b0381118282101715613bca57613bca613b93565b604051601f8201601f191681016001600160401b0381118282101715613c3d57613c3d613b93565b604052919050565b5f6001600160401b03821115613c5d57613c5d613b93565b50601f01601f191660200190565b5f82601f830112613c7a575f80fd5b8135613c8d613c8882613c45565b613c15565b818152846020838601011115613ca1575f80fd5b816020850160208301375f918101602001919091529392505050565b5f6101608236031215613cce575f80fd5b613cd6613ba7565b82358152613ce6602084016139b6565b6020820152613cf7604084016139b6565b604082015260608301356001600160401b03811115613d14575f80fd5b613d2036828601613c6b565b6060830152506080830135608082015260a083013560a0820152613d4660c084016139b6565b60c0820152613d5760e084016139b6565b60e0820152610100613d6a8185016139b6565b90820152610120838101359082015261014092830135928101929092525090565b5f6101008284031215613d9c575f80fd5b613da4613bd0565b823581526020830135613db6816139a2565b60208201526040830135613dc9816139a2565b6040820152613dda606084016139b6565b60608201526080830135608082015260a083013560a082015260c083013560c0820152613e0960e084016139b6565b60e08201529392505050565b5f60208284031215613e25575f80fd5b5051919050565b60208082526024908201527f53656e645265656e7472616e637947756172643a2073656e64207265656e7472604082015263616e637960e01b606082015260800190565b60208082526026908201527f546f6b656e486f6d653a206e6f6e2d7a65726f206d756c74692d686f702066616040820152656c6c6261636b60d01b606082015260800190565b634e487b7160e01b5f52602160045260245ffd5b5f5b83811015613ee4578181015183820152602001613ecc565b50505f910152565b5f8151808452613f03816020860160208601613eca565b601f01601f19169290920160200192915050565b60208152815160208201525f602083015160018060a01b03808216604085015280604086015116606085015250506060830151613f5f60808401826001600160a01b03169052565b50608083015160a083015260a08301516101008060c0850152613f86610120850183613eec565b915060c085015160e085015260e0850151613fab828601826001600160a01b03169052565b5090949350505050565b602081525f825160058110613fd857634e487b7160e01b5f52602160045260245ffd5b806020840152506020830151604080840152612abe6060840182613eec565b60408152825160408201525f602084015161401d60608401826001600160a01b03169052565b5060408401516001600160a01b03166080830152606084015161016060a0840181905261404e6101a0850183613eec565b9150608086015160c085015260a086015160e085015260c0860151610100614080818701836001600160a01b03169052565b60e0880151915061012061409e818801846001600160a01b03169052565b908801519150610140906140bc878301846001600160a01b03169052565b880151928601929092525090940151610180830152506020015290565b81516001600160a01b031681526020808301519082015260408101610588565b5f6101208201905083518252602084015160018060a01b03808216602085015280604087015116604085015280606087015116606085015250506080840151608083015260a084015160a083015260c084015160c083015260e084015161416b60e08401826001600160a01b03169052565b50826101008301529392505050565b6020808252818101527f546f6b656e486f6d653a2072656d6f7465206e6f742072656769737465726564604082015260600190565b634e487b7160e01b5f52601160045260245ffd5b81810381811115610588576105886141af565b5f82601f8301126141e5575f80fd5b81516141f3613c8882613c45565b818152846020838601011115614207575f80fd5b612abe826020830160208701613eca565b5f60208284031215614228575f80fd5b81516001600160401b038082111561423e575f80fd5b9083019060408286031215614251575f80fd5b614259613bf3565b825160058110614267575f80fd5b815260208301518281111561427a575f80fd5b614286878286016141d6565b60208301525095945050505050565b80516139c1816139a2565b5f604082840312156142b0575f80fd5b6142b8613bf3565b82516142c3816139a2565b81526020928301519281019290925250919050565b5f602082840312156142e8575f80fd5b81516001600160401b03808211156142fe575f80fd5b908301906101008286031215614312575f80fd5b61431a613bd0565b8251815261432a60208401614295565b602082015261433b60408401614295565b604082015261434c60608401614295565b60608201526080830151608082015260a08301518281111561436c575f80fd5b614378878286016141d6565b60a08301525060c083015160c082015261439460e08401614295565b60e082015295945050505050565b5f60e082840312156143b2575f80fd5b60405160e081018181106001600160401b03821117156143d4576143d4613b93565b6040528251815260208301516143e9816139a2565b602082015260408301516143fc816139a2565b80604083015250606083015160608201526080830151608082015260a083015160a082015260c083015161442f816139a2565b60c08201529392505050565b5f6020828403121561444b575f80fd5b81516001600160401b0380821115614461575f80fd5b908301906101608286031215614475575f80fd5b61447d613ba7565b61448683614295565b81526020830151602082015261449e60408401614295565b60408201526144af60608401614295565b60608201526080830151608082015260a0830151828111156144cf575f80fd5b6144db878286016141d6565b60a08301525060c083015160c08201526144f760e08401614295565b60e082015261010083810151908201526101209150614517828401614295565b9181019190915261014091820151918101919091529392505050565b805160ff811681146139c1575f80fd5b5f60608284031215614553575f80fd5b604051606081018181106001600160401b038211171561457557614575613b93565b6040528251815261458860208401614533565b602082015261459960408401614533565b60408201529392505050565b60208082526022908201527f546f6b656e486f6d653a207a65726f20726571756972656420676173206c696d6040820152611a5d60f21b606082015260800190565b60208082526021908201527f546f6b656e486f6d653a206e6f6e2d7a65726f207365636f6e646172792066656040820152606560f81b606082015260800190565b80820180821115610588576105886141af565b6020808252825182820152828101516001600160a01b039081166040808501919091528401518051821660608501528083015160808501525f929161010085019190606087015160a0870152608087015160e060c08801528051938490528401925f92506101208701905b808410156146c8578451831682529385019360019390930192908501906146a6565b5060a0880151878203601f190160e089015294506146e68186613eec565b98975050505050505050565b8481526001600160a01b038481166020830152831660408201526080606082018190525f90611fad90830184613eec565b634e487b7160e01b5f52601260045260245ffd5b5f8261474557614745614723565b500690565b5f6020828403121561475a575f80fd5b81516107f7816139a2565b60ff8281168282160390811115610588576105886141af565b600181815b808511156147b857815f190482111561479e5761479e6141af565b808516156147ab57918102915b93841c9390800290614783565b509250929050565b5f826147ce57506001610588565b816147da57505f610588565b81600181146147f057600281146147fa57614816565b6001915050610588565b60ff84111561480b5761480b6141af565b50506001821b610588565b5060208310610133831016604e8410600b8410161715614839575081810a610588565b614843838361477e565b805f1904821115614856576148566141af565b029392505050565b5f6107f783836147c0565b8082028115828204841417610588576105886141af565b5f8261488e5761488e614723565b500490565b5f602082840312156148a3575f80fd5b815180151581146107f7575f80fd5b5f82516148c3818460208701613eca565b919091019291505056fe9316912b5a9db88acbe872c934fdd0a46c436c6dcba332d649c4d57c7bc9e6003b5030f10c94fcbdaa3022348ff0b82dbd4c0c71339e41ff59d0bdc92179d6009316912b5a9db88acbe872c934fdd0a46c436c6dcba332d649c4d57c7bc9e602d2f1ed38b7d242bfb8b41862afb813a15193219a4bc717f2056607593e6c7500de77a4dc7391f6f8f2d9567915d687d3aee79e7a1fc7300392f2727e9a0f1d00a2646970667358221220ea0a0e226fbb749e1d4c289c6fd2e9df065bea3446e4cea0074b08c1923e56eb64736f6c6343000819003354656c65706f7274657252656769737472794170703a20696e76616c69642054", +} + +// NativeTokenHomeABI is the input ABI used to generate the binding from. +// Deprecated: Use NativeTokenHomeMetaData.ABI instead. +var NativeTokenHomeABI = NativeTokenHomeMetaData.ABI + +// NativeTokenHomeBin is the compiled bytecode used for deploying new contracts. +// Deprecated: Use NativeTokenHomeMetaData.Bin instead. +var NativeTokenHomeBin = NativeTokenHomeMetaData.Bin + +// DeployNativeTokenHome deploys a new Ethereum contract, binding an instance of NativeTokenHome to it. +func DeployNativeTokenHome(auth *bind.TransactOpts, backend bind.ContractBackend, teleporterRegistryAddress common.Address, teleporterManager common.Address, minTeleporterVersion *big.Int, wrappedTokenAddress common.Address) (common.Address, *types.Transaction, *NativeTokenHome, error) { + parsed, err := NativeTokenHomeMetaData.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(NativeTokenHomeBin), backend, teleporterRegistryAddress, teleporterManager, minTeleporterVersion, wrappedTokenAddress) + if err != nil { + return common.Address{}, nil, nil, err + } + return address, tx, &NativeTokenHome{NativeTokenHomeCaller: NativeTokenHomeCaller{contract: contract}, NativeTokenHomeTransactor: NativeTokenHomeTransactor{contract: contract}, NativeTokenHomeFilterer: NativeTokenHomeFilterer{contract: contract}}, nil +} + +// NativeTokenHome is an auto generated Go binding around an Ethereum contract. +type NativeTokenHome struct { + NativeTokenHomeCaller // Read-only binding to the contract + NativeTokenHomeTransactor // Write-only binding to the contract + NativeTokenHomeFilterer // Log filterer for contract events +} + +// NativeTokenHomeCaller is an auto generated read-only Go binding around an Ethereum contract. +type NativeTokenHomeCaller struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// NativeTokenHomeTransactor is an auto generated write-only Go binding around an Ethereum contract. +type NativeTokenHomeTransactor struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// NativeTokenHomeFilterer is an auto generated log filtering Go binding around an Ethereum contract events. +type NativeTokenHomeFilterer struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// NativeTokenHomeSession is an auto generated Go binding around an Ethereum contract, +// with pre-set call and transact options. +type NativeTokenHomeSession struct { + Contract *NativeTokenHome // 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 +} + +// NativeTokenHomeCallerSession is an auto generated read-only Go binding around an Ethereum contract, +// with pre-set call options. +type NativeTokenHomeCallerSession struct { + Contract *NativeTokenHomeCaller // Generic contract caller binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session +} + +// NativeTokenHomeTransactorSession is an auto generated write-only Go binding around an Ethereum contract, +// with pre-set transact options. +type NativeTokenHomeTransactorSession struct { + Contract *NativeTokenHomeTransactor // Generic contract transactor binding to set the session for + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// NativeTokenHomeRaw is an auto generated low-level Go binding around an Ethereum contract. +type NativeTokenHomeRaw struct { + Contract *NativeTokenHome // Generic contract binding to access the raw methods on +} + +// NativeTokenHomeCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. +type NativeTokenHomeCallerRaw struct { + Contract *NativeTokenHomeCaller // Generic read-only contract binding to access the raw methods on +} + +// NativeTokenHomeTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. +type NativeTokenHomeTransactorRaw struct { + Contract *NativeTokenHomeTransactor // Generic write-only contract binding to access the raw methods on +} + +// NewNativeTokenHome creates a new instance of NativeTokenHome, bound to a specific deployed contract. +func NewNativeTokenHome(address common.Address, backend bind.ContractBackend) (*NativeTokenHome, error) { + contract, err := bindNativeTokenHome(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &NativeTokenHome{NativeTokenHomeCaller: NativeTokenHomeCaller{contract: contract}, NativeTokenHomeTransactor: NativeTokenHomeTransactor{contract: contract}, NativeTokenHomeFilterer: NativeTokenHomeFilterer{contract: contract}}, nil +} + +// NewNativeTokenHomeCaller creates a new read-only instance of NativeTokenHome, bound to a specific deployed contract. +func NewNativeTokenHomeCaller(address common.Address, caller bind.ContractCaller) (*NativeTokenHomeCaller, error) { + contract, err := bindNativeTokenHome(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &NativeTokenHomeCaller{contract: contract}, nil +} + +// NewNativeTokenHomeTransactor creates a new write-only instance of NativeTokenHome, bound to a specific deployed contract. +func NewNativeTokenHomeTransactor(address common.Address, transactor bind.ContractTransactor) (*NativeTokenHomeTransactor, error) { + contract, err := bindNativeTokenHome(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &NativeTokenHomeTransactor{contract: contract}, nil +} + +// NewNativeTokenHomeFilterer creates a new log filterer instance of NativeTokenHome, bound to a specific deployed contract. +func NewNativeTokenHomeFilterer(address common.Address, filterer bind.ContractFilterer) (*NativeTokenHomeFilterer, error) { + contract, err := bindNativeTokenHome(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &NativeTokenHomeFilterer{contract: contract}, nil +} + +// bindNativeTokenHome binds a generic wrapper to an already deployed contract. +func bindNativeTokenHome(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := NativeTokenHomeMetaData.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 (_NativeTokenHome *NativeTokenHomeRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _NativeTokenHome.Contract.NativeTokenHomeCaller.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 (_NativeTokenHome *NativeTokenHomeRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _NativeTokenHome.Contract.NativeTokenHomeTransactor.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_NativeTokenHome *NativeTokenHomeRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _NativeTokenHome.Contract.NativeTokenHomeTransactor.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 (_NativeTokenHome *NativeTokenHomeCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _NativeTokenHome.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 (_NativeTokenHome *NativeTokenHomeTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _NativeTokenHome.Contract.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_NativeTokenHome *NativeTokenHomeTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _NativeTokenHome.Contract.contract.Transact(opts, method, params...) +} + +// NATIVETOKENHOMESTORAGELOCATION is a free data retrieval call binding the contract method 0xefb5b95e. +// +// Solidity: function NATIVE_TOKEN_HOME_STORAGE_LOCATION() view returns(bytes32) +func (_NativeTokenHome *NativeTokenHomeCaller) NATIVETOKENHOMESTORAGELOCATION(opts *bind.CallOpts) ([32]byte, error) { + var out []interface{} + err := _NativeTokenHome.contract.Call(opts, &out, "NATIVE_TOKEN_HOME_STORAGE_LOCATION") + + if err != nil { + return *new([32]byte), err + } + + out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) + + return out0, err + +} + +// NATIVETOKENHOMESTORAGELOCATION is a free data retrieval call binding the contract method 0xefb5b95e. +// +// Solidity: function NATIVE_TOKEN_HOME_STORAGE_LOCATION() view returns(bytes32) +func (_NativeTokenHome *NativeTokenHomeSession) NATIVETOKENHOMESTORAGELOCATION() ([32]byte, error) { + return _NativeTokenHome.Contract.NATIVETOKENHOMESTORAGELOCATION(&_NativeTokenHome.CallOpts) +} + +// NATIVETOKENHOMESTORAGELOCATION is a free data retrieval call binding the contract method 0xefb5b95e. +// +// Solidity: function NATIVE_TOKEN_HOME_STORAGE_LOCATION() view returns(bytes32) +func (_NativeTokenHome *NativeTokenHomeCallerSession) NATIVETOKENHOMESTORAGELOCATION() ([32]byte, error) { + return _NativeTokenHome.Contract.NATIVETOKENHOMESTORAGELOCATION(&_NativeTokenHome.CallOpts) +} + +// TELEPORTERREGISTRYAPPSTORAGELOCATION is a free data retrieval call binding the contract method 0x909a6ac0. +// +// Solidity: function TELEPORTER_REGISTRY_APP_STORAGE_LOCATION() view returns(bytes32) +func (_NativeTokenHome *NativeTokenHomeCaller) TELEPORTERREGISTRYAPPSTORAGELOCATION(opts *bind.CallOpts) ([32]byte, error) { + var out []interface{} + err := _NativeTokenHome.contract.Call(opts, &out, "TELEPORTER_REGISTRY_APP_STORAGE_LOCATION") + + if err != nil { + return *new([32]byte), err + } + + out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) + + return out0, err + +} + +// TELEPORTERREGISTRYAPPSTORAGELOCATION is a free data retrieval call binding the contract method 0x909a6ac0. +// +// Solidity: function TELEPORTER_REGISTRY_APP_STORAGE_LOCATION() view returns(bytes32) +func (_NativeTokenHome *NativeTokenHomeSession) TELEPORTERREGISTRYAPPSTORAGELOCATION() ([32]byte, error) { + return _NativeTokenHome.Contract.TELEPORTERREGISTRYAPPSTORAGELOCATION(&_NativeTokenHome.CallOpts) +} + +// TELEPORTERREGISTRYAPPSTORAGELOCATION is a free data retrieval call binding the contract method 0x909a6ac0. +// +// Solidity: function TELEPORTER_REGISTRY_APP_STORAGE_LOCATION() view returns(bytes32) +func (_NativeTokenHome *NativeTokenHomeCallerSession) TELEPORTERREGISTRYAPPSTORAGELOCATION() ([32]byte, error) { + return _NativeTokenHome.Contract.TELEPORTERREGISTRYAPPSTORAGELOCATION(&_NativeTokenHome.CallOpts) +} + +// TOKENHOMESTORAGELOCATION is a free data retrieval call binding the contract method 0x62e3901b. +// +// Solidity: function TOKEN_HOME_STORAGE_LOCATION() view returns(bytes32) +func (_NativeTokenHome *NativeTokenHomeCaller) TOKENHOMESTORAGELOCATION(opts *bind.CallOpts) ([32]byte, error) { + var out []interface{} + err := _NativeTokenHome.contract.Call(opts, &out, "TOKEN_HOME_STORAGE_LOCATION") + + if err != nil { + return *new([32]byte), err + } + + out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) + + return out0, err + +} + +// TOKENHOMESTORAGELOCATION is a free data retrieval call binding the contract method 0x62e3901b. +// +// Solidity: function TOKEN_HOME_STORAGE_LOCATION() view returns(bytes32) +func (_NativeTokenHome *NativeTokenHomeSession) TOKENHOMESTORAGELOCATION() ([32]byte, error) { + return _NativeTokenHome.Contract.TOKENHOMESTORAGELOCATION(&_NativeTokenHome.CallOpts) +} + +// TOKENHOMESTORAGELOCATION is a free data retrieval call binding the contract method 0x62e3901b. +// +// Solidity: function TOKEN_HOME_STORAGE_LOCATION() view returns(bytes32) +func (_NativeTokenHome *NativeTokenHomeCallerSession) TOKENHOMESTORAGELOCATION() ([32]byte, error) { + return _NativeTokenHome.Contract.TOKENHOMESTORAGELOCATION(&_NativeTokenHome.CallOpts) +} + +// GetBlockchainID is a free data retrieval call binding the contract method 0x4213cf78. +// +// Solidity: function getBlockchainID() view returns(bytes32) +func (_NativeTokenHome *NativeTokenHomeCaller) GetBlockchainID(opts *bind.CallOpts) ([32]byte, error) { + var out []interface{} + err := _NativeTokenHome.contract.Call(opts, &out, "getBlockchainID") + + if err != nil { + return *new([32]byte), err + } + + out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) + + return out0, err + +} + +// GetBlockchainID is a free data retrieval call binding the contract method 0x4213cf78. +// +// Solidity: function getBlockchainID() view returns(bytes32) +func (_NativeTokenHome *NativeTokenHomeSession) GetBlockchainID() ([32]byte, error) { + return _NativeTokenHome.Contract.GetBlockchainID(&_NativeTokenHome.CallOpts) +} + +// GetBlockchainID is a free data retrieval call binding the contract method 0x4213cf78. +// +// Solidity: function getBlockchainID() view returns(bytes32) +func (_NativeTokenHome *NativeTokenHomeCallerSession) GetBlockchainID() ([32]byte, error) { + return _NativeTokenHome.Contract.GetBlockchainID(&_NativeTokenHome.CallOpts) +} + +// GetMinTeleporterVersion is a free data retrieval call binding the contract method 0xd2cc7a70. +// +// Solidity: function getMinTeleporterVersion() view returns(uint256) +func (_NativeTokenHome *NativeTokenHomeCaller) GetMinTeleporterVersion(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _NativeTokenHome.contract.Call(opts, &out, "getMinTeleporterVersion") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// GetMinTeleporterVersion is a free data retrieval call binding the contract method 0xd2cc7a70. +// +// Solidity: function getMinTeleporterVersion() view returns(uint256) +func (_NativeTokenHome *NativeTokenHomeSession) GetMinTeleporterVersion() (*big.Int, error) { + return _NativeTokenHome.Contract.GetMinTeleporterVersion(&_NativeTokenHome.CallOpts) +} + +// GetMinTeleporterVersion is a free data retrieval call binding the contract method 0xd2cc7a70. +// +// Solidity: function getMinTeleporterVersion() view returns(uint256) +func (_NativeTokenHome *NativeTokenHomeCallerSession) GetMinTeleporterVersion() (*big.Int, error) { + return _NativeTokenHome.Contract.GetMinTeleporterVersion(&_NativeTokenHome.CallOpts) +} + +// GetRemoteTokenTransferrerSettings is a free data retrieval call binding the contract method 0xc8511ada. +// +// Solidity: function getRemoteTokenTransferrerSettings(bytes32 remoteBlockchainID, address remoteTokenTransferrerAddress) view returns((bool,uint256,uint256,bool)) +func (_NativeTokenHome *NativeTokenHomeCaller) GetRemoteTokenTransferrerSettings(opts *bind.CallOpts, remoteBlockchainID [32]byte, remoteTokenTransferrerAddress common.Address) (RemoteTokenTransferrerSettings, error) { + var out []interface{} + err := _NativeTokenHome.contract.Call(opts, &out, "getRemoteTokenTransferrerSettings", remoteBlockchainID, remoteTokenTransferrerAddress) + + if err != nil { + return *new(RemoteTokenTransferrerSettings), err + } + + out0 := *abi.ConvertType(out[0], new(RemoteTokenTransferrerSettings)).(*RemoteTokenTransferrerSettings) + + return out0, err + +} + +// GetRemoteTokenTransferrerSettings is a free data retrieval call binding the contract method 0xc8511ada. +// +// Solidity: function getRemoteTokenTransferrerSettings(bytes32 remoteBlockchainID, address remoteTokenTransferrerAddress) view returns((bool,uint256,uint256,bool)) +func (_NativeTokenHome *NativeTokenHomeSession) GetRemoteTokenTransferrerSettings(remoteBlockchainID [32]byte, remoteTokenTransferrerAddress common.Address) (RemoteTokenTransferrerSettings, error) { + return _NativeTokenHome.Contract.GetRemoteTokenTransferrerSettings(&_NativeTokenHome.CallOpts, remoteBlockchainID, remoteTokenTransferrerAddress) +} + +// GetRemoteTokenTransferrerSettings is a free data retrieval call binding the contract method 0xc8511ada. +// +// Solidity: function getRemoteTokenTransferrerSettings(bytes32 remoteBlockchainID, address remoteTokenTransferrerAddress) view returns((bool,uint256,uint256,bool)) +func (_NativeTokenHome *NativeTokenHomeCallerSession) GetRemoteTokenTransferrerSettings(remoteBlockchainID [32]byte, remoteTokenTransferrerAddress common.Address) (RemoteTokenTransferrerSettings, error) { + return _NativeTokenHome.Contract.GetRemoteTokenTransferrerSettings(&_NativeTokenHome.CallOpts, remoteBlockchainID, remoteTokenTransferrerAddress) +} + +// GetTokenAddress is a free data retrieval call binding the contract method 0x10fe9ae8. +// +// Solidity: function getTokenAddress() view returns(address) +func (_NativeTokenHome *NativeTokenHomeCaller) GetTokenAddress(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _NativeTokenHome.contract.Call(opts, &out, "getTokenAddress") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// GetTokenAddress is a free data retrieval call binding the contract method 0x10fe9ae8. +// +// Solidity: function getTokenAddress() view returns(address) +func (_NativeTokenHome *NativeTokenHomeSession) GetTokenAddress() (common.Address, error) { + return _NativeTokenHome.Contract.GetTokenAddress(&_NativeTokenHome.CallOpts) +} + +// GetTokenAddress is a free data retrieval call binding the contract method 0x10fe9ae8. +// +// Solidity: function getTokenAddress() view returns(address) +func (_NativeTokenHome *NativeTokenHomeCallerSession) GetTokenAddress() (common.Address, error) { + return _NativeTokenHome.Contract.GetTokenAddress(&_NativeTokenHome.CallOpts) +} + +// GetTransferredBalance is a free data retrieval call binding the contract method 0x154d625a. +// +// Solidity: function getTransferredBalance(bytes32 remoteBlockchainID, address remoteTokenTransferrerAddress) view returns(uint256) +func (_NativeTokenHome *NativeTokenHomeCaller) GetTransferredBalance(opts *bind.CallOpts, remoteBlockchainID [32]byte, remoteTokenTransferrerAddress common.Address) (*big.Int, error) { + var out []interface{} + err := _NativeTokenHome.contract.Call(opts, &out, "getTransferredBalance", remoteBlockchainID, remoteTokenTransferrerAddress) + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// GetTransferredBalance is a free data retrieval call binding the contract method 0x154d625a. +// +// Solidity: function getTransferredBalance(bytes32 remoteBlockchainID, address remoteTokenTransferrerAddress) view returns(uint256) +func (_NativeTokenHome *NativeTokenHomeSession) GetTransferredBalance(remoteBlockchainID [32]byte, remoteTokenTransferrerAddress common.Address) (*big.Int, error) { + return _NativeTokenHome.Contract.GetTransferredBalance(&_NativeTokenHome.CallOpts, remoteBlockchainID, remoteTokenTransferrerAddress) +} + +// GetTransferredBalance is a free data retrieval call binding the contract method 0x154d625a. +// +// Solidity: function getTransferredBalance(bytes32 remoteBlockchainID, address remoteTokenTransferrerAddress) view returns(uint256) +func (_NativeTokenHome *NativeTokenHomeCallerSession) GetTransferredBalance(remoteBlockchainID [32]byte, remoteTokenTransferrerAddress common.Address) (*big.Int, error) { + return _NativeTokenHome.Contract.GetTransferredBalance(&_NativeTokenHome.CallOpts, remoteBlockchainID, remoteTokenTransferrerAddress) +} + +// IsTeleporterAddressPaused is a free data retrieval call binding the contract method 0x97314297. +// +// Solidity: function isTeleporterAddressPaused(address teleporterAddress) view returns(bool) +func (_NativeTokenHome *NativeTokenHomeCaller) IsTeleporterAddressPaused(opts *bind.CallOpts, teleporterAddress common.Address) (bool, error) { + var out []interface{} + err := _NativeTokenHome.contract.Call(opts, &out, "isTeleporterAddressPaused", teleporterAddress) + + if err != nil { + return *new(bool), err + } + + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + + return out0, err + +} + +// IsTeleporterAddressPaused is a free data retrieval call binding the contract method 0x97314297. +// +// Solidity: function isTeleporterAddressPaused(address teleporterAddress) view returns(bool) +func (_NativeTokenHome *NativeTokenHomeSession) IsTeleporterAddressPaused(teleporterAddress common.Address) (bool, error) { + return _NativeTokenHome.Contract.IsTeleporterAddressPaused(&_NativeTokenHome.CallOpts, teleporterAddress) +} + +// IsTeleporterAddressPaused is a free data retrieval call binding the contract method 0x97314297. +// +// Solidity: function isTeleporterAddressPaused(address teleporterAddress) view returns(bool) +func (_NativeTokenHome *NativeTokenHomeCallerSession) IsTeleporterAddressPaused(teleporterAddress common.Address) (bool, error) { + return _NativeTokenHome.Contract.IsTeleporterAddressPaused(&_NativeTokenHome.CallOpts, teleporterAddress) +} + +// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. +// +// Solidity: function owner() view returns(address) +func (_NativeTokenHome *NativeTokenHomeCaller) Owner(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _NativeTokenHome.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 (_NativeTokenHome *NativeTokenHomeSession) Owner() (common.Address, error) { + return _NativeTokenHome.Contract.Owner(&_NativeTokenHome.CallOpts) +} + +// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. +// +// Solidity: function owner() view returns(address) +func (_NativeTokenHome *NativeTokenHomeCallerSession) Owner() (common.Address, error) { + return _NativeTokenHome.Contract.Owner(&_NativeTokenHome.CallOpts) +} + +// AddCollateral is a paid mutator transaction binding the contract method 0xb0b78b26. +// +// Solidity: function addCollateral(bytes32 remoteBlockchainID, address remoteTokenTransferrerAddress) payable returns() +func (_NativeTokenHome *NativeTokenHomeTransactor) AddCollateral(opts *bind.TransactOpts, remoteBlockchainID [32]byte, remoteTokenTransferrerAddress common.Address) (*types.Transaction, error) { + return _NativeTokenHome.contract.Transact(opts, "addCollateral", remoteBlockchainID, remoteTokenTransferrerAddress) +} + +// AddCollateral is a paid mutator transaction binding the contract method 0xb0b78b26. +// +// Solidity: function addCollateral(bytes32 remoteBlockchainID, address remoteTokenTransferrerAddress) payable returns() +func (_NativeTokenHome *NativeTokenHomeSession) AddCollateral(remoteBlockchainID [32]byte, remoteTokenTransferrerAddress common.Address) (*types.Transaction, error) { + return _NativeTokenHome.Contract.AddCollateral(&_NativeTokenHome.TransactOpts, remoteBlockchainID, remoteTokenTransferrerAddress) +} + +// AddCollateral is a paid mutator transaction binding the contract method 0xb0b78b26. +// +// Solidity: function addCollateral(bytes32 remoteBlockchainID, address remoteTokenTransferrerAddress) payable returns() +func (_NativeTokenHome *NativeTokenHomeTransactorSession) AddCollateral(remoteBlockchainID [32]byte, remoteTokenTransferrerAddress common.Address) (*types.Transaction, error) { + return _NativeTokenHome.Contract.AddCollateral(&_NativeTokenHome.TransactOpts, remoteBlockchainID, remoteTokenTransferrerAddress) +} + +// Initialize is a paid mutator transaction binding the contract method 0xbe203094. +// +// Solidity: function initialize(address teleporterRegistryAddress, address teleporterManager, uint256 minTeleporterVersion, address wrappedTokenAddress) returns() +func (_NativeTokenHome *NativeTokenHomeTransactor) Initialize(opts *bind.TransactOpts, teleporterRegistryAddress common.Address, teleporterManager common.Address, minTeleporterVersion *big.Int, wrappedTokenAddress common.Address) (*types.Transaction, error) { + return _NativeTokenHome.contract.Transact(opts, "initialize", teleporterRegistryAddress, teleporterManager, minTeleporterVersion, wrappedTokenAddress) +} + +// Initialize is a paid mutator transaction binding the contract method 0xbe203094. +// +// Solidity: function initialize(address teleporterRegistryAddress, address teleporterManager, uint256 minTeleporterVersion, address wrappedTokenAddress) returns() +func (_NativeTokenHome *NativeTokenHomeSession) Initialize(teleporterRegistryAddress common.Address, teleporterManager common.Address, minTeleporterVersion *big.Int, wrappedTokenAddress common.Address) (*types.Transaction, error) { + return _NativeTokenHome.Contract.Initialize(&_NativeTokenHome.TransactOpts, teleporterRegistryAddress, teleporterManager, minTeleporterVersion, wrappedTokenAddress) +} + +// Initialize is a paid mutator transaction binding the contract method 0xbe203094. +// +// Solidity: function initialize(address teleporterRegistryAddress, address teleporterManager, uint256 minTeleporterVersion, address wrappedTokenAddress) returns() +func (_NativeTokenHome *NativeTokenHomeTransactorSession) Initialize(teleporterRegistryAddress common.Address, teleporterManager common.Address, minTeleporterVersion *big.Int, wrappedTokenAddress common.Address) (*types.Transaction, error) { + return _NativeTokenHome.Contract.Initialize(&_NativeTokenHome.TransactOpts, teleporterRegistryAddress, teleporterManager, minTeleporterVersion, wrappedTokenAddress) +} + +// PauseTeleporterAddress is a paid mutator transaction binding the contract method 0x2b0d8f18. +// +// Solidity: function pauseTeleporterAddress(address teleporterAddress) returns() +func (_NativeTokenHome *NativeTokenHomeTransactor) PauseTeleporterAddress(opts *bind.TransactOpts, teleporterAddress common.Address) (*types.Transaction, error) { + return _NativeTokenHome.contract.Transact(opts, "pauseTeleporterAddress", teleporterAddress) +} + +// PauseTeleporterAddress is a paid mutator transaction binding the contract method 0x2b0d8f18. +// +// Solidity: function pauseTeleporterAddress(address teleporterAddress) returns() +func (_NativeTokenHome *NativeTokenHomeSession) PauseTeleporterAddress(teleporterAddress common.Address) (*types.Transaction, error) { + return _NativeTokenHome.Contract.PauseTeleporterAddress(&_NativeTokenHome.TransactOpts, teleporterAddress) +} + +// PauseTeleporterAddress is a paid mutator transaction binding the contract method 0x2b0d8f18. +// +// Solidity: function pauseTeleporterAddress(address teleporterAddress) returns() +func (_NativeTokenHome *NativeTokenHomeTransactorSession) PauseTeleporterAddress(teleporterAddress common.Address) (*types.Transaction, error) { + return _NativeTokenHome.Contract.PauseTeleporterAddress(&_NativeTokenHome.TransactOpts, teleporterAddress) +} + +// ReceiveTeleporterMessage is a paid mutator transaction binding the contract method 0xc868efaa. +// +// Solidity: function receiveTeleporterMessage(bytes32 sourceBlockchainID, address originSenderAddress, bytes message) returns() +func (_NativeTokenHome *NativeTokenHomeTransactor) ReceiveTeleporterMessage(opts *bind.TransactOpts, sourceBlockchainID [32]byte, originSenderAddress common.Address, message []byte) (*types.Transaction, error) { + return _NativeTokenHome.contract.Transact(opts, "receiveTeleporterMessage", sourceBlockchainID, originSenderAddress, message) +} + +// ReceiveTeleporterMessage is a paid mutator transaction binding the contract method 0xc868efaa. +// +// Solidity: function receiveTeleporterMessage(bytes32 sourceBlockchainID, address originSenderAddress, bytes message) returns() +func (_NativeTokenHome *NativeTokenHomeSession) ReceiveTeleporterMessage(sourceBlockchainID [32]byte, originSenderAddress common.Address, message []byte) (*types.Transaction, error) { + return _NativeTokenHome.Contract.ReceiveTeleporterMessage(&_NativeTokenHome.TransactOpts, sourceBlockchainID, originSenderAddress, message) +} + +// ReceiveTeleporterMessage is a paid mutator transaction binding the contract method 0xc868efaa. +// +// Solidity: function receiveTeleporterMessage(bytes32 sourceBlockchainID, address originSenderAddress, bytes message) returns() +func (_NativeTokenHome *NativeTokenHomeTransactorSession) ReceiveTeleporterMessage(sourceBlockchainID [32]byte, originSenderAddress common.Address, message []byte) (*types.Transaction, error) { + return _NativeTokenHome.Contract.ReceiveTeleporterMessage(&_NativeTokenHome.TransactOpts, sourceBlockchainID, originSenderAddress, message) +} + +// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. +// +// Solidity: function renounceOwnership() returns() +func (_NativeTokenHome *NativeTokenHomeTransactor) RenounceOwnership(opts *bind.TransactOpts) (*types.Transaction, error) { + return _NativeTokenHome.contract.Transact(opts, "renounceOwnership") +} + +// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. +// +// Solidity: function renounceOwnership() returns() +func (_NativeTokenHome *NativeTokenHomeSession) RenounceOwnership() (*types.Transaction, error) { + return _NativeTokenHome.Contract.RenounceOwnership(&_NativeTokenHome.TransactOpts) +} + +// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. +// +// Solidity: function renounceOwnership() returns() +func (_NativeTokenHome *NativeTokenHomeTransactorSession) RenounceOwnership() (*types.Transaction, error) { + return _NativeTokenHome.Contract.RenounceOwnership(&_NativeTokenHome.TransactOpts) +} + +// Send is a paid mutator transaction binding the contract method 0x8bf2fa94. +// +// Solidity: function send((bytes32,address,address,address,uint256,uint256,uint256,address) input) payable returns() +func (_NativeTokenHome *NativeTokenHomeTransactor) Send(opts *bind.TransactOpts, input SendTokensInput) (*types.Transaction, error) { + return _NativeTokenHome.contract.Transact(opts, "send", input) +} + +// Send is a paid mutator transaction binding the contract method 0x8bf2fa94. +// +// Solidity: function send((bytes32,address,address,address,uint256,uint256,uint256,address) input) payable returns() +func (_NativeTokenHome *NativeTokenHomeSession) Send(input SendTokensInput) (*types.Transaction, error) { + return _NativeTokenHome.Contract.Send(&_NativeTokenHome.TransactOpts, input) +} + +// Send is a paid mutator transaction binding the contract method 0x8bf2fa94. +// +// Solidity: function send((bytes32,address,address,address,uint256,uint256,uint256,address) input) payable returns() +func (_NativeTokenHome *NativeTokenHomeTransactorSession) Send(input SendTokensInput) (*types.Transaction, error) { + return _NativeTokenHome.Contract.Send(&_NativeTokenHome.TransactOpts, input) +} + +// SendAndCall is a paid mutator transaction binding the contract method 0x6e6eef8d. +// +// Solidity: function sendAndCall((bytes32,address,address,bytes,uint256,uint256,address,address,address,uint256,uint256) input) payable returns() +func (_NativeTokenHome *NativeTokenHomeTransactor) SendAndCall(opts *bind.TransactOpts, input SendAndCallInput) (*types.Transaction, error) { + return _NativeTokenHome.contract.Transact(opts, "sendAndCall", input) +} + +// SendAndCall is a paid mutator transaction binding the contract method 0x6e6eef8d. +// +// Solidity: function sendAndCall((bytes32,address,address,bytes,uint256,uint256,address,address,address,uint256,uint256) input) payable returns() +func (_NativeTokenHome *NativeTokenHomeSession) SendAndCall(input SendAndCallInput) (*types.Transaction, error) { + return _NativeTokenHome.Contract.SendAndCall(&_NativeTokenHome.TransactOpts, input) +} + +// SendAndCall is a paid mutator transaction binding the contract method 0x6e6eef8d. +// +// Solidity: function sendAndCall((bytes32,address,address,bytes,uint256,uint256,address,address,address,uint256,uint256) input) payable returns() +func (_NativeTokenHome *NativeTokenHomeTransactorSession) SendAndCall(input SendAndCallInput) (*types.Transaction, error) { + return _NativeTokenHome.Contract.SendAndCall(&_NativeTokenHome.TransactOpts, input) +} + +// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// +// Solidity: function transferOwnership(address newOwner) returns() +func (_NativeTokenHome *NativeTokenHomeTransactor) TransferOwnership(opts *bind.TransactOpts, newOwner common.Address) (*types.Transaction, error) { + return _NativeTokenHome.contract.Transact(opts, "transferOwnership", newOwner) +} + +// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// +// Solidity: function transferOwnership(address newOwner) returns() +func (_NativeTokenHome *NativeTokenHomeSession) TransferOwnership(newOwner common.Address) (*types.Transaction, error) { + return _NativeTokenHome.Contract.TransferOwnership(&_NativeTokenHome.TransactOpts, newOwner) +} + +// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// +// Solidity: function transferOwnership(address newOwner) returns() +func (_NativeTokenHome *NativeTokenHomeTransactorSession) TransferOwnership(newOwner common.Address) (*types.Transaction, error) { + return _NativeTokenHome.Contract.TransferOwnership(&_NativeTokenHome.TransactOpts, newOwner) +} + +// UnpauseTeleporterAddress is a paid mutator transaction binding the contract method 0x4511243e. +// +// Solidity: function unpauseTeleporterAddress(address teleporterAddress) returns() +func (_NativeTokenHome *NativeTokenHomeTransactor) UnpauseTeleporterAddress(opts *bind.TransactOpts, teleporterAddress common.Address) (*types.Transaction, error) { + return _NativeTokenHome.contract.Transact(opts, "unpauseTeleporterAddress", teleporterAddress) +} + +// UnpauseTeleporterAddress is a paid mutator transaction binding the contract method 0x4511243e. +// +// Solidity: function unpauseTeleporterAddress(address teleporterAddress) returns() +func (_NativeTokenHome *NativeTokenHomeSession) UnpauseTeleporterAddress(teleporterAddress common.Address) (*types.Transaction, error) { + return _NativeTokenHome.Contract.UnpauseTeleporterAddress(&_NativeTokenHome.TransactOpts, teleporterAddress) +} + +// UnpauseTeleporterAddress is a paid mutator transaction binding the contract method 0x4511243e. +// +// Solidity: function unpauseTeleporterAddress(address teleporterAddress) returns() +func (_NativeTokenHome *NativeTokenHomeTransactorSession) UnpauseTeleporterAddress(teleporterAddress common.Address) (*types.Transaction, error) { + return _NativeTokenHome.Contract.UnpauseTeleporterAddress(&_NativeTokenHome.TransactOpts, teleporterAddress) +} + +// UpdateMinTeleporterVersion is a paid mutator transaction binding the contract method 0x5eb99514. +// +// Solidity: function updateMinTeleporterVersion(uint256 version) returns() +func (_NativeTokenHome *NativeTokenHomeTransactor) UpdateMinTeleporterVersion(opts *bind.TransactOpts, version *big.Int) (*types.Transaction, error) { + return _NativeTokenHome.contract.Transact(opts, "updateMinTeleporterVersion", version) +} + +// UpdateMinTeleporterVersion is a paid mutator transaction binding the contract method 0x5eb99514. +// +// Solidity: function updateMinTeleporterVersion(uint256 version) returns() +func (_NativeTokenHome *NativeTokenHomeSession) UpdateMinTeleporterVersion(version *big.Int) (*types.Transaction, error) { + return _NativeTokenHome.Contract.UpdateMinTeleporterVersion(&_NativeTokenHome.TransactOpts, version) +} + +// UpdateMinTeleporterVersion is a paid mutator transaction binding the contract method 0x5eb99514. +// +// Solidity: function updateMinTeleporterVersion(uint256 version) returns() +func (_NativeTokenHome *NativeTokenHomeTransactorSession) UpdateMinTeleporterVersion(version *big.Int) (*types.Transaction, error) { + return _NativeTokenHome.Contract.UpdateMinTeleporterVersion(&_NativeTokenHome.TransactOpts, version) +} + +// Receive is a paid mutator transaction binding the contract receive function. +// +// Solidity: receive() payable returns() +func (_NativeTokenHome *NativeTokenHomeTransactor) Receive(opts *bind.TransactOpts) (*types.Transaction, error) { + return _NativeTokenHome.contract.RawTransact(opts, nil) // calldata is disallowed for receive function +} + +// Receive is a paid mutator transaction binding the contract receive function. +// +// Solidity: receive() payable returns() +func (_NativeTokenHome *NativeTokenHomeSession) Receive() (*types.Transaction, error) { + return _NativeTokenHome.Contract.Receive(&_NativeTokenHome.TransactOpts) +} + +// Receive is a paid mutator transaction binding the contract receive function. +// +// Solidity: receive() payable returns() +func (_NativeTokenHome *NativeTokenHomeTransactorSession) Receive() (*types.Transaction, error) { + return _NativeTokenHome.Contract.Receive(&_NativeTokenHome.TransactOpts) +} + +// NativeTokenHomeCallFailedIterator is returned from FilterCallFailed and is used to iterate over the raw logs and unpacked data for CallFailed events raised by the NativeTokenHome contract. +type NativeTokenHomeCallFailedIterator struct { + Event *NativeTokenHomeCallFailed // 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 interfaces.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 *NativeTokenHomeCallFailedIterator) 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(NativeTokenHomeCallFailed) + 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(NativeTokenHomeCallFailed) + 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 *NativeTokenHomeCallFailedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *NativeTokenHomeCallFailedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// NativeTokenHomeCallFailed represents a CallFailed event raised by the NativeTokenHome contract. +type NativeTokenHomeCallFailed struct { + RecipientContract common.Address + Amount *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterCallFailed is a free log retrieval operation binding the contract event 0xb9eaeae386d339f8115782f297a9e5f0e13fb587cd6b0d502f113cb8dd4d6cb0. +// +// Solidity: event CallFailed(address indexed recipientContract, uint256 amount) +func (_NativeTokenHome *NativeTokenHomeFilterer) FilterCallFailed(opts *bind.FilterOpts, recipientContract []common.Address) (*NativeTokenHomeCallFailedIterator, error) { + + var recipientContractRule []interface{} + for _, recipientContractItem := range recipientContract { + recipientContractRule = append(recipientContractRule, recipientContractItem) + } + + logs, sub, err := _NativeTokenHome.contract.FilterLogs(opts, "CallFailed", recipientContractRule) + if err != nil { + return nil, err + } + return &NativeTokenHomeCallFailedIterator{contract: _NativeTokenHome.contract, event: "CallFailed", logs: logs, sub: sub}, nil +} + +// WatchCallFailed is a free log subscription operation binding the contract event 0xb9eaeae386d339f8115782f297a9e5f0e13fb587cd6b0d502f113cb8dd4d6cb0. +// +// Solidity: event CallFailed(address indexed recipientContract, uint256 amount) +func (_NativeTokenHome *NativeTokenHomeFilterer) WatchCallFailed(opts *bind.WatchOpts, sink chan<- *NativeTokenHomeCallFailed, recipientContract []common.Address) (event.Subscription, error) { + + var recipientContractRule []interface{} + for _, recipientContractItem := range recipientContract { + recipientContractRule = append(recipientContractRule, recipientContractItem) + } + + logs, sub, err := _NativeTokenHome.contract.WatchLogs(opts, "CallFailed", recipientContractRule) + 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(NativeTokenHomeCallFailed) + if err := _NativeTokenHome.contract.UnpackLog(event, "CallFailed", 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 +} + +// ParseCallFailed is a log parse operation binding the contract event 0xb9eaeae386d339f8115782f297a9e5f0e13fb587cd6b0d502f113cb8dd4d6cb0. +// +// Solidity: event CallFailed(address indexed recipientContract, uint256 amount) +func (_NativeTokenHome *NativeTokenHomeFilterer) ParseCallFailed(log types.Log) (*NativeTokenHomeCallFailed, error) { + event := new(NativeTokenHomeCallFailed) + if err := _NativeTokenHome.contract.UnpackLog(event, "CallFailed", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// NativeTokenHomeCallSucceededIterator is returned from FilterCallSucceeded and is used to iterate over the raw logs and unpacked data for CallSucceeded events raised by the NativeTokenHome contract. +type NativeTokenHomeCallSucceededIterator struct { + Event *NativeTokenHomeCallSucceeded // 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 interfaces.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 *NativeTokenHomeCallSucceededIterator) 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(NativeTokenHomeCallSucceeded) + 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(NativeTokenHomeCallSucceeded) + 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 *NativeTokenHomeCallSucceededIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *NativeTokenHomeCallSucceededIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// NativeTokenHomeCallSucceeded represents a CallSucceeded event raised by the NativeTokenHome contract. +type NativeTokenHomeCallSucceeded struct { + RecipientContract common.Address + Amount *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterCallSucceeded is a free log retrieval operation binding the contract event 0x104deb555f67e63782bb817bc26c39050894645f9b9f29c4be8ae68d0e8b7ff4. +// +// Solidity: event CallSucceeded(address indexed recipientContract, uint256 amount) +func (_NativeTokenHome *NativeTokenHomeFilterer) FilterCallSucceeded(opts *bind.FilterOpts, recipientContract []common.Address) (*NativeTokenHomeCallSucceededIterator, error) { + + var recipientContractRule []interface{} + for _, recipientContractItem := range recipientContract { + recipientContractRule = append(recipientContractRule, recipientContractItem) + } + + logs, sub, err := _NativeTokenHome.contract.FilterLogs(opts, "CallSucceeded", recipientContractRule) + if err != nil { + return nil, err + } + return &NativeTokenHomeCallSucceededIterator{contract: _NativeTokenHome.contract, event: "CallSucceeded", logs: logs, sub: sub}, nil +} + +// WatchCallSucceeded is a free log subscription operation binding the contract event 0x104deb555f67e63782bb817bc26c39050894645f9b9f29c4be8ae68d0e8b7ff4. +// +// Solidity: event CallSucceeded(address indexed recipientContract, uint256 amount) +func (_NativeTokenHome *NativeTokenHomeFilterer) WatchCallSucceeded(opts *bind.WatchOpts, sink chan<- *NativeTokenHomeCallSucceeded, recipientContract []common.Address) (event.Subscription, error) { + + var recipientContractRule []interface{} + for _, recipientContractItem := range recipientContract { + recipientContractRule = append(recipientContractRule, recipientContractItem) + } + + logs, sub, err := _NativeTokenHome.contract.WatchLogs(opts, "CallSucceeded", recipientContractRule) + 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(NativeTokenHomeCallSucceeded) + if err := _NativeTokenHome.contract.UnpackLog(event, "CallSucceeded", 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 +} + +// ParseCallSucceeded is a log parse operation binding the contract event 0x104deb555f67e63782bb817bc26c39050894645f9b9f29c4be8ae68d0e8b7ff4. +// +// Solidity: event CallSucceeded(address indexed recipientContract, uint256 amount) +func (_NativeTokenHome *NativeTokenHomeFilterer) ParseCallSucceeded(log types.Log) (*NativeTokenHomeCallSucceeded, error) { + event := new(NativeTokenHomeCallSucceeded) + if err := _NativeTokenHome.contract.UnpackLog(event, "CallSucceeded", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// NativeTokenHomeCollateralAddedIterator is returned from FilterCollateralAdded and is used to iterate over the raw logs and unpacked data for CollateralAdded events raised by the NativeTokenHome contract. +type NativeTokenHomeCollateralAddedIterator struct { + Event *NativeTokenHomeCollateralAdded // 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 interfaces.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 *NativeTokenHomeCollateralAddedIterator) 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(NativeTokenHomeCollateralAdded) + 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(NativeTokenHomeCollateralAdded) + 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 *NativeTokenHomeCollateralAddedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *NativeTokenHomeCollateralAddedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// NativeTokenHomeCollateralAdded represents a CollateralAdded event raised by the NativeTokenHome contract. +type NativeTokenHomeCollateralAdded struct { + RemoteBlockchainID [32]byte + RemoteTokenTransferrerAddress common.Address + Amount *big.Int + Remaining *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterCollateralAdded is a free log retrieval operation binding the contract event 0x6769a5f9bfc8b6e0db839ab981cbf9239274ae72d2d035081a9157d43bd33cb6. +// +// Solidity: event CollateralAdded(bytes32 indexed remoteBlockchainID, address indexed remoteTokenTransferrerAddress, uint256 amount, uint256 remaining) +func (_NativeTokenHome *NativeTokenHomeFilterer) FilterCollateralAdded(opts *bind.FilterOpts, remoteBlockchainID [][32]byte, remoteTokenTransferrerAddress []common.Address) (*NativeTokenHomeCollateralAddedIterator, error) { + + var remoteBlockchainIDRule []interface{} + for _, remoteBlockchainIDItem := range remoteBlockchainID { + remoteBlockchainIDRule = append(remoteBlockchainIDRule, remoteBlockchainIDItem) + } + var remoteTokenTransferrerAddressRule []interface{} + for _, remoteTokenTransferrerAddressItem := range remoteTokenTransferrerAddress { + remoteTokenTransferrerAddressRule = append(remoteTokenTransferrerAddressRule, remoteTokenTransferrerAddressItem) + } + + logs, sub, err := _NativeTokenHome.contract.FilterLogs(opts, "CollateralAdded", remoteBlockchainIDRule, remoteTokenTransferrerAddressRule) + if err != nil { + return nil, err + } + return &NativeTokenHomeCollateralAddedIterator{contract: _NativeTokenHome.contract, event: "CollateralAdded", logs: logs, sub: sub}, nil +} + +// WatchCollateralAdded is a free log subscription operation binding the contract event 0x6769a5f9bfc8b6e0db839ab981cbf9239274ae72d2d035081a9157d43bd33cb6. +// +// Solidity: event CollateralAdded(bytes32 indexed remoteBlockchainID, address indexed remoteTokenTransferrerAddress, uint256 amount, uint256 remaining) +func (_NativeTokenHome *NativeTokenHomeFilterer) WatchCollateralAdded(opts *bind.WatchOpts, sink chan<- *NativeTokenHomeCollateralAdded, remoteBlockchainID [][32]byte, remoteTokenTransferrerAddress []common.Address) (event.Subscription, error) { + + var remoteBlockchainIDRule []interface{} + for _, remoteBlockchainIDItem := range remoteBlockchainID { + remoteBlockchainIDRule = append(remoteBlockchainIDRule, remoteBlockchainIDItem) + } + var remoteTokenTransferrerAddressRule []interface{} + for _, remoteTokenTransferrerAddressItem := range remoteTokenTransferrerAddress { + remoteTokenTransferrerAddressRule = append(remoteTokenTransferrerAddressRule, remoteTokenTransferrerAddressItem) + } + + logs, sub, err := _NativeTokenHome.contract.WatchLogs(opts, "CollateralAdded", remoteBlockchainIDRule, remoteTokenTransferrerAddressRule) + 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(NativeTokenHomeCollateralAdded) + if err := _NativeTokenHome.contract.UnpackLog(event, "CollateralAdded", 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 +} + +// ParseCollateralAdded is a log parse operation binding the contract event 0x6769a5f9bfc8b6e0db839ab981cbf9239274ae72d2d035081a9157d43bd33cb6. +// +// Solidity: event CollateralAdded(bytes32 indexed remoteBlockchainID, address indexed remoteTokenTransferrerAddress, uint256 amount, uint256 remaining) +func (_NativeTokenHome *NativeTokenHomeFilterer) ParseCollateralAdded(log types.Log) (*NativeTokenHomeCollateralAdded, error) { + event := new(NativeTokenHomeCollateralAdded) + if err := _NativeTokenHome.contract.UnpackLog(event, "CollateralAdded", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// NativeTokenHomeInitializedIterator is returned from FilterInitialized and is used to iterate over the raw logs and unpacked data for Initialized events raised by the NativeTokenHome contract. +type NativeTokenHomeInitializedIterator struct { + Event *NativeTokenHomeInitialized // 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 interfaces.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 *NativeTokenHomeInitializedIterator) 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(NativeTokenHomeInitialized) + 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(NativeTokenHomeInitialized) + 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 *NativeTokenHomeInitializedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *NativeTokenHomeInitializedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// NativeTokenHomeInitialized represents a Initialized event raised by the NativeTokenHome contract. +type NativeTokenHomeInitialized struct { + Version uint64 + Raw types.Log // Blockchain specific contextual infos +} + +// FilterInitialized is a free log retrieval operation binding the contract event 0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2. +// +// Solidity: event Initialized(uint64 version) +func (_NativeTokenHome *NativeTokenHomeFilterer) FilterInitialized(opts *bind.FilterOpts) (*NativeTokenHomeInitializedIterator, error) { + + logs, sub, err := _NativeTokenHome.contract.FilterLogs(opts, "Initialized") + if err != nil { + return nil, err + } + return &NativeTokenHomeInitializedIterator{contract: _NativeTokenHome.contract, event: "Initialized", logs: logs, sub: sub}, nil +} + +// WatchInitialized is a free log subscription operation binding the contract event 0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2. +// +// Solidity: event Initialized(uint64 version) +func (_NativeTokenHome *NativeTokenHomeFilterer) WatchInitialized(opts *bind.WatchOpts, sink chan<- *NativeTokenHomeInitialized) (event.Subscription, error) { + + logs, sub, err := _NativeTokenHome.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(NativeTokenHomeInitialized) + if err := _NativeTokenHome.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 0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2. +// +// Solidity: event Initialized(uint64 version) +func (_NativeTokenHome *NativeTokenHomeFilterer) ParseInitialized(log types.Log) (*NativeTokenHomeInitialized, error) { + event := new(NativeTokenHomeInitialized) + if err := _NativeTokenHome.contract.UnpackLog(event, "Initialized", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// NativeTokenHomeMinTeleporterVersionUpdatedIterator is returned from FilterMinTeleporterVersionUpdated and is used to iterate over the raw logs and unpacked data for MinTeleporterVersionUpdated events raised by the NativeTokenHome contract. +type NativeTokenHomeMinTeleporterVersionUpdatedIterator struct { + Event *NativeTokenHomeMinTeleporterVersionUpdated // 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 interfaces.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 *NativeTokenHomeMinTeleporterVersionUpdatedIterator) 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(NativeTokenHomeMinTeleporterVersionUpdated) + 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(NativeTokenHomeMinTeleporterVersionUpdated) + 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 *NativeTokenHomeMinTeleporterVersionUpdatedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *NativeTokenHomeMinTeleporterVersionUpdatedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// NativeTokenHomeMinTeleporterVersionUpdated represents a MinTeleporterVersionUpdated event raised by the NativeTokenHome contract. +type NativeTokenHomeMinTeleporterVersionUpdated struct { + OldMinTeleporterVersion *big.Int + NewMinTeleporterVersion *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterMinTeleporterVersionUpdated is a free log retrieval operation binding the contract event 0xa9a7ef57e41f05b4c15480842f5f0c27edfcbb553fed281f7c4068452cc1c02d. +// +// Solidity: event MinTeleporterVersionUpdated(uint256 indexed oldMinTeleporterVersion, uint256 indexed newMinTeleporterVersion) +func (_NativeTokenHome *NativeTokenHomeFilterer) FilterMinTeleporterVersionUpdated(opts *bind.FilterOpts, oldMinTeleporterVersion []*big.Int, newMinTeleporterVersion []*big.Int) (*NativeTokenHomeMinTeleporterVersionUpdatedIterator, error) { + + var oldMinTeleporterVersionRule []interface{} + for _, oldMinTeleporterVersionItem := range oldMinTeleporterVersion { + oldMinTeleporterVersionRule = append(oldMinTeleporterVersionRule, oldMinTeleporterVersionItem) + } + var newMinTeleporterVersionRule []interface{} + for _, newMinTeleporterVersionItem := range newMinTeleporterVersion { + newMinTeleporterVersionRule = append(newMinTeleporterVersionRule, newMinTeleporterVersionItem) + } + + logs, sub, err := _NativeTokenHome.contract.FilterLogs(opts, "MinTeleporterVersionUpdated", oldMinTeleporterVersionRule, newMinTeleporterVersionRule) + if err != nil { + return nil, err + } + return &NativeTokenHomeMinTeleporterVersionUpdatedIterator{contract: _NativeTokenHome.contract, event: "MinTeleporterVersionUpdated", logs: logs, sub: sub}, nil +} + +// WatchMinTeleporterVersionUpdated is a free log subscription operation binding the contract event 0xa9a7ef57e41f05b4c15480842f5f0c27edfcbb553fed281f7c4068452cc1c02d. +// +// Solidity: event MinTeleporterVersionUpdated(uint256 indexed oldMinTeleporterVersion, uint256 indexed newMinTeleporterVersion) +func (_NativeTokenHome *NativeTokenHomeFilterer) WatchMinTeleporterVersionUpdated(opts *bind.WatchOpts, sink chan<- *NativeTokenHomeMinTeleporterVersionUpdated, oldMinTeleporterVersion []*big.Int, newMinTeleporterVersion []*big.Int) (event.Subscription, error) { + + var oldMinTeleporterVersionRule []interface{} + for _, oldMinTeleporterVersionItem := range oldMinTeleporterVersion { + oldMinTeleporterVersionRule = append(oldMinTeleporterVersionRule, oldMinTeleporterVersionItem) + } + var newMinTeleporterVersionRule []interface{} + for _, newMinTeleporterVersionItem := range newMinTeleporterVersion { + newMinTeleporterVersionRule = append(newMinTeleporterVersionRule, newMinTeleporterVersionItem) + } + + logs, sub, err := _NativeTokenHome.contract.WatchLogs(opts, "MinTeleporterVersionUpdated", oldMinTeleporterVersionRule, newMinTeleporterVersionRule) + 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(NativeTokenHomeMinTeleporterVersionUpdated) + if err := _NativeTokenHome.contract.UnpackLog(event, "MinTeleporterVersionUpdated", 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 +} + +// ParseMinTeleporterVersionUpdated is a log parse operation binding the contract event 0xa9a7ef57e41f05b4c15480842f5f0c27edfcbb553fed281f7c4068452cc1c02d. +// +// Solidity: event MinTeleporterVersionUpdated(uint256 indexed oldMinTeleporterVersion, uint256 indexed newMinTeleporterVersion) +func (_NativeTokenHome *NativeTokenHomeFilterer) ParseMinTeleporterVersionUpdated(log types.Log) (*NativeTokenHomeMinTeleporterVersionUpdated, error) { + event := new(NativeTokenHomeMinTeleporterVersionUpdated) + if err := _NativeTokenHome.contract.UnpackLog(event, "MinTeleporterVersionUpdated", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// NativeTokenHomeOwnershipTransferredIterator is returned from FilterOwnershipTransferred and is used to iterate over the raw logs and unpacked data for OwnershipTransferred events raised by the NativeTokenHome contract. +type NativeTokenHomeOwnershipTransferredIterator struct { + Event *NativeTokenHomeOwnershipTransferred // 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 interfaces.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 *NativeTokenHomeOwnershipTransferredIterator) 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(NativeTokenHomeOwnershipTransferred) + 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(NativeTokenHomeOwnershipTransferred) + 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 *NativeTokenHomeOwnershipTransferredIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *NativeTokenHomeOwnershipTransferredIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// NativeTokenHomeOwnershipTransferred represents a OwnershipTransferred event raised by the NativeTokenHome contract. +type NativeTokenHomeOwnershipTransferred 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 (_NativeTokenHome *NativeTokenHomeFilterer) FilterOwnershipTransferred(opts *bind.FilterOpts, previousOwner []common.Address, newOwner []common.Address) (*NativeTokenHomeOwnershipTransferredIterator, 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 := _NativeTokenHome.contract.FilterLogs(opts, "OwnershipTransferred", previousOwnerRule, newOwnerRule) + if err != nil { + return nil, err + } + return &NativeTokenHomeOwnershipTransferredIterator{contract: _NativeTokenHome.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 (_NativeTokenHome *NativeTokenHomeFilterer) WatchOwnershipTransferred(opts *bind.WatchOpts, sink chan<- *NativeTokenHomeOwnershipTransferred, 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 := _NativeTokenHome.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(NativeTokenHomeOwnershipTransferred) + if err := _NativeTokenHome.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 (_NativeTokenHome *NativeTokenHomeFilterer) ParseOwnershipTransferred(log types.Log) (*NativeTokenHomeOwnershipTransferred, error) { + event := new(NativeTokenHomeOwnershipTransferred) + if err := _NativeTokenHome.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// NativeTokenHomeRemoteRegisteredIterator is returned from FilterRemoteRegistered and is used to iterate over the raw logs and unpacked data for RemoteRegistered events raised by the NativeTokenHome contract. +type NativeTokenHomeRemoteRegisteredIterator struct { + Event *NativeTokenHomeRemoteRegistered // 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 interfaces.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 *NativeTokenHomeRemoteRegisteredIterator) 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(NativeTokenHomeRemoteRegistered) + 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(NativeTokenHomeRemoteRegistered) + 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 *NativeTokenHomeRemoteRegisteredIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *NativeTokenHomeRemoteRegisteredIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// NativeTokenHomeRemoteRegistered represents a RemoteRegistered event raised by the NativeTokenHome contract. +type NativeTokenHomeRemoteRegistered struct { + RemoteBlockchainID [32]byte + RemoteTokenTransferrerAddress common.Address + InitialCollateralNeeded *big.Int + TokenDecimals uint8 + Raw types.Log // Blockchain specific contextual infos +} + +// FilterRemoteRegistered is a free log retrieval operation binding the contract event 0xf229b02a51a4c8d5ef03a096ae0dd727d7b48b710d21b50ebebb560eef739b90. +// +// Solidity: event RemoteRegistered(bytes32 indexed remoteBlockchainID, address indexed remoteTokenTransferrerAddress, uint256 initialCollateralNeeded, uint8 tokenDecimals) +func (_NativeTokenHome *NativeTokenHomeFilterer) FilterRemoteRegistered(opts *bind.FilterOpts, remoteBlockchainID [][32]byte, remoteTokenTransferrerAddress []common.Address) (*NativeTokenHomeRemoteRegisteredIterator, error) { + + var remoteBlockchainIDRule []interface{} + for _, remoteBlockchainIDItem := range remoteBlockchainID { + remoteBlockchainIDRule = append(remoteBlockchainIDRule, remoteBlockchainIDItem) + } + var remoteTokenTransferrerAddressRule []interface{} + for _, remoteTokenTransferrerAddressItem := range remoteTokenTransferrerAddress { + remoteTokenTransferrerAddressRule = append(remoteTokenTransferrerAddressRule, remoteTokenTransferrerAddressItem) + } + + logs, sub, err := _NativeTokenHome.contract.FilterLogs(opts, "RemoteRegistered", remoteBlockchainIDRule, remoteTokenTransferrerAddressRule) + if err != nil { + return nil, err + } + return &NativeTokenHomeRemoteRegisteredIterator{contract: _NativeTokenHome.contract, event: "RemoteRegistered", logs: logs, sub: sub}, nil +} + +// WatchRemoteRegistered is a free log subscription operation binding the contract event 0xf229b02a51a4c8d5ef03a096ae0dd727d7b48b710d21b50ebebb560eef739b90. +// +// Solidity: event RemoteRegistered(bytes32 indexed remoteBlockchainID, address indexed remoteTokenTransferrerAddress, uint256 initialCollateralNeeded, uint8 tokenDecimals) +func (_NativeTokenHome *NativeTokenHomeFilterer) WatchRemoteRegistered(opts *bind.WatchOpts, sink chan<- *NativeTokenHomeRemoteRegistered, remoteBlockchainID [][32]byte, remoteTokenTransferrerAddress []common.Address) (event.Subscription, error) { + + var remoteBlockchainIDRule []interface{} + for _, remoteBlockchainIDItem := range remoteBlockchainID { + remoteBlockchainIDRule = append(remoteBlockchainIDRule, remoteBlockchainIDItem) + } + var remoteTokenTransferrerAddressRule []interface{} + for _, remoteTokenTransferrerAddressItem := range remoteTokenTransferrerAddress { + remoteTokenTransferrerAddressRule = append(remoteTokenTransferrerAddressRule, remoteTokenTransferrerAddressItem) + } + + logs, sub, err := _NativeTokenHome.contract.WatchLogs(opts, "RemoteRegistered", remoteBlockchainIDRule, remoteTokenTransferrerAddressRule) + 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(NativeTokenHomeRemoteRegistered) + if err := _NativeTokenHome.contract.UnpackLog(event, "RemoteRegistered", 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 +} + +// ParseRemoteRegistered is a log parse operation binding the contract event 0xf229b02a51a4c8d5ef03a096ae0dd727d7b48b710d21b50ebebb560eef739b90. +// +// Solidity: event RemoteRegistered(bytes32 indexed remoteBlockchainID, address indexed remoteTokenTransferrerAddress, uint256 initialCollateralNeeded, uint8 tokenDecimals) +func (_NativeTokenHome *NativeTokenHomeFilterer) ParseRemoteRegistered(log types.Log) (*NativeTokenHomeRemoteRegistered, error) { + event := new(NativeTokenHomeRemoteRegistered) + if err := _NativeTokenHome.contract.UnpackLog(event, "RemoteRegistered", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// NativeTokenHomeTeleporterAddressPausedIterator is returned from FilterTeleporterAddressPaused and is used to iterate over the raw logs and unpacked data for TeleporterAddressPaused events raised by the NativeTokenHome contract. +type NativeTokenHomeTeleporterAddressPausedIterator struct { + Event *NativeTokenHomeTeleporterAddressPaused // 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 interfaces.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 *NativeTokenHomeTeleporterAddressPausedIterator) 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(NativeTokenHomeTeleporterAddressPaused) + 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(NativeTokenHomeTeleporterAddressPaused) + 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 *NativeTokenHomeTeleporterAddressPausedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *NativeTokenHomeTeleporterAddressPausedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// NativeTokenHomeTeleporterAddressPaused represents a TeleporterAddressPaused event raised by the NativeTokenHome contract. +type NativeTokenHomeTeleporterAddressPaused struct { + TeleporterAddress common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterTeleporterAddressPaused is a free log retrieval operation binding the contract event 0x933f93e57a222e6330362af8b376d0a8725b6901e9a2fb86d00f169702b28a4c. +// +// Solidity: event TeleporterAddressPaused(address indexed teleporterAddress) +func (_NativeTokenHome *NativeTokenHomeFilterer) FilterTeleporterAddressPaused(opts *bind.FilterOpts, teleporterAddress []common.Address) (*NativeTokenHomeTeleporterAddressPausedIterator, error) { + + var teleporterAddressRule []interface{} + for _, teleporterAddressItem := range teleporterAddress { + teleporterAddressRule = append(teleporterAddressRule, teleporterAddressItem) + } + + logs, sub, err := _NativeTokenHome.contract.FilterLogs(opts, "TeleporterAddressPaused", teleporterAddressRule) + if err != nil { + return nil, err + } + return &NativeTokenHomeTeleporterAddressPausedIterator{contract: _NativeTokenHome.contract, event: "TeleporterAddressPaused", logs: logs, sub: sub}, nil +} + +// WatchTeleporterAddressPaused is a free log subscription operation binding the contract event 0x933f93e57a222e6330362af8b376d0a8725b6901e9a2fb86d00f169702b28a4c. +// +// Solidity: event TeleporterAddressPaused(address indexed teleporterAddress) +func (_NativeTokenHome *NativeTokenHomeFilterer) WatchTeleporterAddressPaused(opts *bind.WatchOpts, sink chan<- *NativeTokenHomeTeleporterAddressPaused, teleporterAddress []common.Address) (event.Subscription, error) { + + var teleporterAddressRule []interface{} + for _, teleporterAddressItem := range teleporterAddress { + teleporterAddressRule = append(teleporterAddressRule, teleporterAddressItem) + } + + logs, sub, err := _NativeTokenHome.contract.WatchLogs(opts, "TeleporterAddressPaused", teleporterAddressRule) + 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(NativeTokenHomeTeleporterAddressPaused) + if err := _NativeTokenHome.contract.UnpackLog(event, "TeleporterAddressPaused", 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 +} + +// ParseTeleporterAddressPaused is a log parse operation binding the contract event 0x933f93e57a222e6330362af8b376d0a8725b6901e9a2fb86d00f169702b28a4c. +// +// Solidity: event TeleporterAddressPaused(address indexed teleporterAddress) +func (_NativeTokenHome *NativeTokenHomeFilterer) ParseTeleporterAddressPaused(log types.Log) (*NativeTokenHomeTeleporterAddressPaused, error) { + event := new(NativeTokenHomeTeleporterAddressPaused) + if err := _NativeTokenHome.contract.UnpackLog(event, "TeleporterAddressPaused", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// NativeTokenHomeTeleporterAddressUnpausedIterator is returned from FilterTeleporterAddressUnpaused and is used to iterate over the raw logs and unpacked data for TeleporterAddressUnpaused events raised by the NativeTokenHome contract. +type NativeTokenHomeTeleporterAddressUnpausedIterator struct { + Event *NativeTokenHomeTeleporterAddressUnpaused // 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 interfaces.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 *NativeTokenHomeTeleporterAddressUnpausedIterator) 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(NativeTokenHomeTeleporterAddressUnpaused) + 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(NativeTokenHomeTeleporterAddressUnpaused) + 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 *NativeTokenHomeTeleporterAddressUnpausedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *NativeTokenHomeTeleporterAddressUnpausedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// NativeTokenHomeTeleporterAddressUnpaused represents a TeleporterAddressUnpaused event raised by the NativeTokenHome contract. +type NativeTokenHomeTeleporterAddressUnpaused struct { + TeleporterAddress common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterTeleporterAddressUnpaused is a free log retrieval operation binding the contract event 0x844e2f3154214672229235858fd029d1dfd543901c6d05931f0bc2480a2d72c3. +// +// Solidity: event TeleporterAddressUnpaused(address indexed teleporterAddress) +func (_NativeTokenHome *NativeTokenHomeFilterer) FilterTeleporterAddressUnpaused(opts *bind.FilterOpts, teleporterAddress []common.Address) (*NativeTokenHomeTeleporterAddressUnpausedIterator, error) { + + var teleporterAddressRule []interface{} + for _, teleporterAddressItem := range teleporterAddress { + teleporterAddressRule = append(teleporterAddressRule, teleporterAddressItem) + } + + logs, sub, err := _NativeTokenHome.contract.FilterLogs(opts, "TeleporterAddressUnpaused", teleporterAddressRule) + if err != nil { + return nil, err + } + return &NativeTokenHomeTeleporterAddressUnpausedIterator{contract: _NativeTokenHome.contract, event: "TeleporterAddressUnpaused", logs: logs, sub: sub}, nil +} + +// WatchTeleporterAddressUnpaused is a free log subscription operation binding the contract event 0x844e2f3154214672229235858fd029d1dfd543901c6d05931f0bc2480a2d72c3. +// +// Solidity: event TeleporterAddressUnpaused(address indexed teleporterAddress) +func (_NativeTokenHome *NativeTokenHomeFilterer) WatchTeleporterAddressUnpaused(opts *bind.WatchOpts, sink chan<- *NativeTokenHomeTeleporterAddressUnpaused, teleporterAddress []common.Address) (event.Subscription, error) { + + var teleporterAddressRule []interface{} + for _, teleporterAddressItem := range teleporterAddress { + teleporterAddressRule = append(teleporterAddressRule, teleporterAddressItem) + } + + logs, sub, err := _NativeTokenHome.contract.WatchLogs(opts, "TeleporterAddressUnpaused", teleporterAddressRule) + 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(NativeTokenHomeTeleporterAddressUnpaused) + if err := _NativeTokenHome.contract.UnpackLog(event, "TeleporterAddressUnpaused", 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 +} + +// ParseTeleporterAddressUnpaused is a log parse operation binding the contract event 0x844e2f3154214672229235858fd029d1dfd543901c6d05931f0bc2480a2d72c3. +// +// Solidity: event TeleporterAddressUnpaused(address indexed teleporterAddress) +func (_NativeTokenHome *NativeTokenHomeFilterer) ParseTeleporterAddressUnpaused(log types.Log) (*NativeTokenHomeTeleporterAddressUnpaused, error) { + event := new(NativeTokenHomeTeleporterAddressUnpaused) + if err := _NativeTokenHome.contract.UnpackLog(event, "TeleporterAddressUnpaused", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// NativeTokenHomeTokensAndCallRoutedIterator is returned from FilterTokensAndCallRouted and is used to iterate over the raw logs and unpacked data for TokensAndCallRouted events raised by the NativeTokenHome contract. +type NativeTokenHomeTokensAndCallRoutedIterator struct { + Event *NativeTokenHomeTokensAndCallRouted // 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 interfaces.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 *NativeTokenHomeTokensAndCallRoutedIterator) 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(NativeTokenHomeTokensAndCallRouted) + 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(NativeTokenHomeTokensAndCallRouted) + 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 *NativeTokenHomeTokensAndCallRoutedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *NativeTokenHomeTokensAndCallRoutedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// NativeTokenHomeTokensAndCallRouted represents a TokensAndCallRouted event raised by the NativeTokenHome contract. +type NativeTokenHomeTokensAndCallRouted struct { + TeleporterMessageID [32]byte + Input SendAndCallInput + Amount *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterTokensAndCallRouted is a free log retrieval operation binding the contract event 0x42eff9005856e3c586b096d67211a566dc926052119fd7cc08023c70937ecb30. +// +// Solidity: event TokensAndCallRouted(bytes32 indexed teleporterMessageID, (bytes32,address,address,bytes,uint256,uint256,address,address,address,uint256,uint256) input, uint256 amount) +func (_NativeTokenHome *NativeTokenHomeFilterer) FilterTokensAndCallRouted(opts *bind.FilterOpts, teleporterMessageID [][32]byte) (*NativeTokenHomeTokensAndCallRoutedIterator, error) { + + var teleporterMessageIDRule []interface{} + for _, teleporterMessageIDItem := range teleporterMessageID { + teleporterMessageIDRule = append(teleporterMessageIDRule, teleporterMessageIDItem) + } + + logs, sub, err := _NativeTokenHome.contract.FilterLogs(opts, "TokensAndCallRouted", teleporterMessageIDRule) + if err != nil { + return nil, err + } + return &NativeTokenHomeTokensAndCallRoutedIterator{contract: _NativeTokenHome.contract, event: "TokensAndCallRouted", logs: logs, sub: sub}, nil +} + +// WatchTokensAndCallRouted is a free log subscription operation binding the contract event 0x42eff9005856e3c586b096d67211a566dc926052119fd7cc08023c70937ecb30. +// +// Solidity: event TokensAndCallRouted(bytes32 indexed teleporterMessageID, (bytes32,address,address,bytes,uint256,uint256,address,address,address,uint256,uint256) input, uint256 amount) +func (_NativeTokenHome *NativeTokenHomeFilterer) WatchTokensAndCallRouted(opts *bind.WatchOpts, sink chan<- *NativeTokenHomeTokensAndCallRouted, teleporterMessageID [][32]byte) (event.Subscription, error) { + + var teleporterMessageIDRule []interface{} + for _, teleporterMessageIDItem := range teleporterMessageID { + teleporterMessageIDRule = append(teleporterMessageIDRule, teleporterMessageIDItem) + } + + logs, sub, err := _NativeTokenHome.contract.WatchLogs(opts, "TokensAndCallRouted", teleporterMessageIDRule) + 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(NativeTokenHomeTokensAndCallRouted) + if err := _NativeTokenHome.contract.UnpackLog(event, "TokensAndCallRouted", 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 +} + +// ParseTokensAndCallRouted is a log parse operation binding the contract event 0x42eff9005856e3c586b096d67211a566dc926052119fd7cc08023c70937ecb30. +// +// Solidity: event TokensAndCallRouted(bytes32 indexed teleporterMessageID, (bytes32,address,address,bytes,uint256,uint256,address,address,address,uint256,uint256) input, uint256 amount) +func (_NativeTokenHome *NativeTokenHomeFilterer) ParseTokensAndCallRouted(log types.Log) (*NativeTokenHomeTokensAndCallRouted, error) { + event := new(NativeTokenHomeTokensAndCallRouted) + if err := _NativeTokenHome.contract.UnpackLog(event, "TokensAndCallRouted", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// NativeTokenHomeTokensAndCallSentIterator is returned from FilterTokensAndCallSent and is used to iterate over the raw logs and unpacked data for TokensAndCallSent events raised by the NativeTokenHome contract. +type NativeTokenHomeTokensAndCallSentIterator struct { + Event *NativeTokenHomeTokensAndCallSent // 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 interfaces.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 *NativeTokenHomeTokensAndCallSentIterator) 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(NativeTokenHomeTokensAndCallSent) + 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(NativeTokenHomeTokensAndCallSent) + 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 *NativeTokenHomeTokensAndCallSentIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *NativeTokenHomeTokensAndCallSentIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// NativeTokenHomeTokensAndCallSent represents a TokensAndCallSent event raised by the NativeTokenHome contract. +type NativeTokenHomeTokensAndCallSent struct { + TeleporterMessageID [32]byte + Sender common.Address + Input SendAndCallInput + Amount *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterTokensAndCallSent is a free log retrieval operation binding the contract event 0x5d76dff81bf773b908b050fa113d39f7d8135bb4175398f313ea19cd3a1a0b16. +// +// Solidity: event TokensAndCallSent(bytes32 indexed teleporterMessageID, address indexed sender, (bytes32,address,address,bytes,uint256,uint256,address,address,address,uint256,uint256) input, uint256 amount) +func (_NativeTokenHome *NativeTokenHomeFilterer) FilterTokensAndCallSent(opts *bind.FilterOpts, teleporterMessageID [][32]byte, sender []common.Address) (*NativeTokenHomeTokensAndCallSentIterator, error) { + + var teleporterMessageIDRule []interface{} + for _, teleporterMessageIDItem := range teleporterMessageID { + teleporterMessageIDRule = append(teleporterMessageIDRule, teleporterMessageIDItem) + } + var senderRule []interface{} + for _, senderItem := range sender { + senderRule = append(senderRule, senderItem) + } + + logs, sub, err := _NativeTokenHome.contract.FilterLogs(opts, "TokensAndCallSent", teleporterMessageIDRule, senderRule) + if err != nil { + return nil, err + } + return &NativeTokenHomeTokensAndCallSentIterator{contract: _NativeTokenHome.contract, event: "TokensAndCallSent", logs: logs, sub: sub}, nil +} + +// WatchTokensAndCallSent is a free log subscription operation binding the contract event 0x5d76dff81bf773b908b050fa113d39f7d8135bb4175398f313ea19cd3a1a0b16. +// +// Solidity: event TokensAndCallSent(bytes32 indexed teleporterMessageID, address indexed sender, (bytes32,address,address,bytes,uint256,uint256,address,address,address,uint256,uint256) input, uint256 amount) +func (_NativeTokenHome *NativeTokenHomeFilterer) WatchTokensAndCallSent(opts *bind.WatchOpts, sink chan<- *NativeTokenHomeTokensAndCallSent, teleporterMessageID [][32]byte, sender []common.Address) (event.Subscription, error) { + + var teleporterMessageIDRule []interface{} + for _, teleporterMessageIDItem := range teleporterMessageID { + teleporterMessageIDRule = append(teleporterMessageIDRule, teleporterMessageIDItem) + } + var senderRule []interface{} + for _, senderItem := range sender { + senderRule = append(senderRule, senderItem) + } + + logs, sub, err := _NativeTokenHome.contract.WatchLogs(opts, "TokensAndCallSent", teleporterMessageIDRule, senderRule) + 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(NativeTokenHomeTokensAndCallSent) + if err := _NativeTokenHome.contract.UnpackLog(event, "TokensAndCallSent", 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 +} + +// ParseTokensAndCallSent is a log parse operation binding the contract event 0x5d76dff81bf773b908b050fa113d39f7d8135bb4175398f313ea19cd3a1a0b16. +// +// Solidity: event TokensAndCallSent(bytes32 indexed teleporterMessageID, address indexed sender, (bytes32,address,address,bytes,uint256,uint256,address,address,address,uint256,uint256) input, uint256 amount) +func (_NativeTokenHome *NativeTokenHomeFilterer) ParseTokensAndCallSent(log types.Log) (*NativeTokenHomeTokensAndCallSent, error) { + event := new(NativeTokenHomeTokensAndCallSent) + if err := _NativeTokenHome.contract.UnpackLog(event, "TokensAndCallSent", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// NativeTokenHomeTokensRoutedIterator is returned from FilterTokensRouted and is used to iterate over the raw logs and unpacked data for TokensRouted events raised by the NativeTokenHome contract. +type NativeTokenHomeTokensRoutedIterator struct { + Event *NativeTokenHomeTokensRouted // 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 interfaces.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 *NativeTokenHomeTokensRoutedIterator) 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(NativeTokenHomeTokensRouted) + 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(NativeTokenHomeTokensRouted) + 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 *NativeTokenHomeTokensRoutedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *NativeTokenHomeTokensRoutedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// NativeTokenHomeTokensRouted represents a TokensRouted event raised by the NativeTokenHome contract. +type NativeTokenHomeTokensRouted struct { + TeleporterMessageID [32]byte + Input SendTokensInput + Amount *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterTokensRouted is a free log retrieval operation binding the contract event 0x825080857c76cef4a1629c0705a7f8b4ef0282ddcafde0b6715c4fb34b68aaf0. +// +// Solidity: event TokensRouted(bytes32 indexed teleporterMessageID, (bytes32,address,address,address,uint256,uint256,uint256,address) input, uint256 amount) +func (_NativeTokenHome *NativeTokenHomeFilterer) FilterTokensRouted(opts *bind.FilterOpts, teleporterMessageID [][32]byte) (*NativeTokenHomeTokensRoutedIterator, error) { + + var teleporterMessageIDRule []interface{} + for _, teleporterMessageIDItem := range teleporterMessageID { + teleporterMessageIDRule = append(teleporterMessageIDRule, teleporterMessageIDItem) + } + + logs, sub, err := _NativeTokenHome.contract.FilterLogs(opts, "TokensRouted", teleporterMessageIDRule) + if err != nil { + return nil, err + } + return &NativeTokenHomeTokensRoutedIterator{contract: _NativeTokenHome.contract, event: "TokensRouted", logs: logs, sub: sub}, nil +} + +// WatchTokensRouted is a free log subscription operation binding the contract event 0x825080857c76cef4a1629c0705a7f8b4ef0282ddcafde0b6715c4fb34b68aaf0. +// +// Solidity: event TokensRouted(bytes32 indexed teleporterMessageID, (bytes32,address,address,address,uint256,uint256,uint256,address) input, uint256 amount) +func (_NativeTokenHome *NativeTokenHomeFilterer) WatchTokensRouted(opts *bind.WatchOpts, sink chan<- *NativeTokenHomeTokensRouted, teleporterMessageID [][32]byte) (event.Subscription, error) { + + var teleporterMessageIDRule []interface{} + for _, teleporterMessageIDItem := range teleporterMessageID { + teleporterMessageIDRule = append(teleporterMessageIDRule, teleporterMessageIDItem) + } + + logs, sub, err := _NativeTokenHome.contract.WatchLogs(opts, "TokensRouted", teleporterMessageIDRule) + 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(NativeTokenHomeTokensRouted) + if err := _NativeTokenHome.contract.UnpackLog(event, "TokensRouted", 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 +} + +// ParseTokensRouted is a log parse operation binding the contract event 0x825080857c76cef4a1629c0705a7f8b4ef0282ddcafde0b6715c4fb34b68aaf0. +// +// Solidity: event TokensRouted(bytes32 indexed teleporterMessageID, (bytes32,address,address,address,uint256,uint256,uint256,address) input, uint256 amount) +func (_NativeTokenHome *NativeTokenHomeFilterer) ParseTokensRouted(log types.Log) (*NativeTokenHomeTokensRouted, error) { + event := new(NativeTokenHomeTokensRouted) + if err := _NativeTokenHome.contract.UnpackLog(event, "TokensRouted", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// NativeTokenHomeTokensSentIterator is returned from FilterTokensSent and is used to iterate over the raw logs and unpacked data for TokensSent events raised by the NativeTokenHome contract. +type NativeTokenHomeTokensSentIterator struct { + Event *NativeTokenHomeTokensSent // 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 interfaces.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 *NativeTokenHomeTokensSentIterator) 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(NativeTokenHomeTokensSent) + 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(NativeTokenHomeTokensSent) + 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 *NativeTokenHomeTokensSentIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *NativeTokenHomeTokensSentIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// NativeTokenHomeTokensSent represents a TokensSent event raised by the NativeTokenHome contract. +type NativeTokenHomeTokensSent struct { + TeleporterMessageID [32]byte + Sender common.Address + Input SendTokensInput + Amount *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterTokensSent is a free log retrieval operation binding the contract event 0x93f19bf1ec58a15dc643b37e7e18a1c13e85e06cd11929e283154691ace9fb52. +// +// Solidity: event TokensSent(bytes32 indexed teleporterMessageID, address indexed sender, (bytes32,address,address,address,uint256,uint256,uint256,address) input, uint256 amount) +func (_NativeTokenHome *NativeTokenHomeFilterer) FilterTokensSent(opts *bind.FilterOpts, teleporterMessageID [][32]byte, sender []common.Address) (*NativeTokenHomeTokensSentIterator, error) { + + var teleporterMessageIDRule []interface{} + for _, teleporterMessageIDItem := range teleporterMessageID { + teleporterMessageIDRule = append(teleporterMessageIDRule, teleporterMessageIDItem) + } + var senderRule []interface{} + for _, senderItem := range sender { + senderRule = append(senderRule, senderItem) + } + + logs, sub, err := _NativeTokenHome.contract.FilterLogs(opts, "TokensSent", teleporterMessageIDRule, senderRule) + if err != nil { + return nil, err + } + return &NativeTokenHomeTokensSentIterator{contract: _NativeTokenHome.contract, event: "TokensSent", logs: logs, sub: sub}, nil +} + +// WatchTokensSent is a free log subscription operation binding the contract event 0x93f19bf1ec58a15dc643b37e7e18a1c13e85e06cd11929e283154691ace9fb52. +// +// Solidity: event TokensSent(bytes32 indexed teleporterMessageID, address indexed sender, (bytes32,address,address,address,uint256,uint256,uint256,address) input, uint256 amount) +func (_NativeTokenHome *NativeTokenHomeFilterer) WatchTokensSent(opts *bind.WatchOpts, sink chan<- *NativeTokenHomeTokensSent, teleporterMessageID [][32]byte, sender []common.Address) (event.Subscription, error) { + + var teleporterMessageIDRule []interface{} + for _, teleporterMessageIDItem := range teleporterMessageID { + teleporterMessageIDRule = append(teleporterMessageIDRule, teleporterMessageIDItem) + } + var senderRule []interface{} + for _, senderItem := range sender { + senderRule = append(senderRule, senderItem) + } + + logs, sub, err := _NativeTokenHome.contract.WatchLogs(opts, "TokensSent", teleporterMessageIDRule, senderRule) + 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(NativeTokenHomeTokensSent) + if err := _NativeTokenHome.contract.UnpackLog(event, "TokensSent", 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 +} + +// ParseTokensSent is a log parse operation binding the contract event 0x93f19bf1ec58a15dc643b37e7e18a1c13e85e06cd11929e283154691ace9fb52. +// +// Solidity: event TokensSent(bytes32 indexed teleporterMessageID, address indexed sender, (bytes32,address,address,address,uint256,uint256,uint256,address) input, uint256 amount) +func (_NativeTokenHome *NativeTokenHomeFilterer) ParseTokensSent(log types.Log) (*NativeTokenHomeTokensSent, error) { + event := new(NativeTokenHomeTokensSent) + if err := _NativeTokenHome.contract.UnpackLog(event, "TokensSent", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// NativeTokenHomeTokensWithdrawnIterator is returned from FilterTokensWithdrawn and is used to iterate over the raw logs and unpacked data for TokensWithdrawn events raised by the NativeTokenHome contract. +type NativeTokenHomeTokensWithdrawnIterator struct { + Event *NativeTokenHomeTokensWithdrawn // 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 interfaces.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 *NativeTokenHomeTokensWithdrawnIterator) 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(NativeTokenHomeTokensWithdrawn) + 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(NativeTokenHomeTokensWithdrawn) + 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 *NativeTokenHomeTokensWithdrawnIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *NativeTokenHomeTokensWithdrawnIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// NativeTokenHomeTokensWithdrawn represents a TokensWithdrawn event raised by the NativeTokenHome contract. +type NativeTokenHomeTokensWithdrawn struct { + Recipient common.Address + Amount *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterTokensWithdrawn is a free log retrieval operation binding the contract event 0x6352c5382c4a4578e712449ca65e83cdb392d045dfcf1cad9615189db2da244b. +// +// Solidity: event TokensWithdrawn(address indexed recipient, uint256 amount) +func (_NativeTokenHome *NativeTokenHomeFilterer) FilterTokensWithdrawn(opts *bind.FilterOpts, recipient []common.Address) (*NativeTokenHomeTokensWithdrawnIterator, error) { + + var recipientRule []interface{} + for _, recipientItem := range recipient { + recipientRule = append(recipientRule, recipientItem) + } + + logs, sub, err := _NativeTokenHome.contract.FilterLogs(opts, "TokensWithdrawn", recipientRule) + if err != nil { + return nil, err + } + return &NativeTokenHomeTokensWithdrawnIterator{contract: _NativeTokenHome.contract, event: "TokensWithdrawn", logs: logs, sub: sub}, nil +} + +// WatchTokensWithdrawn is a free log subscription operation binding the contract event 0x6352c5382c4a4578e712449ca65e83cdb392d045dfcf1cad9615189db2da244b. +// +// Solidity: event TokensWithdrawn(address indexed recipient, uint256 amount) +func (_NativeTokenHome *NativeTokenHomeFilterer) WatchTokensWithdrawn(opts *bind.WatchOpts, sink chan<- *NativeTokenHomeTokensWithdrawn, recipient []common.Address) (event.Subscription, error) { + + var recipientRule []interface{} + for _, recipientItem := range recipient { + recipientRule = append(recipientRule, recipientItem) + } + + logs, sub, err := _NativeTokenHome.contract.WatchLogs(opts, "TokensWithdrawn", recipientRule) + 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(NativeTokenHomeTokensWithdrawn) + if err := _NativeTokenHome.contract.UnpackLog(event, "TokensWithdrawn", 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 +} + +// ParseTokensWithdrawn is a log parse operation binding the contract event 0x6352c5382c4a4578e712449ca65e83cdb392d045dfcf1cad9615189db2da244b. +// +// Solidity: event TokensWithdrawn(address indexed recipient, uint256 amount) +func (_NativeTokenHome *NativeTokenHomeFilterer) ParseTokensWithdrawn(log types.Log) (*NativeTokenHomeTokensWithdrawn, error) { + event := new(NativeTokenHomeTokensWithdrawn) + if err := _NativeTokenHome.contract.UnpackLog(event, "TokensWithdrawn", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} diff --git a/abi-bindings/go/ictt/TokenHome/NativeTokenHomeUpgradeable/NativeTokenHomeUpgradeable.go b/abi-bindings/go/ictt/TokenHome/NativeTokenHomeUpgradeable/NativeTokenHomeUpgradeable.go new file mode 100644 index 000000000..9558e7ca8 --- /dev/null +++ b/abi-bindings/go/ictt/TokenHome/NativeTokenHomeUpgradeable/NativeTokenHomeUpgradeable.go @@ -0,0 +1,2854 @@ +// Code generated - DO NOT EDIT. +// This file is a generated binding and any manual changes will be lost. + +package nativetokenhomeupgradeable + +import ( + "errors" + "math/big" + "strings" + + "github.com/ava-labs/subnet-evm/accounts/abi" + "github.com/ava-labs/subnet-evm/accounts/abi/bind" + "github.com/ava-labs/subnet-evm/core/types" + "github.com/ava-labs/subnet-evm/interfaces" + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/event" +) + +// Reference imports to suppress errors if they are not otherwise used. +var ( + _ = errors.New + _ = big.NewInt + _ = strings.NewReader + _ = interfaces.NotFound + _ = bind.Bind + _ = common.Big1 + _ = types.BloomLookup + _ = event.NewSubscription + _ = abi.ConvertType +) + +// RemoteTokenTransferrerSettings is an auto generated low-level Go binding around an user-defined struct. +type RemoteTokenTransferrerSettings struct { + Registered bool + CollateralNeeded *big.Int + TokenMultiplier *big.Int + MultiplyOnRemote bool +} + +// SendAndCallInput is an auto generated low-level Go binding around an user-defined struct. +type SendAndCallInput struct { + DestinationBlockchainID [32]byte + DestinationTokenTransferrerAddress common.Address + RecipientContract common.Address + RecipientPayload []byte + RequiredGasLimit *big.Int + RecipientGasLimit *big.Int + MultiHopFallback common.Address + FallbackRecipient common.Address + PrimaryFeeTokenAddress common.Address + PrimaryFee *big.Int + SecondaryFee *big.Int +} + +// SendTokensInput is an auto generated low-level Go binding around an user-defined struct. +type SendTokensInput struct { + DestinationBlockchainID [32]byte + DestinationTokenTransferrerAddress common.Address + Recipient common.Address + PrimaryFeeTokenAddress common.Address + PrimaryFee *big.Int + SecondaryFee *big.Int + RequiredGasLimit *big.Int + MultiHopFallback common.Address +} + +// NativeTokenHomeUpgradeableMetaData contains all meta data concerning the NativeTokenHomeUpgradeable contract. +var NativeTokenHomeUpgradeableMetaData = &bind.MetaData{ + ABI: "[{\"inputs\":[{\"internalType\":\"enumICMInitializable\",\"name\":\"init\",\"type\":\"uint8\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"target\",\"type\":\"address\"}],\"name\":\"AddressEmptyCode\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"AddressInsufficientBalance\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"FailedInnerCall\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidInitialization\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotInitializing\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"OwnableInvalidOwner\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"OwnableUnauthorizedAccount\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ReentrancyGuardReentrantCall\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"SafeERC20FailedOperation\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"recipientContract\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"CallFailed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"recipientContract\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"CallSucceeded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"remoteBlockchainID\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"remoteTokenTransferrerAddress\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"remaining\",\"type\":\"uint256\"}],\"name\":\"CollateralAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"version\",\"type\":\"uint64\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"oldMinTeleporterVersion\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"newMinTeleporterVersion\",\"type\":\"uint256\"}],\"name\":\"MinTeleporterVersionUpdated\",\"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\":\"bytes32\",\"name\":\"remoteBlockchainID\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"remoteTokenTransferrerAddress\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"initialCollateralNeeded\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"tokenDecimals\",\"type\":\"uint8\"}],\"name\":\"RemoteRegistered\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"teleporterAddress\",\"type\":\"address\"}],\"name\":\"TeleporterAddressPaused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"teleporterAddress\",\"type\":\"address\"}],\"name\":\"TeleporterAddressUnpaused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"teleporterMessageID\",\"type\":\"bytes32\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"destinationBlockchainID\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"destinationTokenTransferrerAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"recipientContract\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"recipientPayload\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"requiredGasLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"recipientGasLimit\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"multiHopFallback\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"fallbackRecipient\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"primaryFeeTokenAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"primaryFee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"secondaryFee\",\"type\":\"uint256\"}],\"indexed\":false,\"internalType\":\"structSendAndCallInput\",\"name\":\"input\",\"type\":\"tuple\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"TokensAndCallRouted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"teleporterMessageID\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"destinationBlockchainID\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"destinationTokenTransferrerAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"recipientContract\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"recipientPayload\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"requiredGasLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"recipientGasLimit\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"multiHopFallback\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"fallbackRecipient\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"primaryFeeTokenAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"primaryFee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"secondaryFee\",\"type\":\"uint256\"}],\"indexed\":false,\"internalType\":\"structSendAndCallInput\",\"name\":\"input\",\"type\":\"tuple\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"TokensAndCallSent\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"teleporterMessageID\",\"type\":\"bytes32\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"destinationBlockchainID\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"destinationTokenTransferrerAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"primaryFeeTokenAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"primaryFee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"secondaryFee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"requiredGasLimit\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"multiHopFallback\",\"type\":\"address\"}],\"indexed\":false,\"internalType\":\"structSendTokensInput\",\"name\":\"input\",\"type\":\"tuple\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"TokensRouted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"teleporterMessageID\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"destinationBlockchainID\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"destinationTokenTransferrerAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"primaryFeeTokenAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"primaryFee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"secondaryFee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"requiredGasLimit\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"multiHopFallback\",\"type\":\"address\"}],\"indexed\":false,\"internalType\":\"structSendTokensInput\",\"name\":\"input\",\"type\":\"tuple\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"TokensSent\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"TokensWithdrawn\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"NATIVE_TOKEN_HOME_STORAGE_LOCATION\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"TELEPORTER_REGISTRY_APP_STORAGE_LOCATION\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"TOKEN_HOME_STORAGE_LOCATION\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"remoteBlockchainID\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"remoteTokenTransferrerAddress\",\"type\":\"address\"}],\"name\":\"addCollateral\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getBlockchainID\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getMinTeleporterVersion\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"remoteBlockchainID\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"remoteTokenTransferrerAddress\",\"type\":\"address\"}],\"name\":\"getRemoteTokenTransferrerSettings\",\"outputs\":[{\"components\":[{\"internalType\":\"bool\",\"name\":\"registered\",\"type\":\"bool\"},{\"internalType\":\"uint256\",\"name\":\"collateralNeeded\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"tokenMultiplier\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"multiplyOnRemote\",\"type\":\"bool\"}],\"internalType\":\"structRemoteTokenTransferrerSettings\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getTokenAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"remoteBlockchainID\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"remoteTokenTransferrerAddress\",\"type\":\"address\"}],\"name\":\"getTransferredBalance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"teleporterRegistryAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"teleporterManager\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"minTeleporterVersion\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"wrappedTokenAddress\",\"type\":\"address\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"teleporterAddress\",\"type\":\"address\"}],\"name\":\"isTeleporterAddressPaused\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"teleporterAddress\",\"type\":\"address\"}],\"name\":\"pauseTeleporterAddress\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"sourceBlockchainID\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"originSenderAddress\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"message\",\"type\":\"bytes\"}],\"name\":\"receiveTeleporterMessage\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"destinationBlockchainID\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"destinationTokenTransferrerAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"primaryFeeTokenAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"primaryFee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"secondaryFee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"requiredGasLimit\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"multiHopFallback\",\"type\":\"address\"}],\"internalType\":\"structSendTokensInput\",\"name\":\"input\",\"type\":\"tuple\"}],\"name\":\"send\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"destinationBlockchainID\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"destinationTokenTransferrerAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"recipientContract\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"recipientPayload\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"requiredGasLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"recipientGasLimit\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"multiHopFallback\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"fallbackRecipient\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"primaryFeeTokenAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"primaryFee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"secondaryFee\",\"type\":\"uint256\"}],\"internalType\":\"structSendAndCallInput\",\"name\":\"input\",\"type\":\"tuple\"}],\"name\":\"sendAndCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"teleporterAddress\",\"type\":\"address\"}],\"name\":\"unpauseTeleporterAddress\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"version\",\"type\":\"uint256\"}],\"name\":\"updateMinTeleporterVersion\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}]", + Bin: "0x608060405234801561000f575f80fd5b50604051614af0380380614af083398101604081905261002e91610107565b60018160018111156100425761004261012c565b0361004f5761004f610055565b50610140565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00805468010000000000000000900460ff16156100a55760405163f92ee8a960e01b815260040160405180910390fd5b80546001600160401b03908116146101045780546001600160401b0319166001600160401b0390811782556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b50565b5f60208284031215610117575f80fd5b815160028110610125575f80fd5b9392505050565b634e487b7160e01b5f52602160045260245ffd5b6149a38061014d5f395ff3fe60806040526004361061011e575f3560e01c80638da5cb5b1161009d578063c8511ada11610062578063c8511ada146103d5578063c868efaa146104b5578063d2cc7a70146104d4578063efb5b95e14610507578063f2fde38b14610527575f80fd5b80638da5cb5b14610318578063909a6ac0146103545780639731429714610374578063b0b78b26146103a3578063be203094146103b6575f80fd5b80635eb99514116100e35780635eb995141461029f57806362e3901b146102be5780636e6eef8d146102de578063715018a6146102f15780638bf2fa9414610305575f80fd5b806310fe9ae8146101bf578063154d625a146102145780632b0d8f18146102415780634213cf78146102605780634511243e14610280575f80fd5b366101bb577f9316912b5a9db88acbe872c934fdd0a46c436c6dcba332d649c4d57c7bc9e601546001600160a01b031633146101b95760405162461bcd60e51b815260206004820152602f60248201527f4e6174697665546f6b656e486f6d653a20696e76616c6964207265636569766560448201526e103830bcb0b136329039b2b73232b960891b60648201526084015b60405180910390fd5b005b5f80fd5b3480156101ca575f80fd5b507f9316912b5a9db88acbe872c934fdd0a46c436c6dcba332d649c4d57c7bc9e601546001600160a01b03165b6040516001600160a01b0390911681526020015b60405180910390f35b34801561021f575f80fd5b5061023361022e3660046139c6565b610546565b60405190815260200161020b565b34801561024c575f80fd5b506101b961025b3660046139f4565b61058e565b34801561026b575f80fd5b505f805160206148ce83398151915254610233565b34801561028b575f80fd5b506101b961029a3660046139f4565b610687565b3480156102aa575f80fd5b506101b96102b9366004613a0f565b610776565b3480156102c9575f80fd5b506102335f805160206148ce83398151915281565b6101b96102ec366004613a26565b61078a565b3480156102fc575f80fd5b506101b96107b3565b6101b9610313366004613a5d565b6107c6565b348015610323575f80fd5b507f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300546001600160a01b03166101f7565b34801561035f575f80fd5b506102335f8051602061494e83398151915281565b34801561037f575f80fd5b5061039361038e3660046139f4565b6107de565b604051901515815260200161020b565b6101b96103b13660046139c6565b6107fe565b3480156103c1575f80fd5b506101b96103d0366004613a74565b61080d565b3480156103e0575f80fd5b5061047e6103ef3660046139c6565b60408051608080820183525f808352602080840182905283850182905260609384018290529581525f8051602061490e83398151915286528381206001600160a01b039590951681529385529282902082519384018352805460ff9081161515855260018201549585019590955260028101549284019290925260039091015490921615159181019190915290565b60405161020b9190815115158152602080830151908201526040808301519082015260609182015115159181019190915260800190565b3480156104c0575f80fd5b506101b96104cf366004613ac4565b61091f565b3480156104df575f80fd5b507fde77a4dc7391f6f8f2d9567915d687d3aee79e7a1fc7300392f2727e9a0f1d0254610233565b348015610512575f80fd5b506102335f805160206148ee83398151915281565b348015610532575f80fd5b506101b96105413660046139f4565b610adc565b5f8281527f9316912b5a9db88acbe872c934fdd0a46c436c6dcba332d649c4d57c7bc9e603602090815260408083206001600160a01b03851684529091529020545b92915050565b5f8051602061494e8339815191526105a4610b16565b6001600160a01b0382166105ca5760405162461bcd60e51b81526004016101b090613b45565b6105d48183610b1e565b156106375760405162461bcd60e51b815260206004820152602d60248201527f54656c65706f7274657252656769737472794170703a2061646472657373206160448201526c1b1c9958591e481c185d5cd959609a1b60648201526084016101b0565b6001600160a01b0382165f81815260018381016020526040808320805460ff1916909217909155517f933f93e57a222e6330362af8b376d0a8725b6901e9a2fb86d00f169702b28a4c9190a25050565b5f8051602061494e83398151915261069d610b16565b6001600160a01b0382166106c35760405162461bcd60e51b81526004016101b090613b45565b6106cd8183610b1e565b61072b5760405162461bcd60e51b815260206004820152602960248201527f54656c65706f7274657252656769737472794170703a2061646472657373206e6044820152681bdd081c185d5cd95960ba1b60648201526084016101b0565b6001600160a01b0382165f818152600183016020526040808220805460ff19169055517f844e2f3154214672229235858fd029d1dfd543901c6d05931f0bc2480a2d72c39190a25050565b61077e610b16565b61078781610b3f565b50565b6107876107a25f805160206148ce8339815191525490565b30336107ad85613cbd565b34610cd7565b6107bb610f3a565b6107c45f610f95565b565b6107876107d836839003830183613d8b565b34611005565b5f5f8051602061494e8339815191526107f78184610b1e565b9392505050565b6108098282346111bf565b5050565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a008054600160401b810460ff1615906001600160401b03165f811580156108515750825b90505f826001600160401b0316600114801561086c5750303b155b90508115801561087a575080155b156108985760405163f92ee8a960e01b815260040160405180910390fd5b845467ffffffffffffffff1916600117855583156108c257845460ff60401b1916600160401b1785555b6108ce898989896113af565b831561091457845460ff60401b19168555604051600181527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b505050505050505050565b6109276113ce565b5f5f8051602061494e83398151915260028101548154919250906001600160a01b0316634c1f08ce336040516001600160e01b031960e084901b1681526001600160a01b039091166004820152602401602060405180830381865afa158015610992573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906109b69190613e15565b1015610a1d5760405162461bcd60e51b815260206004820152603060248201527f54656c65706f7274657252656769737472794170703a20696e76616c6964205460448201526f32b632b837b93a32b91039b2b73232b960811b60648201526084016101b0565b610a278133610b1e565b15610a8d5760405162461bcd60e51b815260206004820152603060248201527f54656c65706f7274657252656769737472794170703a2054656c65706f72746560448201526f1c881859191c995cdcc81c185d5cd95960821b60648201526084016101b0565b610acd858585858080601f0160208091040260200160405190810160405280939291908181526020018383808284375f9201919091525061141892505050565b50610ad661180c565b50505050565b610ae4610f3a565b6001600160a01b038116610b0d57604051631e4fbdf760e01b81525f60048201526024016101b0565b61078781610f95565b6107c4610f3a565b6001600160a01b03165f908152600191909101602052604090205460ff1690565b5f8051602061494e83398151915280546040805163301fd1f560e21b815290515f926001600160a01b03169163c07f47d49160048083019260209291908290030181865afa158015610b93573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610bb79190613e15565b600283015490915081841115610c295760405162461bcd60e51b815260206004820152603160248201527f54656c65706f7274657252656769737472794170703a20696e76616c6964205460448201527032b632b837b93a32b9103b32b939b4b7b760791b60648201526084016101b0565b808411610c9e5760405162461bcd60e51b815260206004820152603f60248201527f54656c65706f7274657252656769737472794170703a206e6f7420677265617460448201527f6572207468616e2063757272656e74206d696e696d756d2076657273696f6e0060648201526084016101b0565b60028301849055604051849082907fa9a7ef57e41f05b4c15480842f5f0c27edfcbb553fed281f7c4068452cc1c02d905f90a350505050565b5f8051602061492e8339815191528054600114610d065760405162461bcd60e51b81526004016101b090613e2c565b60028155610d1383611836565b60c08301516001600160a01b031615610d3e5760405162461bcd60e51b81526004016101b090613e70565b5f80610d5e855f0151866020015186886101000151896101200151611a1b565b915091505f604051806040016040528060026004811115610d8157610d81613eb6565b81526020016040518061010001604052808c81526020018b6001600160a01b031681526020018a6001600160a01b0316815260200189604001516001600160a01b03168152602001868152602001896060015181526020018960a0015181526020018960e001516001600160a01b0316815250604051602001610e049190613f17565b60405160208183030381529060405281525090505f610ee46040518060c00160405280895f0151815260200189602001516001600160a01b0316815260200160405180604001604052808b61010001516001600160a01b03168152602001878152508152602001896080015181526020015f6001600160401b03811115610e8d57610e8d613b93565b604051908082528060200260200182016040528015610eb6578160200160208202803683370190505b50815260200184604051602001610ecd9190613fb5565b604051602081830303815290604052815250611be0565b9050876001600160a01b0316817f5d76dff81bf773b908b050fa113d39f7d8135bb4175398f313ea19cd3a1a0b168987604051610f22929190613ff7565b60405180910390a35050600190925550505050505050565b33610f6c7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300546001600160a01b031690565b6001600160a01b0316146107c45760405163118cdaa760e01b81523360048201526024016101b0565b7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c19930080546001600160a01b031981166001600160a01b03848116918217845560405192169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0905f90a3505050565b5f8051602061492e83398151915280546001146110345760405162461bcd60e51b81526004016101b090613e2c565b6002815561104183611cfb565b60e08301516001600160a01b03161561106c5760405162461bcd60e51b81526004016101b090613e70565b5f8061108a855f015186602001518688606001518960800151611a1b565b915091505f6040518060400160405280600160048111156110ad576110ad613eb6565b8152602001604051806040016040528089604001516001600160a01b03168152602001868152506040516020016110e491906140d9565b60405160208183030381529060405281525090505f61116c6040518060c00160405280895f0151815260200189602001516001600160a01b0316815260200160405180604001604052808b606001516001600160a01b031681526020018781525081526020018960c0015181526020015f6001600160401b03811115610e8d57610e8d613b93565b9050336001600160a01b0316817f93f19bf1ec58a15dc643b37e7e18a1c13e85e06cd11929e283154691ace9fb5289876040516111aa9291906140f9565b60405180910390a35050600190925550505050565b5f8051602061492e83398151915280546001146111ee5760405162461bcd60e51b81526004016101b090613e2c565b60028082555f8581525f8051602061490e833981519152602090815260408083206001600160a01b03881684528252918290208251608081018452815460ff9081161515808352600184015494830194909452948201549381019390935260030154909216151560608201525f805160206148ce833981519152916112855760405162461bcd60e51b81526004016101b09061417a565b5f8160200151116112e25760405162461bcd60e51b815260206004820152602160248201527f546f6b656e486f6d653a207a65726f20636f6c6c61746572616c206e656564656044820152601960fa1b60648201526084016101b0565b6112eb84611da4565b93505f808260200151861061131a5760208301515f925061130c90876141c3565b90508260200151955061132d565b85836020015161132a91906141c3565b91505b5f88815260028501602090815260408083206001600160a01b038b168085529083529281902060010185905580518981529182018590528a917f6769a5f9bfc8b6e0db839ab981cbf9239274ae72d2d035081a9157d43bd33cb6910160405180910390a380156113a1576113a13382611dca565b505060019092555050505050565b6113b7611e88565b6113c5848484846012611ed1565b610ad681611ef6565b7f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f0080546001190161141257604051633ee5aeb560e01b815260040160405180910390fd5b60029055565b5f5f805160206148ce83398151915290505f8280602001905181019061143e9190614218565b905060018151600481111561145557611455613eb6565b0361149d575f816020015180602001905181019061147391906142a0565b90505f61148587878460200151611f2c565b9050611494825f015182611dca565b50505050505050565b6002815160048111156114b2576114b2613eb6565b036115cb575f81602001518060200190518101906114d091906142d8565b90505f6114e287878460800151611f2c565b825190915087146115485760405162461bcd60e51b815260206004820152602a60248201527f546f6b656e486f6d653a206d69736d61746368656420736f7572636520626c6f60448201526918dad8da185a5b88125160b21b60648201526084016101b0565b856001600160a01b031682602001516001600160a01b0316146115c15760405162461bcd60e51b815260206004820152602b60248201527f546f6b656e486f6d653a206d69736d617463686564206f726967696e2073656e60448201526a646572206164647265737360a81b60648201526084016101b0565b6114948282611fb7565b6003815160048111156115e0576115e0613eb6565b036116b4575f81602001518060200190518101906115fe91906143a2565b90505f8061161688888560600151866080015161213d565b915091506116aa604051806101000160405280855f0151815260200185602001516001600160a01b0316815260200185604001516001600160a01b03168152602001876001015f9054906101000a90046001600160a01b03166001600160a01b031681526020018381526020015f81526020018560a0015181526020018560c001516001600160a01b0316815250836121e8565b5050505050505050565b6004815160048111156116c9576116c9613eb6565b036117c4575f81602001518060200190518101906116e7919061443b565b90505f806117008888856080015186610140015161213d565b915091506116aa8888855f01516040518061016001604052808860200151815260200188604001516001600160a01b0316815260200188606001516001600160a01b031681526020018860a00151815260200188610100015181526020018860c0015181526020018861012001516001600160a01b031681526020018860e001516001600160a01b031681526020018a6001015f9054906101000a90046001600160a01b03166001600160a01b031681526020018681526020015f81525086612373565b5f815160048111156117d8576117d8613eb6565b03611805575f81602001518060200190518101906117f69190614543565b9050611803868683612550565b505b5050505050565b5f7f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f005b6001905550565b60408101516001600160a01b03166118a35760405162461bcd60e51b815260206004820152602a60248201527f546f6b656e486f6d653a207a65726f20726563697069656e7420636f6e7472616044820152696374206164647265737360b01b60648201526084016101b0565b5f8160800151116118c65760405162461bcd60e51b81526004016101b0906145a5565b5f8160a00151116119255760405162461bcd60e51b815260206004820152602360248201527f546f6b656e486f6d653a207a65726f20726563697069656e7420676173206c696044820152621b5a5d60ea1b60648201526084016101b0565b80608001518160a001511061198b5760405162461bcd60e51b815260206004820152602660248201527f546f6b656e486f6d653a20696e76616c696420726563697069656e7420676173604482015265081b1a5b5a5d60d21b60648201526084016101b0565b60e08101516001600160a01b03166119f85760405162461bcd60e51b815260206004820152602a60248201527f546f6b656e486f6d653a207a65726f2066616c6c6261636b20726563697069656044820152696e74206164647265737360b01b60648201526084016101b0565b610140810151156107875760405162461bcd60e51b81526004016101b0906145e7565b5f8581525f8051602061490e833981519152602090815260408083206001600160a01b038816845282528083208151608081018352815460ff90811615158083526001840154958301959095526002830154938201939093526003909101549091161515606082015282915f805160206148ce8339815191529190611ab25760405162461bcd60e51b81526004016101b09061417a565b602081015115611b145760405162461bcd60e51b815260206004820152602760248201527f546f6b656e486f6d653a20636f6c6c61746572616c206e656564656420666f726044820152662072656d6f746560c81b60648201526084016101b0565b611b1d87611da4565b96508415611b3357611b30863387612957565b94505b5f611b47826040015183606001518a612ab0565b90505f8111611b985760405162461bcd60e51b815260206004820152601d60248201527f546f6b656e486f6d653a207a65726f207363616c656420616d6f756e7400000060448201526064016101b0565b5f8a815260038401602090815260408083206001600160a01b038d16845290915281208054839290611bcb908490614628565b90915550909a95995094975050505050505050565b5f80611bea612ac6565b60408401516020015190915015611c8f576040830151516001600160a01b0316611c6c5760405162461bcd60e51b815260206004820152602d60248201527f54656c65706f7274657252656769737472794170703a207a65726f206665652060448201526c746f6b656e206164647265737360981b60648201526084016101b0565b604083015160208101519051611c8f916001600160a01b03909116908390612bb6565b604051630624488560e41b81526001600160a01b03821690636244885090611cbb90869060040161463b565b6020604051808303815f875af1158015611cd7573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906107f79190613e15565b60408101516001600160a01b0316611d5f5760405162461bcd60e51b815260206004820152602160248201527f546f6b656e486f6d653a207a65726f20726563697069656e74206164647265736044820152607360f81b60648201526084016101b0565b5f8160c0015111611d825760405162461bcd60e51b81526004016101b0906145a5565b60a0810151156107875760405162461bcd60e51b81526004016101b0906145e7565b5f805160206148ee83398151915280545f91906107f7906001600160a01b031684612c3d565b6040518181525f805160206148ee833981519152906001600160a01b038416907f6352c5382c4a4578e712449ca65e83cdb392d045dfcf1cad9615189db2da244b9060200160405180910390a28054604051632e1a7d4d60e01b8152600481018490526001600160a01b0390911690632e1a7d4d906024015f604051808303815f87803b158015611e59575f80fd5b505af1158015611e6b573d5f803e3d5ffd5b50611e83925050506001600160a01b03841683612de2565b505050565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0054600160401b900460ff166107c457604051631afcd79f60e31b815260040160405180910390fd5b611ed9611e88565b611ee4858585612e75565b611eec612e90565b6118058282612ea0565b611efe611e88565b5f805160206148ee83398151915280546001600160a01b0319166001600160a01b0392909216919091179055565b5f8381525f8051602061490e833981519152602090815260408083206001600160a01b038616845282528083208151608081018352815460ff9081161515825260018301549482019490945260028201549281019290925260030154909116151560608201525f805160206148ce83398151915290611fad81878787613007565b9695505050505050565b5f5f805160206148ee8339815191528054604051632e1a7d4d60e01b8152600481018590529192506001600160a01b031690632e1a7d4d906024015f604051808303815f87803b158015612009575f80fd5b505af115801561201b573d5f803e3d5ffd5b50508451602086015160408088015160a089015191515f965061204495509091906024016146f2565b60408051601f198184030181529190526020810180516001600160e01b031663161b12ff60e11b17905260c085015160608601519192505f9161208a91908690856130f5565b905080156120de5784606001516001600160a01b03167f104deb555f67e63782bb817bc26c39050894645f9b9f29c4be8ae68d0e8b7ff4856040516120d191815260200190565b60405180910390a2611805565b84606001516001600160a01b03167fb9eaeae386d339f8115782f297a9e5f0e13fb587cd6b0d502f113cb8dd4d6cb08560405161211d91815260200190565b60405180910390a260e0850151611805906001600160a01b031685612de2565b5f8481525f8051602061490e833981519152602090815260408083206001600160a01b038716845282528083208151608081018352815460ff90811615158252600183015494820194909452600282015492810192909252600301549091161515606082015281905f805160206148ce83398151915290826121c1828a8a8a613007565b90505f6121d783604001518460600151896131c5565b919a91995090975050505050505050565b5f8051602061492e83398151915280546001146122175760405162461bcd60e51b81526004016101b090613e2c565b6002815561222483611cfb565b5f61223c845f015185602001518587608001516131d2565b9050805f03612259576122538460e0015184611dca565b5061236b565b604080518082019091525f908060018152602001604051806040016040528088604001516001600160a01b031681526020018581525060405160200161229f91906140d9565b60405160208183030381529060405281525090505f61232b6040518060c00160405280885f0151815260200188602001516001600160a01b0316815260200160405180604001604052808a606001516001600160a01b031681526020018a6080015181525081526020018860c0015181526020015f6001600160401b03811115610e8d57610e8d613b93565b9050807f825080857c76cef4a1629c0705a7f8b4ef0282ddcafde0b6715c4fb34b68aaf0878560405161235f9291906140f9565b60405180910390a25050505b600190555050565b5f8051602061492e83398151915280546001146123a25760405162461bcd60e51b81526004016101b090613e2c565b600281556123af83611836565b5f6123c8845f01518560200151858761012001516131d2565b9050805f036123e5576123df8460c0015184611dca565b50612545565b604080518082019091525f9080600281526020016040518061010001604052808b81526020018a6001600160a01b03168152602001896001600160a01b0316815260200188604001516001600160a01b03168152602001858152602001886060015181526020018860a0015181526020018860e001516001600160a01b03168152506040516020016124779190613f17565b60405160208183030381529060405281525090505f6125056040518060c00160405280885f0151815260200188602001516001600160a01b0316815260200160405180604001604052808a61010001516001600160a01b031681526020018a61012001518152508152602001886080015181526020015f6001600160401b03811115610e8d57610e8d613b93565b9050807f42eff9005856e3c586b096d67211a566dc926052119fd7cc08023c70937ecb308785604051612539929190613ff7565b60405180910390a25050505b600190555050505050565b5f805160206148ce833981519152836125b75760405162461bcd60e51b8152602060048201526024808201527f546f6b656e486f6d653a207a65726f2072656d6f746520626c6f636b636861696044820152631b88125160e21b60648201526084016101b0565b8054840361261f5760405162461bcd60e51b815260206004820152602f60248201527f546f6b656e486f6d653a2063616e6e6f742072656769737465722072656d6f7460448201526e329037b71039b0b6b29031b430b4b760891b60648201526084016101b0565b6001600160a01b03831661268e5760405162461bcd60e51b815260206004820152603060248201527f546f6b656e486f6d653a207a65726f2072656d6f746520746f6b656e2074726160448201526f6e73666572726572206164647265737360801b60648201526084016101b0565b5f84815260028201602090815260408083206001600160a01b038716845290915290205460ff161561270e5760405162461bcd60e51b8152602060048201526024808201527f546f6b656e486f6d653a2072656d6f746520616c726561647920726567697374604482015263195c995960e21b60648201526084016101b0565b6012826040015160ff1611156127785760405162461bcd60e51b815260206004820152602960248201527f546f6b656e486f6d653a2072656d6f746520746f6b656e20646563696d616c73604482015268040e8dede40d0d2ced60bb1b60648201526084016101b0565b6001810154602083015160ff908116600160a01b90920416146127ec5760405162461bcd60e51b815260206004820152602660248201527f546f6b656e486f6d653a20696e76616c696420686f6d6520746f6b656e20646560448201526563696d616c7360d01b60648201526084016101b0565b5f8061280d8360010160149054906101000a900460ff168560400151613343565b915091505f6128208383875f01516131c5565b905081801561283a57508451612837908490614737565b15155b1561284d5761284a600182614628565b90505b6040518060800160405280600115158152602001828152602001848152602001831515815250846002015f8981526020019081526020015f205f886001600160a01b03166001600160a01b031681526020019081526020015f205f820151815f015f6101000a81548160ff02191690831515021790555060208201518160010155604082015181600201556060820151816003015f6101000a81548160ff021916908315150217905550905050856001600160a01b0316877ff229b02a51a4c8d5ef03a096ae0dd727d7b48b710d21b50ebebb560eef739b9083886040015160405161294692919091825260ff16602082015260400190565b60405180910390a350505050505050565b6040516370a0823160e01b81523060048201525f9081906001600160a01b038616906370a0823190602401602060405180830381865afa15801561299d573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906129c19190613e15565b90506129d86001600160a01b03861685308661338b565b6040516370a0823160e01b81523060048201525f906001600160a01b038716906370a0823190602401602060405180830381865afa158015612a1c573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612a409190613e15565b9050818111612aa65760405162461bcd60e51b815260206004820152602c60248201527f5361666545524332305472616e7366657246726f6d3a2062616c616e6365206e60448201526b1bdd081a5b98dc99585cd95960a21b60648201526084016101b0565b611fad82826141c3565b5f612abe84848460016133f2565b949350505050565b5f8051602061494e83398151915280546040805163d820e64f60e01b815290515f939284926001600160a01b039091169163d820e64f916004808201926020929091908290030181865afa158015612b20573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612b44919061474a565b9050612b508282610b1e565b156105885760405162461bcd60e51b815260206004820152603060248201527f54656c65706f7274657252656769737472794170703a2054656c65706f72746560448201526f1c881cd95b991a5b99c81c185d5cd95960821b60648201526084016101b0565b604051636eb1769f60e11b81523060048201526001600160a01b0383811660248301525f919085169063dd62ed3e90604401602060405180830381865afa158015612c03573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612c279190613e15565b9050610ad68484612c388585614628565b613419565b6040516370a0823160e01b81523060048201525f9081906001600160a01b038516906370a0823190602401602060405180830381865afa158015612c83573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612ca79190613e15565b9050836001600160a01b031663d0e30db0846040518263ffffffff1660e01b81526004015f604051808303818588803b158015612ce2575f80fd5b505af1158015612cf4573d5f803e3d5ffd5b50506040516370a0823160e01b81523060048201525f93506001600160a01b03881692506370a082319150602401602060405180830381865afa158015612d3d573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612d619190613e15565b9050818111612dcf5760405162461bcd60e51b815260206004820152603460248201527f53616665577261707065644e6174697665546f6b656e4465706f7369743a2062604482015273185b185b98d9481b9bdd081a5b98dc99585cd95960621b60648201526084016101b0565b612dd982826141c3565b95945050505050565b80471015612e055760405163cd78605960e01b81523060048201526024016101b0565b5f826001600160a01b0316826040515f6040518083038185875af1925050503d805f8114612e4e576040519150601f19603f3d011682016040523d82523d5f602084013e612e53565b606091505b5050905080611e8357604051630a12f52160e11b815260040160405180910390fd5b612e7d611e88565b612e8783826134a8565b611e83826134ca565b612e98611e88565b6107c46134db565b612ea8611e88565b6001600160a01b038216612efe5760405162461bcd60e51b815260206004820152601d60248201527f546f6b656e486f6d653a207a65726f20746f6b656e206164647265737300000060448201526064016101b0565b60128160ff161115612f5d5760405162461bcd60e51b815260206004820152602260248201527f546f6b656e486f6d653a20746f6b656e20646563696d616c7320746f6f2068696044820152610ced60f31b60648201526084016101b0565b5f5f805160206148ce83398151915290506005600160991b016001600160a01b0316634213cf786040518163ffffffff1660e01b8152600401602060405180830381865afa158015612fb1573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612fd59190613e15565b8155600101805460ff909216600160a01b026001600160a81b03199092166001600160a01b0390931692909217179055565b83515f906130275760405162461bcd60e51b81526004016101b09061417a565b6020850151156130855760405162461bcd60e51b8152602060048201526024808201527f546f6b656e486f6d653a2072656d6f7465206e6f7420636f6c6c61746572616c6044820152631a5e995960e21b60648201526084016101b0565b6130908484846134ef565b5f6130a486604001518760600151856131c5565b90505f8111612dd95760405162461bcd60e51b815260206004820152601c60248201527f546f6b656e486f6d653a207a65726f20746f6b656e20616d6f756e740000000060448201526064016101b0565b5f845a10156131465760405162461bcd60e51b815260206004820152601b60248201527f43616c6c5574696c733a20696e73756666696369656e7420676173000000000060448201526064016101b0565b834710156131965760405162461bcd60e51b815260206004820152601d60248201527f43616c6c5574696c733a20696e73756666696369656e742076616c756500000060448201526064016101b0565b826001600160a01b03163b5f036131ae57505f612abe565b5f805f84516020860188888bf19695505050505050565b5f612abe8484845f6133f2565b5f8481525f8051602061490e833981519152602090815260408083206001600160a01b038716845282528083208151608081018352815460ff9081161580158352600184015495830195909552600283015493820193909352600390910154909116151560608201525f805160206148ce833981519152918061325857505f8160200151115b15613267575f92505050612abe565b8385116132cb5760405162461bcd60e51b815260206004820152602c60248201527f546f6b656e486f6d653a20696e73756666696369656e7420616d6f756e74207460448201526b6f20636f766572206665657360a01b60648201526084016101b0565b6132d584866141c3565b94505f6132eb8260400151836060015188612ab0565b9050805f036132ff575f9350505050612abe565b5f88815260038401602090815260408083206001600160a01b038b16845290915281208054839290613332908490614628565b909155509098975050505050505050565b5f8060ff8085169084161181816133665761335e8587614765565b60ff16613374565b6133708686614765565b60ff165b61337f90600a61485e565b96919550909350505050565b6040516001600160a01b038481166024830152838116604483015260648201839052610ad69186918216906323b872dd906084015b604051602081830303815290604052915060e01b6020820180516001600160e01b0383818316178352505050506135dc565b5f8115158415150361340f576134088584614869565b9050612abe565b612dd98584614880565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663095ea7b360e01b17905261346a848261363d565b610ad6576040516001600160a01b0384811660248301525f604483015261349e91869182169063095ea7b3906064016133c0565b610ad684826135dc565b6134b0611e88565b6134b86136da565b6134c06136ea565b61080982826136f2565b6134d2611e88565b61078781613876565b5f5f8051602061492e83398151915261182f565b5f8381527f9316912b5a9db88acbe872c934fdd0a46c436c6dcba332d649c4d57c7bc9e603602090815260408083206001600160a01b03861684529091529020545f805160206148ce83398151915290828110156135a65760405162461bcd60e51b815260206004820152602e60248201527f546f6b656e486f6d653a20696e73756666696369656e7420746f6b656e20747260448201526d616e736665722062616c616e636560901b60648201526084016101b0565b6135b083826141c3565b5f9586526003909201602090815260408087206001600160a01b03909616875294905250919092205550565b5f6135f06001600160a01b0384168361387e565b905080515f141580156136145750808060200190518101906136129190614893565b155b15611e8357604051635274afe760e01b81526001600160a01b03841660048201526024016101b0565b5f805f846001600160a01b03168460405161365891906148b2565b5f604051808303815f865af19150503d805f8114613691576040519150601f19603f3d011682016040523d82523d5f602084013e613696565b606091505b50915091508180156136c05750805115806136c05750808060200190518101906136c09190614893565b8015612dd95750505050506001600160a01b03163b151590565b6136e2611e88565b6107c461388b565b6107c4611e88565b6136fa611e88565b6001600160a01b0382166137765760405162461bcd60e51b815260206004820152603760248201527f54656c65706f7274657252656769737472794170703a207a65726f2054656c6560448201527f706f72746572207265676973747279206164647265737300000000000000000060648201526084016101b0565b5f5f8051602061494e83398151915290505f8390505f816001600160a01b031663c07f47d46040518163ffffffff1660e01b8152600401602060405180830381865afa1580156137c8573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906137ec9190613e15565b116138545760405162461bcd60e51b815260206004820152603260248201527f54656c65706f7274657252656769737472794170703a20696e76616c69642054604482015271656c65706f7274657220726567697374727960701b60648201526084016101b0565b81546001600160a01b0319166001600160a01b038216178255610ad683610b3f565b610ae4611e88565b60606107f783835f613893565b61180c611e88565b6060814710156138b85760405163cd78605960e01b81523060048201526024016101b0565b5f80856001600160a01b031684866040516138d391906148b2565b5f6040518083038185875af1925050503d805f811461390d576040519150601f19603f3d011682016040523d82523d5f602084013e613912565b606091505b5091509150611fad8683836060826139325761392d82613979565b6107f7565b815115801561394957506001600160a01b0384163b155b1561397257604051639996b31560e01b81526001600160a01b03851660048201526024016101b0565b50806107f7565b8051156139895780518082602001fd5b604051630a12f52160e11b815260040160405180910390fd5b6001600160a01b0381168114610787575f80fd5b80356139c1816139a2565b919050565b5f80604083850312156139d7575f80fd5b8235915060208301356139e9816139a2565b809150509250929050565b5f60208284031215613a04575f80fd5b81356107f7816139a2565b5f60208284031215613a1f575f80fd5b5035919050565b5f60208284031215613a36575f80fd5b81356001600160401b03811115613a4b575f80fd5b820161016081850312156107f7575f80fd5b5f6101008284031215613a6e575f80fd5b50919050565b5f805f8060808587031215613a87575f80fd5b8435613a92816139a2565b93506020850135613aa2816139a2565b9250604085013591506060850135613ab9816139a2565b939692955090935050565b5f805f8060608587031215613ad7575f80fd5b843593506020850135613ae9816139a2565b925060408501356001600160401b0380821115613b04575f80fd5b818701915087601f830112613b17575f80fd5b813581811115613b25575f80fd5b886020828501011115613b36575f80fd5b95989497505060200194505050565b6020808252602e908201527f54656c65706f7274657252656769737472794170703a207a65726f2054656c6560408201526d706f72746572206164647265737360901b606082015260800190565b634e487b7160e01b5f52604160045260245ffd5b60405161016081016001600160401b0381118282101715613bca57613bca613b93565b60405290565b60405161010081016001600160401b0381118282101715613bca57613bca613b93565b604080519081016001600160401b0381118282101715613bca57613bca613b93565b604051601f8201601f191681016001600160401b0381118282101715613c3d57613c3d613b93565b604052919050565b5f6001600160401b03821115613c5d57613c5d613b93565b50601f01601f191660200190565b5f82601f830112613c7a575f80fd5b8135613c8d613c8882613c45565b613c15565b818152846020838601011115613ca1575f80fd5b816020850160208301375f918101602001919091529392505050565b5f6101608236031215613cce575f80fd5b613cd6613ba7565b82358152613ce6602084016139b6565b6020820152613cf7604084016139b6565b604082015260608301356001600160401b03811115613d14575f80fd5b613d2036828601613c6b565b6060830152506080830135608082015260a083013560a0820152613d4660c084016139b6565b60c0820152613d5760e084016139b6565b60e0820152610100613d6a8185016139b6565b90820152610120838101359082015261014092830135928101929092525090565b5f6101008284031215613d9c575f80fd5b613da4613bd0565b823581526020830135613db6816139a2565b60208201526040830135613dc9816139a2565b6040820152613dda606084016139b6565b60608201526080830135608082015260a083013560a082015260c083013560c0820152613e0960e084016139b6565b60e08201529392505050565b5f60208284031215613e25575f80fd5b5051919050565b60208082526024908201527f53656e645265656e7472616e637947756172643a2073656e64207265656e7472604082015263616e637960e01b606082015260800190565b60208082526026908201527f546f6b656e486f6d653a206e6f6e2d7a65726f206d756c74692d686f702066616040820152656c6c6261636b60d01b606082015260800190565b634e487b7160e01b5f52602160045260245ffd5b5f5b83811015613ee4578181015183820152602001613ecc565b50505f910152565b5f8151808452613f03816020860160208601613eca565b601f01601f19169290920160200192915050565b60208152815160208201525f602083015160018060a01b03808216604085015280604086015116606085015250506060830151613f5f60808401826001600160a01b03169052565b50608083015160a083015260a08301516101008060c0850152613f86610120850183613eec565b915060c085015160e085015260e0850151613fab828601826001600160a01b03169052565b5090949350505050565b602081525f825160058110613fd857634e487b7160e01b5f52602160045260245ffd5b806020840152506020830151604080840152612abe6060840182613eec565b60408152825160408201525f602084015161401d60608401826001600160a01b03169052565b5060408401516001600160a01b03166080830152606084015161016060a0840181905261404e6101a0850183613eec565b9150608086015160c085015260a086015160e085015260c0860151610100614080818701836001600160a01b03169052565b60e0880151915061012061409e818801846001600160a01b03169052565b908801519150610140906140bc878301846001600160a01b03169052565b880151928601929092525090940151610180830152506020015290565b81516001600160a01b031681526020808301519082015260408101610588565b5f6101208201905083518252602084015160018060a01b03808216602085015280604087015116604085015280606087015116606085015250506080840151608083015260a084015160a083015260c084015160c083015260e084015161416b60e08401826001600160a01b03169052565b50826101008301529392505050565b6020808252818101527f546f6b656e486f6d653a2072656d6f7465206e6f742072656769737465726564604082015260600190565b634e487b7160e01b5f52601160045260245ffd5b81810381811115610588576105886141af565b5f82601f8301126141e5575f80fd5b81516141f3613c8882613c45565b818152846020838601011115614207575f80fd5b612abe826020830160208701613eca565b5f60208284031215614228575f80fd5b81516001600160401b038082111561423e575f80fd5b9083019060408286031215614251575f80fd5b614259613bf3565b825160058110614267575f80fd5b815260208301518281111561427a575f80fd5b614286878286016141d6565b60208301525095945050505050565b80516139c1816139a2565b5f604082840312156142b0575f80fd5b6142b8613bf3565b82516142c3816139a2565b81526020928301519281019290925250919050565b5f602082840312156142e8575f80fd5b81516001600160401b03808211156142fe575f80fd5b908301906101008286031215614312575f80fd5b61431a613bd0565b8251815261432a60208401614295565b602082015261433b60408401614295565b604082015261434c60608401614295565b60608201526080830151608082015260a08301518281111561436c575f80fd5b614378878286016141d6565b60a08301525060c083015160c082015261439460e08401614295565b60e082015295945050505050565b5f60e082840312156143b2575f80fd5b60405160e081018181106001600160401b03821117156143d4576143d4613b93565b6040528251815260208301516143e9816139a2565b602082015260408301516143fc816139a2565b80604083015250606083015160608201526080830151608082015260a083015160a082015260c083015161442f816139a2565b60c08201529392505050565b5f6020828403121561444b575f80fd5b81516001600160401b0380821115614461575f80fd5b908301906101608286031215614475575f80fd5b61447d613ba7565b61448683614295565b81526020830151602082015261449e60408401614295565b60408201526144af60608401614295565b60608201526080830151608082015260a0830151828111156144cf575f80fd5b6144db878286016141d6565b60a08301525060c083015160c08201526144f760e08401614295565b60e082015261010083810151908201526101209150614517828401614295565b9181019190915261014091820151918101919091529392505050565b805160ff811681146139c1575f80fd5b5f60608284031215614553575f80fd5b604051606081018181106001600160401b038211171561457557614575613b93565b6040528251815261458860208401614533565b602082015261459960408401614533565b60408201529392505050565b60208082526022908201527f546f6b656e486f6d653a207a65726f20726571756972656420676173206c696d6040820152611a5d60f21b606082015260800190565b60208082526021908201527f546f6b656e486f6d653a206e6f6e2d7a65726f207365636f6e646172792066656040820152606560f81b606082015260800190565b80820180821115610588576105886141af565b6020808252825182820152828101516001600160a01b039081166040808501919091528401518051821660608501528083015160808501525f929161010085019190606087015160a0870152608087015160e060c08801528051938490528401925f92506101208701905b808410156146c8578451831682529385019360019390930192908501906146a6565b5060a0880151878203601f190160e089015294506146e68186613eec565b98975050505050505050565b8481526001600160a01b038481166020830152831660408201526080606082018190525f90611fad90830184613eec565b634e487b7160e01b5f52601260045260245ffd5b5f8261474557614745614723565b500690565b5f6020828403121561475a575f80fd5b81516107f7816139a2565b60ff8281168282160390811115610588576105886141af565b600181815b808511156147b857815f190482111561479e5761479e6141af565b808516156147ab57918102915b93841c9390800290614783565b509250929050565b5f826147ce57506001610588565b816147da57505f610588565b81600181146147f057600281146147fa57614816565b6001915050610588565b60ff84111561480b5761480b6141af565b50506001821b610588565b5060208310610133831016604e8410600b8410161715614839575081810a610588565b614843838361477e565b805f1904821115614856576148566141af565b029392505050565b5f6107f783836147c0565b8082028115828204841417610588576105886141af565b5f8261488e5761488e614723565b500490565b5f602082840312156148a3575f80fd5b815180151581146107f7575f80fd5b5f82516148c3818460208701613eca565b919091019291505056fe9316912b5a9db88acbe872c934fdd0a46c436c6dcba332d649c4d57c7bc9e6003b5030f10c94fcbdaa3022348ff0b82dbd4c0c71339e41ff59d0bdc92179d6009316912b5a9db88acbe872c934fdd0a46c436c6dcba332d649c4d57c7bc9e602d2f1ed38b7d242bfb8b41862afb813a15193219a4bc717f2056607593e6c7500de77a4dc7391f6f8f2d9567915d687d3aee79e7a1fc7300392f2727e9a0f1d00a264697066735822122077a7ef20648a5cbde6027308f8136c2d1e4d1bb46b864ee20033d5729ce7184964736f6c63430008190033", +} + +// NativeTokenHomeUpgradeableABI is the input ABI used to generate the binding from. +// Deprecated: Use NativeTokenHomeUpgradeableMetaData.ABI instead. +var NativeTokenHomeUpgradeableABI = NativeTokenHomeUpgradeableMetaData.ABI + +// NativeTokenHomeUpgradeableBin is the compiled bytecode used for deploying new contracts. +// Deprecated: Use NativeTokenHomeUpgradeableMetaData.Bin instead. +var NativeTokenHomeUpgradeableBin = NativeTokenHomeUpgradeableMetaData.Bin + +// DeployNativeTokenHomeUpgradeable deploys a new Ethereum contract, binding an instance of NativeTokenHomeUpgradeable to it. +func DeployNativeTokenHomeUpgradeable(auth *bind.TransactOpts, backend bind.ContractBackend, init uint8) (common.Address, *types.Transaction, *NativeTokenHomeUpgradeable, error) { + parsed, err := NativeTokenHomeUpgradeableMetaData.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(NativeTokenHomeUpgradeableBin), backend, init) + if err != nil { + return common.Address{}, nil, nil, err + } + return address, tx, &NativeTokenHomeUpgradeable{NativeTokenHomeUpgradeableCaller: NativeTokenHomeUpgradeableCaller{contract: contract}, NativeTokenHomeUpgradeableTransactor: NativeTokenHomeUpgradeableTransactor{contract: contract}, NativeTokenHomeUpgradeableFilterer: NativeTokenHomeUpgradeableFilterer{contract: contract}}, nil +} + +// NativeTokenHomeUpgradeable is an auto generated Go binding around an Ethereum contract. +type NativeTokenHomeUpgradeable struct { + NativeTokenHomeUpgradeableCaller // Read-only binding to the contract + NativeTokenHomeUpgradeableTransactor // Write-only binding to the contract + NativeTokenHomeUpgradeableFilterer // Log filterer for contract events +} + +// NativeTokenHomeUpgradeableCaller is an auto generated read-only Go binding around an Ethereum contract. +type NativeTokenHomeUpgradeableCaller struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// NativeTokenHomeUpgradeableTransactor is an auto generated write-only Go binding around an Ethereum contract. +type NativeTokenHomeUpgradeableTransactor struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// NativeTokenHomeUpgradeableFilterer is an auto generated log filtering Go binding around an Ethereum contract events. +type NativeTokenHomeUpgradeableFilterer struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// NativeTokenHomeUpgradeableSession is an auto generated Go binding around an Ethereum contract, +// with pre-set call and transact options. +type NativeTokenHomeUpgradeableSession struct { + Contract *NativeTokenHomeUpgradeable // 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 +} + +// NativeTokenHomeUpgradeableCallerSession is an auto generated read-only Go binding around an Ethereum contract, +// with pre-set call options. +type NativeTokenHomeUpgradeableCallerSession struct { + Contract *NativeTokenHomeUpgradeableCaller // Generic contract caller binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session +} + +// NativeTokenHomeUpgradeableTransactorSession is an auto generated write-only Go binding around an Ethereum contract, +// with pre-set transact options. +type NativeTokenHomeUpgradeableTransactorSession struct { + Contract *NativeTokenHomeUpgradeableTransactor // Generic contract transactor binding to set the session for + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// NativeTokenHomeUpgradeableRaw is an auto generated low-level Go binding around an Ethereum contract. +type NativeTokenHomeUpgradeableRaw struct { + Contract *NativeTokenHomeUpgradeable // Generic contract binding to access the raw methods on +} + +// NativeTokenHomeUpgradeableCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. +type NativeTokenHomeUpgradeableCallerRaw struct { + Contract *NativeTokenHomeUpgradeableCaller // Generic read-only contract binding to access the raw methods on +} + +// NativeTokenHomeUpgradeableTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. +type NativeTokenHomeUpgradeableTransactorRaw struct { + Contract *NativeTokenHomeUpgradeableTransactor // Generic write-only contract binding to access the raw methods on +} + +// NewNativeTokenHomeUpgradeable creates a new instance of NativeTokenHomeUpgradeable, bound to a specific deployed contract. +func NewNativeTokenHomeUpgradeable(address common.Address, backend bind.ContractBackend) (*NativeTokenHomeUpgradeable, error) { + contract, err := bindNativeTokenHomeUpgradeable(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &NativeTokenHomeUpgradeable{NativeTokenHomeUpgradeableCaller: NativeTokenHomeUpgradeableCaller{contract: contract}, NativeTokenHomeUpgradeableTransactor: NativeTokenHomeUpgradeableTransactor{contract: contract}, NativeTokenHomeUpgradeableFilterer: NativeTokenHomeUpgradeableFilterer{contract: contract}}, nil +} + +// NewNativeTokenHomeUpgradeableCaller creates a new read-only instance of NativeTokenHomeUpgradeable, bound to a specific deployed contract. +func NewNativeTokenHomeUpgradeableCaller(address common.Address, caller bind.ContractCaller) (*NativeTokenHomeUpgradeableCaller, error) { + contract, err := bindNativeTokenHomeUpgradeable(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &NativeTokenHomeUpgradeableCaller{contract: contract}, nil +} + +// NewNativeTokenHomeUpgradeableTransactor creates a new write-only instance of NativeTokenHomeUpgradeable, bound to a specific deployed contract. +func NewNativeTokenHomeUpgradeableTransactor(address common.Address, transactor bind.ContractTransactor) (*NativeTokenHomeUpgradeableTransactor, error) { + contract, err := bindNativeTokenHomeUpgradeable(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &NativeTokenHomeUpgradeableTransactor{contract: contract}, nil +} + +// NewNativeTokenHomeUpgradeableFilterer creates a new log filterer instance of NativeTokenHomeUpgradeable, bound to a specific deployed contract. +func NewNativeTokenHomeUpgradeableFilterer(address common.Address, filterer bind.ContractFilterer) (*NativeTokenHomeUpgradeableFilterer, error) { + contract, err := bindNativeTokenHomeUpgradeable(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &NativeTokenHomeUpgradeableFilterer{contract: contract}, nil +} + +// bindNativeTokenHomeUpgradeable binds a generic wrapper to an already deployed contract. +func bindNativeTokenHomeUpgradeable(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := NativeTokenHomeUpgradeableMetaData.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 (_NativeTokenHomeUpgradeable *NativeTokenHomeUpgradeableRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _NativeTokenHomeUpgradeable.Contract.NativeTokenHomeUpgradeableCaller.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 (_NativeTokenHomeUpgradeable *NativeTokenHomeUpgradeableRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _NativeTokenHomeUpgradeable.Contract.NativeTokenHomeUpgradeableTransactor.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_NativeTokenHomeUpgradeable *NativeTokenHomeUpgradeableRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _NativeTokenHomeUpgradeable.Contract.NativeTokenHomeUpgradeableTransactor.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 (_NativeTokenHomeUpgradeable *NativeTokenHomeUpgradeableCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _NativeTokenHomeUpgradeable.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 (_NativeTokenHomeUpgradeable *NativeTokenHomeUpgradeableTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _NativeTokenHomeUpgradeable.Contract.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_NativeTokenHomeUpgradeable *NativeTokenHomeUpgradeableTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _NativeTokenHomeUpgradeable.Contract.contract.Transact(opts, method, params...) +} + +// NATIVETOKENHOMESTORAGELOCATION is a free data retrieval call binding the contract method 0xefb5b95e. +// +// Solidity: function NATIVE_TOKEN_HOME_STORAGE_LOCATION() view returns(bytes32) +func (_NativeTokenHomeUpgradeable *NativeTokenHomeUpgradeableCaller) NATIVETOKENHOMESTORAGELOCATION(opts *bind.CallOpts) ([32]byte, error) { + var out []interface{} + err := _NativeTokenHomeUpgradeable.contract.Call(opts, &out, "NATIVE_TOKEN_HOME_STORAGE_LOCATION") + + if err != nil { + return *new([32]byte), err + } + + out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) + + return out0, err + +} + +// NATIVETOKENHOMESTORAGELOCATION is a free data retrieval call binding the contract method 0xefb5b95e. +// +// Solidity: function NATIVE_TOKEN_HOME_STORAGE_LOCATION() view returns(bytes32) +func (_NativeTokenHomeUpgradeable *NativeTokenHomeUpgradeableSession) NATIVETOKENHOMESTORAGELOCATION() ([32]byte, error) { + return _NativeTokenHomeUpgradeable.Contract.NATIVETOKENHOMESTORAGELOCATION(&_NativeTokenHomeUpgradeable.CallOpts) +} + +// NATIVETOKENHOMESTORAGELOCATION is a free data retrieval call binding the contract method 0xefb5b95e. +// +// Solidity: function NATIVE_TOKEN_HOME_STORAGE_LOCATION() view returns(bytes32) +func (_NativeTokenHomeUpgradeable *NativeTokenHomeUpgradeableCallerSession) NATIVETOKENHOMESTORAGELOCATION() ([32]byte, error) { + return _NativeTokenHomeUpgradeable.Contract.NATIVETOKENHOMESTORAGELOCATION(&_NativeTokenHomeUpgradeable.CallOpts) +} + +// TELEPORTERREGISTRYAPPSTORAGELOCATION is a free data retrieval call binding the contract method 0x909a6ac0. +// +// Solidity: function TELEPORTER_REGISTRY_APP_STORAGE_LOCATION() view returns(bytes32) +func (_NativeTokenHomeUpgradeable *NativeTokenHomeUpgradeableCaller) TELEPORTERREGISTRYAPPSTORAGELOCATION(opts *bind.CallOpts) ([32]byte, error) { + var out []interface{} + err := _NativeTokenHomeUpgradeable.contract.Call(opts, &out, "TELEPORTER_REGISTRY_APP_STORAGE_LOCATION") + + if err != nil { + return *new([32]byte), err + } + + out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) + + return out0, err + +} + +// TELEPORTERREGISTRYAPPSTORAGELOCATION is a free data retrieval call binding the contract method 0x909a6ac0. +// +// Solidity: function TELEPORTER_REGISTRY_APP_STORAGE_LOCATION() view returns(bytes32) +func (_NativeTokenHomeUpgradeable *NativeTokenHomeUpgradeableSession) TELEPORTERREGISTRYAPPSTORAGELOCATION() ([32]byte, error) { + return _NativeTokenHomeUpgradeable.Contract.TELEPORTERREGISTRYAPPSTORAGELOCATION(&_NativeTokenHomeUpgradeable.CallOpts) +} + +// TELEPORTERREGISTRYAPPSTORAGELOCATION is a free data retrieval call binding the contract method 0x909a6ac0. +// +// Solidity: function TELEPORTER_REGISTRY_APP_STORAGE_LOCATION() view returns(bytes32) +func (_NativeTokenHomeUpgradeable *NativeTokenHomeUpgradeableCallerSession) TELEPORTERREGISTRYAPPSTORAGELOCATION() ([32]byte, error) { + return _NativeTokenHomeUpgradeable.Contract.TELEPORTERREGISTRYAPPSTORAGELOCATION(&_NativeTokenHomeUpgradeable.CallOpts) +} + +// TOKENHOMESTORAGELOCATION is a free data retrieval call binding the contract method 0x62e3901b. +// +// Solidity: function TOKEN_HOME_STORAGE_LOCATION() view returns(bytes32) +func (_NativeTokenHomeUpgradeable *NativeTokenHomeUpgradeableCaller) TOKENHOMESTORAGELOCATION(opts *bind.CallOpts) ([32]byte, error) { + var out []interface{} + err := _NativeTokenHomeUpgradeable.contract.Call(opts, &out, "TOKEN_HOME_STORAGE_LOCATION") + + if err != nil { + return *new([32]byte), err + } + + out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) + + return out0, err + +} + +// TOKENHOMESTORAGELOCATION is a free data retrieval call binding the contract method 0x62e3901b. +// +// Solidity: function TOKEN_HOME_STORAGE_LOCATION() view returns(bytes32) +func (_NativeTokenHomeUpgradeable *NativeTokenHomeUpgradeableSession) TOKENHOMESTORAGELOCATION() ([32]byte, error) { + return _NativeTokenHomeUpgradeable.Contract.TOKENHOMESTORAGELOCATION(&_NativeTokenHomeUpgradeable.CallOpts) +} + +// TOKENHOMESTORAGELOCATION is a free data retrieval call binding the contract method 0x62e3901b. +// +// Solidity: function TOKEN_HOME_STORAGE_LOCATION() view returns(bytes32) +func (_NativeTokenHomeUpgradeable *NativeTokenHomeUpgradeableCallerSession) TOKENHOMESTORAGELOCATION() ([32]byte, error) { + return _NativeTokenHomeUpgradeable.Contract.TOKENHOMESTORAGELOCATION(&_NativeTokenHomeUpgradeable.CallOpts) +} + +// GetBlockchainID is a free data retrieval call binding the contract method 0x4213cf78. +// +// Solidity: function getBlockchainID() view returns(bytes32) +func (_NativeTokenHomeUpgradeable *NativeTokenHomeUpgradeableCaller) GetBlockchainID(opts *bind.CallOpts) ([32]byte, error) { + var out []interface{} + err := _NativeTokenHomeUpgradeable.contract.Call(opts, &out, "getBlockchainID") + + if err != nil { + return *new([32]byte), err + } + + out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) + + return out0, err + +} + +// GetBlockchainID is a free data retrieval call binding the contract method 0x4213cf78. +// +// Solidity: function getBlockchainID() view returns(bytes32) +func (_NativeTokenHomeUpgradeable *NativeTokenHomeUpgradeableSession) GetBlockchainID() ([32]byte, error) { + return _NativeTokenHomeUpgradeable.Contract.GetBlockchainID(&_NativeTokenHomeUpgradeable.CallOpts) +} + +// GetBlockchainID is a free data retrieval call binding the contract method 0x4213cf78. +// +// Solidity: function getBlockchainID() view returns(bytes32) +func (_NativeTokenHomeUpgradeable *NativeTokenHomeUpgradeableCallerSession) GetBlockchainID() ([32]byte, error) { + return _NativeTokenHomeUpgradeable.Contract.GetBlockchainID(&_NativeTokenHomeUpgradeable.CallOpts) +} + +// GetMinTeleporterVersion is a free data retrieval call binding the contract method 0xd2cc7a70. +// +// Solidity: function getMinTeleporterVersion() view returns(uint256) +func (_NativeTokenHomeUpgradeable *NativeTokenHomeUpgradeableCaller) GetMinTeleporterVersion(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _NativeTokenHomeUpgradeable.contract.Call(opts, &out, "getMinTeleporterVersion") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// GetMinTeleporterVersion is a free data retrieval call binding the contract method 0xd2cc7a70. +// +// Solidity: function getMinTeleporterVersion() view returns(uint256) +func (_NativeTokenHomeUpgradeable *NativeTokenHomeUpgradeableSession) GetMinTeleporterVersion() (*big.Int, error) { + return _NativeTokenHomeUpgradeable.Contract.GetMinTeleporterVersion(&_NativeTokenHomeUpgradeable.CallOpts) +} + +// GetMinTeleporterVersion is a free data retrieval call binding the contract method 0xd2cc7a70. +// +// Solidity: function getMinTeleporterVersion() view returns(uint256) +func (_NativeTokenHomeUpgradeable *NativeTokenHomeUpgradeableCallerSession) GetMinTeleporterVersion() (*big.Int, error) { + return _NativeTokenHomeUpgradeable.Contract.GetMinTeleporterVersion(&_NativeTokenHomeUpgradeable.CallOpts) +} + +// GetRemoteTokenTransferrerSettings is a free data retrieval call binding the contract method 0xc8511ada. +// +// Solidity: function getRemoteTokenTransferrerSettings(bytes32 remoteBlockchainID, address remoteTokenTransferrerAddress) view returns((bool,uint256,uint256,bool)) +func (_NativeTokenHomeUpgradeable *NativeTokenHomeUpgradeableCaller) GetRemoteTokenTransferrerSettings(opts *bind.CallOpts, remoteBlockchainID [32]byte, remoteTokenTransferrerAddress common.Address) (RemoteTokenTransferrerSettings, error) { + var out []interface{} + err := _NativeTokenHomeUpgradeable.contract.Call(opts, &out, "getRemoteTokenTransferrerSettings", remoteBlockchainID, remoteTokenTransferrerAddress) + + if err != nil { + return *new(RemoteTokenTransferrerSettings), err + } + + out0 := *abi.ConvertType(out[0], new(RemoteTokenTransferrerSettings)).(*RemoteTokenTransferrerSettings) + + return out0, err + +} + +// GetRemoteTokenTransferrerSettings is a free data retrieval call binding the contract method 0xc8511ada. +// +// Solidity: function getRemoteTokenTransferrerSettings(bytes32 remoteBlockchainID, address remoteTokenTransferrerAddress) view returns((bool,uint256,uint256,bool)) +func (_NativeTokenHomeUpgradeable *NativeTokenHomeUpgradeableSession) GetRemoteTokenTransferrerSettings(remoteBlockchainID [32]byte, remoteTokenTransferrerAddress common.Address) (RemoteTokenTransferrerSettings, error) { + return _NativeTokenHomeUpgradeable.Contract.GetRemoteTokenTransferrerSettings(&_NativeTokenHomeUpgradeable.CallOpts, remoteBlockchainID, remoteTokenTransferrerAddress) +} + +// GetRemoteTokenTransferrerSettings is a free data retrieval call binding the contract method 0xc8511ada. +// +// Solidity: function getRemoteTokenTransferrerSettings(bytes32 remoteBlockchainID, address remoteTokenTransferrerAddress) view returns((bool,uint256,uint256,bool)) +func (_NativeTokenHomeUpgradeable *NativeTokenHomeUpgradeableCallerSession) GetRemoteTokenTransferrerSettings(remoteBlockchainID [32]byte, remoteTokenTransferrerAddress common.Address) (RemoteTokenTransferrerSettings, error) { + return _NativeTokenHomeUpgradeable.Contract.GetRemoteTokenTransferrerSettings(&_NativeTokenHomeUpgradeable.CallOpts, remoteBlockchainID, remoteTokenTransferrerAddress) +} + +// GetTokenAddress is a free data retrieval call binding the contract method 0x10fe9ae8. +// +// Solidity: function getTokenAddress() view returns(address) +func (_NativeTokenHomeUpgradeable *NativeTokenHomeUpgradeableCaller) GetTokenAddress(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _NativeTokenHomeUpgradeable.contract.Call(opts, &out, "getTokenAddress") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// GetTokenAddress is a free data retrieval call binding the contract method 0x10fe9ae8. +// +// Solidity: function getTokenAddress() view returns(address) +func (_NativeTokenHomeUpgradeable *NativeTokenHomeUpgradeableSession) GetTokenAddress() (common.Address, error) { + return _NativeTokenHomeUpgradeable.Contract.GetTokenAddress(&_NativeTokenHomeUpgradeable.CallOpts) +} + +// GetTokenAddress is a free data retrieval call binding the contract method 0x10fe9ae8. +// +// Solidity: function getTokenAddress() view returns(address) +func (_NativeTokenHomeUpgradeable *NativeTokenHomeUpgradeableCallerSession) GetTokenAddress() (common.Address, error) { + return _NativeTokenHomeUpgradeable.Contract.GetTokenAddress(&_NativeTokenHomeUpgradeable.CallOpts) +} + +// GetTransferredBalance is a free data retrieval call binding the contract method 0x154d625a. +// +// Solidity: function getTransferredBalance(bytes32 remoteBlockchainID, address remoteTokenTransferrerAddress) view returns(uint256) +func (_NativeTokenHomeUpgradeable *NativeTokenHomeUpgradeableCaller) GetTransferredBalance(opts *bind.CallOpts, remoteBlockchainID [32]byte, remoteTokenTransferrerAddress common.Address) (*big.Int, error) { + var out []interface{} + err := _NativeTokenHomeUpgradeable.contract.Call(opts, &out, "getTransferredBalance", remoteBlockchainID, remoteTokenTransferrerAddress) + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// GetTransferredBalance is a free data retrieval call binding the contract method 0x154d625a. +// +// Solidity: function getTransferredBalance(bytes32 remoteBlockchainID, address remoteTokenTransferrerAddress) view returns(uint256) +func (_NativeTokenHomeUpgradeable *NativeTokenHomeUpgradeableSession) GetTransferredBalance(remoteBlockchainID [32]byte, remoteTokenTransferrerAddress common.Address) (*big.Int, error) { + return _NativeTokenHomeUpgradeable.Contract.GetTransferredBalance(&_NativeTokenHomeUpgradeable.CallOpts, remoteBlockchainID, remoteTokenTransferrerAddress) +} + +// GetTransferredBalance is a free data retrieval call binding the contract method 0x154d625a. +// +// Solidity: function getTransferredBalance(bytes32 remoteBlockchainID, address remoteTokenTransferrerAddress) view returns(uint256) +func (_NativeTokenHomeUpgradeable *NativeTokenHomeUpgradeableCallerSession) GetTransferredBalance(remoteBlockchainID [32]byte, remoteTokenTransferrerAddress common.Address) (*big.Int, error) { + return _NativeTokenHomeUpgradeable.Contract.GetTransferredBalance(&_NativeTokenHomeUpgradeable.CallOpts, remoteBlockchainID, remoteTokenTransferrerAddress) +} + +// IsTeleporterAddressPaused is a free data retrieval call binding the contract method 0x97314297. +// +// Solidity: function isTeleporterAddressPaused(address teleporterAddress) view returns(bool) +func (_NativeTokenHomeUpgradeable *NativeTokenHomeUpgradeableCaller) IsTeleporterAddressPaused(opts *bind.CallOpts, teleporterAddress common.Address) (bool, error) { + var out []interface{} + err := _NativeTokenHomeUpgradeable.contract.Call(opts, &out, "isTeleporterAddressPaused", teleporterAddress) + + if err != nil { + return *new(bool), err + } + + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + + return out0, err + +} + +// IsTeleporterAddressPaused is a free data retrieval call binding the contract method 0x97314297. +// +// Solidity: function isTeleporterAddressPaused(address teleporterAddress) view returns(bool) +func (_NativeTokenHomeUpgradeable *NativeTokenHomeUpgradeableSession) IsTeleporterAddressPaused(teleporterAddress common.Address) (bool, error) { + return _NativeTokenHomeUpgradeable.Contract.IsTeleporterAddressPaused(&_NativeTokenHomeUpgradeable.CallOpts, teleporterAddress) +} + +// IsTeleporterAddressPaused is a free data retrieval call binding the contract method 0x97314297. +// +// Solidity: function isTeleporterAddressPaused(address teleporterAddress) view returns(bool) +func (_NativeTokenHomeUpgradeable *NativeTokenHomeUpgradeableCallerSession) IsTeleporterAddressPaused(teleporterAddress common.Address) (bool, error) { + return _NativeTokenHomeUpgradeable.Contract.IsTeleporterAddressPaused(&_NativeTokenHomeUpgradeable.CallOpts, teleporterAddress) +} + +// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. +// +// Solidity: function owner() view returns(address) +func (_NativeTokenHomeUpgradeable *NativeTokenHomeUpgradeableCaller) Owner(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _NativeTokenHomeUpgradeable.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 (_NativeTokenHomeUpgradeable *NativeTokenHomeUpgradeableSession) Owner() (common.Address, error) { + return _NativeTokenHomeUpgradeable.Contract.Owner(&_NativeTokenHomeUpgradeable.CallOpts) +} + +// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. +// +// Solidity: function owner() view returns(address) +func (_NativeTokenHomeUpgradeable *NativeTokenHomeUpgradeableCallerSession) Owner() (common.Address, error) { + return _NativeTokenHomeUpgradeable.Contract.Owner(&_NativeTokenHomeUpgradeable.CallOpts) +} + +// AddCollateral is a paid mutator transaction binding the contract method 0xb0b78b26. +// +// Solidity: function addCollateral(bytes32 remoteBlockchainID, address remoteTokenTransferrerAddress) payable returns() +func (_NativeTokenHomeUpgradeable *NativeTokenHomeUpgradeableTransactor) AddCollateral(opts *bind.TransactOpts, remoteBlockchainID [32]byte, remoteTokenTransferrerAddress common.Address) (*types.Transaction, error) { + return _NativeTokenHomeUpgradeable.contract.Transact(opts, "addCollateral", remoteBlockchainID, remoteTokenTransferrerAddress) +} + +// AddCollateral is a paid mutator transaction binding the contract method 0xb0b78b26. +// +// Solidity: function addCollateral(bytes32 remoteBlockchainID, address remoteTokenTransferrerAddress) payable returns() +func (_NativeTokenHomeUpgradeable *NativeTokenHomeUpgradeableSession) AddCollateral(remoteBlockchainID [32]byte, remoteTokenTransferrerAddress common.Address) (*types.Transaction, error) { + return _NativeTokenHomeUpgradeable.Contract.AddCollateral(&_NativeTokenHomeUpgradeable.TransactOpts, remoteBlockchainID, remoteTokenTransferrerAddress) +} + +// AddCollateral is a paid mutator transaction binding the contract method 0xb0b78b26. +// +// Solidity: function addCollateral(bytes32 remoteBlockchainID, address remoteTokenTransferrerAddress) payable returns() +func (_NativeTokenHomeUpgradeable *NativeTokenHomeUpgradeableTransactorSession) AddCollateral(remoteBlockchainID [32]byte, remoteTokenTransferrerAddress common.Address) (*types.Transaction, error) { + return _NativeTokenHomeUpgradeable.Contract.AddCollateral(&_NativeTokenHomeUpgradeable.TransactOpts, remoteBlockchainID, remoteTokenTransferrerAddress) +} + +// Initialize is a paid mutator transaction binding the contract method 0xbe203094. +// +// Solidity: function initialize(address teleporterRegistryAddress, address teleporterManager, uint256 minTeleporterVersion, address wrappedTokenAddress) returns() +func (_NativeTokenHomeUpgradeable *NativeTokenHomeUpgradeableTransactor) Initialize(opts *bind.TransactOpts, teleporterRegistryAddress common.Address, teleporterManager common.Address, minTeleporterVersion *big.Int, wrappedTokenAddress common.Address) (*types.Transaction, error) { + return _NativeTokenHomeUpgradeable.contract.Transact(opts, "initialize", teleporterRegistryAddress, teleporterManager, minTeleporterVersion, wrappedTokenAddress) +} + +// Initialize is a paid mutator transaction binding the contract method 0xbe203094. +// +// Solidity: function initialize(address teleporterRegistryAddress, address teleporterManager, uint256 minTeleporterVersion, address wrappedTokenAddress) returns() +func (_NativeTokenHomeUpgradeable *NativeTokenHomeUpgradeableSession) Initialize(teleporterRegistryAddress common.Address, teleporterManager common.Address, minTeleporterVersion *big.Int, wrappedTokenAddress common.Address) (*types.Transaction, error) { + return _NativeTokenHomeUpgradeable.Contract.Initialize(&_NativeTokenHomeUpgradeable.TransactOpts, teleporterRegistryAddress, teleporterManager, minTeleporterVersion, wrappedTokenAddress) +} + +// Initialize is a paid mutator transaction binding the contract method 0xbe203094. +// +// Solidity: function initialize(address teleporterRegistryAddress, address teleporterManager, uint256 minTeleporterVersion, address wrappedTokenAddress) returns() +func (_NativeTokenHomeUpgradeable *NativeTokenHomeUpgradeableTransactorSession) Initialize(teleporterRegistryAddress common.Address, teleporterManager common.Address, minTeleporterVersion *big.Int, wrappedTokenAddress common.Address) (*types.Transaction, error) { + return _NativeTokenHomeUpgradeable.Contract.Initialize(&_NativeTokenHomeUpgradeable.TransactOpts, teleporterRegistryAddress, teleporterManager, minTeleporterVersion, wrappedTokenAddress) +} + +// PauseTeleporterAddress is a paid mutator transaction binding the contract method 0x2b0d8f18. +// +// Solidity: function pauseTeleporterAddress(address teleporterAddress) returns() +func (_NativeTokenHomeUpgradeable *NativeTokenHomeUpgradeableTransactor) PauseTeleporterAddress(opts *bind.TransactOpts, teleporterAddress common.Address) (*types.Transaction, error) { + return _NativeTokenHomeUpgradeable.contract.Transact(opts, "pauseTeleporterAddress", teleporterAddress) +} + +// PauseTeleporterAddress is a paid mutator transaction binding the contract method 0x2b0d8f18. +// +// Solidity: function pauseTeleporterAddress(address teleporterAddress) returns() +func (_NativeTokenHomeUpgradeable *NativeTokenHomeUpgradeableSession) PauseTeleporterAddress(teleporterAddress common.Address) (*types.Transaction, error) { + return _NativeTokenHomeUpgradeable.Contract.PauseTeleporterAddress(&_NativeTokenHomeUpgradeable.TransactOpts, teleporterAddress) +} + +// PauseTeleporterAddress is a paid mutator transaction binding the contract method 0x2b0d8f18. +// +// Solidity: function pauseTeleporterAddress(address teleporterAddress) returns() +func (_NativeTokenHomeUpgradeable *NativeTokenHomeUpgradeableTransactorSession) PauseTeleporterAddress(teleporterAddress common.Address) (*types.Transaction, error) { + return _NativeTokenHomeUpgradeable.Contract.PauseTeleporterAddress(&_NativeTokenHomeUpgradeable.TransactOpts, teleporterAddress) +} + +// ReceiveTeleporterMessage is a paid mutator transaction binding the contract method 0xc868efaa. +// +// Solidity: function receiveTeleporterMessage(bytes32 sourceBlockchainID, address originSenderAddress, bytes message) returns() +func (_NativeTokenHomeUpgradeable *NativeTokenHomeUpgradeableTransactor) ReceiveTeleporterMessage(opts *bind.TransactOpts, sourceBlockchainID [32]byte, originSenderAddress common.Address, message []byte) (*types.Transaction, error) { + return _NativeTokenHomeUpgradeable.contract.Transact(opts, "receiveTeleporterMessage", sourceBlockchainID, originSenderAddress, message) +} + +// ReceiveTeleporterMessage is a paid mutator transaction binding the contract method 0xc868efaa. +// +// Solidity: function receiveTeleporterMessage(bytes32 sourceBlockchainID, address originSenderAddress, bytes message) returns() +func (_NativeTokenHomeUpgradeable *NativeTokenHomeUpgradeableSession) ReceiveTeleporterMessage(sourceBlockchainID [32]byte, originSenderAddress common.Address, message []byte) (*types.Transaction, error) { + return _NativeTokenHomeUpgradeable.Contract.ReceiveTeleporterMessage(&_NativeTokenHomeUpgradeable.TransactOpts, sourceBlockchainID, originSenderAddress, message) +} + +// ReceiveTeleporterMessage is a paid mutator transaction binding the contract method 0xc868efaa. +// +// Solidity: function receiveTeleporterMessage(bytes32 sourceBlockchainID, address originSenderAddress, bytes message) returns() +func (_NativeTokenHomeUpgradeable *NativeTokenHomeUpgradeableTransactorSession) ReceiveTeleporterMessage(sourceBlockchainID [32]byte, originSenderAddress common.Address, message []byte) (*types.Transaction, error) { + return _NativeTokenHomeUpgradeable.Contract.ReceiveTeleporterMessage(&_NativeTokenHomeUpgradeable.TransactOpts, sourceBlockchainID, originSenderAddress, message) +} + +// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. +// +// Solidity: function renounceOwnership() returns() +func (_NativeTokenHomeUpgradeable *NativeTokenHomeUpgradeableTransactor) RenounceOwnership(opts *bind.TransactOpts) (*types.Transaction, error) { + return _NativeTokenHomeUpgradeable.contract.Transact(opts, "renounceOwnership") +} + +// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. +// +// Solidity: function renounceOwnership() returns() +func (_NativeTokenHomeUpgradeable *NativeTokenHomeUpgradeableSession) RenounceOwnership() (*types.Transaction, error) { + return _NativeTokenHomeUpgradeable.Contract.RenounceOwnership(&_NativeTokenHomeUpgradeable.TransactOpts) +} + +// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. +// +// Solidity: function renounceOwnership() returns() +func (_NativeTokenHomeUpgradeable *NativeTokenHomeUpgradeableTransactorSession) RenounceOwnership() (*types.Transaction, error) { + return _NativeTokenHomeUpgradeable.Contract.RenounceOwnership(&_NativeTokenHomeUpgradeable.TransactOpts) +} + +// Send is a paid mutator transaction binding the contract method 0x8bf2fa94. +// +// Solidity: function send((bytes32,address,address,address,uint256,uint256,uint256,address) input) payable returns() +func (_NativeTokenHomeUpgradeable *NativeTokenHomeUpgradeableTransactor) Send(opts *bind.TransactOpts, input SendTokensInput) (*types.Transaction, error) { + return _NativeTokenHomeUpgradeable.contract.Transact(opts, "send", input) +} + +// Send is a paid mutator transaction binding the contract method 0x8bf2fa94. +// +// Solidity: function send((bytes32,address,address,address,uint256,uint256,uint256,address) input) payable returns() +func (_NativeTokenHomeUpgradeable *NativeTokenHomeUpgradeableSession) Send(input SendTokensInput) (*types.Transaction, error) { + return _NativeTokenHomeUpgradeable.Contract.Send(&_NativeTokenHomeUpgradeable.TransactOpts, input) +} + +// Send is a paid mutator transaction binding the contract method 0x8bf2fa94. +// +// Solidity: function send((bytes32,address,address,address,uint256,uint256,uint256,address) input) payable returns() +func (_NativeTokenHomeUpgradeable *NativeTokenHomeUpgradeableTransactorSession) Send(input SendTokensInput) (*types.Transaction, error) { + return _NativeTokenHomeUpgradeable.Contract.Send(&_NativeTokenHomeUpgradeable.TransactOpts, input) +} + +// SendAndCall is a paid mutator transaction binding the contract method 0x6e6eef8d. +// +// Solidity: function sendAndCall((bytes32,address,address,bytes,uint256,uint256,address,address,address,uint256,uint256) input) payable returns() +func (_NativeTokenHomeUpgradeable *NativeTokenHomeUpgradeableTransactor) SendAndCall(opts *bind.TransactOpts, input SendAndCallInput) (*types.Transaction, error) { + return _NativeTokenHomeUpgradeable.contract.Transact(opts, "sendAndCall", input) +} + +// SendAndCall is a paid mutator transaction binding the contract method 0x6e6eef8d. +// +// Solidity: function sendAndCall((bytes32,address,address,bytes,uint256,uint256,address,address,address,uint256,uint256) input) payable returns() +func (_NativeTokenHomeUpgradeable *NativeTokenHomeUpgradeableSession) SendAndCall(input SendAndCallInput) (*types.Transaction, error) { + return _NativeTokenHomeUpgradeable.Contract.SendAndCall(&_NativeTokenHomeUpgradeable.TransactOpts, input) +} + +// SendAndCall is a paid mutator transaction binding the contract method 0x6e6eef8d. +// +// Solidity: function sendAndCall((bytes32,address,address,bytes,uint256,uint256,address,address,address,uint256,uint256) input) payable returns() +func (_NativeTokenHomeUpgradeable *NativeTokenHomeUpgradeableTransactorSession) SendAndCall(input SendAndCallInput) (*types.Transaction, error) { + return _NativeTokenHomeUpgradeable.Contract.SendAndCall(&_NativeTokenHomeUpgradeable.TransactOpts, input) +} + +// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// +// Solidity: function transferOwnership(address newOwner) returns() +func (_NativeTokenHomeUpgradeable *NativeTokenHomeUpgradeableTransactor) TransferOwnership(opts *bind.TransactOpts, newOwner common.Address) (*types.Transaction, error) { + return _NativeTokenHomeUpgradeable.contract.Transact(opts, "transferOwnership", newOwner) +} + +// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// +// Solidity: function transferOwnership(address newOwner) returns() +func (_NativeTokenHomeUpgradeable *NativeTokenHomeUpgradeableSession) TransferOwnership(newOwner common.Address) (*types.Transaction, error) { + return _NativeTokenHomeUpgradeable.Contract.TransferOwnership(&_NativeTokenHomeUpgradeable.TransactOpts, newOwner) +} + +// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// +// Solidity: function transferOwnership(address newOwner) returns() +func (_NativeTokenHomeUpgradeable *NativeTokenHomeUpgradeableTransactorSession) TransferOwnership(newOwner common.Address) (*types.Transaction, error) { + return _NativeTokenHomeUpgradeable.Contract.TransferOwnership(&_NativeTokenHomeUpgradeable.TransactOpts, newOwner) +} + +// UnpauseTeleporterAddress is a paid mutator transaction binding the contract method 0x4511243e. +// +// Solidity: function unpauseTeleporterAddress(address teleporterAddress) returns() +func (_NativeTokenHomeUpgradeable *NativeTokenHomeUpgradeableTransactor) UnpauseTeleporterAddress(opts *bind.TransactOpts, teleporterAddress common.Address) (*types.Transaction, error) { + return _NativeTokenHomeUpgradeable.contract.Transact(opts, "unpauseTeleporterAddress", teleporterAddress) +} + +// UnpauseTeleporterAddress is a paid mutator transaction binding the contract method 0x4511243e. +// +// Solidity: function unpauseTeleporterAddress(address teleporterAddress) returns() +func (_NativeTokenHomeUpgradeable *NativeTokenHomeUpgradeableSession) UnpauseTeleporterAddress(teleporterAddress common.Address) (*types.Transaction, error) { + return _NativeTokenHomeUpgradeable.Contract.UnpauseTeleporterAddress(&_NativeTokenHomeUpgradeable.TransactOpts, teleporterAddress) +} + +// UnpauseTeleporterAddress is a paid mutator transaction binding the contract method 0x4511243e. +// +// Solidity: function unpauseTeleporterAddress(address teleporterAddress) returns() +func (_NativeTokenHomeUpgradeable *NativeTokenHomeUpgradeableTransactorSession) UnpauseTeleporterAddress(teleporterAddress common.Address) (*types.Transaction, error) { + return _NativeTokenHomeUpgradeable.Contract.UnpauseTeleporterAddress(&_NativeTokenHomeUpgradeable.TransactOpts, teleporterAddress) +} + +// UpdateMinTeleporterVersion is a paid mutator transaction binding the contract method 0x5eb99514. +// +// Solidity: function updateMinTeleporterVersion(uint256 version) returns() +func (_NativeTokenHomeUpgradeable *NativeTokenHomeUpgradeableTransactor) UpdateMinTeleporterVersion(opts *bind.TransactOpts, version *big.Int) (*types.Transaction, error) { + return _NativeTokenHomeUpgradeable.contract.Transact(opts, "updateMinTeleporterVersion", version) +} + +// UpdateMinTeleporterVersion is a paid mutator transaction binding the contract method 0x5eb99514. +// +// Solidity: function updateMinTeleporterVersion(uint256 version) returns() +func (_NativeTokenHomeUpgradeable *NativeTokenHomeUpgradeableSession) UpdateMinTeleporterVersion(version *big.Int) (*types.Transaction, error) { + return _NativeTokenHomeUpgradeable.Contract.UpdateMinTeleporterVersion(&_NativeTokenHomeUpgradeable.TransactOpts, version) +} + +// UpdateMinTeleporterVersion is a paid mutator transaction binding the contract method 0x5eb99514. +// +// Solidity: function updateMinTeleporterVersion(uint256 version) returns() +func (_NativeTokenHomeUpgradeable *NativeTokenHomeUpgradeableTransactorSession) UpdateMinTeleporterVersion(version *big.Int) (*types.Transaction, error) { + return _NativeTokenHomeUpgradeable.Contract.UpdateMinTeleporterVersion(&_NativeTokenHomeUpgradeable.TransactOpts, version) +} + +// Receive is a paid mutator transaction binding the contract receive function. +// +// Solidity: receive() payable returns() +func (_NativeTokenHomeUpgradeable *NativeTokenHomeUpgradeableTransactor) Receive(opts *bind.TransactOpts) (*types.Transaction, error) { + return _NativeTokenHomeUpgradeable.contract.RawTransact(opts, nil) // calldata is disallowed for receive function +} + +// Receive is a paid mutator transaction binding the contract receive function. +// +// Solidity: receive() payable returns() +func (_NativeTokenHomeUpgradeable *NativeTokenHomeUpgradeableSession) Receive() (*types.Transaction, error) { + return _NativeTokenHomeUpgradeable.Contract.Receive(&_NativeTokenHomeUpgradeable.TransactOpts) +} + +// Receive is a paid mutator transaction binding the contract receive function. +// +// Solidity: receive() payable returns() +func (_NativeTokenHomeUpgradeable *NativeTokenHomeUpgradeableTransactorSession) Receive() (*types.Transaction, error) { + return _NativeTokenHomeUpgradeable.Contract.Receive(&_NativeTokenHomeUpgradeable.TransactOpts) +} + +// NativeTokenHomeUpgradeableCallFailedIterator is returned from FilterCallFailed and is used to iterate over the raw logs and unpacked data for CallFailed events raised by the NativeTokenHomeUpgradeable contract. +type NativeTokenHomeUpgradeableCallFailedIterator struct { + Event *NativeTokenHomeUpgradeableCallFailed // 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 interfaces.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 *NativeTokenHomeUpgradeableCallFailedIterator) 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(NativeTokenHomeUpgradeableCallFailed) + 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(NativeTokenHomeUpgradeableCallFailed) + 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 *NativeTokenHomeUpgradeableCallFailedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *NativeTokenHomeUpgradeableCallFailedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// NativeTokenHomeUpgradeableCallFailed represents a CallFailed event raised by the NativeTokenHomeUpgradeable contract. +type NativeTokenHomeUpgradeableCallFailed struct { + RecipientContract common.Address + Amount *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterCallFailed is a free log retrieval operation binding the contract event 0xb9eaeae386d339f8115782f297a9e5f0e13fb587cd6b0d502f113cb8dd4d6cb0. +// +// Solidity: event CallFailed(address indexed recipientContract, uint256 amount) +func (_NativeTokenHomeUpgradeable *NativeTokenHomeUpgradeableFilterer) FilterCallFailed(opts *bind.FilterOpts, recipientContract []common.Address) (*NativeTokenHomeUpgradeableCallFailedIterator, error) { + + var recipientContractRule []interface{} + for _, recipientContractItem := range recipientContract { + recipientContractRule = append(recipientContractRule, recipientContractItem) + } + + logs, sub, err := _NativeTokenHomeUpgradeable.contract.FilterLogs(opts, "CallFailed", recipientContractRule) + if err != nil { + return nil, err + } + return &NativeTokenHomeUpgradeableCallFailedIterator{contract: _NativeTokenHomeUpgradeable.contract, event: "CallFailed", logs: logs, sub: sub}, nil +} + +// WatchCallFailed is a free log subscription operation binding the contract event 0xb9eaeae386d339f8115782f297a9e5f0e13fb587cd6b0d502f113cb8dd4d6cb0. +// +// Solidity: event CallFailed(address indexed recipientContract, uint256 amount) +func (_NativeTokenHomeUpgradeable *NativeTokenHomeUpgradeableFilterer) WatchCallFailed(opts *bind.WatchOpts, sink chan<- *NativeTokenHomeUpgradeableCallFailed, recipientContract []common.Address) (event.Subscription, error) { + + var recipientContractRule []interface{} + for _, recipientContractItem := range recipientContract { + recipientContractRule = append(recipientContractRule, recipientContractItem) + } + + logs, sub, err := _NativeTokenHomeUpgradeable.contract.WatchLogs(opts, "CallFailed", recipientContractRule) + 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(NativeTokenHomeUpgradeableCallFailed) + if err := _NativeTokenHomeUpgradeable.contract.UnpackLog(event, "CallFailed", 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 +} + +// ParseCallFailed is a log parse operation binding the contract event 0xb9eaeae386d339f8115782f297a9e5f0e13fb587cd6b0d502f113cb8dd4d6cb0. +// +// Solidity: event CallFailed(address indexed recipientContract, uint256 amount) +func (_NativeTokenHomeUpgradeable *NativeTokenHomeUpgradeableFilterer) ParseCallFailed(log types.Log) (*NativeTokenHomeUpgradeableCallFailed, error) { + event := new(NativeTokenHomeUpgradeableCallFailed) + if err := _NativeTokenHomeUpgradeable.contract.UnpackLog(event, "CallFailed", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// NativeTokenHomeUpgradeableCallSucceededIterator is returned from FilterCallSucceeded and is used to iterate over the raw logs and unpacked data for CallSucceeded events raised by the NativeTokenHomeUpgradeable contract. +type NativeTokenHomeUpgradeableCallSucceededIterator struct { + Event *NativeTokenHomeUpgradeableCallSucceeded // 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 interfaces.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 *NativeTokenHomeUpgradeableCallSucceededIterator) 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(NativeTokenHomeUpgradeableCallSucceeded) + 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(NativeTokenHomeUpgradeableCallSucceeded) + 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 *NativeTokenHomeUpgradeableCallSucceededIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *NativeTokenHomeUpgradeableCallSucceededIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// NativeTokenHomeUpgradeableCallSucceeded represents a CallSucceeded event raised by the NativeTokenHomeUpgradeable contract. +type NativeTokenHomeUpgradeableCallSucceeded struct { + RecipientContract common.Address + Amount *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterCallSucceeded is a free log retrieval operation binding the contract event 0x104deb555f67e63782bb817bc26c39050894645f9b9f29c4be8ae68d0e8b7ff4. +// +// Solidity: event CallSucceeded(address indexed recipientContract, uint256 amount) +func (_NativeTokenHomeUpgradeable *NativeTokenHomeUpgradeableFilterer) FilterCallSucceeded(opts *bind.FilterOpts, recipientContract []common.Address) (*NativeTokenHomeUpgradeableCallSucceededIterator, error) { + + var recipientContractRule []interface{} + for _, recipientContractItem := range recipientContract { + recipientContractRule = append(recipientContractRule, recipientContractItem) + } + + logs, sub, err := _NativeTokenHomeUpgradeable.contract.FilterLogs(opts, "CallSucceeded", recipientContractRule) + if err != nil { + return nil, err + } + return &NativeTokenHomeUpgradeableCallSucceededIterator{contract: _NativeTokenHomeUpgradeable.contract, event: "CallSucceeded", logs: logs, sub: sub}, nil +} + +// WatchCallSucceeded is a free log subscription operation binding the contract event 0x104deb555f67e63782bb817bc26c39050894645f9b9f29c4be8ae68d0e8b7ff4. +// +// Solidity: event CallSucceeded(address indexed recipientContract, uint256 amount) +func (_NativeTokenHomeUpgradeable *NativeTokenHomeUpgradeableFilterer) WatchCallSucceeded(opts *bind.WatchOpts, sink chan<- *NativeTokenHomeUpgradeableCallSucceeded, recipientContract []common.Address) (event.Subscription, error) { + + var recipientContractRule []interface{} + for _, recipientContractItem := range recipientContract { + recipientContractRule = append(recipientContractRule, recipientContractItem) + } + + logs, sub, err := _NativeTokenHomeUpgradeable.contract.WatchLogs(opts, "CallSucceeded", recipientContractRule) + 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(NativeTokenHomeUpgradeableCallSucceeded) + if err := _NativeTokenHomeUpgradeable.contract.UnpackLog(event, "CallSucceeded", 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 +} + +// ParseCallSucceeded is a log parse operation binding the contract event 0x104deb555f67e63782bb817bc26c39050894645f9b9f29c4be8ae68d0e8b7ff4. +// +// Solidity: event CallSucceeded(address indexed recipientContract, uint256 amount) +func (_NativeTokenHomeUpgradeable *NativeTokenHomeUpgradeableFilterer) ParseCallSucceeded(log types.Log) (*NativeTokenHomeUpgradeableCallSucceeded, error) { + event := new(NativeTokenHomeUpgradeableCallSucceeded) + if err := _NativeTokenHomeUpgradeable.contract.UnpackLog(event, "CallSucceeded", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// NativeTokenHomeUpgradeableCollateralAddedIterator is returned from FilterCollateralAdded and is used to iterate over the raw logs and unpacked data for CollateralAdded events raised by the NativeTokenHomeUpgradeable contract. +type NativeTokenHomeUpgradeableCollateralAddedIterator struct { + Event *NativeTokenHomeUpgradeableCollateralAdded // 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 interfaces.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 *NativeTokenHomeUpgradeableCollateralAddedIterator) 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(NativeTokenHomeUpgradeableCollateralAdded) + 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(NativeTokenHomeUpgradeableCollateralAdded) + 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 *NativeTokenHomeUpgradeableCollateralAddedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *NativeTokenHomeUpgradeableCollateralAddedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// NativeTokenHomeUpgradeableCollateralAdded represents a CollateralAdded event raised by the NativeTokenHomeUpgradeable contract. +type NativeTokenHomeUpgradeableCollateralAdded struct { + RemoteBlockchainID [32]byte + RemoteTokenTransferrerAddress common.Address + Amount *big.Int + Remaining *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterCollateralAdded is a free log retrieval operation binding the contract event 0x6769a5f9bfc8b6e0db839ab981cbf9239274ae72d2d035081a9157d43bd33cb6. +// +// Solidity: event CollateralAdded(bytes32 indexed remoteBlockchainID, address indexed remoteTokenTransferrerAddress, uint256 amount, uint256 remaining) +func (_NativeTokenHomeUpgradeable *NativeTokenHomeUpgradeableFilterer) FilterCollateralAdded(opts *bind.FilterOpts, remoteBlockchainID [][32]byte, remoteTokenTransferrerAddress []common.Address) (*NativeTokenHomeUpgradeableCollateralAddedIterator, error) { + + var remoteBlockchainIDRule []interface{} + for _, remoteBlockchainIDItem := range remoteBlockchainID { + remoteBlockchainIDRule = append(remoteBlockchainIDRule, remoteBlockchainIDItem) + } + var remoteTokenTransferrerAddressRule []interface{} + for _, remoteTokenTransferrerAddressItem := range remoteTokenTransferrerAddress { + remoteTokenTransferrerAddressRule = append(remoteTokenTransferrerAddressRule, remoteTokenTransferrerAddressItem) + } + + logs, sub, err := _NativeTokenHomeUpgradeable.contract.FilterLogs(opts, "CollateralAdded", remoteBlockchainIDRule, remoteTokenTransferrerAddressRule) + if err != nil { + return nil, err + } + return &NativeTokenHomeUpgradeableCollateralAddedIterator{contract: _NativeTokenHomeUpgradeable.contract, event: "CollateralAdded", logs: logs, sub: sub}, nil +} + +// WatchCollateralAdded is a free log subscription operation binding the contract event 0x6769a5f9bfc8b6e0db839ab981cbf9239274ae72d2d035081a9157d43bd33cb6. +// +// Solidity: event CollateralAdded(bytes32 indexed remoteBlockchainID, address indexed remoteTokenTransferrerAddress, uint256 amount, uint256 remaining) +func (_NativeTokenHomeUpgradeable *NativeTokenHomeUpgradeableFilterer) WatchCollateralAdded(opts *bind.WatchOpts, sink chan<- *NativeTokenHomeUpgradeableCollateralAdded, remoteBlockchainID [][32]byte, remoteTokenTransferrerAddress []common.Address) (event.Subscription, error) { + + var remoteBlockchainIDRule []interface{} + for _, remoteBlockchainIDItem := range remoteBlockchainID { + remoteBlockchainIDRule = append(remoteBlockchainIDRule, remoteBlockchainIDItem) + } + var remoteTokenTransferrerAddressRule []interface{} + for _, remoteTokenTransferrerAddressItem := range remoteTokenTransferrerAddress { + remoteTokenTransferrerAddressRule = append(remoteTokenTransferrerAddressRule, remoteTokenTransferrerAddressItem) + } + + logs, sub, err := _NativeTokenHomeUpgradeable.contract.WatchLogs(opts, "CollateralAdded", remoteBlockchainIDRule, remoteTokenTransferrerAddressRule) + 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(NativeTokenHomeUpgradeableCollateralAdded) + if err := _NativeTokenHomeUpgradeable.contract.UnpackLog(event, "CollateralAdded", 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 +} + +// ParseCollateralAdded is a log parse operation binding the contract event 0x6769a5f9bfc8b6e0db839ab981cbf9239274ae72d2d035081a9157d43bd33cb6. +// +// Solidity: event CollateralAdded(bytes32 indexed remoteBlockchainID, address indexed remoteTokenTransferrerAddress, uint256 amount, uint256 remaining) +func (_NativeTokenHomeUpgradeable *NativeTokenHomeUpgradeableFilterer) ParseCollateralAdded(log types.Log) (*NativeTokenHomeUpgradeableCollateralAdded, error) { + event := new(NativeTokenHomeUpgradeableCollateralAdded) + if err := _NativeTokenHomeUpgradeable.contract.UnpackLog(event, "CollateralAdded", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// NativeTokenHomeUpgradeableInitializedIterator is returned from FilterInitialized and is used to iterate over the raw logs and unpacked data for Initialized events raised by the NativeTokenHomeUpgradeable contract. +type NativeTokenHomeUpgradeableInitializedIterator struct { + Event *NativeTokenHomeUpgradeableInitialized // 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 interfaces.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 *NativeTokenHomeUpgradeableInitializedIterator) 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(NativeTokenHomeUpgradeableInitialized) + 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(NativeTokenHomeUpgradeableInitialized) + 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 *NativeTokenHomeUpgradeableInitializedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *NativeTokenHomeUpgradeableInitializedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// NativeTokenHomeUpgradeableInitialized represents a Initialized event raised by the NativeTokenHomeUpgradeable contract. +type NativeTokenHomeUpgradeableInitialized struct { + Version uint64 + Raw types.Log // Blockchain specific contextual infos +} + +// FilterInitialized is a free log retrieval operation binding the contract event 0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2. +// +// Solidity: event Initialized(uint64 version) +func (_NativeTokenHomeUpgradeable *NativeTokenHomeUpgradeableFilterer) FilterInitialized(opts *bind.FilterOpts) (*NativeTokenHomeUpgradeableInitializedIterator, error) { + + logs, sub, err := _NativeTokenHomeUpgradeable.contract.FilterLogs(opts, "Initialized") + if err != nil { + return nil, err + } + return &NativeTokenHomeUpgradeableInitializedIterator{contract: _NativeTokenHomeUpgradeable.contract, event: "Initialized", logs: logs, sub: sub}, nil +} + +// WatchInitialized is a free log subscription operation binding the contract event 0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2. +// +// Solidity: event Initialized(uint64 version) +func (_NativeTokenHomeUpgradeable *NativeTokenHomeUpgradeableFilterer) WatchInitialized(opts *bind.WatchOpts, sink chan<- *NativeTokenHomeUpgradeableInitialized) (event.Subscription, error) { + + logs, sub, err := _NativeTokenHomeUpgradeable.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(NativeTokenHomeUpgradeableInitialized) + if err := _NativeTokenHomeUpgradeable.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 0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2. +// +// Solidity: event Initialized(uint64 version) +func (_NativeTokenHomeUpgradeable *NativeTokenHomeUpgradeableFilterer) ParseInitialized(log types.Log) (*NativeTokenHomeUpgradeableInitialized, error) { + event := new(NativeTokenHomeUpgradeableInitialized) + if err := _NativeTokenHomeUpgradeable.contract.UnpackLog(event, "Initialized", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// NativeTokenHomeUpgradeableMinTeleporterVersionUpdatedIterator is returned from FilterMinTeleporterVersionUpdated and is used to iterate over the raw logs and unpacked data for MinTeleporterVersionUpdated events raised by the NativeTokenHomeUpgradeable contract. +type NativeTokenHomeUpgradeableMinTeleporterVersionUpdatedIterator struct { + Event *NativeTokenHomeUpgradeableMinTeleporterVersionUpdated // 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 interfaces.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 *NativeTokenHomeUpgradeableMinTeleporterVersionUpdatedIterator) 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(NativeTokenHomeUpgradeableMinTeleporterVersionUpdated) + 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(NativeTokenHomeUpgradeableMinTeleporterVersionUpdated) + 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 *NativeTokenHomeUpgradeableMinTeleporterVersionUpdatedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *NativeTokenHomeUpgradeableMinTeleporterVersionUpdatedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// NativeTokenHomeUpgradeableMinTeleporterVersionUpdated represents a MinTeleporterVersionUpdated event raised by the NativeTokenHomeUpgradeable contract. +type NativeTokenHomeUpgradeableMinTeleporterVersionUpdated struct { + OldMinTeleporterVersion *big.Int + NewMinTeleporterVersion *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterMinTeleporterVersionUpdated is a free log retrieval operation binding the contract event 0xa9a7ef57e41f05b4c15480842f5f0c27edfcbb553fed281f7c4068452cc1c02d. +// +// Solidity: event MinTeleporterVersionUpdated(uint256 indexed oldMinTeleporterVersion, uint256 indexed newMinTeleporterVersion) +func (_NativeTokenHomeUpgradeable *NativeTokenHomeUpgradeableFilterer) FilterMinTeleporterVersionUpdated(opts *bind.FilterOpts, oldMinTeleporterVersion []*big.Int, newMinTeleporterVersion []*big.Int) (*NativeTokenHomeUpgradeableMinTeleporterVersionUpdatedIterator, error) { + + var oldMinTeleporterVersionRule []interface{} + for _, oldMinTeleporterVersionItem := range oldMinTeleporterVersion { + oldMinTeleporterVersionRule = append(oldMinTeleporterVersionRule, oldMinTeleporterVersionItem) + } + var newMinTeleporterVersionRule []interface{} + for _, newMinTeleporterVersionItem := range newMinTeleporterVersion { + newMinTeleporterVersionRule = append(newMinTeleporterVersionRule, newMinTeleporterVersionItem) + } + + logs, sub, err := _NativeTokenHomeUpgradeable.contract.FilterLogs(opts, "MinTeleporterVersionUpdated", oldMinTeleporterVersionRule, newMinTeleporterVersionRule) + if err != nil { + return nil, err + } + return &NativeTokenHomeUpgradeableMinTeleporterVersionUpdatedIterator{contract: _NativeTokenHomeUpgradeable.contract, event: "MinTeleporterVersionUpdated", logs: logs, sub: sub}, nil +} + +// WatchMinTeleporterVersionUpdated is a free log subscription operation binding the contract event 0xa9a7ef57e41f05b4c15480842f5f0c27edfcbb553fed281f7c4068452cc1c02d. +// +// Solidity: event MinTeleporterVersionUpdated(uint256 indexed oldMinTeleporterVersion, uint256 indexed newMinTeleporterVersion) +func (_NativeTokenHomeUpgradeable *NativeTokenHomeUpgradeableFilterer) WatchMinTeleporterVersionUpdated(opts *bind.WatchOpts, sink chan<- *NativeTokenHomeUpgradeableMinTeleporterVersionUpdated, oldMinTeleporterVersion []*big.Int, newMinTeleporterVersion []*big.Int) (event.Subscription, error) { + + var oldMinTeleporterVersionRule []interface{} + for _, oldMinTeleporterVersionItem := range oldMinTeleporterVersion { + oldMinTeleporterVersionRule = append(oldMinTeleporterVersionRule, oldMinTeleporterVersionItem) + } + var newMinTeleporterVersionRule []interface{} + for _, newMinTeleporterVersionItem := range newMinTeleporterVersion { + newMinTeleporterVersionRule = append(newMinTeleporterVersionRule, newMinTeleporterVersionItem) + } + + logs, sub, err := _NativeTokenHomeUpgradeable.contract.WatchLogs(opts, "MinTeleporterVersionUpdated", oldMinTeleporterVersionRule, newMinTeleporterVersionRule) + 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(NativeTokenHomeUpgradeableMinTeleporterVersionUpdated) + if err := _NativeTokenHomeUpgradeable.contract.UnpackLog(event, "MinTeleporterVersionUpdated", 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 +} + +// ParseMinTeleporterVersionUpdated is a log parse operation binding the contract event 0xa9a7ef57e41f05b4c15480842f5f0c27edfcbb553fed281f7c4068452cc1c02d. +// +// Solidity: event MinTeleporterVersionUpdated(uint256 indexed oldMinTeleporterVersion, uint256 indexed newMinTeleporterVersion) +func (_NativeTokenHomeUpgradeable *NativeTokenHomeUpgradeableFilterer) ParseMinTeleporterVersionUpdated(log types.Log) (*NativeTokenHomeUpgradeableMinTeleporterVersionUpdated, error) { + event := new(NativeTokenHomeUpgradeableMinTeleporterVersionUpdated) + if err := _NativeTokenHomeUpgradeable.contract.UnpackLog(event, "MinTeleporterVersionUpdated", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// NativeTokenHomeUpgradeableOwnershipTransferredIterator is returned from FilterOwnershipTransferred and is used to iterate over the raw logs and unpacked data for OwnershipTransferred events raised by the NativeTokenHomeUpgradeable contract. +type NativeTokenHomeUpgradeableOwnershipTransferredIterator struct { + Event *NativeTokenHomeUpgradeableOwnershipTransferred // 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 interfaces.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 *NativeTokenHomeUpgradeableOwnershipTransferredIterator) 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(NativeTokenHomeUpgradeableOwnershipTransferred) + 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(NativeTokenHomeUpgradeableOwnershipTransferred) + 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 *NativeTokenHomeUpgradeableOwnershipTransferredIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *NativeTokenHomeUpgradeableOwnershipTransferredIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// NativeTokenHomeUpgradeableOwnershipTransferred represents a OwnershipTransferred event raised by the NativeTokenHomeUpgradeable contract. +type NativeTokenHomeUpgradeableOwnershipTransferred 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 (_NativeTokenHomeUpgradeable *NativeTokenHomeUpgradeableFilterer) FilterOwnershipTransferred(opts *bind.FilterOpts, previousOwner []common.Address, newOwner []common.Address) (*NativeTokenHomeUpgradeableOwnershipTransferredIterator, 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 := _NativeTokenHomeUpgradeable.contract.FilterLogs(opts, "OwnershipTransferred", previousOwnerRule, newOwnerRule) + if err != nil { + return nil, err + } + return &NativeTokenHomeUpgradeableOwnershipTransferredIterator{contract: _NativeTokenHomeUpgradeable.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 (_NativeTokenHomeUpgradeable *NativeTokenHomeUpgradeableFilterer) WatchOwnershipTransferred(opts *bind.WatchOpts, sink chan<- *NativeTokenHomeUpgradeableOwnershipTransferred, 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 := _NativeTokenHomeUpgradeable.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(NativeTokenHomeUpgradeableOwnershipTransferred) + if err := _NativeTokenHomeUpgradeable.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 (_NativeTokenHomeUpgradeable *NativeTokenHomeUpgradeableFilterer) ParseOwnershipTransferred(log types.Log) (*NativeTokenHomeUpgradeableOwnershipTransferred, error) { + event := new(NativeTokenHomeUpgradeableOwnershipTransferred) + if err := _NativeTokenHomeUpgradeable.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// NativeTokenHomeUpgradeableRemoteRegisteredIterator is returned from FilterRemoteRegistered and is used to iterate over the raw logs and unpacked data for RemoteRegistered events raised by the NativeTokenHomeUpgradeable contract. +type NativeTokenHomeUpgradeableRemoteRegisteredIterator struct { + Event *NativeTokenHomeUpgradeableRemoteRegistered // 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 interfaces.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 *NativeTokenHomeUpgradeableRemoteRegisteredIterator) 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(NativeTokenHomeUpgradeableRemoteRegistered) + 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(NativeTokenHomeUpgradeableRemoteRegistered) + 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 *NativeTokenHomeUpgradeableRemoteRegisteredIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *NativeTokenHomeUpgradeableRemoteRegisteredIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// NativeTokenHomeUpgradeableRemoteRegistered represents a RemoteRegistered event raised by the NativeTokenHomeUpgradeable contract. +type NativeTokenHomeUpgradeableRemoteRegistered struct { + RemoteBlockchainID [32]byte + RemoteTokenTransferrerAddress common.Address + InitialCollateralNeeded *big.Int + TokenDecimals uint8 + Raw types.Log // Blockchain specific contextual infos +} + +// FilterRemoteRegistered is a free log retrieval operation binding the contract event 0xf229b02a51a4c8d5ef03a096ae0dd727d7b48b710d21b50ebebb560eef739b90. +// +// Solidity: event RemoteRegistered(bytes32 indexed remoteBlockchainID, address indexed remoteTokenTransferrerAddress, uint256 initialCollateralNeeded, uint8 tokenDecimals) +func (_NativeTokenHomeUpgradeable *NativeTokenHomeUpgradeableFilterer) FilterRemoteRegistered(opts *bind.FilterOpts, remoteBlockchainID [][32]byte, remoteTokenTransferrerAddress []common.Address) (*NativeTokenHomeUpgradeableRemoteRegisteredIterator, error) { + + var remoteBlockchainIDRule []interface{} + for _, remoteBlockchainIDItem := range remoteBlockchainID { + remoteBlockchainIDRule = append(remoteBlockchainIDRule, remoteBlockchainIDItem) + } + var remoteTokenTransferrerAddressRule []interface{} + for _, remoteTokenTransferrerAddressItem := range remoteTokenTransferrerAddress { + remoteTokenTransferrerAddressRule = append(remoteTokenTransferrerAddressRule, remoteTokenTransferrerAddressItem) + } + + logs, sub, err := _NativeTokenHomeUpgradeable.contract.FilterLogs(opts, "RemoteRegistered", remoteBlockchainIDRule, remoteTokenTransferrerAddressRule) + if err != nil { + return nil, err + } + return &NativeTokenHomeUpgradeableRemoteRegisteredIterator{contract: _NativeTokenHomeUpgradeable.contract, event: "RemoteRegistered", logs: logs, sub: sub}, nil +} + +// WatchRemoteRegistered is a free log subscription operation binding the contract event 0xf229b02a51a4c8d5ef03a096ae0dd727d7b48b710d21b50ebebb560eef739b90. +// +// Solidity: event RemoteRegistered(bytes32 indexed remoteBlockchainID, address indexed remoteTokenTransferrerAddress, uint256 initialCollateralNeeded, uint8 tokenDecimals) +func (_NativeTokenHomeUpgradeable *NativeTokenHomeUpgradeableFilterer) WatchRemoteRegistered(opts *bind.WatchOpts, sink chan<- *NativeTokenHomeUpgradeableRemoteRegistered, remoteBlockchainID [][32]byte, remoteTokenTransferrerAddress []common.Address) (event.Subscription, error) { + + var remoteBlockchainIDRule []interface{} + for _, remoteBlockchainIDItem := range remoteBlockchainID { + remoteBlockchainIDRule = append(remoteBlockchainIDRule, remoteBlockchainIDItem) + } + var remoteTokenTransferrerAddressRule []interface{} + for _, remoteTokenTransferrerAddressItem := range remoteTokenTransferrerAddress { + remoteTokenTransferrerAddressRule = append(remoteTokenTransferrerAddressRule, remoteTokenTransferrerAddressItem) + } + + logs, sub, err := _NativeTokenHomeUpgradeable.contract.WatchLogs(opts, "RemoteRegistered", remoteBlockchainIDRule, remoteTokenTransferrerAddressRule) + 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(NativeTokenHomeUpgradeableRemoteRegistered) + if err := _NativeTokenHomeUpgradeable.contract.UnpackLog(event, "RemoteRegistered", 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 +} + +// ParseRemoteRegistered is a log parse operation binding the contract event 0xf229b02a51a4c8d5ef03a096ae0dd727d7b48b710d21b50ebebb560eef739b90. +// +// Solidity: event RemoteRegistered(bytes32 indexed remoteBlockchainID, address indexed remoteTokenTransferrerAddress, uint256 initialCollateralNeeded, uint8 tokenDecimals) +func (_NativeTokenHomeUpgradeable *NativeTokenHomeUpgradeableFilterer) ParseRemoteRegistered(log types.Log) (*NativeTokenHomeUpgradeableRemoteRegistered, error) { + event := new(NativeTokenHomeUpgradeableRemoteRegistered) + if err := _NativeTokenHomeUpgradeable.contract.UnpackLog(event, "RemoteRegistered", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// NativeTokenHomeUpgradeableTeleporterAddressPausedIterator is returned from FilterTeleporterAddressPaused and is used to iterate over the raw logs and unpacked data for TeleporterAddressPaused events raised by the NativeTokenHomeUpgradeable contract. +type NativeTokenHomeUpgradeableTeleporterAddressPausedIterator struct { + Event *NativeTokenHomeUpgradeableTeleporterAddressPaused // 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 interfaces.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 *NativeTokenHomeUpgradeableTeleporterAddressPausedIterator) 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(NativeTokenHomeUpgradeableTeleporterAddressPaused) + 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(NativeTokenHomeUpgradeableTeleporterAddressPaused) + 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 *NativeTokenHomeUpgradeableTeleporterAddressPausedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *NativeTokenHomeUpgradeableTeleporterAddressPausedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// NativeTokenHomeUpgradeableTeleporterAddressPaused represents a TeleporterAddressPaused event raised by the NativeTokenHomeUpgradeable contract. +type NativeTokenHomeUpgradeableTeleporterAddressPaused struct { + TeleporterAddress common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterTeleporterAddressPaused is a free log retrieval operation binding the contract event 0x933f93e57a222e6330362af8b376d0a8725b6901e9a2fb86d00f169702b28a4c. +// +// Solidity: event TeleporterAddressPaused(address indexed teleporterAddress) +func (_NativeTokenHomeUpgradeable *NativeTokenHomeUpgradeableFilterer) FilterTeleporterAddressPaused(opts *bind.FilterOpts, teleporterAddress []common.Address) (*NativeTokenHomeUpgradeableTeleporterAddressPausedIterator, error) { + + var teleporterAddressRule []interface{} + for _, teleporterAddressItem := range teleporterAddress { + teleporterAddressRule = append(teleporterAddressRule, teleporterAddressItem) + } + + logs, sub, err := _NativeTokenHomeUpgradeable.contract.FilterLogs(opts, "TeleporterAddressPaused", teleporterAddressRule) + if err != nil { + return nil, err + } + return &NativeTokenHomeUpgradeableTeleporterAddressPausedIterator{contract: _NativeTokenHomeUpgradeable.contract, event: "TeleporterAddressPaused", logs: logs, sub: sub}, nil +} + +// WatchTeleporterAddressPaused is a free log subscription operation binding the contract event 0x933f93e57a222e6330362af8b376d0a8725b6901e9a2fb86d00f169702b28a4c. +// +// Solidity: event TeleporterAddressPaused(address indexed teleporterAddress) +func (_NativeTokenHomeUpgradeable *NativeTokenHomeUpgradeableFilterer) WatchTeleporterAddressPaused(opts *bind.WatchOpts, sink chan<- *NativeTokenHomeUpgradeableTeleporterAddressPaused, teleporterAddress []common.Address) (event.Subscription, error) { + + var teleporterAddressRule []interface{} + for _, teleporterAddressItem := range teleporterAddress { + teleporterAddressRule = append(teleporterAddressRule, teleporterAddressItem) + } + + logs, sub, err := _NativeTokenHomeUpgradeable.contract.WatchLogs(opts, "TeleporterAddressPaused", teleporterAddressRule) + 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(NativeTokenHomeUpgradeableTeleporterAddressPaused) + if err := _NativeTokenHomeUpgradeable.contract.UnpackLog(event, "TeleporterAddressPaused", 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 +} + +// ParseTeleporterAddressPaused is a log parse operation binding the contract event 0x933f93e57a222e6330362af8b376d0a8725b6901e9a2fb86d00f169702b28a4c. +// +// Solidity: event TeleporterAddressPaused(address indexed teleporterAddress) +func (_NativeTokenHomeUpgradeable *NativeTokenHomeUpgradeableFilterer) ParseTeleporterAddressPaused(log types.Log) (*NativeTokenHomeUpgradeableTeleporterAddressPaused, error) { + event := new(NativeTokenHomeUpgradeableTeleporterAddressPaused) + if err := _NativeTokenHomeUpgradeable.contract.UnpackLog(event, "TeleporterAddressPaused", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// NativeTokenHomeUpgradeableTeleporterAddressUnpausedIterator is returned from FilterTeleporterAddressUnpaused and is used to iterate over the raw logs and unpacked data for TeleporterAddressUnpaused events raised by the NativeTokenHomeUpgradeable contract. +type NativeTokenHomeUpgradeableTeleporterAddressUnpausedIterator struct { + Event *NativeTokenHomeUpgradeableTeleporterAddressUnpaused // 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 interfaces.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 *NativeTokenHomeUpgradeableTeleporterAddressUnpausedIterator) 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(NativeTokenHomeUpgradeableTeleporterAddressUnpaused) + 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(NativeTokenHomeUpgradeableTeleporterAddressUnpaused) + 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 *NativeTokenHomeUpgradeableTeleporterAddressUnpausedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *NativeTokenHomeUpgradeableTeleporterAddressUnpausedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// NativeTokenHomeUpgradeableTeleporterAddressUnpaused represents a TeleporterAddressUnpaused event raised by the NativeTokenHomeUpgradeable contract. +type NativeTokenHomeUpgradeableTeleporterAddressUnpaused struct { + TeleporterAddress common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterTeleporterAddressUnpaused is a free log retrieval operation binding the contract event 0x844e2f3154214672229235858fd029d1dfd543901c6d05931f0bc2480a2d72c3. +// +// Solidity: event TeleporterAddressUnpaused(address indexed teleporterAddress) +func (_NativeTokenHomeUpgradeable *NativeTokenHomeUpgradeableFilterer) FilterTeleporterAddressUnpaused(opts *bind.FilterOpts, teleporterAddress []common.Address) (*NativeTokenHomeUpgradeableTeleporterAddressUnpausedIterator, error) { + + var teleporterAddressRule []interface{} + for _, teleporterAddressItem := range teleporterAddress { + teleporterAddressRule = append(teleporterAddressRule, teleporterAddressItem) + } + + logs, sub, err := _NativeTokenHomeUpgradeable.contract.FilterLogs(opts, "TeleporterAddressUnpaused", teleporterAddressRule) + if err != nil { + return nil, err + } + return &NativeTokenHomeUpgradeableTeleporterAddressUnpausedIterator{contract: _NativeTokenHomeUpgradeable.contract, event: "TeleporterAddressUnpaused", logs: logs, sub: sub}, nil +} + +// WatchTeleporterAddressUnpaused is a free log subscription operation binding the contract event 0x844e2f3154214672229235858fd029d1dfd543901c6d05931f0bc2480a2d72c3. +// +// Solidity: event TeleporterAddressUnpaused(address indexed teleporterAddress) +func (_NativeTokenHomeUpgradeable *NativeTokenHomeUpgradeableFilterer) WatchTeleporterAddressUnpaused(opts *bind.WatchOpts, sink chan<- *NativeTokenHomeUpgradeableTeleporterAddressUnpaused, teleporterAddress []common.Address) (event.Subscription, error) { + + var teleporterAddressRule []interface{} + for _, teleporterAddressItem := range teleporterAddress { + teleporterAddressRule = append(teleporterAddressRule, teleporterAddressItem) + } + + logs, sub, err := _NativeTokenHomeUpgradeable.contract.WatchLogs(opts, "TeleporterAddressUnpaused", teleporterAddressRule) + 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(NativeTokenHomeUpgradeableTeleporterAddressUnpaused) + if err := _NativeTokenHomeUpgradeable.contract.UnpackLog(event, "TeleporterAddressUnpaused", 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 +} + +// ParseTeleporterAddressUnpaused is a log parse operation binding the contract event 0x844e2f3154214672229235858fd029d1dfd543901c6d05931f0bc2480a2d72c3. +// +// Solidity: event TeleporterAddressUnpaused(address indexed teleporterAddress) +func (_NativeTokenHomeUpgradeable *NativeTokenHomeUpgradeableFilterer) ParseTeleporterAddressUnpaused(log types.Log) (*NativeTokenHomeUpgradeableTeleporterAddressUnpaused, error) { + event := new(NativeTokenHomeUpgradeableTeleporterAddressUnpaused) + if err := _NativeTokenHomeUpgradeable.contract.UnpackLog(event, "TeleporterAddressUnpaused", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// NativeTokenHomeUpgradeableTokensAndCallRoutedIterator is returned from FilterTokensAndCallRouted and is used to iterate over the raw logs and unpacked data for TokensAndCallRouted events raised by the NativeTokenHomeUpgradeable contract. +type NativeTokenHomeUpgradeableTokensAndCallRoutedIterator struct { + Event *NativeTokenHomeUpgradeableTokensAndCallRouted // 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 interfaces.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 *NativeTokenHomeUpgradeableTokensAndCallRoutedIterator) 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(NativeTokenHomeUpgradeableTokensAndCallRouted) + 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(NativeTokenHomeUpgradeableTokensAndCallRouted) + 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 *NativeTokenHomeUpgradeableTokensAndCallRoutedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *NativeTokenHomeUpgradeableTokensAndCallRoutedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// NativeTokenHomeUpgradeableTokensAndCallRouted represents a TokensAndCallRouted event raised by the NativeTokenHomeUpgradeable contract. +type NativeTokenHomeUpgradeableTokensAndCallRouted struct { + TeleporterMessageID [32]byte + Input SendAndCallInput + Amount *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterTokensAndCallRouted is a free log retrieval operation binding the contract event 0x42eff9005856e3c586b096d67211a566dc926052119fd7cc08023c70937ecb30. +// +// Solidity: event TokensAndCallRouted(bytes32 indexed teleporterMessageID, (bytes32,address,address,bytes,uint256,uint256,address,address,address,uint256,uint256) input, uint256 amount) +func (_NativeTokenHomeUpgradeable *NativeTokenHomeUpgradeableFilterer) FilterTokensAndCallRouted(opts *bind.FilterOpts, teleporterMessageID [][32]byte) (*NativeTokenHomeUpgradeableTokensAndCallRoutedIterator, error) { + + var teleporterMessageIDRule []interface{} + for _, teleporterMessageIDItem := range teleporterMessageID { + teleporterMessageIDRule = append(teleporterMessageIDRule, teleporterMessageIDItem) + } + + logs, sub, err := _NativeTokenHomeUpgradeable.contract.FilterLogs(opts, "TokensAndCallRouted", teleporterMessageIDRule) + if err != nil { + return nil, err + } + return &NativeTokenHomeUpgradeableTokensAndCallRoutedIterator{contract: _NativeTokenHomeUpgradeable.contract, event: "TokensAndCallRouted", logs: logs, sub: sub}, nil +} + +// WatchTokensAndCallRouted is a free log subscription operation binding the contract event 0x42eff9005856e3c586b096d67211a566dc926052119fd7cc08023c70937ecb30. +// +// Solidity: event TokensAndCallRouted(bytes32 indexed teleporterMessageID, (bytes32,address,address,bytes,uint256,uint256,address,address,address,uint256,uint256) input, uint256 amount) +func (_NativeTokenHomeUpgradeable *NativeTokenHomeUpgradeableFilterer) WatchTokensAndCallRouted(opts *bind.WatchOpts, sink chan<- *NativeTokenHomeUpgradeableTokensAndCallRouted, teleporterMessageID [][32]byte) (event.Subscription, error) { + + var teleporterMessageIDRule []interface{} + for _, teleporterMessageIDItem := range teleporterMessageID { + teleporterMessageIDRule = append(teleporterMessageIDRule, teleporterMessageIDItem) + } + + logs, sub, err := _NativeTokenHomeUpgradeable.contract.WatchLogs(opts, "TokensAndCallRouted", teleporterMessageIDRule) + 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(NativeTokenHomeUpgradeableTokensAndCallRouted) + if err := _NativeTokenHomeUpgradeable.contract.UnpackLog(event, "TokensAndCallRouted", 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 +} + +// ParseTokensAndCallRouted is a log parse operation binding the contract event 0x42eff9005856e3c586b096d67211a566dc926052119fd7cc08023c70937ecb30. +// +// Solidity: event TokensAndCallRouted(bytes32 indexed teleporterMessageID, (bytes32,address,address,bytes,uint256,uint256,address,address,address,uint256,uint256) input, uint256 amount) +func (_NativeTokenHomeUpgradeable *NativeTokenHomeUpgradeableFilterer) ParseTokensAndCallRouted(log types.Log) (*NativeTokenHomeUpgradeableTokensAndCallRouted, error) { + event := new(NativeTokenHomeUpgradeableTokensAndCallRouted) + if err := _NativeTokenHomeUpgradeable.contract.UnpackLog(event, "TokensAndCallRouted", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// NativeTokenHomeUpgradeableTokensAndCallSentIterator is returned from FilterTokensAndCallSent and is used to iterate over the raw logs and unpacked data for TokensAndCallSent events raised by the NativeTokenHomeUpgradeable contract. +type NativeTokenHomeUpgradeableTokensAndCallSentIterator struct { + Event *NativeTokenHomeUpgradeableTokensAndCallSent // 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 interfaces.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 *NativeTokenHomeUpgradeableTokensAndCallSentIterator) 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(NativeTokenHomeUpgradeableTokensAndCallSent) + 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(NativeTokenHomeUpgradeableTokensAndCallSent) + 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 *NativeTokenHomeUpgradeableTokensAndCallSentIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *NativeTokenHomeUpgradeableTokensAndCallSentIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// NativeTokenHomeUpgradeableTokensAndCallSent represents a TokensAndCallSent event raised by the NativeTokenHomeUpgradeable contract. +type NativeTokenHomeUpgradeableTokensAndCallSent struct { + TeleporterMessageID [32]byte + Sender common.Address + Input SendAndCallInput + Amount *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterTokensAndCallSent is a free log retrieval operation binding the contract event 0x5d76dff81bf773b908b050fa113d39f7d8135bb4175398f313ea19cd3a1a0b16. +// +// Solidity: event TokensAndCallSent(bytes32 indexed teleporterMessageID, address indexed sender, (bytes32,address,address,bytes,uint256,uint256,address,address,address,uint256,uint256) input, uint256 amount) +func (_NativeTokenHomeUpgradeable *NativeTokenHomeUpgradeableFilterer) FilterTokensAndCallSent(opts *bind.FilterOpts, teleporterMessageID [][32]byte, sender []common.Address) (*NativeTokenHomeUpgradeableTokensAndCallSentIterator, error) { + + var teleporterMessageIDRule []interface{} + for _, teleporterMessageIDItem := range teleporterMessageID { + teleporterMessageIDRule = append(teleporterMessageIDRule, teleporterMessageIDItem) + } + var senderRule []interface{} + for _, senderItem := range sender { + senderRule = append(senderRule, senderItem) + } + + logs, sub, err := _NativeTokenHomeUpgradeable.contract.FilterLogs(opts, "TokensAndCallSent", teleporterMessageIDRule, senderRule) + if err != nil { + return nil, err + } + return &NativeTokenHomeUpgradeableTokensAndCallSentIterator{contract: _NativeTokenHomeUpgradeable.contract, event: "TokensAndCallSent", logs: logs, sub: sub}, nil +} + +// WatchTokensAndCallSent is a free log subscription operation binding the contract event 0x5d76dff81bf773b908b050fa113d39f7d8135bb4175398f313ea19cd3a1a0b16. +// +// Solidity: event TokensAndCallSent(bytes32 indexed teleporterMessageID, address indexed sender, (bytes32,address,address,bytes,uint256,uint256,address,address,address,uint256,uint256) input, uint256 amount) +func (_NativeTokenHomeUpgradeable *NativeTokenHomeUpgradeableFilterer) WatchTokensAndCallSent(opts *bind.WatchOpts, sink chan<- *NativeTokenHomeUpgradeableTokensAndCallSent, teleporterMessageID [][32]byte, sender []common.Address) (event.Subscription, error) { + + var teleporterMessageIDRule []interface{} + for _, teleporterMessageIDItem := range teleporterMessageID { + teleporterMessageIDRule = append(teleporterMessageIDRule, teleporterMessageIDItem) + } + var senderRule []interface{} + for _, senderItem := range sender { + senderRule = append(senderRule, senderItem) + } + + logs, sub, err := _NativeTokenHomeUpgradeable.contract.WatchLogs(opts, "TokensAndCallSent", teleporterMessageIDRule, senderRule) + 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(NativeTokenHomeUpgradeableTokensAndCallSent) + if err := _NativeTokenHomeUpgradeable.contract.UnpackLog(event, "TokensAndCallSent", 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 +} + +// ParseTokensAndCallSent is a log parse operation binding the contract event 0x5d76dff81bf773b908b050fa113d39f7d8135bb4175398f313ea19cd3a1a0b16. +// +// Solidity: event TokensAndCallSent(bytes32 indexed teleporterMessageID, address indexed sender, (bytes32,address,address,bytes,uint256,uint256,address,address,address,uint256,uint256) input, uint256 amount) +func (_NativeTokenHomeUpgradeable *NativeTokenHomeUpgradeableFilterer) ParseTokensAndCallSent(log types.Log) (*NativeTokenHomeUpgradeableTokensAndCallSent, error) { + event := new(NativeTokenHomeUpgradeableTokensAndCallSent) + if err := _NativeTokenHomeUpgradeable.contract.UnpackLog(event, "TokensAndCallSent", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// NativeTokenHomeUpgradeableTokensRoutedIterator is returned from FilterTokensRouted and is used to iterate over the raw logs and unpacked data for TokensRouted events raised by the NativeTokenHomeUpgradeable contract. +type NativeTokenHomeUpgradeableTokensRoutedIterator struct { + Event *NativeTokenHomeUpgradeableTokensRouted // 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 interfaces.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 *NativeTokenHomeUpgradeableTokensRoutedIterator) 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(NativeTokenHomeUpgradeableTokensRouted) + 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(NativeTokenHomeUpgradeableTokensRouted) + 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 *NativeTokenHomeUpgradeableTokensRoutedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *NativeTokenHomeUpgradeableTokensRoutedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// NativeTokenHomeUpgradeableTokensRouted represents a TokensRouted event raised by the NativeTokenHomeUpgradeable contract. +type NativeTokenHomeUpgradeableTokensRouted struct { + TeleporterMessageID [32]byte + Input SendTokensInput + Amount *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterTokensRouted is a free log retrieval operation binding the contract event 0x825080857c76cef4a1629c0705a7f8b4ef0282ddcafde0b6715c4fb34b68aaf0. +// +// Solidity: event TokensRouted(bytes32 indexed teleporterMessageID, (bytes32,address,address,address,uint256,uint256,uint256,address) input, uint256 amount) +func (_NativeTokenHomeUpgradeable *NativeTokenHomeUpgradeableFilterer) FilterTokensRouted(opts *bind.FilterOpts, teleporterMessageID [][32]byte) (*NativeTokenHomeUpgradeableTokensRoutedIterator, error) { + + var teleporterMessageIDRule []interface{} + for _, teleporterMessageIDItem := range teleporterMessageID { + teleporterMessageIDRule = append(teleporterMessageIDRule, teleporterMessageIDItem) + } + + logs, sub, err := _NativeTokenHomeUpgradeable.contract.FilterLogs(opts, "TokensRouted", teleporterMessageIDRule) + if err != nil { + return nil, err + } + return &NativeTokenHomeUpgradeableTokensRoutedIterator{contract: _NativeTokenHomeUpgradeable.contract, event: "TokensRouted", logs: logs, sub: sub}, nil +} + +// WatchTokensRouted is a free log subscription operation binding the contract event 0x825080857c76cef4a1629c0705a7f8b4ef0282ddcafde0b6715c4fb34b68aaf0. +// +// Solidity: event TokensRouted(bytes32 indexed teleporterMessageID, (bytes32,address,address,address,uint256,uint256,uint256,address) input, uint256 amount) +func (_NativeTokenHomeUpgradeable *NativeTokenHomeUpgradeableFilterer) WatchTokensRouted(opts *bind.WatchOpts, sink chan<- *NativeTokenHomeUpgradeableTokensRouted, teleporterMessageID [][32]byte) (event.Subscription, error) { + + var teleporterMessageIDRule []interface{} + for _, teleporterMessageIDItem := range teleporterMessageID { + teleporterMessageIDRule = append(teleporterMessageIDRule, teleporterMessageIDItem) + } + + logs, sub, err := _NativeTokenHomeUpgradeable.contract.WatchLogs(opts, "TokensRouted", teleporterMessageIDRule) + 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(NativeTokenHomeUpgradeableTokensRouted) + if err := _NativeTokenHomeUpgradeable.contract.UnpackLog(event, "TokensRouted", 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 +} + +// ParseTokensRouted is a log parse operation binding the contract event 0x825080857c76cef4a1629c0705a7f8b4ef0282ddcafde0b6715c4fb34b68aaf0. +// +// Solidity: event TokensRouted(bytes32 indexed teleporterMessageID, (bytes32,address,address,address,uint256,uint256,uint256,address) input, uint256 amount) +func (_NativeTokenHomeUpgradeable *NativeTokenHomeUpgradeableFilterer) ParseTokensRouted(log types.Log) (*NativeTokenHomeUpgradeableTokensRouted, error) { + event := new(NativeTokenHomeUpgradeableTokensRouted) + if err := _NativeTokenHomeUpgradeable.contract.UnpackLog(event, "TokensRouted", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// NativeTokenHomeUpgradeableTokensSentIterator is returned from FilterTokensSent and is used to iterate over the raw logs and unpacked data for TokensSent events raised by the NativeTokenHomeUpgradeable contract. +type NativeTokenHomeUpgradeableTokensSentIterator struct { + Event *NativeTokenHomeUpgradeableTokensSent // 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 interfaces.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 *NativeTokenHomeUpgradeableTokensSentIterator) 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(NativeTokenHomeUpgradeableTokensSent) + 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(NativeTokenHomeUpgradeableTokensSent) + 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 *NativeTokenHomeUpgradeableTokensSentIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *NativeTokenHomeUpgradeableTokensSentIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// NativeTokenHomeUpgradeableTokensSent represents a TokensSent event raised by the NativeTokenHomeUpgradeable contract. +type NativeTokenHomeUpgradeableTokensSent struct { + TeleporterMessageID [32]byte + Sender common.Address + Input SendTokensInput + Amount *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterTokensSent is a free log retrieval operation binding the contract event 0x93f19bf1ec58a15dc643b37e7e18a1c13e85e06cd11929e283154691ace9fb52. +// +// Solidity: event TokensSent(bytes32 indexed teleporterMessageID, address indexed sender, (bytes32,address,address,address,uint256,uint256,uint256,address) input, uint256 amount) +func (_NativeTokenHomeUpgradeable *NativeTokenHomeUpgradeableFilterer) FilterTokensSent(opts *bind.FilterOpts, teleporterMessageID [][32]byte, sender []common.Address) (*NativeTokenHomeUpgradeableTokensSentIterator, error) { + + var teleporterMessageIDRule []interface{} + for _, teleporterMessageIDItem := range teleporterMessageID { + teleporterMessageIDRule = append(teleporterMessageIDRule, teleporterMessageIDItem) + } + var senderRule []interface{} + for _, senderItem := range sender { + senderRule = append(senderRule, senderItem) + } + + logs, sub, err := _NativeTokenHomeUpgradeable.contract.FilterLogs(opts, "TokensSent", teleporterMessageIDRule, senderRule) + if err != nil { + return nil, err + } + return &NativeTokenHomeUpgradeableTokensSentIterator{contract: _NativeTokenHomeUpgradeable.contract, event: "TokensSent", logs: logs, sub: sub}, nil +} + +// WatchTokensSent is a free log subscription operation binding the contract event 0x93f19bf1ec58a15dc643b37e7e18a1c13e85e06cd11929e283154691ace9fb52. +// +// Solidity: event TokensSent(bytes32 indexed teleporterMessageID, address indexed sender, (bytes32,address,address,address,uint256,uint256,uint256,address) input, uint256 amount) +func (_NativeTokenHomeUpgradeable *NativeTokenHomeUpgradeableFilterer) WatchTokensSent(opts *bind.WatchOpts, sink chan<- *NativeTokenHomeUpgradeableTokensSent, teleporterMessageID [][32]byte, sender []common.Address) (event.Subscription, error) { + + var teleporterMessageIDRule []interface{} + for _, teleporterMessageIDItem := range teleporterMessageID { + teleporterMessageIDRule = append(teleporterMessageIDRule, teleporterMessageIDItem) + } + var senderRule []interface{} + for _, senderItem := range sender { + senderRule = append(senderRule, senderItem) + } + + logs, sub, err := _NativeTokenHomeUpgradeable.contract.WatchLogs(opts, "TokensSent", teleporterMessageIDRule, senderRule) + 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(NativeTokenHomeUpgradeableTokensSent) + if err := _NativeTokenHomeUpgradeable.contract.UnpackLog(event, "TokensSent", 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 +} + +// ParseTokensSent is a log parse operation binding the contract event 0x93f19bf1ec58a15dc643b37e7e18a1c13e85e06cd11929e283154691ace9fb52. +// +// Solidity: event TokensSent(bytes32 indexed teleporterMessageID, address indexed sender, (bytes32,address,address,address,uint256,uint256,uint256,address) input, uint256 amount) +func (_NativeTokenHomeUpgradeable *NativeTokenHomeUpgradeableFilterer) ParseTokensSent(log types.Log) (*NativeTokenHomeUpgradeableTokensSent, error) { + event := new(NativeTokenHomeUpgradeableTokensSent) + if err := _NativeTokenHomeUpgradeable.contract.UnpackLog(event, "TokensSent", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// NativeTokenHomeUpgradeableTokensWithdrawnIterator is returned from FilterTokensWithdrawn and is used to iterate over the raw logs and unpacked data for TokensWithdrawn events raised by the NativeTokenHomeUpgradeable contract. +type NativeTokenHomeUpgradeableTokensWithdrawnIterator struct { + Event *NativeTokenHomeUpgradeableTokensWithdrawn // 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 interfaces.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 *NativeTokenHomeUpgradeableTokensWithdrawnIterator) 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(NativeTokenHomeUpgradeableTokensWithdrawn) + 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(NativeTokenHomeUpgradeableTokensWithdrawn) + 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 *NativeTokenHomeUpgradeableTokensWithdrawnIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *NativeTokenHomeUpgradeableTokensWithdrawnIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// NativeTokenHomeUpgradeableTokensWithdrawn represents a TokensWithdrawn event raised by the NativeTokenHomeUpgradeable contract. +type NativeTokenHomeUpgradeableTokensWithdrawn struct { + Recipient common.Address + Amount *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterTokensWithdrawn is a free log retrieval operation binding the contract event 0x6352c5382c4a4578e712449ca65e83cdb392d045dfcf1cad9615189db2da244b. +// +// Solidity: event TokensWithdrawn(address indexed recipient, uint256 amount) +func (_NativeTokenHomeUpgradeable *NativeTokenHomeUpgradeableFilterer) FilterTokensWithdrawn(opts *bind.FilterOpts, recipient []common.Address) (*NativeTokenHomeUpgradeableTokensWithdrawnIterator, error) { + + var recipientRule []interface{} + for _, recipientItem := range recipient { + recipientRule = append(recipientRule, recipientItem) + } + + logs, sub, err := _NativeTokenHomeUpgradeable.contract.FilterLogs(opts, "TokensWithdrawn", recipientRule) + if err != nil { + return nil, err + } + return &NativeTokenHomeUpgradeableTokensWithdrawnIterator{contract: _NativeTokenHomeUpgradeable.contract, event: "TokensWithdrawn", logs: logs, sub: sub}, nil +} + +// WatchTokensWithdrawn is a free log subscription operation binding the contract event 0x6352c5382c4a4578e712449ca65e83cdb392d045dfcf1cad9615189db2da244b. +// +// Solidity: event TokensWithdrawn(address indexed recipient, uint256 amount) +func (_NativeTokenHomeUpgradeable *NativeTokenHomeUpgradeableFilterer) WatchTokensWithdrawn(opts *bind.WatchOpts, sink chan<- *NativeTokenHomeUpgradeableTokensWithdrawn, recipient []common.Address) (event.Subscription, error) { + + var recipientRule []interface{} + for _, recipientItem := range recipient { + recipientRule = append(recipientRule, recipientItem) + } + + logs, sub, err := _NativeTokenHomeUpgradeable.contract.WatchLogs(opts, "TokensWithdrawn", recipientRule) + 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(NativeTokenHomeUpgradeableTokensWithdrawn) + if err := _NativeTokenHomeUpgradeable.contract.UnpackLog(event, "TokensWithdrawn", 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 +} + +// ParseTokensWithdrawn is a log parse operation binding the contract event 0x6352c5382c4a4578e712449ca65e83cdb392d045dfcf1cad9615189db2da244b. +// +// Solidity: event TokensWithdrawn(address indexed recipient, uint256 amount) +func (_NativeTokenHomeUpgradeable *NativeTokenHomeUpgradeableFilterer) ParseTokensWithdrawn(log types.Log) (*NativeTokenHomeUpgradeableTokensWithdrawn, error) { + event := new(NativeTokenHomeUpgradeableTokensWithdrawn) + if err := _NativeTokenHomeUpgradeable.contract.UnpackLog(event, "TokensWithdrawn", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} diff --git a/abi-bindings/go/ictt/TokenHome/TokenHome/TokenHome.go b/abi-bindings/go/ictt/TokenHome/TokenHome/TokenHome.go new file mode 100644 index 000000000..11450401a --- /dev/null +++ b/abi-bindings/go/ictt/TokenHome/TokenHome/TokenHome.go @@ -0,0 +1,2696 @@ +// Code generated - DO NOT EDIT. +// This file is a generated binding and any manual changes will be lost. + +package tokenhome + +import ( + "errors" + "math/big" + "strings" + + "github.com/ava-labs/subnet-evm/accounts/abi" + "github.com/ava-labs/subnet-evm/accounts/abi/bind" + "github.com/ava-labs/subnet-evm/core/types" + "github.com/ava-labs/subnet-evm/interfaces" + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/event" +) + +// Reference imports to suppress errors if they are not otherwise used. +var ( + _ = errors.New + _ = big.NewInt + _ = strings.NewReader + _ = interfaces.NotFound + _ = bind.Bind + _ = common.Big1 + _ = types.BloomLookup + _ = event.NewSubscription + _ = abi.ConvertType +) + +// RemoteTokenTransferrerSettings is an auto generated low-level Go binding around an user-defined struct. +type RemoteTokenTransferrerSettings struct { + Registered bool + CollateralNeeded *big.Int + TokenMultiplier *big.Int + MultiplyOnRemote bool +} + +// SendAndCallInput is an auto generated low-level Go binding around an user-defined struct. +type SendAndCallInput struct { + DestinationBlockchainID [32]byte + DestinationTokenTransferrerAddress common.Address + RecipientContract common.Address + RecipientPayload []byte + RequiredGasLimit *big.Int + RecipientGasLimit *big.Int + MultiHopFallback common.Address + FallbackRecipient common.Address + PrimaryFeeTokenAddress common.Address + PrimaryFee *big.Int + SecondaryFee *big.Int +} + +// SendTokensInput is an auto generated low-level Go binding around an user-defined struct. +type SendTokensInput struct { + DestinationBlockchainID [32]byte + DestinationTokenTransferrerAddress common.Address + Recipient common.Address + PrimaryFeeTokenAddress common.Address + PrimaryFee *big.Int + SecondaryFee *big.Int + RequiredGasLimit *big.Int + MultiHopFallback common.Address +} + +// TokenHomeMetaData contains all meta data concerning the TokenHome contract. +var TokenHomeMetaData = &bind.MetaData{ + ABI: "[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"target\",\"type\":\"address\"}],\"name\":\"AddressEmptyCode\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"AddressInsufficientBalance\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"FailedInnerCall\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidInitialization\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotInitializing\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"OwnableInvalidOwner\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"OwnableUnauthorizedAccount\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ReentrancyGuardReentrantCall\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"SafeERC20FailedOperation\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"recipientContract\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"CallFailed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"recipientContract\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"CallSucceeded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"remoteBlockchainID\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"remoteTokenTransferrerAddress\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"remaining\",\"type\":\"uint256\"}],\"name\":\"CollateralAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"version\",\"type\":\"uint64\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"oldMinTeleporterVersion\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"newMinTeleporterVersion\",\"type\":\"uint256\"}],\"name\":\"MinTeleporterVersionUpdated\",\"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\":\"bytes32\",\"name\":\"remoteBlockchainID\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"remoteTokenTransferrerAddress\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"initialCollateralNeeded\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"tokenDecimals\",\"type\":\"uint8\"}],\"name\":\"RemoteRegistered\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"teleporterAddress\",\"type\":\"address\"}],\"name\":\"TeleporterAddressPaused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"teleporterAddress\",\"type\":\"address\"}],\"name\":\"TeleporterAddressUnpaused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"teleporterMessageID\",\"type\":\"bytes32\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"destinationBlockchainID\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"destinationTokenTransferrerAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"recipientContract\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"recipientPayload\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"requiredGasLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"recipientGasLimit\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"multiHopFallback\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"fallbackRecipient\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"primaryFeeTokenAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"primaryFee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"secondaryFee\",\"type\":\"uint256\"}],\"indexed\":false,\"internalType\":\"structSendAndCallInput\",\"name\":\"input\",\"type\":\"tuple\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"TokensAndCallRouted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"teleporterMessageID\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"destinationBlockchainID\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"destinationTokenTransferrerAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"recipientContract\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"recipientPayload\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"requiredGasLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"recipientGasLimit\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"multiHopFallback\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"fallbackRecipient\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"primaryFeeTokenAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"primaryFee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"secondaryFee\",\"type\":\"uint256\"}],\"indexed\":false,\"internalType\":\"structSendAndCallInput\",\"name\":\"input\",\"type\":\"tuple\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"TokensAndCallSent\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"teleporterMessageID\",\"type\":\"bytes32\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"destinationBlockchainID\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"destinationTokenTransferrerAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"primaryFeeTokenAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"primaryFee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"secondaryFee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"requiredGasLimit\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"multiHopFallback\",\"type\":\"address\"}],\"indexed\":false,\"internalType\":\"structSendTokensInput\",\"name\":\"input\",\"type\":\"tuple\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"TokensRouted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"teleporterMessageID\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"destinationBlockchainID\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"destinationTokenTransferrerAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"primaryFeeTokenAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"primaryFee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"secondaryFee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"requiredGasLimit\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"multiHopFallback\",\"type\":\"address\"}],\"indexed\":false,\"internalType\":\"structSendTokensInput\",\"name\":\"input\",\"type\":\"tuple\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"TokensSent\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"TokensWithdrawn\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"TELEPORTER_REGISTRY_APP_STORAGE_LOCATION\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"TOKEN_HOME_STORAGE_LOCATION\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getBlockchainID\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getMinTeleporterVersion\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"remoteBlockchainID\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"remoteTokenTransferrerAddress\",\"type\":\"address\"}],\"name\":\"getRemoteTokenTransferrerSettings\",\"outputs\":[{\"components\":[{\"internalType\":\"bool\",\"name\":\"registered\",\"type\":\"bool\"},{\"internalType\":\"uint256\",\"name\":\"collateralNeeded\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"tokenMultiplier\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"multiplyOnRemote\",\"type\":\"bool\"}],\"internalType\":\"structRemoteTokenTransferrerSettings\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getTokenAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"remoteBlockchainID\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"remoteTokenTransferrerAddress\",\"type\":\"address\"}],\"name\":\"getTransferredBalance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"teleporterAddress\",\"type\":\"address\"}],\"name\":\"isTeleporterAddressPaused\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"teleporterAddress\",\"type\":\"address\"}],\"name\":\"pauseTeleporterAddress\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"sourceBlockchainID\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"originSenderAddress\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"message\",\"type\":\"bytes\"}],\"name\":\"receiveTeleporterMessage\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"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\":\"teleporterAddress\",\"type\":\"address\"}],\"name\":\"unpauseTeleporterAddress\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"version\",\"type\":\"uint256\"}],\"name\":\"updateMinTeleporterVersion\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", +} + +// TokenHomeABI is the input ABI used to generate the binding from. +// Deprecated: Use TokenHomeMetaData.ABI instead. +var TokenHomeABI = TokenHomeMetaData.ABI + +// TokenHome is an auto generated Go binding around an Ethereum contract. +type TokenHome struct { + TokenHomeCaller // Read-only binding to the contract + TokenHomeTransactor // Write-only binding to the contract + TokenHomeFilterer // Log filterer for contract events +} + +// TokenHomeCaller is an auto generated read-only Go binding around an Ethereum contract. +type TokenHomeCaller struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// TokenHomeTransactor is an auto generated write-only Go binding around an Ethereum contract. +type TokenHomeTransactor struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// TokenHomeFilterer is an auto generated log filtering Go binding around an Ethereum contract events. +type TokenHomeFilterer struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// TokenHomeSession is an auto generated Go binding around an Ethereum contract, +// with pre-set call and transact options. +type TokenHomeSession struct { + Contract *TokenHome // 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 +} + +// TokenHomeCallerSession is an auto generated read-only Go binding around an Ethereum contract, +// with pre-set call options. +type TokenHomeCallerSession struct { + Contract *TokenHomeCaller // Generic contract caller binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session +} + +// TokenHomeTransactorSession is an auto generated write-only Go binding around an Ethereum contract, +// with pre-set transact options. +type TokenHomeTransactorSession struct { + Contract *TokenHomeTransactor // Generic contract transactor binding to set the session for + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// TokenHomeRaw is an auto generated low-level Go binding around an Ethereum contract. +type TokenHomeRaw struct { + Contract *TokenHome // Generic contract binding to access the raw methods on +} + +// TokenHomeCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. +type TokenHomeCallerRaw struct { + Contract *TokenHomeCaller // Generic read-only contract binding to access the raw methods on +} + +// TokenHomeTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. +type TokenHomeTransactorRaw struct { + Contract *TokenHomeTransactor // Generic write-only contract binding to access the raw methods on +} + +// NewTokenHome creates a new instance of TokenHome, bound to a specific deployed contract. +func NewTokenHome(address common.Address, backend bind.ContractBackend) (*TokenHome, error) { + contract, err := bindTokenHome(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &TokenHome{TokenHomeCaller: TokenHomeCaller{contract: contract}, TokenHomeTransactor: TokenHomeTransactor{contract: contract}, TokenHomeFilterer: TokenHomeFilterer{contract: contract}}, nil +} + +// NewTokenHomeCaller creates a new read-only instance of TokenHome, bound to a specific deployed contract. +func NewTokenHomeCaller(address common.Address, caller bind.ContractCaller) (*TokenHomeCaller, error) { + contract, err := bindTokenHome(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &TokenHomeCaller{contract: contract}, nil +} + +// NewTokenHomeTransactor creates a new write-only instance of TokenHome, bound to a specific deployed contract. +func NewTokenHomeTransactor(address common.Address, transactor bind.ContractTransactor) (*TokenHomeTransactor, error) { + contract, err := bindTokenHome(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &TokenHomeTransactor{contract: contract}, nil +} + +// NewTokenHomeFilterer creates a new log filterer instance of TokenHome, bound to a specific deployed contract. +func NewTokenHomeFilterer(address common.Address, filterer bind.ContractFilterer) (*TokenHomeFilterer, error) { + contract, err := bindTokenHome(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &TokenHomeFilterer{contract: contract}, nil +} + +// bindTokenHome binds a generic wrapper to an already deployed contract. +func bindTokenHome(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := TokenHomeMetaData.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 (_TokenHome *TokenHomeRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _TokenHome.Contract.TokenHomeCaller.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 (_TokenHome *TokenHomeRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _TokenHome.Contract.TokenHomeTransactor.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_TokenHome *TokenHomeRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _TokenHome.Contract.TokenHomeTransactor.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 (_TokenHome *TokenHomeCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _TokenHome.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 (_TokenHome *TokenHomeTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _TokenHome.Contract.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_TokenHome *TokenHomeTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _TokenHome.Contract.contract.Transact(opts, method, params...) +} + +// TELEPORTERREGISTRYAPPSTORAGELOCATION is a free data retrieval call binding the contract method 0x909a6ac0. +// +// Solidity: function TELEPORTER_REGISTRY_APP_STORAGE_LOCATION() view returns(bytes32) +func (_TokenHome *TokenHomeCaller) TELEPORTERREGISTRYAPPSTORAGELOCATION(opts *bind.CallOpts) ([32]byte, error) { + var out []interface{} + err := _TokenHome.contract.Call(opts, &out, "TELEPORTER_REGISTRY_APP_STORAGE_LOCATION") + + if err != nil { + return *new([32]byte), err + } + + out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) + + return out0, err + +} + +// TELEPORTERREGISTRYAPPSTORAGELOCATION is a free data retrieval call binding the contract method 0x909a6ac0. +// +// Solidity: function TELEPORTER_REGISTRY_APP_STORAGE_LOCATION() view returns(bytes32) +func (_TokenHome *TokenHomeSession) TELEPORTERREGISTRYAPPSTORAGELOCATION() ([32]byte, error) { + return _TokenHome.Contract.TELEPORTERREGISTRYAPPSTORAGELOCATION(&_TokenHome.CallOpts) +} + +// TELEPORTERREGISTRYAPPSTORAGELOCATION is a free data retrieval call binding the contract method 0x909a6ac0. +// +// Solidity: function TELEPORTER_REGISTRY_APP_STORAGE_LOCATION() view returns(bytes32) +func (_TokenHome *TokenHomeCallerSession) TELEPORTERREGISTRYAPPSTORAGELOCATION() ([32]byte, error) { + return _TokenHome.Contract.TELEPORTERREGISTRYAPPSTORAGELOCATION(&_TokenHome.CallOpts) +} + +// TOKENHOMESTORAGELOCATION is a free data retrieval call binding the contract method 0x62e3901b. +// +// Solidity: function TOKEN_HOME_STORAGE_LOCATION() view returns(bytes32) +func (_TokenHome *TokenHomeCaller) TOKENHOMESTORAGELOCATION(opts *bind.CallOpts) ([32]byte, error) { + var out []interface{} + err := _TokenHome.contract.Call(opts, &out, "TOKEN_HOME_STORAGE_LOCATION") + + if err != nil { + return *new([32]byte), err + } + + out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) + + return out0, err + +} + +// TOKENHOMESTORAGELOCATION is a free data retrieval call binding the contract method 0x62e3901b. +// +// Solidity: function TOKEN_HOME_STORAGE_LOCATION() view returns(bytes32) +func (_TokenHome *TokenHomeSession) TOKENHOMESTORAGELOCATION() ([32]byte, error) { + return _TokenHome.Contract.TOKENHOMESTORAGELOCATION(&_TokenHome.CallOpts) +} + +// TOKENHOMESTORAGELOCATION is a free data retrieval call binding the contract method 0x62e3901b. +// +// Solidity: function TOKEN_HOME_STORAGE_LOCATION() view returns(bytes32) +func (_TokenHome *TokenHomeCallerSession) TOKENHOMESTORAGELOCATION() ([32]byte, error) { + return _TokenHome.Contract.TOKENHOMESTORAGELOCATION(&_TokenHome.CallOpts) +} + +// GetBlockchainID is a free data retrieval call binding the contract method 0x4213cf78. +// +// Solidity: function getBlockchainID() view returns(bytes32) +func (_TokenHome *TokenHomeCaller) GetBlockchainID(opts *bind.CallOpts) ([32]byte, error) { + var out []interface{} + err := _TokenHome.contract.Call(opts, &out, "getBlockchainID") + + if err != nil { + return *new([32]byte), err + } + + out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) + + return out0, err + +} + +// GetBlockchainID is a free data retrieval call binding the contract method 0x4213cf78. +// +// Solidity: function getBlockchainID() view returns(bytes32) +func (_TokenHome *TokenHomeSession) GetBlockchainID() ([32]byte, error) { + return _TokenHome.Contract.GetBlockchainID(&_TokenHome.CallOpts) +} + +// GetBlockchainID is a free data retrieval call binding the contract method 0x4213cf78. +// +// Solidity: function getBlockchainID() view returns(bytes32) +func (_TokenHome *TokenHomeCallerSession) GetBlockchainID() ([32]byte, error) { + return _TokenHome.Contract.GetBlockchainID(&_TokenHome.CallOpts) +} + +// GetMinTeleporterVersion is a free data retrieval call binding the contract method 0xd2cc7a70. +// +// Solidity: function getMinTeleporterVersion() view returns(uint256) +func (_TokenHome *TokenHomeCaller) GetMinTeleporterVersion(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _TokenHome.contract.Call(opts, &out, "getMinTeleporterVersion") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// GetMinTeleporterVersion is a free data retrieval call binding the contract method 0xd2cc7a70. +// +// Solidity: function getMinTeleporterVersion() view returns(uint256) +func (_TokenHome *TokenHomeSession) GetMinTeleporterVersion() (*big.Int, error) { + return _TokenHome.Contract.GetMinTeleporterVersion(&_TokenHome.CallOpts) +} + +// GetMinTeleporterVersion is a free data retrieval call binding the contract method 0xd2cc7a70. +// +// Solidity: function getMinTeleporterVersion() view returns(uint256) +func (_TokenHome *TokenHomeCallerSession) GetMinTeleporterVersion() (*big.Int, error) { + return _TokenHome.Contract.GetMinTeleporterVersion(&_TokenHome.CallOpts) +} + +// GetRemoteTokenTransferrerSettings is a free data retrieval call binding the contract method 0xc8511ada. +// +// Solidity: function getRemoteTokenTransferrerSettings(bytes32 remoteBlockchainID, address remoteTokenTransferrerAddress) view returns((bool,uint256,uint256,bool)) +func (_TokenHome *TokenHomeCaller) GetRemoteTokenTransferrerSettings(opts *bind.CallOpts, remoteBlockchainID [32]byte, remoteTokenTransferrerAddress common.Address) (RemoteTokenTransferrerSettings, error) { + var out []interface{} + err := _TokenHome.contract.Call(opts, &out, "getRemoteTokenTransferrerSettings", remoteBlockchainID, remoteTokenTransferrerAddress) + + if err != nil { + return *new(RemoteTokenTransferrerSettings), err + } + + out0 := *abi.ConvertType(out[0], new(RemoteTokenTransferrerSettings)).(*RemoteTokenTransferrerSettings) + + return out0, err + +} + +// GetRemoteTokenTransferrerSettings is a free data retrieval call binding the contract method 0xc8511ada. +// +// Solidity: function getRemoteTokenTransferrerSettings(bytes32 remoteBlockchainID, address remoteTokenTransferrerAddress) view returns((bool,uint256,uint256,bool)) +func (_TokenHome *TokenHomeSession) GetRemoteTokenTransferrerSettings(remoteBlockchainID [32]byte, remoteTokenTransferrerAddress common.Address) (RemoteTokenTransferrerSettings, error) { + return _TokenHome.Contract.GetRemoteTokenTransferrerSettings(&_TokenHome.CallOpts, remoteBlockchainID, remoteTokenTransferrerAddress) +} + +// GetRemoteTokenTransferrerSettings is a free data retrieval call binding the contract method 0xc8511ada. +// +// Solidity: function getRemoteTokenTransferrerSettings(bytes32 remoteBlockchainID, address remoteTokenTransferrerAddress) view returns((bool,uint256,uint256,bool)) +func (_TokenHome *TokenHomeCallerSession) GetRemoteTokenTransferrerSettings(remoteBlockchainID [32]byte, remoteTokenTransferrerAddress common.Address) (RemoteTokenTransferrerSettings, error) { + return _TokenHome.Contract.GetRemoteTokenTransferrerSettings(&_TokenHome.CallOpts, remoteBlockchainID, remoteTokenTransferrerAddress) +} + +// GetTokenAddress is a free data retrieval call binding the contract method 0x10fe9ae8. +// +// Solidity: function getTokenAddress() view returns(address) +func (_TokenHome *TokenHomeCaller) GetTokenAddress(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _TokenHome.contract.Call(opts, &out, "getTokenAddress") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// GetTokenAddress is a free data retrieval call binding the contract method 0x10fe9ae8. +// +// Solidity: function getTokenAddress() view returns(address) +func (_TokenHome *TokenHomeSession) GetTokenAddress() (common.Address, error) { + return _TokenHome.Contract.GetTokenAddress(&_TokenHome.CallOpts) +} + +// GetTokenAddress is a free data retrieval call binding the contract method 0x10fe9ae8. +// +// Solidity: function getTokenAddress() view returns(address) +func (_TokenHome *TokenHomeCallerSession) GetTokenAddress() (common.Address, error) { + return _TokenHome.Contract.GetTokenAddress(&_TokenHome.CallOpts) +} + +// GetTransferredBalance is a free data retrieval call binding the contract method 0x154d625a. +// +// Solidity: function getTransferredBalance(bytes32 remoteBlockchainID, address remoteTokenTransferrerAddress) view returns(uint256) +func (_TokenHome *TokenHomeCaller) GetTransferredBalance(opts *bind.CallOpts, remoteBlockchainID [32]byte, remoteTokenTransferrerAddress common.Address) (*big.Int, error) { + var out []interface{} + err := _TokenHome.contract.Call(opts, &out, "getTransferredBalance", remoteBlockchainID, remoteTokenTransferrerAddress) + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// GetTransferredBalance is a free data retrieval call binding the contract method 0x154d625a. +// +// Solidity: function getTransferredBalance(bytes32 remoteBlockchainID, address remoteTokenTransferrerAddress) view returns(uint256) +func (_TokenHome *TokenHomeSession) GetTransferredBalance(remoteBlockchainID [32]byte, remoteTokenTransferrerAddress common.Address) (*big.Int, error) { + return _TokenHome.Contract.GetTransferredBalance(&_TokenHome.CallOpts, remoteBlockchainID, remoteTokenTransferrerAddress) +} + +// GetTransferredBalance is a free data retrieval call binding the contract method 0x154d625a. +// +// Solidity: function getTransferredBalance(bytes32 remoteBlockchainID, address remoteTokenTransferrerAddress) view returns(uint256) +func (_TokenHome *TokenHomeCallerSession) GetTransferredBalance(remoteBlockchainID [32]byte, remoteTokenTransferrerAddress common.Address) (*big.Int, error) { + return _TokenHome.Contract.GetTransferredBalance(&_TokenHome.CallOpts, remoteBlockchainID, remoteTokenTransferrerAddress) +} + +// IsTeleporterAddressPaused is a free data retrieval call binding the contract method 0x97314297. +// +// Solidity: function isTeleporterAddressPaused(address teleporterAddress) view returns(bool) +func (_TokenHome *TokenHomeCaller) IsTeleporterAddressPaused(opts *bind.CallOpts, teleporterAddress common.Address) (bool, error) { + var out []interface{} + err := _TokenHome.contract.Call(opts, &out, "isTeleporterAddressPaused", teleporterAddress) + + if err != nil { + return *new(bool), err + } + + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + + return out0, err + +} + +// IsTeleporterAddressPaused is a free data retrieval call binding the contract method 0x97314297. +// +// Solidity: function isTeleporterAddressPaused(address teleporterAddress) view returns(bool) +func (_TokenHome *TokenHomeSession) IsTeleporterAddressPaused(teleporterAddress common.Address) (bool, error) { + return _TokenHome.Contract.IsTeleporterAddressPaused(&_TokenHome.CallOpts, teleporterAddress) +} + +// IsTeleporterAddressPaused is a free data retrieval call binding the contract method 0x97314297. +// +// Solidity: function isTeleporterAddressPaused(address teleporterAddress) view returns(bool) +func (_TokenHome *TokenHomeCallerSession) IsTeleporterAddressPaused(teleporterAddress common.Address) (bool, error) { + return _TokenHome.Contract.IsTeleporterAddressPaused(&_TokenHome.CallOpts, teleporterAddress) +} + +// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. +// +// Solidity: function owner() view returns(address) +func (_TokenHome *TokenHomeCaller) Owner(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _TokenHome.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 (_TokenHome *TokenHomeSession) Owner() (common.Address, error) { + return _TokenHome.Contract.Owner(&_TokenHome.CallOpts) +} + +// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. +// +// Solidity: function owner() view returns(address) +func (_TokenHome *TokenHomeCallerSession) Owner() (common.Address, error) { + return _TokenHome.Contract.Owner(&_TokenHome.CallOpts) +} + +// PauseTeleporterAddress is a paid mutator transaction binding the contract method 0x2b0d8f18. +// +// Solidity: function pauseTeleporterAddress(address teleporterAddress) returns() +func (_TokenHome *TokenHomeTransactor) PauseTeleporterAddress(opts *bind.TransactOpts, teleporterAddress common.Address) (*types.Transaction, error) { + return _TokenHome.contract.Transact(opts, "pauseTeleporterAddress", teleporterAddress) +} + +// PauseTeleporterAddress is a paid mutator transaction binding the contract method 0x2b0d8f18. +// +// Solidity: function pauseTeleporterAddress(address teleporterAddress) returns() +func (_TokenHome *TokenHomeSession) PauseTeleporterAddress(teleporterAddress common.Address) (*types.Transaction, error) { + return _TokenHome.Contract.PauseTeleporterAddress(&_TokenHome.TransactOpts, teleporterAddress) +} + +// PauseTeleporterAddress is a paid mutator transaction binding the contract method 0x2b0d8f18. +// +// Solidity: function pauseTeleporterAddress(address teleporterAddress) returns() +func (_TokenHome *TokenHomeTransactorSession) PauseTeleporterAddress(teleporterAddress common.Address) (*types.Transaction, error) { + return _TokenHome.Contract.PauseTeleporterAddress(&_TokenHome.TransactOpts, teleporterAddress) +} + +// ReceiveTeleporterMessage is a paid mutator transaction binding the contract method 0xc868efaa. +// +// Solidity: function receiveTeleporterMessage(bytes32 sourceBlockchainID, address originSenderAddress, bytes message) returns() +func (_TokenHome *TokenHomeTransactor) ReceiveTeleporterMessage(opts *bind.TransactOpts, sourceBlockchainID [32]byte, originSenderAddress common.Address, message []byte) (*types.Transaction, error) { + return _TokenHome.contract.Transact(opts, "receiveTeleporterMessage", sourceBlockchainID, originSenderAddress, message) +} + +// ReceiveTeleporterMessage is a paid mutator transaction binding the contract method 0xc868efaa. +// +// Solidity: function receiveTeleporterMessage(bytes32 sourceBlockchainID, address originSenderAddress, bytes message) returns() +func (_TokenHome *TokenHomeSession) ReceiveTeleporterMessage(sourceBlockchainID [32]byte, originSenderAddress common.Address, message []byte) (*types.Transaction, error) { + return _TokenHome.Contract.ReceiveTeleporterMessage(&_TokenHome.TransactOpts, sourceBlockchainID, originSenderAddress, message) +} + +// ReceiveTeleporterMessage is a paid mutator transaction binding the contract method 0xc868efaa. +// +// Solidity: function receiveTeleporterMessage(bytes32 sourceBlockchainID, address originSenderAddress, bytes message) returns() +func (_TokenHome *TokenHomeTransactorSession) ReceiveTeleporterMessage(sourceBlockchainID [32]byte, originSenderAddress common.Address, message []byte) (*types.Transaction, error) { + return _TokenHome.Contract.ReceiveTeleporterMessage(&_TokenHome.TransactOpts, sourceBlockchainID, originSenderAddress, message) +} + +// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. +// +// Solidity: function renounceOwnership() returns() +func (_TokenHome *TokenHomeTransactor) RenounceOwnership(opts *bind.TransactOpts) (*types.Transaction, error) { + return _TokenHome.contract.Transact(opts, "renounceOwnership") +} + +// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. +// +// Solidity: function renounceOwnership() returns() +func (_TokenHome *TokenHomeSession) RenounceOwnership() (*types.Transaction, error) { + return _TokenHome.Contract.RenounceOwnership(&_TokenHome.TransactOpts) +} + +// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. +// +// Solidity: function renounceOwnership() returns() +func (_TokenHome *TokenHomeTransactorSession) RenounceOwnership() (*types.Transaction, error) { + return _TokenHome.Contract.RenounceOwnership(&_TokenHome.TransactOpts) +} + +// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// +// Solidity: function transferOwnership(address newOwner) returns() +func (_TokenHome *TokenHomeTransactor) TransferOwnership(opts *bind.TransactOpts, newOwner common.Address) (*types.Transaction, error) { + return _TokenHome.contract.Transact(opts, "transferOwnership", newOwner) +} + +// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// +// Solidity: function transferOwnership(address newOwner) returns() +func (_TokenHome *TokenHomeSession) TransferOwnership(newOwner common.Address) (*types.Transaction, error) { + return _TokenHome.Contract.TransferOwnership(&_TokenHome.TransactOpts, newOwner) +} + +// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// +// Solidity: function transferOwnership(address newOwner) returns() +func (_TokenHome *TokenHomeTransactorSession) TransferOwnership(newOwner common.Address) (*types.Transaction, error) { + return _TokenHome.Contract.TransferOwnership(&_TokenHome.TransactOpts, newOwner) +} + +// UnpauseTeleporterAddress is a paid mutator transaction binding the contract method 0x4511243e. +// +// Solidity: function unpauseTeleporterAddress(address teleporterAddress) returns() +func (_TokenHome *TokenHomeTransactor) UnpauseTeleporterAddress(opts *bind.TransactOpts, teleporterAddress common.Address) (*types.Transaction, error) { + return _TokenHome.contract.Transact(opts, "unpauseTeleporterAddress", teleporterAddress) +} + +// UnpauseTeleporterAddress is a paid mutator transaction binding the contract method 0x4511243e. +// +// Solidity: function unpauseTeleporterAddress(address teleporterAddress) returns() +func (_TokenHome *TokenHomeSession) UnpauseTeleporterAddress(teleporterAddress common.Address) (*types.Transaction, error) { + return _TokenHome.Contract.UnpauseTeleporterAddress(&_TokenHome.TransactOpts, teleporterAddress) +} + +// UnpauseTeleporterAddress is a paid mutator transaction binding the contract method 0x4511243e. +// +// Solidity: function unpauseTeleporterAddress(address teleporterAddress) returns() +func (_TokenHome *TokenHomeTransactorSession) UnpauseTeleporterAddress(teleporterAddress common.Address) (*types.Transaction, error) { + return _TokenHome.Contract.UnpauseTeleporterAddress(&_TokenHome.TransactOpts, teleporterAddress) +} + +// UpdateMinTeleporterVersion is a paid mutator transaction binding the contract method 0x5eb99514. +// +// Solidity: function updateMinTeleporterVersion(uint256 version) returns() +func (_TokenHome *TokenHomeTransactor) UpdateMinTeleporterVersion(opts *bind.TransactOpts, version *big.Int) (*types.Transaction, error) { + return _TokenHome.contract.Transact(opts, "updateMinTeleporterVersion", version) +} + +// UpdateMinTeleporterVersion is a paid mutator transaction binding the contract method 0x5eb99514. +// +// Solidity: function updateMinTeleporterVersion(uint256 version) returns() +func (_TokenHome *TokenHomeSession) UpdateMinTeleporterVersion(version *big.Int) (*types.Transaction, error) { + return _TokenHome.Contract.UpdateMinTeleporterVersion(&_TokenHome.TransactOpts, version) +} + +// UpdateMinTeleporterVersion is a paid mutator transaction binding the contract method 0x5eb99514. +// +// Solidity: function updateMinTeleporterVersion(uint256 version) returns() +func (_TokenHome *TokenHomeTransactorSession) UpdateMinTeleporterVersion(version *big.Int) (*types.Transaction, error) { + return _TokenHome.Contract.UpdateMinTeleporterVersion(&_TokenHome.TransactOpts, version) +} + +// TokenHomeCallFailedIterator is returned from FilterCallFailed and is used to iterate over the raw logs and unpacked data for CallFailed events raised by the TokenHome contract. +type TokenHomeCallFailedIterator struct { + Event *TokenHomeCallFailed // 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 interfaces.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 *TokenHomeCallFailedIterator) 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(TokenHomeCallFailed) + 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(TokenHomeCallFailed) + 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 *TokenHomeCallFailedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *TokenHomeCallFailedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// TokenHomeCallFailed represents a CallFailed event raised by the TokenHome contract. +type TokenHomeCallFailed struct { + RecipientContract common.Address + Amount *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterCallFailed is a free log retrieval operation binding the contract event 0xb9eaeae386d339f8115782f297a9e5f0e13fb587cd6b0d502f113cb8dd4d6cb0. +// +// Solidity: event CallFailed(address indexed recipientContract, uint256 amount) +func (_TokenHome *TokenHomeFilterer) FilterCallFailed(opts *bind.FilterOpts, recipientContract []common.Address) (*TokenHomeCallFailedIterator, error) { + + var recipientContractRule []interface{} + for _, recipientContractItem := range recipientContract { + recipientContractRule = append(recipientContractRule, recipientContractItem) + } + + logs, sub, err := _TokenHome.contract.FilterLogs(opts, "CallFailed", recipientContractRule) + if err != nil { + return nil, err + } + return &TokenHomeCallFailedIterator{contract: _TokenHome.contract, event: "CallFailed", logs: logs, sub: sub}, nil +} + +// WatchCallFailed is a free log subscription operation binding the contract event 0xb9eaeae386d339f8115782f297a9e5f0e13fb587cd6b0d502f113cb8dd4d6cb0. +// +// Solidity: event CallFailed(address indexed recipientContract, uint256 amount) +func (_TokenHome *TokenHomeFilterer) WatchCallFailed(opts *bind.WatchOpts, sink chan<- *TokenHomeCallFailed, recipientContract []common.Address) (event.Subscription, error) { + + var recipientContractRule []interface{} + for _, recipientContractItem := range recipientContract { + recipientContractRule = append(recipientContractRule, recipientContractItem) + } + + logs, sub, err := _TokenHome.contract.WatchLogs(opts, "CallFailed", recipientContractRule) + 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(TokenHomeCallFailed) + if err := _TokenHome.contract.UnpackLog(event, "CallFailed", 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 +} + +// ParseCallFailed is a log parse operation binding the contract event 0xb9eaeae386d339f8115782f297a9e5f0e13fb587cd6b0d502f113cb8dd4d6cb0. +// +// Solidity: event CallFailed(address indexed recipientContract, uint256 amount) +func (_TokenHome *TokenHomeFilterer) ParseCallFailed(log types.Log) (*TokenHomeCallFailed, error) { + event := new(TokenHomeCallFailed) + if err := _TokenHome.contract.UnpackLog(event, "CallFailed", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// TokenHomeCallSucceededIterator is returned from FilterCallSucceeded and is used to iterate over the raw logs and unpacked data for CallSucceeded events raised by the TokenHome contract. +type TokenHomeCallSucceededIterator struct { + Event *TokenHomeCallSucceeded // 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 interfaces.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 *TokenHomeCallSucceededIterator) 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(TokenHomeCallSucceeded) + 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(TokenHomeCallSucceeded) + 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 *TokenHomeCallSucceededIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *TokenHomeCallSucceededIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// TokenHomeCallSucceeded represents a CallSucceeded event raised by the TokenHome contract. +type TokenHomeCallSucceeded struct { + RecipientContract common.Address + Amount *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterCallSucceeded is a free log retrieval operation binding the contract event 0x104deb555f67e63782bb817bc26c39050894645f9b9f29c4be8ae68d0e8b7ff4. +// +// Solidity: event CallSucceeded(address indexed recipientContract, uint256 amount) +func (_TokenHome *TokenHomeFilterer) FilterCallSucceeded(opts *bind.FilterOpts, recipientContract []common.Address) (*TokenHomeCallSucceededIterator, error) { + + var recipientContractRule []interface{} + for _, recipientContractItem := range recipientContract { + recipientContractRule = append(recipientContractRule, recipientContractItem) + } + + logs, sub, err := _TokenHome.contract.FilterLogs(opts, "CallSucceeded", recipientContractRule) + if err != nil { + return nil, err + } + return &TokenHomeCallSucceededIterator{contract: _TokenHome.contract, event: "CallSucceeded", logs: logs, sub: sub}, nil +} + +// WatchCallSucceeded is a free log subscription operation binding the contract event 0x104deb555f67e63782bb817bc26c39050894645f9b9f29c4be8ae68d0e8b7ff4. +// +// Solidity: event CallSucceeded(address indexed recipientContract, uint256 amount) +func (_TokenHome *TokenHomeFilterer) WatchCallSucceeded(opts *bind.WatchOpts, sink chan<- *TokenHomeCallSucceeded, recipientContract []common.Address) (event.Subscription, error) { + + var recipientContractRule []interface{} + for _, recipientContractItem := range recipientContract { + recipientContractRule = append(recipientContractRule, recipientContractItem) + } + + logs, sub, err := _TokenHome.contract.WatchLogs(opts, "CallSucceeded", recipientContractRule) + 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(TokenHomeCallSucceeded) + if err := _TokenHome.contract.UnpackLog(event, "CallSucceeded", 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 +} + +// ParseCallSucceeded is a log parse operation binding the contract event 0x104deb555f67e63782bb817bc26c39050894645f9b9f29c4be8ae68d0e8b7ff4. +// +// Solidity: event CallSucceeded(address indexed recipientContract, uint256 amount) +func (_TokenHome *TokenHomeFilterer) ParseCallSucceeded(log types.Log) (*TokenHomeCallSucceeded, error) { + event := new(TokenHomeCallSucceeded) + if err := _TokenHome.contract.UnpackLog(event, "CallSucceeded", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// TokenHomeCollateralAddedIterator is returned from FilterCollateralAdded and is used to iterate over the raw logs and unpacked data for CollateralAdded events raised by the TokenHome contract. +type TokenHomeCollateralAddedIterator struct { + Event *TokenHomeCollateralAdded // 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 interfaces.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 *TokenHomeCollateralAddedIterator) 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(TokenHomeCollateralAdded) + 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(TokenHomeCollateralAdded) + 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 *TokenHomeCollateralAddedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *TokenHomeCollateralAddedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// TokenHomeCollateralAdded represents a CollateralAdded event raised by the TokenHome contract. +type TokenHomeCollateralAdded struct { + RemoteBlockchainID [32]byte + RemoteTokenTransferrerAddress common.Address + Amount *big.Int + Remaining *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterCollateralAdded is a free log retrieval operation binding the contract event 0x6769a5f9bfc8b6e0db839ab981cbf9239274ae72d2d035081a9157d43bd33cb6. +// +// Solidity: event CollateralAdded(bytes32 indexed remoteBlockchainID, address indexed remoteTokenTransferrerAddress, uint256 amount, uint256 remaining) +func (_TokenHome *TokenHomeFilterer) FilterCollateralAdded(opts *bind.FilterOpts, remoteBlockchainID [][32]byte, remoteTokenTransferrerAddress []common.Address) (*TokenHomeCollateralAddedIterator, error) { + + var remoteBlockchainIDRule []interface{} + for _, remoteBlockchainIDItem := range remoteBlockchainID { + remoteBlockchainIDRule = append(remoteBlockchainIDRule, remoteBlockchainIDItem) + } + var remoteTokenTransferrerAddressRule []interface{} + for _, remoteTokenTransferrerAddressItem := range remoteTokenTransferrerAddress { + remoteTokenTransferrerAddressRule = append(remoteTokenTransferrerAddressRule, remoteTokenTransferrerAddressItem) + } + + logs, sub, err := _TokenHome.contract.FilterLogs(opts, "CollateralAdded", remoteBlockchainIDRule, remoteTokenTransferrerAddressRule) + if err != nil { + return nil, err + } + return &TokenHomeCollateralAddedIterator{contract: _TokenHome.contract, event: "CollateralAdded", logs: logs, sub: sub}, nil +} + +// WatchCollateralAdded is a free log subscription operation binding the contract event 0x6769a5f9bfc8b6e0db839ab981cbf9239274ae72d2d035081a9157d43bd33cb6. +// +// Solidity: event CollateralAdded(bytes32 indexed remoteBlockchainID, address indexed remoteTokenTransferrerAddress, uint256 amount, uint256 remaining) +func (_TokenHome *TokenHomeFilterer) WatchCollateralAdded(opts *bind.WatchOpts, sink chan<- *TokenHomeCollateralAdded, remoteBlockchainID [][32]byte, remoteTokenTransferrerAddress []common.Address) (event.Subscription, error) { + + var remoteBlockchainIDRule []interface{} + for _, remoteBlockchainIDItem := range remoteBlockchainID { + remoteBlockchainIDRule = append(remoteBlockchainIDRule, remoteBlockchainIDItem) + } + var remoteTokenTransferrerAddressRule []interface{} + for _, remoteTokenTransferrerAddressItem := range remoteTokenTransferrerAddress { + remoteTokenTransferrerAddressRule = append(remoteTokenTransferrerAddressRule, remoteTokenTransferrerAddressItem) + } + + logs, sub, err := _TokenHome.contract.WatchLogs(opts, "CollateralAdded", remoteBlockchainIDRule, remoteTokenTransferrerAddressRule) + 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(TokenHomeCollateralAdded) + if err := _TokenHome.contract.UnpackLog(event, "CollateralAdded", 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 +} + +// ParseCollateralAdded is a log parse operation binding the contract event 0x6769a5f9bfc8b6e0db839ab981cbf9239274ae72d2d035081a9157d43bd33cb6. +// +// Solidity: event CollateralAdded(bytes32 indexed remoteBlockchainID, address indexed remoteTokenTransferrerAddress, uint256 amount, uint256 remaining) +func (_TokenHome *TokenHomeFilterer) ParseCollateralAdded(log types.Log) (*TokenHomeCollateralAdded, error) { + event := new(TokenHomeCollateralAdded) + if err := _TokenHome.contract.UnpackLog(event, "CollateralAdded", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// TokenHomeInitializedIterator is returned from FilterInitialized and is used to iterate over the raw logs and unpacked data for Initialized events raised by the TokenHome contract. +type TokenHomeInitializedIterator struct { + Event *TokenHomeInitialized // 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 interfaces.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 *TokenHomeInitializedIterator) 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(TokenHomeInitialized) + 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(TokenHomeInitialized) + 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 *TokenHomeInitializedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *TokenHomeInitializedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// TokenHomeInitialized represents a Initialized event raised by the TokenHome contract. +type TokenHomeInitialized struct { + Version uint64 + Raw types.Log // Blockchain specific contextual infos +} + +// FilterInitialized is a free log retrieval operation binding the contract event 0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2. +// +// Solidity: event Initialized(uint64 version) +func (_TokenHome *TokenHomeFilterer) FilterInitialized(opts *bind.FilterOpts) (*TokenHomeInitializedIterator, error) { + + logs, sub, err := _TokenHome.contract.FilterLogs(opts, "Initialized") + if err != nil { + return nil, err + } + return &TokenHomeInitializedIterator{contract: _TokenHome.contract, event: "Initialized", logs: logs, sub: sub}, nil +} + +// WatchInitialized is a free log subscription operation binding the contract event 0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2. +// +// Solidity: event Initialized(uint64 version) +func (_TokenHome *TokenHomeFilterer) WatchInitialized(opts *bind.WatchOpts, sink chan<- *TokenHomeInitialized) (event.Subscription, error) { + + logs, sub, err := _TokenHome.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(TokenHomeInitialized) + if err := _TokenHome.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 0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2. +// +// Solidity: event Initialized(uint64 version) +func (_TokenHome *TokenHomeFilterer) ParseInitialized(log types.Log) (*TokenHomeInitialized, error) { + event := new(TokenHomeInitialized) + if err := _TokenHome.contract.UnpackLog(event, "Initialized", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// TokenHomeMinTeleporterVersionUpdatedIterator is returned from FilterMinTeleporterVersionUpdated and is used to iterate over the raw logs and unpacked data for MinTeleporterVersionUpdated events raised by the TokenHome contract. +type TokenHomeMinTeleporterVersionUpdatedIterator struct { + Event *TokenHomeMinTeleporterVersionUpdated // 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 interfaces.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 *TokenHomeMinTeleporterVersionUpdatedIterator) 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(TokenHomeMinTeleporterVersionUpdated) + 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(TokenHomeMinTeleporterVersionUpdated) + 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 *TokenHomeMinTeleporterVersionUpdatedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *TokenHomeMinTeleporterVersionUpdatedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// TokenHomeMinTeleporterVersionUpdated represents a MinTeleporterVersionUpdated event raised by the TokenHome contract. +type TokenHomeMinTeleporterVersionUpdated struct { + OldMinTeleporterVersion *big.Int + NewMinTeleporterVersion *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterMinTeleporterVersionUpdated is a free log retrieval operation binding the contract event 0xa9a7ef57e41f05b4c15480842f5f0c27edfcbb553fed281f7c4068452cc1c02d. +// +// Solidity: event MinTeleporterVersionUpdated(uint256 indexed oldMinTeleporterVersion, uint256 indexed newMinTeleporterVersion) +func (_TokenHome *TokenHomeFilterer) FilterMinTeleporterVersionUpdated(opts *bind.FilterOpts, oldMinTeleporterVersion []*big.Int, newMinTeleporterVersion []*big.Int) (*TokenHomeMinTeleporterVersionUpdatedIterator, error) { + + var oldMinTeleporterVersionRule []interface{} + for _, oldMinTeleporterVersionItem := range oldMinTeleporterVersion { + oldMinTeleporterVersionRule = append(oldMinTeleporterVersionRule, oldMinTeleporterVersionItem) + } + var newMinTeleporterVersionRule []interface{} + for _, newMinTeleporterVersionItem := range newMinTeleporterVersion { + newMinTeleporterVersionRule = append(newMinTeleporterVersionRule, newMinTeleporterVersionItem) + } + + logs, sub, err := _TokenHome.contract.FilterLogs(opts, "MinTeleporterVersionUpdated", oldMinTeleporterVersionRule, newMinTeleporterVersionRule) + if err != nil { + return nil, err + } + return &TokenHomeMinTeleporterVersionUpdatedIterator{contract: _TokenHome.contract, event: "MinTeleporterVersionUpdated", logs: logs, sub: sub}, nil +} + +// WatchMinTeleporterVersionUpdated is a free log subscription operation binding the contract event 0xa9a7ef57e41f05b4c15480842f5f0c27edfcbb553fed281f7c4068452cc1c02d. +// +// Solidity: event MinTeleporterVersionUpdated(uint256 indexed oldMinTeleporterVersion, uint256 indexed newMinTeleporterVersion) +func (_TokenHome *TokenHomeFilterer) WatchMinTeleporterVersionUpdated(opts *bind.WatchOpts, sink chan<- *TokenHomeMinTeleporterVersionUpdated, oldMinTeleporterVersion []*big.Int, newMinTeleporterVersion []*big.Int) (event.Subscription, error) { + + var oldMinTeleporterVersionRule []interface{} + for _, oldMinTeleporterVersionItem := range oldMinTeleporterVersion { + oldMinTeleporterVersionRule = append(oldMinTeleporterVersionRule, oldMinTeleporterVersionItem) + } + var newMinTeleporterVersionRule []interface{} + for _, newMinTeleporterVersionItem := range newMinTeleporterVersion { + newMinTeleporterVersionRule = append(newMinTeleporterVersionRule, newMinTeleporterVersionItem) + } + + logs, sub, err := _TokenHome.contract.WatchLogs(opts, "MinTeleporterVersionUpdated", oldMinTeleporterVersionRule, newMinTeleporterVersionRule) + 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(TokenHomeMinTeleporterVersionUpdated) + if err := _TokenHome.contract.UnpackLog(event, "MinTeleporterVersionUpdated", 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 +} + +// ParseMinTeleporterVersionUpdated is a log parse operation binding the contract event 0xa9a7ef57e41f05b4c15480842f5f0c27edfcbb553fed281f7c4068452cc1c02d. +// +// Solidity: event MinTeleporterVersionUpdated(uint256 indexed oldMinTeleporterVersion, uint256 indexed newMinTeleporterVersion) +func (_TokenHome *TokenHomeFilterer) ParseMinTeleporterVersionUpdated(log types.Log) (*TokenHomeMinTeleporterVersionUpdated, error) { + event := new(TokenHomeMinTeleporterVersionUpdated) + if err := _TokenHome.contract.UnpackLog(event, "MinTeleporterVersionUpdated", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// TokenHomeOwnershipTransferredIterator is returned from FilterOwnershipTransferred and is used to iterate over the raw logs and unpacked data for OwnershipTransferred events raised by the TokenHome contract. +type TokenHomeOwnershipTransferredIterator struct { + Event *TokenHomeOwnershipTransferred // 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 interfaces.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 *TokenHomeOwnershipTransferredIterator) 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(TokenHomeOwnershipTransferred) + 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(TokenHomeOwnershipTransferred) + 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 *TokenHomeOwnershipTransferredIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *TokenHomeOwnershipTransferredIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// TokenHomeOwnershipTransferred represents a OwnershipTransferred event raised by the TokenHome contract. +type TokenHomeOwnershipTransferred 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 (_TokenHome *TokenHomeFilterer) FilterOwnershipTransferred(opts *bind.FilterOpts, previousOwner []common.Address, newOwner []common.Address) (*TokenHomeOwnershipTransferredIterator, 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 := _TokenHome.contract.FilterLogs(opts, "OwnershipTransferred", previousOwnerRule, newOwnerRule) + if err != nil { + return nil, err + } + return &TokenHomeOwnershipTransferredIterator{contract: _TokenHome.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 (_TokenHome *TokenHomeFilterer) WatchOwnershipTransferred(opts *bind.WatchOpts, sink chan<- *TokenHomeOwnershipTransferred, 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 := _TokenHome.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(TokenHomeOwnershipTransferred) + if err := _TokenHome.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 (_TokenHome *TokenHomeFilterer) ParseOwnershipTransferred(log types.Log) (*TokenHomeOwnershipTransferred, error) { + event := new(TokenHomeOwnershipTransferred) + if err := _TokenHome.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// TokenHomeRemoteRegisteredIterator is returned from FilterRemoteRegistered and is used to iterate over the raw logs and unpacked data for RemoteRegistered events raised by the TokenHome contract. +type TokenHomeRemoteRegisteredIterator struct { + Event *TokenHomeRemoteRegistered // 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 interfaces.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 *TokenHomeRemoteRegisteredIterator) 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(TokenHomeRemoteRegistered) + 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(TokenHomeRemoteRegistered) + 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 *TokenHomeRemoteRegisteredIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *TokenHomeRemoteRegisteredIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// TokenHomeRemoteRegistered represents a RemoteRegistered event raised by the TokenHome contract. +type TokenHomeRemoteRegistered struct { + RemoteBlockchainID [32]byte + RemoteTokenTransferrerAddress common.Address + InitialCollateralNeeded *big.Int + TokenDecimals uint8 + Raw types.Log // Blockchain specific contextual infos +} + +// FilterRemoteRegistered is a free log retrieval operation binding the contract event 0xf229b02a51a4c8d5ef03a096ae0dd727d7b48b710d21b50ebebb560eef739b90. +// +// Solidity: event RemoteRegistered(bytes32 indexed remoteBlockchainID, address indexed remoteTokenTransferrerAddress, uint256 initialCollateralNeeded, uint8 tokenDecimals) +func (_TokenHome *TokenHomeFilterer) FilterRemoteRegistered(opts *bind.FilterOpts, remoteBlockchainID [][32]byte, remoteTokenTransferrerAddress []common.Address) (*TokenHomeRemoteRegisteredIterator, error) { + + var remoteBlockchainIDRule []interface{} + for _, remoteBlockchainIDItem := range remoteBlockchainID { + remoteBlockchainIDRule = append(remoteBlockchainIDRule, remoteBlockchainIDItem) + } + var remoteTokenTransferrerAddressRule []interface{} + for _, remoteTokenTransferrerAddressItem := range remoteTokenTransferrerAddress { + remoteTokenTransferrerAddressRule = append(remoteTokenTransferrerAddressRule, remoteTokenTransferrerAddressItem) + } + + logs, sub, err := _TokenHome.contract.FilterLogs(opts, "RemoteRegistered", remoteBlockchainIDRule, remoteTokenTransferrerAddressRule) + if err != nil { + return nil, err + } + return &TokenHomeRemoteRegisteredIterator{contract: _TokenHome.contract, event: "RemoteRegistered", logs: logs, sub: sub}, nil +} + +// WatchRemoteRegistered is a free log subscription operation binding the contract event 0xf229b02a51a4c8d5ef03a096ae0dd727d7b48b710d21b50ebebb560eef739b90. +// +// Solidity: event RemoteRegistered(bytes32 indexed remoteBlockchainID, address indexed remoteTokenTransferrerAddress, uint256 initialCollateralNeeded, uint8 tokenDecimals) +func (_TokenHome *TokenHomeFilterer) WatchRemoteRegistered(opts *bind.WatchOpts, sink chan<- *TokenHomeRemoteRegistered, remoteBlockchainID [][32]byte, remoteTokenTransferrerAddress []common.Address) (event.Subscription, error) { + + var remoteBlockchainIDRule []interface{} + for _, remoteBlockchainIDItem := range remoteBlockchainID { + remoteBlockchainIDRule = append(remoteBlockchainIDRule, remoteBlockchainIDItem) + } + var remoteTokenTransferrerAddressRule []interface{} + for _, remoteTokenTransferrerAddressItem := range remoteTokenTransferrerAddress { + remoteTokenTransferrerAddressRule = append(remoteTokenTransferrerAddressRule, remoteTokenTransferrerAddressItem) + } + + logs, sub, err := _TokenHome.contract.WatchLogs(opts, "RemoteRegistered", remoteBlockchainIDRule, remoteTokenTransferrerAddressRule) + 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(TokenHomeRemoteRegistered) + if err := _TokenHome.contract.UnpackLog(event, "RemoteRegistered", 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 +} + +// ParseRemoteRegistered is a log parse operation binding the contract event 0xf229b02a51a4c8d5ef03a096ae0dd727d7b48b710d21b50ebebb560eef739b90. +// +// Solidity: event RemoteRegistered(bytes32 indexed remoteBlockchainID, address indexed remoteTokenTransferrerAddress, uint256 initialCollateralNeeded, uint8 tokenDecimals) +func (_TokenHome *TokenHomeFilterer) ParseRemoteRegistered(log types.Log) (*TokenHomeRemoteRegistered, error) { + event := new(TokenHomeRemoteRegistered) + if err := _TokenHome.contract.UnpackLog(event, "RemoteRegistered", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// TokenHomeTeleporterAddressPausedIterator is returned from FilterTeleporterAddressPaused and is used to iterate over the raw logs and unpacked data for TeleporterAddressPaused events raised by the TokenHome contract. +type TokenHomeTeleporterAddressPausedIterator struct { + Event *TokenHomeTeleporterAddressPaused // 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 interfaces.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 *TokenHomeTeleporterAddressPausedIterator) 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(TokenHomeTeleporterAddressPaused) + 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(TokenHomeTeleporterAddressPaused) + 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 *TokenHomeTeleporterAddressPausedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *TokenHomeTeleporterAddressPausedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// TokenHomeTeleporterAddressPaused represents a TeleporterAddressPaused event raised by the TokenHome contract. +type TokenHomeTeleporterAddressPaused struct { + TeleporterAddress common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterTeleporterAddressPaused is a free log retrieval operation binding the contract event 0x933f93e57a222e6330362af8b376d0a8725b6901e9a2fb86d00f169702b28a4c. +// +// Solidity: event TeleporterAddressPaused(address indexed teleporterAddress) +func (_TokenHome *TokenHomeFilterer) FilterTeleporterAddressPaused(opts *bind.FilterOpts, teleporterAddress []common.Address) (*TokenHomeTeleporterAddressPausedIterator, error) { + + var teleporterAddressRule []interface{} + for _, teleporterAddressItem := range teleporterAddress { + teleporterAddressRule = append(teleporterAddressRule, teleporterAddressItem) + } + + logs, sub, err := _TokenHome.contract.FilterLogs(opts, "TeleporterAddressPaused", teleporterAddressRule) + if err != nil { + return nil, err + } + return &TokenHomeTeleporterAddressPausedIterator{contract: _TokenHome.contract, event: "TeleporterAddressPaused", logs: logs, sub: sub}, nil +} + +// WatchTeleporterAddressPaused is a free log subscription operation binding the contract event 0x933f93e57a222e6330362af8b376d0a8725b6901e9a2fb86d00f169702b28a4c. +// +// Solidity: event TeleporterAddressPaused(address indexed teleporterAddress) +func (_TokenHome *TokenHomeFilterer) WatchTeleporterAddressPaused(opts *bind.WatchOpts, sink chan<- *TokenHomeTeleporterAddressPaused, teleporterAddress []common.Address) (event.Subscription, error) { + + var teleporterAddressRule []interface{} + for _, teleporterAddressItem := range teleporterAddress { + teleporterAddressRule = append(teleporterAddressRule, teleporterAddressItem) + } + + logs, sub, err := _TokenHome.contract.WatchLogs(opts, "TeleporterAddressPaused", teleporterAddressRule) + 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(TokenHomeTeleporterAddressPaused) + if err := _TokenHome.contract.UnpackLog(event, "TeleporterAddressPaused", 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 +} + +// ParseTeleporterAddressPaused is a log parse operation binding the contract event 0x933f93e57a222e6330362af8b376d0a8725b6901e9a2fb86d00f169702b28a4c. +// +// Solidity: event TeleporterAddressPaused(address indexed teleporterAddress) +func (_TokenHome *TokenHomeFilterer) ParseTeleporterAddressPaused(log types.Log) (*TokenHomeTeleporterAddressPaused, error) { + event := new(TokenHomeTeleporterAddressPaused) + if err := _TokenHome.contract.UnpackLog(event, "TeleporterAddressPaused", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// TokenHomeTeleporterAddressUnpausedIterator is returned from FilterTeleporterAddressUnpaused and is used to iterate over the raw logs and unpacked data for TeleporterAddressUnpaused events raised by the TokenHome contract. +type TokenHomeTeleporterAddressUnpausedIterator struct { + Event *TokenHomeTeleporterAddressUnpaused // 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 interfaces.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 *TokenHomeTeleporterAddressUnpausedIterator) 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(TokenHomeTeleporterAddressUnpaused) + 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(TokenHomeTeleporterAddressUnpaused) + 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 *TokenHomeTeleporterAddressUnpausedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *TokenHomeTeleporterAddressUnpausedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// TokenHomeTeleporterAddressUnpaused represents a TeleporterAddressUnpaused event raised by the TokenHome contract. +type TokenHomeTeleporterAddressUnpaused struct { + TeleporterAddress common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterTeleporterAddressUnpaused is a free log retrieval operation binding the contract event 0x844e2f3154214672229235858fd029d1dfd543901c6d05931f0bc2480a2d72c3. +// +// Solidity: event TeleporterAddressUnpaused(address indexed teleporterAddress) +func (_TokenHome *TokenHomeFilterer) FilterTeleporterAddressUnpaused(opts *bind.FilterOpts, teleporterAddress []common.Address) (*TokenHomeTeleporterAddressUnpausedIterator, error) { + + var teleporterAddressRule []interface{} + for _, teleporterAddressItem := range teleporterAddress { + teleporterAddressRule = append(teleporterAddressRule, teleporterAddressItem) + } + + logs, sub, err := _TokenHome.contract.FilterLogs(opts, "TeleporterAddressUnpaused", teleporterAddressRule) + if err != nil { + return nil, err + } + return &TokenHomeTeleporterAddressUnpausedIterator{contract: _TokenHome.contract, event: "TeleporterAddressUnpaused", logs: logs, sub: sub}, nil +} + +// WatchTeleporterAddressUnpaused is a free log subscription operation binding the contract event 0x844e2f3154214672229235858fd029d1dfd543901c6d05931f0bc2480a2d72c3. +// +// Solidity: event TeleporterAddressUnpaused(address indexed teleporterAddress) +func (_TokenHome *TokenHomeFilterer) WatchTeleporterAddressUnpaused(opts *bind.WatchOpts, sink chan<- *TokenHomeTeleporterAddressUnpaused, teleporterAddress []common.Address) (event.Subscription, error) { + + var teleporterAddressRule []interface{} + for _, teleporterAddressItem := range teleporterAddress { + teleporterAddressRule = append(teleporterAddressRule, teleporterAddressItem) + } + + logs, sub, err := _TokenHome.contract.WatchLogs(opts, "TeleporterAddressUnpaused", teleporterAddressRule) + 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(TokenHomeTeleporterAddressUnpaused) + if err := _TokenHome.contract.UnpackLog(event, "TeleporterAddressUnpaused", 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 +} + +// ParseTeleporterAddressUnpaused is a log parse operation binding the contract event 0x844e2f3154214672229235858fd029d1dfd543901c6d05931f0bc2480a2d72c3. +// +// Solidity: event TeleporterAddressUnpaused(address indexed teleporterAddress) +func (_TokenHome *TokenHomeFilterer) ParseTeleporterAddressUnpaused(log types.Log) (*TokenHomeTeleporterAddressUnpaused, error) { + event := new(TokenHomeTeleporterAddressUnpaused) + if err := _TokenHome.contract.UnpackLog(event, "TeleporterAddressUnpaused", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// TokenHomeTokensAndCallRoutedIterator is returned from FilterTokensAndCallRouted and is used to iterate over the raw logs and unpacked data for TokensAndCallRouted events raised by the TokenHome contract. +type TokenHomeTokensAndCallRoutedIterator struct { + Event *TokenHomeTokensAndCallRouted // 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 interfaces.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 *TokenHomeTokensAndCallRoutedIterator) 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(TokenHomeTokensAndCallRouted) + 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(TokenHomeTokensAndCallRouted) + 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 *TokenHomeTokensAndCallRoutedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *TokenHomeTokensAndCallRoutedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// TokenHomeTokensAndCallRouted represents a TokensAndCallRouted event raised by the TokenHome contract. +type TokenHomeTokensAndCallRouted struct { + TeleporterMessageID [32]byte + Input SendAndCallInput + Amount *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterTokensAndCallRouted is a free log retrieval operation binding the contract event 0x42eff9005856e3c586b096d67211a566dc926052119fd7cc08023c70937ecb30. +// +// Solidity: event TokensAndCallRouted(bytes32 indexed teleporterMessageID, (bytes32,address,address,bytes,uint256,uint256,address,address,address,uint256,uint256) input, uint256 amount) +func (_TokenHome *TokenHomeFilterer) FilterTokensAndCallRouted(opts *bind.FilterOpts, teleporterMessageID [][32]byte) (*TokenHomeTokensAndCallRoutedIterator, error) { + + var teleporterMessageIDRule []interface{} + for _, teleporterMessageIDItem := range teleporterMessageID { + teleporterMessageIDRule = append(teleporterMessageIDRule, teleporterMessageIDItem) + } + + logs, sub, err := _TokenHome.contract.FilterLogs(opts, "TokensAndCallRouted", teleporterMessageIDRule) + if err != nil { + return nil, err + } + return &TokenHomeTokensAndCallRoutedIterator{contract: _TokenHome.contract, event: "TokensAndCallRouted", logs: logs, sub: sub}, nil +} + +// WatchTokensAndCallRouted is a free log subscription operation binding the contract event 0x42eff9005856e3c586b096d67211a566dc926052119fd7cc08023c70937ecb30. +// +// Solidity: event TokensAndCallRouted(bytes32 indexed teleporterMessageID, (bytes32,address,address,bytes,uint256,uint256,address,address,address,uint256,uint256) input, uint256 amount) +func (_TokenHome *TokenHomeFilterer) WatchTokensAndCallRouted(opts *bind.WatchOpts, sink chan<- *TokenHomeTokensAndCallRouted, teleporterMessageID [][32]byte) (event.Subscription, error) { + + var teleporterMessageIDRule []interface{} + for _, teleporterMessageIDItem := range teleporterMessageID { + teleporterMessageIDRule = append(teleporterMessageIDRule, teleporterMessageIDItem) + } + + logs, sub, err := _TokenHome.contract.WatchLogs(opts, "TokensAndCallRouted", teleporterMessageIDRule) + 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(TokenHomeTokensAndCallRouted) + if err := _TokenHome.contract.UnpackLog(event, "TokensAndCallRouted", 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 +} + +// ParseTokensAndCallRouted is a log parse operation binding the contract event 0x42eff9005856e3c586b096d67211a566dc926052119fd7cc08023c70937ecb30. +// +// Solidity: event TokensAndCallRouted(bytes32 indexed teleporterMessageID, (bytes32,address,address,bytes,uint256,uint256,address,address,address,uint256,uint256) input, uint256 amount) +func (_TokenHome *TokenHomeFilterer) ParseTokensAndCallRouted(log types.Log) (*TokenHomeTokensAndCallRouted, error) { + event := new(TokenHomeTokensAndCallRouted) + if err := _TokenHome.contract.UnpackLog(event, "TokensAndCallRouted", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// TokenHomeTokensAndCallSentIterator is returned from FilterTokensAndCallSent and is used to iterate over the raw logs and unpacked data for TokensAndCallSent events raised by the TokenHome contract. +type TokenHomeTokensAndCallSentIterator struct { + Event *TokenHomeTokensAndCallSent // 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 interfaces.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 *TokenHomeTokensAndCallSentIterator) 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(TokenHomeTokensAndCallSent) + 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(TokenHomeTokensAndCallSent) + 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 *TokenHomeTokensAndCallSentIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *TokenHomeTokensAndCallSentIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// TokenHomeTokensAndCallSent represents a TokensAndCallSent event raised by the TokenHome contract. +type TokenHomeTokensAndCallSent struct { + TeleporterMessageID [32]byte + Sender common.Address + Input SendAndCallInput + Amount *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterTokensAndCallSent is a free log retrieval operation binding the contract event 0x5d76dff81bf773b908b050fa113d39f7d8135bb4175398f313ea19cd3a1a0b16. +// +// Solidity: event TokensAndCallSent(bytes32 indexed teleporterMessageID, address indexed sender, (bytes32,address,address,bytes,uint256,uint256,address,address,address,uint256,uint256) input, uint256 amount) +func (_TokenHome *TokenHomeFilterer) FilterTokensAndCallSent(opts *bind.FilterOpts, teleporterMessageID [][32]byte, sender []common.Address) (*TokenHomeTokensAndCallSentIterator, error) { + + var teleporterMessageIDRule []interface{} + for _, teleporterMessageIDItem := range teleporterMessageID { + teleporterMessageIDRule = append(teleporterMessageIDRule, teleporterMessageIDItem) + } + var senderRule []interface{} + for _, senderItem := range sender { + senderRule = append(senderRule, senderItem) + } + + logs, sub, err := _TokenHome.contract.FilterLogs(opts, "TokensAndCallSent", teleporterMessageIDRule, senderRule) + if err != nil { + return nil, err + } + return &TokenHomeTokensAndCallSentIterator{contract: _TokenHome.contract, event: "TokensAndCallSent", logs: logs, sub: sub}, nil +} + +// WatchTokensAndCallSent is a free log subscription operation binding the contract event 0x5d76dff81bf773b908b050fa113d39f7d8135bb4175398f313ea19cd3a1a0b16. +// +// Solidity: event TokensAndCallSent(bytes32 indexed teleporterMessageID, address indexed sender, (bytes32,address,address,bytes,uint256,uint256,address,address,address,uint256,uint256) input, uint256 amount) +func (_TokenHome *TokenHomeFilterer) WatchTokensAndCallSent(opts *bind.WatchOpts, sink chan<- *TokenHomeTokensAndCallSent, teleporterMessageID [][32]byte, sender []common.Address) (event.Subscription, error) { + + var teleporterMessageIDRule []interface{} + for _, teleporterMessageIDItem := range teleporterMessageID { + teleporterMessageIDRule = append(teleporterMessageIDRule, teleporterMessageIDItem) + } + var senderRule []interface{} + for _, senderItem := range sender { + senderRule = append(senderRule, senderItem) + } + + logs, sub, err := _TokenHome.contract.WatchLogs(opts, "TokensAndCallSent", teleporterMessageIDRule, senderRule) + 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(TokenHomeTokensAndCallSent) + if err := _TokenHome.contract.UnpackLog(event, "TokensAndCallSent", 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 +} + +// ParseTokensAndCallSent is a log parse operation binding the contract event 0x5d76dff81bf773b908b050fa113d39f7d8135bb4175398f313ea19cd3a1a0b16. +// +// Solidity: event TokensAndCallSent(bytes32 indexed teleporterMessageID, address indexed sender, (bytes32,address,address,bytes,uint256,uint256,address,address,address,uint256,uint256) input, uint256 amount) +func (_TokenHome *TokenHomeFilterer) ParseTokensAndCallSent(log types.Log) (*TokenHomeTokensAndCallSent, error) { + event := new(TokenHomeTokensAndCallSent) + if err := _TokenHome.contract.UnpackLog(event, "TokensAndCallSent", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// TokenHomeTokensRoutedIterator is returned from FilterTokensRouted and is used to iterate over the raw logs and unpacked data for TokensRouted events raised by the TokenHome contract. +type TokenHomeTokensRoutedIterator struct { + Event *TokenHomeTokensRouted // 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 interfaces.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 *TokenHomeTokensRoutedIterator) 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(TokenHomeTokensRouted) + 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(TokenHomeTokensRouted) + 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 *TokenHomeTokensRoutedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *TokenHomeTokensRoutedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// TokenHomeTokensRouted represents a TokensRouted event raised by the TokenHome contract. +type TokenHomeTokensRouted struct { + TeleporterMessageID [32]byte + Input SendTokensInput + Amount *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterTokensRouted is a free log retrieval operation binding the contract event 0x825080857c76cef4a1629c0705a7f8b4ef0282ddcafde0b6715c4fb34b68aaf0. +// +// Solidity: event TokensRouted(bytes32 indexed teleporterMessageID, (bytes32,address,address,address,uint256,uint256,uint256,address) input, uint256 amount) +func (_TokenHome *TokenHomeFilterer) FilterTokensRouted(opts *bind.FilterOpts, teleporterMessageID [][32]byte) (*TokenHomeTokensRoutedIterator, error) { + + var teleporterMessageIDRule []interface{} + for _, teleporterMessageIDItem := range teleporterMessageID { + teleporterMessageIDRule = append(teleporterMessageIDRule, teleporterMessageIDItem) + } + + logs, sub, err := _TokenHome.contract.FilterLogs(opts, "TokensRouted", teleporterMessageIDRule) + if err != nil { + return nil, err + } + return &TokenHomeTokensRoutedIterator{contract: _TokenHome.contract, event: "TokensRouted", logs: logs, sub: sub}, nil +} + +// WatchTokensRouted is a free log subscription operation binding the contract event 0x825080857c76cef4a1629c0705a7f8b4ef0282ddcafde0b6715c4fb34b68aaf0. +// +// Solidity: event TokensRouted(bytes32 indexed teleporterMessageID, (bytes32,address,address,address,uint256,uint256,uint256,address) input, uint256 amount) +func (_TokenHome *TokenHomeFilterer) WatchTokensRouted(opts *bind.WatchOpts, sink chan<- *TokenHomeTokensRouted, teleporterMessageID [][32]byte) (event.Subscription, error) { + + var teleporterMessageIDRule []interface{} + for _, teleporterMessageIDItem := range teleporterMessageID { + teleporterMessageIDRule = append(teleporterMessageIDRule, teleporterMessageIDItem) + } + + logs, sub, err := _TokenHome.contract.WatchLogs(opts, "TokensRouted", teleporterMessageIDRule) + 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(TokenHomeTokensRouted) + if err := _TokenHome.contract.UnpackLog(event, "TokensRouted", 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 +} + +// ParseTokensRouted is a log parse operation binding the contract event 0x825080857c76cef4a1629c0705a7f8b4ef0282ddcafde0b6715c4fb34b68aaf0. +// +// Solidity: event TokensRouted(bytes32 indexed teleporterMessageID, (bytes32,address,address,address,uint256,uint256,uint256,address) input, uint256 amount) +func (_TokenHome *TokenHomeFilterer) ParseTokensRouted(log types.Log) (*TokenHomeTokensRouted, error) { + event := new(TokenHomeTokensRouted) + if err := _TokenHome.contract.UnpackLog(event, "TokensRouted", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// TokenHomeTokensSentIterator is returned from FilterTokensSent and is used to iterate over the raw logs and unpacked data for TokensSent events raised by the TokenHome contract. +type TokenHomeTokensSentIterator struct { + Event *TokenHomeTokensSent // 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 interfaces.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 *TokenHomeTokensSentIterator) 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(TokenHomeTokensSent) + 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(TokenHomeTokensSent) + 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 *TokenHomeTokensSentIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *TokenHomeTokensSentIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// TokenHomeTokensSent represents a TokensSent event raised by the TokenHome contract. +type TokenHomeTokensSent struct { + TeleporterMessageID [32]byte + Sender common.Address + Input SendTokensInput + Amount *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterTokensSent is a free log retrieval operation binding the contract event 0x93f19bf1ec58a15dc643b37e7e18a1c13e85e06cd11929e283154691ace9fb52. +// +// Solidity: event TokensSent(bytes32 indexed teleporterMessageID, address indexed sender, (bytes32,address,address,address,uint256,uint256,uint256,address) input, uint256 amount) +func (_TokenHome *TokenHomeFilterer) FilterTokensSent(opts *bind.FilterOpts, teleporterMessageID [][32]byte, sender []common.Address) (*TokenHomeTokensSentIterator, error) { + + var teleporterMessageIDRule []interface{} + for _, teleporterMessageIDItem := range teleporterMessageID { + teleporterMessageIDRule = append(teleporterMessageIDRule, teleporterMessageIDItem) + } + var senderRule []interface{} + for _, senderItem := range sender { + senderRule = append(senderRule, senderItem) + } + + logs, sub, err := _TokenHome.contract.FilterLogs(opts, "TokensSent", teleporterMessageIDRule, senderRule) + if err != nil { + return nil, err + } + return &TokenHomeTokensSentIterator{contract: _TokenHome.contract, event: "TokensSent", logs: logs, sub: sub}, nil +} + +// WatchTokensSent is a free log subscription operation binding the contract event 0x93f19bf1ec58a15dc643b37e7e18a1c13e85e06cd11929e283154691ace9fb52. +// +// Solidity: event TokensSent(bytes32 indexed teleporterMessageID, address indexed sender, (bytes32,address,address,address,uint256,uint256,uint256,address) input, uint256 amount) +func (_TokenHome *TokenHomeFilterer) WatchTokensSent(opts *bind.WatchOpts, sink chan<- *TokenHomeTokensSent, teleporterMessageID [][32]byte, sender []common.Address) (event.Subscription, error) { + + var teleporterMessageIDRule []interface{} + for _, teleporterMessageIDItem := range teleporterMessageID { + teleporterMessageIDRule = append(teleporterMessageIDRule, teleporterMessageIDItem) + } + var senderRule []interface{} + for _, senderItem := range sender { + senderRule = append(senderRule, senderItem) + } + + logs, sub, err := _TokenHome.contract.WatchLogs(opts, "TokensSent", teleporterMessageIDRule, senderRule) + 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(TokenHomeTokensSent) + if err := _TokenHome.contract.UnpackLog(event, "TokensSent", 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 +} + +// ParseTokensSent is a log parse operation binding the contract event 0x93f19bf1ec58a15dc643b37e7e18a1c13e85e06cd11929e283154691ace9fb52. +// +// Solidity: event TokensSent(bytes32 indexed teleporterMessageID, address indexed sender, (bytes32,address,address,address,uint256,uint256,uint256,address) input, uint256 amount) +func (_TokenHome *TokenHomeFilterer) ParseTokensSent(log types.Log) (*TokenHomeTokensSent, error) { + event := new(TokenHomeTokensSent) + if err := _TokenHome.contract.UnpackLog(event, "TokensSent", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// TokenHomeTokensWithdrawnIterator is returned from FilterTokensWithdrawn and is used to iterate over the raw logs and unpacked data for TokensWithdrawn events raised by the TokenHome contract. +type TokenHomeTokensWithdrawnIterator struct { + Event *TokenHomeTokensWithdrawn // 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 interfaces.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 *TokenHomeTokensWithdrawnIterator) 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(TokenHomeTokensWithdrawn) + 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(TokenHomeTokensWithdrawn) + 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 *TokenHomeTokensWithdrawnIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *TokenHomeTokensWithdrawnIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// TokenHomeTokensWithdrawn represents a TokensWithdrawn event raised by the TokenHome contract. +type TokenHomeTokensWithdrawn struct { + Recipient common.Address + Amount *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterTokensWithdrawn is a free log retrieval operation binding the contract event 0x6352c5382c4a4578e712449ca65e83cdb392d045dfcf1cad9615189db2da244b. +// +// Solidity: event TokensWithdrawn(address indexed recipient, uint256 amount) +func (_TokenHome *TokenHomeFilterer) FilterTokensWithdrawn(opts *bind.FilterOpts, recipient []common.Address) (*TokenHomeTokensWithdrawnIterator, error) { + + var recipientRule []interface{} + for _, recipientItem := range recipient { + recipientRule = append(recipientRule, recipientItem) + } + + logs, sub, err := _TokenHome.contract.FilterLogs(opts, "TokensWithdrawn", recipientRule) + if err != nil { + return nil, err + } + return &TokenHomeTokensWithdrawnIterator{contract: _TokenHome.contract, event: "TokensWithdrawn", logs: logs, sub: sub}, nil +} + +// WatchTokensWithdrawn is a free log subscription operation binding the contract event 0x6352c5382c4a4578e712449ca65e83cdb392d045dfcf1cad9615189db2da244b. +// +// Solidity: event TokensWithdrawn(address indexed recipient, uint256 amount) +func (_TokenHome *TokenHomeFilterer) WatchTokensWithdrawn(opts *bind.WatchOpts, sink chan<- *TokenHomeTokensWithdrawn, recipient []common.Address) (event.Subscription, error) { + + var recipientRule []interface{} + for _, recipientItem := range recipient { + recipientRule = append(recipientRule, recipientItem) + } + + logs, sub, err := _TokenHome.contract.WatchLogs(opts, "TokensWithdrawn", recipientRule) + 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(TokenHomeTokensWithdrawn) + if err := _TokenHome.contract.UnpackLog(event, "TokensWithdrawn", 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 +} + +// ParseTokensWithdrawn is a log parse operation binding the contract event 0x6352c5382c4a4578e712449ca65e83cdb392d045dfcf1cad9615189db2da244b. +// +// Solidity: event TokensWithdrawn(address indexed recipient, uint256 amount) +func (_TokenHome *TokenHomeFilterer) ParseTokensWithdrawn(log types.Log) (*TokenHomeTokensWithdrawn, error) { + event := new(TokenHomeTokensWithdrawn) + if err := _TokenHome.contract.UnpackLog(event, "TokensWithdrawn", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} diff --git a/abi-bindings/go/ictt/TokenRemote/ERC20TokenRemote/ERC20TokenRemote.go b/abi-bindings/go/ictt/TokenRemote/ERC20TokenRemote/ERC20TokenRemote.go new file mode 100644 index 000000000..0688722f2 --- /dev/null +++ b/abi-bindings/go/ictt/TokenRemote/ERC20TokenRemote/ERC20TokenRemote.go @@ -0,0 +1,3044 @@ +// Code generated - DO NOT EDIT. +// This file is a generated binding and any manual changes will be lost. + +package erc20tokenremote + +import ( + "errors" + "math/big" + "strings" + + "github.com/ava-labs/subnet-evm/accounts/abi" + "github.com/ava-labs/subnet-evm/accounts/abi/bind" + "github.com/ava-labs/subnet-evm/core/types" + "github.com/ava-labs/subnet-evm/interfaces" + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/event" +) + +// Reference imports to suppress errors if they are not otherwise used. +var ( + _ = errors.New + _ = big.NewInt + _ = strings.NewReader + _ = interfaces.NotFound + _ = bind.Bind + _ = common.Big1 + _ = types.BloomLookup + _ = event.NewSubscription + _ = abi.ConvertType +) + +// SendAndCallInput is an auto generated low-level Go binding around an user-defined struct. +type SendAndCallInput struct { + DestinationBlockchainID [32]byte + DestinationTokenTransferrerAddress common.Address + RecipientContract common.Address + RecipientPayload []byte + RequiredGasLimit *big.Int + RecipientGasLimit *big.Int + MultiHopFallback common.Address + FallbackRecipient common.Address + PrimaryFeeTokenAddress common.Address + PrimaryFee *big.Int + SecondaryFee *big.Int +} + +// SendTokensInput is an auto generated low-level Go binding around an user-defined struct. +type SendTokensInput struct { + DestinationBlockchainID [32]byte + DestinationTokenTransferrerAddress common.Address + Recipient common.Address + PrimaryFeeTokenAddress common.Address + PrimaryFee *big.Int + SecondaryFee *big.Int + RequiredGasLimit *big.Int + MultiHopFallback common.Address +} + +// TeleporterFeeInfo is an auto generated low-level Go binding around an user-defined struct. +type TeleporterFeeInfo struct { + FeeTokenAddress common.Address + Amount *big.Int +} + +// TokenRemoteSettings is an auto generated low-level Go binding around an user-defined struct. +type TokenRemoteSettings struct { + TeleporterRegistryAddress common.Address + TeleporterManager common.Address + MinTeleporterVersion *big.Int + TokenHomeBlockchainID [32]byte + TokenHomeAddress common.Address + TokenHomeDecimals uint8 +} + +// ERC20TokenRemoteMetaData contains all meta data concerning the ERC20TokenRemote contract. +var ERC20TokenRemoteMetaData = &bind.MetaData{ + ABI: "[{\"inputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"teleporterRegistryAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"teleporterManager\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"minTeleporterVersion\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"tokenHomeBlockchainID\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"tokenHomeAddress\",\"type\":\"address\"},{\"internalType\":\"uint8\",\"name\":\"tokenHomeDecimals\",\"type\":\"uint8\"}],\"internalType\":\"structTokenRemoteSettings\",\"name\":\"settings\",\"type\":\"tuple\"},{\"internalType\":\"string\",\"name\":\"tokenName\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"tokenSymbol\",\"type\":\"string\"},{\"internalType\":\"uint8\",\"name\":\"tokenDecimals\",\"type\":\"uint8\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"target\",\"type\":\"address\"}],\"name\":\"AddressEmptyCode\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"AddressInsufficientBalance\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"allowance\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"needed\",\"type\":\"uint256\"}],\"name\":\"ERC20InsufficientAllowance\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"balance\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"needed\",\"type\":\"uint256\"}],\"name\":\"ERC20InsufficientBalance\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"approver\",\"type\":\"address\"}],\"name\":\"ERC20InvalidApprover\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"}],\"name\":\"ERC20InvalidReceiver\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"ERC20InvalidSender\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"ERC20InvalidSpender\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"FailedInnerCall\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidInitialization\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotInitializing\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"OwnableInvalidOwner\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"OwnableUnauthorizedAccount\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ReentrancyGuardReentrantCall\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"SafeERC20FailedOperation\",\"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\":true,\"internalType\":\"address\",\"name\":\"recipientContract\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"CallFailed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"recipientContract\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"CallSucceeded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"version\",\"type\":\"uint64\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"oldMinTeleporterVersion\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"newMinTeleporterVersion\",\"type\":\"uint256\"}],\"name\":\"MinTeleporterVersionUpdated\",\"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\":\"teleporterAddress\",\"type\":\"address\"}],\"name\":\"TeleporterAddressPaused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"teleporterAddress\",\"type\":\"address\"}],\"name\":\"TeleporterAddressUnpaused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"teleporterMessageID\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"destinationBlockchainID\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"destinationTokenTransferrerAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"recipientContract\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"recipientPayload\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"requiredGasLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"recipientGasLimit\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"multiHopFallback\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"fallbackRecipient\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"primaryFeeTokenAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"primaryFee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"secondaryFee\",\"type\":\"uint256\"}],\"indexed\":false,\"internalType\":\"structSendAndCallInput\",\"name\":\"input\",\"type\":\"tuple\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"TokensAndCallSent\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"teleporterMessageID\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"destinationBlockchainID\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"destinationTokenTransferrerAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"primaryFeeTokenAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"primaryFee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"secondaryFee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"requiredGasLimit\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"multiHopFallback\",\"type\":\"address\"}],\"indexed\":false,\"internalType\":\"structSendTokensInput\",\"name\":\"input\",\"type\":\"tuple\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"TokensSent\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"TokensWithdrawn\",\"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\":[],\"name\":\"ERC20_TOKEN_REMOTE_STORAGE_LOCATION\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"MULTI_HOP_CALL_GAS_PER_WORD\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"MULTI_HOP_CALL_REQUIRED_GAS\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"MULTI_HOP_SEND_REQUIRED_GAS\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"REGISTER_REMOTE_REQUIRED_GAS\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"TELEPORTER_REGISTRY_APP_STORAGE_LOCATION\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"TOKEN_REMOTE_STORAGE_LOCATION\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"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\":\"value\",\"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\":\"payloadSize\",\"type\":\"uint256\"}],\"name\":\"calculateNumWords\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getBlockchainID\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getInitialReserveImbalance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getIsCollateralized\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getMinTeleporterVersion\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getMultiplyOnRemote\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getTokenHomeAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getTokenHomeBlockchainID\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getTokenMultiplier\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"teleporterRegistryAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"teleporterManager\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"minTeleporterVersion\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"tokenHomeBlockchainID\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"tokenHomeAddress\",\"type\":\"address\"},{\"internalType\":\"uint8\",\"name\":\"tokenHomeDecimals\",\"type\":\"uint8\"}],\"internalType\":\"structTokenRemoteSettings\",\"name\":\"settings\",\"type\":\"tuple\"},{\"internalType\":\"string\",\"name\":\"tokenName\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"tokenSymbol\",\"type\":\"string\"},{\"internalType\":\"uint8\",\"name\":\"tokenDecimals\",\"type\":\"uint8\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"teleporterAddress\",\"type\":\"address\"}],\"name\":\"isTeleporterAddressPaused\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"teleporterAddress\",\"type\":\"address\"}],\"name\":\"pauseTeleporterAddress\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"sourceBlockchainID\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"originSenderAddress\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"message\",\"type\":\"bytes\"}],\"name\":\"receiveTeleporterMessage\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"feeTokenAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"internalType\":\"structTeleporterFeeInfo\",\"name\":\"feeInfo\",\"type\":\"tuple\"}],\"name\":\"registerWithHome\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"destinationBlockchainID\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"destinationTokenTransferrerAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"primaryFeeTokenAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"primaryFee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"secondaryFee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"requiredGasLimit\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"multiHopFallback\",\"type\":\"address\"}],\"internalType\":\"structSendTokensInput\",\"name\":\"input\",\"type\":\"tuple\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"send\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"destinationBlockchainID\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"destinationTokenTransferrerAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"recipientContract\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"recipientPayload\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"requiredGasLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"recipientGasLimit\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"multiHopFallback\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"fallbackRecipient\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"primaryFeeTokenAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"primaryFee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"secondaryFee\",\"type\":\"uint256\"}],\"internalType\":\"structSendAndCallInput\",\"name\":\"input\",\"type\":\"tuple\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"sendAndCall\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"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\":\"value\",\"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\":\"value\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"teleporterAddress\",\"type\":\"address\"}],\"name\":\"unpauseTeleporterAddress\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"version\",\"type\":\"uint256\"}],\"name\":\"updateMinTeleporterVersion\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", + Bin: "0x608060405234801561000f575f80fd5b5060405161570338038061570383398101604081905261002e91610bf5565b61003a84848484610046565b50505050610f55565b50565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00805468010000000000000000810460ff1615906001600160401b03165f8115801561008f5750825b90505f826001600160401b031660011480156100aa5750303b155b9050811580156100b8575080155b156100d65760405163f92ee8a960e01b815260040160405180910390fd5b84546001600160401b0319166001178555831561010457845460ff60401b1916680100000000000000001785555b61011089898989610161565b831561015657845460ff60401b19168555604051600181527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b505050505050505050565b6101696101b3565b6101738383610203565b61017e845f83610219565b7f9b9029a3537fcf0e984763da4ac33bbf592a3462819171bf424e91cf62622300805460ff191660ff83161790555b50505050565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a005468010000000000000000900460ff1661020157604051631afcd79f60e31b815260040160405180910390fd5b565b61020b6101b3565b6102158282610250565b5050565b6102216101b3565b8251602084015160408501516102389291906102b3565b6102406102ce565b61024b8383836102de565b505050565b6102586101b3565b7f52c63247e1f47db19d5ce0460030c497f067ca4cebf71ba98eeadabe20bace007f52c63247e1f47db19d5ce0460030c497f067ca4cebf71ba98eeadabe20bace036102a48482610d5a565b50600481016101ad8382610d5a565b6102bb6101b3565b6102c5838261062d565b61024b8261064f565b6102d66101b3565b610201610660565b6102e66101b3565b5f7f600d6a9b283d1eda563de594ce4843869b6f128a4baa222422ed94a60b0cef0090507302000000000000000000000000000000000000056001600160a01b0316634213cf786040518163ffffffff1660e01b8152600401602060405180830381865afa15801561035a573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061037e9190610e19565b815560608401516103e95760405162461bcd60e51b815260206004820152602a60248201527f546f6b656e52656d6f74653a207a65726f20746f6b656e20686f6d6520626c6f60448201526918dad8da185a5b88125160b21b60648201526084015b60405180910390fd5b80546060850151036104635760405162461bcd60e51b815260206004820152603b60248201527f546f6b656e52656d6f74653a2063616e6e6f74206465706c6f7920746f20736160448201527f6d6520626c6f636b636861696e20617320746f6b656e20686f6d65000000000060648201526084016103e0565b60808401516001600160a01b03166104c95760405162461bcd60e51b8152602060048201526024808201527f546f6b656e52656d6f74653a207a65726f20746f6b656e20686f6d65206164646044820152637265737360e01b60648201526084016103e0565b60128460a0015160ff1611156105335760405162461bcd60e51b815260206004820152602960248201527f546f6b656e52656d6f74653a20746f6b656e20686f6d6520646563696d616c73604482015268040e8dede40d0d2ced60bb1b60648201526084016103e0565b60128260ff1611156105935760405162461bcd60e51b8152602060048201526024808201527f546f6b656e52656d6f74653a20746f6b656e20646563696d616c7320746f6f206044820152630d0d2ced60e31b60648201526084016103e0565b60608401516001820155608084015160028201805460058401869055600684018054871560ff1990911617905560a08701516001600160a01b039093166001600160a81b031990911617600160a01b60ff808516919091029190911760ff60a81b1916600160a81b9186169190910217905561060f908361068a565b60048301805460ff1916911515919091179055600390910155505050565b6106356101b3565b61063d6106d2565b6106456106e2565b61021582826106ea565b6106576101b3565b6100438161086e565b5f7fd2f1ed38b7d242bfb8b41862afb813a15193219a4bc717f2056607593e6c75005b6001905550565b5f8060ff8085169084161181816106ad576106a58587610e44565b60ff166106bb565b6106b78686610e44565b60ff165b6106c690600a610f43565b96919550909350505050565b6106da6101b3565b6102016108a8565b6102016101b3565b6106f26101b3565b6001600160a01b03821661076e5760405162461bcd60e51b815260206004820152603760248201527f54656c65706f7274657252656769737472794170703a207a65726f2054656c6560448201527f706f72746572207265676973747279206164647265737300000000000000000060648201526084016103e0565b5f7fde77a4dc7391f6f8f2d9567915d687d3aee79e7a1fc7300392f2727e9a0f1d0090505f8390505f816001600160a01b031663c07f47d46040518163ffffffff1660e01b8152600401602060405180830381865afa1580156107d3573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906107f79190610e19565b1161084c5760405162461bcd60e51b815260206004820152603260248201525f805160206156e3833981519152604482015271656c65706f7274657220726567697374727960701b60648201526084016103e0565b81546001600160a01b0319166001600160a01b0382161782556101ad836108d7565b6108766101b3565b6001600160a01b03811661089f57604051631e4fbdf760e01b81525f60048201526024016103e0565b61004381610a6f565b6108b06101b3565b5f7f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f00610683565b7fde77a4dc7391f6f8f2d9567915d687d3aee79e7a1fc7300392f2727e9a0f1d0080546040805163301fd1f560e21b815290515f926001600160a01b03169163c07f47d49160048083019260209291908290030181865afa15801561093e573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906109629190610e19565b6002830154909150818411156109c15760405162461bcd60e51b815260206004820152603160248201525f805160206156e383398151915260448201527032b632b837b93a32b9103b32b939b4b7b760791b60648201526084016103e0565b808411610a365760405162461bcd60e51b815260206004820152603f60248201527f54656c65706f7274657252656769737472794170703a206e6f7420677265617460448201527f6572207468616e2063757272656e74206d696e696d756d2076657273696f6e0060648201526084016103e0565b60028301849055604051849082907fa9a7ef57e41f05b4c15480842f5f0c27edfcbb553fed281f7c4068452cc1c02d905f90a350505050565b7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c19930080546001600160a01b031981166001600160a01b03848116918217845560405192169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0905f90a3505050565b634e487b7160e01b5f52604160045260245ffd5b60405160c081016001600160401b0381118282101715610b1557610b15610adf565b60405290565b604051601f8201601f191681016001600160401b0381118282101715610b4357610b43610adf565b604052919050565b80516001600160a01b0381168114610b61575f80fd5b919050565b805160ff81168114610b61575f80fd5b5f82601f830112610b85575f80fd5b81516001600160401b03811115610b9e57610b9e610adf565b6020610bb2601f8301601f19168201610b1b565b8281528582848701011115610bc5575f80fd5b5f5b83811015610be2578581018301518282018401528201610bc7565b505f928101909101919091529392505050565b5f805f80848603610120811215610c0a575f80fd5b60c0811215610c17575f80fd5b50610c20610af3565b610c2986610b4b565b8152610c3760208701610b4b565b60208201526040860151604082015260608601516060820152610c5c60808701610b4b565b6080820152610c6d60a08701610b66565b60a082015260c08601519094506001600160401b0380821115610c8e575f80fd5b610c9a88838901610b76565b945060e0870151915080821115610caf575f80fd5b50610cbc87828801610b76565b925050610ccc6101008601610b66565b905092959194509250565b600181811c90821680610ceb57607f821691505b602082108103610d0957634e487b7160e01b5f52602260045260245ffd5b50919050565b601f82111561024b57805f5260205f20601f840160051c81016020851015610d345750805b601f840160051c820191505b81811015610d53575f8155600101610d40565b5050505050565b81516001600160401b03811115610d7357610d73610adf565b610d8781610d818454610cd7565b84610d0f565b602080601f831160018114610dba575f8415610da35750858301515b5f19600386901b1c1916600185901b178555610e11565b5f85815260208120601f198616915b82811015610de857888601518255948401946001909101908401610dc9565b5085821015610e0557878501515f19600388901b60f8161c191681555b505060018460011b0185555b505050505050565b5f60208284031215610e29575f80fd5b5051919050565b634e487b7160e01b5f52601160045260245ffd5b60ff8281168282160390811115610e5d57610e5d610e30565b92915050565b600181815b80851115610e9d57815f1904821115610e8357610e83610e30565b80851615610e9057918102915b93841c9390800290610e68565b509250929050565b5f82610eb357506001610e5d565b81610ebf57505f610e5d565b8160018114610ed55760028114610edf57610efb565b6001915050610e5d565b60ff841115610ef057610ef0610e30565b50506001821b610e5d565b5060208310610133831016604e8410600b8410161715610f1e575081810a610e5d565b610f288383610e63565b805f1904821115610f3b57610f3b610e30565b029392505050565b5f610f4e8383610ea5565b9392505050565b61478180610f625f395ff3fe608060405234801561000f575f80fd5b506004361061021e575f3560e01c806370a082311161012a578063b8a46d02116100b4578063dd62ed3e11610079578063dd62ed3e146104bd578063e0fd9cb8146104d0578063ef793e2a146104d8578063f2fde38b146104e0578063f3f981d8146104f3575f80fd5b8063b8a46d0214610474578063c3cd692714610487578063c868efaa1461048f578063c9fe4ddf146104a2578063d2cc7a70146104b5575f80fd5b80638da5cb5b116100fa5780638da5cb5b146103ee578063909a6ac01461043257806395d89b4114610446578063973142971461044e578063a9059cbb14610461575f80fd5b806370a08231146103a0578063715018a6146103d457806371717c18146103dc5780637ee3779a146103e6575f80fd5b8063313ce567116101ab5780635507f3d11161017b5780635507f3d1146103365780635d16225d146103405780635eb995141461035357806362431a6514610366578063656900381461038d575f80fd5b8063313ce567146102c057806335cac159146102f45780634213cf781461031b5780634511243e14610323575f80fd5b806315beb59f116101f157806315beb59f1461027d57806318160ddd1461028657806323b872dd1461028e578063254ac160146102a15780632b0d8f18146102ab575f80fd5b806302a30c7d1461022257806306fdde031461023f5780630733c8c814610254578063095ea7b31461026a575b5f80fd5b61022a610506565b60405190151581526020015b60405180910390f35b61024761051d565b60405161023691906136ec565b61025c6105dd565b604051908152602001610236565b61022a610278366004613722565b6105f1565b61025c6105dc81565b61025c61060a565b61022a61029c36600461374c565b610625565b61025c6201fbd081565b6102be6102b936600461378a565b61064a565b005b7f9b9029a3537fcf0e984763da4ac33bbf592a3462819171bf424e91cf626223005460405160ff9091168152602001610236565b61025c7f600d6a9b283d1eda563de594ce4843869b6f128a4baa222422ed94a60b0cef0081565b61025c61074c565b6102be61033136600461378a565b61075d565b61025c6205302081565b6102be61034e3660046137a5565b61084c565b6102be6103613660046137d4565b61085a565b61025c7f9b9029a3537fcf0e984763da4ac33bbf592a3462819171bf424e91cf6262230081565b6102be61039b3660046137eb565b61086e565b61025c6103ae36600461378a565b6001600160a01b03165f9081525f8051602061470c833981519152602052604090205490565b6102be610878565b61025c6205573081565b61022a61088b565b7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300546001600160a01b03165b6040516001600160a01b039091168152602001610236565b61025c5f8051602061472c83398151915281565b6102476108a2565b61022a61045c36600461378a565b6108e0565b61022a61046f366004613722565b6108f9565b6102be610482366004613823565b610906565b61041a610acd565b6102be61049d366004613839565b610aea565b6102be6104b03660046139f3565b610ca7565b61025c610db9565b61025c6104cb366004613adc565b610dce565b61025c610e17565b61025c610e2b565b6102be6104ee36600461378a565b610e3f565b61025c6105013660046137d4565b610e79565b5f80610510610e8f565b6006015460ff1692915050565b7f52c63247e1f47db19d5ce0460030c497f067ca4cebf71ba98eeadabe20bace0380546060915f8051602061470c8339815191529161055b90613b13565b80601f016020809104026020016040519081016040528092919081815260200182805461058790613b13565b80156105d25780601f106105a9576101008083540402835291602001916105d2565b820191905f5260205f20905b8154815290600101906020018083116105b557829003601f168201915b505050505091505090565b5f806105e7610e8f565b6003015492915050565b5f336105fe818585610eb3565b60019150505b92915050565b5f805f8051602061470c8339815191525b6002015492915050565b5f33610632858285610ec5565b61063d858585610f22565b60019150505b9392505050565b5f8051602061472c833981519152610660610f7f565b6001600160a01b03821661068f5760405162461bcd60e51b815260040161068690613b45565b60405180910390fd5b6106998183610f87565b156106fc5760405162461bcd60e51b815260206004820152602d60248201527f54656c65706f7274657252656769737472794170703a2061646472657373206160448201526c1b1c9958591e481c185d5cd959609a1b6064820152608401610686565b6001600160a01b0382165f81815260018381016020526040808320805460ff1916909217909155517f933f93e57a222e6330362af8b376d0a8725b6901e9a2fb86d00f169702b28a4c9190a25050565b5f80610756610e8f565b5492915050565b5f8051602061472c833981519152610773610f7f565b6001600160a01b0382166107995760405162461bcd60e51b815260040161068690613b45565b6107a38183610f87565b6108015760405162461bcd60e51b815260206004820152602960248201527f54656c65706f7274657252656769737472794170703a2061646472657373206e6044820152681bdd081c185d5cd95960ba1b6064820152608401610686565b6001600160a01b0382165f818152600183016020526040808220805460ff19169055517f844e2f3154214672229235858fd029d1dfd543901c6d05931f0bc2480a2d72c39190a25050565b6108568282610fa8565b5050565b610862610f7f565b61086b81611030565b50565b61085682826111c8565b610880611250565b6108895f6112ab565b565b5f80610895610e8f565b6004015460ff1692915050565b7f52c63247e1f47db19d5ce0460030c497f067ca4cebf71ba98eeadabe20bace0480546060915f8051602061470c8339815191529161055b90613b13565b5f5f8051602061472c8339815191526106438184610f87565b5f336105fe818585610f22565b5f61090f610e8f565b6006810154909150610100900460ff161561096c5760405162461bcd60e51b815260206004820152601f60248201527f546f6b656e52656d6f74653a20616c72656164792072656769737465726564006044820152606401610686565b604080516060808201835260058401548252600284015460ff600160a01b820481166020808601918252600160a81b9093048216858701908152865180880188525f808252885188518188015293518516848a01529151909316828601528651808303909501855260809091019095528082019290925291929091610a01906109f79087018761378a565b866020013561131b565b6040805160c0810182526001870154815260028701546001600160a01b031660208083019190915282518084018452939450610ac5939192830191908190610a4b908b018b61378a565b6001600160a01b0316815260209081018690529082526201fbd0908201526040015f5b604051908082528060200260200182016040528015610a97578160200160208202803683370190505b50815260200184604051602001610aae9190613ba7565b604051602081830303815290604052815250611363565b505050505050565b5f80610ad7610e8f565b600201546001600160a01b031692915050565b610af261147e565b5f5f8051602061472c83398151915260028101548154919250906001600160a01b0316634c1f08ce336040516001600160e01b031960e084901b1681526001600160a01b039091166004820152602401602060405180830381865afa158015610b5d573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610b819190613be9565b1015610be85760405162461bcd60e51b815260206004820152603060248201527f54656c65706f7274657252656769737472794170703a20696e76616c6964205460448201526f32b632b837b93a32b91039b2b73232b960811b6064820152608401610686565b610bf28133610f87565b15610c585760405162461bcd60e51b815260206004820152603060248201527f54656c65706f7274657252656769737472794170703a2054656c65706f72746560448201526f1c881859191c995cdcc81c185d5cd95960821b6064820152608401610686565b610c98858585858080601f0160208091040260200160405190810160405280939291908181526020018383808284375f920191909152506114c892505050565b50610ca16116df565b50505050565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a008054600160401b810460ff1615906001600160401b03165f81158015610ceb5750825b90505f826001600160401b03166001148015610d065750303b155b905081158015610d14575080155b15610d325760405163f92ee8a960e01b815260040160405180910390fd5b845467ffffffffffffffff191660011785558315610d5c57845460ff60401b1916600160401b1785555b610d6889898989611709565b8315610dae57845460ff60401b19168555604051600181527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b505050505050505050565b5f805f8051602061472c83398151915261061b565b6001600160a01b039182165f9081527f52c63247e1f47db19d5ce0460030c497f067ca4cebf71ba98eeadabe20bace016020908152604080832093909416825291909152205490565b5f80610e21610e8f565b6001015492915050565b5f80610e35610e8f565b6005015492915050565b610e47611250565b6001600160a01b038116610e7057604051631e4fbdf760e01b81525f6004820152602401610686565b61086b816112ab565b5f6005610e8783601f613c14565b901c92915050565b7f600d6a9b283d1eda563de594ce4843869b6f128a4baa222422ed94a60b0cef0090565b610ec08383836001611759565b505050565b5f610ed08484610dce565b90505f198114610ca15781811015610f1457604051637dc7a0d960e11b81526001600160a01b03841660048201526024810182905260448101839052606401610686565b610ca184848484035f611759565b6001600160a01b038316610f4b57604051634b637e8f60e11b81525f6004820152602401610686565b6001600160a01b038216610f745760405163ec442f0560e01b81525f6004820152602401610686565b610ec083838361183c565b610889611250565b6001600160a01b03165f908152600191909101602052604090205460ff1690565b7fd2f1ed38b7d242bfb8b41862afb813a15193219a4bc717f2056607593e6c75008054600114610fea5760405162461bcd60e51b815260040161068690613c27565b600281555f610ff7610e8f565b905061100284611975565b600181015484350361101d576110188484611a60565b611027565b6110278484611be4565b50600190555050565b5f8051602061472c83398151915280546040805163301fd1f560e21b815290515f926001600160a01b03169163c07f47d49160048083019260209291908290030181865afa158015611084573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906110a89190613be9565b60028301549091508184111561111a5760405162461bcd60e51b815260206004820152603160248201527f54656c65706f7274657252656769737472794170703a20696e76616c6964205460448201527032b632b837b93a32b9103b32b939b4b7b760791b6064820152608401610686565b80841161118f5760405162461bcd60e51b815260206004820152603f60248201527f54656c65706f7274657252656769737472794170703a206e6f7420677265617460448201527f6572207468616e2063757272656e74206d696e696d756d2076657273696f6e006064820152608401610686565b60028301849055604051849082907fa9a7ef57e41f05b4c15480842f5f0c27edfcbb553fed281f7c4068452cc1c02d905f90a350505050565b7fd2f1ed38b7d242bfb8b41862afb813a15193219a4bc717f2056607593e6c7500805460011461120a5760405162461bcd60e51b815260040161068690613c27565b600281555f611217610e8f565b905061122284611daf565b600181015484350361123e576112388484611fe9565b50611248565b61123884846121f8565b600190555050565b336112827f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300546001600160a01b031690565b6001600160a01b0316146108895760405163118cdaa760e01b8152336004820152602401610686565b7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c19930080546001600160a01b031981166001600160a01b03848116918217845560405192169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0905f90a3505050565b5f815f0361132a57505f610604565b306001600160a01b0384160361135857611346335b3084610ec5565b611351333084610f22565b5080610604565b610643833384612494565b5f8061136d6125f7565b60408401516020015190915015611412576040830151516001600160a01b03166113ef5760405162461bcd60e51b815260206004820152602d60248201527f54656c65706f7274657252656769737472794170703a207a65726f206665652060448201526c746f6b656e206164647265737360981b6064820152608401610686565b604083015160208101519051611412916001600160a01b039091169083906126e7565b604051630624488560e41b81526001600160a01b0382169063624488509061143e908690600401613c6b565b6020604051808303815f875af115801561145a573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906106439190613be9565b7f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f008054600119016114c257604051633ee5aeb560e01b815260040160405180910390fd5b60029055565b5f6114d1610e8f565b9050806001015484146115385760405162461bcd60e51b815260206004820152602960248201527f546f6b656e52656d6f74653a20696e76616c696420736f7572636520626c6f636044820152681ad8da185a5b88125160ba1b6064820152608401610686565b60028101546001600160a01b038481169116146115aa5760405162461bcd60e51b815260206004820152602a60248201527f546f6b656e52656d6f74653a20696e76616c6964206f726967696e2073656e646044820152696572206164647265737360b01b6064820152608401610686565b5f828060200190518101906115bf9190613d64565b6006830154909150610100900460ff1615806115e05750600682015460ff16155b156115f75760068201805461ffff19166101011790555b60018151600481111561160c5761160c613b93565b03611643575f816020015180602001905181019061162a9190613dec565b905061163d815f0151826020015161276e565b506116d8565b60028151600481111561165857611658613b93565b03611686575f81602001518060200190518101906116769190613e24565b905061163d8182608001516127bb565b60405162461bcd60e51b815260206004820152602160248201527f546f6b656e52656d6f74653a20696e76616c6964206d657373616765207479706044820152606560f81b6064820152608401610686565b5050505050565b5f7f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f005b6001905550565b611711612914565b61171b838361295d565b611726845f8361296f565b7f9b9029a3537fcf0e984763da4ac33bbf592a3462819171bf424e91cf62622300805460ff191660ff8316179055610ca1565b5f8051602061470c8339815191526001600160a01b0385166117905760405163e602df0560e01b81525f6004820152602401610686565b6001600160a01b0384166117b957604051634a1406b160e11b81525f6004820152602401610686565b6001600160a01b038086165f908152600183016020908152604080832093881683529290522083905581156116d857836001600160a01b0316856001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9258560405161182d91815260200190565b60405180910390a35050505050565b5f8051602061470c8339815191526001600160a01b0384166118765781816002015f82825461186b9190613c14565b909155506118e69050565b6001600160a01b0384165f90815260208290526040902054828110156118c85760405163391434e360e21b81526001600160a01b03861660048201526024810182905260448101849052606401610686565b6001600160a01b0385165f9081526020839052604090209083900390555b6001600160a01b038316611904576002810180548390039055611922565b6001600160a01b0383165f9081526020829052604090208054830190555b826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405161196791815260200190565b60405180910390a350505050565b5f611986606083016040840161378a565b6001600160a01b0316036119e85760405162461bcd60e51b815260206004820152602360248201527f546f6b656e52656d6f74653a207a65726f20726563697069656e74206164647260448201526265737360e81b6064820152608401610686565b5f8160c0013511611a0b5760405162461bcd60e51b815260040161068690613eee565b8035611a295760405162461bcd60e51b815260040161068690613f32565b5f611a3a604083016020840161378a565b6001600160a01b03160361086b5760405162461bcd60e51b815260040161068690613f7d565b5f611a69610e8f565b9050611a99611a7e604085016020860161378a565b60a0850135611a94610100870160e0880161378a565b6129a0565b5f611abd83611aae608087016060880161378a565b86608001358760a00135612a9d565b6040805180820190915291945091505f9080600181526020016040518060400160405280886040016020810190611af4919061378a565b6001600160a01b0316815260200187815250604051602001611b169190613fda565b60408051601f198184030181529181529152805160c0810182526001860154815260028601546001600160a01b03166020820152815180830183529293505f92611b969282019080611b6e60808c0160608d0161378a565b6001600160a01b03168152602090810188905290825260c08a0135908201526040015f610a6e565b9050336001600160a01b0316817f93f19bf1ec58a15dc643b37e7e18a1c13e85e06cd11929e283154691ace9fb528888604051611bd4929190613ffa565b60405180910390a3505050505050565b5f611bed610e8f565b9050611c1a8335611c04604086016020870161378a565b611c15610100870160e0880161378a565b612b60565b5f611c2f83611aae608087016060880161378a565b60408051808201825260038152815160e081018352883581529396509193505f9260208084019282820191611c68918b01908b0161378a565b6001600160a01b03168152602001611c8660608a0160408b0161378a565b6001600160a01b031681526020810188905260a0890135604082015260c08901356060820152608001611cc06101008a0160e08b0161378a565b6001600160a01b03169052604051611d309190602001815181526020808301516001600160a01b0390811691830191909152604080840151821690830152606080840151908301526080808401519083015260a0808401519083015260c092830151169181019190915260e00190565b60408051601f198184030181529181529152805160c0810182526001860154815260028601546001600160a01b03166020820152815180830183529293505f92611b969282019080611d8860808c0160608d0161378a565b6001600160a01b03168152602090810188905290825262053020908201526040015f610a6e565b8035611dcd5760405162461bcd60e51b815260040161068690613f32565b5f611dde604083016020840161378a565b6001600160a01b031603611e045760405162461bcd60e51b815260040161068690613f7d565b5f611e15606083016040840161378a565b6001600160a01b031603611e805760405162461bcd60e51b815260206004820152602c60248201527f546f6b656e52656d6f74653a207a65726f20726563697069656e7420636f6e7460448201526b72616374206164647265737360a01b6064820152608401610686565b5f816080013511611ea35760405162461bcd60e51b815260040161068690613eee565b5f8160a0013511611f045760405162461bcd60e51b815260206004820152602560248201527f546f6b656e52656d6f74653a207a65726f20726563697069656e7420676173206044820152641b1a5b5a5d60da1b6064820152608401610686565b80608001358160a0013510611f6c5760405162461bcd60e51b815260206004820152602860248201527f546f6b656e52656d6f74653a20696e76616c696420726563697069656e742067604482015267185cc81b1a5b5a5d60c21b6064820152608401610686565b5f611f7e610100830160e0840161378a565b6001600160a01b03160361086b5760405162461bcd60e51b815260206004820152602c60248201527f546f6b656e52656d6f74653a207a65726f2066616c6c6261636b20726563697060448201526b69656e74206164647265737360a01b6064820152608401610686565b5f611ff2610e8f565b905061201d612007604085016020860161378a565b610140850135611a9460e0870160c0880161378a565b5f612045836120346101208701610100880161378a565b866101200135876101400135612a9d565b6040805180820190915291945091505f908060028152602001604051806101000160405280865f01548152602001306001600160a01b031681526020016120893390565b6001600160a01b031681526020016120a760608a0160408b0161378a565b6001600160a01b03168152602081018890526040016120c960608a018a614099565b8080601f0160208091040260200160405190810160405280939291908181526020018383808284375f9201919091525050509082525060a0890135602082015260400161211d6101008a0160e08b0161378a565b6001600160a01b0316905260405161213891906020016140db565b60408051601f198184030181529181529152805160c0810182526001860154815260028601546001600160a01b03166020820152815180830183529293505f926121ba92820190806121926101208c016101008d0161378a565b6001600160a01b03168152602090810188905290825260808a0135908201526040015f610a6e565b9050336001600160a01b0316817f5d76dff81bf773b908b050fa113d39f7d8135bb4175398f313ea19cd3a1a0b168888604051611bd49291906141e2565b5f612201610e8f565b90506122288335612218604086016020870161378a565b611c1560e0870160c0880161378a565b5f61223f836120346101208701610100880161378a565b6040805180820190915291945091505f90806004815260200160405180610160016040528061226b3390565b6001600160a01b03168152602001885f01358152602001886020016020810190612295919061378a565b6001600160a01b031681526020016122b360608a0160408b0161378a565b6001600160a01b03168152602081018890526040016122d560608a018a614099565b8080601f0160208091040260200160405190810160405280939291908181526020018383808284375f9201919091525050509082525060a089013560208201526040016123296101008a0160e08b0161378a565b6001600160a01b031681526080890135602082015260400161235160e08a0160c08b0161378a565b6001600160a01b031681526101408901356020918201526040516123769291016142f0565b60408051601f19818403018152919052905290505f6105dc6123a561239e6060890189614099565b9050610e79565b6123af91906143cd565b6123bc9062055730613c14565b6040805160c0810182526001870154815260028701546001600160a01b03166020820152815180830183529293505f9261244592820190806124066101208d016101008e0161378a565b6001600160a01b031681526020908101899052908252818101869052604080515f815280830182528184015251606090920191610aae91889101613ba7565b9050336001600160a01b0316817f5d76dff81bf773b908b050fa113d39f7d8135bb4175398f313ea19cd3a1a0b1689896040516124839291906141e2565b60405180910390a350505050505050565b6040516370a0823160e01b81523060048201525f9081906001600160a01b038616906370a0823190602401602060405180830381865afa1580156124da573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906124fe9190613be9565b90506125156001600160a01b038616853086612bfe565b6040516370a0823160e01b81523060048201525f906001600160a01b038716906370a0823190602401602060405180830381865afa158015612559573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061257d9190613be9565b90508181116125e35760405162461bcd60e51b815260206004820152602c60248201527f5361666545524332305472616e7366657246726f6d3a2062616c616e6365206e60448201526b1bdd081a5b98dc99585cd95960a21b6064820152608401610686565b6125ed82826143e4565b9695505050505050565b5f8051602061472c83398151915280546040805163d820e64f60e01b815290515f939284926001600160a01b039091169163d820e64f916004808201926020929091908290030181865afa158015612651573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061267591906143f7565b90506126818282610f87565b156106045760405162461bcd60e51b815260206004820152603060248201527f54656c65706f7274657252656769737472794170703a2054656c65706f72746560448201526f1c881cd95b991a5b99c81c185d5cd95960821b6064820152608401610686565b604051636eb1769f60e11b81523060048201526001600160a01b0383811660248301525f919085169063dd62ed3e90604401602060405180830381865afa158015612734573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906127589190613be9565b9050610ca184846127698585613c14565b612c65565b816001600160a01b03167f6352c5382c4a4578e712449ca65e83cdb392d045dfcf1cad9615189db2da244b826040516127a991815260200190565b60405180910390a26108568282612cf4565b6127c53082612cf4565b6127d430836060015183610eb3565b5f825f01518360200151846040015130858760a001516040516024016127ff96959493929190614412565b60408051601f198184030181529190526020810180516001600160e01b03166394395edd60e01b17905260c084015160608501519192505f91612843919084612d28565b90505f612854308660600151610dce565b90506128653086606001515f610eb3565b81156128b75784606001516001600160a01b03167f104deb555f67e63782bb817bc26c39050894645f9b9f29c4be8ae68d0e8b7ff4856040516128aa91815260200190565b60405180910390a26128ff565b84606001516001600160a01b03167fb9eaeae386d339f8115782f297a9e5f0e13fb587cd6b0d502f113cb8dd4d6cb0856040516128f691815260200190565b60405180910390a25b80156116d8576116d8308660e0015183610f22565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0054600160401b900460ff1661088957604051631afcd79f60e31b815260040160405180910390fd5b612965612914565b6108568282612d3d565b612977612914565b61298d835f015184602001518560400151612d8d565b612995612da8565b610ec0838383612db8565b5f6129a9610e8f565b60028101549091506001600160a01b038581169116146129db5760405162461bcd60e51b815260040161068690614452565b8215612a355760405162461bcd60e51b815260206004820152602360248201527f546f6b656e52656d6f74653a206e6f6e2d7a65726f207365636f6e646172792060448201526266656560e81b6064820152608401610686565b6001600160a01b03821615610ca15760405162461bcd60e51b815260206004820152602860248201527f546f6b656e52656d6f74653a206e6f6e2d7a65726f206d756c74692d686f702060448201526766616c6c6261636b60c01b6064820152608401610686565b5f805f612aa8610e8f565b9050612ab3876130dc565b9650612abf868661131b565b60038201546004830154919650612ad99160ff16866130f4565b60038201546004830154612af1919060ff168a6130f4565b11612b535760405162461bcd60e51b815260206004820152602c60248201527f546f6b656e52656d6f74653a20696e73756666696369656e7420746f6b656e7360448201526b103a37903a3930b739b332b960a11b6064820152608401610686565b5094959294509192505050565b5f612b69610e8f565b80549091508403612b9c57306001600160a01b03841603612b9c5760405162461bcd60e51b815260040161068690614452565b6001600160a01b038216610ca15760405162461bcd60e51b8152602060048201526024808201527f546f6b656e52656d6f74653a207a65726f206d756c74692d686f702066616c6c6044820152636261636b60e01b6064820152608401610686565b6040516001600160a01b038481166024830152838116604483015260648201839052610ca19186918216906323b872dd906084015b604051602081830303815290604052915060e01b6020820180516001600160e01b038381831617835250505050613101565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663095ea7b360e01b179052612cb68482613162565b610ca1576040516001600160a01b0384811660248301525f6044830152612cea91869182169063095ea7b390606401612c33565b610ca18482613101565b6001600160a01b038216612d1d5760405163ec442f0560e01b81525f6004820152602401610686565b6108565f838361183c565b5f612d35845f8585613203565b949350505050565b612d45612914565b5f8051602061470c8339815191527f52c63247e1f47db19d5ce0460030c497f067ca4cebf71ba98eeadabe20bace03612d7e84826144f3565b5060048101610ca183826144f3565b612d95612914565b612d9f83826132d3565b610ec0826132f5565b612db0612914565b610889613306565b612dc0612914565b5f612dc9610e8f565b90506005600160991b016001600160a01b0316634213cf786040518163ffffffff1660e01b8152600401602060405180830381865afa158015612e0e573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612e329190613be9565b81556060840151612e985760405162461bcd60e51b815260206004820152602a60248201527f546f6b656e52656d6f74653a207a65726f20746f6b656e20686f6d6520626c6f60448201526918dad8da185a5b88125160b21b6064820152608401610686565b8054606085015103612f125760405162461bcd60e51b815260206004820152603b60248201527f546f6b656e52656d6f74653a2063616e6e6f74206465706c6f7920746f20736160448201527f6d6520626c6f636b636861696e20617320746f6b656e20686f6d6500000000006064820152608401610686565b60808401516001600160a01b0316612f785760405162461bcd60e51b8152602060048201526024808201527f546f6b656e52656d6f74653a207a65726f20746f6b656e20686f6d65206164646044820152637265737360e01b6064820152608401610686565b60128460a0015160ff161115612fe25760405162461bcd60e51b815260206004820152602960248201527f546f6b656e52656d6f74653a20746f6b656e20686f6d6520646563696d616c73604482015268040e8dede40d0d2ced60bb1b6064820152608401610686565b60128260ff1611156130425760405162461bcd60e51b8152602060048201526024808201527f546f6b656e52656d6f74653a20746f6b656e20646563696d616c7320746f6f206044820152630d0d2ced60e31b6064820152608401610686565b60608401516001820155608084015160028201805460058401869055600684018054871560ff1990911617905560a08701516001600160a01b039093166001600160a81b031990911617600160a01b60ff808516919091029190911760ff60a81b1916600160a81b918616919091021790556130be908361332d565b60048301805460ff1916911515919091179055600390910155505050565b5f6130e63361133f565b6130f03383613377565b5090565b5f612d358484845f6133ab565b5f6131156001600160a01b038416836133d2565b905080515f1415801561313957508080602001905181019061313791906145ae565b155b15610ec057604051635274afe760e01b81526001600160a01b0384166004820152602401610686565b5f805f846001600160a01b03168460405161317d91906145cd565b5f604051808303815f865af19150503d805f81146131b6576040519150601f19603f3d011682016040523d82523d5f602084013e6131bb565b606091505b50915091508180156131e55750805115806131e55750808060200190518101906131e591906145ae565b80156131fa57505f856001600160a01b03163b115b95945050505050565b5f845a10156132545760405162461bcd60e51b815260206004820152601b60248201527f43616c6c5574696c733a20696e73756666696369656e742067617300000000006044820152606401610686565b834710156132a45760405162461bcd60e51b815260206004820152601d60248201527f43616c6c5574696c733a20696e73756666696369656e742076616c75650000006044820152606401610686565b826001600160a01b03163b5f036132bc57505f612d35565b5f805f84516020860188888bf19695505050505050565b6132db612914565b6132e36133df565b6132eb6133ef565b61085682826133f7565b6132fd612914565b61086b8161357b565b5f7fd2f1ed38b7d242bfb8b41862afb813a15193219a4bc717f2056607593e6c7500611702565b5f8060ff8085169084161181816133505761334885876145e8565b60ff1661335e565b61335a86866145e8565b60ff165b61336990600a6146e1565b9350909150505b9250929050565b6001600160a01b0382166133a057604051634b637e8f60e11b81525f6004820152602401610686565b610856825f8361183c565b5f811515841515036133c8576133c185846143cd565b9050612d35565b6131fa85846146ec565b606061064383835f613583565b6133e7612914565b610889613612565b610889612914565b6133ff612914565b6001600160a01b03821661347b5760405162461bcd60e51b815260206004820152603760248201527f54656c65706f7274657252656769737472794170703a207a65726f2054656c6560448201527f706f7274657220726567697374727920616464726573730000000000000000006064820152608401610686565b5f5f8051602061472c83398151915290505f8390505f816001600160a01b031663c07f47d46040518163ffffffff1660e01b8152600401602060405180830381865afa1580156134cd573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906134f19190613be9565b116135595760405162461bcd60e51b815260206004820152603260248201527f54656c65706f7274657252656769737472794170703a20696e76616c69642054604482015271656c65706f7274657220726567697374727960701b6064820152608401610686565b81546001600160a01b0319166001600160a01b038216178255610ca183611030565b610e47612914565b6060814710156135a85760405163cd78605960e01b8152306004820152602401610686565b5f80856001600160a01b031684866040516135c391906145cd565b5f6040518083038185875af1925050503d805f81146135fd576040519150601f19603f3d011682016040523d82523d5f602084013e613602565b606091505b50915091506125ed86838361361a565b6116df612914565b60608261362f5761362a82613676565b610643565b815115801561364657506001600160a01b0384163b155b1561366f57604051639996b31560e01b81526001600160a01b0385166004820152602401610686565b5080610643565b8051156136865780518082602001fd5b604051630a12f52160e11b815260040160405180910390fd5b5f5b838110156136b95781810151838201526020016136a1565b50505f910152565b5f81518084526136d881602086016020860161369f565b601f01601f19169290920160200192915050565b602081525f61064360208301846136c1565b6001600160a01b038116811461086b575f80fd5b803561371d816136fe565b919050565b5f8060408385031215613733575f80fd5b823561373e816136fe565b946020939093013593505050565b5f805f6060848603121561375e575f80fd5b8335613769816136fe565b92506020840135613779816136fe565b929592945050506040919091013590565b5f6020828403121561379a575f80fd5b8135610643816136fe565b5f808284036101208112156137b8575f80fd5b610100808212156137c7575f80fd5b9395938601359450505050565b5f602082840312156137e4575f80fd5b5035919050565b5f80604083850312156137fc575f80fd5b82356001600160401b03811115613811575f80fd5b8301610160818603121561373e575f80fd5b5f60408284031215613833575f80fd5b50919050565b5f805f806060858703121561384c575f80fd5b84359350602085013561385e816136fe565b925060408501356001600160401b0380821115613879575f80fd5b818701915087601f83011261388c575f80fd5b81358181111561389a575f80fd5b8860208285010111156138ab575f80fd5b95989497505060200194505050565b634e487b7160e01b5f52604160045260245ffd5b60405160c081016001600160401b03811182821017156138f0576138f06138ba565b60405290565b604080519081016001600160401b03811182821017156138f0576138f06138ba565b60405161010081016001600160401b03811182821017156138f0576138f06138ba565b604051601f8201601f191681016001600160401b0381118282101715613963576139636138ba565b604052919050565b803560ff8116811461371d575f80fd5b5f6001600160401b03821115613993576139936138ba565b50601f01601f191660200190565b5f82601f8301126139b0575f80fd5b81356139c36139be8261397b565b61393b565b8181528460208386010111156139d7575f80fd5b816020850160208301375f918101602001919091529392505050565b5f805f80848603610120811215613a08575f80fd5b60c0811215613a15575f80fd5b50613a1e6138ce565b8535613a29816136fe565b81526020860135613a39816136fe565b8060208301525060408601356040820152606086013560608201526080860135613a62816136fe565b6080820152613a7360a0870161396b565b60a0820152935060c08501356001600160401b0380821115613a93575f80fd5b613a9f888389016139a1565b945060e0870135915080821115613ab4575f80fd5b50613ac1878288016139a1565b925050613ad1610100860161396b565b905092959194509250565b5f8060408385031215613aed575f80fd5b8235613af8816136fe565b91506020830135613b08816136fe565b809150509250929050565b600181811c90821680613b2757607f821691505b60208210810361383357634e487b7160e01b5f52602260045260245ffd5b6020808252602e908201527f54656c65706f7274657252656769737472794170703a207a65726f2054656c6560408201526d706f72746572206164647265737360901b606082015260800190565b634e487b7160e01b5f52602160045260245ffd5b602081525f825160058110613bca57634e487b7160e01b5f52602160045260245ffd5b806020840152506020830151604080840152612d3560608401826136c1565b5f60208284031215613bf9575f80fd5b5051919050565b634e487b7160e01b5f52601160045260245ffd5b8082018082111561060457610604613c00565b60208082526024908201527f53656e645265656e7472616e637947756172643a2073656e64207265656e7472604082015263616e637960e01b606082015260800190565b6020808252825182820152828101516001600160a01b039081166040808501919091528401518051821660608501528083015160808501525f929161010085019190606087015160a0870152608087015160e060c08801528051938490528401925f92506101208701905b80841015613cf857845183168252938501936001939093019290850190613cd6565b5060a0880151878203601f190160e08901529450613d1681866136c1565b98975050505050505050565b5f82601f830112613d31575f80fd5b8151613d3f6139be8261397b565b818152846020838601011115613d53575f80fd5b612d3582602083016020870161369f565b5f60208284031215613d74575f80fd5b81516001600160401b0380821115613d8a575f80fd5b9083019060408286031215613d9d575f80fd5b613da56138f6565b825160058110613db3575f80fd5b8152602083015182811115613dc6575f80fd5b613dd287828601613d22565b60208301525095945050505050565b805161371d816136fe565b5f60408284031215613dfc575f80fd5b613e046138f6565b8251613e0f816136fe565b81526020928301519281019290925250919050565b5f60208284031215613e34575f80fd5b81516001600160401b0380821115613e4a575f80fd5b908301906101008286031215613e5e575f80fd5b613e66613918565b82518152613e7660208401613de1565b6020820152613e8760408401613de1565b6040820152613e9860608401613de1565b60608201526080830151608082015260a083015182811115613eb8575f80fd5b613ec487828601613d22565b60a08301525060c083015160c0820152613ee060e08401613de1565b60e082015295945050505050565b60208082526024908201527f546f6b656e52656d6f74653a207a65726f20726571756972656420676173206c6040820152631a5b5a5d60e21b606082015260800190565b6020808252602b908201527f546f6b656e52656d6f74653a207a65726f2064657374696e6174696f6e20626c60408201526a1bd8dad8da185a5b88125160aa1b606082015260800190565b60208082526037908201527f546f6b656e52656d6f74653a207a65726f2064657374696e6174696f6e20746f60408201527f6b656e207472616e736665727265722061646472657373000000000000000000606082015260800190565b81516001600160a01b031681526020808301519082015260408101610604565b8235815261012081016020840135614011816136fe565b6001600160a01b039081166020840152604085013590614030826136fe565b16604083015261404260608501613712565b6001600160a01b0381166060840152506080840135608083015260a084013560a083015260c084013560c083015261407c60e08501613712565b6001600160a01b031660e083015261010090910191909152919050565b5f808335601e198436030181126140ae575f80fd5b8301803591506001600160401b038211156140c7575f80fd5b602001915036819003821315613370575f80fd5b60208152815160208201525f602083015160018060a01b0380821660408501528060408601511660608501525050606083015161412360808401826001600160a01b03169052565b50608083015160a083015260a08301516101008060c085015261414a6101208501836136c1565b915060c085015160e085015260e085015161416f828601826001600160a01b03169052565b5090949350505050565b5f808335601e1984360301811261418e575f80fd5b83016020810192503590506001600160401b038111156141ac575f80fd5b803603821315613370575f80fd5b81835281816020850137505f828201602090810191909152601f909101601f19169091010190565b60408152823560408201525f6141fa60208501613712565b6001600160a01b0316606083015261421460408501613712565b6001600160a01b0316608083015261422f6060850185614179565b6101608060a08601526142476101a0860183856141ba565b9250608087013560c086015260a087013560e086015261426960c08801613712565b9150610100614282818701846001600160a01b03169052565b61428e60e08901613712565b92506101206142a7818801856001600160a01b03169052565b6142b2828a01613712565b935061014091506142cd828801856001600160a01b03169052565b880135918601919091529095013561018084015260209092019290925292915050565b6020815261430a6020820183516001600160a01b03169052565b602082015160408201525f604083015161432f60608401826001600160a01b03169052565b5060608301516001600160a01b038116608084015250608083015160a083015260a08301516101608060c085015261436b6101808501836136c1565b915060c085015160e085015260e0850151610100614393818701836001600160a01b03169052565b8601516101208681019190915286015190506101406143bc818701836001600160a01b03169052565b959095015193019290925250919050565b808202811582820484141761060457610604613c00565b8181038181111561060457610604613c00565b5f60208284031215614407575f80fd5b8151610643816136fe565b8681526001600160a01b0386811660208301528581166040830152841660608201526080810183905260c060a082018190525f90613d16908301846136c1565b6020808252603a908201527f546f6b656e52656d6f74653a20696e76616c69642064657374696e6174696f6e60408201527f20746f6b656e207472616e736665727265722061646472657373000000000000606082015260800190565b601f821115610ec057805f5260205f20601f840160051c810160208510156144d45750805b601f840160051c820191505b818110156116d8575f81556001016144e0565b81516001600160401b0381111561450c5761450c6138ba565b6145208161451a8454613b13565b846144af565b602080601f831160018114614553575f841561453c5750858301515b5f19600386901b1c1916600185901b178555610ac5565b5f85815260208120601f198616915b8281101561458157888601518255948401946001909101908401614562565b508582101561459e57878501515f19600388901b60f8161c191681555b5050505050600190811b01905550565b5f602082840312156145be575f80fd5b81518015158114610643575f80fd5b5f82516145de81846020870161369f565b9190910192915050565b60ff828116828216039081111561060457610604613c00565b600181815b8085111561463b57815f190482111561462157614621613c00565b8085161561462e57918102915b93841c9390800290614606565b509250929050565b5f8261465157506001610604565b8161465d57505f610604565b8160018114614673576002811461467d57614699565b6001915050610604565b60ff84111561468e5761468e613c00565b50506001821b610604565b5060208310610133831016604e8410600b84101617156146bc575081810a610604565b6146c68383614601565b805f19048211156146d9576146d9613c00565b029392505050565b5f6106438383614643565b5f8261470657634e487b7160e01b5f52601260045260245ffd5b50049056fe52c63247e1f47db19d5ce0460030c497f067ca4cebf71ba98eeadabe20bace00de77a4dc7391f6f8f2d9567915d687d3aee79e7a1fc7300392f2727e9a0f1d00a264697066735822122075e5c3c72181a26547917c5ec35ed389afc6bfee55fcd464aa42390548718c8a64736f6c6343000819003354656c65706f7274657252656769737472794170703a20696e76616c69642054", +} + +// ERC20TokenRemoteABI is the input ABI used to generate the binding from. +// Deprecated: Use ERC20TokenRemoteMetaData.ABI instead. +var ERC20TokenRemoteABI = ERC20TokenRemoteMetaData.ABI + +// ERC20TokenRemoteBin is the compiled bytecode used for deploying new contracts. +// Deprecated: Use ERC20TokenRemoteMetaData.Bin instead. +var ERC20TokenRemoteBin = ERC20TokenRemoteMetaData.Bin + +// DeployERC20TokenRemote deploys a new Ethereum contract, binding an instance of ERC20TokenRemote to it. +func DeployERC20TokenRemote(auth *bind.TransactOpts, backend bind.ContractBackend, settings TokenRemoteSettings, tokenName string, tokenSymbol string, tokenDecimals uint8) (common.Address, *types.Transaction, *ERC20TokenRemote, error) { + parsed, err := ERC20TokenRemoteMetaData.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(ERC20TokenRemoteBin), backend, settings, tokenName, tokenSymbol, tokenDecimals) + if err != nil { + return common.Address{}, nil, nil, err + } + return address, tx, &ERC20TokenRemote{ERC20TokenRemoteCaller: ERC20TokenRemoteCaller{contract: contract}, ERC20TokenRemoteTransactor: ERC20TokenRemoteTransactor{contract: contract}, ERC20TokenRemoteFilterer: ERC20TokenRemoteFilterer{contract: contract}}, nil +} + +// ERC20TokenRemote is an auto generated Go binding around an Ethereum contract. +type ERC20TokenRemote struct { + ERC20TokenRemoteCaller // Read-only binding to the contract + ERC20TokenRemoteTransactor // Write-only binding to the contract + ERC20TokenRemoteFilterer // Log filterer for contract events +} + +// ERC20TokenRemoteCaller is an auto generated read-only Go binding around an Ethereum contract. +type ERC20TokenRemoteCaller struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// ERC20TokenRemoteTransactor is an auto generated write-only Go binding around an Ethereum contract. +type ERC20TokenRemoteTransactor struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// ERC20TokenRemoteFilterer is an auto generated log filtering Go binding around an Ethereum contract events. +type ERC20TokenRemoteFilterer struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// ERC20TokenRemoteSession is an auto generated Go binding around an Ethereum contract, +// with pre-set call and transact options. +type ERC20TokenRemoteSession struct { + Contract *ERC20TokenRemote // 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 +} + +// ERC20TokenRemoteCallerSession is an auto generated read-only Go binding around an Ethereum contract, +// with pre-set call options. +type ERC20TokenRemoteCallerSession struct { + Contract *ERC20TokenRemoteCaller // Generic contract caller binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session +} + +// ERC20TokenRemoteTransactorSession is an auto generated write-only Go binding around an Ethereum contract, +// with pre-set transact options. +type ERC20TokenRemoteTransactorSession struct { + Contract *ERC20TokenRemoteTransactor // Generic contract transactor binding to set the session for + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// ERC20TokenRemoteRaw is an auto generated low-level Go binding around an Ethereum contract. +type ERC20TokenRemoteRaw struct { + Contract *ERC20TokenRemote // Generic contract binding to access the raw methods on +} + +// ERC20TokenRemoteCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. +type ERC20TokenRemoteCallerRaw struct { + Contract *ERC20TokenRemoteCaller // Generic read-only contract binding to access the raw methods on +} + +// ERC20TokenRemoteTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. +type ERC20TokenRemoteTransactorRaw struct { + Contract *ERC20TokenRemoteTransactor // Generic write-only contract binding to access the raw methods on +} + +// NewERC20TokenRemote creates a new instance of ERC20TokenRemote, bound to a specific deployed contract. +func NewERC20TokenRemote(address common.Address, backend bind.ContractBackend) (*ERC20TokenRemote, error) { + contract, err := bindERC20TokenRemote(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &ERC20TokenRemote{ERC20TokenRemoteCaller: ERC20TokenRemoteCaller{contract: contract}, ERC20TokenRemoteTransactor: ERC20TokenRemoteTransactor{contract: contract}, ERC20TokenRemoteFilterer: ERC20TokenRemoteFilterer{contract: contract}}, nil +} + +// NewERC20TokenRemoteCaller creates a new read-only instance of ERC20TokenRemote, bound to a specific deployed contract. +func NewERC20TokenRemoteCaller(address common.Address, caller bind.ContractCaller) (*ERC20TokenRemoteCaller, error) { + contract, err := bindERC20TokenRemote(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &ERC20TokenRemoteCaller{contract: contract}, nil +} + +// NewERC20TokenRemoteTransactor creates a new write-only instance of ERC20TokenRemote, bound to a specific deployed contract. +func NewERC20TokenRemoteTransactor(address common.Address, transactor bind.ContractTransactor) (*ERC20TokenRemoteTransactor, error) { + contract, err := bindERC20TokenRemote(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &ERC20TokenRemoteTransactor{contract: contract}, nil +} + +// NewERC20TokenRemoteFilterer creates a new log filterer instance of ERC20TokenRemote, bound to a specific deployed contract. +func NewERC20TokenRemoteFilterer(address common.Address, filterer bind.ContractFilterer) (*ERC20TokenRemoteFilterer, error) { + contract, err := bindERC20TokenRemote(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &ERC20TokenRemoteFilterer{contract: contract}, nil +} + +// bindERC20TokenRemote binds a generic wrapper to an already deployed contract. +func bindERC20TokenRemote(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := ERC20TokenRemoteMetaData.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 (_ERC20TokenRemote *ERC20TokenRemoteRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _ERC20TokenRemote.Contract.ERC20TokenRemoteCaller.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 (_ERC20TokenRemote *ERC20TokenRemoteRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _ERC20TokenRemote.Contract.ERC20TokenRemoteTransactor.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_ERC20TokenRemote *ERC20TokenRemoteRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _ERC20TokenRemote.Contract.ERC20TokenRemoteTransactor.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 (_ERC20TokenRemote *ERC20TokenRemoteCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _ERC20TokenRemote.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 (_ERC20TokenRemote *ERC20TokenRemoteTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _ERC20TokenRemote.Contract.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_ERC20TokenRemote *ERC20TokenRemoteTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _ERC20TokenRemote.Contract.contract.Transact(opts, method, params...) +} + +// ERC20TOKENREMOTESTORAGELOCATION is a free data retrieval call binding the contract method 0x62431a65. +// +// Solidity: function ERC20_TOKEN_REMOTE_STORAGE_LOCATION() view returns(bytes32) +func (_ERC20TokenRemote *ERC20TokenRemoteCaller) ERC20TOKENREMOTESTORAGELOCATION(opts *bind.CallOpts) ([32]byte, error) { + var out []interface{} + err := _ERC20TokenRemote.contract.Call(opts, &out, "ERC20_TOKEN_REMOTE_STORAGE_LOCATION") + + if err != nil { + return *new([32]byte), err + } + + out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) + + return out0, err + +} + +// ERC20TOKENREMOTESTORAGELOCATION is a free data retrieval call binding the contract method 0x62431a65. +// +// Solidity: function ERC20_TOKEN_REMOTE_STORAGE_LOCATION() view returns(bytes32) +func (_ERC20TokenRemote *ERC20TokenRemoteSession) ERC20TOKENREMOTESTORAGELOCATION() ([32]byte, error) { + return _ERC20TokenRemote.Contract.ERC20TOKENREMOTESTORAGELOCATION(&_ERC20TokenRemote.CallOpts) +} + +// ERC20TOKENREMOTESTORAGELOCATION is a free data retrieval call binding the contract method 0x62431a65. +// +// Solidity: function ERC20_TOKEN_REMOTE_STORAGE_LOCATION() view returns(bytes32) +func (_ERC20TokenRemote *ERC20TokenRemoteCallerSession) ERC20TOKENREMOTESTORAGELOCATION() ([32]byte, error) { + return _ERC20TokenRemote.Contract.ERC20TOKENREMOTESTORAGELOCATION(&_ERC20TokenRemote.CallOpts) +} + +// MULTIHOPCALLGASPERWORD is a free data retrieval call binding the contract method 0x15beb59f. +// +// Solidity: function MULTI_HOP_CALL_GAS_PER_WORD() view returns(uint256) +func (_ERC20TokenRemote *ERC20TokenRemoteCaller) MULTIHOPCALLGASPERWORD(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _ERC20TokenRemote.contract.Call(opts, &out, "MULTI_HOP_CALL_GAS_PER_WORD") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// MULTIHOPCALLGASPERWORD is a free data retrieval call binding the contract method 0x15beb59f. +// +// Solidity: function MULTI_HOP_CALL_GAS_PER_WORD() view returns(uint256) +func (_ERC20TokenRemote *ERC20TokenRemoteSession) MULTIHOPCALLGASPERWORD() (*big.Int, error) { + return _ERC20TokenRemote.Contract.MULTIHOPCALLGASPERWORD(&_ERC20TokenRemote.CallOpts) +} + +// MULTIHOPCALLGASPERWORD is a free data retrieval call binding the contract method 0x15beb59f. +// +// Solidity: function MULTI_HOP_CALL_GAS_PER_WORD() view returns(uint256) +func (_ERC20TokenRemote *ERC20TokenRemoteCallerSession) MULTIHOPCALLGASPERWORD() (*big.Int, error) { + return _ERC20TokenRemote.Contract.MULTIHOPCALLGASPERWORD(&_ERC20TokenRemote.CallOpts) +} + +// MULTIHOPCALLREQUIREDGAS is a free data retrieval call binding the contract method 0x71717c18. +// +// Solidity: function MULTI_HOP_CALL_REQUIRED_GAS() view returns(uint256) +func (_ERC20TokenRemote *ERC20TokenRemoteCaller) MULTIHOPCALLREQUIREDGAS(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _ERC20TokenRemote.contract.Call(opts, &out, "MULTI_HOP_CALL_REQUIRED_GAS") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// MULTIHOPCALLREQUIREDGAS is a free data retrieval call binding the contract method 0x71717c18. +// +// Solidity: function MULTI_HOP_CALL_REQUIRED_GAS() view returns(uint256) +func (_ERC20TokenRemote *ERC20TokenRemoteSession) MULTIHOPCALLREQUIREDGAS() (*big.Int, error) { + return _ERC20TokenRemote.Contract.MULTIHOPCALLREQUIREDGAS(&_ERC20TokenRemote.CallOpts) +} + +// MULTIHOPCALLREQUIREDGAS is a free data retrieval call binding the contract method 0x71717c18. +// +// Solidity: function MULTI_HOP_CALL_REQUIRED_GAS() view returns(uint256) +func (_ERC20TokenRemote *ERC20TokenRemoteCallerSession) MULTIHOPCALLREQUIREDGAS() (*big.Int, error) { + return _ERC20TokenRemote.Contract.MULTIHOPCALLREQUIREDGAS(&_ERC20TokenRemote.CallOpts) +} + +// MULTIHOPSENDREQUIREDGAS is a free data retrieval call binding the contract method 0x5507f3d1. +// +// Solidity: function MULTI_HOP_SEND_REQUIRED_GAS() view returns(uint256) +func (_ERC20TokenRemote *ERC20TokenRemoteCaller) MULTIHOPSENDREQUIREDGAS(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _ERC20TokenRemote.contract.Call(opts, &out, "MULTI_HOP_SEND_REQUIRED_GAS") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// MULTIHOPSENDREQUIREDGAS is a free data retrieval call binding the contract method 0x5507f3d1. +// +// Solidity: function MULTI_HOP_SEND_REQUIRED_GAS() view returns(uint256) +func (_ERC20TokenRemote *ERC20TokenRemoteSession) MULTIHOPSENDREQUIREDGAS() (*big.Int, error) { + return _ERC20TokenRemote.Contract.MULTIHOPSENDREQUIREDGAS(&_ERC20TokenRemote.CallOpts) +} + +// MULTIHOPSENDREQUIREDGAS is a free data retrieval call binding the contract method 0x5507f3d1. +// +// Solidity: function MULTI_HOP_SEND_REQUIRED_GAS() view returns(uint256) +func (_ERC20TokenRemote *ERC20TokenRemoteCallerSession) MULTIHOPSENDREQUIREDGAS() (*big.Int, error) { + return _ERC20TokenRemote.Contract.MULTIHOPSENDREQUIREDGAS(&_ERC20TokenRemote.CallOpts) +} + +// REGISTERREMOTEREQUIREDGAS is a free data retrieval call binding the contract method 0x254ac160. +// +// Solidity: function REGISTER_REMOTE_REQUIRED_GAS() view returns(uint256) +func (_ERC20TokenRemote *ERC20TokenRemoteCaller) REGISTERREMOTEREQUIREDGAS(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _ERC20TokenRemote.contract.Call(opts, &out, "REGISTER_REMOTE_REQUIRED_GAS") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// REGISTERREMOTEREQUIREDGAS is a free data retrieval call binding the contract method 0x254ac160. +// +// Solidity: function REGISTER_REMOTE_REQUIRED_GAS() view returns(uint256) +func (_ERC20TokenRemote *ERC20TokenRemoteSession) REGISTERREMOTEREQUIREDGAS() (*big.Int, error) { + return _ERC20TokenRemote.Contract.REGISTERREMOTEREQUIREDGAS(&_ERC20TokenRemote.CallOpts) +} + +// REGISTERREMOTEREQUIREDGAS is a free data retrieval call binding the contract method 0x254ac160. +// +// Solidity: function REGISTER_REMOTE_REQUIRED_GAS() view returns(uint256) +func (_ERC20TokenRemote *ERC20TokenRemoteCallerSession) REGISTERREMOTEREQUIREDGAS() (*big.Int, error) { + return _ERC20TokenRemote.Contract.REGISTERREMOTEREQUIREDGAS(&_ERC20TokenRemote.CallOpts) +} + +// TELEPORTERREGISTRYAPPSTORAGELOCATION is a free data retrieval call binding the contract method 0x909a6ac0. +// +// Solidity: function TELEPORTER_REGISTRY_APP_STORAGE_LOCATION() view returns(bytes32) +func (_ERC20TokenRemote *ERC20TokenRemoteCaller) TELEPORTERREGISTRYAPPSTORAGELOCATION(opts *bind.CallOpts) ([32]byte, error) { + var out []interface{} + err := _ERC20TokenRemote.contract.Call(opts, &out, "TELEPORTER_REGISTRY_APP_STORAGE_LOCATION") + + if err != nil { + return *new([32]byte), err + } + + out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) + + return out0, err + +} + +// TELEPORTERREGISTRYAPPSTORAGELOCATION is a free data retrieval call binding the contract method 0x909a6ac0. +// +// Solidity: function TELEPORTER_REGISTRY_APP_STORAGE_LOCATION() view returns(bytes32) +func (_ERC20TokenRemote *ERC20TokenRemoteSession) TELEPORTERREGISTRYAPPSTORAGELOCATION() ([32]byte, error) { + return _ERC20TokenRemote.Contract.TELEPORTERREGISTRYAPPSTORAGELOCATION(&_ERC20TokenRemote.CallOpts) +} + +// TELEPORTERREGISTRYAPPSTORAGELOCATION is a free data retrieval call binding the contract method 0x909a6ac0. +// +// Solidity: function TELEPORTER_REGISTRY_APP_STORAGE_LOCATION() view returns(bytes32) +func (_ERC20TokenRemote *ERC20TokenRemoteCallerSession) TELEPORTERREGISTRYAPPSTORAGELOCATION() ([32]byte, error) { + return _ERC20TokenRemote.Contract.TELEPORTERREGISTRYAPPSTORAGELOCATION(&_ERC20TokenRemote.CallOpts) +} + +// TOKENREMOTESTORAGELOCATION is a free data retrieval call binding the contract method 0x35cac159. +// +// Solidity: function TOKEN_REMOTE_STORAGE_LOCATION() view returns(bytes32) +func (_ERC20TokenRemote *ERC20TokenRemoteCaller) TOKENREMOTESTORAGELOCATION(opts *bind.CallOpts) ([32]byte, error) { + var out []interface{} + err := _ERC20TokenRemote.contract.Call(opts, &out, "TOKEN_REMOTE_STORAGE_LOCATION") + + if err != nil { + return *new([32]byte), err + } + + out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) + + return out0, err + +} + +// TOKENREMOTESTORAGELOCATION is a free data retrieval call binding the contract method 0x35cac159. +// +// Solidity: function TOKEN_REMOTE_STORAGE_LOCATION() view returns(bytes32) +func (_ERC20TokenRemote *ERC20TokenRemoteSession) TOKENREMOTESTORAGELOCATION() ([32]byte, error) { + return _ERC20TokenRemote.Contract.TOKENREMOTESTORAGELOCATION(&_ERC20TokenRemote.CallOpts) +} + +// TOKENREMOTESTORAGELOCATION is a free data retrieval call binding the contract method 0x35cac159. +// +// Solidity: function TOKEN_REMOTE_STORAGE_LOCATION() view returns(bytes32) +func (_ERC20TokenRemote *ERC20TokenRemoteCallerSession) TOKENREMOTESTORAGELOCATION() ([32]byte, error) { + return _ERC20TokenRemote.Contract.TOKENREMOTESTORAGELOCATION(&_ERC20TokenRemote.CallOpts) +} + +// Allowance is a free data retrieval call binding the contract method 0xdd62ed3e. +// +// Solidity: function allowance(address owner, address spender) view returns(uint256) +func (_ERC20TokenRemote *ERC20TokenRemoteCaller) Allowance(opts *bind.CallOpts, owner common.Address, spender common.Address) (*big.Int, error) { + var out []interface{} + err := _ERC20TokenRemote.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 (_ERC20TokenRemote *ERC20TokenRemoteSession) Allowance(owner common.Address, spender common.Address) (*big.Int, error) { + return _ERC20TokenRemote.Contract.Allowance(&_ERC20TokenRemote.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 (_ERC20TokenRemote *ERC20TokenRemoteCallerSession) Allowance(owner common.Address, spender common.Address) (*big.Int, error) { + return _ERC20TokenRemote.Contract.Allowance(&_ERC20TokenRemote.CallOpts, owner, spender) +} + +// BalanceOf is a free data retrieval call binding the contract method 0x70a08231. +// +// Solidity: function balanceOf(address account) view returns(uint256) +func (_ERC20TokenRemote *ERC20TokenRemoteCaller) BalanceOf(opts *bind.CallOpts, account common.Address) (*big.Int, error) { + var out []interface{} + err := _ERC20TokenRemote.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 (_ERC20TokenRemote *ERC20TokenRemoteSession) BalanceOf(account common.Address) (*big.Int, error) { + return _ERC20TokenRemote.Contract.BalanceOf(&_ERC20TokenRemote.CallOpts, account) +} + +// BalanceOf is a free data retrieval call binding the contract method 0x70a08231. +// +// Solidity: function balanceOf(address account) view returns(uint256) +func (_ERC20TokenRemote *ERC20TokenRemoteCallerSession) BalanceOf(account common.Address) (*big.Int, error) { + return _ERC20TokenRemote.Contract.BalanceOf(&_ERC20TokenRemote.CallOpts, account) +} + +// CalculateNumWords is a free data retrieval call binding the contract method 0xf3f981d8. +// +// Solidity: function calculateNumWords(uint256 payloadSize) pure returns(uint256) +func (_ERC20TokenRemote *ERC20TokenRemoteCaller) CalculateNumWords(opts *bind.CallOpts, payloadSize *big.Int) (*big.Int, error) { + var out []interface{} + err := _ERC20TokenRemote.contract.Call(opts, &out, "calculateNumWords", payloadSize) + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// CalculateNumWords is a free data retrieval call binding the contract method 0xf3f981d8. +// +// Solidity: function calculateNumWords(uint256 payloadSize) pure returns(uint256) +func (_ERC20TokenRemote *ERC20TokenRemoteSession) CalculateNumWords(payloadSize *big.Int) (*big.Int, error) { + return _ERC20TokenRemote.Contract.CalculateNumWords(&_ERC20TokenRemote.CallOpts, payloadSize) +} + +// CalculateNumWords is a free data retrieval call binding the contract method 0xf3f981d8. +// +// Solidity: function calculateNumWords(uint256 payloadSize) pure returns(uint256) +func (_ERC20TokenRemote *ERC20TokenRemoteCallerSession) CalculateNumWords(payloadSize *big.Int) (*big.Int, error) { + return _ERC20TokenRemote.Contract.CalculateNumWords(&_ERC20TokenRemote.CallOpts, payloadSize) +} + +// Decimals is a free data retrieval call binding the contract method 0x313ce567. +// +// Solidity: function decimals() view returns(uint8) +func (_ERC20TokenRemote *ERC20TokenRemoteCaller) Decimals(opts *bind.CallOpts) (uint8, error) { + var out []interface{} + err := _ERC20TokenRemote.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 (_ERC20TokenRemote *ERC20TokenRemoteSession) Decimals() (uint8, error) { + return _ERC20TokenRemote.Contract.Decimals(&_ERC20TokenRemote.CallOpts) +} + +// Decimals is a free data retrieval call binding the contract method 0x313ce567. +// +// Solidity: function decimals() view returns(uint8) +func (_ERC20TokenRemote *ERC20TokenRemoteCallerSession) Decimals() (uint8, error) { + return _ERC20TokenRemote.Contract.Decimals(&_ERC20TokenRemote.CallOpts) +} + +// GetBlockchainID is a free data retrieval call binding the contract method 0x4213cf78. +// +// Solidity: function getBlockchainID() view returns(bytes32) +func (_ERC20TokenRemote *ERC20TokenRemoteCaller) GetBlockchainID(opts *bind.CallOpts) ([32]byte, error) { + var out []interface{} + err := _ERC20TokenRemote.contract.Call(opts, &out, "getBlockchainID") + + if err != nil { + return *new([32]byte), err + } + + out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) + + return out0, err + +} + +// GetBlockchainID is a free data retrieval call binding the contract method 0x4213cf78. +// +// Solidity: function getBlockchainID() view returns(bytes32) +func (_ERC20TokenRemote *ERC20TokenRemoteSession) GetBlockchainID() ([32]byte, error) { + return _ERC20TokenRemote.Contract.GetBlockchainID(&_ERC20TokenRemote.CallOpts) +} + +// GetBlockchainID is a free data retrieval call binding the contract method 0x4213cf78. +// +// Solidity: function getBlockchainID() view returns(bytes32) +func (_ERC20TokenRemote *ERC20TokenRemoteCallerSession) GetBlockchainID() ([32]byte, error) { + return _ERC20TokenRemote.Contract.GetBlockchainID(&_ERC20TokenRemote.CallOpts) +} + +// GetInitialReserveImbalance is a free data retrieval call binding the contract method 0xef793e2a. +// +// Solidity: function getInitialReserveImbalance() view returns(uint256) +func (_ERC20TokenRemote *ERC20TokenRemoteCaller) GetInitialReserveImbalance(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _ERC20TokenRemote.contract.Call(opts, &out, "getInitialReserveImbalance") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// GetInitialReserveImbalance is a free data retrieval call binding the contract method 0xef793e2a. +// +// Solidity: function getInitialReserveImbalance() view returns(uint256) +func (_ERC20TokenRemote *ERC20TokenRemoteSession) GetInitialReserveImbalance() (*big.Int, error) { + return _ERC20TokenRemote.Contract.GetInitialReserveImbalance(&_ERC20TokenRemote.CallOpts) +} + +// GetInitialReserveImbalance is a free data retrieval call binding the contract method 0xef793e2a. +// +// Solidity: function getInitialReserveImbalance() view returns(uint256) +func (_ERC20TokenRemote *ERC20TokenRemoteCallerSession) GetInitialReserveImbalance() (*big.Int, error) { + return _ERC20TokenRemote.Contract.GetInitialReserveImbalance(&_ERC20TokenRemote.CallOpts) +} + +// GetIsCollateralized is a free data retrieval call binding the contract method 0x02a30c7d. +// +// Solidity: function getIsCollateralized() view returns(bool) +func (_ERC20TokenRemote *ERC20TokenRemoteCaller) GetIsCollateralized(opts *bind.CallOpts) (bool, error) { + var out []interface{} + err := _ERC20TokenRemote.contract.Call(opts, &out, "getIsCollateralized") + + if err != nil { + return *new(bool), err + } + + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + + return out0, err + +} + +// GetIsCollateralized is a free data retrieval call binding the contract method 0x02a30c7d. +// +// Solidity: function getIsCollateralized() view returns(bool) +func (_ERC20TokenRemote *ERC20TokenRemoteSession) GetIsCollateralized() (bool, error) { + return _ERC20TokenRemote.Contract.GetIsCollateralized(&_ERC20TokenRemote.CallOpts) +} + +// GetIsCollateralized is a free data retrieval call binding the contract method 0x02a30c7d. +// +// Solidity: function getIsCollateralized() view returns(bool) +func (_ERC20TokenRemote *ERC20TokenRemoteCallerSession) GetIsCollateralized() (bool, error) { + return _ERC20TokenRemote.Contract.GetIsCollateralized(&_ERC20TokenRemote.CallOpts) +} + +// GetMinTeleporterVersion is a free data retrieval call binding the contract method 0xd2cc7a70. +// +// Solidity: function getMinTeleporterVersion() view returns(uint256) +func (_ERC20TokenRemote *ERC20TokenRemoteCaller) GetMinTeleporterVersion(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _ERC20TokenRemote.contract.Call(opts, &out, "getMinTeleporterVersion") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// GetMinTeleporterVersion is a free data retrieval call binding the contract method 0xd2cc7a70. +// +// Solidity: function getMinTeleporterVersion() view returns(uint256) +func (_ERC20TokenRemote *ERC20TokenRemoteSession) GetMinTeleporterVersion() (*big.Int, error) { + return _ERC20TokenRemote.Contract.GetMinTeleporterVersion(&_ERC20TokenRemote.CallOpts) +} + +// GetMinTeleporterVersion is a free data retrieval call binding the contract method 0xd2cc7a70. +// +// Solidity: function getMinTeleporterVersion() view returns(uint256) +func (_ERC20TokenRemote *ERC20TokenRemoteCallerSession) GetMinTeleporterVersion() (*big.Int, error) { + return _ERC20TokenRemote.Contract.GetMinTeleporterVersion(&_ERC20TokenRemote.CallOpts) +} + +// GetMultiplyOnRemote is a free data retrieval call binding the contract method 0x7ee3779a. +// +// Solidity: function getMultiplyOnRemote() view returns(bool) +func (_ERC20TokenRemote *ERC20TokenRemoteCaller) GetMultiplyOnRemote(opts *bind.CallOpts) (bool, error) { + var out []interface{} + err := _ERC20TokenRemote.contract.Call(opts, &out, "getMultiplyOnRemote") + + if err != nil { + return *new(bool), err + } + + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + + return out0, err + +} + +// GetMultiplyOnRemote is a free data retrieval call binding the contract method 0x7ee3779a. +// +// Solidity: function getMultiplyOnRemote() view returns(bool) +func (_ERC20TokenRemote *ERC20TokenRemoteSession) GetMultiplyOnRemote() (bool, error) { + return _ERC20TokenRemote.Contract.GetMultiplyOnRemote(&_ERC20TokenRemote.CallOpts) +} + +// GetMultiplyOnRemote is a free data retrieval call binding the contract method 0x7ee3779a. +// +// Solidity: function getMultiplyOnRemote() view returns(bool) +func (_ERC20TokenRemote *ERC20TokenRemoteCallerSession) GetMultiplyOnRemote() (bool, error) { + return _ERC20TokenRemote.Contract.GetMultiplyOnRemote(&_ERC20TokenRemote.CallOpts) +} + +// GetTokenHomeAddress is a free data retrieval call binding the contract method 0xc3cd6927. +// +// Solidity: function getTokenHomeAddress() view returns(address) +func (_ERC20TokenRemote *ERC20TokenRemoteCaller) GetTokenHomeAddress(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _ERC20TokenRemote.contract.Call(opts, &out, "getTokenHomeAddress") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// GetTokenHomeAddress is a free data retrieval call binding the contract method 0xc3cd6927. +// +// Solidity: function getTokenHomeAddress() view returns(address) +func (_ERC20TokenRemote *ERC20TokenRemoteSession) GetTokenHomeAddress() (common.Address, error) { + return _ERC20TokenRemote.Contract.GetTokenHomeAddress(&_ERC20TokenRemote.CallOpts) +} + +// GetTokenHomeAddress is a free data retrieval call binding the contract method 0xc3cd6927. +// +// Solidity: function getTokenHomeAddress() view returns(address) +func (_ERC20TokenRemote *ERC20TokenRemoteCallerSession) GetTokenHomeAddress() (common.Address, error) { + return _ERC20TokenRemote.Contract.GetTokenHomeAddress(&_ERC20TokenRemote.CallOpts) +} + +// GetTokenHomeBlockchainID is a free data retrieval call binding the contract method 0xe0fd9cb8. +// +// Solidity: function getTokenHomeBlockchainID() view returns(bytes32) +func (_ERC20TokenRemote *ERC20TokenRemoteCaller) GetTokenHomeBlockchainID(opts *bind.CallOpts) ([32]byte, error) { + var out []interface{} + err := _ERC20TokenRemote.contract.Call(opts, &out, "getTokenHomeBlockchainID") + + if err != nil { + return *new([32]byte), err + } + + out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) + + return out0, err + +} + +// GetTokenHomeBlockchainID is a free data retrieval call binding the contract method 0xe0fd9cb8. +// +// Solidity: function getTokenHomeBlockchainID() view returns(bytes32) +func (_ERC20TokenRemote *ERC20TokenRemoteSession) GetTokenHomeBlockchainID() ([32]byte, error) { + return _ERC20TokenRemote.Contract.GetTokenHomeBlockchainID(&_ERC20TokenRemote.CallOpts) +} + +// GetTokenHomeBlockchainID is a free data retrieval call binding the contract method 0xe0fd9cb8. +// +// Solidity: function getTokenHomeBlockchainID() view returns(bytes32) +func (_ERC20TokenRemote *ERC20TokenRemoteCallerSession) GetTokenHomeBlockchainID() ([32]byte, error) { + return _ERC20TokenRemote.Contract.GetTokenHomeBlockchainID(&_ERC20TokenRemote.CallOpts) +} + +// GetTokenMultiplier is a free data retrieval call binding the contract method 0x0733c8c8. +// +// Solidity: function getTokenMultiplier() view returns(uint256) +func (_ERC20TokenRemote *ERC20TokenRemoteCaller) GetTokenMultiplier(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _ERC20TokenRemote.contract.Call(opts, &out, "getTokenMultiplier") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// GetTokenMultiplier is a free data retrieval call binding the contract method 0x0733c8c8. +// +// Solidity: function getTokenMultiplier() view returns(uint256) +func (_ERC20TokenRemote *ERC20TokenRemoteSession) GetTokenMultiplier() (*big.Int, error) { + return _ERC20TokenRemote.Contract.GetTokenMultiplier(&_ERC20TokenRemote.CallOpts) +} + +// GetTokenMultiplier is a free data retrieval call binding the contract method 0x0733c8c8. +// +// Solidity: function getTokenMultiplier() view returns(uint256) +func (_ERC20TokenRemote *ERC20TokenRemoteCallerSession) GetTokenMultiplier() (*big.Int, error) { + return _ERC20TokenRemote.Contract.GetTokenMultiplier(&_ERC20TokenRemote.CallOpts) +} + +// IsTeleporterAddressPaused is a free data retrieval call binding the contract method 0x97314297. +// +// Solidity: function isTeleporterAddressPaused(address teleporterAddress) view returns(bool) +func (_ERC20TokenRemote *ERC20TokenRemoteCaller) IsTeleporterAddressPaused(opts *bind.CallOpts, teleporterAddress common.Address) (bool, error) { + var out []interface{} + err := _ERC20TokenRemote.contract.Call(opts, &out, "isTeleporterAddressPaused", teleporterAddress) + + if err != nil { + return *new(bool), err + } + + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + + return out0, err + +} + +// IsTeleporterAddressPaused is a free data retrieval call binding the contract method 0x97314297. +// +// Solidity: function isTeleporterAddressPaused(address teleporterAddress) view returns(bool) +func (_ERC20TokenRemote *ERC20TokenRemoteSession) IsTeleporterAddressPaused(teleporterAddress common.Address) (bool, error) { + return _ERC20TokenRemote.Contract.IsTeleporterAddressPaused(&_ERC20TokenRemote.CallOpts, teleporterAddress) +} + +// IsTeleporterAddressPaused is a free data retrieval call binding the contract method 0x97314297. +// +// Solidity: function isTeleporterAddressPaused(address teleporterAddress) view returns(bool) +func (_ERC20TokenRemote *ERC20TokenRemoteCallerSession) IsTeleporterAddressPaused(teleporterAddress common.Address) (bool, error) { + return _ERC20TokenRemote.Contract.IsTeleporterAddressPaused(&_ERC20TokenRemote.CallOpts, teleporterAddress) +} + +// Name is a free data retrieval call binding the contract method 0x06fdde03. +// +// Solidity: function name() view returns(string) +func (_ERC20TokenRemote *ERC20TokenRemoteCaller) Name(opts *bind.CallOpts) (string, error) { + var out []interface{} + err := _ERC20TokenRemote.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 (_ERC20TokenRemote *ERC20TokenRemoteSession) Name() (string, error) { + return _ERC20TokenRemote.Contract.Name(&_ERC20TokenRemote.CallOpts) +} + +// Name is a free data retrieval call binding the contract method 0x06fdde03. +// +// Solidity: function name() view returns(string) +func (_ERC20TokenRemote *ERC20TokenRemoteCallerSession) Name() (string, error) { + return _ERC20TokenRemote.Contract.Name(&_ERC20TokenRemote.CallOpts) +} + +// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. +// +// Solidity: function owner() view returns(address) +func (_ERC20TokenRemote *ERC20TokenRemoteCaller) Owner(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _ERC20TokenRemote.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 (_ERC20TokenRemote *ERC20TokenRemoteSession) Owner() (common.Address, error) { + return _ERC20TokenRemote.Contract.Owner(&_ERC20TokenRemote.CallOpts) +} + +// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. +// +// Solidity: function owner() view returns(address) +func (_ERC20TokenRemote *ERC20TokenRemoteCallerSession) Owner() (common.Address, error) { + return _ERC20TokenRemote.Contract.Owner(&_ERC20TokenRemote.CallOpts) +} + +// Symbol is a free data retrieval call binding the contract method 0x95d89b41. +// +// Solidity: function symbol() view returns(string) +func (_ERC20TokenRemote *ERC20TokenRemoteCaller) Symbol(opts *bind.CallOpts) (string, error) { + var out []interface{} + err := _ERC20TokenRemote.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 (_ERC20TokenRemote *ERC20TokenRemoteSession) Symbol() (string, error) { + return _ERC20TokenRemote.Contract.Symbol(&_ERC20TokenRemote.CallOpts) +} + +// Symbol is a free data retrieval call binding the contract method 0x95d89b41. +// +// Solidity: function symbol() view returns(string) +func (_ERC20TokenRemote *ERC20TokenRemoteCallerSession) Symbol() (string, error) { + return _ERC20TokenRemote.Contract.Symbol(&_ERC20TokenRemote.CallOpts) +} + +// TotalSupply is a free data retrieval call binding the contract method 0x18160ddd. +// +// Solidity: function totalSupply() view returns(uint256) +func (_ERC20TokenRemote *ERC20TokenRemoteCaller) TotalSupply(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _ERC20TokenRemote.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 (_ERC20TokenRemote *ERC20TokenRemoteSession) TotalSupply() (*big.Int, error) { + return _ERC20TokenRemote.Contract.TotalSupply(&_ERC20TokenRemote.CallOpts) +} + +// TotalSupply is a free data retrieval call binding the contract method 0x18160ddd. +// +// Solidity: function totalSupply() view returns(uint256) +func (_ERC20TokenRemote *ERC20TokenRemoteCallerSession) TotalSupply() (*big.Int, error) { + return _ERC20TokenRemote.Contract.TotalSupply(&_ERC20TokenRemote.CallOpts) +} + +// Approve is a paid mutator transaction binding the contract method 0x095ea7b3. +// +// Solidity: function approve(address spender, uint256 value) returns(bool) +func (_ERC20TokenRemote *ERC20TokenRemoteTransactor) Approve(opts *bind.TransactOpts, spender common.Address, value *big.Int) (*types.Transaction, error) { + return _ERC20TokenRemote.contract.Transact(opts, "approve", spender, value) +} + +// Approve is a paid mutator transaction binding the contract method 0x095ea7b3. +// +// Solidity: function approve(address spender, uint256 value) returns(bool) +func (_ERC20TokenRemote *ERC20TokenRemoteSession) Approve(spender common.Address, value *big.Int) (*types.Transaction, error) { + return _ERC20TokenRemote.Contract.Approve(&_ERC20TokenRemote.TransactOpts, spender, value) +} + +// Approve is a paid mutator transaction binding the contract method 0x095ea7b3. +// +// Solidity: function approve(address spender, uint256 value) returns(bool) +func (_ERC20TokenRemote *ERC20TokenRemoteTransactorSession) Approve(spender common.Address, value *big.Int) (*types.Transaction, error) { + return _ERC20TokenRemote.Contract.Approve(&_ERC20TokenRemote.TransactOpts, spender, value) +} + +// Initialize is a paid mutator transaction binding the contract method 0xc9fe4ddf. +// +// Solidity: function initialize((address,address,uint256,bytes32,address,uint8) settings, string tokenName, string tokenSymbol, uint8 tokenDecimals) returns() +func (_ERC20TokenRemote *ERC20TokenRemoteTransactor) Initialize(opts *bind.TransactOpts, settings TokenRemoteSettings, tokenName string, tokenSymbol string, tokenDecimals uint8) (*types.Transaction, error) { + return _ERC20TokenRemote.contract.Transact(opts, "initialize", settings, tokenName, tokenSymbol, tokenDecimals) +} + +// Initialize is a paid mutator transaction binding the contract method 0xc9fe4ddf. +// +// Solidity: function initialize((address,address,uint256,bytes32,address,uint8) settings, string tokenName, string tokenSymbol, uint8 tokenDecimals) returns() +func (_ERC20TokenRemote *ERC20TokenRemoteSession) Initialize(settings TokenRemoteSettings, tokenName string, tokenSymbol string, tokenDecimals uint8) (*types.Transaction, error) { + return _ERC20TokenRemote.Contract.Initialize(&_ERC20TokenRemote.TransactOpts, settings, tokenName, tokenSymbol, tokenDecimals) +} + +// Initialize is a paid mutator transaction binding the contract method 0xc9fe4ddf. +// +// Solidity: function initialize((address,address,uint256,bytes32,address,uint8) settings, string tokenName, string tokenSymbol, uint8 tokenDecimals) returns() +func (_ERC20TokenRemote *ERC20TokenRemoteTransactorSession) Initialize(settings TokenRemoteSettings, tokenName string, tokenSymbol string, tokenDecimals uint8) (*types.Transaction, error) { + return _ERC20TokenRemote.Contract.Initialize(&_ERC20TokenRemote.TransactOpts, settings, tokenName, tokenSymbol, tokenDecimals) +} + +// PauseTeleporterAddress is a paid mutator transaction binding the contract method 0x2b0d8f18. +// +// Solidity: function pauseTeleporterAddress(address teleporterAddress) returns() +func (_ERC20TokenRemote *ERC20TokenRemoteTransactor) PauseTeleporterAddress(opts *bind.TransactOpts, teleporterAddress common.Address) (*types.Transaction, error) { + return _ERC20TokenRemote.contract.Transact(opts, "pauseTeleporterAddress", teleporterAddress) +} + +// PauseTeleporterAddress is a paid mutator transaction binding the contract method 0x2b0d8f18. +// +// Solidity: function pauseTeleporterAddress(address teleporterAddress) returns() +func (_ERC20TokenRemote *ERC20TokenRemoteSession) PauseTeleporterAddress(teleporterAddress common.Address) (*types.Transaction, error) { + return _ERC20TokenRemote.Contract.PauseTeleporterAddress(&_ERC20TokenRemote.TransactOpts, teleporterAddress) +} + +// PauseTeleporterAddress is a paid mutator transaction binding the contract method 0x2b0d8f18. +// +// Solidity: function pauseTeleporterAddress(address teleporterAddress) returns() +func (_ERC20TokenRemote *ERC20TokenRemoteTransactorSession) PauseTeleporterAddress(teleporterAddress common.Address) (*types.Transaction, error) { + return _ERC20TokenRemote.Contract.PauseTeleporterAddress(&_ERC20TokenRemote.TransactOpts, teleporterAddress) +} + +// ReceiveTeleporterMessage is a paid mutator transaction binding the contract method 0xc868efaa. +// +// Solidity: function receiveTeleporterMessage(bytes32 sourceBlockchainID, address originSenderAddress, bytes message) returns() +func (_ERC20TokenRemote *ERC20TokenRemoteTransactor) ReceiveTeleporterMessage(opts *bind.TransactOpts, sourceBlockchainID [32]byte, originSenderAddress common.Address, message []byte) (*types.Transaction, error) { + return _ERC20TokenRemote.contract.Transact(opts, "receiveTeleporterMessage", sourceBlockchainID, originSenderAddress, message) +} + +// ReceiveTeleporterMessage is a paid mutator transaction binding the contract method 0xc868efaa. +// +// Solidity: function receiveTeleporterMessage(bytes32 sourceBlockchainID, address originSenderAddress, bytes message) returns() +func (_ERC20TokenRemote *ERC20TokenRemoteSession) ReceiveTeleporterMessage(sourceBlockchainID [32]byte, originSenderAddress common.Address, message []byte) (*types.Transaction, error) { + return _ERC20TokenRemote.Contract.ReceiveTeleporterMessage(&_ERC20TokenRemote.TransactOpts, sourceBlockchainID, originSenderAddress, message) +} + +// ReceiveTeleporterMessage is a paid mutator transaction binding the contract method 0xc868efaa. +// +// Solidity: function receiveTeleporterMessage(bytes32 sourceBlockchainID, address originSenderAddress, bytes message) returns() +func (_ERC20TokenRemote *ERC20TokenRemoteTransactorSession) ReceiveTeleporterMessage(sourceBlockchainID [32]byte, originSenderAddress common.Address, message []byte) (*types.Transaction, error) { + return _ERC20TokenRemote.Contract.ReceiveTeleporterMessage(&_ERC20TokenRemote.TransactOpts, sourceBlockchainID, originSenderAddress, message) +} + +// RegisterWithHome is a paid mutator transaction binding the contract method 0xb8a46d02. +// +// Solidity: function registerWithHome((address,uint256) feeInfo) returns() +func (_ERC20TokenRemote *ERC20TokenRemoteTransactor) RegisterWithHome(opts *bind.TransactOpts, feeInfo TeleporterFeeInfo) (*types.Transaction, error) { + return _ERC20TokenRemote.contract.Transact(opts, "registerWithHome", feeInfo) +} + +// RegisterWithHome is a paid mutator transaction binding the contract method 0xb8a46d02. +// +// Solidity: function registerWithHome((address,uint256) feeInfo) returns() +func (_ERC20TokenRemote *ERC20TokenRemoteSession) RegisterWithHome(feeInfo TeleporterFeeInfo) (*types.Transaction, error) { + return _ERC20TokenRemote.Contract.RegisterWithHome(&_ERC20TokenRemote.TransactOpts, feeInfo) +} + +// RegisterWithHome is a paid mutator transaction binding the contract method 0xb8a46d02. +// +// Solidity: function registerWithHome((address,uint256) feeInfo) returns() +func (_ERC20TokenRemote *ERC20TokenRemoteTransactorSession) RegisterWithHome(feeInfo TeleporterFeeInfo) (*types.Transaction, error) { + return _ERC20TokenRemote.Contract.RegisterWithHome(&_ERC20TokenRemote.TransactOpts, feeInfo) +} + +// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. +// +// Solidity: function renounceOwnership() returns() +func (_ERC20TokenRemote *ERC20TokenRemoteTransactor) RenounceOwnership(opts *bind.TransactOpts) (*types.Transaction, error) { + return _ERC20TokenRemote.contract.Transact(opts, "renounceOwnership") +} + +// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. +// +// Solidity: function renounceOwnership() returns() +func (_ERC20TokenRemote *ERC20TokenRemoteSession) RenounceOwnership() (*types.Transaction, error) { + return _ERC20TokenRemote.Contract.RenounceOwnership(&_ERC20TokenRemote.TransactOpts) +} + +// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. +// +// Solidity: function renounceOwnership() returns() +func (_ERC20TokenRemote *ERC20TokenRemoteTransactorSession) RenounceOwnership() (*types.Transaction, error) { + return _ERC20TokenRemote.Contract.RenounceOwnership(&_ERC20TokenRemote.TransactOpts) +} + +// Send is a paid mutator transaction binding the contract method 0x5d16225d. +// +// Solidity: function send((bytes32,address,address,address,uint256,uint256,uint256,address) input, uint256 amount) returns() +func (_ERC20TokenRemote *ERC20TokenRemoteTransactor) Send(opts *bind.TransactOpts, input SendTokensInput, amount *big.Int) (*types.Transaction, error) { + return _ERC20TokenRemote.contract.Transact(opts, "send", input, amount) +} + +// Send is a paid mutator transaction binding the contract method 0x5d16225d. +// +// Solidity: function send((bytes32,address,address,address,uint256,uint256,uint256,address) input, uint256 amount) returns() +func (_ERC20TokenRemote *ERC20TokenRemoteSession) Send(input SendTokensInput, amount *big.Int) (*types.Transaction, error) { + return _ERC20TokenRemote.Contract.Send(&_ERC20TokenRemote.TransactOpts, input, amount) +} + +// Send is a paid mutator transaction binding the contract method 0x5d16225d. +// +// Solidity: function send((bytes32,address,address,address,uint256,uint256,uint256,address) input, uint256 amount) returns() +func (_ERC20TokenRemote *ERC20TokenRemoteTransactorSession) Send(input SendTokensInput, amount *big.Int) (*types.Transaction, error) { + return _ERC20TokenRemote.Contract.Send(&_ERC20TokenRemote.TransactOpts, input, amount) +} + +// SendAndCall is a paid mutator transaction binding the contract method 0x65690038. +// +// Solidity: function sendAndCall((bytes32,address,address,bytes,uint256,uint256,address,address,address,uint256,uint256) input, uint256 amount) returns() +func (_ERC20TokenRemote *ERC20TokenRemoteTransactor) SendAndCall(opts *bind.TransactOpts, input SendAndCallInput, amount *big.Int) (*types.Transaction, error) { + return _ERC20TokenRemote.contract.Transact(opts, "sendAndCall", input, amount) +} + +// SendAndCall is a paid mutator transaction binding the contract method 0x65690038. +// +// Solidity: function sendAndCall((bytes32,address,address,bytes,uint256,uint256,address,address,address,uint256,uint256) input, uint256 amount) returns() +func (_ERC20TokenRemote *ERC20TokenRemoteSession) SendAndCall(input SendAndCallInput, amount *big.Int) (*types.Transaction, error) { + return _ERC20TokenRemote.Contract.SendAndCall(&_ERC20TokenRemote.TransactOpts, input, amount) +} + +// SendAndCall is a paid mutator transaction binding the contract method 0x65690038. +// +// Solidity: function sendAndCall((bytes32,address,address,bytes,uint256,uint256,address,address,address,uint256,uint256) input, uint256 amount) returns() +func (_ERC20TokenRemote *ERC20TokenRemoteTransactorSession) SendAndCall(input SendAndCallInput, amount *big.Int) (*types.Transaction, error) { + return _ERC20TokenRemote.Contract.SendAndCall(&_ERC20TokenRemote.TransactOpts, input, amount) +} + +// Transfer is a paid mutator transaction binding the contract method 0xa9059cbb. +// +// Solidity: function transfer(address to, uint256 value) returns(bool) +func (_ERC20TokenRemote *ERC20TokenRemoteTransactor) Transfer(opts *bind.TransactOpts, to common.Address, value *big.Int) (*types.Transaction, error) { + return _ERC20TokenRemote.contract.Transact(opts, "transfer", to, value) +} + +// Transfer is a paid mutator transaction binding the contract method 0xa9059cbb. +// +// Solidity: function transfer(address to, uint256 value) returns(bool) +func (_ERC20TokenRemote *ERC20TokenRemoteSession) Transfer(to common.Address, value *big.Int) (*types.Transaction, error) { + return _ERC20TokenRemote.Contract.Transfer(&_ERC20TokenRemote.TransactOpts, to, value) +} + +// Transfer is a paid mutator transaction binding the contract method 0xa9059cbb. +// +// Solidity: function transfer(address to, uint256 value) returns(bool) +func (_ERC20TokenRemote *ERC20TokenRemoteTransactorSession) Transfer(to common.Address, value *big.Int) (*types.Transaction, error) { + return _ERC20TokenRemote.Contract.Transfer(&_ERC20TokenRemote.TransactOpts, to, value) +} + +// TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd. +// +// Solidity: function transferFrom(address from, address to, uint256 value) returns(bool) +func (_ERC20TokenRemote *ERC20TokenRemoteTransactor) TransferFrom(opts *bind.TransactOpts, from common.Address, to common.Address, value *big.Int) (*types.Transaction, error) { + return _ERC20TokenRemote.contract.Transact(opts, "transferFrom", from, to, value) +} + +// TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd. +// +// Solidity: function transferFrom(address from, address to, uint256 value) returns(bool) +func (_ERC20TokenRemote *ERC20TokenRemoteSession) TransferFrom(from common.Address, to common.Address, value *big.Int) (*types.Transaction, error) { + return _ERC20TokenRemote.Contract.TransferFrom(&_ERC20TokenRemote.TransactOpts, from, to, value) +} + +// TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd. +// +// Solidity: function transferFrom(address from, address to, uint256 value) returns(bool) +func (_ERC20TokenRemote *ERC20TokenRemoteTransactorSession) TransferFrom(from common.Address, to common.Address, value *big.Int) (*types.Transaction, error) { + return _ERC20TokenRemote.Contract.TransferFrom(&_ERC20TokenRemote.TransactOpts, from, to, value) +} + +// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// +// Solidity: function transferOwnership(address newOwner) returns() +func (_ERC20TokenRemote *ERC20TokenRemoteTransactor) TransferOwnership(opts *bind.TransactOpts, newOwner common.Address) (*types.Transaction, error) { + return _ERC20TokenRemote.contract.Transact(opts, "transferOwnership", newOwner) +} + +// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// +// Solidity: function transferOwnership(address newOwner) returns() +func (_ERC20TokenRemote *ERC20TokenRemoteSession) TransferOwnership(newOwner common.Address) (*types.Transaction, error) { + return _ERC20TokenRemote.Contract.TransferOwnership(&_ERC20TokenRemote.TransactOpts, newOwner) +} + +// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// +// Solidity: function transferOwnership(address newOwner) returns() +func (_ERC20TokenRemote *ERC20TokenRemoteTransactorSession) TransferOwnership(newOwner common.Address) (*types.Transaction, error) { + return _ERC20TokenRemote.Contract.TransferOwnership(&_ERC20TokenRemote.TransactOpts, newOwner) +} + +// UnpauseTeleporterAddress is a paid mutator transaction binding the contract method 0x4511243e. +// +// Solidity: function unpauseTeleporterAddress(address teleporterAddress) returns() +func (_ERC20TokenRemote *ERC20TokenRemoteTransactor) UnpauseTeleporterAddress(opts *bind.TransactOpts, teleporterAddress common.Address) (*types.Transaction, error) { + return _ERC20TokenRemote.contract.Transact(opts, "unpauseTeleporterAddress", teleporterAddress) +} + +// UnpauseTeleporterAddress is a paid mutator transaction binding the contract method 0x4511243e. +// +// Solidity: function unpauseTeleporterAddress(address teleporterAddress) returns() +func (_ERC20TokenRemote *ERC20TokenRemoteSession) UnpauseTeleporterAddress(teleporterAddress common.Address) (*types.Transaction, error) { + return _ERC20TokenRemote.Contract.UnpauseTeleporterAddress(&_ERC20TokenRemote.TransactOpts, teleporterAddress) +} + +// UnpauseTeleporterAddress is a paid mutator transaction binding the contract method 0x4511243e. +// +// Solidity: function unpauseTeleporterAddress(address teleporterAddress) returns() +func (_ERC20TokenRemote *ERC20TokenRemoteTransactorSession) UnpauseTeleporterAddress(teleporterAddress common.Address) (*types.Transaction, error) { + return _ERC20TokenRemote.Contract.UnpauseTeleporterAddress(&_ERC20TokenRemote.TransactOpts, teleporterAddress) +} + +// UpdateMinTeleporterVersion is a paid mutator transaction binding the contract method 0x5eb99514. +// +// Solidity: function updateMinTeleporterVersion(uint256 version) returns() +func (_ERC20TokenRemote *ERC20TokenRemoteTransactor) UpdateMinTeleporterVersion(opts *bind.TransactOpts, version *big.Int) (*types.Transaction, error) { + return _ERC20TokenRemote.contract.Transact(opts, "updateMinTeleporterVersion", version) +} + +// UpdateMinTeleporterVersion is a paid mutator transaction binding the contract method 0x5eb99514. +// +// Solidity: function updateMinTeleporterVersion(uint256 version) returns() +func (_ERC20TokenRemote *ERC20TokenRemoteSession) UpdateMinTeleporterVersion(version *big.Int) (*types.Transaction, error) { + return _ERC20TokenRemote.Contract.UpdateMinTeleporterVersion(&_ERC20TokenRemote.TransactOpts, version) +} + +// UpdateMinTeleporterVersion is a paid mutator transaction binding the contract method 0x5eb99514. +// +// Solidity: function updateMinTeleporterVersion(uint256 version) returns() +func (_ERC20TokenRemote *ERC20TokenRemoteTransactorSession) UpdateMinTeleporterVersion(version *big.Int) (*types.Transaction, error) { + return _ERC20TokenRemote.Contract.UpdateMinTeleporterVersion(&_ERC20TokenRemote.TransactOpts, version) +} + +// ERC20TokenRemoteApprovalIterator is returned from FilterApproval and is used to iterate over the raw logs and unpacked data for Approval events raised by the ERC20TokenRemote contract. +type ERC20TokenRemoteApprovalIterator struct { + Event *ERC20TokenRemoteApproval // 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 interfaces.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 *ERC20TokenRemoteApprovalIterator) 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(ERC20TokenRemoteApproval) + 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(ERC20TokenRemoteApproval) + 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 *ERC20TokenRemoteApprovalIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *ERC20TokenRemoteApprovalIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// ERC20TokenRemoteApproval represents a Approval event raised by the ERC20TokenRemote contract. +type ERC20TokenRemoteApproval 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 (_ERC20TokenRemote *ERC20TokenRemoteFilterer) FilterApproval(opts *bind.FilterOpts, owner []common.Address, spender []common.Address) (*ERC20TokenRemoteApprovalIterator, 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 := _ERC20TokenRemote.contract.FilterLogs(opts, "Approval", ownerRule, spenderRule) + if err != nil { + return nil, err + } + return &ERC20TokenRemoteApprovalIterator{contract: _ERC20TokenRemote.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 (_ERC20TokenRemote *ERC20TokenRemoteFilterer) WatchApproval(opts *bind.WatchOpts, sink chan<- *ERC20TokenRemoteApproval, 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 := _ERC20TokenRemote.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(ERC20TokenRemoteApproval) + if err := _ERC20TokenRemote.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 (_ERC20TokenRemote *ERC20TokenRemoteFilterer) ParseApproval(log types.Log) (*ERC20TokenRemoteApproval, error) { + event := new(ERC20TokenRemoteApproval) + if err := _ERC20TokenRemote.contract.UnpackLog(event, "Approval", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// ERC20TokenRemoteCallFailedIterator is returned from FilterCallFailed and is used to iterate over the raw logs and unpacked data for CallFailed events raised by the ERC20TokenRemote contract. +type ERC20TokenRemoteCallFailedIterator struct { + Event *ERC20TokenRemoteCallFailed // 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 interfaces.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 *ERC20TokenRemoteCallFailedIterator) 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(ERC20TokenRemoteCallFailed) + 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(ERC20TokenRemoteCallFailed) + 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 *ERC20TokenRemoteCallFailedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *ERC20TokenRemoteCallFailedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// ERC20TokenRemoteCallFailed represents a CallFailed event raised by the ERC20TokenRemote contract. +type ERC20TokenRemoteCallFailed struct { + RecipientContract common.Address + Amount *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterCallFailed is a free log retrieval operation binding the contract event 0xb9eaeae386d339f8115782f297a9e5f0e13fb587cd6b0d502f113cb8dd4d6cb0. +// +// Solidity: event CallFailed(address indexed recipientContract, uint256 amount) +func (_ERC20TokenRemote *ERC20TokenRemoteFilterer) FilterCallFailed(opts *bind.FilterOpts, recipientContract []common.Address) (*ERC20TokenRemoteCallFailedIterator, error) { + + var recipientContractRule []interface{} + for _, recipientContractItem := range recipientContract { + recipientContractRule = append(recipientContractRule, recipientContractItem) + } + + logs, sub, err := _ERC20TokenRemote.contract.FilterLogs(opts, "CallFailed", recipientContractRule) + if err != nil { + return nil, err + } + return &ERC20TokenRemoteCallFailedIterator{contract: _ERC20TokenRemote.contract, event: "CallFailed", logs: logs, sub: sub}, nil +} + +// WatchCallFailed is a free log subscription operation binding the contract event 0xb9eaeae386d339f8115782f297a9e5f0e13fb587cd6b0d502f113cb8dd4d6cb0. +// +// Solidity: event CallFailed(address indexed recipientContract, uint256 amount) +func (_ERC20TokenRemote *ERC20TokenRemoteFilterer) WatchCallFailed(opts *bind.WatchOpts, sink chan<- *ERC20TokenRemoteCallFailed, recipientContract []common.Address) (event.Subscription, error) { + + var recipientContractRule []interface{} + for _, recipientContractItem := range recipientContract { + recipientContractRule = append(recipientContractRule, recipientContractItem) + } + + logs, sub, err := _ERC20TokenRemote.contract.WatchLogs(opts, "CallFailed", recipientContractRule) + 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(ERC20TokenRemoteCallFailed) + if err := _ERC20TokenRemote.contract.UnpackLog(event, "CallFailed", 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 +} + +// ParseCallFailed is a log parse operation binding the contract event 0xb9eaeae386d339f8115782f297a9e5f0e13fb587cd6b0d502f113cb8dd4d6cb0. +// +// Solidity: event CallFailed(address indexed recipientContract, uint256 amount) +func (_ERC20TokenRemote *ERC20TokenRemoteFilterer) ParseCallFailed(log types.Log) (*ERC20TokenRemoteCallFailed, error) { + event := new(ERC20TokenRemoteCallFailed) + if err := _ERC20TokenRemote.contract.UnpackLog(event, "CallFailed", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// ERC20TokenRemoteCallSucceededIterator is returned from FilterCallSucceeded and is used to iterate over the raw logs and unpacked data for CallSucceeded events raised by the ERC20TokenRemote contract. +type ERC20TokenRemoteCallSucceededIterator struct { + Event *ERC20TokenRemoteCallSucceeded // 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 interfaces.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 *ERC20TokenRemoteCallSucceededIterator) 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(ERC20TokenRemoteCallSucceeded) + 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(ERC20TokenRemoteCallSucceeded) + 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 *ERC20TokenRemoteCallSucceededIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *ERC20TokenRemoteCallSucceededIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// ERC20TokenRemoteCallSucceeded represents a CallSucceeded event raised by the ERC20TokenRemote contract. +type ERC20TokenRemoteCallSucceeded struct { + RecipientContract common.Address + Amount *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterCallSucceeded is a free log retrieval operation binding the contract event 0x104deb555f67e63782bb817bc26c39050894645f9b9f29c4be8ae68d0e8b7ff4. +// +// Solidity: event CallSucceeded(address indexed recipientContract, uint256 amount) +func (_ERC20TokenRemote *ERC20TokenRemoteFilterer) FilterCallSucceeded(opts *bind.FilterOpts, recipientContract []common.Address) (*ERC20TokenRemoteCallSucceededIterator, error) { + + var recipientContractRule []interface{} + for _, recipientContractItem := range recipientContract { + recipientContractRule = append(recipientContractRule, recipientContractItem) + } + + logs, sub, err := _ERC20TokenRemote.contract.FilterLogs(opts, "CallSucceeded", recipientContractRule) + if err != nil { + return nil, err + } + return &ERC20TokenRemoteCallSucceededIterator{contract: _ERC20TokenRemote.contract, event: "CallSucceeded", logs: logs, sub: sub}, nil +} + +// WatchCallSucceeded is a free log subscription operation binding the contract event 0x104deb555f67e63782bb817bc26c39050894645f9b9f29c4be8ae68d0e8b7ff4. +// +// Solidity: event CallSucceeded(address indexed recipientContract, uint256 amount) +func (_ERC20TokenRemote *ERC20TokenRemoteFilterer) WatchCallSucceeded(opts *bind.WatchOpts, sink chan<- *ERC20TokenRemoteCallSucceeded, recipientContract []common.Address) (event.Subscription, error) { + + var recipientContractRule []interface{} + for _, recipientContractItem := range recipientContract { + recipientContractRule = append(recipientContractRule, recipientContractItem) + } + + logs, sub, err := _ERC20TokenRemote.contract.WatchLogs(opts, "CallSucceeded", recipientContractRule) + 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(ERC20TokenRemoteCallSucceeded) + if err := _ERC20TokenRemote.contract.UnpackLog(event, "CallSucceeded", 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 +} + +// ParseCallSucceeded is a log parse operation binding the contract event 0x104deb555f67e63782bb817bc26c39050894645f9b9f29c4be8ae68d0e8b7ff4. +// +// Solidity: event CallSucceeded(address indexed recipientContract, uint256 amount) +func (_ERC20TokenRemote *ERC20TokenRemoteFilterer) ParseCallSucceeded(log types.Log) (*ERC20TokenRemoteCallSucceeded, error) { + event := new(ERC20TokenRemoteCallSucceeded) + if err := _ERC20TokenRemote.contract.UnpackLog(event, "CallSucceeded", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// ERC20TokenRemoteInitializedIterator is returned from FilterInitialized and is used to iterate over the raw logs and unpacked data for Initialized events raised by the ERC20TokenRemote contract. +type ERC20TokenRemoteInitializedIterator struct { + Event *ERC20TokenRemoteInitialized // 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 interfaces.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 *ERC20TokenRemoteInitializedIterator) 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(ERC20TokenRemoteInitialized) + 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(ERC20TokenRemoteInitialized) + 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 *ERC20TokenRemoteInitializedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *ERC20TokenRemoteInitializedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// ERC20TokenRemoteInitialized represents a Initialized event raised by the ERC20TokenRemote contract. +type ERC20TokenRemoteInitialized struct { + Version uint64 + Raw types.Log // Blockchain specific contextual infos +} + +// FilterInitialized is a free log retrieval operation binding the contract event 0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2. +// +// Solidity: event Initialized(uint64 version) +func (_ERC20TokenRemote *ERC20TokenRemoteFilterer) FilterInitialized(opts *bind.FilterOpts) (*ERC20TokenRemoteInitializedIterator, error) { + + logs, sub, err := _ERC20TokenRemote.contract.FilterLogs(opts, "Initialized") + if err != nil { + return nil, err + } + return &ERC20TokenRemoteInitializedIterator{contract: _ERC20TokenRemote.contract, event: "Initialized", logs: logs, sub: sub}, nil +} + +// WatchInitialized is a free log subscription operation binding the contract event 0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2. +// +// Solidity: event Initialized(uint64 version) +func (_ERC20TokenRemote *ERC20TokenRemoteFilterer) WatchInitialized(opts *bind.WatchOpts, sink chan<- *ERC20TokenRemoteInitialized) (event.Subscription, error) { + + logs, sub, err := _ERC20TokenRemote.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(ERC20TokenRemoteInitialized) + if err := _ERC20TokenRemote.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 0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2. +// +// Solidity: event Initialized(uint64 version) +func (_ERC20TokenRemote *ERC20TokenRemoteFilterer) ParseInitialized(log types.Log) (*ERC20TokenRemoteInitialized, error) { + event := new(ERC20TokenRemoteInitialized) + if err := _ERC20TokenRemote.contract.UnpackLog(event, "Initialized", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// ERC20TokenRemoteMinTeleporterVersionUpdatedIterator is returned from FilterMinTeleporterVersionUpdated and is used to iterate over the raw logs and unpacked data for MinTeleporterVersionUpdated events raised by the ERC20TokenRemote contract. +type ERC20TokenRemoteMinTeleporterVersionUpdatedIterator struct { + Event *ERC20TokenRemoteMinTeleporterVersionUpdated // 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 interfaces.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 *ERC20TokenRemoteMinTeleporterVersionUpdatedIterator) 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(ERC20TokenRemoteMinTeleporterVersionUpdated) + 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(ERC20TokenRemoteMinTeleporterVersionUpdated) + 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 *ERC20TokenRemoteMinTeleporterVersionUpdatedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *ERC20TokenRemoteMinTeleporterVersionUpdatedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// ERC20TokenRemoteMinTeleporterVersionUpdated represents a MinTeleporterVersionUpdated event raised by the ERC20TokenRemote contract. +type ERC20TokenRemoteMinTeleporterVersionUpdated struct { + OldMinTeleporterVersion *big.Int + NewMinTeleporterVersion *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterMinTeleporterVersionUpdated is a free log retrieval operation binding the contract event 0xa9a7ef57e41f05b4c15480842f5f0c27edfcbb553fed281f7c4068452cc1c02d. +// +// Solidity: event MinTeleporterVersionUpdated(uint256 indexed oldMinTeleporterVersion, uint256 indexed newMinTeleporterVersion) +func (_ERC20TokenRemote *ERC20TokenRemoteFilterer) FilterMinTeleporterVersionUpdated(opts *bind.FilterOpts, oldMinTeleporterVersion []*big.Int, newMinTeleporterVersion []*big.Int) (*ERC20TokenRemoteMinTeleporterVersionUpdatedIterator, error) { + + var oldMinTeleporterVersionRule []interface{} + for _, oldMinTeleporterVersionItem := range oldMinTeleporterVersion { + oldMinTeleporterVersionRule = append(oldMinTeleporterVersionRule, oldMinTeleporterVersionItem) + } + var newMinTeleporterVersionRule []interface{} + for _, newMinTeleporterVersionItem := range newMinTeleporterVersion { + newMinTeleporterVersionRule = append(newMinTeleporterVersionRule, newMinTeleporterVersionItem) + } + + logs, sub, err := _ERC20TokenRemote.contract.FilterLogs(opts, "MinTeleporterVersionUpdated", oldMinTeleporterVersionRule, newMinTeleporterVersionRule) + if err != nil { + return nil, err + } + return &ERC20TokenRemoteMinTeleporterVersionUpdatedIterator{contract: _ERC20TokenRemote.contract, event: "MinTeleporterVersionUpdated", logs: logs, sub: sub}, nil +} + +// WatchMinTeleporterVersionUpdated is a free log subscription operation binding the contract event 0xa9a7ef57e41f05b4c15480842f5f0c27edfcbb553fed281f7c4068452cc1c02d. +// +// Solidity: event MinTeleporterVersionUpdated(uint256 indexed oldMinTeleporterVersion, uint256 indexed newMinTeleporterVersion) +func (_ERC20TokenRemote *ERC20TokenRemoteFilterer) WatchMinTeleporterVersionUpdated(opts *bind.WatchOpts, sink chan<- *ERC20TokenRemoteMinTeleporterVersionUpdated, oldMinTeleporterVersion []*big.Int, newMinTeleporterVersion []*big.Int) (event.Subscription, error) { + + var oldMinTeleporterVersionRule []interface{} + for _, oldMinTeleporterVersionItem := range oldMinTeleporterVersion { + oldMinTeleporterVersionRule = append(oldMinTeleporterVersionRule, oldMinTeleporterVersionItem) + } + var newMinTeleporterVersionRule []interface{} + for _, newMinTeleporterVersionItem := range newMinTeleporterVersion { + newMinTeleporterVersionRule = append(newMinTeleporterVersionRule, newMinTeleporterVersionItem) + } + + logs, sub, err := _ERC20TokenRemote.contract.WatchLogs(opts, "MinTeleporterVersionUpdated", oldMinTeleporterVersionRule, newMinTeleporterVersionRule) + 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(ERC20TokenRemoteMinTeleporterVersionUpdated) + if err := _ERC20TokenRemote.contract.UnpackLog(event, "MinTeleporterVersionUpdated", 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 +} + +// ParseMinTeleporterVersionUpdated is a log parse operation binding the contract event 0xa9a7ef57e41f05b4c15480842f5f0c27edfcbb553fed281f7c4068452cc1c02d. +// +// Solidity: event MinTeleporterVersionUpdated(uint256 indexed oldMinTeleporterVersion, uint256 indexed newMinTeleporterVersion) +func (_ERC20TokenRemote *ERC20TokenRemoteFilterer) ParseMinTeleporterVersionUpdated(log types.Log) (*ERC20TokenRemoteMinTeleporterVersionUpdated, error) { + event := new(ERC20TokenRemoteMinTeleporterVersionUpdated) + if err := _ERC20TokenRemote.contract.UnpackLog(event, "MinTeleporterVersionUpdated", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// ERC20TokenRemoteOwnershipTransferredIterator is returned from FilterOwnershipTransferred and is used to iterate over the raw logs and unpacked data for OwnershipTransferred events raised by the ERC20TokenRemote contract. +type ERC20TokenRemoteOwnershipTransferredIterator struct { + Event *ERC20TokenRemoteOwnershipTransferred // 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 interfaces.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 *ERC20TokenRemoteOwnershipTransferredIterator) 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(ERC20TokenRemoteOwnershipTransferred) + 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(ERC20TokenRemoteOwnershipTransferred) + 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 *ERC20TokenRemoteOwnershipTransferredIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *ERC20TokenRemoteOwnershipTransferredIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// ERC20TokenRemoteOwnershipTransferred represents a OwnershipTransferred event raised by the ERC20TokenRemote contract. +type ERC20TokenRemoteOwnershipTransferred 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 (_ERC20TokenRemote *ERC20TokenRemoteFilterer) FilterOwnershipTransferred(opts *bind.FilterOpts, previousOwner []common.Address, newOwner []common.Address) (*ERC20TokenRemoteOwnershipTransferredIterator, 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 := _ERC20TokenRemote.contract.FilterLogs(opts, "OwnershipTransferred", previousOwnerRule, newOwnerRule) + if err != nil { + return nil, err + } + return &ERC20TokenRemoteOwnershipTransferredIterator{contract: _ERC20TokenRemote.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 (_ERC20TokenRemote *ERC20TokenRemoteFilterer) WatchOwnershipTransferred(opts *bind.WatchOpts, sink chan<- *ERC20TokenRemoteOwnershipTransferred, 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 := _ERC20TokenRemote.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(ERC20TokenRemoteOwnershipTransferred) + if err := _ERC20TokenRemote.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 (_ERC20TokenRemote *ERC20TokenRemoteFilterer) ParseOwnershipTransferred(log types.Log) (*ERC20TokenRemoteOwnershipTransferred, error) { + event := new(ERC20TokenRemoteOwnershipTransferred) + if err := _ERC20TokenRemote.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// ERC20TokenRemoteTeleporterAddressPausedIterator is returned from FilterTeleporterAddressPaused and is used to iterate over the raw logs and unpacked data for TeleporterAddressPaused events raised by the ERC20TokenRemote contract. +type ERC20TokenRemoteTeleporterAddressPausedIterator struct { + Event *ERC20TokenRemoteTeleporterAddressPaused // 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 interfaces.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 *ERC20TokenRemoteTeleporterAddressPausedIterator) 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(ERC20TokenRemoteTeleporterAddressPaused) + 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(ERC20TokenRemoteTeleporterAddressPaused) + 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 *ERC20TokenRemoteTeleporterAddressPausedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *ERC20TokenRemoteTeleporterAddressPausedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// ERC20TokenRemoteTeleporterAddressPaused represents a TeleporterAddressPaused event raised by the ERC20TokenRemote contract. +type ERC20TokenRemoteTeleporterAddressPaused struct { + TeleporterAddress common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterTeleporterAddressPaused is a free log retrieval operation binding the contract event 0x933f93e57a222e6330362af8b376d0a8725b6901e9a2fb86d00f169702b28a4c. +// +// Solidity: event TeleporterAddressPaused(address indexed teleporterAddress) +func (_ERC20TokenRemote *ERC20TokenRemoteFilterer) FilterTeleporterAddressPaused(opts *bind.FilterOpts, teleporterAddress []common.Address) (*ERC20TokenRemoteTeleporterAddressPausedIterator, error) { + + var teleporterAddressRule []interface{} + for _, teleporterAddressItem := range teleporterAddress { + teleporterAddressRule = append(teleporterAddressRule, teleporterAddressItem) + } + + logs, sub, err := _ERC20TokenRemote.contract.FilterLogs(opts, "TeleporterAddressPaused", teleporterAddressRule) + if err != nil { + return nil, err + } + return &ERC20TokenRemoteTeleporterAddressPausedIterator{contract: _ERC20TokenRemote.contract, event: "TeleporterAddressPaused", logs: logs, sub: sub}, nil +} + +// WatchTeleporterAddressPaused is a free log subscription operation binding the contract event 0x933f93e57a222e6330362af8b376d0a8725b6901e9a2fb86d00f169702b28a4c. +// +// Solidity: event TeleporterAddressPaused(address indexed teleporterAddress) +func (_ERC20TokenRemote *ERC20TokenRemoteFilterer) WatchTeleporterAddressPaused(opts *bind.WatchOpts, sink chan<- *ERC20TokenRemoteTeleporterAddressPaused, teleporterAddress []common.Address) (event.Subscription, error) { + + var teleporterAddressRule []interface{} + for _, teleporterAddressItem := range teleporterAddress { + teleporterAddressRule = append(teleporterAddressRule, teleporterAddressItem) + } + + logs, sub, err := _ERC20TokenRemote.contract.WatchLogs(opts, "TeleporterAddressPaused", teleporterAddressRule) + 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(ERC20TokenRemoteTeleporterAddressPaused) + if err := _ERC20TokenRemote.contract.UnpackLog(event, "TeleporterAddressPaused", 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 +} + +// ParseTeleporterAddressPaused is a log parse operation binding the contract event 0x933f93e57a222e6330362af8b376d0a8725b6901e9a2fb86d00f169702b28a4c. +// +// Solidity: event TeleporterAddressPaused(address indexed teleporterAddress) +func (_ERC20TokenRemote *ERC20TokenRemoteFilterer) ParseTeleporterAddressPaused(log types.Log) (*ERC20TokenRemoteTeleporterAddressPaused, error) { + event := new(ERC20TokenRemoteTeleporterAddressPaused) + if err := _ERC20TokenRemote.contract.UnpackLog(event, "TeleporterAddressPaused", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// ERC20TokenRemoteTeleporterAddressUnpausedIterator is returned from FilterTeleporterAddressUnpaused and is used to iterate over the raw logs and unpacked data for TeleporterAddressUnpaused events raised by the ERC20TokenRemote contract. +type ERC20TokenRemoteTeleporterAddressUnpausedIterator struct { + Event *ERC20TokenRemoteTeleporterAddressUnpaused // 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 interfaces.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 *ERC20TokenRemoteTeleporterAddressUnpausedIterator) 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(ERC20TokenRemoteTeleporterAddressUnpaused) + 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(ERC20TokenRemoteTeleporterAddressUnpaused) + 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 *ERC20TokenRemoteTeleporterAddressUnpausedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *ERC20TokenRemoteTeleporterAddressUnpausedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// ERC20TokenRemoteTeleporterAddressUnpaused represents a TeleporterAddressUnpaused event raised by the ERC20TokenRemote contract. +type ERC20TokenRemoteTeleporterAddressUnpaused struct { + TeleporterAddress common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterTeleporterAddressUnpaused is a free log retrieval operation binding the contract event 0x844e2f3154214672229235858fd029d1dfd543901c6d05931f0bc2480a2d72c3. +// +// Solidity: event TeleporterAddressUnpaused(address indexed teleporterAddress) +func (_ERC20TokenRemote *ERC20TokenRemoteFilterer) FilterTeleporterAddressUnpaused(opts *bind.FilterOpts, teleporterAddress []common.Address) (*ERC20TokenRemoteTeleporterAddressUnpausedIterator, error) { + + var teleporterAddressRule []interface{} + for _, teleporterAddressItem := range teleporterAddress { + teleporterAddressRule = append(teleporterAddressRule, teleporterAddressItem) + } + + logs, sub, err := _ERC20TokenRemote.contract.FilterLogs(opts, "TeleporterAddressUnpaused", teleporterAddressRule) + if err != nil { + return nil, err + } + return &ERC20TokenRemoteTeleporterAddressUnpausedIterator{contract: _ERC20TokenRemote.contract, event: "TeleporterAddressUnpaused", logs: logs, sub: sub}, nil +} + +// WatchTeleporterAddressUnpaused is a free log subscription operation binding the contract event 0x844e2f3154214672229235858fd029d1dfd543901c6d05931f0bc2480a2d72c3. +// +// Solidity: event TeleporterAddressUnpaused(address indexed teleporterAddress) +func (_ERC20TokenRemote *ERC20TokenRemoteFilterer) WatchTeleporterAddressUnpaused(opts *bind.WatchOpts, sink chan<- *ERC20TokenRemoteTeleporterAddressUnpaused, teleporterAddress []common.Address) (event.Subscription, error) { + + var teleporterAddressRule []interface{} + for _, teleporterAddressItem := range teleporterAddress { + teleporterAddressRule = append(teleporterAddressRule, teleporterAddressItem) + } + + logs, sub, err := _ERC20TokenRemote.contract.WatchLogs(opts, "TeleporterAddressUnpaused", teleporterAddressRule) + 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(ERC20TokenRemoteTeleporterAddressUnpaused) + if err := _ERC20TokenRemote.contract.UnpackLog(event, "TeleporterAddressUnpaused", 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 +} + +// ParseTeleporterAddressUnpaused is a log parse operation binding the contract event 0x844e2f3154214672229235858fd029d1dfd543901c6d05931f0bc2480a2d72c3. +// +// Solidity: event TeleporterAddressUnpaused(address indexed teleporterAddress) +func (_ERC20TokenRemote *ERC20TokenRemoteFilterer) ParseTeleporterAddressUnpaused(log types.Log) (*ERC20TokenRemoteTeleporterAddressUnpaused, error) { + event := new(ERC20TokenRemoteTeleporterAddressUnpaused) + if err := _ERC20TokenRemote.contract.UnpackLog(event, "TeleporterAddressUnpaused", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// ERC20TokenRemoteTokensAndCallSentIterator is returned from FilterTokensAndCallSent and is used to iterate over the raw logs and unpacked data for TokensAndCallSent events raised by the ERC20TokenRemote contract. +type ERC20TokenRemoteTokensAndCallSentIterator struct { + Event *ERC20TokenRemoteTokensAndCallSent // 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 interfaces.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 *ERC20TokenRemoteTokensAndCallSentIterator) 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(ERC20TokenRemoteTokensAndCallSent) + 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(ERC20TokenRemoteTokensAndCallSent) + 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 *ERC20TokenRemoteTokensAndCallSentIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *ERC20TokenRemoteTokensAndCallSentIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// ERC20TokenRemoteTokensAndCallSent represents a TokensAndCallSent event raised by the ERC20TokenRemote contract. +type ERC20TokenRemoteTokensAndCallSent struct { + TeleporterMessageID [32]byte + Sender common.Address + Input SendAndCallInput + Amount *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterTokensAndCallSent is a free log retrieval operation binding the contract event 0x5d76dff81bf773b908b050fa113d39f7d8135bb4175398f313ea19cd3a1a0b16. +// +// Solidity: event TokensAndCallSent(bytes32 indexed teleporterMessageID, address indexed sender, (bytes32,address,address,bytes,uint256,uint256,address,address,address,uint256,uint256) input, uint256 amount) +func (_ERC20TokenRemote *ERC20TokenRemoteFilterer) FilterTokensAndCallSent(opts *bind.FilterOpts, teleporterMessageID [][32]byte, sender []common.Address) (*ERC20TokenRemoteTokensAndCallSentIterator, error) { + + var teleporterMessageIDRule []interface{} + for _, teleporterMessageIDItem := range teleporterMessageID { + teleporterMessageIDRule = append(teleporterMessageIDRule, teleporterMessageIDItem) + } + var senderRule []interface{} + for _, senderItem := range sender { + senderRule = append(senderRule, senderItem) + } + + logs, sub, err := _ERC20TokenRemote.contract.FilterLogs(opts, "TokensAndCallSent", teleporterMessageIDRule, senderRule) + if err != nil { + return nil, err + } + return &ERC20TokenRemoteTokensAndCallSentIterator{contract: _ERC20TokenRemote.contract, event: "TokensAndCallSent", logs: logs, sub: sub}, nil +} + +// WatchTokensAndCallSent is a free log subscription operation binding the contract event 0x5d76dff81bf773b908b050fa113d39f7d8135bb4175398f313ea19cd3a1a0b16. +// +// Solidity: event TokensAndCallSent(bytes32 indexed teleporterMessageID, address indexed sender, (bytes32,address,address,bytes,uint256,uint256,address,address,address,uint256,uint256) input, uint256 amount) +func (_ERC20TokenRemote *ERC20TokenRemoteFilterer) WatchTokensAndCallSent(opts *bind.WatchOpts, sink chan<- *ERC20TokenRemoteTokensAndCallSent, teleporterMessageID [][32]byte, sender []common.Address) (event.Subscription, error) { + + var teleporterMessageIDRule []interface{} + for _, teleporterMessageIDItem := range teleporterMessageID { + teleporterMessageIDRule = append(teleporterMessageIDRule, teleporterMessageIDItem) + } + var senderRule []interface{} + for _, senderItem := range sender { + senderRule = append(senderRule, senderItem) + } + + logs, sub, err := _ERC20TokenRemote.contract.WatchLogs(opts, "TokensAndCallSent", teleporterMessageIDRule, senderRule) + 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(ERC20TokenRemoteTokensAndCallSent) + if err := _ERC20TokenRemote.contract.UnpackLog(event, "TokensAndCallSent", 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 +} + +// ParseTokensAndCallSent is a log parse operation binding the contract event 0x5d76dff81bf773b908b050fa113d39f7d8135bb4175398f313ea19cd3a1a0b16. +// +// Solidity: event TokensAndCallSent(bytes32 indexed teleporterMessageID, address indexed sender, (bytes32,address,address,bytes,uint256,uint256,address,address,address,uint256,uint256) input, uint256 amount) +func (_ERC20TokenRemote *ERC20TokenRemoteFilterer) ParseTokensAndCallSent(log types.Log) (*ERC20TokenRemoteTokensAndCallSent, error) { + event := new(ERC20TokenRemoteTokensAndCallSent) + if err := _ERC20TokenRemote.contract.UnpackLog(event, "TokensAndCallSent", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// ERC20TokenRemoteTokensSentIterator is returned from FilterTokensSent and is used to iterate over the raw logs and unpacked data for TokensSent events raised by the ERC20TokenRemote contract. +type ERC20TokenRemoteTokensSentIterator struct { + Event *ERC20TokenRemoteTokensSent // 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 interfaces.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 *ERC20TokenRemoteTokensSentIterator) 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(ERC20TokenRemoteTokensSent) + 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(ERC20TokenRemoteTokensSent) + 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 *ERC20TokenRemoteTokensSentIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *ERC20TokenRemoteTokensSentIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// ERC20TokenRemoteTokensSent represents a TokensSent event raised by the ERC20TokenRemote contract. +type ERC20TokenRemoteTokensSent struct { + TeleporterMessageID [32]byte + Sender common.Address + Input SendTokensInput + Amount *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterTokensSent is a free log retrieval operation binding the contract event 0x93f19bf1ec58a15dc643b37e7e18a1c13e85e06cd11929e283154691ace9fb52. +// +// Solidity: event TokensSent(bytes32 indexed teleporterMessageID, address indexed sender, (bytes32,address,address,address,uint256,uint256,uint256,address) input, uint256 amount) +func (_ERC20TokenRemote *ERC20TokenRemoteFilterer) FilterTokensSent(opts *bind.FilterOpts, teleporterMessageID [][32]byte, sender []common.Address) (*ERC20TokenRemoteTokensSentIterator, error) { + + var teleporterMessageIDRule []interface{} + for _, teleporterMessageIDItem := range teleporterMessageID { + teleporterMessageIDRule = append(teleporterMessageIDRule, teleporterMessageIDItem) + } + var senderRule []interface{} + for _, senderItem := range sender { + senderRule = append(senderRule, senderItem) + } + + logs, sub, err := _ERC20TokenRemote.contract.FilterLogs(opts, "TokensSent", teleporterMessageIDRule, senderRule) + if err != nil { + return nil, err + } + return &ERC20TokenRemoteTokensSentIterator{contract: _ERC20TokenRemote.contract, event: "TokensSent", logs: logs, sub: sub}, nil +} + +// WatchTokensSent is a free log subscription operation binding the contract event 0x93f19bf1ec58a15dc643b37e7e18a1c13e85e06cd11929e283154691ace9fb52. +// +// Solidity: event TokensSent(bytes32 indexed teleporterMessageID, address indexed sender, (bytes32,address,address,address,uint256,uint256,uint256,address) input, uint256 amount) +func (_ERC20TokenRemote *ERC20TokenRemoteFilterer) WatchTokensSent(opts *bind.WatchOpts, sink chan<- *ERC20TokenRemoteTokensSent, teleporterMessageID [][32]byte, sender []common.Address) (event.Subscription, error) { + + var teleporterMessageIDRule []interface{} + for _, teleporterMessageIDItem := range teleporterMessageID { + teleporterMessageIDRule = append(teleporterMessageIDRule, teleporterMessageIDItem) + } + var senderRule []interface{} + for _, senderItem := range sender { + senderRule = append(senderRule, senderItem) + } + + logs, sub, err := _ERC20TokenRemote.contract.WatchLogs(opts, "TokensSent", teleporterMessageIDRule, senderRule) + 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(ERC20TokenRemoteTokensSent) + if err := _ERC20TokenRemote.contract.UnpackLog(event, "TokensSent", 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 +} + +// ParseTokensSent is a log parse operation binding the contract event 0x93f19bf1ec58a15dc643b37e7e18a1c13e85e06cd11929e283154691ace9fb52. +// +// Solidity: event TokensSent(bytes32 indexed teleporterMessageID, address indexed sender, (bytes32,address,address,address,uint256,uint256,uint256,address) input, uint256 amount) +func (_ERC20TokenRemote *ERC20TokenRemoteFilterer) ParseTokensSent(log types.Log) (*ERC20TokenRemoteTokensSent, error) { + event := new(ERC20TokenRemoteTokensSent) + if err := _ERC20TokenRemote.contract.UnpackLog(event, "TokensSent", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// ERC20TokenRemoteTokensWithdrawnIterator is returned from FilterTokensWithdrawn and is used to iterate over the raw logs and unpacked data for TokensWithdrawn events raised by the ERC20TokenRemote contract. +type ERC20TokenRemoteTokensWithdrawnIterator struct { + Event *ERC20TokenRemoteTokensWithdrawn // 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 interfaces.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 *ERC20TokenRemoteTokensWithdrawnIterator) 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(ERC20TokenRemoteTokensWithdrawn) + 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(ERC20TokenRemoteTokensWithdrawn) + 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 *ERC20TokenRemoteTokensWithdrawnIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *ERC20TokenRemoteTokensWithdrawnIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// ERC20TokenRemoteTokensWithdrawn represents a TokensWithdrawn event raised by the ERC20TokenRemote contract. +type ERC20TokenRemoteTokensWithdrawn struct { + Recipient common.Address + Amount *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterTokensWithdrawn is a free log retrieval operation binding the contract event 0x6352c5382c4a4578e712449ca65e83cdb392d045dfcf1cad9615189db2da244b. +// +// Solidity: event TokensWithdrawn(address indexed recipient, uint256 amount) +func (_ERC20TokenRemote *ERC20TokenRemoteFilterer) FilterTokensWithdrawn(opts *bind.FilterOpts, recipient []common.Address) (*ERC20TokenRemoteTokensWithdrawnIterator, error) { + + var recipientRule []interface{} + for _, recipientItem := range recipient { + recipientRule = append(recipientRule, recipientItem) + } + + logs, sub, err := _ERC20TokenRemote.contract.FilterLogs(opts, "TokensWithdrawn", recipientRule) + if err != nil { + return nil, err + } + return &ERC20TokenRemoteTokensWithdrawnIterator{contract: _ERC20TokenRemote.contract, event: "TokensWithdrawn", logs: logs, sub: sub}, nil +} + +// WatchTokensWithdrawn is a free log subscription operation binding the contract event 0x6352c5382c4a4578e712449ca65e83cdb392d045dfcf1cad9615189db2da244b. +// +// Solidity: event TokensWithdrawn(address indexed recipient, uint256 amount) +func (_ERC20TokenRemote *ERC20TokenRemoteFilterer) WatchTokensWithdrawn(opts *bind.WatchOpts, sink chan<- *ERC20TokenRemoteTokensWithdrawn, recipient []common.Address) (event.Subscription, error) { + + var recipientRule []interface{} + for _, recipientItem := range recipient { + recipientRule = append(recipientRule, recipientItem) + } + + logs, sub, err := _ERC20TokenRemote.contract.WatchLogs(opts, "TokensWithdrawn", recipientRule) + 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(ERC20TokenRemoteTokensWithdrawn) + if err := _ERC20TokenRemote.contract.UnpackLog(event, "TokensWithdrawn", 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 +} + +// ParseTokensWithdrawn is a log parse operation binding the contract event 0x6352c5382c4a4578e712449ca65e83cdb392d045dfcf1cad9615189db2da244b. +// +// Solidity: event TokensWithdrawn(address indexed recipient, uint256 amount) +func (_ERC20TokenRemote *ERC20TokenRemoteFilterer) ParseTokensWithdrawn(log types.Log) (*ERC20TokenRemoteTokensWithdrawn, error) { + event := new(ERC20TokenRemoteTokensWithdrawn) + if err := _ERC20TokenRemote.contract.UnpackLog(event, "TokensWithdrawn", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// ERC20TokenRemoteTransferIterator is returned from FilterTransfer and is used to iterate over the raw logs and unpacked data for Transfer events raised by the ERC20TokenRemote contract. +type ERC20TokenRemoteTransferIterator struct { + Event *ERC20TokenRemoteTransfer // 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 interfaces.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 *ERC20TokenRemoteTransferIterator) 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(ERC20TokenRemoteTransfer) + 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(ERC20TokenRemoteTransfer) + 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 *ERC20TokenRemoteTransferIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *ERC20TokenRemoteTransferIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// ERC20TokenRemoteTransfer represents a Transfer event raised by the ERC20TokenRemote contract. +type ERC20TokenRemoteTransfer 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 (_ERC20TokenRemote *ERC20TokenRemoteFilterer) FilterTransfer(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*ERC20TokenRemoteTransferIterator, 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 := _ERC20TokenRemote.contract.FilterLogs(opts, "Transfer", fromRule, toRule) + if err != nil { + return nil, err + } + return &ERC20TokenRemoteTransferIterator{contract: _ERC20TokenRemote.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 (_ERC20TokenRemote *ERC20TokenRemoteFilterer) WatchTransfer(opts *bind.WatchOpts, sink chan<- *ERC20TokenRemoteTransfer, 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 := _ERC20TokenRemote.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(ERC20TokenRemoteTransfer) + if err := _ERC20TokenRemote.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 (_ERC20TokenRemote *ERC20TokenRemoteFilterer) ParseTransfer(log types.Log) (*ERC20TokenRemoteTransfer, error) { + event := new(ERC20TokenRemoteTransfer) + if err := _ERC20TokenRemote.contract.UnpackLog(event, "Transfer", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} diff --git a/abi-bindings/go/ictt/TokenRemote/ERC20TokenRemoteUpgradeable/ERC20TokenRemoteUpgradeable.go b/abi-bindings/go/ictt/TokenRemote/ERC20TokenRemoteUpgradeable/ERC20TokenRemoteUpgradeable.go new file mode 100644 index 000000000..920baf74d --- /dev/null +++ b/abi-bindings/go/ictt/TokenRemote/ERC20TokenRemoteUpgradeable/ERC20TokenRemoteUpgradeable.go @@ -0,0 +1,3044 @@ +// Code generated - DO NOT EDIT. +// This file is a generated binding and any manual changes will be lost. + +package erc20tokenremoteupgradeable + +import ( + "errors" + "math/big" + "strings" + + "github.com/ava-labs/subnet-evm/accounts/abi" + "github.com/ava-labs/subnet-evm/accounts/abi/bind" + "github.com/ava-labs/subnet-evm/core/types" + "github.com/ava-labs/subnet-evm/interfaces" + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/event" +) + +// Reference imports to suppress errors if they are not otherwise used. +var ( + _ = errors.New + _ = big.NewInt + _ = strings.NewReader + _ = interfaces.NotFound + _ = bind.Bind + _ = common.Big1 + _ = types.BloomLookup + _ = event.NewSubscription + _ = abi.ConvertType +) + +// SendAndCallInput is an auto generated low-level Go binding around an user-defined struct. +type SendAndCallInput struct { + DestinationBlockchainID [32]byte + DestinationTokenTransferrerAddress common.Address + RecipientContract common.Address + RecipientPayload []byte + RequiredGasLimit *big.Int + RecipientGasLimit *big.Int + MultiHopFallback common.Address + FallbackRecipient common.Address + PrimaryFeeTokenAddress common.Address + PrimaryFee *big.Int + SecondaryFee *big.Int +} + +// SendTokensInput is an auto generated low-level Go binding around an user-defined struct. +type SendTokensInput struct { + DestinationBlockchainID [32]byte + DestinationTokenTransferrerAddress common.Address + Recipient common.Address + PrimaryFeeTokenAddress common.Address + PrimaryFee *big.Int + SecondaryFee *big.Int + RequiredGasLimit *big.Int + MultiHopFallback common.Address +} + +// TeleporterFeeInfo is an auto generated low-level Go binding around an user-defined struct. +type TeleporterFeeInfo struct { + FeeTokenAddress common.Address + Amount *big.Int +} + +// TokenRemoteSettings is an auto generated low-level Go binding around an user-defined struct. +type TokenRemoteSettings struct { + TeleporterRegistryAddress common.Address + TeleporterManager common.Address + MinTeleporterVersion *big.Int + TokenHomeBlockchainID [32]byte + TokenHomeAddress common.Address + TokenHomeDecimals uint8 +} + +// ERC20TokenRemoteUpgradeableMetaData contains all meta data concerning the ERC20TokenRemoteUpgradeable contract. +var ERC20TokenRemoteUpgradeableMetaData = &bind.MetaData{ + ABI: "[{\"inputs\":[{\"internalType\":\"enumICMInitializable\",\"name\":\"init\",\"type\":\"uint8\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"target\",\"type\":\"address\"}],\"name\":\"AddressEmptyCode\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"AddressInsufficientBalance\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"allowance\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"needed\",\"type\":\"uint256\"}],\"name\":\"ERC20InsufficientAllowance\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"balance\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"needed\",\"type\":\"uint256\"}],\"name\":\"ERC20InsufficientBalance\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"approver\",\"type\":\"address\"}],\"name\":\"ERC20InvalidApprover\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"}],\"name\":\"ERC20InvalidReceiver\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"ERC20InvalidSender\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"ERC20InvalidSpender\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"FailedInnerCall\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidInitialization\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotInitializing\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"OwnableInvalidOwner\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"OwnableUnauthorizedAccount\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ReentrancyGuardReentrantCall\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"SafeERC20FailedOperation\",\"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\":true,\"internalType\":\"address\",\"name\":\"recipientContract\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"CallFailed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"recipientContract\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"CallSucceeded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"version\",\"type\":\"uint64\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"oldMinTeleporterVersion\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"newMinTeleporterVersion\",\"type\":\"uint256\"}],\"name\":\"MinTeleporterVersionUpdated\",\"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\":\"teleporterAddress\",\"type\":\"address\"}],\"name\":\"TeleporterAddressPaused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"teleporterAddress\",\"type\":\"address\"}],\"name\":\"TeleporterAddressUnpaused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"teleporterMessageID\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"destinationBlockchainID\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"destinationTokenTransferrerAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"recipientContract\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"recipientPayload\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"requiredGasLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"recipientGasLimit\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"multiHopFallback\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"fallbackRecipient\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"primaryFeeTokenAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"primaryFee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"secondaryFee\",\"type\":\"uint256\"}],\"indexed\":false,\"internalType\":\"structSendAndCallInput\",\"name\":\"input\",\"type\":\"tuple\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"TokensAndCallSent\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"teleporterMessageID\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"destinationBlockchainID\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"destinationTokenTransferrerAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"primaryFeeTokenAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"primaryFee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"secondaryFee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"requiredGasLimit\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"multiHopFallback\",\"type\":\"address\"}],\"indexed\":false,\"internalType\":\"structSendTokensInput\",\"name\":\"input\",\"type\":\"tuple\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"TokensSent\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"TokensWithdrawn\",\"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\":[],\"name\":\"ERC20_TOKEN_REMOTE_STORAGE_LOCATION\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"MULTI_HOP_CALL_GAS_PER_WORD\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"MULTI_HOP_CALL_REQUIRED_GAS\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"MULTI_HOP_SEND_REQUIRED_GAS\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"REGISTER_REMOTE_REQUIRED_GAS\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"TELEPORTER_REGISTRY_APP_STORAGE_LOCATION\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"TOKEN_REMOTE_STORAGE_LOCATION\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"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\":\"value\",\"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\":\"payloadSize\",\"type\":\"uint256\"}],\"name\":\"calculateNumWords\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getBlockchainID\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getInitialReserveImbalance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getIsCollateralized\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getMinTeleporterVersion\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getMultiplyOnRemote\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getTokenHomeAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getTokenHomeBlockchainID\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getTokenMultiplier\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"teleporterRegistryAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"teleporterManager\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"minTeleporterVersion\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"tokenHomeBlockchainID\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"tokenHomeAddress\",\"type\":\"address\"},{\"internalType\":\"uint8\",\"name\":\"tokenHomeDecimals\",\"type\":\"uint8\"}],\"internalType\":\"structTokenRemoteSettings\",\"name\":\"settings\",\"type\":\"tuple\"},{\"internalType\":\"string\",\"name\":\"tokenName\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"tokenSymbol\",\"type\":\"string\"},{\"internalType\":\"uint8\",\"name\":\"tokenDecimals\",\"type\":\"uint8\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"teleporterAddress\",\"type\":\"address\"}],\"name\":\"isTeleporterAddressPaused\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"teleporterAddress\",\"type\":\"address\"}],\"name\":\"pauseTeleporterAddress\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"sourceBlockchainID\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"originSenderAddress\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"message\",\"type\":\"bytes\"}],\"name\":\"receiveTeleporterMessage\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"feeTokenAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"internalType\":\"structTeleporterFeeInfo\",\"name\":\"feeInfo\",\"type\":\"tuple\"}],\"name\":\"registerWithHome\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"destinationBlockchainID\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"destinationTokenTransferrerAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"primaryFeeTokenAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"primaryFee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"secondaryFee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"requiredGasLimit\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"multiHopFallback\",\"type\":\"address\"}],\"internalType\":\"structSendTokensInput\",\"name\":\"input\",\"type\":\"tuple\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"send\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"destinationBlockchainID\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"destinationTokenTransferrerAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"recipientContract\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"recipientPayload\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"requiredGasLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"recipientGasLimit\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"multiHopFallback\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"fallbackRecipient\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"primaryFeeTokenAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"primaryFee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"secondaryFee\",\"type\":\"uint256\"}],\"internalType\":\"structSendAndCallInput\",\"name\":\"input\",\"type\":\"tuple\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"sendAndCall\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"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\":\"value\",\"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\":\"value\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"teleporterAddress\",\"type\":\"address\"}],\"name\":\"unpauseTeleporterAddress\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"version\",\"type\":\"uint256\"}],\"name\":\"updateMinTeleporterVersion\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", + Bin: "0x608060405234801561000f575f80fd5b506040516148ce3803806148ce83398101604081905261002e91610107565b60018160018111156100425761004261012c565b0361004f5761004f610055565b50610140565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00805468010000000000000000900460ff16156100a55760405163f92ee8a960e01b815260040160405180910390fd5b80546001600160401b03908116146101045780546001600160401b0319166001600160401b0390811782556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b50565b5f60208284031215610117575f80fd5b815160028110610125575f80fd5b9392505050565b634e487b7160e01b5f52602160045260245ffd5b6147818061014d5f395ff3fe608060405234801561000f575f80fd5b506004361061021e575f3560e01c806370a082311161012a578063b8a46d02116100b4578063dd62ed3e11610079578063dd62ed3e146104bd578063e0fd9cb8146104d0578063ef793e2a146104d8578063f2fde38b146104e0578063f3f981d8146104f3575f80fd5b8063b8a46d0214610474578063c3cd692714610487578063c868efaa1461048f578063c9fe4ddf146104a2578063d2cc7a70146104b5575f80fd5b80638da5cb5b116100fa5780638da5cb5b146103ee578063909a6ac01461043257806395d89b4114610446578063973142971461044e578063a9059cbb14610461575f80fd5b806370a08231146103a0578063715018a6146103d457806371717c18146103dc5780637ee3779a146103e6575f80fd5b8063313ce567116101ab5780635507f3d11161017b5780635507f3d1146103365780635d16225d146103405780635eb995141461035357806362431a6514610366578063656900381461038d575f80fd5b8063313ce567146102c057806335cac159146102f45780634213cf781461031b5780634511243e14610323575f80fd5b806315beb59f116101f157806315beb59f1461027d57806318160ddd1461028657806323b872dd1461028e578063254ac160146102a15780632b0d8f18146102ab575f80fd5b806302a30c7d1461022257806306fdde031461023f5780630733c8c814610254578063095ea7b31461026a575b5f80fd5b61022a610506565b60405190151581526020015b60405180910390f35b61024761051d565b60405161023691906136ec565b61025c6105dd565b604051908152602001610236565b61022a610278366004613722565b6105f1565b61025c6105dc81565b61025c61060a565b61022a61029c36600461374c565b610625565b61025c6201fbd081565b6102be6102b936600461378a565b61064a565b005b7f9b9029a3537fcf0e984763da4ac33bbf592a3462819171bf424e91cf626223005460405160ff9091168152602001610236565b61025c7f600d6a9b283d1eda563de594ce4843869b6f128a4baa222422ed94a60b0cef0081565b61025c61074c565b6102be61033136600461378a565b61075d565b61025c6205302081565b6102be61034e3660046137a5565b61084c565b6102be6103613660046137d4565b61085a565b61025c7f9b9029a3537fcf0e984763da4ac33bbf592a3462819171bf424e91cf6262230081565b6102be61039b3660046137eb565b61086e565b61025c6103ae36600461378a565b6001600160a01b03165f9081525f8051602061470c833981519152602052604090205490565b6102be610878565b61025c6205573081565b61022a61088b565b7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300546001600160a01b03165b6040516001600160a01b039091168152602001610236565b61025c5f8051602061472c83398151915281565b6102476108a2565b61022a61045c36600461378a565b6108e0565b61022a61046f366004613722565b6108f9565b6102be610482366004613823565b610906565b61041a610acd565b6102be61049d366004613839565b610aea565b6102be6104b03660046139f3565b610ca7565b61025c610db9565b61025c6104cb366004613adc565b610dce565b61025c610e17565b61025c610e2b565b6102be6104ee36600461378a565b610e3f565b61025c6105013660046137d4565b610e79565b5f80610510610e8f565b6006015460ff1692915050565b7f52c63247e1f47db19d5ce0460030c497f067ca4cebf71ba98eeadabe20bace0380546060915f8051602061470c8339815191529161055b90613b13565b80601f016020809104026020016040519081016040528092919081815260200182805461058790613b13565b80156105d25780601f106105a9576101008083540402835291602001916105d2565b820191905f5260205f20905b8154815290600101906020018083116105b557829003601f168201915b505050505091505090565b5f806105e7610e8f565b6003015492915050565b5f336105fe818585610eb3565b60019150505b92915050565b5f805f8051602061470c8339815191525b6002015492915050565b5f33610632858285610ec5565b61063d858585610f22565b60019150505b9392505050565b5f8051602061472c833981519152610660610f7f565b6001600160a01b03821661068f5760405162461bcd60e51b815260040161068690613b45565b60405180910390fd5b6106998183610f87565b156106fc5760405162461bcd60e51b815260206004820152602d60248201527f54656c65706f7274657252656769737472794170703a2061646472657373206160448201526c1b1c9958591e481c185d5cd959609a1b6064820152608401610686565b6001600160a01b0382165f81815260018381016020526040808320805460ff1916909217909155517f933f93e57a222e6330362af8b376d0a8725b6901e9a2fb86d00f169702b28a4c9190a25050565b5f80610756610e8f565b5492915050565b5f8051602061472c833981519152610773610f7f565b6001600160a01b0382166107995760405162461bcd60e51b815260040161068690613b45565b6107a38183610f87565b6108015760405162461bcd60e51b815260206004820152602960248201527f54656c65706f7274657252656769737472794170703a2061646472657373206e6044820152681bdd081c185d5cd95960ba1b6064820152608401610686565b6001600160a01b0382165f818152600183016020526040808220805460ff19169055517f844e2f3154214672229235858fd029d1dfd543901c6d05931f0bc2480a2d72c39190a25050565b6108568282610fa8565b5050565b610862610f7f565b61086b81611030565b50565b61085682826111c8565b610880611250565b6108895f6112ab565b565b5f80610895610e8f565b6004015460ff1692915050565b7f52c63247e1f47db19d5ce0460030c497f067ca4cebf71ba98eeadabe20bace0480546060915f8051602061470c8339815191529161055b90613b13565b5f5f8051602061472c8339815191526106438184610f87565b5f336105fe818585610f22565b5f61090f610e8f565b6006810154909150610100900460ff161561096c5760405162461bcd60e51b815260206004820152601f60248201527f546f6b656e52656d6f74653a20616c72656164792072656769737465726564006044820152606401610686565b604080516060808201835260058401548252600284015460ff600160a01b820481166020808601918252600160a81b9093048216858701908152865180880188525f808252885188518188015293518516848a01529151909316828601528651808303909501855260809091019095528082019290925291929091610a01906109f79087018761378a565b866020013561131b565b6040805160c0810182526001870154815260028701546001600160a01b031660208083019190915282518084018452939450610ac5939192830191908190610a4b908b018b61378a565b6001600160a01b0316815260209081018690529082526201fbd0908201526040015f5b604051908082528060200260200182016040528015610a97578160200160208202803683370190505b50815260200184604051602001610aae9190613ba7565b604051602081830303815290604052815250611363565b505050505050565b5f80610ad7610e8f565b600201546001600160a01b031692915050565b610af261147e565b5f5f8051602061472c83398151915260028101548154919250906001600160a01b0316634c1f08ce336040516001600160e01b031960e084901b1681526001600160a01b039091166004820152602401602060405180830381865afa158015610b5d573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610b819190613be9565b1015610be85760405162461bcd60e51b815260206004820152603060248201527f54656c65706f7274657252656769737472794170703a20696e76616c6964205460448201526f32b632b837b93a32b91039b2b73232b960811b6064820152608401610686565b610bf28133610f87565b15610c585760405162461bcd60e51b815260206004820152603060248201527f54656c65706f7274657252656769737472794170703a2054656c65706f72746560448201526f1c881859191c995cdcc81c185d5cd95960821b6064820152608401610686565b610c98858585858080601f0160208091040260200160405190810160405280939291908181526020018383808284375f920191909152506114c892505050565b50610ca16116df565b50505050565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a008054600160401b810460ff1615906001600160401b03165f81158015610ceb5750825b90505f826001600160401b03166001148015610d065750303b155b905081158015610d14575080155b15610d325760405163f92ee8a960e01b815260040160405180910390fd5b845467ffffffffffffffff191660011785558315610d5c57845460ff60401b1916600160401b1785555b610d6889898989611709565b8315610dae57845460ff60401b19168555604051600181527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b505050505050505050565b5f805f8051602061472c83398151915261061b565b6001600160a01b039182165f9081527f52c63247e1f47db19d5ce0460030c497f067ca4cebf71ba98eeadabe20bace016020908152604080832093909416825291909152205490565b5f80610e21610e8f565b6001015492915050565b5f80610e35610e8f565b6005015492915050565b610e47611250565b6001600160a01b038116610e7057604051631e4fbdf760e01b81525f6004820152602401610686565b61086b816112ab565b5f6005610e8783601f613c14565b901c92915050565b7f600d6a9b283d1eda563de594ce4843869b6f128a4baa222422ed94a60b0cef0090565b610ec08383836001611759565b505050565b5f610ed08484610dce565b90505f198114610ca15781811015610f1457604051637dc7a0d960e11b81526001600160a01b03841660048201526024810182905260448101839052606401610686565b610ca184848484035f611759565b6001600160a01b038316610f4b57604051634b637e8f60e11b81525f6004820152602401610686565b6001600160a01b038216610f745760405163ec442f0560e01b81525f6004820152602401610686565b610ec083838361183c565b610889611250565b6001600160a01b03165f908152600191909101602052604090205460ff1690565b7fd2f1ed38b7d242bfb8b41862afb813a15193219a4bc717f2056607593e6c75008054600114610fea5760405162461bcd60e51b815260040161068690613c27565b600281555f610ff7610e8f565b905061100284611975565b600181015484350361101d576110188484611a60565b611027565b6110278484611be4565b50600190555050565b5f8051602061472c83398151915280546040805163301fd1f560e21b815290515f926001600160a01b03169163c07f47d49160048083019260209291908290030181865afa158015611084573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906110a89190613be9565b60028301549091508184111561111a5760405162461bcd60e51b815260206004820152603160248201527f54656c65706f7274657252656769737472794170703a20696e76616c6964205460448201527032b632b837b93a32b9103b32b939b4b7b760791b6064820152608401610686565b80841161118f5760405162461bcd60e51b815260206004820152603f60248201527f54656c65706f7274657252656769737472794170703a206e6f7420677265617460448201527f6572207468616e2063757272656e74206d696e696d756d2076657273696f6e006064820152608401610686565b60028301849055604051849082907fa9a7ef57e41f05b4c15480842f5f0c27edfcbb553fed281f7c4068452cc1c02d905f90a350505050565b7fd2f1ed38b7d242bfb8b41862afb813a15193219a4bc717f2056607593e6c7500805460011461120a5760405162461bcd60e51b815260040161068690613c27565b600281555f611217610e8f565b905061122284611daf565b600181015484350361123e576112388484611fe9565b50611248565b61123884846121f8565b600190555050565b336112827f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300546001600160a01b031690565b6001600160a01b0316146108895760405163118cdaa760e01b8152336004820152602401610686565b7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c19930080546001600160a01b031981166001600160a01b03848116918217845560405192169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0905f90a3505050565b5f815f0361132a57505f610604565b306001600160a01b0384160361135857611346335b3084610ec5565b611351333084610f22565b5080610604565b610643833384612494565b5f8061136d6125f7565b60408401516020015190915015611412576040830151516001600160a01b03166113ef5760405162461bcd60e51b815260206004820152602d60248201527f54656c65706f7274657252656769737472794170703a207a65726f206665652060448201526c746f6b656e206164647265737360981b6064820152608401610686565b604083015160208101519051611412916001600160a01b039091169083906126e7565b604051630624488560e41b81526001600160a01b0382169063624488509061143e908690600401613c6b565b6020604051808303815f875af115801561145a573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906106439190613be9565b7f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f008054600119016114c257604051633ee5aeb560e01b815260040160405180910390fd5b60029055565b5f6114d1610e8f565b9050806001015484146115385760405162461bcd60e51b815260206004820152602960248201527f546f6b656e52656d6f74653a20696e76616c696420736f7572636520626c6f636044820152681ad8da185a5b88125160ba1b6064820152608401610686565b60028101546001600160a01b038481169116146115aa5760405162461bcd60e51b815260206004820152602a60248201527f546f6b656e52656d6f74653a20696e76616c6964206f726967696e2073656e646044820152696572206164647265737360b01b6064820152608401610686565b5f828060200190518101906115bf9190613d64565b6006830154909150610100900460ff1615806115e05750600682015460ff16155b156115f75760068201805461ffff19166101011790555b60018151600481111561160c5761160c613b93565b03611643575f816020015180602001905181019061162a9190613dec565b905061163d815f0151826020015161276e565b506116d8565b60028151600481111561165857611658613b93565b03611686575f81602001518060200190518101906116769190613e24565b905061163d8182608001516127bb565b60405162461bcd60e51b815260206004820152602160248201527f546f6b656e52656d6f74653a20696e76616c6964206d657373616765207479706044820152606560f81b6064820152608401610686565b5050505050565b5f7f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f005b6001905550565b611711612914565b61171b838361295d565b611726845f8361296f565b7f9b9029a3537fcf0e984763da4ac33bbf592a3462819171bf424e91cf62622300805460ff191660ff8316179055610ca1565b5f8051602061470c8339815191526001600160a01b0385166117905760405163e602df0560e01b81525f6004820152602401610686565b6001600160a01b0384166117b957604051634a1406b160e11b81525f6004820152602401610686565b6001600160a01b038086165f908152600183016020908152604080832093881683529290522083905581156116d857836001600160a01b0316856001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9258560405161182d91815260200190565b60405180910390a35050505050565b5f8051602061470c8339815191526001600160a01b0384166118765781816002015f82825461186b9190613c14565b909155506118e69050565b6001600160a01b0384165f90815260208290526040902054828110156118c85760405163391434e360e21b81526001600160a01b03861660048201526024810182905260448101849052606401610686565b6001600160a01b0385165f9081526020839052604090209083900390555b6001600160a01b038316611904576002810180548390039055611922565b6001600160a01b0383165f9081526020829052604090208054830190555b826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405161196791815260200190565b60405180910390a350505050565b5f611986606083016040840161378a565b6001600160a01b0316036119e85760405162461bcd60e51b815260206004820152602360248201527f546f6b656e52656d6f74653a207a65726f20726563697069656e74206164647260448201526265737360e81b6064820152608401610686565b5f8160c0013511611a0b5760405162461bcd60e51b815260040161068690613eee565b8035611a295760405162461bcd60e51b815260040161068690613f32565b5f611a3a604083016020840161378a565b6001600160a01b03160361086b5760405162461bcd60e51b815260040161068690613f7d565b5f611a69610e8f565b9050611a99611a7e604085016020860161378a565b60a0850135611a94610100870160e0880161378a565b6129a0565b5f611abd83611aae608087016060880161378a565b86608001358760a00135612a9d565b6040805180820190915291945091505f9080600181526020016040518060400160405280886040016020810190611af4919061378a565b6001600160a01b0316815260200187815250604051602001611b169190613fda565b60408051601f198184030181529181529152805160c0810182526001860154815260028601546001600160a01b03166020820152815180830183529293505f92611b969282019080611b6e60808c0160608d0161378a565b6001600160a01b03168152602090810188905290825260c08a0135908201526040015f610a6e565b9050336001600160a01b0316817f93f19bf1ec58a15dc643b37e7e18a1c13e85e06cd11929e283154691ace9fb528888604051611bd4929190613ffa565b60405180910390a3505050505050565b5f611bed610e8f565b9050611c1a8335611c04604086016020870161378a565b611c15610100870160e0880161378a565b612b60565b5f611c2f83611aae608087016060880161378a565b60408051808201825260038152815160e081018352883581529396509193505f9260208084019282820191611c68918b01908b0161378a565b6001600160a01b03168152602001611c8660608a0160408b0161378a565b6001600160a01b031681526020810188905260a0890135604082015260c08901356060820152608001611cc06101008a0160e08b0161378a565b6001600160a01b03169052604051611d309190602001815181526020808301516001600160a01b0390811691830191909152604080840151821690830152606080840151908301526080808401519083015260a0808401519083015260c092830151169181019190915260e00190565b60408051601f198184030181529181529152805160c0810182526001860154815260028601546001600160a01b03166020820152815180830183529293505f92611b969282019080611d8860808c0160608d0161378a565b6001600160a01b03168152602090810188905290825262053020908201526040015f610a6e565b8035611dcd5760405162461bcd60e51b815260040161068690613f32565b5f611dde604083016020840161378a565b6001600160a01b031603611e045760405162461bcd60e51b815260040161068690613f7d565b5f611e15606083016040840161378a565b6001600160a01b031603611e805760405162461bcd60e51b815260206004820152602c60248201527f546f6b656e52656d6f74653a207a65726f20726563697069656e7420636f6e7460448201526b72616374206164647265737360a01b6064820152608401610686565b5f816080013511611ea35760405162461bcd60e51b815260040161068690613eee565b5f8160a0013511611f045760405162461bcd60e51b815260206004820152602560248201527f546f6b656e52656d6f74653a207a65726f20726563697069656e7420676173206044820152641b1a5b5a5d60da1b6064820152608401610686565b80608001358160a0013510611f6c5760405162461bcd60e51b815260206004820152602860248201527f546f6b656e52656d6f74653a20696e76616c696420726563697069656e742067604482015267185cc81b1a5b5a5d60c21b6064820152608401610686565b5f611f7e610100830160e0840161378a565b6001600160a01b03160361086b5760405162461bcd60e51b815260206004820152602c60248201527f546f6b656e52656d6f74653a207a65726f2066616c6c6261636b20726563697060448201526b69656e74206164647265737360a01b6064820152608401610686565b5f611ff2610e8f565b905061201d612007604085016020860161378a565b610140850135611a9460e0870160c0880161378a565b5f612045836120346101208701610100880161378a565b866101200135876101400135612a9d565b6040805180820190915291945091505f908060028152602001604051806101000160405280865f01548152602001306001600160a01b031681526020016120893390565b6001600160a01b031681526020016120a760608a0160408b0161378a565b6001600160a01b03168152602081018890526040016120c960608a018a614099565b8080601f0160208091040260200160405190810160405280939291908181526020018383808284375f9201919091525050509082525060a0890135602082015260400161211d6101008a0160e08b0161378a565b6001600160a01b0316905260405161213891906020016140db565b60408051601f198184030181529181529152805160c0810182526001860154815260028601546001600160a01b03166020820152815180830183529293505f926121ba92820190806121926101208c016101008d0161378a565b6001600160a01b03168152602090810188905290825260808a0135908201526040015f610a6e565b9050336001600160a01b0316817f5d76dff81bf773b908b050fa113d39f7d8135bb4175398f313ea19cd3a1a0b168888604051611bd49291906141e2565b5f612201610e8f565b90506122288335612218604086016020870161378a565b611c1560e0870160c0880161378a565b5f61223f836120346101208701610100880161378a565b6040805180820190915291945091505f90806004815260200160405180610160016040528061226b3390565b6001600160a01b03168152602001885f01358152602001886020016020810190612295919061378a565b6001600160a01b031681526020016122b360608a0160408b0161378a565b6001600160a01b03168152602081018890526040016122d560608a018a614099565b8080601f0160208091040260200160405190810160405280939291908181526020018383808284375f9201919091525050509082525060a089013560208201526040016123296101008a0160e08b0161378a565b6001600160a01b031681526080890135602082015260400161235160e08a0160c08b0161378a565b6001600160a01b031681526101408901356020918201526040516123769291016142f0565b60408051601f19818403018152919052905290505f6105dc6123a561239e6060890189614099565b9050610e79565b6123af91906143cd565b6123bc9062055730613c14565b6040805160c0810182526001870154815260028701546001600160a01b03166020820152815180830183529293505f9261244592820190806124066101208d016101008e0161378a565b6001600160a01b031681526020908101899052908252818101869052604080515f815280830182528184015251606090920191610aae91889101613ba7565b9050336001600160a01b0316817f5d76dff81bf773b908b050fa113d39f7d8135bb4175398f313ea19cd3a1a0b1689896040516124839291906141e2565b60405180910390a350505050505050565b6040516370a0823160e01b81523060048201525f9081906001600160a01b038616906370a0823190602401602060405180830381865afa1580156124da573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906124fe9190613be9565b90506125156001600160a01b038616853086612bfe565b6040516370a0823160e01b81523060048201525f906001600160a01b038716906370a0823190602401602060405180830381865afa158015612559573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061257d9190613be9565b90508181116125e35760405162461bcd60e51b815260206004820152602c60248201527f5361666545524332305472616e7366657246726f6d3a2062616c616e6365206e60448201526b1bdd081a5b98dc99585cd95960a21b6064820152608401610686565b6125ed82826143e4565b9695505050505050565b5f8051602061472c83398151915280546040805163d820e64f60e01b815290515f939284926001600160a01b039091169163d820e64f916004808201926020929091908290030181865afa158015612651573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061267591906143f7565b90506126818282610f87565b156106045760405162461bcd60e51b815260206004820152603060248201527f54656c65706f7274657252656769737472794170703a2054656c65706f72746560448201526f1c881cd95b991a5b99c81c185d5cd95960821b6064820152608401610686565b604051636eb1769f60e11b81523060048201526001600160a01b0383811660248301525f919085169063dd62ed3e90604401602060405180830381865afa158015612734573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906127589190613be9565b9050610ca184846127698585613c14565b612c65565b816001600160a01b03167f6352c5382c4a4578e712449ca65e83cdb392d045dfcf1cad9615189db2da244b826040516127a991815260200190565b60405180910390a26108568282612cf4565b6127c53082612cf4565b6127d430836060015183610eb3565b5f825f01518360200151846040015130858760a001516040516024016127ff96959493929190614412565b60408051601f198184030181529190526020810180516001600160e01b03166394395edd60e01b17905260c084015160608501519192505f91612843919084612d28565b90505f612854308660600151610dce565b90506128653086606001515f610eb3565b81156128b75784606001516001600160a01b03167f104deb555f67e63782bb817bc26c39050894645f9b9f29c4be8ae68d0e8b7ff4856040516128aa91815260200190565b60405180910390a26128ff565b84606001516001600160a01b03167fb9eaeae386d339f8115782f297a9e5f0e13fb587cd6b0d502f113cb8dd4d6cb0856040516128f691815260200190565b60405180910390a25b80156116d8576116d8308660e0015183610f22565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0054600160401b900460ff1661088957604051631afcd79f60e31b815260040160405180910390fd5b612965612914565b6108568282612d3d565b612977612914565b61298d835f015184602001518560400151612d8d565b612995612da8565b610ec0838383612db8565b5f6129a9610e8f565b60028101549091506001600160a01b038581169116146129db5760405162461bcd60e51b815260040161068690614452565b8215612a355760405162461bcd60e51b815260206004820152602360248201527f546f6b656e52656d6f74653a206e6f6e2d7a65726f207365636f6e646172792060448201526266656560e81b6064820152608401610686565b6001600160a01b03821615610ca15760405162461bcd60e51b815260206004820152602860248201527f546f6b656e52656d6f74653a206e6f6e2d7a65726f206d756c74692d686f702060448201526766616c6c6261636b60c01b6064820152608401610686565b5f805f612aa8610e8f565b9050612ab3876130dc565b9650612abf868661131b565b60038201546004830154919650612ad99160ff16866130f4565b60038201546004830154612af1919060ff168a6130f4565b11612b535760405162461bcd60e51b815260206004820152602c60248201527f546f6b656e52656d6f74653a20696e73756666696369656e7420746f6b656e7360448201526b103a37903a3930b739b332b960a11b6064820152608401610686565b5094959294509192505050565b5f612b69610e8f565b80549091508403612b9c57306001600160a01b03841603612b9c5760405162461bcd60e51b815260040161068690614452565b6001600160a01b038216610ca15760405162461bcd60e51b8152602060048201526024808201527f546f6b656e52656d6f74653a207a65726f206d756c74692d686f702066616c6c6044820152636261636b60e01b6064820152608401610686565b6040516001600160a01b038481166024830152838116604483015260648201839052610ca19186918216906323b872dd906084015b604051602081830303815290604052915060e01b6020820180516001600160e01b038381831617835250505050613101565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663095ea7b360e01b179052612cb68482613162565b610ca1576040516001600160a01b0384811660248301525f6044830152612cea91869182169063095ea7b390606401612c33565b610ca18482613101565b6001600160a01b038216612d1d5760405163ec442f0560e01b81525f6004820152602401610686565b6108565f838361183c565b5f612d35845f8585613203565b949350505050565b612d45612914565b5f8051602061470c8339815191527f52c63247e1f47db19d5ce0460030c497f067ca4cebf71ba98eeadabe20bace03612d7e84826144f3565b5060048101610ca183826144f3565b612d95612914565b612d9f83826132d3565b610ec0826132f5565b612db0612914565b610889613306565b612dc0612914565b5f612dc9610e8f565b90506005600160991b016001600160a01b0316634213cf786040518163ffffffff1660e01b8152600401602060405180830381865afa158015612e0e573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612e329190613be9565b81556060840151612e985760405162461bcd60e51b815260206004820152602a60248201527f546f6b656e52656d6f74653a207a65726f20746f6b656e20686f6d6520626c6f60448201526918dad8da185a5b88125160b21b6064820152608401610686565b8054606085015103612f125760405162461bcd60e51b815260206004820152603b60248201527f546f6b656e52656d6f74653a2063616e6e6f74206465706c6f7920746f20736160448201527f6d6520626c6f636b636861696e20617320746f6b656e20686f6d6500000000006064820152608401610686565b60808401516001600160a01b0316612f785760405162461bcd60e51b8152602060048201526024808201527f546f6b656e52656d6f74653a207a65726f20746f6b656e20686f6d65206164646044820152637265737360e01b6064820152608401610686565b60128460a0015160ff161115612fe25760405162461bcd60e51b815260206004820152602960248201527f546f6b656e52656d6f74653a20746f6b656e20686f6d6520646563696d616c73604482015268040e8dede40d0d2ced60bb1b6064820152608401610686565b60128260ff1611156130425760405162461bcd60e51b8152602060048201526024808201527f546f6b656e52656d6f74653a20746f6b656e20646563696d616c7320746f6f206044820152630d0d2ced60e31b6064820152608401610686565b60608401516001820155608084015160028201805460058401869055600684018054871560ff1990911617905560a08701516001600160a01b039093166001600160a81b031990911617600160a01b60ff808516919091029190911760ff60a81b1916600160a81b918616919091021790556130be908361332d565b60048301805460ff1916911515919091179055600390910155505050565b5f6130e63361133f565b6130f03383613377565b5090565b5f612d358484845f6133ab565b5f6131156001600160a01b038416836133d2565b905080515f1415801561313957508080602001905181019061313791906145ae565b155b15610ec057604051635274afe760e01b81526001600160a01b0384166004820152602401610686565b5f805f846001600160a01b03168460405161317d91906145cd565b5f604051808303815f865af19150503d805f81146131b6576040519150601f19603f3d011682016040523d82523d5f602084013e6131bb565b606091505b50915091508180156131e55750805115806131e55750808060200190518101906131e591906145ae565b80156131fa57505f856001600160a01b03163b115b95945050505050565b5f845a10156132545760405162461bcd60e51b815260206004820152601b60248201527f43616c6c5574696c733a20696e73756666696369656e742067617300000000006044820152606401610686565b834710156132a45760405162461bcd60e51b815260206004820152601d60248201527f43616c6c5574696c733a20696e73756666696369656e742076616c75650000006044820152606401610686565b826001600160a01b03163b5f036132bc57505f612d35565b5f805f84516020860188888bf19695505050505050565b6132db612914565b6132e36133df565b6132eb6133ef565b61085682826133f7565b6132fd612914565b61086b8161357b565b5f7fd2f1ed38b7d242bfb8b41862afb813a15193219a4bc717f2056607593e6c7500611702565b5f8060ff8085169084161181816133505761334885876145e8565b60ff1661335e565b61335a86866145e8565b60ff165b61336990600a6146e1565b9350909150505b9250929050565b6001600160a01b0382166133a057604051634b637e8f60e11b81525f6004820152602401610686565b610856825f8361183c565b5f811515841515036133c8576133c185846143cd565b9050612d35565b6131fa85846146ec565b606061064383835f613583565b6133e7612914565b610889613612565b610889612914565b6133ff612914565b6001600160a01b03821661347b5760405162461bcd60e51b815260206004820152603760248201527f54656c65706f7274657252656769737472794170703a207a65726f2054656c6560448201527f706f7274657220726567697374727920616464726573730000000000000000006064820152608401610686565b5f5f8051602061472c83398151915290505f8390505f816001600160a01b031663c07f47d46040518163ffffffff1660e01b8152600401602060405180830381865afa1580156134cd573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906134f19190613be9565b116135595760405162461bcd60e51b815260206004820152603260248201527f54656c65706f7274657252656769737472794170703a20696e76616c69642054604482015271656c65706f7274657220726567697374727960701b6064820152608401610686565b81546001600160a01b0319166001600160a01b038216178255610ca183611030565b610e47612914565b6060814710156135a85760405163cd78605960e01b8152306004820152602401610686565b5f80856001600160a01b031684866040516135c391906145cd565b5f6040518083038185875af1925050503d805f81146135fd576040519150601f19603f3d011682016040523d82523d5f602084013e613602565b606091505b50915091506125ed86838361361a565b6116df612914565b60608261362f5761362a82613676565b610643565b815115801561364657506001600160a01b0384163b155b1561366f57604051639996b31560e01b81526001600160a01b0385166004820152602401610686565b5080610643565b8051156136865780518082602001fd5b604051630a12f52160e11b815260040160405180910390fd5b5f5b838110156136b95781810151838201526020016136a1565b50505f910152565b5f81518084526136d881602086016020860161369f565b601f01601f19169290920160200192915050565b602081525f61064360208301846136c1565b6001600160a01b038116811461086b575f80fd5b803561371d816136fe565b919050565b5f8060408385031215613733575f80fd5b823561373e816136fe565b946020939093013593505050565b5f805f6060848603121561375e575f80fd5b8335613769816136fe565b92506020840135613779816136fe565b929592945050506040919091013590565b5f6020828403121561379a575f80fd5b8135610643816136fe565b5f808284036101208112156137b8575f80fd5b610100808212156137c7575f80fd5b9395938601359450505050565b5f602082840312156137e4575f80fd5b5035919050565b5f80604083850312156137fc575f80fd5b82356001600160401b03811115613811575f80fd5b8301610160818603121561373e575f80fd5b5f60408284031215613833575f80fd5b50919050565b5f805f806060858703121561384c575f80fd5b84359350602085013561385e816136fe565b925060408501356001600160401b0380821115613879575f80fd5b818701915087601f83011261388c575f80fd5b81358181111561389a575f80fd5b8860208285010111156138ab575f80fd5b95989497505060200194505050565b634e487b7160e01b5f52604160045260245ffd5b60405160c081016001600160401b03811182821017156138f0576138f06138ba565b60405290565b604080519081016001600160401b03811182821017156138f0576138f06138ba565b60405161010081016001600160401b03811182821017156138f0576138f06138ba565b604051601f8201601f191681016001600160401b0381118282101715613963576139636138ba565b604052919050565b803560ff8116811461371d575f80fd5b5f6001600160401b03821115613993576139936138ba565b50601f01601f191660200190565b5f82601f8301126139b0575f80fd5b81356139c36139be8261397b565b61393b565b8181528460208386010111156139d7575f80fd5b816020850160208301375f918101602001919091529392505050565b5f805f80848603610120811215613a08575f80fd5b60c0811215613a15575f80fd5b50613a1e6138ce565b8535613a29816136fe565b81526020860135613a39816136fe565b8060208301525060408601356040820152606086013560608201526080860135613a62816136fe565b6080820152613a7360a0870161396b565b60a0820152935060c08501356001600160401b0380821115613a93575f80fd5b613a9f888389016139a1565b945060e0870135915080821115613ab4575f80fd5b50613ac1878288016139a1565b925050613ad1610100860161396b565b905092959194509250565b5f8060408385031215613aed575f80fd5b8235613af8816136fe565b91506020830135613b08816136fe565b809150509250929050565b600181811c90821680613b2757607f821691505b60208210810361383357634e487b7160e01b5f52602260045260245ffd5b6020808252602e908201527f54656c65706f7274657252656769737472794170703a207a65726f2054656c6560408201526d706f72746572206164647265737360901b606082015260800190565b634e487b7160e01b5f52602160045260245ffd5b602081525f825160058110613bca57634e487b7160e01b5f52602160045260245ffd5b806020840152506020830151604080840152612d3560608401826136c1565b5f60208284031215613bf9575f80fd5b5051919050565b634e487b7160e01b5f52601160045260245ffd5b8082018082111561060457610604613c00565b60208082526024908201527f53656e645265656e7472616e637947756172643a2073656e64207265656e7472604082015263616e637960e01b606082015260800190565b6020808252825182820152828101516001600160a01b039081166040808501919091528401518051821660608501528083015160808501525f929161010085019190606087015160a0870152608087015160e060c08801528051938490528401925f92506101208701905b80841015613cf857845183168252938501936001939093019290850190613cd6565b5060a0880151878203601f190160e08901529450613d1681866136c1565b98975050505050505050565b5f82601f830112613d31575f80fd5b8151613d3f6139be8261397b565b818152846020838601011115613d53575f80fd5b612d3582602083016020870161369f565b5f60208284031215613d74575f80fd5b81516001600160401b0380821115613d8a575f80fd5b9083019060408286031215613d9d575f80fd5b613da56138f6565b825160058110613db3575f80fd5b8152602083015182811115613dc6575f80fd5b613dd287828601613d22565b60208301525095945050505050565b805161371d816136fe565b5f60408284031215613dfc575f80fd5b613e046138f6565b8251613e0f816136fe565b81526020928301519281019290925250919050565b5f60208284031215613e34575f80fd5b81516001600160401b0380821115613e4a575f80fd5b908301906101008286031215613e5e575f80fd5b613e66613918565b82518152613e7660208401613de1565b6020820152613e8760408401613de1565b6040820152613e9860608401613de1565b60608201526080830151608082015260a083015182811115613eb8575f80fd5b613ec487828601613d22565b60a08301525060c083015160c0820152613ee060e08401613de1565b60e082015295945050505050565b60208082526024908201527f546f6b656e52656d6f74653a207a65726f20726571756972656420676173206c6040820152631a5b5a5d60e21b606082015260800190565b6020808252602b908201527f546f6b656e52656d6f74653a207a65726f2064657374696e6174696f6e20626c60408201526a1bd8dad8da185a5b88125160aa1b606082015260800190565b60208082526037908201527f546f6b656e52656d6f74653a207a65726f2064657374696e6174696f6e20746f60408201527f6b656e207472616e736665727265722061646472657373000000000000000000606082015260800190565b81516001600160a01b031681526020808301519082015260408101610604565b8235815261012081016020840135614011816136fe565b6001600160a01b039081166020840152604085013590614030826136fe565b16604083015261404260608501613712565b6001600160a01b0381166060840152506080840135608083015260a084013560a083015260c084013560c083015261407c60e08501613712565b6001600160a01b031660e083015261010090910191909152919050565b5f808335601e198436030181126140ae575f80fd5b8301803591506001600160401b038211156140c7575f80fd5b602001915036819003821315613370575f80fd5b60208152815160208201525f602083015160018060a01b0380821660408501528060408601511660608501525050606083015161412360808401826001600160a01b03169052565b50608083015160a083015260a08301516101008060c085015261414a6101208501836136c1565b915060c085015160e085015260e085015161416f828601826001600160a01b03169052565b5090949350505050565b5f808335601e1984360301811261418e575f80fd5b83016020810192503590506001600160401b038111156141ac575f80fd5b803603821315613370575f80fd5b81835281816020850137505f828201602090810191909152601f909101601f19169091010190565b60408152823560408201525f6141fa60208501613712565b6001600160a01b0316606083015261421460408501613712565b6001600160a01b0316608083015261422f6060850185614179565b6101608060a08601526142476101a0860183856141ba565b9250608087013560c086015260a087013560e086015261426960c08801613712565b9150610100614282818701846001600160a01b03169052565b61428e60e08901613712565b92506101206142a7818801856001600160a01b03169052565b6142b2828a01613712565b935061014091506142cd828801856001600160a01b03169052565b880135918601919091529095013561018084015260209092019290925292915050565b6020815261430a6020820183516001600160a01b03169052565b602082015160408201525f604083015161432f60608401826001600160a01b03169052565b5060608301516001600160a01b038116608084015250608083015160a083015260a08301516101608060c085015261436b6101808501836136c1565b915060c085015160e085015260e0850151610100614393818701836001600160a01b03169052565b8601516101208681019190915286015190506101406143bc818701836001600160a01b03169052565b959095015193019290925250919050565b808202811582820484141761060457610604613c00565b8181038181111561060457610604613c00565b5f60208284031215614407575f80fd5b8151610643816136fe565b8681526001600160a01b0386811660208301528581166040830152841660608201526080810183905260c060a082018190525f90613d16908301846136c1565b6020808252603a908201527f546f6b656e52656d6f74653a20696e76616c69642064657374696e6174696f6e60408201527f20746f6b656e207472616e736665727265722061646472657373000000000000606082015260800190565b601f821115610ec057805f5260205f20601f840160051c810160208510156144d45750805b601f840160051c820191505b818110156116d8575f81556001016144e0565b81516001600160401b0381111561450c5761450c6138ba565b6145208161451a8454613b13565b846144af565b602080601f831160018114614553575f841561453c5750858301515b5f19600386901b1c1916600185901b178555610ac5565b5f85815260208120601f198616915b8281101561458157888601518255948401946001909101908401614562565b508582101561459e57878501515f19600388901b60f8161c191681555b5050505050600190811b01905550565b5f602082840312156145be575f80fd5b81518015158114610643575f80fd5b5f82516145de81846020870161369f565b9190910192915050565b60ff828116828216039081111561060457610604613c00565b600181815b8085111561463b57815f190482111561462157614621613c00565b8085161561462e57918102915b93841c9390800290614606565b509250929050565b5f8261465157506001610604565b8161465d57505f610604565b8160018114614673576002811461467d57614699565b6001915050610604565b60ff84111561468e5761468e613c00565b50506001821b610604565b5060208310610133831016604e8410600b84101617156146bc575081810a610604565b6146c68383614601565b805f19048211156146d9576146d9613c00565b029392505050565b5f6106438383614643565b5f8261470657634e487b7160e01b5f52601260045260245ffd5b50049056fe52c63247e1f47db19d5ce0460030c497f067ca4cebf71ba98eeadabe20bace00de77a4dc7391f6f8f2d9567915d687d3aee79e7a1fc7300392f2727e9a0f1d00a26469706673582212202b6216f43f3d42931e6ecf56a1c1eed99a85b67393e179aa3664885042bc87d364736f6c63430008190033", +} + +// ERC20TokenRemoteUpgradeableABI is the input ABI used to generate the binding from. +// Deprecated: Use ERC20TokenRemoteUpgradeableMetaData.ABI instead. +var ERC20TokenRemoteUpgradeableABI = ERC20TokenRemoteUpgradeableMetaData.ABI + +// ERC20TokenRemoteUpgradeableBin is the compiled bytecode used for deploying new contracts. +// Deprecated: Use ERC20TokenRemoteUpgradeableMetaData.Bin instead. +var ERC20TokenRemoteUpgradeableBin = ERC20TokenRemoteUpgradeableMetaData.Bin + +// DeployERC20TokenRemoteUpgradeable deploys a new Ethereum contract, binding an instance of ERC20TokenRemoteUpgradeable to it. +func DeployERC20TokenRemoteUpgradeable(auth *bind.TransactOpts, backend bind.ContractBackend, init uint8) (common.Address, *types.Transaction, *ERC20TokenRemoteUpgradeable, error) { + parsed, err := ERC20TokenRemoteUpgradeableMetaData.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(ERC20TokenRemoteUpgradeableBin), backend, init) + if err != nil { + return common.Address{}, nil, nil, err + } + return address, tx, &ERC20TokenRemoteUpgradeable{ERC20TokenRemoteUpgradeableCaller: ERC20TokenRemoteUpgradeableCaller{contract: contract}, ERC20TokenRemoteUpgradeableTransactor: ERC20TokenRemoteUpgradeableTransactor{contract: contract}, ERC20TokenRemoteUpgradeableFilterer: ERC20TokenRemoteUpgradeableFilterer{contract: contract}}, nil +} + +// ERC20TokenRemoteUpgradeable is an auto generated Go binding around an Ethereum contract. +type ERC20TokenRemoteUpgradeable struct { + ERC20TokenRemoteUpgradeableCaller // Read-only binding to the contract + ERC20TokenRemoteUpgradeableTransactor // Write-only binding to the contract + ERC20TokenRemoteUpgradeableFilterer // Log filterer for contract events +} + +// ERC20TokenRemoteUpgradeableCaller is an auto generated read-only Go binding around an Ethereum contract. +type ERC20TokenRemoteUpgradeableCaller struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// ERC20TokenRemoteUpgradeableTransactor is an auto generated write-only Go binding around an Ethereum contract. +type ERC20TokenRemoteUpgradeableTransactor struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// ERC20TokenRemoteUpgradeableFilterer is an auto generated log filtering Go binding around an Ethereum contract events. +type ERC20TokenRemoteUpgradeableFilterer struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// ERC20TokenRemoteUpgradeableSession is an auto generated Go binding around an Ethereum contract, +// with pre-set call and transact options. +type ERC20TokenRemoteUpgradeableSession struct { + Contract *ERC20TokenRemoteUpgradeable // 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 +} + +// ERC20TokenRemoteUpgradeableCallerSession is an auto generated read-only Go binding around an Ethereum contract, +// with pre-set call options. +type ERC20TokenRemoteUpgradeableCallerSession struct { + Contract *ERC20TokenRemoteUpgradeableCaller // Generic contract caller binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session +} + +// ERC20TokenRemoteUpgradeableTransactorSession is an auto generated write-only Go binding around an Ethereum contract, +// with pre-set transact options. +type ERC20TokenRemoteUpgradeableTransactorSession struct { + Contract *ERC20TokenRemoteUpgradeableTransactor // Generic contract transactor binding to set the session for + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// ERC20TokenRemoteUpgradeableRaw is an auto generated low-level Go binding around an Ethereum contract. +type ERC20TokenRemoteUpgradeableRaw struct { + Contract *ERC20TokenRemoteUpgradeable // Generic contract binding to access the raw methods on +} + +// ERC20TokenRemoteUpgradeableCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. +type ERC20TokenRemoteUpgradeableCallerRaw struct { + Contract *ERC20TokenRemoteUpgradeableCaller // Generic read-only contract binding to access the raw methods on +} + +// ERC20TokenRemoteUpgradeableTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. +type ERC20TokenRemoteUpgradeableTransactorRaw struct { + Contract *ERC20TokenRemoteUpgradeableTransactor // Generic write-only contract binding to access the raw methods on +} + +// NewERC20TokenRemoteUpgradeable creates a new instance of ERC20TokenRemoteUpgradeable, bound to a specific deployed contract. +func NewERC20TokenRemoteUpgradeable(address common.Address, backend bind.ContractBackend) (*ERC20TokenRemoteUpgradeable, error) { + contract, err := bindERC20TokenRemoteUpgradeable(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &ERC20TokenRemoteUpgradeable{ERC20TokenRemoteUpgradeableCaller: ERC20TokenRemoteUpgradeableCaller{contract: contract}, ERC20TokenRemoteUpgradeableTransactor: ERC20TokenRemoteUpgradeableTransactor{contract: contract}, ERC20TokenRemoteUpgradeableFilterer: ERC20TokenRemoteUpgradeableFilterer{contract: contract}}, nil +} + +// NewERC20TokenRemoteUpgradeableCaller creates a new read-only instance of ERC20TokenRemoteUpgradeable, bound to a specific deployed contract. +func NewERC20TokenRemoteUpgradeableCaller(address common.Address, caller bind.ContractCaller) (*ERC20TokenRemoteUpgradeableCaller, error) { + contract, err := bindERC20TokenRemoteUpgradeable(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &ERC20TokenRemoteUpgradeableCaller{contract: contract}, nil +} + +// NewERC20TokenRemoteUpgradeableTransactor creates a new write-only instance of ERC20TokenRemoteUpgradeable, bound to a specific deployed contract. +func NewERC20TokenRemoteUpgradeableTransactor(address common.Address, transactor bind.ContractTransactor) (*ERC20TokenRemoteUpgradeableTransactor, error) { + contract, err := bindERC20TokenRemoteUpgradeable(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &ERC20TokenRemoteUpgradeableTransactor{contract: contract}, nil +} + +// NewERC20TokenRemoteUpgradeableFilterer creates a new log filterer instance of ERC20TokenRemoteUpgradeable, bound to a specific deployed contract. +func NewERC20TokenRemoteUpgradeableFilterer(address common.Address, filterer bind.ContractFilterer) (*ERC20TokenRemoteUpgradeableFilterer, error) { + contract, err := bindERC20TokenRemoteUpgradeable(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &ERC20TokenRemoteUpgradeableFilterer{contract: contract}, nil +} + +// bindERC20TokenRemoteUpgradeable binds a generic wrapper to an already deployed contract. +func bindERC20TokenRemoteUpgradeable(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := ERC20TokenRemoteUpgradeableMetaData.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 (_ERC20TokenRemoteUpgradeable *ERC20TokenRemoteUpgradeableRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _ERC20TokenRemoteUpgradeable.Contract.ERC20TokenRemoteUpgradeableCaller.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 (_ERC20TokenRemoteUpgradeable *ERC20TokenRemoteUpgradeableRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _ERC20TokenRemoteUpgradeable.Contract.ERC20TokenRemoteUpgradeableTransactor.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_ERC20TokenRemoteUpgradeable *ERC20TokenRemoteUpgradeableRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _ERC20TokenRemoteUpgradeable.Contract.ERC20TokenRemoteUpgradeableTransactor.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 (_ERC20TokenRemoteUpgradeable *ERC20TokenRemoteUpgradeableCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _ERC20TokenRemoteUpgradeable.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 (_ERC20TokenRemoteUpgradeable *ERC20TokenRemoteUpgradeableTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _ERC20TokenRemoteUpgradeable.Contract.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_ERC20TokenRemoteUpgradeable *ERC20TokenRemoteUpgradeableTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _ERC20TokenRemoteUpgradeable.Contract.contract.Transact(opts, method, params...) +} + +// ERC20TOKENREMOTESTORAGELOCATION is a free data retrieval call binding the contract method 0x62431a65. +// +// Solidity: function ERC20_TOKEN_REMOTE_STORAGE_LOCATION() view returns(bytes32) +func (_ERC20TokenRemoteUpgradeable *ERC20TokenRemoteUpgradeableCaller) ERC20TOKENREMOTESTORAGELOCATION(opts *bind.CallOpts) ([32]byte, error) { + var out []interface{} + err := _ERC20TokenRemoteUpgradeable.contract.Call(opts, &out, "ERC20_TOKEN_REMOTE_STORAGE_LOCATION") + + if err != nil { + return *new([32]byte), err + } + + out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) + + return out0, err + +} + +// ERC20TOKENREMOTESTORAGELOCATION is a free data retrieval call binding the contract method 0x62431a65. +// +// Solidity: function ERC20_TOKEN_REMOTE_STORAGE_LOCATION() view returns(bytes32) +func (_ERC20TokenRemoteUpgradeable *ERC20TokenRemoteUpgradeableSession) ERC20TOKENREMOTESTORAGELOCATION() ([32]byte, error) { + return _ERC20TokenRemoteUpgradeable.Contract.ERC20TOKENREMOTESTORAGELOCATION(&_ERC20TokenRemoteUpgradeable.CallOpts) +} + +// ERC20TOKENREMOTESTORAGELOCATION is a free data retrieval call binding the contract method 0x62431a65. +// +// Solidity: function ERC20_TOKEN_REMOTE_STORAGE_LOCATION() view returns(bytes32) +func (_ERC20TokenRemoteUpgradeable *ERC20TokenRemoteUpgradeableCallerSession) ERC20TOKENREMOTESTORAGELOCATION() ([32]byte, error) { + return _ERC20TokenRemoteUpgradeable.Contract.ERC20TOKENREMOTESTORAGELOCATION(&_ERC20TokenRemoteUpgradeable.CallOpts) +} + +// MULTIHOPCALLGASPERWORD is a free data retrieval call binding the contract method 0x15beb59f. +// +// Solidity: function MULTI_HOP_CALL_GAS_PER_WORD() view returns(uint256) +func (_ERC20TokenRemoteUpgradeable *ERC20TokenRemoteUpgradeableCaller) MULTIHOPCALLGASPERWORD(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _ERC20TokenRemoteUpgradeable.contract.Call(opts, &out, "MULTI_HOP_CALL_GAS_PER_WORD") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// MULTIHOPCALLGASPERWORD is a free data retrieval call binding the contract method 0x15beb59f. +// +// Solidity: function MULTI_HOP_CALL_GAS_PER_WORD() view returns(uint256) +func (_ERC20TokenRemoteUpgradeable *ERC20TokenRemoteUpgradeableSession) MULTIHOPCALLGASPERWORD() (*big.Int, error) { + return _ERC20TokenRemoteUpgradeable.Contract.MULTIHOPCALLGASPERWORD(&_ERC20TokenRemoteUpgradeable.CallOpts) +} + +// MULTIHOPCALLGASPERWORD is a free data retrieval call binding the contract method 0x15beb59f. +// +// Solidity: function MULTI_HOP_CALL_GAS_PER_WORD() view returns(uint256) +func (_ERC20TokenRemoteUpgradeable *ERC20TokenRemoteUpgradeableCallerSession) MULTIHOPCALLGASPERWORD() (*big.Int, error) { + return _ERC20TokenRemoteUpgradeable.Contract.MULTIHOPCALLGASPERWORD(&_ERC20TokenRemoteUpgradeable.CallOpts) +} + +// MULTIHOPCALLREQUIREDGAS is a free data retrieval call binding the contract method 0x71717c18. +// +// Solidity: function MULTI_HOP_CALL_REQUIRED_GAS() view returns(uint256) +func (_ERC20TokenRemoteUpgradeable *ERC20TokenRemoteUpgradeableCaller) MULTIHOPCALLREQUIREDGAS(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _ERC20TokenRemoteUpgradeable.contract.Call(opts, &out, "MULTI_HOP_CALL_REQUIRED_GAS") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// MULTIHOPCALLREQUIREDGAS is a free data retrieval call binding the contract method 0x71717c18. +// +// Solidity: function MULTI_HOP_CALL_REQUIRED_GAS() view returns(uint256) +func (_ERC20TokenRemoteUpgradeable *ERC20TokenRemoteUpgradeableSession) MULTIHOPCALLREQUIREDGAS() (*big.Int, error) { + return _ERC20TokenRemoteUpgradeable.Contract.MULTIHOPCALLREQUIREDGAS(&_ERC20TokenRemoteUpgradeable.CallOpts) +} + +// MULTIHOPCALLREQUIREDGAS is a free data retrieval call binding the contract method 0x71717c18. +// +// Solidity: function MULTI_HOP_CALL_REQUIRED_GAS() view returns(uint256) +func (_ERC20TokenRemoteUpgradeable *ERC20TokenRemoteUpgradeableCallerSession) MULTIHOPCALLREQUIREDGAS() (*big.Int, error) { + return _ERC20TokenRemoteUpgradeable.Contract.MULTIHOPCALLREQUIREDGAS(&_ERC20TokenRemoteUpgradeable.CallOpts) +} + +// MULTIHOPSENDREQUIREDGAS is a free data retrieval call binding the contract method 0x5507f3d1. +// +// Solidity: function MULTI_HOP_SEND_REQUIRED_GAS() view returns(uint256) +func (_ERC20TokenRemoteUpgradeable *ERC20TokenRemoteUpgradeableCaller) MULTIHOPSENDREQUIREDGAS(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _ERC20TokenRemoteUpgradeable.contract.Call(opts, &out, "MULTI_HOP_SEND_REQUIRED_GAS") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// MULTIHOPSENDREQUIREDGAS is a free data retrieval call binding the contract method 0x5507f3d1. +// +// Solidity: function MULTI_HOP_SEND_REQUIRED_GAS() view returns(uint256) +func (_ERC20TokenRemoteUpgradeable *ERC20TokenRemoteUpgradeableSession) MULTIHOPSENDREQUIREDGAS() (*big.Int, error) { + return _ERC20TokenRemoteUpgradeable.Contract.MULTIHOPSENDREQUIREDGAS(&_ERC20TokenRemoteUpgradeable.CallOpts) +} + +// MULTIHOPSENDREQUIREDGAS is a free data retrieval call binding the contract method 0x5507f3d1. +// +// Solidity: function MULTI_HOP_SEND_REQUIRED_GAS() view returns(uint256) +func (_ERC20TokenRemoteUpgradeable *ERC20TokenRemoteUpgradeableCallerSession) MULTIHOPSENDREQUIREDGAS() (*big.Int, error) { + return _ERC20TokenRemoteUpgradeable.Contract.MULTIHOPSENDREQUIREDGAS(&_ERC20TokenRemoteUpgradeable.CallOpts) +} + +// REGISTERREMOTEREQUIREDGAS is a free data retrieval call binding the contract method 0x254ac160. +// +// Solidity: function REGISTER_REMOTE_REQUIRED_GAS() view returns(uint256) +func (_ERC20TokenRemoteUpgradeable *ERC20TokenRemoteUpgradeableCaller) REGISTERREMOTEREQUIREDGAS(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _ERC20TokenRemoteUpgradeable.contract.Call(opts, &out, "REGISTER_REMOTE_REQUIRED_GAS") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// REGISTERREMOTEREQUIREDGAS is a free data retrieval call binding the contract method 0x254ac160. +// +// Solidity: function REGISTER_REMOTE_REQUIRED_GAS() view returns(uint256) +func (_ERC20TokenRemoteUpgradeable *ERC20TokenRemoteUpgradeableSession) REGISTERREMOTEREQUIREDGAS() (*big.Int, error) { + return _ERC20TokenRemoteUpgradeable.Contract.REGISTERREMOTEREQUIREDGAS(&_ERC20TokenRemoteUpgradeable.CallOpts) +} + +// REGISTERREMOTEREQUIREDGAS is a free data retrieval call binding the contract method 0x254ac160. +// +// Solidity: function REGISTER_REMOTE_REQUIRED_GAS() view returns(uint256) +func (_ERC20TokenRemoteUpgradeable *ERC20TokenRemoteUpgradeableCallerSession) REGISTERREMOTEREQUIREDGAS() (*big.Int, error) { + return _ERC20TokenRemoteUpgradeable.Contract.REGISTERREMOTEREQUIREDGAS(&_ERC20TokenRemoteUpgradeable.CallOpts) +} + +// TELEPORTERREGISTRYAPPSTORAGELOCATION is a free data retrieval call binding the contract method 0x909a6ac0. +// +// Solidity: function TELEPORTER_REGISTRY_APP_STORAGE_LOCATION() view returns(bytes32) +func (_ERC20TokenRemoteUpgradeable *ERC20TokenRemoteUpgradeableCaller) TELEPORTERREGISTRYAPPSTORAGELOCATION(opts *bind.CallOpts) ([32]byte, error) { + var out []interface{} + err := _ERC20TokenRemoteUpgradeable.contract.Call(opts, &out, "TELEPORTER_REGISTRY_APP_STORAGE_LOCATION") + + if err != nil { + return *new([32]byte), err + } + + out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) + + return out0, err + +} + +// TELEPORTERREGISTRYAPPSTORAGELOCATION is a free data retrieval call binding the contract method 0x909a6ac0. +// +// Solidity: function TELEPORTER_REGISTRY_APP_STORAGE_LOCATION() view returns(bytes32) +func (_ERC20TokenRemoteUpgradeable *ERC20TokenRemoteUpgradeableSession) TELEPORTERREGISTRYAPPSTORAGELOCATION() ([32]byte, error) { + return _ERC20TokenRemoteUpgradeable.Contract.TELEPORTERREGISTRYAPPSTORAGELOCATION(&_ERC20TokenRemoteUpgradeable.CallOpts) +} + +// TELEPORTERREGISTRYAPPSTORAGELOCATION is a free data retrieval call binding the contract method 0x909a6ac0. +// +// Solidity: function TELEPORTER_REGISTRY_APP_STORAGE_LOCATION() view returns(bytes32) +func (_ERC20TokenRemoteUpgradeable *ERC20TokenRemoteUpgradeableCallerSession) TELEPORTERREGISTRYAPPSTORAGELOCATION() ([32]byte, error) { + return _ERC20TokenRemoteUpgradeable.Contract.TELEPORTERREGISTRYAPPSTORAGELOCATION(&_ERC20TokenRemoteUpgradeable.CallOpts) +} + +// TOKENREMOTESTORAGELOCATION is a free data retrieval call binding the contract method 0x35cac159. +// +// Solidity: function TOKEN_REMOTE_STORAGE_LOCATION() view returns(bytes32) +func (_ERC20TokenRemoteUpgradeable *ERC20TokenRemoteUpgradeableCaller) TOKENREMOTESTORAGELOCATION(opts *bind.CallOpts) ([32]byte, error) { + var out []interface{} + err := _ERC20TokenRemoteUpgradeable.contract.Call(opts, &out, "TOKEN_REMOTE_STORAGE_LOCATION") + + if err != nil { + return *new([32]byte), err + } + + out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) + + return out0, err + +} + +// TOKENREMOTESTORAGELOCATION is a free data retrieval call binding the contract method 0x35cac159. +// +// Solidity: function TOKEN_REMOTE_STORAGE_LOCATION() view returns(bytes32) +func (_ERC20TokenRemoteUpgradeable *ERC20TokenRemoteUpgradeableSession) TOKENREMOTESTORAGELOCATION() ([32]byte, error) { + return _ERC20TokenRemoteUpgradeable.Contract.TOKENREMOTESTORAGELOCATION(&_ERC20TokenRemoteUpgradeable.CallOpts) +} + +// TOKENREMOTESTORAGELOCATION is a free data retrieval call binding the contract method 0x35cac159. +// +// Solidity: function TOKEN_REMOTE_STORAGE_LOCATION() view returns(bytes32) +func (_ERC20TokenRemoteUpgradeable *ERC20TokenRemoteUpgradeableCallerSession) TOKENREMOTESTORAGELOCATION() ([32]byte, error) { + return _ERC20TokenRemoteUpgradeable.Contract.TOKENREMOTESTORAGELOCATION(&_ERC20TokenRemoteUpgradeable.CallOpts) +} + +// Allowance is a free data retrieval call binding the contract method 0xdd62ed3e. +// +// Solidity: function allowance(address owner, address spender) view returns(uint256) +func (_ERC20TokenRemoteUpgradeable *ERC20TokenRemoteUpgradeableCaller) Allowance(opts *bind.CallOpts, owner common.Address, spender common.Address) (*big.Int, error) { + var out []interface{} + err := _ERC20TokenRemoteUpgradeable.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 (_ERC20TokenRemoteUpgradeable *ERC20TokenRemoteUpgradeableSession) Allowance(owner common.Address, spender common.Address) (*big.Int, error) { + return _ERC20TokenRemoteUpgradeable.Contract.Allowance(&_ERC20TokenRemoteUpgradeable.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 (_ERC20TokenRemoteUpgradeable *ERC20TokenRemoteUpgradeableCallerSession) Allowance(owner common.Address, spender common.Address) (*big.Int, error) { + return _ERC20TokenRemoteUpgradeable.Contract.Allowance(&_ERC20TokenRemoteUpgradeable.CallOpts, owner, spender) +} + +// BalanceOf is a free data retrieval call binding the contract method 0x70a08231. +// +// Solidity: function balanceOf(address account) view returns(uint256) +func (_ERC20TokenRemoteUpgradeable *ERC20TokenRemoteUpgradeableCaller) BalanceOf(opts *bind.CallOpts, account common.Address) (*big.Int, error) { + var out []interface{} + err := _ERC20TokenRemoteUpgradeable.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 (_ERC20TokenRemoteUpgradeable *ERC20TokenRemoteUpgradeableSession) BalanceOf(account common.Address) (*big.Int, error) { + return _ERC20TokenRemoteUpgradeable.Contract.BalanceOf(&_ERC20TokenRemoteUpgradeable.CallOpts, account) +} + +// BalanceOf is a free data retrieval call binding the contract method 0x70a08231. +// +// Solidity: function balanceOf(address account) view returns(uint256) +func (_ERC20TokenRemoteUpgradeable *ERC20TokenRemoteUpgradeableCallerSession) BalanceOf(account common.Address) (*big.Int, error) { + return _ERC20TokenRemoteUpgradeable.Contract.BalanceOf(&_ERC20TokenRemoteUpgradeable.CallOpts, account) +} + +// CalculateNumWords is a free data retrieval call binding the contract method 0xf3f981d8. +// +// Solidity: function calculateNumWords(uint256 payloadSize) pure returns(uint256) +func (_ERC20TokenRemoteUpgradeable *ERC20TokenRemoteUpgradeableCaller) CalculateNumWords(opts *bind.CallOpts, payloadSize *big.Int) (*big.Int, error) { + var out []interface{} + err := _ERC20TokenRemoteUpgradeable.contract.Call(opts, &out, "calculateNumWords", payloadSize) + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// CalculateNumWords is a free data retrieval call binding the contract method 0xf3f981d8. +// +// Solidity: function calculateNumWords(uint256 payloadSize) pure returns(uint256) +func (_ERC20TokenRemoteUpgradeable *ERC20TokenRemoteUpgradeableSession) CalculateNumWords(payloadSize *big.Int) (*big.Int, error) { + return _ERC20TokenRemoteUpgradeable.Contract.CalculateNumWords(&_ERC20TokenRemoteUpgradeable.CallOpts, payloadSize) +} + +// CalculateNumWords is a free data retrieval call binding the contract method 0xf3f981d8. +// +// Solidity: function calculateNumWords(uint256 payloadSize) pure returns(uint256) +func (_ERC20TokenRemoteUpgradeable *ERC20TokenRemoteUpgradeableCallerSession) CalculateNumWords(payloadSize *big.Int) (*big.Int, error) { + return _ERC20TokenRemoteUpgradeable.Contract.CalculateNumWords(&_ERC20TokenRemoteUpgradeable.CallOpts, payloadSize) +} + +// Decimals is a free data retrieval call binding the contract method 0x313ce567. +// +// Solidity: function decimals() view returns(uint8) +func (_ERC20TokenRemoteUpgradeable *ERC20TokenRemoteUpgradeableCaller) Decimals(opts *bind.CallOpts) (uint8, error) { + var out []interface{} + err := _ERC20TokenRemoteUpgradeable.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 (_ERC20TokenRemoteUpgradeable *ERC20TokenRemoteUpgradeableSession) Decimals() (uint8, error) { + return _ERC20TokenRemoteUpgradeable.Contract.Decimals(&_ERC20TokenRemoteUpgradeable.CallOpts) +} + +// Decimals is a free data retrieval call binding the contract method 0x313ce567. +// +// Solidity: function decimals() view returns(uint8) +func (_ERC20TokenRemoteUpgradeable *ERC20TokenRemoteUpgradeableCallerSession) Decimals() (uint8, error) { + return _ERC20TokenRemoteUpgradeable.Contract.Decimals(&_ERC20TokenRemoteUpgradeable.CallOpts) +} + +// GetBlockchainID is a free data retrieval call binding the contract method 0x4213cf78. +// +// Solidity: function getBlockchainID() view returns(bytes32) +func (_ERC20TokenRemoteUpgradeable *ERC20TokenRemoteUpgradeableCaller) GetBlockchainID(opts *bind.CallOpts) ([32]byte, error) { + var out []interface{} + err := _ERC20TokenRemoteUpgradeable.contract.Call(opts, &out, "getBlockchainID") + + if err != nil { + return *new([32]byte), err + } + + out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) + + return out0, err + +} + +// GetBlockchainID is a free data retrieval call binding the contract method 0x4213cf78. +// +// Solidity: function getBlockchainID() view returns(bytes32) +func (_ERC20TokenRemoteUpgradeable *ERC20TokenRemoteUpgradeableSession) GetBlockchainID() ([32]byte, error) { + return _ERC20TokenRemoteUpgradeable.Contract.GetBlockchainID(&_ERC20TokenRemoteUpgradeable.CallOpts) +} + +// GetBlockchainID is a free data retrieval call binding the contract method 0x4213cf78. +// +// Solidity: function getBlockchainID() view returns(bytes32) +func (_ERC20TokenRemoteUpgradeable *ERC20TokenRemoteUpgradeableCallerSession) GetBlockchainID() ([32]byte, error) { + return _ERC20TokenRemoteUpgradeable.Contract.GetBlockchainID(&_ERC20TokenRemoteUpgradeable.CallOpts) +} + +// GetInitialReserveImbalance is a free data retrieval call binding the contract method 0xef793e2a. +// +// Solidity: function getInitialReserveImbalance() view returns(uint256) +func (_ERC20TokenRemoteUpgradeable *ERC20TokenRemoteUpgradeableCaller) GetInitialReserveImbalance(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _ERC20TokenRemoteUpgradeable.contract.Call(opts, &out, "getInitialReserveImbalance") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// GetInitialReserveImbalance is a free data retrieval call binding the contract method 0xef793e2a. +// +// Solidity: function getInitialReserveImbalance() view returns(uint256) +func (_ERC20TokenRemoteUpgradeable *ERC20TokenRemoteUpgradeableSession) GetInitialReserveImbalance() (*big.Int, error) { + return _ERC20TokenRemoteUpgradeable.Contract.GetInitialReserveImbalance(&_ERC20TokenRemoteUpgradeable.CallOpts) +} + +// GetInitialReserveImbalance is a free data retrieval call binding the contract method 0xef793e2a. +// +// Solidity: function getInitialReserveImbalance() view returns(uint256) +func (_ERC20TokenRemoteUpgradeable *ERC20TokenRemoteUpgradeableCallerSession) GetInitialReserveImbalance() (*big.Int, error) { + return _ERC20TokenRemoteUpgradeable.Contract.GetInitialReserveImbalance(&_ERC20TokenRemoteUpgradeable.CallOpts) +} + +// GetIsCollateralized is a free data retrieval call binding the contract method 0x02a30c7d. +// +// Solidity: function getIsCollateralized() view returns(bool) +func (_ERC20TokenRemoteUpgradeable *ERC20TokenRemoteUpgradeableCaller) GetIsCollateralized(opts *bind.CallOpts) (bool, error) { + var out []interface{} + err := _ERC20TokenRemoteUpgradeable.contract.Call(opts, &out, "getIsCollateralized") + + if err != nil { + return *new(bool), err + } + + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + + return out0, err + +} + +// GetIsCollateralized is a free data retrieval call binding the contract method 0x02a30c7d. +// +// Solidity: function getIsCollateralized() view returns(bool) +func (_ERC20TokenRemoteUpgradeable *ERC20TokenRemoteUpgradeableSession) GetIsCollateralized() (bool, error) { + return _ERC20TokenRemoteUpgradeable.Contract.GetIsCollateralized(&_ERC20TokenRemoteUpgradeable.CallOpts) +} + +// GetIsCollateralized is a free data retrieval call binding the contract method 0x02a30c7d. +// +// Solidity: function getIsCollateralized() view returns(bool) +func (_ERC20TokenRemoteUpgradeable *ERC20TokenRemoteUpgradeableCallerSession) GetIsCollateralized() (bool, error) { + return _ERC20TokenRemoteUpgradeable.Contract.GetIsCollateralized(&_ERC20TokenRemoteUpgradeable.CallOpts) +} + +// GetMinTeleporterVersion is a free data retrieval call binding the contract method 0xd2cc7a70. +// +// Solidity: function getMinTeleporterVersion() view returns(uint256) +func (_ERC20TokenRemoteUpgradeable *ERC20TokenRemoteUpgradeableCaller) GetMinTeleporterVersion(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _ERC20TokenRemoteUpgradeable.contract.Call(opts, &out, "getMinTeleporterVersion") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// GetMinTeleporterVersion is a free data retrieval call binding the contract method 0xd2cc7a70. +// +// Solidity: function getMinTeleporterVersion() view returns(uint256) +func (_ERC20TokenRemoteUpgradeable *ERC20TokenRemoteUpgradeableSession) GetMinTeleporterVersion() (*big.Int, error) { + return _ERC20TokenRemoteUpgradeable.Contract.GetMinTeleporterVersion(&_ERC20TokenRemoteUpgradeable.CallOpts) +} + +// GetMinTeleporterVersion is a free data retrieval call binding the contract method 0xd2cc7a70. +// +// Solidity: function getMinTeleporterVersion() view returns(uint256) +func (_ERC20TokenRemoteUpgradeable *ERC20TokenRemoteUpgradeableCallerSession) GetMinTeleporterVersion() (*big.Int, error) { + return _ERC20TokenRemoteUpgradeable.Contract.GetMinTeleporterVersion(&_ERC20TokenRemoteUpgradeable.CallOpts) +} + +// GetMultiplyOnRemote is a free data retrieval call binding the contract method 0x7ee3779a. +// +// Solidity: function getMultiplyOnRemote() view returns(bool) +func (_ERC20TokenRemoteUpgradeable *ERC20TokenRemoteUpgradeableCaller) GetMultiplyOnRemote(opts *bind.CallOpts) (bool, error) { + var out []interface{} + err := _ERC20TokenRemoteUpgradeable.contract.Call(opts, &out, "getMultiplyOnRemote") + + if err != nil { + return *new(bool), err + } + + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + + return out0, err + +} + +// GetMultiplyOnRemote is a free data retrieval call binding the contract method 0x7ee3779a. +// +// Solidity: function getMultiplyOnRemote() view returns(bool) +func (_ERC20TokenRemoteUpgradeable *ERC20TokenRemoteUpgradeableSession) GetMultiplyOnRemote() (bool, error) { + return _ERC20TokenRemoteUpgradeable.Contract.GetMultiplyOnRemote(&_ERC20TokenRemoteUpgradeable.CallOpts) +} + +// GetMultiplyOnRemote is a free data retrieval call binding the contract method 0x7ee3779a. +// +// Solidity: function getMultiplyOnRemote() view returns(bool) +func (_ERC20TokenRemoteUpgradeable *ERC20TokenRemoteUpgradeableCallerSession) GetMultiplyOnRemote() (bool, error) { + return _ERC20TokenRemoteUpgradeable.Contract.GetMultiplyOnRemote(&_ERC20TokenRemoteUpgradeable.CallOpts) +} + +// GetTokenHomeAddress is a free data retrieval call binding the contract method 0xc3cd6927. +// +// Solidity: function getTokenHomeAddress() view returns(address) +func (_ERC20TokenRemoteUpgradeable *ERC20TokenRemoteUpgradeableCaller) GetTokenHomeAddress(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _ERC20TokenRemoteUpgradeable.contract.Call(opts, &out, "getTokenHomeAddress") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// GetTokenHomeAddress is a free data retrieval call binding the contract method 0xc3cd6927. +// +// Solidity: function getTokenHomeAddress() view returns(address) +func (_ERC20TokenRemoteUpgradeable *ERC20TokenRemoteUpgradeableSession) GetTokenHomeAddress() (common.Address, error) { + return _ERC20TokenRemoteUpgradeable.Contract.GetTokenHomeAddress(&_ERC20TokenRemoteUpgradeable.CallOpts) +} + +// GetTokenHomeAddress is a free data retrieval call binding the contract method 0xc3cd6927. +// +// Solidity: function getTokenHomeAddress() view returns(address) +func (_ERC20TokenRemoteUpgradeable *ERC20TokenRemoteUpgradeableCallerSession) GetTokenHomeAddress() (common.Address, error) { + return _ERC20TokenRemoteUpgradeable.Contract.GetTokenHomeAddress(&_ERC20TokenRemoteUpgradeable.CallOpts) +} + +// GetTokenHomeBlockchainID is a free data retrieval call binding the contract method 0xe0fd9cb8. +// +// Solidity: function getTokenHomeBlockchainID() view returns(bytes32) +func (_ERC20TokenRemoteUpgradeable *ERC20TokenRemoteUpgradeableCaller) GetTokenHomeBlockchainID(opts *bind.CallOpts) ([32]byte, error) { + var out []interface{} + err := _ERC20TokenRemoteUpgradeable.contract.Call(opts, &out, "getTokenHomeBlockchainID") + + if err != nil { + return *new([32]byte), err + } + + out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) + + return out0, err + +} + +// GetTokenHomeBlockchainID is a free data retrieval call binding the contract method 0xe0fd9cb8. +// +// Solidity: function getTokenHomeBlockchainID() view returns(bytes32) +func (_ERC20TokenRemoteUpgradeable *ERC20TokenRemoteUpgradeableSession) GetTokenHomeBlockchainID() ([32]byte, error) { + return _ERC20TokenRemoteUpgradeable.Contract.GetTokenHomeBlockchainID(&_ERC20TokenRemoteUpgradeable.CallOpts) +} + +// GetTokenHomeBlockchainID is a free data retrieval call binding the contract method 0xe0fd9cb8. +// +// Solidity: function getTokenHomeBlockchainID() view returns(bytes32) +func (_ERC20TokenRemoteUpgradeable *ERC20TokenRemoteUpgradeableCallerSession) GetTokenHomeBlockchainID() ([32]byte, error) { + return _ERC20TokenRemoteUpgradeable.Contract.GetTokenHomeBlockchainID(&_ERC20TokenRemoteUpgradeable.CallOpts) +} + +// GetTokenMultiplier is a free data retrieval call binding the contract method 0x0733c8c8. +// +// Solidity: function getTokenMultiplier() view returns(uint256) +func (_ERC20TokenRemoteUpgradeable *ERC20TokenRemoteUpgradeableCaller) GetTokenMultiplier(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _ERC20TokenRemoteUpgradeable.contract.Call(opts, &out, "getTokenMultiplier") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// GetTokenMultiplier is a free data retrieval call binding the contract method 0x0733c8c8. +// +// Solidity: function getTokenMultiplier() view returns(uint256) +func (_ERC20TokenRemoteUpgradeable *ERC20TokenRemoteUpgradeableSession) GetTokenMultiplier() (*big.Int, error) { + return _ERC20TokenRemoteUpgradeable.Contract.GetTokenMultiplier(&_ERC20TokenRemoteUpgradeable.CallOpts) +} + +// GetTokenMultiplier is a free data retrieval call binding the contract method 0x0733c8c8. +// +// Solidity: function getTokenMultiplier() view returns(uint256) +func (_ERC20TokenRemoteUpgradeable *ERC20TokenRemoteUpgradeableCallerSession) GetTokenMultiplier() (*big.Int, error) { + return _ERC20TokenRemoteUpgradeable.Contract.GetTokenMultiplier(&_ERC20TokenRemoteUpgradeable.CallOpts) +} + +// IsTeleporterAddressPaused is a free data retrieval call binding the contract method 0x97314297. +// +// Solidity: function isTeleporterAddressPaused(address teleporterAddress) view returns(bool) +func (_ERC20TokenRemoteUpgradeable *ERC20TokenRemoteUpgradeableCaller) IsTeleporterAddressPaused(opts *bind.CallOpts, teleporterAddress common.Address) (bool, error) { + var out []interface{} + err := _ERC20TokenRemoteUpgradeable.contract.Call(opts, &out, "isTeleporterAddressPaused", teleporterAddress) + + if err != nil { + return *new(bool), err + } + + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + + return out0, err + +} + +// IsTeleporterAddressPaused is a free data retrieval call binding the contract method 0x97314297. +// +// Solidity: function isTeleporterAddressPaused(address teleporterAddress) view returns(bool) +func (_ERC20TokenRemoteUpgradeable *ERC20TokenRemoteUpgradeableSession) IsTeleporterAddressPaused(teleporterAddress common.Address) (bool, error) { + return _ERC20TokenRemoteUpgradeable.Contract.IsTeleporterAddressPaused(&_ERC20TokenRemoteUpgradeable.CallOpts, teleporterAddress) +} + +// IsTeleporterAddressPaused is a free data retrieval call binding the contract method 0x97314297. +// +// Solidity: function isTeleporterAddressPaused(address teleporterAddress) view returns(bool) +func (_ERC20TokenRemoteUpgradeable *ERC20TokenRemoteUpgradeableCallerSession) IsTeleporterAddressPaused(teleporterAddress common.Address) (bool, error) { + return _ERC20TokenRemoteUpgradeable.Contract.IsTeleporterAddressPaused(&_ERC20TokenRemoteUpgradeable.CallOpts, teleporterAddress) +} + +// Name is a free data retrieval call binding the contract method 0x06fdde03. +// +// Solidity: function name() view returns(string) +func (_ERC20TokenRemoteUpgradeable *ERC20TokenRemoteUpgradeableCaller) Name(opts *bind.CallOpts) (string, error) { + var out []interface{} + err := _ERC20TokenRemoteUpgradeable.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 (_ERC20TokenRemoteUpgradeable *ERC20TokenRemoteUpgradeableSession) Name() (string, error) { + return _ERC20TokenRemoteUpgradeable.Contract.Name(&_ERC20TokenRemoteUpgradeable.CallOpts) +} + +// Name is a free data retrieval call binding the contract method 0x06fdde03. +// +// Solidity: function name() view returns(string) +func (_ERC20TokenRemoteUpgradeable *ERC20TokenRemoteUpgradeableCallerSession) Name() (string, error) { + return _ERC20TokenRemoteUpgradeable.Contract.Name(&_ERC20TokenRemoteUpgradeable.CallOpts) +} + +// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. +// +// Solidity: function owner() view returns(address) +func (_ERC20TokenRemoteUpgradeable *ERC20TokenRemoteUpgradeableCaller) Owner(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _ERC20TokenRemoteUpgradeable.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 (_ERC20TokenRemoteUpgradeable *ERC20TokenRemoteUpgradeableSession) Owner() (common.Address, error) { + return _ERC20TokenRemoteUpgradeable.Contract.Owner(&_ERC20TokenRemoteUpgradeable.CallOpts) +} + +// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. +// +// Solidity: function owner() view returns(address) +func (_ERC20TokenRemoteUpgradeable *ERC20TokenRemoteUpgradeableCallerSession) Owner() (common.Address, error) { + return _ERC20TokenRemoteUpgradeable.Contract.Owner(&_ERC20TokenRemoteUpgradeable.CallOpts) +} + +// Symbol is a free data retrieval call binding the contract method 0x95d89b41. +// +// Solidity: function symbol() view returns(string) +func (_ERC20TokenRemoteUpgradeable *ERC20TokenRemoteUpgradeableCaller) Symbol(opts *bind.CallOpts) (string, error) { + var out []interface{} + err := _ERC20TokenRemoteUpgradeable.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 (_ERC20TokenRemoteUpgradeable *ERC20TokenRemoteUpgradeableSession) Symbol() (string, error) { + return _ERC20TokenRemoteUpgradeable.Contract.Symbol(&_ERC20TokenRemoteUpgradeable.CallOpts) +} + +// Symbol is a free data retrieval call binding the contract method 0x95d89b41. +// +// Solidity: function symbol() view returns(string) +func (_ERC20TokenRemoteUpgradeable *ERC20TokenRemoteUpgradeableCallerSession) Symbol() (string, error) { + return _ERC20TokenRemoteUpgradeable.Contract.Symbol(&_ERC20TokenRemoteUpgradeable.CallOpts) +} + +// TotalSupply is a free data retrieval call binding the contract method 0x18160ddd. +// +// Solidity: function totalSupply() view returns(uint256) +func (_ERC20TokenRemoteUpgradeable *ERC20TokenRemoteUpgradeableCaller) TotalSupply(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _ERC20TokenRemoteUpgradeable.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 (_ERC20TokenRemoteUpgradeable *ERC20TokenRemoteUpgradeableSession) TotalSupply() (*big.Int, error) { + return _ERC20TokenRemoteUpgradeable.Contract.TotalSupply(&_ERC20TokenRemoteUpgradeable.CallOpts) +} + +// TotalSupply is a free data retrieval call binding the contract method 0x18160ddd. +// +// Solidity: function totalSupply() view returns(uint256) +func (_ERC20TokenRemoteUpgradeable *ERC20TokenRemoteUpgradeableCallerSession) TotalSupply() (*big.Int, error) { + return _ERC20TokenRemoteUpgradeable.Contract.TotalSupply(&_ERC20TokenRemoteUpgradeable.CallOpts) +} + +// Approve is a paid mutator transaction binding the contract method 0x095ea7b3. +// +// Solidity: function approve(address spender, uint256 value) returns(bool) +func (_ERC20TokenRemoteUpgradeable *ERC20TokenRemoteUpgradeableTransactor) Approve(opts *bind.TransactOpts, spender common.Address, value *big.Int) (*types.Transaction, error) { + return _ERC20TokenRemoteUpgradeable.contract.Transact(opts, "approve", spender, value) +} + +// Approve is a paid mutator transaction binding the contract method 0x095ea7b3. +// +// Solidity: function approve(address spender, uint256 value) returns(bool) +func (_ERC20TokenRemoteUpgradeable *ERC20TokenRemoteUpgradeableSession) Approve(spender common.Address, value *big.Int) (*types.Transaction, error) { + return _ERC20TokenRemoteUpgradeable.Contract.Approve(&_ERC20TokenRemoteUpgradeable.TransactOpts, spender, value) +} + +// Approve is a paid mutator transaction binding the contract method 0x095ea7b3. +// +// Solidity: function approve(address spender, uint256 value) returns(bool) +func (_ERC20TokenRemoteUpgradeable *ERC20TokenRemoteUpgradeableTransactorSession) Approve(spender common.Address, value *big.Int) (*types.Transaction, error) { + return _ERC20TokenRemoteUpgradeable.Contract.Approve(&_ERC20TokenRemoteUpgradeable.TransactOpts, spender, value) +} + +// Initialize is a paid mutator transaction binding the contract method 0xc9fe4ddf. +// +// Solidity: function initialize((address,address,uint256,bytes32,address,uint8) settings, string tokenName, string tokenSymbol, uint8 tokenDecimals) returns() +func (_ERC20TokenRemoteUpgradeable *ERC20TokenRemoteUpgradeableTransactor) Initialize(opts *bind.TransactOpts, settings TokenRemoteSettings, tokenName string, tokenSymbol string, tokenDecimals uint8) (*types.Transaction, error) { + return _ERC20TokenRemoteUpgradeable.contract.Transact(opts, "initialize", settings, tokenName, tokenSymbol, tokenDecimals) +} + +// Initialize is a paid mutator transaction binding the contract method 0xc9fe4ddf. +// +// Solidity: function initialize((address,address,uint256,bytes32,address,uint8) settings, string tokenName, string tokenSymbol, uint8 tokenDecimals) returns() +func (_ERC20TokenRemoteUpgradeable *ERC20TokenRemoteUpgradeableSession) Initialize(settings TokenRemoteSettings, tokenName string, tokenSymbol string, tokenDecimals uint8) (*types.Transaction, error) { + return _ERC20TokenRemoteUpgradeable.Contract.Initialize(&_ERC20TokenRemoteUpgradeable.TransactOpts, settings, tokenName, tokenSymbol, tokenDecimals) +} + +// Initialize is a paid mutator transaction binding the contract method 0xc9fe4ddf. +// +// Solidity: function initialize((address,address,uint256,bytes32,address,uint8) settings, string tokenName, string tokenSymbol, uint8 tokenDecimals) returns() +func (_ERC20TokenRemoteUpgradeable *ERC20TokenRemoteUpgradeableTransactorSession) Initialize(settings TokenRemoteSettings, tokenName string, tokenSymbol string, tokenDecimals uint8) (*types.Transaction, error) { + return _ERC20TokenRemoteUpgradeable.Contract.Initialize(&_ERC20TokenRemoteUpgradeable.TransactOpts, settings, tokenName, tokenSymbol, tokenDecimals) +} + +// PauseTeleporterAddress is a paid mutator transaction binding the contract method 0x2b0d8f18. +// +// Solidity: function pauseTeleporterAddress(address teleporterAddress) returns() +func (_ERC20TokenRemoteUpgradeable *ERC20TokenRemoteUpgradeableTransactor) PauseTeleporterAddress(opts *bind.TransactOpts, teleporterAddress common.Address) (*types.Transaction, error) { + return _ERC20TokenRemoteUpgradeable.contract.Transact(opts, "pauseTeleporterAddress", teleporterAddress) +} + +// PauseTeleporterAddress is a paid mutator transaction binding the contract method 0x2b0d8f18. +// +// Solidity: function pauseTeleporterAddress(address teleporterAddress) returns() +func (_ERC20TokenRemoteUpgradeable *ERC20TokenRemoteUpgradeableSession) PauseTeleporterAddress(teleporterAddress common.Address) (*types.Transaction, error) { + return _ERC20TokenRemoteUpgradeable.Contract.PauseTeleporterAddress(&_ERC20TokenRemoteUpgradeable.TransactOpts, teleporterAddress) +} + +// PauseTeleporterAddress is a paid mutator transaction binding the contract method 0x2b0d8f18. +// +// Solidity: function pauseTeleporterAddress(address teleporterAddress) returns() +func (_ERC20TokenRemoteUpgradeable *ERC20TokenRemoteUpgradeableTransactorSession) PauseTeleporterAddress(teleporterAddress common.Address) (*types.Transaction, error) { + return _ERC20TokenRemoteUpgradeable.Contract.PauseTeleporterAddress(&_ERC20TokenRemoteUpgradeable.TransactOpts, teleporterAddress) +} + +// ReceiveTeleporterMessage is a paid mutator transaction binding the contract method 0xc868efaa. +// +// Solidity: function receiveTeleporterMessage(bytes32 sourceBlockchainID, address originSenderAddress, bytes message) returns() +func (_ERC20TokenRemoteUpgradeable *ERC20TokenRemoteUpgradeableTransactor) ReceiveTeleporterMessage(opts *bind.TransactOpts, sourceBlockchainID [32]byte, originSenderAddress common.Address, message []byte) (*types.Transaction, error) { + return _ERC20TokenRemoteUpgradeable.contract.Transact(opts, "receiveTeleporterMessage", sourceBlockchainID, originSenderAddress, message) +} + +// ReceiveTeleporterMessage is a paid mutator transaction binding the contract method 0xc868efaa. +// +// Solidity: function receiveTeleporterMessage(bytes32 sourceBlockchainID, address originSenderAddress, bytes message) returns() +func (_ERC20TokenRemoteUpgradeable *ERC20TokenRemoteUpgradeableSession) ReceiveTeleporterMessage(sourceBlockchainID [32]byte, originSenderAddress common.Address, message []byte) (*types.Transaction, error) { + return _ERC20TokenRemoteUpgradeable.Contract.ReceiveTeleporterMessage(&_ERC20TokenRemoteUpgradeable.TransactOpts, sourceBlockchainID, originSenderAddress, message) +} + +// ReceiveTeleporterMessage is a paid mutator transaction binding the contract method 0xc868efaa. +// +// Solidity: function receiveTeleporterMessage(bytes32 sourceBlockchainID, address originSenderAddress, bytes message) returns() +func (_ERC20TokenRemoteUpgradeable *ERC20TokenRemoteUpgradeableTransactorSession) ReceiveTeleporterMessage(sourceBlockchainID [32]byte, originSenderAddress common.Address, message []byte) (*types.Transaction, error) { + return _ERC20TokenRemoteUpgradeable.Contract.ReceiveTeleporterMessage(&_ERC20TokenRemoteUpgradeable.TransactOpts, sourceBlockchainID, originSenderAddress, message) +} + +// RegisterWithHome is a paid mutator transaction binding the contract method 0xb8a46d02. +// +// Solidity: function registerWithHome((address,uint256) feeInfo) returns() +func (_ERC20TokenRemoteUpgradeable *ERC20TokenRemoteUpgradeableTransactor) RegisterWithHome(opts *bind.TransactOpts, feeInfo TeleporterFeeInfo) (*types.Transaction, error) { + return _ERC20TokenRemoteUpgradeable.contract.Transact(opts, "registerWithHome", feeInfo) +} + +// RegisterWithHome is a paid mutator transaction binding the contract method 0xb8a46d02. +// +// Solidity: function registerWithHome((address,uint256) feeInfo) returns() +func (_ERC20TokenRemoteUpgradeable *ERC20TokenRemoteUpgradeableSession) RegisterWithHome(feeInfo TeleporterFeeInfo) (*types.Transaction, error) { + return _ERC20TokenRemoteUpgradeable.Contract.RegisterWithHome(&_ERC20TokenRemoteUpgradeable.TransactOpts, feeInfo) +} + +// RegisterWithHome is a paid mutator transaction binding the contract method 0xb8a46d02. +// +// Solidity: function registerWithHome((address,uint256) feeInfo) returns() +func (_ERC20TokenRemoteUpgradeable *ERC20TokenRemoteUpgradeableTransactorSession) RegisterWithHome(feeInfo TeleporterFeeInfo) (*types.Transaction, error) { + return _ERC20TokenRemoteUpgradeable.Contract.RegisterWithHome(&_ERC20TokenRemoteUpgradeable.TransactOpts, feeInfo) +} + +// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. +// +// Solidity: function renounceOwnership() returns() +func (_ERC20TokenRemoteUpgradeable *ERC20TokenRemoteUpgradeableTransactor) RenounceOwnership(opts *bind.TransactOpts) (*types.Transaction, error) { + return _ERC20TokenRemoteUpgradeable.contract.Transact(opts, "renounceOwnership") +} + +// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. +// +// Solidity: function renounceOwnership() returns() +func (_ERC20TokenRemoteUpgradeable *ERC20TokenRemoteUpgradeableSession) RenounceOwnership() (*types.Transaction, error) { + return _ERC20TokenRemoteUpgradeable.Contract.RenounceOwnership(&_ERC20TokenRemoteUpgradeable.TransactOpts) +} + +// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. +// +// Solidity: function renounceOwnership() returns() +func (_ERC20TokenRemoteUpgradeable *ERC20TokenRemoteUpgradeableTransactorSession) RenounceOwnership() (*types.Transaction, error) { + return _ERC20TokenRemoteUpgradeable.Contract.RenounceOwnership(&_ERC20TokenRemoteUpgradeable.TransactOpts) +} + +// Send is a paid mutator transaction binding the contract method 0x5d16225d. +// +// Solidity: function send((bytes32,address,address,address,uint256,uint256,uint256,address) input, uint256 amount) returns() +func (_ERC20TokenRemoteUpgradeable *ERC20TokenRemoteUpgradeableTransactor) Send(opts *bind.TransactOpts, input SendTokensInput, amount *big.Int) (*types.Transaction, error) { + return _ERC20TokenRemoteUpgradeable.contract.Transact(opts, "send", input, amount) +} + +// Send is a paid mutator transaction binding the contract method 0x5d16225d. +// +// Solidity: function send((bytes32,address,address,address,uint256,uint256,uint256,address) input, uint256 amount) returns() +func (_ERC20TokenRemoteUpgradeable *ERC20TokenRemoteUpgradeableSession) Send(input SendTokensInput, amount *big.Int) (*types.Transaction, error) { + return _ERC20TokenRemoteUpgradeable.Contract.Send(&_ERC20TokenRemoteUpgradeable.TransactOpts, input, amount) +} + +// Send is a paid mutator transaction binding the contract method 0x5d16225d. +// +// Solidity: function send((bytes32,address,address,address,uint256,uint256,uint256,address) input, uint256 amount) returns() +func (_ERC20TokenRemoteUpgradeable *ERC20TokenRemoteUpgradeableTransactorSession) Send(input SendTokensInput, amount *big.Int) (*types.Transaction, error) { + return _ERC20TokenRemoteUpgradeable.Contract.Send(&_ERC20TokenRemoteUpgradeable.TransactOpts, input, amount) +} + +// SendAndCall is a paid mutator transaction binding the contract method 0x65690038. +// +// Solidity: function sendAndCall((bytes32,address,address,bytes,uint256,uint256,address,address,address,uint256,uint256) input, uint256 amount) returns() +func (_ERC20TokenRemoteUpgradeable *ERC20TokenRemoteUpgradeableTransactor) SendAndCall(opts *bind.TransactOpts, input SendAndCallInput, amount *big.Int) (*types.Transaction, error) { + return _ERC20TokenRemoteUpgradeable.contract.Transact(opts, "sendAndCall", input, amount) +} + +// SendAndCall is a paid mutator transaction binding the contract method 0x65690038. +// +// Solidity: function sendAndCall((bytes32,address,address,bytes,uint256,uint256,address,address,address,uint256,uint256) input, uint256 amount) returns() +func (_ERC20TokenRemoteUpgradeable *ERC20TokenRemoteUpgradeableSession) SendAndCall(input SendAndCallInput, amount *big.Int) (*types.Transaction, error) { + return _ERC20TokenRemoteUpgradeable.Contract.SendAndCall(&_ERC20TokenRemoteUpgradeable.TransactOpts, input, amount) +} + +// SendAndCall is a paid mutator transaction binding the contract method 0x65690038. +// +// Solidity: function sendAndCall((bytes32,address,address,bytes,uint256,uint256,address,address,address,uint256,uint256) input, uint256 amount) returns() +func (_ERC20TokenRemoteUpgradeable *ERC20TokenRemoteUpgradeableTransactorSession) SendAndCall(input SendAndCallInput, amount *big.Int) (*types.Transaction, error) { + return _ERC20TokenRemoteUpgradeable.Contract.SendAndCall(&_ERC20TokenRemoteUpgradeable.TransactOpts, input, amount) +} + +// Transfer is a paid mutator transaction binding the contract method 0xa9059cbb. +// +// Solidity: function transfer(address to, uint256 value) returns(bool) +func (_ERC20TokenRemoteUpgradeable *ERC20TokenRemoteUpgradeableTransactor) Transfer(opts *bind.TransactOpts, to common.Address, value *big.Int) (*types.Transaction, error) { + return _ERC20TokenRemoteUpgradeable.contract.Transact(opts, "transfer", to, value) +} + +// Transfer is a paid mutator transaction binding the contract method 0xa9059cbb. +// +// Solidity: function transfer(address to, uint256 value) returns(bool) +func (_ERC20TokenRemoteUpgradeable *ERC20TokenRemoteUpgradeableSession) Transfer(to common.Address, value *big.Int) (*types.Transaction, error) { + return _ERC20TokenRemoteUpgradeable.Contract.Transfer(&_ERC20TokenRemoteUpgradeable.TransactOpts, to, value) +} + +// Transfer is a paid mutator transaction binding the contract method 0xa9059cbb. +// +// Solidity: function transfer(address to, uint256 value) returns(bool) +func (_ERC20TokenRemoteUpgradeable *ERC20TokenRemoteUpgradeableTransactorSession) Transfer(to common.Address, value *big.Int) (*types.Transaction, error) { + return _ERC20TokenRemoteUpgradeable.Contract.Transfer(&_ERC20TokenRemoteUpgradeable.TransactOpts, to, value) +} + +// TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd. +// +// Solidity: function transferFrom(address from, address to, uint256 value) returns(bool) +func (_ERC20TokenRemoteUpgradeable *ERC20TokenRemoteUpgradeableTransactor) TransferFrom(opts *bind.TransactOpts, from common.Address, to common.Address, value *big.Int) (*types.Transaction, error) { + return _ERC20TokenRemoteUpgradeable.contract.Transact(opts, "transferFrom", from, to, value) +} + +// TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd. +// +// Solidity: function transferFrom(address from, address to, uint256 value) returns(bool) +func (_ERC20TokenRemoteUpgradeable *ERC20TokenRemoteUpgradeableSession) TransferFrom(from common.Address, to common.Address, value *big.Int) (*types.Transaction, error) { + return _ERC20TokenRemoteUpgradeable.Contract.TransferFrom(&_ERC20TokenRemoteUpgradeable.TransactOpts, from, to, value) +} + +// TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd. +// +// Solidity: function transferFrom(address from, address to, uint256 value) returns(bool) +func (_ERC20TokenRemoteUpgradeable *ERC20TokenRemoteUpgradeableTransactorSession) TransferFrom(from common.Address, to common.Address, value *big.Int) (*types.Transaction, error) { + return _ERC20TokenRemoteUpgradeable.Contract.TransferFrom(&_ERC20TokenRemoteUpgradeable.TransactOpts, from, to, value) +} + +// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// +// Solidity: function transferOwnership(address newOwner) returns() +func (_ERC20TokenRemoteUpgradeable *ERC20TokenRemoteUpgradeableTransactor) TransferOwnership(opts *bind.TransactOpts, newOwner common.Address) (*types.Transaction, error) { + return _ERC20TokenRemoteUpgradeable.contract.Transact(opts, "transferOwnership", newOwner) +} + +// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// +// Solidity: function transferOwnership(address newOwner) returns() +func (_ERC20TokenRemoteUpgradeable *ERC20TokenRemoteUpgradeableSession) TransferOwnership(newOwner common.Address) (*types.Transaction, error) { + return _ERC20TokenRemoteUpgradeable.Contract.TransferOwnership(&_ERC20TokenRemoteUpgradeable.TransactOpts, newOwner) +} + +// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// +// Solidity: function transferOwnership(address newOwner) returns() +func (_ERC20TokenRemoteUpgradeable *ERC20TokenRemoteUpgradeableTransactorSession) TransferOwnership(newOwner common.Address) (*types.Transaction, error) { + return _ERC20TokenRemoteUpgradeable.Contract.TransferOwnership(&_ERC20TokenRemoteUpgradeable.TransactOpts, newOwner) +} + +// UnpauseTeleporterAddress is a paid mutator transaction binding the contract method 0x4511243e. +// +// Solidity: function unpauseTeleporterAddress(address teleporterAddress) returns() +func (_ERC20TokenRemoteUpgradeable *ERC20TokenRemoteUpgradeableTransactor) UnpauseTeleporterAddress(opts *bind.TransactOpts, teleporterAddress common.Address) (*types.Transaction, error) { + return _ERC20TokenRemoteUpgradeable.contract.Transact(opts, "unpauseTeleporterAddress", teleporterAddress) +} + +// UnpauseTeleporterAddress is a paid mutator transaction binding the contract method 0x4511243e. +// +// Solidity: function unpauseTeleporterAddress(address teleporterAddress) returns() +func (_ERC20TokenRemoteUpgradeable *ERC20TokenRemoteUpgradeableSession) UnpauseTeleporterAddress(teleporterAddress common.Address) (*types.Transaction, error) { + return _ERC20TokenRemoteUpgradeable.Contract.UnpauseTeleporterAddress(&_ERC20TokenRemoteUpgradeable.TransactOpts, teleporterAddress) +} + +// UnpauseTeleporterAddress is a paid mutator transaction binding the contract method 0x4511243e. +// +// Solidity: function unpauseTeleporterAddress(address teleporterAddress) returns() +func (_ERC20TokenRemoteUpgradeable *ERC20TokenRemoteUpgradeableTransactorSession) UnpauseTeleporterAddress(teleporterAddress common.Address) (*types.Transaction, error) { + return _ERC20TokenRemoteUpgradeable.Contract.UnpauseTeleporterAddress(&_ERC20TokenRemoteUpgradeable.TransactOpts, teleporterAddress) +} + +// UpdateMinTeleporterVersion is a paid mutator transaction binding the contract method 0x5eb99514. +// +// Solidity: function updateMinTeleporterVersion(uint256 version) returns() +func (_ERC20TokenRemoteUpgradeable *ERC20TokenRemoteUpgradeableTransactor) UpdateMinTeleporterVersion(opts *bind.TransactOpts, version *big.Int) (*types.Transaction, error) { + return _ERC20TokenRemoteUpgradeable.contract.Transact(opts, "updateMinTeleporterVersion", version) +} + +// UpdateMinTeleporterVersion is a paid mutator transaction binding the contract method 0x5eb99514. +// +// Solidity: function updateMinTeleporterVersion(uint256 version) returns() +func (_ERC20TokenRemoteUpgradeable *ERC20TokenRemoteUpgradeableSession) UpdateMinTeleporterVersion(version *big.Int) (*types.Transaction, error) { + return _ERC20TokenRemoteUpgradeable.Contract.UpdateMinTeleporterVersion(&_ERC20TokenRemoteUpgradeable.TransactOpts, version) +} + +// UpdateMinTeleporterVersion is a paid mutator transaction binding the contract method 0x5eb99514. +// +// Solidity: function updateMinTeleporterVersion(uint256 version) returns() +func (_ERC20TokenRemoteUpgradeable *ERC20TokenRemoteUpgradeableTransactorSession) UpdateMinTeleporterVersion(version *big.Int) (*types.Transaction, error) { + return _ERC20TokenRemoteUpgradeable.Contract.UpdateMinTeleporterVersion(&_ERC20TokenRemoteUpgradeable.TransactOpts, version) +} + +// ERC20TokenRemoteUpgradeableApprovalIterator is returned from FilterApproval and is used to iterate over the raw logs and unpacked data for Approval events raised by the ERC20TokenRemoteUpgradeable contract. +type ERC20TokenRemoteUpgradeableApprovalIterator struct { + Event *ERC20TokenRemoteUpgradeableApproval // 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 interfaces.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 *ERC20TokenRemoteUpgradeableApprovalIterator) 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(ERC20TokenRemoteUpgradeableApproval) + 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(ERC20TokenRemoteUpgradeableApproval) + 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 *ERC20TokenRemoteUpgradeableApprovalIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *ERC20TokenRemoteUpgradeableApprovalIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// ERC20TokenRemoteUpgradeableApproval represents a Approval event raised by the ERC20TokenRemoteUpgradeable contract. +type ERC20TokenRemoteUpgradeableApproval 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 (_ERC20TokenRemoteUpgradeable *ERC20TokenRemoteUpgradeableFilterer) FilterApproval(opts *bind.FilterOpts, owner []common.Address, spender []common.Address) (*ERC20TokenRemoteUpgradeableApprovalIterator, 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 := _ERC20TokenRemoteUpgradeable.contract.FilterLogs(opts, "Approval", ownerRule, spenderRule) + if err != nil { + return nil, err + } + return &ERC20TokenRemoteUpgradeableApprovalIterator{contract: _ERC20TokenRemoteUpgradeable.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 (_ERC20TokenRemoteUpgradeable *ERC20TokenRemoteUpgradeableFilterer) WatchApproval(opts *bind.WatchOpts, sink chan<- *ERC20TokenRemoteUpgradeableApproval, 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 := _ERC20TokenRemoteUpgradeable.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(ERC20TokenRemoteUpgradeableApproval) + if err := _ERC20TokenRemoteUpgradeable.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 (_ERC20TokenRemoteUpgradeable *ERC20TokenRemoteUpgradeableFilterer) ParseApproval(log types.Log) (*ERC20TokenRemoteUpgradeableApproval, error) { + event := new(ERC20TokenRemoteUpgradeableApproval) + if err := _ERC20TokenRemoteUpgradeable.contract.UnpackLog(event, "Approval", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// ERC20TokenRemoteUpgradeableCallFailedIterator is returned from FilterCallFailed and is used to iterate over the raw logs and unpacked data for CallFailed events raised by the ERC20TokenRemoteUpgradeable contract. +type ERC20TokenRemoteUpgradeableCallFailedIterator struct { + Event *ERC20TokenRemoteUpgradeableCallFailed // 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 interfaces.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 *ERC20TokenRemoteUpgradeableCallFailedIterator) 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(ERC20TokenRemoteUpgradeableCallFailed) + 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(ERC20TokenRemoteUpgradeableCallFailed) + 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 *ERC20TokenRemoteUpgradeableCallFailedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *ERC20TokenRemoteUpgradeableCallFailedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// ERC20TokenRemoteUpgradeableCallFailed represents a CallFailed event raised by the ERC20TokenRemoteUpgradeable contract. +type ERC20TokenRemoteUpgradeableCallFailed struct { + RecipientContract common.Address + Amount *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterCallFailed is a free log retrieval operation binding the contract event 0xb9eaeae386d339f8115782f297a9e5f0e13fb587cd6b0d502f113cb8dd4d6cb0. +// +// Solidity: event CallFailed(address indexed recipientContract, uint256 amount) +func (_ERC20TokenRemoteUpgradeable *ERC20TokenRemoteUpgradeableFilterer) FilterCallFailed(opts *bind.FilterOpts, recipientContract []common.Address) (*ERC20TokenRemoteUpgradeableCallFailedIterator, error) { + + var recipientContractRule []interface{} + for _, recipientContractItem := range recipientContract { + recipientContractRule = append(recipientContractRule, recipientContractItem) + } + + logs, sub, err := _ERC20TokenRemoteUpgradeable.contract.FilterLogs(opts, "CallFailed", recipientContractRule) + if err != nil { + return nil, err + } + return &ERC20TokenRemoteUpgradeableCallFailedIterator{contract: _ERC20TokenRemoteUpgradeable.contract, event: "CallFailed", logs: logs, sub: sub}, nil +} + +// WatchCallFailed is a free log subscription operation binding the contract event 0xb9eaeae386d339f8115782f297a9e5f0e13fb587cd6b0d502f113cb8dd4d6cb0. +// +// Solidity: event CallFailed(address indexed recipientContract, uint256 amount) +func (_ERC20TokenRemoteUpgradeable *ERC20TokenRemoteUpgradeableFilterer) WatchCallFailed(opts *bind.WatchOpts, sink chan<- *ERC20TokenRemoteUpgradeableCallFailed, recipientContract []common.Address) (event.Subscription, error) { + + var recipientContractRule []interface{} + for _, recipientContractItem := range recipientContract { + recipientContractRule = append(recipientContractRule, recipientContractItem) + } + + logs, sub, err := _ERC20TokenRemoteUpgradeable.contract.WatchLogs(opts, "CallFailed", recipientContractRule) + 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(ERC20TokenRemoteUpgradeableCallFailed) + if err := _ERC20TokenRemoteUpgradeable.contract.UnpackLog(event, "CallFailed", 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 +} + +// ParseCallFailed is a log parse operation binding the contract event 0xb9eaeae386d339f8115782f297a9e5f0e13fb587cd6b0d502f113cb8dd4d6cb0. +// +// Solidity: event CallFailed(address indexed recipientContract, uint256 amount) +func (_ERC20TokenRemoteUpgradeable *ERC20TokenRemoteUpgradeableFilterer) ParseCallFailed(log types.Log) (*ERC20TokenRemoteUpgradeableCallFailed, error) { + event := new(ERC20TokenRemoteUpgradeableCallFailed) + if err := _ERC20TokenRemoteUpgradeable.contract.UnpackLog(event, "CallFailed", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// ERC20TokenRemoteUpgradeableCallSucceededIterator is returned from FilterCallSucceeded and is used to iterate over the raw logs and unpacked data for CallSucceeded events raised by the ERC20TokenRemoteUpgradeable contract. +type ERC20TokenRemoteUpgradeableCallSucceededIterator struct { + Event *ERC20TokenRemoteUpgradeableCallSucceeded // 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 interfaces.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 *ERC20TokenRemoteUpgradeableCallSucceededIterator) 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(ERC20TokenRemoteUpgradeableCallSucceeded) + 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(ERC20TokenRemoteUpgradeableCallSucceeded) + 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 *ERC20TokenRemoteUpgradeableCallSucceededIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *ERC20TokenRemoteUpgradeableCallSucceededIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// ERC20TokenRemoteUpgradeableCallSucceeded represents a CallSucceeded event raised by the ERC20TokenRemoteUpgradeable contract. +type ERC20TokenRemoteUpgradeableCallSucceeded struct { + RecipientContract common.Address + Amount *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterCallSucceeded is a free log retrieval operation binding the contract event 0x104deb555f67e63782bb817bc26c39050894645f9b9f29c4be8ae68d0e8b7ff4. +// +// Solidity: event CallSucceeded(address indexed recipientContract, uint256 amount) +func (_ERC20TokenRemoteUpgradeable *ERC20TokenRemoteUpgradeableFilterer) FilterCallSucceeded(opts *bind.FilterOpts, recipientContract []common.Address) (*ERC20TokenRemoteUpgradeableCallSucceededIterator, error) { + + var recipientContractRule []interface{} + for _, recipientContractItem := range recipientContract { + recipientContractRule = append(recipientContractRule, recipientContractItem) + } + + logs, sub, err := _ERC20TokenRemoteUpgradeable.contract.FilterLogs(opts, "CallSucceeded", recipientContractRule) + if err != nil { + return nil, err + } + return &ERC20TokenRemoteUpgradeableCallSucceededIterator{contract: _ERC20TokenRemoteUpgradeable.contract, event: "CallSucceeded", logs: logs, sub: sub}, nil +} + +// WatchCallSucceeded is a free log subscription operation binding the contract event 0x104deb555f67e63782bb817bc26c39050894645f9b9f29c4be8ae68d0e8b7ff4. +// +// Solidity: event CallSucceeded(address indexed recipientContract, uint256 amount) +func (_ERC20TokenRemoteUpgradeable *ERC20TokenRemoteUpgradeableFilterer) WatchCallSucceeded(opts *bind.WatchOpts, sink chan<- *ERC20TokenRemoteUpgradeableCallSucceeded, recipientContract []common.Address) (event.Subscription, error) { + + var recipientContractRule []interface{} + for _, recipientContractItem := range recipientContract { + recipientContractRule = append(recipientContractRule, recipientContractItem) + } + + logs, sub, err := _ERC20TokenRemoteUpgradeable.contract.WatchLogs(opts, "CallSucceeded", recipientContractRule) + 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(ERC20TokenRemoteUpgradeableCallSucceeded) + if err := _ERC20TokenRemoteUpgradeable.contract.UnpackLog(event, "CallSucceeded", 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 +} + +// ParseCallSucceeded is a log parse operation binding the contract event 0x104deb555f67e63782bb817bc26c39050894645f9b9f29c4be8ae68d0e8b7ff4. +// +// Solidity: event CallSucceeded(address indexed recipientContract, uint256 amount) +func (_ERC20TokenRemoteUpgradeable *ERC20TokenRemoteUpgradeableFilterer) ParseCallSucceeded(log types.Log) (*ERC20TokenRemoteUpgradeableCallSucceeded, error) { + event := new(ERC20TokenRemoteUpgradeableCallSucceeded) + if err := _ERC20TokenRemoteUpgradeable.contract.UnpackLog(event, "CallSucceeded", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// ERC20TokenRemoteUpgradeableInitializedIterator is returned from FilterInitialized and is used to iterate over the raw logs and unpacked data for Initialized events raised by the ERC20TokenRemoteUpgradeable contract. +type ERC20TokenRemoteUpgradeableInitializedIterator struct { + Event *ERC20TokenRemoteUpgradeableInitialized // 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 interfaces.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 *ERC20TokenRemoteUpgradeableInitializedIterator) 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(ERC20TokenRemoteUpgradeableInitialized) + 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(ERC20TokenRemoteUpgradeableInitialized) + 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 *ERC20TokenRemoteUpgradeableInitializedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *ERC20TokenRemoteUpgradeableInitializedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// ERC20TokenRemoteUpgradeableInitialized represents a Initialized event raised by the ERC20TokenRemoteUpgradeable contract. +type ERC20TokenRemoteUpgradeableInitialized struct { + Version uint64 + Raw types.Log // Blockchain specific contextual infos +} + +// FilterInitialized is a free log retrieval operation binding the contract event 0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2. +// +// Solidity: event Initialized(uint64 version) +func (_ERC20TokenRemoteUpgradeable *ERC20TokenRemoteUpgradeableFilterer) FilterInitialized(opts *bind.FilterOpts) (*ERC20TokenRemoteUpgradeableInitializedIterator, error) { + + logs, sub, err := _ERC20TokenRemoteUpgradeable.contract.FilterLogs(opts, "Initialized") + if err != nil { + return nil, err + } + return &ERC20TokenRemoteUpgradeableInitializedIterator{contract: _ERC20TokenRemoteUpgradeable.contract, event: "Initialized", logs: logs, sub: sub}, nil +} + +// WatchInitialized is a free log subscription operation binding the contract event 0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2. +// +// Solidity: event Initialized(uint64 version) +func (_ERC20TokenRemoteUpgradeable *ERC20TokenRemoteUpgradeableFilterer) WatchInitialized(opts *bind.WatchOpts, sink chan<- *ERC20TokenRemoteUpgradeableInitialized) (event.Subscription, error) { + + logs, sub, err := _ERC20TokenRemoteUpgradeable.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(ERC20TokenRemoteUpgradeableInitialized) + if err := _ERC20TokenRemoteUpgradeable.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 0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2. +// +// Solidity: event Initialized(uint64 version) +func (_ERC20TokenRemoteUpgradeable *ERC20TokenRemoteUpgradeableFilterer) ParseInitialized(log types.Log) (*ERC20TokenRemoteUpgradeableInitialized, error) { + event := new(ERC20TokenRemoteUpgradeableInitialized) + if err := _ERC20TokenRemoteUpgradeable.contract.UnpackLog(event, "Initialized", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// ERC20TokenRemoteUpgradeableMinTeleporterVersionUpdatedIterator is returned from FilterMinTeleporterVersionUpdated and is used to iterate over the raw logs and unpacked data for MinTeleporterVersionUpdated events raised by the ERC20TokenRemoteUpgradeable contract. +type ERC20TokenRemoteUpgradeableMinTeleporterVersionUpdatedIterator struct { + Event *ERC20TokenRemoteUpgradeableMinTeleporterVersionUpdated // 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 interfaces.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 *ERC20TokenRemoteUpgradeableMinTeleporterVersionUpdatedIterator) 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(ERC20TokenRemoteUpgradeableMinTeleporterVersionUpdated) + 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(ERC20TokenRemoteUpgradeableMinTeleporterVersionUpdated) + 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 *ERC20TokenRemoteUpgradeableMinTeleporterVersionUpdatedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *ERC20TokenRemoteUpgradeableMinTeleporterVersionUpdatedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// ERC20TokenRemoteUpgradeableMinTeleporterVersionUpdated represents a MinTeleporterVersionUpdated event raised by the ERC20TokenRemoteUpgradeable contract. +type ERC20TokenRemoteUpgradeableMinTeleporterVersionUpdated struct { + OldMinTeleporterVersion *big.Int + NewMinTeleporterVersion *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterMinTeleporterVersionUpdated is a free log retrieval operation binding the contract event 0xa9a7ef57e41f05b4c15480842f5f0c27edfcbb553fed281f7c4068452cc1c02d. +// +// Solidity: event MinTeleporterVersionUpdated(uint256 indexed oldMinTeleporterVersion, uint256 indexed newMinTeleporterVersion) +func (_ERC20TokenRemoteUpgradeable *ERC20TokenRemoteUpgradeableFilterer) FilterMinTeleporterVersionUpdated(opts *bind.FilterOpts, oldMinTeleporterVersion []*big.Int, newMinTeleporterVersion []*big.Int) (*ERC20TokenRemoteUpgradeableMinTeleporterVersionUpdatedIterator, error) { + + var oldMinTeleporterVersionRule []interface{} + for _, oldMinTeleporterVersionItem := range oldMinTeleporterVersion { + oldMinTeleporterVersionRule = append(oldMinTeleporterVersionRule, oldMinTeleporterVersionItem) + } + var newMinTeleporterVersionRule []interface{} + for _, newMinTeleporterVersionItem := range newMinTeleporterVersion { + newMinTeleporterVersionRule = append(newMinTeleporterVersionRule, newMinTeleporterVersionItem) + } + + logs, sub, err := _ERC20TokenRemoteUpgradeable.contract.FilterLogs(opts, "MinTeleporterVersionUpdated", oldMinTeleporterVersionRule, newMinTeleporterVersionRule) + if err != nil { + return nil, err + } + return &ERC20TokenRemoteUpgradeableMinTeleporterVersionUpdatedIterator{contract: _ERC20TokenRemoteUpgradeable.contract, event: "MinTeleporterVersionUpdated", logs: logs, sub: sub}, nil +} + +// WatchMinTeleporterVersionUpdated is a free log subscription operation binding the contract event 0xa9a7ef57e41f05b4c15480842f5f0c27edfcbb553fed281f7c4068452cc1c02d. +// +// Solidity: event MinTeleporterVersionUpdated(uint256 indexed oldMinTeleporterVersion, uint256 indexed newMinTeleporterVersion) +func (_ERC20TokenRemoteUpgradeable *ERC20TokenRemoteUpgradeableFilterer) WatchMinTeleporterVersionUpdated(opts *bind.WatchOpts, sink chan<- *ERC20TokenRemoteUpgradeableMinTeleporterVersionUpdated, oldMinTeleporterVersion []*big.Int, newMinTeleporterVersion []*big.Int) (event.Subscription, error) { + + var oldMinTeleporterVersionRule []interface{} + for _, oldMinTeleporterVersionItem := range oldMinTeleporterVersion { + oldMinTeleporterVersionRule = append(oldMinTeleporterVersionRule, oldMinTeleporterVersionItem) + } + var newMinTeleporterVersionRule []interface{} + for _, newMinTeleporterVersionItem := range newMinTeleporterVersion { + newMinTeleporterVersionRule = append(newMinTeleporterVersionRule, newMinTeleporterVersionItem) + } + + logs, sub, err := _ERC20TokenRemoteUpgradeable.contract.WatchLogs(opts, "MinTeleporterVersionUpdated", oldMinTeleporterVersionRule, newMinTeleporterVersionRule) + 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(ERC20TokenRemoteUpgradeableMinTeleporterVersionUpdated) + if err := _ERC20TokenRemoteUpgradeable.contract.UnpackLog(event, "MinTeleporterVersionUpdated", 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 +} + +// ParseMinTeleporterVersionUpdated is a log parse operation binding the contract event 0xa9a7ef57e41f05b4c15480842f5f0c27edfcbb553fed281f7c4068452cc1c02d. +// +// Solidity: event MinTeleporterVersionUpdated(uint256 indexed oldMinTeleporterVersion, uint256 indexed newMinTeleporterVersion) +func (_ERC20TokenRemoteUpgradeable *ERC20TokenRemoteUpgradeableFilterer) ParseMinTeleporterVersionUpdated(log types.Log) (*ERC20TokenRemoteUpgradeableMinTeleporterVersionUpdated, error) { + event := new(ERC20TokenRemoteUpgradeableMinTeleporterVersionUpdated) + if err := _ERC20TokenRemoteUpgradeable.contract.UnpackLog(event, "MinTeleporterVersionUpdated", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// ERC20TokenRemoteUpgradeableOwnershipTransferredIterator is returned from FilterOwnershipTransferred and is used to iterate over the raw logs and unpacked data for OwnershipTransferred events raised by the ERC20TokenRemoteUpgradeable contract. +type ERC20TokenRemoteUpgradeableOwnershipTransferredIterator struct { + Event *ERC20TokenRemoteUpgradeableOwnershipTransferred // 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 interfaces.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 *ERC20TokenRemoteUpgradeableOwnershipTransferredIterator) 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(ERC20TokenRemoteUpgradeableOwnershipTransferred) + 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(ERC20TokenRemoteUpgradeableOwnershipTransferred) + 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 *ERC20TokenRemoteUpgradeableOwnershipTransferredIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *ERC20TokenRemoteUpgradeableOwnershipTransferredIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// ERC20TokenRemoteUpgradeableOwnershipTransferred represents a OwnershipTransferred event raised by the ERC20TokenRemoteUpgradeable contract. +type ERC20TokenRemoteUpgradeableOwnershipTransferred 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 (_ERC20TokenRemoteUpgradeable *ERC20TokenRemoteUpgradeableFilterer) FilterOwnershipTransferred(opts *bind.FilterOpts, previousOwner []common.Address, newOwner []common.Address) (*ERC20TokenRemoteUpgradeableOwnershipTransferredIterator, 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 := _ERC20TokenRemoteUpgradeable.contract.FilterLogs(opts, "OwnershipTransferred", previousOwnerRule, newOwnerRule) + if err != nil { + return nil, err + } + return &ERC20TokenRemoteUpgradeableOwnershipTransferredIterator{contract: _ERC20TokenRemoteUpgradeable.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 (_ERC20TokenRemoteUpgradeable *ERC20TokenRemoteUpgradeableFilterer) WatchOwnershipTransferred(opts *bind.WatchOpts, sink chan<- *ERC20TokenRemoteUpgradeableOwnershipTransferred, 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 := _ERC20TokenRemoteUpgradeable.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(ERC20TokenRemoteUpgradeableOwnershipTransferred) + if err := _ERC20TokenRemoteUpgradeable.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 (_ERC20TokenRemoteUpgradeable *ERC20TokenRemoteUpgradeableFilterer) ParseOwnershipTransferred(log types.Log) (*ERC20TokenRemoteUpgradeableOwnershipTransferred, error) { + event := new(ERC20TokenRemoteUpgradeableOwnershipTransferred) + if err := _ERC20TokenRemoteUpgradeable.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// ERC20TokenRemoteUpgradeableTeleporterAddressPausedIterator is returned from FilterTeleporterAddressPaused and is used to iterate over the raw logs and unpacked data for TeleporterAddressPaused events raised by the ERC20TokenRemoteUpgradeable contract. +type ERC20TokenRemoteUpgradeableTeleporterAddressPausedIterator struct { + Event *ERC20TokenRemoteUpgradeableTeleporterAddressPaused // 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 interfaces.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 *ERC20TokenRemoteUpgradeableTeleporterAddressPausedIterator) 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(ERC20TokenRemoteUpgradeableTeleporterAddressPaused) + 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(ERC20TokenRemoteUpgradeableTeleporterAddressPaused) + 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 *ERC20TokenRemoteUpgradeableTeleporterAddressPausedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *ERC20TokenRemoteUpgradeableTeleporterAddressPausedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// ERC20TokenRemoteUpgradeableTeleporterAddressPaused represents a TeleporterAddressPaused event raised by the ERC20TokenRemoteUpgradeable contract. +type ERC20TokenRemoteUpgradeableTeleporterAddressPaused struct { + TeleporterAddress common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterTeleporterAddressPaused is a free log retrieval operation binding the contract event 0x933f93e57a222e6330362af8b376d0a8725b6901e9a2fb86d00f169702b28a4c. +// +// Solidity: event TeleporterAddressPaused(address indexed teleporterAddress) +func (_ERC20TokenRemoteUpgradeable *ERC20TokenRemoteUpgradeableFilterer) FilterTeleporterAddressPaused(opts *bind.FilterOpts, teleporterAddress []common.Address) (*ERC20TokenRemoteUpgradeableTeleporterAddressPausedIterator, error) { + + var teleporterAddressRule []interface{} + for _, teleporterAddressItem := range teleporterAddress { + teleporterAddressRule = append(teleporterAddressRule, teleporterAddressItem) + } + + logs, sub, err := _ERC20TokenRemoteUpgradeable.contract.FilterLogs(opts, "TeleporterAddressPaused", teleporterAddressRule) + if err != nil { + return nil, err + } + return &ERC20TokenRemoteUpgradeableTeleporterAddressPausedIterator{contract: _ERC20TokenRemoteUpgradeable.contract, event: "TeleporterAddressPaused", logs: logs, sub: sub}, nil +} + +// WatchTeleporterAddressPaused is a free log subscription operation binding the contract event 0x933f93e57a222e6330362af8b376d0a8725b6901e9a2fb86d00f169702b28a4c. +// +// Solidity: event TeleporterAddressPaused(address indexed teleporterAddress) +func (_ERC20TokenRemoteUpgradeable *ERC20TokenRemoteUpgradeableFilterer) WatchTeleporterAddressPaused(opts *bind.WatchOpts, sink chan<- *ERC20TokenRemoteUpgradeableTeleporterAddressPaused, teleporterAddress []common.Address) (event.Subscription, error) { + + var teleporterAddressRule []interface{} + for _, teleporterAddressItem := range teleporterAddress { + teleporterAddressRule = append(teleporterAddressRule, teleporterAddressItem) + } + + logs, sub, err := _ERC20TokenRemoteUpgradeable.contract.WatchLogs(opts, "TeleporterAddressPaused", teleporterAddressRule) + 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(ERC20TokenRemoteUpgradeableTeleporterAddressPaused) + if err := _ERC20TokenRemoteUpgradeable.contract.UnpackLog(event, "TeleporterAddressPaused", 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 +} + +// ParseTeleporterAddressPaused is a log parse operation binding the contract event 0x933f93e57a222e6330362af8b376d0a8725b6901e9a2fb86d00f169702b28a4c. +// +// Solidity: event TeleporterAddressPaused(address indexed teleporterAddress) +func (_ERC20TokenRemoteUpgradeable *ERC20TokenRemoteUpgradeableFilterer) ParseTeleporterAddressPaused(log types.Log) (*ERC20TokenRemoteUpgradeableTeleporterAddressPaused, error) { + event := new(ERC20TokenRemoteUpgradeableTeleporterAddressPaused) + if err := _ERC20TokenRemoteUpgradeable.contract.UnpackLog(event, "TeleporterAddressPaused", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// ERC20TokenRemoteUpgradeableTeleporterAddressUnpausedIterator is returned from FilterTeleporterAddressUnpaused and is used to iterate over the raw logs and unpacked data for TeleporterAddressUnpaused events raised by the ERC20TokenRemoteUpgradeable contract. +type ERC20TokenRemoteUpgradeableTeleporterAddressUnpausedIterator struct { + Event *ERC20TokenRemoteUpgradeableTeleporterAddressUnpaused // 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 interfaces.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 *ERC20TokenRemoteUpgradeableTeleporterAddressUnpausedIterator) 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(ERC20TokenRemoteUpgradeableTeleporterAddressUnpaused) + 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(ERC20TokenRemoteUpgradeableTeleporterAddressUnpaused) + 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 *ERC20TokenRemoteUpgradeableTeleporterAddressUnpausedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *ERC20TokenRemoteUpgradeableTeleporterAddressUnpausedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// ERC20TokenRemoteUpgradeableTeleporterAddressUnpaused represents a TeleporterAddressUnpaused event raised by the ERC20TokenRemoteUpgradeable contract. +type ERC20TokenRemoteUpgradeableTeleporterAddressUnpaused struct { + TeleporterAddress common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterTeleporterAddressUnpaused is a free log retrieval operation binding the contract event 0x844e2f3154214672229235858fd029d1dfd543901c6d05931f0bc2480a2d72c3. +// +// Solidity: event TeleporterAddressUnpaused(address indexed teleporterAddress) +func (_ERC20TokenRemoteUpgradeable *ERC20TokenRemoteUpgradeableFilterer) FilterTeleporterAddressUnpaused(opts *bind.FilterOpts, teleporterAddress []common.Address) (*ERC20TokenRemoteUpgradeableTeleporterAddressUnpausedIterator, error) { + + var teleporterAddressRule []interface{} + for _, teleporterAddressItem := range teleporterAddress { + teleporterAddressRule = append(teleporterAddressRule, teleporterAddressItem) + } + + logs, sub, err := _ERC20TokenRemoteUpgradeable.contract.FilterLogs(opts, "TeleporterAddressUnpaused", teleporterAddressRule) + if err != nil { + return nil, err + } + return &ERC20TokenRemoteUpgradeableTeleporterAddressUnpausedIterator{contract: _ERC20TokenRemoteUpgradeable.contract, event: "TeleporterAddressUnpaused", logs: logs, sub: sub}, nil +} + +// WatchTeleporterAddressUnpaused is a free log subscription operation binding the contract event 0x844e2f3154214672229235858fd029d1dfd543901c6d05931f0bc2480a2d72c3. +// +// Solidity: event TeleporterAddressUnpaused(address indexed teleporterAddress) +func (_ERC20TokenRemoteUpgradeable *ERC20TokenRemoteUpgradeableFilterer) WatchTeleporterAddressUnpaused(opts *bind.WatchOpts, sink chan<- *ERC20TokenRemoteUpgradeableTeleporterAddressUnpaused, teleporterAddress []common.Address) (event.Subscription, error) { + + var teleporterAddressRule []interface{} + for _, teleporterAddressItem := range teleporterAddress { + teleporterAddressRule = append(teleporterAddressRule, teleporterAddressItem) + } + + logs, sub, err := _ERC20TokenRemoteUpgradeable.contract.WatchLogs(opts, "TeleporterAddressUnpaused", teleporterAddressRule) + 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(ERC20TokenRemoteUpgradeableTeleporterAddressUnpaused) + if err := _ERC20TokenRemoteUpgradeable.contract.UnpackLog(event, "TeleporterAddressUnpaused", 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 +} + +// ParseTeleporterAddressUnpaused is a log parse operation binding the contract event 0x844e2f3154214672229235858fd029d1dfd543901c6d05931f0bc2480a2d72c3. +// +// Solidity: event TeleporterAddressUnpaused(address indexed teleporterAddress) +func (_ERC20TokenRemoteUpgradeable *ERC20TokenRemoteUpgradeableFilterer) ParseTeleporterAddressUnpaused(log types.Log) (*ERC20TokenRemoteUpgradeableTeleporterAddressUnpaused, error) { + event := new(ERC20TokenRemoteUpgradeableTeleporterAddressUnpaused) + if err := _ERC20TokenRemoteUpgradeable.contract.UnpackLog(event, "TeleporterAddressUnpaused", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// ERC20TokenRemoteUpgradeableTokensAndCallSentIterator is returned from FilterTokensAndCallSent and is used to iterate over the raw logs and unpacked data for TokensAndCallSent events raised by the ERC20TokenRemoteUpgradeable contract. +type ERC20TokenRemoteUpgradeableTokensAndCallSentIterator struct { + Event *ERC20TokenRemoteUpgradeableTokensAndCallSent // 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 interfaces.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 *ERC20TokenRemoteUpgradeableTokensAndCallSentIterator) 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(ERC20TokenRemoteUpgradeableTokensAndCallSent) + 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(ERC20TokenRemoteUpgradeableTokensAndCallSent) + 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 *ERC20TokenRemoteUpgradeableTokensAndCallSentIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *ERC20TokenRemoteUpgradeableTokensAndCallSentIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// ERC20TokenRemoteUpgradeableTokensAndCallSent represents a TokensAndCallSent event raised by the ERC20TokenRemoteUpgradeable contract. +type ERC20TokenRemoteUpgradeableTokensAndCallSent struct { + TeleporterMessageID [32]byte + Sender common.Address + Input SendAndCallInput + Amount *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterTokensAndCallSent is a free log retrieval operation binding the contract event 0x5d76dff81bf773b908b050fa113d39f7d8135bb4175398f313ea19cd3a1a0b16. +// +// Solidity: event TokensAndCallSent(bytes32 indexed teleporterMessageID, address indexed sender, (bytes32,address,address,bytes,uint256,uint256,address,address,address,uint256,uint256) input, uint256 amount) +func (_ERC20TokenRemoteUpgradeable *ERC20TokenRemoteUpgradeableFilterer) FilterTokensAndCallSent(opts *bind.FilterOpts, teleporterMessageID [][32]byte, sender []common.Address) (*ERC20TokenRemoteUpgradeableTokensAndCallSentIterator, error) { + + var teleporterMessageIDRule []interface{} + for _, teleporterMessageIDItem := range teleporterMessageID { + teleporterMessageIDRule = append(teleporterMessageIDRule, teleporterMessageIDItem) + } + var senderRule []interface{} + for _, senderItem := range sender { + senderRule = append(senderRule, senderItem) + } + + logs, sub, err := _ERC20TokenRemoteUpgradeable.contract.FilterLogs(opts, "TokensAndCallSent", teleporterMessageIDRule, senderRule) + if err != nil { + return nil, err + } + return &ERC20TokenRemoteUpgradeableTokensAndCallSentIterator{contract: _ERC20TokenRemoteUpgradeable.contract, event: "TokensAndCallSent", logs: logs, sub: sub}, nil +} + +// WatchTokensAndCallSent is a free log subscription operation binding the contract event 0x5d76dff81bf773b908b050fa113d39f7d8135bb4175398f313ea19cd3a1a0b16. +// +// Solidity: event TokensAndCallSent(bytes32 indexed teleporterMessageID, address indexed sender, (bytes32,address,address,bytes,uint256,uint256,address,address,address,uint256,uint256) input, uint256 amount) +func (_ERC20TokenRemoteUpgradeable *ERC20TokenRemoteUpgradeableFilterer) WatchTokensAndCallSent(opts *bind.WatchOpts, sink chan<- *ERC20TokenRemoteUpgradeableTokensAndCallSent, teleporterMessageID [][32]byte, sender []common.Address) (event.Subscription, error) { + + var teleporterMessageIDRule []interface{} + for _, teleporterMessageIDItem := range teleporterMessageID { + teleporterMessageIDRule = append(teleporterMessageIDRule, teleporterMessageIDItem) + } + var senderRule []interface{} + for _, senderItem := range sender { + senderRule = append(senderRule, senderItem) + } + + logs, sub, err := _ERC20TokenRemoteUpgradeable.contract.WatchLogs(opts, "TokensAndCallSent", teleporterMessageIDRule, senderRule) + 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(ERC20TokenRemoteUpgradeableTokensAndCallSent) + if err := _ERC20TokenRemoteUpgradeable.contract.UnpackLog(event, "TokensAndCallSent", 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 +} + +// ParseTokensAndCallSent is a log parse operation binding the contract event 0x5d76dff81bf773b908b050fa113d39f7d8135bb4175398f313ea19cd3a1a0b16. +// +// Solidity: event TokensAndCallSent(bytes32 indexed teleporterMessageID, address indexed sender, (bytes32,address,address,bytes,uint256,uint256,address,address,address,uint256,uint256) input, uint256 amount) +func (_ERC20TokenRemoteUpgradeable *ERC20TokenRemoteUpgradeableFilterer) ParseTokensAndCallSent(log types.Log) (*ERC20TokenRemoteUpgradeableTokensAndCallSent, error) { + event := new(ERC20TokenRemoteUpgradeableTokensAndCallSent) + if err := _ERC20TokenRemoteUpgradeable.contract.UnpackLog(event, "TokensAndCallSent", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// ERC20TokenRemoteUpgradeableTokensSentIterator is returned from FilterTokensSent and is used to iterate over the raw logs and unpacked data for TokensSent events raised by the ERC20TokenRemoteUpgradeable contract. +type ERC20TokenRemoteUpgradeableTokensSentIterator struct { + Event *ERC20TokenRemoteUpgradeableTokensSent // 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 interfaces.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 *ERC20TokenRemoteUpgradeableTokensSentIterator) 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(ERC20TokenRemoteUpgradeableTokensSent) + 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(ERC20TokenRemoteUpgradeableTokensSent) + 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 *ERC20TokenRemoteUpgradeableTokensSentIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *ERC20TokenRemoteUpgradeableTokensSentIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// ERC20TokenRemoteUpgradeableTokensSent represents a TokensSent event raised by the ERC20TokenRemoteUpgradeable contract. +type ERC20TokenRemoteUpgradeableTokensSent struct { + TeleporterMessageID [32]byte + Sender common.Address + Input SendTokensInput + Amount *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterTokensSent is a free log retrieval operation binding the contract event 0x93f19bf1ec58a15dc643b37e7e18a1c13e85e06cd11929e283154691ace9fb52. +// +// Solidity: event TokensSent(bytes32 indexed teleporterMessageID, address indexed sender, (bytes32,address,address,address,uint256,uint256,uint256,address) input, uint256 amount) +func (_ERC20TokenRemoteUpgradeable *ERC20TokenRemoteUpgradeableFilterer) FilterTokensSent(opts *bind.FilterOpts, teleporterMessageID [][32]byte, sender []common.Address) (*ERC20TokenRemoteUpgradeableTokensSentIterator, error) { + + var teleporterMessageIDRule []interface{} + for _, teleporterMessageIDItem := range teleporterMessageID { + teleporterMessageIDRule = append(teleporterMessageIDRule, teleporterMessageIDItem) + } + var senderRule []interface{} + for _, senderItem := range sender { + senderRule = append(senderRule, senderItem) + } + + logs, sub, err := _ERC20TokenRemoteUpgradeable.contract.FilterLogs(opts, "TokensSent", teleporterMessageIDRule, senderRule) + if err != nil { + return nil, err + } + return &ERC20TokenRemoteUpgradeableTokensSentIterator{contract: _ERC20TokenRemoteUpgradeable.contract, event: "TokensSent", logs: logs, sub: sub}, nil +} + +// WatchTokensSent is a free log subscription operation binding the contract event 0x93f19bf1ec58a15dc643b37e7e18a1c13e85e06cd11929e283154691ace9fb52. +// +// Solidity: event TokensSent(bytes32 indexed teleporterMessageID, address indexed sender, (bytes32,address,address,address,uint256,uint256,uint256,address) input, uint256 amount) +func (_ERC20TokenRemoteUpgradeable *ERC20TokenRemoteUpgradeableFilterer) WatchTokensSent(opts *bind.WatchOpts, sink chan<- *ERC20TokenRemoteUpgradeableTokensSent, teleporterMessageID [][32]byte, sender []common.Address) (event.Subscription, error) { + + var teleporterMessageIDRule []interface{} + for _, teleporterMessageIDItem := range teleporterMessageID { + teleporterMessageIDRule = append(teleporterMessageIDRule, teleporterMessageIDItem) + } + var senderRule []interface{} + for _, senderItem := range sender { + senderRule = append(senderRule, senderItem) + } + + logs, sub, err := _ERC20TokenRemoteUpgradeable.contract.WatchLogs(opts, "TokensSent", teleporterMessageIDRule, senderRule) + 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(ERC20TokenRemoteUpgradeableTokensSent) + if err := _ERC20TokenRemoteUpgradeable.contract.UnpackLog(event, "TokensSent", 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 +} + +// ParseTokensSent is a log parse operation binding the contract event 0x93f19bf1ec58a15dc643b37e7e18a1c13e85e06cd11929e283154691ace9fb52. +// +// Solidity: event TokensSent(bytes32 indexed teleporterMessageID, address indexed sender, (bytes32,address,address,address,uint256,uint256,uint256,address) input, uint256 amount) +func (_ERC20TokenRemoteUpgradeable *ERC20TokenRemoteUpgradeableFilterer) ParseTokensSent(log types.Log) (*ERC20TokenRemoteUpgradeableTokensSent, error) { + event := new(ERC20TokenRemoteUpgradeableTokensSent) + if err := _ERC20TokenRemoteUpgradeable.contract.UnpackLog(event, "TokensSent", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// ERC20TokenRemoteUpgradeableTokensWithdrawnIterator is returned from FilterTokensWithdrawn and is used to iterate over the raw logs and unpacked data for TokensWithdrawn events raised by the ERC20TokenRemoteUpgradeable contract. +type ERC20TokenRemoteUpgradeableTokensWithdrawnIterator struct { + Event *ERC20TokenRemoteUpgradeableTokensWithdrawn // 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 interfaces.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 *ERC20TokenRemoteUpgradeableTokensWithdrawnIterator) 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(ERC20TokenRemoteUpgradeableTokensWithdrawn) + 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(ERC20TokenRemoteUpgradeableTokensWithdrawn) + 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 *ERC20TokenRemoteUpgradeableTokensWithdrawnIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *ERC20TokenRemoteUpgradeableTokensWithdrawnIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// ERC20TokenRemoteUpgradeableTokensWithdrawn represents a TokensWithdrawn event raised by the ERC20TokenRemoteUpgradeable contract. +type ERC20TokenRemoteUpgradeableTokensWithdrawn struct { + Recipient common.Address + Amount *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterTokensWithdrawn is a free log retrieval operation binding the contract event 0x6352c5382c4a4578e712449ca65e83cdb392d045dfcf1cad9615189db2da244b. +// +// Solidity: event TokensWithdrawn(address indexed recipient, uint256 amount) +func (_ERC20TokenRemoteUpgradeable *ERC20TokenRemoteUpgradeableFilterer) FilterTokensWithdrawn(opts *bind.FilterOpts, recipient []common.Address) (*ERC20TokenRemoteUpgradeableTokensWithdrawnIterator, error) { + + var recipientRule []interface{} + for _, recipientItem := range recipient { + recipientRule = append(recipientRule, recipientItem) + } + + logs, sub, err := _ERC20TokenRemoteUpgradeable.contract.FilterLogs(opts, "TokensWithdrawn", recipientRule) + if err != nil { + return nil, err + } + return &ERC20TokenRemoteUpgradeableTokensWithdrawnIterator{contract: _ERC20TokenRemoteUpgradeable.contract, event: "TokensWithdrawn", logs: logs, sub: sub}, nil +} + +// WatchTokensWithdrawn is a free log subscription operation binding the contract event 0x6352c5382c4a4578e712449ca65e83cdb392d045dfcf1cad9615189db2da244b. +// +// Solidity: event TokensWithdrawn(address indexed recipient, uint256 amount) +func (_ERC20TokenRemoteUpgradeable *ERC20TokenRemoteUpgradeableFilterer) WatchTokensWithdrawn(opts *bind.WatchOpts, sink chan<- *ERC20TokenRemoteUpgradeableTokensWithdrawn, recipient []common.Address) (event.Subscription, error) { + + var recipientRule []interface{} + for _, recipientItem := range recipient { + recipientRule = append(recipientRule, recipientItem) + } + + logs, sub, err := _ERC20TokenRemoteUpgradeable.contract.WatchLogs(opts, "TokensWithdrawn", recipientRule) + 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(ERC20TokenRemoteUpgradeableTokensWithdrawn) + if err := _ERC20TokenRemoteUpgradeable.contract.UnpackLog(event, "TokensWithdrawn", 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 +} + +// ParseTokensWithdrawn is a log parse operation binding the contract event 0x6352c5382c4a4578e712449ca65e83cdb392d045dfcf1cad9615189db2da244b. +// +// Solidity: event TokensWithdrawn(address indexed recipient, uint256 amount) +func (_ERC20TokenRemoteUpgradeable *ERC20TokenRemoteUpgradeableFilterer) ParseTokensWithdrawn(log types.Log) (*ERC20TokenRemoteUpgradeableTokensWithdrawn, error) { + event := new(ERC20TokenRemoteUpgradeableTokensWithdrawn) + if err := _ERC20TokenRemoteUpgradeable.contract.UnpackLog(event, "TokensWithdrawn", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// ERC20TokenRemoteUpgradeableTransferIterator is returned from FilterTransfer and is used to iterate over the raw logs and unpacked data for Transfer events raised by the ERC20TokenRemoteUpgradeable contract. +type ERC20TokenRemoteUpgradeableTransferIterator struct { + Event *ERC20TokenRemoteUpgradeableTransfer // 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 interfaces.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 *ERC20TokenRemoteUpgradeableTransferIterator) 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(ERC20TokenRemoteUpgradeableTransfer) + 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(ERC20TokenRemoteUpgradeableTransfer) + 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 *ERC20TokenRemoteUpgradeableTransferIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *ERC20TokenRemoteUpgradeableTransferIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// ERC20TokenRemoteUpgradeableTransfer represents a Transfer event raised by the ERC20TokenRemoteUpgradeable contract. +type ERC20TokenRemoteUpgradeableTransfer 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 (_ERC20TokenRemoteUpgradeable *ERC20TokenRemoteUpgradeableFilterer) FilterTransfer(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*ERC20TokenRemoteUpgradeableTransferIterator, 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 := _ERC20TokenRemoteUpgradeable.contract.FilterLogs(opts, "Transfer", fromRule, toRule) + if err != nil { + return nil, err + } + return &ERC20TokenRemoteUpgradeableTransferIterator{contract: _ERC20TokenRemoteUpgradeable.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 (_ERC20TokenRemoteUpgradeable *ERC20TokenRemoteUpgradeableFilterer) WatchTransfer(opts *bind.WatchOpts, sink chan<- *ERC20TokenRemoteUpgradeableTransfer, 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 := _ERC20TokenRemoteUpgradeable.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(ERC20TokenRemoteUpgradeableTransfer) + if err := _ERC20TokenRemoteUpgradeable.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 (_ERC20TokenRemoteUpgradeable *ERC20TokenRemoteUpgradeableFilterer) ParseTransfer(log types.Log) (*ERC20TokenRemoteUpgradeableTransfer, error) { + event := new(ERC20TokenRemoteUpgradeableTransfer) + if err := _ERC20TokenRemoteUpgradeable.contract.UnpackLog(event, "Transfer", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} diff --git a/abi-bindings/go/ictt/TokenRemote/NativeTokenRemote/NativeTokenRemote.go b/abi-bindings/go/ictt/TokenRemote/NativeTokenRemote/NativeTokenRemote.go new file mode 100644 index 000000000..06d3d9e27 --- /dev/null +++ b/abi-bindings/go/ictt/TokenRemote/NativeTokenRemote/NativeTokenRemote.go @@ -0,0 +1,3770 @@ +// Code generated - DO NOT EDIT. +// This file is a generated binding and any manual changes will be lost. + +package nativetokenremote + +import ( + "errors" + "math/big" + "strings" + + "github.com/ava-labs/subnet-evm/accounts/abi" + "github.com/ava-labs/subnet-evm/accounts/abi/bind" + "github.com/ava-labs/subnet-evm/core/types" + "github.com/ava-labs/subnet-evm/interfaces" + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/event" +) + +// Reference imports to suppress errors if they are not otherwise used. +var ( + _ = errors.New + _ = big.NewInt + _ = strings.NewReader + _ = interfaces.NotFound + _ = bind.Bind + _ = common.Big1 + _ = types.BloomLookup + _ = event.NewSubscription + _ = abi.ConvertType +) + +// SendAndCallInput is an auto generated low-level Go binding around an user-defined struct. +type SendAndCallInput struct { + DestinationBlockchainID [32]byte + DestinationTokenTransferrerAddress common.Address + RecipientContract common.Address + RecipientPayload []byte + RequiredGasLimit *big.Int + RecipientGasLimit *big.Int + MultiHopFallback common.Address + FallbackRecipient common.Address + PrimaryFeeTokenAddress common.Address + PrimaryFee *big.Int + SecondaryFee *big.Int +} + +// SendTokensInput is an auto generated low-level Go binding around an user-defined struct. +type SendTokensInput struct { + DestinationBlockchainID [32]byte + DestinationTokenTransferrerAddress common.Address + Recipient common.Address + PrimaryFeeTokenAddress common.Address + PrimaryFee *big.Int + SecondaryFee *big.Int + RequiredGasLimit *big.Int + MultiHopFallback common.Address +} + +// TeleporterFeeInfo is an auto generated low-level Go binding around an user-defined struct. +type TeleporterFeeInfo struct { + FeeTokenAddress common.Address + Amount *big.Int +} + +// TokenRemoteSettings is an auto generated low-level Go binding around an user-defined struct. +type TokenRemoteSettings struct { + TeleporterRegistryAddress common.Address + TeleporterManager common.Address + MinTeleporterVersion *big.Int + TokenHomeBlockchainID [32]byte + TokenHomeAddress common.Address + TokenHomeDecimals uint8 +} + +// NativeTokenRemoteMetaData contains all meta data concerning the NativeTokenRemote contract. +var NativeTokenRemoteMetaData = &bind.MetaData{ + ABI: "[{\"inputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"teleporterRegistryAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"teleporterManager\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"minTeleporterVersion\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"tokenHomeBlockchainID\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"tokenHomeAddress\",\"type\":\"address\"},{\"internalType\":\"uint8\",\"name\":\"tokenHomeDecimals\",\"type\":\"uint8\"}],\"internalType\":\"structTokenRemoteSettings\",\"name\":\"settings\",\"type\":\"tuple\"},{\"internalType\":\"string\",\"name\":\"nativeAssetSymbol\",\"type\":\"string\"},{\"internalType\":\"uint256\",\"name\":\"initialReserveImbalance\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"burnedFeesReportingRewardPercentage\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"target\",\"type\":\"address\"}],\"name\":\"AddressEmptyCode\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"AddressInsufficientBalance\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"allowance\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"needed\",\"type\":\"uint256\"}],\"name\":\"ERC20InsufficientAllowance\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"balance\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"needed\",\"type\":\"uint256\"}],\"name\":\"ERC20InsufficientBalance\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"approver\",\"type\":\"address\"}],\"name\":\"ERC20InvalidApprover\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"}],\"name\":\"ERC20InvalidReceiver\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"ERC20InvalidSender\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"ERC20InvalidSpender\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"FailedInnerCall\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidInitialization\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotInitializing\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"OwnableInvalidOwner\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"OwnableUnauthorizedAccount\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ReentrancyGuardReentrantCall\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"SafeERC20FailedOperation\",\"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\":true,\"internalType\":\"address\",\"name\":\"recipientContract\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"CallFailed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"recipientContract\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"CallSucceeded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Deposit\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"version\",\"type\":\"uint64\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"oldMinTeleporterVersion\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"newMinTeleporterVersion\",\"type\":\"uint256\"}],\"name\":\"MinTeleporterVersionUpdated\",\"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\":\"bytes32\",\"name\":\"teleporterMessageID\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"feesBurned\",\"type\":\"uint256\"}],\"name\":\"ReportBurnedTxFees\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"teleporterAddress\",\"type\":\"address\"}],\"name\":\"TeleporterAddressPaused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"teleporterAddress\",\"type\":\"address\"}],\"name\":\"TeleporterAddressUnpaused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"teleporterMessageID\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"destinationBlockchainID\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"destinationTokenTransferrerAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"recipientContract\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"recipientPayload\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"requiredGasLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"recipientGasLimit\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"multiHopFallback\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"fallbackRecipient\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"primaryFeeTokenAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"primaryFee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"secondaryFee\",\"type\":\"uint256\"}],\"indexed\":false,\"internalType\":\"structSendAndCallInput\",\"name\":\"input\",\"type\":\"tuple\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"TokensAndCallSent\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"teleporterMessageID\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"destinationBlockchainID\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"destinationTokenTransferrerAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"primaryFeeTokenAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"primaryFee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"secondaryFee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"requiredGasLimit\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"multiHopFallback\",\"type\":\"address\"}],\"indexed\":false,\"internalType\":\"structSendTokensInput\",\"name\":\"input\",\"type\":\"tuple\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"TokensSent\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"TokensWithdrawn\",\"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\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Withdrawal\",\"type\":\"event\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"inputs\":[],\"name\":\"BURNED_FOR_TRANSFER_ADDRESS\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"BURNED_TX_FEES_ADDRESS\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"HOME_CHAIN_BURN_ADDRESS\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"MULTI_HOP_CALL_GAS_PER_WORD\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"MULTI_HOP_CALL_REQUIRED_GAS\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"MULTI_HOP_SEND_REQUIRED_GAS\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"NATIVE_MINTER\",\"outputs\":[{\"internalType\":\"contractINativeMinter\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"NATIVE_TOKEN_REMOTE_STORAGE_LOCATION\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"REGISTER_REMOTE_REQUIRED_GAS\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"TELEPORTER_REGISTRY_APP_STORAGE_LOCATION\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"TOKEN_REMOTE_STORAGE_LOCATION\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"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\":\"value\",\"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\":\"payloadSize\",\"type\":\"uint256\"}],\"name\":\"calculateNumWords\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"pure\",\"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\":\"getBlockchainID\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getInitialReserveImbalance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getIsCollateralized\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getMinTeleporterVersion\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getMultiplyOnRemote\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getTokenHomeAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getTokenHomeBlockchainID\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getTokenMultiplier\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getTotalMinted\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"teleporterRegistryAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"teleporterManager\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"minTeleporterVersion\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"tokenHomeBlockchainID\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"tokenHomeAddress\",\"type\":\"address\"},{\"internalType\":\"uint8\",\"name\":\"tokenHomeDecimals\",\"type\":\"uint8\"}],\"internalType\":\"structTokenRemoteSettings\",\"name\":\"settings\",\"type\":\"tuple\"},{\"internalType\":\"string\",\"name\":\"nativeAssetSymbol\",\"type\":\"string\"},{\"internalType\":\"uint256\",\"name\":\"initialReserveImbalance\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"burnedFeesReportingRewardPercentage\",\"type\":\"uint256\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"teleporterAddress\",\"type\":\"address\"}],\"name\":\"isTeleporterAddressPaused\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"teleporterAddress\",\"type\":\"address\"}],\"name\":\"pauseTeleporterAddress\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"sourceBlockchainID\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"originSenderAddress\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"message\",\"type\":\"bytes\"}],\"name\":\"receiveTeleporterMessage\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"feeTokenAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"internalType\":\"structTeleporterFeeInfo\",\"name\":\"feeInfo\",\"type\":\"tuple\"}],\"name\":\"registerWithHome\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"requiredGasLimit\",\"type\":\"uint256\"}],\"name\":\"reportBurnedTxFees\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"destinationBlockchainID\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"destinationTokenTransferrerAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"primaryFeeTokenAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"primaryFee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"secondaryFee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"requiredGasLimit\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"multiHopFallback\",\"type\":\"address\"}],\"internalType\":\"structSendTokensInput\",\"name\":\"input\",\"type\":\"tuple\"}],\"name\":\"send\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"destinationBlockchainID\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"destinationTokenTransferrerAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"recipientContract\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"recipientPayload\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"requiredGasLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"recipientGasLimit\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"multiHopFallback\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"fallbackRecipient\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"primaryFeeTokenAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"primaryFee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"secondaryFee\",\"type\":\"uint256\"}],\"internalType\":\"structSendAndCallInput\",\"name\":\"input\",\"type\":\"tuple\"}],\"name\":\"sendAndCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalNativeAssetSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"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\":\"value\",\"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\":\"value\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"teleporterAddress\",\"type\":\"address\"}],\"name\":\"unpauseTeleporterAddress\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"version\",\"type\":\"uint256\"}],\"name\":\"updateMinTeleporterVersion\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"withdraw\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}]", + Bin: "0x608060405234801561000f575f80fd5b50604051615fee380380615fee83398101604081905261002e91610cb3565b61003a84848484610046565b50505050610ff4565b50565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00805468010000000000000000810460ff1615906001600160401b03165f8115801561008f5750825b90505f826001600160401b031660011480156100aa5750303b155b9050811580156100b8575080155b156100d65760405163f92ee8a960e01b815260040160405180910390fd5b84546001600160401b0319166001178555831561010457845460ff60401b1916680100000000000000001785555b61011089898989610161565b831561015657845460ff60401b19168555604051600181527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b505050505050505050565b6101696101fc565b815f036101d75760405162461bcd60e51b815260206004820152603160248201527f4e6174697665546f6b656e52656d6f74653a207a65726f20696e697469616c206044820152707265736572766520696d62616c616e636560781b60648201526084015b60405180910390fd5b6101e1838061024c565b6101ed84836012610262565b6101f681610299565b50505050565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a005468010000000000000000900460ff1661024a57604051631afcd79f60e31b815260040160405180910390fd5b565b6102546101fc565b61025e8282610323565b5050565b61026a6101fc565b825160208401516040850151610281929190610386565b6102896103a1565b6102948383836103b1565b505050565b6102a16101fc565b606481106102ff5760405162461bcd60e51b815260206004820152602560248201527f4e6174697665546f6b656e52656d6f74653a20696e76616c69642070657263656044820152646e7461676560d81b60648201526084016101ce565b7f69a5f7616543528c4fbe43f410b1034bd6da4ba06c25bedf04617268014cf50055565b61032b6101fc565b7f52c63247e1f47db19d5ce0460030c497f067ca4cebf71ba98eeadabe20bace007f52c63247e1f47db19d5ce0460030c497f067ca4cebf71ba98eeadabe20bace036103778482610df9565b50600481016101f68382610df9565b61038e6101fc565b61039883826106fb565b6102948261071d565b6103a96101fc565b61024a61072e565b6103b96101fc565b5f7f600d6a9b283d1eda563de594ce4843869b6f128a4baa222422ed94a60b0cef0090507302000000000000000000000000000000000000056001600160a01b0316634213cf786040518163ffffffff1660e01b8152600401602060405180830381865afa15801561042d573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906104519190610eb8565b815560608401516104b75760405162461bcd60e51b815260206004820152602a60248201527f546f6b656e52656d6f74653a207a65726f20746f6b656e20686f6d6520626c6f60448201526918dad8da185a5b88125160b21b60648201526084016101ce565b80546060850151036105315760405162461bcd60e51b815260206004820152603b60248201527f546f6b656e52656d6f74653a2063616e6e6f74206465706c6f7920746f20736160448201527f6d6520626c6f636b636861696e20617320746f6b656e20686f6d65000000000060648201526084016101ce565b60808401516001600160a01b03166105975760405162461bcd60e51b8152602060048201526024808201527f546f6b656e52656d6f74653a207a65726f20746f6b656e20686f6d65206164646044820152637265737360e01b60648201526084016101ce565b60128460a0015160ff1611156106015760405162461bcd60e51b815260206004820152602960248201527f546f6b656e52656d6f74653a20746f6b656e20686f6d6520646563696d616c73604482015268040e8dede40d0d2ced60bb1b60648201526084016101ce565b60128260ff1611156106615760405162461bcd60e51b8152602060048201526024808201527f546f6b656e52656d6f74653a20746f6b656e20646563696d616c7320746f6f206044820152630d0d2ced60e31b60648201526084016101ce565b60608401516001820155608084015160028201805460058401869055600684018054871560ff1990911617905560a08701516001600160a01b039093166001600160a81b031990911617600160a01b60ff808516919091029190911760ff60a81b1916600160a81b918616919091021790556106dd9083610758565b60048301805460ff1916911515919091179055600390910155505050565b6107036101fc565b61070b6107a0565b6107136107b0565b61025e82826107b8565b6107256101fc565b6100438161093c565b5f7fd2f1ed38b7d242bfb8b41862afb813a15193219a4bc717f2056607593e6c75005b6001905550565b5f8060ff80851690841611818161077b576107738587610ee3565b60ff16610789565b6107858686610ee3565b60ff165b61079490600a610fe2565b96919550909350505050565b6107a86101fc565b61024a610976565b61024a6101fc565b6107c06101fc565b6001600160a01b03821661083c5760405162461bcd60e51b815260206004820152603760248201527f54656c65706f7274657252656769737472794170703a207a65726f2054656c6560448201527f706f72746572207265676973747279206164647265737300000000000000000060648201526084016101ce565b5f7fde77a4dc7391f6f8f2d9567915d687d3aee79e7a1fc7300392f2727e9a0f1d0090505f8390505f816001600160a01b031663c07f47d46040518163ffffffff1660e01b8152600401602060405180830381865afa1580156108a1573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906108c59190610eb8565b1161091a5760405162461bcd60e51b815260206004820152603260248201525f80516020615fce833981519152604482015271656c65706f7274657220726567697374727960701b60648201526084016101ce565b81546001600160a01b0319166001600160a01b0382161782556101f6836109a5565b6109446101fc565b6001600160a01b03811661096d57604051631e4fbdf760e01b81525f60048201526024016101ce565b61004381610b3d565b61097e6101fc565b5f7f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f00610751565b7fde77a4dc7391f6f8f2d9567915d687d3aee79e7a1fc7300392f2727e9a0f1d0080546040805163301fd1f560e21b815290515f926001600160a01b03169163c07f47d49160048083019260209291908290030181865afa158015610a0c573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610a309190610eb8565b600283015490915081841115610a8f5760405162461bcd60e51b815260206004820152603160248201525f80516020615fce83398151915260448201527032b632b837b93a32b9103b32b939b4b7b760791b60648201526084016101ce565b808411610b045760405162461bcd60e51b815260206004820152603f60248201527f54656c65706f7274657252656769737472794170703a206e6f7420677265617460448201527f6572207468616e2063757272656e74206d696e696d756d2076657273696f6e0060648201526084016101ce565b60028301849055604051849082907fa9a7ef57e41f05b4c15480842f5f0c27edfcbb553fed281f7c4068452cc1c02d905f90a350505050565b7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c19930080546001600160a01b031981166001600160a01b03848116918217845560405192169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0905f90a3505050565b634e487b7160e01b5f52604160045260245ffd5b60405160c081016001600160401b0381118282101715610be357610be3610bad565b60405290565b604051601f8201601f191681016001600160401b0381118282101715610c1157610c11610bad565b604052919050565b80516001600160a01b0381168114610c2f575f80fd5b919050565b5f82601f830112610c43575f80fd5b81516001600160401b03811115610c5c57610c5c610bad565b6020610c70601f8301601f19168201610be9565b8281528582848701011115610c83575f80fd5b5f5b83811015610ca0578581018301518282018401528201610c85565b505f928101909101919091529392505050565b5f805f80848603610120811215610cc8575f80fd5b60c0811215610cd5575f80fd5b50610cde610bc1565b610ce786610c19565b8152610cf560208701610c19565b60208201526040860151604082015260608601516060820152610d1a60808701610c19565b608082015260a086015160ff81168114610d32575f80fd5b60a082015260c08601519094506001600160401b03811115610d52575f80fd5b610d5e87828801610c34565b60e08701516101009097015195989097509350505050565b600181811c90821680610d8a57607f821691505b602082108103610da857634e487b7160e01b5f52602260045260245ffd5b50919050565b601f82111561029457805f5260205f20601f840160051c81016020851015610dd35750805b601f840160051c820191505b81811015610df2575f8155600101610ddf565b5050505050565b81516001600160401b03811115610e1257610e12610bad565b610e2681610e208454610d76565b84610dae565b602080601f831160018114610e59575f8415610e425750858301515b5f19600386901b1c1916600185901b178555610eb0565b5f85815260208120601f198616915b82811015610e8757888601518255948401946001909101908401610e68565b5085821015610ea457878501515f19600388901b60f8161c191681555b505060018460011b0185555b505050505050565b5f60208284031215610ec8575f80fd5b5051919050565b634e487b7160e01b5f52601160045260245ffd5b60ff8281168282160390811115610efc57610efc610ecf565b92915050565b600181815b80851115610f3c57815f1904821115610f2257610f22610ecf565b80851615610f2f57918102915b93841c9390800290610f07565b509250929050565b5f82610f5257506001610efc565b81610f5e57505f610efc565b8160018114610f745760028114610f7e57610f9a565b6001915050610efc565b60ff841115610f8f57610f8f610ecf565b50506001821b610efc565b5060208310610133831016604e8410600b8410161715610fbd575081810a610efc565b610fc78383610f02565b805f1904821115610fda57610fda610ecf565b029392505050565b5f610fed8383610f44565b9392505050565b614fcd806110015f395ff3fe608060405260043610610280575f3560e01c8063715018a61161014e578063b8a46d02116100c0578063dd62ed3e11610079578063dd62ed3e14610736578063e0fd9cb814610755578063ed0ae4b014610452578063ef793e2a14610769578063f2fde38b1461077d578063f3f981d81461079c5761028f565b8063b8a46d02146106b9578063c3cd6927146106d8578063c452165e146106ec578063c868efaa14610703578063d0e30db01461028f578063d2cc7a70146107225761028f565b80638f6cec88116101125780638f6cec8814610608578063909a6ac01461062757806395d89b4114610647578063973142971461065b578063a5717bc01461067a578063a9059cbb1461069a5761028f565b8063715018a61461057b57806371717c181461058f5780637ee3779a146105a55780638bf2fa94146105b95780638da5cb5b146105cc5761028f565b80632e1a7d4d116101f25780634511243e116101ab5780634511243e146104b55780635507f3d1146104d457806355538c8b146104ea5780635eb99514146105095780636e6eef8d1461052857806370a082311461053b5761028f565b80632e1a7d4d146103e6578063313ce56714610405578063329c3e1214610420578063347212c41461045257806335cac1591461046e5780634213cf78146104a15761028f565b806315beb59f1161024457806315beb59f1461035557806318160ddd1461036a5780631906529c1461037e57806323b872dd14610392578063254ac160146103b15780632b0d8f18146103c75761028f565b806302a30c7d1461029757806306fdde03146102c05780630733c8c8146102e1578063095ea7b3146103035780630ca1c5c9146103225761028f565b3661028f5761028d6107bb565b005b61028d6107bb565b3480156102a2575f80fd5b506102ab6107fc565b60405190151581526020015b60405180910390f35b3480156102cb575f80fd5b506102d4610813565b6040516102b79190613f06565b3480156102ec575f80fd5b506102f56108d3565b6040519081526020016102b7565b34801561030e575f80fd5b506102ab61031d366004613f3c565b6108e7565b34801561032d575f80fd5b507f69a5f7616543528c4fbe43f410b1034bd6da4ba06c25bedf04617268014cf501546102f5565b348015610360575f80fd5b506102f56105dc81565b348015610375575f80fd5b506102f5610900565b348015610389575f80fd5b506102f561091b565b34801561039d575f80fd5b506102ab6103ac366004613f66565b610972565b3480156103bc575f80fd5b506102f56201fbd081565b3480156103d2575f80fd5b5061028d6103e1366004613fa4565b610997565b3480156103f1575f80fd5b5061028d610400366004613fbf565b610a99565b348015610410575f80fd5b50604051601281526020016102b7565b34801561042b575f80fd5b5061043a6001600160991b0181565b6040516001600160a01b0390911681526020016102b7565b34801561045d575f80fd5b5061043a62010203600160981b0181565b348015610479575f80fd5b506102f57f600d6a9b283d1eda563de594ce4843869b6f128a4baa222422ed94a60b0cef0081565b3480156104ac575f80fd5b506102f5610ae5565b3480156104c0575f80fd5b5061028d6104cf366004613fa4565b610af6565b3480156104df575f80fd5b506102f56205302081565b3480156104f5575f80fd5b5061028d610504366004613fbf565b610be5565b348015610514575f80fd5b5061028d610523366004613fbf565b610ef7565b61028d610536366004613fd6565b610f08565b348015610546575f80fd5b506102f5610555366004613fa4565b6001600160a01b03165f9081525f80516020614f18833981519152602052604090205490565b348015610586575f80fd5b5061028d610f36565b34801561059a575f80fd5b506102f56205573081565b3480156105b0575f80fd5b506102ab610f47565b61028d6105c736600461400d565b610f5e565b3480156105d7575f80fd5b507f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300546001600160a01b031661043a565b348015610613575f80fd5b5061028d61062236600461414d565b610f8c565b348015610632575f80fd5b506102f55f80516020614f7883398151915281565b348015610652575f80fd5b506102d461109e565b348015610666575f80fd5b506102ab610675366004613fa4565b6110dc565b348015610685575f80fd5b506102f55f80516020614f5883398151915281565b3480156106a5575f80fd5b506102ab6106b4366004613f3c565b6110f5565b3480156106c4575f80fd5b5061028d6106d3366004614217565b611102565b3480156106e3575f80fd5b5061043a611276565b3480156106f7575f80fd5b5061043a600160981b81565b34801561070e575f80fd5b5061028d61071d366004614227565b611293565b34801561072d575f80fd5b506102f5611450565b348015610741575f80fd5b506102f56107503660046142a8565b611465565b348015610760575f80fd5b506102f56114ae565b348015610774575f80fd5b506102f56114c2565b348015610788575f80fd5b5061028d610797366004613fa4565b6114d6565b3480156107a7575f80fd5b506102f56107b6366004613fbf565b611510565b60405134815233907fe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c9060200160405180910390a26107fa3334611526565b565b5f8061080661155e565b6006015460ff1692915050565b7f52c63247e1f47db19d5ce0460030c497f067ca4cebf71ba98eeadabe20bace0380546060915f80516020614f1883398151915291610851906142df565b80601f016020809104026020016040519081016040528092919081815260200182805461087d906142df565b80156108c85780601f1061089f576101008083540402835291602001916108c8565b820191905f5260205f20905b8154815290600101906020018083116108ab57829003601f168201915b505050505091505090565b5f806108dd61155e565b6003015492915050565b5f336108f4818585611582565b60019150505b92915050565b5f805f80516020614f188339815191525b6002015492915050565b5f5f80516020614f588339815191528161094462010203600160981b0131600160981b31614325565b90505f61094f6114c2565b836001015461095e9190614325565b905061096a8282614338565b935050505090565b5f3361097f858285611594565b61098a8585856115f1565b60019150505b9392505050565b5f80516020614f788339815191526109ad61164e565b6001600160a01b0382166109dc5760405162461bcd60e51b81526004016109d39061434b565b60405180910390fd5b6109e68183611656565b15610a495760405162461bcd60e51b815260206004820152602d60248201527f54656c65706f7274657252656769737472794170703a2061646472657373206160448201526c1b1c9958591e481c185d5cd959609a1b60648201526084016109d3565b6001600160a01b0382165f81815260018381016020526040808320805460ff1916909217909155517f933f93e57a222e6330362af8b376d0a8725b6901e9a2fb86d00f169702b28a4c9190a25050565b60405181815233907f7fcf532c15f0a6db0bd6d0e038bea71d30d808c7d98cb3bf7268a95bf5081b659060200160405180910390a2610ad83382611677565b610ae233826116ab565b50565b5f80610aef61155e565b5492915050565b5f80516020614f78833981519152610b0c61164e565b6001600160a01b038216610b325760405162461bcd60e51b81526004016109d39061434b565b610b3c8183611656565b610b9a5760405162461bcd60e51b815260206004820152602960248201527f54656c65706f7274657252656769737472794170703a2061646472657373206e6044820152681bdd081c185d5cd95960ba1b60648201526084016109d3565b6001600160a01b0382165f818152600183016020526040808220805460ff19169055517f844e2f3154214672229235858fd029d1dfd543901c6d05931f0bc2480a2d72c39190a25050565b5f80516020614f388339815191528054600114610c145760405162461bcd60e51b81526004016109d390614399565b600281557f69a5f7616543528c4fbe43f410b1034bd6da4ba06c25bedf04617268014cf502545f80516020614f5883398151915290600160981b31908111610cd25760405162461bcd60e51b8152602060048201526044602482018190527f4e6174697665546f6b656e52656d6f74653a206275726e206164647265737320908201527f62616c616e6365206e6f742067726561746572207468616e206c6173742072656064820152631c1bdc9d60e21b608482015260a4016109d3565b5f826002015482610ce39190614338565b90505f6064845f015483610cf791906143dd565b610d0191906143f4565b90505f610d0e8284614338565b6002860185905590508115610d3157610d27308361173e565b610d313083611526565b5f610d4b610d3d6108d3565b610d45610f47565b846117eb565b11610db55760405162461bcd60e51b815260206004820152603460248201527f4e6174697665546f6b656e52656d6f74653a207a65726f207363616c6564206160448201527336b7bab73a103a37903932b837b93a10313ab93760611b60648201526084016109d3565b604080518082018252600181528151808301835262010203600160981b018152602080820185905292515f9380840192610df192909101614427565b60405160208183030381529060405281525090505f610eac6040518060c00160405280610e1c6114ae565b8152602001610e29611276565b6001600160a01b0316815260408051808201825230815260208181018a905283015281018c90526060015f5b604051908082528060200260200182016040528015610e7e578160200160208202803683370190505b50815260200184604051602001610e959190614447565b604051602081830303815290604052815250611800565b9050807f0832c643b65d6d3724ed14ac3a655fbc7cae54fb010918b2c2f70ef6b1bb94a584604051610ee091815260200190565b60405180910390a250506001909555505050505050565b610eff61164e565b610ae28161191b565b610f106107fc565b610f2c5760405162461bcd60e51b81526004016109d390614489565b610ae28134611ab3565b610f3e611b2a565b6107fa5f611b85565b5f80610f5161155e565b6004015460ff1692915050565b610f666107fc565b610f825760405162461bcd60e51b81526004016109d390614489565b610ae28134611bf5565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a008054600160401b810460ff1615906001600160401b03165f81158015610fd05750825b90505f826001600160401b03166001148015610feb5750303b155b905081158015610ff9575080155b156110175760405163f92ee8a960e01b815260040160405180910390fd5b845467ffffffffffffffff19166001178555831561104157845460ff60401b1916600160401b1785555b61104d89898989611c61565b831561109357845460ff60401b19168555604051600181527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b505050505050505050565b7f52c63247e1f47db19d5ce0460030c497f067ca4cebf71ba98eeadabe20bace0480546060915f80516020614f1883398151915291610851906142df565b5f5f80516020614f788339815191526109908184611656565b5f336108f48185856115f1565b5f61110b61155e565b6006810154909150610100900460ff16156111685760405162461bcd60e51b815260206004820152601f60248201527f546f6b656e52656d6f74653a20616c726561647920726567697374657265640060448201526064016109d3565b604080516060808201835260058401548252600284015460ff600160a01b820481166020808601918252600160a81b9093048216858701908152865180880188525f808252885188518188015293518516848a015291519093168286015286518083039095018552608090910190955280820192909252919290916111fd906111f390870187613fa4565b8660200135611cf1565b6040805160c0810182526001870154815260028701546001600160a01b03166020808301919091528251808401845293945061126e939192830191908190611247908b018b613fa4565b6001600160a01b0316815260209081018690529082526201fbd0908201526040015f610e55565b505050505050565b5f8061128061155e565b600201546001600160a01b031692915050565b61129b611d38565b5f5f80516020614f7883398151915260028101548154919250906001600160a01b0316634c1f08ce336040516001600160e01b031960e084901b1681526001600160a01b039091166004820152602401602060405180830381865afa158015611306573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061132a91906144d8565b10156113915760405162461bcd60e51b815260206004820152603060248201527f54656c65706f7274657252656769737472794170703a20696e76616c6964205460448201526f32b632b837b93a32b91039b2b73232b960811b60648201526084016109d3565b61139b8133611656565b156114015760405162461bcd60e51b815260206004820152603060248201527f54656c65706f7274657252656769737472794170703a2054656c65706f72746560448201526f1c881859191c995cdcc81c185d5cd95960821b60648201526084016109d3565b611441858585858080601f0160208091040260200160405190810160405280939291908181526020018383808284375f92019190915250611d8292505050565b5061144a611f99565b50505050565b5f805f80516020614f78833981519152610911565b6001600160a01b039182165f9081527f52c63247e1f47db19d5ce0460030c497f067ca4cebf71ba98eeadabe20bace016020908152604080832093909416825291909152205490565b5f806114b861155e565b6001015492915050565b5f806114cc61155e565b6005015492915050565b6114de611b2a565b6001600160a01b03811661150757604051631e4fbdf760e01b81525f60048201526024016109d3565b610ae281611b85565b5f600561151e83601f614325565b901c92915050565b6001600160a01b03821661154f5760405163ec442f0560e01b81525f60048201526024016109d3565b61155a5f8383611fc3565b5050565b7f600d6a9b283d1eda563de594ce4843869b6f128a4baa222422ed94a60b0cef0090565b61158f83838360016120fc565b505050565b5f61159f8484611465565b90505f19811461144a57818110156115e357604051637dc7a0d960e11b81526001600160a01b038416600482015260248101829052604481018390526064016109d3565b61144a84848484035f6120fc565b6001600160a01b03831661161a57604051634b637e8f60e11b81525f60048201526024016109d3565b6001600160a01b0382166116435760405163ec442f0560e01b81525f60048201526024016109d3565b61158f838383611fc3565b6107fa611b2a565b6001600160a01b03165f908152600191909101602052604090205460ff1690565b6001600160a01b0382166116a057604051634b637e8f60e11b81525f60048201526024016109d3565b61155a825f83611fc3565b804710156116ce5760405163cd78605960e01b81523060048201526024016109d3565b5f826001600160a01b0316826040515f6040518083038185875af1925050503d805f8114611717576040519150601f19603f3d011682016040523d82523d5f602084013e61171c565b606091505b505090508061158f57604051630a12f52160e11b815260040160405180910390fd5b7f69a5f7616543528c4fbe43f410b1034bd6da4ba06c25bedf04617268014cf50180545f80516020614f588339815191529183915f9061177f908490614325565b90915550506040516327ad555d60e11b81526001600160a01b0384166004820152602481018390526001600160991b0190634f5aaaba906044015f604051808303815f87803b1580156117d0575f80fd5b505af11580156117e2573d5f803e3d5ffd5b50505050505050565b5f6117f88484845f6121df565b949350505050565b5f8061180a61220f565b604084015160200151909150156118af576040830151516001600160a01b031661188c5760405162461bcd60e51b815260206004820152602d60248201527f54656c65706f7274657252656769737472794170703a207a65726f206665652060448201526c746f6b656e206164647265737360981b60648201526084016109d3565b6040830151602081015190516118af916001600160a01b039091169083906122ff565b604051630624488560e41b81526001600160a01b038216906362448850906118db9086906004016144ef565b6020604051808303815f875af11580156118f7573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061099091906144d8565b5f80516020614f7883398151915280546040805163301fd1f560e21b815290515f926001600160a01b03169163c07f47d49160048083019260209291908290030181865afa15801561196f573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061199391906144d8565b600283015490915081841115611a055760405162461bcd60e51b815260206004820152603160248201527f54656c65706f7274657252656769737472794170703a20696e76616c6964205460448201527032b632b837b93a32b9103b32b939b4b7b760791b60648201526084016109d3565b808411611a7a5760405162461bcd60e51b815260206004820152603f60248201527f54656c65706f7274657252656769737472794170703a206e6f7420677265617460448201527f6572207468616e2063757272656e74206d696e696d756d2076657273696f6e0060648201526084016109d3565b60028301849055604051849082907fa9a7ef57e41f05b4c15480842f5f0c27edfcbb553fed281f7c4068452cc1c02d905f90a350505050565b5f80516020614f388339815191528054600114611ae25760405162461bcd60e51b81526004016109d390614399565b600281555f611aef61155e565b9050611afa84612386565b6001810154843503611b1657611b1084846125c0565b50611b22565b611b1084846127e4565b505b600190555050565b33611b5c7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300546001600160a01b031690565b6001600160a01b0316146107fa5760405163118cdaa760e01b81523360048201526024016109d3565b7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c19930080546001600160a01b031981166001600160a01b03848116918217845560405192169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0905f90a3505050565b5f80516020614f388339815191528054600114611c245760405162461bcd60e51b81526004016109d390614399565b600281555f611c3161155e565b9050611c3c84612a85565b6001810154843503611c5757611c528484612b70565b611b20565b611b208484612cdf565b611c69612ea5565b815f03611cd25760405162461bcd60e51b815260206004820152603160248201527f4e6174697665546f6b656e52656d6f74653a207a65726f20696e697469616c206044820152707265736572766520696d62616c616e636560781b60648201526084016109d3565b611cdc8384612eee565b611ce884836012612f00565b61144a81612f31565b5f815f03611d0057505f6108fa565b306001600160a01b03841603611d2d57611d1b333084611594565b611d263330846115f1565b50806108fa565b610990833384612fa8565b7f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f00805460011901611d7c57604051633ee5aeb560e01b815260040160405180910390fd5b60029055565b5f611d8b61155e565b905080600101548414611df25760405162461bcd60e51b815260206004820152602960248201527f546f6b656e52656d6f74653a20696e76616c696420736f7572636520626c6f636044820152681ad8da185a5b88125160ba1b60648201526084016109d3565b60028101546001600160a01b03848116911614611e645760405162461bcd60e51b815260206004820152602a60248201527f546f6b656e52656d6f74653a20696e76616c6964206f726967696e2073656e646044820152696572206164647265737360b01b60648201526084016109d3565b5f82806020019051810190611e7991906145e8565b6006830154909150610100900460ff161580611e9a5750600682015460ff16155b15611eb15760068201805461ffff19166101011790555b600181516004811115611ec657611ec6614413565b03611efd575f8160200151806020019051810190611ee49190614670565b9050611ef7815f0151826020015161310b565b50611f92565b600281516004811115611f1257611f12614413565b03611f40575f8160200151806020019051810190611f3091906146a8565b9050611ef7818260800151613158565b60405162461bcd60e51b815260206004820152602160248201527f546f6b656e52656d6f74653a20696e76616c6964206d657373616765207479706044820152606560f81b60648201526084016109d3565b5050505050565b5f7f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f005b6001905550565b5f80516020614f188339815191526001600160a01b038416611ffd5781816002015f828254611ff29190614325565b9091555061206d9050565b6001600160a01b0384165f908152602082905260409020548281101561204f5760405163391434e360e21b81526001600160a01b038616600482015260248101829052604481018490526064016109d3565b6001600160a01b0385165f9081526020839052604090209083900390555b6001600160a01b03831661208b5760028101805483900390556120a9565b6001600160a01b0383165f9081526020829052604090208054830190555b826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040516120ee91815260200190565b60405180910390a350505050565b5f80516020614f188339815191526001600160a01b0385166121335760405163e602df0560e01b81525f60048201526024016109d3565b6001600160a01b03841661215c57604051634a1406b160e11b81525f60048201526024016109d3565b6001600160a01b038086165f90815260018301602090815260408083209388168352929052208390558115611f9257836001600160a01b0316856001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925856040516121d091815260200190565b60405180910390a35050505050565b5f811515841515036121fc576121f585846143dd565b90506117f8565b61220685846143f4565b95945050505050565b5f80516020614f7883398151915280546040805163d820e64f60e01b815290515f939284926001600160a01b039091169163d820e64f916004808201926020929091908290030181865afa158015612269573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061228d9190614772565b90506122998282611656565b156108fa5760405162461bcd60e51b815260206004820152603060248201527f54656c65706f7274657252656769737472794170703a2054656c65706f72746560448201526f1c881cd95b991a5b99c81c185d5cd95960821b60648201526084016109d3565b604051636eb1769f60e11b81523060048201526001600160a01b0383811660248301525f919085169063dd62ed3e90604401602060405180830381865afa15801561234c573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061237091906144d8565b905061144a84846123818585614325565b613282565b80356123a45760405162461bcd60e51b81526004016109d39061478d565b5f6123b56040830160208401613fa4565b6001600160a01b0316036123db5760405162461bcd60e51b81526004016109d3906147d8565b5f6123ec6060830160408401613fa4565b6001600160a01b0316036124575760405162461bcd60e51b815260206004820152602c60248201527f546f6b656e52656d6f74653a207a65726f20726563697069656e7420636f6e7460448201526b72616374206164647265737360a01b60648201526084016109d3565b5f81608001351161247a5760405162461bcd60e51b81526004016109d390614835565b5f8160a00135116124db5760405162461bcd60e51b815260206004820152602560248201527f546f6b656e52656d6f74653a207a65726f20726563697069656e7420676173206044820152641b1a5b5a5d60da1b60648201526084016109d3565b80608001358160a00135106125435760405162461bcd60e51b815260206004820152602860248201527f546f6b656e52656d6f74653a20696e76616c696420726563697069656e742067604482015267185cc81b1a5b5a5d60c21b60648201526084016109d3565b5f612555610100830160e08401613fa4565b6001600160a01b031603610ae25760405162461bcd60e51b815260206004820152602c60248201527f546f6b656e52656d6f74653a207a65726f2066616c6c6261636b20726563697060448201526b69656e74206164647265737360a01b60648201526084016109d3565b5f6125c961155e565b90506125f96125de6040850160208601613fa4565b6101408501356125f460e0870160c08801613fa4565b61333f565b5f6126218361261061012087016101008801613fa4565b86610120013587610140013561343c565b6040805180820190915291945091505f908060028152602001604051806101000160405280865f01548152602001306001600160a01b031681526020016126653390565b6001600160a01b0316815260200161268360608a0160408b01613fa4565b6001600160a01b03168152602081018890526040016126a560608a018a614879565b8080601f0160208091040260200160405190810160405280939291908181526020018383808284375f9201919091525050509082525060a089013560208201526040016126f96101008a0160e08b01613fa4565b6001600160a01b0316905260405161271491906020016148bb565b60408051601f198184030181529181529152805160c0810182526001860154815260028601546001600160a01b03166020820152815180830183529293505f92612796928201908061276e6101208c016101008d01613fa4565b6001600160a01b03168152602090810188905290825260808a0135908201526040015f610e55565b9050336001600160a01b0316817f5d76dff81bf773b908b050fa113d39f7d8135bb4175398f313ea19cd3a1a0b1688886040516127d49291906149c2565b60405180910390a3505050505050565b5f6127ed61155e565b905061281983356128046040860160208701613fa4565b61281460e0870160c08801613fa4565b6134ff565b5f6128308361261061012087016101008801613fa4565b6040805180820190915291945091505f90806004815260200160405180610160016040528061285c3390565b6001600160a01b03168152602001885f013581526020018860200160208101906128869190613fa4565b6001600160a01b031681526020016128a460608a0160408b01613fa4565b6001600160a01b03168152602081018890526040016128c660608a018a614879565b8080601f0160208091040260200160405190810160405280939291908181526020018383808284375f9201919091525050509082525060a0890135602082015260400161291a6101008a0160e08b01613fa4565b6001600160a01b031681526080890135602082015260400161294260e08a0160c08b01613fa4565b6001600160a01b03168152610140890135602091820152604051612967929101614ad0565b60408051601f19818403018152919052905290505f6105dc61299661298f6060890189614879565b9050611510565b6129a091906143dd565b6129ad9062055730614325565b6040805160c0810182526001870154815260028701546001600160a01b03166020820152815180830183529293505f92612a3692820190806129f76101208d016101008e01613fa4565b6001600160a01b031681526020908101899052908252818101869052604080515f815280830182528184015251606090920191610e9591889101614447565b9050336001600160a01b0316817f5d76dff81bf773b908b050fa113d39f7d8135bb4175398f313ea19cd3a1a0b168989604051612a749291906149c2565b60405180910390a350505050505050565b5f612a966060830160408401613fa4565b6001600160a01b031603612af85760405162461bcd60e51b815260206004820152602360248201527f546f6b656e52656d6f74653a207a65726f20726563697069656e74206164647260448201526265737360e81b60648201526084016109d3565b5f8160c0013511612b1b5760405162461bcd60e51b81526004016109d390614835565b8035612b395760405162461bcd60e51b81526004016109d39061478d565b5f612b4a6040830160208401613fa4565b6001600160a01b031603610ae25760405162461bcd60e51b81526004016109d3906147d8565b5f612b7961155e565b9050612ba4612b8e6040850160208601613fa4565b60a08501356125f4610100870160e08801613fa4565b5f612bc883612bb96080870160608801613fa4565b86608001358760a0013561343c565b6040805180820190915291945091505f9080600181526020016040518060400160405280886040016020810190612bff9190613fa4565b6001600160a01b0316815260200187815250604051602001612c219190614427565b60408051601f198184030181529181529152805160c0810182526001860154815260028601546001600160a01b03166020820152815180830183529293505f92612ca19282019080612c7960808c0160608d01613fa4565b6001600160a01b03168152602090810188905290825260c08a0135908201526040015f610e55565b9050336001600160a01b0316817f93f19bf1ec58a15dc643b37e7e18a1c13e85e06cd11929e283154691ace9fb5288886040516127d4929190614bad565b5f612ce861155e565b9050612d108335612cff6040860160208701613fa4565b612814610100870160e08801613fa4565b5f612d2583612bb96080870160608801613fa4565b60408051808201825260038152815160e081018352883581529396509193505f9260208084019282820191612d5e918b01908b01613fa4565b6001600160a01b03168152602001612d7c60608a0160408b01613fa4565b6001600160a01b031681526020810188905260a0890135604082015260c08901356060820152608001612db66101008a0160e08b01613fa4565b6001600160a01b03169052604051612e269190602001815181526020808301516001600160a01b0390811691830191909152604080840151821690830152606080840151908301526080808401519083015260a0808401519083015260c092830151169181019190915260e00190565b60408051601f198184030181529181529152805160c0810182526001860154815260028601546001600160a01b03166020820152815180830183529293505f92612ca19282019080612e7e60808c0160608d01613fa4565b6001600160a01b03168152602090810188905290825262053020908201526040015f610e55565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0054600160401b900460ff166107fa57604051631afcd79f60e31b815260040160405180910390fd5b612ef6612ea5565b61155a828261359d565b612f08612ea5565b612f1e835f0151846020015185604001516135ed565b612f26613608565b61158f838383613618565b612f39612ea5565b60648110612f975760405162461bcd60e51b815260206004820152602560248201527f4e6174697665546f6b656e52656d6f74653a20696e76616c69642070657263656044820152646e7461676560d81b60648201526084016109d3565b5f80516020614f5883398151915255565b6040516370a0823160e01b81523060048201525f9081906001600160a01b038616906370a0823190602401602060405180830381865afa158015612fee573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061301291906144d8565b90506130296001600160a01b03861685308661393c565b6040516370a0823160e01b81523060048201525f906001600160a01b038716906370a0823190602401602060405180830381865afa15801561306d573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061309191906144d8565b90508181116130f75760405162461bcd60e51b815260206004820152602c60248201527f5361666545524332305472616e7366657246726f6d3a2062616c616e6365206e60448201526b1bdd081a5b98dc99585cd95960a21b60648201526084016109d3565b6131018282614338565b9695505050505050565b816001600160a01b03167f6352c5382c4a4578e712449ca65e83cdb392d045dfcf1cad9615189db2da244b8260405161314691815260200190565b60405180910390a261155a828261173e565b613162308261173e565b5f825f0151836020015184604001518560a001516040516024016131899493929190614c4c565b60408051601f198184030181529190526020810180516001600160e01b031663161b12ff60e11b17905260c084015160608501519192505f916131cf9190859085613975565b905080156132235783606001516001600160a01b03167f104deb555f67e63782bb817bc26c39050894645f9b9f29c4be8ae68d0e8b7ff48460405161321691815260200190565b60405180910390a261144a565b83606001516001600160a01b03167fb9eaeae386d339f8115782f297a9e5f0e13fb587cd6b0d502f113cb8dd4d6cb08460405161326291815260200190565b60405180910390a260e084015161144a906001600160a01b0316846116ab565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663095ea7b360e01b1790526132d38482613a45565b61144a576040516001600160a01b0384811660248301525f604483015261333591869182169063095ea7b3906064015b604051602081830303815290604052915060e01b6020820180516001600160e01b038381831617835250505050613ae2565b61144a8482613ae2565b5f61334861155e565b60028101549091506001600160a01b0385811691161461337a5760405162461bcd60e51b81526004016109d390614c7d565b82156133d45760405162461bcd60e51b815260206004820152602360248201527f546f6b656e52656d6f74653a206e6f6e2d7a65726f207365636f6e646172792060448201526266656560e81b60648201526084016109d3565b6001600160a01b0382161561144a5760405162461bcd60e51b815260206004820152602860248201527f546f6b656e52656d6f74653a206e6f6e2d7a65726f206d756c74692d686f702060448201526766616c6c6261636b60c01b60648201526084016109d3565b5f805f61344761155e565b905061345287613b43565b965061345e8686611cf1565b600382015460048301549196506134789160ff16866117eb565b60038201546004830154613490919060ff168a6117eb565b116134f25760405162461bcd60e51b815260206004820152602c60248201527f546f6b656e52656d6f74653a20696e73756666696369656e7420746f6b656e7360448201526b103a37903a3930b739b332b960a11b60648201526084016109d3565b5094959294509192505050565b5f61350861155e565b8054909150840361353b57306001600160a01b0384160361353b5760405162461bcd60e51b81526004016109d390614c7d565b6001600160a01b03821661144a5760405162461bcd60e51b8152602060048201526024808201527f546f6b656e52656d6f74653a207a65726f206d756c74692d686f702066616c6c6044820152636261636b60e01b60648201526084016109d3565b6135a5612ea5565b5f80516020614f188339815191527f52c63247e1f47db19d5ce0460030c497f067ca4cebf71ba98eeadabe20bace036135de8482614d1e565b506004810161144a8382614d1e565b6135f5612ea5565b6135ff8382613b5b565b61158f82613b7d565b613610612ea5565b6107fa613b8e565b613620612ea5565b5f61362961155e565b90506005600160991b016001600160a01b0316634213cf786040518163ffffffff1660e01b8152600401602060405180830381865afa15801561366e573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061369291906144d8565b815560608401516136f85760405162461bcd60e51b815260206004820152602a60248201527f546f6b656e52656d6f74653a207a65726f20746f6b656e20686f6d6520626c6f60448201526918dad8da185a5b88125160b21b60648201526084016109d3565b80546060850151036137725760405162461bcd60e51b815260206004820152603b60248201527f546f6b656e52656d6f74653a2063616e6e6f74206465706c6f7920746f20736160448201527f6d6520626c6f636b636861696e20617320746f6b656e20686f6d65000000000060648201526084016109d3565b60808401516001600160a01b03166137d85760405162461bcd60e51b8152602060048201526024808201527f546f6b656e52656d6f74653a207a65726f20746f6b656e20686f6d65206164646044820152637265737360e01b60648201526084016109d3565b60128460a0015160ff1611156138425760405162461bcd60e51b815260206004820152602960248201527f546f6b656e52656d6f74653a20746f6b656e20686f6d6520646563696d616c73604482015268040e8dede40d0d2ced60bb1b60648201526084016109d3565b60128260ff1611156138a25760405162461bcd60e51b8152602060048201526024808201527f546f6b656e52656d6f74653a20746f6b656e20646563696d616c7320746f6f206044820152630d0d2ced60e31b60648201526084016109d3565b60608401516001820155608084015160028201805460058401869055600684018054871560ff1990911617905560a08701516001600160a01b039093166001600160a81b031990911617600160a01b60ff808516919091029190911760ff60a81b1916600160a81b9186169190910217905561391e9083613ba2565b60048301805460ff1916911515919091179055600390910155505050565b6040516001600160a01b03848116602483015283811660448301526064820183905261144a9186918216906323b872dd90608401613303565b5f845a10156139c65760405162461bcd60e51b815260206004820152601b60248201527f43616c6c5574696c733a20696e73756666696369656e7420676173000000000060448201526064016109d3565b83471015613a165760405162461bcd60e51b815260206004820152601d60248201527f43616c6c5574696c733a20696e73756666696369656e742076616c756500000060448201526064016109d3565b826001600160a01b03163b5f03613a2e57505f6117f8565b5f805f84516020860188888bf19695505050505050565b5f805f846001600160a01b031684604051613a609190614dd9565b5f604051808303815f865af19150503d805f8114613a99576040519150601f19603f3d011682016040523d82523d5f602084013e613a9e565b606091505b5091509150818015613ac8575080511580613ac8575080806020019051810190613ac89190614df4565b80156122065750505050506001600160a01b03163b151590565b5f613af66001600160a01b03841683613bec565b905080515f14158015613b1a575080806020019051810190613b189190614df4565b155b1561158f57604051635274afe760e01b81526001600160a01b03841660048201526024016109d3565b5f613b5762010203600160981b01836116ab565b5090565b613b63612ea5565b613b6b613bf9565b613b73613c09565b61155a8282613c11565b613b85612ea5565b610ae281613d95565b5f5f80516020614f38833981519152611fbc565b5f8060ff808516908416118181613bc557613bbd8587614e13565b60ff16613bd3565b613bcf8686614e13565b60ff165b613bde90600a614f0c565b9350909150505b9250929050565b606061099083835f613d9d565b613c01612ea5565b6107fa613e2c565b6107fa612ea5565b613c19612ea5565b6001600160a01b038216613c955760405162461bcd60e51b815260206004820152603760248201527f54656c65706f7274657252656769737472794170703a207a65726f2054656c6560448201527f706f72746572207265676973747279206164647265737300000000000000000060648201526084016109d3565b5f5f80516020614f7883398151915290505f8390505f816001600160a01b031663c07f47d46040518163ffffffff1660e01b8152600401602060405180830381865afa158015613ce7573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190613d0b91906144d8565b11613d735760405162461bcd60e51b815260206004820152603260248201527f54656c65706f7274657252656769737472794170703a20696e76616c69642054604482015271656c65706f7274657220726567697374727960701b60648201526084016109d3565b81546001600160a01b0319166001600160a01b03821617825561144a8361191b565b6114de612ea5565b606081471015613dc25760405163cd78605960e01b81523060048201526024016109d3565b5f80856001600160a01b03168486604051613ddd9190614dd9565b5f6040518083038185875af1925050503d805f8114613e17576040519150601f19603f3d011682016040523d82523d5f602084013e613e1c565b606091505b5091509150613101868383613e34565b611f99612ea5565b606082613e4957613e4482613e90565b610990565b8151158015613e6057506001600160a01b0384163b155b15613e8957604051639996b31560e01b81526001600160a01b03851660048201526024016109d3565b5080610990565b805115613ea05780518082602001fd5b604051630a12f52160e11b815260040160405180910390fd5b5f5b83811015613ed3578181015183820152602001613ebb565b50505f910152565b5f8151808452613ef2816020860160208601613eb9565b601f01601f19169290920160200192915050565b602081525f6109906020830184613edb565b6001600160a01b0381168114610ae2575f80fd5b8035613f3781613f18565b919050565b5f8060408385031215613f4d575f80fd5b8235613f5881613f18565b946020939093013593505050565b5f805f60608486031215613f78575f80fd5b8335613f8381613f18565b92506020840135613f9381613f18565b929592945050506040919091013590565b5f60208284031215613fb4575f80fd5b813561099081613f18565b5f60208284031215613fcf575f80fd5b5035919050565b5f60208284031215613fe6575f80fd5b81356001600160401b03811115613ffb575f80fd5b82016101608185031215610990575f80fd5b5f610100828403121561401e575f80fd5b50919050565b634e487b7160e01b5f52604160045260245ffd5b60405160c081016001600160401b038111828210171561405a5761405a614024565b60405290565b604080519081016001600160401b038111828210171561405a5761405a614024565b60405161010081016001600160401b038111828210171561405a5761405a614024565b604051601f8201601f191681016001600160401b03811182821017156140cd576140cd614024565b604052919050565b5f6001600160401b038211156140ed576140ed614024565b50601f01601f191660200190565b5f82601f83011261410a575f80fd5b813561411d614118826140d5565b6140a5565b818152846020838601011115614131575f80fd5b816020850160208301375f918101602001919091529392505050565b5f805f80848603610120811215614162575f80fd5b60c081121561416f575f80fd5b50614178614038565b853561418381613f18565b8152602086013561419381613f18565b80602083015250604086013560408201526060860135606082015260808601356141bc81613f18565b608082015260a086013560ff811681146141d4575f80fd5b60a0820152935060c08501356001600160401b038111156141f3575f80fd5b6141ff878288016140fb565b949794965050505060e0830135926101000135919050565b5f6040828403121561401e575f80fd5b5f805f806060858703121561423a575f80fd5b84359350602085013561424c81613f18565b925060408501356001600160401b0380821115614267575f80fd5b818701915087601f83011261427a575f80fd5b813581811115614288575f80fd5b886020828501011115614299575f80fd5b95989497505060200194505050565b5f80604083850312156142b9575f80fd5b82356142c481613f18565b915060208301356142d481613f18565b809150509250929050565b600181811c908216806142f357607f821691505b60208210810361401e57634e487b7160e01b5f52602260045260245ffd5b634e487b7160e01b5f52601160045260245ffd5b808201808211156108fa576108fa614311565b818103818111156108fa576108fa614311565b6020808252602e908201527f54656c65706f7274657252656769737472794170703a207a65726f2054656c6560408201526d706f72746572206164647265737360901b606082015260800190565b60208082526024908201527f53656e645265656e7472616e637947756172643a2073656e64207265656e7472604082015263616e637960e01b606082015260800190565b80820281158282048414176108fa576108fa614311565b5f8261440e57634e487b7160e01b5f52601260045260245ffd5b500490565b634e487b7160e01b5f52602160045260245ffd5b81516001600160a01b0316815260208083015190820152604081016108fa565b602081525f82516005811061446a57634e487b7160e01b5f52602160045260245ffd5b8060208401525060208301516040808401526117f86060840182613edb565b6020808252602f908201527f4e6174697665546f6b656e52656d6f74653a20636f6e747261637420756e646560408201526e1c98dbdb1b185d195c985b1a5e9959608a1b606082015260800190565b5f602082840312156144e8575f80fd5b5051919050565b6020808252825182820152828101516001600160a01b039081166040808501919091528401518051821660608501528083015160808501525f929161010085019190606087015160a0870152608087015160e060c08801528051938490528401925f92506101208701905b8084101561457c5784518316825293850193600193909301929085019061455a565b5060a0880151878203601f190160e0890152945061459a8186613edb565b98975050505050505050565b5f82601f8301126145b5575f80fd5b81516145c3614118826140d5565b8181528460208386010111156145d7575f80fd5b6117f8826020830160208701613eb9565b5f602082840312156145f8575f80fd5b81516001600160401b038082111561460e575f80fd5b9083019060408286031215614621575f80fd5b614629614060565b825160058110614637575f80fd5b815260208301518281111561464a575f80fd5b614656878286016145a6565b60208301525095945050505050565b8051613f3781613f18565b5f60408284031215614680575f80fd5b614688614060565b825161469381613f18565b81526020928301519281019290925250919050565b5f602082840312156146b8575f80fd5b81516001600160401b03808211156146ce575f80fd5b9083019061010082860312156146e2575f80fd5b6146ea614082565b825181526146fa60208401614665565b602082015261470b60408401614665565b604082015261471c60608401614665565b60608201526080830151608082015260a08301518281111561473c575f80fd5b614748878286016145a6565b60a08301525060c083015160c082015261476460e08401614665565b60e082015295945050505050565b5f60208284031215614782575f80fd5b815161099081613f18565b6020808252602b908201527f546f6b656e52656d6f74653a207a65726f2064657374696e6174696f6e20626c60408201526a1bd8dad8da185a5b88125160aa1b606082015260800190565b60208082526037908201527f546f6b656e52656d6f74653a207a65726f2064657374696e6174696f6e20746f60408201527f6b656e207472616e736665727265722061646472657373000000000000000000606082015260800190565b60208082526024908201527f546f6b656e52656d6f74653a207a65726f20726571756972656420676173206c6040820152631a5b5a5d60e21b606082015260800190565b5f808335601e1984360301811261488e575f80fd5b8301803591506001600160401b038211156148a7575f80fd5b602001915036819003821315613be5575f80fd5b60208152815160208201525f602083015160018060a01b0380821660408501528060408601511660608501525050606083015161490360808401826001600160a01b03169052565b50608083015160a083015260a08301516101008060c085015261492a610120850183613edb565b915060c085015160e085015260e085015161494f828601826001600160a01b03169052565b5090949350505050565b5f808335601e1984360301811261496e575f80fd5b83016020810192503590506001600160401b0381111561498c575f80fd5b803603821315613be5575f80fd5b81835281816020850137505f828201602090810191909152601f909101601f19169091010190565b60408152823560408201525f6149da60208501613f2c565b6001600160a01b031660608301526149f460408501613f2c565b6001600160a01b03166080830152614a0f6060850185614959565b6101608060a0860152614a276101a08601838561499a565b9250608087013560c086015260a087013560e0860152614a4960c08801613f2c565b9150610100614a62818701846001600160a01b03169052565b614a6e60e08901613f2c565b9250610120614a87818801856001600160a01b03169052565b614a92828a01613f2c565b93506101409150614aad828801856001600160a01b03169052565b880135918601919091529095013561018084015260209092019290925292915050565b60208152614aea6020820183516001600160a01b03169052565b602082015160408201525f6040830151614b0f60608401826001600160a01b03169052565b5060608301516001600160a01b038116608084015250608083015160a083015260a08301516101608060c0850152614b4b610180850183613edb565b915060c085015160e085015260e0850151610100614b73818701836001600160a01b03169052565b860151610120868101919091528601519050610140614b9c818701836001600160a01b03169052565b959095015193019290925250919050565b8235815261012081016020840135614bc481613f18565b6001600160a01b039081166020840152604085013590614be382613f18565b166040830152614bf560608501613f2c565b6001600160a01b0381166060840152506080840135608083015260a084013560a083015260c084013560c0830152614c2f60e08501613f2c565b6001600160a01b031660e083015261010090910191909152919050565b8481526001600160a01b038481166020830152831660408201526080606082018190525f9061310190830184613edb565b6020808252603a908201527f546f6b656e52656d6f74653a20696e76616c69642064657374696e6174696f6e60408201527f20746f6b656e207472616e736665727265722061646472657373000000000000606082015260800190565b601f82111561158f57805f5260205f20601f840160051c81016020851015614cff5750805b601f840160051c820191505b81811015611f92575f8155600101614d0b565b81516001600160401b03811115614d3757614d37614024565b614d4b81614d4584546142df565b84614cda565b602080601f831160018114614d7e575f8415614d675750858301515b5f19600386901b1c1916600185901b17855561126e565b5f85815260208120601f198616915b82811015614dac57888601518255948401946001909101908401614d8d565b5085821015614dc957878501515f19600388901b60f8161c191681555b5050505050600190811b01905550565b5f8251614dea818460208701613eb9565b9190910192915050565b5f60208284031215614e04575f80fd5b81518015158114610990575f80fd5b60ff82811682821603908111156108fa576108fa614311565b600181815b80851115614e6657815f1904821115614e4c57614e4c614311565b80851615614e5957918102915b93841c9390800290614e31565b509250929050565b5f82614e7c575060016108fa565b81614e8857505f6108fa565b8160018114614e9e5760028114614ea857614ec4565b60019150506108fa565b60ff841115614eb957614eb9614311565b50506001821b6108fa565b5060208310610133831016604e8410600b8410161715614ee7575081810a6108fa565b614ef18383614e2c565b805f1904821115614f0457614f04614311565b029392505050565b5f6109908383614e6e56fe52c63247e1f47db19d5ce0460030c497f067ca4cebf71ba98eeadabe20bace00d2f1ed38b7d242bfb8b41862afb813a15193219a4bc717f2056607593e6c750069a5f7616543528c4fbe43f410b1034bd6da4ba06c25bedf04617268014cf500de77a4dc7391f6f8f2d9567915d687d3aee79e7a1fc7300392f2727e9a0f1d00a26469706673582212201b8ce1a3a17a5a05b783dcb054aa6995d382f3f04a539a1c6e898952e34d7a1b64736f6c6343000819003354656c65706f7274657252656769737472794170703a20696e76616c69642054", +} + +// NativeTokenRemoteABI is the input ABI used to generate the binding from. +// Deprecated: Use NativeTokenRemoteMetaData.ABI instead. +var NativeTokenRemoteABI = NativeTokenRemoteMetaData.ABI + +// NativeTokenRemoteBin is the compiled bytecode used for deploying new contracts. +// Deprecated: Use NativeTokenRemoteMetaData.Bin instead. +var NativeTokenRemoteBin = NativeTokenRemoteMetaData.Bin + +// DeployNativeTokenRemote deploys a new Ethereum contract, binding an instance of NativeTokenRemote to it. +func DeployNativeTokenRemote(auth *bind.TransactOpts, backend bind.ContractBackend, settings TokenRemoteSettings, nativeAssetSymbol string, initialReserveImbalance *big.Int, burnedFeesReportingRewardPercentage *big.Int) (common.Address, *types.Transaction, *NativeTokenRemote, error) { + parsed, err := NativeTokenRemoteMetaData.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(NativeTokenRemoteBin), backend, settings, nativeAssetSymbol, initialReserveImbalance, burnedFeesReportingRewardPercentage) + if err != nil { + return common.Address{}, nil, nil, err + } + return address, tx, &NativeTokenRemote{NativeTokenRemoteCaller: NativeTokenRemoteCaller{contract: contract}, NativeTokenRemoteTransactor: NativeTokenRemoteTransactor{contract: contract}, NativeTokenRemoteFilterer: NativeTokenRemoteFilterer{contract: contract}}, nil +} + +// NativeTokenRemote is an auto generated Go binding around an Ethereum contract. +type NativeTokenRemote struct { + NativeTokenRemoteCaller // Read-only binding to the contract + NativeTokenRemoteTransactor // Write-only binding to the contract + NativeTokenRemoteFilterer // Log filterer for contract events +} + +// NativeTokenRemoteCaller is an auto generated read-only Go binding around an Ethereum contract. +type NativeTokenRemoteCaller struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// NativeTokenRemoteTransactor is an auto generated write-only Go binding around an Ethereum contract. +type NativeTokenRemoteTransactor struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// NativeTokenRemoteFilterer is an auto generated log filtering Go binding around an Ethereum contract events. +type NativeTokenRemoteFilterer struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// NativeTokenRemoteSession is an auto generated Go binding around an Ethereum contract, +// with pre-set call and transact options. +type NativeTokenRemoteSession struct { + Contract *NativeTokenRemote // 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 +} + +// NativeTokenRemoteCallerSession is an auto generated read-only Go binding around an Ethereum contract, +// with pre-set call options. +type NativeTokenRemoteCallerSession struct { + Contract *NativeTokenRemoteCaller // Generic contract caller binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session +} + +// NativeTokenRemoteTransactorSession is an auto generated write-only Go binding around an Ethereum contract, +// with pre-set transact options. +type NativeTokenRemoteTransactorSession struct { + Contract *NativeTokenRemoteTransactor // Generic contract transactor binding to set the session for + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// NativeTokenRemoteRaw is an auto generated low-level Go binding around an Ethereum contract. +type NativeTokenRemoteRaw struct { + Contract *NativeTokenRemote // Generic contract binding to access the raw methods on +} + +// NativeTokenRemoteCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. +type NativeTokenRemoteCallerRaw struct { + Contract *NativeTokenRemoteCaller // Generic read-only contract binding to access the raw methods on +} + +// NativeTokenRemoteTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. +type NativeTokenRemoteTransactorRaw struct { + Contract *NativeTokenRemoteTransactor // Generic write-only contract binding to access the raw methods on +} + +// NewNativeTokenRemote creates a new instance of NativeTokenRemote, bound to a specific deployed contract. +func NewNativeTokenRemote(address common.Address, backend bind.ContractBackend) (*NativeTokenRemote, error) { + contract, err := bindNativeTokenRemote(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &NativeTokenRemote{NativeTokenRemoteCaller: NativeTokenRemoteCaller{contract: contract}, NativeTokenRemoteTransactor: NativeTokenRemoteTransactor{contract: contract}, NativeTokenRemoteFilterer: NativeTokenRemoteFilterer{contract: contract}}, nil +} + +// NewNativeTokenRemoteCaller creates a new read-only instance of NativeTokenRemote, bound to a specific deployed contract. +func NewNativeTokenRemoteCaller(address common.Address, caller bind.ContractCaller) (*NativeTokenRemoteCaller, error) { + contract, err := bindNativeTokenRemote(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &NativeTokenRemoteCaller{contract: contract}, nil +} + +// NewNativeTokenRemoteTransactor creates a new write-only instance of NativeTokenRemote, bound to a specific deployed contract. +func NewNativeTokenRemoteTransactor(address common.Address, transactor bind.ContractTransactor) (*NativeTokenRemoteTransactor, error) { + contract, err := bindNativeTokenRemote(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &NativeTokenRemoteTransactor{contract: contract}, nil +} + +// NewNativeTokenRemoteFilterer creates a new log filterer instance of NativeTokenRemote, bound to a specific deployed contract. +func NewNativeTokenRemoteFilterer(address common.Address, filterer bind.ContractFilterer) (*NativeTokenRemoteFilterer, error) { + contract, err := bindNativeTokenRemote(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &NativeTokenRemoteFilterer{contract: contract}, nil +} + +// bindNativeTokenRemote binds a generic wrapper to an already deployed contract. +func bindNativeTokenRemote(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := NativeTokenRemoteMetaData.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 (_NativeTokenRemote *NativeTokenRemoteRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _NativeTokenRemote.Contract.NativeTokenRemoteCaller.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 (_NativeTokenRemote *NativeTokenRemoteRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _NativeTokenRemote.Contract.NativeTokenRemoteTransactor.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_NativeTokenRemote *NativeTokenRemoteRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _NativeTokenRemote.Contract.NativeTokenRemoteTransactor.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 (_NativeTokenRemote *NativeTokenRemoteCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _NativeTokenRemote.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 (_NativeTokenRemote *NativeTokenRemoteTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _NativeTokenRemote.Contract.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_NativeTokenRemote *NativeTokenRemoteTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _NativeTokenRemote.Contract.contract.Transact(opts, method, params...) +} + +// BURNEDFORTRANSFERADDRESS is a free data retrieval call binding the contract method 0x347212c4. +// +// Solidity: function BURNED_FOR_TRANSFER_ADDRESS() view returns(address) +func (_NativeTokenRemote *NativeTokenRemoteCaller) BURNEDFORTRANSFERADDRESS(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _NativeTokenRemote.contract.Call(opts, &out, "BURNED_FOR_TRANSFER_ADDRESS") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// BURNEDFORTRANSFERADDRESS is a free data retrieval call binding the contract method 0x347212c4. +// +// Solidity: function BURNED_FOR_TRANSFER_ADDRESS() view returns(address) +func (_NativeTokenRemote *NativeTokenRemoteSession) BURNEDFORTRANSFERADDRESS() (common.Address, error) { + return _NativeTokenRemote.Contract.BURNEDFORTRANSFERADDRESS(&_NativeTokenRemote.CallOpts) +} + +// BURNEDFORTRANSFERADDRESS is a free data retrieval call binding the contract method 0x347212c4. +// +// Solidity: function BURNED_FOR_TRANSFER_ADDRESS() view returns(address) +func (_NativeTokenRemote *NativeTokenRemoteCallerSession) BURNEDFORTRANSFERADDRESS() (common.Address, error) { + return _NativeTokenRemote.Contract.BURNEDFORTRANSFERADDRESS(&_NativeTokenRemote.CallOpts) +} + +// BURNEDTXFEESADDRESS is a free data retrieval call binding the contract method 0xc452165e. +// +// Solidity: function BURNED_TX_FEES_ADDRESS() view returns(address) +func (_NativeTokenRemote *NativeTokenRemoteCaller) BURNEDTXFEESADDRESS(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _NativeTokenRemote.contract.Call(opts, &out, "BURNED_TX_FEES_ADDRESS") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// BURNEDTXFEESADDRESS is a free data retrieval call binding the contract method 0xc452165e. +// +// Solidity: function BURNED_TX_FEES_ADDRESS() view returns(address) +func (_NativeTokenRemote *NativeTokenRemoteSession) BURNEDTXFEESADDRESS() (common.Address, error) { + return _NativeTokenRemote.Contract.BURNEDTXFEESADDRESS(&_NativeTokenRemote.CallOpts) +} + +// BURNEDTXFEESADDRESS is a free data retrieval call binding the contract method 0xc452165e. +// +// Solidity: function BURNED_TX_FEES_ADDRESS() view returns(address) +func (_NativeTokenRemote *NativeTokenRemoteCallerSession) BURNEDTXFEESADDRESS() (common.Address, error) { + return _NativeTokenRemote.Contract.BURNEDTXFEESADDRESS(&_NativeTokenRemote.CallOpts) +} + +// HOMECHAINBURNADDRESS is a free data retrieval call binding the contract method 0xed0ae4b0. +// +// Solidity: function HOME_CHAIN_BURN_ADDRESS() view returns(address) +func (_NativeTokenRemote *NativeTokenRemoteCaller) HOMECHAINBURNADDRESS(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _NativeTokenRemote.contract.Call(opts, &out, "HOME_CHAIN_BURN_ADDRESS") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// HOMECHAINBURNADDRESS is a free data retrieval call binding the contract method 0xed0ae4b0. +// +// Solidity: function HOME_CHAIN_BURN_ADDRESS() view returns(address) +func (_NativeTokenRemote *NativeTokenRemoteSession) HOMECHAINBURNADDRESS() (common.Address, error) { + return _NativeTokenRemote.Contract.HOMECHAINBURNADDRESS(&_NativeTokenRemote.CallOpts) +} + +// HOMECHAINBURNADDRESS is a free data retrieval call binding the contract method 0xed0ae4b0. +// +// Solidity: function HOME_CHAIN_BURN_ADDRESS() view returns(address) +func (_NativeTokenRemote *NativeTokenRemoteCallerSession) HOMECHAINBURNADDRESS() (common.Address, error) { + return _NativeTokenRemote.Contract.HOMECHAINBURNADDRESS(&_NativeTokenRemote.CallOpts) +} + +// MULTIHOPCALLGASPERWORD is a free data retrieval call binding the contract method 0x15beb59f. +// +// Solidity: function MULTI_HOP_CALL_GAS_PER_WORD() view returns(uint256) +func (_NativeTokenRemote *NativeTokenRemoteCaller) MULTIHOPCALLGASPERWORD(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _NativeTokenRemote.contract.Call(opts, &out, "MULTI_HOP_CALL_GAS_PER_WORD") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// MULTIHOPCALLGASPERWORD is a free data retrieval call binding the contract method 0x15beb59f. +// +// Solidity: function MULTI_HOP_CALL_GAS_PER_WORD() view returns(uint256) +func (_NativeTokenRemote *NativeTokenRemoteSession) MULTIHOPCALLGASPERWORD() (*big.Int, error) { + return _NativeTokenRemote.Contract.MULTIHOPCALLGASPERWORD(&_NativeTokenRemote.CallOpts) +} + +// MULTIHOPCALLGASPERWORD is a free data retrieval call binding the contract method 0x15beb59f. +// +// Solidity: function MULTI_HOP_CALL_GAS_PER_WORD() view returns(uint256) +func (_NativeTokenRemote *NativeTokenRemoteCallerSession) MULTIHOPCALLGASPERWORD() (*big.Int, error) { + return _NativeTokenRemote.Contract.MULTIHOPCALLGASPERWORD(&_NativeTokenRemote.CallOpts) +} + +// MULTIHOPCALLREQUIREDGAS is a free data retrieval call binding the contract method 0x71717c18. +// +// Solidity: function MULTI_HOP_CALL_REQUIRED_GAS() view returns(uint256) +func (_NativeTokenRemote *NativeTokenRemoteCaller) MULTIHOPCALLREQUIREDGAS(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _NativeTokenRemote.contract.Call(opts, &out, "MULTI_HOP_CALL_REQUIRED_GAS") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// MULTIHOPCALLREQUIREDGAS is a free data retrieval call binding the contract method 0x71717c18. +// +// Solidity: function MULTI_HOP_CALL_REQUIRED_GAS() view returns(uint256) +func (_NativeTokenRemote *NativeTokenRemoteSession) MULTIHOPCALLREQUIREDGAS() (*big.Int, error) { + return _NativeTokenRemote.Contract.MULTIHOPCALLREQUIREDGAS(&_NativeTokenRemote.CallOpts) +} + +// MULTIHOPCALLREQUIREDGAS is a free data retrieval call binding the contract method 0x71717c18. +// +// Solidity: function MULTI_HOP_CALL_REQUIRED_GAS() view returns(uint256) +func (_NativeTokenRemote *NativeTokenRemoteCallerSession) MULTIHOPCALLREQUIREDGAS() (*big.Int, error) { + return _NativeTokenRemote.Contract.MULTIHOPCALLREQUIREDGAS(&_NativeTokenRemote.CallOpts) +} + +// MULTIHOPSENDREQUIREDGAS is a free data retrieval call binding the contract method 0x5507f3d1. +// +// Solidity: function MULTI_HOP_SEND_REQUIRED_GAS() view returns(uint256) +func (_NativeTokenRemote *NativeTokenRemoteCaller) MULTIHOPSENDREQUIREDGAS(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _NativeTokenRemote.contract.Call(opts, &out, "MULTI_HOP_SEND_REQUIRED_GAS") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// MULTIHOPSENDREQUIREDGAS is a free data retrieval call binding the contract method 0x5507f3d1. +// +// Solidity: function MULTI_HOP_SEND_REQUIRED_GAS() view returns(uint256) +func (_NativeTokenRemote *NativeTokenRemoteSession) MULTIHOPSENDREQUIREDGAS() (*big.Int, error) { + return _NativeTokenRemote.Contract.MULTIHOPSENDREQUIREDGAS(&_NativeTokenRemote.CallOpts) +} + +// MULTIHOPSENDREQUIREDGAS is a free data retrieval call binding the contract method 0x5507f3d1. +// +// Solidity: function MULTI_HOP_SEND_REQUIRED_GAS() view returns(uint256) +func (_NativeTokenRemote *NativeTokenRemoteCallerSession) MULTIHOPSENDREQUIREDGAS() (*big.Int, error) { + return _NativeTokenRemote.Contract.MULTIHOPSENDREQUIREDGAS(&_NativeTokenRemote.CallOpts) +} + +// NATIVEMINTER is a free data retrieval call binding the contract method 0x329c3e12. +// +// Solidity: function NATIVE_MINTER() view returns(address) +func (_NativeTokenRemote *NativeTokenRemoteCaller) NATIVEMINTER(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _NativeTokenRemote.contract.Call(opts, &out, "NATIVE_MINTER") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// NATIVEMINTER is a free data retrieval call binding the contract method 0x329c3e12. +// +// Solidity: function NATIVE_MINTER() view returns(address) +func (_NativeTokenRemote *NativeTokenRemoteSession) NATIVEMINTER() (common.Address, error) { + return _NativeTokenRemote.Contract.NATIVEMINTER(&_NativeTokenRemote.CallOpts) +} + +// NATIVEMINTER is a free data retrieval call binding the contract method 0x329c3e12. +// +// Solidity: function NATIVE_MINTER() view returns(address) +func (_NativeTokenRemote *NativeTokenRemoteCallerSession) NATIVEMINTER() (common.Address, error) { + return _NativeTokenRemote.Contract.NATIVEMINTER(&_NativeTokenRemote.CallOpts) +} + +// NATIVETOKENREMOTESTORAGELOCATION is a free data retrieval call binding the contract method 0xa5717bc0. +// +// Solidity: function NATIVE_TOKEN_REMOTE_STORAGE_LOCATION() view returns(bytes32) +func (_NativeTokenRemote *NativeTokenRemoteCaller) NATIVETOKENREMOTESTORAGELOCATION(opts *bind.CallOpts) ([32]byte, error) { + var out []interface{} + err := _NativeTokenRemote.contract.Call(opts, &out, "NATIVE_TOKEN_REMOTE_STORAGE_LOCATION") + + if err != nil { + return *new([32]byte), err + } + + out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) + + return out0, err + +} + +// NATIVETOKENREMOTESTORAGELOCATION is a free data retrieval call binding the contract method 0xa5717bc0. +// +// Solidity: function NATIVE_TOKEN_REMOTE_STORAGE_LOCATION() view returns(bytes32) +func (_NativeTokenRemote *NativeTokenRemoteSession) NATIVETOKENREMOTESTORAGELOCATION() ([32]byte, error) { + return _NativeTokenRemote.Contract.NATIVETOKENREMOTESTORAGELOCATION(&_NativeTokenRemote.CallOpts) +} + +// NATIVETOKENREMOTESTORAGELOCATION is a free data retrieval call binding the contract method 0xa5717bc0. +// +// Solidity: function NATIVE_TOKEN_REMOTE_STORAGE_LOCATION() view returns(bytes32) +func (_NativeTokenRemote *NativeTokenRemoteCallerSession) NATIVETOKENREMOTESTORAGELOCATION() ([32]byte, error) { + return _NativeTokenRemote.Contract.NATIVETOKENREMOTESTORAGELOCATION(&_NativeTokenRemote.CallOpts) +} + +// REGISTERREMOTEREQUIREDGAS is a free data retrieval call binding the contract method 0x254ac160. +// +// Solidity: function REGISTER_REMOTE_REQUIRED_GAS() view returns(uint256) +func (_NativeTokenRemote *NativeTokenRemoteCaller) REGISTERREMOTEREQUIREDGAS(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _NativeTokenRemote.contract.Call(opts, &out, "REGISTER_REMOTE_REQUIRED_GAS") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// REGISTERREMOTEREQUIREDGAS is a free data retrieval call binding the contract method 0x254ac160. +// +// Solidity: function REGISTER_REMOTE_REQUIRED_GAS() view returns(uint256) +func (_NativeTokenRemote *NativeTokenRemoteSession) REGISTERREMOTEREQUIREDGAS() (*big.Int, error) { + return _NativeTokenRemote.Contract.REGISTERREMOTEREQUIREDGAS(&_NativeTokenRemote.CallOpts) +} + +// REGISTERREMOTEREQUIREDGAS is a free data retrieval call binding the contract method 0x254ac160. +// +// Solidity: function REGISTER_REMOTE_REQUIRED_GAS() view returns(uint256) +func (_NativeTokenRemote *NativeTokenRemoteCallerSession) REGISTERREMOTEREQUIREDGAS() (*big.Int, error) { + return _NativeTokenRemote.Contract.REGISTERREMOTEREQUIREDGAS(&_NativeTokenRemote.CallOpts) +} + +// TELEPORTERREGISTRYAPPSTORAGELOCATION is a free data retrieval call binding the contract method 0x909a6ac0. +// +// Solidity: function TELEPORTER_REGISTRY_APP_STORAGE_LOCATION() view returns(bytes32) +func (_NativeTokenRemote *NativeTokenRemoteCaller) TELEPORTERREGISTRYAPPSTORAGELOCATION(opts *bind.CallOpts) ([32]byte, error) { + var out []interface{} + err := _NativeTokenRemote.contract.Call(opts, &out, "TELEPORTER_REGISTRY_APP_STORAGE_LOCATION") + + if err != nil { + return *new([32]byte), err + } + + out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) + + return out0, err + +} + +// TELEPORTERREGISTRYAPPSTORAGELOCATION is a free data retrieval call binding the contract method 0x909a6ac0. +// +// Solidity: function TELEPORTER_REGISTRY_APP_STORAGE_LOCATION() view returns(bytes32) +func (_NativeTokenRemote *NativeTokenRemoteSession) TELEPORTERREGISTRYAPPSTORAGELOCATION() ([32]byte, error) { + return _NativeTokenRemote.Contract.TELEPORTERREGISTRYAPPSTORAGELOCATION(&_NativeTokenRemote.CallOpts) +} + +// TELEPORTERREGISTRYAPPSTORAGELOCATION is a free data retrieval call binding the contract method 0x909a6ac0. +// +// Solidity: function TELEPORTER_REGISTRY_APP_STORAGE_LOCATION() view returns(bytes32) +func (_NativeTokenRemote *NativeTokenRemoteCallerSession) TELEPORTERREGISTRYAPPSTORAGELOCATION() ([32]byte, error) { + return _NativeTokenRemote.Contract.TELEPORTERREGISTRYAPPSTORAGELOCATION(&_NativeTokenRemote.CallOpts) +} + +// TOKENREMOTESTORAGELOCATION is a free data retrieval call binding the contract method 0x35cac159. +// +// Solidity: function TOKEN_REMOTE_STORAGE_LOCATION() view returns(bytes32) +func (_NativeTokenRemote *NativeTokenRemoteCaller) TOKENREMOTESTORAGELOCATION(opts *bind.CallOpts) ([32]byte, error) { + var out []interface{} + err := _NativeTokenRemote.contract.Call(opts, &out, "TOKEN_REMOTE_STORAGE_LOCATION") + + if err != nil { + return *new([32]byte), err + } + + out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) + + return out0, err + +} + +// TOKENREMOTESTORAGELOCATION is a free data retrieval call binding the contract method 0x35cac159. +// +// Solidity: function TOKEN_REMOTE_STORAGE_LOCATION() view returns(bytes32) +func (_NativeTokenRemote *NativeTokenRemoteSession) TOKENREMOTESTORAGELOCATION() ([32]byte, error) { + return _NativeTokenRemote.Contract.TOKENREMOTESTORAGELOCATION(&_NativeTokenRemote.CallOpts) +} + +// TOKENREMOTESTORAGELOCATION is a free data retrieval call binding the contract method 0x35cac159. +// +// Solidity: function TOKEN_REMOTE_STORAGE_LOCATION() view returns(bytes32) +func (_NativeTokenRemote *NativeTokenRemoteCallerSession) TOKENREMOTESTORAGELOCATION() ([32]byte, error) { + return _NativeTokenRemote.Contract.TOKENREMOTESTORAGELOCATION(&_NativeTokenRemote.CallOpts) +} + +// Allowance is a free data retrieval call binding the contract method 0xdd62ed3e. +// +// Solidity: function allowance(address owner, address spender) view returns(uint256) +func (_NativeTokenRemote *NativeTokenRemoteCaller) Allowance(opts *bind.CallOpts, owner common.Address, spender common.Address) (*big.Int, error) { + var out []interface{} + err := _NativeTokenRemote.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 (_NativeTokenRemote *NativeTokenRemoteSession) Allowance(owner common.Address, spender common.Address) (*big.Int, error) { + return _NativeTokenRemote.Contract.Allowance(&_NativeTokenRemote.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 (_NativeTokenRemote *NativeTokenRemoteCallerSession) Allowance(owner common.Address, spender common.Address) (*big.Int, error) { + return _NativeTokenRemote.Contract.Allowance(&_NativeTokenRemote.CallOpts, owner, spender) +} + +// BalanceOf is a free data retrieval call binding the contract method 0x70a08231. +// +// Solidity: function balanceOf(address account) view returns(uint256) +func (_NativeTokenRemote *NativeTokenRemoteCaller) BalanceOf(opts *bind.CallOpts, account common.Address) (*big.Int, error) { + var out []interface{} + err := _NativeTokenRemote.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 (_NativeTokenRemote *NativeTokenRemoteSession) BalanceOf(account common.Address) (*big.Int, error) { + return _NativeTokenRemote.Contract.BalanceOf(&_NativeTokenRemote.CallOpts, account) +} + +// BalanceOf is a free data retrieval call binding the contract method 0x70a08231. +// +// Solidity: function balanceOf(address account) view returns(uint256) +func (_NativeTokenRemote *NativeTokenRemoteCallerSession) BalanceOf(account common.Address) (*big.Int, error) { + return _NativeTokenRemote.Contract.BalanceOf(&_NativeTokenRemote.CallOpts, account) +} + +// CalculateNumWords is a free data retrieval call binding the contract method 0xf3f981d8. +// +// Solidity: function calculateNumWords(uint256 payloadSize) pure returns(uint256) +func (_NativeTokenRemote *NativeTokenRemoteCaller) CalculateNumWords(opts *bind.CallOpts, payloadSize *big.Int) (*big.Int, error) { + var out []interface{} + err := _NativeTokenRemote.contract.Call(opts, &out, "calculateNumWords", payloadSize) + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// CalculateNumWords is a free data retrieval call binding the contract method 0xf3f981d8. +// +// Solidity: function calculateNumWords(uint256 payloadSize) pure returns(uint256) +func (_NativeTokenRemote *NativeTokenRemoteSession) CalculateNumWords(payloadSize *big.Int) (*big.Int, error) { + return _NativeTokenRemote.Contract.CalculateNumWords(&_NativeTokenRemote.CallOpts, payloadSize) +} + +// CalculateNumWords is a free data retrieval call binding the contract method 0xf3f981d8. +// +// Solidity: function calculateNumWords(uint256 payloadSize) pure returns(uint256) +func (_NativeTokenRemote *NativeTokenRemoteCallerSession) CalculateNumWords(payloadSize *big.Int) (*big.Int, error) { + return _NativeTokenRemote.Contract.CalculateNumWords(&_NativeTokenRemote.CallOpts, payloadSize) +} + +// Decimals is a free data retrieval call binding the contract method 0x313ce567. +// +// Solidity: function decimals() view returns(uint8) +func (_NativeTokenRemote *NativeTokenRemoteCaller) Decimals(opts *bind.CallOpts) (uint8, error) { + var out []interface{} + err := _NativeTokenRemote.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 (_NativeTokenRemote *NativeTokenRemoteSession) Decimals() (uint8, error) { + return _NativeTokenRemote.Contract.Decimals(&_NativeTokenRemote.CallOpts) +} + +// Decimals is a free data retrieval call binding the contract method 0x313ce567. +// +// Solidity: function decimals() view returns(uint8) +func (_NativeTokenRemote *NativeTokenRemoteCallerSession) Decimals() (uint8, error) { + return _NativeTokenRemote.Contract.Decimals(&_NativeTokenRemote.CallOpts) +} + +// GetBlockchainID is a free data retrieval call binding the contract method 0x4213cf78. +// +// Solidity: function getBlockchainID() view returns(bytes32) +func (_NativeTokenRemote *NativeTokenRemoteCaller) GetBlockchainID(opts *bind.CallOpts) ([32]byte, error) { + var out []interface{} + err := _NativeTokenRemote.contract.Call(opts, &out, "getBlockchainID") + + if err != nil { + return *new([32]byte), err + } + + out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) + + return out0, err + +} + +// GetBlockchainID is a free data retrieval call binding the contract method 0x4213cf78. +// +// Solidity: function getBlockchainID() view returns(bytes32) +func (_NativeTokenRemote *NativeTokenRemoteSession) GetBlockchainID() ([32]byte, error) { + return _NativeTokenRemote.Contract.GetBlockchainID(&_NativeTokenRemote.CallOpts) +} + +// GetBlockchainID is a free data retrieval call binding the contract method 0x4213cf78. +// +// Solidity: function getBlockchainID() view returns(bytes32) +func (_NativeTokenRemote *NativeTokenRemoteCallerSession) GetBlockchainID() ([32]byte, error) { + return _NativeTokenRemote.Contract.GetBlockchainID(&_NativeTokenRemote.CallOpts) +} + +// GetInitialReserveImbalance is a free data retrieval call binding the contract method 0xef793e2a. +// +// Solidity: function getInitialReserveImbalance() view returns(uint256) +func (_NativeTokenRemote *NativeTokenRemoteCaller) GetInitialReserveImbalance(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _NativeTokenRemote.contract.Call(opts, &out, "getInitialReserveImbalance") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// GetInitialReserveImbalance is a free data retrieval call binding the contract method 0xef793e2a. +// +// Solidity: function getInitialReserveImbalance() view returns(uint256) +func (_NativeTokenRemote *NativeTokenRemoteSession) GetInitialReserveImbalance() (*big.Int, error) { + return _NativeTokenRemote.Contract.GetInitialReserveImbalance(&_NativeTokenRemote.CallOpts) +} + +// GetInitialReserveImbalance is a free data retrieval call binding the contract method 0xef793e2a. +// +// Solidity: function getInitialReserveImbalance() view returns(uint256) +func (_NativeTokenRemote *NativeTokenRemoteCallerSession) GetInitialReserveImbalance() (*big.Int, error) { + return _NativeTokenRemote.Contract.GetInitialReserveImbalance(&_NativeTokenRemote.CallOpts) +} + +// GetIsCollateralized is a free data retrieval call binding the contract method 0x02a30c7d. +// +// Solidity: function getIsCollateralized() view returns(bool) +func (_NativeTokenRemote *NativeTokenRemoteCaller) GetIsCollateralized(opts *bind.CallOpts) (bool, error) { + var out []interface{} + err := _NativeTokenRemote.contract.Call(opts, &out, "getIsCollateralized") + + if err != nil { + return *new(bool), err + } + + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + + return out0, err + +} + +// GetIsCollateralized is a free data retrieval call binding the contract method 0x02a30c7d. +// +// Solidity: function getIsCollateralized() view returns(bool) +func (_NativeTokenRemote *NativeTokenRemoteSession) GetIsCollateralized() (bool, error) { + return _NativeTokenRemote.Contract.GetIsCollateralized(&_NativeTokenRemote.CallOpts) +} + +// GetIsCollateralized is a free data retrieval call binding the contract method 0x02a30c7d. +// +// Solidity: function getIsCollateralized() view returns(bool) +func (_NativeTokenRemote *NativeTokenRemoteCallerSession) GetIsCollateralized() (bool, error) { + return _NativeTokenRemote.Contract.GetIsCollateralized(&_NativeTokenRemote.CallOpts) +} + +// GetMinTeleporterVersion is a free data retrieval call binding the contract method 0xd2cc7a70. +// +// Solidity: function getMinTeleporterVersion() view returns(uint256) +func (_NativeTokenRemote *NativeTokenRemoteCaller) GetMinTeleporterVersion(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _NativeTokenRemote.contract.Call(opts, &out, "getMinTeleporterVersion") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// GetMinTeleporterVersion is a free data retrieval call binding the contract method 0xd2cc7a70. +// +// Solidity: function getMinTeleporterVersion() view returns(uint256) +func (_NativeTokenRemote *NativeTokenRemoteSession) GetMinTeleporterVersion() (*big.Int, error) { + return _NativeTokenRemote.Contract.GetMinTeleporterVersion(&_NativeTokenRemote.CallOpts) +} + +// GetMinTeleporterVersion is a free data retrieval call binding the contract method 0xd2cc7a70. +// +// Solidity: function getMinTeleporterVersion() view returns(uint256) +func (_NativeTokenRemote *NativeTokenRemoteCallerSession) GetMinTeleporterVersion() (*big.Int, error) { + return _NativeTokenRemote.Contract.GetMinTeleporterVersion(&_NativeTokenRemote.CallOpts) +} + +// GetMultiplyOnRemote is a free data retrieval call binding the contract method 0x7ee3779a. +// +// Solidity: function getMultiplyOnRemote() view returns(bool) +func (_NativeTokenRemote *NativeTokenRemoteCaller) GetMultiplyOnRemote(opts *bind.CallOpts) (bool, error) { + var out []interface{} + err := _NativeTokenRemote.contract.Call(opts, &out, "getMultiplyOnRemote") + + if err != nil { + return *new(bool), err + } + + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + + return out0, err + +} + +// GetMultiplyOnRemote is a free data retrieval call binding the contract method 0x7ee3779a. +// +// Solidity: function getMultiplyOnRemote() view returns(bool) +func (_NativeTokenRemote *NativeTokenRemoteSession) GetMultiplyOnRemote() (bool, error) { + return _NativeTokenRemote.Contract.GetMultiplyOnRemote(&_NativeTokenRemote.CallOpts) +} + +// GetMultiplyOnRemote is a free data retrieval call binding the contract method 0x7ee3779a. +// +// Solidity: function getMultiplyOnRemote() view returns(bool) +func (_NativeTokenRemote *NativeTokenRemoteCallerSession) GetMultiplyOnRemote() (bool, error) { + return _NativeTokenRemote.Contract.GetMultiplyOnRemote(&_NativeTokenRemote.CallOpts) +} + +// GetTokenHomeAddress is a free data retrieval call binding the contract method 0xc3cd6927. +// +// Solidity: function getTokenHomeAddress() view returns(address) +func (_NativeTokenRemote *NativeTokenRemoteCaller) GetTokenHomeAddress(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _NativeTokenRemote.contract.Call(opts, &out, "getTokenHomeAddress") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// GetTokenHomeAddress is a free data retrieval call binding the contract method 0xc3cd6927. +// +// Solidity: function getTokenHomeAddress() view returns(address) +func (_NativeTokenRemote *NativeTokenRemoteSession) GetTokenHomeAddress() (common.Address, error) { + return _NativeTokenRemote.Contract.GetTokenHomeAddress(&_NativeTokenRemote.CallOpts) +} + +// GetTokenHomeAddress is a free data retrieval call binding the contract method 0xc3cd6927. +// +// Solidity: function getTokenHomeAddress() view returns(address) +func (_NativeTokenRemote *NativeTokenRemoteCallerSession) GetTokenHomeAddress() (common.Address, error) { + return _NativeTokenRemote.Contract.GetTokenHomeAddress(&_NativeTokenRemote.CallOpts) +} + +// GetTokenHomeBlockchainID is a free data retrieval call binding the contract method 0xe0fd9cb8. +// +// Solidity: function getTokenHomeBlockchainID() view returns(bytes32) +func (_NativeTokenRemote *NativeTokenRemoteCaller) GetTokenHomeBlockchainID(opts *bind.CallOpts) ([32]byte, error) { + var out []interface{} + err := _NativeTokenRemote.contract.Call(opts, &out, "getTokenHomeBlockchainID") + + if err != nil { + return *new([32]byte), err + } + + out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) + + return out0, err + +} + +// GetTokenHomeBlockchainID is a free data retrieval call binding the contract method 0xe0fd9cb8. +// +// Solidity: function getTokenHomeBlockchainID() view returns(bytes32) +func (_NativeTokenRemote *NativeTokenRemoteSession) GetTokenHomeBlockchainID() ([32]byte, error) { + return _NativeTokenRemote.Contract.GetTokenHomeBlockchainID(&_NativeTokenRemote.CallOpts) +} + +// GetTokenHomeBlockchainID is a free data retrieval call binding the contract method 0xe0fd9cb8. +// +// Solidity: function getTokenHomeBlockchainID() view returns(bytes32) +func (_NativeTokenRemote *NativeTokenRemoteCallerSession) GetTokenHomeBlockchainID() ([32]byte, error) { + return _NativeTokenRemote.Contract.GetTokenHomeBlockchainID(&_NativeTokenRemote.CallOpts) +} + +// GetTokenMultiplier is a free data retrieval call binding the contract method 0x0733c8c8. +// +// Solidity: function getTokenMultiplier() view returns(uint256) +func (_NativeTokenRemote *NativeTokenRemoteCaller) GetTokenMultiplier(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _NativeTokenRemote.contract.Call(opts, &out, "getTokenMultiplier") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// GetTokenMultiplier is a free data retrieval call binding the contract method 0x0733c8c8. +// +// Solidity: function getTokenMultiplier() view returns(uint256) +func (_NativeTokenRemote *NativeTokenRemoteSession) GetTokenMultiplier() (*big.Int, error) { + return _NativeTokenRemote.Contract.GetTokenMultiplier(&_NativeTokenRemote.CallOpts) +} + +// GetTokenMultiplier is a free data retrieval call binding the contract method 0x0733c8c8. +// +// Solidity: function getTokenMultiplier() view returns(uint256) +func (_NativeTokenRemote *NativeTokenRemoteCallerSession) GetTokenMultiplier() (*big.Int, error) { + return _NativeTokenRemote.Contract.GetTokenMultiplier(&_NativeTokenRemote.CallOpts) +} + +// GetTotalMinted is a free data retrieval call binding the contract method 0x0ca1c5c9. +// +// Solidity: function getTotalMinted() view returns(uint256) +func (_NativeTokenRemote *NativeTokenRemoteCaller) GetTotalMinted(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _NativeTokenRemote.contract.Call(opts, &out, "getTotalMinted") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// GetTotalMinted is a free data retrieval call binding the contract method 0x0ca1c5c9. +// +// Solidity: function getTotalMinted() view returns(uint256) +func (_NativeTokenRemote *NativeTokenRemoteSession) GetTotalMinted() (*big.Int, error) { + return _NativeTokenRemote.Contract.GetTotalMinted(&_NativeTokenRemote.CallOpts) +} + +// GetTotalMinted is a free data retrieval call binding the contract method 0x0ca1c5c9. +// +// Solidity: function getTotalMinted() view returns(uint256) +func (_NativeTokenRemote *NativeTokenRemoteCallerSession) GetTotalMinted() (*big.Int, error) { + return _NativeTokenRemote.Contract.GetTotalMinted(&_NativeTokenRemote.CallOpts) +} + +// IsTeleporterAddressPaused is a free data retrieval call binding the contract method 0x97314297. +// +// Solidity: function isTeleporterAddressPaused(address teleporterAddress) view returns(bool) +func (_NativeTokenRemote *NativeTokenRemoteCaller) IsTeleporterAddressPaused(opts *bind.CallOpts, teleporterAddress common.Address) (bool, error) { + var out []interface{} + err := _NativeTokenRemote.contract.Call(opts, &out, "isTeleporterAddressPaused", teleporterAddress) + + if err != nil { + return *new(bool), err + } + + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + + return out0, err + +} + +// IsTeleporterAddressPaused is a free data retrieval call binding the contract method 0x97314297. +// +// Solidity: function isTeleporterAddressPaused(address teleporterAddress) view returns(bool) +func (_NativeTokenRemote *NativeTokenRemoteSession) IsTeleporterAddressPaused(teleporterAddress common.Address) (bool, error) { + return _NativeTokenRemote.Contract.IsTeleporterAddressPaused(&_NativeTokenRemote.CallOpts, teleporterAddress) +} + +// IsTeleporterAddressPaused is a free data retrieval call binding the contract method 0x97314297. +// +// Solidity: function isTeleporterAddressPaused(address teleporterAddress) view returns(bool) +func (_NativeTokenRemote *NativeTokenRemoteCallerSession) IsTeleporterAddressPaused(teleporterAddress common.Address) (bool, error) { + return _NativeTokenRemote.Contract.IsTeleporterAddressPaused(&_NativeTokenRemote.CallOpts, teleporterAddress) +} + +// Name is a free data retrieval call binding the contract method 0x06fdde03. +// +// Solidity: function name() view returns(string) +func (_NativeTokenRemote *NativeTokenRemoteCaller) Name(opts *bind.CallOpts) (string, error) { + var out []interface{} + err := _NativeTokenRemote.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 (_NativeTokenRemote *NativeTokenRemoteSession) Name() (string, error) { + return _NativeTokenRemote.Contract.Name(&_NativeTokenRemote.CallOpts) +} + +// Name is a free data retrieval call binding the contract method 0x06fdde03. +// +// Solidity: function name() view returns(string) +func (_NativeTokenRemote *NativeTokenRemoteCallerSession) Name() (string, error) { + return _NativeTokenRemote.Contract.Name(&_NativeTokenRemote.CallOpts) +} + +// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. +// +// Solidity: function owner() view returns(address) +func (_NativeTokenRemote *NativeTokenRemoteCaller) Owner(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _NativeTokenRemote.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 (_NativeTokenRemote *NativeTokenRemoteSession) Owner() (common.Address, error) { + return _NativeTokenRemote.Contract.Owner(&_NativeTokenRemote.CallOpts) +} + +// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. +// +// Solidity: function owner() view returns(address) +func (_NativeTokenRemote *NativeTokenRemoteCallerSession) Owner() (common.Address, error) { + return _NativeTokenRemote.Contract.Owner(&_NativeTokenRemote.CallOpts) +} + +// Symbol is a free data retrieval call binding the contract method 0x95d89b41. +// +// Solidity: function symbol() view returns(string) +func (_NativeTokenRemote *NativeTokenRemoteCaller) Symbol(opts *bind.CallOpts) (string, error) { + var out []interface{} + err := _NativeTokenRemote.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 (_NativeTokenRemote *NativeTokenRemoteSession) Symbol() (string, error) { + return _NativeTokenRemote.Contract.Symbol(&_NativeTokenRemote.CallOpts) +} + +// Symbol is a free data retrieval call binding the contract method 0x95d89b41. +// +// Solidity: function symbol() view returns(string) +func (_NativeTokenRemote *NativeTokenRemoteCallerSession) Symbol() (string, error) { + return _NativeTokenRemote.Contract.Symbol(&_NativeTokenRemote.CallOpts) +} + +// TotalNativeAssetSupply is a free data retrieval call binding the contract method 0x1906529c. +// +// Solidity: function totalNativeAssetSupply() view returns(uint256) +func (_NativeTokenRemote *NativeTokenRemoteCaller) TotalNativeAssetSupply(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _NativeTokenRemote.contract.Call(opts, &out, "totalNativeAssetSupply") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// TotalNativeAssetSupply is a free data retrieval call binding the contract method 0x1906529c. +// +// Solidity: function totalNativeAssetSupply() view returns(uint256) +func (_NativeTokenRemote *NativeTokenRemoteSession) TotalNativeAssetSupply() (*big.Int, error) { + return _NativeTokenRemote.Contract.TotalNativeAssetSupply(&_NativeTokenRemote.CallOpts) +} + +// TotalNativeAssetSupply is a free data retrieval call binding the contract method 0x1906529c. +// +// Solidity: function totalNativeAssetSupply() view returns(uint256) +func (_NativeTokenRemote *NativeTokenRemoteCallerSession) TotalNativeAssetSupply() (*big.Int, error) { + return _NativeTokenRemote.Contract.TotalNativeAssetSupply(&_NativeTokenRemote.CallOpts) +} + +// TotalSupply is a free data retrieval call binding the contract method 0x18160ddd. +// +// Solidity: function totalSupply() view returns(uint256) +func (_NativeTokenRemote *NativeTokenRemoteCaller) TotalSupply(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _NativeTokenRemote.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 (_NativeTokenRemote *NativeTokenRemoteSession) TotalSupply() (*big.Int, error) { + return _NativeTokenRemote.Contract.TotalSupply(&_NativeTokenRemote.CallOpts) +} + +// TotalSupply is a free data retrieval call binding the contract method 0x18160ddd. +// +// Solidity: function totalSupply() view returns(uint256) +func (_NativeTokenRemote *NativeTokenRemoteCallerSession) TotalSupply() (*big.Int, error) { + return _NativeTokenRemote.Contract.TotalSupply(&_NativeTokenRemote.CallOpts) +} + +// Approve is a paid mutator transaction binding the contract method 0x095ea7b3. +// +// Solidity: function approve(address spender, uint256 value) returns(bool) +func (_NativeTokenRemote *NativeTokenRemoteTransactor) Approve(opts *bind.TransactOpts, spender common.Address, value *big.Int) (*types.Transaction, error) { + return _NativeTokenRemote.contract.Transact(opts, "approve", spender, value) +} + +// Approve is a paid mutator transaction binding the contract method 0x095ea7b3. +// +// Solidity: function approve(address spender, uint256 value) returns(bool) +func (_NativeTokenRemote *NativeTokenRemoteSession) Approve(spender common.Address, value *big.Int) (*types.Transaction, error) { + return _NativeTokenRemote.Contract.Approve(&_NativeTokenRemote.TransactOpts, spender, value) +} + +// Approve is a paid mutator transaction binding the contract method 0x095ea7b3. +// +// Solidity: function approve(address spender, uint256 value) returns(bool) +func (_NativeTokenRemote *NativeTokenRemoteTransactorSession) Approve(spender common.Address, value *big.Int) (*types.Transaction, error) { + return _NativeTokenRemote.Contract.Approve(&_NativeTokenRemote.TransactOpts, spender, value) +} + +// Deposit is a paid mutator transaction binding the contract method 0xd0e30db0. +// +// Solidity: function deposit() payable returns() +func (_NativeTokenRemote *NativeTokenRemoteTransactor) Deposit(opts *bind.TransactOpts) (*types.Transaction, error) { + return _NativeTokenRemote.contract.Transact(opts, "deposit") +} + +// Deposit is a paid mutator transaction binding the contract method 0xd0e30db0. +// +// Solidity: function deposit() payable returns() +func (_NativeTokenRemote *NativeTokenRemoteSession) Deposit() (*types.Transaction, error) { + return _NativeTokenRemote.Contract.Deposit(&_NativeTokenRemote.TransactOpts) +} + +// Deposit is a paid mutator transaction binding the contract method 0xd0e30db0. +// +// Solidity: function deposit() payable returns() +func (_NativeTokenRemote *NativeTokenRemoteTransactorSession) Deposit() (*types.Transaction, error) { + return _NativeTokenRemote.Contract.Deposit(&_NativeTokenRemote.TransactOpts) +} + +// Initialize is a paid mutator transaction binding the contract method 0x8f6cec88. +// +// Solidity: function initialize((address,address,uint256,bytes32,address,uint8) settings, string nativeAssetSymbol, uint256 initialReserveImbalance, uint256 burnedFeesReportingRewardPercentage) returns() +func (_NativeTokenRemote *NativeTokenRemoteTransactor) Initialize(opts *bind.TransactOpts, settings TokenRemoteSettings, nativeAssetSymbol string, initialReserveImbalance *big.Int, burnedFeesReportingRewardPercentage *big.Int) (*types.Transaction, error) { + return _NativeTokenRemote.contract.Transact(opts, "initialize", settings, nativeAssetSymbol, initialReserveImbalance, burnedFeesReportingRewardPercentage) +} + +// Initialize is a paid mutator transaction binding the contract method 0x8f6cec88. +// +// Solidity: function initialize((address,address,uint256,bytes32,address,uint8) settings, string nativeAssetSymbol, uint256 initialReserveImbalance, uint256 burnedFeesReportingRewardPercentage) returns() +func (_NativeTokenRemote *NativeTokenRemoteSession) Initialize(settings TokenRemoteSettings, nativeAssetSymbol string, initialReserveImbalance *big.Int, burnedFeesReportingRewardPercentage *big.Int) (*types.Transaction, error) { + return _NativeTokenRemote.Contract.Initialize(&_NativeTokenRemote.TransactOpts, settings, nativeAssetSymbol, initialReserveImbalance, burnedFeesReportingRewardPercentage) +} + +// Initialize is a paid mutator transaction binding the contract method 0x8f6cec88. +// +// Solidity: function initialize((address,address,uint256,bytes32,address,uint8) settings, string nativeAssetSymbol, uint256 initialReserveImbalance, uint256 burnedFeesReportingRewardPercentage) returns() +func (_NativeTokenRemote *NativeTokenRemoteTransactorSession) Initialize(settings TokenRemoteSettings, nativeAssetSymbol string, initialReserveImbalance *big.Int, burnedFeesReportingRewardPercentage *big.Int) (*types.Transaction, error) { + return _NativeTokenRemote.Contract.Initialize(&_NativeTokenRemote.TransactOpts, settings, nativeAssetSymbol, initialReserveImbalance, burnedFeesReportingRewardPercentage) +} + +// PauseTeleporterAddress is a paid mutator transaction binding the contract method 0x2b0d8f18. +// +// Solidity: function pauseTeleporterAddress(address teleporterAddress) returns() +func (_NativeTokenRemote *NativeTokenRemoteTransactor) PauseTeleporterAddress(opts *bind.TransactOpts, teleporterAddress common.Address) (*types.Transaction, error) { + return _NativeTokenRemote.contract.Transact(opts, "pauseTeleporterAddress", teleporterAddress) +} + +// PauseTeleporterAddress is a paid mutator transaction binding the contract method 0x2b0d8f18. +// +// Solidity: function pauseTeleporterAddress(address teleporterAddress) returns() +func (_NativeTokenRemote *NativeTokenRemoteSession) PauseTeleporterAddress(teleporterAddress common.Address) (*types.Transaction, error) { + return _NativeTokenRemote.Contract.PauseTeleporterAddress(&_NativeTokenRemote.TransactOpts, teleporterAddress) +} + +// PauseTeleporterAddress is a paid mutator transaction binding the contract method 0x2b0d8f18. +// +// Solidity: function pauseTeleporterAddress(address teleporterAddress) returns() +func (_NativeTokenRemote *NativeTokenRemoteTransactorSession) PauseTeleporterAddress(teleporterAddress common.Address) (*types.Transaction, error) { + return _NativeTokenRemote.Contract.PauseTeleporterAddress(&_NativeTokenRemote.TransactOpts, teleporterAddress) +} + +// ReceiveTeleporterMessage is a paid mutator transaction binding the contract method 0xc868efaa. +// +// Solidity: function receiveTeleporterMessage(bytes32 sourceBlockchainID, address originSenderAddress, bytes message) returns() +func (_NativeTokenRemote *NativeTokenRemoteTransactor) ReceiveTeleporterMessage(opts *bind.TransactOpts, sourceBlockchainID [32]byte, originSenderAddress common.Address, message []byte) (*types.Transaction, error) { + return _NativeTokenRemote.contract.Transact(opts, "receiveTeleporterMessage", sourceBlockchainID, originSenderAddress, message) +} + +// ReceiveTeleporterMessage is a paid mutator transaction binding the contract method 0xc868efaa. +// +// Solidity: function receiveTeleporterMessage(bytes32 sourceBlockchainID, address originSenderAddress, bytes message) returns() +func (_NativeTokenRemote *NativeTokenRemoteSession) ReceiveTeleporterMessage(sourceBlockchainID [32]byte, originSenderAddress common.Address, message []byte) (*types.Transaction, error) { + return _NativeTokenRemote.Contract.ReceiveTeleporterMessage(&_NativeTokenRemote.TransactOpts, sourceBlockchainID, originSenderAddress, message) +} + +// ReceiveTeleporterMessage is a paid mutator transaction binding the contract method 0xc868efaa. +// +// Solidity: function receiveTeleporterMessage(bytes32 sourceBlockchainID, address originSenderAddress, bytes message) returns() +func (_NativeTokenRemote *NativeTokenRemoteTransactorSession) ReceiveTeleporterMessage(sourceBlockchainID [32]byte, originSenderAddress common.Address, message []byte) (*types.Transaction, error) { + return _NativeTokenRemote.Contract.ReceiveTeleporterMessage(&_NativeTokenRemote.TransactOpts, sourceBlockchainID, originSenderAddress, message) +} + +// RegisterWithHome is a paid mutator transaction binding the contract method 0xb8a46d02. +// +// Solidity: function registerWithHome((address,uint256) feeInfo) returns() +func (_NativeTokenRemote *NativeTokenRemoteTransactor) RegisterWithHome(opts *bind.TransactOpts, feeInfo TeleporterFeeInfo) (*types.Transaction, error) { + return _NativeTokenRemote.contract.Transact(opts, "registerWithHome", feeInfo) +} + +// RegisterWithHome is a paid mutator transaction binding the contract method 0xb8a46d02. +// +// Solidity: function registerWithHome((address,uint256) feeInfo) returns() +func (_NativeTokenRemote *NativeTokenRemoteSession) RegisterWithHome(feeInfo TeleporterFeeInfo) (*types.Transaction, error) { + return _NativeTokenRemote.Contract.RegisterWithHome(&_NativeTokenRemote.TransactOpts, feeInfo) +} + +// RegisterWithHome is a paid mutator transaction binding the contract method 0xb8a46d02. +// +// Solidity: function registerWithHome((address,uint256) feeInfo) returns() +func (_NativeTokenRemote *NativeTokenRemoteTransactorSession) RegisterWithHome(feeInfo TeleporterFeeInfo) (*types.Transaction, error) { + return _NativeTokenRemote.Contract.RegisterWithHome(&_NativeTokenRemote.TransactOpts, feeInfo) +} + +// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. +// +// Solidity: function renounceOwnership() returns() +func (_NativeTokenRemote *NativeTokenRemoteTransactor) RenounceOwnership(opts *bind.TransactOpts) (*types.Transaction, error) { + return _NativeTokenRemote.contract.Transact(opts, "renounceOwnership") +} + +// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. +// +// Solidity: function renounceOwnership() returns() +func (_NativeTokenRemote *NativeTokenRemoteSession) RenounceOwnership() (*types.Transaction, error) { + return _NativeTokenRemote.Contract.RenounceOwnership(&_NativeTokenRemote.TransactOpts) +} + +// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. +// +// Solidity: function renounceOwnership() returns() +func (_NativeTokenRemote *NativeTokenRemoteTransactorSession) RenounceOwnership() (*types.Transaction, error) { + return _NativeTokenRemote.Contract.RenounceOwnership(&_NativeTokenRemote.TransactOpts) +} + +// ReportBurnedTxFees is a paid mutator transaction binding the contract method 0x55538c8b. +// +// Solidity: function reportBurnedTxFees(uint256 requiredGasLimit) returns() +func (_NativeTokenRemote *NativeTokenRemoteTransactor) ReportBurnedTxFees(opts *bind.TransactOpts, requiredGasLimit *big.Int) (*types.Transaction, error) { + return _NativeTokenRemote.contract.Transact(opts, "reportBurnedTxFees", requiredGasLimit) +} + +// ReportBurnedTxFees is a paid mutator transaction binding the contract method 0x55538c8b. +// +// Solidity: function reportBurnedTxFees(uint256 requiredGasLimit) returns() +func (_NativeTokenRemote *NativeTokenRemoteSession) ReportBurnedTxFees(requiredGasLimit *big.Int) (*types.Transaction, error) { + return _NativeTokenRemote.Contract.ReportBurnedTxFees(&_NativeTokenRemote.TransactOpts, requiredGasLimit) +} + +// ReportBurnedTxFees is a paid mutator transaction binding the contract method 0x55538c8b. +// +// Solidity: function reportBurnedTxFees(uint256 requiredGasLimit) returns() +func (_NativeTokenRemote *NativeTokenRemoteTransactorSession) ReportBurnedTxFees(requiredGasLimit *big.Int) (*types.Transaction, error) { + return _NativeTokenRemote.Contract.ReportBurnedTxFees(&_NativeTokenRemote.TransactOpts, requiredGasLimit) +} + +// Send is a paid mutator transaction binding the contract method 0x8bf2fa94. +// +// Solidity: function send((bytes32,address,address,address,uint256,uint256,uint256,address) input) payable returns() +func (_NativeTokenRemote *NativeTokenRemoteTransactor) Send(opts *bind.TransactOpts, input SendTokensInput) (*types.Transaction, error) { + return _NativeTokenRemote.contract.Transact(opts, "send", input) +} + +// Send is a paid mutator transaction binding the contract method 0x8bf2fa94. +// +// Solidity: function send((bytes32,address,address,address,uint256,uint256,uint256,address) input) payable returns() +func (_NativeTokenRemote *NativeTokenRemoteSession) Send(input SendTokensInput) (*types.Transaction, error) { + return _NativeTokenRemote.Contract.Send(&_NativeTokenRemote.TransactOpts, input) +} + +// Send is a paid mutator transaction binding the contract method 0x8bf2fa94. +// +// Solidity: function send((bytes32,address,address,address,uint256,uint256,uint256,address) input) payable returns() +func (_NativeTokenRemote *NativeTokenRemoteTransactorSession) Send(input SendTokensInput) (*types.Transaction, error) { + return _NativeTokenRemote.Contract.Send(&_NativeTokenRemote.TransactOpts, input) +} + +// SendAndCall is a paid mutator transaction binding the contract method 0x6e6eef8d. +// +// Solidity: function sendAndCall((bytes32,address,address,bytes,uint256,uint256,address,address,address,uint256,uint256) input) payable returns() +func (_NativeTokenRemote *NativeTokenRemoteTransactor) SendAndCall(opts *bind.TransactOpts, input SendAndCallInput) (*types.Transaction, error) { + return _NativeTokenRemote.contract.Transact(opts, "sendAndCall", input) +} + +// SendAndCall is a paid mutator transaction binding the contract method 0x6e6eef8d. +// +// Solidity: function sendAndCall((bytes32,address,address,bytes,uint256,uint256,address,address,address,uint256,uint256) input) payable returns() +func (_NativeTokenRemote *NativeTokenRemoteSession) SendAndCall(input SendAndCallInput) (*types.Transaction, error) { + return _NativeTokenRemote.Contract.SendAndCall(&_NativeTokenRemote.TransactOpts, input) +} + +// SendAndCall is a paid mutator transaction binding the contract method 0x6e6eef8d. +// +// Solidity: function sendAndCall((bytes32,address,address,bytes,uint256,uint256,address,address,address,uint256,uint256) input) payable returns() +func (_NativeTokenRemote *NativeTokenRemoteTransactorSession) SendAndCall(input SendAndCallInput) (*types.Transaction, error) { + return _NativeTokenRemote.Contract.SendAndCall(&_NativeTokenRemote.TransactOpts, input) +} + +// Transfer is a paid mutator transaction binding the contract method 0xa9059cbb. +// +// Solidity: function transfer(address to, uint256 value) returns(bool) +func (_NativeTokenRemote *NativeTokenRemoteTransactor) Transfer(opts *bind.TransactOpts, to common.Address, value *big.Int) (*types.Transaction, error) { + return _NativeTokenRemote.contract.Transact(opts, "transfer", to, value) +} + +// Transfer is a paid mutator transaction binding the contract method 0xa9059cbb. +// +// Solidity: function transfer(address to, uint256 value) returns(bool) +func (_NativeTokenRemote *NativeTokenRemoteSession) Transfer(to common.Address, value *big.Int) (*types.Transaction, error) { + return _NativeTokenRemote.Contract.Transfer(&_NativeTokenRemote.TransactOpts, to, value) +} + +// Transfer is a paid mutator transaction binding the contract method 0xa9059cbb. +// +// Solidity: function transfer(address to, uint256 value) returns(bool) +func (_NativeTokenRemote *NativeTokenRemoteTransactorSession) Transfer(to common.Address, value *big.Int) (*types.Transaction, error) { + return _NativeTokenRemote.Contract.Transfer(&_NativeTokenRemote.TransactOpts, to, value) +} + +// TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd. +// +// Solidity: function transferFrom(address from, address to, uint256 value) returns(bool) +func (_NativeTokenRemote *NativeTokenRemoteTransactor) TransferFrom(opts *bind.TransactOpts, from common.Address, to common.Address, value *big.Int) (*types.Transaction, error) { + return _NativeTokenRemote.contract.Transact(opts, "transferFrom", from, to, value) +} + +// TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd. +// +// Solidity: function transferFrom(address from, address to, uint256 value) returns(bool) +func (_NativeTokenRemote *NativeTokenRemoteSession) TransferFrom(from common.Address, to common.Address, value *big.Int) (*types.Transaction, error) { + return _NativeTokenRemote.Contract.TransferFrom(&_NativeTokenRemote.TransactOpts, from, to, value) +} + +// TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd. +// +// Solidity: function transferFrom(address from, address to, uint256 value) returns(bool) +func (_NativeTokenRemote *NativeTokenRemoteTransactorSession) TransferFrom(from common.Address, to common.Address, value *big.Int) (*types.Transaction, error) { + return _NativeTokenRemote.Contract.TransferFrom(&_NativeTokenRemote.TransactOpts, from, to, value) +} + +// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// +// Solidity: function transferOwnership(address newOwner) returns() +func (_NativeTokenRemote *NativeTokenRemoteTransactor) TransferOwnership(opts *bind.TransactOpts, newOwner common.Address) (*types.Transaction, error) { + return _NativeTokenRemote.contract.Transact(opts, "transferOwnership", newOwner) +} + +// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// +// Solidity: function transferOwnership(address newOwner) returns() +func (_NativeTokenRemote *NativeTokenRemoteSession) TransferOwnership(newOwner common.Address) (*types.Transaction, error) { + return _NativeTokenRemote.Contract.TransferOwnership(&_NativeTokenRemote.TransactOpts, newOwner) +} + +// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// +// Solidity: function transferOwnership(address newOwner) returns() +func (_NativeTokenRemote *NativeTokenRemoteTransactorSession) TransferOwnership(newOwner common.Address) (*types.Transaction, error) { + return _NativeTokenRemote.Contract.TransferOwnership(&_NativeTokenRemote.TransactOpts, newOwner) +} + +// UnpauseTeleporterAddress is a paid mutator transaction binding the contract method 0x4511243e. +// +// Solidity: function unpauseTeleporterAddress(address teleporterAddress) returns() +func (_NativeTokenRemote *NativeTokenRemoteTransactor) UnpauseTeleporterAddress(opts *bind.TransactOpts, teleporterAddress common.Address) (*types.Transaction, error) { + return _NativeTokenRemote.contract.Transact(opts, "unpauseTeleporterAddress", teleporterAddress) +} + +// UnpauseTeleporterAddress is a paid mutator transaction binding the contract method 0x4511243e. +// +// Solidity: function unpauseTeleporterAddress(address teleporterAddress) returns() +func (_NativeTokenRemote *NativeTokenRemoteSession) UnpauseTeleporterAddress(teleporterAddress common.Address) (*types.Transaction, error) { + return _NativeTokenRemote.Contract.UnpauseTeleporterAddress(&_NativeTokenRemote.TransactOpts, teleporterAddress) +} + +// UnpauseTeleporterAddress is a paid mutator transaction binding the contract method 0x4511243e. +// +// Solidity: function unpauseTeleporterAddress(address teleporterAddress) returns() +func (_NativeTokenRemote *NativeTokenRemoteTransactorSession) UnpauseTeleporterAddress(teleporterAddress common.Address) (*types.Transaction, error) { + return _NativeTokenRemote.Contract.UnpauseTeleporterAddress(&_NativeTokenRemote.TransactOpts, teleporterAddress) +} + +// UpdateMinTeleporterVersion is a paid mutator transaction binding the contract method 0x5eb99514. +// +// Solidity: function updateMinTeleporterVersion(uint256 version) returns() +func (_NativeTokenRemote *NativeTokenRemoteTransactor) UpdateMinTeleporterVersion(opts *bind.TransactOpts, version *big.Int) (*types.Transaction, error) { + return _NativeTokenRemote.contract.Transact(opts, "updateMinTeleporterVersion", version) +} + +// UpdateMinTeleporterVersion is a paid mutator transaction binding the contract method 0x5eb99514. +// +// Solidity: function updateMinTeleporterVersion(uint256 version) returns() +func (_NativeTokenRemote *NativeTokenRemoteSession) UpdateMinTeleporterVersion(version *big.Int) (*types.Transaction, error) { + return _NativeTokenRemote.Contract.UpdateMinTeleporterVersion(&_NativeTokenRemote.TransactOpts, version) +} + +// UpdateMinTeleporterVersion is a paid mutator transaction binding the contract method 0x5eb99514. +// +// Solidity: function updateMinTeleporterVersion(uint256 version) returns() +func (_NativeTokenRemote *NativeTokenRemoteTransactorSession) UpdateMinTeleporterVersion(version *big.Int) (*types.Transaction, error) { + return _NativeTokenRemote.Contract.UpdateMinTeleporterVersion(&_NativeTokenRemote.TransactOpts, version) +} + +// Withdraw is a paid mutator transaction binding the contract method 0x2e1a7d4d. +// +// Solidity: function withdraw(uint256 amount) returns() +func (_NativeTokenRemote *NativeTokenRemoteTransactor) Withdraw(opts *bind.TransactOpts, amount *big.Int) (*types.Transaction, error) { + return _NativeTokenRemote.contract.Transact(opts, "withdraw", amount) +} + +// Withdraw is a paid mutator transaction binding the contract method 0x2e1a7d4d. +// +// Solidity: function withdraw(uint256 amount) returns() +func (_NativeTokenRemote *NativeTokenRemoteSession) Withdraw(amount *big.Int) (*types.Transaction, error) { + return _NativeTokenRemote.Contract.Withdraw(&_NativeTokenRemote.TransactOpts, amount) +} + +// Withdraw is a paid mutator transaction binding the contract method 0x2e1a7d4d. +// +// Solidity: function withdraw(uint256 amount) returns() +func (_NativeTokenRemote *NativeTokenRemoteTransactorSession) Withdraw(amount *big.Int) (*types.Transaction, error) { + return _NativeTokenRemote.Contract.Withdraw(&_NativeTokenRemote.TransactOpts, amount) +} + +// Fallback is a paid mutator transaction binding the contract fallback function. +// +// Solidity: fallback() payable returns() +func (_NativeTokenRemote *NativeTokenRemoteTransactor) Fallback(opts *bind.TransactOpts, calldata []byte) (*types.Transaction, error) { + return _NativeTokenRemote.contract.RawTransact(opts, calldata) +} + +// Fallback is a paid mutator transaction binding the contract fallback function. +// +// Solidity: fallback() payable returns() +func (_NativeTokenRemote *NativeTokenRemoteSession) Fallback(calldata []byte) (*types.Transaction, error) { + return _NativeTokenRemote.Contract.Fallback(&_NativeTokenRemote.TransactOpts, calldata) +} + +// Fallback is a paid mutator transaction binding the contract fallback function. +// +// Solidity: fallback() payable returns() +func (_NativeTokenRemote *NativeTokenRemoteTransactorSession) Fallback(calldata []byte) (*types.Transaction, error) { + return _NativeTokenRemote.Contract.Fallback(&_NativeTokenRemote.TransactOpts, calldata) +} + +// Receive is a paid mutator transaction binding the contract receive function. +// +// Solidity: receive() payable returns() +func (_NativeTokenRemote *NativeTokenRemoteTransactor) Receive(opts *bind.TransactOpts) (*types.Transaction, error) { + return _NativeTokenRemote.contract.RawTransact(opts, nil) // calldata is disallowed for receive function +} + +// Receive is a paid mutator transaction binding the contract receive function. +// +// Solidity: receive() payable returns() +func (_NativeTokenRemote *NativeTokenRemoteSession) Receive() (*types.Transaction, error) { + return _NativeTokenRemote.Contract.Receive(&_NativeTokenRemote.TransactOpts) +} + +// Receive is a paid mutator transaction binding the contract receive function. +// +// Solidity: receive() payable returns() +func (_NativeTokenRemote *NativeTokenRemoteTransactorSession) Receive() (*types.Transaction, error) { + return _NativeTokenRemote.Contract.Receive(&_NativeTokenRemote.TransactOpts) +} + +// NativeTokenRemoteApprovalIterator is returned from FilterApproval and is used to iterate over the raw logs and unpacked data for Approval events raised by the NativeTokenRemote contract. +type NativeTokenRemoteApprovalIterator struct { + Event *NativeTokenRemoteApproval // 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 interfaces.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 *NativeTokenRemoteApprovalIterator) 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(NativeTokenRemoteApproval) + 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(NativeTokenRemoteApproval) + 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 *NativeTokenRemoteApprovalIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *NativeTokenRemoteApprovalIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// NativeTokenRemoteApproval represents a Approval event raised by the NativeTokenRemote contract. +type NativeTokenRemoteApproval 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 (_NativeTokenRemote *NativeTokenRemoteFilterer) FilterApproval(opts *bind.FilterOpts, owner []common.Address, spender []common.Address) (*NativeTokenRemoteApprovalIterator, 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 := _NativeTokenRemote.contract.FilterLogs(opts, "Approval", ownerRule, spenderRule) + if err != nil { + return nil, err + } + return &NativeTokenRemoteApprovalIterator{contract: _NativeTokenRemote.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 (_NativeTokenRemote *NativeTokenRemoteFilterer) WatchApproval(opts *bind.WatchOpts, sink chan<- *NativeTokenRemoteApproval, 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 := _NativeTokenRemote.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(NativeTokenRemoteApproval) + if err := _NativeTokenRemote.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 (_NativeTokenRemote *NativeTokenRemoteFilterer) ParseApproval(log types.Log) (*NativeTokenRemoteApproval, error) { + event := new(NativeTokenRemoteApproval) + if err := _NativeTokenRemote.contract.UnpackLog(event, "Approval", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// NativeTokenRemoteCallFailedIterator is returned from FilterCallFailed and is used to iterate over the raw logs and unpacked data for CallFailed events raised by the NativeTokenRemote contract. +type NativeTokenRemoteCallFailedIterator struct { + Event *NativeTokenRemoteCallFailed // 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 interfaces.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 *NativeTokenRemoteCallFailedIterator) 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(NativeTokenRemoteCallFailed) + 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(NativeTokenRemoteCallFailed) + 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 *NativeTokenRemoteCallFailedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *NativeTokenRemoteCallFailedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// NativeTokenRemoteCallFailed represents a CallFailed event raised by the NativeTokenRemote contract. +type NativeTokenRemoteCallFailed struct { + RecipientContract common.Address + Amount *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterCallFailed is a free log retrieval operation binding the contract event 0xb9eaeae386d339f8115782f297a9e5f0e13fb587cd6b0d502f113cb8dd4d6cb0. +// +// Solidity: event CallFailed(address indexed recipientContract, uint256 amount) +func (_NativeTokenRemote *NativeTokenRemoteFilterer) FilterCallFailed(opts *bind.FilterOpts, recipientContract []common.Address) (*NativeTokenRemoteCallFailedIterator, error) { + + var recipientContractRule []interface{} + for _, recipientContractItem := range recipientContract { + recipientContractRule = append(recipientContractRule, recipientContractItem) + } + + logs, sub, err := _NativeTokenRemote.contract.FilterLogs(opts, "CallFailed", recipientContractRule) + if err != nil { + return nil, err + } + return &NativeTokenRemoteCallFailedIterator{contract: _NativeTokenRemote.contract, event: "CallFailed", logs: logs, sub: sub}, nil +} + +// WatchCallFailed is a free log subscription operation binding the contract event 0xb9eaeae386d339f8115782f297a9e5f0e13fb587cd6b0d502f113cb8dd4d6cb0. +// +// Solidity: event CallFailed(address indexed recipientContract, uint256 amount) +func (_NativeTokenRemote *NativeTokenRemoteFilterer) WatchCallFailed(opts *bind.WatchOpts, sink chan<- *NativeTokenRemoteCallFailed, recipientContract []common.Address) (event.Subscription, error) { + + var recipientContractRule []interface{} + for _, recipientContractItem := range recipientContract { + recipientContractRule = append(recipientContractRule, recipientContractItem) + } + + logs, sub, err := _NativeTokenRemote.contract.WatchLogs(opts, "CallFailed", recipientContractRule) + 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(NativeTokenRemoteCallFailed) + if err := _NativeTokenRemote.contract.UnpackLog(event, "CallFailed", 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 +} + +// ParseCallFailed is a log parse operation binding the contract event 0xb9eaeae386d339f8115782f297a9e5f0e13fb587cd6b0d502f113cb8dd4d6cb0. +// +// Solidity: event CallFailed(address indexed recipientContract, uint256 amount) +func (_NativeTokenRemote *NativeTokenRemoteFilterer) ParseCallFailed(log types.Log) (*NativeTokenRemoteCallFailed, error) { + event := new(NativeTokenRemoteCallFailed) + if err := _NativeTokenRemote.contract.UnpackLog(event, "CallFailed", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// NativeTokenRemoteCallSucceededIterator is returned from FilterCallSucceeded and is used to iterate over the raw logs and unpacked data for CallSucceeded events raised by the NativeTokenRemote contract. +type NativeTokenRemoteCallSucceededIterator struct { + Event *NativeTokenRemoteCallSucceeded // 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 interfaces.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 *NativeTokenRemoteCallSucceededIterator) 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(NativeTokenRemoteCallSucceeded) + 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(NativeTokenRemoteCallSucceeded) + 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 *NativeTokenRemoteCallSucceededIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *NativeTokenRemoteCallSucceededIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// NativeTokenRemoteCallSucceeded represents a CallSucceeded event raised by the NativeTokenRemote contract. +type NativeTokenRemoteCallSucceeded struct { + RecipientContract common.Address + Amount *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterCallSucceeded is a free log retrieval operation binding the contract event 0x104deb555f67e63782bb817bc26c39050894645f9b9f29c4be8ae68d0e8b7ff4. +// +// Solidity: event CallSucceeded(address indexed recipientContract, uint256 amount) +func (_NativeTokenRemote *NativeTokenRemoteFilterer) FilterCallSucceeded(opts *bind.FilterOpts, recipientContract []common.Address) (*NativeTokenRemoteCallSucceededIterator, error) { + + var recipientContractRule []interface{} + for _, recipientContractItem := range recipientContract { + recipientContractRule = append(recipientContractRule, recipientContractItem) + } + + logs, sub, err := _NativeTokenRemote.contract.FilterLogs(opts, "CallSucceeded", recipientContractRule) + if err != nil { + return nil, err + } + return &NativeTokenRemoteCallSucceededIterator{contract: _NativeTokenRemote.contract, event: "CallSucceeded", logs: logs, sub: sub}, nil +} + +// WatchCallSucceeded is a free log subscription operation binding the contract event 0x104deb555f67e63782bb817bc26c39050894645f9b9f29c4be8ae68d0e8b7ff4. +// +// Solidity: event CallSucceeded(address indexed recipientContract, uint256 amount) +func (_NativeTokenRemote *NativeTokenRemoteFilterer) WatchCallSucceeded(opts *bind.WatchOpts, sink chan<- *NativeTokenRemoteCallSucceeded, recipientContract []common.Address) (event.Subscription, error) { + + var recipientContractRule []interface{} + for _, recipientContractItem := range recipientContract { + recipientContractRule = append(recipientContractRule, recipientContractItem) + } + + logs, sub, err := _NativeTokenRemote.contract.WatchLogs(opts, "CallSucceeded", recipientContractRule) + 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(NativeTokenRemoteCallSucceeded) + if err := _NativeTokenRemote.contract.UnpackLog(event, "CallSucceeded", 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 +} + +// ParseCallSucceeded is a log parse operation binding the contract event 0x104deb555f67e63782bb817bc26c39050894645f9b9f29c4be8ae68d0e8b7ff4. +// +// Solidity: event CallSucceeded(address indexed recipientContract, uint256 amount) +func (_NativeTokenRemote *NativeTokenRemoteFilterer) ParseCallSucceeded(log types.Log) (*NativeTokenRemoteCallSucceeded, error) { + event := new(NativeTokenRemoteCallSucceeded) + if err := _NativeTokenRemote.contract.UnpackLog(event, "CallSucceeded", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// NativeTokenRemoteDepositIterator is returned from FilterDeposit and is used to iterate over the raw logs and unpacked data for Deposit events raised by the NativeTokenRemote contract. +type NativeTokenRemoteDepositIterator struct { + Event *NativeTokenRemoteDeposit // 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 interfaces.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 *NativeTokenRemoteDepositIterator) 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(NativeTokenRemoteDeposit) + 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(NativeTokenRemoteDeposit) + 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 *NativeTokenRemoteDepositIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *NativeTokenRemoteDepositIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// NativeTokenRemoteDeposit represents a Deposit event raised by the NativeTokenRemote contract. +type NativeTokenRemoteDeposit struct { + Sender common.Address + Amount *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterDeposit is a free log retrieval operation binding the contract event 0xe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c. +// +// Solidity: event Deposit(address indexed sender, uint256 amount) +func (_NativeTokenRemote *NativeTokenRemoteFilterer) FilterDeposit(opts *bind.FilterOpts, sender []common.Address) (*NativeTokenRemoteDepositIterator, error) { + + var senderRule []interface{} + for _, senderItem := range sender { + senderRule = append(senderRule, senderItem) + } + + logs, sub, err := _NativeTokenRemote.contract.FilterLogs(opts, "Deposit", senderRule) + if err != nil { + return nil, err + } + return &NativeTokenRemoteDepositIterator{contract: _NativeTokenRemote.contract, event: "Deposit", logs: logs, sub: sub}, nil +} + +// WatchDeposit is a free log subscription operation binding the contract event 0xe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c. +// +// Solidity: event Deposit(address indexed sender, uint256 amount) +func (_NativeTokenRemote *NativeTokenRemoteFilterer) WatchDeposit(opts *bind.WatchOpts, sink chan<- *NativeTokenRemoteDeposit, sender []common.Address) (event.Subscription, error) { + + var senderRule []interface{} + for _, senderItem := range sender { + senderRule = append(senderRule, senderItem) + } + + logs, sub, err := _NativeTokenRemote.contract.WatchLogs(opts, "Deposit", senderRule) + 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(NativeTokenRemoteDeposit) + if err := _NativeTokenRemote.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 0xe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c. +// +// Solidity: event Deposit(address indexed sender, uint256 amount) +func (_NativeTokenRemote *NativeTokenRemoteFilterer) ParseDeposit(log types.Log) (*NativeTokenRemoteDeposit, error) { + event := new(NativeTokenRemoteDeposit) + if err := _NativeTokenRemote.contract.UnpackLog(event, "Deposit", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// NativeTokenRemoteInitializedIterator is returned from FilterInitialized and is used to iterate over the raw logs and unpacked data for Initialized events raised by the NativeTokenRemote contract. +type NativeTokenRemoteInitializedIterator struct { + Event *NativeTokenRemoteInitialized // 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 interfaces.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 *NativeTokenRemoteInitializedIterator) 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(NativeTokenRemoteInitialized) + 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(NativeTokenRemoteInitialized) + 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 *NativeTokenRemoteInitializedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *NativeTokenRemoteInitializedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// NativeTokenRemoteInitialized represents a Initialized event raised by the NativeTokenRemote contract. +type NativeTokenRemoteInitialized struct { + Version uint64 + Raw types.Log // Blockchain specific contextual infos +} + +// FilterInitialized is a free log retrieval operation binding the contract event 0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2. +// +// Solidity: event Initialized(uint64 version) +func (_NativeTokenRemote *NativeTokenRemoteFilterer) FilterInitialized(opts *bind.FilterOpts) (*NativeTokenRemoteInitializedIterator, error) { + + logs, sub, err := _NativeTokenRemote.contract.FilterLogs(opts, "Initialized") + if err != nil { + return nil, err + } + return &NativeTokenRemoteInitializedIterator{contract: _NativeTokenRemote.contract, event: "Initialized", logs: logs, sub: sub}, nil +} + +// WatchInitialized is a free log subscription operation binding the contract event 0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2. +// +// Solidity: event Initialized(uint64 version) +func (_NativeTokenRemote *NativeTokenRemoteFilterer) WatchInitialized(opts *bind.WatchOpts, sink chan<- *NativeTokenRemoteInitialized) (event.Subscription, error) { + + logs, sub, err := _NativeTokenRemote.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(NativeTokenRemoteInitialized) + if err := _NativeTokenRemote.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 0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2. +// +// Solidity: event Initialized(uint64 version) +func (_NativeTokenRemote *NativeTokenRemoteFilterer) ParseInitialized(log types.Log) (*NativeTokenRemoteInitialized, error) { + event := new(NativeTokenRemoteInitialized) + if err := _NativeTokenRemote.contract.UnpackLog(event, "Initialized", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// NativeTokenRemoteMinTeleporterVersionUpdatedIterator is returned from FilterMinTeleporterVersionUpdated and is used to iterate over the raw logs and unpacked data for MinTeleporterVersionUpdated events raised by the NativeTokenRemote contract. +type NativeTokenRemoteMinTeleporterVersionUpdatedIterator struct { + Event *NativeTokenRemoteMinTeleporterVersionUpdated // 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 interfaces.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 *NativeTokenRemoteMinTeleporterVersionUpdatedIterator) 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(NativeTokenRemoteMinTeleporterVersionUpdated) + 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(NativeTokenRemoteMinTeleporterVersionUpdated) + 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 *NativeTokenRemoteMinTeleporterVersionUpdatedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *NativeTokenRemoteMinTeleporterVersionUpdatedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// NativeTokenRemoteMinTeleporterVersionUpdated represents a MinTeleporterVersionUpdated event raised by the NativeTokenRemote contract. +type NativeTokenRemoteMinTeleporterVersionUpdated struct { + OldMinTeleporterVersion *big.Int + NewMinTeleporterVersion *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterMinTeleporterVersionUpdated is a free log retrieval operation binding the contract event 0xa9a7ef57e41f05b4c15480842f5f0c27edfcbb553fed281f7c4068452cc1c02d. +// +// Solidity: event MinTeleporterVersionUpdated(uint256 indexed oldMinTeleporterVersion, uint256 indexed newMinTeleporterVersion) +func (_NativeTokenRemote *NativeTokenRemoteFilterer) FilterMinTeleporterVersionUpdated(opts *bind.FilterOpts, oldMinTeleporterVersion []*big.Int, newMinTeleporterVersion []*big.Int) (*NativeTokenRemoteMinTeleporterVersionUpdatedIterator, error) { + + var oldMinTeleporterVersionRule []interface{} + for _, oldMinTeleporterVersionItem := range oldMinTeleporterVersion { + oldMinTeleporterVersionRule = append(oldMinTeleporterVersionRule, oldMinTeleporterVersionItem) + } + var newMinTeleporterVersionRule []interface{} + for _, newMinTeleporterVersionItem := range newMinTeleporterVersion { + newMinTeleporterVersionRule = append(newMinTeleporterVersionRule, newMinTeleporterVersionItem) + } + + logs, sub, err := _NativeTokenRemote.contract.FilterLogs(opts, "MinTeleporterVersionUpdated", oldMinTeleporterVersionRule, newMinTeleporterVersionRule) + if err != nil { + return nil, err + } + return &NativeTokenRemoteMinTeleporterVersionUpdatedIterator{contract: _NativeTokenRemote.contract, event: "MinTeleporterVersionUpdated", logs: logs, sub: sub}, nil +} + +// WatchMinTeleporterVersionUpdated is a free log subscription operation binding the contract event 0xa9a7ef57e41f05b4c15480842f5f0c27edfcbb553fed281f7c4068452cc1c02d. +// +// Solidity: event MinTeleporterVersionUpdated(uint256 indexed oldMinTeleporterVersion, uint256 indexed newMinTeleporterVersion) +func (_NativeTokenRemote *NativeTokenRemoteFilterer) WatchMinTeleporterVersionUpdated(opts *bind.WatchOpts, sink chan<- *NativeTokenRemoteMinTeleporterVersionUpdated, oldMinTeleporterVersion []*big.Int, newMinTeleporterVersion []*big.Int) (event.Subscription, error) { + + var oldMinTeleporterVersionRule []interface{} + for _, oldMinTeleporterVersionItem := range oldMinTeleporterVersion { + oldMinTeleporterVersionRule = append(oldMinTeleporterVersionRule, oldMinTeleporterVersionItem) + } + var newMinTeleporterVersionRule []interface{} + for _, newMinTeleporterVersionItem := range newMinTeleporterVersion { + newMinTeleporterVersionRule = append(newMinTeleporterVersionRule, newMinTeleporterVersionItem) + } + + logs, sub, err := _NativeTokenRemote.contract.WatchLogs(opts, "MinTeleporterVersionUpdated", oldMinTeleporterVersionRule, newMinTeleporterVersionRule) + 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(NativeTokenRemoteMinTeleporterVersionUpdated) + if err := _NativeTokenRemote.contract.UnpackLog(event, "MinTeleporterVersionUpdated", 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 +} + +// ParseMinTeleporterVersionUpdated is a log parse operation binding the contract event 0xa9a7ef57e41f05b4c15480842f5f0c27edfcbb553fed281f7c4068452cc1c02d. +// +// Solidity: event MinTeleporterVersionUpdated(uint256 indexed oldMinTeleporterVersion, uint256 indexed newMinTeleporterVersion) +func (_NativeTokenRemote *NativeTokenRemoteFilterer) ParseMinTeleporterVersionUpdated(log types.Log) (*NativeTokenRemoteMinTeleporterVersionUpdated, error) { + event := new(NativeTokenRemoteMinTeleporterVersionUpdated) + if err := _NativeTokenRemote.contract.UnpackLog(event, "MinTeleporterVersionUpdated", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// NativeTokenRemoteOwnershipTransferredIterator is returned from FilterOwnershipTransferred and is used to iterate over the raw logs and unpacked data for OwnershipTransferred events raised by the NativeTokenRemote contract. +type NativeTokenRemoteOwnershipTransferredIterator struct { + Event *NativeTokenRemoteOwnershipTransferred // 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 interfaces.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 *NativeTokenRemoteOwnershipTransferredIterator) 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(NativeTokenRemoteOwnershipTransferred) + 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(NativeTokenRemoteOwnershipTransferred) + 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 *NativeTokenRemoteOwnershipTransferredIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *NativeTokenRemoteOwnershipTransferredIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// NativeTokenRemoteOwnershipTransferred represents a OwnershipTransferred event raised by the NativeTokenRemote contract. +type NativeTokenRemoteOwnershipTransferred 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 (_NativeTokenRemote *NativeTokenRemoteFilterer) FilterOwnershipTransferred(opts *bind.FilterOpts, previousOwner []common.Address, newOwner []common.Address) (*NativeTokenRemoteOwnershipTransferredIterator, 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 := _NativeTokenRemote.contract.FilterLogs(opts, "OwnershipTransferred", previousOwnerRule, newOwnerRule) + if err != nil { + return nil, err + } + return &NativeTokenRemoteOwnershipTransferredIterator{contract: _NativeTokenRemote.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 (_NativeTokenRemote *NativeTokenRemoteFilterer) WatchOwnershipTransferred(opts *bind.WatchOpts, sink chan<- *NativeTokenRemoteOwnershipTransferred, 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 := _NativeTokenRemote.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(NativeTokenRemoteOwnershipTransferred) + if err := _NativeTokenRemote.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 (_NativeTokenRemote *NativeTokenRemoteFilterer) ParseOwnershipTransferred(log types.Log) (*NativeTokenRemoteOwnershipTransferred, error) { + event := new(NativeTokenRemoteOwnershipTransferred) + if err := _NativeTokenRemote.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// NativeTokenRemoteReportBurnedTxFeesIterator is returned from FilterReportBurnedTxFees and is used to iterate over the raw logs and unpacked data for ReportBurnedTxFees events raised by the NativeTokenRemote contract. +type NativeTokenRemoteReportBurnedTxFeesIterator struct { + Event *NativeTokenRemoteReportBurnedTxFees // 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 interfaces.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 *NativeTokenRemoteReportBurnedTxFeesIterator) 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(NativeTokenRemoteReportBurnedTxFees) + 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(NativeTokenRemoteReportBurnedTxFees) + 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 *NativeTokenRemoteReportBurnedTxFeesIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *NativeTokenRemoteReportBurnedTxFeesIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// NativeTokenRemoteReportBurnedTxFees represents a ReportBurnedTxFees event raised by the NativeTokenRemote contract. +type NativeTokenRemoteReportBurnedTxFees struct { + TeleporterMessageID [32]byte + FeesBurned *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterReportBurnedTxFees is a free log retrieval operation binding the contract event 0x0832c643b65d6d3724ed14ac3a655fbc7cae54fb010918b2c2f70ef6b1bb94a5. +// +// Solidity: event ReportBurnedTxFees(bytes32 indexed teleporterMessageID, uint256 feesBurned) +func (_NativeTokenRemote *NativeTokenRemoteFilterer) FilterReportBurnedTxFees(opts *bind.FilterOpts, teleporterMessageID [][32]byte) (*NativeTokenRemoteReportBurnedTxFeesIterator, error) { + + var teleporterMessageIDRule []interface{} + for _, teleporterMessageIDItem := range teleporterMessageID { + teleporterMessageIDRule = append(teleporterMessageIDRule, teleporterMessageIDItem) + } + + logs, sub, err := _NativeTokenRemote.contract.FilterLogs(opts, "ReportBurnedTxFees", teleporterMessageIDRule) + if err != nil { + return nil, err + } + return &NativeTokenRemoteReportBurnedTxFeesIterator{contract: _NativeTokenRemote.contract, event: "ReportBurnedTxFees", logs: logs, sub: sub}, nil +} + +// WatchReportBurnedTxFees is a free log subscription operation binding the contract event 0x0832c643b65d6d3724ed14ac3a655fbc7cae54fb010918b2c2f70ef6b1bb94a5. +// +// Solidity: event ReportBurnedTxFees(bytes32 indexed teleporterMessageID, uint256 feesBurned) +func (_NativeTokenRemote *NativeTokenRemoteFilterer) WatchReportBurnedTxFees(opts *bind.WatchOpts, sink chan<- *NativeTokenRemoteReportBurnedTxFees, teleporterMessageID [][32]byte) (event.Subscription, error) { + + var teleporterMessageIDRule []interface{} + for _, teleporterMessageIDItem := range teleporterMessageID { + teleporterMessageIDRule = append(teleporterMessageIDRule, teleporterMessageIDItem) + } + + logs, sub, err := _NativeTokenRemote.contract.WatchLogs(opts, "ReportBurnedTxFees", teleporterMessageIDRule) + 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(NativeTokenRemoteReportBurnedTxFees) + if err := _NativeTokenRemote.contract.UnpackLog(event, "ReportBurnedTxFees", 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 +} + +// ParseReportBurnedTxFees is a log parse operation binding the contract event 0x0832c643b65d6d3724ed14ac3a655fbc7cae54fb010918b2c2f70ef6b1bb94a5. +// +// Solidity: event ReportBurnedTxFees(bytes32 indexed teleporterMessageID, uint256 feesBurned) +func (_NativeTokenRemote *NativeTokenRemoteFilterer) ParseReportBurnedTxFees(log types.Log) (*NativeTokenRemoteReportBurnedTxFees, error) { + event := new(NativeTokenRemoteReportBurnedTxFees) + if err := _NativeTokenRemote.contract.UnpackLog(event, "ReportBurnedTxFees", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// NativeTokenRemoteTeleporterAddressPausedIterator is returned from FilterTeleporterAddressPaused and is used to iterate over the raw logs and unpacked data for TeleporterAddressPaused events raised by the NativeTokenRemote contract. +type NativeTokenRemoteTeleporterAddressPausedIterator struct { + Event *NativeTokenRemoteTeleporterAddressPaused // 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 interfaces.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 *NativeTokenRemoteTeleporterAddressPausedIterator) 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(NativeTokenRemoteTeleporterAddressPaused) + 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(NativeTokenRemoteTeleporterAddressPaused) + 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 *NativeTokenRemoteTeleporterAddressPausedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *NativeTokenRemoteTeleporterAddressPausedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// NativeTokenRemoteTeleporterAddressPaused represents a TeleporterAddressPaused event raised by the NativeTokenRemote contract. +type NativeTokenRemoteTeleporterAddressPaused struct { + TeleporterAddress common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterTeleporterAddressPaused is a free log retrieval operation binding the contract event 0x933f93e57a222e6330362af8b376d0a8725b6901e9a2fb86d00f169702b28a4c. +// +// Solidity: event TeleporterAddressPaused(address indexed teleporterAddress) +func (_NativeTokenRemote *NativeTokenRemoteFilterer) FilterTeleporterAddressPaused(opts *bind.FilterOpts, teleporterAddress []common.Address) (*NativeTokenRemoteTeleporterAddressPausedIterator, error) { + + var teleporterAddressRule []interface{} + for _, teleporterAddressItem := range teleporterAddress { + teleporterAddressRule = append(teleporterAddressRule, teleporterAddressItem) + } + + logs, sub, err := _NativeTokenRemote.contract.FilterLogs(opts, "TeleporterAddressPaused", teleporterAddressRule) + if err != nil { + return nil, err + } + return &NativeTokenRemoteTeleporterAddressPausedIterator{contract: _NativeTokenRemote.contract, event: "TeleporterAddressPaused", logs: logs, sub: sub}, nil +} + +// WatchTeleporterAddressPaused is a free log subscription operation binding the contract event 0x933f93e57a222e6330362af8b376d0a8725b6901e9a2fb86d00f169702b28a4c. +// +// Solidity: event TeleporterAddressPaused(address indexed teleporterAddress) +func (_NativeTokenRemote *NativeTokenRemoteFilterer) WatchTeleporterAddressPaused(opts *bind.WatchOpts, sink chan<- *NativeTokenRemoteTeleporterAddressPaused, teleporterAddress []common.Address) (event.Subscription, error) { + + var teleporterAddressRule []interface{} + for _, teleporterAddressItem := range teleporterAddress { + teleporterAddressRule = append(teleporterAddressRule, teleporterAddressItem) + } + + logs, sub, err := _NativeTokenRemote.contract.WatchLogs(opts, "TeleporterAddressPaused", teleporterAddressRule) + 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(NativeTokenRemoteTeleporterAddressPaused) + if err := _NativeTokenRemote.contract.UnpackLog(event, "TeleporterAddressPaused", 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 +} + +// ParseTeleporterAddressPaused is a log parse operation binding the contract event 0x933f93e57a222e6330362af8b376d0a8725b6901e9a2fb86d00f169702b28a4c. +// +// Solidity: event TeleporterAddressPaused(address indexed teleporterAddress) +func (_NativeTokenRemote *NativeTokenRemoteFilterer) ParseTeleporterAddressPaused(log types.Log) (*NativeTokenRemoteTeleporterAddressPaused, error) { + event := new(NativeTokenRemoteTeleporterAddressPaused) + if err := _NativeTokenRemote.contract.UnpackLog(event, "TeleporterAddressPaused", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// NativeTokenRemoteTeleporterAddressUnpausedIterator is returned from FilterTeleporterAddressUnpaused and is used to iterate over the raw logs and unpacked data for TeleporterAddressUnpaused events raised by the NativeTokenRemote contract. +type NativeTokenRemoteTeleporterAddressUnpausedIterator struct { + Event *NativeTokenRemoteTeleporterAddressUnpaused // 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 interfaces.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 *NativeTokenRemoteTeleporterAddressUnpausedIterator) 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(NativeTokenRemoteTeleporterAddressUnpaused) + 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(NativeTokenRemoteTeleporterAddressUnpaused) + 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 *NativeTokenRemoteTeleporterAddressUnpausedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *NativeTokenRemoteTeleporterAddressUnpausedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// NativeTokenRemoteTeleporterAddressUnpaused represents a TeleporterAddressUnpaused event raised by the NativeTokenRemote contract. +type NativeTokenRemoteTeleporterAddressUnpaused struct { + TeleporterAddress common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterTeleporterAddressUnpaused is a free log retrieval operation binding the contract event 0x844e2f3154214672229235858fd029d1dfd543901c6d05931f0bc2480a2d72c3. +// +// Solidity: event TeleporterAddressUnpaused(address indexed teleporterAddress) +func (_NativeTokenRemote *NativeTokenRemoteFilterer) FilterTeleporterAddressUnpaused(opts *bind.FilterOpts, teleporterAddress []common.Address) (*NativeTokenRemoteTeleporterAddressUnpausedIterator, error) { + + var teleporterAddressRule []interface{} + for _, teleporterAddressItem := range teleporterAddress { + teleporterAddressRule = append(teleporterAddressRule, teleporterAddressItem) + } + + logs, sub, err := _NativeTokenRemote.contract.FilterLogs(opts, "TeleporterAddressUnpaused", teleporterAddressRule) + if err != nil { + return nil, err + } + return &NativeTokenRemoteTeleporterAddressUnpausedIterator{contract: _NativeTokenRemote.contract, event: "TeleporterAddressUnpaused", logs: logs, sub: sub}, nil +} + +// WatchTeleporterAddressUnpaused is a free log subscription operation binding the contract event 0x844e2f3154214672229235858fd029d1dfd543901c6d05931f0bc2480a2d72c3. +// +// Solidity: event TeleporterAddressUnpaused(address indexed teleporterAddress) +func (_NativeTokenRemote *NativeTokenRemoteFilterer) WatchTeleporterAddressUnpaused(opts *bind.WatchOpts, sink chan<- *NativeTokenRemoteTeleporterAddressUnpaused, teleporterAddress []common.Address) (event.Subscription, error) { + + var teleporterAddressRule []interface{} + for _, teleporterAddressItem := range teleporterAddress { + teleporterAddressRule = append(teleporterAddressRule, teleporterAddressItem) + } + + logs, sub, err := _NativeTokenRemote.contract.WatchLogs(opts, "TeleporterAddressUnpaused", teleporterAddressRule) + 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(NativeTokenRemoteTeleporterAddressUnpaused) + if err := _NativeTokenRemote.contract.UnpackLog(event, "TeleporterAddressUnpaused", 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 +} + +// ParseTeleporterAddressUnpaused is a log parse operation binding the contract event 0x844e2f3154214672229235858fd029d1dfd543901c6d05931f0bc2480a2d72c3. +// +// Solidity: event TeleporterAddressUnpaused(address indexed teleporterAddress) +func (_NativeTokenRemote *NativeTokenRemoteFilterer) ParseTeleporterAddressUnpaused(log types.Log) (*NativeTokenRemoteTeleporterAddressUnpaused, error) { + event := new(NativeTokenRemoteTeleporterAddressUnpaused) + if err := _NativeTokenRemote.contract.UnpackLog(event, "TeleporterAddressUnpaused", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// NativeTokenRemoteTokensAndCallSentIterator is returned from FilterTokensAndCallSent and is used to iterate over the raw logs and unpacked data for TokensAndCallSent events raised by the NativeTokenRemote contract. +type NativeTokenRemoteTokensAndCallSentIterator struct { + Event *NativeTokenRemoteTokensAndCallSent // 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 interfaces.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 *NativeTokenRemoteTokensAndCallSentIterator) 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(NativeTokenRemoteTokensAndCallSent) + 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(NativeTokenRemoteTokensAndCallSent) + 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 *NativeTokenRemoteTokensAndCallSentIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *NativeTokenRemoteTokensAndCallSentIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// NativeTokenRemoteTokensAndCallSent represents a TokensAndCallSent event raised by the NativeTokenRemote contract. +type NativeTokenRemoteTokensAndCallSent struct { + TeleporterMessageID [32]byte + Sender common.Address + Input SendAndCallInput + Amount *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterTokensAndCallSent is a free log retrieval operation binding the contract event 0x5d76dff81bf773b908b050fa113d39f7d8135bb4175398f313ea19cd3a1a0b16. +// +// Solidity: event TokensAndCallSent(bytes32 indexed teleporterMessageID, address indexed sender, (bytes32,address,address,bytes,uint256,uint256,address,address,address,uint256,uint256) input, uint256 amount) +func (_NativeTokenRemote *NativeTokenRemoteFilterer) FilterTokensAndCallSent(opts *bind.FilterOpts, teleporterMessageID [][32]byte, sender []common.Address) (*NativeTokenRemoteTokensAndCallSentIterator, error) { + + var teleporterMessageIDRule []interface{} + for _, teleporterMessageIDItem := range teleporterMessageID { + teleporterMessageIDRule = append(teleporterMessageIDRule, teleporterMessageIDItem) + } + var senderRule []interface{} + for _, senderItem := range sender { + senderRule = append(senderRule, senderItem) + } + + logs, sub, err := _NativeTokenRemote.contract.FilterLogs(opts, "TokensAndCallSent", teleporterMessageIDRule, senderRule) + if err != nil { + return nil, err + } + return &NativeTokenRemoteTokensAndCallSentIterator{contract: _NativeTokenRemote.contract, event: "TokensAndCallSent", logs: logs, sub: sub}, nil +} + +// WatchTokensAndCallSent is a free log subscription operation binding the contract event 0x5d76dff81bf773b908b050fa113d39f7d8135bb4175398f313ea19cd3a1a0b16. +// +// Solidity: event TokensAndCallSent(bytes32 indexed teleporterMessageID, address indexed sender, (bytes32,address,address,bytes,uint256,uint256,address,address,address,uint256,uint256) input, uint256 amount) +func (_NativeTokenRemote *NativeTokenRemoteFilterer) WatchTokensAndCallSent(opts *bind.WatchOpts, sink chan<- *NativeTokenRemoteTokensAndCallSent, teleporterMessageID [][32]byte, sender []common.Address) (event.Subscription, error) { + + var teleporterMessageIDRule []interface{} + for _, teleporterMessageIDItem := range teleporterMessageID { + teleporterMessageIDRule = append(teleporterMessageIDRule, teleporterMessageIDItem) + } + var senderRule []interface{} + for _, senderItem := range sender { + senderRule = append(senderRule, senderItem) + } + + logs, sub, err := _NativeTokenRemote.contract.WatchLogs(opts, "TokensAndCallSent", teleporterMessageIDRule, senderRule) + 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(NativeTokenRemoteTokensAndCallSent) + if err := _NativeTokenRemote.contract.UnpackLog(event, "TokensAndCallSent", 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 +} + +// ParseTokensAndCallSent is a log parse operation binding the contract event 0x5d76dff81bf773b908b050fa113d39f7d8135bb4175398f313ea19cd3a1a0b16. +// +// Solidity: event TokensAndCallSent(bytes32 indexed teleporterMessageID, address indexed sender, (bytes32,address,address,bytes,uint256,uint256,address,address,address,uint256,uint256) input, uint256 amount) +func (_NativeTokenRemote *NativeTokenRemoteFilterer) ParseTokensAndCallSent(log types.Log) (*NativeTokenRemoteTokensAndCallSent, error) { + event := new(NativeTokenRemoteTokensAndCallSent) + if err := _NativeTokenRemote.contract.UnpackLog(event, "TokensAndCallSent", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// NativeTokenRemoteTokensSentIterator is returned from FilterTokensSent and is used to iterate over the raw logs and unpacked data for TokensSent events raised by the NativeTokenRemote contract. +type NativeTokenRemoteTokensSentIterator struct { + Event *NativeTokenRemoteTokensSent // 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 interfaces.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 *NativeTokenRemoteTokensSentIterator) 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(NativeTokenRemoteTokensSent) + 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(NativeTokenRemoteTokensSent) + 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 *NativeTokenRemoteTokensSentIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *NativeTokenRemoteTokensSentIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// NativeTokenRemoteTokensSent represents a TokensSent event raised by the NativeTokenRemote contract. +type NativeTokenRemoteTokensSent struct { + TeleporterMessageID [32]byte + Sender common.Address + Input SendTokensInput + Amount *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterTokensSent is a free log retrieval operation binding the contract event 0x93f19bf1ec58a15dc643b37e7e18a1c13e85e06cd11929e283154691ace9fb52. +// +// Solidity: event TokensSent(bytes32 indexed teleporterMessageID, address indexed sender, (bytes32,address,address,address,uint256,uint256,uint256,address) input, uint256 amount) +func (_NativeTokenRemote *NativeTokenRemoteFilterer) FilterTokensSent(opts *bind.FilterOpts, teleporterMessageID [][32]byte, sender []common.Address) (*NativeTokenRemoteTokensSentIterator, error) { + + var teleporterMessageIDRule []interface{} + for _, teleporterMessageIDItem := range teleporterMessageID { + teleporterMessageIDRule = append(teleporterMessageIDRule, teleporterMessageIDItem) + } + var senderRule []interface{} + for _, senderItem := range sender { + senderRule = append(senderRule, senderItem) + } + + logs, sub, err := _NativeTokenRemote.contract.FilterLogs(opts, "TokensSent", teleporterMessageIDRule, senderRule) + if err != nil { + return nil, err + } + return &NativeTokenRemoteTokensSentIterator{contract: _NativeTokenRemote.contract, event: "TokensSent", logs: logs, sub: sub}, nil +} + +// WatchTokensSent is a free log subscription operation binding the contract event 0x93f19bf1ec58a15dc643b37e7e18a1c13e85e06cd11929e283154691ace9fb52. +// +// Solidity: event TokensSent(bytes32 indexed teleporterMessageID, address indexed sender, (bytes32,address,address,address,uint256,uint256,uint256,address) input, uint256 amount) +func (_NativeTokenRemote *NativeTokenRemoteFilterer) WatchTokensSent(opts *bind.WatchOpts, sink chan<- *NativeTokenRemoteTokensSent, teleporterMessageID [][32]byte, sender []common.Address) (event.Subscription, error) { + + var teleporterMessageIDRule []interface{} + for _, teleporterMessageIDItem := range teleporterMessageID { + teleporterMessageIDRule = append(teleporterMessageIDRule, teleporterMessageIDItem) + } + var senderRule []interface{} + for _, senderItem := range sender { + senderRule = append(senderRule, senderItem) + } + + logs, sub, err := _NativeTokenRemote.contract.WatchLogs(opts, "TokensSent", teleporterMessageIDRule, senderRule) + 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(NativeTokenRemoteTokensSent) + if err := _NativeTokenRemote.contract.UnpackLog(event, "TokensSent", 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 +} + +// ParseTokensSent is a log parse operation binding the contract event 0x93f19bf1ec58a15dc643b37e7e18a1c13e85e06cd11929e283154691ace9fb52. +// +// Solidity: event TokensSent(bytes32 indexed teleporterMessageID, address indexed sender, (bytes32,address,address,address,uint256,uint256,uint256,address) input, uint256 amount) +func (_NativeTokenRemote *NativeTokenRemoteFilterer) ParseTokensSent(log types.Log) (*NativeTokenRemoteTokensSent, error) { + event := new(NativeTokenRemoteTokensSent) + if err := _NativeTokenRemote.contract.UnpackLog(event, "TokensSent", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// NativeTokenRemoteTokensWithdrawnIterator is returned from FilterTokensWithdrawn and is used to iterate over the raw logs and unpacked data for TokensWithdrawn events raised by the NativeTokenRemote contract. +type NativeTokenRemoteTokensWithdrawnIterator struct { + Event *NativeTokenRemoteTokensWithdrawn // 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 interfaces.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 *NativeTokenRemoteTokensWithdrawnIterator) 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(NativeTokenRemoteTokensWithdrawn) + 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(NativeTokenRemoteTokensWithdrawn) + 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 *NativeTokenRemoteTokensWithdrawnIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *NativeTokenRemoteTokensWithdrawnIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// NativeTokenRemoteTokensWithdrawn represents a TokensWithdrawn event raised by the NativeTokenRemote contract. +type NativeTokenRemoteTokensWithdrawn struct { + Recipient common.Address + Amount *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterTokensWithdrawn is a free log retrieval operation binding the contract event 0x6352c5382c4a4578e712449ca65e83cdb392d045dfcf1cad9615189db2da244b. +// +// Solidity: event TokensWithdrawn(address indexed recipient, uint256 amount) +func (_NativeTokenRemote *NativeTokenRemoteFilterer) FilterTokensWithdrawn(opts *bind.FilterOpts, recipient []common.Address) (*NativeTokenRemoteTokensWithdrawnIterator, error) { + + var recipientRule []interface{} + for _, recipientItem := range recipient { + recipientRule = append(recipientRule, recipientItem) + } + + logs, sub, err := _NativeTokenRemote.contract.FilterLogs(opts, "TokensWithdrawn", recipientRule) + if err != nil { + return nil, err + } + return &NativeTokenRemoteTokensWithdrawnIterator{contract: _NativeTokenRemote.contract, event: "TokensWithdrawn", logs: logs, sub: sub}, nil +} + +// WatchTokensWithdrawn is a free log subscription operation binding the contract event 0x6352c5382c4a4578e712449ca65e83cdb392d045dfcf1cad9615189db2da244b. +// +// Solidity: event TokensWithdrawn(address indexed recipient, uint256 amount) +func (_NativeTokenRemote *NativeTokenRemoteFilterer) WatchTokensWithdrawn(opts *bind.WatchOpts, sink chan<- *NativeTokenRemoteTokensWithdrawn, recipient []common.Address) (event.Subscription, error) { + + var recipientRule []interface{} + for _, recipientItem := range recipient { + recipientRule = append(recipientRule, recipientItem) + } + + logs, sub, err := _NativeTokenRemote.contract.WatchLogs(opts, "TokensWithdrawn", recipientRule) + 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(NativeTokenRemoteTokensWithdrawn) + if err := _NativeTokenRemote.contract.UnpackLog(event, "TokensWithdrawn", 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 +} + +// ParseTokensWithdrawn is a log parse operation binding the contract event 0x6352c5382c4a4578e712449ca65e83cdb392d045dfcf1cad9615189db2da244b. +// +// Solidity: event TokensWithdrawn(address indexed recipient, uint256 amount) +func (_NativeTokenRemote *NativeTokenRemoteFilterer) ParseTokensWithdrawn(log types.Log) (*NativeTokenRemoteTokensWithdrawn, error) { + event := new(NativeTokenRemoteTokensWithdrawn) + if err := _NativeTokenRemote.contract.UnpackLog(event, "TokensWithdrawn", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// NativeTokenRemoteTransferIterator is returned from FilterTransfer and is used to iterate over the raw logs and unpacked data for Transfer events raised by the NativeTokenRemote contract. +type NativeTokenRemoteTransferIterator struct { + Event *NativeTokenRemoteTransfer // 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 interfaces.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 *NativeTokenRemoteTransferIterator) 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(NativeTokenRemoteTransfer) + 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(NativeTokenRemoteTransfer) + 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 *NativeTokenRemoteTransferIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *NativeTokenRemoteTransferIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// NativeTokenRemoteTransfer represents a Transfer event raised by the NativeTokenRemote contract. +type NativeTokenRemoteTransfer 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 (_NativeTokenRemote *NativeTokenRemoteFilterer) FilterTransfer(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*NativeTokenRemoteTransferIterator, 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 := _NativeTokenRemote.contract.FilterLogs(opts, "Transfer", fromRule, toRule) + if err != nil { + return nil, err + } + return &NativeTokenRemoteTransferIterator{contract: _NativeTokenRemote.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 (_NativeTokenRemote *NativeTokenRemoteFilterer) WatchTransfer(opts *bind.WatchOpts, sink chan<- *NativeTokenRemoteTransfer, 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 := _NativeTokenRemote.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(NativeTokenRemoteTransfer) + if err := _NativeTokenRemote.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 (_NativeTokenRemote *NativeTokenRemoteFilterer) ParseTransfer(log types.Log) (*NativeTokenRemoteTransfer, error) { + event := new(NativeTokenRemoteTransfer) + if err := _NativeTokenRemote.contract.UnpackLog(event, "Transfer", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// NativeTokenRemoteWithdrawalIterator is returned from FilterWithdrawal and is used to iterate over the raw logs and unpacked data for Withdrawal events raised by the NativeTokenRemote contract. +type NativeTokenRemoteWithdrawalIterator struct { + Event *NativeTokenRemoteWithdrawal // 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 interfaces.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 *NativeTokenRemoteWithdrawalIterator) 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(NativeTokenRemoteWithdrawal) + 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(NativeTokenRemoteWithdrawal) + 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 *NativeTokenRemoteWithdrawalIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *NativeTokenRemoteWithdrawalIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// NativeTokenRemoteWithdrawal represents a Withdrawal event raised by the NativeTokenRemote contract. +type NativeTokenRemoteWithdrawal struct { + Sender common.Address + Amount *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterWithdrawal is a free log retrieval operation binding the contract event 0x7fcf532c15f0a6db0bd6d0e038bea71d30d808c7d98cb3bf7268a95bf5081b65. +// +// Solidity: event Withdrawal(address indexed sender, uint256 amount) +func (_NativeTokenRemote *NativeTokenRemoteFilterer) FilterWithdrawal(opts *bind.FilterOpts, sender []common.Address) (*NativeTokenRemoteWithdrawalIterator, error) { + + var senderRule []interface{} + for _, senderItem := range sender { + senderRule = append(senderRule, senderItem) + } + + logs, sub, err := _NativeTokenRemote.contract.FilterLogs(opts, "Withdrawal", senderRule) + if err != nil { + return nil, err + } + return &NativeTokenRemoteWithdrawalIterator{contract: _NativeTokenRemote.contract, event: "Withdrawal", logs: logs, sub: sub}, nil +} + +// WatchWithdrawal is a free log subscription operation binding the contract event 0x7fcf532c15f0a6db0bd6d0e038bea71d30d808c7d98cb3bf7268a95bf5081b65. +// +// Solidity: event Withdrawal(address indexed sender, uint256 amount) +func (_NativeTokenRemote *NativeTokenRemoteFilterer) WatchWithdrawal(opts *bind.WatchOpts, sink chan<- *NativeTokenRemoteWithdrawal, sender []common.Address) (event.Subscription, error) { + + var senderRule []interface{} + for _, senderItem := range sender { + senderRule = append(senderRule, senderItem) + } + + logs, sub, err := _NativeTokenRemote.contract.WatchLogs(opts, "Withdrawal", senderRule) + 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(NativeTokenRemoteWithdrawal) + if err := _NativeTokenRemote.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 0x7fcf532c15f0a6db0bd6d0e038bea71d30d808c7d98cb3bf7268a95bf5081b65. +// +// Solidity: event Withdrawal(address indexed sender, uint256 amount) +func (_NativeTokenRemote *NativeTokenRemoteFilterer) ParseWithdrawal(log types.Log) (*NativeTokenRemoteWithdrawal, error) { + event := new(NativeTokenRemoteWithdrawal) + if err := _NativeTokenRemote.contract.UnpackLog(event, "Withdrawal", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} diff --git a/abi-bindings/go/ictt/TokenRemote/NativeTokenRemoteUpgradeable/NativeTokenRemoteUpgradeable.go b/abi-bindings/go/ictt/TokenRemote/NativeTokenRemoteUpgradeable/NativeTokenRemoteUpgradeable.go new file mode 100644 index 000000000..e116c01c0 --- /dev/null +++ b/abi-bindings/go/ictt/TokenRemote/NativeTokenRemoteUpgradeable/NativeTokenRemoteUpgradeable.go @@ -0,0 +1,3770 @@ +// Code generated - DO NOT EDIT. +// This file is a generated binding and any manual changes will be lost. + +package nativetokenremoteupgradeable + +import ( + "errors" + "math/big" + "strings" + + "github.com/ava-labs/subnet-evm/accounts/abi" + "github.com/ava-labs/subnet-evm/accounts/abi/bind" + "github.com/ava-labs/subnet-evm/core/types" + "github.com/ava-labs/subnet-evm/interfaces" + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/event" +) + +// Reference imports to suppress errors if they are not otherwise used. +var ( + _ = errors.New + _ = big.NewInt + _ = strings.NewReader + _ = interfaces.NotFound + _ = bind.Bind + _ = common.Big1 + _ = types.BloomLookup + _ = event.NewSubscription + _ = abi.ConvertType +) + +// SendAndCallInput is an auto generated low-level Go binding around an user-defined struct. +type SendAndCallInput struct { + DestinationBlockchainID [32]byte + DestinationTokenTransferrerAddress common.Address + RecipientContract common.Address + RecipientPayload []byte + RequiredGasLimit *big.Int + RecipientGasLimit *big.Int + MultiHopFallback common.Address + FallbackRecipient common.Address + PrimaryFeeTokenAddress common.Address + PrimaryFee *big.Int + SecondaryFee *big.Int +} + +// SendTokensInput is an auto generated low-level Go binding around an user-defined struct. +type SendTokensInput struct { + DestinationBlockchainID [32]byte + DestinationTokenTransferrerAddress common.Address + Recipient common.Address + PrimaryFeeTokenAddress common.Address + PrimaryFee *big.Int + SecondaryFee *big.Int + RequiredGasLimit *big.Int + MultiHopFallback common.Address +} + +// TeleporterFeeInfo is an auto generated low-level Go binding around an user-defined struct. +type TeleporterFeeInfo struct { + FeeTokenAddress common.Address + Amount *big.Int +} + +// TokenRemoteSettings is an auto generated low-level Go binding around an user-defined struct. +type TokenRemoteSettings struct { + TeleporterRegistryAddress common.Address + TeleporterManager common.Address + MinTeleporterVersion *big.Int + TokenHomeBlockchainID [32]byte + TokenHomeAddress common.Address + TokenHomeDecimals uint8 +} + +// NativeTokenRemoteUpgradeableMetaData contains all meta data concerning the NativeTokenRemoteUpgradeable contract. +var NativeTokenRemoteUpgradeableMetaData = &bind.MetaData{ + ABI: "[{\"inputs\":[{\"internalType\":\"enumICMInitializable\",\"name\":\"init\",\"type\":\"uint8\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"target\",\"type\":\"address\"}],\"name\":\"AddressEmptyCode\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"AddressInsufficientBalance\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"allowance\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"needed\",\"type\":\"uint256\"}],\"name\":\"ERC20InsufficientAllowance\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"balance\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"needed\",\"type\":\"uint256\"}],\"name\":\"ERC20InsufficientBalance\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"approver\",\"type\":\"address\"}],\"name\":\"ERC20InvalidApprover\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"}],\"name\":\"ERC20InvalidReceiver\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"ERC20InvalidSender\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"ERC20InvalidSpender\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"FailedInnerCall\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidInitialization\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotInitializing\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"OwnableInvalidOwner\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"OwnableUnauthorizedAccount\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ReentrancyGuardReentrantCall\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"SafeERC20FailedOperation\",\"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\":true,\"internalType\":\"address\",\"name\":\"recipientContract\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"CallFailed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"recipientContract\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"CallSucceeded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Deposit\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"version\",\"type\":\"uint64\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"oldMinTeleporterVersion\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"newMinTeleporterVersion\",\"type\":\"uint256\"}],\"name\":\"MinTeleporterVersionUpdated\",\"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\":\"bytes32\",\"name\":\"teleporterMessageID\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"feesBurned\",\"type\":\"uint256\"}],\"name\":\"ReportBurnedTxFees\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"teleporterAddress\",\"type\":\"address\"}],\"name\":\"TeleporterAddressPaused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"teleporterAddress\",\"type\":\"address\"}],\"name\":\"TeleporterAddressUnpaused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"teleporterMessageID\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"destinationBlockchainID\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"destinationTokenTransferrerAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"recipientContract\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"recipientPayload\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"requiredGasLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"recipientGasLimit\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"multiHopFallback\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"fallbackRecipient\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"primaryFeeTokenAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"primaryFee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"secondaryFee\",\"type\":\"uint256\"}],\"indexed\":false,\"internalType\":\"structSendAndCallInput\",\"name\":\"input\",\"type\":\"tuple\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"TokensAndCallSent\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"teleporterMessageID\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"destinationBlockchainID\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"destinationTokenTransferrerAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"primaryFeeTokenAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"primaryFee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"secondaryFee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"requiredGasLimit\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"multiHopFallback\",\"type\":\"address\"}],\"indexed\":false,\"internalType\":\"structSendTokensInput\",\"name\":\"input\",\"type\":\"tuple\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"TokensSent\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"TokensWithdrawn\",\"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\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Withdrawal\",\"type\":\"event\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"inputs\":[],\"name\":\"BURNED_FOR_TRANSFER_ADDRESS\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"BURNED_TX_FEES_ADDRESS\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"HOME_CHAIN_BURN_ADDRESS\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"MULTI_HOP_CALL_GAS_PER_WORD\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"MULTI_HOP_CALL_REQUIRED_GAS\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"MULTI_HOP_SEND_REQUIRED_GAS\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"NATIVE_MINTER\",\"outputs\":[{\"internalType\":\"contractINativeMinter\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"NATIVE_TOKEN_REMOTE_STORAGE_LOCATION\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"REGISTER_REMOTE_REQUIRED_GAS\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"TELEPORTER_REGISTRY_APP_STORAGE_LOCATION\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"TOKEN_REMOTE_STORAGE_LOCATION\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"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\":\"value\",\"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\":\"payloadSize\",\"type\":\"uint256\"}],\"name\":\"calculateNumWords\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"pure\",\"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\":\"getBlockchainID\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getInitialReserveImbalance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getIsCollateralized\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getMinTeleporterVersion\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getMultiplyOnRemote\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getTokenHomeAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getTokenHomeBlockchainID\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getTokenMultiplier\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getTotalMinted\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"teleporterRegistryAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"teleporterManager\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"minTeleporterVersion\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"tokenHomeBlockchainID\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"tokenHomeAddress\",\"type\":\"address\"},{\"internalType\":\"uint8\",\"name\":\"tokenHomeDecimals\",\"type\":\"uint8\"}],\"internalType\":\"structTokenRemoteSettings\",\"name\":\"settings\",\"type\":\"tuple\"},{\"internalType\":\"string\",\"name\":\"nativeAssetSymbol\",\"type\":\"string\"},{\"internalType\":\"uint256\",\"name\":\"initialReserveImbalance\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"burnedFeesReportingRewardPercentage\",\"type\":\"uint256\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"teleporterAddress\",\"type\":\"address\"}],\"name\":\"isTeleporterAddressPaused\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"teleporterAddress\",\"type\":\"address\"}],\"name\":\"pauseTeleporterAddress\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"sourceBlockchainID\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"originSenderAddress\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"message\",\"type\":\"bytes\"}],\"name\":\"receiveTeleporterMessage\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"feeTokenAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"internalType\":\"structTeleporterFeeInfo\",\"name\":\"feeInfo\",\"type\":\"tuple\"}],\"name\":\"registerWithHome\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"requiredGasLimit\",\"type\":\"uint256\"}],\"name\":\"reportBurnedTxFees\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"destinationBlockchainID\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"destinationTokenTransferrerAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"primaryFeeTokenAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"primaryFee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"secondaryFee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"requiredGasLimit\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"multiHopFallback\",\"type\":\"address\"}],\"internalType\":\"structSendTokensInput\",\"name\":\"input\",\"type\":\"tuple\"}],\"name\":\"send\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"destinationBlockchainID\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"destinationTokenTransferrerAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"recipientContract\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"recipientPayload\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"requiredGasLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"recipientGasLimit\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"multiHopFallback\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"fallbackRecipient\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"primaryFeeTokenAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"primaryFee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"secondaryFee\",\"type\":\"uint256\"}],\"internalType\":\"structSendAndCallInput\",\"name\":\"input\",\"type\":\"tuple\"}],\"name\":\"sendAndCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalNativeAssetSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"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\":\"value\",\"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\":\"value\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"teleporterAddress\",\"type\":\"address\"}],\"name\":\"unpauseTeleporterAddress\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"version\",\"type\":\"uint256\"}],\"name\":\"updateMinTeleporterVersion\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"withdraw\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}]", + Bin: "0x608060405234801561000f575f80fd5b5060405161511a38038061511a83398101604081905261002e91610107565b60018160018111156100425761004261012c565b0361004f5761004f610055565b50610140565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00805468010000000000000000900460ff16156100a55760405163f92ee8a960e01b815260040160405180910390fd5b80546001600160401b03908116146101045780546001600160401b0319166001600160401b0390811782556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b50565b5f60208284031215610117575f80fd5b815160028110610125575f80fd5b9392505050565b634e487b7160e01b5f52602160045260245ffd5b614fcd8061014d5f395ff3fe608060405260043610610280575f3560e01c8063715018a61161014e578063b8a46d02116100c0578063dd62ed3e11610079578063dd62ed3e14610736578063e0fd9cb814610755578063ed0ae4b014610452578063ef793e2a14610769578063f2fde38b1461077d578063f3f981d81461079c5761028f565b8063b8a46d02146106b9578063c3cd6927146106d8578063c452165e146106ec578063c868efaa14610703578063d0e30db01461028f578063d2cc7a70146107225761028f565b80638f6cec88116101125780638f6cec8814610608578063909a6ac01461062757806395d89b4114610647578063973142971461065b578063a5717bc01461067a578063a9059cbb1461069a5761028f565b8063715018a61461057b57806371717c181461058f5780637ee3779a146105a55780638bf2fa94146105b95780638da5cb5b146105cc5761028f565b80632e1a7d4d116101f25780634511243e116101ab5780634511243e146104b55780635507f3d1146104d457806355538c8b146104ea5780635eb99514146105095780636e6eef8d1461052857806370a082311461053b5761028f565b80632e1a7d4d146103e6578063313ce56714610405578063329c3e1214610420578063347212c41461045257806335cac1591461046e5780634213cf78146104a15761028f565b806315beb59f1161024457806315beb59f1461035557806318160ddd1461036a5780631906529c1461037e57806323b872dd14610392578063254ac160146103b15780632b0d8f18146103c75761028f565b806302a30c7d1461029757806306fdde03146102c05780630733c8c8146102e1578063095ea7b3146103035780630ca1c5c9146103225761028f565b3661028f5761028d6107bb565b005b61028d6107bb565b3480156102a2575f80fd5b506102ab6107fc565b60405190151581526020015b60405180910390f35b3480156102cb575f80fd5b506102d4610813565b6040516102b79190613f06565b3480156102ec575f80fd5b506102f56108d3565b6040519081526020016102b7565b34801561030e575f80fd5b506102ab61031d366004613f3c565b6108e7565b34801561032d575f80fd5b507f69a5f7616543528c4fbe43f410b1034bd6da4ba06c25bedf04617268014cf501546102f5565b348015610360575f80fd5b506102f56105dc81565b348015610375575f80fd5b506102f5610900565b348015610389575f80fd5b506102f561091b565b34801561039d575f80fd5b506102ab6103ac366004613f66565b610972565b3480156103bc575f80fd5b506102f56201fbd081565b3480156103d2575f80fd5b5061028d6103e1366004613fa4565b610997565b3480156103f1575f80fd5b5061028d610400366004613fbf565b610a99565b348015610410575f80fd5b50604051601281526020016102b7565b34801561042b575f80fd5b5061043a6001600160991b0181565b6040516001600160a01b0390911681526020016102b7565b34801561045d575f80fd5b5061043a62010203600160981b0181565b348015610479575f80fd5b506102f57f600d6a9b283d1eda563de594ce4843869b6f128a4baa222422ed94a60b0cef0081565b3480156104ac575f80fd5b506102f5610ae5565b3480156104c0575f80fd5b5061028d6104cf366004613fa4565b610af6565b3480156104df575f80fd5b506102f56205302081565b3480156104f5575f80fd5b5061028d610504366004613fbf565b610be5565b348015610514575f80fd5b5061028d610523366004613fbf565b610ef7565b61028d610536366004613fd6565b610f08565b348015610546575f80fd5b506102f5610555366004613fa4565b6001600160a01b03165f9081525f80516020614f18833981519152602052604090205490565b348015610586575f80fd5b5061028d610f36565b34801561059a575f80fd5b506102f56205573081565b3480156105b0575f80fd5b506102ab610f47565b61028d6105c736600461400d565b610f5e565b3480156105d7575f80fd5b507f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300546001600160a01b031661043a565b348015610613575f80fd5b5061028d61062236600461414d565b610f8c565b348015610632575f80fd5b506102f55f80516020614f7883398151915281565b348015610652575f80fd5b506102d461109e565b348015610666575f80fd5b506102ab610675366004613fa4565b6110dc565b348015610685575f80fd5b506102f55f80516020614f5883398151915281565b3480156106a5575f80fd5b506102ab6106b4366004613f3c565b6110f5565b3480156106c4575f80fd5b5061028d6106d3366004614217565b611102565b3480156106e3575f80fd5b5061043a611276565b3480156106f7575f80fd5b5061043a600160981b81565b34801561070e575f80fd5b5061028d61071d366004614227565b611293565b34801561072d575f80fd5b506102f5611450565b348015610741575f80fd5b506102f56107503660046142a8565b611465565b348015610760575f80fd5b506102f56114ae565b348015610774575f80fd5b506102f56114c2565b348015610788575f80fd5b5061028d610797366004613fa4565b6114d6565b3480156107a7575f80fd5b506102f56107b6366004613fbf565b611510565b60405134815233907fe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c9060200160405180910390a26107fa3334611526565b565b5f8061080661155e565b6006015460ff1692915050565b7f52c63247e1f47db19d5ce0460030c497f067ca4cebf71ba98eeadabe20bace0380546060915f80516020614f1883398151915291610851906142df565b80601f016020809104026020016040519081016040528092919081815260200182805461087d906142df565b80156108c85780601f1061089f576101008083540402835291602001916108c8565b820191905f5260205f20905b8154815290600101906020018083116108ab57829003601f168201915b505050505091505090565b5f806108dd61155e565b6003015492915050565b5f336108f4818585611582565b60019150505b92915050565b5f805f80516020614f188339815191525b6002015492915050565b5f5f80516020614f588339815191528161094462010203600160981b0131600160981b31614325565b90505f61094f6114c2565b836001015461095e9190614325565b905061096a8282614338565b935050505090565b5f3361097f858285611594565b61098a8585856115f1565b60019150505b9392505050565b5f80516020614f788339815191526109ad61164e565b6001600160a01b0382166109dc5760405162461bcd60e51b81526004016109d39061434b565b60405180910390fd5b6109e68183611656565b15610a495760405162461bcd60e51b815260206004820152602d60248201527f54656c65706f7274657252656769737472794170703a2061646472657373206160448201526c1b1c9958591e481c185d5cd959609a1b60648201526084016109d3565b6001600160a01b0382165f81815260018381016020526040808320805460ff1916909217909155517f933f93e57a222e6330362af8b376d0a8725b6901e9a2fb86d00f169702b28a4c9190a25050565b60405181815233907f7fcf532c15f0a6db0bd6d0e038bea71d30d808c7d98cb3bf7268a95bf5081b659060200160405180910390a2610ad83382611677565b610ae233826116ab565b50565b5f80610aef61155e565b5492915050565b5f80516020614f78833981519152610b0c61164e565b6001600160a01b038216610b325760405162461bcd60e51b81526004016109d39061434b565b610b3c8183611656565b610b9a5760405162461bcd60e51b815260206004820152602960248201527f54656c65706f7274657252656769737472794170703a2061646472657373206e6044820152681bdd081c185d5cd95960ba1b60648201526084016109d3565b6001600160a01b0382165f818152600183016020526040808220805460ff19169055517f844e2f3154214672229235858fd029d1dfd543901c6d05931f0bc2480a2d72c39190a25050565b5f80516020614f388339815191528054600114610c145760405162461bcd60e51b81526004016109d390614399565b600281557f69a5f7616543528c4fbe43f410b1034bd6da4ba06c25bedf04617268014cf502545f80516020614f5883398151915290600160981b31908111610cd25760405162461bcd60e51b8152602060048201526044602482018190527f4e6174697665546f6b656e52656d6f74653a206275726e206164647265737320908201527f62616c616e6365206e6f742067726561746572207468616e206c6173742072656064820152631c1bdc9d60e21b608482015260a4016109d3565b5f826002015482610ce39190614338565b90505f6064845f015483610cf791906143dd565b610d0191906143f4565b90505f610d0e8284614338565b6002860185905590508115610d3157610d27308361173e565b610d313083611526565b5f610d4b610d3d6108d3565b610d45610f47565b846117eb565b11610db55760405162461bcd60e51b815260206004820152603460248201527f4e6174697665546f6b656e52656d6f74653a207a65726f207363616c6564206160448201527336b7bab73a103a37903932b837b93a10313ab93760611b60648201526084016109d3565b604080518082018252600181528151808301835262010203600160981b018152602080820185905292515f9380840192610df192909101614427565b60405160208183030381529060405281525090505f610eac6040518060c00160405280610e1c6114ae565b8152602001610e29611276565b6001600160a01b0316815260408051808201825230815260208181018a905283015281018c90526060015f5b604051908082528060200260200182016040528015610e7e578160200160208202803683370190505b50815260200184604051602001610e959190614447565b604051602081830303815290604052815250611800565b9050807f0832c643b65d6d3724ed14ac3a655fbc7cae54fb010918b2c2f70ef6b1bb94a584604051610ee091815260200190565b60405180910390a250506001909555505050505050565b610eff61164e565b610ae28161191b565b610f106107fc565b610f2c5760405162461bcd60e51b81526004016109d390614489565b610ae28134611ab3565b610f3e611b2a565b6107fa5f611b85565b5f80610f5161155e565b6004015460ff1692915050565b610f666107fc565b610f825760405162461bcd60e51b81526004016109d390614489565b610ae28134611bf5565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a008054600160401b810460ff1615906001600160401b03165f81158015610fd05750825b90505f826001600160401b03166001148015610feb5750303b155b905081158015610ff9575080155b156110175760405163f92ee8a960e01b815260040160405180910390fd5b845467ffffffffffffffff19166001178555831561104157845460ff60401b1916600160401b1785555b61104d89898989611c61565b831561109357845460ff60401b19168555604051600181527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b505050505050505050565b7f52c63247e1f47db19d5ce0460030c497f067ca4cebf71ba98eeadabe20bace0480546060915f80516020614f1883398151915291610851906142df565b5f5f80516020614f788339815191526109908184611656565b5f336108f48185856115f1565b5f61110b61155e565b6006810154909150610100900460ff16156111685760405162461bcd60e51b815260206004820152601f60248201527f546f6b656e52656d6f74653a20616c726561647920726567697374657265640060448201526064016109d3565b604080516060808201835260058401548252600284015460ff600160a01b820481166020808601918252600160a81b9093048216858701908152865180880188525f808252885188518188015293518516848a015291519093168286015286518083039095018552608090910190955280820192909252919290916111fd906111f390870187613fa4565b8660200135611cf1565b6040805160c0810182526001870154815260028701546001600160a01b03166020808301919091528251808401845293945061126e939192830191908190611247908b018b613fa4565b6001600160a01b0316815260209081018690529082526201fbd0908201526040015f610e55565b505050505050565b5f8061128061155e565b600201546001600160a01b031692915050565b61129b611d38565b5f5f80516020614f7883398151915260028101548154919250906001600160a01b0316634c1f08ce336040516001600160e01b031960e084901b1681526001600160a01b039091166004820152602401602060405180830381865afa158015611306573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061132a91906144d8565b10156113915760405162461bcd60e51b815260206004820152603060248201527f54656c65706f7274657252656769737472794170703a20696e76616c6964205460448201526f32b632b837b93a32b91039b2b73232b960811b60648201526084016109d3565b61139b8133611656565b156114015760405162461bcd60e51b815260206004820152603060248201527f54656c65706f7274657252656769737472794170703a2054656c65706f72746560448201526f1c881859191c995cdcc81c185d5cd95960821b60648201526084016109d3565b611441858585858080601f0160208091040260200160405190810160405280939291908181526020018383808284375f92019190915250611d8292505050565b5061144a611f99565b50505050565b5f805f80516020614f78833981519152610911565b6001600160a01b039182165f9081527f52c63247e1f47db19d5ce0460030c497f067ca4cebf71ba98eeadabe20bace016020908152604080832093909416825291909152205490565b5f806114b861155e565b6001015492915050565b5f806114cc61155e565b6005015492915050565b6114de611b2a565b6001600160a01b03811661150757604051631e4fbdf760e01b81525f60048201526024016109d3565b610ae281611b85565b5f600561151e83601f614325565b901c92915050565b6001600160a01b03821661154f5760405163ec442f0560e01b81525f60048201526024016109d3565b61155a5f8383611fc3565b5050565b7f600d6a9b283d1eda563de594ce4843869b6f128a4baa222422ed94a60b0cef0090565b61158f83838360016120fc565b505050565b5f61159f8484611465565b90505f19811461144a57818110156115e357604051637dc7a0d960e11b81526001600160a01b038416600482015260248101829052604481018390526064016109d3565b61144a84848484035f6120fc565b6001600160a01b03831661161a57604051634b637e8f60e11b81525f60048201526024016109d3565b6001600160a01b0382166116435760405163ec442f0560e01b81525f60048201526024016109d3565b61158f838383611fc3565b6107fa611b2a565b6001600160a01b03165f908152600191909101602052604090205460ff1690565b6001600160a01b0382166116a057604051634b637e8f60e11b81525f60048201526024016109d3565b61155a825f83611fc3565b804710156116ce5760405163cd78605960e01b81523060048201526024016109d3565b5f826001600160a01b0316826040515f6040518083038185875af1925050503d805f8114611717576040519150601f19603f3d011682016040523d82523d5f602084013e61171c565b606091505b505090508061158f57604051630a12f52160e11b815260040160405180910390fd5b7f69a5f7616543528c4fbe43f410b1034bd6da4ba06c25bedf04617268014cf50180545f80516020614f588339815191529183915f9061177f908490614325565b90915550506040516327ad555d60e11b81526001600160a01b0384166004820152602481018390526001600160991b0190634f5aaaba906044015f604051808303815f87803b1580156117d0575f80fd5b505af11580156117e2573d5f803e3d5ffd5b50505050505050565b5f6117f88484845f6121df565b949350505050565b5f8061180a61220f565b604084015160200151909150156118af576040830151516001600160a01b031661188c5760405162461bcd60e51b815260206004820152602d60248201527f54656c65706f7274657252656769737472794170703a207a65726f206665652060448201526c746f6b656e206164647265737360981b60648201526084016109d3565b6040830151602081015190516118af916001600160a01b039091169083906122ff565b604051630624488560e41b81526001600160a01b038216906362448850906118db9086906004016144ef565b6020604051808303815f875af11580156118f7573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061099091906144d8565b5f80516020614f7883398151915280546040805163301fd1f560e21b815290515f926001600160a01b03169163c07f47d49160048083019260209291908290030181865afa15801561196f573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061199391906144d8565b600283015490915081841115611a055760405162461bcd60e51b815260206004820152603160248201527f54656c65706f7274657252656769737472794170703a20696e76616c6964205460448201527032b632b837b93a32b9103b32b939b4b7b760791b60648201526084016109d3565b808411611a7a5760405162461bcd60e51b815260206004820152603f60248201527f54656c65706f7274657252656769737472794170703a206e6f7420677265617460448201527f6572207468616e2063757272656e74206d696e696d756d2076657273696f6e0060648201526084016109d3565b60028301849055604051849082907fa9a7ef57e41f05b4c15480842f5f0c27edfcbb553fed281f7c4068452cc1c02d905f90a350505050565b5f80516020614f388339815191528054600114611ae25760405162461bcd60e51b81526004016109d390614399565b600281555f611aef61155e565b9050611afa84612386565b6001810154843503611b1657611b1084846125c0565b50611b22565b611b1084846127e4565b505b600190555050565b33611b5c7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300546001600160a01b031690565b6001600160a01b0316146107fa5760405163118cdaa760e01b81523360048201526024016109d3565b7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c19930080546001600160a01b031981166001600160a01b03848116918217845560405192169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0905f90a3505050565b5f80516020614f388339815191528054600114611c245760405162461bcd60e51b81526004016109d390614399565b600281555f611c3161155e565b9050611c3c84612a85565b6001810154843503611c5757611c528484612b70565b611b20565b611b208484612cdf565b611c69612ea5565b815f03611cd25760405162461bcd60e51b815260206004820152603160248201527f4e6174697665546f6b656e52656d6f74653a207a65726f20696e697469616c206044820152707265736572766520696d62616c616e636560781b60648201526084016109d3565b611cdc8384612eee565b611ce884836012612f00565b61144a81612f31565b5f815f03611d0057505f6108fa565b306001600160a01b03841603611d2d57611d1b333084611594565b611d263330846115f1565b50806108fa565b610990833384612fa8565b7f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f00805460011901611d7c57604051633ee5aeb560e01b815260040160405180910390fd5b60029055565b5f611d8b61155e565b905080600101548414611df25760405162461bcd60e51b815260206004820152602960248201527f546f6b656e52656d6f74653a20696e76616c696420736f7572636520626c6f636044820152681ad8da185a5b88125160ba1b60648201526084016109d3565b60028101546001600160a01b03848116911614611e645760405162461bcd60e51b815260206004820152602a60248201527f546f6b656e52656d6f74653a20696e76616c6964206f726967696e2073656e646044820152696572206164647265737360b01b60648201526084016109d3565b5f82806020019051810190611e7991906145e8565b6006830154909150610100900460ff161580611e9a5750600682015460ff16155b15611eb15760068201805461ffff19166101011790555b600181516004811115611ec657611ec6614413565b03611efd575f8160200151806020019051810190611ee49190614670565b9050611ef7815f0151826020015161310b565b50611f92565b600281516004811115611f1257611f12614413565b03611f40575f8160200151806020019051810190611f3091906146a8565b9050611ef7818260800151613158565b60405162461bcd60e51b815260206004820152602160248201527f546f6b656e52656d6f74653a20696e76616c6964206d657373616765207479706044820152606560f81b60648201526084016109d3565b5050505050565b5f7f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f005b6001905550565b5f80516020614f188339815191526001600160a01b038416611ffd5781816002015f828254611ff29190614325565b9091555061206d9050565b6001600160a01b0384165f908152602082905260409020548281101561204f5760405163391434e360e21b81526001600160a01b038616600482015260248101829052604481018490526064016109d3565b6001600160a01b0385165f9081526020839052604090209083900390555b6001600160a01b03831661208b5760028101805483900390556120a9565b6001600160a01b0383165f9081526020829052604090208054830190555b826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040516120ee91815260200190565b60405180910390a350505050565b5f80516020614f188339815191526001600160a01b0385166121335760405163e602df0560e01b81525f60048201526024016109d3565b6001600160a01b03841661215c57604051634a1406b160e11b81525f60048201526024016109d3565b6001600160a01b038086165f90815260018301602090815260408083209388168352929052208390558115611f9257836001600160a01b0316856001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925856040516121d091815260200190565b60405180910390a35050505050565b5f811515841515036121fc576121f585846143dd565b90506117f8565b61220685846143f4565b95945050505050565b5f80516020614f7883398151915280546040805163d820e64f60e01b815290515f939284926001600160a01b039091169163d820e64f916004808201926020929091908290030181865afa158015612269573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061228d9190614772565b90506122998282611656565b156108fa5760405162461bcd60e51b815260206004820152603060248201527f54656c65706f7274657252656769737472794170703a2054656c65706f72746560448201526f1c881cd95b991a5b99c81c185d5cd95960821b60648201526084016109d3565b604051636eb1769f60e11b81523060048201526001600160a01b0383811660248301525f919085169063dd62ed3e90604401602060405180830381865afa15801561234c573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061237091906144d8565b905061144a84846123818585614325565b613282565b80356123a45760405162461bcd60e51b81526004016109d39061478d565b5f6123b56040830160208401613fa4565b6001600160a01b0316036123db5760405162461bcd60e51b81526004016109d3906147d8565b5f6123ec6060830160408401613fa4565b6001600160a01b0316036124575760405162461bcd60e51b815260206004820152602c60248201527f546f6b656e52656d6f74653a207a65726f20726563697069656e7420636f6e7460448201526b72616374206164647265737360a01b60648201526084016109d3565b5f81608001351161247a5760405162461bcd60e51b81526004016109d390614835565b5f8160a00135116124db5760405162461bcd60e51b815260206004820152602560248201527f546f6b656e52656d6f74653a207a65726f20726563697069656e7420676173206044820152641b1a5b5a5d60da1b60648201526084016109d3565b80608001358160a00135106125435760405162461bcd60e51b815260206004820152602860248201527f546f6b656e52656d6f74653a20696e76616c696420726563697069656e742067604482015267185cc81b1a5b5a5d60c21b60648201526084016109d3565b5f612555610100830160e08401613fa4565b6001600160a01b031603610ae25760405162461bcd60e51b815260206004820152602c60248201527f546f6b656e52656d6f74653a207a65726f2066616c6c6261636b20726563697060448201526b69656e74206164647265737360a01b60648201526084016109d3565b5f6125c961155e565b90506125f96125de6040850160208601613fa4565b6101408501356125f460e0870160c08801613fa4565b61333f565b5f6126218361261061012087016101008801613fa4565b86610120013587610140013561343c565b6040805180820190915291945091505f908060028152602001604051806101000160405280865f01548152602001306001600160a01b031681526020016126653390565b6001600160a01b0316815260200161268360608a0160408b01613fa4565b6001600160a01b03168152602081018890526040016126a560608a018a614879565b8080601f0160208091040260200160405190810160405280939291908181526020018383808284375f9201919091525050509082525060a089013560208201526040016126f96101008a0160e08b01613fa4565b6001600160a01b0316905260405161271491906020016148bb565b60408051601f198184030181529181529152805160c0810182526001860154815260028601546001600160a01b03166020820152815180830183529293505f92612796928201908061276e6101208c016101008d01613fa4565b6001600160a01b03168152602090810188905290825260808a0135908201526040015f610e55565b9050336001600160a01b0316817f5d76dff81bf773b908b050fa113d39f7d8135bb4175398f313ea19cd3a1a0b1688886040516127d49291906149c2565b60405180910390a3505050505050565b5f6127ed61155e565b905061281983356128046040860160208701613fa4565b61281460e0870160c08801613fa4565b6134ff565b5f6128308361261061012087016101008801613fa4565b6040805180820190915291945091505f90806004815260200160405180610160016040528061285c3390565b6001600160a01b03168152602001885f013581526020018860200160208101906128869190613fa4565b6001600160a01b031681526020016128a460608a0160408b01613fa4565b6001600160a01b03168152602081018890526040016128c660608a018a614879565b8080601f0160208091040260200160405190810160405280939291908181526020018383808284375f9201919091525050509082525060a0890135602082015260400161291a6101008a0160e08b01613fa4565b6001600160a01b031681526080890135602082015260400161294260e08a0160c08b01613fa4565b6001600160a01b03168152610140890135602091820152604051612967929101614ad0565b60408051601f19818403018152919052905290505f6105dc61299661298f6060890189614879565b9050611510565b6129a091906143dd565b6129ad9062055730614325565b6040805160c0810182526001870154815260028701546001600160a01b03166020820152815180830183529293505f92612a3692820190806129f76101208d016101008e01613fa4565b6001600160a01b031681526020908101899052908252818101869052604080515f815280830182528184015251606090920191610e9591889101614447565b9050336001600160a01b0316817f5d76dff81bf773b908b050fa113d39f7d8135bb4175398f313ea19cd3a1a0b168989604051612a749291906149c2565b60405180910390a350505050505050565b5f612a966060830160408401613fa4565b6001600160a01b031603612af85760405162461bcd60e51b815260206004820152602360248201527f546f6b656e52656d6f74653a207a65726f20726563697069656e74206164647260448201526265737360e81b60648201526084016109d3565b5f8160c0013511612b1b5760405162461bcd60e51b81526004016109d390614835565b8035612b395760405162461bcd60e51b81526004016109d39061478d565b5f612b4a6040830160208401613fa4565b6001600160a01b031603610ae25760405162461bcd60e51b81526004016109d3906147d8565b5f612b7961155e565b9050612ba4612b8e6040850160208601613fa4565b60a08501356125f4610100870160e08801613fa4565b5f612bc883612bb96080870160608801613fa4565b86608001358760a0013561343c565b6040805180820190915291945091505f9080600181526020016040518060400160405280886040016020810190612bff9190613fa4565b6001600160a01b0316815260200187815250604051602001612c219190614427565b60408051601f198184030181529181529152805160c0810182526001860154815260028601546001600160a01b03166020820152815180830183529293505f92612ca19282019080612c7960808c0160608d01613fa4565b6001600160a01b03168152602090810188905290825260c08a0135908201526040015f610e55565b9050336001600160a01b0316817f93f19bf1ec58a15dc643b37e7e18a1c13e85e06cd11929e283154691ace9fb5288886040516127d4929190614bad565b5f612ce861155e565b9050612d108335612cff6040860160208701613fa4565b612814610100870160e08801613fa4565b5f612d2583612bb96080870160608801613fa4565b60408051808201825260038152815160e081018352883581529396509193505f9260208084019282820191612d5e918b01908b01613fa4565b6001600160a01b03168152602001612d7c60608a0160408b01613fa4565b6001600160a01b031681526020810188905260a0890135604082015260c08901356060820152608001612db66101008a0160e08b01613fa4565b6001600160a01b03169052604051612e269190602001815181526020808301516001600160a01b0390811691830191909152604080840151821690830152606080840151908301526080808401519083015260a0808401519083015260c092830151169181019190915260e00190565b60408051601f198184030181529181529152805160c0810182526001860154815260028601546001600160a01b03166020820152815180830183529293505f92612ca19282019080612e7e60808c0160608d01613fa4565b6001600160a01b03168152602090810188905290825262053020908201526040015f610e55565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0054600160401b900460ff166107fa57604051631afcd79f60e31b815260040160405180910390fd5b612ef6612ea5565b61155a828261359d565b612f08612ea5565b612f1e835f0151846020015185604001516135ed565b612f26613608565b61158f838383613618565b612f39612ea5565b60648110612f975760405162461bcd60e51b815260206004820152602560248201527f4e6174697665546f6b656e52656d6f74653a20696e76616c69642070657263656044820152646e7461676560d81b60648201526084016109d3565b5f80516020614f5883398151915255565b6040516370a0823160e01b81523060048201525f9081906001600160a01b038616906370a0823190602401602060405180830381865afa158015612fee573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061301291906144d8565b90506130296001600160a01b03861685308661393c565b6040516370a0823160e01b81523060048201525f906001600160a01b038716906370a0823190602401602060405180830381865afa15801561306d573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061309191906144d8565b90508181116130f75760405162461bcd60e51b815260206004820152602c60248201527f5361666545524332305472616e7366657246726f6d3a2062616c616e6365206e60448201526b1bdd081a5b98dc99585cd95960a21b60648201526084016109d3565b6131018282614338565b9695505050505050565b816001600160a01b03167f6352c5382c4a4578e712449ca65e83cdb392d045dfcf1cad9615189db2da244b8260405161314691815260200190565b60405180910390a261155a828261173e565b613162308261173e565b5f825f0151836020015184604001518560a001516040516024016131899493929190614c4c565b60408051601f198184030181529190526020810180516001600160e01b031663161b12ff60e11b17905260c084015160608501519192505f916131cf9190859085613975565b905080156132235783606001516001600160a01b03167f104deb555f67e63782bb817bc26c39050894645f9b9f29c4be8ae68d0e8b7ff48460405161321691815260200190565b60405180910390a261144a565b83606001516001600160a01b03167fb9eaeae386d339f8115782f297a9e5f0e13fb587cd6b0d502f113cb8dd4d6cb08460405161326291815260200190565b60405180910390a260e084015161144a906001600160a01b0316846116ab565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663095ea7b360e01b1790526132d38482613a45565b61144a576040516001600160a01b0384811660248301525f604483015261333591869182169063095ea7b3906064015b604051602081830303815290604052915060e01b6020820180516001600160e01b038381831617835250505050613ae2565b61144a8482613ae2565b5f61334861155e565b60028101549091506001600160a01b0385811691161461337a5760405162461bcd60e51b81526004016109d390614c7d565b82156133d45760405162461bcd60e51b815260206004820152602360248201527f546f6b656e52656d6f74653a206e6f6e2d7a65726f207365636f6e646172792060448201526266656560e81b60648201526084016109d3565b6001600160a01b0382161561144a5760405162461bcd60e51b815260206004820152602860248201527f546f6b656e52656d6f74653a206e6f6e2d7a65726f206d756c74692d686f702060448201526766616c6c6261636b60c01b60648201526084016109d3565b5f805f61344761155e565b905061345287613b43565b965061345e8686611cf1565b600382015460048301549196506134789160ff16866117eb565b60038201546004830154613490919060ff168a6117eb565b116134f25760405162461bcd60e51b815260206004820152602c60248201527f546f6b656e52656d6f74653a20696e73756666696369656e7420746f6b656e7360448201526b103a37903a3930b739b332b960a11b60648201526084016109d3565b5094959294509192505050565b5f61350861155e565b8054909150840361353b57306001600160a01b0384160361353b5760405162461bcd60e51b81526004016109d390614c7d565b6001600160a01b03821661144a5760405162461bcd60e51b8152602060048201526024808201527f546f6b656e52656d6f74653a207a65726f206d756c74692d686f702066616c6c6044820152636261636b60e01b60648201526084016109d3565b6135a5612ea5565b5f80516020614f188339815191527f52c63247e1f47db19d5ce0460030c497f067ca4cebf71ba98eeadabe20bace036135de8482614d1e565b506004810161144a8382614d1e565b6135f5612ea5565b6135ff8382613b5b565b61158f82613b7d565b613610612ea5565b6107fa613b8e565b613620612ea5565b5f61362961155e565b90506005600160991b016001600160a01b0316634213cf786040518163ffffffff1660e01b8152600401602060405180830381865afa15801561366e573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061369291906144d8565b815560608401516136f85760405162461bcd60e51b815260206004820152602a60248201527f546f6b656e52656d6f74653a207a65726f20746f6b656e20686f6d6520626c6f60448201526918dad8da185a5b88125160b21b60648201526084016109d3565b80546060850151036137725760405162461bcd60e51b815260206004820152603b60248201527f546f6b656e52656d6f74653a2063616e6e6f74206465706c6f7920746f20736160448201527f6d6520626c6f636b636861696e20617320746f6b656e20686f6d65000000000060648201526084016109d3565b60808401516001600160a01b03166137d85760405162461bcd60e51b8152602060048201526024808201527f546f6b656e52656d6f74653a207a65726f20746f6b656e20686f6d65206164646044820152637265737360e01b60648201526084016109d3565b60128460a0015160ff1611156138425760405162461bcd60e51b815260206004820152602960248201527f546f6b656e52656d6f74653a20746f6b656e20686f6d6520646563696d616c73604482015268040e8dede40d0d2ced60bb1b60648201526084016109d3565b60128260ff1611156138a25760405162461bcd60e51b8152602060048201526024808201527f546f6b656e52656d6f74653a20746f6b656e20646563696d616c7320746f6f206044820152630d0d2ced60e31b60648201526084016109d3565b60608401516001820155608084015160028201805460058401869055600684018054871560ff1990911617905560a08701516001600160a01b039093166001600160a81b031990911617600160a01b60ff808516919091029190911760ff60a81b1916600160a81b9186169190910217905561391e9083613ba2565b60048301805460ff1916911515919091179055600390910155505050565b6040516001600160a01b03848116602483015283811660448301526064820183905261144a9186918216906323b872dd90608401613303565b5f845a10156139c65760405162461bcd60e51b815260206004820152601b60248201527f43616c6c5574696c733a20696e73756666696369656e7420676173000000000060448201526064016109d3565b83471015613a165760405162461bcd60e51b815260206004820152601d60248201527f43616c6c5574696c733a20696e73756666696369656e742076616c756500000060448201526064016109d3565b826001600160a01b03163b5f03613a2e57505f6117f8565b5f805f84516020860188888bf19695505050505050565b5f805f846001600160a01b031684604051613a609190614dd9565b5f604051808303815f865af19150503d805f8114613a99576040519150601f19603f3d011682016040523d82523d5f602084013e613a9e565b606091505b5091509150818015613ac8575080511580613ac8575080806020019051810190613ac89190614df4565b80156122065750505050506001600160a01b03163b151590565b5f613af66001600160a01b03841683613bec565b905080515f14158015613b1a575080806020019051810190613b189190614df4565b155b1561158f57604051635274afe760e01b81526001600160a01b03841660048201526024016109d3565b5f613b5762010203600160981b01836116ab565b5090565b613b63612ea5565b613b6b613bf9565b613b73613c09565b61155a8282613c11565b613b85612ea5565b610ae281613d95565b5f5f80516020614f38833981519152611fbc565b5f8060ff808516908416118181613bc557613bbd8587614e13565b60ff16613bd3565b613bcf8686614e13565b60ff165b613bde90600a614f0c565b9350909150505b9250929050565b606061099083835f613d9d565b613c01612ea5565b6107fa613e2c565b6107fa612ea5565b613c19612ea5565b6001600160a01b038216613c955760405162461bcd60e51b815260206004820152603760248201527f54656c65706f7274657252656769737472794170703a207a65726f2054656c6560448201527f706f72746572207265676973747279206164647265737300000000000000000060648201526084016109d3565b5f5f80516020614f7883398151915290505f8390505f816001600160a01b031663c07f47d46040518163ffffffff1660e01b8152600401602060405180830381865afa158015613ce7573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190613d0b91906144d8565b11613d735760405162461bcd60e51b815260206004820152603260248201527f54656c65706f7274657252656769737472794170703a20696e76616c69642054604482015271656c65706f7274657220726567697374727960701b60648201526084016109d3565b81546001600160a01b0319166001600160a01b03821617825561144a8361191b565b6114de612ea5565b606081471015613dc25760405163cd78605960e01b81523060048201526024016109d3565b5f80856001600160a01b03168486604051613ddd9190614dd9565b5f6040518083038185875af1925050503d805f8114613e17576040519150601f19603f3d011682016040523d82523d5f602084013e613e1c565b606091505b5091509150613101868383613e34565b611f99612ea5565b606082613e4957613e4482613e90565b610990565b8151158015613e6057506001600160a01b0384163b155b15613e8957604051639996b31560e01b81526001600160a01b03851660048201526024016109d3565b5080610990565b805115613ea05780518082602001fd5b604051630a12f52160e11b815260040160405180910390fd5b5f5b83811015613ed3578181015183820152602001613ebb565b50505f910152565b5f8151808452613ef2816020860160208601613eb9565b601f01601f19169290920160200192915050565b602081525f6109906020830184613edb565b6001600160a01b0381168114610ae2575f80fd5b8035613f3781613f18565b919050565b5f8060408385031215613f4d575f80fd5b8235613f5881613f18565b946020939093013593505050565b5f805f60608486031215613f78575f80fd5b8335613f8381613f18565b92506020840135613f9381613f18565b929592945050506040919091013590565b5f60208284031215613fb4575f80fd5b813561099081613f18565b5f60208284031215613fcf575f80fd5b5035919050565b5f60208284031215613fe6575f80fd5b81356001600160401b03811115613ffb575f80fd5b82016101608185031215610990575f80fd5b5f610100828403121561401e575f80fd5b50919050565b634e487b7160e01b5f52604160045260245ffd5b60405160c081016001600160401b038111828210171561405a5761405a614024565b60405290565b604080519081016001600160401b038111828210171561405a5761405a614024565b60405161010081016001600160401b038111828210171561405a5761405a614024565b604051601f8201601f191681016001600160401b03811182821017156140cd576140cd614024565b604052919050565b5f6001600160401b038211156140ed576140ed614024565b50601f01601f191660200190565b5f82601f83011261410a575f80fd5b813561411d614118826140d5565b6140a5565b818152846020838601011115614131575f80fd5b816020850160208301375f918101602001919091529392505050565b5f805f80848603610120811215614162575f80fd5b60c081121561416f575f80fd5b50614178614038565b853561418381613f18565b8152602086013561419381613f18565b80602083015250604086013560408201526060860135606082015260808601356141bc81613f18565b608082015260a086013560ff811681146141d4575f80fd5b60a0820152935060c08501356001600160401b038111156141f3575f80fd5b6141ff878288016140fb565b949794965050505060e0830135926101000135919050565b5f6040828403121561401e575f80fd5b5f805f806060858703121561423a575f80fd5b84359350602085013561424c81613f18565b925060408501356001600160401b0380821115614267575f80fd5b818701915087601f83011261427a575f80fd5b813581811115614288575f80fd5b886020828501011115614299575f80fd5b95989497505060200194505050565b5f80604083850312156142b9575f80fd5b82356142c481613f18565b915060208301356142d481613f18565b809150509250929050565b600181811c908216806142f357607f821691505b60208210810361401e57634e487b7160e01b5f52602260045260245ffd5b634e487b7160e01b5f52601160045260245ffd5b808201808211156108fa576108fa614311565b818103818111156108fa576108fa614311565b6020808252602e908201527f54656c65706f7274657252656769737472794170703a207a65726f2054656c6560408201526d706f72746572206164647265737360901b606082015260800190565b60208082526024908201527f53656e645265656e7472616e637947756172643a2073656e64207265656e7472604082015263616e637960e01b606082015260800190565b80820281158282048414176108fa576108fa614311565b5f8261440e57634e487b7160e01b5f52601260045260245ffd5b500490565b634e487b7160e01b5f52602160045260245ffd5b81516001600160a01b0316815260208083015190820152604081016108fa565b602081525f82516005811061446a57634e487b7160e01b5f52602160045260245ffd5b8060208401525060208301516040808401526117f86060840182613edb565b6020808252602f908201527f4e6174697665546f6b656e52656d6f74653a20636f6e747261637420756e646560408201526e1c98dbdb1b185d195c985b1a5e9959608a1b606082015260800190565b5f602082840312156144e8575f80fd5b5051919050565b6020808252825182820152828101516001600160a01b039081166040808501919091528401518051821660608501528083015160808501525f929161010085019190606087015160a0870152608087015160e060c08801528051938490528401925f92506101208701905b8084101561457c5784518316825293850193600193909301929085019061455a565b5060a0880151878203601f190160e0890152945061459a8186613edb565b98975050505050505050565b5f82601f8301126145b5575f80fd5b81516145c3614118826140d5565b8181528460208386010111156145d7575f80fd5b6117f8826020830160208701613eb9565b5f602082840312156145f8575f80fd5b81516001600160401b038082111561460e575f80fd5b9083019060408286031215614621575f80fd5b614629614060565b825160058110614637575f80fd5b815260208301518281111561464a575f80fd5b614656878286016145a6565b60208301525095945050505050565b8051613f3781613f18565b5f60408284031215614680575f80fd5b614688614060565b825161469381613f18565b81526020928301519281019290925250919050565b5f602082840312156146b8575f80fd5b81516001600160401b03808211156146ce575f80fd5b9083019061010082860312156146e2575f80fd5b6146ea614082565b825181526146fa60208401614665565b602082015261470b60408401614665565b604082015261471c60608401614665565b60608201526080830151608082015260a08301518281111561473c575f80fd5b614748878286016145a6565b60a08301525060c083015160c082015261476460e08401614665565b60e082015295945050505050565b5f60208284031215614782575f80fd5b815161099081613f18565b6020808252602b908201527f546f6b656e52656d6f74653a207a65726f2064657374696e6174696f6e20626c60408201526a1bd8dad8da185a5b88125160aa1b606082015260800190565b60208082526037908201527f546f6b656e52656d6f74653a207a65726f2064657374696e6174696f6e20746f60408201527f6b656e207472616e736665727265722061646472657373000000000000000000606082015260800190565b60208082526024908201527f546f6b656e52656d6f74653a207a65726f20726571756972656420676173206c6040820152631a5b5a5d60e21b606082015260800190565b5f808335601e1984360301811261488e575f80fd5b8301803591506001600160401b038211156148a7575f80fd5b602001915036819003821315613be5575f80fd5b60208152815160208201525f602083015160018060a01b0380821660408501528060408601511660608501525050606083015161490360808401826001600160a01b03169052565b50608083015160a083015260a08301516101008060c085015261492a610120850183613edb565b915060c085015160e085015260e085015161494f828601826001600160a01b03169052565b5090949350505050565b5f808335601e1984360301811261496e575f80fd5b83016020810192503590506001600160401b0381111561498c575f80fd5b803603821315613be5575f80fd5b81835281816020850137505f828201602090810191909152601f909101601f19169091010190565b60408152823560408201525f6149da60208501613f2c565b6001600160a01b031660608301526149f460408501613f2c565b6001600160a01b03166080830152614a0f6060850185614959565b6101608060a0860152614a276101a08601838561499a565b9250608087013560c086015260a087013560e0860152614a4960c08801613f2c565b9150610100614a62818701846001600160a01b03169052565b614a6e60e08901613f2c565b9250610120614a87818801856001600160a01b03169052565b614a92828a01613f2c565b93506101409150614aad828801856001600160a01b03169052565b880135918601919091529095013561018084015260209092019290925292915050565b60208152614aea6020820183516001600160a01b03169052565b602082015160408201525f6040830151614b0f60608401826001600160a01b03169052565b5060608301516001600160a01b038116608084015250608083015160a083015260a08301516101608060c0850152614b4b610180850183613edb565b915060c085015160e085015260e0850151610100614b73818701836001600160a01b03169052565b860151610120868101919091528601519050610140614b9c818701836001600160a01b03169052565b959095015193019290925250919050565b8235815261012081016020840135614bc481613f18565b6001600160a01b039081166020840152604085013590614be382613f18565b166040830152614bf560608501613f2c565b6001600160a01b0381166060840152506080840135608083015260a084013560a083015260c084013560c0830152614c2f60e08501613f2c565b6001600160a01b031660e083015261010090910191909152919050565b8481526001600160a01b038481166020830152831660408201526080606082018190525f9061310190830184613edb565b6020808252603a908201527f546f6b656e52656d6f74653a20696e76616c69642064657374696e6174696f6e60408201527f20746f6b656e207472616e736665727265722061646472657373000000000000606082015260800190565b601f82111561158f57805f5260205f20601f840160051c81016020851015614cff5750805b601f840160051c820191505b81811015611f92575f8155600101614d0b565b81516001600160401b03811115614d3757614d37614024565b614d4b81614d4584546142df565b84614cda565b602080601f831160018114614d7e575f8415614d675750858301515b5f19600386901b1c1916600185901b17855561126e565b5f85815260208120601f198616915b82811015614dac57888601518255948401946001909101908401614d8d565b5085821015614dc957878501515f19600388901b60f8161c191681555b5050505050600190811b01905550565b5f8251614dea818460208701613eb9565b9190910192915050565b5f60208284031215614e04575f80fd5b81518015158114610990575f80fd5b60ff82811682821603908111156108fa576108fa614311565b600181815b80851115614e6657815f1904821115614e4c57614e4c614311565b80851615614e5957918102915b93841c9390800290614e31565b509250929050565b5f82614e7c575060016108fa565b81614e8857505f6108fa565b8160018114614e9e5760028114614ea857614ec4565b60019150506108fa565b60ff841115614eb957614eb9614311565b50506001821b6108fa565b5060208310610133831016604e8410600b8410161715614ee7575081810a6108fa565b614ef18383614e2c565b805f1904821115614f0457614f04614311565b029392505050565b5f6109908383614e6e56fe52c63247e1f47db19d5ce0460030c497f067ca4cebf71ba98eeadabe20bace00d2f1ed38b7d242bfb8b41862afb813a15193219a4bc717f2056607593e6c750069a5f7616543528c4fbe43f410b1034bd6da4ba06c25bedf04617268014cf500de77a4dc7391f6f8f2d9567915d687d3aee79e7a1fc7300392f2727e9a0f1d00a2646970667358221220832c5ad6c5cb8b0b2ebe7f175a8b66d6f2f51bc1c706fc0f6cb38a09790f473d64736f6c63430008190033", +} + +// NativeTokenRemoteUpgradeableABI is the input ABI used to generate the binding from. +// Deprecated: Use NativeTokenRemoteUpgradeableMetaData.ABI instead. +var NativeTokenRemoteUpgradeableABI = NativeTokenRemoteUpgradeableMetaData.ABI + +// NativeTokenRemoteUpgradeableBin is the compiled bytecode used for deploying new contracts. +// Deprecated: Use NativeTokenRemoteUpgradeableMetaData.Bin instead. +var NativeTokenRemoteUpgradeableBin = NativeTokenRemoteUpgradeableMetaData.Bin + +// DeployNativeTokenRemoteUpgradeable deploys a new Ethereum contract, binding an instance of NativeTokenRemoteUpgradeable to it. +func DeployNativeTokenRemoteUpgradeable(auth *bind.TransactOpts, backend bind.ContractBackend, init uint8) (common.Address, *types.Transaction, *NativeTokenRemoteUpgradeable, error) { + parsed, err := NativeTokenRemoteUpgradeableMetaData.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(NativeTokenRemoteUpgradeableBin), backend, init) + if err != nil { + return common.Address{}, nil, nil, err + } + return address, tx, &NativeTokenRemoteUpgradeable{NativeTokenRemoteUpgradeableCaller: NativeTokenRemoteUpgradeableCaller{contract: contract}, NativeTokenRemoteUpgradeableTransactor: NativeTokenRemoteUpgradeableTransactor{contract: contract}, NativeTokenRemoteUpgradeableFilterer: NativeTokenRemoteUpgradeableFilterer{contract: contract}}, nil +} + +// NativeTokenRemoteUpgradeable is an auto generated Go binding around an Ethereum contract. +type NativeTokenRemoteUpgradeable struct { + NativeTokenRemoteUpgradeableCaller // Read-only binding to the contract + NativeTokenRemoteUpgradeableTransactor // Write-only binding to the contract + NativeTokenRemoteUpgradeableFilterer // Log filterer for contract events +} + +// NativeTokenRemoteUpgradeableCaller is an auto generated read-only Go binding around an Ethereum contract. +type NativeTokenRemoteUpgradeableCaller struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// NativeTokenRemoteUpgradeableTransactor is an auto generated write-only Go binding around an Ethereum contract. +type NativeTokenRemoteUpgradeableTransactor struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// NativeTokenRemoteUpgradeableFilterer is an auto generated log filtering Go binding around an Ethereum contract events. +type NativeTokenRemoteUpgradeableFilterer struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// NativeTokenRemoteUpgradeableSession is an auto generated Go binding around an Ethereum contract, +// with pre-set call and transact options. +type NativeTokenRemoteUpgradeableSession struct { + Contract *NativeTokenRemoteUpgradeable // 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 +} + +// NativeTokenRemoteUpgradeableCallerSession is an auto generated read-only Go binding around an Ethereum contract, +// with pre-set call options. +type NativeTokenRemoteUpgradeableCallerSession struct { + Contract *NativeTokenRemoteUpgradeableCaller // Generic contract caller binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session +} + +// NativeTokenRemoteUpgradeableTransactorSession is an auto generated write-only Go binding around an Ethereum contract, +// with pre-set transact options. +type NativeTokenRemoteUpgradeableTransactorSession struct { + Contract *NativeTokenRemoteUpgradeableTransactor // Generic contract transactor binding to set the session for + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// NativeTokenRemoteUpgradeableRaw is an auto generated low-level Go binding around an Ethereum contract. +type NativeTokenRemoteUpgradeableRaw struct { + Contract *NativeTokenRemoteUpgradeable // Generic contract binding to access the raw methods on +} + +// NativeTokenRemoteUpgradeableCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. +type NativeTokenRemoteUpgradeableCallerRaw struct { + Contract *NativeTokenRemoteUpgradeableCaller // Generic read-only contract binding to access the raw methods on +} + +// NativeTokenRemoteUpgradeableTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. +type NativeTokenRemoteUpgradeableTransactorRaw struct { + Contract *NativeTokenRemoteUpgradeableTransactor // Generic write-only contract binding to access the raw methods on +} + +// NewNativeTokenRemoteUpgradeable creates a new instance of NativeTokenRemoteUpgradeable, bound to a specific deployed contract. +func NewNativeTokenRemoteUpgradeable(address common.Address, backend bind.ContractBackend) (*NativeTokenRemoteUpgradeable, error) { + contract, err := bindNativeTokenRemoteUpgradeable(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &NativeTokenRemoteUpgradeable{NativeTokenRemoteUpgradeableCaller: NativeTokenRemoteUpgradeableCaller{contract: contract}, NativeTokenRemoteUpgradeableTransactor: NativeTokenRemoteUpgradeableTransactor{contract: contract}, NativeTokenRemoteUpgradeableFilterer: NativeTokenRemoteUpgradeableFilterer{contract: contract}}, nil +} + +// NewNativeTokenRemoteUpgradeableCaller creates a new read-only instance of NativeTokenRemoteUpgradeable, bound to a specific deployed contract. +func NewNativeTokenRemoteUpgradeableCaller(address common.Address, caller bind.ContractCaller) (*NativeTokenRemoteUpgradeableCaller, error) { + contract, err := bindNativeTokenRemoteUpgradeable(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &NativeTokenRemoteUpgradeableCaller{contract: contract}, nil +} + +// NewNativeTokenRemoteUpgradeableTransactor creates a new write-only instance of NativeTokenRemoteUpgradeable, bound to a specific deployed contract. +func NewNativeTokenRemoteUpgradeableTransactor(address common.Address, transactor bind.ContractTransactor) (*NativeTokenRemoteUpgradeableTransactor, error) { + contract, err := bindNativeTokenRemoteUpgradeable(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &NativeTokenRemoteUpgradeableTransactor{contract: contract}, nil +} + +// NewNativeTokenRemoteUpgradeableFilterer creates a new log filterer instance of NativeTokenRemoteUpgradeable, bound to a specific deployed contract. +func NewNativeTokenRemoteUpgradeableFilterer(address common.Address, filterer bind.ContractFilterer) (*NativeTokenRemoteUpgradeableFilterer, error) { + contract, err := bindNativeTokenRemoteUpgradeable(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &NativeTokenRemoteUpgradeableFilterer{contract: contract}, nil +} + +// bindNativeTokenRemoteUpgradeable binds a generic wrapper to an already deployed contract. +func bindNativeTokenRemoteUpgradeable(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := NativeTokenRemoteUpgradeableMetaData.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 (_NativeTokenRemoteUpgradeable *NativeTokenRemoteUpgradeableRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _NativeTokenRemoteUpgradeable.Contract.NativeTokenRemoteUpgradeableCaller.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 (_NativeTokenRemoteUpgradeable *NativeTokenRemoteUpgradeableRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _NativeTokenRemoteUpgradeable.Contract.NativeTokenRemoteUpgradeableTransactor.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_NativeTokenRemoteUpgradeable *NativeTokenRemoteUpgradeableRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _NativeTokenRemoteUpgradeable.Contract.NativeTokenRemoteUpgradeableTransactor.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 (_NativeTokenRemoteUpgradeable *NativeTokenRemoteUpgradeableCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _NativeTokenRemoteUpgradeable.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 (_NativeTokenRemoteUpgradeable *NativeTokenRemoteUpgradeableTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _NativeTokenRemoteUpgradeable.Contract.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_NativeTokenRemoteUpgradeable *NativeTokenRemoteUpgradeableTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _NativeTokenRemoteUpgradeable.Contract.contract.Transact(opts, method, params...) +} + +// BURNEDFORTRANSFERADDRESS is a free data retrieval call binding the contract method 0x347212c4. +// +// Solidity: function BURNED_FOR_TRANSFER_ADDRESS() view returns(address) +func (_NativeTokenRemoteUpgradeable *NativeTokenRemoteUpgradeableCaller) BURNEDFORTRANSFERADDRESS(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _NativeTokenRemoteUpgradeable.contract.Call(opts, &out, "BURNED_FOR_TRANSFER_ADDRESS") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// BURNEDFORTRANSFERADDRESS is a free data retrieval call binding the contract method 0x347212c4. +// +// Solidity: function BURNED_FOR_TRANSFER_ADDRESS() view returns(address) +func (_NativeTokenRemoteUpgradeable *NativeTokenRemoteUpgradeableSession) BURNEDFORTRANSFERADDRESS() (common.Address, error) { + return _NativeTokenRemoteUpgradeable.Contract.BURNEDFORTRANSFERADDRESS(&_NativeTokenRemoteUpgradeable.CallOpts) +} + +// BURNEDFORTRANSFERADDRESS is a free data retrieval call binding the contract method 0x347212c4. +// +// Solidity: function BURNED_FOR_TRANSFER_ADDRESS() view returns(address) +func (_NativeTokenRemoteUpgradeable *NativeTokenRemoteUpgradeableCallerSession) BURNEDFORTRANSFERADDRESS() (common.Address, error) { + return _NativeTokenRemoteUpgradeable.Contract.BURNEDFORTRANSFERADDRESS(&_NativeTokenRemoteUpgradeable.CallOpts) +} + +// BURNEDTXFEESADDRESS is a free data retrieval call binding the contract method 0xc452165e. +// +// Solidity: function BURNED_TX_FEES_ADDRESS() view returns(address) +func (_NativeTokenRemoteUpgradeable *NativeTokenRemoteUpgradeableCaller) BURNEDTXFEESADDRESS(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _NativeTokenRemoteUpgradeable.contract.Call(opts, &out, "BURNED_TX_FEES_ADDRESS") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// BURNEDTXFEESADDRESS is a free data retrieval call binding the contract method 0xc452165e. +// +// Solidity: function BURNED_TX_FEES_ADDRESS() view returns(address) +func (_NativeTokenRemoteUpgradeable *NativeTokenRemoteUpgradeableSession) BURNEDTXFEESADDRESS() (common.Address, error) { + return _NativeTokenRemoteUpgradeable.Contract.BURNEDTXFEESADDRESS(&_NativeTokenRemoteUpgradeable.CallOpts) +} + +// BURNEDTXFEESADDRESS is a free data retrieval call binding the contract method 0xc452165e. +// +// Solidity: function BURNED_TX_FEES_ADDRESS() view returns(address) +func (_NativeTokenRemoteUpgradeable *NativeTokenRemoteUpgradeableCallerSession) BURNEDTXFEESADDRESS() (common.Address, error) { + return _NativeTokenRemoteUpgradeable.Contract.BURNEDTXFEESADDRESS(&_NativeTokenRemoteUpgradeable.CallOpts) +} + +// HOMECHAINBURNADDRESS is a free data retrieval call binding the contract method 0xed0ae4b0. +// +// Solidity: function HOME_CHAIN_BURN_ADDRESS() view returns(address) +func (_NativeTokenRemoteUpgradeable *NativeTokenRemoteUpgradeableCaller) HOMECHAINBURNADDRESS(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _NativeTokenRemoteUpgradeable.contract.Call(opts, &out, "HOME_CHAIN_BURN_ADDRESS") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// HOMECHAINBURNADDRESS is a free data retrieval call binding the contract method 0xed0ae4b0. +// +// Solidity: function HOME_CHAIN_BURN_ADDRESS() view returns(address) +func (_NativeTokenRemoteUpgradeable *NativeTokenRemoteUpgradeableSession) HOMECHAINBURNADDRESS() (common.Address, error) { + return _NativeTokenRemoteUpgradeable.Contract.HOMECHAINBURNADDRESS(&_NativeTokenRemoteUpgradeable.CallOpts) +} + +// HOMECHAINBURNADDRESS is a free data retrieval call binding the contract method 0xed0ae4b0. +// +// Solidity: function HOME_CHAIN_BURN_ADDRESS() view returns(address) +func (_NativeTokenRemoteUpgradeable *NativeTokenRemoteUpgradeableCallerSession) HOMECHAINBURNADDRESS() (common.Address, error) { + return _NativeTokenRemoteUpgradeable.Contract.HOMECHAINBURNADDRESS(&_NativeTokenRemoteUpgradeable.CallOpts) +} + +// MULTIHOPCALLGASPERWORD is a free data retrieval call binding the contract method 0x15beb59f. +// +// Solidity: function MULTI_HOP_CALL_GAS_PER_WORD() view returns(uint256) +func (_NativeTokenRemoteUpgradeable *NativeTokenRemoteUpgradeableCaller) MULTIHOPCALLGASPERWORD(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _NativeTokenRemoteUpgradeable.contract.Call(opts, &out, "MULTI_HOP_CALL_GAS_PER_WORD") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// MULTIHOPCALLGASPERWORD is a free data retrieval call binding the contract method 0x15beb59f. +// +// Solidity: function MULTI_HOP_CALL_GAS_PER_WORD() view returns(uint256) +func (_NativeTokenRemoteUpgradeable *NativeTokenRemoteUpgradeableSession) MULTIHOPCALLGASPERWORD() (*big.Int, error) { + return _NativeTokenRemoteUpgradeable.Contract.MULTIHOPCALLGASPERWORD(&_NativeTokenRemoteUpgradeable.CallOpts) +} + +// MULTIHOPCALLGASPERWORD is a free data retrieval call binding the contract method 0x15beb59f. +// +// Solidity: function MULTI_HOP_CALL_GAS_PER_WORD() view returns(uint256) +func (_NativeTokenRemoteUpgradeable *NativeTokenRemoteUpgradeableCallerSession) MULTIHOPCALLGASPERWORD() (*big.Int, error) { + return _NativeTokenRemoteUpgradeable.Contract.MULTIHOPCALLGASPERWORD(&_NativeTokenRemoteUpgradeable.CallOpts) +} + +// MULTIHOPCALLREQUIREDGAS is a free data retrieval call binding the contract method 0x71717c18. +// +// Solidity: function MULTI_HOP_CALL_REQUIRED_GAS() view returns(uint256) +func (_NativeTokenRemoteUpgradeable *NativeTokenRemoteUpgradeableCaller) MULTIHOPCALLREQUIREDGAS(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _NativeTokenRemoteUpgradeable.contract.Call(opts, &out, "MULTI_HOP_CALL_REQUIRED_GAS") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// MULTIHOPCALLREQUIREDGAS is a free data retrieval call binding the contract method 0x71717c18. +// +// Solidity: function MULTI_HOP_CALL_REQUIRED_GAS() view returns(uint256) +func (_NativeTokenRemoteUpgradeable *NativeTokenRemoteUpgradeableSession) MULTIHOPCALLREQUIREDGAS() (*big.Int, error) { + return _NativeTokenRemoteUpgradeable.Contract.MULTIHOPCALLREQUIREDGAS(&_NativeTokenRemoteUpgradeable.CallOpts) +} + +// MULTIHOPCALLREQUIREDGAS is a free data retrieval call binding the contract method 0x71717c18. +// +// Solidity: function MULTI_HOP_CALL_REQUIRED_GAS() view returns(uint256) +func (_NativeTokenRemoteUpgradeable *NativeTokenRemoteUpgradeableCallerSession) MULTIHOPCALLREQUIREDGAS() (*big.Int, error) { + return _NativeTokenRemoteUpgradeable.Contract.MULTIHOPCALLREQUIREDGAS(&_NativeTokenRemoteUpgradeable.CallOpts) +} + +// MULTIHOPSENDREQUIREDGAS is a free data retrieval call binding the contract method 0x5507f3d1. +// +// Solidity: function MULTI_HOP_SEND_REQUIRED_GAS() view returns(uint256) +func (_NativeTokenRemoteUpgradeable *NativeTokenRemoteUpgradeableCaller) MULTIHOPSENDREQUIREDGAS(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _NativeTokenRemoteUpgradeable.contract.Call(opts, &out, "MULTI_HOP_SEND_REQUIRED_GAS") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// MULTIHOPSENDREQUIREDGAS is a free data retrieval call binding the contract method 0x5507f3d1. +// +// Solidity: function MULTI_HOP_SEND_REQUIRED_GAS() view returns(uint256) +func (_NativeTokenRemoteUpgradeable *NativeTokenRemoteUpgradeableSession) MULTIHOPSENDREQUIREDGAS() (*big.Int, error) { + return _NativeTokenRemoteUpgradeable.Contract.MULTIHOPSENDREQUIREDGAS(&_NativeTokenRemoteUpgradeable.CallOpts) +} + +// MULTIHOPSENDREQUIREDGAS is a free data retrieval call binding the contract method 0x5507f3d1. +// +// Solidity: function MULTI_HOP_SEND_REQUIRED_GAS() view returns(uint256) +func (_NativeTokenRemoteUpgradeable *NativeTokenRemoteUpgradeableCallerSession) MULTIHOPSENDREQUIREDGAS() (*big.Int, error) { + return _NativeTokenRemoteUpgradeable.Contract.MULTIHOPSENDREQUIREDGAS(&_NativeTokenRemoteUpgradeable.CallOpts) +} + +// NATIVEMINTER is a free data retrieval call binding the contract method 0x329c3e12. +// +// Solidity: function NATIVE_MINTER() view returns(address) +func (_NativeTokenRemoteUpgradeable *NativeTokenRemoteUpgradeableCaller) NATIVEMINTER(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _NativeTokenRemoteUpgradeable.contract.Call(opts, &out, "NATIVE_MINTER") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// NATIVEMINTER is a free data retrieval call binding the contract method 0x329c3e12. +// +// Solidity: function NATIVE_MINTER() view returns(address) +func (_NativeTokenRemoteUpgradeable *NativeTokenRemoteUpgradeableSession) NATIVEMINTER() (common.Address, error) { + return _NativeTokenRemoteUpgradeable.Contract.NATIVEMINTER(&_NativeTokenRemoteUpgradeable.CallOpts) +} + +// NATIVEMINTER is a free data retrieval call binding the contract method 0x329c3e12. +// +// Solidity: function NATIVE_MINTER() view returns(address) +func (_NativeTokenRemoteUpgradeable *NativeTokenRemoteUpgradeableCallerSession) NATIVEMINTER() (common.Address, error) { + return _NativeTokenRemoteUpgradeable.Contract.NATIVEMINTER(&_NativeTokenRemoteUpgradeable.CallOpts) +} + +// NATIVETOKENREMOTESTORAGELOCATION is a free data retrieval call binding the contract method 0xa5717bc0. +// +// Solidity: function NATIVE_TOKEN_REMOTE_STORAGE_LOCATION() view returns(bytes32) +func (_NativeTokenRemoteUpgradeable *NativeTokenRemoteUpgradeableCaller) NATIVETOKENREMOTESTORAGELOCATION(opts *bind.CallOpts) ([32]byte, error) { + var out []interface{} + err := _NativeTokenRemoteUpgradeable.contract.Call(opts, &out, "NATIVE_TOKEN_REMOTE_STORAGE_LOCATION") + + if err != nil { + return *new([32]byte), err + } + + out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) + + return out0, err + +} + +// NATIVETOKENREMOTESTORAGELOCATION is a free data retrieval call binding the contract method 0xa5717bc0. +// +// Solidity: function NATIVE_TOKEN_REMOTE_STORAGE_LOCATION() view returns(bytes32) +func (_NativeTokenRemoteUpgradeable *NativeTokenRemoteUpgradeableSession) NATIVETOKENREMOTESTORAGELOCATION() ([32]byte, error) { + return _NativeTokenRemoteUpgradeable.Contract.NATIVETOKENREMOTESTORAGELOCATION(&_NativeTokenRemoteUpgradeable.CallOpts) +} + +// NATIVETOKENREMOTESTORAGELOCATION is a free data retrieval call binding the contract method 0xa5717bc0. +// +// Solidity: function NATIVE_TOKEN_REMOTE_STORAGE_LOCATION() view returns(bytes32) +func (_NativeTokenRemoteUpgradeable *NativeTokenRemoteUpgradeableCallerSession) NATIVETOKENREMOTESTORAGELOCATION() ([32]byte, error) { + return _NativeTokenRemoteUpgradeable.Contract.NATIVETOKENREMOTESTORAGELOCATION(&_NativeTokenRemoteUpgradeable.CallOpts) +} + +// REGISTERREMOTEREQUIREDGAS is a free data retrieval call binding the contract method 0x254ac160. +// +// Solidity: function REGISTER_REMOTE_REQUIRED_GAS() view returns(uint256) +func (_NativeTokenRemoteUpgradeable *NativeTokenRemoteUpgradeableCaller) REGISTERREMOTEREQUIREDGAS(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _NativeTokenRemoteUpgradeable.contract.Call(opts, &out, "REGISTER_REMOTE_REQUIRED_GAS") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// REGISTERREMOTEREQUIREDGAS is a free data retrieval call binding the contract method 0x254ac160. +// +// Solidity: function REGISTER_REMOTE_REQUIRED_GAS() view returns(uint256) +func (_NativeTokenRemoteUpgradeable *NativeTokenRemoteUpgradeableSession) REGISTERREMOTEREQUIREDGAS() (*big.Int, error) { + return _NativeTokenRemoteUpgradeable.Contract.REGISTERREMOTEREQUIREDGAS(&_NativeTokenRemoteUpgradeable.CallOpts) +} + +// REGISTERREMOTEREQUIREDGAS is a free data retrieval call binding the contract method 0x254ac160. +// +// Solidity: function REGISTER_REMOTE_REQUIRED_GAS() view returns(uint256) +func (_NativeTokenRemoteUpgradeable *NativeTokenRemoteUpgradeableCallerSession) REGISTERREMOTEREQUIREDGAS() (*big.Int, error) { + return _NativeTokenRemoteUpgradeable.Contract.REGISTERREMOTEREQUIREDGAS(&_NativeTokenRemoteUpgradeable.CallOpts) +} + +// TELEPORTERREGISTRYAPPSTORAGELOCATION is a free data retrieval call binding the contract method 0x909a6ac0. +// +// Solidity: function TELEPORTER_REGISTRY_APP_STORAGE_LOCATION() view returns(bytes32) +func (_NativeTokenRemoteUpgradeable *NativeTokenRemoteUpgradeableCaller) TELEPORTERREGISTRYAPPSTORAGELOCATION(opts *bind.CallOpts) ([32]byte, error) { + var out []interface{} + err := _NativeTokenRemoteUpgradeable.contract.Call(opts, &out, "TELEPORTER_REGISTRY_APP_STORAGE_LOCATION") + + if err != nil { + return *new([32]byte), err + } + + out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) + + return out0, err + +} + +// TELEPORTERREGISTRYAPPSTORAGELOCATION is a free data retrieval call binding the contract method 0x909a6ac0. +// +// Solidity: function TELEPORTER_REGISTRY_APP_STORAGE_LOCATION() view returns(bytes32) +func (_NativeTokenRemoteUpgradeable *NativeTokenRemoteUpgradeableSession) TELEPORTERREGISTRYAPPSTORAGELOCATION() ([32]byte, error) { + return _NativeTokenRemoteUpgradeable.Contract.TELEPORTERREGISTRYAPPSTORAGELOCATION(&_NativeTokenRemoteUpgradeable.CallOpts) +} + +// TELEPORTERREGISTRYAPPSTORAGELOCATION is a free data retrieval call binding the contract method 0x909a6ac0. +// +// Solidity: function TELEPORTER_REGISTRY_APP_STORAGE_LOCATION() view returns(bytes32) +func (_NativeTokenRemoteUpgradeable *NativeTokenRemoteUpgradeableCallerSession) TELEPORTERREGISTRYAPPSTORAGELOCATION() ([32]byte, error) { + return _NativeTokenRemoteUpgradeable.Contract.TELEPORTERREGISTRYAPPSTORAGELOCATION(&_NativeTokenRemoteUpgradeable.CallOpts) +} + +// TOKENREMOTESTORAGELOCATION is a free data retrieval call binding the contract method 0x35cac159. +// +// Solidity: function TOKEN_REMOTE_STORAGE_LOCATION() view returns(bytes32) +func (_NativeTokenRemoteUpgradeable *NativeTokenRemoteUpgradeableCaller) TOKENREMOTESTORAGELOCATION(opts *bind.CallOpts) ([32]byte, error) { + var out []interface{} + err := _NativeTokenRemoteUpgradeable.contract.Call(opts, &out, "TOKEN_REMOTE_STORAGE_LOCATION") + + if err != nil { + return *new([32]byte), err + } + + out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) + + return out0, err + +} + +// TOKENREMOTESTORAGELOCATION is a free data retrieval call binding the contract method 0x35cac159. +// +// Solidity: function TOKEN_REMOTE_STORAGE_LOCATION() view returns(bytes32) +func (_NativeTokenRemoteUpgradeable *NativeTokenRemoteUpgradeableSession) TOKENREMOTESTORAGELOCATION() ([32]byte, error) { + return _NativeTokenRemoteUpgradeable.Contract.TOKENREMOTESTORAGELOCATION(&_NativeTokenRemoteUpgradeable.CallOpts) +} + +// TOKENREMOTESTORAGELOCATION is a free data retrieval call binding the contract method 0x35cac159. +// +// Solidity: function TOKEN_REMOTE_STORAGE_LOCATION() view returns(bytes32) +func (_NativeTokenRemoteUpgradeable *NativeTokenRemoteUpgradeableCallerSession) TOKENREMOTESTORAGELOCATION() ([32]byte, error) { + return _NativeTokenRemoteUpgradeable.Contract.TOKENREMOTESTORAGELOCATION(&_NativeTokenRemoteUpgradeable.CallOpts) +} + +// Allowance is a free data retrieval call binding the contract method 0xdd62ed3e. +// +// Solidity: function allowance(address owner, address spender) view returns(uint256) +func (_NativeTokenRemoteUpgradeable *NativeTokenRemoteUpgradeableCaller) Allowance(opts *bind.CallOpts, owner common.Address, spender common.Address) (*big.Int, error) { + var out []interface{} + err := _NativeTokenRemoteUpgradeable.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 (_NativeTokenRemoteUpgradeable *NativeTokenRemoteUpgradeableSession) Allowance(owner common.Address, spender common.Address) (*big.Int, error) { + return _NativeTokenRemoteUpgradeable.Contract.Allowance(&_NativeTokenRemoteUpgradeable.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 (_NativeTokenRemoteUpgradeable *NativeTokenRemoteUpgradeableCallerSession) Allowance(owner common.Address, spender common.Address) (*big.Int, error) { + return _NativeTokenRemoteUpgradeable.Contract.Allowance(&_NativeTokenRemoteUpgradeable.CallOpts, owner, spender) +} + +// BalanceOf is a free data retrieval call binding the contract method 0x70a08231. +// +// Solidity: function balanceOf(address account) view returns(uint256) +func (_NativeTokenRemoteUpgradeable *NativeTokenRemoteUpgradeableCaller) BalanceOf(opts *bind.CallOpts, account common.Address) (*big.Int, error) { + var out []interface{} + err := _NativeTokenRemoteUpgradeable.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 (_NativeTokenRemoteUpgradeable *NativeTokenRemoteUpgradeableSession) BalanceOf(account common.Address) (*big.Int, error) { + return _NativeTokenRemoteUpgradeable.Contract.BalanceOf(&_NativeTokenRemoteUpgradeable.CallOpts, account) +} + +// BalanceOf is a free data retrieval call binding the contract method 0x70a08231. +// +// Solidity: function balanceOf(address account) view returns(uint256) +func (_NativeTokenRemoteUpgradeable *NativeTokenRemoteUpgradeableCallerSession) BalanceOf(account common.Address) (*big.Int, error) { + return _NativeTokenRemoteUpgradeable.Contract.BalanceOf(&_NativeTokenRemoteUpgradeable.CallOpts, account) +} + +// CalculateNumWords is a free data retrieval call binding the contract method 0xf3f981d8. +// +// Solidity: function calculateNumWords(uint256 payloadSize) pure returns(uint256) +func (_NativeTokenRemoteUpgradeable *NativeTokenRemoteUpgradeableCaller) CalculateNumWords(opts *bind.CallOpts, payloadSize *big.Int) (*big.Int, error) { + var out []interface{} + err := _NativeTokenRemoteUpgradeable.contract.Call(opts, &out, "calculateNumWords", payloadSize) + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// CalculateNumWords is a free data retrieval call binding the contract method 0xf3f981d8. +// +// Solidity: function calculateNumWords(uint256 payloadSize) pure returns(uint256) +func (_NativeTokenRemoteUpgradeable *NativeTokenRemoteUpgradeableSession) CalculateNumWords(payloadSize *big.Int) (*big.Int, error) { + return _NativeTokenRemoteUpgradeable.Contract.CalculateNumWords(&_NativeTokenRemoteUpgradeable.CallOpts, payloadSize) +} + +// CalculateNumWords is a free data retrieval call binding the contract method 0xf3f981d8. +// +// Solidity: function calculateNumWords(uint256 payloadSize) pure returns(uint256) +func (_NativeTokenRemoteUpgradeable *NativeTokenRemoteUpgradeableCallerSession) CalculateNumWords(payloadSize *big.Int) (*big.Int, error) { + return _NativeTokenRemoteUpgradeable.Contract.CalculateNumWords(&_NativeTokenRemoteUpgradeable.CallOpts, payloadSize) +} + +// Decimals is a free data retrieval call binding the contract method 0x313ce567. +// +// Solidity: function decimals() view returns(uint8) +func (_NativeTokenRemoteUpgradeable *NativeTokenRemoteUpgradeableCaller) Decimals(opts *bind.CallOpts) (uint8, error) { + var out []interface{} + err := _NativeTokenRemoteUpgradeable.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 (_NativeTokenRemoteUpgradeable *NativeTokenRemoteUpgradeableSession) Decimals() (uint8, error) { + return _NativeTokenRemoteUpgradeable.Contract.Decimals(&_NativeTokenRemoteUpgradeable.CallOpts) +} + +// Decimals is a free data retrieval call binding the contract method 0x313ce567. +// +// Solidity: function decimals() view returns(uint8) +func (_NativeTokenRemoteUpgradeable *NativeTokenRemoteUpgradeableCallerSession) Decimals() (uint8, error) { + return _NativeTokenRemoteUpgradeable.Contract.Decimals(&_NativeTokenRemoteUpgradeable.CallOpts) +} + +// GetBlockchainID is a free data retrieval call binding the contract method 0x4213cf78. +// +// Solidity: function getBlockchainID() view returns(bytes32) +func (_NativeTokenRemoteUpgradeable *NativeTokenRemoteUpgradeableCaller) GetBlockchainID(opts *bind.CallOpts) ([32]byte, error) { + var out []interface{} + err := _NativeTokenRemoteUpgradeable.contract.Call(opts, &out, "getBlockchainID") + + if err != nil { + return *new([32]byte), err + } + + out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) + + return out0, err + +} + +// GetBlockchainID is a free data retrieval call binding the contract method 0x4213cf78. +// +// Solidity: function getBlockchainID() view returns(bytes32) +func (_NativeTokenRemoteUpgradeable *NativeTokenRemoteUpgradeableSession) GetBlockchainID() ([32]byte, error) { + return _NativeTokenRemoteUpgradeable.Contract.GetBlockchainID(&_NativeTokenRemoteUpgradeable.CallOpts) +} + +// GetBlockchainID is a free data retrieval call binding the contract method 0x4213cf78. +// +// Solidity: function getBlockchainID() view returns(bytes32) +func (_NativeTokenRemoteUpgradeable *NativeTokenRemoteUpgradeableCallerSession) GetBlockchainID() ([32]byte, error) { + return _NativeTokenRemoteUpgradeable.Contract.GetBlockchainID(&_NativeTokenRemoteUpgradeable.CallOpts) +} + +// GetInitialReserveImbalance is a free data retrieval call binding the contract method 0xef793e2a. +// +// Solidity: function getInitialReserveImbalance() view returns(uint256) +func (_NativeTokenRemoteUpgradeable *NativeTokenRemoteUpgradeableCaller) GetInitialReserveImbalance(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _NativeTokenRemoteUpgradeable.contract.Call(opts, &out, "getInitialReserveImbalance") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// GetInitialReserveImbalance is a free data retrieval call binding the contract method 0xef793e2a. +// +// Solidity: function getInitialReserveImbalance() view returns(uint256) +func (_NativeTokenRemoteUpgradeable *NativeTokenRemoteUpgradeableSession) GetInitialReserveImbalance() (*big.Int, error) { + return _NativeTokenRemoteUpgradeable.Contract.GetInitialReserveImbalance(&_NativeTokenRemoteUpgradeable.CallOpts) +} + +// GetInitialReserveImbalance is a free data retrieval call binding the contract method 0xef793e2a. +// +// Solidity: function getInitialReserveImbalance() view returns(uint256) +func (_NativeTokenRemoteUpgradeable *NativeTokenRemoteUpgradeableCallerSession) GetInitialReserveImbalance() (*big.Int, error) { + return _NativeTokenRemoteUpgradeable.Contract.GetInitialReserveImbalance(&_NativeTokenRemoteUpgradeable.CallOpts) +} + +// GetIsCollateralized is a free data retrieval call binding the contract method 0x02a30c7d. +// +// Solidity: function getIsCollateralized() view returns(bool) +func (_NativeTokenRemoteUpgradeable *NativeTokenRemoteUpgradeableCaller) GetIsCollateralized(opts *bind.CallOpts) (bool, error) { + var out []interface{} + err := _NativeTokenRemoteUpgradeable.contract.Call(opts, &out, "getIsCollateralized") + + if err != nil { + return *new(bool), err + } + + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + + return out0, err + +} + +// GetIsCollateralized is a free data retrieval call binding the contract method 0x02a30c7d. +// +// Solidity: function getIsCollateralized() view returns(bool) +func (_NativeTokenRemoteUpgradeable *NativeTokenRemoteUpgradeableSession) GetIsCollateralized() (bool, error) { + return _NativeTokenRemoteUpgradeable.Contract.GetIsCollateralized(&_NativeTokenRemoteUpgradeable.CallOpts) +} + +// GetIsCollateralized is a free data retrieval call binding the contract method 0x02a30c7d. +// +// Solidity: function getIsCollateralized() view returns(bool) +func (_NativeTokenRemoteUpgradeable *NativeTokenRemoteUpgradeableCallerSession) GetIsCollateralized() (bool, error) { + return _NativeTokenRemoteUpgradeable.Contract.GetIsCollateralized(&_NativeTokenRemoteUpgradeable.CallOpts) +} + +// GetMinTeleporterVersion is a free data retrieval call binding the contract method 0xd2cc7a70. +// +// Solidity: function getMinTeleporterVersion() view returns(uint256) +func (_NativeTokenRemoteUpgradeable *NativeTokenRemoteUpgradeableCaller) GetMinTeleporterVersion(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _NativeTokenRemoteUpgradeable.contract.Call(opts, &out, "getMinTeleporterVersion") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// GetMinTeleporterVersion is a free data retrieval call binding the contract method 0xd2cc7a70. +// +// Solidity: function getMinTeleporterVersion() view returns(uint256) +func (_NativeTokenRemoteUpgradeable *NativeTokenRemoteUpgradeableSession) GetMinTeleporterVersion() (*big.Int, error) { + return _NativeTokenRemoteUpgradeable.Contract.GetMinTeleporterVersion(&_NativeTokenRemoteUpgradeable.CallOpts) +} + +// GetMinTeleporterVersion is a free data retrieval call binding the contract method 0xd2cc7a70. +// +// Solidity: function getMinTeleporterVersion() view returns(uint256) +func (_NativeTokenRemoteUpgradeable *NativeTokenRemoteUpgradeableCallerSession) GetMinTeleporterVersion() (*big.Int, error) { + return _NativeTokenRemoteUpgradeable.Contract.GetMinTeleporterVersion(&_NativeTokenRemoteUpgradeable.CallOpts) +} + +// GetMultiplyOnRemote is a free data retrieval call binding the contract method 0x7ee3779a. +// +// Solidity: function getMultiplyOnRemote() view returns(bool) +func (_NativeTokenRemoteUpgradeable *NativeTokenRemoteUpgradeableCaller) GetMultiplyOnRemote(opts *bind.CallOpts) (bool, error) { + var out []interface{} + err := _NativeTokenRemoteUpgradeable.contract.Call(opts, &out, "getMultiplyOnRemote") + + if err != nil { + return *new(bool), err + } + + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + + return out0, err + +} + +// GetMultiplyOnRemote is a free data retrieval call binding the contract method 0x7ee3779a. +// +// Solidity: function getMultiplyOnRemote() view returns(bool) +func (_NativeTokenRemoteUpgradeable *NativeTokenRemoteUpgradeableSession) GetMultiplyOnRemote() (bool, error) { + return _NativeTokenRemoteUpgradeable.Contract.GetMultiplyOnRemote(&_NativeTokenRemoteUpgradeable.CallOpts) +} + +// GetMultiplyOnRemote is a free data retrieval call binding the contract method 0x7ee3779a. +// +// Solidity: function getMultiplyOnRemote() view returns(bool) +func (_NativeTokenRemoteUpgradeable *NativeTokenRemoteUpgradeableCallerSession) GetMultiplyOnRemote() (bool, error) { + return _NativeTokenRemoteUpgradeable.Contract.GetMultiplyOnRemote(&_NativeTokenRemoteUpgradeable.CallOpts) +} + +// GetTokenHomeAddress is a free data retrieval call binding the contract method 0xc3cd6927. +// +// Solidity: function getTokenHomeAddress() view returns(address) +func (_NativeTokenRemoteUpgradeable *NativeTokenRemoteUpgradeableCaller) GetTokenHomeAddress(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _NativeTokenRemoteUpgradeable.contract.Call(opts, &out, "getTokenHomeAddress") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// GetTokenHomeAddress is a free data retrieval call binding the contract method 0xc3cd6927. +// +// Solidity: function getTokenHomeAddress() view returns(address) +func (_NativeTokenRemoteUpgradeable *NativeTokenRemoteUpgradeableSession) GetTokenHomeAddress() (common.Address, error) { + return _NativeTokenRemoteUpgradeable.Contract.GetTokenHomeAddress(&_NativeTokenRemoteUpgradeable.CallOpts) +} + +// GetTokenHomeAddress is a free data retrieval call binding the contract method 0xc3cd6927. +// +// Solidity: function getTokenHomeAddress() view returns(address) +func (_NativeTokenRemoteUpgradeable *NativeTokenRemoteUpgradeableCallerSession) GetTokenHomeAddress() (common.Address, error) { + return _NativeTokenRemoteUpgradeable.Contract.GetTokenHomeAddress(&_NativeTokenRemoteUpgradeable.CallOpts) +} + +// GetTokenHomeBlockchainID is a free data retrieval call binding the contract method 0xe0fd9cb8. +// +// Solidity: function getTokenHomeBlockchainID() view returns(bytes32) +func (_NativeTokenRemoteUpgradeable *NativeTokenRemoteUpgradeableCaller) GetTokenHomeBlockchainID(opts *bind.CallOpts) ([32]byte, error) { + var out []interface{} + err := _NativeTokenRemoteUpgradeable.contract.Call(opts, &out, "getTokenHomeBlockchainID") + + if err != nil { + return *new([32]byte), err + } + + out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) + + return out0, err + +} + +// GetTokenHomeBlockchainID is a free data retrieval call binding the contract method 0xe0fd9cb8. +// +// Solidity: function getTokenHomeBlockchainID() view returns(bytes32) +func (_NativeTokenRemoteUpgradeable *NativeTokenRemoteUpgradeableSession) GetTokenHomeBlockchainID() ([32]byte, error) { + return _NativeTokenRemoteUpgradeable.Contract.GetTokenHomeBlockchainID(&_NativeTokenRemoteUpgradeable.CallOpts) +} + +// GetTokenHomeBlockchainID is a free data retrieval call binding the contract method 0xe0fd9cb8. +// +// Solidity: function getTokenHomeBlockchainID() view returns(bytes32) +func (_NativeTokenRemoteUpgradeable *NativeTokenRemoteUpgradeableCallerSession) GetTokenHomeBlockchainID() ([32]byte, error) { + return _NativeTokenRemoteUpgradeable.Contract.GetTokenHomeBlockchainID(&_NativeTokenRemoteUpgradeable.CallOpts) +} + +// GetTokenMultiplier is a free data retrieval call binding the contract method 0x0733c8c8. +// +// Solidity: function getTokenMultiplier() view returns(uint256) +func (_NativeTokenRemoteUpgradeable *NativeTokenRemoteUpgradeableCaller) GetTokenMultiplier(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _NativeTokenRemoteUpgradeable.contract.Call(opts, &out, "getTokenMultiplier") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// GetTokenMultiplier is a free data retrieval call binding the contract method 0x0733c8c8. +// +// Solidity: function getTokenMultiplier() view returns(uint256) +func (_NativeTokenRemoteUpgradeable *NativeTokenRemoteUpgradeableSession) GetTokenMultiplier() (*big.Int, error) { + return _NativeTokenRemoteUpgradeable.Contract.GetTokenMultiplier(&_NativeTokenRemoteUpgradeable.CallOpts) +} + +// GetTokenMultiplier is a free data retrieval call binding the contract method 0x0733c8c8. +// +// Solidity: function getTokenMultiplier() view returns(uint256) +func (_NativeTokenRemoteUpgradeable *NativeTokenRemoteUpgradeableCallerSession) GetTokenMultiplier() (*big.Int, error) { + return _NativeTokenRemoteUpgradeable.Contract.GetTokenMultiplier(&_NativeTokenRemoteUpgradeable.CallOpts) +} + +// GetTotalMinted is a free data retrieval call binding the contract method 0x0ca1c5c9. +// +// Solidity: function getTotalMinted() view returns(uint256) +func (_NativeTokenRemoteUpgradeable *NativeTokenRemoteUpgradeableCaller) GetTotalMinted(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _NativeTokenRemoteUpgradeable.contract.Call(opts, &out, "getTotalMinted") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// GetTotalMinted is a free data retrieval call binding the contract method 0x0ca1c5c9. +// +// Solidity: function getTotalMinted() view returns(uint256) +func (_NativeTokenRemoteUpgradeable *NativeTokenRemoteUpgradeableSession) GetTotalMinted() (*big.Int, error) { + return _NativeTokenRemoteUpgradeable.Contract.GetTotalMinted(&_NativeTokenRemoteUpgradeable.CallOpts) +} + +// GetTotalMinted is a free data retrieval call binding the contract method 0x0ca1c5c9. +// +// Solidity: function getTotalMinted() view returns(uint256) +func (_NativeTokenRemoteUpgradeable *NativeTokenRemoteUpgradeableCallerSession) GetTotalMinted() (*big.Int, error) { + return _NativeTokenRemoteUpgradeable.Contract.GetTotalMinted(&_NativeTokenRemoteUpgradeable.CallOpts) +} + +// IsTeleporterAddressPaused is a free data retrieval call binding the contract method 0x97314297. +// +// Solidity: function isTeleporterAddressPaused(address teleporterAddress) view returns(bool) +func (_NativeTokenRemoteUpgradeable *NativeTokenRemoteUpgradeableCaller) IsTeleporterAddressPaused(opts *bind.CallOpts, teleporterAddress common.Address) (bool, error) { + var out []interface{} + err := _NativeTokenRemoteUpgradeable.contract.Call(opts, &out, "isTeleporterAddressPaused", teleporterAddress) + + if err != nil { + return *new(bool), err + } + + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + + return out0, err + +} + +// IsTeleporterAddressPaused is a free data retrieval call binding the contract method 0x97314297. +// +// Solidity: function isTeleporterAddressPaused(address teleporterAddress) view returns(bool) +func (_NativeTokenRemoteUpgradeable *NativeTokenRemoteUpgradeableSession) IsTeleporterAddressPaused(teleporterAddress common.Address) (bool, error) { + return _NativeTokenRemoteUpgradeable.Contract.IsTeleporterAddressPaused(&_NativeTokenRemoteUpgradeable.CallOpts, teleporterAddress) +} + +// IsTeleporterAddressPaused is a free data retrieval call binding the contract method 0x97314297. +// +// Solidity: function isTeleporterAddressPaused(address teleporterAddress) view returns(bool) +func (_NativeTokenRemoteUpgradeable *NativeTokenRemoteUpgradeableCallerSession) IsTeleporterAddressPaused(teleporterAddress common.Address) (bool, error) { + return _NativeTokenRemoteUpgradeable.Contract.IsTeleporterAddressPaused(&_NativeTokenRemoteUpgradeable.CallOpts, teleporterAddress) +} + +// Name is a free data retrieval call binding the contract method 0x06fdde03. +// +// Solidity: function name() view returns(string) +func (_NativeTokenRemoteUpgradeable *NativeTokenRemoteUpgradeableCaller) Name(opts *bind.CallOpts) (string, error) { + var out []interface{} + err := _NativeTokenRemoteUpgradeable.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 (_NativeTokenRemoteUpgradeable *NativeTokenRemoteUpgradeableSession) Name() (string, error) { + return _NativeTokenRemoteUpgradeable.Contract.Name(&_NativeTokenRemoteUpgradeable.CallOpts) +} + +// Name is a free data retrieval call binding the contract method 0x06fdde03. +// +// Solidity: function name() view returns(string) +func (_NativeTokenRemoteUpgradeable *NativeTokenRemoteUpgradeableCallerSession) Name() (string, error) { + return _NativeTokenRemoteUpgradeable.Contract.Name(&_NativeTokenRemoteUpgradeable.CallOpts) +} + +// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. +// +// Solidity: function owner() view returns(address) +func (_NativeTokenRemoteUpgradeable *NativeTokenRemoteUpgradeableCaller) Owner(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _NativeTokenRemoteUpgradeable.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 (_NativeTokenRemoteUpgradeable *NativeTokenRemoteUpgradeableSession) Owner() (common.Address, error) { + return _NativeTokenRemoteUpgradeable.Contract.Owner(&_NativeTokenRemoteUpgradeable.CallOpts) +} + +// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. +// +// Solidity: function owner() view returns(address) +func (_NativeTokenRemoteUpgradeable *NativeTokenRemoteUpgradeableCallerSession) Owner() (common.Address, error) { + return _NativeTokenRemoteUpgradeable.Contract.Owner(&_NativeTokenRemoteUpgradeable.CallOpts) +} + +// Symbol is a free data retrieval call binding the contract method 0x95d89b41. +// +// Solidity: function symbol() view returns(string) +func (_NativeTokenRemoteUpgradeable *NativeTokenRemoteUpgradeableCaller) Symbol(opts *bind.CallOpts) (string, error) { + var out []interface{} + err := _NativeTokenRemoteUpgradeable.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 (_NativeTokenRemoteUpgradeable *NativeTokenRemoteUpgradeableSession) Symbol() (string, error) { + return _NativeTokenRemoteUpgradeable.Contract.Symbol(&_NativeTokenRemoteUpgradeable.CallOpts) +} + +// Symbol is a free data retrieval call binding the contract method 0x95d89b41. +// +// Solidity: function symbol() view returns(string) +func (_NativeTokenRemoteUpgradeable *NativeTokenRemoteUpgradeableCallerSession) Symbol() (string, error) { + return _NativeTokenRemoteUpgradeable.Contract.Symbol(&_NativeTokenRemoteUpgradeable.CallOpts) +} + +// TotalNativeAssetSupply is a free data retrieval call binding the contract method 0x1906529c. +// +// Solidity: function totalNativeAssetSupply() view returns(uint256) +func (_NativeTokenRemoteUpgradeable *NativeTokenRemoteUpgradeableCaller) TotalNativeAssetSupply(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _NativeTokenRemoteUpgradeable.contract.Call(opts, &out, "totalNativeAssetSupply") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// TotalNativeAssetSupply is a free data retrieval call binding the contract method 0x1906529c. +// +// Solidity: function totalNativeAssetSupply() view returns(uint256) +func (_NativeTokenRemoteUpgradeable *NativeTokenRemoteUpgradeableSession) TotalNativeAssetSupply() (*big.Int, error) { + return _NativeTokenRemoteUpgradeable.Contract.TotalNativeAssetSupply(&_NativeTokenRemoteUpgradeable.CallOpts) +} + +// TotalNativeAssetSupply is a free data retrieval call binding the contract method 0x1906529c. +// +// Solidity: function totalNativeAssetSupply() view returns(uint256) +func (_NativeTokenRemoteUpgradeable *NativeTokenRemoteUpgradeableCallerSession) TotalNativeAssetSupply() (*big.Int, error) { + return _NativeTokenRemoteUpgradeable.Contract.TotalNativeAssetSupply(&_NativeTokenRemoteUpgradeable.CallOpts) +} + +// TotalSupply is a free data retrieval call binding the contract method 0x18160ddd. +// +// Solidity: function totalSupply() view returns(uint256) +func (_NativeTokenRemoteUpgradeable *NativeTokenRemoteUpgradeableCaller) TotalSupply(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _NativeTokenRemoteUpgradeable.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 (_NativeTokenRemoteUpgradeable *NativeTokenRemoteUpgradeableSession) TotalSupply() (*big.Int, error) { + return _NativeTokenRemoteUpgradeable.Contract.TotalSupply(&_NativeTokenRemoteUpgradeable.CallOpts) +} + +// TotalSupply is a free data retrieval call binding the contract method 0x18160ddd. +// +// Solidity: function totalSupply() view returns(uint256) +func (_NativeTokenRemoteUpgradeable *NativeTokenRemoteUpgradeableCallerSession) TotalSupply() (*big.Int, error) { + return _NativeTokenRemoteUpgradeable.Contract.TotalSupply(&_NativeTokenRemoteUpgradeable.CallOpts) +} + +// Approve is a paid mutator transaction binding the contract method 0x095ea7b3. +// +// Solidity: function approve(address spender, uint256 value) returns(bool) +func (_NativeTokenRemoteUpgradeable *NativeTokenRemoteUpgradeableTransactor) Approve(opts *bind.TransactOpts, spender common.Address, value *big.Int) (*types.Transaction, error) { + return _NativeTokenRemoteUpgradeable.contract.Transact(opts, "approve", spender, value) +} + +// Approve is a paid mutator transaction binding the contract method 0x095ea7b3. +// +// Solidity: function approve(address spender, uint256 value) returns(bool) +func (_NativeTokenRemoteUpgradeable *NativeTokenRemoteUpgradeableSession) Approve(spender common.Address, value *big.Int) (*types.Transaction, error) { + return _NativeTokenRemoteUpgradeable.Contract.Approve(&_NativeTokenRemoteUpgradeable.TransactOpts, spender, value) +} + +// Approve is a paid mutator transaction binding the contract method 0x095ea7b3. +// +// Solidity: function approve(address spender, uint256 value) returns(bool) +func (_NativeTokenRemoteUpgradeable *NativeTokenRemoteUpgradeableTransactorSession) Approve(spender common.Address, value *big.Int) (*types.Transaction, error) { + return _NativeTokenRemoteUpgradeable.Contract.Approve(&_NativeTokenRemoteUpgradeable.TransactOpts, spender, value) +} + +// Deposit is a paid mutator transaction binding the contract method 0xd0e30db0. +// +// Solidity: function deposit() payable returns() +func (_NativeTokenRemoteUpgradeable *NativeTokenRemoteUpgradeableTransactor) Deposit(opts *bind.TransactOpts) (*types.Transaction, error) { + return _NativeTokenRemoteUpgradeable.contract.Transact(opts, "deposit") +} + +// Deposit is a paid mutator transaction binding the contract method 0xd0e30db0. +// +// Solidity: function deposit() payable returns() +func (_NativeTokenRemoteUpgradeable *NativeTokenRemoteUpgradeableSession) Deposit() (*types.Transaction, error) { + return _NativeTokenRemoteUpgradeable.Contract.Deposit(&_NativeTokenRemoteUpgradeable.TransactOpts) +} + +// Deposit is a paid mutator transaction binding the contract method 0xd0e30db0. +// +// Solidity: function deposit() payable returns() +func (_NativeTokenRemoteUpgradeable *NativeTokenRemoteUpgradeableTransactorSession) Deposit() (*types.Transaction, error) { + return _NativeTokenRemoteUpgradeable.Contract.Deposit(&_NativeTokenRemoteUpgradeable.TransactOpts) +} + +// Initialize is a paid mutator transaction binding the contract method 0x8f6cec88. +// +// Solidity: function initialize((address,address,uint256,bytes32,address,uint8) settings, string nativeAssetSymbol, uint256 initialReserveImbalance, uint256 burnedFeesReportingRewardPercentage) returns() +func (_NativeTokenRemoteUpgradeable *NativeTokenRemoteUpgradeableTransactor) Initialize(opts *bind.TransactOpts, settings TokenRemoteSettings, nativeAssetSymbol string, initialReserveImbalance *big.Int, burnedFeesReportingRewardPercentage *big.Int) (*types.Transaction, error) { + return _NativeTokenRemoteUpgradeable.contract.Transact(opts, "initialize", settings, nativeAssetSymbol, initialReserveImbalance, burnedFeesReportingRewardPercentage) +} + +// Initialize is a paid mutator transaction binding the contract method 0x8f6cec88. +// +// Solidity: function initialize((address,address,uint256,bytes32,address,uint8) settings, string nativeAssetSymbol, uint256 initialReserveImbalance, uint256 burnedFeesReportingRewardPercentage) returns() +func (_NativeTokenRemoteUpgradeable *NativeTokenRemoteUpgradeableSession) Initialize(settings TokenRemoteSettings, nativeAssetSymbol string, initialReserveImbalance *big.Int, burnedFeesReportingRewardPercentage *big.Int) (*types.Transaction, error) { + return _NativeTokenRemoteUpgradeable.Contract.Initialize(&_NativeTokenRemoteUpgradeable.TransactOpts, settings, nativeAssetSymbol, initialReserveImbalance, burnedFeesReportingRewardPercentage) +} + +// Initialize is a paid mutator transaction binding the contract method 0x8f6cec88. +// +// Solidity: function initialize((address,address,uint256,bytes32,address,uint8) settings, string nativeAssetSymbol, uint256 initialReserveImbalance, uint256 burnedFeesReportingRewardPercentage) returns() +func (_NativeTokenRemoteUpgradeable *NativeTokenRemoteUpgradeableTransactorSession) Initialize(settings TokenRemoteSettings, nativeAssetSymbol string, initialReserveImbalance *big.Int, burnedFeesReportingRewardPercentage *big.Int) (*types.Transaction, error) { + return _NativeTokenRemoteUpgradeable.Contract.Initialize(&_NativeTokenRemoteUpgradeable.TransactOpts, settings, nativeAssetSymbol, initialReserveImbalance, burnedFeesReportingRewardPercentage) +} + +// PauseTeleporterAddress is a paid mutator transaction binding the contract method 0x2b0d8f18. +// +// Solidity: function pauseTeleporterAddress(address teleporterAddress) returns() +func (_NativeTokenRemoteUpgradeable *NativeTokenRemoteUpgradeableTransactor) PauseTeleporterAddress(opts *bind.TransactOpts, teleporterAddress common.Address) (*types.Transaction, error) { + return _NativeTokenRemoteUpgradeable.contract.Transact(opts, "pauseTeleporterAddress", teleporterAddress) +} + +// PauseTeleporterAddress is a paid mutator transaction binding the contract method 0x2b0d8f18. +// +// Solidity: function pauseTeleporterAddress(address teleporterAddress) returns() +func (_NativeTokenRemoteUpgradeable *NativeTokenRemoteUpgradeableSession) PauseTeleporterAddress(teleporterAddress common.Address) (*types.Transaction, error) { + return _NativeTokenRemoteUpgradeable.Contract.PauseTeleporterAddress(&_NativeTokenRemoteUpgradeable.TransactOpts, teleporterAddress) +} + +// PauseTeleporterAddress is a paid mutator transaction binding the contract method 0x2b0d8f18. +// +// Solidity: function pauseTeleporterAddress(address teleporterAddress) returns() +func (_NativeTokenRemoteUpgradeable *NativeTokenRemoteUpgradeableTransactorSession) PauseTeleporterAddress(teleporterAddress common.Address) (*types.Transaction, error) { + return _NativeTokenRemoteUpgradeable.Contract.PauseTeleporterAddress(&_NativeTokenRemoteUpgradeable.TransactOpts, teleporterAddress) +} + +// ReceiveTeleporterMessage is a paid mutator transaction binding the contract method 0xc868efaa. +// +// Solidity: function receiveTeleporterMessage(bytes32 sourceBlockchainID, address originSenderAddress, bytes message) returns() +func (_NativeTokenRemoteUpgradeable *NativeTokenRemoteUpgradeableTransactor) ReceiveTeleporterMessage(opts *bind.TransactOpts, sourceBlockchainID [32]byte, originSenderAddress common.Address, message []byte) (*types.Transaction, error) { + return _NativeTokenRemoteUpgradeable.contract.Transact(opts, "receiveTeleporterMessage", sourceBlockchainID, originSenderAddress, message) +} + +// ReceiveTeleporterMessage is a paid mutator transaction binding the contract method 0xc868efaa. +// +// Solidity: function receiveTeleporterMessage(bytes32 sourceBlockchainID, address originSenderAddress, bytes message) returns() +func (_NativeTokenRemoteUpgradeable *NativeTokenRemoteUpgradeableSession) ReceiveTeleporterMessage(sourceBlockchainID [32]byte, originSenderAddress common.Address, message []byte) (*types.Transaction, error) { + return _NativeTokenRemoteUpgradeable.Contract.ReceiveTeleporterMessage(&_NativeTokenRemoteUpgradeable.TransactOpts, sourceBlockchainID, originSenderAddress, message) +} + +// ReceiveTeleporterMessage is a paid mutator transaction binding the contract method 0xc868efaa. +// +// Solidity: function receiveTeleporterMessage(bytes32 sourceBlockchainID, address originSenderAddress, bytes message) returns() +func (_NativeTokenRemoteUpgradeable *NativeTokenRemoteUpgradeableTransactorSession) ReceiveTeleporterMessage(sourceBlockchainID [32]byte, originSenderAddress common.Address, message []byte) (*types.Transaction, error) { + return _NativeTokenRemoteUpgradeable.Contract.ReceiveTeleporterMessage(&_NativeTokenRemoteUpgradeable.TransactOpts, sourceBlockchainID, originSenderAddress, message) +} + +// RegisterWithHome is a paid mutator transaction binding the contract method 0xb8a46d02. +// +// Solidity: function registerWithHome((address,uint256) feeInfo) returns() +func (_NativeTokenRemoteUpgradeable *NativeTokenRemoteUpgradeableTransactor) RegisterWithHome(opts *bind.TransactOpts, feeInfo TeleporterFeeInfo) (*types.Transaction, error) { + return _NativeTokenRemoteUpgradeable.contract.Transact(opts, "registerWithHome", feeInfo) +} + +// RegisterWithHome is a paid mutator transaction binding the contract method 0xb8a46d02. +// +// Solidity: function registerWithHome((address,uint256) feeInfo) returns() +func (_NativeTokenRemoteUpgradeable *NativeTokenRemoteUpgradeableSession) RegisterWithHome(feeInfo TeleporterFeeInfo) (*types.Transaction, error) { + return _NativeTokenRemoteUpgradeable.Contract.RegisterWithHome(&_NativeTokenRemoteUpgradeable.TransactOpts, feeInfo) +} + +// RegisterWithHome is a paid mutator transaction binding the contract method 0xb8a46d02. +// +// Solidity: function registerWithHome((address,uint256) feeInfo) returns() +func (_NativeTokenRemoteUpgradeable *NativeTokenRemoteUpgradeableTransactorSession) RegisterWithHome(feeInfo TeleporterFeeInfo) (*types.Transaction, error) { + return _NativeTokenRemoteUpgradeable.Contract.RegisterWithHome(&_NativeTokenRemoteUpgradeable.TransactOpts, feeInfo) +} + +// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. +// +// Solidity: function renounceOwnership() returns() +func (_NativeTokenRemoteUpgradeable *NativeTokenRemoteUpgradeableTransactor) RenounceOwnership(opts *bind.TransactOpts) (*types.Transaction, error) { + return _NativeTokenRemoteUpgradeable.contract.Transact(opts, "renounceOwnership") +} + +// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. +// +// Solidity: function renounceOwnership() returns() +func (_NativeTokenRemoteUpgradeable *NativeTokenRemoteUpgradeableSession) RenounceOwnership() (*types.Transaction, error) { + return _NativeTokenRemoteUpgradeable.Contract.RenounceOwnership(&_NativeTokenRemoteUpgradeable.TransactOpts) +} + +// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. +// +// Solidity: function renounceOwnership() returns() +func (_NativeTokenRemoteUpgradeable *NativeTokenRemoteUpgradeableTransactorSession) RenounceOwnership() (*types.Transaction, error) { + return _NativeTokenRemoteUpgradeable.Contract.RenounceOwnership(&_NativeTokenRemoteUpgradeable.TransactOpts) +} + +// ReportBurnedTxFees is a paid mutator transaction binding the contract method 0x55538c8b. +// +// Solidity: function reportBurnedTxFees(uint256 requiredGasLimit) returns() +func (_NativeTokenRemoteUpgradeable *NativeTokenRemoteUpgradeableTransactor) ReportBurnedTxFees(opts *bind.TransactOpts, requiredGasLimit *big.Int) (*types.Transaction, error) { + return _NativeTokenRemoteUpgradeable.contract.Transact(opts, "reportBurnedTxFees", requiredGasLimit) +} + +// ReportBurnedTxFees is a paid mutator transaction binding the contract method 0x55538c8b. +// +// Solidity: function reportBurnedTxFees(uint256 requiredGasLimit) returns() +func (_NativeTokenRemoteUpgradeable *NativeTokenRemoteUpgradeableSession) ReportBurnedTxFees(requiredGasLimit *big.Int) (*types.Transaction, error) { + return _NativeTokenRemoteUpgradeable.Contract.ReportBurnedTxFees(&_NativeTokenRemoteUpgradeable.TransactOpts, requiredGasLimit) +} + +// ReportBurnedTxFees is a paid mutator transaction binding the contract method 0x55538c8b. +// +// Solidity: function reportBurnedTxFees(uint256 requiredGasLimit) returns() +func (_NativeTokenRemoteUpgradeable *NativeTokenRemoteUpgradeableTransactorSession) ReportBurnedTxFees(requiredGasLimit *big.Int) (*types.Transaction, error) { + return _NativeTokenRemoteUpgradeable.Contract.ReportBurnedTxFees(&_NativeTokenRemoteUpgradeable.TransactOpts, requiredGasLimit) +} + +// Send is a paid mutator transaction binding the contract method 0x8bf2fa94. +// +// Solidity: function send((bytes32,address,address,address,uint256,uint256,uint256,address) input) payable returns() +func (_NativeTokenRemoteUpgradeable *NativeTokenRemoteUpgradeableTransactor) Send(opts *bind.TransactOpts, input SendTokensInput) (*types.Transaction, error) { + return _NativeTokenRemoteUpgradeable.contract.Transact(opts, "send", input) +} + +// Send is a paid mutator transaction binding the contract method 0x8bf2fa94. +// +// Solidity: function send((bytes32,address,address,address,uint256,uint256,uint256,address) input) payable returns() +func (_NativeTokenRemoteUpgradeable *NativeTokenRemoteUpgradeableSession) Send(input SendTokensInput) (*types.Transaction, error) { + return _NativeTokenRemoteUpgradeable.Contract.Send(&_NativeTokenRemoteUpgradeable.TransactOpts, input) +} + +// Send is a paid mutator transaction binding the contract method 0x8bf2fa94. +// +// Solidity: function send((bytes32,address,address,address,uint256,uint256,uint256,address) input) payable returns() +func (_NativeTokenRemoteUpgradeable *NativeTokenRemoteUpgradeableTransactorSession) Send(input SendTokensInput) (*types.Transaction, error) { + return _NativeTokenRemoteUpgradeable.Contract.Send(&_NativeTokenRemoteUpgradeable.TransactOpts, input) +} + +// SendAndCall is a paid mutator transaction binding the contract method 0x6e6eef8d. +// +// Solidity: function sendAndCall((bytes32,address,address,bytes,uint256,uint256,address,address,address,uint256,uint256) input) payable returns() +func (_NativeTokenRemoteUpgradeable *NativeTokenRemoteUpgradeableTransactor) SendAndCall(opts *bind.TransactOpts, input SendAndCallInput) (*types.Transaction, error) { + return _NativeTokenRemoteUpgradeable.contract.Transact(opts, "sendAndCall", input) +} + +// SendAndCall is a paid mutator transaction binding the contract method 0x6e6eef8d. +// +// Solidity: function sendAndCall((bytes32,address,address,bytes,uint256,uint256,address,address,address,uint256,uint256) input) payable returns() +func (_NativeTokenRemoteUpgradeable *NativeTokenRemoteUpgradeableSession) SendAndCall(input SendAndCallInput) (*types.Transaction, error) { + return _NativeTokenRemoteUpgradeable.Contract.SendAndCall(&_NativeTokenRemoteUpgradeable.TransactOpts, input) +} + +// SendAndCall is a paid mutator transaction binding the contract method 0x6e6eef8d. +// +// Solidity: function sendAndCall((bytes32,address,address,bytes,uint256,uint256,address,address,address,uint256,uint256) input) payable returns() +func (_NativeTokenRemoteUpgradeable *NativeTokenRemoteUpgradeableTransactorSession) SendAndCall(input SendAndCallInput) (*types.Transaction, error) { + return _NativeTokenRemoteUpgradeable.Contract.SendAndCall(&_NativeTokenRemoteUpgradeable.TransactOpts, input) +} + +// Transfer is a paid mutator transaction binding the contract method 0xa9059cbb. +// +// Solidity: function transfer(address to, uint256 value) returns(bool) +func (_NativeTokenRemoteUpgradeable *NativeTokenRemoteUpgradeableTransactor) Transfer(opts *bind.TransactOpts, to common.Address, value *big.Int) (*types.Transaction, error) { + return _NativeTokenRemoteUpgradeable.contract.Transact(opts, "transfer", to, value) +} + +// Transfer is a paid mutator transaction binding the contract method 0xa9059cbb. +// +// Solidity: function transfer(address to, uint256 value) returns(bool) +func (_NativeTokenRemoteUpgradeable *NativeTokenRemoteUpgradeableSession) Transfer(to common.Address, value *big.Int) (*types.Transaction, error) { + return _NativeTokenRemoteUpgradeable.Contract.Transfer(&_NativeTokenRemoteUpgradeable.TransactOpts, to, value) +} + +// Transfer is a paid mutator transaction binding the contract method 0xa9059cbb. +// +// Solidity: function transfer(address to, uint256 value) returns(bool) +func (_NativeTokenRemoteUpgradeable *NativeTokenRemoteUpgradeableTransactorSession) Transfer(to common.Address, value *big.Int) (*types.Transaction, error) { + return _NativeTokenRemoteUpgradeable.Contract.Transfer(&_NativeTokenRemoteUpgradeable.TransactOpts, to, value) +} + +// TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd. +// +// Solidity: function transferFrom(address from, address to, uint256 value) returns(bool) +func (_NativeTokenRemoteUpgradeable *NativeTokenRemoteUpgradeableTransactor) TransferFrom(opts *bind.TransactOpts, from common.Address, to common.Address, value *big.Int) (*types.Transaction, error) { + return _NativeTokenRemoteUpgradeable.contract.Transact(opts, "transferFrom", from, to, value) +} + +// TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd. +// +// Solidity: function transferFrom(address from, address to, uint256 value) returns(bool) +func (_NativeTokenRemoteUpgradeable *NativeTokenRemoteUpgradeableSession) TransferFrom(from common.Address, to common.Address, value *big.Int) (*types.Transaction, error) { + return _NativeTokenRemoteUpgradeable.Contract.TransferFrom(&_NativeTokenRemoteUpgradeable.TransactOpts, from, to, value) +} + +// TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd. +// +// Solidity: function transferFrom(address from, address to, uint256 value) returns(bool) +func (_NativeTokenRemoteUpgradeable *NativeTokenRemoteUpgradeableTransactorSession) TransferFrom(from common.Address, to common.Address, value *big.Int) (*types.Transaction, error) { + return _NativeTokenRemoteUpgradeable.Contract.TransferFrom(&_NativeTokenRemoteUpgradeable.TransactOpts, from, to, value) +} + +// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// +// Solidity: function transferOwnership(address newOwner) returns() +func (_NativeTokenRemoteUpgradeable *NativeTokenRemoteUpgradeableTransactor) TransferOwnership(opts *bind.TransactOpts, newOwner common.Address) (*types.Transaction, error) { + return _NativeTokenRemoteUpgradeable.contract.Transact(opts, "transferOwnership", newOwner) +} + +// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// +// Solidity: function transferOwnership(address newOwner) returns() +func (_NativeTokenRemoteUpgradeable *NativeTokenRemoteUpgradeableSession) TransferOwnership(newOwner common.Address) (*types.Transaction, error) { + return _NativeTokenRemoteUpgradeable.Contract.TransferOwnership(&_NativeTokenRemoteUpgradeable.TransactOpts, newOwner) +} + +// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// +// Solidity: function transferOwnership(address newOwner) returns() +func (_NativeTokenRemoteUpgradeable *NativeTokenRemoteUpgradeableTransactorSession) TransferOwnership(newOwner common.Address) (*types.Transaction, error) { + return _NativeTokenRemoteUpgradeable.Contract.TransferOwnership(&_NativeTokenRemoteUpgradeable.TransactOpts, newOwner) +} + +// UnpauseTeleporterAddress is a paid mutator transaction binding the contract method 0x4511243e. +// +// Solidity: function unpauseTeleporterAddress(address teleporterAddress) returns() +func (_NativeTokenRemoteUpgradeable *NativeTokenRemoteUpgradeableTransactor) UnpauseTeleporterAddress(opts *bind.TransactOpts, teleporterAddress common.Address) (*types.Transaction, error) { + return _NativeTokenRemoteUpgradeable.contract.Transact(opts, "unpauseTeleporterAddress", teleporterAddress) +} + +// UnpauseTeleporterAddress is a paid mutator transaction binding the contract method 0x4511243e. +// +// Solidity: function unpauseTeleporterAddress(address teleporterAddress) returns() +func (_NativeTokenRemoteUpgradeable *NativeTokenRemoteUpgradeableSession) UnpauseTeleporterAddress(teleporterAddress common.Address) (*types.Transaction, error) { + return _NativeTokenRemoteUpgradeable.Contract.UnpauseTeleporterAddress(&_NativeTokenRemoteUpgradeable.TransactOpts, teleporterAddress) +} + +// UnpauseTeleporterAddress is a paid mutator transaction binding the contract method 0x4511243e. +// +// Solidity: function unpauseTeleporterAddress(address teleporterAddress) returns() +func (_NativeTokenRemoteUpgradeable *NativeTokenRemoteUpgradeableTransactorSession) UnpauseTeleporterAddress(teleporterAddress common.Address) (*types.Transaction, error) { + return _NativeTokenRemoteUpgradeable.Contract.UnpauseTeleporterAddress(&_NativeTokenRemoteUpgradeable.TransactOpts, teleporterAddress) +} + +// UpdateMinTeleporterVersion is a paid mutator transaction binding the contract method 0x5eb99514. +// +// Solidity: function updateMinTeleporterVersion(uint256 version) returns() +func (_NativeTokenRemoteUpgradeable *NativeTokenRemoteUpgradeableTransactor) UpdateMinTeleporterVersion(opts *bind.TransactOpts, version *big.Int) (*types.Transaction, error) { + return _NativeTokenRemoteUpgradeable.contract.Transact(opts, "updateMinTeleporterVersion", version) +} + +// UpdateMinTeleporterVersion is a paid mutator transaction binding the contract method 0x5eb99514. +// +// Solidity: function updateMinTeleporterVersion(uint256 version) returns() +func (_NativeTokenRemoteUpgradeable *NativeTokenRemoteUpgradeableSession) UpdateMinTeleporterVersion(version *big.Int) (*types.Transaction, error) { + return _NativeTokenRemoteUpgradeable.Contract.UpdateMinTeleporterVersion(&_NativeTokenRemoteUpgradeable.TransactOpts, version) +} + +// UpdateMinTeleporterVersion is a paid mutator transaction binding the contract method 0x5eb99514. +// +// Solidity: function updateMinTeleporterVersion(uint256 version) returns() +func (_NativeTokenRemoteUpgradeable *NativeTokenRemoteUpgradeableTransactorSession) UpdateMinTeleporterVersion(version *big.Int) (*types.Transaction, error) { + return _NativeTokenRemoteUpgradeable.Contract.UpdateMinTeleporterVersion(&_NativeTokenRemoteUpgradeable.TransactOpts, version) +} + +// Withdraw is a paid mutator transaction binding the contract method 0x2e1a7d4d. +// +// Solidity: function withdraw(uint256 amount) returns() +func (_NativeTokenRemoteUpgradeable *NativeTokenRemoteUpgradeableTransactor) Withdraw(opts *bind.TransactOpts, amount *big.Int) (*types.Transaction, error) { + return _NativeTokenRemoteUpgradeable.contract.Transact(opts, "withdraw", amount) +} + +// Withdraw is a paid mutator transaction binding the contract method 0x2e1a7d4d. +// +// Solidity: function withdraw(uint256 amount) returns() +func (_NativeTokenRemoteUpgradeable *NativeTokenRemoteUpgradeableSession) Withdraw(amount *big.Int) (*types.Transaction, error) { + return _NativeTokenRemoteUpgradeable.Contract.Withdraw(&_NativeTokenRemoteUpgradeable.TransactOpts, amount) +} + +// Withdraw is a paid mutator transaction binding the contract method 0x2e1a7d4d. +// +// Solidity: function withdraw(uint256 amount) returns() +func (_NativeTokenRemoteUpgradeable *NativeTokenRemoteUpgradeableTransactorSession) Withdraw(amount *big.Int) (*types.Transaction, error) { + return _NativeTokenRemoteUpgradeable.Contract.Withdraw(&_NativeTokenRemoteUpgradeable.TransactOpts, amount) +} + +// Fallback is a paid mutator transaction binding the contract fallback function. +// +// Solidity: fallback() payable returns() +func (_NativeTokenRemoteUpgradeable *NativeTokenRemoteUpgradeableTransactor) Fallback(opts *bind.TransactOpts, calldata []byte) (*types.Transaction, error) { + return _NativeTokenRemoteUpgradeable.contract.RawTransact(opts, calldata) +} + +// Fallback is a paid mutator transaction binding the contract fallback function. +// +// Solidity: fallback() payable returns() +func (_NativeTokenRemoteUpgradeable *NativeTokenRemoteUpgradeableSession) Fallback(calldata []byte) (*types.Transaction, error) { + return _NativeTokenRemoteUpgradeable.Contract.Fallback(&_NativeTokenRemoteUpgradeable.TransactOpts, calldata) +} + +// Fallback is a paid mutator transaction binding the contract fallback function. +// +// Solidity: fallback() payable returns() +func (_NativeTokenRemoteUpgradeable *NativeTokenRemoteUpgradeableTransactorSession) Fallback(calldata []byte) (*types.Transaction, error) { + return _NativeTokenRemoteUpgradeable.Contract.Fallback(&_NativeTokenRemoteUpgradeable.TransactOpts, calldata) +} + +// Receive is a paid mutator transaction binding the contract receive function. +// +// Solidity: receive() payable returns() +func (_NativeTokenRemoteUpgradeable *NativeTokenRemoteUpgradeableTransactor) Receive(opts *bind.TransactOpts) (*types.Transaction, error) { + return _NativeTokenRemoteUpgradeable.contract.RawTransact(opts, nil) // calldata is disallowed for receive function +} + +// Receive is a paid mutator transaction binding the contract receive function. +// +// Solidity: receive() payable returns() +func (_NativeTokenRemoteUpgradeable *NativeTokenRemoteUpgradeableSession) Receive() (*types.Transaction, error) { + return _NativeTokenRemoteUpgradeable.Contract.Receive(&_NativeTokenRemoteUpgradeable.TransactOpts) +} + +// Receive is a paid mutator transaction binding the contract receive function. +// +// Solidity: receive() payable returns() +func (_NativeTokenRemoteUpgradeable *NativeTokenRemoteUpgradeableTransactorSession) Receive() (*types.Transaction, error) { + return _NativeTokenRemoteUpgradeable.Contract.Receive(&_NativeTokenRemoteUpgradeable.TransactOpts) +} + +// NativeTokenRemoteUpgradeableApprovalIterator is returned from FilterApproval and is used to iterate over the raw logs and unpacked data for Approval events raised by the NativeTokenRemoteUpgradeable contract. +type NativeTokenRemoteUpgradeableApprovalIterator struct { + Event *NativeTokenRemoteUpgradeableApproval // 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 interfaces.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 *NativeTokenRemoteUpgradeableApprovalIterator) 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(NativeTokenRemoteUpgradeableApproval) + 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(NativeTokenRemoteUpgradeableApproval) + 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 *NativeTokenRemoteUpgradeableApprovalIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *NativeTokenRemoteUpgradeableApprovalIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// NativeTokenRemoteUpgradeableApproval represents a Approval event raised by the NativeTokenRemoteUpgradeable contract. +type NativeTokenRemoteUpgradeableApproval 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 (_NativeTokenRemoteUpgradeable *NativeTokenRemoteUpgradeableFilterer) FilterApproval(opts *bind.FilterOpts, owner []common.Address, spender []common.Address) (*NativeTokenRemoteUpgradeableApprovalIterator, 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 := _NativeTokenRemoteUpgradeable.contract.FilterLogs(opts, "Approval", ownerRule, spenderRule) + if err != nil { + return nil, err + } + return &NativeTokenRemoteUpgradeableApprovalIterator{contract: _NativeTokenRemoteUpgradeable.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 (_NativeTokenRemoteUpgradeable *NativeTokenRemoteUpgradeableFilterer) WatchApproval(opts *bind.WatchOpts, sink chan<- *NativeTokenRemoteUpgradeableApproval, 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 := _NativeTokenRemoteUpgradeable.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(NativeTokenRemoteUpgradeableApproval) + if err := _NativeTokenRemoteUpgradeable.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 (_NativeTokenRemoteUpgradeable *NativeTokenRemoteUpgradeableFilterer) ParseApproval(log types.Log) (*NativeTokenRemoteUpgradeableApproval, error) { + event := new(NativeTokenRemoteUpgradeableApproval) + if err := _NativeTokenRemoteUpgradeable.contract.UnpackLog(event, "Approval", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// NativeTokenRemoteUpgradeableCallFailedIterator is returned from FilterCallFailed and is used to iterate over the raw logs and unpacked data for CallFailed events raised by the NativeTokenRemoteUpgradeable contract. +type NativeTokenRemoteUpgradeableCallFailedIterator struct { + Event *NativeTokenRemoteUpgradeableCallFailed // 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 interfaces.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 *NativeTokenRemoteUpgradeableCallFailedIterator) 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(NativeTokenRemoteUpgradeableCallFailed) + 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(NativeTokenRemoteUpgradeableCallFailed) + 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 *NativeTokenRemoteUpgradeableCallFailedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *NativeTokenRemoteUpgradeableCallFailedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// NativeTokenRemoteUpgradeableCallFailed represents a CallFailed event raised by the NativeTokenRemoteUpgradeable contract. +type NativeTokenRemoteUpgradeableCallFailed struct { + RecipientContract common.Address + Amount *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterCallFailed is a free log retrieval operation binding the contract event 0xb9eaeae386d339f8115782f297a9e5f0e13fb587cd6b0d502f113cb8dd4d6cb0. +// +// Solidity: event CallFailed(address indexed recipientContract, uint256 amount) +func (_NativeTokenRemoteUpgradeable *NativeTokenRemoteUpgradeableFilterer) FilterCallFailed(opts *bind.FilterOpts, recipientContract []common.Address) (*NativeTokenRemoteUpgradeableCallFailedIterator, error) { + + var recipientContractRule []interface{} + for _, recipientContractItem := range recipientContract { + recipientContractRule = append(recipientContractRule, recipientContractItem) + } + + logs, sub, err := _NativeTokenRemoteUpgradeable.contract.FilterLogs(opts, "CallFailed", recipientContractRule) + if err != nil { + return nil, err + } + return &NativeTokenRemoteUpgradeableCallFailedIterator{contract: _NativeTokenRemoteUpgradeable.contract, event: "CallFailed", logs: logs, sub: sub}, nil +} + +// WatchCallFailed is a free log subscription operation binding the contract event 0xb9eaeae386d339f8115782f297a9e5f0e13fb587cd6b0d502f113cb8dd4d6cb0. +// +// Solidity: event CallFailed(address indexed recipientContract, uint256 amount) +func (_NativeTokenRemoteUpgradeable *NativeTokenRemoteUpgradeableFilterer) WatchCallFailed(opts *bind.WatchOpts, sink chan<- *NativeTokenRemoteUpgradeableCallFailed, recipientContract []common.Address) (event.Subscription, error) { + + var recipientContractRule []interface{} + for _, recipientContractItem := range recipientContract { + recipientContractRule = append(recipientContractRule, recipientContractItem) + } + + logs, sub, err := _NativeTokenRemoteUpgradeable.contract.WatchLogs(opts, "CallFailed", recipientContractRule) + 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(NativeTokenRemoteUpgradeableCallFailed) + if err := _NativeTokenRemoteUpgradeable.contract.UnpackLog(event, "CallFailed", 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 +} + +// ParseCallFailed is a log parse operation binding the contract event 0xb9eaeae386d339f8115782f297a9e5f0e13fb587cd6b0d502f113cb8dd4d6cb0. +// +// Solidity: event CallFailed(address indexed recipientContract, uint256 amount) +func (_NativeTokenRemoteUpgradeable *NativeTokenRemoteUpgradeableFilterer) ParseCallFailed(log types.Log) (*NativeTokenRemoteUpgradeableCallFailed, error) { + event := new(NativeTokenRemoteUpgradeableCallFailed) + if err := _NativeTokenRemoteUpgradeable.contract.UnpackLog(event, "CallFailed", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// NativeTokenRemoteUpgradeableCallSucceededIterator is returned from FilterCallSucceeded and is used to iterate over the raw logs and unpacked data for CallSucceeded events raised by the NativeTokenRemoteUpgradeable contract. +type NativeTokenRemoteUpgradeableCallSucceededIterator struct { + Event *NativeTokenRemoteUpgradeableCallSucceeded // 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 interfaces.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 *NativeTokenRemoteUpgradeableCallSucceededIterator) 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(NativeTokenRemoteUpgradeableCallSucceeded) + 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(NativeTokenRemoteUpgradeableCallSucceeded) + 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 *NativeTokenRemoteUpgradeableCallSucceededIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *NativeTokenRemoteUpgradeableCallSucceededIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// NativeTokenRemoteUpgradeableCallSucceeded represents a CallSucceeded event raised by the NativeTokenRemoteUpgradeable contract. +type NativeTokenRemoteUpgradeableCallSucceeded struct { + RecipientContract common.Address + Amount *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterCallSucceeded is a free log retrieval operation binding the contract event 0x104deb555f67e63782bb817bc26c39050894645f9b9f29c4be8ae68d0e8b7ff4. +// +// Solidity: event CallSucceeded(address indexed recipientContract, uint256 amount) +func (_NativeTokenRemoteUpgradeable *NativeTokenRemoteUpgradeableFilterer) FilterCallSucceeded(opts *bind.FilterOpts, recipientContract []common.Address) (*NativeTokenRemoteUpgradeableCallSucceededIterator, error) { + + var recipientContractRule []interface{} + for _, recipientContractItem := range recipientContract { + recipientContractRule = append(recipientContractRule, recipientContractItem) + } + + logs, sub, err := _NativeTokenRemoteUpgradeable.contract.FilterLogs(opts, "CallSucceeded", recipientContractRule) + if err != nil { + return nil, err + } + return &NativeTokenRemoteUpgradeableCallSucceededIterator{contract: _NativeTokenRemoteUpgradeable.contract, event: "CallSucceeded", logs: logs, sub: sub}, nil +} + +// WatchCallSucceeded is a free log subscription operation binding the contract event 0x104deb555f67e63782bb817bc26c39050894645f9b9f29c4be8ae68d0e8b7ff4. +// +// Solidity: event CallSucceeded(address indexed recipientContract, uint256 amount) +func (_NativeTokenRemoteUpgradeable *NativeTokenRemoteUpgradeableFilterer) WatchCallSucceeded(opts *bind.WatchOpts, sink chan<- *NativeTokenRemoteUpgradeableCallSucceeded, recipientContract []common.Address) (event.Subscription, error) { + + var recipientContractRule []interface{} + for _, recipientContractItem := range recipientContract { + recipientContractRule = append(recipientContractRule, recipientContractItem) + } + + logs, sub, err := _NativeTokenRemoteUpgradeable.contract.WatchLogs(opts, "CallSucceeded", recipientContractRule) + 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(NativeTokenRemoteUpgradeableCallSucceeded) + if err := _NativeTokenRemoteUpgradeable.contract.UnpackLog(event, "CallSucceeded", 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 +} + +// ParseCallSucceeded is a log parse operation binding the contract event 0x104deb555f67e63782bb817bc26c39050894645f9b9f29c4be8ae68d0e8b7ff4. +// +// Solidity: event CallSucceeded(address indexed recipientContract, uint256 amount) +func (_NativeTokenRemoteUpgradeable *NativeTokenRemoteUpgradeableFilterer) ParseCallSucceeded(log types.Log) (*NativeTokenRemoteUpgradeableCallSucceeded, error) { + event := new(NativeTokenRemoteUpgradeableCallSucceeded) + if err := _NativeTokenRemoteUpgradeable.contract.UnpackLog(event, "CallSucceeded", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// NativeTokenRemoteUpgradeableDepositIterator is returned from FilterDeposit and is used to iterate over the raw logs and unpacked data for Deposit events raised by the NativeTokenRemoteUpgradeable contract. +type NativeTokenRemoteUpgradeableDepositIterator struct { + Event *NativeTokenRemoteUpgradeableDeposit // 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 interfaces.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 *NativeTokenRemoteUpgradeableDepositIterator) 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(NativeTokenRemoteUpgradeableDeposit) + 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(NativeTokenRemoteUpgradeableDeposit) + 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 *NativeTokenRemoteUpgradeableDepositIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *NativeTokenRemoteUpgradeableDepositIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// NativeTokenRemoteUpgradeableDeposit represents a Deposit event raised by the NativeTokenRemoteUpgradeable contract. +type NativeTokenRemoteUpgradeableDeposit struct { + Sender common.Address + Amount *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterDeposit is a free log retrieval operation binding the contract event 0xe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c. +// +// Solidity: event Deposit(address indexed sender, uint256 amount) +func (_NativeTokenRemoteUpgradeable *NativeTokenRemoteUpgradeableFilterer) FilterDeposit(opts *bind.FilterOpts, sender []common.Address) (*NativeTokenRemoteUpgradeableDepositIterator, error) { + + var senderRule []interface{} + for _, senderItem := range sender { + senderRule = append(senderRule, senderItem) + } + + logs, sub, err := _NativeTokenRemoteUpgradeable.contract.FilterLogs(opts, "Deposit", senderRule) + if err != nil { + return nil, err + } + return &NativeTokenRemoteUpgradeableDepositIterator{contract: _NativeTokenRemoteUpgradeable.contract, event: "Deposit", logs: logs, sub: sub}, nil +} + +// WatchDeposit is a free log subscription operation binding the contract event 0xe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c. +// +// Solidity: event Deposit(address indexed sender, uint256 amount) +func (_NativeTokenRemoteUpgradeable *NativeTokenRemoteUpgradeableFilterer) WatchDeposit(opts *bind.WatchOpts, sink chan<- *NativeTokenRemoteUpgradeableDeposit, sender []common.Address) (event.Subscription, error) { + + var senderRule []interface{} + for _, senderItem := range sender { + senderRule = append(senderRule, senderItem) + } + + logs, sub, err := _NativeTokenRemoteUpgradeable.contract.WatchLogs(opts, "Deposit", senderRule) + 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(NativeTokenRemoteUpgradeableDeposit) + if err := _NativeTokenRemoteUpgradeable.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 0xe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c. +// +// Solidity: event Deposit(address indexed sender, uint256 amount) +func (_NativeTokenRemoteUpgradeable *NativeTokenRemoteUpgradeableFilterer) ParseDeposit(log types.Log) (*NativeTokenRemoteUpgradeableDeposit, error) { + event := new(NativeTokenRemoteUpgradeableDeposit) + if err := _NativeTokenRemoteUpgradeable.contract.UnpackLog(event, "Deposit", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// NativeTokenRemoteUpgradeableInitializedIterator is returned from FilterInitialized and is used to iterate over the raw logs and unpacked data for Initialized events raised by the NativeTokenRemoteUpgradeable contract. +type NativeTokenRemoteUpgradeableInitializedIterator struct { + Event *NativeTokenRemoteUpgradeableInitialized // 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 interfaces.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 *NativeTokenRemoteUpgradeableInitializedIterator) 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(NativeTokenRemoteUpgradeableInitialized) + 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(NativeTokenRemoteUpgradeableInitialized) + 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 *NativeTokenRemoteUpgradeableInitializedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *NativeTokenRemoteUpgradeableInitializedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// NativeTokenRemoteUpgradeableInitialized represents a Initialized event raised by the NativeTokenRemoteUpgradeable contract. +type NativeTokenRemoteUpgradeableInitialized struct { + Version uint64 + Raw types.Log // Blockchain specific contextual infos +} + +// FilterInitialized is a free log retrieval operation binding the contract event 0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2. +// +// Solidity: event Initialized(uint64 version) +func (_NativeTokenRemoteUpgradeable *NativeTokenRemoteUpgradeableFilterer) FilterInitialized(opts *bind.FilterOpts) (*NativeTokenRemoteUpgradeableInitializedIterator, error) { + + logs, sub, err := _NativeTokenRemoteUpgradeable.contract.FilterLogs(opts, "Initialized") + if err != nil { + return nil, err + } + return &NativeTokenRemoteUpgradeableInitializedIterator{contract: _NativeTokenRemoteUpgradeable.contract, event: "Initialized", logs: logs, sub: sub}, nil +} + +// WatchInitialized is a free log subscription operation binding the contract event 0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2. +// +// Solidity: event Initialized(uint64 version) +func (_NativeTokenRemoteUpgradeable *NativeTokenRemoteUpgradeableFilterer) WatchInitialized(opts *bind.WatchOpts, sink chan<- *NativeTokenRemoteUpgradeableInitialized) (event.Subscription, error) { + + logs, sub, err := _NativeTokenRemoteUpgradeable.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(NativeTokenRemoteUpgradeableInitialized) + if err := _NativeTokenRemoteUpgradeable.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 0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2. +// +// Solidity: event Initialized(uint64 version) +func (_NativeTokenRemoteUpgradeable *NativeTokenRemoteUpgradeableFilterer) ParseInitialized(log types.Log) (*NativeTokenRemoteUpgradeableInitialized, error) { + event := new(NativeTokenRemoteUpgradeableInitialized) + if err := _NativeTokenRemoteUpgradeable.contract.UnpackLog(event, "Initialized", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// NativeTokenRemoteUpgradeableMinTeleporterVersionUpdatedIterator is returned from FilterMinTeleporterVersionUpdated and is used to iterate over the raw logs and unpacked data for MinTeleporterVersionUpdated events raised by the NativeTokenRemoteUpgradeable contract. +type NativeTokenRemoteUpgradeableMinTeleporterVersionUpdatedIterator struct { + Event *NativeTokenRemoteUpgradeableMinTeleporterVersionUpdated // 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 interfaces.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 *NativeTokenRemoteUpgradeableMinTeleporterVersionUpdatedIterator) 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(NativeTokenRemoteUpgradeableMinTeleporterVersionUpdated) + 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(NativeTokenRemoteUpgradeableMinTeleporterVersionUpdated) + 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 *NativeTokenRemoteUpgradeableMinTeleporterVersionUpdatedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *NativeTokenRemoteUpgradeableMinTeleporterVersionUpdatedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// NativeTokenRemoteUpgradeableMinTeleporterVersionUpdated represents a MinTeleporterVersionUpdated event raised by the NativeTokenRemoteUpgradeable contract. +type NativeTokenRemoteUpgradeableMinTeleporterVersionUpdated struct { + OldMinTeleporterVersion *big.Int + NewMinTeleporterVersion *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterMinTeleporterVersionUpdated is a free log retrieval operation binding the contract event 0xa9a7ef57e41f05b4c15480842f5f0c27edfcbb553fed281f7c4068452cc1c02d. +// +// Solidity: event MinTeleporterVersionUpdated(uint256 indexed oldMinTeleporterVersion, uint256 indexed newMinTeleporterVersion) +func (_NativeTokenRemoteUpgradeable *NativeTokenRemoteUpgradeableFilterer) FilterMinTeleporterVersionUpdated(opts *bind.FilterOpts, oldMinTeleporterVersion []*big.Int, newMinTeleporterVersion []*big.Int) (*NativeTokenRemoteUpgradeableMinTeleporterVersionUpdatedIterator, error) { + + var oldMinTeleporterVersionRule []interface{} + for _, oldMinTeleporterVersionItem := range oldMinTeleporterVersion { + oldMinTeleporterVersionRule = append(oldMinTeleporterVersionRule, oldMinTeleporterVersionItem) + } + var newMinTeleporterVersionRule []interface{} + for _, newMinTeleporterVersionItem := range newMinTeleporterVersion { + newMinTeleporterVersionRule = append(newMinTeleporterVersionRule, newMinTeleporterVersionItem) + } + + logs, sub, err := _NativeTokenRemoteUpgradeable.contract.FilterLogs(opts, "MinTeleporterVersionUpdated", oldMinTeleporterVersionRule, newMinTeleporterVersionRule) + if err != nil { + return nil, err + } + return &NativeTokenRemoteUpgradeableMinTeleporterVersionUpdatedIterator{contract: _NativeTokenRemoteUpgradeable.contract, event: "MinTeleporterVersionUpdated", logs: logs, sub: sub}, nil +} + +// WatchMinTeleporterVersionUpdated is a free log subscription operation binding the contract event 0xa9a7ef57e41f05b4c15480842f5f0c27edfcbb553fed281f7c4068452cc1c02d. +// +// Solidity: event MinTeleporterVersionUpdated(uint256 indexed oldMinTeleporterVersion, uint256 indexed newMinTeleporterVersion) +func (_NativeTokenRemoteUpgradeable *NativeTokenRemoteUpgradeableFilterer) WatchMinTeleporterVersionUpdated(opts *bind.WatchOpts, sink chan<- *NativeTokenRemoteUpgradeableMinTeleporterVersionUpdated, oldMinTeleporterVersion []*big.Int, newMinTeleporterVersion []*big.Int) (event.Subscription, error) { + + var oldMinTeleporterVersionRule []interface{} + for _, oldMinTeleporterVersionItem := range oldMinTeleporterVersion { + oldMinTeleporterVersionRule = append(oldMinTeleporterVersionRule, oldMinTeleporterVersionItem) + } + var newMinTeleporterVersionRule []interface{} + for _, newMinTeleporterVersionItem := range newMinTeleporterVersion { + newMinTeleporterVersionRule = append(newMinTeleporterVersionRule, newMinTeleporterVersionItem) + } + + logs, sub, err := _NativeTokenRemoteUpgradeable.contract.WatchLogs(opts, "MinTeleporterVersionUpdated", oldMinTeleporterVersionRule, newMinTeleporterVersionRule) + 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(NativeTokenRemoteUpgradeableMinTeleporterVersionUpdated) + if err := _NativeTokenRemoteUpgradeable.contract.UnpackLog(event, "MinTeleporterVersionUpdated", 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 +} + +// ParseMinTeleporterVersionUpdated is a log parse operation binding the contract event 0xa9a7ef57e41f05b4c15480842f5f0c27edfcbb553fed281f7c4068452cc1c02d. +// +// Solidity: event MinTeleporterVersionUpdated(uint256 indexed oldMinTeleporterVersion, uint256 indexed newMinTeleporterVersion) +func (_NativeTokenRemoteUpgradeable *NativeTokenRemoteUpgradeableFilterer) ParseMinTeleporterVersionUpdated(log types.Log) (*NativeTokenRemoteUpgradeableMinTeleporterVersionUpdated, error) { + event := new(NativeTokenRemoteUpgradeableMinTeleporterVersionUpdated) + if err := _NativeTokenRemoteUpgradeable.contract.UnpackLog(event, "MinTeleporterVersionUpdated", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// NativeTokenRemoteUpgradeableOwnershipTransferredIterator is returned from FilterOwnershipTransferred and is used to iterate over the raw logs and unpacked data for OwnershipTransferred events raised by the NativeTokenRemoteUpgradeable contract. +type NativeTokenRemoteUpgradeableOwnershipTransferredIterator struct { + Event *NativeTokenRemoteUpgradeableOwnershipTransferred // 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 interfaces.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 *NativeTokenRemoteUpgradeableOwnershipTransferredIterator) 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(NativeTokenRemoteUpgradeableOwnershipTransferred) + 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(NativeTokenRemoteUpgradeableOwnershipTransferred) + 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 *NativeTokenRemoteUpgradeableOwnershipTransferredIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *NativeTokenRemoteUpgradeableOwnershipTransferredIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// NativeTokenRemoteUpgradeableOwnershipTransferred represents a OwnershipTransferred event raised by the NativeTokenRemoteUpgradeable contract. +type NativeTokenRemoteUpgradeableOwnershipTransferred 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 (_NativeTokenRemoteUpgradeable *NativeTokenRemoteUpgradeableFilterer) FilterOwnershipTransferred(opts *bind.FilterOpts, previousOwner []common.Address, newOwner []common.Address) (*NativeTokenRemoteUpgradeableOwnershipTransferredIterator, 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 := _NativeTokenRemoteUpgradeable.contract.FilterLogs(opts, "OwnershipTransferred", previousOwnerRule, newOwnerRule) + if err != nil { + return nil, err + } + return &NativeTokenRemoteUpgradeableOwnershipTransferredIterator{contract: _NativeTokenRemoteUpgradeable.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 (_NativeTokenRemoteUpgradeable *NativeTokenRemoteUpgradeableFilterer) WatchOwnershipTransferred(opts *bind.WatchOpts, sink chan<- *NativeTokenRemoteUpgradeableOwnershipTransferred, 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 := _NativeTokenRemoteUpgradeable.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(NativeTokenRemoteUpgradeableOwnershipTransferred) + if err := _NativeTokenRemoteUpgradeable.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 (_NativeTokenRemoteUpgradeable *NativeTokenRemoteUpgradeableFilterer) ParseOwnershipTransferred(log types.Log) (*NativeTokenRemoteUpgradeableOwnershipTransferred, error) { + event := new(NativeTokenRemoteUpgradeableOwnershipTransferred) + if err := _NativeTokenRemoteUpgradeable.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// NativeTokenRemoteUpgradeableReportBurnedTxFeesIterator is returned from FilterReportBurnedTxFees and is used to iterate over the raw logs and unpacked data for ReportBurnedTxFees events raised by the NativeTokenRemoteUpgradeable contract. +type NativeTokenRemoteUpgradeableReportBurnedTxFeesIterator struct { + Event *NativeTokenRemoteUpgradeableReportBurnedTxFees // 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 interfaces.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 *NativeTokenRemoteUpgradeableReportBurnedTxFeesIterator) 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(NativeTokenRemoteUpgradeableReportBurnedTxFees) + 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(NativeTokenRemoteUpgradeableReportBurnedTxFees) + 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 *NativeTokenRemoteUpgradeableReportBurnedTxFeesIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *NativeTokenRemoteUpgradeableReportBurnedTxFeesIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// NativeTokenRemoteUpgradeableReportBurnedTxFees represents a ReportBurnedTxFees event raised by the NativeTokenRemoteUpgradeable contract. +type NativeTokenRemoteUpgradeableReportBurnedTxFees struct { + TeleporterMessageID [32]byte + FeesBurned *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterReportBurnedTxFees is a free log retrieval operation binding the contract event 0x0832c643b65d6d3724ed14ac3a655fbc7cae54fb010918b2c2f70ef6b1bb94a5. +// +// Solidity: event ReportBurnedTxFees(bytes32 indexed teleporterMessageID, uint256 feesBurned) +func (_NativeTokenRemoteUpgradeable *NativeTokenRemoteUpgradeableFilterer) FilterReportBurnedTxFees(opts *bind.FilterOpts, teleporterMessageID [][32]byte) (*NativeTokenRemoteUpgradeableReportBurnedTxFeesIterator, error) { + + var teleporterMessageIDRule []interface{} + for _, teleporterMessageIDItem := range teleporterMessageID { + teleporterMessageIDRule = append(teleporterMessageIDRule, teleporterMessageIDItem) + } + + logs, sub, err := _NativeTokenRemoteUpgradeable.contract.FilterLogs(opts, "ReportBurnedTxFees", teleporterMessageIDRule) + if err != nil { + return nil, err + } + return &NativeTokenRemoteUpgradeableReportBurnedTxFeesIterator{contract: _NativeTokenRemoteUpgradeable.contract, event: "ReportBurnedTxFees", logs: logs, sub: sub}, nil +} + +// WatchReportBurnedTxFees is a free log subscription operation binding the contract event 0x0832c643b65d6d3724ed14ac3a655fbc7cae54fb010918b2c2f70ef6b1bb94a5. +// +// Solidity: event ReportBurnedTxFees(bytes32 indexed teleporterMessageID, uint256 feesBurned) +func (_NativeTokenRemoteUpgradeable *NativeTokenRemoteUpgradeableFilterer) WatchReportBurnedTxFees(opts *bind.WatchOpts, sink chan<- *NativeTokenRemoteUpgradeableReportBurnedTxFees, teleporterMessageID [][32]byte) (event.Subscription, error) { + + var teleporterMessageIDRule []interface{} + for _, teleporterMessageIDItem := range teleporterMessageID { + teleporterMessageIDRule = append(teleporterMessageIDRule, teleporterMessageIDItem) + } + + logs, sub, err := _NativeTokenRemoteUpgradeable.contract.WatchLogs(opts, "ReportBurnedTxFees", teleporterMessageIDRule) + 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(NativeTokenRemoteUpgradeableReportBurnedTxFees) + if err := _NativeTokenRemoteUpgradeable.contract.UnpackLog(event, "ReportBurnedTxFees", 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 +} + +// ParseReportBurnedTxFees is a log parse operation binding the contract event 0x0832c643b65d6d3724ed14ac3a655fbc7cae54fb010918b2c2f70ef6b1bb94a5. +// +// Solidity: event ReportBurnedTxFees(bytes32 indexed teleporterMessageID, uint256 feesBurned) +func (_NativeTokenRemoteUpgradeable *NativeTokenRemoteUpgradeableFilterer) ParseReportBurnedTxFees(log types.Log) (*NativeTokenRemoteUpgradeableReportBurnedTxFees, error) { + event := new(NativeTokenRemoteUpgradeableReportBurnedTxFees) + if err := _NativeTokenRemoteUpgradeable.contract.UnpackLog(event, "ReportBurnedTxFees", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// NativeTokenRemoteUpgradeableTeleporterAddressPausedIterator is returned from FilterTeleporterAddressPaused and is used to iterate over the raw logs and unpacked data for TeleporterAddressPaused events raised by the NativeTokenRemoteUpgradeable contract. +type NativeTokenRemoteUpgradeableTeleporterAddressPausedIterator struct { + Event *NativeTokenRemoteUpgradeableTeleporterAddressPaused // 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 interfaces.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 *NativeTokenRemoteUpgradeableTeleporterAddressPausedIterator) 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(NativeTokenRemoteUpgradeableTeleporterAddressPaused) + 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(NativeTokenRemoteUpgradeableTeleporterAddressPaused) + 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 *NativeTokenRemoteUpgradeableTeleporterAddressPausedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *NativeTokenRemoteUpgradeableTeleporterAddressPausedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// NativeTokenRemoteUpgradeableTeleporterAddressPaused represents a TeleporterAddressPaused event raised by the NativeTokenRemoteUpgradeable contract. +type NativeTokenRemoteUpgradeableTeleporterAddressPaused struct { + TeleporterAddress common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterTeleporterAddressPaused is a free log retrieval operation binding the contract event 0x933f93e57a222e6330362af8b376d0a8725b6901e9a2fb86d00f169702b28a4c. +// +// Solidity: event TeleporterAddressPaused(address indexed teleporterAddress) +func (_NativeTokenRemoteUpgradeable *NativeTokenRemoteUpgradeableFilterer) FilterTeleporterAddressPaused(opts *bind.FilterOpts, teleporterAddress []common.Address) (*NativeTokenRemoteUpgradeableTeleporterAddressPausedIterator, error) { + + var teleporterAddressRule []interface{} + for _, teleporterAddressItem := range teleporterAddress { + teleporterAddressRule = append(teleporterAddressRule, teleporterAddressItem) + } + + logs, sub, err := _NativeTokenRemoteUpgradeable.contract.FilterLogs(opts, "TeleporterAddressPaused", teleporterAddressRule) + if err != nil { + return nil, err + } + return &NativeTokenRemoteUpgradeableTeleporterAddressPausedIterator{contract: _NativeTokenRemoteUpgradeable.contract, event: "TeleporterAddressPaused", logs: logs, sub: sub}, nil +} + +// WatchTeleporterAddressPaused is a free log subscription operation binding the contract event 0x933f93e57a222e6330362af8b376d0a8725b6901e9a2fb86d00f169702b28a4c. +// +// Solidity: event TeleporterAddressPaused(address indexed teleporterAddress) +func (_NativeTokenRemoteUpgradeable *NativeTokenRemoteUpgradeableFilterer) WatchTeleporterAddressPaused(opts *bind.WatchOpts, sink chan<- *NativeTokenRemoteUpgradeableTeleporterAddressPaused, teleporterAddress []common.Address) (event.Subscription, error) { + + var teleporterAddressRule []interface{} + for _, teleporterAddressItem := range teleporterAddress { + teleporterAddressRule = append(teleporterAddressRule, teleporterAddressItem) + } + + logs, sub, err := _NativeTokenRemoteUpgradeable.contract.WatchLogs(opts, "TeleporterAddressPaused", teleporterAddressRule) + 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(NativeTokenRemoteUpgradeableTeleporterAddressPaused) + if err := _NativeTokenRemoteUpgradeable.contract.UnpackLog(event, "TeleporterAddressPaused", 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 +} + +// ParseTeleporterAddressPaused is a log parse operation binding the contract event 0x933f93e57a222e6330362af8b376d0a8725b6901e9a2fb86d00f169702b28a4c. +// +// Solidity: event TeleporterAddressPaused(address indexed teleporterAddress) +func (_NativeTokenRemoteUpgradeable *NativeTokenRemoteUpgradeableFilterer) ParseTeleporterAddressPaused(log types.Log) (*NativeTokenRemoteUpgradeableTeleporterAddressPaused, error) { + event := new(NativeTokenRemoteUpgradeableTeleporterAddressPaused) + if err := _NativeTokenRemoteUpgradeable.contract.UnpackLog(event, "TeleporterAddressPaused", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// NativeTokenRemoteUpgradeableTeleporterAddressUnpausedIterator is returned from FilterTeleporterAddressUnpaused and is used to iterate over the raw logs and unpacked data for TeleporterAddressUnpaused events raised by the NativeTokenRemoteUpgradeable contract. +type NativeTokenRemoteUpgradeableTeleporterAddressUnpausedIterator struct { + Event *NativeTokenRemoteUpgradeableTeleporterAddressUnpaused // 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 interfaces.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 *NativeTokenRemoteUpgradeableTeleporterAddressUnpausedIterator) 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(NativeTokenRemoteUpgradeableTeleporterAddressUnpaused) + 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(NativeTokenRemoteUpgradeableTeleporterAddressUnpaused) + 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 *NativeTokenRemoteUpgradeableTeleporterAddressUnpausedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *NativeTokenRemoteUpgradeableTeleporterAddressUnpausedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// NativeTokenRemoteUpgradeableTeleporterAddressUnpaused represents a TeleporterAddressUnpaused event raised by the NativeTokenRemoteUpgradeable contract. +type NativeTokenRemoteUpgradeableTeleporterAddressUnpaused struct { + TeleporterAddress common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterTeleporterAddressUnpaused is a free log retrieval operation binding the contract event 0x844e2f3154214672229235858fd029d1dfd543901c6d05931f0bc2480a2d72c3. +// +// Solidity: event TeleporterAddressUnpaused(address indexed teleporterAddress) +func (_NativeTokenRemoteUpgradeable *NativeTokenRemoteUpgradeableFilterer) FilterTeleporterAddressUnpaused(opts *bind.FilterOpts, teleporterAddress []common.Address) (*NativeTokenRemoteUpgradeableTeleporterAddressUnpausedIterator, error) { + + var teleporterAddressRule []interface{} + for _, teleporterAddressItem := range teleporterAddress { + teleporterAddressRule = append(teleporterAddressRule, teleporterAddressItem) + } + + logs, sub, err := _NativeTokenRemoteUpgradeable.contract.FilterLogs(opts, "TeleporterAddressUnpaused", teleporterAddressRule) + if err != nil { + return nil, err + } + return &NativeTokenRemoteUpgradeableTeleporterAddressUnpausedIterator{contract: _NativeTokenRemoteUpgradeable.contract, event: "TeleporterAddressUnpaused", logs: logs, sub: sub}, nil +} + +// WatchTeleporterAddressUnpaused is a free log subscription operation binding the contract event 0x844e2f3154214672229235858fd029d1dfd543901c6d05931f0bc2480a2d72c3. +// +// Solidity: event TeleporterAddressUnpaused(address indexed teleporterAddress) +func (_NativeTokenRemoteUpgradeable *NativeTokenRemoteUpgradeableFilterer) WatchTeleporterAddressUnpaused(opts *bind.WatchOpts, sink chan<- *NativeTokenRemoteUpgradeableTeleporterAddressUnpaused, teleporterAddress []common.Address) (event.Subscription, error) { + + var teleporterAddressRule []interface{} + for _, teleporterAddressItem := range teleporterAddress { + teleporterAddressRule = append(teleporterAddressRule, teleporterAddressItem) + } + + logs, sub, err := _NativeTokenRemoteUpgradeable.contract.WatchLogs(opts, "TeleporterAddressUnpaused", teleporterAddressRule) + 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(NativeTokenRemoteUpgradeableTeleporterAddressUnpaused) + if err := _NativeTokenRemoteUpgradeable.contract.UnpackLog(event, "TeleporterAddressUnpaused", 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 +} + +// ParseTeleporterAddressUnpaused is a log parse operation binding the contract event 0x844e2f3154214672229235858fd029d1dfd543901c6d05931f0bc2480a2d72c3. +// +// Solidity: event TeleporterAddressUnpaused(address indexed teleporterAddress) +func (_NativeTokenRemoteUpgradeable *NativeTokenRemoteUpgradeableFilterer) ParseTeleporterAddressUnpaused(log types.Log) (*NativeTokenRemoteUpgradeableTeleporterAddressUnpaused, error) { + event := new(NativeTokenRemoteUpgradeableTeleporterAddressUnpaused) + if err := _NativeTokenRemoteUpgradeable.contract.UnpackLog(event, "TeleporterAddressUnpaused", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// NativeTokenRemoteUpgradeableTokensAndCallSentIterator is returned from FilterTokensAndCallSent and is used to iterate over the raw logs and unpacked data for TokensAndCallSent events raised by the NativeTokenRemoteUpgradeable contract. +type NativeTokenRemoteUpgradeableTokensAndCallSentIterator struct { + Event *NativeTokenRemoteUpgradeableTokensAndCallSent // 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 interfaces.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 *NativeTokenRemoteUpgradeableTokensAndCallSentIterator) 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(NativeTokenRemoteUpgradeableTokensAndCallSent) + 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(NativeTokenRemoteUpgradeableTokensAndCallSent) + 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 *NativeTokenRemoteUpgradeableTokensAndCallSentIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *NativeTokenRemoteUpgradeableTokensAndCallSentIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// NativeTokenRemoteUpgradeableTokensAndCallSent represents a TokensAndCallSent event raised by the NativeTokenRemoteUpgradeable contract. +type NativeTokenRemoteUpgradeableTokensAndCallSent struct { + TeleporterMessageID [32]byte + Sender common.Address + Input SendAndCallInput + Amount *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterTokensAndCallSent is a free log retrieval operation binding the contract event 0x5d76dff81bf773b908b050fa113d39f7d8135bb4175398f313ea19cd3a1a0b16. +// +// Solidity: event TokensAndCallSent(bytes32 indexed teleporterMessageID, address indexed sender, (bytes32,address,address,bytes,uint256,uint256,address,address,address,uint256,uint256) input, uint256 amount) +func (_NativeTokenRemoteUpgradeable *NativeTokenRemoteUpgradeableFilterer) FilterTokensAndCallSent(opts *bind.FilterOpts, teleporterMessageID [][32]byte, sender []common.Address) (*NativeTokenRemoteUpgradeableTokensAndCallSentIterator, error) { + + var teleporterMessageIDRule []interface{} + for _, teleporterMessageIDItem := range teleporterMessageID { + teleporterMessageIDRule = append(teleporterMessageIDRule, teleporterMessageIDItem) + } + var senderRule []interface{} + for _, senderItem := range sender { + senderRule = append(senderRule, senderItem) + } + + logs, sub, err := _NativeTokenRemoteUpgradeable.contract.FilterLogs(opts, "TokensAndCallSent", teleporterMessageIDRule, senderRule) + if err != nil { + return nil, err + } + return &NativeTokenRemoteUpgradeableTokensAndCallSentIterator{contract: _NativeTokenRemoteUpgradeable.contract, event: "TokensAndCallSent", logs: logs, sub: sub}, nil +} + +// WatchTokensAndCallSent is a free log subscription operation binding the contract event 0x5d76dff81bf773b908b050fa113d39f7d8135bb4175398f313ea19cd3a1a0b16. +// +// Solidity: event TokensAndCallSent(bytes32 indexed teleporterMessageID, address indexed sender, (bytes32,address,address,bytes,uint256,uint256,address,address,address,uint256,uint256) input, uint256 amount) +func (_NativeTokenRemoteUpgradeable *NativeTokenRemoteUpgradeableFilterer) WatchTokensAndCallSent(opts *bind.WatchOpts, sink chan<- *NativeTokenRemoteUpgradeableTokensAndCallSent, teleporterMessageID [][32]byte, sender []common.Address) (event.Subscription, error) { + + var teleporterMessageIDRule []interface{} + for _, teleporterMessageIDItem := range teleporterMessageID { + teleporterMessageIDRule = append(teleporterMessageIDRule, teleporterMessageIDItem) + } + var senderRule []interface{} + for _, senderItem := range sender { + senderRule = append(senderRule, senderItem) + } + + logs, sub, err := _NativeTokenRemoteUpgradeable.contract.WatchLogs(opts, "TokensAndCallSent", teleporterMessageIDRule, senderRule) + 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(NativeTokenRemoteUpgradeableTokensAndCallSent) + if err := _NativeTokenRemoteUpgradeable.contract.UnpackLog(event, "TokensAndCallSent", 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 +} + +// ParseTokensAndCallSent is a log parse operation binding the contract event 0x5d76dff81bf773b908b050fa113d39f7d8135bb4175398f313ea19cd3a1a0b16. +// +// Solidity: event TokensAndCallSent(bytes32 indexed teleporterMessageID, address indexed sender, (bytes32,address,address,bytes,uint256,uint256,address,address,address,uint256,uint256) input, uint256 amount) +func (_NativeTokenRemoteUpgradeable *NativeTokenRemoteUpgradeableFilterer) ParseTokensAndCallSent(log types.Log) (*NativeTokenRemoteUpgradeableTokensAndCallSent, error) { + event := new(NativeTokenRemoteUpgradeableTokensAndCallSent) + if err := _NativeTokenRemoteUpgradeable.contract.UnpackLog(event, "TokensAndCallSent", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// NativeTokenRemoteUpgradeableTokensSentIterator is returned from FilterTokensSent and is used to iterate over the raw logs and unpacked data for TokensSent events raised by the NativeTokenRemoteUpgradeable contract. +type NativeTokenRemoteUpgradeableTokensSentIterator struct { + Event *NativeTokenRemoteUpgradeableTokensSent // 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 interfaces.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 *NativeTokenRemoteUpgradeableTokensSentIterator) 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(NativeTokenRemoteUpgradeableTokensSent) + 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(NativeTokenRemoteUpgradeableTokensSent) + 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 *NativeTokenRemoteUpgradeableTokensSentIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *NativeTokenRemoteUpgradeableTokensSentIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// NativeTokenRemoteUpgradeableTokensSent represents a TokensSent event raised by the NativeTokenRemoteUpgradeable contract. +type NativeTokenRemoteUpgradeableTokensSent struct { + TeleporterMessageID [32]byte + Sender common.Address + Input SendTokensInput + Amount *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterTokensSent is a free log retrieval operation binding the contract event 0x93f19bf1ec58a15dc643b37e7e18a1c13e85e06cd11929e283154691ace9fb52. +// +// Solidity: event TokensSent(bytes32 indexed teleporterMessageID, address indexed sender, (bytes32,address,address,address,uint256,uint256,uint256,address) input, uint256 amount) +func (_NativeTokenRemoteUpgradeable *NativeTokenRemoteUpgradeableFilterer) FilterTokensSent(opts *bind.FilterOpts, teleporterMessageID [][32]byte, sender []common.Address) (*NativeTokenRemoteUpgradeableTokensSentIterator, error) { + + var teleporterMessageIDRule []interface{} + for _, teleporterMessageIDItem := range teleporterMessageID { + teleporterMessageIDRule = append(teleporterMessageIDRule, teleporterMessageIDItem) + } + var senderRule []interface{} + for _, senderItem := range sender { + senderRule = append(senderRule, senderItem) + } + + logs, sub, err := _NativeTokenRemoteUpgradeable.contract.FilterLogs(opts, "TokensSent", teleporterMessageIDRule, senderRule) + if err != nil { + return nil, err + } + return &NativeTokenRemoteUpgradeableTokensSentIterator{contract: _NativeTokenRemoteUpgradeable.contract, event: "TokensSent", logs: logs, sub: sub}, nil +} + +// WatchTokensSent is a free log subscription operation binding the contract event 0x93f19bf1ec58a15dc643b37e7e18a1c13e85e06cd11929e283154691ace9fb52. +// +// Solidity: event TokensSent(bytes32 indexed teleporterMessageID, address indexed sender, (bytes32,address,address,address,uint256,uint256,uint256,address) input, uint256 amount) +func (_NativeTokenRemoteUpgradeable *NativeTokenRemoteUpgradeableFilterer) WatchTokensSent(opts *bind.WatchOpts, sink chan<- *NativeTokenRemoteUpgradeableTokensSent, teleporterMessageID [][32]byte, sender []common.Address) (event.Subscription, error) { + + var teleporterMessageIDRule []interface{} + for _, teleporterMessageIDItem := range teleporterMessageID { + teleporterMessageIDRule = append(teleporterMessageIDRule, teleporterMessageIDItem) + } + var senderRule []interface{} + for _, senderItem := range sender { + senderRule = append(senderRule, senderItem) + } + + logs, sub, err := _NativeTokenRemoteUpgradeable.contract.WatchLogs(opts, "TokensSent", teleporterMessageIDRule, senderRule) + 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(NativeTokenRemoteUpgradeableTokensSent) + if err := _NativeTokenRemoteUpgradeable.contract.UnpackLog(event, "TokensSent", 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 +} + +// ParseTokensSent is a log parse operation binding the contract event 0x93f19bf1ec58a15dc643b37e7e18a1c13e85e06cd11929e283154691ace9fb52. +// +// Solidity: event TokensSent(bytes32 indexed teleporterMessageID, address indexed sender, (bytes32,address,address,address,uint256,uint256,uint256,address) input, uint256 amount) +func (_NativeTokenRemoteUpgradeable *NativeTokenRemoteUpgradeableFilterer) ParseTokensSent(log types.Log) (*NativeTokenRemoteUpgradeableTokensSent, error) { + event := new(NativeTokenRemoteUpgradeableTokensSent) + if err := _NativeTokenRemoteUpgradeable.contract.UnpackLog(event, "TokensSent", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// NativeTokenRemoteUpgradeableTokensWithdrawnIterator is returned from FilterTokensWithdrawn and is used to iterate over the raw logs and unpacked data for TokensWithdrawn events raised by the NativeTokenRemoteUpgradeable contract. +type NativeTokenRemoteUpgradeableTokensWithdrawnIterator struct { + Event *NativeTokenRemoteUpgradeableTokensWithdrawn // 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 interfaces.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 *NativeTokenRemoteUpgradeableTokensWithdrawnIterator) 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(NativeTokenRemoteUpgradeableTokensWithdrawn) + 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(NativeTokenRemoteUpgradeableTokensWithdrawn) + 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 *NativeTokenRemoteUpgradeableTokensWithdrawnIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *NativeTokenRemoteUpgradeableTokensWithdrawnIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// NativeTokenRemoteUpgradeableTokensWithdrawn represents a TokensWithdrawn event raised by the NativeTokenRemoteUpgradeable contract. +type NativeTokenRemoteUpgradeableTokensWithdrawn struct { + Recipient common.Address + Amount *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterTokensWithdrawn is a free log retrieval operation binding the contract event 0x6352c5382c4a4578e712449ca65e83cdb392d045dfcf1cad9615189db2da244b. +// +// Solidity: event TokensWithdrawn(address indexed recipient, uint256 amount) +func (_NativeTokenRemoteUpgradeable *NativeTokenRemoteUpgradeableFilterer) FilterTokensWithdrawn(opts *bind.FilterOpts, recipient []common.Address) (*NativeTokenRemoteUpgradeableTokensWithdrawnIterator, error) { + + var recipientRule []interface{} + for _, recipientItem := range recipient { + recipientRule = append(recipientRule, recipientItem) + } + + logs, sub, err := _NativeTokenRemoteUpgradeable.contract.FilterLogs(opts, "TokensWithdrawn", recipientRule) + if err != nil { + return nil, err + } + return &NativeTokenRemoteUpgradeableTokensWithdrawnIterator{contract: _NativeTokenRemoteUpgradeable.contract, event: "TokensWithdrawn", logs: logs, sub: sub}, nil +} + +// WatchTokensWithdrawn is a free log subscription operation binding the contract event 0x6352c5382c4a4578e712449ca65e83cdb392d045dfcf1cad9615189db2da244b. +// +// Solidity: event TokensWithdrawn(address indexed recipient, uint256 amount) +func (_NativeTokenRemoteUpgradeable *NativeTokenRemoteUpgradeableFilterer) WatchTokensWithdrawn(opts *bind.WatchOpts, sink chan<- *NativeTokenRemoteUpgradeableTokensWithdrawn, recipient []common.Address) (event.Subscription, error) { + + var recipientRule []interface{} + for _, recipientItem := range recipient { + recipientRule = append(recipientRule, recipientItem) + } + + logs, sub, err := _NativeTokenRemoteUpgradeable.contract.WatchLogs(opts, "TokensWithdrawn", recipientRule) + 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(NativeTokenRemoteUpgradeableTokensWithdrawn) + if err := _NativeTokenRemoteUpgradeable.contract.UnpackLog(event, "TokensWithdrawn", 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 +} + +// ParseTokensWithdrawn is a log parse operation binding the contract event 0x6352c5382c4a4578e712449ca65e83cdb392d045dfcf1cad9615189db2da244b. +// +// Solidity: event TokensWithdrawn(address indexed recipient, uint256 amount) +func (_NativeTokenRemoteUpgradeable *NativeTokenRemoteUpgradeableFilterer) ParseTokensWithdrawn(log types.Log) (*NativeTokenRemoteUpgradeableTokensWithdrawn, error) { + event := new(NativeTokenRemoteUpgradeableTokensWithdrawn) + if err := _NativeTokenRemoteUpgradeable.contract.UnpackLog(event, "TokensWithdrawn", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// NativeTokenRemoteUpgradeableTransferIterator is returned from FilterTransfer and is used to iterate over the raw logs and unpacked data for Transfer events raised by the NativeTokenRemoteUpgradeable contract. +type NativeTokenRemoteUpgradeableTransferIterator struct { + Event *NativeTokenRemoteUpgradeableTransfer // 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 interfaces.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 *NativeTokenRemoteUpgradeableTransferIterator) 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(NativeTokenRemoteUpgradeableTransfer) + 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(NativeTokenRemoteUpgradeableTransfer) + 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 *NativeTokenRemoteUpgradeableTransferIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *NativeTokenRemoteUpgradeableTransferIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// NativeTokenRemoteUpgradeableTransfer represents a Transfer event raised by the NativeTokenRemoteUpgradeable contract. +type NativeTokenRemoteUpgradeableTransfer 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 (_NativeTokenRemoteUpgradeable *NativeTokenRemoteUpgradeableFilterer) FilterTransfer(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*NativeTokenRemoteUpgradeableTransferIterator, 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 := _NativeTokenRemoteUpgradeable.contract.FilterLogs(opts, "Transfer", fromRule, toRule) + if err != nil { + return nil, err + } + return &NativeTokenRemoteUpgradeableTransferIterator{contract: _NativeTokenRemoteUpgradeable.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 (_NativeTokenRemoteUpgradeable *NativeTokenRemoteUpgradeableFilterer) WatchTransfer(opts *bind.WatchOpts, sink chan<- *NativeTokenRemoteUpgradeableTransfer, 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 := _NativeTokenRemoteUpgradeable.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(NativeTokenRemoteUpgradeableTransfer) + if err := _NativeTokenRemoteUpgradeable.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 (_NativeTokenRemoteUpgradeable *NativeTokenRemoteUpgradeableFilterer) ParseTransfer(log types.Log) (*NativeTokenRemoteUpgradeableTransfer, error) { + event := new(NativeTokenRemoteUpgradeableTransfer) + if err := _NativeTokenRemoteUpgradeable.contract.UnpackLog(event, "Transfer", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// NativeTokenRemoteUpgradeableWithdrawalIterator is returned from FilterWithdrawal and is used to iterate over the raw logs and unpacked data for Withdrawal events raised by the NativeTokenRemoteUpgradeable contract. +type NativeTokenRemoteUpgradeableWithdrawalIterator struct { + Event *NativeTokenRemoteUpgradeableWithdrawal // 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 interfaces.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 *NativeTokenRemoteUpgradeableWithdrawalIterator) 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(NativeTokenRemoteUpgradeableWithdrawal) + 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(NativeTokenRemoteUpgradeableWithdrawal) + 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 *NativeTokenRemoteUpgradeableWithdrawalIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *NativeTokenRemoteUpgradeableWithdrawalIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// NativeTokenRemoteUpgradeableWithdrawal represents a Withdrawal event raised by the NativeTokenRemoteUpgradeable contract. +type NativeTokenRemoteUpgradeableWithdrawal struct { + Sender common.Address + Amount *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterWithdrawal is a free log retrieval operation binding the contract event 0x7fcf532c15f0a6db0bd6d0e038bea71d30d808c7d98cb3bf7268a95bf5081b65. +// +// Solidity: event Withdrawal(address indexed sender, uint256 amount) +func (_NativeTokenRemoteUpgradeable *NativeTokenRemoteUpgradeableFilterer) FilterWithdrawal(opts *bind.FilterOpts, sender []common.Address) (*NativeTokenRemoteUpgradeableWithdrawalIterator, error) { + + var senderRule []interface{} + for _, senderItem := range sender { + senderRule = append(senderRule, senderItem) + } + + logs, sub, err := _NativeTokenRemoteUpgradeable.contract.FilterLogs(opts, "Withdrawal", senderRule) + if err != nil { + return nil, err + } + return &NativeTokenRemoteUpgradeableWithdrawalIterator{contract: _NativeTokenRemoteUpgradeable.contract, event: "Withdrawal", logs: logs, sub: sub}, nil +} + +// WatchWithdrawal is a free log subscription operation binding the contract event 0x7fcf532c15f0a6db0bd6d0e038bea71d30d808c7d98cb3bf7268a95bf5081b65. +// +// Solidity: event Withdrawal(address indexed sender, uint256 amount) +func (_NativeTokenRemoteUpgradeable *NativeTokenRemoteUpgradeableFilterer) WatchWithdrawal(opts *bind.WatchOpts, sink chan<- *NativeTokenRemoteUpgradeableWithdrawal, sender []common.Address) (event.Subscription, error) { + + var senderRule []interface{} + for _, senderItem := range sender { + senderRule = append(senderRule, senderItem) + } + + logs, sub, err := _NativeTokenRemoteUpgradeable.contract.WatchLogs(opts, "Withdrawal", senderRule) + 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(NativeTokenRemoteUpgradeableWithdrawal) + if err := _NativeTokenRemoteUpgradeable.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 0x7fcf532c15f0a6db0bd6d0e038bea71d30d808c7d98cb3bf7268a95bf5081b65. +// +// Solidity: event Withdrawal(address indexed sender, uint256 amount) +func (_NativeTokenRemoteUpgradeable *NativeTokenRemoteUpgradeableFilterer) ParseWithdrawal(log types.Log) (*NativeTokenRemoteUpgradeableWithdrawal, error) { + event := new(NativeTokenRemoteUpgradeableWithdrawal) + if err := _NativeTokenRemoteUpgradeable.contract.UnpackLog(event, "Withdrawal", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} diff --git a/abi-bindings/go/ictt/TokenRemote/TokenRemote/TokenRemote.go b/abi-bindings/go/ictt/TokenRemote/TokenRemote/TokenRemote.go new file mode 100644 index 000000000..111d6a305 --- /dev/null +++ b/abi-bindings/go/ictt/TokenRemote/TokenRemote/TokenRemote.go @@ -0,0 +1,2361 @@ +// Code generated - DO NOT EDIT. +// This file is a generated binding and any manual changes will be lost. + +package tokenremote + +import ( + "errors" + "math/big" + "strings" + + "github.com/ava-labs/subnet-evm/accounts/abi" + "github.com/ava-labs/subnet-evm/accounts/abi/bind" + "github.com/ava-labs/subnet-evm/core/types" + "github.com/ava-labs/subnet-evm/interfaces" + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/event" +) + +// Reference imports to suppress errors if they are not otherwise used. +var ( + _ = errors.New + _ = big.NewInt + _ = strings.NewReader + _ = interfaces.NotFound + _ = bind.Bind + _ = common.Big1 + _ = types.BloomLookup + _ = event.NewSubscription + _ = abi.ConvertType +) + +// SendAndCallInput is an auto generated low-level Go binding around an user-defined struct. +type SendAndCallInput struct { + DestinationBlockchainID [32]byte + DestinationTokenTransferrerAddress common.Address + RecipientContract common.Address + RecipientPayload []byte + RequiredGasLimit *big.Int + RecipientGasLimit *big.Int + MultiHopFallback common.Address + FallbackRecipient common.Address + PrimaryFeeTokenAddress common.Address + PrimaryFee *big.Int + SecondaryFee *big.Int +} + +// SendTokensInput is an auto generated low-level Go binding around an user-defined struct. +type SendTokensInput struct { + DestinationBlockchainID [32]byte + DestinationTokenTransferrerAddress common.Address + Recipient common.Address + PrimaryFeeTokenAddress common.Address + PrimaryFee *big.Int + SecondaryFee *big.Int + RequiredGasLimit *big.Int + MultiHopFallback common.Address +} + +// TeleporterFeeInfo is an auto generated low-level Go binding around an user-defined struct. +type TeleporterFeeInfo struct { + FeeTokenAddress common.Address + Amount *big.Int +} + +// TokenRemoteMetaData contains all meta data concerning the TokenRemote contract. +var TokenRemoteMetaData = &bind.MetaData{ + ABI: "[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"target\",\"type\":\"address\"}],\"name\":\"AddressEmptyCode\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"AddressInsufficientBalance\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"FailedInnerCall\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidInitialization\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotInitializing\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"OwnableInvalidOwner\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"OwnableUnauthorizedAccount\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ReentrancyGuardReentrantCall\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"SafeERC20FailedOperation\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"recipientContract\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"CallFailed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"recipientContract\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"CallSucceeded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"version\",\"type\":\"uint64\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"oldMinTeleporterVersion\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"newMinTeleporterVersion\",\"type\":\"uint256\"}],\"name\":\"MinTeleporterVersionUpdated\",\"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\":\"teleporterAddress\",\"type\":\"address\"}],\"name\":\"TeleporterAddressPaused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"teleporterAddress\",\"type\":\"address\"}],\"name\":\"TeleporterAddressUnpaused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"teleporterMessageID\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"destinationBlockchainID\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"destinationTokenTransferrerAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"recipientContract\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"recipientPayload\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"requiredGasLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"recipientGasLimit\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"multiHopFallback\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"fallbackRecipient\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"primaryFeeTokenAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"primaryFee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"secondaryFee\",\"type\":\"uint256\"}],\"indexed\":false,\"internalType\":\"structSendAndCallInput\",\"name\":\"input\",\"type\":\"tuple\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"TokensAndCallSent\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"teleporterMessageID\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"destinationBlockchainID\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"destinationTokenTransferrerAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"primaryFeeTokenAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"primaryFee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"secondaryFee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"requiredGasLimit\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"multiHopFallback\",\"type\":\"address\"}],\"indexed\":false,\"internalType\":\"structSendTokensInput\",\"name\":\"input\",\"type\":\"tuple\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"TokensSent\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"TokensWithdrawn\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"MULTI_HOP_CALL_GAS_PER_WORD\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"MULTI_HOP_CALL_REQUIRED_GAS\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"MULTI_HOP_SEND_REQUIRED_GAS\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"REGISTER_REMOTE_REQUIRED_GAS\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"TELEPORTER_REGISTRY_APP_STORAGE_LOCATION\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"TOKEN_REMOTE_STORAGE_LOCATION\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"payloadSize\",\"type\":\"uint256\"}],\"name\":\"calculateNumWords\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getBlockchainID\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getInitialReserveImbalance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getIsCollateralized\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getMinTeleporterVersion\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getMultiplyOnRemote\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getTokenHomeAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getTokenHomeBlockchainID\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getTokenMultiplier\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"teleporterAddress\",\"type\":\"address\"}],\"name\":\"isTeleporterAddressPaused\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"teleporterAddress\",\"type\":\"address\"}],\"name\":\"pauseTeleporterAddress\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"sourceBlockchainID\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"originSenderAddress\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"message\",\"type\":\"bytes\"}],\"name\":\"receiveTeleporterMessage\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"feeTokenAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"internalType\":\"structTeleporterFeeInfo\",\"name\":\"feeInfo\",\"type\":\"tuple\"}],\"name\":\"registerWithHome\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"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\":\"teleporterAddress\",\"type\":\"address\"}],\"name\":\"unpauseTeleporterAddress\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"version\",\"type\":\"uint256\"}],\"name\":\"updateMinTeleporterVersion\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", +} + +// TokenRemoteABI is the input ABI used to generate the binding from. +// Deprecated: Use TokenRemoteMetaData.ABI instead. +var TokenRemoteABI = TokenRemoteMetaData.ABI + +// TokenRemote is an auto generated Go binding around an Ethereum contract. +type TokenRemote struct { + TokenRemoteCaller // Read-only binding to the contract + TokenRemoteTransactor // Write-only binding to the contract + TokenRemoteFilterer // Log filterer for contract events +} + +// TokenRemoteCaller is an auto generated read-only Go binding around an Ethereum contract. +type TokenRemoteCaller struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// TokenRemoteTransactor is an auto generated write-only Go binding around an Ethereum contract. +type TokenRemoteTransactor struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// TokenRemoteFilterer is an auto generated log filtering Go binding around an Ethereum contract events. +type TokenRemoteFilterer struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// TokenRemoteSession is an auto generated Go binding around an Ethereum contract, +// with pre-set call and transact options. +type TokenRemoteSession struct { + Contract *TokenRemote // 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 +} + +// TokenRemoteCallerSession is an auto generated read-only Go binding around an Ethereum contract, +// with pre-set call options. +type TokenRemoteCallerSession struct { + Contract *TokenRemoteCaller // Generic contract caller binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session +} + +// TokenRemoteTransactorSession is an auto generated write-only Go binding around an Ethereum contract, +// with pre-set transact options. +type TokenRemoteTransactorSession struct { + Contract *TokenRemoteTransactor // Generic contract transactor binding to set the session for + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// TokenRemoteRaw is an auto generated low-level Go binding around an Ethereum contract. +type TokenRemoteRaw struct { + Contract *TokenRemote // Generic contract binding to access the raw methods on +} + +// TokenRemoteCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. +type TokenRemoteCallerRaw struct { + Contract *TokenRemoteCaller // Generic read-only contract binding to access the raw methods on +} + +// TokenRemoteTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. +type TokenRemoteTransactorRaw struct { + Contract *TokenRemoteTransactor // Generic write-only contract binding to access the raw methods on +} + +// NewTokenRemote creates a new instance of TokenRemote, bound to a specific deployed contract. +func NewTokenRemote(address common.Address, backend bind.ContractBackend) (*TokenRemote, error) { + contract, err := bindTokenRemote(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &TokenRemote{TokenRemoteCaller: TokenRemoteCaller{contract: contract}, TokenRemoteTransactor: TokenRemoteTransactor{contract: contract}, TokenRemoteFilterer: TokenRemoteFilterer{contract: contract}}, nil +} + +// NewTokenRemoteCaller creates a new read-only instance of TokenRemote, bound to a specific deployed contract. +func NewTokenRemoteCaller(address common.Address, caller bind.ContractCaller) (*TokenRemoteCaller, error) { + contract, err := bindTokenRemote(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &TokenRemoteCaller{contract: contract}, nil +} + +// NewTokenRemoteTransactor creates a new write-only instance of TokenRemote, bound to a specific deployed contract. +func NewTokenRemoteTransactor(address common.Address, transactor bind.ContractTransactor) (*TokenRemoteTransactor, error) { + contract, err := bindTokenRemote(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &TokenRemoteTransactor{contract: contract}, nil +} + +// NewTokenRemoteFilterer creates a new log filterer instance of TokenRemote, bound to a specific deployed contract. +func NewTokenRemoteFilterer(address common.Address, filterer bind.ContractFilterer) (*TokenRemoteFilterer, error) { + contract, err := bindTokenRemote(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &TokenRemoteFilterer{contract: contract}, nil +} + +// bindTokenRemote binds a generic wrapper to an already deployed contract. +func bindTokenRemote(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := TokenRemoteMetaData.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 (_TokenRemote *TokenRemoteRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _TokenRemote.Contract.TokenRemoteCaller.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 (_TokenRemote *TokenRemoteRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _TokenRemote.Contract.TokenRemoteTransactor.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_TokenRemote *TokenRemoteRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _TokenRemote.Contract.TokenRemoteTransactor.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 (_TokenRemote *TokenRemoteCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _TokenRemote.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 (_TokenRemote *TokenRemoteTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _TokenRemote.Contract.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_TokenRemote *TokenRemoteTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _TokenRemote.Contract.contract.Transact(opts, method, params...) +} + +// MULTIHOPCALLGASPERWORD is a free data retrieval call binding the contract method 0x15beb59f. +// +// Solidity: function MULTI_HOP_CALL_GAS_PER_WORD() view returns(uint256) +func (_TokenRemote *TokenRemoteCaller) MULTIHOPCALLGASPERWORD(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _TokenRemote.contract.Call(opts, &out, "MULTI_HOP_CALL_GAS_PER_WORD") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// MULTIHOPCALLGASPERWORD is a free data retrieval call binding the contract method 0x15beb59f. +// +// Solidity: function MULTI_HOP_CALL_GAS_PER_WORD() view returns(uint256) +func (_TokenRemote *TokenRemoteSession) MULTIHOPCALLGASPERWORD() (*big.Int, error) { + return _TokenRemote.Contract.MULTIHOPCALLGASPERWORD(&_TokenRemote.CallOpts) +} + +// MULTIHOPCALLGASPERWORD is a free data retrieval call binding the contract method 0x15beb59f. +// +// Solidity: function MULTI_HOP_CALL_GAS_PER_WORD() view returns(uint256) +func (_TokenRemote *TokenRemoteCallerSession) MULTIHOPCALLGASPERWORD() (*big.Int, error) { + return _TokenRemote.Contract.MULTIHOPCALLGASPERWORD(&_TokenRemote.CallOpts) +} + +// MULTIHOPCALLREQUIREDGAS is a free data retrieval call binding the contract method 0x71717c18. +// +// Solidity: function MULTI_HOP_CALL_REQUIRED_GAS() view returns(uint256) +func (_TokenRemote *TokenRemoteCaller) MULTIHOPCALLREQUIREDGAS(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _TokenRemote.contract.Call(opts, &out, "MULTI_HOP_CALL_REQUIRED_GAS") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// MULTIHOPCALLREQUIREDGAS is a free data retrieval call binding the contract method 0x71717c18. +// +// Solidity: function MULTI_HOP_CALL_REQUIRED_GAS() view returns(uint256) +func (_TokenRemote *TokenRemoteSession) MULTIHOPCALLREQUIREDGAS() (*big.Int, error) { + return _TokenRemote.Contract.MULTIHOPCALLREQUIREDGAS(&_TokenRemote.CallOpts) +} + +// MULTIHOPCALLREQUIREDGAS is a free data retrieval call binding the contract method 0x71717c18. +// +// Solidity: function MULTI_HOP_CALL_REQUIRED_GAS() view returns(uint256) +func (_TokenRemote *TokenRemoteCallerSession) MULTIHOPCALLREQUIREDGAS() (*big.Int, error) { + return _TokenRemote.Contract.MULTIHOPCALLREQUIREDGAS(&_TokenRemote.CallOpts) +} + +// MULTIHOPSENDREQUIREDGAS is a free data retrieval call binding the contract method 0x5507f3d1. +// +// Solidity: function MULTI_HOP_SEND_REQUIRED_GAS() view returns(uint256) +func (_TokenRemote *TokenRemoteCaller) MULTIHOPSENDREQUIREDGAS(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _TokenRemote.contract.Call(opts, &out, "MULTI_HOP_SEND_REQUIRED_GAS") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// MULTIHOPSENDREQUIREDGAS is a free data retrieval call binding the contract method 0x5507f3d1. +// +// Solidity: function MULTI_HOP_SEND_REQUIRED_GAS() view returns(uint256) +func (_TokenRemote *TokenRemoteSession) MULTIHOPSENDREQUIREDGAS() (*big.Int, error) { + return _TokenRemote.Contract.MULTIHOPSENDREQUIREDGAS(&_TokenRemote.CallOpts) +} + +// MULTIHOPSENDREQUIREDGAS is a free data retrieval call binding the contract method 0x5507f3d1. +// +// Solidity: function MULTI_HOP_SEND_REQUIRED_GAS() view returns(uint256) +func (_TokenRemote *TokenRemoteCallerSession) MULTIHOPSENDREQUIREDGAS() (*big.Int, error) { + return _TokenRemote.Contract.MULTIHOPSENDREQUIREDGAS(&_TokenRemote.CallOpts) +} + +// REGISTERREMOTEREQUIREDGAS is a free data retrieval call binding the contract method 0x254ac160. +// +// Solidity: function REGISTER_REMOTE_REQUIRED_GAS() view returns(uint256) +func (_TokenRemote *TokenRemoteCaller) REGISTERREMOTEREQUIREDGAS(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _TokenRemote.contract.Call(opts, &out, "REGISTER_REMOTE_REQUIRED_GAS") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// REGISTERREMOTEREQUIREDGAS is a free data retrieval call binding the contract method 0x254ac160. +// +// Solidity: function REGISTER_REMOTE_REQUIRED_GAS() view returns(uint256) +func (_TokenRemote *TokenRemoteSession) REGISTERREMOTEREQUIREDGAS() (*big.Int, error) { + return _TokenRemote.Contract.REGISTERREMOTEREQUIREDGAS(&_TokenRemote.CallOpts) +} + +// REGISTERREMOTEREQUIREDGAS is a free data retrieval call binding the contract method 0x254ac160. +// +// Solidity: function REGISTER_REMOTE_REQUIRED_GAS() view returns(uint256) +func (_TokenRemote *TokenRemoteCallerSession) REGISTERREMOTEREQUIREDGAS() (*big.Int, error) { + return _TokenRemote.Contract.REGISTERREMOTEREQUIREDGAS(&_TokenRemote.CallOpts) +} + +// TELEPORTERREGISTRYAPPSTORAGELOCATION is a free data retrieval call binding the contract method 0x909a6ac0. +// +// Solidity: function TELEPORTER_REGISTRY_APP_STORAGE_LOCATION() view returns(bytes32) +func (_TokenRemote *TokenRemoteCaller) TELEPORTERREGISTRYAPPSTORAGELOCATION(opts *bind.CallOpts) ([32]byte, error) { + var out []interface{} + err := _TokenRemote.contract.Call(opts, &out, "TELEPORTER_REGISTRY_APP_STORAGE_LOCATION") + + if err != nil { + return *new([32]byte), err + } + + out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) + + return out0, err + +} + +// TELEPORTERREGISTRYAPPSTORAGELOCATION is a free data retrieval call binding the contract method 0x909a6ac0. +// +// Solidity: function TELEPORTER_REGISTRY_APP_STORAGE_LOCATION() view returns(bytes32) +func (_TokenRemote *TokenRemoteSession) TELEPORTERREGISTRYAPPSTORAGELOCATION() ([32]byte, error) { + return _TokenRemote.Contract.TELEPORTERREGISTRYAPPSTORAGELOCATION(&_TokenRemote.CallOpts) +} + +// TELEPORTERREGISTRYAPPSTORAGELOCATION is a free data retrieval call binding the contract method 0x909a6ac0. +// +// Solidity: function TELEPORTER_REGISTRY_APP_STORAGE_LOCATION() view returns(bytes32) +func (_TokenRemote *TokenRemoteCallerSession) TELEPORTERREGISTRYAPPSTORAGELOCATION() ([32]byte, error) { + return _TokenRemote.Contract.TELEPORTERREGISTRYAPPSTORAGELOCATION(&_TokenRemote.CallOpts) +} + +// TOKENREMOTESTORAGELOCATION is a free data retrieval call binding the contract method 0x35cac159. +// +// Solidity: function TOKEN_REMOTE_STORAGE_LOCATION() view returns(bytes32) +func (_TokenRemote *TokenRemoteCaller) TOKENREMOTESTORAGELOCATION(opts *bind.CallOpts) ([32]byte, error) { + var out []interface{} + err := _TokenRemote.contract.Call(opts, &out, "TOKEN_REMOTE_STORAGE_LOCATION") + + if err != nil { + return *new([32]byte), err + } + + out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) + + return out0, err + +} + +// TOKENREMOTESTORAGELOCATION is a free data retrieval call binding the contract method 0x35cac159. +// +// Solidity: function TOKEN_REMOTE_STORAGE_LOCATION() view returns(bytes32) +func (_TokenRemote *TokenRemoteSession) TOKENREMOTESTORAGELOCATION() ([32]byte, error) { + return _TokenRemote.Contract.TOKENREMOTESTORAGELOCATION(&_TokenRemote.CallOpts) +} + +// TOKENREMOTESTORAGELOCATION is a free data retrieval call binding the contract method 0x35cac159. +// +// Solidity: function TOKEN_REMOTE_STORAGE_LOCATION() view returns(bytes32) +func (_TokenRemote *TokenRemoteCallerSession) TOKENREMOTESTORAGELOCATION() ([32]byte, error) { + return _TokenRemote.Contract.TOKENREMOTESTORAGELOCATION(&_TokenRemote.CallOpts) +} + +// CalculateNumWords is a free data retrieval call binding the contract method 0xf3f981d8. +// +// Solidity: function calculateNumWords(uint256 payloadSize) pure returns(uint256) +func (_TokenRemote *TokenRemoteCaller) CalculateNumWords(opts *bind.CallOpts, payloadSize *big.Int) (*big.Int, error) { + var out []interface{} + err := _TokenRemote.contract.Call(opts, &out, "calculateNumWords", payloadSize) + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// CalculateNumWords is a free data retrieval call binding the contract method 0xf3f981d8. +// +// Solidity: function calculateNumWords(uint256 payloadSize) pure returns(uint256) +func (_TokenRemote *TokenRemoteSession) CalculateNumWords(payloadSize *big.Int) (*big.Int, error) { + return _TokenRemote.Contract.CalculateNumWords(&_TokenRemote.CallOpts, payloadSize) +} + +// CalculateNumWords is a free data retrieval call binding the contract method 0xf3f981d8. +// +// Solidity: function calculateNumWords(uint256 payloadSize) pure returns(uint256) +func (_TokenRemote *TokenRemoteCallerSession) CalculateNumWords(payloadSize *big.Int) (*big.Int, error) { + return _TokenRemote.Contract.CalculateNumWords(&_TokenRemote.CallOpts, payloadSize) +} + +// GetBlockchainID is a free data retrieval call binding the contract method 0x4213cf78. +// +// Solidity: function getBlockchainID() view returns(bytes32) +func (_TokenRemote *TokenRemoteCaller) GetBlockchainID(opts *bind.CallOpts) ([32]byte, error) { + var out []interface{} + err := _TokenRemote.contract.Call(opts, &out, "getBlockchainID") + + if err != nil { + return *new([32]byte), err + } + + out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) + + return out0, err + +} + +// GetBlockchainID is a free data retrieval call binding the contract method 0x4213cf78. +// +// Solidity: function getBlockchainID() view returns(bytes32) +func (_TokenRemote *TokenRemoteSession) GetBlockchainID() ([32]byte, error) { + return _TokenRemote.Contract.GetBlockchainID(&_TokenRemote.CallOpts) +} + +// GetBlockchainID is a free data retrieval call binding the contract method 0x4213cf78. +// +// Solidity: function getBlockchainID() view returns(bytes32) +func (_TokenRemote *TokenRemoteCallerSession) GetBlockchainID() ([32]byte, error) { + return _TokenRemote.Contract.GetBlockchainID(&_TokenRemote.CallOpts) +} + +// GetInitialReserveImbalance is a free data retrieval call binding the contract method 0xef793e2a. +// +// Solidity: function getInitialReserveImbalance() view returns(uint256) +func (_TokenRemote *TokenRemoteCaller) GetInitialReserveImbalance(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _TokenRemote.contract.Call(opts, &out, "getInitialReserveImbalance") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// GetInitialReserveImbalance is a free data retrieval call binding the contract method 0xef793e2a. +// +// Solidity: function getInitialReserveImbalance() view returns(uint256) +func (_TokenRemote *TokenRemoteSession) GetInitialReserveImbalance() (*big.Int, error) { + return _TokenRemote.Contract.GetInitialReserveImbalance(&_TokenRemote.CallOpts) +} + +// GetInitialReserveImbalance is a free data retrieval call binding the contract method 0xef793e2a. +// +// Solidity: function getInitialReserveImbalance() view returns(uint256) +func (_TokenRemote *TokenRemoteCallerSession) GetInitialReserveImbalance() (*big.Int, error) { + return _TokenRemote.Contract.GetInitialReserveImbalance(&_TokenRemote.CallOpts) +} + +// GetIsCollateralized is a free data retrieval call binding the contract method 0x02a30c7d. +// +// Solidity: function getIsCollateralized() view returns(bool) +func (_TokenRemote *TokenRemoteCaller) GetIsCollateralized(opts *bind.CallOpts) (bool, error) { + var out []interface{} + err := _TokenRemote.contract.Call(opts, &out, "getIsCollateralized") + + if err != nil { + return *new(bool), err + } + + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + + return out0, err + +} + +// GetIsCollateralized is a free data retrieval call binding the contract method 0x02a30c7d. +// +// Solidity: function getIsCollateralized() view returns(bool) +func (_TokenRemote *TokenRemoteSession) GetIsCollateralized() (bool, error) { + return _TokenRemote.Contract.GetIsCollateralized(&_TokenRemote.CallOpts) +} + +// GetIsCollateralized is a free data retrieval call binding the contract method 0x02a30c7d. +// +// Solidity: function getIsCollateralized() view returns(bool) +func (_TokenRemote *TokenRemoteCallerSession) GetIsCollateralized() (bool, error) { + return _TokenRemote.Contract.GetIsCollateralized(&_TokenRemote.CallOpts) +} + +// GetMinTeleporterVersion is a free data retrieval call binding the contract method 0xd2cc7a70. +// +// Solidity: function getMinTeleporterVersion() view returns(uint256) +func (_TokenRemote *TokenRemoteCaller) GetMinTeleporterVersion(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _TokenRemote.contract.Call(opts, &out, "getMinTeleporterVersion") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// GetMinTeleporterVersion is a free data retrieval call binding the contract method 0xd2cc7a70. +// +// Solidity: function getMinTeleporterVersion() view returns(uint256) +func (_TokenRemote *TokenRemoteSession) GetMinTeleporterVersion() (*big.Int, error) { + return _TokenRemote.Contract.GetMinTeleporterVersion(&_TokenRemote.CallOpts) +} + +// GetMinTeleporterVersion is a free data retrieval call binding the contract method 0xd2cc7a70. +// +// Solidity: function getMinTeleporterVersion() view returns(uint256) +func (_TokenRemote *TokenRemoteCallerSession) GetMinTeleporterVersion() (*big.Int, error) { + return _TokenRemote.Contract.GetMinTeleporterVersion(&_TokenRemote.CallOpts) +} + +// GetMultiplyOnRemote is a free data retrieval call binding the contract method 0x7ee3779a. +// +// Solidity: function getMultiplyOnRemote() view returns(bool) +func (_TokenRemote *TokenRemoteCaller) GetMultiplyOnRemote(opts *bind.CallOpts) (bool, error) { + var out []interface{} + err := _TokenRemote.contract.Call(opts, &out, "getMultiplyOnRemote") + + if err != nil { + return *new(bool), err + } + + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + + return out0, err + +} + +// GetMultiplyOnRemote is a free data retrieval call binding the contract method 0x7ee3779a. +// +// Solidity: function getMultiplyOnRemote() view returns(bool) +func (_TokenRemote *TokenRemoteSession) GetMultiplyOnRemote() (bool, error) { + return _TokenRemote.Contract.GetMultiplyOnRemote(&_TokenRemote.CallOpts) +} + +// GetMultiplyOnRemote is a free data retrieval call binding the contract method 0x7ee3779a. +// +// Solidity: function getMultiplyOnRemote() view returns(bool) +func (_TokenRemote *TokenRemoteCallerSession) GetMultiplyOnRemote() (bool, error) { + return _TokenRemote.Contract.GetMultiplyOnRemote(&_TokenRemote.CallOpts) +} + +// GetTokenHomeAddress is a free data retrieval call binding the contract method 0xc3cd6927. +// +// Solidity: function getTokenHomeAddress() view returns(address) +func (_TokenRemote *TokenRemoteCaller) GetTokenHomeAddress(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _TokenRemote.contract.Call(opts, &out, "getTokenHomeAddress") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// GetTokenHomeAddress is a free data retrieval call binding the contract method 0xc3cd6927. +// +// Solidity: function getTokenHomeAddress() view returns(address) +func (_TokenRemote *TokenRemoteSession) GetTokenHomeAddress() (common.Address, error) { + return _TokenRemote.Contract.GetTokenHomeAddress(&_TokenRemote.CallOpts) +} + +// GetTokenHomeAddress is a free data retrieval call binding the contract method 0xc3cd6927. +// +// Solidity: function getTokenHomeAddress() view returns(address) +func (_TokenRemote *TokenRemoteCallerSession) GetTokenHomeAddress() (common.Address, error) { + return _TokenRemote.Contract.GetTokenHomeAddress(&_TokenRemote.CallOpts) +} + +// GetTokenHomeBlockchainID is a free data retrieval call binding the contract method 0xe0fd9cb8. +// +// Solidity: function getTokenHomeBlockchainID() view returns(bytes32) +func (_TokenRemote *TokenRemoteCaller) GetTokenHomeBlockchainID(opts *bind.CallOpts) ([32]byte, error) { + var out []interface{} + err := _TokenRemote.contract.Call(opts, &out, "getTokenHomeBlockchainID") + + if err != nil { + return *new([32]byte), err + } + + out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) + + return out0, err + +} + +// GetTokenHomeBlockchainID is a free data retrieval call binding the contract method 0xe0fd9cb8. +// +// Solidity: function getTokenHomeBlockchainID() view returns(bytes32) +func (_TokenRemote *TokenRemoteSession) GetTokenHomeBlockchainID() ([32]byte, error) { + return _TokenRemote.Contract.GetTokenHomeBlockchainID(&_TokenRemote.CallOpts) +} + +// GetTokenHomeBlockchainID is a free data retrieval call binding the contract method 0xe0fd9cb8. +// +// Solidity: function getTokenHomeBlockchainID() view returns(bytes32) +func (_TokenRemote *TokenRemoteCallerSession) GetTokenHomeBlockchainID() ([32]byte, error) { + return _TokenRemote.Contract.GetTokenHomeBlockchainID(&_TokenRemote.CallOpts) +} + +// GetTokenMultiplier is a free data retrieval call binding the contract method 0x0733c8c8. +// +// Solidity: function getTokenMultiplier() view returns(uint256) +func (_TokenRemote *TokenRemoteCaller) GetTokenMultiplier(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _TokenRemote.contract.Call(opts, &out, "getTokenMultiplier") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// GetTokenMultiplier is a free data retrieval call binding the contract method 0x0733c8c8. +// +// Solidity: function getTokenMultiplier() view returns(uint256) +func (_TokenRemote *TokenRemoteSession) GetTokenMultiplier() (*big.Int, error) { + return _TokenRemote.Contract.GetTokenMultiplier(&_TokenRemote.CallOpts) +} + +// GetTokenMultiplier is a free data retrieval call binding the contract method 0x0733c8c8. +// +// Solidity: function getTokenMultiplier() view returns(uint256) +func (_TokenRemote *TokenRemoteCallerSession) GetTokenMultiplier() (*big.Int, error) { + return _TokenRemote.Contract.GetTokenMultiplier(&_TokenRemote.CallOpts) +} + +// IsTeleporterAddressPaused is a free data retrieval call binding the contract method 0x97314297. +// +// Solidity: function isTeleporterAddressPaused(address teleporterAddress) view returns(bool) +func (_TokenRemote *TokenRemoteCaller) IsTeleporterAddressPaused(opts *bind.CallOpts, teleporterAddress common.Address) (bool, error) { + var out []interface{} + err := _TokenRemote.contract.Call(opts, &out, "isTeleporterAddressPaused", teleporterAddress) + + if err != nil { + return *new(bool), err + } + + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + + return out0, err + +} + +// IsTeleporterAddressPaused is a free data retrieval call binding the contract method 0x97314297. +// +// Solidity: function isTeleporterAddressPaused(address teleporterAddress) view returns(bool) +func (_TokenRemote *TokenRemoteSession) IsTeleporterAddressPaused(teleporterAddress common.Address) (bool, error) { + return _TokenRemote.Contract.IsTeleporterAddressPaused(&_TokenRemote.CallOpts, teleporterAddress) +} + +// IsTeleporterAddressPaused is a free data retrieval call binding the contract method 0x97314297. +// +// Solidity: function isTeleporterAddressPaused(address teleporterAddress) view returns(bool) +func (_TokenRemote *TokenRemoteCallerSession) IsTeleporterAddressPaused(teleporterAddress common.Address) (bool, error) { + return _TokenRemote.Contract.IsTeleporterAddressPaused(&_TokenRemote.CallOpts, teleporterAddress) +} + +// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. +// +// Solidity: function owner() view returns(address) +func (_TokenRemote *TokenRemoteCaller) Owner(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _TokenRemote.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 (_TokenRemote *TokenRemoteSession) Owner() (common.Address, error) { + return _TokenRemote.Contract.Owner(&_TokenRemote.CallOpts) +} + +// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. +// +// Solidity: function owner() view returns(address) +func (_TokenRemote *TokenRemoteCallerSession) Owner() (common.Address, error) { + return _TokenRemote.Contract.Owner(&_TokenRemote.CallOpts) +} + +// PauseTeleporterAddress is a paid mutator transaction binding the contract method 0x2b0d8f18. +// +// Solidity: function pauseTeleporterAddress(address teleporterAddress) returns() +func (_TokenRemote *TokenRemoteTransactor) PauseTeleporterAddress(opts *bind.TransactOpts, teleporterAddress common.Address) (*types.Transaction, error) { + return _TokenRemote.contract.Transact(opts, "pauseTeleporterAddress", teleporterAddress) +} + +// PauseTeleporterAddress is a paid mutator transaction binding the contract method 0x2b0d8f18. +// +// Solidity: function pauseTeleporterAddress(address teleporterAddress) returns() +func (_TokenRemote *TokenRemoteSession) PauseTeleporterAddress(teleporterAddress common.Address) (*types.Transaction, error) { + return _TokenRemote.Contract.PauseTeleporterAddress(&_TokenRemote.TransactOpts, teleporterAddress) +} + +// PauseTeleporterAddress is a paid mutator transaction binding the contract method 0x2b0d8f18. +// +// Solidity: function pauseTeleporterAddress(address teleporterAddress) returns() +func (_TokenRemote *TokenRemoteTransactorSession) PauseTeleporterAddress(teleporterAddress common.Address) (*types.Transaction, error) { + return _TokenRemote.Contract.PauseTeleporterAddress(&_TokenRemote.TransactOpts, teleporterAddress) +} + +// ReceiveTeleporterMessage is a paid mutator transaction binding the contract method 0xc868efaa. +// +// Solidity: function receiveTeleporterMessage(bytes32 sourceBlockchainID, address originSenderAddress, bytes message) returns() +func (_TokenRemote *TokenRemoteTransactor) ReceiveTeleporterMessage(opts *bind.TransactOpts, sourceBlockchainID [32]byte, originSenderAddress common.Address, message []byte) (*types.Transaction, error) { + return _TokenRemote.contract.Transact(opts, "receiveTeleporterMessage", sourceBlockchainID, originSenderAddress, message) +} + +// ReceiveTeleporterMessage is a paid mutator transaction binding the contract method 0xc868efaa. +// +// Solidity: function receiveTeleporterMessage(bytes32 sourceBlockchainID, address originSenderAddress, bytes message) returns() +func (_TokenRemote *TokenRemoteSession) ReceiveTeleporterMessage(sourceBlockchainID [32]byte, originSenderAddress common.Address, message []byte) (*types.Transaction, error) { + return _TokenRemote.Contract.ReceiveTeleporterMessage(&_TokenRemote.TransactOpts, sourceBlockchainID, originSenderAddress, message) +} + +// ReceiveTeleporterMessage is a paid mutator transaction binding the contract method 0xc868efaa. +// +// Solidity: function receiveTeleporterMessage(bytes32 sourceBlockchainID, address originSenderAddress, bytes message) returns() +func (_TokenRemote *TokenRemoteTransactorSession) ReceiveTeleporterMessage(sourceBlockchainID [32]byte, originSenderAddress common.Address, message []byte) (*types.Transaction, error) { + return _TokenRemote.Contract.ReceiveTeleporterMessage(&_TokenRemote.TransactOpts, sourceBlockchainID, originSenderAddress, message) +} + +// RegisterWithHome is a paid mutator transaction binding the contract method 0xb8a46d02. +// +// Solidity: function registerWithHome((address,uint256) feeInfo) returns() +func (_TokenRemote *TokenRemoteTransactor) RegisterWithHome(opts *bind.TransactOpts, feeInfo TeleporterFeeInfo) (*types.Transaction, error) { + return _TokenRemote.contract.Transact(opts, "registerWithHome", feeInfo) +} + +// RegisterWithHome is a paid mutator transaction binding the contract method 0xb8a46d02. +// +// Solidity: function registerWithHome((address,uint256) feeInfo) returns() +func (_TokenRemote *TokenRemoteSession) RegisterWithHome(feeInfo TeleporterFeeInfo) (*types.Transaction, error) { + return _TokenRemote.Contract.RegisterWithHome(&_TokenRemote.TransactOpts, feeInfo) +} + +// RegisterWithHome is a paid mutator transaction binding the contract method 0xb8a46d02. +// +// Solidity: function registerWithHome((address,uint256) feeInfo) returns() +func (_TokenRemote *TokenRemoteTransactorSession) RegisterWithHome(feeInfo TeleporterFeeInfo) (*types.Transaction, error) { + return _TokenRemote.Contract.RegisterWithHome(&_TokenRemote.TransactOpts, feeInfo) +} + +// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. +// +// Solidity: function renounceOwnership() returns() +func (_TokenRemote *TokenRemoteTransactor) RenounceOwnership(opts *bind.TransactOpts) (*types.Transaction, error) { + return _TokenRemote.contract.Transact(opts, "renounceOwnership") +} + +// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. +// +// Solidity: function renounceOwnership() returns() +func (_TokenRemote *TokenRemoteSession) RenounceOwnership() (*types.Transaction, error) { + return _TokenRemote.Contract.RenounceOwnership(&_TokenRemote.TransactOpts) +} + +// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. +// +// Solidity: function renounceOwnership() returns() +func (_TokenRemote *TokenRemoteTransactorSession) RenounceOwnership() (*types.Transaction, error) { + return _TokenRemote.Contract.RenounceOwnership(&_TokenRemote.TransactOpts) +} + +// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// +// Solidity: function transferOwnership(address newOwner) returns() +func (_TokenRemote *TokenRemoteTransactor) TransferOwnership(opts *bind.TransactOpts, newOwner common.Address) (*types.Transaction, error) { + return _TokenRemote.contract.Transact(opts, "transferOwnership", newOwner) +} + +// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// +// Solidity: function transferOwnership(address newOwner) returns() +func (_TokenRemote *TokenRemoteSession) TransferOwnership(newOwner common.Address) (*types.Transaction, error) { + return _TokenRemote.Contract.TransferOwnership(&_TokenRemote.TransactOpts, newOwner) +} + +// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// +// Solidity: function transferOwnership(address newOwner) returns() +func (_TokenRemote *TokenRemoteTransactorSession) TransferOwnership(newOwner common.Address) (*types.Transaction, error) { + return _TokenRemote.Contract.TransferOwnership(&_TokenRemote.TransactOpts, newOwner) +} + +// UnpauseTeleporterAddress is a paid mutator transaction binding the contract method 0x4511243e. +// +// Solidity: function unpauseTeleporterAddress(address teleporterAddress) returns() +func (_TokenRemote *TokenRemoteTransactor) UnpauseTeleporterAddress(opts *bind.TransactOpts, teleporterAddress common.Address) (*types.Transaction, error) { + return _TokenRemote.contract.Transact(opts, "unpauseTeleporterAddress", teleporterAddress) +} + +// UnpauseTeleporterAddress is a paid mutator transaction binding the contract method 0x4511243e. +// +// Solidity: function unpauseTeleporterAddress(address teleporterAddress) returns() +func (_TokenRemote *TokenRemoteSession) UnpauseTeleporterAddress(teleporterAddress common.Address) (*types.Transaction, error) { + return _TokenRemote.Contract.UnpauseTeleporterAddress(&_TokenRemote.TransactOpts, teleporterAddress) +} + +// UnpauseTeleporterAddress is a paid mutator transaction binding the contract method 0x4511243e. +// +// Solidity: function unpauseTeleporterAddress(address teleporterAddress) returns() +func (_TokenRemote *TokenRemoteTransactorSession) UnpauseTeleporterAddress(teleporterAddress common.Address) (*types.Transaction, error) { + return _TokenRemote.Contract.UnpauseTeleporterAddress(&_TokenRemote.TransactOpts, teleporterAddress) +} + +// UpdateMinTeleporterVersion is a paid mutator transaction binding the contract method 0x5eb99514. +// +// Solidity: function updateMinTeleporterVersion(uint256 version) returns() +func (_TokenRemote *TokenRemoteTransactor) UpdateMinTeleporterVersion(opts *bind.TransactOpts, version *big.Int) (*types.Transaction, error) { + return _TokenRemote.contract.Transact(opts, "updateMinTeleporterVersion", version) +} + +// UpdateMinTeleporterVersion is a paid mutator transaction binding the contract method 0x5eb99514. +// +// Solidity: function updateMinTeleporterVersion(uint256 version) returns() +func (_TokenRemote *TokenRemoteSession) UpdateMinTeleporterVersion(version *big.Int) (*types.Transaction, error) { + return _TokenRemote.Contract.UpdateMinTeleporterVersion(&_TokenRemote.TransactOpts, version) +} + +// UpdateMinTeleporterVersion is a paid mutator transaction binding the contract method 0x5eb99514. +// +// Solidity: function updateMinTeleporterVersion(uint256 version) returns() +func (_TokenRemote *TokenRemoteTransactorSession) UpdateMinTeleporterVersion(version *big.Int) (*types.Transaction, error) { + return _TokenRemote.Contract.UpdateMinTeleporterVersion(&_TokenRemote.TransactOpts, version) +} + +// TokenRemoteCallFailedIterator is returned from FilterCallFailed and is used to iterate over the raw logs and unpacked data for CallFailed events raised by the TokenRemote contract. +type TokenRemoteCallFailedIterator struct { + Event *TokenRemoteCallFailed // 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 interfaces.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 *TokenRemoteCallFailedIterator) 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(TokenRemoteCallFailed) + 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(TokenRemoteCallFailed) + 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 *TokenRemoteCallFailedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *TokenRemoteCallFailedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// TokenRemoteCallFailed represents a CallFailed event raised by the TokenRemote contract. +type TokenRemoteCallFailed struct { + RecipientContract common.Address + Amount *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterCallFailed is a free log retrieval operation binding the contract event 0xb9eaeae386d339f8115782f297a9e5f0e13fb587cd6b0d502f113cb8dd4d6cb0. +// +// Solidity: event CallFailed(address indexed recipientContract, uint256 amount) +func (_TokenRemote *TokenRemoteFilterer) FilterCallFailed(opts *bind.FilterOpts, recipientContract []common.Address) (*TokenRemoteCallFailedIterator, error) { + + var recipientContractRule []interface{} + for _, recipientContractItem := range recipientContract { + recipientContractRule = append(recipientContractRule, recipientContractItem) + } + + logs, sub, err := _TokenRemote.contract.FilterLogs(opts, "CallFailed", recipientContractRule) + if err != nil { + return nil, err + } + return &TokenRemoteCallFailedIterator{contract: _TokenRemote.contract, event: "CallFailed", logs: logs, sub: sub}, nil +} + +// WatchCallFailed is a free log subscription operation binding the contract event 0xb9eaeae386d339f8115782f297a9e5f0e13fb587cd6b0d502f113cb8dd4d6cb0. +// +// Solidity: event CallFailed(address indexed recipientContract, uint256 amount) +func (_TokenRemote *TokenRemoteFilterer) WatchCallFailed(opts *bind.WatchOpts, sink chan<- *TokenRemoteCallFailed, recipientContract []common.Address) (event.Subscription, error) { + + var recipientContractRule []interface{} + for _, recipientContractItem := range recipientContract { + recipientContractRule = append(recipientContractRule, recipientContractItem) + } + + logs, sub, err := _TokenRemote.contract.WatchLogs(opts, "CallFailed", recipientContractRule) + 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(TokenRemoteCallFailed) + if err := _TokenRemote.contract.UnpackLog(event, "CallFailed", 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 +} + +// ParseCallFailed is a log parse operation binding the contract event 0xb9eaeae386d339f8115782f297a9e5f0e13fb587cd6b0d502f113cb8dd4d6cb0. +// +// Solidity: event CallFailed(address indexed recipientContract, uint256 amount) +func (_TokenRemote *TokenRemoteFilterer) ParseCallFailed(log types.Log) (*TokenRemoteCallFailed, error) { + event := new(TokenRemoteCallFailed) + if err := _TokenRemote.contract.UnpackLog(event, "CallFailed", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// TokenRemoteCallSucceededIterator is returned from FilterCallSucceeded and is used to iterate over the raw logs and unpacked data for CallSucceeded events raised by the TokenRemote contract. +type TokenRemoteCallSucceededIterator struct { + Event *TokenRemoteCallSucceeded // 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 interfaces.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 *TokenRemoteCallSucceededIterator) 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(TokenRemoteCallSucceeded) + 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(TokenRemoteCallSucceeded) + 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 *TokenRemoteCallSucceededIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *TokenRemoteCallSucceededIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// TokenRemoteCallSucceeded represents a CallSucceeded event raised by the TokenRemote contract. +type TokenRemoteCallSucceeded struct { + RecipientContract common.Address + Amount *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterCallSucceeded is a free log retrieval operation binding the contract event 0x104deb555f67e63782bb817bc26c39050894645f9b9f29c4be8ae68d0e8b7ff4. +// +// Solidity: event CallSucceeded(address indexed recipientContract, uint256 amount) +func (_TokenRemote *TokenRemoteFilterer) FilterCallSucceeded(opts *bind.FilterOpts, recipientContract []common.Address) (*TokenRemoteCallSucceededIterator, error) { + + var recipientContractRule []interface{} + for _, recipientContractItem := range recipientContract { + recipientContractRule = append(recipientContractRule, recipientContractItem) + } + + logs, sub, err := _TokenRemote.contract.FilterLogs(opts, "CallSucceeded", recipientContractRule) + if err != nil { + return nil, err + } + return &TokenRemoteCallSucceededIterator{contract: _TokenRemote.contract, event: "CallSucceeded", logs: logs, sub: sub}, nil +} + +// WatchCallSucceeded is a free log subscription operation binding the contract event 0x104deb555f67e63782bb817bc26c39050894645f9b9f29c4be8ae68d0e8b7ff4. +// +// Solidity: event CallSucceeded(address indexed recipientContract, uint256 amount) +func (_TokenRemote *TokenRemoteFilterer) WatchCallSucceeded(opts *bind.WatchOpts, sink chan<- *TokenRemoteCallSucceeded, recipientContract []common.Address) (event.Subscription, error) { + + var recipientContractRule []interface{} + for _, recipientContractItem := range recipientContract { + recipientContractRule = append(recipientContractRule, recipientContractItem) + } + + logs, sub, err := _TokenRemote.contract.WatchLogs(opts, "CallSucceeded", recipientContractRule) + 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(TokenRemoteCallSucceeded) + if err := _TokenRemote.contract.UnpackLog(event, "CallSucceeded", 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 +} + +// ParseCallSucceeded is a log parse operation binding the contract event 0x104deb555f67e63782bb817bc26c39050894645f9b9f29c4be8ae68d0e8b7ff4. +// +// Solidity: event CallSucceeded(address indexed recipientContract, uint256 amount) +func (_TokenRemote *TokenRemoteFilterer) ParseCallSucceeded(log types.Log) (*TokenRemoteCallSucceeded, error) { + event := new(TokenRemoteCallSucceeded) + if err := _TokenRemote.contract.UnpackLog(event, "CallSucceeded", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// TokenRemoteInitializedIterator is returned from FilterInitialized and is used to iterate over the raw logs and unpacked data for Initialized events raised by the TokenRemote contract. +type TokenRemoteInitializedIterator struct { + Event *TokenRemoteInitialized // 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 interfaces.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 *TokenRemoteInitializedIterator) 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(TokenRemoteInitialized) + 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(TokenRemoteInitialized) + 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 *TokenRemoteInitializedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *TokenRemoteInitializedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// TokenRemoteInitialized represents a Initialized event raised by the TokenRemote contract. +type TokenRemoteInitialized struct { + Version uint64 + Raw types.Log // Blockchain specific contextual infos +} + +// FilterInitialized is a free log retrieval operation binding the contract event 0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2. +// +// Solidity: event Initialized(uint64 version) +func (_TokenRemote *TokenRemoteFilterer) FilterInitialized(opts *bind.FilterOpts) (*TokenRemoteInitializedIterator, error) { + + logs, sub, err := _TokenRemote.contract.FilterLogs(opts, "Initialized") + if err != nil { + return nil, err + } + return &TokenRemoteInitializedIterator{contract: _TokenRemote.contract, event: "Initialized", logs: logs, sub: sub}, nil +} + +// WatchInitialized is a free log subscription operation binding the contract event 0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2. +// +// Solidity: event Initialized(uint64 version) +func (_TokenRemote *TokenRemoteFilterer) WatchInitialized(opts *bind.WatchOpts, sink chan<- *TokenRemoteInitialized) (event.Subscription, error) { + + logs, sub, err := _TokenRemote.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(TokenRemoteInitialized) + if err := _TokenRemote.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 0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2. +// +// Solidity: event Initialized(uint64 version) +func (_TokenRemote *TokenRemoteFilterer) ParseInitialized(log types.Log) (*TokenRemoteInitialized, error) { + event := new(TokenRemoteInitialized) + if err := _TokenRemote.contract.UnpackLog(event, "Initialized", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// TokenRemoteMinTeleporterVersionUpdatedIterator is returned from FilterMinTeleporterVersionUpdated and is used to iterate over the raw logs and unpacked data for MinTeleporterVersionUpdated events raised by the TokenRemote contract. +type TokenRemoteMinTeleporterVersionUpdatedIterator struct { + Event *TokenRemoteMinTeleporterVersionUpdated // 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 interfaces.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 *TokenRemoteMinTeleporterVersionUpdatedIterator) 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(TokenRemoteMinTeleporterVersionUpdated) + 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(TokenRemoteMinTeleporterVersionUpdated) + 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 *TokenRemoteMinTeleporterVersionUpdatedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *TokenRemoteMinTeleporterVersionUpdatedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// TokenRemoteMinTeleporterVersionUpdated represents a MinTeleporterVersionUpdated event raised by the TokenRemote contract. +type TokenRemoteMinTeleporterVersionUpdated struct { + OldMinTeleporterVersion *big.Int + NewMinTeleporterVersion *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterMinTeleporterVersionUpdated is a free log retrieval operation binding the contract event 0xa9a7ef57e41f05b4c15480842f5f0c27edfcbb553fed281f7c4068452cc1c02d. +// +// Solidity: event MinTeleporterVersionUpdated(uint256 indexed oldMinTeleporterVersion, uint256 indexed newMinTeleporterVersion) +func (_TokenRemote *TokenRemoteFilterer) FilterMinTeleporterVersionUpdated(opts *bind.FilterOpts, oldMinTeleporterVersion []*big.Int, newMinTeleporterVersion []*big.Int) (*TokenRemoteMinTeleporterVersionUpdatedIterator, error) { + + var oldMinTeleporterVersionRule []interface{} + for _, oldMinTeleporterVersionItem := range oldMinTeleporterVersion { + oldMinTeleporterVersionRule = append(oldMinTeleporterVersionRule, oldMinTeleporterVersionItem) + } + var newMinTeleporterVersionRule []interface{} + for _, newMinTeleporterVersionItem := range newMinTeleporterVersion { + newMinTeleporterVersionRule = append(newMinTeleporterVersionRule, newMinTeleporterVersionItem) + } + + logs, sub, err := _TokenRemote.contract.FilterLogs(opts, "MinTeleporterVersionUpdated", oldMinTeleporterVersionRule, newMinTeleporterVersionRule) + if err != nil { + return nil, err + } + return &TokenRemoteMinTeleporterVersionUpdatedIterator{contract: _TokenRemote.contract, event: "MinTeleporterVersionUpdated", logs: logs, sub: sub}, nil +} + +// WatchMinTeleporterVersionUpdated is a free log subscription operation binding the contract event 0xa9a7ef57e41f05b4c15480842f5f0c27edfcbb553fed281f7c4068452cc1c02d. +// +// Solidity: event MinTeleporterVersionUpdated(uint256 indexed oldMinTeleporterVersion, uint256 indexed newMinTeleporterVersion) +func (_TokenRemote *TokenRemoteFilterer) WatchMinTeleporterVersionUpdated(opts *bind.WatchOpts, sink chan<- *TokenRemoteMinTeleporterVersionUpdated, oldMinTeleporterVersion []*big.Int, newMinTeleporterVersion []*big.Int) (event.Subscription, error) { + + var oldMinTeleporterVersionRule []interface{} + for _, oldMinTeleporterVersionItem := range oldMinTeleporterVersion { + oldMinTeleporterVersionRule = append(oldMinTeleporterVersionRule, oldMinTeleporterVersionItem) + } + var newMinTeleporterVersionRule []interface{} + for _, newMinTeleporterVersionItem := range newMinTeleporterVersion { + newMinTeleporterVersionRule = append(newMinTeleporterVersionRule, newMinTeleporterVersionItem) + } + + logs, sub, err := _TokenRemote.contract.WatchLogs(opts, "MinTeleporterVersionUpdated", oldMinTeleporterVersionRule, newMinTeleporterVersionRule) + 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(TokenRemoteMinTeleporterVersionUpdated) + if err := _TokenRemote.contract.UnpackLog(event, "MinTeleporterVersionUpdated", 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 +} + +// ParseMinTeleporterVersionUpdated is a log parse operation binding the contract event 0xa9a7ef57e41f05b4c15480842f5f0c27edfcbb553fed281f7c4068452cc1c02d. +// +// Solidity: event MinTeleporterVersionUpdated(uint256 indexed oldMinTeleporterVersion, uint256 indexed newMinTeleporterVersion) +func (_TokenRemote *TokenRemoteFilterer) ParseMinTeleporterVersionUpdated(log types.Log) (*TokenRemoteMinTeleporterVersionUpdated, error) { + event := new(TokenRemoteMinTeleporterVersionUpdated) + if err := _TokenRemote.contract.UnpackLog(event, "MinTeleporterVersionUpdated", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// TokenRemoteOwnershipTransferredIterator is returned from FilterOwnershipTransferred and is used to iterate over the raw logs and unpacked data for OwnershipTransferred events raised by the TokenRemote contract. +type TokenRemoteOwnershipTransferredIterator struct { + Event *TokenRemoteOwnershipTransferred // 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 interfaces.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 *TokenRemoteOwnershipTransferredIterator) 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(TokenRemoteOwnershipTransferred) + 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(TokenRemoteOwnershipTransferred) + 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 *TokenRemoteOwnershipTransferredIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *TokenRemoteOwnershipTransferredIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// TokenRemoteOwnershipTransferred represents a OwnershipTransferred event raised by the TokenRemote contract. +type TokenRemoteOwnershipTransferred 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 (_TokenRemote *TokenRemoteFilterer) FilterOwnershipTransferred(opts *bind.FilterOpts, previousOwner []common.Address, newOwner []common.Address) (*TokenRemoteOwnershipTransferredIterator, 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 := _TokenRemote.contract.FilterLogs(opts, "OwnershipTransferred", previousOwnerRule, newOwnerRule) + if err != nil { + return nil, err + } + return &TokenRemoteOwnershipTransferredIterator{contract: _TokenRemote.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 (_TokenRemote *TokenRemoteFilterer) WatchOwnershipTransferred(opts *bind.WatchOpts, sink chan<- *TokenRemoteOwnershipTransferred, 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 := _TokenRemote.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(TokenRemoteOwnershipTransferred) + if err := _TokenRemote.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 (_TokenRemote *TokenRemoteFilterer) ParseOwnershipTransferred(log types.Log) (*TokenRemoteOwnershipTransferred, error) { + event := new(TokenRemoteOwnershipTransferred) + if err := _TokenRemote.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// TokenRemoteTeleporterAddressPausedIterator is returned from FilterTeleporterAddressPaused and is used to iterate over the raw logs and unpacked data for TeleporterAddressPaused events raised by the TokenRemote contract. +type TokenRemoteTeleporterAddressPausedIterator struct { + Event *TokenRemoteTeleporterAddressPaused // 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 interfaces.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 *TokenRemoteTeleporterAddressPausedIterator) 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(TokenRemoteTeleporterAddressPaused) + 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(TokenRemoteTeleporterAddressPaused) + 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 *TokenRemoteTeleporterAddressPausedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *TokenRemoteTeleporterAddressPausedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// TokenRemoteTeleporterAddressPaused represents a TeleporterAddressPaused event raised by the TokenRemote contract. +type TokenRemoteTeleporterAddressPaused struct { + TeleporterAddress common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterTeleporterAddressPaused is a free log retrieval operation binding the contract event 0x933f93e57a222e6330362af8b376d0a8725b6901e9a2fb86d00f169702b28a4c. +// +// Solidity: event TeleporterAddressPaused(address indexed teleporterAddress) +func (_TokenRemote *TokenRemoteFilterer) FilterTeleporterAddressPaused(opts *bind.FilterOpts, teleporterAddress []common.Address) (*TokenRemoteTeleporterAddressPausedIterator, error) { + + var teleporterAddressRule []interface{} + for _, teleporterAddressItem := range teleporterAddress { + teleporterAddressRule = append(teleporterAddressRule, teleporterAddressItem) + } + + logs, sub, err := _TokenRemote.contract.FilterLogs(opts, "TeleporterAddressPaused", teleporterAddressRule) + if err != nil { + return nil, err + } + return &TokenRemoteTeleporterAddressPausedIterator{contract: _TokenRemote.contract, event: "TeleporterAddressPaused", logs: logs, sub: sub}, nil +} + +// WatchTeleporterAddressPaused is a free log subscription operation binding the contract event 0x933f93e57a222e6330362af8b376d0a8725b6901e9a2fb86d00f169702b28a4c. +// +// Solidity: event TeleporterAddressPaused(address indexed teleporterAddress) +func (_TokenRemote *TokenRemoteFilterer) WatchTeleporterAddressPaused(opts *bind.WatchOpts, sink chan<- *TokenRemoteTeleporterAddressPaused, teleporterAddress []common.Address) (event.Subscription, error) { + + var teleporterAddressRule []interface{} + for _, teleporterAddressItem := range teleporterAddress { + teleporterAddressRule = append(teleporterAddressRule, teleporterAddressItem) + } + + logs, sub, err := _TokenRemote.contract.WatchLogs(opts, "TeleporterAddressPaused", teleporterAddressRule) + 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(TokenRemoteTeleporterAddressPaused) + if err := _TokenRemote.contract.UnpackLog(event, "TeleporterAddressPaused", 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 +} + +// ParseTeleporterAddressPaused is a log parse operation binding the contract event 0x933f93e57a222e6330362af8b376d0a8725b6901e9a2fb86d00f169702b28a4c. +// +// Solidity: event TeleporterAddressPaused(address indexed teleporterAddress) +func (_TokenRemote *TokenRemoteFilterer) ParseTeleporterAddressPaused(log types.Log) (*TokenRemoteTeleporterAddressPaused, error) { + event := new(TokenRemoteTeleporterAddressPaused) + if err := _TokenRemote.contract.UnpackLog(event, "TeleporterAddressPaused", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// TokenRemoteTeleporterAddressUnpausedIterator is returned from FilterTeleporterAddressUnpaused and is used to iterate over the raw logs and unpacked data for TeleporterAddressUnpaused events raised by the TokenRemote contract. +type TokenRemoteTeleporterAddressUnpausedIterator struct { + Event *TokenRemoteTeleporterAddressUnpaused // 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 interfaces.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 *TokenRemoteTeleporterAddressUnpausedIterator) 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(TokenRemoteTeleporterAddressUnpaused) + 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(TokenRemoteTeleporterAddressUnpaused) + 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 *TokenRemoteTeleporterAddressUnpausedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *TokenRemoteTeleporterAddressUnpausedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// TokenRemoteTeleporterAddressUnpaused represents a TeleporterAddressUnpaused event raised by the TokenRemote contract. +type TokenRemoteTeleporterAddressUnpaused struct { + TeleporterAddress common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterTeleporterAddressUnpaused is a free log retrieval operation binding the contract event 0x844e2f3154214672229235858fd029d1dfd543901c6d05931f0bc2480a2d72c3. +// +// Solidity: event TeleporterAddressUnpaused(address indexed teleporterAddress) +func (_TokenRemote *TokenRemoteFilterer) FilterTeleporterAddressUnpaused(opts *bind.FilterOpts, teleporterAddress []common.Address) (*TokenRemoteTeleporterAddressUnpausedIterator, error) { + + var teleporterAddressRule []interface{} + for _, teleporterAddressItem := range teleporterAddress { + teleporterAddressRule = append(teleporterAddressRule, teleporterAddressItem) + } + + logs, sub, err := _TokenRemote.contract.FilterLogs(opts, "TeleporterAddressUnpaused", teleporterAddressRule) + if err != nil { + return nil, err + } + return &TokenRemoteTeleporterAddressUnpausedIterator{contract: _TokenRemote.contract, event: "TeleporterAddressUnpaused", logs: logs, sub: sub}, nil +} + +// WatchTeleporterAddressUnpaused is a free log subscription operation binding the contract event 0x844e2f3154214672229235858fd029d1dfd543901c6d05931f0bc2480a2d72c3. +// +// Solidity: event TeleporterAddressUnpaused(address indexed teleporterAddress) +func (_TokenRemote *TokenRemoteFilterer) WatchTeleporterAddressUnpaused(opts *bind.WatchOpts, sink chan<- *TokenRemoteTeleporterAddressUnpaused, teleporterAddress []common.Address) (event.Subscription, error) { + + var teleporterAddressRule []interface{} + for _, teleporterAddressItem := range teleporterAddress { + teleporterAddressRule = append(teleporterAddressRule, teleporterAddressItem) + } + + logs, sub, err := _TokenRemote.contract.WatchLogs(opts, "TeleporterAddressUnpaused", teleporterAddressRule) + 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(TokenRemoteTeleporterAddressUnpaused) + if err := _TokenRemote.contract.UnpackLog(event, "TeleporterAddressUnpaused", 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 +} + +// ParseTeleporterAddressUnpaused is a log parse operation binding the contract event 0x844e2f3154214672229235858fd029d1dfd543901c6d05931f0bc2480a2d72c3. +// +// Solidity: event TeleporterAddressUnpaused(address indexed teleporterAddress) +func (_TokenRemote *TokenRemoteFilterer) ParseTeleporterAddressUnpaused(log types.Log) (*TokenRemoteTeleporterAddressUnpaused, error) { + event := new(TokenRemoteTeleporterAddressUnpaused) + if err := _TokenRemote.contract.UnpackLog(event, "TeleporterAddressUnpaused", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// TokenRemoteTokensAndCallSentIterator is returned from FilterTokensAndCallSent and is used to iterate over the raw logs and unpacked data for TokensAndCallSent events raised by the TokenRemote contract. +type TokenRemoteTokensAndCallSentIterator struct { + Event *TokenRemoteTokensAndCallSent // 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 interfaces.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 *TokenRemoteTokensAndCallSentIterator) 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(TokenRemoteTokensAndCallSent) + 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(TokenRemoteTokensAndCallSent) + 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 *TokenRemoteTokensAndCallSentIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *TokenRemoteTokensAndCallSentIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// TokenRemoteTokensAndCallSent represents a TokensAndCallSent event raised by the TokenRemote contract. +type TokenRemoteTokensAndCallSent struct { + TeleporterMessageID [32]byte + Sender common.Address + Input SendAndCallInput + Amount *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterTokensAndCallSent is a free log retrieval operation binding the contract event 0x5d76dff81bf773b908b050fa113d39f7d8135bb4175398f313ea19cd3a1a0b16. +// +// Solidity: event TokensAndCallSent(bytes32 indexed teleporterMessageID, address indexed sender, (bytes32,address,address,bytes,uint256,uint256,address,address,address,uint256,uint256) input, uint256 amount) +func (_TokenRemote *TokenRemoteFilterer) FilterTokensAndCallSent(opts *bind.FilterOpts, teleporterMessageID [][32]byte, sender []common.Address) (*TokenRemoteTokensAndCallSentIterator, error) { + + var teleporterMessageIDRule []interface{} + for _, teleporterMessageIDItem := range teleporterMessageID { + teleporterMessageIDRule = append(teleporterMessageIDRule, teleporterMessageIDItem) + } + var senderRule []interface{} + for _, senderItem := range sender { + senderRule = append(senderRule, senderItem) + } + + logs, sub, err := _TokenRemote.contract.FilterLogs(opts, "TokensAndCallSent", teleporterMessageIDRule, senderRule) + if err != nil { + return nil, err + } + return &TokenRemoteTokensAndCallSentIterator{contract: _TokenRemote.contract, event: "TokensAndCallSent", logs: logs, sub: sub}, nil +} + +// WatchTokensAndCallSent is a free log subscription operation binding the contract event 0x5d76dff81bf773b908b050fa113d39f7d8135bb4175398f313ea19cd3a1a0b16. +// +// Solidity: event TokensAndCallSent(bytes32 indexed teleporterMessageID, address indexed sender, (bytes32,address,address,bytes,uint256,uint256,address,address,address,uint256,uint256) input, uint256 amount) +func (_TokenRemote *TokenRemoteFilterer) WatchTokensAndCallSent(opts *bind.WatchOpts, sink chan<- *TokenRemoteTokensAndCallSent, teleporterMessageID [][32]byte, sender []common.Address) (event.Subscription, error) { + + var teleporterMessageIDRule []interface{} + for _, teleporterMessageIDItem := range teleporterMessageID { + teleporterMessageIDRule = append(teleporterMessageIDRule, teleporterMessageIDItem) + } + var senderRule []interface{} + for _, senderItem := range sender { + senderRule = append(senderRule, senderItem) + } + + logs, sub, err := _TokenRemote.contract.WatchLogs(opts, "TokensAndCallSent", teleporterMessageIDRule, senderRule) + 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(TokenRemoteTokensAndCallSent) + if err := _TokenRemote.contract.UnpackLog(event, "TokensAndCallSent", 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 +} + +// ParseTokensAndCallSent is a log parse operation binding the contract event 0x5d76dff81bf773b908b050fa113d39f7d8135bb4175398f313ea19cd3a1a0b16. +// +// Solidity: event TokensAndCallSent(bytes32 indexed teleporterMessageID, address indexed sender, (bytes32,address,address,bytes,uint256,uint256,address,address,address,uint256,uint256) input, uint256 amount) +func (_TokenRemote *TokenRemoteFilterer) ParseTokensAndCallSent(log types.Log) (*TokenRemoteTokensAndCallSent, error) { + event := new(TokenRemoteTokensAndCallSent) + if err := _TokenRemote.contract.UnpackLog(event, "TokensAndCallSent", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// TokenRemoteTokensSentIterator is returned from FilterTokensSent and is used to iterate over the raw logs and unpacked data for TokensSent events raised by the TokenRemote contract. +type TokenRemoteTokensSentIterator struct { + Event *TokenRemoteTokensSent // 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 interfaces.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 *TokenRemoteTokensSentIterator) 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(TokenRemoteTokensSent) + 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(TokenRemoteTokensSent) + 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 *TokenRemoteTokensSentIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *TokenRemoteTokensSentIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// TokenRemoteTokensSent represents a TokensSent event raised by the TokenRemote contract. +type TokenRemoteTokensSent struct { + TeleporterMessageID [32]byte + Sender common.Address + Input SendTokensInput + Amount *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterTokensSent is a free log retrieval operation binding the contract event 0x93f19bf1ec58a15dc643b37e7e18a1c13e85e06cd11929e283154691ace9fb52. +// +// Solidity: event TokensSent(bytes32 indexed teleporterMessageID, address indexed sender, (bytes32,address,address,address,uint256,uint256,uint256,address) input, uint256 amount) +func (_TokenRemote *TokenRemoteFilterer) FilterTokensSent(opts *bind.FilterOpts, teleporterMessageID [][32]byte, sender []common.Address) (*TokenRemoteTokensSentIterator, error) { + + var teleporterMessageIDRule []interface{} + for _, teleporterMessageIDItem := range teleporterMessageID { + teleporterMessageIDRule = append(teleporterMessageIDRule, teleporterMessageIDItem) + } + var senderRule []interface{} + for _, senderItem := range sender { + senderRule = append(senderRule, senderItem) + } + + logs, sub, err := _TokenRemote.contract.FilterLogs(opts, "TokensSent", teleporterMessageIDRule, senderRule) + if err != nil { + return nil, err + } + return &TokenRemoteTokensSentIterator{contract: _TokenRemote.contract, event: "TokensSent", logs: logs, sub: sub}, nil +} + +// WatchTokensSent is a free log subscription operation binding the contract event 0x93f19bf1ec58a15dc643b37e7e18a1c13e85e06cd11929e283154691ace9fb52. +// +// Solidity: event TokensSent(bytes32 indexed teleporterMessageID, address indexed sender, (bytes32,address,address,address,uint256,uint256,uint256,address) input, uint256 amount) +func (_TokenRemote *TokenRemoteFilterer) WatchTokensSent(opts *bind.WatchOpts, sink chan<- *TokenRemoteTokensSent, teleporterMessageID [][32]byte, sender []common.Address) (event.Subscription, error) { + + var teleporterMessageIDRule []interface{} + for _, teleporterMessageIDItem := range teleporterMessageID { + teleporterMessageIDRule = append(teleporterMessageIDRule, teleporterMessageIDItem) + } + var senderRule []interface{} + for _, senderItem := range sender { + senderRule = append(senderRule, senderItem) + } + + logs, sub, err := _TokenRemote.contract.WatchLogs(opts, "TokensSent", teleporterMessageIDRule, senderRule) + 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(TokenRemoteTokensSent) + if err := _TokenRemote.contract.UnpackLog(event, "TokensSent", 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 +} + +// ParseTokensSent is a log parse operation binding the contract event 0x93f19bf1ec58a15dc643b37e7e18a1c13e85e06cd11929e283154691ace9fb52. +// +// Solidity: event TokensSent(bytes32 indexed teleporterMessageID, address indexed sender, (bytes32,address,address,address,uint256,uint256,uint256,address) input, uint256 amount) +func (_TokenRemote *TokenRemoteFilterer) ParseTokensSent(log types.Log) (*TokenRemoteTokensSent, error) { + event := new(TokenRemoteTokensSent) + if err := _TokenRemote.contract.UnpackLog(event, "TokensSent", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// TokenRemoteTokensWithdrawnIterator is returned from FilterTokensWithdrawn and is used to iterate over the raw logs and unpacked data for TokensWithdrawn events raised by the TokenRemote contract. +type TokenRemoteTokensWithdrawnIterator struct { + Event *TokenRemoteTokensWithdrawn // 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 interfaces.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 *TokenRemoteTokensWithdrawnIterator) 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(TokenRemoteTokensWithdrawn) + 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(TokenRemoteTokensWithdrawn) + 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 *TokenRemoteTokensWithdrawnIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *TokenRemoteTokensWithdrawnIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// TokenRemoteTokensWithdrawn represents a TokensWithdrawn event raised by the TokenRemote contract. +type TokenRemoteTokensWithdrawn struct { + Recipient common.Address + Amount *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterTokensWithdrawn is a free log retrieval operation binding the contract event 0x6352c5382c4a4578e712449ca65e83cdb392d045dfcf1cad9615189db2da244b. +// +// Solidity: event TokensWithdrawn(address indexed recipient, uint256 amount) +func (_TokenRemote *TokenRemoteFilterer) FilterTokensWithdrawn(opts *bind.FilterOpts, recipient []common.Address) (*TokenRemoteTokensWithdrawnIterator, error) { + + var recipientRule []interface{} + for _, recipientItem := range recipient { + recipientRule = append(recipientRule, recipientItem) + } + + logs, sub, err := _TokenRemote.contract.FilterLogs(opts, "TokensWithdrawn", recipientRule) + if err != nil { + return nil, err + } + return &TokenRemoteTokensWithdrawnIterator{contract: _TokenRemote.contract, event: "TokensWithdrawn", logs: logs, sub: sub}, nil +} + +// WatchTokensWithdrawn is a free log subscription operation binding the contract event 0x6352c5382c4a4578e712449ca65e83cdb392d045dfcf1cad9615189db2da244b. +// +// Solidity: event TokensWithdrawn(address indexed recipient, uint256 amount) +func (_TokenRemote *TokenRemoteFilterer) WatchTokensWithdrawn(opts *bind.WatchOpts, sink chan<- *TokenRemoteTokensWithdrawn, recipient []common.Address) (event.Subscription, error) { + + var recipientRule []interface{} + for _, recipientItem := range recipient { + recipientRule = append(recipientRule, recipientItem) + } + + logs, sub, err := _TokenRemote.contract.WatchLogs(opts, "TokensWithdrawn", recipientRule) + 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(TokenRemoteTokensWithdrawn) + if err := _TokenRemote.contract.UnpackLog(event, "TokensWithdrawn", 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 +} + +// ParseTokensWithdrawn is a log parse operation binding the contract event 0x6352c5382c4a4578e712449ca65e83cdb392d045dfcf1cad9615189db2da244b. +// +// Solidity: event TokensWithdrawn(address indexed recipient, uint256 amount) +func (_TokenRemote *TokenRemoteFilterer) ParseTokensWithdrawn(log types.Log) (*TokenRemoteTokensWithdrawn, error) { + event := new(TokenRemoteTokensWithdrawn) + if err := _TokenRemote.contract.UnpackLog(event, "TokensWithdrawn", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} diff --git a/abi-bindings/go/ictt/WrappedNativeToken/WrappedNativeToken.go b/abi-bindings/go/ictt/WrappedNativeToken/WrappedNativeToken.go new file mode 100644 index 000000000..8bf864fc2 --- /dev/null +++ b/abi-bindings/go/ictt/WrappedNativeToken/WrappedNativeToken.go @@ -0,0 +1,1134 @@ +// Code generated - DO NOT EDIT. +// This file is a generated binding and any manual changes will be lost. + +package wrappednativetoken + +import ( + "errors" + "math/big" + "strings" + + "github.com/ava-labs/subnet-evm/accounts/abi" + "github.com/ava-labs/subnet-evm/accounts/abi/bind" + "github.com/ava-labs/subnet-evm/core/types" + "github.com/ava-labs/subnet-evm/interfaces" + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/event" +) + +// Reference imports to suppress errors if they are not otherwise used. +var ( + _ = errors.New + _ = big.NewInt + _ = strings.NewReader + _ = interfaces.NotFound + _ = bind.Bind + _ = common.Big1 + _ = types.BloomLookup + _ = event.NewSubscription + _ = abi.ConvertType +) + +// WrappedNativeTokenMetaData contains all meta data concerning the WrappedNativeToken contract. +var WrappedNativeTokenMetaData = &bind.MetaData{ + ABI: "[{\"inputs\":[{\"internalType\":\"string\",\"name\":\"symbol\",\"type\":\"string\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"AddressInsufficientBalance\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"allowance\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"needed\",\"type\":\"uint256\"}],\"name\":\"ERC20InsufficientAllowance\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"balance\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"needed\",\"type\":\"uint256\"}],\"name\":\"ERC20InsufficientBalance\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"approver\",\"type\":\"address\"}],\"name\":\"ERC20InvalidApprover\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"}],\"name\":\"ERC20InvalidReceiver\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"ERC20InvalidSender\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"ERC20InvalidSpender\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"FailedInnerCall\",\"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\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"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\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Withdrawal\",\"type\":\"event\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"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\":\"value\",\"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\":[],\"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\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"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\":\"value\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"withdraw\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}]", + Bin: "0x608060405234801561000f575f80fd5b50604051610c5e380380610c5e83398101604081905261002e916100c7565b8060405160200161003f919061016e565b6040516020818303038152906040528160405160200161005f919061019d565b60408051601f19818403018152919052600361007b8382610249565b5060046100888282610249565b50505050610308565b634e487b7160e01b5f52604160045260245ffd5b5f5b838110156100bf5781810151838201526020016100a7565b50505f910152565b5f602082840312156100d7575f80fd5b81516001600160401b03808211156100ed575f80fd5b818401915084601f830112610100575f80fd5b81518181111561011257610112610091565b604051601f8201601f19908116603f0116810190838211818310171561013a5761013a610091565b81604052828152876020848701011115610152575f80fd5b6101638360208301602088016100a5565b979650505050505050565b6702bb930b83832b2160c51b81525f82516101908160088501602087016100a5565b9190910160080192915050565b605760f81b81525f82516101b88160018501602087016100a5565b9190910160010192915050565b600181811c908216806101d957607f821691505b6020821081036101f757634e487b7160e01b5f52602260045260245ffd5b50919050565b601f82111561024457805f5260205f20601f840160051c810160208510156102225750805b601f840160051c820191505b81811015610241575f815560010161022e565b50505b505050565b81516001600160401b0381111561026257610262610091565b6102768161027084546101c5565b846101fd565b602080601f8311600181146102a9575f84156102925750858301515b5f19600386901b1c1916600185901b178555610300565b5f85815260208120601f198616915b828110156102d7578886015182559484019460019091019084016102b8565b50858210156102f457878501515f19600388901b60f8161c191681555b505060018460011b0185555b505050505050565b610949806103155f395ff3fe60806040526004361061009f575f3560e01c8063313ce56711610063578063313ce5671461016b57806370a082311461018657806395d89b41146101ba578063a9059cbb146101ce578063d0e30db0146100ae578063dd62ed3e146101ed576100ae565b806306fdde03146100b6578063095ea7b3146100e057806318160ddd1461010f57806323b872dd1461012d5780632e1a7d4d1461014c576100ae565b366100ae576100ac610231565b005b6100ac610231565b3480156100c1575f80fd5b506100ca610272565b6040516100d7919061078c565b60405180910390f35b3480156100eb575f80fd5b506100ff6100fa3660046107f3565b610302565b60405190151581526020016100d7565b34801561011a575f80fd5b506002545b6040519081526020016100d7565b348015610138575f80fd5b506100ff61014736600461081b565b61031b565b348015610157575f80fd5b506100ac610166366004610854565b61033e565b348015610176575f80fd5b50604051601281526020016100d7565b348015610191575f80fd5b5061011f6101a036600461086b565b6001600160a01b03165f9081526020819052604090205490565b3480156101c5575f80fd5b506100ca61038a565b3480156101d9575f80fd5b506100ff6101e83660046107f3565b610399565b3480156101f8575f80fd5b5061011f61020736600461088b565b6001600160a01b039182165f90815260016020908152604080832093909416825291909152205490565b61023b33346103a6565b60405134815233907fe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c9060200160405180910390a2565b606060038054610281906108bc565b80601f01602080910402602001604051908101604052809291908181526020018280546102ad906108bc565b80156102f85780601f106102cf576101008083540402835291602001916102f8565b820191905f5260205f20905b8154815290600101906020018083116102db57829003601f168201915b5050505050905090565b5f3361030f8185856103e3565b60019150505b92915050565b5f336103288582856103f5565b610333858585610470565b506001949350505050565b61034833826104cd565b60405181815233907f7fcf532c15f0a6db0bd6d0e038bea71d30d808c7d98cb3bf7268a95bf5081b659060200160405180910390a26103873382610501565b50565b606060048054610281906108bc565b5f3361030f818585610470565b6001600160a01b0382166103d45760405163ec442f0560e01b81525f60048201526024015b60405180910390fd5b6103df5f8383610594565b5050565b6103f083838360016106ba565b505050565b6001600160a01b038381165f908152600160209081526040808320938616835292905220545f19811461046a578181101561045c57604051637dc7a0d960e11b81526001600160a01b038416600482015260248101829052604481018390526064016103cb565b61046a84848484035f6106ba565b50505050565b6001600160a01b03831661049957604051634b637e8f60e11b81525f60048201526024016103cb565b6001600160a01b0382166104c25760405163ec442f0560e01b81525f60048201526024016103cb565b6103f0838383610594565b6001600160a01b0382166104f657604051634b637e8f60e11b81525f60048201526024016103cb565b6103df825f83610594565b804710156105245760405163cd78605960e01b81523060048201526024016103cb565b5f826001600160a01b0316826040515f6040518083038185875af1925050503d805f811461056d576040519150601f19603f3d011682016040523d82523d5f602084013e610572565b606091505b50509050806103f057604051630a12f52160e11b815260040160405180910390fd5b6001600160a01b0383166105be578060025f8282546105b391906108f4565b9091555061062e9050565b6001600160a01b0383165f90815260208190526040902054818110156106105760405163391434e360e21b81526001600160a01b038516600482015260248101829052604481018390526064016103cb565b6001600160a01b0384165f9081526020819052604090209082900390555b6001600160a01b03821661064a57600280548290039055610668565b6001600160a01b0382165f9081526020819052604090208054820190555b816001600160a01b0316836001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040516106ad91815260200190565b60405180910390a3505050565b6001600160a01b0384166106e35760405163e602df0560e01b81525f60048201526024016103cb565b6001600160a01b03831661070c57604051634a1406b160e11b81525f60048201526024016103cb565b6001600160a01b038085165f908152600160209081526040808320938716835292905220829055801561046a57826001600160a01b0316846001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9258460405161077e91815260200190565b60405180910390a350505050565b5f602080835283518060208501525f5b818110156107b85785810183015185820160400152820161079c565b505f604082860101526040601f19601f8301168501019250505092915050565b80356001600160a01b03811681146107ee575f80fd5b919050565b5f8060408385031215610804575f80fd5b61080d836107d8565b946020939093013593505050565b5f805f6060848603121561082d575f80fd5b610836846107d8565b9250610844602085016107d8565b9150604084013590509250925092565b5f60208284031215610864575f80fd5b5035919050565b5f6020828403121561087b575f80fd5b610884826107d8565b9392505050565b5f806040838503121561089c575f80fd5b6108a5836107d8565b91506108b3602084016107d8565b90509250929050565b600181811c908216806108d057607f821691505b6020821081036108ee57634e487b7160e01b5f52602260045260245ffd5b50919050565b8082018082111561031557634e487b7160e01b5f52601160045260245ffdfea26469706673582212203271d3e7551142c19a1b36a89e24f0469f7c4938748ff1d5581578b2e08e5c7364736f6c63430008190033", +} + +// WrappedNativeTokenABI is the input ABI used to generate the binding from. +// Deprecated: Use WrappedNativeTokenMetaData.ABI instead. +var WrappedNativeTokenABI = WrappedNativeTokenMetaData.ABI + +// WrappedNativeTokenBin is the compiled bytecode used for deploying new contracts. +// Deprecated: Use WrappedNativeTokenMetaData.Bin instead. +var WrappedNativeTokenBin = WrappedNativeTokenMetaData.Bin + +// DeployWrappedNativeToken deploys a new Ethereum contract, binding an instance of WrappedNativeToken to it. +func DeployWrappedNativeToken(auth *bind.TransactOpts, backend bind.ContractBackend, symbol string) (common.Address, *types.Transaction, *WrappedNativeToken, error) { + parsed, err := WrappedNativeTokenMetaData.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(WrappedNativeTokenBin), backend, symbol) + if err != nil { + return common.Address{}, nil, nil, err + } + return address, tx, &WrappedNativeToken{WrappedNativeTokenCaller: WrappedNativeTokenCaller{contract: contract}, WrappedNativeTokenTransactor: WrappedNativeTokenTransactor{contract: contract}, WrappedNativeTokenFilterer: WrappedNativeTokenFilterer{contract: contract}}, nil +} + +// WrappedNativeToken is an auto generated Go binding around an Ethereum contract. +type WrappedNativeToken struct { + WrappedNativeTokenCaller // Read-only binding to the contract + WrappedNativeTokenTransactor // Write-only binding to the contract + WrappedNativeTokenFilterer // Log filterer for contract events +} + +// WrappedNativeTokenCaller is an auto generated read-only Go binding around an Ethereum contract. +type WrappedNativeTokenCaller struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// WrappedNativeTokenTransactor is an auto generated write-only Go binding around an Ethereum contract. +type WrappedNativeTokenTransactor struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// WrappedNativeTokenFilterer is an auto generated log filtering Go binding around an Ethereum contract events. +type WrappedNativeTokenFilterer struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// WrappedNativeTokenSession is an auto generated Go binding around an Ethereum contract, +// with pre-set call and transact options. +type WrappedNativeTokenSession struct { + Contract *WrappedNativeToken // 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 +} + +// WrappedNativeTokenCallerSession is an auto generated read-only Go binding around an Ethereum contract, +// with pre-set call options. +type WrappedNativeTokenCallerSession struct { + Contract *WrappedNativeTokenCaller // Generic contract caller binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session +} + +// WrappedNativeTokenTransactorSession is an auto generated write-only Go binding around an Ethereum contract, +// with pre-set transact options. +type WrappedNativeTokenTransactorSession struct { + Contract *WrappedNativeTokenTransactor // Generic contract transactor binding to set the session for + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// WrappedNativeTokenRaw is an auto generated low-level Go binding around an Ethereum contract. +type WrappedNativeTokenRaw struct { + Contract *WrappedNativeToken // Generic contract binding to access the raw methods on +} + +// WrappedNativeTokenCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. +type WrappedNativeTokenCallerRaw struct { + Contract *WrappedNativeTokenCaller // Generic read-only contract binding to access the raw methods on +} + +// WrappedNativeTokenTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. +type WrappedNativeTokenTransactorRaw struct { + Contract *WrappedNativeTokenTransactor // Generic write-only contract binding to access the raw methods on +} + +// NewWrappedNativeToken creates a new instance of WrappedNativeToken, bound to a specific deployed contract. +func NewWrappedNativeToken(address common.Address, backend bind.ContractBackend) (*WrappedNativeToken, error) { + contract, err := bindWrappedNativeToken(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &WrappedNativeToken{WrappedNativeTokenCaller: WrappedNativeTokenCaller{contract: contract}, WrappedNativeTokenTransactor: WrappedNativeTokenTransactor{contract: contract}, WrappedNativeTokenFilterer: WrappedNativeTokenFilterer{contract: contract}}, nil +} + +// NewWrappedNativeTokenCaller creates a new read-only instance of WrappedNativeToken, bound to a specific deployed contract. +func NewWrappedNativeTokenCaller(address common.Address, caller bind.ContractCaller) (*WrappedNativeTokenCaller, error) { + contract, err := bindWrappedNativeToken(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &WrappedNativeTokenCaller{contract: contract}, nil +} + +// NewWrappedNativeTokenTransactor creates a new write-only instance of WrappedNativeToken, bound to a specific deployed contract. +func NewWrappedNativeTokenTransactor(address common.Address, transactor bind.ContractTransactor) (*WrappedNativeTokenTransactor, error) { + contract, err := bindWrappedNativeToken(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &WrappedNativeTokenTransactor{contract: contract}, nil +} + +// NewWrappedNativeTokenFilterer creates a new log filterer instance of WrappedNativeToken, bound to a specific deployed contract. +func NewWrappedNativeTokenFilterer(address common.Address, filterer bind.ContractFilterer) (*WrappedNativeTokenFilterer, error) { + contract, err := bindWrappedNativeToken(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &WrappedNativeTokenFilterer{contract: contract}, nil +} + +// bindWrappedNativeToken binds a generic wrapper to an already deployed contract. +func bindWrappedNativeToken(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := WrappedNativeTokenMetaData.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 (_WrappedNativeToken *WrappedNativeTokenRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _WrappedNativeToken.Contract.WrappedNativeTokenCaller.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 (_WrappedNativeToken *WrappedNativeTokenRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _WrappedNativeToken.Contract.WrappedNativeTokenTransactor.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_WrappedNativeToken *WrappedNativeTokenRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _WrappedNativeToken.Contract.WrappedNativeTokenTransactor.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 (_WrappedNativeToken *WrappedNativeTokenCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _WrappedNativeToken.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 (_WrappedNativeToken *WrappedNativeTokenTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _WrappedNativeToken.Contract.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_WrappedNativeToken *WrappedNativeTokenTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _WrappedNativeToken.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 (_WrappedNativeToken *WrappedNativeTokenCaller) Allowance(opts *bind.CallOpts, owner common.Address, spender common.Address) (*big.Int, error) { + var out []interface{} + err := _WrappedNativeToken.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 (_WrappedNativeToken *WrappedNativeTokenSession) Allowance(owner common.Address, spender common.Address) (*big.Int, error) { + return _WrappedNativeToken.Contract.Allowance(&_WrappedNativeToken.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 (_WrappedNativeToken *WrappedNativeTokenCallerSession) Allowance(owner common.Address, spender common.Address) (*big.Int, error) { + return _WrappedNativeToken.Contract.Allowance(&_WrappedNativeToken.CallOpts, owner, spender) +} + +// BalanceOf is a free data retrieval call binding the contract method 0x70a08231. +// +// Solidity: function balanceOf(address account) view returns(uint256) +func (_WrappedNativeToken *WrappedNativeTokenCaller) BalanceOf(opts *bind.CallOpts, account common.Address) (*big.Int, error) { + var out []interface{} + err := _WrappedNativeToken.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 (_WrappedNativeToken *WrappedNativeTokenSession) BalanceOf(account common.Address) (*big.Int, error) { + return _WrappedNativeToken.Contract.BalanceOf(&_WrappedNativeToken.CallOpts, account) +} + +// BalanceOf is a free data retrieval call binding the contract method 0x70a08231. +// +// Solidity: function balanceOf(address account) view returns(uint256) +func (_WrappedNativeToken *WrappedNativeTokenCallerSession) BalanceOf(account common.Address) (*big.Int, error) { + return _WrappedNativeToken.Contract.BalanceOf(&_WrappedNativeToken.CallOpts, account) +} + +// Decimals is a free data retrieval call binding the contract method 0x313ce567. +// +// Solidity: function decimals() view returns(uint8) +func (_WrappedNativeToken *WrappedNativeTokenCaller) Decimals(opts *bind.CallOpts) (uint8, error) { + var out []interface{} + err := _WrappedNativeToken.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 (_WrappedNativeToken *WrappedNativeTokenSession) Decimals() (uint8, error) { + return _WrappedNativeToken.Contract.Decimals(&_WrappedNativeToken.CallOpts) +} + +// Decimals is a free data retrieval call binding the contract method 0x313ce567. +// +// Solidity: function decimals() view returns(uint8) +func (_WrappedNativeToken *WrappedNativeTokenCallerSession) Decimals() (uint8, error) { + return _WrappedNativeToken.Contract.Decimals(&_WrappedNativeToken.CallOpts) +} + +// Name is a free data retrieval call binding the contract method 0x06fdde03. +// +// Solidity: function name() view returns(string) +func (_WrappedNativeToken *WrappedNativeTokenCaller) Name(opts *bind.CallOpts) (string, error) { + var out []interface{} + err := _WrappedNativeToken.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 (_WrappedNativeToken *WrappedNativeTokenSession) Name() (string, error) { + return _WrappedNativeToken.Contract.Name(&_WrappedNativeToken.CallOpts) +} + +// Name is a free data retrieval call binding the contract method 0x06fdde03. +// +// Solidity: function name() view returns(string) +func (_WrappedNativeToken *WrappedNativeTokenCallerSession) Name() (string, error) { + return _WrappedNativeToken.Contract.Name(&_WrappedNativeToken.CallOpts) +} + +// Symbol is a free data retrieval call binding the contract method 0x95d89b41. +// +// Solidity: function symbol() view returns(string) +func (_WrappedNativeToken *WrappedNativeTokenCaller) Symbol(opts *bind.CallOpts) (string, error) { + var out []interface{} + err := _WrappedNativeToken.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 (_WrappedNativeToken *WrappedNativeTokenSession) Symbol() (string, error) { + return _WrappedNativeToken.Contract.Symbol(&_WrappedNativeToken.CallOpts) +} + +// Symbol is a free data retrieval call binding the contract method 0x95d89b41. +// +// Solidity: function symbol() view returns(string) +func (_WrappedNativeToken *WrappedNativeTokenCallerSession) Symbol() (string, error) { + return _WrappedNativeToken.Contract.Symbol(&_WrappedNativeToken.CallOpts) +} + +// TotalSupply is a free data retrieval call binding the contract method 0x18160ddd. +// +// Solidity: function totalSupply() view returns(uint256) +func (_WrappedNativeToken *WrappedNativeTokenCaller) TotalSupply(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _WrappedNativeToken.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 (_WrappedNativeToken *WrappedNativeTokenSession) TotalSupply() (*big.Int, error) { + return _WrappedNativeToken.Contract.TotalSupply(&_WrappedNativeToken.CallOpts) +} + +// TotalSupply is a free data retrieval call binding the contract method 0x18160ddd. +// +// Solidity: function totalSupply() view returns(uint256) +func (_WrappedNativeToken *WrappedNativeTokenCallerSession) TotalSupply() (*big.Int, error) { + return _WrappedNativeToken.Contract.TotalSupply(&_WrappedNativeToken.CallOpts) +} + +// Approve is a paid mutator transaction binding the contract method 0x095ea7b3. +// +// Solidity: function approve(address spender, uint256 value) returns(bool) +func (_WrappedNativeToken *WrappedNativeTokenTransactor) Approve(opts *bind.TransactOpts, spender common.Address, value *big.Int) (*types.Transaction, error) { + return _WrappedNativeToken.contract.Transact(opts, "approve", spender, value) +} + +// Approve is a paid mutator transaction binding the contract method 0x095ea7b3. +// +// Solidity: function approve(address spender, uint256 value) returns(bool) +func (_WrappedNativeToken *WrappedNativeTokenSession) Approve(spender common.Address, value *big.Int) (*types.Transaction, error) { + return _WrappedNativeToken.Contract.Approve(&_WrappedNativeToken.TransactOpts, spender, value) +} + +// Approve is a paid mutator transaction binding the contract method 0x095ea7b3. +// +// Solidity: function approve(address spender, uint256 value) returns(bool) +func (_WrappedNativeToken *WrappedNativeTokenTransactorSession) Approve(spender common.Address, value *big.Int) (*types.Transaction, error) { + return _WrappedNativeToken.Contract.Approve(&_WrappedNativeToken.TransactOpts, spender, value) +} + +// Deposit is a paid mutator transaction binding the contract method 0xd0e30db0. +// +// Solidity: function deposit() payable returns() +func (_WrappedNativeToken *WrappedNativeTokenTransactor) Deposit(opts *bind.TransactOpts) (*types.Transaction, error) { + return _WrappedNativeToken.contract.Transact(opts, "deposit") +} + +// Deposit is a paid mutator transaction binding the contract method 0xd0e30db0. +// +// Solidity: function deposit() payable returns() +func (_WrappedNativeToken *WrappedNativeTokenSession) Deposit() (*types.Transaction, error) { + return _WrappedNativeToken.Contract.Deposit(&_WrappedNativeToken.TransactOpts) +} + +// Deposit is a paid mutator transaction binding the contract method 0xd0e30db0. +// +// Solidity: function deposit() payable returns() +func (_WrappedNativeToken *WrappedNativeTokenTransactorSession) Deposit() (*types.Transaction, error) { + return _WrappedNativeToken.Contract.Deposit(&_WrappedNativeToken.TransactOpts) +} + +// Transfer is a paid mutator transaction binding the contract method 0xa9059cbb. +// +// Solidity: function transfer(address to, uint256 value) returns(bool) +func (_WrappedNativeToken *WrappedNativeTokenTransactor) Transfer(opts *bind.TransactOpts, to common.Address, value *big.Int) (*types.Transaction, error) { + return _WrappedNativeToken.contract.Transact(opts, "transfer", to, value) +} + +// Transfer is a paid mutator transaction binding the contract method 0xa9059cbb. +// +// Solidity: function transfer(address to, uint256 value) returns(bool) +func (_WrappedNativeToken *WrappedNativeTokenSession) Transfer(to common.Address, value *big.Int) (*types.Transaction, error) { + return _WrappedNativeToken.Contract.Transfer(&_WrappedNativeToken.TransactOpts, to, value) +} + +// Transfer is a paid mutator transaction binding the contract method 0xa9059cbb. +// +// Solidity: function transfer(address to, uint256 value) returns(bool) +func (_WrappedNativeToken *WrappedNativeTokenTransactorSession) Transfer(to common.Address, value *big.Int) (*types.Transaction, error) { + return _WrappedNativeToken.Contract.Transfer(&_WrappedNativeToken.TransactOpts, to, value) +} + +// TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd. +// +// Solidity: function transferFrom(address from, address to, uint256 value) returns(bool) +func (_WrappedNativeToken *WrappedNativeTokenTransactor) TransferFrom(opts *bind.TransactOpts, from common.Address, to common.Address, value *big.Int) (*types.Transaction, error) { + return _WrappedNativeToken.contract.Transact(opts, "transferFrom", from, to, value) +} + +// TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd. +// +// Solidity: function transferFrom(address from, address to, uint256 value) returns(bool) +func (_WrappedNativeToken *WrappedNativeTokenSession) TransferFrom(from common.Address, to common.Address, value *big.Int) (*types.Transaction, error) { + return _WrappedNativeToken.Contract.TransferFrom(&_WrappedNativeToken.TransactOpts, from, to, value) +} + +// TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd. +// +// Solidity: function transferFrom(address from, address to, uint256 value) returns(bool) +func (_WrappedNativeToken *WrappedNativeTokenTransactorSession) TransferFrom(from common.Address, to common.Address, value *big.Int) (*types.Transaction, error) { + return _WrappedNativeToken.Contract.TransferFrom(&_WrappedNativeToken.TransactOpts, from, to, value) +} + +// Withdraw is a paid mutator transaction binding the contract method 0x2e1a7d4d. +// +// Solidity: function withdraw(uint256 amount) returns() +func (_WrappedNativeToken *WrappedNativeTokenTransactor) Withdraw(opts *bind.TransactOpts, amount *big.Int) (*types.Transaction, error) { + return _WrappedNativeToken.contract.Transact(opts, "withdraw", amount) +} + +// Withdraw is a paid mutator transaction binding the contract method 0x2e1a7d4d. +// +// Solidity: function withdraw(uint256 amount) returns() +func (_WrappedNativeToken *WrappedNativeTokenSession) Withdraw(amount *big.Int) (*types.Transaction, error) { + return _WrappedNativeToken.Contract.Withdraw(&_WrappedNativeToken.TransactOpts, amount) +} + +// Withdraw is a paid mutator transaction binding the contract method 0x2e1a7d4d. +// +// Solidity: function withdraw(uint256 amount) returns() +func (_WrappedNativeToken *WrappedNativeTokenTransactorSession) Withdraw(amount *big.Int) (*types.Transaction, error) { + return _WrappedNativeToken.Contract.Withdraw(&_WrappedNativeToken.TransactOpts, amount) +} + +// Fallback is a paid mutator transaction binding the contract fallback function. +// +// Solidity: fallback() payable returns() +func (_WrappedNativeToken *WrappedNativeTokenTransactor) Fallback(opts *bind.TransactOpts, calldata []byte) (*types.Transaction, error) { + return _WrappedNativeToken.contract.RawTransact(opts, calldata) +} + +// Fallback is a paid mutator transaction binding the contract fallback function. +// +// Solidity: fallback() payable returns() +func (_WrappedNativeToken *WrappedNativeTokenSession) Fallback(calldata []byte) (*types.Transaction, error) { + return _WrappedNativeToken.Contract.Fallback(&_WrappedNativeToken.TransactOpts, calldata) +} + +// Fallback is a paid mutator transaction binding the contract fallback function. +// +// Solidity: fallback() payable returns() +func (_WrappedNativeToken *WrappedNativeTokenTransactorSession) Fallback(calldata []byte) (*types.Transaction, error) { + return _WrappedNativeToken.Contract.Fallback(&_WrappedNativeToken.TransactOpts, calldata) +} + +// Receive is a paid mutator transaction binding the contract receive function. +// +// Solidity: receive() payable returns() +func (_WrappedNativeToken *WrappedNativeTokenTransactor) Receive(opts *bind.TransactOpts) (*types.Transaction, error) { + return _WrappedNativeToken.contract.RawTransact(opts, nil) // calldata is disallowed for receive function +} + +// Receive is a paid mutator transaction binding the contract receive function. +// +// Solidity: receive() payable returns() +func (_WrappedNativeToken *WrappedNativeTokenSession) Receive() (*types.Transaction, error) { + return _WrappedNativeToken.Contract.Receive(&_WrappedNativeToken.TransactOpts) +} + +// Receive is a paid mutator transaction binding the contract receive function. +// +// Solidity: receive() payable returns() +func (_WrappedNativeToken *WrappedNativeTokenTransactorSession) Receive() (*types.Transaction, error) { + return _WrappedNativeToken.Contract.Receive(&_WrappedNativeToken.TransactOpts) +} + +// WrappedNativeTokenApprovalIterator is returned from FilterApproval and is used to iterate over the raw logs and unpacked data for Approval events raised by the WrappedNativeToken contract. +type WrappedNativeTokenApprovalIterator struct { + Event *WrappedNativeTokenApproval // 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 interfaces.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 *WrappedNativeTokenApprovalIterator) 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(WrappedNativeTokenApproval) + 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(WrappedNativeTokenApproval) + 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 *WrappedNativeTokenApprovalIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *WrappedNativeTokenApprovalIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// WrappedNativeTokenApproval represents a Approval event raised by the WrappedNativeToken contract. +type WrappedNativeTokenApproval 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 (_WrappedNativeToken *WrappedNativeTokenFilterer) FilterApproval(opts *bind.FilterOpts, owner []common.Address, spender []common.Address) (*WrappedNativeTokenApprovalIterator, 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 := _WrappedNativeToken.contract.FilterLogs(opts, "Approval", ownerRule, spenderRule) + if err != nil { + return nil, err + } + return &WrappedNativeTokenApprovalIterator{contract: _WrappedNativeToken.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 (_WrappedNativeToken *WrappedNativeTokenFilterer) WatchApproval(opts *bind.WatchOpts, sink chan<- *WrappedNativeTokenApproval, 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 := _WrappedNativeToken.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(WrappedNativeTokenApproval) + if err := _WrappedNativeToken.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 (_WrappedNativeToken *WrappedNativeTokenFilterer) ParseApproval(log types.Log) (*WrappedNativeTokenApproval, error) { + event := new(WrappedNativeTokenApproval) + if err := _WrappedNativeToken.contract.UnpackLog(event, "Approval", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// WrappedNativeTokenDepositIterator is returned from FilterDeposit and is used to iterate over the raw logs and unpacked data for Deposit events raised by the WrappedNativeToken contract. +type WrappedNativeTokenDepositIterator struct { + Event *WrappedNativeTokenDeposit // 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 interfaces.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 *WrappedNativeTokenDepositIterator) 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(WrappedNativeTokenDeposit) + 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(WrappedNativeTokenDeposit) + 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 *WrappedNativeTokenDepositIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *WrappedNativeTokenDepositIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// WrappedNativeTokenDeposit represents a Deposit event raised by the WrappedNativeToken contract. +type WrappedNativeTokenDeposit struct { + Sender common.Address + Amount *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterDeposit is a free log retrieval operation binding the contract event 0xe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c. +// +// Solidity: event Deposit(address indexed sender, uint256 amount) +func (_WrappedNativeToken *WrappedNativeTokenFilterer) FilterDeposit(opts *bind.FilterOpts, sender []common.Address) (*WrappedNativeTokenDepositIterator, error) { + + var senderRule []interface{} + for _, senderItem := range sender { + senderRule = append(senderRule, senderItem) + } + + logs, sub, err := _WrappedNativeToken.contract.FilterLogs(opts, "Deposit", senderRule) + if err != nil { + return nil, err + } + return &WrappedNativeTokenDepositIterator{contract: _WrappedNativeToken.contract, event: "Deposit", logs: logs, sub: sub}, nil +} + +// WatchDeposit is a free log subscription operation binding the contract event 0xe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c. +// +// Solidity: event Deposit(address indexed sender, uint256 amount) +func (_WrappedNativeToken *WrappedNativeTokenFilterer) WatchDeposit(opts *bind.WatchOpts, sink chan<- *WrappedNativeTokenDeposit, sender []common.Address) (event.Subscription, error) { + + var senderRule []interface{} + for _, senderItem := range sender { + senderRule = append(senderRule, senderItem) + } + + logs, sub, err := _WrappedNativeToken.contract.WatchLogs(opts, "Deposit", senderRule) + 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(WrappedNativeTokenDeposit) + if err := _WrappedNativeToken.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 0xe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c. +// +// Solidity: event Deposit(address indexed sender, uint256 amount) +func (_WrappedNativeToken *WrappedNativeTokenFilterer) ParseDeposit(log types.Log) (*WrappedNativeTokenDeposit, error) { + event := new(WrappedNativeTokenDeposit) + if err := _WrappedNativeToken.contract.UnpackLog(event, "Deposit", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// WrappedNativeTokenTransferIterator is returned from FilterTransfer and is used to iterate over the raw logs and unpacked data for Transfer events raised by the WrappedNativeToken contract. +type WrappedNativeTokenTransferIterator struct { + Event *WrappedNativeTokenTransfer // 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 interfaces.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 *WrappedNativeTokenTransferIterator) 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(WrappedNativeTokenTransfer) + 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(WrappedNativeTokenTransfer) + 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 *WrappedNativeTokenTransferIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *WrappedNativeTokenTransferIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// WrappedNativeTokenTransfer represents a Transfer event raised by the WrappedNativeToken contract. +type WrappedNativeTokenTransfer 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 (_WrappedNativeToken *WrappedNativeTokenFilterer) FilterTransfer(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*WrappedNativeTokenTransferIterator, 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 := _WrappedNativeToken.contract.FilterLogs(opts, "Transfer", fromRule, toRule) + if err != nil { + return nil, err + } + return &WrappedNativeTokenTransferIterator{contract: _WrappedNativeToken.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 (_WrappedNativeToken *WrappedNativeTokenFilterer) WatchTransfer(opts *bind.WatchOpts, sink chan<- *WrappedNativeTokenTransfer, 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 := _WrappedNativeToken.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(WrappedNativeTokenTransfer) + if err := _WrappedNativeToken.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 (_WrappedNativeToken *WrappedNativeTokenFilterer) ParseTransfer(log types.Log) (*WrappedNativeTokenTransfer, error) { + event := new(WrappedNativeTokenTransfer) + if err := _WrappedNativeToken.contract.UnpackLog(event, "Transfer", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// WrappedNativeTokenWithdrawalIterator is returned from FilterWithdrawal and is used to iterate over the raw logs and unpacked data for Withdrawal events raised by the WrappedNativeToken contract. +type WrappedNativeTokenWithdrawalIterator struct { + Event *WrappedNativeTokenWithdrawal // 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 interfaces.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 *WrappedNativeTokenWithdrawalIterator) 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(WrappedNativeTokenWithdrawal) + 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(WrappedNativeTokenWithdrawal) + 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 *WrappedNativeTokenWithdrawalIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *WrappedNativeTokenWithdrawalIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// WrappedNativeTokenWithdrawal represents a Withdrawal event raised by the WrappedNativeToken contract. +type WrappedNativeTokenWithdrawal struct { + Sender common.Address + Amount *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterWithdrawal is a free log retrieval operation binding the contract event 0x7fcf532c15f0a6db0bd6d0e038bea71d30d808c7d98cb3bf7268a95bf5081b65. +// +// Solidity: event Withdrawal(address indexed sender, uint256 amount) +func (_WrappedNativeToken *WrappedNativeTokenFilterer) FilterWithdrawal(opts *bind.FilterOpts, sender []common.Address) (*WrappedNativeTokenWithdrawalIterator, error) { + + var senderRule []interface{} + for _, senderItem := range sender { + senderRule = append(senderRule, senderItem) + } + + logs, sub, err := _WrappedNativeToken.contract.FilterLogs(opts, "Withdrawal", senderRule) + if err != nil { + return nil, err + } + return &WrappedNativeTokenWithdrawalIterator{contract: _WrappedNativeToken.contract, event: "Withdrawal", logs: logs, sub: sub}, nil +} + +// WatchWithdrawal is a free log subscription operation binding the contract event 0x7fcf532c15f0a6db0bd6d0e038bea71d30d808c7d98cb3bf7268a95bf5081b65. +// +// Solidity: event Withdrawal(address indexed sender, uint256 amount) +func (_WrappedNativeToken *WrappedNativeTokenFilterer) WatchWithdrawal(opts *bind.WatchOpts, sink chan<- *WrappedNativeTokenWithdrawal, sender []common.Address) (event.Subscription, error) { + + var senderRule []interface{} + for _, senderItem := range sender { + senderRule = append(senderRule, senderItem) + } + + logs, sub, err := _WrappedNativeToken.contract.WatchLogs(opts, "Withdrawal", senderRule) + 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(WrappedNativeTokenWithdrawal) + if err := _WrappedNativeToken.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 0x7fcf532c15f0a6db0bd6d0e038bea71d30d808c7d98cb3bf7268a95bf5081b65. +// +// Solidity: event Withdrawal(address indexed sender, uint256 amount) +func (_WrappedNativeToken *WrappedNativeTokenFilterer) ParseWithdrawal(log types.Log) (*WrappedNativeTokenWithdrawal, error) { + event := new(WrappedNativeTokenWithdrawal) + if err := _WrappedNativeToken.contract.UnpackLog(event, "Withdrawal", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} diff --git a/abi-bindings/go/ictt/mocks/ExampleERC20Decimals/ExampleERC20Decimals.go b/abi-bindings/go/ictt/mocks/ExampleERC20Decimals/ExampleERC20Decimals.go new file mode 100644 index 000000000..1fcc1ad1f --- /dev/null +++ b/abi-bindings/go/ictt/mocks/ExampleERC20Decimals/ExampleERC20Decimals.go @@ -0,0 +1,875 @@ +// Code generated - DO NOT EDIT. +// This file is a generated binding and any manual changes will be lost. + +package exampleerc20decimals + +import ( + "errors" + "math/big" + "strings" + + "github.com/ava-labs/subnet-evm/accounts/abi" + "github.com/ava-labs/subnet-evm/accounts/abi/bind" + "github.com/ava-labs/subnet-evm/core/types" + "github.com/ava-labs/subnet-evm/interfaces" + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/event" +) + +// Reference imports to suppress errors if they are not otherwise used. +var ( + _ = errors.New + _ = big.NewInt + _ = strings.NewReader + _ = interfaces.NotFound + _ = bind.Bind + _ = common.Big1 + _ = types.BloomLookup + _ = event.NewSubscription + _ = abi.ConvertType +) + +// ExampleERC20DecimalsMetaData contains all meta data concerning the ExampleERC20Decimals contract. +var ExampleERC20DecimalsMetaData = &bind.MetaData{ + ABI: "[{\"inputs\":[{\"internalType\":\"uint8\",\"name\":\"tokenDecimals_\",\"type\":\"uint8\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"allowance\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"needed\",\"type\":\"uint256\"}],\"name\":\"ERC20InsufficientAllowance\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"balance\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"needed\",\"type\":\"uint256\"}],\"name\":\"ERC20InsufficientBalance\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"approver\",\"type\":\"address\"}],\"name\":\"ERC20InvalidApprover\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"}],\"name\":\"ERC20InvalidReceiver\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"ERC20InvalidSender\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"ERC20InvalidSpender\",\"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\":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\":\"value\",\"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\":\"value\",\"type\":\"uint256\"}],\"name\":\"burn\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"burnFrom\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"mint\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"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\":\"tokenDecimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"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\":\"value\",\"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\":\"value\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", + Bin: "0x60a060405234801561000f575f80fd5b50604051610d2a380380610d2a83398101604081905261002e91610217565b6040518060400160405280600a81526020016926b7b1b5902a37b5b2b760b11b81525060405180604001604052806004815260200163045584d560e41b815250816003908161007d91906102d6565b50600461008a82826102d6565b5050506100a9336b204fce5e3e250261100000006100b460201b60201c565b60ff166080526103ba565b6001600160a01b0382166100e25760405163ec442f0560e01b81525f60048201526024015b60405180910390fd5b6100ed5f83836100f1565b5050565b6001600160a01b03831661011b578060025f8282546101109190610395565b9091555061018b9050565b6001600160a01b0383165f908152602081905260409020548181101561016d5760405163391434e360e21b81526001600160a01b038516600482015260248101829052604481018390526064016100d9565b6001600160a01b0384165f9081526020819052604090209082900390555b6001600160a01b0382166101a7576002805482900390556101c5565b6001600160a01b0382165f9081526020819052604090208054820190555b816001600160a01b0316836001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8360405161020a91815260200190565b60405180910390a3505050565b5f60208284031215610227575f80fd5b815160ff81168114610237575f80fd5b9392505050565b634e487b7160e01b5f52604160045260245ffd5b600181811c9082168061026657607f821691505b60208210810361028457634e487b7160e01b5f52602260045260245ffd5b50919050565b601f8211156102d157805f5260205f20601f840160051c810160208510156102af5750805b601f840160051c820191505b818110156102ce575f81556001016102bb565b50505b505050565b81516001600160401b038111156102ef576102ef61023e565b610303816102fd8454610252565b8461028a565b602080601f831160018114610336575f841561031f5750858301515b5f19600386901b1c1916600185901b17855561038d565b5f85815260208120601f198616915b8281101561036457888601518255948401946001909101908401610345565b508582101561038157878501515f19600388901b60f8161c191681555b505060018460011b0185555b505050505050565b808201808211156103b457634e487b7160e01b5f52601160045260245ffd5b92915050565b6080516109516103d95f395f8181610151015261018801526109515ff3fe608060405234801561000f575f80fd5b50600436106100e5575f3560e01c806342966c681161008857806395d89b411161006357806395d89b411461020d578063a0712d6814610215578063a9059cbb14610228578063dd62ed3e1461023b575f80fd5b806342966c68146101bf57806370a08231146101d257806379cc6790146101fa575f80fd5b806323b872dd116100c357806323b872dd1461013c578063313ce5671461014f5780633b97e8561461018357806340c10f19146101aa575f80fd5b806306fdde03146100e9578063095ea7b31461010757806318160ddd1461012a575b5f80fd5b6100f1610273565b6040516100fe9190610794565b60405180910390f35b61011a6101153660046107fb565b610303565b60405190151581526020016100fe565b6002545b6040519081526020016100fe565b61011a61014a366004610823565b61031c565b7f00000000000000000000000000000000000000000000000000000000000000005b60405160ff90911681526020016100fe565b6101717f000000000000000000000000000000000000000000000000000000000000000081565b6101bd6101b83660046107fb565b61033f565b005b6101bd6101cd36600461085c565b6103aa565b61012e6101e0366004610873565b6001600160a01b03165f9081526020819052604090205490565b6101bd6102083660046107fb565b6103b7565b6100f16103cc565b6101bd61022336600461085c565b6103db565b61011a6102363660046107fb565b61043d565b61012e610249366004610893565b6001600160a01b039182165f90815260016020908152604080832093909416825291909152205490565b606060038054610282906108c4565b80601f01602080910402602001604051908101604052809291908181526020018280546102ae906108c4565b80156102f95780601f106102d0576101008083540402835291602001916102f9565b820191905f5260205f20905b8154815290600101906020018083116102dc57829003601f168201915b5050505050905090565b5f3361031081858561044a565b60019150505b92915050565b5f3361032985828561045c565b6103348585856104d7565b506001949350505050565b678ac7230489e8000081111561039c5760405162461bcd60e51b815260206004820152601f60248201527f4578616d706c6545524332303a206d6178206d696e742065786365656465640060448201526064015b60405180910390fd5b6103a68282610534565b5050565b6103b43382610568565b50565b6103c282338361045c565b6103a68282610568565b606060048054610282906108c4565b678ac7230489e800008111156104335760405162461bcd60e51b815260206004820152601f60248201527f4578616d706c6545524332303a206d6178206d696e74206578636565646564006044820152606401610393565b6103b43382610534565b5f336103108185856104d7565b610457838383600161059c565b505050565b6001600160a01b038381165f908152600160209081526040808320938616835292905220545f1981146104d157818110156104c357604051637dc7a0d960e11b81526001600160a01b03841660048201526024810182905260448101839052606401610393565b6104d184848484035f61059c565b50505050565b6001600160a01b03831661050057604051634b637e8f60e11b81525f6004820152602401610393565b6001600160a01b0382166105295760405163ec442f0560e01b81525f6004820152602401610393565b61045783838361066e565b6001600160a01b03821661055d5760405163ec442f0560e01b81525f6004820152602401610393565b6103a65f838361066e565b6001600160a01b03821661059157604051634b637e8f60e11b81525f6004820152602401610393565b6103a6825f8361066e565b6001600160a01b0384166105c55760405163e602df0560e01b81525f6004820152602401610393565b6001600160a01b0383166105ee57604051634a1406b160e11b81525f6004820152602401610393565b6001600160a01b038085165f90815260016020908152604080832093871683529290522082905580156104d157826001600160a01b0316846001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9258460405161066091815260200190565b60405180910390a350505050565b6001600160a01b038316610698578060025f82825461068d91906108fc565b909155506107089050565b6001600160a01b0383165f90815260208190526040902054818110156106ea5760405163391434e360e21b81526001600160a01b03851660048201526024810182905260448101839052606401610393565b6001600160a01b0384165f9081526020819052604090209082900390555b6001600160a01b03821661072457600280548290039055610742565b6001600160a01b0382165f9081526020819052604090208054820190555b816001600160a01b0316836001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8360405161078791815260200190565b60405180910390a3505050565b5f602080835283518060208501525f5b818110156107c0578581018301518582016040015282016107a4565b505f604082860101526040601f19601f8301168501019250505092915050565b80356001600160a01b03811681146107f6575f80fd5b919050565b5f806040838503121561080c575f80fd5b610815836107e0565b946020939093013593505050565b5f805f60608486031215610835575f80fd5b61083e846107e0565b925061084c602085016107e0565b9150604084013590509250925092565b5f6020828403121561086c575f80fd5b5035919050565b5f60208284031215610883575f80fd5b61088c826107e0565b9392505050565b5f80604083850312156108a4575f80fd5b6108ad836107e0565b91506108bb602084016107e0565b90509250929050565b600181811c908216806108d857607f821691505b6020821081036108f657634e487b7160e01b5f52602260045260245ffd5b50919050565b8082018082111561031657634e487b7160e01b5f52601160045260245ffdfea26469706673582212202e0383997c8539f98962a448bd41102dc087f43412c3c7cf4b0300b8fe12ca3064736f6c63430008190033", +} + +// ExampleERC20DecimalsABI is the input ABI used to generate the binding from. +// Deprecated: Use ExampleERC20DecimalsMetaData.ABI instead. +var ExampleERC20DecimalsABI = ExampleERC20DecimalsMetaData.ABI + +// ExampleERC20DecimalsBin is the compiled bytecode used for deploying new contracts. +// Deprecated: Use ExampleERC20DecimalsMetaData.Bin instead. +var ExampleERC20DecimalsBin = ExampleERC20DecimalsMetaData.Bin + +// DeployExampleERC20Decimals deploys a new Ethereum contract, binding an instance of ExampleERC20Decimals to it. +func DeployExampleERC20Decimals(auth *bind.TransactOpts, backend bind.ContractBackend, tokenDecimals_ uint8) (common.Address, *types.Transaction, *ExampleERC20Decimals, error) { + parsed, err := ExampleERC20DecimalsMetaData.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(ExampleERC20DecimalsBin), backend, tokenDecimals_) + if err != nil { + return common.Address{}, nil, nil, err + } + return address, tx, &ExampleERC20Decimals{ExampleERC20DecimalsCaller: ExampleERC20DecimalsCaller{contract: contract}, ExampleERC20DecimalsTransactor: ExampleERC20DecimalsTransactor{contract: contract}, ExampleERC20DecimalsFilterer: ExampleERC20DecimalsFilterer{contract: contract}}, nil +} + +// ExampleERC20Decimals is an auto generated Go binding around an Ethereum contract. +type ExampleERC20Decimals struct { + ExampleERC20DecimalsCaller // Read-only binding to the contract + ExampleERC20DecimalsTransactor // Write-only binding to the contract + ExampleERC20DecimalsFilterer // Log filterer for contract events +} + +// ExampleERC20DecimalsCaller is an auto generated read-only Go binding around an Ethereum contract. +type ExampleERC20DecimalsCaller struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// ExampleERC20DecimalsTransactor is an auto generated write-only Go binding around an Ethereum contract. +type ExampleERC20DecimalsTransactor struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// ExampleERC20DecimalsFilterer is an auto generated log filtering Go binding around an Ethereum contract events. +type ExampleERC20DecimalsFilterer struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// ExampleERC20DecimalsSession is an auto generated Go binding around an Ethereum contract, +// with pre-set call and transact options. +type ExampleERC20DecimalsSession struct { + Contract *ExampleERC20Decimals // 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 +} + +// ExampleERC20DecimalsCallerSession is an auto generated read-only Go binding around an Ethereum contract, +// with pre-set call options. +type ExampleERC20DecimalsCallerSession struct { + Contract *ExampleERC20DecimalsCaller // Generic contract caller binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session +} + +// ExampleERC20DecimalsTransactorSession is an auto generated write-only Go binding around an Ethereum contract, +// with pre-set transact options. +type ExampleERC20DecimalsTransactorSession struct { + Contract *ExampleERC20DecimalsTransactor // Generic contract transactor binding to set the session for + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// ExampleERC20DecimalsRaw is an auto generated low-level Go binding around an Ethereum contract. +type ExampleERC20DecimalsRaw struct { + Contract *ExampleERC20Decimals // Generic contract binding to access the raw methods on +} + +// ExampleERC20DecimalsCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. +type ExampleERC20DecimalsCallerRaw struct { + Contract *ExampleERC20DecimalsCaller // Generic read-only contract binding to access the raw methods on +} + +// ExampleERC20DecimalsTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. +type ExampleERC20DecimalsTransactorRaw struct { + Contract *ExampleERC20DecimalsTransactor // Generic write-only contract binding to access the raw methods on +} + +// NewExampleERC20Decimals creates a new instance of ExampleERC20Decimals, bound to a specific deployed contract. +func NewExampleERC20Decimals(address common.Address, backend bind.ContractBackend) (*ExampleERC20Decimals, error) { + contract, err := bindExampleERC20Decimals(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &ExampleERC20Decimals{ExampleERC20DecimalsCaller: ExampleERC20DecimalsCaller{contract: contract}, ExampleERC20DecimalsTransactor: ExampleERC20DecimalsTransactor{contract: contract}, ExampleERC20DecimalsFilterer: ExampleERC20DecimalsFilterer{contract: contract}}, nil +} + +// NewExampleERC20DecimalsCaller creates a new read-only instance of ExampleERC20Decimals, bound to a specific deployed contract. +func NewExampleERC20DecimalsCaller(address common.Address, caller bind.ContractCaller) (*ExampleERC20DecimalsCaller, error) { + contract, err := bindExampleERC20Decimals(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &ExampleERC20DecimalsCaller{contract: contract}, nil +} + +// NewExampleERC20DecimalsTransactor creates a new write-only instance of ExampleERC20Decimals, bound to a specific deployed contract. +func NewExampleERC20DecimalsTransactor(address common.Address, transactor bind.ContractTransactor) (*ExampleERC20DecimalsTransactor, error) { + contract, err := bindExampleERC20Decimals(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &ExampleERC20DecimalsTransactor{contract: contract}, nil +} + +// NewExampleERC20DecimalsFilterer creates a new log filterer instance of ExampleERC20Decimals, bound to a specific deployed contract. +func NewExampleERC20DecimalsFilterer(address common.Address, filterer bind.ContractFilterer) (*ExampleERC20DecimalsFilterer, error) { + contract, err := bindExampleERC20Decimals(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &ExampleERC20DecimalsFilterer{contract: contract}, nil +} + +// bindExampleERC20Decimals binds a generic wrapper to an already deployed contract. +func bindExampleERC20Decimals(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := ExampleERC20DecimalsMetaData.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 (_ExampleERC20Decimals *ExampleERC20DecimalsRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _ExampleERC20Decimals.Contract.ExampleERC20DecimalsCaller.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 (_ExampleERC20Decimals *ExampleERC20DecimalsRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _ExampleERC20Decimals.Contract.ExampleERC20DecimalsTransactor.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_ExampleERC20Decimals *ExampleERC20DecimalsRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _ExampleERC20Decimals.Contract.ExampleERC20DecimalsTransactor.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 (_ExampleERC20Decimals *ExampleERC20DecimalsCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _ExampleERC20Decimals.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 (_ExampleERC20Decimals *ExampleERC20DecimalsTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _ExampleERC20Decimals.Contract.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_ExampleERC20Decimals *ExampleERC20DecimalsTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _ExampleERC20Decimals.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 (_ExampleERC20Decimals *ExampleERC20DecimalsCaller) Allowance(opts *bind.CallOpts, owner common.Address, spender common.Address) (*big.Int, error) { + var out []interface{} + err := _ExampleERC20Decimals.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 (_ExampleERC20Decimals *ExampleERC20DecimalsSession) Allowance(owner common.Address, spender common.Address) (*big.Int, error) { + return _ExampleERC20Decimals.Contract.Allowance(&_ExampleERC20Decimals.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 (_ExampleERC20Decimals *ExampleERC20DecimalsCallerSession) Allowance(owner common.Address, spender common.Address) (*big.Int, error) { + return _ExampleERC20Decimals.Contract.Allowance(&_ExampleERC20Decimals.CallOpts, owner, spender) +} + +// BalanceOf is a free data retrieval call binding the contract method 0x70a08231. +// +// Solidity: function balanceOf(address account) view returns(uint256) +func (_ExampleERC20Decimals *ExampleERC20DecimalsCaller) BalanceOf(opts *bind.CallOpts, account common.Address) (*big.Int, error) { + var out []interface{} + err := _ExampleERC20Decimals.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 (_ExampleERC20Decimals *ExampleERC20DecimalsSession) BalanceOf(account common.Address) (*big.Int, error) { + return _ExampleERC20Decimals.Contract.BalanceOf(&_ExampleERC20Decimals.CallOpts, account) +} + +// BalanceOf is a free data retrieval call binding the contract method 0x70a08231. +// +// Solidity: function balanceOf(address account) view returns(uint256) +func (_ExampleERC20Decimals *ExampleERC20DecimalsCallerSession) BalanceOf(account common.Address) (*big.Int, error) { + return _ExampleERC20Decimals.Contract.BalanceOf(&_ExampleERC20Decimals.CallOpts, account) +} + +// Decimals is a free data retrieval call binding the contract method 0x313ce567. +// +// Solidity: function decimals() view returns(uint8) +func (_ExampleERC20Decimals *ExampleERC20DecimalsCaller) Decimals(opts *bind.CallOpts) (uint8, error) { + var out []interface{} + err := _ExampleERC20Decimals.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 (_ExampleERC20Decimals *ExampleERC20DecimalsSession) Decimals() (uint8, error) { + return _ExampleERC20Decimals.Contract.Decimals(&_ExampleERC20Decimals.CallOpts) +} + +// Decimals is a free data retrieval call binding the contract method 0x313ce567. +// +// Solidity: function decimals() view returns(uint8) +func (_ExampleERC20Decimals *ExampleERC20DecimalsCallerSession) Decimals() (uint8, error) { + return _ExampleERC20Decimals.Contract.Decimals(&_ExampleERC20Decimals.CallOpts) +} + +// Name is a free data retrieval call binding the contract method 0x06fdde03. +// +// Solidity: function name() view returns(string) +func (_ExampleERC20Decimals *ExampleERC20DecimalsCaller) Name(opts *bind.CallOpts) (string, error) { + var out []interface{} + err := _ExampleERC20Decimals.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 (_ExampleERC20Decimals *ExampleERC20DecimalsSession) Name() (string, error) { + return _ExampleERC20Decimals.Contract.Name(&_ExampleERC20Decimals.CallOpts) +} + +// Name is a free data retrieval call binding the contract method 0x06fdde03. +// +// Solidity: function name() view returns(string) +func (_ExampleERC20Decimals *ExampleERC20DecimalsCallerSession) Name() (string, error) { + return _ExampleERC20Decimals.Contract.Name(&_ExampleERC20Decimals.CallOpts) +} + +// Symbol is a free data retrieval call binding the contract method 0x95d89b41. +// +// Solidity: function symbol() view returns(string) +func (_ExampleERC20Decimals *ExampleERC20DecimalsCaller) Symbol(opts *bind.CallOpts) (string, error) { + var out []interface{} + err := _ExampleERC20Decimals.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 (_ExampleERC20Decimals *ExampleERC20DecimalsSession) Symbol() (string, error) { + return _ExampleERC20Decimals.Contract.Symbol(&_ExampleERC20Decimals.CallOpts) +} + +// Symbol is a free data retrieval call binding the contract method 0x95d89b41. +// +// Solidity: function symbol() view returns(string) +func (_ExampleERC20Decimals *ExampleERC20DecimalsCallerSession) Symbol() (string, error) { + return _ExampleERC20Decimals.Contract.Symbol(&_ExampleERC20Decimals.CallOpts) +} + +// TokenDecimals is a free data retrieval call binding the contract method 0x3b97e856. +// +// Solidity: function tokenDecimals() view returns(uint8) +func (_ExampleERC20Decimals *ExampleERC20DecimalsCaller) TokenDecimals(opts *bind.CallOpts) (uint8, error) { + var out []interface{} + err := _ExampleERC20Decimals.contract.Call(opts, &out, "tokenDecimals") + + if err != nil { + return *new(uint8), err + } + + out0 := *abi.ConvertType(out[0], new(uint8)).(*uint8) + + return out0, err + +} + +// TokenDecimals is a free data retrieval call binding the contract method 0x3b97e856. +// +// Solidity: function tokenDecimals() view returns(uint8) +func (_ExampleERC20Decimals *ExampleERC20DecimalsSession) TokenDecimals() (uint8, error) { + return _ExampleERC20Decimals.Contract.TokenDecimals(&_ExampleERC20Decimals.CallOpts) +} + +// TokenDecimals is a free data retrieval call binding the contract method 0x3b97e856. +// +// Solidity: function tokenDecimals() view returns(uint8) +func (_ExampleERC20Decimals *ExampleERC20DecimalsCallerSession) TokenDecimals() (uint8, error) { + return _ExampleERC20Decimals.Contract.TokenDecimals(&_ExampleERC20Decimals.CallOpts) +} + +// TotalSupply is a free data retrieval call binding the contract method 0x18160ddd. +// +// Solidity: function totalSupply() view returns(uint256) +func (_ExampleERC20Decimals *ExampleERC20DecimalsCaller) TotalSupply(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _ExampleERC20Decimals.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 (_ExampleERC20Decimals *ExampleERC20DecimalsSession) TotalSupply() (*big.Int, error) { + return _ExampleERC20Decimals.Contract.TotalSupply(&_ExampleERC20Decimals.CallOpts) +} + +// TotalSupply is a free data retrieval call binding the contract method 0x18160ddd. +// +// Solidity: function totalSupply() view returns(uint256) +func (_ExampleERC20Decimals *ExampleERC20DecimalsCallerSession) TotalSupply() (*big.Int, error) { + return _ExampleERC20Decimals.Contract.TotalSupply(&_ExampleERC20Decimals.CallOpts) +} + +// Approve is a paid mutator transaction binding the contract method 0x095ea7b3. +// +// Solidity: function approve(address spender, uint256 value) returns(bool) +func (_ExampleERC20Decimals *ExampleERC20DecimalsTransactor) Approve(opts *bind.TransactOpts, spender common.Address, value *big.Int) (*types.Transaction, error) { + return _ExampleERC20Decimals.contract.Transact(opts, "approve", spender, value) +} + +// Approve is a paid mutator transaction binding the contract method 0x095ea7b3. +// +// Solidity: function approve(address spender, uint256 value) returns(bool) +func (_ExampleERC20Decimals *ExampleERC20DecimalsSession) Approve(spender common.Address, value *big.Int) (*types.Transaction, error) { + return _ExampleERC20Decimals.Contract.Approve(&_ExampleERC20Decimals.TransactOpts, spender, value) +} + +// Approve is a paid mutator transaction binding the contract method 0x095ea7b3. +// +// Solidity: function approve(address spender, uint256 value) returns(bool) +func (_ExampleERC20Decimals *ExampleERC20DecimalsTransactorSession) Approve(spender common.Address, value *big.Int) (*types.Transaction, error) { + return _ExampleERC20Decimals.Contract.Approve(&_ExampleERC20Decimals.TransactOpts, spender, value) +} + +// Burn is a paid mutator transaction binding the contract method 0x42966c68. +// +// Solidity: function burn(uint256 value) returns() +func (_ExampleERC20Decimals *ExampleERC20DecimalsTransactor) Burn(opts *bind.TransactOpts, value *big.Int) (*types.Transaction, error) { + return _ExampleERC20Decimals.contract.Transact(opts, "burn", value) +} + +// Burn is a paid mutator transaction binding the contract method 0x42966c68. +// +// Solidity: function burn(uint256 value) returns() +func (_ExampleERC20Decimals *ExampleERC20DecimalsSession) Burn(value *big.Int) (*types.Transaction, error) { + return _ExampleERC20Decimals.Contract.Burn(&_ExampleERC20Decimals.TransactOpts, value) +} + +// Burn is a paid mutator transaction binding the contract method 0x42966c68. +// +// Solidity: function burn(uint256 value) returns() +func (_ExampleERC20Decimals *ExampleERC20DecimalsTransactorSession) Burn(value *big.Int) (*types.Transaction, error) { + return _ExampleERC20Decimals.Contract.Burn(&_ExampleERC20Decimals.TransactOpts, value) +} + +// BurnFrom is a paid mutator transaction binding the contract method 0x79cc6790. +// +// Solidity: function burnFrom(address account, uint256 value) returns() +func (_ExampleERC20Decimals *ExampleERC20DecimalsTransactor) BurnFrom(opts *bind.TransactOpts, account common.Address, value *big.Int) (*types.Transaction, error) { + return _ExampleERC20Decimals.contract.Transact(opts, "burnFrom", account, value) +} + +// BurnFrom is a paid mutator transaction binding the contract method 0x79cc6790. +// +// Solidity: function burnFrom(address account, uint256 value) returns() +func (_ExampleERC20Decimals *ExampleERC20DecimalsSession) BurnFrom(account common.Address, value *big.Int) (*types.Transaction, error) { + return _ExampleERC20Decimals.Contract.BurnFrom(&_ExampleERC20Decimals.TransactOpts, account, value) +} + +// BurnFrom is a paid mutator transaction binding the contract method 0x79cc6790. +// +// Solidity: function burnFrom(address account, uint256 value) returns() +func (_ExampleERC20Decimals *ExampleERC20DecimalsTransactorSession) BurnFrom(account common.Address, value *big.Int) (*types.Transaction, error) { + return _ExampleERC20Decimals.Contract.BurnFrom(&_ExampleERC20Decimals.TransactOpts, account, value) +} + +// Mint is a paid mutator transaction binding the contract method 0x40c10f19. +// +// Solidity: function mint(address account, uint256 amount) returns() +func (_ExampleERC20Decimals *ExampleERC20DecimalsTransactor) Mint(opts *bind.TransactOpts, account common.Address, amount *big.Int) (*types.Transaction, error) { + return _ExampleERC20Decimals.contract.Transact(opts, "mint", account, amount) +} + +// Mint is a paid mutator transaction binding the contract method 0x40c10f19. +// +// Solidity: function mint(address account, uint256 amount) returns() +func (_ExampleERC20Decimals *ExampleERC20DecimalsSession) Mint(account common.Address, amount *big.Int) (*types.Transaction, error) { + return _ExampleERC20Decimals.Contract.Mint(&_ExampleERC20Decimals.TransactOpts, account, amount) +} + +// Mint is a paid mutator transaction binding the contract method 0x40c10f19. +// +// Solidity: function mint(address account, uint256 amount) returns() +func (_ExampleERC20Decimals *ExampleERC20DecimalsTransactorSession) Mint(account common.Address, amount *big.Int) (*types.Transaction, error) { + return _ExampleERC20Decimals.Contract.Mint(&_ExampleERC20Decimals.TransactOpts, account, amount) +} + +// Mint0 is a paid mutator transaction binding the contract method 0xa0712d68. +// +// Solidity: function mint(uint256 amount) returns() +func (_ExampleERC20Decimals *ExampleERC20DecimalsTransactor) Mint0(opts *bind.TransactOpts, amount *big.Int) (*types.Transaction, error) { + return _ExampleERC20Decimals.contract.Transact(opts, "mint0", amount) +} + +// Mint0 is a paid mutator transaction binding the contract method 0xa0712d68. +// +// Solidity: function mint(uint256 amount) returns() +func (_ExampleERC20Decimals *ExampleERC20DecimalsSession) Mint0(amount *big.Int) (*types.Transaction, error) { + return _ExampleERC20Decimals.Contract.Mint0(&_ExampleERC20Decimals.TransactOpts, amount) +} + +// Mint0 is a paid mutator transaction binding the contract method 0xa0712d68. +// +// Solidity: function mint(uint256 amount) returns() +func (_ExampleERC20Decimals *ExampleERC20DecimalsTransactorSession) Mint0(amount *big.Int) (*types.Transaction, error) { + return _ExampleERC20Decimals.Contract.Mint0(&_ExampleERC20Decimals.TransactOpts, amount) +} + +// Transfer is a paid mutator transaction binding the contract method 0xa9059cbb. +// +// Solidity: function transfer(address to, uint256 value) returns(bool) +func (_ExampleERC20Decimals *ExampleERC20DecimalsTransactor) Transfer(opts *bind.TransactOpts, to common.Address, value *big.Int) (*types.Transaction, error) { + return _ExampleERC20Decimals.contract.Transact(opts, "transfer", to, value) +} + +// Transfer is a paid mutator transaction binding the contract method 0xa9059cbb. +// +// Solidity: function transfer(address to, uint256 value) returns(bool) +func (_ExampleERC20Decimals *ExampleERC20DecimalsSession) Transfer(to common.Address, value *big.Int) (*types.Transaction, error) { + return _ExampleERC20Decimals.Contract.Transfer(&_ExampleERC20Decimals.TransactOpts, to, value) +} + +// Transfer is a paid mutator transaction binding the contract method 0xa9059cbb. +// +// Solidity: function transfer(address to, uint256 value) returns(bool) +func (_ExampleERC20Decimals *ExampleERC20DecimalsTransactorSession) Transfer(to common.Address, value *big.Int) (*types.Transaction, error) { + return _ExampleERC20Decimals.Contract.Transfer(&_ExampleERC20Decimals.TransactOpts, to, value) +} + +// TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd. +// +// Solidity: function transferFrom(address from, address to, uint256 value) returns(bool) +func (_ExampleERC20Decimals *ExampleERC20DecimalsTransactor) TransferFrom(opts *bind.TransactOpts, from common.Address, to common.Address, value *big.Int) (*types.Transaction, error) { + return _ExampleERC20Decimals.contract.Transact(opts, "transferFrom", from, to, value) +} + +// TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd. +// +// Solidity: function transferFrom(address from, address to, uint256 value) returns(bool) +func (_ExampleERC20Decimals *ExampleERC20DecimalsSession) TransferFrom(from common.Address, to common.Address, value *big.Int) (*types.Transaction, error) { + return _ExampleERC20Decimals.Contract.TransferFrom(&_ExampleERC20Decimals.TransactOpts, from, to, value) +} + +// TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd. +// +// Solidity: function transferFrom(address from, address to, uint256 value) returns(bool) +func (_ExampleERC20Decimals *ExampleERC20DecimalsTransactorSession) TransferFrom(from common.Address, to common.Address, value *big.Int) (*types.Transaction, error) { + return _ExampleERC20Decimals.Contract.TransferFrom(&_ExampleERC20Decimals.TransactOpts, from, to, value) +} + +// ExampleERC20DecimalsApprovalIterator is returned from FilterApproval and is used to iterate over the raw logs and unpacked data for Approval events raised by the ExampleERC20Decimals contract. +type ExampleERC20DecimalsApprovalIterator struct { + Event *ExampleERC20DecimalsApproval // 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 interfaces.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 *ExampleERC20DecimalsApprovalIterator) 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(ExampleERC20DecimalsApproval) + 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(ExampleERC20DecimalsApproval) + 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 *ExampleERC20DecimalsApprovalIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *ExampleERC20DecimalsApprovalIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// ExampleERC20DecimalsApproval represents a Approval event raised by the ExampleERC20Decimals contract. +type ExampleERC20DecimalsApproval 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 (_ExampleERC20Decimals *ExampleERC20DecimalsFilterer) FilterApproval(opts *bind.FilterOpts, owner []common.Address, spender []common.Address) (*ExampleERC20DecimalsApprovalIterator, 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 := _ExampleERC20Decimals.contract.FilterLogs(opts, "Approval", ownerRule, spenderRule) + if err != nil { + return nil, err + } + return &ExampleERC20DecimalsApprovalIterator{contract: _ExampleERC20Decimals.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 (_ExampleERC20Decimals *ExampleERC20DecimalsFilterer) WatchApproval(opts *bind.WatchOpts, sink chan<- *ExampleERC20DecimalsApproval, 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 := _ExampleERC20Decimals.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(ExampleERC20DecimalsApproval) + if err := _ExampleERC20Decimals.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 (_ExampleERC20Decimals *ExampleERC20DecimalsFilterer) ParseApproval(log types.Log) (*ExampleERC20DecimalsApproval, error) { + event := new(ExampleERC20DecimalsApproval) + if err := _ExampleERC20Decimals.contract.UnpackLog(event, "Approval", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// ExampleERC20DecimalsTransferIterator is returned from FilterTransfer and is used to iterate over the raw logs and unpacked data for Transfer events raised by the ExampleERC20Decimals contract. +type ExampleERC20DecimalsTransferIterator struct { + Event *ExampleERC20DecimalsTransfer // 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 interfaces.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 *ExampleERC20DecimalsTransferIterator) 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(ExampleERC20DecimalsTransfer) + 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(ExampleERC20DecimalsTransfer) + 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 *ExampleERC20DecimalsTransferIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *ExampleERC20DecimalsTransferIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// ExampleERC20DecimalsTransfer represents a Transfer event raised by the ExampleERC20Decimals contract. +type ExampleERC20DecimalsTransfer 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 (_ExampleERC20Decimals *ExampleERC20DecimalsFilterer) FilterTransfer(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*ExampleERC20DecimalsTransferIterator, 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 := _ExampleERC20Decimals.contract.FilterLogs(opts, "Transfer", fromRule, toRule) + if err != nil { + return nil, err + } + return &ExampleERC20DecimalsTransferIterator{contract: _ExampleERC20Decimals.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 (_ExampleERC20Decimals *ExampleERC20DecimalsFilterer) WatchTransfer(opts *bind.WatchOpts, sink chan<- *ExampleERC20DecimalsTransfer, 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 := _ExampleERC20Decimals.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(ExampleERC20DecimalsTransfer) + if err := _ExampleERC20Decimals.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 (_ExampleERC20Decimals *ExampleERC20DecimalsFilterer) ParseTransfer(log types.Log) (*ExampleERC20DecimalsTransfer, error) { + event := new(ExampleERC20DecimalsTransfer) + if err := _ExampleERC20Decimals.contract.UnpackLog(event, "Transfer", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} diff --git a/abi-bindings/go/ictt/mocks/MockERC20SendAndCallReceiver/MockERC20SendAndCallReceiver.go b/abi-bindings/go/ictt/mocks/MockERC20SendAndCallReceiver/MockERC20SendAndCallReceiver.go new file mode 100644 index 000000000..e05823b9d --- /dev/null +++ b/abi-bindings/go/ictt/mocks/MockERC20SendAndCallReceiver/MockERC20SendAndCallReceiver.go @@ -0,0 +1,441 @@ +// Code generated - DO NOT EDIT. +// This file is a generated binding and any manual changes will be lost. + +package mockerc20sendandcallreceiver + +import ( + "errors" + "math/big" + "strings" + + "github.com/ava-labs/subnet-evm/accounts/abi" + "github.com/ava-labs/subnet-evm/accounts/abi/bind" + "github.com/ava-labs/subnet-evm/core/types" + "github.com/ava-labs/subnet-evm/interfaces" + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/event" +) + +// Reference imports to suppress errors if they are not otherwise used. +var ( + _ = errors.New + _ = big.NewInt + _ = strings.NewReader + _ = interfaces.NotFound + _ = bind.Bind + _ = common.Big1 + _ = types.BloomLookup + _ = event.NewSubscription + _ = abi.ConvertType +) + +// MockERC20SendAndCallReceiverMetaData contains all meta data concerning the MockERC20SendAndCallReceiver contract. +var MockERC20SendAndCallReceiverMetaData = &bind.MetaData{ + ABI: "[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"target\",\"type\":\"address\"}],\"name\":\"AddressEmptyCode\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"AddressInsufficientBalance\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"FailedInnerCall\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"SafeERC20FailedOperation\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"sourceBlockchainID\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"originTokenTransferrerAddress\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"originSenderAddress\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"payload\",\"type\":\"bytes\"}],\"name\":\"TokensReceived\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"blockchainID\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"senderAddress\",\"type\":\"address\"}],\"name\":\"blockSender\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"blockchainID\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"senderAddress\",\"type\":\"address\"}],\"name\":\"blockedSenders\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"blocked\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"sourceBlockchainID\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"originTokenTransferrerAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"originSenderAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"payload\",\"type\":\"bytes\"}],\"name\":\"receiveTokens\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", + Bin: "0x6080604052348015600e575f80fd5b506107608061001c5f395ff3fe608060405234801561000f575f80fd5b506004361061003f575f3560e01c8063487bd69e146100435780637f450d8d1461008157806394395edd146100be575b5f80fd5b61006d610051366004610589565b5f60208181529281526040808220909352908152205460ff1681565b604051901515815260200160405180910390f35b6100bc61008f366004610589565b5f918252602082815260408084206001600160a01b0390931684529190529020805460ff19166001179055565b005b6100bc6100cc3660046105b3565b5f878152602081815260408083206001600160a01b038916845290915290205460ff16156101565760405162461bcd60e51b815260206004820152602c60248201527f4d6f636b455243323053656e64416e6443616c6c52656365697665723a20736560448201526b1b99195c88189b1bd8dad95960a21b60648201526084015b60405180910390fd5b846001600160a01b0316866001600160a01b0316887f7149eb81ada224b86bfda05a4cf439b25596d3c0d8015aebd1cdc11ab17fe190878787876040516101a09493929190610662565b60405180910390a4806102095760405162461bcd60e51b815260206004820152602b60248201527f4d6f636b455243323053656e64416e6443616c6c52656365697665723a20656d60448201526a1c1d1e481c185e5b1bd85960aa1b606482015260840161014d565b61021484338561021e565b5050505050505050565b6040516370a0823160e01b81523060048201525f9081906001600160a01b038616906370a0823190602401602060405180830381865afa158015610264573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061028891906106a9565b905061029f6001600160a01b038616853086610383565b6040516370a0823160e01b81523060048201525f906001600160a01b038716906370a0823190602401602060405180830381865afa1580156102e3573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061030791906106a9565b905081811161036d5760405162461bcd60e51b815260206004820152602c60248201527f5361666545524332305472616e7366657246726f6d3a2062616c616e6365206e60448201526b1bdd081a5b98dc99585cd95960a21b606482015260840161014d565b61037782826106c0565b925050505b9392505050565b604080516001600160a01b0385811660248301528416604482015260648082018490528251808303909101815260849091019091526020810180516001600160e01b03166323b872dd60e01b1790526103dd9085906103e3565b50505050565b5f6103f76001600160a01b03841683610449565b905080515f1415801561041b57508080602001905181019061041991906106df565b155b1561044457604051635274afe760e01b81526001600160a01b038416600482015260240161014d565b505050565b606061045683835f61045f565b90505b92915050565b6060814710156104845760405163cd78605960e01b815230600482015260240161014d565b5f80856001600160a01b0316848660405161049f91906106fe565b5f6040518083038185875af1925050503d805f81146104d9576040519150601f19603f3d011682016040523d82523d5f602084013e6104de565b606091505b50915091506103778683836060826104fe576104f982610545565b61037c565b815115801561051557506001600160a01b0384163b155b1561053e57604051639996b31560e01b81526001600160a01b038516600482015260240161014d565b508061037c565b8051156105555780518082602001fd5b604051630a12f52160e11b815260040160405180910390fd5b80356001600160a01b0381168114610584575f80fd5b919050565b5f806040838503121561059a575f80fd5b823591506105aa6020840161056e565b90509250929050565b5f805f805f805f60c0888a0312156105c9575f80fd5b873596506105d96020890161056e565b95506105e76040890161056e565b94506105f56060890161056e565b93506080880135925060a088013567ffffffffffffffff80821115610618575f80fd5b818a0191508a601f83011261062b575f80fd5b813581811115610639575f80fd5b8b602082850101111561064a575f80fd5b60208301945080935050505092959891949750929550565b6001600160a01b0385168152602081018490526060604082018190528101829052818360808301375f818301608090810191909152601f909201601f191601019392505050565b5f602082840312156106b9575f80fd5b5051919050565b8181038181111561045957634e487b7160e01b5f52601160045260245ffd5b5f602082840312156106ef575f80fd5b8151801515811461037c575f80fd5b5f82515f5b8181101561071d5760208186018101518583015201610703565b505f92019182525091905056fea2646970667358221220935f86821dab445799303eb58207a81b0763703997fd4f8f463f7674bdebea8364736f6c63430008190033", +} + +// MockERC20SendAndCallReceiverABI is the input ABI used to generate the binding from. +// Deprecated: Use MockERC20SendAndCallReceiverMetaData.ABI instead. +var MockERC20SendAndCallReceiverABI = MockERC20SendAndCallReceiverMetaData.ABI + +// MockERC20SendAndCallReceiverBin is the compiled bytecode used for deploying new contracts. +// Deprecated: Use MockERC20SendAndCallReceiverMetaData.Bin instead. +var MockERC20SendAndCallReceiverBin = MockERC20SendAndCallReceiverMetaData.Bin + +// DeployMockERC20SendAndCallReceiver deploys a new Ethereum contract, binding an instance of MockERC20SendAndCallReceiver to it. +func DeployMockERC20SendAndCallReceiver(auth *bind.TransactOpts, backend bind.ContractBackend) (common.Address, *types.Transaction, *MockERC20SendAndCallReceiver, error) { + parsed, err := MockERC20SendAndCallReceiverMetaData.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(MockERC20SendAndCallReceiverBin), backend) + if err != nil { + return common.Address{}, nil, nil, err + } + return address, tx, &MockERC20SendAndCallReceiver{MockERC20SendAndCallReceiverCaller: MockERC20SendAndCallReceiverCaller{contract: contract}, MockERC20SendAndCallReceiverTransactor: MockERC20SendAndCallReceiverTransactor{contract: contract}, MockERC20SendAndCallReceiverFilterer: MockERC20SendAndCallReceiverFilterer{contract: contract}}, nil +} + +// MockERC20SendAndCallReceiver is an auto generated Go binding around an Ethereum contract. +type MockERC20SendAndCallReceiver struct { + MockERC20SendAndCallReceiverCaller // Read-only binding to the contract + MockERC20SendAndCallReceiverTransactor // Write-only binding to the contract + MockERC20SendAndCallReceiverFilterer // Log filterer for contract events +} + +// MockERC20SendAndCallReceiverCaller is an auto generated read-only Go binding around an Ethereum contract. +type MockERC20SendAndCallReceiverCaller struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// MockERC20SendAndCallReceiverTransactor is an auto generated write-only Go binding around an Ethereum contract. +type MockERC20SendAndCallReceiverTransactor struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// MockERC20SendAndCallReceiverFilterer is an auto generated log filtering Go binding around an Ethereum contract events. +type MockERC20SendAndCallReceiverFilterer struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// MockERC20SendAndCallReceiverSession is an auto generated Go binding around an Ethereum contract, +// with pre-set call and transact options. +type MockERC20SendAndCallReceiverSession struct { + Contract *MockERC20SendAndCallReceiver // 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 +} + +// MockERC20SendAndCallReceiverCallerSession is an auto generated read-only Go binding around an Ethereum contract, +// with pre-set call options. +type MockERC20SendAndCallReceiverCallerSession struct { + Contract *MockERC20SendAndCallReceiverCaller // Generic contract caller binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session +} + +// MockERC20SendAndCallReceiverTransactorSession is an auto generated write-only Go binding around an Ethereum contract, +// with pre-set transact options. +type MockERC20SendAndCallReceiverTransactorSession struct { + Contract *MockERC20SendAndCallReceiverTransactor // Generic contract transactor binding to set the session for + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// MockERC20SendAndCallReceiverRaw is an auto generated low-level Go binding around an Ethereum contract. +type MockERC20SendAndCallReceiverRaw struct { + Contract *MockERC20SendAndCallReceiver // Generic contract binding to access the raw methods on +} + +// MockERC20SendAndCallReceiverCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. +type MockERC20SendAndCallReceiverCallerRaw struct { + Contract *MockERC20SendAndCallReceiverCaller // Generic read-only contract binding to access the raw methods on +} + +// MockERC20SendAndCallReceiverTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. +type MockERC20SendAndCallReceiverTransactorRaw struct { + Contract *MockERC20SendAndCallReceiverTransactor // Generic write-only contract binding to access the raw methods on +} + +// NewMockERC20SendAndCallReceiver creates a new instance of MockERC20SendAndCallReceiver, bound to a specific deployed contract. +func NewMockERC20SendAndCallReceiver(address common.Address, backend bind.ContractBackend) (*MockERC20SendAndCallReceiver, error) { + contract, err := bindMockERC20SendAndCallReceiver(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &MockERC20SendAndCallReceiver{MockERC20SendAndCallReceiverCaller: MockERC20SendAndCallReceiverCaller{contract: contract}, MockERC20SendAndCallReceiverTransactor: MockERC20SendAndCallReceiverTransactor{contract: contract}, MockERC20SendAndCallReceiverFilterer: MockERC20SendAndCallReceiverFilterer{contract: contract}}, nil +} + +// NewMockERC20SendAndCallReceiverCaller creates a new read-only instance of MockERC20SendAndCallReceiver, bound to a specific deployed contract. +func NewMockERC20SendAndCallReceiverCaller(address common.Address, caller bind.ContractCaller) (*MockERC20SendAndCallReceiverCaller, error) { + contract, err := bindMockERC20SendAndCallReceiver(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &MockERC20SendAndCallReceiverCaller{contract: contract}, nil +} + +// NewMockERC20SendAndCallReceiverTransactor creates a new write-only instance of MockERC20SendAndCallReceiver, bound to a specific deployed contract. +func NewMockERC20SendAndCallReceiverTransactor(address common.Address, transactor bind.ContractTransactor) (*MockERC20SendAndCallReceiverTransactor, error) { + contract, err := bindMockERC20SendAndCallReceiver(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &MockERC20SendAndCallReceiverTransactor{contract: contract}, nil +} + +// NewMockERC20SendAndCallReceiverFilterer creates a new log filterer instance of MockERC20SendAndCallReceiver, bound to a specific deployed contract. +func NewMockERC20SendAndCallReceiverFilterer(address common.Address, filterer bind.ContractFilterer) (*MockERC20SendAndCallReceiverFilterer, error) { + contract, err := bindMockERC20SendAndCallReceiver(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &MockERC20SendAndCallReceiverFilterer{contract: contract}, nil +} + +// bindMockERC20SendAndCallReceiver binds a generic wrapper to an already deployed contract. +func bindMockERC20SendAndCallReceiver(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := MockERC20SendAndCallReceiverMetaData.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 (_MockERC20SendAndCallReceiver *MockERC20SendAndCallReceiverRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _MockERC20SendAndCallReceiver.Contract.MockERC20SendAndCallReceiverCaller.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 (_MockERC20SendAndCallReceiver *MockERC20SendAndCallReceiverRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _MockERC20SendAndCallReceiver.Contract.MockERC20SendAndCallReceiverTransactor.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_MockERC20SendAndCallReceiver *MockERC20SendAndCallReceiverRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _MockERC20SendAndCallReceiver.Contract.MockERC20SendAndCallReceiverTransactor.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 (_MockERC20SendAndCallReceiver *MockERC20SendAndCallReceiverCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _MockERC20SendAndCallReceiver.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 (_MockERC20SendAndCallReceiver *MockERC20SendAndCallReceiverTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _MockERC20SendAndCallReceiver.Contract.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_MockERC20SendAndCallReceiver *MockERC20SendAndCallReceiverTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _MockERC20SendAndCallReceiver.Contract.contract.Transact(opts, method, params...) +} + +// BlockedSenders is a free data retrieval call binding the contract method 0x487bd69e. +// +// Solidity: function blockedSenders(bytes32 blockchainID, address senderAddress) view returns(bool blocked) +func (_MockERC20SendAndCallReceiver *MockERC20SendAndCallReceiverCaller) BlockedSenders(opts *bind.CallOpts, blockchainID [32]byte, senderAddress common.Address) (bool, error) { + var out []interface{} + err := _MockERC20SendAndCallReceiver.contract.Call(opts, &out, "blockedSenders", blockchainID, senderAddress) + + if err != nil { + return *new(bool), err + } + + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + + return out0, err + +} + +// BlockedSenders is a free data retrieval call binding the contract method 0x487bd69e. +// +// Solidity: function blockedSenders(bytes32 blockchainID, address senderAddress) view returns(bool blocked) +func (_MockERC20SendAndCallReceiver *MockERC20SendAndCallReceiverSession) BlockedSenders(blockchainID [32]byte, senderAddress common.Address) (bool, error) { + return _MockERC20SendAndCallReceiver.Contract.BlockedSenders(&_MockERC20SendAndCallReceiver.CallOpts, blockchainID, senderAddress) +} + +// BlockedSenders is a free data retrieval call binding the contract method 0x487bd69e. +// +// Solidity: function blockedSenders(bytes32 blockchainID, address senderAddress) view returns(bool blocked) +func (_MockERC20SendAndCallReceiver *MockERC20SendAndCallReceiverCallerSession) BlockedSenders(blockchainID [32]byte, senderAddress common.Address) (bool, error) { + return _MockERC20SendAndCallReceiver.Contract.BlockedSenders(&_MockERC20SendAndCallReceiver.CallOpts, blockchainID, senderAddress) +} + +// BlockSender is a paid mutator transaction binding the contract method 0x7f450d8d. +// +// Solidity: function blockSender(bytes32 blockchainID, address senderAddress) returns() +func (_MockERC20SendAndCallReceiver *MockERC20SendAndCallReceiverTransactor) BlockSender(opts *bind.TransactOpts, blockchainID [32]byte, senderAddress common.Address) (*types.Transaction, error) { + return _MockERC20SendAndCallReceiver.contract.Transact(opts, "blockSender", blockchainID, senderAddress) +} + +// BlockSender is a paid mutator transaction binding the contract method 0x7f450d8d. +// +// Solidity: function blockSender(bytes32 blockchainID, address senderAddress) returns() +func (_MockERC20SendAndCallReceiver *MockERC20SendAndCallReceiverSession) BlockSender(blockchainID [32]byte, senderAddress common.Address) (*types.Transaction, error) { + return _MockERC20SendAndCallReceiver.Contract.BlockSender(&_MockERC20SendAndCallReceiver.TransactOpts, blockchainID, senderAddress) +} + +// BlockSender is a paid mutator transaction binding the contract method 0x7f450d8d. +// +// Solidity: function blockSender(bytes32 blockchainID, address senderAddress) returns() +func (_MockERC20SendAndCallReceiver *MockERC20SendAndCallReceiverTransactorSession) BlockSender(blockchainID [32]byte, senderAddress common.Address) (*types.Transaction, error) { + return _MockERC20SendAndCallReceiver.Contract.BlockSender(&_MockERC20SendAndCallReceiver.TransactOpts, blockchainID, senderAddress) +} + +// ReceiveTokens is a paid mutator transaction binding the contract method 0x94395edd. +// +// Solidity: function receiveTokens(bytes32 sourceBlockchainID, address originTokenTransferrerAddress, address originSenderAddress, address token, uint256 amount, bytes payload) returns() +func (_MockERC20SendAndCallReceiver *MockERC20SendAndCallReceiverTransactor) ReceiveTokens(opts *bind.TransactOpts, sourceBlockchainID [32]byte, originTokenTransferrerAddress common.Address, originSenderAddress common.Address, token common.Address, amount *big.Int, payload []byte) (*types.Transaction, error) { + return _MockERC20SendAndCallReceiver.contract.Transact(opts, "receiveTokens", sourceBlockchainID, originTokenTransferrerAddress, originSenderAddress, token, amount, payload) +} + +// ReceiveTokens is a paid mutator transaction binding the contract method 0x94395edd. +// +// Solidity: function receiveTokens(bytes32 sourceBlockchainID, address originTokenTransferrerAddress, address originSenderAddress, address token, uint256 amount, bytes payload) returns() +func (_MockERC20SendAndCallReceiver *MockERC20SendAndCallReceiverSession) ReceiveTokens(sourceBlockchainID [32]byte, originTokenTransferrerAddress common.Address, originSenderAddress common.Address, token common.Address, amount *big.Int, payload []byte) (*types.Transaction, error) { + return _MockERC20SendAndCallReceiver.Contract.ReceiveTokens(&_MockERC20SendAndCallReceiver.TransactOpts, sourceBlockchainID, originTokenTransferrerAddress, originSenderAddress, token, amount, payload) +} + +// ReceiveTokens is a paid mutator transaction binding the contract method 0x94395edd. +// +// Solidity: function receiveTokens(bytes32 sourceBlockchainID, address originTokenTransferrerAddress, address originSenderAddress, address token, uint256 amount, bytes payload) returns() +func (_MockERC20SendAndCallReceiver *MockERC20SendAndCallReceiverTransactorSession) ReceiveTokens(sourceBlockchainID [32]byte, originTokenTransferrerAddress common.Address, originSenderAddress common.Address, token common.Address, amount *big.Int, payload []byte) (*types.Transaction, error) { + return _MockERC20SendAndCallReceiver.Contract.ReceiveTokens(&_MockERC20SendAndCallReceiver.TransactOpts, sourceBlockchainID, originTokenTransferrerAddress, originSenderAddress, token, amount, payload) +} + +// MockERC20SendAndCallReceiverTokensReceivedIterator is returned from FilterTokensReceived and is used to iterate over the raw logs and unpacked data for TokensReceived events raised by the MockERC20SendAndCallReceiver contract. +type MockERC20SendAndCallReceiverTokensReceivedIterator struct { + Event *MockERC20SendAndCallReceiverTokensReceived // 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 interfaces.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 *MockERC20SendAndCallReceiverTokensReceivedIterator) 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(MockERC20SendAndCallReceiverTokensReceived) + 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(MockERC20SendAndCallReceiverTokensReceived) + 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 *MockERC20SendAndCallReceiverTokensReceivedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *MockERC20SendAndCallReceiverTokensReceivedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// MockERC20SendAndCallReceiverTokensReceived represents a TokensReceived event raised by the MockERC20SendAndCallReceiver contract. +type MockERC20SendAndCallReceiverTokensReceived struct { + SourceBlockchainID [32]byte + OriginTokenTransferrerAddress common.Address + OriginSenderAddress common.Address + Token common.Address + Amount *big.Int + Payload []byte + Raw types.Log // Blockchain specific contextual infos +} + +// FilterTokensReceived is a free log retrieval operation binding the contract event 0x7149eb81ada224b86bfda05a4cf439b25596d3c0d8015aebd1cdc11ab17fe190. +// +// Solidity: event TokensReceived(bytes32 indexed sourceBlockchainID, address indexed originTokenTransferrerAddress, address indexed originSenderAddress, address token, uint256 amount, bytes payload) +func (_MockERC20SendAndCallReceiver *MockERC20SendAndCallReceiverFilterer) FilterTokensReceived(opts *bind.FilterOpts, sourceBlockchainID [][32]byte, originTokenTransferrerAddress []common.Address, originSenderAddress []common.Address) (*MockERC20SendAndCallReceiverTokensReceivedIterator, error) { + + var sourceBlockchainIDRule []interface{} + for _, sourceBlockchainIDItem := range sourceBlockchainID { + sourceBlockchainIDRule = append(sourceBlockchainIDRule, sourceBlockchainIDItem) + } + var originTokenTransferrerAddressRule []interface{} + for _, originTokenTransferrerAddressItem := range originTokenTransferrerAddress { + originTokenTransferrerAddressRule = append(originTokenTransferrerAddressRule, originTokenTransferrerAddressItem) + } + var originSenderAddressRule []interface{} + for _, originSenderAddressItem := range originSenderAddress { + originSenderAddressRule = append(originSenderAddressRule, originSenderAddressItem) + } + + logs, sub, err := _MockERC20SendAndCallReceiver.contract.FilterLogs(opts, "TokensReceived", sourceBlockchainIDRule, originTokenTransferrerAddressRule, originSenderAddressRule) + if err != nil { + return nil, err + } + return &MockERC20SendAndCallReceiverTokensReceivedIterator{contract: _MockERC20SendAndCallReceiver.contract, event: "TokensReceived", logs: logs, sub: sub}, nil +} + +// WatchTokensReceived is a free log subscription operation binding the contract event 0x7149eb81ada224b86bfda05a4cf439b25596d3c0d8015aebd1cdc11ab17fe190. +// +// Solidity: event TokensReceived(bytes32 indexed sourceBlockchainID, address indexed originTokenTransferrerAddress, address indexed originSenderAddress, address token, uint256 amount, bytes payload) +func (_MockERC20SendAndCallReceiver *MockERC20SendAndCallReceiverFilterer) WatchTokensReceived(opts *bind.WatchOpts, sink chan<- *MockERC20SendAndCallReceiverTokensReceived, sourceBlockchainID [][32]byte, originTokenTransferrerAddress []common.Address, originSenderAddress []common.Address) (event.Subscription, error) { + + var sourceBlockchainIDRule []interface{} + for _, sourceBlockchainIDItem := range sourceBlockchainID { + sourceBlockchainIDRule = append(sourceBlockchainIDRule, sourceBlockchainIDItem) + } + var originTokenTransferrerAddressRule []interface{} + for _, originTokenTransferrerAddressItem := range originTokenTransferrerAddress { + originTokenTransferrerAddressRule = append(originTokenTransferrerAddressRule, originTokenTransferrerAddressItem) + } + var originSenderAddressRule []interface{} + for _, originSenderAddressItem := range originSenderAddress { + originSenderAddressRule = append(originSenderAddressRule, originSenderAddressItem) + } + + logs, sub, err := _MockERC20SendAndCallReceiver.contract.WatchLogs(opts, "TokensReceived", sourceBlockchainIDRule, originTokenTransferrerAddressRule, originSenderAddressRule) + 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(MockERC20SendAndCallReceiverTokensReceived) + if err := _MockERC20SendAndCallReceiver.contract.UnpackLog(event, "TokensReceived", 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 +} + +// ParseTokensReceived is a log parse operation binding the contract event 0x7149eb81ada224b86bfda05a4cf439b25596d3c0d8015aebd1cdc11ab17fe190. +// +// Solidity: event TokensReceived(bytes32 indexed sourceBlockchainID, address indexed originTokenTransferrerAddress, address indexed originSenderAddress, address token, uint256 amount, bytes payload) +func (_MockERC20SendAndCallReceiver *MockERC20SendAndCallReceiverFilterer) ParseTokensReceived(log types.Log) (*MockERC20SendAndCallReceiverTokensReceived, error) { + event := new(MockERC20SendAndCallReceiverTokensReceived) + if err := _MockERC20SendAndCallReceiver.contract.UnpackLog(event, "TokensReceived", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} diff --git a/abi-bindings/go/ictt/mocks/MockNativeSendAndCallReceiver/MockNativeSendAndCallReceiver.go b/abi-bindings/go/ictt/mocks/MockNativeSendAndCallReceiver/MockNativeSendAndCallReceiver.go new file mode 100644 index 000000000..a47153582 --- /dev/null +++ b/abi-bindings/go/ictt/mocks/MockNativeSendAndCallReceiver/MockNativeSendAndCallReceiver.go @@ -0,0 +1,440 @@ +// Code generated - DO NOT EDIT. +// This file is a generated binding and any manual changes will be lost. + +package mocknativesendandcallreceiver + +import ( + "errors" + "math/big" + "strings" + + "github.com/ava-labs/subnet-evm/accounts/abi" + "github.com/ava-labs/subnet-evm/accounts/abi/bind" + "github.com/ava-labs/subnet-evm/core/types" + "github.com/ava-labs/subnet-evm/interfaces" + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/event" +) + +// Reference imports to suppress errors if they are not otherwise used. +var ( + _ = errors.New + _ = big.NewInt + _ = strings.NewReader + _ = interfaces.NotFound + _ = bind.Bind + _ = common.Big1 + _ = types.BloomLookup + _ = event.NewSubscription + _ = abi.ConvertType +) + +// MockNativeSendAndCallReceiverMetaData contains all meta data concerning the MockNativeSendAndCallReceiver contract. +var MockNativeSendAndCallReceiverMetaData = &bind.MetaData{ + ABI: "[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"sourceBlockchainID\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"originTokenTransferrerAddress\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"originSenderAddress\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"payload\",\"type\":\"bytes\"}],\"name\":\"TokensReceived\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"blockchainID\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"senderAddress\",\"type\":\"address\"}],\"name\":\"blockSender\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"blockchainID\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"senderAddress\",\"type\":\"address\"}],\"name\":\"blockedSenders\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"blocked\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"sourceBlockchainID\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"originTokenTransferrerAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"originSenderAddress\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"payload\",\"type\":\"bytes\"}],\"name\":\"receiveTokens\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"}]", + Bin: "0x6080604052348015600e575f80fd5b506103678061001c5f395ff3fe608060405260043610610033575f3560e01c80632c3625fe14610037578063487bd69e1461004c5780637f450d8d14610096575b5f80fd5b61004a61004536600461023f565b6100dd565b005b348015610057575f80fd5b506100826100663660046102d2565b5f60208181529281526040808220909352908152205460ff1681565b604051901515815260200160405180910390f35b3480156100a1575f80fd5b5061004a6100b03660046102d2565b5f918252602082815260408084206001600160a01b0390931684529190529020805460ff19166001179055565b5f858152602081815260408083206001600160a01b038716845290915290205460ff16156101685760405162461bcd60e51b815260206004820152602d60248201527f4d6f636b4e617469766553656e64416e6443616c6c52656365697665723a207360448201526c195b99195c88189b1bd8dad959609a1b60648201526084015b60405180910390fd5b826001600160a01b0316846001600160a01b0316867f98f64f0ad4e0e2a42535fa15b05dc6e800e16e439c98143fefabb72b43bad53e3486866040516101b0939291906102fc565b60405180910390a45f81900361021d5760405162461bcd60e51b815260206004820152602c60248201527f4d6f636b4e617469766553656e64416e6443616c6c52656365697665723a206560448201526b1b5c1d1e481c185e5b1bd85960a21b606482015260840161015f565b5050505050565b80356001600160a01b038116811461023a575f80fd5b919050565b5f805f805f60808688031215610253575f80fd5b8535945061026360208701610224565b935061027160408701610224565b9250606086013567ffffffffffffffff8082111561028d575f80fd5b818801915088601f8301126102a0575f80fd5b8135818111156102ae575f80fd5b8960208285010111156102bf575f80fd5b9699959850939650602001949392505050565b5f80604083850312156102e3575f80fd5b823591506102f360208401610224565b90509250929050565b83815260406020820152816040820152818360608301375f818301606090810191909152601f909201601f191601019291505056fea2646970667358221220262d64360ecf05765079b8918f7466964a337ee572b6dc536b81332e509b0a0964736f6c63430008190033", +} + +// MockNativeSendAndCallReceiverABI is the input ABI used to generate the binding from. +// Deprecated: Use MockNativeSendAndCallReceiverMetaData.ABI instead. +var MockNativeSendAndCallReceiverABI = MockNativeSendAndCallReceiverMetaData.ABI + +// MockNativeSendAndCallReceiverBin is the compiled bytecode used for deploying new contracts. +// Deprecated: Use MockNativeSendAndCallReceiverMetaData.Bin instead. +var MockNativeSendAndCallReceiverBin = MockNativeSendAndCallReceiverMetaData.Bin + +// DeployMockNativeSendAndCallReceiver deploys a new Ethereum contract, binding an instance of MockNativeSendAndCallReceiver to it. +func DeployMockNativeSendAndCallReceiver(auth *bind.TransactOpts, backend bind.ContractBackend) (common.Address, *types.Transaction, *MockNativeSendAndCallReceiver, error) { + parsed, err := MockNativeSendAndCallReceiverMetaData.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(MockNativeSendAndCallReceiverBin), backend) + if err != nil { + return common.Address{}, nil, nil, err + } + return address, tx, &MockNativeSendAndCallReceiver{MockNativeSendAndCallReceiverCaller: MockNativeSendAndCallReceiverCaller{contract: contract}, MockNativeSendAndCallReceiverTransactor: MockNativeSendAndCallReceiverTransactor{contract: contract}, MockNativeSendAndCallReceiverFilterer: MockNativeSendAndCallReceiverFilterer{contract: contract}}, nil +} + +// MockNativeSendAndCallReceiver is an auto generated Go binding around an Ethereum contract. +type MockNativeSendAndCallReceiver struct { + MockNativeSendAndCallReceiverCaller // Read-only binding to the contract + MockNativeSendAndCallReceiverTransactor // Write-only binding to the contract + MockNativeSendAndCallReceiverFilterer // Log filterer for contract events +} + +// MockNativeSendAndCallReceiverCaller is an auto generated read-only Go binding around an Ethereum contract. +type MockNativeSendAndCallReceiverCaller struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// MockNativeSendAndCallReceiverTransactor is an auto generated write-only Go binding around an Ethereum contract. +type MockNativeSendAndCallReceiverTransactor struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// MockNativeSendAndCallReceiverFilterer is an auto generated log filtering Go binding around an Ethereum contract events. +type MockNativeSendAndCallReceiverFilterer struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// MockNativeSendAndCallReceiverSession is an auto generated Go binding around an Ethereum contract, +// with pre-set call and transact options. +type MockNativeSendAndCallReceiverSession struct { + Contract *MockNativeSendAndCallReceiver // 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 +} + +// MockNativeSendAndCallReceiverCallerSession is an auto generated read-only Go binding around an Ethereum contract, +// with pre-set call options. +type MockNativeSendAndCallReceiverCallerSession struct { + Contract *MockNativeSendAndCallReceiverCaller // Generic contract caller binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session +} + +// MockNativeSendAndCallReceiverTransactorSession is an auto generated write-only Go binding around an Ethereum contract, +// with pre-set transact options. +type MockNativeSendAndCallReceiverTransactorSession struct { + Contract *MockNativeSendAndCallReceiverTransactor // Generic contract transactor binding to set the session for + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// MockNativeSendAndCallReceiverRaw is an auto generated low-level Go binding around an Ethereum contract. +type MockNativeSendAndCallReceiverRaw struct { + Contract *MockNativeSendAndCallReceiver // Generic contract binding to access the raw methods on +} + +// MockNativeSendAndCallReceiverCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. +type MockNativeSendAndCallReceiverCallerRaw struct { + Contract *MockNativeSendAndCallReceiverCaller // Generic read-only contract binding to access the raw methods on +} + +// MockNativeSendAndCallReceiverTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. +type MockNativeSendAndCallReceiverTransactorRaw struct { + Contract *MockNativeSendAndCallReceiverTransactor // Generic write-only contract binding to access the raw methods on +} + +// NewMockNativeSendAndCallReceiver creates a new instance of MockNativeSendAndCallReceiver, bound to a specific deployed contract. +func NewMockNativeSendAndCallReceiver(address common.Address, backend bind.ContractBackend) (*MockNativeSendAndCallReceiver, error) { + contract, err := bindMockNativeSendAndCallReceiver(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &MockNativeSendAndCallReceiver{MockNativeSendAndCallReceiverCaller: MockNativeSendAndCallReceiverCaller{contract: contract}, MockNativeSendAndCallReceiverTransactor: MockNativeSendAndCallReceiverTransactor{contract: contract}, MockNativeSendAndCallReceiverFilterer: MockNativeSendAndCallReceiverFilterer{contract: contract}}, nil +} + +// NewMockNativeSendAndCallReceiverCaller creates a new read-only instance of MockNativeSendAndCallReceiver, bound to a specific deployed contract. +func NewMockNativeSendAndCallReceiverCaller(address common.Address, caller bind.ContractCaller) (*MockNativeSendAndCallReceiverCaller, error) { + contract, err := bindMockNativeSendAndCallReceiver(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &MockNativeSendAndCallReceiverCaller{contract: contract}, nil +} + +// NewMockNativeSendAndCallReceiverTransactor creates a new write-only instance of MockNativeSendAndCallReceiver, bound to a specific deployed contract. +func NewMockNativeSendAndCallReceiverTransactor(address common.Address, transactor bind.ContractTransactor) (*MockNativeSendAndCallReceiverTransactor, error) { + contract, err := bindMockNativeSendAndCallReceiver(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &MockNativeSendAndCallReceiverTransactor{contract: contract}, nil +} + +// NewMockNativeSendAndCallReceiverFilterer creates a new log filterer instance of MockNativeSendAndCallReceiver, bound to a specific deployed contract. +func NewMockNativeSendAndCallReceiverFilterer(address common.Address, filterer bind.ContractFilterer) (*MockNativeSendAndCallReceiverFilterer, error) { + contract, err := bindMockNativeSendAndCallReceiver(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &MockNativeSendAndCallReceiverFilterer{contract: contract}, nil +} + +// bindMockNativeSendAndCallReceiver binds a generic wrapper to an already deployed contract. +func bindMockNativeSendAndCallReceiver(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := MockNativeSendAndCallReceiverMetaData.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 (_MockNativeSendAndCallReceiver *MockNativeSendAndCallReceiverRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _MockNativeSendAndCallReceiver.Contract.MockNativeSendAndCallReceiverCaller.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 (_MockNativeSendAndCallReceiver *MockNativeSendAndCallReceiverRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _MockNativeSendAndCallReceiver.Contract.MockNativeSendAndCallReceiverTransactor.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_MockNativeSendAndCallReceiver *MockNativeSendAndCallReceiverRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _MockNativeSendAndCallReceiver.Contract.MockNativeSendAndCallReceiverTransactor.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 (_MockNativeSendAndCallReceiver *MockNativeSendAndCallReceiverCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _MockNativeSendAndCallReceiver.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 (_MockNativeSendAndCallReceiver *MockNativeSendAndCallReceiverTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _MockNativeSendAndCallReceiver.Contract.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_MockNativeSendAndCallReceiver *MockNativeSendAndCallReceiverTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _MockNativeSendAndCallReceiver.Contract.contract.Transact(opts, method, params...) +} + +// BlockedSenders is a free data retrieval call binding the contract method 0x487bd69e. +// +// Solidity: function blockedSenders(bytes32 blockchainID, address senderAddress) view returns(bool blocked) +func (_MockNativeSendAndCallReceiver *MockNativeSendAndCallReceiverCaller) BlockedSenders(opts *bind.CallOpts, blockchainID [32]byte, senderAddress common.Address) (bool, error) { + var out []interface{} + err := _MockNativeSendAndCallReceiver.contract.Call(opts, &out, "blockedSenders", blockchainID, senderAddress) + + if err != nil { + return *new(bool), err + } + + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + + return out0, err + +} + +// BlockedSenders is a free data retrieval call binding the contract method 0x487bd69e. +// +// Solidity: function blockedSenders(bytes32 blockchainID, address senderAddress) view returns(bool blocked) +func (_MockNativeSendAndCallReceiver *MockNativeSendAndCallReceiverSession) BlockedSenders(blockchainID [32]byte, senderAddress common.Address) (bool, error) { + return _MockNativeSendAndCallReceiver.Contract.BlockedSenders(&_MockNativeSendAndCallReceiver.CallOpts, blockchainID, senderAddress) +} + +// BlockedSenders is a free data retrieval call binding the contract method 0x487bd69e. +// +// Solidity: function blockedSenders(bytes32 blockchainID, address senderAddress) view returns(bool blocked) +func (_MockNativeSendAndCallReceiver *MockNativeSendAndCallReceiverCallerSession) BlockedSenders(blockchainID [32]byte, senderAddress common.Address) (bool, error) { + return _MockNativeSendAndCallReceiver.Contract.BlockedSenders(&_MockNativeSendAndCallReceiver.CallOpts, blockchainID, senderAddress) +} + +// BlockSender is a paid mutator transaction binding the contract method 0x7f450d8d. +// +// Solidity: function blockSender(bytes32 blockchainID, address senderAddress) returns() +func (_MockNativeSendAndCallReceiver *MockNativeSendAndCallReceiverTransactor) BlockSender(opts *bind.TransactOpts, blockchainID [32]byte, senderAddress common.Address) (*types.Transaction, error) { + return _MockNativeSendAndCallReceiver.contract.Transact(opts, "blockSender", blockchainID, senderAddress) +} + +// BlockSender is a paid mutator transaction binding the contract method 0x7f450d8d. +// +// Solidity: function blockSender(bytes32 blockchainID, address senderAddress) returns() +func (_MockNativeSendAndCallReceiver *MockNativeSendAndCallReceiverSession) BlockSender(blockchainID [32]byte, senderAddress common.Address) (*types.Transaction, error) { + return _MockNativeSendAndCallReceiver.Contract.BlockSender(&_MockNativeSendAndCallReceiver.TransactOpts, blockchainID, senderAddress) +} + +// BlockSender is a paid mutator transaction binding the contract method 0x7f450d8d. +// +// Solidity: function blockSender(bytes32 blockchainID, address senderAddress) returns() +func (_MockNativeSendAndCallReceiver *MockNativeSendAndCallReceiverTransactorSession) BlockSender(blockchainID [32]byte, senderAddress common.Address) (*types.Transaction, error) { + return _MockNativeSendAndCallReceiver.Contract.BlockSender(&_MockNativeSendAndCallReceiver.TransactOpts, blockchainID, senderAddress) +} + +// ReceiveTokens is a paid mutator transaction binding the contract method 0x2c3625fe. +// +// Solidity: function receiveTokens(bytes32 sourceBlockchainID, address originTokenTransferrerAddress, address originSenderAddress, bytes payload) payable returns() +func (_MockNativeSendAndCallReceiver *MockNativeSendAndCallReceiverTransactor) ReceiveTokens(opts *bind.TransactOpts, sourceBlockchainID [32]byte, originTokenTransferrerAddress common.Address, originSenderAddress common.Address, payload []byte) (*types.Transaction, error) { + return _MockNativeSendAndCallReceiver.contract.Transact(opts, "receiveTokens", sourceBlockchainID, originTokenTransferrerAddress, originSenderAddress, payload) +} + +// ReceiveTokens is a paid mutator transaction binding the contract method 0x2c3625fe. +// +// Solidity: function receiveTokens(bytes32 sourceBlockchainID, address originTokenTransferrerAddress, address originSenderAddress, bytes payload) payable returns() +func (_MockNativeSendAndCallReceiver *MockNativeSendAndCallReceiverSession) ReceiveTokens(sourceBlockchainID [32]byte, originTokenTransferrerAddress common.Address, originSenderAddress common.Address, payload []byte) (*types.Transaction, error) { + return _MockNativeSendAndCallReceiver.Contract.ReceiveTokens(&_MockNativeSendAndCallReceiver.TransactOpts, sourceBlockchainID, originTokenTransferrerAddress, originSenderAddress, payload) +} + +// ReceiveTokens is a paid mutator transaction binding the contract method 0x2c3625fe. +// +// Solidity: function receiveTokens(bytes32 sourceBlockchainID, address originTokenTransferrerAddress, address originSenderAddress, bytes payload) payable returns() +func (_MockNativeSendAndCallReceiver *MockNativeSendAndCallReceiverTransactorSession) ReceiveTokens(sourceBlockchainID [32]byte, originTokenTransferrerAddress common.Address, originSenderAddress common.Address, payload []byte) (*types.Transaction, error) { + return _MockNativeSendAndCallReceiver.Contract.ReceiveTokens(&_MockNativeSendAndCallReceiver.TransactOpts, sourceBlockchainID, originTokenTransferrerAddress, originSenderAddress, payload) +} + +// MockNativeSendAndCallReceiverTokensReceivedIterator is returned from FilterTokensReceived and is used to iterate over the raw logs and unpacked data for TokensReceived events raised by the MockNativeSendAndCallReceiver contract. +type MockNativeSendAndCallReceiverTokensReceivedIterator struct { + Event *MockNativeSendAndCallReceiverTokensReceived // 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 interfaces.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 *MockNativeSendAndCallReceiverTokensReceivedIterator) 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(MockNativeSendAndCallReceiverTokensReceived) + 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(MockNativeSendAndCallReceiverTokensReceived) + 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 *MockNativeSendAndCallReceiverTokensReceivedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *MockNativeSendAndCallReceiverTokensReceivedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// MockNativeSendAndCallReceiverTokensReceived represents a TokensReceived event raised by the MockNativeSendAndCallReceiver contract. +type MockNativeSendAndCallReceiverTokensReceived struct { + SourceBlockchainID [32]byte + OriginTokenTransferrerAddress common.Address + OriginSenderAddress common.Address + Amount *big.Int + Payload []byte + Raw types.Log // Blockchain specific contextual infos +} + +// FilterTokensReceived is a free log retrieval operation binding the contract event 0x98f64f0ad4e0e2a42535fa15b05dc6e800e16e439c98143fefabb72b43bad53e. +// +// Solidity: event TokensReceived(bytes32 indexed sourceBlockchainID, address indexed originTokenTransferrerAddress, address indexed originSenderAddress, uint256 amount, bytes payload) +func (_MockNativeSendAndCallReceiver *MockNativeSendAndCallReceiverFilterer) FilterTokensReceived(opts *bind.FilterOpts, sourceBlockchainID [][32]byte, originTokenTransferrerAddress []common.Address, originSenderAddress []common.Address) (*MockNativeSendAndCallReceiverTokensReceivedIterator, error) { + + var sourceBlockchainIDRule []interface{} + for _, sourceBlockchainIDItem := range sourceBlockchainID { + sourceBlockchainIDRule = append(sourceBlockchainIDRule, sourceBlockchainIDItem) + } + var originTokenTransferrerAddressRule []interface{} + for _, originTokenTransferrerAddressItem := range originTokenTransferrerAddress { + originTokenTransferrerAddressRule = append(originTokenTransferrerAddressRule, originTokenTransferrerAddressItem) + } + var originSenderAddressRule []interface{} + for _, originSenderAddressItem := range originSenderAddress { + originSenderAddressRule = append(originSenderAddressRule, originSenderAddressItem) + } + + logs, sub, err := _MockNativeSendAndCallReceiver.contract.FilterLogs(opts, "TokensReceived", sourceBlockchainIDRule, originTokenTransferrerAddressRule, originSenderAddressRule) + if err != nil { + return nil, err + } + return &MockNativeSendAndCallReceiverTokensReceivedIterator{contract: _MockNativeSendAndCallReceiver.contract, event: "TokensReceived", logs: logs, sub: sub}, nil +} + +// WatchTokensReceived is a free log subscription operation binding the contract event 0x98f64f0ad4e0e2a42535fa15b05dc6e800e16e439c98143fefabb72b43bad53e. +// +// Solidity: event TokensReceived(bytes32 indexed sourceBlockchainID, address indexed originTokenTransferrerAddress, address indexed originSenderAddress, uint256 amount, bytes payload) +func (_MockNativeSendAndCallReceiver *MockNativeSendAndCallReceiverFilterer) WatchTokensReceived(opts *bind.WatchOpts, sink chan<- *MockNativeSendAndCallReceiverTokensReceived, sourceBlockchainID [][32]byte, originTokenTransferrerAddress []common.Address, originSenderAddress []common.Address) (event.Subscription, error) { + + var sourceBlockchainIDRule []interface{} + for _, sourceBlockchainIDItem := range sourceBlockchainID { + sourceBlockchainIDRule = append(sourceBlockchainIDRule, sourceBlockchainIDItem) + } + var originTokenTransferrerAddressRule []interface{} + for _, originTokenTransferrerAddressItem := range originTokenTransferrerAddress { + originTokenTransferrerAddressRule = append(originTokenTransferrerAddressRule, originTokenTransferrerAddressItem) + } + var originSenderAddressRule []interface{} + for _, originSenderAddressItem := range originSenderAddress { + originSenderAddressRule = append(originSenderAddressRule, originSenderAddressItem) + } + + logs, sub, err := _MockNativeSendAndCallReceiver.contract.WatchLogs(opts, "TokensReceived", sourceBlockchainIDRule, originTokenTransferrerAddressRule, originSenderAddressRule) + 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(MockNativeSendAndCallReceiverTokensReceived) + if err := _MockNativeSendAndCallReceiver.contract.UnpackLog(event, "TokensReceived", 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 +} + +// ParseTokensReceived is a log parse operation binding the contract event 0x98f64f0ad4e0e2a42535fa15b05dc6e800e16e439c98143fefabb72b43bad53e. +// +// Solidity: event TokensReceived(bytes32 indexed sourceBlockchainID, address indexed originTokenTransferrerAddress, address indexed originSenderAddress, uint256 amount, bytes payload) +func (_MockNativeSendAndCallReceiver *MockNativeSendAndCallReceiverFilterer) ParseTokensReceived(log types.Log) (*MockNativeSendAndCallReceiverTokensReceived, error) { + event := new(MockNativeSendAndCallReceiverTokensReceived) + if err := _MockNativeSendAndCallReceiver.contract.UnpackLog(event, "TokensReceived", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} diff --git a/abi-bindings/go/mocks/ExampleERC20/ExampleERC20.go b/abi-bindings/go/mocks/ExampleERC20/ExampleERC20.go index 7ec170cfb..dcc010193 100644 --- a/abi-bindings/go/mocks/ExampleERC20/ExampleERC20.go +++ b/abi-bindings/go/mocks/ExampleERC20/ExampleERC20.go @@ -32,7 +32,7 @@ var ( // ExampleERC20MetaData contains all meta data concerning the ExampleERC20 contract. var ExampleERC20MetaData = &bind.MetaData{ ABI: "[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"allowance\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"needed\",\"type\":\"uint256\"}],\"name\":\"ERC20InsufficientAllowance\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"balance\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"needed\",\"type\":\"uint256\"}],\"name\":\"ERC20InsufficientBalance\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"approver\",\"type\":\"address\"}],\"name\":\"ERC20InvalidApprover\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"}],\"name\":\"ERC20InvalidReceiver\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"ERC20InvalidSender\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"ERC20InvalidSpender\",\"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\":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\":\"value\",\"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\":\"value\",\"type\":\"uint256\"}],\"name\":\"burn\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"burnFrom\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"mint\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"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\":\"value\",\"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\":\"value\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", - Bin: "0x608060405234801561000f575f80fd5b506040518060400160405280600a81526020016926b7b1b5902a37b5b2b760b11b81525060405180604001604052806004815260200163045584d560e41b815250816003908161005f919061028b565b50600461006c828261028b565b50505061008b336b204fce5e3e2502611000000061009060201b60201c565b61036f565b6001600160a01b0382166100be5760405163ec442f0560e01b81525f60048201526024015b60405180910390fd5b6100c95f83836100cd565b5050565b6001600160a01b0383166100f7578060025f8282546100ec919061034a565b909155506101679050565b6001600160a01b0383165f90815260208190526040902054818110156101495760405163391434e360e21b81526001600160a01b038516600482015260248101829052604481018390526064016100b5565b6001600160a01b0384165f9081526020819052604090209082900390555b6001600160a01b038216610183576002805482900390556101a1565b6001600160a01b0382165f9081526020819052604090208054820190555b816001600160a01b0316836001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040516101e691815260200190565b60405180910390a3505050565b634e487b7160e01b5f52604160045260245ffd5b600181811c9082168061021b57607f821691505b60208210810361023957634e487b7160e01b5f52602260045260245ffd5b50919050565b601f82111561028657805f5260205f20601f840160051c810160208510156102645750805b601f840160051c820191505b81811015610283575f8155600101610270565b50505b505050565b81516001600160401b038111156102a4576102a46101f3565b6102b8816102b28454610207565b8461023f565b602080601f8311600181146102eb575f84156102d45750858301515b5f19600386901b1c1916600185901b178555610342565b5f85815260208120601f198616915b82811015610319578886015182559484019460019091019084016102fa565b508582101561033657878501515f19600388901b60f8161c191681555b505060018460011b0185555b505050505050565b8082018082111561036957634e487b7160e01b5f52601160045260245ffd5b92915050565b6108eb8061037c5f395ff3fe608060405234801561000f575f80fd5b50600436106100cb575f3560e01c806342966c681161008857806395d89b411161006357806395d89b41146101a7578063a0712d68146101af578063a9059cbb146101c2578063dd62ed3e146101d5575f80fd5b806342966c681461015957806370a082311461016c57806379cc679014610194575f80fd5b806306fdde03146100cf578063095ea7b3146100ed57806318160ddd1461011057806323b872dd14610122578063313ce5671461013557806340c10f1914610144575b5f80fd5b6100d761020d565b6040516100e4919061072e565b60405180910390f35b6101006100fb366004610795565b61029d565b60405190151581526020016100e4565b6002545b6040519081526020016100e4565b6101006101303660046107bd565b6102b6565b604051601281526020016100e4565b610157610152366004610795565b6102d9565b005b6101576101673660046107f6565b610344565b61011461017a36600461080d565b6001600160a01b03165f9081526020819052604090205490565b6101576101a2366004610795565b610351565b6100d7610366565b6101576101bd3660046107f6565b610375565b6101006101d0366004610795565b6103d7565b6101146101e336600461082d565b6001600160a01b039182165f90815260016020908152604080832093909416825291909152205490565b60606003805461021c9061085e565b80601f01602080910402602001604051908101604052809291908181526020018280546102489061085e565b80156102935780601f1061026a57610100808354040283529160200191610293565b820191905f5260205f20905b81548152906001019060200180831161027657829003601f168201915b5050505050905090565b5f336102aa8185856103e4565b60019150505b92915050565b5f336102c38582856103f6565b6102ce858585610471565b506001949350505050565b678ac7230489e800008111156103365760405162461bcd60e51b815260206004820152601f60248201527f4578616d706c6545524332303a206d6178206d696e742065786365656465640060448201526064015b60405180910390fd5b61034082826104ce565b5050565b61034e3382610502565b50565b61035c8233836103f6565b6103408282610502565b60606004805461021c9061085e565b678ac7230489e800008111156103cd5760405162461bcd60e51b815260206004820152601f60248201527f4578616d706c6545524332303a206d6178206d696e7420657863656564656400604482015260640161032d565b61034e33826104ce565b5f336102aa818585610471565b6103f18383836001610536565b505050565b6001600160a01b038381165f908152600160209081526040808320938616835292905220545f19811461046b578181101561045d57604051637dc7a0d960e11b81526001600160a01b0384166004820152602481018290526044810183905260640161032d565b61046b84848484035f610536565b50505050565b6001600160a01b03831661049a57604051634b637e8f60e11b81525f600482015260240161032d565b6001600160a01b0382166104c35760405163ec442f0560e01b81525f600482015260240161032d565b6103f1838383610608565b6001600160a01b0382166104f75760405163ec442f0560e01b81525f600482015260240161032d565b6103405f8383610608565b6001600160a01b03821661052b57604051634b637e8f60e11b81525f600482015260240161032d565b610340825f83610608565b6001600160a01b03841661055f5760405163e602df0560e01b81525f600482015260240161032d565b6001600160a01b03831661058857604051634a1406b160e11b81525f600482015260240161032d565b6001600160a01b038085165f908152600160209081526040808320938716835292905220829055801561046b57826001600160a01b0316846001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925846040516105fa91815260200190565b60405180910390a350505050565b6001600160a01b038316610632578060025f8282546106279190610896565b909155506106a29050565b6001600160a01b0383165f90815260208190526040902054818110156106845760405163391434e360e21b81526001600160a01b0385166004820152602481018290526044810183905260640161032d565b6001600160a01b0384165f9081526020819052604090209082900390555b6001600160a01b0382166106be576002805482900390556106dc565b6001600160a01b0382165f9081526020819052604090208054820190555b816001600160a01b0316836001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8360405161072191815260200190565b60405180910390a3505050565b5f602080835283518060208501525f5b8181101561075a5785810183015185820160400152820161073e565b505f604082860101526040601f19601f8301168501019250505092915050565b80356001600160a01b0381168114610790575f80fd5b919050565b5f80604083850312156107a6575f80fd5b6107af8361077a565b946020939093013593505050565b5f805f606084860312156107cf575f80fd5b6107d88461077a565b92506107e66020850161077a565b9150604084013590509250925092565b5f60208284031215610806575f80fd5b5035919050565b5f6020828403121561081d575f80fd5b6108268261077a565b9392505050565b5f806040838503121561083e575f80fd5b6108478361077a565b91506108556020840161077a565b90509250929050565b600181811c9082168061087257607f821691505b60208210810361089057634e487b7160e01b5f52602260045260245ffd5b50919050565b808201808211156102b057634e487b7160e01b5f52601160045260245ffdfea26469706673582212206e5a3aa4344b05b49dfabcfd4b35e46dfa45722df16672ecdd056adb7115fb4464736f6c63430008190033", + Bin: "0x608060405234801561000f575f80fd5b506040518060400160405280600a81526020016926b7b1b5902a37b5b2b760b11b81525060405180604001604052806004815260200163045584d560e41b815250816003908161005f919061028b565b50600461006c828261028b565b50505061008b336b204fce5e3e2502611000000061009060201b60201c565b61036f565b6001600160a01b0382166100be5760405163ec442f0560e01b81525f60048201526024015b60405180910390fd5b6100c95f83836100cd565b5050565b6001600160a01b0383166100f7578060025f8282546100ec919061034a565b909155506101679050565b6001600160a01b0383165f90815260208190526040902054818110156101495760405163391434e360e21b81526001600160a01b038516600482015260248101829052604481018390526064016100b5565b6001600160a01b0384165f9081526020819052604090209082900390555b6001600160a01b038216610183576002805482900390556101a1565b6001600160a01b0382165f9081526020819052604090208054820190555b816001600160a01b0316836001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040516101e691815260200190565b60405180910390a3505050565b634e487b7160e01b5f52604160045260245ffd5b600181811c9082168061021b57607f821691505b60208210810361023957634e487b7160e01b5f52602260045260245ffd5b50919050565b601f82111561028657805f5260205f20601f840160051c810160208510156102645750805b601f840160051c820191505b81811015610283575f8155600101610270565b50505b505050565b81516001600160401b038111156102a4576102a46101f3565b6102b8816102b28454610207565b8461023f565b602080601f8311600181146102eb575f84156102d45750858301515b5f19600386901b1c1916600185901b178555610342565b5f85815260208120601f198616915b82811015610319578886015182559484019460019091019084016102fa565b508582101561033657878501515f19600388901b60f8161c191681555b505060018460011b0185555b505050505050565b8082018082111561036957634e487b7160e01b5f52601160045260245ffd5b92915050565b6108eb8061037c5f395ff3fe608060405234801561000f575f80fd5b50600436106100cb575f3560e01c806342966c681161008857806395d89b411161006357806395d89b41146101a7578063a0712d68146101af578063a9059cbb146101c2578063dd62ed3e146101d5575f80fd5b806342966c681461015957806370a082311461016c57806379cc679014610194575f80fd5b806306fdde03146100cf578063095ea7b3146100ed57806318160ddd1461011057806323b872dd14610122578063313ce5671461013557806340c10f1914610144575b5f80fd5b6100d761020d565b6040516100e4919061072e565b60405180910390f35b6101006100fb366004610795565b61029d565b60405190151581526020016100e4565b6002545b6040519081526020016100e4565b6101006101303660046107bd565b6102b6565b604051601281526020016100e4565b610157610152366004610795565b6102d9565b005b6101576101673660046107f6565b610344565b61011461017a36600461080d565b6001600160a01b03165f9081526020819052604090205490565b6101576101a2366004610795565b610351565b6100d7610366565b6101576101bd3660046107f6565b610375565b6101006101d0366004610795565b6103d7565b6101146101e336600461082d565b6001600160a01b039182165f90815260016020908152604080832093909416825291909152205490565b60606003805461021c9061085e565b80601f01602080910402602001604051908101604052809291908181526020018280546102489061085e565b80156102935780601f1061026a57610100808354040283529160200191610293565b820191905f5260205f20905b81548152906001019060200180831161027657829003601f168201915b5050505050905090565b5f336102aa8185856103e4565b60019150505b92915050565b5f336102c38582856103f6565b6102ce858585610471565b506001949350505050565b678ac7230489e800008111156103365760405162461bcd60e51b815260206004820152601f60248201527f4578616d706c6545524332303a206d6178206d696e742065786365656465640060448201526064015b60405180910390fd5b61034082826104ce565b5050565b61034e3382610502565b50565b61035c8233836103f6565b6103408282610502565b60606004805461021c9061085e565b678ac7230489e800008111156103cd5760405162461bcd60e51b815260206004820152601f60248201527f4578616d706c6545524332303a206d6178206d696e7420657863656564656400604482015260640161032d565b61034e33826104ce565b5f336102aa818585610471565b6103f18383836001610536565b505050565b6001600160a01b038381165f908152600160209081526040808320938616835292905220545f19811461046b578181101561045d57604051637dc7a0d960e11b81526001600160a01b0384166004820152602481018290526044810183905260640161032d565b61046b84848484035f610536565b50505050565b6001600160a01b03831661049a57604051634b637e8f60e11b81525f600482015260240161032d565b6001600160a01b0382166104c35760405163ec442f0560e01b81525f600482015260240161032d565b6103f1838383610608565b6001600160a01b0382166104f75760405163ec442f0560e01b81525f600482015260240161032d565b6103405f8383610608565b6001600160a01b03821661052b57604051634b637e8f60e11b81525f600482015260240161032d565b610340825f83610608565b6001600160a01b03841661055f5760405163e602df0560e01b81525f600482015260240161032d565b6001600160a01b03831661058857604051634a1406b160e11b81525f600482015260240161032d565b6001600160a01b038085165f908152600160209081526040808320938716835292905220829055801561046b57826001600160a01b0316846001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925846040516105fa91815260200190565b60405180910390a350505050565b6001600160a01b038316610632578060025f8282546106279190610896565b909155506106a29050565b6001600160a01b0383165f90815260208190526040902054818110156106845760405163391434e360e21b81526001600160a01b0385166004820152602481018290526044810183905260640161032d565b6001600160a01b0384165f9081526020819052604090209082900390555b6001600160a01b0382166106be576002805482900390556106dc565b6001600160a01b0382165f9081526020819052604090208054820190555b816001600160a01b0316836001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8360405161072191815260200190565b60405180910390a3505050565b5f602080835283518060208501525f5b8181101561075a5785810183015185820160400152820161073e565b505f604082860101526040601f19601f8301168501019250505092915050565b80356001600160a01b0381168114610790575f80fd5b919050565b5f80604083850312156107a6575f80fd5b6107af8361077a565b946020939093013593505050565b5f805f606084860312156107cf575f80fd5b6107d88461077a565b92506107e66020850161077a565b9150604084013590509250925092565b5f60208284031215610806575f80fd5b5035919050565b5f6020828403121561081d575f80fd5b6108268261077a565b9392505050565b5f806040838503121561083e575f80fd5b6108478361077a565b91506108556020840161077a565b90509250929050565b600181811c9082168061087257607f821691505b60208210810361089057634e487b7160e01b5f52602260045260245ffd5b50919050565b808201808211156102b057634e487b7160e01b5f52601160045260245ffdfea26469706673582212206a9eb05c36a9ec249f9dcc0a91278c9f9b115c142a622619b8a84897e12e119b64736f6c63430008190033", } // ExampleERC20ABI is the input ABI used to generate the binding from. diff --git a/abi-bindings/go/teleporter/TeleporterMessenger/TeleporterMessenger.go b/abi-bindings/go/teleporter/TeleporterMessenger/TeleporterMessenger.go index f68e46c6a..b9b21f7a3 100644 --- a/abi-bindings/go/teleporter/TeleporterMessenger/TeleporterMessenger.go +++ b/abi-bindings/go/teleporter/TeleporterMessenger/TeleporterMessenger.go @@ -66,7 +66,7 @@ type TeleporterMessageReceipt struct { // TeleporterMessengerMetaData contains all meta data concerning the TeleporterMessenger contract. var TeleporterMessengerMetaData = &bind.MetaData{ ABI: "[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"target\",\"type\":\"address\"}],\"name\":\"AddressEmptyCode\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"AddressInsufficientBalance\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"FailedInnerCall\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"SafeERC20FailedOperation\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"messageID\",\"type\":\"bytes32\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"feeTokenAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"indexed\":false,\"internalType\":\"structTeleporterFeeInfo\",\"name\":\"updatedFeeInfo\",\"type\":\"tuple\"}],\"name\":\"AddFeeAmount\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"blockchainID\",\"type\":\"bytes32\"}],\"name\":\"BlockchainIDInitialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"messageID\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"sourceBlockchainID\",\"type\":\"bytes32\"}],\"name\":\"MessageExecuted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"messageID\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"sourceBlockchainID\",\"type\":\"bytes32\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"messageNonce\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"originSenderAddress\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"destinationBlockchainID\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"destinationAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"requiredGasLimit\",\"type\":\"uint256\"},{\"internalType\":\"address[]\",\"name\":\"allowedRelayerAddresses\",\"type\":\"address[]\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"receivedMessageNonce\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"relayerRewardAddress\",\"type\":\"address\"}],\"internalType\":\"structTeleporterMessageReceipt[]\",\"name\":\"receipts\",\"type\":\"tuple[]\"},{\"internalType\":\"bytes\",\"name\":\"message\",\"type\":\"bytes\"}],\"indexed\":false,\"internalType\":\"structTeleporterMessage\",\"name\":\"message\",\"type\":\"tuple\"}],\"name\":\"MessageExecutionFailed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"messageID\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"destinationBlockchainID\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"relayerRewardAddress\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"feeTokenAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"indexed\":false,\"internalType\":\"structTeleporterFeeInfo\",\"name\":\"feeInfo\",\"type\":\"tuple\"}],\"name\":\"ReceiptReceived\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"messageID\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"sourceBlockchainID\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"deliverer\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"rewardRedeemer\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"messageNonce\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"originSenderAddress\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"destinationBlockchainID\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"destinationAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"requiredGasLimit\",\"type\":\"uint256\"},{\"internalType\":\"address[]\",\"name\":\"allowedRelayerAddresses\",\"type\":\"address[]\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"receivedMessageNonce\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"relayerRewardAddress\",\"type\":\"address\"}],\"internalType\":\"structTeleporterMessageReceipt[]\",\"name\":\"receipts\",\"type\":\"tuple[]\"},{\"internalType\":\"bytes\",\"name\":\"message\",\"type\":\"bytes\"}],\"indexed\":false,\"internalType\":\"structTeleporterMessage\",\"name\":\"message\",\"type\":\"tuple\"}],\"name\":\"ReceiveCrossChainMessage\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"redeemer\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"asset\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"RelayerRewardsRedeemed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"messageID\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"destinationBlockchainID\",\"type\":\"bytes32\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"messageNonce\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"originSenderAddress\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"destinationBlockchainID\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"destinationAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"requiredGasLimit\",\"type\":\"uint256\"},{\"internalType\":\"address[]\",\"name\":\"allowedRelayerAddresses\",\"type\":\"address[]\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"receivedMessageNonce\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"relayerRewardAddress\",\"type\":\"address\"}],\"internalType\":\"structTeleporterMessageReceipt[]\",\"name\":\"receipts\",\"type\":\"tuple[]\"},{\"internalType\":\"bytes\",\"name\":\"message\",\"type\":\"bytes\"}],\"indexed\":false,\"internalType\":\"structTeleporterMessage\",\"name\":\"message\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"feeTokenAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"indexed\":false,\"internalType\":\"structTeleporterFeeInfo\",\"name\":\"feeInfo\",\"type\":\"tuple\"}],\"name\":\"SendCrossChainMessage\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"WARP_MESSENGER\",\"outputs\":[{\"internalType\":\"contractIWarpMessenger\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"messageID\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"feeTokenAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"additionalFeeAmount\",\"type\":\"uint256\"}],\"name\":\"addFeeAmount\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"blockchainID\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"sourceBlockchainID\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"destinationBlockchainID\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"nonce\",\"type\":\"uint256\"}],\"name\":\"calculateMessageID\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"relayer\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"feeAsset\",\"type\":\"address\"}],\"name\":\"checkRelayerRewardAmount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"messageID\",\"type\":\"bytes32\"}],\"name\":\"getFeeInfo\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"messageID\",\"type\":\"bytes32\"}],\"name\":\"getMessageHash\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"destinationBlockchainID\",\"type\":\"bytes32\"}],\"name\":\"getNextMessageID\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"sourceBlockchainID\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"index\",\"type\":\"uint256\"}],\"name\":\"getReceiptAtIndex\",\"outputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"receivedMessageNonce\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"relayerRewardAddress\",\"type\":\"address\"}],\"internalType\":\"structTeleporterMessageReceipt\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"sourceBlockchainID\",\"type\":\"bytes32\"}],\"name\":\"getReceiptQueueSize\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"messageID\",\"type\":\"bytes32\"}],\"name\":\"getRelayerRewardAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"initializeBlockchainID\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"messageNonce\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"messageID\",\"type\":\"bytes32\"}],\"name\":\"messageReceived\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"sourceBlockchainID\",\"type\":\"bytes32\"}],\"name\":\"receiptQueues\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"first\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"last\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"messageIndex\",\"type\":\"uint32\"},{\"internalType\":\"address\",\"name\":\"relayerRewardAddress\",\"type\":\"address\"}],\"name\":\"receiveCrossChainMessage\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"messageID\",\"type\":\"bytes32\"}],\"name\":\"receivedFailedMessageHashes\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"messageHash\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"feeAsset\",\"type\":\"address\"}],\"name\":\"redeemRelayerRewards\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"sourceBlockchainID\",\"type\":\"bytes32\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"messageNonce\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"originSenderAddress\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"destinationBlockchainID\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"destinationAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"requiredGasLimit\",\"type\":\"uint256\"},{\"internalType\":\"address[]\",\"name\":\"allowedRelayerAddresses\",\"type\":\"address[]\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"receivedMessageNonce\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"relayerRewardAddress\",\"type\":\"address\"}],\"internalType\":\"structTeleporterMessageReceipt[]\",\"name\":\"receipts\",\"type\":\"tuple[]\"},{\"internalType\":\"bytes\",\"name\":\"message\",\"type\":\"bytes\"}],\"internalType\":\"structTeleporterMessage\",\"name\":\"message\",\"type\":\"tuple\"}],\"name\":\"retryMessageExecution\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"messageNonce\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"originSenderAddress\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"destinationBlockchainID\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"destinationAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"requiredGasLimit\",\"type\":\"uint256\"},{\"internalType\":\"address[]\",\"name\":\"allowedRelayerAddresses\",\"type\":\"address[]\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"receivedMessageNonce\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"relayerRewardAddress\",\"type\":\"address\"}],\"internalType\":\"structTeleporterMessageReceipt[]\",\"name\":\"receipts\",\"type\":\"tuple[]\"},{\"internalType\":\"bytes\",\"name\":\"message\",\"type\":\"bytes\"}],\"internalType\":\"structTeleporterMessage\",\"name\":\"message\",\"type\":\"tuple\"}],\"name\":\"retrySendCrossChainMessage\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"destinationBlockchainID\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"destinationAddress\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"feeTokenAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"internalType\":\"structTeleporterFeeInfo\",\"name\":\"feeInfo\",\"type\":\"tuple\"},{\"internalType\":\"uint256\",\"name\":\"requiredGasLimit\",\"type\":\"uint256\"},{\"internalType\":\"address[]\",\"name\":\"allowedRelayerAddresses\",\"type\":\"address[]\"},{\"internalType\":\"bytes\",\"name\":\"message\",\"type\":\"bytes\"}],\"internalType\":\"structTeleporterMessageInput\",\"name\":\"messageInput\",\"type\":\"tuple\"}],\"name\":\"sendCrossChainMessage\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"sourceBlockchainID\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32[]\",\"name\":\"messageIDs\",\"type\":\"bytes32[]\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"feeTokenAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"internalType\":\"structTeleporterFeeInfo\",\"name\":\"feeInfo\",\"type\":\"tuple\"},{\"internalType\":\"address[]\",\"name\":\"allowedRelayerAddresses\",\"type\":\"address[]\"}],\"name\":\"sendSpecifiedReceipts\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"messageID\",\"type\":\"bytes32\"}],\"name\":\"sentMessageInfo\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"messageHash\",\"type\":\"bytes32\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"feeTokenAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"internalType\":\"structTeleporterFeeInfo\",\"name\":\"feeInfo\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"}]", - Bin: "0x6080604052348015600e575f80fd5b5060015f8190558055613112806100245f395ff3fe608060405234801561000f575f80fd5b5060043610610148575f3560e01c8063a8898181116100bf578063df20e8bc11610079578063df20e8bc14610331578063e69d606a14610344578063e6e67bd5146103ab578063ebc3b1ba146103e6578063ecc7042814610409578063fc2d619714610412575f80fd5b8063a8898181146102a9578063a9a85614146102bc578063b771b3bc146102cf578063c473eef8146102dd578063ccb5f80914610315578063d127dc9b14610328575f80fd5b8063399b77da11610110578063399b77da1461021257806362448850146102315780638245a1b014610244578063860a3b0614610257578063892bf412146102765780638ac0fd0414610296575f80fd5b80630af5b4ff1461014c57806322296c3a146101675780632bc8b0bf1461017c5780632ca40f551461018f5780632e27c223146101e7575b5f80fd5b610154610425565b6040519081526020015b60405180910390f35b61017a610175366004612111565b6104f3565b005b61015461018a36600461212c565b6105e6565b6101d961019d36600461212c565b600560209081525f9182526040918290208054835180850190945260018201546001600160a01b03168452600290910154918301919091529082565b60405161015e929190612143565b6101fa6101f536600461212c565b610602565b6040516001600160a01b03909116815260200161015e565b61015461022036600461212c565b5f9081526005602052604090205490565b61015461023f36600461216a565b610689565b61017a6102523660046121b7565b6106e2565b61015461026536600461212c565b60066020525f908152604090205481565b6102896102843660046121e8565b610885565b60405161015e9190612208565b61017a6102a4366004612228565b6108b6565b6101546102b736600461225d565b610aed565b6101546102ca3660046122cd565b610b2f565b6101fa6005600160991b0181565b6101546102eb36600461235e565b6001600160a01b039182165f90815260096020908152604080832093909416825291909152205490565b61017a610323366004612395565b610dc1565b61015460025481565b61015461033f36600461212c565b6111e3565b61038c61035236600461212c565b5f90815260056020908152604091829020825180840190935260018101546001600160a01b03168084526002909101549290910182905291565b604080516001600160a01b03909316835260208301919091520161015e565b6103d16103b936600461212c565b60046020525f90815260409020805460019091015482565b6040805192835260208301919091520161015e565b6103f96103f436600461212c565b61122a565b604051901515815260200161015e565b61015460035481565b61017a6104203660046123b9565b61123f565b6002545f90806104ee576005600160991b016001600160a01b0316634213cf786040518163ffffffff1660e01b8152600401602060405180830381865afa158015610472573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061049691906123fc565b9050806104be5760405162461bcd60e51b81526004016104b590612413565b60405180910390fd5b600281905560405181907f1eac640109dc937d2a9f42735a05f794b39a5e3759d681951d671aabbce4b104905f90a25b919050565b335f9081526009602090815260408083206001600160a01b0385168452909152902054806105745760405162461bcd60e51b815260206004820152602860248201527f54656c65706f727465724d657373656e6765723a206e6f2072657761726420746044820152676f2072656465656d60c01b60648201526084016104b5565b335f8181526009602090815260408083206001600160a01b03871680855290835281842093909355518481529192917f3294c84e5b0f29d9803655319087207bc94f4db29f7927846944822773780b88910160405180910390a36105e26001600160a01b0383163383611494565b5050565b5f8181526004602052604081206105fc906114f8565b92915050565b5f8181526007602052604081205461066e5760405162461bcd60e51b815260206004820152602960248201527f54656c65706f727465724d657373656e6765723a206d657373616765206e6f74604482015268081c9958d95a5d995960ba1b60648201526084016104b5565b505f908152600860205260409020546001600160a01b031690565b5f60015f54146106ab5760405162461bcd60e51b81526004016104b59061245a565b60025f556106d86106bb83612691565b83355f9081526004602052604090206106d39061150a565b611604565b60015f5592915050565b60015f54146107035760405162461bcd60e51b81526004016104b59061245a565b60025f818155905461071b9060408401358435610aed565b5f818152600560209081526040918290208251808401845281548152835180850190945260018201546001600160a01b0316845260029091015483830152908101919091528051919250906107825760405162461bcd60e51b81526004016104b590612730565b5f8360405160200161079491906129af565b60408051601f19818403018152919052825181516020830120919250146107cd5760405162461bcd60e51b81526004016104b5906129c1565b8360400135837f2a211ad4a59ab9d003852404f9c57c690704ee755f3c79d2c2812ad32da99df8868560200151604051610808929190612a0a565b60405180910390a360405163ee5b48eb60e01b81526005600160991b019063ee5b48eb9061083a908490600401612a8b565b6020604051808303815f875af1158015610856573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061087a91906123fc565b505060015f55505050565b604080518082019091525f80825260208201525f8381526004602052604090206108af9083611837565b9392505050565b60015f54146108d75760405162461bcd60e51b81526004016104b59061245a565b60025f5560018054146108fc5760405162461bcd60e51b81526004016104b590612a9d565b6002600155806109665760405162461bcd60e51b815260206004820152602f60248201527f54656c65706f727465724d657373656e6765723a207a65726f2061646469746960448201526e1bdb985b0819995948185b5bdd5b9d608a1b60648201526084016104b5565b6001600160a01b03821661098c5760405162461bcd60e51b81526004016104b590612ae2565b5f838152600560205260409020546109b65760405162461bcd60e51b81526004016104b590612730565b5f838152600560205260409020600101546001600160a01b03838116911614610a475760405162461bcd60e51b815260206004820152603760248201527f54656c65706f727465724d657373656e6765723a20696e76616c69642066656560448201527f20617373657420636f6e7472616374206164647265737300000000000000000060648201526084016104b5565b5f610a5283836118f8565b5f85815260056020526040812060020180549293508392909190610a77908490612b4a565b90915550505f8481526005602052604090819020905185917fc1bfd1f1208927dfbd414041dcb5256e6c9ad90dd61aec3249facbd34ff7b3e191610ad8916001019081546001600160a01b0316815260019190910154602082015260400190565b60405180910390a2505060018080555f555050565b6040805130602082015290810184905260608101839052608081018290525f9060a0016040516020818303038152906040528051906020012090509392505050565b5f60015f5414610b515760405162461bcd60e51b81526004016104b59061245a565b60025f818155905490866001600160401b03811115610b7257610b7261249d565b604051908082528060200260200182016040528015610bb657816020015b604080518082019091525f8082526020820152815260200190600190039081610b905790505b509050865f5b81811015610d2e575f8a8a83818110610bd757610bd7612b5d565b9050602002013590505f60075f8381526020019081526020015f20549050805f03610c535760405162461bcd60e51b815260206004820152602660248201527f54656c65706f727465724d657373656e6765723a2072656365697074206e6f7460448201526508199bdd5b9960d21b60648201526084016104b5565b610c5e8d8783610aed565b8214610cd25760405162461bcd60e51b815260206004820152603a60248201527f54656c65706f727465724d657373656e6765723a206d6573736167652049442060448201527f6e6f742066726f6d20736f7572636520626c6f636b636861696e00000000000060648201526084016104b5565b5f828152600860209081526040918290205482518084019093528383526001600160a01b03169082018190528651909190879086908110610d1557610d15612b5d565b6020026020010181905250505050806001019050610bbc565b506040805160c0810182528b81525f6020820152610daf918101610d57368b90038b018b612b71565b81526020015f81526020018888808060200260200160405190810160405280939291908181526020018383602002808284375f9201829052509385525050604080519283526020808401909152909201525083611604565b60015f559a9950505050505050505050565b6001805414610de25760405162461bcd60e51b81526004016104b590612a9d565b60026001556040516306f8253560e41b815263ffffffff831660048201525f9081906005600160991b0190636f825350906024015f60405180830381865afa158015610e30573d5f803e3d5ffd5b505050506040513d5f823e601f3d908101601f19168201604052610e579190810190612be7565b9150915080610eba5760405162461bcd60e51b815260206004820152602960248201527f54656c65706f727465724d657373656e6765723a20696e76616c69642077617260448201526870206d65737361676560b81b60648201526084016104b5565b60208201516001600160a01b03163014610f315760405162461bcd60e51b815260206004820152603260248201527f54656c65706f727465724d657373656e6765723a20696e76616c6964206f726960448201527167696e2073656e646572206164647265737360701b60648201526084016104b5565b5f8260400151806020019051810190610f4a9190612d7b565b90505f610f55610425565b905080826040015114610fc45760405162461bcd60e51b815260206004820152603160248201527f54656c65706f727465724d657373656e6765723a20696e76616c6964206465736044820152701d1a5b985d1a5bdb8818da185a5b881251607a1b60648201526084016104b5565b835182515f91610fd5918490610aed565b5f81815260076020526040902054909150156110495760405162461bcd60e51b815260206004820152602d60248201527f54656c65706f727465724d657373656e6765723a206d65737361676520616c7260448201526c1958591e481c9958d95a5d9959609a1b60648201526084016104b5565b611057338460a00151611a5a565b6110b55760405162461bcd60e51b815260206004820152602960248201527f54656c65706f727465724d657373656e6765723a20756e617574686f72697a6560448201526832103932b630bcb2b960b91b60648201526084016104b5565b6110c281845f0151611ac6565b6001600160a01b038616156110f8575f81815260086020526040902080546001600160a01b0319166001600160a01b0388161790555b60c0830151515f5b8181101561113b5761113384885f01518760c00151848151811061112657611126612b5d565b6020026020010151611b36565b600101611100565b50604080518082018252855181526001600160a01b03891660208083019190915288515f90815260049091529190912061117491611c5a565b336001600160a01b0316865f0151837f292ee90bbaf70b5d4936025e09d56ba08f3e421156b6a568cf3c2840d9343e348a886040516111b4929190612f81565b60405180910390a460e084015151156111d5576111d582875f015186611cb4565b505060018055505050505050565b6002545f90806112055760405162461bcd60e51b81526004016104b590612413565b5f60035460016112159190612b4a565b9050611222828583610aed565b949350505050565b5f8181526007602052604081205415156105fc565b60018054146112605760405162461bcd60e51b81526004016104b590612a9d565b60026001819055545f906112779084908435610aed565b5f81815260066020526040902054909150806112a55760405162461bcd60e51b81526004016104b590612730565b80836040516020016112b791906129af565b60405160208183030381529060405280519060200120146112ea5760405162461bcd60e51b81526004016104b5906129c1565b5f6112fb6080850160608601612111565b6001600160a01b03163b1161136f5760405162461bcd60e51b815260206004820152603460248201527f54656c65706f727465724d657373656e6765723a2064657374696e6174696f6e604482015273206164647265737320686173206e6f20636f646560601b60648201526084016104b5565b604051849083907f34795cc6b122b9a0ae684946319f1e14a577b4e8f9b3dda9ac94c21a54d3188c905f90a35f82815260066020908152604080832083905586916113be918701908701612111565b6113cb60e0870187612fa4565b6040516024016113de9493929190612fe6565b60408051601f198184030181529190526020810180516001600160e01b031663643477d560e11b17905290505f61142561141e6080870160608801612111565b5a84611de3565b9050806114885760405162461bcd60e51b815260206004820152602b60248201527f54656c65706f727465724d657373656e6765723a20726574727920657865637560448201526a1d1a5bdb8819985a5b195960aa1b60648201526084016104b5565b50506001805550505050565b6040516001600160a01b038381166024830152604482018390526114f391859182169063a9059cbb906064015b604051602081830303815290604052915060e01b6020820180516001600160e01b038381831617835250505050611dfa565b505050565b805460018201545f916105fc91613010565b60605f611520600561151b856114f8565b611e5b565b9050805f0361156c57604080515f8082526020820190925290611564565b604080518082019091525f808252602082015281526020019060019003908161153e5790505b509392505050565b5f816001600160401b038111156115855761158561249d565b6040519080825280602002602001820160405280156115c957816020015b604080518082019091525f80825260208201528152602001906001900390816115a35790505b5090505f5b82811015611564576115df85611e70565b8282815181106115f1576115f1612b5d565b60209081029190910101526001016115ce565b5f8061160e610425565b90505f60035f815461161f90613023565b91905081905590505f61163683875f015184610aed565b90505f604051806101000160405280848152602001336001600160a01b03168152602001885f0151815260200188602001516001600160a01b0316815260200188606001518152602001886080015181526020018781526020018860a0015181525090505f816040516020016116ac919061303b565b60405160208183030381529060405290505f808960400151602001511115611713576040890151516001600160a01b03166116f95760405162461bcd60e51b81526004016104b590612ae2565b6040890151805160209091015161171091906118f8565b90505b6040805180820182528a820151516001600160a01b03908116825260208083018590528351808501855286518783012081528082018481525f8a815260058452869020915182555180516001830180546001600160a01b03191691909516179093559101516002909101558a51915190919086907f2a211ad4a59ab9d003852404f9c57c690704ee755f3c79d2c2812ad32da99df8906117b6908890869061304d565b60405180910390a360405163ee5b48eb60e01b81526005600160991b019063ee5b48eb906117e8908690600401612a8b565b6020604051808303815f875af1158015611804573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061182891906123fc565b50939998505050505050505050565b604080518082019091525f8082526020820152611853836114f8565b82106118ab5760405162461bcd60e51b815260206004820152602160248201527f5265636569707451756575653a20696e646578206f7574206f6620626f756e646044820152607360f81b60648201526084016104b5565b826002015f83855f01546118bf9190612b4a565b815260208082019290925260409081015f20815180830190925280548252600101546001600160a01b0316918101919091529392505050565b6040516370a0823160e01b81523060048201525f9081906001600160a01b038516906370a0823190602401602060405180830381865afa15801561193e573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061196291906123fc565b90506119796001600160a01b038516333086611f3a565b6040516370a0823160e01b81523060048201525f906001600160a01b038616906370a0823190602401602060405180830381865afa1580156119bd573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906119e191906123fc565b9050818111611a475760405162461bcd60e51b815260206004820152602c60248201527f5361666545524332305472616e7366657246726f6d3a2062616c616e6365206e60448201526b1bdd081a5b98dc99585cd95960a21b60648201526084016104b5565b611a518282613010565b95945050505050565b5f81515f03611a6b575060016105fc565b81515f5b81811015611abc57846001600160a01b0316848281518110611a9357611a93612b5d565b60200260200101516001600160a01b031603611ab4576001925050506105fc565b600101611a6f565b505f949350505050565b805f03611b255760405162461bcd60e51b815260206004820152602760248201527f54656c65706f727465724d657373656e6765723a207a65726f206d657373616760448201526665206e6f6e636560c81b60648201526084016104b5565b5f9182526007602052604090912055565b5f611b458484845f0151610aed565b5f818152600560209081526040918290208251808401845281548152835180850190945260018201546001600160a01b031684526002909101548383015290810191909152805191925090611b9b575050505050565b5f8281526005602090815260408083208381556001810180546001600160a01b03191690556002018390558382018051830151878401516001600160a01b0390811686526009855283862092515116855292528220805491929091611c01908490612b4a565b9250508190555082602001516001600160a01b031684837fd13a7935f29af029349bed0a2097455b91fd06190a30478c575db3f31e00bf578460200151604051611c4b919061305f565b60405180910390a45050505050565b600182018054829160028501915f9182611c7383613023565b9091555081526020808201929092526040015f2082518155910151600190910180546001600160a01b0319166001600160a01b039092169190911790555050565b80608001515a1015611d165760405162461bcd60e51b815260206004820152602560248201527f54656c65706f727465724d657373656e6765723a20696e73756666696369656e604482015264742067617360d81b60648201526084016104b5565b80606001516001600160a01b03163b5f03611d36576114f3838383611f79565b602081015160e08201516040515f92611d5392869260240161307f565b60408051601f198184030181529190526020810180516001600160e01b031663643477d560e11b179052606083015160808401519192505f91611d97919084611de3565b905080611db057611da9858585611f79565b5050505050565b604051849086907f34795cc6b122b9a0ae684946319f1e14a577b4e8f9b3dda9ac94c21a54d3188c905f90a35050505050565b5f805f808451602086015f8989f195945050505050565b5f611e0e6001600160a01b03841683611fed565b905080515f14158015611e32575080806020019051810190611e3091906130a8565b155b156114f357604051635274afe760e01b81526001600160a01b03841660048201526024016104b5565b5f818310611e6957816108af565b5090919050565b604080518082019091525f808252602082015281546001830154819003611ed95760405162461bcd60e51b815260206004820152601960248201527f5265636569707451756575653a20656d7074792071756575650000000000000060448201526064016104b5565b5f8181526002840160208181526040808420815180830190925280548252600180820180546001600160a01b03811685870152888852959094529490556001600160a01b0319909216905590611f30908390612b4a565b9093555090919050565b6040516001600160a01b038481166024830152838116604483015260648201839052611f739186918216906323b872dd906084016114c1565b50505050565b80604051602001611f8a919061303b565b60408051601f1981840301815282825280516020918201205f878152600690925291902055829084907f4619adc1017b82e02eaefac01a43d50d6d8de4460774bc370c3ff0210d40c98590611fe090859061303b565b60405180910390a3505050565b60606108af83835f845f80856001600160a01b0316848660405161201191906130c1565b5f6040518083038185875af1925050503d805f811461204b576040519150601f19603f3d011682016040523d82523d5f602084013e612050565b606091505b509150915061206086838361206a565b9695505050505050565b60608261207f5761207a826120c6565b6108af565b815115801561209657506001600160a01b0384163b155b156120bf57604051639996b31560e01b81526001600160a01b03851660048201526024016104b5565b50806108af565b8051156120d65780518082602001fd5b604051630a12f52160e11b815260040160405180910390fd5b50565b6001600160a01b03811681146120ef575f80fd5b80356104ee816120f2565b5f60208284031215612121575f80fd5b81356108af816120f2565b5f6020828403121561213c575f80fd5b5035919050565b828152606081016108af602083018480516001600160a01b03168252602090810151910152565b5f6020828403121561217a575f80fd5b81356001600160401b0381111561218f575f80fd5b820160e081850312156108af575f80fd5b5f61010082840312156121b1575f80fd5b50919050565b5f602082840312156121c7575f80fd5b81356001600160401b038111156121dc575f80fd5b611222848285016121a0565b5f80604083850312156121f9575f80fd5b50508035926020909101359150565b815181526020808301516001600160a01b031690820152604081016105fc565b5f805f6060848603121561223a575f80fd5b83359250602084013561224c816120f2565b929592945050506040919091013590565b5f805f6060848603121561226f575f80fd5b505081359360208301359350604090920135919050565b5f8083601f840112612296575f80fd5b5081356001600160401b038111156122ac575f80fd5b6020830191508360208260051b85010111156122c6575f80fd5b9250929050565b5f805f805f8086880360a08112156122e3575f80fd5b8735965060208801356001600160401b0380821115612300575f80fd5b61230c8b838c01612286565b90985096508691506040603f1984011215612325575f80fd5b60408a01955060808a013592508083111561233e575f80fd5b505061234c89828a01612286565b979a9699509497509295939492505050565b5f806040838503121561236f575f80fd5b823561237a816120f2565b9150602083013561238a816120f2565b809150509250929050565b5f80604083850312156123a6575f80fd5b823563ffffffff8116811461237a575f80fd5b5f80604083850312156123ca575f80fd5b8235915060208301356001600160401b038111156123e6575f80fd5b6123f2858286016121a0565b9150509250929050565b5f6020828403121561240c575f80fd5b5051919050565b60208082526027908201527f54656c65706f727465724d657373656e6765723a207a65726f20626c6f636b636040820152661a185a5b88125160ca1b606082015260800190565b60208082526023908201527f5265656e7472616e63794775617264733a2073656e646572207265656e7472616040820152626e637960e81b606082015260800190565b634e487b7160e01b5f52604160045260245ffd5b604080519081016001600160401b03811182821017156124d3576124d361249d565b60405290565b60405160c081016001600160401b03811182821017156124d3576124d361249d565b60405161010081016001600160401b03811182821017156124d3576124d361249d565b604051601f8201601f191681016001600160401b03811182821017156125465761254661249d565b604052919050565b5f6040828403121561255e575f80fd5b6125666124b1565b90508135612573816120f2565b808252506020820135602082015292915050565b5f6001600160401b0382111561259f5761259f61249d565b5060051b60200190565b5f82601f8301126125b8575f80fd5b813560206125cd6125c883612587565b61251e565b8083825260208201915060208460051b8701019350868411156125ee575f80fd5b602086015b84811015612613578035612606816120f2565b83529183019183016125f3565b509695505050505050565b5f6001600160401b038211156126365761263661249d565b50601f01601f191660200190565b5f82601f830112612653575f80fd5b81356126616125c88261261e565b818152846020838601011115612675575f80fd5b816020850160208301375f918101602001919091529392505050565b5f60e082360312156126a1575f80fd5b6126a96124d9565b823581526126b960208401612106565b60208201526126cb366040850161254e565b60408201526080830135606082015260a08301356001600160401b03808211156126f3575f80fd5b6126ff368387016125a9565b608084015260c0850135915080821115612717575f80fd5b5061272436828601612644565b60a08301525092915050565b60208082526026908201527f54656c65706f727465724d657373656e6765723a206d657373616765206e6f7460408201526508199bdd5b9960d21b606082015260800190565b5f808335601e1984360301811261278b575f80fd5b83016020810192503590506001600160401b038111156127a9575f80fd5b8060051b36038213156122c6575f80fd5b8183525f60208085019450825f5b858110156127f65781356127db816120f2565b6001600160a01b0316875295820195908201906001016127c8565b509495945050505050565b5f808335601e19843603018112612816575f80fd5b83016020810192503590506001600160401b03811115612834575f80fd5b8060061b36038213156122c6575f80fd5b8183525f60208085019450825f5b858110156127f657813587528282013561286c816120f2565b6001600160a01b0316878401526040968701969190910190600101612853565b5f808335601e198436030181126128a1575f80fd5b83016020810192503590506001600160401b038111156128bf575f80fd5b8036038213156122c6575f80fd5b81835281816020850137505f828201602090810191909152601f909101601f19169091010190565b5f61010082358452602083013561290b816120f2565b6001600160a01b031660208501526040838101359085015261292f60608401612106565b6001600160a01b031660608501526080838101359085015261295460a0840184612776565b8260a087015261296783870182846127ba565b9250505061297860c0840184612801565b85830360c087015261298b838284612845565b9250505061299c60e084018461288c565b85830360e08701526120608382846128cd565b602081525f6108af60208301846128f5565b60208082526029908201527f54656c65706f727465724d657373656e6765723a20696e76616c6964206d65736040820152680e6c2ceca40d0c2e6d60bb1b606082015260800190565b606081525f612a1c60608301856128f5565b90506108af602083018480516001600160a01b03168252602090810151910152565b5f5b83811015612a58578181015183820152602001612a40565b50505f910152565b5f8151808452612a77816020860160208601612a3e565b601f01601f19169290920160200192915050565b602081525f6108af6020830184612a60565b60208082526025908201527f5265656e7472616e63794775617264733a207265636569766572207265656e7460408201526472616e637960d81b606082015260800190565b60208082526034908201527f54656c65706f727465724d657373656e6765723a207a65726f2066656520617360408201527373657420636f6e7472616374206164647265737360601b606082015260800190565b634e487b7160e01b5f52601160045260245ffd5b808201808211156105fc576105fc612b36565b634e487b7160e01b5f52603260045260245ffd5b5f60408284031215612b81575f80fd5b6108af838361254e565b80516104ee816120f2565b5f82601f830112612ba5575f80fd5b8151612bb36125c88261261e565b818152846020838601011115612bc7575f80fd5b611222826020830160208701612a3e565b805180151581146104ee575f80fd5b5f8060408385031215612bf8575f80fd5b82516001600160401b0380821115612c0e575f80fd5b9084019060608287031215612c21575f80fd5b604051606081018181108382111715612c3c57612c3c61249d565b604052825181526020830151612c51816120f2565b6020820152604083015182811115612c67575f80fd5b612c7388828601612b96565b6040830152509350612c8a91505060208401612bd8565b90509250929050565b5f82601f830112612ca2575f80fd5b81516020612cb26125c883612587565b8083825260208201915060208460051b870101935086841115612cd3575f80fd5b602086015b84811015612613578051612ceb816120f2565b8352918301918301612cd8565b5f82601f830112612d07575f80fd5b81516020612d176125c883612587565b82815260069290921b84018101918181019086841115612d35575f80fd5b8286015b848110156126135760408189031215612d50575f80fd5b612d586124b1565b8151815284820151612d69816120f2565b81860152835291830191604001612d39565b5f60208284031215612d8b575f80fd5b81516001600160401b0380821115612da1575f80fd5b908301906101008286031215612db5575f80fd5b612dbd6124fb565b82518152612dcd60208401612b8b565b602082015260408301516040820152612de860608401612b8b565b60608201526080830151608082015260a083015182811115612e08575f80fd5b612e1487828601612c93565b60a08301525060c083015182811115612e2b575f80fd5b612e3787828601612cf8565b60c08301525060e083015182811115612e4e575f80fd5b612e5a87828601612b96565b60e08301525095945050505050565b5f815180845260208085019450602084015f5b838110156127f65781516001600160a01b031687529582019590820190600101612e7c565b5f815180845260208085019450602084015f5b838110156127f657612eda878351805182526020908101516001600160a01b0316910152565b6040969096019590820190600101612eb4565b5f6101008251845260018060a01b036020840151166020850152604083015160408501526060830151612f2b60608601826001600160a01b03169052565b506080830151608085015260a08301518160a0860152612f4d82860182612e69565b91505060c083015184820360c0860152612f678282612ea1565b91505060e083015184820360e0860152611a518282612a60565b6001600160a01b03831681526040602082018190525f9061122290830184612eed565b5f808335601e19843603018112612fb9575f80fd5b8301803591506001600160401b03821115612fd2575f80fd5b6020019150368190038213156122c6575f80fd5b8481526001600160a01b03841660208201526060604082018190525f9061206090830184866128cd565b818103818111156105fc576105fc612b36565b5f6001820161303457613034612b36565b5060010190565b602081525f6108af6020830184612eed565b606081525f612a1c6060830185612eed565b81516001600160a01b0316815260208083015190820152604081016105fc565b8381526001600160a01b03831660208201526060604082018190525f90611a5190830184612a60565b5f602082840312156130b8575f80fd5b6108af82612bd8565b5f82516130d2818460208701612a3e565b919091019291505056fea264697066735822122087ddcaedb7bd675b71bab7b1ee470df4c6055cd1514a541ea44fddf8be84ed1a64736f6c63430008190033", + Bin: "0x6080604052348015600e575f80fd5b5060015f8190558055613142806100245f395ff3fe608060405234801561000f575f80fd5b5060043610610148575f3560e01c8063a8898181116100bf578063df20e8bc11610079578063df20e8bc14610331578063e69d606a14610344578063e6e67bd5146103ab578063ebc3b1ba146103e6578063ecc7042814610409578063fc2d619714610412575f80fd5b8063a8898181146102a9578063a9a85614146102bc578063b771b3bc146102cf578063c473eef8146102dd578063ccb5f80914610315578063d127dc9b14610328575f80fd5b8063399b77da11610110578063399b77da1461021257806362448850146102315780638245a1b014610244578063860a3b0614610257578063892bf412146102765780638ac0fd0414610296575f80fd5b80630af5b4ff1461014c57806322296c3a146101675780632bc8b0bf1461017c5780632ca40f551461018f5780632e27c223146101e7575b5f80fd5b610154610425565b6040519081526020015b60405180910390f35b61017a610175366004612138565b6104f3565b005b61015461018a366004612153565b6105e6565b6101d961019d366004612153565b600560209081525f9182526040918290208054835180850190945260018201546001600160a01b03168452600290910154918301919091529082565b60405161015e92919061216a565b6101fa6101f5366004612153565b610602565b6040516001600160a01b03909116815260200161015e565b610154610220366004612153565b5f9081526005602052604090205490565b61015461023f366004612191565b610689565b61017a6102523660046121de565b6106e2565b610154610265366004612153565b60066020525f908152604090205481565b61028961028436600461220f565b610885565b60405161015e919061222f565b61017a6102a436600461224f565b6108b6565b6101546102b7366004612284565b610aed565b6101546102ca3660046122f4565b610b2f565b6101fa6005600160991b0181565b6101546102eb366004612385565b6001600160a01b039182165f90815260096020908152604080832093909416825291909152205490565b61017a6103233660046123bc565b610dc1565b61015460025481565b61015461033f366004612153565b6111e3565b61038c610352366004612153565b5f90815260056020908152604091829020825180840190935260018101546001600160a01b03168084526002909101549290910182905291565b604080516001600160a01b03909316835260208301919091520161015e565b6103d16103b9366004612153565b60046020525f90815260409020805460019091015482565b6040805192835260208301919091520161015e565b6103f96103f4366004612153565b61122a565b604051901515815260200161015e565b61015460035481565b61017a6104203660046123e0565b61123f565b6002545f90806104ee576005600160991b016001600160a01b0316634213cf786040518163ffffffff1660e01b8152600401602060405180830381865afa158015610472573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906104969190612423565b9050806104be5760405162461bcd60e51b81526004016104b59061243a565b60405180910390fd5b600281905560405181907f1eac640109dc937d2a9f42735a05f794b39a5e3759d681951d671aabbce4b104905f90a25b919050565b335f9081526009602090815260408083206001600160a01b0385168452909152902054806105745760405162461bcd60e51b815260206004820152602860248201527f54656c65706f727465724d657373656e6765723a206e6f2072657761726420746044820152676f2072656465656d60c01b60648201526084016104b5565b335f8181526009602090815260408083206001600160a01b03871680855290835281842093909355518481529192917f3294c84e5b0f29d9803655319087207bc94f4db29f7927846944822773780b88910160405180910390a36105e26001600160a01b0383163383611494565b5050565b5f8181526004602052604081206105fc906114f8565b92915050565b5f8181526007602052604081205461066e5760405162461bcd60e51b815260206004820152602960248201527f54656c65706f727465724d657373656e6765723a206d657373616765206e6f74604482015268081c9958d95a5d995960ba1b60648201526084016104b5565b505f908152600860205260409020546001600160a01b031690565b5f60015f54146106ab5760405162461bcd60e51b81526004016104b590612481565b60025f556106d86106bb836126b8565b83355f9081526004602052604090206106d39061150a565b611604565b60015f5592915050565b60015f54146107035760405162461bcd60e51b81526004016104b590612481565b60025f818155905461071b9060408401358435610aed565b5f818152600560209081526040918290208251808401845281548152835180850190945260018201546001600160a01b0316845260029091015483830152908101919091528051919250906107825760405162461bcd60e51b81526004016104b590612757565b5f8360405160200161079491906129d6565b60408051601f19818403018152919052825181516020830120919250146107cd5760405162461bcd60e51b81526004016104b5906129e8565b8360400135837f2a211ad4a59ab9d003852404f9c57c690704ee755f3c79d2c2812ad32da99df8868560200151604051610808929190612a31565b60405180910390a360405163ee5b48eb60e01b81526005600160991b019063ee5b48eb9061083a908490600401612ab2565b6020604051808303815f875af1158015610856573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061087a9190612423565b505060015f55505050565b604080518082019091525f80825260208201525f8381526004602052604090206108af9083611837565b9392505050565b60015f54146108d75760405162461bcd60e51b81526004016104b590612481565b60025f5560018054146108fc5760405162461bcd60e51b81526004016104b590612ac4565b6002600155806109665760405162461bcd60e51b815260206004820152602f60248201527f54656c65706f727465724d657373656e6765723a207a65726f2061646469746960448201526e1bdb985b0819995948185b5bdd5b9d608a1b60648201526084016104b5565b6001600160a01b03821661098c5760405162461bcd60e51b81526004016104b590612b09565b5f838152600560205260409020546109b65760405162461bcd60e51b81526004016104b590612757565b5f838152600560205260409020600101546001600160a01b03838116911614610a475760405162461bcd60e51b815260206004820152603760248201527f54656c65706f727465724d657373656e6765723a20696e76616c69642066656560448201527f20617373657420636f6e7472616374206164647265737300000000000000000060648201526084016104b5565b5f610a5283836118f8565b5f85815260056020526040812060020180549293508392909190610a77908490612b71565b90915550505f8481526005602052604090819020905185917fc1bfd1f1208927dfbd414041dcb5256e6c9ad90dd61aec3249facbd34ff7b3e191610ad8916001019081546001600160a01b0316815260019190910154602082015260400190565b60405180910390a2505060018080555f555050565b6040805130602082015290810184905260608101839052608081018290525f9060a0016040516020818303038152906040528051906020012090509392505050565b5f60015f5414610b515760405162461bcd60e51b81526004016104b590612481565b60025f818155905490866001600160401b03811115610b7257610b726124c4565b604051908082528060200260200182016040528015610bb657816020015b604080518082019091525f8082526020820152815260200190600190039081610b905790505b509050865f5b81811015610d2e575f8a8a83818110610bd757610bd7612b84565b9050602002013590505f60075f8381526020019081526020015f20549050805f03610c535760405162461bcd60e51b815260206004820152602660248201527f54656c65706f727465724d657373656e6765723a2072656365697074206e6f7460448201526508199bdd5b9960d21b60648201526084016104b5565b610c5e8d8783610aed565b8214610cd25760405162461bcd60e51b815260206004820152603a60248201527f54656c65706f727465724d657373656e6765723a206d6573736167652049442060448201527f6e6f742066726f6d20736f7572636520626c6f636b636861696e00000000000060648201526084016104b5565b5f828152600860209081526040918290205482518084019093528383526001600160a01b03169082018190528651909190879086908110610d1557610d15612b84565b6020026020010181905250505050806001019050610bbc565b506040805160c0810182528b81525f6020820152610daf918101610d57368b90038b018b612b98565b81526020015f81526020018888808060200260200160405190810160405280939291908181526020018383602002808284375f9201829052509385525050604080519283526020808401909152909201525083611604565b60015f559a9950505050505050505050565b6001805414610de25760405162461bcd60e51b81526004016104b590612ac4565b60026001556040516306f8253560e41b815263ffffffff831660048201525f9081906005600160991b0190636f825350906024015f60405180830381865afa158015610e30573d5f803e3d5ffd5b505050506040513d5f823e601f3d908101601f19168201604052610e579190810190612c0e565b9150915080610eba5760405162461bcd60e51b815260206004820152602960248201527f54656c65706f727465724d657373656e6765723a20696e76616c69642077617260448201526870206d65737361676560b81b60648201526084016104b5565b60208201516001600160a01b03163014610f315760405162461bcd60e51b815260206004820152603260248201527f54656c65706f727465724d657373656e6765723a20696e76616c6964206f726960448201527167696e2073656e646572206164647265737360701b60648201526084016104b5565b5f8260400151806020019051810190610f4a9190612da2565b90505f610f55610425565b905080826040015114610fc45760405162461bcd60e51b815260206004820152603160248201527f54656c65706f727465724d657373656e6765723a20696e76616c6964206465736044820152701d1a5b985d1a5bdb8818da185a5b881251607a1b60648201526084016104b5565b835182515f91610fd5918490610aed565b5f81815260076020526040902054909150156110495760405162461bcd60e51b815260206004820152602d60248201527f54656c65706f727465724d657373656e6765723a206d65737361676520616c7260448201526c1958591e481c9958d95a5d9959609a1b60648201526084016104b5565b611057338460a00151611904565b6110b55760405162461bcd60e51b815260206004820152602960248201527f54656c65706f727465724d657373656e6765723a20756e617574686f72697a6560448201526832103932b630bcb2b960b91b60648201526084016104b5565b6110c281845f0151611970565b6001600160a01b038616156110f8575f81815260086020526040902080546001600160a01b0319166001600160a01b0388161790555b60c0830151515f5b8181101561113b5761113384885f01518760c00151848151811061112657611126612b84565b60200260200101516119e0565b600101611100565b50604080518082018252855181526001600160a01b03891660208083019190915288515f90815260049091529190912061117491611b04565b336001600160a01b0316865f0151837f292ee90bbaf70b5d4936025e09d56ba08f3e421156b6a568cf3c2840d9343e348a886040516111b4929190612fb1565b60405180910390a460e084015151156111d5576111d582875f015186611b5e565b505060018055505050505050565b6002545f90806112055760405162461bcd60e51b81526004016104b59061243a565b5f60035460016112159190612b71565b9050611222828583610aed565b949350505050565b5f8181526007602052604081205415156105fc565b60018054146112605760405162461bcd60e51b81526004016104b590612ac4565b60026001819055545f906112779084908435610aed565b5f81815260066020526040902054909150806112a55760405162461bcd60e51b81526004016104b590612757565b80836040516020016112b791906129d6565b60405160208183030381529060405280519060200120146112ea5760405162461bcd60e51b81526004016104b5906129e8565b5f6112fb6080850160608601612138565b6001600160a01b03163b1161136f5760405162461bcd60e51b815260206004820152603460248201527f54656c65706f727465724d657373656e6765723a2064657374696e6174696f6e604482015273206164647265737320686173206e6f20636f646560601b60648201526084016104b5565b604051849083907f34795cc6b122b9a0ae684946319f1e14a577b4e8f9b3dda9ac94c21a54d3188c905f90a35f82815260066020908152604080832083905586916113be918701908701612138565b6113cb60e0870187612fd4565b6040516024016113de9493929190613016565b60408051601f198184030181529190526020810180516001600160e01b031663643477d560e11b17905290505f61142561141e6080870160608801612138565b5a84611c8d565b9050806114885760405162461bcd60e51b815260206004820152602b60248201527f54656c65706f727465724d657373656e6765723a20726574727920657865637560448201526a1d1a5bdb8819985a5b195960aa1b60648201526084016104b5565b50506001805550505050565b6040516001600160a01b038381166024830152604482018390526114f391859182169063a9059cbb906064015b604051602081830303815290604052915060e01b6020820180516001600160e01b038381831617835250505050611ca4565b505050565b805460018201545f916105fc91613040565b60605f611520600561151b856114f8565b611d05565b9050805f0361156c57604080515f8082526020820190925290611564565b604080518082019091525f808252602082015281526020019060019003908161153e5790505b509392505050565b5f816001600160401b03811115611585576115856124c4565b6040519080825280602002602001820160405280156115c957816020015b604080518082019091525f80825260208201528152602001906001900390816115a35790505b5090505f5b82811015611564576115df85611d1a565b8282815181106115f1576115f1612b84565b60209081029190910101526001016115ce565b5f8061160e610425565b90505f60035f815461161f90613053565b91905081905590505f61163683875f015184610aed565b90505f604051806101000160405280848152602001336001600160a01b03168152602001885f0151815260200188602001516001600160a01b0316815260200188606001518152602001886080015181526020018781526020018860a0015181525090505f816040516020016116ac919061306b565b60405160208183030381529060405290505f808960400151602001511115611713576040890151516001600160a01b03166116f95760405162461bcd60e51b81526004016104b590612b09565b6040890151805160209091015161171091906118f8565b90505b6040805180820182528a820151516001600160a01b03908116825260208083018590528351808501855286518783012081528082018481525f8a815260058452869020915182555180516001830180546001600160a01b03191691909516179093559101516002909101558a51915190919086907f2a211ad4a59ab9d003852404f9c57c690704ee755f3c79d2c2812ad32da99df8906117b6908890869061307d565b60405180910390a360405163ee5b48eb60e01b81526005600160991b019063ee5b48eb906117e8908690600401612ab2565b6020604051808303815f875af1158015611804573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906118289190612423565b50939998505050505050505050565b604080518082019091525f8082526020820152611853836114f8565b82106118ab5760405162461bcd60e51b815260206004820152602160248201527f5265636569707451756575653a20696e646578206f7574206f6620626f756e646044820152607360f81b60648201526084016104b5565b826002015f83855f01546118bf9190612b71565b815260208082019290925260409081015f20815180830190925280548252600101546001600160a01b0316918101919091529392505050565b5f6108af833384611de4565b5f81515f03611915575060016105fc565b81515f5b8181101561196657846001600160a01b031684828151811061193d5761193d612b84565b60200260200101516001600160a01b03160361195e576001925050506105fc565b600101611919565b505f949350505050565b805f036119cf5760405162461bcd60e51b815260206004820152602760248201527f54656c65706f727465724d657373656e6765723a207a65726f206d657373616760448201526665206e6f6e636560c81b60648201526084016104b5565b5f9182526007602052604090912055565b5f6119ef8484845f0151610aed565b5f818152600560209081526040918290208251808401845281548152835180850190945260018201546001600160a01b031684526002909101548383015290810191909152805191925090611a45575050505050565b5f8281526005602090815260408083208381556001810180546001600160a01b03191690556002018390558382018051830151878401516001600160a01b0390811686526009855283862092515116855292528220805491929091611aab908490612b71565b9250508190555082602001516001600160a01b031684837fd13a7935f29af029349bed0a2097455b91fd06190a30478c575db3f31e00bf578460200151604051611af5919061308f565b60405180910390a45050505050565b600182018054829160028501915f9182611b1d83613053565b9091555081526020808201929092526040015f2082518155910151600190910180546001600160a01b0319166001600160a01b039092169190911790555050565b80608001515a1015611bc05760405162461bcd60e51b815260206004820152602560248201527f54656c65706f727465724d657373656e6765723a20696e73756666696369656e604482015264742067617360d81b60648201526084016104b5565b80606001516001600160a01b03163b5f03611be0576114f3838383611f47565b602081015160e08201516040515f92611bfd9286926024016130af565b60408051601f198184030181529190526020810180516001600160e01b031663643477d560e11b179052606083015160808401519192505f91611c41919084611c8d565b905080611c5a57611c53858585611f47565b5050505050565b604051849086907f34795cc6b122b9a0ae684946319f1e14a577b4e8f9b3dda9ac94c21a54d3188c905f90a35050505050565b5f805f808451602086015f8989f195945050505050565b5f611cb86001600160a01b03841683611fbb565b905080515f14158015611cdc575080806020019051810190611cda91906130d8565b155b156114f357604051635274afe760e01b81526001600160a01b03841660048201526024016104b5565b5f818310611d1357816108af565b5090919050565b604080518082019091525f808252602082015281546001830154819003611d835760405162461bcd60e51b815260206004820152601960248201527f5265636569707451756575653a20656d7074792071756575650000000000000060448201526064016104b5565b5f8181526002840160208181526040808420815180830190925280548252600180820180546001600160a01b03811685870152888852959094529490556001600160a01b0319909216905590611dda908390612b71565b9093555090919050565b6040516370a0823160e01b81523060048201525f9081906001600160a01b038616906370a0823190602401602060405180830381865afa158015611e2a573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611e4e9190612423565b9050611e656001600160a01b038616853086611fc8565b6040516370a0823160e01b81523060048201525f906001600160a01b038716906370a0823190602401602060405180830381865afa158015611ea9573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611ecd9190612423565b9050818111611f335760405162461bcd60e51b815260206004820152602c60248201527f5361666545524332305472616e7366657246726f6d3a2062616c616e6365206e60448201526b1bdd081a5b98dc99585cd95960a21b60648201526084016104b5565b611f3d8282613040565b9695505050505050565b80604051602001611f58919061306b565b60408051601f1981840301815282825280516020918201205f878152600690925291902055829084907f4619adc1017b82e02eaefac01a43d50d6d8de4460774bc370c3ff0210d40c98590611fae90859061306b565b60405180910390a3505050565b60606108af83835f612007565b6040516001600160a01b0384811660248301528381166044830152606482018390526120019186918216906323b872dd906084016114c1565b50505050565b60608147101561202c5760405163cd78605960e01b81523060048201526024016104b5565b5f80856001600160a01b0316848660405161204791906130f1565b5f6040518083038185875af1925050503d805f8114612081576040519150601f19603f3d011682016040523d82523d5f602084013e612086565b606091505b5091509150611f3d8683836060826120a6576120a1826120ed565b6108af565b81511580156120bd57506001600160a01b0384163b155b156120e657604051639996b31560e01b81526001600160a01b03851660048201526024016104b5565b50806108af565b8051156120fd5780518082602001fd5b604051630a12f52160e11b815260040160405180910390fd5b50565b6001600160a01b0381168114612116575f80fd5b80356104ee81612119565b5f60208284031215612148575f80fd5b81356108af81612119565b5f60208284031215612163575f80fd5b5035919050565b828152606081016108af602083018480516001600160a01b03168252602090810151910152565b5f602082840312156121a1575f80fd5b81356001600160401b038111156121b6575f80fd5b820160e081850312156108af575f80fd5b5f61010082840312156121d8575f80fd5b50919050565b5f602082840312156121ee575f80fd5b81356001600160401b03811115612203575f80fd5b611222848285016121c7565b5f8060408385031215612220575f80fd5b50508035926020909101359150565b815181526020808301516001600160a01b031690820152604081016105fc565b5f805f60608486031215612261575f80fd5b83359250602084013561227381612119565b929592945050506040919091013590565b5f805f60608486031215612296575f80fd5b505081359360208301359350604090920135919050565b5f8083601f8401126122bd575f80fd5b5081356001600160401b038111156122d3575f80fd5b6020830191508360208260051b85010111156122ed575f80fd5b9250929050565b5f805f805f8086880360a081121561230a575f80fd5b8735965060208801356001600160401b0380821115612327575f80fd5b6123338b838c016122ad565b90985096508691506040603f198401121561234c575f80fd5b60408a01955060808a0135925080831115612365575f80fd5b505061237389828a016122ad565b979a9699509497509295939492505050565b5f8060408385031215612396575f80fd5b82356123a181612119565b915060208301356123b181612119565b809150509250929050565b5f80604083850312156123cd575f80fd5b823563ffffffff811681146123a1575f80fd5b5f80604083850312156123f1575f80fd5b8235915060208301356001600160401b0381111561240d575f80fd5b612419858286016121c7565b9150509250929050565b5f60208284031215612433575f80fd5b5051919050565b60208082526027908201527f54656c65706f727465724d657373656e6765723a207a65726f20626c6f636b636040820152661a185a5b88125160ca1b606082015260800190565b60208082526023908201527f5265656e7472616e63794775617264733a2073656e646572207265656e7472616040820152626e637960e81b606082015260800190565b634e487b7160e01b5f52604160045260245ffd5b604080519081016001600160401b03811182821017156124fa576124fa6124c4565b60405290565b60405160c081016001600160401b03811182821017156124fa576124fa6124c4565b60405161010081016001600160401b03811182821017156124fa576124fa6124c4565b604051601f8201601f191681016001600160401b038111828210171561256d5761256d6124c4565b604052919050565b5f60408284031215612585575f80fd5b61258d6124d8565b9050813561259a81612119565b808252506020820135602082015292915050565b5f6001600160401b038211156125c6576125c66124c4565b5060051b60200190565b5f82601f8301126125df575f80fd5b813560206125f46125ef836125ae565b612545565b8083825260208201915060208460051b870101935086841115612615575f80fd5b602086015b8481101561263a57803561262d81612119565b835291830191830161261a565b509695505050505050565b5f6001600160401b0382111561265d5761265d6124c4565b50601f01601f191660200190565b5f82601f83011261267a575f80fd5b81356126886125ef82612645565b81815284602083860101111561269c575f80fd5b816020850160208301375f918101602001919091529392505050565b5f60e082360312156126c8575f80fd5b6126d0612500565b823581526126e06020840161212d565b60208201526126f23660408501612575565b60408201526080830135606082015260a08301356001600160401b038082111561271a575f80fd5b612726368387016125d0565b608084015260c085013591508082111561273e575f80fd5b5061274b3682860161266b565b60a08301525092915050565b60208082526026908201527f54656c65706f727465724d657373656e6765723a206d657373616765206e6f7460408201526508199bdd5b9960d21b606082015260800190565b5f808335601e198436030181126127b2575f80fd5b83016020810192503590506001600160401b038111156127d0575f80fd5b8060051b36038213156122ed575f80fd5b8183525f60208085019450825f5b8581101561281d57813561280281612119565b6001600160a01b0316875295820195908201906001016127ef565b509495945050505050565b5f808335601e1984360301811261283d575f80fd5b83016020810192503590506001600160401b0381111561285b575f80fd5b8060061b36038213156122ed575f80fd5b8183525f60208085019450825f5b8581101561281d57813587528282013561289381612119565b6001600160a01b031687840152604096870196919091019060010161287a565b5f808335601e198436030181126128c8575f80fd5b83016020810192503590506001600160401b038111156128e6575f80fd5b8036038213156122ed575f80fd5b81835281816020850137505f828201602090810191909152601f909101601f19169091010190565b5f61010082358452602083013561293281612119565b6001600160a01b03166020850152604083810135908501526129566060840161212d565b6001600160a01b031660608501526080838101359085015261297b60a084018461279d565b8260a087015261298e83870182846127e1565b9250505061299f60c0840184612828565b85830360c08701526129b283828461286c565b925050506129c360e08401846128b3565b85830360e0870152611f3d8382846128f4565b602081525f6108af602083018461291c565b60208082526029908201527f54656c65706f727465724d657373656e6765723a20696e76616c6964206d65736040820152680e6c2ceca40d0c2e6d60bb1b606082015260800190565b606081525f612a43606083018561291c565b90506108af602083018480516001600160a01b03168252602090810151910152565b5f5b83811015612a7f578181015183820152602001612a67565b50505f910152565b5f8151808452612a9e816020860160208601612a65565b601f01601f19169290920160200192915050565b602081525f6108af6020830184612a87565b60208082526025908201527f5265656e7472616e63794775617264733a207265636569766572207265656e7460408201526472616e637960d81b606082015260800190565b60208082526034908201527f54656c65706f727465724d657373656e6765723a207a65726f2066656520617360408201527373657420636f6e7472616374206164647265737360601b606082015260800190565b634e487b7160e01b5f52601160045260245ffd5b808201808211156105fc576105fc612b5d565b634e487b7160e01b5f52603260045260245ffd5b5f60408284031215612ba8575f80fd5b6108af8383612575565b80516104ee81612119565b5f82601f830112612bcc575f80fd5b8151612bda6125ef82612645565b818152846020838601011115612bee575f80fd5b611222826020830160208701612a65565b805180151581146104ee575f80fd5b5f8060408385031215612c1f575f80fd5b82516001600160401b0380821115612c35575f80fd5b9084019060608287031215612c48575f80fd5b604051606081018181108382111715612c6357612c636124c4565b604052825181526020830151612c7881612119565b6020820152604083015182811115612c8e575f80fd5b612c9a88828601612bbd565b6040830152509350612cb191505060208401612bff565b90509250929050565b5f82601f830112612cc9575f80fd5b81516020612cd96125ef836125ae565b8083825260208201915060208460051b870101935086841115612cfa575f80fd5b602086015b8481101561263a578051612d1281612119565b8352918301918301612cff565b5f82601f830112612d2e575f80fd5b81516020612d3e6125ef836125ae565b82815260069290921b84018101918181019086841115612d5c575f80fd5b8286015b8481101561263a5760408189031215612d77575f80fd5b612d7f6124d8565b8151815284820151612d9081612119565b81860152835291830191604001612d60565b5f60208284031215612db2575f80fd5b81516001600160401b0380821115612dc8575f80fd5b908301906101008286031215612ddc575f80fd5b612de4612522565b82518152612df460208401612bb2565b602082015260408301516040820152612e0f60608401612bb2565b60608201526080830151608082015260a083015182811115612e2f575f80fd5b612e3b87828601612cba565b60a08301525060c083015182811115612e52575f80fd5b612e5e87828601612d1f565b60c08301525060e083015182811115612e75575f80fd5b612e8187828601612bbd565b60e08301525095945050505050565b5f815180845260208085019450602084015f5b8381101561281d5781516001600160a01b031687529582019590820190600101612ea3565b5f815180845260208085019450602084015f5b8381101561281d57612f01878351805182526020908101516001600160a01b0316910152565b6040969096019590820190600101612edb565b5f6101008251845260018060a01b036020840151166020850152604083015160408501526060830151612f5260608601826001600160a01b03169052565b506080830151608085015260a08301518160a0860152612f7482860182612e90565b91505060c083015184820360c0860152612f8e8282612ec8565b91505060e083015184820360e0860152612fa88282612a87565b95945050505050565b6001600160a01b03831681526040602082018190525f9061122290830184612f14565b5f808335601e19843603018112612fe9575f80fd5b8301803591506001600160401b03821115613002575f80fd5b6020019150368190038213156122ed575f80fd5b8481526001600160a01b03841660208201526060604082018190525f90611f3d90830184866128f4565b818103818111156105fc576105fc612b5d565b5f6001820161306457613064612b5d565b5060010190565b602081525f6108af6020830184612f14565b606081525f612a436060830185612f14565b81516001600160a01b0316815260208083015190820152604081016105fc565b8381526001600160a01b03831660208201526060604082018190525f90612fa890830184612a87565b5f602082840312156130e8575f80fd5b6108af82612bff565b5f8251613102818460208701612a65565b919091019291505056fea264697066735822122095429924b245f7d09ccffa3ccf5f58617c67df2e40dc86e3e1fc11f364c3ef9e64736f6c63430008190033", } // TeleporterMessengerABI is the input ABI used to generate the binding from. diff --git a/abi-bindings/go/teleporter/registry/TeleporterRegistry/TeleporterRegistry.go b/abi-bindings/go/teleporter/registry/TeleporterRegistry/TeleporterRegistry.go index 600eb0a3c..8479f0f60 100644 --- a/abi-bindings/go/teleporter/registry/TeleporterRegistry/TeleporterRegistry.go +++ b/abi-bindings/go/teleporter/registry/TeleporterRegistry/TeleporterRegistry.go @@ -38,7 +38,7 @@ type ProtocolRegistryEntry struct { // TeleporterRegistryMetaData contains all meta data concerning the TeleporterRegistry contract. var TeleporterRegistryMetaData = &bind.MetaData{ ABI: "[{\"inputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"version\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"protocolAddress\",\"type\":\"address\"}],\"internalType\":\"structProtocolRegistryEntry[]\",\"name\":\"initialEntries\",\"type\":\"tuple[]\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"version\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"protocolAddress\",\"type\":\"address\"}],\"name\":\"AddProtocolVersion\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"oldVersion\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"newVersion\",\"type\":\"uint256\"}],\"name\":\"LatestVersionUpdated\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"MAX_VERSION_INCREMENT\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"VALIDATORS_SOURCE_ADDRESS\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"WARP_MESSENGER\",\"outputs\":[{\"internalType\":\"contractIWarpMessenger\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"messageIndex\",\"type\":\"uint32\"}],\"name\":\"addProtocolVersion\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"blockchainID\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"version\",\"type\":\"uint256\"}],\"name\":\"getAddressFromVersion\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getLatestTeleporter\",\"outputs\":[{\"internalType\":\"contractITeleporterMessenger\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"version\",\"type\":\"uint256\"}],\"name\":\"getTeleporterFromVersion\",\"outputs\":[{\"internalType\":\"contractITeleporterMessenger\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"protocolAddress\",\"type\":\"address\"}],\"name\":\"getVersionFromAddress\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"latestVersion\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"}]", - Bin: "0x60a060405234801561000f575f80fd5b50604051610fe0380380610fe083398101604081905261002e916103e2565b7302000000000000000000000000000000000000056001600160a01b0316634213cf786040518163ffffffff1660e01b8152600401602060405180830381865afa15801561007e573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906100a291906104bc565b60805280515f5b818110156100e1576100d98382815181106100c6576100c66104d3565b60200260200101516100e960201b60201c565b6001016100a9565b50505061050c565b80515f0361013e5760405162461bcd60e51b815260206004820181905260248201527f54656c65706f7274657252656769737472793a207a65726f2076657273696f6e60448201526064015b60405180910390fd5b80515f908152600160205260409020546001600160a01b0316156101b75760405162461bcd60e51b815260206004820152602a60248201527f54656c65706f7274657252656769737472793a2076657273696f6e20616c72656044820152696164792065786973747360b01b6064820152608401610135565b60208101516001600160a01b03166102235760405162461bcd60e51b815260206004820152602960248201527f54656c65706f7274657252656769737472793a207a65726f2070726f746f636f6044820152686c206164647265737360b81b6064820152608401610135565b5f546102316101f4826104e7565b825111156102985760405162461bcd60e51b815260206004820152602e60248201527f54656c65706f7274657252656769737472793a2076657273696f6e20696e637260448201526d0cadacadce840e8dede40d0d2ced60931b6064820152608401610135565b6020828101805184515f90815260018452604080822080546001600160a01b0319166001600160a01b03948516179055925190911681526002909252902054825111156102ff5781516020808401516001600160a01b03165f908152600290915260409020555b602082015182516040516001600160a01b03909216917fa5eed93d951a9603d5f7c0a57de79a299dd3dbd5e51429be209d8053a42ab43a905f90a381518110156103725781515f81815560405183917f30623e953733f6474dabdfbef1103ce15ab73cdc77c6dfad0f9874d167e8a9b091a35b5050565b634e487b7160e01b5f52604160045260245ffd5b604080519081016001600160401b03811182821017156103ac576103ac610376565b60405290565b604051601f8201601f191681016001600160401b03811182821017156103da576103da610376565b604052919050565b5f60208083850312156103f3575f80fd5b82516001600160401b0380821115610409575f80fd5b818501915085601f83011261041c575f80fd5b81518181111561042e5761042e610376565b61043c848260051b016103b2565b818152848101925060069190911b83018401908782111561045b575f80fd5b928401925b818410156104b15760408489031215610477575f80fd5b61047f61038a565b84518152858501516001600160a01b038116811461049b575f80fd5b8187015283526040939093019291840191610460565b979650505050505050565b5f602082840312156104cc575f80fd5b5051919050565b634e487b7160e01b5f52603260045260245ffd5b8082018082111561050657634e487b7160e01b5f52601160045260245ffd5b92915050565b608051610ab561052b5f395f818161014301526102580152610ab55ff3fe608060405234801561000f575f80fd5b506004361061009b575f3560e01c8063ac473ac311610063578063ac473ac31461011f578063b771b3bc14610128578063c07f47d414610136578063d127dc9b1461013e578063d820e64f14610165575f80fd5b80630731775d1461009f578063215abce9146100c357806341f34ed9146100d657806346f9ef49146100eb5780634c1f08ce146100fe575b5f80fd5b6100a65f81565b6040516001600160a01b0390911681526020015b60405180910390f35b6100a66100d13660046107aa565b61016d565b6100e96100e43660046107c1565b61017d565b005b6100a66100f93660046107aa565b6103ec565b61011161010c366004610802565b6104ae565b6040519081526020016100ba565b6101116101f481565b6100a66005600160991b0181565b6101115f5481565b6101117f000000000000000000000000000000000000000000000000000000000000000081565b6100a6610554565b5f610177826103ec565b92915050565b6040516306f8253560e41b815263ffffffff821660048201525f9081906005600160991b0190636f825350906024015f60405180830381865afa1580156101c6573d5f803e3d5ffd5b505050506040513d5f823e601f3d908101601f191682016040526101ed919081019061089f565b91509150806102545760405162461bcd60e51b815260206004820152602860248201527f54656c65706f7274657252656769737472793a20696e76616c69642077617270604482015267206d65737361676560c01b60648201526084015b60405180910390fd5b81517f0000000000000000000000000000000000000000000000000000000000000000146102d85760405162461bcd60e51b815260206004820152602b60248201527f54656c65706f7274657252656769737472793a20696e76616c696420736f757260448201526a18d94818da185a5b88125160aa1b606482015260840161024b565b60208201516001600160a01b03161561034d5760405162461bcd60e51b815260206004820152603160248201527f54656c65706f7274657252656769737472793a20696e76616c6964206f726967604482015270696e2073656e646572206164647265737360781b606482015260840161024b565b5f808360400151806020019051810190610367919061099e565b90925090506001600160a01b03811630146103dc5760405162461bcd60e51b815260206004820152602f60248201527f54656c65706f7274657252656769737472793a20696e76616c6964206465737460448201526e696e6174696f6e206164647265737360881b606482015260840161024b565b6103e582610564565b5050505050565b5f815f0361043c5760405162461bcd60e51b815260206004820181905260248201527f54656c65706f7274657252656769737472793a207a65726f2076657273696f6e604482015260640161024b565b5f828152600160205260409020546001600160a01b0316806101775760405162461bcd60e51b815260206004820152602560248201527f54656c65706f7274657252656769737472793a2076657273696f6e206e6f7420604482015264199bdd5b9960da1b606482015260840161024b565b5f6001600160a01b0382166104d55760405162461bcd60e51b815260040161024b90610a17565b6001600160a01b0382165f90815260026020526040812054908190036101775760405162461bcd60e51b815260206004820152602e60248201527f54656c65706f7274657252656769737472793a2070726f746f636f6c2061646460448201526d1c995cdcc81b9bdd08199bdd5b9960921b606482015260840161024b565b5f61055f5f546103ec565b905090565b80515f036105b45760405162461bcd60e51b815260206004820181905260248201527f54656c65706f7274657252656769737472793a207a65726f2076657273696f6e604482015260640161024b565b80515f908152600160205260409020546001600160a01b03161561062d5760405162461bcd60e51b815260206004820152602a60248201527f54656c65706f7274657252656769737472793a2076657273696f6e20616c72656044820152696164792065786973747360b01b606482015260840161024b565b60208101516001600160a01b03166106575760405162461bcd60e51b815260040161024b90610a17565b5f546106656101f482610a60565b825111156106cc5760405162461bcd60e51b815260206004820152602e60248201527f54656c65706f7274657252656769737472793a2076657273696f6e20696e637260448201526d0cadacadce840e8dede40d0d2ced60931b606482015260840161024b565b6020828101805184515f90815260018452604080822080546001600160a01b0319166001600160a01b03948516179055925190911681526002909252902054825111156107335781516020808401516001600160a01b03165f908152600290915260409020555b602082015182516040516001600160a01b03909216917fa5eed93d951a9603d5f7c0a57de79a299dd3dbd5e51429be209d8053a42ab43a905f90a381518110156107a65781515f81815560405183917f30623e953733f6474dabdfbef1103ce15ab73cdc77c6dfad0f9874d167e8a9b091a35b5050565b5f602082840312156107ba575f80fd5b5035919050565b5f602082840312156107d1575f80fd5b813563ffffffff811681146107e4575f80fd5b9392505050565b6001600160a01b03811681146107ff575f80fd5b50565b5f60208284031215610812575f80fd5b81356107e4816107eb565b634e487b7160e01b5f52604160045260245ffd5b6040516060810167ffffffffffffffff811182821017156108545761085461081d565b60405290565b604051601f8201601f1916810167ffffffffffffffff811182821017156108835761088361081d565b604052919050565b8051801515811461089a575f80fd5b919050565b5f80604083850312156108b0575f80fd5b825167ffffffffffffffff808211156108c7575f80fd5b90840190606082870312156108da575f80fd5b6108e2610831565b825181526020808401516108f5816107eb565b8282015260408401518381111561090a575f80fd5b80850194505087601f85011261091e575f80fd5b8351838111156109305761093061081d565b610942601f8201601f1916830161085a565b93508084528882828701011115610957575f80fd5b5f5b81811015610974578581018301518582018401528201610959565b505f8282860101525082604083015281955061099181880161088b565b9450505050509250929050565b5f8082840360608112156109b0575f80fd5b60408112156109bd575f80fd5b506040516040810181811067ffffffffffffffff821117156109e1576109e161081d565b6040528351815260208401516109f6816107eb565b60208201526040840151909250610a0c816107eb565b809150509250929050565b60208082526029908201527f54656c65706f7274657252656769737472793a207a65726f2070726f746f636f6040820152686c206164647265737360b81b606082015260800190565b8082018082111561017757634e487b7160e01b5f52601160045260245ffdfea264697066735822122024f5bd7b9486860d5ec37bfc975cd8b866a1d68a8296b1a76f810972a0bc594864736f6c63430008190033", + Bin: "0x60a060405234801561000f575f80fd5b50604051610fe0380380610fe083398101604081905261002e916103e2565b7302000000000000000000000000000000000000056001600160a01b0316634213cf786040518163ffffffff1660e01b8152600401602060405180830381865afa15801561007e573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906100a291906104bc565b60805280515f5b818110156100e1576100d98382815181106100c6576100c66104d3565b60200260200101516100e960201b60201c565b6001016100a9565b50505061050c565b80515f0361013e5760405162461bcd60e51b815260206004820181905260248201527f54656c65706f7274657252656769737472793a207a65726f2076657273696f6e60448201526064015b60405180910390fd5b80515f908152600160205260409020546001600160a01b0316156101b75760405162461bcd60e51b815260206004820152602a60248201527f54656c65706f7274657252656769737472793a2076657273696f6e20616c72656044820152696164792065786973747360b01b6064820152608401610135565b60208101516001600160a01b03166102235760405162461bcd60e51b815260206004820152602960248201527f54656c65706f7274657252656769737472793a207a65726f2070726f746f636f6044820152686c206164647265737360b81b6064820152608401610135565b5f546102316101f4826104e7565b825111156102985760405162461bcd60e51b815260206004820152602e60248201527f54656c65706f7274657252656769737472793a2076657273696f6e20696e637260448201526d0cadacadce840e8dede40d0d2ced60931b6064820152608401610135565b6020828101805184515f90815260018452604080822080546001600160a01b0319166001600160a01b03948516179055925190911681526002909252902054825111156102ff5781516020808401516001600160a01b03165f908152600290915260409020555b602082015182516040516001600160a01b03909216917fa5eed93d951a9603d5f7c0a57de79a299dd3dbd5e51429be209d8053a42ab43a905f90a381518110156103725781515f81815560405183917f30623e953733f6474dabdfbef1103ce15ab73cdc77c6dfad0f9874d167e8a9b091a35b5050565b634e487b7160e01b5f52604160045260245ffd5b604080519081016001600160401b03811182821017156103ac576103ac610376565b60405290565b604051601f8201601f191681016001600160401b03811182821017156103da576103da610376565b604052919050565b5f60208083850312156103f3575f80fd5b82516001600160401b0380821115610409575f80fd5b818501915085601f83011261041c575f80fd5b81518181111561042e5761042e610376565b61043c848260051b016103b2565b818152848101925060069190911b83018401908782111561045b575f80fd5b928401925b818410156104b15760408489031215610477575f80fd5b61047f61038a565b84518152858501516001600160a01b038116811461049b575f80fd5b8187015283526040939093019291840191610460565b979650505050505050565b5f602082840312156104cc575f80fd5b5051919050565b634e487b7160e01b5f52603260045260245ffd5b8082018082111561050657634e487b7160e01b5f52601160045260245ffd5b92915050565b608051610ab561052b5f395f818161014301526102580152610ab55ff3fe608060405234801561000f575f80fd5b506004361061009b575f3560e01c8063ac473ac311610063578063ac473ac31461011f578063b771b3bc14610128578063c07f47d414610136578063d127dc9b1461013e578063d820e64f14610165575f80fd5b80630731775d1461009f578063215abce9146100c357806341f34ed9146100d657806346f9ef49146100eb5780634c1f08ce146100fe575b5f80fd5b6100a65f81565b6040516001600160a01b0390911681526020015b60405180910390f35b6100a66100d13660046107aa565b61016d565b6100e96100e43660046107c1565b61017d565b005b6100a66100f93660046107aa565b6103ec565b61011161010c366004610802565b6104ae565b6040519081526020016100ba565b6101116101f481565b6100a66005600160991b0181565b6101115f5481565b6101117f000000000000000000000000000000000000000000000000000000000000000081565b6100a6610554565b5f610177826103ec565b92915050565b6040516306f8253560e41b815263ffffffff821660048201525f9081906005600160991b0190636f825350906024015f60405180830381865afa1580156101c6573d5f803e3d5ffd5b505050506040513d5f823e601f3d908101601f191682016040526101ed919081019061089f565b91509150806102545760405162461bcd60e51b815260206004820152602860248201527f54656c65706f7274657252656769737472793a20696e76616c69642077617270604482015267206d65737361676560c01b60648201526084015b60405180910390fd5b81517f0000000000000000000000000000000000000000000000000000000000000000146102d85760405162461bcd60e51b815260206004820152602b60248201527f54656c65706f7274657252656769737472793a20696e76616c696420736f757260448201526a18d94818da185a5b88125160aa1b606482015260840161024b565b60208201516001600160a01b03161561034d5760405162461bcd60e51b815260206004820152603160248201527f54656c65706f7274657252656769737472793a20696e76616c6964206f726967604482015270696e2073656e646572206164647265737360781b606482015260840161024b565b5f808360400151806020019051810190610367919061099e565b90925090506001600160a01b03811630146103dc5760405162461bcd60e51b815260206004820152602f60248201527f54656c65706f7274657252656769737472793a20696e76616c6964206465737460448201526e696e6174696f6e206164647265737360881b606482015260840161024b565b6103e582610564565b5050505050565b5f815f0361043c5760405162461bcd60e51b815260206004820181905260248201527f54656c65706f7274657252656769737472793a207a65726f2076657273696f6e604482015260640161024b565b5f828152600160205260409020546001600160a01b0316806101775760405162461bcd60e51b815260206004820152602560248201527f54656c65706f7274657252656769737472793a2076657273696f6e206e6f7420604482015264199bdd5b9960da1b606482015260840161024b565b5f6001600160a01b0382166104d55760405162461bcd60e51b815260040161024b90610a17565b6001600160a01b0382165f90815260026020526040812054908190036101775760405162461bcd60e51b815260206004820152602e60248201527f54656c65706f7274657252656769737472793a2070726f746f636f6c2061646460448201526d1c995cdcc81b9bdd08199bdd5b9960921b606482015260840161024b565b5f61055f5f546103ec565b905090565b80515f036105b45760405162461bcd60e51b815260206004820181905260248201527f54656c65706f7274657252656769737472793a207a65726f2076657273696f6e604482015260640161024b565b80515f908152600160205260409020546001600160a01b03161561062d5760405162461bcd60e51b815260206004820152602a60248201527f54656c65706f7274657252656769737472793a2076657273696f6e20616c72656044820152696164792065786973747360b01b606482015260840161024b565b60208101516001600160a01b03166106575760405162461bcd60e51b815260040161024b90610a17565b5f546106656101f482610a60565b825111156106cc5760405162461bcd60e51b815260206004820152602e60248201527f54656c65706f7274657252656769737472793a2076657273696f6e20696e637260448201526d0cadacadce840e8dede40d0d2ced60931b606482015260840161024b565b6020828101805184515f90815260018452604080822080546001600160a01b0319166001600160a01b03948516179055925190911681526002909252902054825111156107335781516020808401516001600160a01b03165f908152600290915260409020555b602082015182516040516001600160a01b03909216917fa5eed93d951a9603d5f7c0a57de79a299dd3dbd5e51429be209d8053a42ab43a905f90a381518110156107a65781515f81815560405183917f30623e953733f6474dabdfbef1103ce15ab73cdc77c6dfad0f9874d167e8a9b091a35b5050565b5f602082840312156107ba575f80fd5b5035919050565b5f602082840312156107d1575f80fd5b813563ffffffff811681146107e4575f80fd5b9392505050565b6001600160a01b03811681146107ff575f80fd5b50565b5f60208284031215610812575f80fd5b81356107e4816107eb565b634e487b7160e01b5f52604160045260245ffd5b6040516060810167ffffffffffffffff811182821017156108545761085461081d565b60405290565b604051601f8201601f1916810167ffffffffffffffff811182821017156108835761088361081d565b604052919050565b8051801515811461089a575f80fd5b919050565b5f80604083850312156108b0575f80fd5b825167ffffffffffffffff808211156108c7575f80fd5b90840190606082870312156108da575f80fd5b6108e2610831565b825181526020808401516108f5816107eb565b8282015260408401518381111561090a575f80fd5b80850194505087601f85011261091e575f80fd5b8351838111156109305761093061081d565b610942601f8201601f1916830161085a565b93508084528882828701011115610957575f80fd5b5f5b81811015610974578581018301518582018401528201610959565b505f8282860101525082604083015281955061099181880161088b565b9450505050509250929050565b5f8082840360608112156109b0575f80fd5b60408112156109bd575f80fd5b506040516040810181811067ffffffffffffffff821117156109e1576109e161081d565b6040528351815260208401516109f6816107eb565b60208201526040840151909250610a0c816107eb565b809150509250929050565b60208082526029908201527f54656c65706f7274657252656769737472793a207a65726f2070726f746f636f6040820152686c206164647265737360b81b606082015260800190565b8082018082111561017757634e487b7160e01b5f52601160045260245ffdfea264697066735822122050aeecf8dbacb4df760554b907e6527397de8544826b3d9b7ee803fe3ef11a1b64736f6c63430008190033", } // TeleporterRegistryABI is the input ABI used to generate the binding from. diff --git a/abi-bindings/go/teleporter/tests/TestMessenger/TestMessenger.go b/abi-bindings/go/teleporter/tests/TestMessenger/TestMessenger.go index 3d34deabd..2621c180d 100644 --- a/abi-bindings/go/teleporter/tests/TestMessenger/TestMessenger.go +++ b/abi-bindings/go/teleporter/tests/TestMessenger/TestMessenger.go @@ -32,7 +32,7 @@ var ( // TestMessengerMetaData contains all meta data concerning the TestMessenger contract. var TestMessengerMetaData = &bind.MetaData{ ABI: "[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"teleporterRegistryAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"teleporterManager\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"minTeleporterVersion\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"target\",\"type\":\"address\"}],\"name\":\"AddressEmptyCode\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"AddressInsufficientBalance\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"FailedInnerCall\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidInitialization\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotInitializing\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"OwnableInvalidOwner\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"OwnableUnauthorizedAccount\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ReentrancyGuardReentrantCall\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"SafeERC20FailedOperation\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"version\",\"type\":\"uint64\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"oldMinTeleporterVersion\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"newMinTeleporterVersion\",\"type\":\"uint256\"}],\"name\":\"MinTeleporterVersionUpdated\",\"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\":\"bytes32\",\"name\":\"sourceBlockchainID\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"originSenderAddress\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"message\",\"type\":\"string\"}],\"name\":\"ReceiveMessage\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"destinationBlockchainID\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"destinationAddress\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"feeTokenAddress\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"feeAmount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"requiredGasLimit\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"message\",\"type\":\"string\"}],\"name\":\"SendMessage\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"teleporterAddress\",\"type\":\"address\"}],\"name\":\"TeleporterAddressPaused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"teleporterAddress\",\"type\":\"address\"}],\"name\":\"TeleporterAddressUnpaused\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"TELEPORTER_REGISTRY_APP_STORAGE_LOCATION\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"sourceBlockchainID\",\"type\":\"bytes32\"}],\"name\":\"getCurrentMessage\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getMinTeleporterVersion\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"teleporterAddress\",\"type\":\"address\"}],\"name\":\"isTeleporterAddressPaused\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"teleporterAddress\",\"type\":\"address\"}],\"name\":\"pauseTeleporterAddress\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"sourceBlockchainID\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"originSenderAddress\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"message\",\"type\":\"bytes\"}],\"name\":\"receiveTeleporterMessage\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"destinationBlockchainID\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"destinationAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"feeTokenAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"feeAmount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"requiredGasLimit\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"message\",\"type\":\"string\"}],\"name\":\"sendMessage\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"teleporterAddress\",\"type\":\"address\"}],\"name\":\"unpauseTeleporterAddress\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"version\",\"type\":\"uint256\"}],\"name\":\"updateMinTeleporterVersion\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", - Bin: "0x608060405234801561000f575f80fd5b5060405161201f38038061201f83398101604081905261002e9161062e565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00805468010000000000000000810460ff1615906001600160401b03165f811580156100775750825b90505f826001600160401b031660011480156100925750303b155b9050811580156100a0575080155b156100be5760405163f92ee8a960e01b815260040160405180910390fd5b84546001600160401b031916600117855583156100ec57845460ff60401b1916680100000000000000001785555b6100f4610152565b6100ff888888610164565b831561014557845460ff60401b19168555604051600181527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b505050505050505061067e565b61015a610184565b6101626101d2565b565b61016c610184565b6101768382610200565b61017f82610226565b505050565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a005468010000000000000000900460ff1661016257604051631afcd79f60e31b815260040160405180910390fd5b6101da610184565b60017f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f0055565b610208610184565b610210610152565b61021861023a565b6102228282610242565b5050565b61022e610184565b610237816103d1565b50565b610162610184565b61024a610184565b6001600160a01b0382166102cb5760405162461bcd60e51b815260206004820152603760248201527f54656c65706f7274657252656769737472794170703a207a65726f2054656c6560448201527f706f72746572207265676973747279206164647265737300000000000000000060648201526084015b60405180910390fd5b5f7fde77a4dc7391f6f8f2d9567915d687d3aee79e7a1fc7300392f2727e9a0f1d0090505f8390505f816001600160a01b031663c07f47d46040518163ffffffff1660e01b8152600401602060405180830381865afa158015610330573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906103549190610667565b116103a95760405162461bcd60e51b815260206004820152603260248201525f80516020611fff833981519152604482015271656c65706f7274657220726567697374727960701b60648201526084016102c2565b81546001600160a01b0319166001600160a01b0382161782556103cb8361040b565b50505050565b6103d9610184565b6001600160a01b03811661040257604051631e4fbdf760e01b81525f60048201526024016102c2565b610237816105a3565b7fde77a4dc7391f6f8f2d9567915d687d3aee79e7a1fc7300392f2727e9a0f1d0080546040805163301fd1f560e21b815290515f926001600160a01b03169163c07f47d49160048083019260209291908290030181865afa158015610472573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906104969190610667565b6002830154909150818411156104f55760405162461bcd60e51b815260206004820152603160248201525f80516020611fff83398151915260448201527032b632b837b93a32b9103b32b939b4b7b760791b60648201526084016102c2565b80841161056a5760405162461bcd60e51b815260206004820152603f60248201527f54656c65706f7274657252656769737472794170703a206e6f7420677265617460448201527f6572207468616e2063757272656e74206d696e696d756d2076657273696f6e0060648201526084016102c2565b60028301849055604051849082907fa9a7ef57e41f05b4c15480842f5f0c27edfcbb553fed281f7c4068452cc1c02d905f90a350505050565b7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c19930080546001600160a01b031981166001600160a01b03848116918217845560405192169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0905f90a3505050565b80516001600160a01b0381168114610629575f80fd5b919050565b5f805f60608486031215610640575f80fd5b61064984610613565b925061065760208501610613565b9150604084015190509250925092565b5f60208284031215610677575f80fd5b5051919050565b6119748061068b5f395ff3fe608060405234801561000f575f80fd5b50600436106100b1575f3560e01c8063973142971161006e5780639731429714610159578063b33fead41461017c578063c868efaa1461019d578063d2cc7a70146101b0578063f2fde38b146101d7578063f63d09d7146101ea575f80fd5b80632b0d8f18146100b55780634511243e146100ca5780635eb99514146100dd578063715018a6146100f05780638da5cb5b146100f8578063909a6ac014610137575b5f80fd5b6100c86100c3366004611335565b6101fd565b005b6100c86100d8366004611335565b6102ff565b6100c86100eb366004611350565b6103ee565b6100c8610402565b7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300546040516001600160a01b0390911681526020015b60405180910390f35b61014b5f8051602061191f83398151915281565b60405190815260200161012e565b61016c610167366004611335565b610415565b604051901515815260200161012e565b61018f61018a366004611350565b610435565b60405161012e9291906113b4565b6100c86101ab366004611424565b610507565b7fde77a4dc7391f6f8f2d9567915d687d3aee79e7a1fc7300392f2727e9a0f1d025461014b565b6100c86101e5366004611335565b6106e5565b61014b6101f836600461147c565b61071f565b5f8051602061191f83398151915261021361087b565b6001600160a01b0382166102425760405162461bcd60e51b8152600401610239906114fc565b60405180910390fd5b61024c8183610883565b156102af5760405162461bcd60e51b815260206004820152602d60248201527f54656c65706f7274657252656769737472794170703a2061646472657373206160448201526c1b1c9958591e481c185d5cd959609a1b6064820152608401610239565b6001600160a01b0382165f81815260018381016020526040808320805460ff1916909217909155517f933f93e57a222e6330362af8b376d0a8725b6901e9a2fb86d00f169702b28a4c9190a25050565b5f8051602061191f83398151915261031561087b565b6001600160a01b03821661033b5760405162461bcd60e51b8152600401610239906114fc565b6103458183610883565b6103a35760405162461bcd60e51b815260206004820152602960248201527f54656c65706f7274657252656769737472794170703a2061646472657373206e6044820152681bdd081c185d5cd95960ba1b6064820152608401610239565b6001600160a01b0382165f818152600183016020526040808220805460ff19169055517f844e2f3154214672229235858fd029d1dfd543901c6d05931f0bc2480a2d72c39190a25050565b6103f661087b565b6103ff816108a7565b50565b61040a610a3f565b6104135f610a9a565b565b5f5f8051602061191f83398151915261042e8184610883565b9392505050565b5f81815260208181526040808320815180830190925280546001600160a01b0316825260018101805460609486949392908401916104729061154a565b80601f016020809104026020016040519081016040528092919081815260200182805461049e9061154a565b80156104e95780601f106104c0576101008083540402835291602001916104e9565b820191905f5260205f20905b8154815290600101906020018083116104cc57829003601f168201915b5050505050815250509050805f015181602001519250925050915091565b61050f610b0a565b5f5f8051602061191f83398151915260028101548154919250906001600160a01b0316634c1f08ce336040516001600160e01b031960e084901b1681526001600160a01b039091166004820152602401602060405180830381865afa15801561057a573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061059e9190611582565b10156106055760405162461bcd60e51b815260206004820152603060248201527f54656c65706f7274657252656769737472794170703a20696e76616c6964205460448201526f32b632b837b93a32b91039b2b73232b960811b6064820152608401610239565b61060f8133610883565b156106755760405162461bcd60e51b815260206004820152603060248201527f54656c65706f7274657252656769737472794170703a2054656c65706f72746560448201526f1c881859191c995cdcc81c185d5cd95960821b6064820152608401610239565b6106b5858585858080601f0160208091040260200160405190810160405280939291908181526020018383808284375f92019190915250610b5492505050565b506106df60017f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f0055565b50505050565b6106ed610a3f565b6001600160a01b03811661071657604051631e4fbdf760e01b81525f6004820152602401610239565b6103ff81610a9a565b5f610728610b0a565b5f851561073c576107398787610c09565b90505b876001600160a01b0316897fa06eff1edd0c66b8dc96d086dda7ba263edf88d7417e6cb15073b5e7bff8a8ca898489898960405161077e9594939291906115c1565b60405180910390a36108446040518060c001604052808b81526020018a6001600160a01b0316815260200160405180604001604052808b6001600160a01b031681526020018581525081526020018781526020015f67ffffffffffffffff8111156107eb576107eb6115ee565b604051908082528060200260200182016040528015610814578160200160208202803683370190505b508152602001868660405160200161082d929190611602565b604051602081830303815290604052815250610d6b565b91505061087060017f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f0055565b979650505050505050565b610413610a3f565b6001600160a01b0381165f90815260018301602052604090205460ff165b92915050565b5f8051602061191f83398151915280546040805163301fd1f560e21b815290515f926001600160a01b03169163c07f47d49160048083019260209291908290030181865afa1580156108fb573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061091f9190611582565b6002830154909150818411156109915760405162461bcd60e51b815260206004820152603160248201527f54656c65706f7274657252656769737472794170703a20696e76616c6964205460448201527032b632b837b93a32b9103b32b939b4b7b760791b6064820152608401610239565b808411610a065760405162461bcd60e51b815260206004820152603f60248201527f54656c65706f7274657252656769737472794170703a206e6f7420677265617460448201527f6572207468616e2063757272656e74206d696e696d756d2076657273696f6e006064820152608401610239565b60028301849055604051849082907fa9a7ef57e41f05b4c15480842f5f0c27edfcbb553fed281f7c4068452cc1c02d905f90a350505050565b33610a717f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300546001600160a01b031690565b6001600160a01b0316146104135760405163118cdaa760e01b8152336004820152602401610239565b7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c19930080546001600160a01b031981166001600160a01b03848116918217845560405192169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0905f90a3505050565b7f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f00805460011901610b4e57604051633ee5aeb560e01b815260040160405180910390fd5b60029055565b5f81806020019051810190610b699190611615565b6040805180820182526001600160a01b03868116825260208083018581525f8a815291829052939020825181546001600160a01b03191692169190911781559151929350916001820190610bbd90826116fd565b50905050826001600160a01b0316847f1f5c800b5f2b573929a7948f82a199c2a212851b53a6c5bd703ece23999d24aa83604051610bfb91906117bd565b60405180910390a350505050565b6040516370a0823160e01b81523060048201525f9081906001600160a01b038516906370a0823190602401602060405180830381865afa158015610c4f573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610c739190611582565b9050610c8a6001600160a01b038516333086610e86565b6040516370a0823160e01b81523060048201525f906001600160a01b038616906370a0823190602401602060405180830381865afa158015610cce573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610cf29190611582565b9050818111610d585760405162461bcd60e51b815260206004820152602c60248201527f5361666545524332305472616e7366657246726f6d3a2062616c616e6365206e60448201526b1bdd081a5b98dc99585cd95960a21b6064820152608401610239565b610d6282826117e3565b95945050505050565b5f80610d75610eed565b60408401516020015190915015610e1a576040830151516001600160a01b0316610df75760405162461bcd60e51b815260206004820152602d60248201527f54656c65706f7274657252656769737472794170703a207a65726f206665652060448201526c746f6b656e206164647265737360981b6064820152608401610239565b604083015160208101519051610e1a916001600160a01b03909116908390610fdd565b604051630624488560e41b81526001600160a01b03821690636244885090610e46908690600401611839565b6020604051808303815f875af1158015610e62573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061042e9190611582565b6040516001600160a01b0384811660248301528381166044830152606482018390526106df9186918216906323b872dd906084015b604051602081830303815290604052915060e01b6020820180516001600160e01b038381831617835250505050611064565b5f8051602061191f83398151915280546040805163d820e64f60e01b815290515f939284926001600160a01b039091169163d820e64f916004808201926020929091908290030181865afa158015610f47573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610f6b91906118b6565b9050610f778282610883565b156108a15760405162461bcd60e51b815260206004820152603060248201527f54656c65706f7274657252656769737472794170703a2054656c65706f72746560448201526f1c881cd95b991a5b99c81c185d5cd95960821b6064820152608401610239565b604051636eb1769f60e11b81523060048201526001600160a01b0383811660248301525f919085169063dd62ed3e90604401602060405180830381865afa15801561102a573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061104e9190611582565b90506106df848461105f85856118d1565b6110ca565b5f6110786001600160a01b03841683611159565b905080515f1415801561109c57508080602001905181019061109a91906118e4565b155b156110c557604051635274afe760e01b81526001600160a01b0384166004820152602401610239565b505050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663095ea7b360e01b17905261111b8482611166565b6106df576040516001600160a01b0384811660248301525f604483015261114f91869182169063095ea7b390606401610ebb565b6106df8482611064565b606061042e83835f611203565b5f805f846001600160a01b0316846040516111819190611903565b5f604051808303815f865af19150503d805f81146111ba576040519150601f19603f3d011682016040523d82523d5f602084013e6111bf565b606091505b50915091508180156111e95750805115806111e95750808060200190518101906111e991906118e4565b8015610d625750505050506001600160a01b03163b151590565b6060814710156112285760405163cd78605960e01b8152306004820152602401610239565b5f80856001600160a01b031684866040516112439190611903565b5f6040518083038185875af1925050503d805f811461127d576040519150601f19603f3d011682016040523d82523d5f602084013e611282565b606091505b509150915061129286838361129c565b9695505050505050565b6060826112b1576112ac826112f8565b61042e565b81511580156112c857506001600160a01b0384163b155b156112f157604051639996b31560e01b81526001600160a01b0385166004820152602401610239565b508061042e565b8051156113085780518082602001fd5b604051630a12f52160e11b815260040160405180910390fd5b6001600160a01b03811681146103ff575f80fd5b5f60208284031215611345575f80fd5b813561042e81611321565b5f60208284031215611360575f80fd5b5035919050565b5f5b83811015611381578181015183820152602001611369565b50505f910152565b5f81518084526113a0816020860160208601611367565b601f01601f19169290920160200192915050565b6001600160a01b03831681526040602082018190525f906113d790830184611389565b949350505050565b5f8083601f8401126113ef575f80fd5b50813567ffffffffffffffff811115611406575f80fd5b60208301915083602082850101111561141d575f80fd5b9250929050565b5f805f8060608587031215611437575f80fd5b84359350602085013561144981611321565b9250604085013567ffffffffffffffff811115611464575f80fd5b611470878288016113df565b95989497509550505050565b5f805f805f805f60c0888a031215611492575f80fd5b8735965060208801356114a481611321565b955060408801356114b481611321565b9450606088013593506080880135925060a088013567ffffffffffffffff8111156114dd575f80fd5b6114e98a828b016113df565b989b979a50959850939692959293505050565b6020808252602e908201527f54656c65706f7274657252656769737472794170703a207a65726f2054656c6560408201526d706f72746572206164647265737360901b606082015260800190565b600181811c9082168061155e57607f821691505b60208210810361157c57634e487b7160e01b5f52602260045260245ffd5b50919050565b5f60208284031215611592575f80fd5b5051919050565b81835281816020850137505f828201602090810191909152601f909101601f19169091010190565b60018060a01b0386168152846020820152836040820152608060608201525f610870608083018486611599565b634e487b7160e01b5f52604160045260245ffd5b602081525f6113d7602083018486611599565b5f60208284031215611625575f80fd5b815167ffffffffffffffff8082111561163c575f80fd5b818401915084601f83011261164f575f80fd5b815181811115611661576116616115ee565b604051601f8201601f19908116603f01168101908382118183101715611689576116896115ee565b816040528281528760208487010111156116a1575f80fd5b610870836020830160208801611367565b601f8211156110c557805f5260205f20601f840160051c810160208510156116d75750805b601f840160051c820191505b818110156116f6575f81556001016116e3565b5050505050565b815167ffffffffffffffff811115611717576117176115ee565b61172b81611725845461154a565b846116b2565b602080601f83116001811461175e575f84156117475750858301515b5f19600386901b1c1916600185901b1785556117b5565b5f85815260208120601f198616915b8281101561178c5788860151825594840194600190910190840161176d565b50858210156117a957878501515f19600388901b60f8161c191681555b505060018460011b0185555b505050505050565b602081525f61042e6020830184611389565b634e487b7160e01b5f52601160045260245ffd5b818103818111156108a1576108a16117cf565b5f815180845260208085019450602084015f5b8381101561182e5781516001600160a01b031687529582019590820190600101611809565b509495945050505050565b60208152815160208201525f602083015160018060a01b03808216604085015260408501519150808251166060850152506020810151608084015250606083015160a0830152608083015160e060c08401526118996101008401826117f6565b905060a0840151601f198483030160e0850152610d628282611389565b5f602082840312156118c6575f80fd5b815161042e81611321565b808201808211156108a1576108a16117cf565b5f602082840312156118f4575f80fd5b8151801515811461042e575f80fd5b5f8251611914818460208701611367565b919091019291505056fede77a4dc7391f6f8f2d9567915d687d3aee79e7a1fc7300392f2727e9a0f1d00a264697066735822122062c7fe56aa0838e3bd8ac3be0c2f4d605d6e43ecab438ff676691d4dd089ae3c64736f6c6343000819003354656c65706f7274657252656769737472794170703a20696e76616c69642054", + Bin: "0x608060405234801561000f575f80fd5b50604051611ff4380380611ff483398101604081905261002e9161062e565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00805468010000000000000000810460ff1615906001600160401b03165f811580156100775750825b90505f826001600160401b031660011480156100925750303b155b9050811580156100a0575080155b156100be5760405163f92ee8a960e01b815260040160405180910390fd5b84546001600160401b031916600117855583156100ec57845460ff60401b1916680100000000000000001785555b6100f4610152565b6100ff888888610164565b831561014557845460ff60401b19168555604051600181527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b505050505050505061067e565b61015a610184565b6101626101d2565b565b61016c610184565b6101768382610200565b61017f82610226565b505050565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a005468010000000000000000900460ff1661016257604051631afcd79f60e31b815260040160405180910390fd5b6101da610184565b60017f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f0055565b610208610184565b610210610152565b61021861023a565b6102228282610242565b5050565b61022e610184565b610237816103d1565b50565b610162610184565b61024a610184565b6001600160a01b0382166102cb5760405162461bcd60e51b815260206004820152603760248201527f54656c65706f7274657252656769737472794170703a207a65726f2054656c6560448201527f706f72746572207265676973747279206164647265737300000000000000000060648201526084015b60405180910390fd5b5f7fde77a4dc7391f6f8f2d9567915d687d3aee79e7a1fc7300392f2727e9a0f1d0090505f8390505f816001600160a01b031663c07f47d46040518163ffffffff1660e01b8152600401602060405180830381865afa158015610330573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906103549190610667565b116103a95760405162461bcd60e51b815260206004820152603260248201525f80516020611fd4833981519152604482015271656c65706f7274657220726567697374727960701b60648201526084016102c2565b81546001600160a01b0319166001600160a01b0382161782556103cb8361040b565b50505050565b6103d9610184565b6001600160a01b03811661040257604051631e4fbdf760e01b81525f60048201526024016102c2565b610237816105a3565b7fde77a4dc7391f6f8f2d9567915d687d3aee79e7a1fc7300392f2727e9a0f1d0080546040805163301fd1f560e21b815290515f926001600160a01b03169163c07f47d49160048083019260209291908290030181865afa158015610472573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906104969190610667565b6002830154909150818411156104f55760405162461bcd60e51b815260206004820152603160248201525f80516020611fd483398151915260448201527032b632b837b93a32b9103b32b939b4b7b760791b60648201526084016102c2565b80841161056a5760405162461bcd60e51b815260206004820152603f60248201527f54656c65706f7274657252656769737472794170703a206e6f7420677265617460448201527f6572207468616e2063757272656e74206d696e696d756d2076657273696f6e0060648201526084016102c2565b60028301849055604051849082907fa9a7ef57e41f05b4c15480842f5f0c27edfcbb553fed281f7c4068452cc1c02d905f90a350505050565b7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c19930080546001600160a01b031981166001600160a01b03848116918217845560405192169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0905f90a3505050565b80516001600160a01b0381168114610629575f80fd5b919050565b5f805f60608486031215610640575f80fd5b61064984610613565b925061065760208501610613565b9150604084015190509250925092565b5f60208284031215610677575f80fd5b5051919050565b6119498061068b5f395ff3fe608060405234801561000f575f80fd5b50600436106100b1575f3560e01c8063973142971161006e5780639731429714610159578063b33fead41461017c578063c868efaa1461019d578063d2cc7a70146101b0578063f2fde38b146101d7578063f63d09d7146101ea575f80fd5b80632b0d8f18146100b55780634511243e146100ca5780635eb99514146100dd578063715018a6146100f05780638da5cb5b146100f8578063909a6ac014610137575b5f80fd5b6100c86100c336600461130a565b6101fd565b005b6100c86100d836600461130a565b6102ff565b6100c86100eb366004611325565b6103ee565b6100c8610402565b7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300546040516001600160a01b0390911681526020015b60405180910390f35b61014b5f805160206118f483398151915281565b60405190815260200161012e565b61016c61016736600461130a565b610415565b604051901515815260200161012e565b61018f61018a366004611325565b610435565b60405161012e929190611389565b6100c86101ab3660046113f9565b610507565b7fde77a4dc7391f6f8f2d9567915d687d3aee79e7a1fc7300392f2727e9a0f1d025461014b565b6100c86101e536600461130a565b6106e5565b61014b6101f8366004611451565b61071f565b5f805160206118f483398151915261021361087b565b6001600160a01b0382166102425760405162461bcd60e51b8152600401610239906114d1565b60405180910390fd5b61024c8183610883565b156102af5760405162461bcd60e51b815260206004820152602d60248201527f54656c65706f7274657252656769737472794170703a2061646472657373206160448201526c1b1c9958591e481c185d5cd959609a1b6064820152608401610239565b6001600160a01b0382165f81815260018381016020526040808320805460ff1916909217909155517f933f93e57a222e6330362af8b376d0a8725b6901e9a2fb86d00f169702b28a4c9190a25050565b5f805160206118f483398151915261031561087b565b6001600160a01b03821661033b5760405162461bcd60e51b8152600401610239906114d1565b6103458183610883565b6103a35760405162461bcd60e51b815260206004820152602960248201527f54656c65706f7274657252656769737472794170703a2061646472657373206e6044820152681bdd081c185d5cd95960ba1b6064820152608401610239565b6001600160a01b0382165f818152600183016020526040808220805460ff19169055517f844e2f3154214672229235858fd029d1dfd543901c6d05931f0bc2480a2d72c39190a25050565b6103f661087b565b6103ff816108a7565b50565b61040a610a3f565b6104135f610a9a565b565b5f5f805160206118f483398151915261042e8184610883565b9392505050565b5f81815260208181526040808320815180830190925280546001600160a01b0316825260018101805460609486949392908401916104729061151f565b80601f016020809104026020016040519081016040528092919081815260200182805461049e9061151f565b80156104e95780601f106104c0576101008083540402835291602001916104e9565b820191905f5260205f20905b8154815290600101906020018083116104cc57829003601f168201915b5050505050815250509050805f015181602001519250925050915091565b61050f610b0a565b5f5f805160206118f483398151915260028101548154919250906001600160a01b0316634c1f08ce336040516001600160e01b031960e084901b1681526001600160a01b039091166004820152602401602060405180830381865afa15801561057a573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061059e9190611557565b10156106055760405162461bcd60e51b815260206004820152603060248201527f54656c65706f7274657252656769737472794170703a20696e76616c6964205460448201526f32b632b837b93a32b91039b2b73232b960811b6064820152608401610239565b61060f8133610883565b156106755760405162461bcd60e51b815260206004820152603060248201527f54656c65706f7274657252656769737472794170703a2054656c65706f72746560448201526f1c881859191c995cdcc81c185d5cd95960821b6064820152608401610239565b6106b5858585858080601f0160208091040260200160405190810160405280939291908181526020018383808284375f92019190915250610b5492505050565b506106df60017f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f0055565b50505050565b6106ed610a3f565b6001600160a01b03811661071657604051631e4fbdf760e01b81525f6004820152602401610239565b6103ff81610a9a565b5f610728610b0a565b5f851561073c576107398787610c09565b90505b876001600160a01b0316897fa06eff1edd0c66b8dc96d086dda7ba263edf88d7417e6cb15073b5e7bff8a8ca898489898960405161077e959493929190611596565b60405180910390a36108446040518060c001604052808b81526020018a6001600160a01b0316815260200160405180604001604052808b6001600160a01b031681526020018581525081526020018781526020015f67ffffffffffffffff8111156107eb576107eb6115c3565b604051908082528060200260200182016040528015610814578160200160208202803683370190505b508152602001868660405160200161082d9291906115d7565b604051602081830303815290604052815250610c15565b91505061087060017f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f0055565b979650505050505050565b610413610a3f565b6001600160a01b0381165f90815260018301602052604090205460ff165b92915050565b5f805160206118f483398151915280546040805163301fd1f560e21b815290515f926001600160a01b03169163c07f47d49160048083019260209291908290030181865afa1580156108fb573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061091f9190611557565b6002830154909150818411156109915760405162461bcd60e51b815260206004820152603160248201527f54656c65706f7274657252656769737472794170703a20696e76616c6964205460448201527032b632b837b93a32b9103b32b939b4b7b760791b6064820152608401610239565b808411610a065760405162461bcd60e51b815260206004820152603f60248201527f54656c65706f7274657252656769737472794170703a206e6f7420677265617460448201527f6572207468616e2063757272656e74206d696e696d756d2076657273696f6e006064820152608401610239565b60028301849055604051849082907fa9a7ef57e41f05b4c15480842f5f0c27edfcbb553fed281f7c4068452cc1c02d905f90a350505050565b33610a717f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300546001600160a01b031690565b6001600160a01b0316146104135760405163118cdaa760e01b8152336004820152602401610239565b7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c19930080546001600160a01b031981166001600160a01b03848116918217845560405192169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0905f90a3505050565b7f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f00805460011901610b4e57604051633ee5aeb560e01b815260040160405180910390fd5b60029055565b5f81806020019051810190610b6991906115ea565b6040805180820182526001600160a01b03868116825260208083018581525f8a815291829052939020825181546001600160a01b03191692169190911781559151929350916001820190610bbd90826116d2565b50905050826001600160a01b0316847f1f5c800b5f2b573929a7948f82a199c2a212851b53a6c5bd703ece23999d24aa83604051610bfb9190611792565b60405180910390a350505050565b5f61042e833384610d30565b5f80610c1f610e93565b60408401516020015190915015610cc4576040830151516001600160a01b0316610ca15760405162461bcd60e51b815260206004820152602d60248201527f54656c65706f7274657252656769737472794170703a207a65726f206665652060448201526c746f6b656e206164647265737360981b6064820152608401610239565b604083015160208101519051610cc4916001600160a01b03909116908390610f83565b604051630624488560e41b81526001600160a01b03821690636244885090610cf09086906004016117e7565b6020604051808303815f875af1158015610d0c573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061042e9190611557565b6040516370a0823160e01b81523060048201525f9081906001600160a01b038616906370a0823190602401602060405180830381865afa158015610d76573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610d9a9190611557565b9050610db16001600160a01b03861685308661100a565b6040516370a0823160e01b81523060048201525f906001600160a01b038716906370a0823190602401602060405180830381865afa158015610df5573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610e199190611557565b9050818111610e7f5760405162461bcd60e51b815260206004820152602c60248201527f5361666545524332305472616e7366657246726f6d3a2062616c616e6365206e60448201526b1bdd081a5b98dc99585cd95960a21b6064820152608401610239565b610e898282611878565b9695505050505050565b5f805160206118f483398151915280546040805163d820e64f60e01b815290515f939284926001600160a01b039091169163d820e64f916004808201926020929091908290030181865afa158015610eed573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610f11919061188b565b9050610f1d8282610883565b156108a15760405162461bcd60e51b815260206004820152603060248201527f54656c65706f7274657252656769737472794170703a2054656c65706f72746560448201526f1c881cd95b991a5b99c81c185d5cd95960821b6064820152608401610239565b604051636eb1769f60e11b81523060048201526001600160a01b0383811660248301525f919085169063dd62ed3e90604401602060405180830381865afa158015610fd0573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610ff49190611557565b90506106df848461100585856118a6565b611071565b6040516001600160a01b0384811660248301528381166044830152606482018390526106df9186918216906323b872dd906084015b604051602081830303815290604052915060e01b6020820180516001600160e01b0383818316178352505050506110fc565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663095ea7b360e01b1790526110c28482611162565b6106df576040516001600160a01b0384811660248301525f60448301526110f691869182169063095ea7b39060640161103f565b6106df84825b5f6111106001600160a01b03841683611203565b905080515f1415801561113457508080602001905181019061113291906118b9565b155b1561115d57604051635274afe760e01b81526001600160a01b0384166004820152602401610239565b505050565b5f805f846001600160a01b03168460405161117d91906118d8565b5f604051808303815f865af19150503d805f81146111b6576040519150601f19603f3d011682016040523d82523d5f602084013e6111bb565b606091505b50915091508180156111e55750805115806111e55750808060200190518101906111e591906118b9565b80156111fa57505f856001600160a01b03163b115b95945050505050565b606061042e83835f845f80856001600160a01b0316848660405161122791906118d8565b5f6040518083038185875af1925050503d805f8114611261576040519150601f19603f3d011682016040523d82523d5f602084013e611266565b606091505b5091509150610e8986838360608261128657611281826112cd565b61042e565b815115801561129d57506001600160a01b0384163b155b156112c657604051639996b31560e01b81526001600160a01b0385166004820152602401610239565b508061042e565b8051156112dd5780518082602001fd5b604051630a12f52160e11b815260040160405180910390fd5b6001600160a01b03811681146103ff575f80fd5b5f6020828403121561131a575f80fd5b813561042e816112f6565b5f60208284031215611335575f80fd5b5035919050565b5f5b8381101561135657818101518382015260200161133e565b50505f910152565b5f815180845261137581602086016020860161133c565b601f01601f19169290920160200192915050565b6001600160a01b03831681526040602082018190525f906113ac9083018461135e565b949350505050565b5f8083601f8401126113c4575f80fd5b50813567ffffffffffffffff8111156113db575f80fd5b6020830191508360208285010111156113f2575f80fd5b9250929050565b5f805f806060858703121561140c575f80fd5b84359350602085013561141e816112f6565b9250604085013567ffffffffffffffff811115611439575f80fd5b611445878288016113b4565b95989497509550505050565b5f805f805f805f60c0888a031215611467575f80fd5b873596506020880135611479816112f6565b95506040880135611489816112f6565b9450606088013593506080880135925060a088013567ffffffffffffffff8111156114b2575f80fd5b6114be8a828b016113b4565b989b979a50959850939692959293505050565b6020808252602e908201527f54656c65706f7274657252656769737472794170703a207a65726f2054656c6560408201526d706f72746572206164647265737360901b606082015260800190565b600181811c9082168061153357607f821691505b60208210810361155157634e487b7160e01b5f52602260045260245ffd5b50919050565b5f60208284031215611567575f80fd5b5051919050565b81835281816020850137505f828201602090810191909152601f909101601f19169091010190565b60018060a01b0386168152846020820152836040820152608060608201525f61087060808301848661156e565b634e487b7160e01b5f52604160045260245ffd5b602081525f6113ac60208301848661156e565b5f602082840312156115fa575f80fd5b815167ffffffffffffffff80821115611611575f80fd5b818401915084601f830112611624575f80fd5b815181811115611636576116366115c3565b604051601f8201601f19908116603f0116810190838211818310171561165e5761165e6115c3565b81604052828152876020848701011115611676575f80fd5b61087083602083016020880161133c565b601f82111561115d57805f5260205f20601f840160051c810160208510156116ac5750805b601f840160051c820191505b818110156116cb575f81556001016116b8565b5050505050565b815167ffffffffffffffff8111156116ec576116ec6115c3565b611700816116fa845461151f565b84611687565b602080601f831160018114611733575f841561171c5750858301515b5f19600386901b1c1916600185901b17855561178a565b5f85815260208120601f198616915b8281101561176157888601518255948401946001909101908401611742565b508582101561177e57878501515f19600388901b60f8161c191681555b505060018460011b0185555b505050505050565b602081525f61042e602083018461135e565b5f815180845260208085019450602084015f5b838110156117dc5781516001600160a01b0316875295820195908201906001016117b7565b509495945050505050565b60208152815160208201525f602083015160018060a01b03808216604085015260408501519150808251166060850152506020810151608084015250606083015160a0830152608083015160e060c08401526118476101008401826117a4565b905060a0840151601f198483030160e08501526111fa828261135e565b634e487b7160e01b5f52601160045260245ffd5b818103818111156108a1576108a1611864565b5f6020828403121561189b575f80fd5b815161042e816112f6565b808201808211156108a1576108a1611864565b5f602082840312156118c9575f80fd5b8151801515811461042e575f80fd5b5f82516118e981846020870161133c565b919091019291505056fede77a4dc7391f6f8f2d9567915d687d3aee79e7a1fc7300392f2727e9a0f1d00a2646970667358221220060b7f0a4b3fb4975af33a74e6ba8e469ed81d82250ae21218bcf5d835332b6564736f6c6343000819003354656c65706f7274657252656769737472794170703a20696e76616c69642054", } // TestMessengerABI is the input ABI used to generate the binding from. diff --git a/abi-bindings/go/validator-manager/ERC20TokenStakingManager/ERC20TokenStakingManager.go b/abi-bindings/go/validator-manager/ERC20TokenStakingManager/ERC20TokenStakingManager.go index 6fa5fc0e0..1ae25abfe 100644 --- a/abi-bindings/go/validator-manager/ERC20TokenStakingManager/ERC20TokenStakingManager.go +++ b/abi-bindings/go/validator-manager/ERC20TokenStakingManager/ERC20TokenStakingManager.go @@ -104,7 +104,7 @@ type ValidatorRegistrationInput struct { // ERC20TokenStakingManagerMetaData contains all meta data concerning the ERC20TokenStakingManager contract. var ERC20TokenStakingManagerMetaData = &bind.MetaData{ ABI: "[{\"inputs\":[{\"internalType\":\"enumICMInitializable\",\"name\":\"init\",\"type\":\"uint8\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"target\",\"type\":\"address\"}],\"name\":\"AddressEmptyCode\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"AddressInsufficientBalance\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"delegationID\",\"type\":\"bytes32\"}],\"name\":\"DelegatorIneligibleForRewards\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"FailedInnerCall\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"length\",\"type\":\"uint256\"}],\"name\":\"InvalidBLSKeyLength\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"encodedConversionID\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"expectedConversionID\",\"type\":\"bytes32\"}],\"name\":\"InvalidConversionID\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"delegationFeeBips\",\"type\":\"uint16\"}],\"name\":\"InvalidDelegationFee\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"delegationID\",\"type\":\"bytes32\"}],\"name\":\"InvalidDelegationID\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"enumDelegatorStatus\",\"name\":\"status\",\"type\":\"uint8\"}],\"name\":\"InvalidDelegatorStatus\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidInitialization\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidInitializationStatus\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint8\",\"name\":\"maximumChurnPercentage\",\"type\":\"uint8\"}],\"name\":\"InvalidMaximumChurnPercentage\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"minStakeDuration\",\"type\":\"uint64\"}],\"name\":\"InvalidMinStakeDuration\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"nodeID\",\"type\":\"bytes\"}],\"name\":\"InvalidNodeID\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"nonce\",\"type\":\"uint64\"}],\"name\":\"InvalidNonce\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"threshold\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"addressesLength\",\"type\":\"uint256\"}],\"name\":\"InvalidPChainOwnerThreshold\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"registrationExpiry\",\"type\":\"uint64\"}],\"name\":\"InvalidRegistrationExpiry\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"stakeAmount\",\"type\":\"uint256\"}],\"name\":\"InvalidStakeAmount\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint8\",\"name\":\"maximumStakeMultiplier\",\"type\":\"uint8\"}],\"name\":\"InvalidStakeMultiplier\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"tokenAddress\",\"type\":\"address\"}],\"name\":\"InvalidTokenAddress\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"weight\",\"type\":\"uint256\"}],\"name\":\"InvalidTotalWeight\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"uptimeBlockchainID\",\"type\":\"bytes32\"}],\"name\":\"InvalidUptimeBlockchainID\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"validationID\",\"type\":\"bytes32\"}],\"name\":\"InvalidValidationID\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"validatorManagerAddress\",\"type\":\"address\"}],\"name\":\"InvalidValidatorManagerAddress\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"blockchainID\",\"type\":\"bytes32\"}],\"name\":\"InvalidValidatorManagerBlockchainID\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"enumValidatorStatus\",\"name\":\"status\",\"type\":\"uint8\"}],\"name\":\"InvalidValidatorStatus\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidWarpMessage\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"senderAddress\",\"type\":\"address\"}],\"name\":\"InvalidWarpOriginSenderAddress\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"sourceChainID\",\"type\":\"bytes32\"}],\"name\":\"InvalidWarpSourceChainID\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"churnAmount\",\"type\":\"uint64\"}],\"name\":\"MaxChurnRateExceeded\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"newValidatorWeight\",\"type\":\"uint64\"}],\"name\":\"MaxWeightExceeded\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"endTime\",\"type\":\"uint64\"}],\"name\":\"MinStakeDurationNotPassed\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"nodeID\",\"type\":\"bytes\"}],\"name\":\"NodeAlreadyRegistered\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotInitializing\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"PChainOwnerAddressesNotSorted\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ReentrancyGuardReentrantCall\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"SafeERC20FailedOperation\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"UnauthorizedOwner\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bool\",\"name\":\"validRegistration\",\"type\":\"bool\"}],\"name\":\"UnexpectedRegistrationStatus\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"validationID\",\"type\":\"bytes32\"}],\"name\":\"ValidatorIneligibleForRewards\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"validationID\",\"type\":\"bytes32\"}],\"name\":\"ValidatorNotPoS\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ZeroWeightToValueFactor\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"delegationID\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"validationID\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"rewards\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"fees\",\"type\":\"uint256\"}],\"name\":\"DelegationEnded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"delegationID\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"validationID\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"delegatorAddress\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"nonce\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"validatorWeight\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"delegatorWeight\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"setWeightMessageID\",\"type\":\"bytes32\"}],\"name\":\"DelegatorAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"delegationID\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"validationID\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"startTime\",\"type\":\"uint256\"}],\"name\":\"DelegatorRegistered\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"delegationID\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"validationID\",\"type\":\"bytes32\"}],\"name\":\"DelegatorRemovalInitialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"validationID\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes\",\"name\":\"nodeID\",\"type\":\"bytes\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"weight\",\"type\":\"uint256\"}],\"name\":\"InitialValidatorCreated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"version\",\"type\":\"uint64\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"validationID\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"uptime\",\"type\":\"uint64\"}],\"name\":\"UptimeUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"validationID\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes\",\"name\":\"nodeID\",\"type\":\"bytes\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"registerValidationMessageID\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"weight\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"registrationExpiry\",\"type\":\"uint64\"}],\"name\":\"ValidationPeriodCreated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"validationID\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"enumValidatorStatus\",\"name\":\"status\",\"type\":\"uint8\"}],\"name\":\"ValidationPeriodEnded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"validationID\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"weight\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"}],\"name\":\"ValidationPeriodRegistered\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"validationID\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"setWeightMessageID\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"weight\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"endTime\",\"type\":\"uint256\"}],\"name\":\"ValidatorRemovalInitialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"validationID\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"uint64\",\"name\":\"nonce\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"validatorWeight\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"setWeightMessageID\",\"type\":\"bytes32\"}],\"name\":\"ValidatorWeightUpdate\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"ADDRESS_LENGTH\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"BIPS_CONVERSION_FACTOR\",\"outputs\":[{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"BLS_PUBLIC_KEY_LENGTH\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"ERC20_STAKING_MANAGER_STORAGE_LOCATION\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"MAXIMUM_CHURN_PERCENTAGE_LIMIT\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"MAXIMUM_DELEGATION_FEE_BIPS\",\"outputs\":[{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"MAXIMUM_REGISTRATION_EXPIRY_LENGTH\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"MAXIMUM_STAKE_MULTIPLIER_LIMIT\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"POS_VALIDATOR_MANAGER_STORAGE_LOCATION\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"P_CHAIN_BLOCKCHAIN_ID\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"VALIDATOR_MANAGER_STORAGE_LOCATION\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"WARP_MESSENGER\",\"outputs\":[{\"internalType\":\"contractIWarpMessenger\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"validationID\",\"type\":\"bytes32\"}],\"name\":\"claimDelegationFees\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"delegationID\",\"type\":\"bytes32\"},{\"internalType\":\"uint32\",\"name\":\"messageIndex\",\"type\":\"uint32\"}],\"name\":\"completeDelegatorRegistration\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"delegationID\",\"type\":\"bytes32\"},{\"internalType\":\"uint32\",\"name\":\"messageIndex\",\"type\":\"uint32\"}],\"name\":\"completeEndDelegation\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"messageIndex\",\"type\":\"uint32\"}],\"name\":\"completeEndValidation\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"messageIndex\",\"type\":\"uint32\"}],\"name\":\"completeValidatorRegistration\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"delegationID\",\"type\":\"bytes32\"},{\"internalType\":\"bool\",\"name\":\"includeUptimeProof\",\"type\":\"bool\"},{\"internalType\":\"uint32\",\"name\":\"messageIndex\",\"type\":\"uint32\"}],\"name\":\"forceInitializeEndDelegation\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"validationID\",\"type\":\"bytes32\"},{\"internalType\":\"bool\",\"name\":\"includeUptimeProof\",\"type\":\"bool\"},{\"internalType\":\"uint32\",\"name\":\"messageIndex\",\"type\":\"uint32\"}],\"name\":\"forceInitializeEndValidation\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"validationID\",\"type\":\"bytes32\"}],\"name\":\"getValidator\",\"outputs\":[{\"components\":[{\"internalType\":\"enumValidatorStatus\",\"name\":\"status\",\"type\":\"uint8\"},{\"internalType\":\"bytes\",\"name\":\"nodeID\",\"type\":\"bytes\"},{\"internalType\":\"uint64\",\"name\":\"startingWeight\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"messageNonce\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"weight\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"startedAt\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"endedAt\",\"type\":\"uint64\"}],\"internalType\":\"structValidator\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"validationID\",\"type\":\"bytes32\"}],\"name\":\"getWeight\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"subnetID\",\"type\":\"bytes32\"},{\"internalType\":\"uint64\",\"name\":\"churnPeriodSeconds\",\"type\":\"uint64\"},{\"internalType\":\"uint8\",\"name\":\"maximumChurnPercentage\",\"type\":\"uint8\"}],\"internalType\":\"structValidatorManagerSettings\",\"name\":\"baseSettings\",\"type\":\"tuple\"},{\"internalType\":\"uint256\",\"name\":\"minimumStakeAmount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"maximumStakeAmount\",\"type\":\"uint256\"},{\"internalType\":\"uint64\",\"name\":\"minimumStakeDuration\",\"type\":\"uint64\"},{\"internalType\":\"uint16\",\"name\":\"minimumDelegationFeeBips\",\"type\":\"uint16\"},{\"internalType\":\"uint8\",\"name\":\"maximumStakeMultiplier\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"weightToValueFactor\",\"type\":\"uint256\"},{\"internalType\":\"contractIRewardCalculator\",\"name\":\"rewardCalculator\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"uptimeBlockchainID\",\"type\":\"bytes32\"}],\"internalType\":\"structPoSValidatorManagerSettings\",\"name\":\"settings\",\"type\":\"tuple\"},{\"internalType\":\"contractIERC20Mintable\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"validationID\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"delegationAmount\",\"type\":\"uint256\"}],\"name\":\"initializeDelegatorRegistration\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"delegationID\",\"type\":\"bytes32\"},{\"internalType\":\"bool\",\"name\":\"includeUptimeProof\",\"type\":\"bool\"},{\"internalType\":\"uint32\",\"name\":\"messageIndex\",\"type\":\"uint32\"}],\"name\":\"initializeEndDelegation\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"validationID\",\"type\":\"bytes32\"},{\"internalType\":\"bool\",\"name\":\"includeUptimeProof\",\"type\":\"bool\"},{\"internalType\":\"uint32\",\"name\":\"messageIndex\",\"type\":\"uint32\"}],\"name\":\"initializeEndValidation\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes\",\"name\":\"nodeID\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"blsPublicKey\",\"type\":\"bytes\"},{\"internalType\":\"uint64\",\"name\":\"registrationExpiry\",\"type\":\"uint64\"},{\"components\":[{\"internalType\":\"uint32\",\"name\":\"threshold\",\"type\":\"uint32\"},{\"internalType\":\"address[]\",\"name\":\"addresses\",\"type\":\"address[]\"}],\"internalType\":\"structPChainOwner\",\"name\":\"remainingBalanceOwner\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"uint32\",\"name\":\"threshold\",\"type\":\"uint32\"},{\"internalType\":\"address[]\",\"name\":\"addresses\",\"type\":\"address[]\"}],\"internalType\":\"structPChainOwner\",\"name\":\"disableOwner\",\"type\":\"tuple\"}],\"internalType\":\"structValidatorRegistrationInput\",\"name\":\"registrationInput\",\"type\":\"tuple\"},{\"internalType\":\"uint16\",\"name\":\"delegationFeeBips\",\"type\":\"uint16\"},{\"internalType\":\"uint64\",\"name\":\"minStakeDuration\",\"type\":\"uint64\"},{\"internalType\":\"uint256\",\"name\":\"stakeAmount\",\"type\":\"uint256\"}],\"name\":\"initializeValidatorRegistration\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"validationID\",\"type\":\"bytes32\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"subnetID\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"validatorManagerBlockchainID\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"validatorManagerAddress\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"bytes\",\"name\":\"nodeID\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"blsPublicKey\",\"type\":\"bytes\"},{\"internalType\":\"uint64\",\"name\":\"weight\",\"type\":\"uint64\"}],\"internalType\":\"structInitialValidator[]\",\"name\":\"initialValidators\",\"type\":\"tuple[]\"}],\"internalType\":\"structConversionData\",\"name\":\"conversionData\",\"type\":\"tuple\"},{\"internalType\":\"uint32\",\"name\":\"messageIndex\",\"type\":\"uint32\"}],\"name\":\"initializeValidatorSet\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"nodeID\",\"type\":\"bytes\"}],\"name\":\"registeredValidators\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"validationID\",\"type\":\"bytes32\"}],\"name\":\"resendEndValidatorMessage\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"validationID\",\"type\":\"bytes32\"}],\"name\":\"resendRegisterValidatorMessage\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"delegationID\",\"type\":\"bytes32\"}],\"name\":\"resendUpdateDelegation\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"validationID\",\"type\":\"bytes32\"},{\"internalType\":\"uint32\",\"name\":\"messageIndex\",\"type\":\"uint32\"}],\"name\":\"submitUptimeProof\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"valueToWeight\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"weight\",\"type\":\"uint64\"}],\"name\":\"weightToValue\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"}]", - Bin: "0x608060405234801561000f575f80fd5b50604051615b76380380615b7683398101604081905261002e91610107565b60018160018111156100425761004261012c565b0361004f5761004f610055565b50610140565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00805468010000000000000000900460ff16156100a55760405163f92ee8a960e01b815260040160405180910390fd5b80546001600160401b03908116146101045780546001600160401b0319166001600160401b0390811782556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b50565b5f60208284031215610117575f80fd5b815160028110610125575f80fd5b9392505050565b634e487b7160e01b5f52602160045260245ffd5b615a298061014d5f395ff3fe608060405234801561000f575f80fd5b50600436106101fd575f3560e01c806380dd672f11610114578063b771b3bc116100a9578063c974d1b611610079578063c974d1b61461045a578063d5f20ff614610462578063df93d8de14610482578063e4a63c401461048c578063fd7ac5e7146104a0575f80fd5b8063b771b3bc146103fa578063ba3a4b9714610420578063bc5fbfec14610433578063bee0a03f14610447575f80fd5b80639e478eea116100e45780639e478eea146103c0578063a3a65e48146103d3578063a9778a7a146102ac578063afb98096146103e6575f80fd5b806380dd672f1461037f5780638280a25a1461039257806393e245981461039a5780639e1bc4ef146103ad575f80fd5b80633a1cfff61161019557806360ad77841161016557806360ad77841461032c578063620658561461033f57806366435abf14610352578063732214f81461036557806376f786211461036c575f80fd5b80633a1cfff6146102c8578063467ef06f146102db5780634bee0040146102ee57806360305d621461030f575f80fd5b806320d91b7a116101d057806320d91b7a1461025b57806325e1c7761461026e5780632e2194d81461028157806335455ded146102ac575f80fd5b80630118acc4146102015780630322ed9814610216578063151d30d1146102295780631ec4472414610248575b5f80fd5b61021461020f3660046149a7565b6104b3565b005b6102146102243660046149e2565b6104e8565b610231600a81565b60405160ff90911681526020015b60405180910390f35b6102146102563660046149a7565b61076f565b6102146102693660046149f9565b61077a565b61021461027c366004614a47565b610cff565b61029461028f3660046149e2565b610d73565b6040516001600160401b03909116815260200161023f565b6102b561271081565b60405161ffff909116815260200161023f565b6102146102d63660046149a7565b610dcd565b6102146102e9366004614a68565b610dd8565b6103016102fc366004614aa6565b610e99565b60405190815260200161023f565b610317601481565b60405163ffffffff909116815260200161023f565b61021461033a366004614a47565b610ece565b61030161034d366004614b0d565b6111a6565b6102946103603660046149e2565b6111dd565b6103015f81565b61021461037a3660046149a7565b6111f1565b61021461038d366004614a47565b61121c565b610231603081565b6102146103a83660046149e2565b611461565b6103016103bb366004614b28565b61152c565b6102146103ce366004614b5c565b611558565b6102146103e1366004614a68565b611637565b6103015f8051602061597483398151915281565b6104086005600160991b0181565b6040516001600160a01b03909116815260200161023f565b61021461042e3660046149e2565b61182c565b6103015f8051602061599483398151915281565b6102146104553660046149e2565b611a97565b610231601481565b6104756104703660046149e2565b611bd4565b60405161023f9190614c0f565b6102946202a30081565b6103015f8051602061595483398151915281565b6103016104ae366004614c8f565b611d23565b6104be838383611d7e565b6104e357604051631036cf9160e11b8152600481018490526024015b60405180910390fd5b505050565b5f8181525f805160206159d48339815191526020526040808220815160e0810190925280545f8051602061599483398151915293929190829060ff16600581111561053557610535614b9a565b600581111561054657610546614b9a565b815260200160018201805461055a90614cfa565b80601f016020809104026020016040519081016040528092919081815260200182805461058690614cfa565b80156105d15780601f106105a8576101008083540402835291602001916105d1565b820191905f5260205f20905b8154815290600101906020018083116105b457829003601f168201915b505050918352505060028201546001600160401b038082166020840152600160401b820481166040840152600160801b820481166060840152600160c01b909104811660808301526003928301541660a0909101529091508151600581111561063c5761063c614b9a565b1461066f575f8381526007830160205260409081902054905163170cc93360e21b81526104da9160ff1690600401614d32565b606081015160405163854a893f60e01b8152600481018590526001600160401b0390911660248201525f60448201526005600160991b019063ee5b48eb9073__$fd0c147b4031eef6079b0498cbafa865f0$__9063854a893f906064015f60405180830381865af41580156106e6573d5f803e3d5ffd5b505050506040513d5f823e601f3d908101601f1916820160405261070d9190810190614e3b565b6040518263ffffffff1660e01b81526004016107299190614e6c565b6020604051808303815f875af1158015610745573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906107699190614e7e565b50505050565b610769838383611d7e565b7fe92546d698950ddd38910d2e15ed1d923cd0a7b3dde9e2a6a3f380565559cb09545f805160206159948339815191529060ff16156107cc57604051637fab81e560e01b815260040160405180910390fd5b6005600160991b016001600160a01b0316634213cf786040518163ffffffff1660e01b8152600401602060405180830381865afa15801561080f573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906108339190614e7e565b83602001351461085c576040516372b0a7e760e11b8152602084013560048201526024016104da565b3061086d6060850160408601614e95565b6001600160a01b0316146108b05761088b6060840160408501614e95565b604051632f88120d60e21b81526001600160a01b0390911660048201526024016104da565b5f6108be6060850185614eb0565b905090505f805b828163ffffffff161015610b25575f6108e16060880188614eb0565b8363ffffffff168181106108f7576108f7614ef5565b90506020028101906109099190614f09565b61091290614f74565b80516040519192505f91600888019161092a91614fef565b9081526020016040518091039020541461095a57805160405163a41f772f60e01b81526104da9190600401614e6c565b5f6002885f01358460405160200161098992919091825260e01b6001600160e01b031916602082015260240190565b60408051601f19818403018152908290526109a391614fef565b602060405180830381855afa1580156109be573d5f803e3d5ffd5b5050506040513d601f19601f820116820180604052508101906109e19190614e7e565b90508086600801835f01516040516109f99190614fef565b90815260408051918290036020908101909220929092555f8381526007890190915220805460ff191660021781558251600190910190610a399082615044565b50604080830180515f84815260078a01602052929092206002810180549251426001600160401b03908116600160c01b026001600160c01b03928216600160801b81026001600160c01b03199097169290971691909117949094171692909217909155600301805467ffffffffffffffff19169055610ab89085615113565b8251604051919550610ac991614fef565b60408051918290038220908401516001600160401b031682529082907f9d47fef9da077661546e646d61830bfcbda90506c2e5eed38195e82c4eb1cbdf9060200160405180910390a3505080610b1e90615126565b90506108c5565b50600483018190556001830154606490610b4990600160401b900460ff1683615148565b1015610b6b57604051635943317f60e01b8152600481018290526024016104da565b5f73__$fd0c147b4031eef6079b0498cbafa865f0$__634d847884610b8f876120d6565b604001516040518263ffffffff1660e01b8152600401610baf9190614e6c565b602060405180830381865af4158015610bca573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610bee9190614e7e565b90505f73__$fd0c147b4031eef6079b0498cbafa865f0$__6387418b8e886040518263ffffffff1660e01b8152600401610c28919061528a565b5f60405180830381865af4158015610c42573d5f803e3d5ffd5b505050506040513d5f823e601f3d908101601f19168201604052610c699190810190614e3b565b90505f600282604051610c7c9190614fef565b602060405180830381855afa158015610c97573d5f803e3d5ffd5b5050506040513d601f19601f82011682018060405250810190610cba9190614e7e565b9050828114610ce65760405163baaea89d60e01b815260048101829052602481018490526044016104da565b5050506009909201805460ff1916600117905550505050565b610d08826121ec565b610d28576040516330efa98b60e01b8152600481018390526024016104da565b5f610d3283611bd4565b5190506002816005811115610d4957610d49614b9a565b14610d69578060405163170cc93360e21b81526004016104da9190614d32565b6107698383612227565b5f805f8051602061597483398151915260030154610d919084615315565b9050801580610da657506001600160401b0381115b15610dc75760405163222d164360e21b8152600481018490526024016104da565b92915050565b6107698383836124e6565b610de06126d2565b5f805160206159748339815191525f80610df984612709565b91509150610e06826121ec565b610e1257505050610e80565b5f8281526006840160205260409020546001600160a01b0316600482516005811115610e4057610e40614b9a565b03610e65575f83815260098501602052604081208054919055610e638282612abc565b505b610e7b81610e7684604001516111a6565b612b32565b505050505b610e9660015f805160206159b483398151915255565b50565b5f610ea26126d2565b610eae85858585612b68565b9050610ec660015f805160206159b483398151915255565b949350505050565b5f8281525f805160206159348339815191526020526040808220815160e0810190925280545f8051602061597483398151915293929190829060ff166003811115610f1b57610f1b614b9a565b6003811115610f2c57610f2c614b9a565b8152815461010090046001600160a01b0316602082015260018201546040808301919091526002909201546001600160401b038082166060840152600160401b820481166080840152600160801b8204811660a0840152600160c01b9091041660c0909101528101519091505f610fa282611bd4565b9050600183516003811115610fb957610fb9614b9a565b14610fda578251604051633b0d540d60e21b81526104da9190600401615334565b600481516005811115610fef57610fef614b9a565b0361100557610ffd86612cee565b505050505050565b5f8073__$fd0c147b4031eef6079b0498cbafa865f0$__6350782b0f61102a896120d6565b604001516040518263ffffffff1660e01b815260040161104a9190614e6c565b606060405180830381865af4158015611065573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611089919061534e565b50915091508184146110b657846040015160405163089938b360e11b81526004016104da91815260200190565b806001600160401b031683606001516001600160401b031610806110ef5750806001600160401b03168560a001516001600160401b0316115b1561111857604051632e19bc2d60e11b81526001600160401b03821660048201526024016104da565b5f888152600787016020908152604091829020805460ff1916600290811782550180546001600160401b034216600160401b81026fffffffffffffffff00000000000000001990921691909117909155915191825285918a917f047059b465069b8b751836b41f9f1d83daff583d2238cc7fbb461437ec23a4f6910160405180910390a35050505050505050565b7f4317713f7ecbdddd4bc99e95d903adedaa883b2e7c2551610bd13e2c7e473d03545f90610dc7906001600160401b038416615148565b5f6111e782611bd4565b6080015192915050565b6111fc8383836124e6565b6104e357604051635bff683f60e11b8152600481018490526024016104da565b6112246126d2565b5f8281525f805160206159348339815191526020526040808220815160e0810190925280545f8051602061597483398151915293929190829060ff16600381111561127157611271614b9a565b600381111561128257611282614b9a565b8152815461010090046001600160a01b03166020820152600182015460408201526002909101546001600160401b038082166060840152600160401b820481166080840152600160801b8204811660a0840152600160c01b9091041660c09091015290506003815160038111156112fb576112fb614b9a565b1461131c578051604051633b0d540d60e21b81526104da9190600401615334565b600461132b8260400151611bd4565b51600581111561133d5761133d614b9a565b1461143c575f61134c846120d6565b90505f8073__$fd0c147b4031eef6079b0498cbafa865f0$__6350782b0f84604001516040518263ffffffff1660e01b815260040161138b9190614e6c565b606060405180830381865af41580156113a6573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906113ca919061534e565b5091509150818460400151146113f65760405163089938b360e11b8152600481018390526024016104da565b806001600160401b03168460c001516001600160401b0316111561143857604051632e19bc2d60e11b81526001600160401b03821660048201526024016104da565b5050505b61144584612cee565b505061145d60015f805160206159b483398151915255565b5050565b5f805160206159748339815191525f61147983611bd4565b519050600481600581111561149057611490614b9a565b146114b0578060405163170cc93360e21b81526004016104da9190614d32565b5f8381526006830160205260409020546001600160a01b031633146114f657335b604051636e2ccd7560e11b81526001600160a01b0390911660048201526024016104da565b5f83815260098301602090815260408083208054908490556006860190925290912054610769906001600160a01b031682612abc565b5f6115356126d2565b611540833384612f42565b9050610dc760015f805160206159b483398151915255565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00805460029190600160401b900460ff16806115a1575080546001600160401b03808416911610155b156115bf5760405163f92ee8a960e01b815260040160405180910390fd5b805468ffffffffffffffffff19166001600160401b03831617600160401b1781556115ea8484613188565b805460ff60401b191681556040516001600160401b03831681527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a150505050565b5f805160206159948339815191525f8073__$fd0c147b4031eef6079b0498cbafa865f0$__63021de88f61166a866120d6565b604001516040518263ffffffff1660e01b815260040161168a9190614e6c565b6040805180830381865af41580156116a4573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906116c8919061538e565b91509150806116ee57604051632d07135360e01b815281151560048201526024016104da565b5f8281526006840160205260409020805461170890614cfa565b90505f0361172c5760405163089938b360e11b8152600481018390526024016104da565b60015f83815260078501602052604090205460ff16600581111561175257611752614b9a565b14611785575f8281526007840160205260409081902054905163170cc93360e21b81526104da9160ff1690600401614d32565b5f828152600684016020526040812061179d916148f6565b5f828152600784016020908152604091829020805460ff1916600290811782550180546001600160401b0342818116600160c01b026001600160c01b0390931692909217928390558451600160801b9093041682529181019190915283917ff8fd1c90fb9cfa2ca2358fdf5806b086ad43315d92b221c929efc7f105ce7568910160405180910390a250505050565b5f8181525f805160206159348339815191526020526040808220815160e0810190925280545f8051602061597483398151915293929190829060ff16600381111561187957611879614b9a565b600381111561188a5761188a614b9a565b8152815461010090046001600160a01b0316602082015260018083015460408301526002909201546001600160401b038082166060840152600160401b820481166080840152600160801b8204811660a0840152600160c01b9091041660c0909101529091508151600381111561190357611903614b9a565b14158015611924575060038151600381111561192157611921614b9a565b14155b15611945578051604051633b0d540d60e21b81526104da9190600401615334565b5f6119538260400151611bd4565b905080606001516001600160401b03165f03611985576040516339b894f960e21b8152600481018590526024016104da565b60408083015160608301516080840151925163854a893f60e01b81526005600160991b019363ee5b48eb9373__$fd0c147b4031eef6079b0498cbafa865f0$__9363854a893f936119f393906004019283526001600160401b03918216602084015216604082015260600190565b5f60405180830381865af4158015611a0d573d5f803e3d5ffd5b505050506040513d5f823e601f3d908101601f19168201604052611a349190810190614e3b565b6040518263ffffffff1660e01b8152600401611a509190614e6c565b6020604051808303815f875af1158015611a6c573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611a909190614e7e565b5050505050565b5f8181527fe92546d698950ddd38910d2e15ed1d923cd0a7b3dde9e2a6a3f380565559cb066020526040902080545f805160206159948339815191529190611ade90614cfa565b90505f03611b025760405163089938b360e11b8152600481018390526024016104da565b60015f83815260078301602052604090205460ff166005811115611b2857611b28614b9a565b14611b5b575f8281526007820160205260409081902054905163170cc93360e21b81526104da9160ff1690600401614d32565b5f82815260068201602052604090819020905163ee5b48eb60e01b81526005600160991b019163ee5b48eb91611b9491906004016153b1565b6020604051808303815f875af1158015611bb0573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906104e39190614e7e565b611bdc61492d565b5f8281525f805160206159d4833981519152602052604090819020815160e0810190925280545f80516020615994833981519152929190829060ff166005811115611c2957611c29614b9a565b6005811115611c3a57611c3a614b9a565b8152602001600182018054611c4e90614cfa565b80601f0160208091040260200160405190810160405280929190818152602001828054611c7a90614cfa565b8015611cc55780601f10611c9c57610100808354040283529160200191611cc5565b820191905f5260205f20905b815481529060010190602001808311611ca857829003601f168201915b505050918352505060028201546001600160401b038082166020840152600160401b820481166040840152600160801b820481166060840152600160c01b9091048116608083015260039092015490911660a0909101529392505050565b6040515f905f80516020615994833981519152907fe92546d698950ddd38910d2e15ed1d923cd0a7b3dde9e2a6a3f380565559cb0890611d66908690869061543b565b90815260200160405180910390205491505092915050565b5f8381525f805160206159348339815191526020526040808220815160e0810190925280545f805160206159748339815191529284929091829060ff166003811115611dcc57611dcc614b9a565b6003811115611ddd57611ddd614b9a565b8152815461010090046001600160a01b0316602082015260018201546040808301919091526002909201546001600160401b038082166060840152600160401b820481166080840152600160801b8204811660a0840152600160c01b9091041660c0909101528101519091505f611e5382611bd4565b9050600283516003811115611e6a57611e6a614b9a565b14611e8b578251604051633b0d540d60e21b81526104da9190600401615334565b60208301516001600160a01b03163314611f27575f8281526006850160205260409020546001600160a01b03163314611ec457336114d1565b5f82815260068501602052604090205460a0820151611ef391600160b01b90046001600160401b03169061544a565b6001600160401b0316421015611f275760405163fb6ce63f60e01b81526001600160401b03421660048201526024016104da565b600281516005811115611f3c57611f3c614b9a565b0361206a5760028401546080840151611f5e916001600160401b03169061544a565b6001600160401b0316421015611f925760405163fb6ce63f60e01b81526001600160401b03421660048201526024016104da565b8615611fa457611fa28287612227565b505b5f8881526007850160205260409020805460ff1916600317905560608301516080820151611fdd918491611fd8919061546a565b6131a2565b505f898152600786016020526040812060020180546001600160401b03909316600160c01b026001600160c01b039093169290921790915561201e84613379565b5f8a81526008870160205260408082208390555191925084918b917f366d336c0ab380dc799f095a6f82a26326585c52909cc698b09ba4540709ed5791a3151594506120cf9350505050565b60048151600581111561207f5761207f614b9a565b036120b35761208d83613379565b5f8981526008860160205260409020556120a688612cee565b60019450505050506120cf565b805160405163170cc93360e21b81526104da9190600401614d32565b9392505050565b60408051606080820183525f8083526020830152918101919091526040516306f8253560e41b815263ffffffff831660048201525f9081906005600160991b0190636f825350906024015f60405180830381865afa15801561213a573d5f803e3d5ffd5b505050506040513d5f823e601f3d908101601f19168201604052612161919081019061548a565b915091508061218357604051636b2f19e960e01b815260040160405180910390fd5b8151156121a9578151604051636ba589a560e01b815260048101919091526024016104da565b60208201516001600160a01b0316156121e5576020820151604051624de75d60e31b81526001600160a01b0390911660048201526024016104da565b5092915050565b5f9081527f4317713f7ecbdddd4bc99e95d903adedaa883b2e7c2551610bd13e2c7e473d0660205260409020546001600160a01b0316151590565b6040516306f8253560e41b815263ffffffff821660048201525f90819081906005600160991b0190636f825350906024015f60405180830381865afa158015612272573d5f803e3d5ffd5b505050506040513d5f823e601f3d908101601f19168201604052612299919081019061548a565b91509150806122bb57604051636b2f19e960e01b815260040160405180910390fd5b7f4317713f7ecbdddd4bc99e95d903adedaa883b2e7c2551610bd13e2c7e473d055482515f805160206159748339815191529114612312578251604051636ba589a560e01b815260048101919091526024016104da565b60208301516001600160a01b03161561234e576020830151604051624de75d60e31b81526001600160a01b0390911660048201526024016104da565b60208301516001600160a01b03161561238a576020830151604051624de75d60e31b81526001600160a01b0390911660048201526024016104da565b5f8073__$fd0c147b4031eef6079b0498cbafa865f0$__63088c246386604001516040518263ffffffff1660e01b81526004016123c79190614e6c565b6040805180830381865af41580156123e1573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612405919061551a565b9150915081881461242c5760405163089938b360e11b8152600481018990526024016104da565b5f8881526006840160205260409020600101546001600160401b0390811690821611156124bd575f888152600684016020908152604091829020600101805467ffffffffffffffff19166001600160401b038516908117909155915191825289917fec44148e8ff271f2d0bacef1142154abacb0abb3a29eb3eb50e2ca97e86d0435910160405180910390a26124db565b505f8781526006830160205260409020600101546001600160401b03165b979650505050505050565b5f5f80516020615974833981519152816124ff86613516565b905061250a866121ec565b612519576001925050506120cf565b5f8681526006830160205260409020546001600160a01b0316331461253e57336114d1565b5f86815260068301602052604090205460a082015161256d91600160b01b90046001600160401b03169061544a565b6001600160401b03168160c001516001600160401b031610156125b45760c081015160405163fb6ce63f60e01b81526001600160401b0390911660048201526024016104da565b5f85156125cc576125c58786612227565b90506125ea565b505f8681526006830160205260409020600101546001600160401b03165b600483015460408301515f916001600160a01b031690634f22429f9061260f906111a6565b60a086015160c087015160405160e085901b6001600160e01b031916815260048101939093526001600160401b03918216602484018190526044840152811660648301528516608482015260a401602060405180830381865afa158015612678573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061269c9190614e7e565b905080846009015f8a81526020019081526020015f205f8282546126c09190615113565b90915550501515979650505050505050565b5f805160206159b483398151915280546001190161270357604051633ee5aeb560e01b815260040160405180910390fd5b60029055565b5f61271261492d565b5f805160206159948339815191525f8073__$fd0c147b4031eef6079b0498cbafa865f0$__63021de88f612745886120d6565b604001516040518263ffffffff1660e01b81526004016127659190614e6c565b6040805180830381865af415801561277f573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906127a3919061538e565b9150915080156127ca57604051632d07135360e01b815281151560048201526024016104da565b5f828152600784016020526040808220815160e081019092528054829060ff1660058111156127fb576127fb614b9a565b600581111561280c5761280c614b9a565b815260200160018201805461282090614cfa565b80601f016020809104026020016040519081016040528092919081815260200182805461284c90614cfa565b80156128975780601f1061286e57610100808354040283529160200191612897565b820191905f5260205f20905b81548152906001019060200180831161287a57829003601f168201915b505050918352505060028201546001600160401b038082166020840152600160401b820481166040840152600160801b820481166060840152600160c01b909104811660808301526003928301541660a0909101529091508151600581111561290257612902614b9a565b14158015612923575060018151600581111561292057612920614b9a565b14155b1561294457805160405163170cc93360e21b81526104da9190600401614d32565b60038151600581111561295957612959614b9a565b03612967576004815261296c565b600581525b8360080181602001516040516129829190614fef565b90815260408051602092819003830190205f908190558581526007870190925290208151815483929190829060ff191660018360058111156129c6576129c6614b9a565b0217905550602082015160018201906129df9082615044565b5060408201516002820180546060850151608086015160a08701516001600160401b039586166001600160801b031990941693909317600160401b92861692909202919091176001600160801b0316600160801b918516919091026001600160c01b031617600160c01b9184169190910217905560c0909201516003909101805467ffffffffffffffff19169190921617905580516005811115612a8557612a85614b9a565b60405184907f1c08e59656f1a18dc2da76826cdc52805c43e897a17c50faefb8ab3c1526cc16905f90a39196919550909350505050565b5f5f8051602061595483398151915280546040516340c10f1960e01b81526001600160a01b038681166004830152602482018690529293509116906340c10f19906044015f604051808303815f87803b158015612b17575f80fd5b505af1158015612b29573d5f803e3d5ffd5b50505050505050565b5f805160206159548339815191525461145d906001600160a01b031683836137fa565b60015f805160206159b483398151915255565b7f4317713f7ecbdddd4bc99e95d903adedaa883b2e7c2551610bd13e2c7e473d02545f905f8051602061597483398151915290600160401b900461ffff9081169086161080612bbc575061271061ffff8616115b15612be057604051635f12e6c360e11b815261ffff861660048201526024016104da565b60028101546001600160401b039081169085161015612c1c576040516202a06d60e11b81526001600160401b03851660048201526024016104da565b8054831080612c2e5750806001015483115b15612c4f5760405163222d164360e21b8152600481018490526024016104da565b5f612c5984613859565b90505f612c6582610d73565b90505f612c72898361387c565b5f818152600695909501602052604090942080546001600160b01b0319163317600160a01b61ffff9a909a16999099029890981767ffffffffffffffff60b01b1916600160b01b6001600160401b03989098169790970296909617875550506001909401805467ffffffffffffffff1916905550919392505050565b5f8181525f805160206159348339815191526020526040808220815160e0810190925280545f8051602061597483398151915293929190829060ff166003811115612d3b57612d3b614b9a565b6003811115612d4c57612d4c614b9a565b8152815461010090046001600160a01b0316602082015260018201546040808301919091526002909201546001600160401b038082166060840152600160401b820481166080840152600160801b8204811660a0840152600160c01b9091041660c090910152810151909150612de97fe92546d698950ddd38910d2e15ed1d923cd0a7b3dde9e2a6a3f380565559cb01546001600160401b031690565b8260800151612df8919061544a565b6001600160401b0316421015612e2c5760405163fb6ce63f60e01b81526001600160401b03421660048201526024016104da565b5f848152600784016020908152604080832080546001600160a81b03191681556001810184905560020183905560088601909152812080549082905590808215612ee7575f84815260068701602052604090205461271090612e9990600160a01b900461ffff1685615148565b612ea39190615315565b915081866009015f8681526020019081526020015f205f828254612ec79190615113565b90915550612ed79050828461553d565b9050612ee7856020015182612abc565b612efc8560200151610e7687606001516111a6565b6040805182815260208101849052859189917f8ececf510070c320d9a55323ffabe350e294ae505fc0c509dc5736da6f5cc993910160405180910390a350505050505050565b5f5f8051602061597483398151915281612f5e61028f85613859565b90505f612f6a87611bd4565b9050612f75876121ec565b612f95576040516330efa98b60e01b8152600481018890526024016104da565b600281516005811115612faa57612faa614b9a565b14612fcb57805160405163170cc93360e21b81526104da9190600401614d32565b5f828260800151612fdc919061544a565b905083600201600a9054906101000a90046001600160401b031682604001516130059190615550565b6001600160401b0316816001600160401b0316111561304257604051636d51fe0560e11b81526001600160401b03821660048201526024016104da565b5f8061304e8a846131a2565b915091505f8a8360405160200161307c92919091825260c01b6001600160c01b031916602082015260280190565b60408051601f1981840301815291815281516020928301205f81815260078b019093529120805491925060019160ff1916828002179055505f8181526007880160209081526040918290208054610100600160a81b0319166101006001600160a01b038f16908102919091178255600182018f9055600290910180546001600160401b038b81166001600160c01b03199092168217600160801b8a8316908102919091176001600160c01b031690935585519283528916938201939093529283019190915260608201849052908c9083907fb0024b263bc3a0b728a6edea50a69efa841189f8d32ee8af9d1c2b1a1a2234269060800160405180910390a49a9950505050505050505050565b613190613da1565b61319982613dec565b61145d81613e66565b5f8281525f805160206159d4833981519152602052604081206002015481905f8051602061599483398151915290600160801b90046001600160401b03166131ea8582613ece565b5f6131f4876140f1565b5f888152600785016020526040808220600201805467ffffffffffffffff60801b1916600160801b6001600160401b038c811691820292909217909255915163854a893f60e01b8152600481018c905291841660248301526044820152919250906005600160991b019063ee5b48eb9073__$fd0c147b4031eef6079b0498cbafa865f0$__9063854a893f906064015f60405180830381865af415801561329d573d5f803e3d5ffd5b505050506040513d5f823e601f3d908101601f191682016040526132c49190810190614e3b565b6040518263ffffffff1660e01b81526004016132e09190614e6c565b6020604051808303815f875af11580156132fc573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906133209190614e7e565b604080516001600160401b038a811682526020820184905282519394508516928b927f07de5ff35a674a8005e661f3333c907ca6333462808762d19dc7b3abb1a8c1df928290030190a3909450925050505b9250929050565b5f805f8051602061597483398151915290505f6133998460400151611bd4565b90505f6003825160058111156133b1576133b1614b9a565b14806133cf57506004825160058111156133cd576133cd614b9a565b145b156133df575060c081015161341c565b6002825160058111156133f4576133f4614b9a565b0361340057504261341c565b815160405163170cc93360e21b81526104da9190600401614d32565b84608001516001600160401b0316816001600160401b03161161344357505f949350505050565b600483015460608601516001600160a01b0390911690634f22429f90613468906111a6565b60a085015160808901516040808b01515f90815260068a0160205281902060010154905160e086901b6001600160e01b031916815260048101949094526001600160401b0392831660248501529082166044840152818616606484015216608482015260a401602060405180830381865afa1580156134e9573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061350d9190614e7e565b95945050505050565b61351e61492d565b5f8281525f805160206159d48339815191526020526040808220815160e0810190925280545f8051602061599483398151915293929190829060ff16600581111561356b5761356b614b9a565b600581111561357c5761357c614b9a565b815260200160018201805461359090614cfa565b80601f01602080910402602001604051908101604052809291908181526020018280546135bc90614cfa565b80156136075780601f106135de57610100808354040283529160200191613607565b820191905f5260205f20905b8154815290600101906020018083116135ea57829003601f168201915b50505091835250506002828101546001600160401b038082166020850152600160401b820481166040850152600160801b820481166060850152600160c01b9091048116608084015260039093015490921660a0909101529091508151600581111561367557613675614b9a565b146136a8575f8481526007830160205260409081902054905163170cc93360e21b81526104da9160ff1690600401614d32565b60038152426001600160401b031660c08201525f84815260078301602052604090208151815483929190829060ff191660018360058111156136ec576136ec614b9a565b0217905550602082015160018201906137059082615044565b5060408201516002820180546060850151608086015160a08701516001600160401b039586166001600160801b031990941693909317600160401b92861692909202919091176001600160801b0316600160801b918516919091026001600160c01b031617600160c01b9184169190910217905560c0909201516003909101805467ffffffffffffffff1916919092161790555f6137a385826131a2565b6080840151604080516001600160401b03909216825242602083015291935083925087917f13d58394cf269d48bcf927959a29a5ffee7c9924dafff8927ecdf3c48ffa7c67910160405180910390a3509392505050565b6040516001600160a01b038381166024830152604482018390526104e391859182169063a9059cbb906064015b604051602081830303815290604052915060e01b6020820180516001600160e01b038381831617835250505050614166565b5f610dc7825f80516020615954833981519152546001600160a01b0316906141c7565b7fe92546d698950ddd38910d2e15ed1d923cd0a7b3dde9e2a6a3f380565559cb09545f9060ff166138c057604051637fab81e560e01b815260040160405180910390fd5b5f80516020615994833981519152426138df6060860160408701614b0d565b6001600160401b031611158061391957506138fd6202a30042615113565b61390d6060860160408701614b0d565b6001600160401b031610155b156139535761392e6060850160408601614b0d565b604051635879da1360e11b81526001600160401b0390911660048201526024016104da565b613968613963606086018661557b565b614320565b613978613963608086018661557b565b6030613987602086018661558f565b9050146139b95761399b602085018561558f565b6040516326475b2f60e11b81526104da925060040190815260200190565b6139c3848061558f565b90505f036139f0576139d5848061558f565b604051633e08a12560e11b81526004016104da9291906155d1565b5f600882016139ff868061558f565b604051613a0d92919061543b565b90815260200160405180910390205414613a4657613a2b848061558f565b60405163a41f772f60e01b81526004016104da9291906155d1565b613a50835f613ece565b6040805160e08101909152815481525f90819073__$fd0c147b4031eef6079b0498cbafa865f0$__9063eb97ce519060208101613a8d8a8061558f565b8080601f0160208091040260200160405190810160405280939291908181526020018383808284375f92019190915250505090825250602090810190613ad5908b018b61558f565b8080601f0160208091040260200160405190810160405280939291908181526020018383808284375f92019190915250505090825250602001613b1e60608b0160408c01614b0d565b6001600160401b03168152602001613b3960608b018b61557b565b613b42906155e4565b8152602001613b5460808b018b61557b565b613b5d906155e4565b8152602001886001600160401b03168152506040518263ffffffff1660e01b8152600401613b8b9190615711565b5f60405180830381865af4158015613ba5573d5f803e3d5ffd5b505050506040513d5f823e601f3d908101601f19168201604052613bcc91908101906157c8565b5f82815260068601602052604090209193509150613bea8282615044565b508160088401613bfa888061558f565b604051613c0892919061543b565b9081526040519081900360200181209190915563ee5b48eb60e01b81525f906005600160991b019063ee5b48eb90613c44908590600401614e6c565b6020604051808303815f875af1158015613c60573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190613c849190614e7e565b5f8481526007860160205260409020805460ff191660011790559050613caa878061558f565b5f858152600787016020526040902060010191613cc891908361580b565b505f83815260078501602052604090206002810180546001600160c01b0319166001600160401b038916908117600160801b91909102176001600160c01b03169055600301805467ffffffffffffffff1916905580613d27888061558f565b604051613d3592919061543b565b6040518091039020847fb77297e3befc691bfc864a81e241f83e2ef722b6e7becaa2ecec250c6d52b430898b6040016020810190613d739190614b0d565b604080516001600160401b0393841681529290911660208301520160405180910390a4509095945050505050565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0054600160401b900460ff16613dea57604051631afcd79f60e31b815260040160405180910390fd5b565b613df4613da1565b613dfd81614489565b613e056144a2565b610e9660608201356080830135613e2260c0850160a08601614b0d565b613e3260e0860160c087016158c4565b613e43610100870160e088016158dd565b610100870135613e5b61014089016101208a01614e95565b8861014001356144b2565b613e6e613da1565b5f805160206159548339815191526001600160a01b038216613eae57604051637330680360e01b81526001600160a01b03831660048201526024016104da565b80546001600160a01b0319166001600160a01b0392909216919091179055565b5f805160206159948339815191525f6001600160401b038084169085161115613f0257613efb838561546a565b9050613f0f565b613f0c848461546a565b90505b6040805160808101825260028401548082526003850154602083015260048501549282019290925260058401546001600160401b0316606082015242911580613f71575060018401548151613f6d916001600160401b031690615113565b8210155b15613f97576001600160401b038316606082015281815260408101516020820152613fb6565b8281606001818151613fa9919061544a565b6001600160401b03169052505b6060810151613fc6906064615550565b602082015160018601546001600160401b039290921691613ff19190600160401b900460ff16615148565b101561402157606081015160405163dfae880160e01b81526001600160401b0390911660048201526024016104da565b856001600160401b03168160400181815161403c9190615113565b9052506040810180516001600160401b038716919061405c90839061553d565b9052506001840154604082015160649161408191600160401b90910460ff1690615148565b10156140a8578060400151604051635943317f60e01b81526004016104da91815260200190565b805160028501556020810151600385015560408101516004850155606001516005909301805467ffffffffffffffff19166001600160401b039094169390931790925550505050565b5f8181525f805160206159d48339815191526020526040812060020180545f80516020615994833981519152919060089061413b90600160401b90046001600160401b03166158fd565b91906101000a8154816001600160401b0302191690836001600160401b031602179055915050919050565b5f61417a6001600160a01b0384168361469a565b905080515f1415801561419e57508080602001905181019061419c9190615918565b155b156104e357604051635274afe760e01b81526001600160a01b03841660048201526024016104da565b6040516370a0823160e01b81523060048201525f9081906001600160a01b038516906370a0823190602401602060405180830381865afa15801561420d573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906142319190614e7e565b90506142486001600160a01b0385163330866146a7565b6040516370a0823160e01b81523060048201525f906001600160a01b038616906370a0823190602401602060405180830381865afa15801561428c573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906142b09190614e7e565b90508181116143165760405162461bcd60e51b815260206004820152602c60248201527f5361666545524332305472616e7366657246726f6d3a2062616c616e6365206e60448201526b1bdd081a5b98dc99585cd95960a21b60648201526084016104da565b61350d828261553d565b61432d6020820182614a68565b63ffffffff1615801561434d57506143486020820182614eb0565b151590505b156143945761435f6020820182614a68565b61436c6020830183614eb0565b60405163c08a0f1d60e01b815263ffffffff90931660048401526024830152506044016104da565b6143a16020820182614eb0565b90506143b06020830183614a68565b63ffffffff1611156143c95761435f6020820182614a68565b60015b6143d96020830183614eb0565b905081101561145d576143ef6020830183614eb0565b6143fa60018461553d565b81811061440957614409614ef5565b905060200201602081019061441e9190614e95565b6001600160a01b03166144346020840184614eb0565b8381811061444457614444614ef5565b90506020020160208101906144599190614e95565b6001600160a01b0316101561448157604051630dbc8d5f60e31b815260040160405180910390fd5b6001016143cc565b614491613da1565b6144996146e0565b610e96816146e8565b6144aa613da1565b613dea6147d0565b6144ba613da1565b5f8051602061597483398151915261ffff861615806144de575061271061ffff8716115b1561450257604051635f12e6c360e11b815261ffff871660048201526024016104da565b878911156145265760405163222d164360e21b8152600481018a90526024016104da565b60ff851615806145395750600a60ff8616115b1561455c5760405163170db35960e31b815260ff861660048201526024016104da565b7fe92546d698950ddd38910d2e15ed1d923cd0a7b3dde9e2a6a3f380565559cb01546001600160401b03166001600160401b0316876001600160401b031610156145c3576040516202a06d60e11b81526001600160401b03881660048201526024016104da565b835f036145e35760405163a733007160e01b815260040160405180910390fd5b8161460457604051632f6bd1db60e01b8152600481018390526024016104da565b97885560018801969096556002870180546001600160401b039690961669ffffffffffffffffffff1990961695909517600160401b61ffff95909516949094029390931767ffffffffffffffff60501b191660ff92909216600160501b029190911790925560038401919091556004830180546001600160a01b0319166001600160a01b03909216919091179055600590910155565b60606120cf83835f6147d8565b6040516001600160a01b0384811660248301528381166044830152606482018390526107699186918216906323b872dd90608401613827565b613dea613da1565b6146f0613da1565b80355f80516020615994833981519152908155601461471560608401604085016158dd565b60ff161180614734575061472f60608301604084016158dd565b60ff16155b156147685761474960608301604084016158dd565b604051634a59bbff60e11b815260ff90911660048201526024016104da565b61477860608301604084016158dd565b60018201805460ff92909216600160401b0260ff60401b199092169190911790556147a96040830160208401614b0d565b600191909101805467ffffffffffffffff19166001600160401b0390921691909117905550565b612b55613da1565b6060814710156147fd5760405163cd78605960e01b81523060048201526024016104da565b5f80856001600160a01b031684866040516148189190614fef565b5f6040518083038185875af1925050503d805f8114614852576040519150601f19603f3d011682016040523d82523d5f602084013e614857565b606091505b5091509150614867868383614871565b9695505050505050565b60608261488657614881826148cd565b6120cf565b815115801561489d57506001600160a01b0384163b155b156148c657604051639996b31560e01b81526001600160a01b03851660048201526024016104da565b50806120cf565b8051156148dd5780518082602001fd5b604051630a12f52160e11b815260040160405180910390fd5b50805461490290614cfa565b5f825580601f10614911575050565b601f0160209004905f5260205f2090810190610e96919061496a565b6040805160e08101909152805f81526060602082018190525f604083018190529082018190526080820181905260a0820181905260c09091015290565b5b8082111561497e575f815560010161496b565b5090565b8015158114610e96575f80fd5b803563ffffffff811681146149a2575f80fd5b919050565b5f805f606084860312156149b9575f80fd5b8335925060208401356149cb81614982565b91506149d96040850161498f565b90509250925092565b5f602082840312156149f2575f80fd5b5035919050565b5f8060408385031215614a0a575f80fd5b82356001600160401b03811115614a1f575f80fd5b830160808186031215614a30575f80fd5b9150614a3e6020840161498f565b90509250929050565b5f8060408385031215614a58575f80fd5b82359150614a3e6020840161498f565b5f60208284031215614a78575f80fd5b6120cf8261498f565b803561ffff811681146149a2575f80fd5b6001600160401b0381168114610e96575f80fd5b5f805f8060808587031215614ab9575f80fd5b84356001600160401b03811115614ace575f80fd5b850160a08188031215614adf575f80fd5b9350614aed60208601614a81565b92506040850135614afd81614a92565b9396929550929360600135925050565b5f60208284031215614b1d575f80fd5b81356120cf81614a92565b5f8060408385031215614b39575f80fd5b50508035926020909101359150565b6001600160a01b0381168114610e96575f80fd5b5f80828403610180811215614b6f575f80fd5b61016080821215614b7e575f80fd5b8493508301359050614b8f81614b48565b809150509250929050565b634e487b7160e01b5f52602160045260245ffd5b60068110614bbe57614bbe614b9a565b9052565b5f5b83811015614bdc578181015183820152602001614bc4565b50505f910152565b5f8151808452614bfb816020860160208601614bc2565b601f01601f19169290920160200192915050565b60208152614c21602082018351614bae565b5f602083015160e06040840152614c3c610100840182614be4565b905060408401516001600160401b0380821660608601528060608701511660808601528060808701511660a08601528060a08701511660c08601528060c08701511660e086015250508091505092915050565b5f8060208385031215614ca0575f80fd5b82356001600160401b0380821115614cb6575f80fd5b818501915085601f830112614cc9575f80fd5b813581811115614cd7575f80fd5b866020828501011115614ce8575f80fd5b60209290920196919550909350505050565b600181811c90821680614d0e57607f821691505b602082108103614d2c57634e487b7160e01b5f52602260045260245ffd5b50919050565b60208101610dc78284614bae565b634e487b7160e01b5f52604160045260245ffd5b604051606081016001600160401b0381118282101715614d7657614d76614d40565b60405290565b604080519081016001600160401b0381118282101715614d7657614d76614d40565b604051601f8201601f191681016001600160401b0381118282101715614dc657614dc6614d40565b604052919050565b5f6001600160401b03821115614de657614de6614d40565b50601f01601f191660200190565b5f82601f830112614e03575f80fd5b8151614e16614e1182614dce565b614d9e565b818152846020838601011115614e2a575f80fd5b610ec6826020830160208701614bc2565b5f60208284031215614e4b575f80fd5b81516001600160401b03811115614e60575f80fd5b610ec684828501614df4565b602081525f6120cf6020830184614be4565b5f60208284031215614e8e575f80fd5b5051919050565b5f60208284031215614ea5575f80fd5b81356120cf81614b48565b5f808335601e19843603018112614ec5575f80fd5b8301803591506001600160401b03821115614ede575f80fd5b6020019150600581901b3603821315613372575f80fd5b634e487b7160e01b5f52603260045260245ffd5b5f8235605e19833603018112614f1d575f80fd5b9190910192915050565b5f82601f830112614f36575f80fd5b8135614f44614e1182614dce565b818152846020838601011115614f58575f80fd5b816020850160208301375f918101602001919091529392505050565b5f60608236031215614f84575f80fd5b614f8c614d54565b82356001600160401b0380821115614fa2575f80fd5b614fae36838701614f27565b83526020850135915080821115614fc3575f80fd5b50614fd036828601614f27565b6020830152506040830135614fe481614a92565b604082015292915050565b5f8251614f1d818460208701614bc2565b601f8211156104e357805f5260205f20601f840160051c810160208510156150255750805b601f840160051c820191505b81811015611a90575f8155600101615031565b81516001600160401b0381111561505d5761505d614d40565b6150718161506b8454614cfa565b84615000565b602080601f8311600181146150a4575f841561508d5750858301515b5f19600386901b1c1916600185901b178555610ffd565b5f85815260208120601f198616915b828110156150d2578886015182559484019460019091019084016150b3565b50858210156150ef57878501515f19600388901b60f8161c191681555b5050505050600190811b01905550565b634e487b7160e01b5f52601160045260245ffd5b80820180821115610dc757610dc76150ff565b5f63ffffffff80831681810361513e5761513e6150ff565b6001019392505050565b8082028115828204841417610dc757610dc76150ff565b5f808335601e19843603018112615174575f80fd5b83016020810192503590506001600160401b03811115615192575f80fd5b803603821315613372575f80fd5b81835281816020850137505f828201602090810191909152601f909101601f19169091010190565b5f8383855260208086019550808560051b830101845f5b8781101561527d57848303601f19018952813536889003605e19018112615204575f80fd5b87016060615212828061515f565b82875261522283880182846151a0565b925050506152328683018361515f565b868303888801526152448382846151a0565b92505050604080830135925061525983614a92565b6001600160401b0392909216949091019390935297830197908301906001016151df565b5090979650505050505050565b6020815281356020820152602082013560408201525f60408301356152ae81614b48565b6001600160a01b031660608381019190915283013536849003601e190181126152d5575f80fd5b83016020810190356001600160401b038111156152f0575f80fd5b8060051b3603821315615301575f80fd5b60808085015261350d60a0850182846151c8565b5f8261532f57634e487b7160e01b5f52601260045260245ffd5b500490565b602081016004831061534857615348614b9a565b91905290565b5f805f60608486031215615360575f80fd5b83519250602084015161537281614a92565b604085015190925061538381614a92565b809150509250925092565b5f806040838503121561539f575f80fd5b825191506020830151614b8f81614982565b5f60208083525f84546153c381614cfa565b806020870152604060018084165f81146153e457600181146154005761542d565b60ff19851660408a0152604084151560051b8a0101955061542d565b895f5260205f205f5b858110156154245781548b8201860152908301908801615409565b8a016040019650505b509398975050505050505050565b818382375f9101908152919050565b6001600160401b038181168382160190808211156121e5576121e56150ff565b6001600160401b038281168282160390808211156121e5576121e56150ff565b5f806040838503121561549b575f80fd5b82516001600160401b03808211156154b1575f80fd5b90840190606082870312156154c4575f80fd5b6154cc614d54565b8251815260208301516154de81614b48565b60208201526040830151828111156154f4575f80fd5b61550088828601614df4565b6040830152508094505050506020830151614b8f81614982565b5f806040838503121561552b575f80fd5b825191506020830151614b8f81614a92565b81810381811115610dc757610dc76150ff565b6001600160401b03818116838216028082169190828114615573576155736150ff565b505092915050565b5f8235603e19833603018112614f1d575f80fd5b5f808335601e198436030181126155a4575f80fd5b8301803591506001600160401b038211156155bd575f80fd5b602001915036819003821315613372575f80fd5b602081525f610ec66020830184866151a0565b5f604082360312156155f4575f80fd5b6155fc614d7c565b6156058361498f565b81526020808401356001600160401b0380821115615621575f80fd5b9085019036601f830112615633575f80fd5b81358181111561564557615645614d40565b8060051b9150615656848301614d9e565b818152918301840191848101903684111561566f575f80fd5b938501935b83851015615699578435925061568983614b48565b8282529385019390850190615674565b94860194909452509295945050505050565b5f6040830163ffffffff8351168452602080840151604060208701528281518085526060880191506020830194505f92505b808310156157065784516001600160a01b031682529383019360019290920191908301906156dd565b509695505050505050565b60208152815160208201525f602083015160e06040840152615737610100840182614be4565b90506040840151601f19808584030160608601526157558383614be4565b92506001600160401b03606087015116608086015260808601519150808584030160a086015261578583836156ab565b925060a08601519150808584030160c0860152506157a382826156ab565b91505060c08401516157c060e08501826001600160401b03169052565b509392505050565b5f80604083850312156157d9575f80fd5b8251915060208301516001600160401b038111156157f5575f80fd5b61580185828601614df4565b9150509250929050565b6001600160401b0383111561582257615822614d40565b615836836158308354614cfa565b83615000565b5f601f841160018114615867575f85156158505750838201355b5f19600387901b1c1916600186901b178355611a90565b5f83815260208120601f198716915b828110156158965786850135825560209485019460019092019101615876565b50868210156158b2575f1960f88860031b161c19848701351681555b505060018560011b0183555050505050565b5f602082840312156158d4575f80fd5b6120cf82614a81565b5f602082840312156158ed575f80fd5b813560ff811681146120cf575f80fd5b5f6001600160401b0380831681810361513e5761513e6150ff565b5f60208284031215615928575f80fd5b81516120cf8161498256fe4317713f7ecbdddd4bc99e95d903adedaa883b2e7c2551610bd13e2c7e473d076e5bdfcce15e53c3406ea67bfce37dcd26f5152d5492824e43fd5e3c8ac5ab004317713f7ecbdddd4bc99e95d903adedaa883b2e7c2551610bd13e2c7e473d00e92546d698950ddd38910d2e15ed1d923cd0a7b3dde9e2a6a3f380565559cb009b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f00e92546d698950ddd38910d2e15ed1d923cd0a7b3dde9e2a6a3f380565559cb07a264697066735822122036fb1f902b5cae289eb2fcdde06bc397392f284fc334db07d5e8fb4a4d7bbcf264736f6c63430008190033", + Bin: "0x608060405234801561000f575f80fd5b50604051615af0380380615af083398101604081905261002e91610107565b60018160018111156100425761004261012c565b0361004f5761004f610055565b50610140565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00805468010000000000000000900460ff16156100a55760405163f92ee8a960e01b815260040160405180910390fd5b80546001600160401b03908116146101045780546001600160401b0319166001600160401b0390811782556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b50565b5f60208284031215610117575f80fd5b815160028110610125575f80fd5b9392505050565b634e487b7160e01b5f52602160045260245ffd5b6159a38061014d5f395ff3fe608060405234801561000f575f80fd5b50600436106101fd575f3560e01c806380dd672f11610114578063b771b3bc116100a9578063c974d1b611610079578063c974d1b61461046d578063d5f20ff614610475578063df93d8de14610495578063e4a63c401461049f578063fd7ac5e7146104b3575f80fd5b8063b771b3bc1461040d578063ba3a4b9714610433578063bc5fbfec14610446578063bee0a03f1461045a575f80fd5b80639e478eea116100e45780639e478eea146103c0578063a3a65e48146103d3578063a9778a7a146102ac578063afb98096146103e6575f80fd5b806380dd672f1461037f5780638280a25a1461039257806393e245981461039a5780639e1bc4ef146103ad575f80fd5b80633a1cfff61161019557806360ad77841161016557806360ad77841461032c578063620658561461033f57806366435abf14610352578063732214f81461036557806376f786211461036c575f80fd5b80633a1cfff6146102c8578063467ef06f146102db5780634bee0040146102ee57806360305d621461030f575f80fd5b806320d91b7a116101d057806320d91b7a1461025b57806325e1c7761461026e5780632e2194d81461028157806335455ded146102ac575f80fd5b80630118acc4146102015780630322ed9814610216578063151d30d1146102295780631ec4472414610248575b5f80fd5b61021461020f366004614961565b6104c6565b005b61021461022436600461499c565b6104fb565b610231600a81565b60405160ff90911681526020015b60405180910390f35b610214610256366004614961565b610782565b6102146102693660046149b3565b61078d565b61021461027c366004614a01565b610d12565b61029461028f36600461499c565b610d86565b6040516001600160401b03909116815260200161023f565b6102b561271081565b60405161ffff909116815260200161023f565b6102146102d6366004614961565b610dda565b6102146102e9366004614a22565b610de5565b6103016102fc366004614a60565b610e8d565b60405190815260200161023f565b610317601481565b60405163ffffffff909116815260200161023f565b61021461033a366004614a01565b610ec2565b61030161034d366004614ac7565b61118f565b61029461036036600461499c565b6111af565b6103015f81565b61021461037a366004614961565b6111c3565b61021461038d366004614a01565b6111ee565b610231603081565b6102146103a836600461499c565b611428565b6103016103bb366004614ae2565b6114dd565b6102146103ce366004614b16565b611509565b6102146103e1366004614a22565b6115e8565b6103017f4317713f7ecbdddd4bc99e95d903adedaa883b2e7c2551610bd13e2c7e473d0081565b61041b6005600160991b0181565b6040516001600160a01b03909116815260200161023f565b61021461044136600461499c565b6117dd565b6103015f8051602061590e83398151915281565b61021461046836600461499c565b611a3d565b610231601481565b61048861048336600461499c565b611b7a565b60405161023f9190614bc9565b6102946202a30081565b6103015f805160206158ee83398151915281565b6103016104c1366004614c49565b611cc9565b6104d1838383611d24565b6104f657604051631036cf9160e11b8152600481018490526024015b60405180910390fd5b505050565b5f8181525f8051602061594e8339815191526020526040808220815160e0810190925280545f8051602061590e83398151915293929190829060ff16600581111561054857610548614b54565b600581111561055957610559614b54565b815260200160018201805461056d90614cb4565b80601f016020809104026020016040519081016040528092919081815260200182805461059990614cb4565b80156105e45780601f106105bb576101008083540402835291602001916105e4565b820191905f5260205f20905b8154815290600101906020018083116105c757829003601f168201915b505050918352505060028201546001600160401b038082166020840152600160401b820481166040840152600160801b820481166060840152600160c01b909104811660808301526003928301541660a0909101529091508151600581111561064f5761064f614b54565b14610682575f8381526007830160205260409081902054905163170cc93360e21b81526104ed9160ff1690600401614cec565b606081015160405163854a893f60e01b8152600481018590526001600160401b0390911660248201525f60448201526005600160991b019063ee5b48eb9073__$fd0c147b4031eef6079b0498cbafa865f0$__9063854a893f906064015f60405180830381865af41580156106f9573d5f803e3d5ffd5b505050506040513d5f823e601f3d908101601f191682016040526107209190810190614df5565b6040518263ffffffff1660e01b815260040161073c9190614e26565b6020604051808303815f875af1158015610758573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061077c9190614e38565b50505050565b61077c838383611d24565b7fe92546d698950ddd38910d2e15ed1d923cd0a7b3dde9e2a6a3f380565559cb09545f8051602061590e8339815191529060ff16156107df57604051637fab81e560e01b815260040160405180910390fd5b6005600160991b016001600160a01b0316634213cf786040518163ffffffff1660e01b8152600401602060405180830381865afa158015610822573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906108469190614e38565b83602001351461086f576040516372b0a7e760e11b8152602084013560048201526024016104ed565b306108806060850160408601614e4f565b6001600160a01b0316146108c35761089e6060840160408501614e4f565b604051632f88120d60e21b81526001600160a01b0390911660048201526024016104ed565b5f6108d16060850185614e6a565b905090505f805b828163ffffffff161015610b38575f6108f46060880188614e6a565b8363ffffffff1681811061090a5761090a614eaf565b905060200281019061091c9190614ec3565b61092590614f2e565b80516040519192505f91600888019161093d91614fa9565b9081526020016040518091039020541461096d57805160405163a41f772f60e01b81526104ed9190600401614e26565b5f6002885f01358460405160200161099c92919091825260e01b6001600160e01b031916602082015260240190565b60408051601f19818403018152908290526109b691614fa9565b602060405180830381855afa1580156109d1573d5f803e3d5ffd5b5050506040513d601f19601f820116820180604052508101906109f49190614e38565b90508086600801835f0151604051610a0c9190614fa9565b90815260408051918290036020908101909220929092555f8381526007890190915220805460ff191660021781558251600190910190610a4c9082614ffe565b50604080830180515f84815260078a01602052929092206002810180549251426001600160401b03908116600160c01b026001600160c01b03928216600160801b81026001600160c01b03199097169290971691909117949094171692909217909155600301805467ffffffffffffffff19169055610acb90856150cd565b8251604051919550610adc91614fa9565b60408051918290038220908401516001600160401b031682529082907f9d47fef9da077661546e646d61830bfcbda90506c2e5eed38195e82c4eb1cbdf9060200160405180910390a3505080610b31906150e0565b90506108d8565b50600483018190556001830154606490610b5c90600160401b900460ff1683615102565b1015610b7e57604051635943317f60e01b8152600481018290526024016104ed565b5f73__$fd0c147b4031eef6079b0498cbafa865f0$__634d847884610ba287612071565b604001516040518263ffffffff1660e01b8152600401610bc29190614e26565b602060405180830381865af4158015610bdd573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610c019190614e38565b90505f73__$fd0c147b4031eef6079b0498cbafa865f0$__6387418b8e886040518263ffffffff1660e01b8152600401610c3b9190615244565b5f60405180830381865af4158015610c55573d5f803e3d5ffd5b505050506040513d5f823e601f3d908101601f19168201604052610c7c9190810190614df5565b90505f600282604051610c8f9190614fa9565b602060405180830381855afa158015610caa573d5f803e3d5ffd5b5050506040513d601f19601f82011682018060405250810190610ccd9190614e38565b9050828114610cf95760405163baaea89d60e01b815260048101829052602481018490526044016104ed565b5050506009909201805460ff1916600117905550505050565b610d1b82612187565b610d3b576040516330efa98b60e01b8152600481018390526024016104ed565b5f610d4583611b7a565b5190506002816005811115610d5c57610d5c614b54565b14610d7c578060405163170cc93360e21b81526004016104ed9190614cec565b61077c83836121b0565b5f80610d9061244f565b60030154610d9e90846152cf565b9050801580610db357506001600160401b0381115b15610dd45760405163222d164360e21b8152600481018490526024016104ed565b92915050565b61077c838383612473565b610ded61265c565b5f610df661244f565b90505f80610e0384612693565b91509150610e1082612187565b610e1c57505050610e74565b5f8281526006840160205260409020546001600160a01b0316600482516005811115610e4a57610e4a614b54565b03610e5957610e598184612a46565b610e6f81610e6a846040015161118f565b612a70565b505050505b610e8a60015f8051602061592e83398151915255565b50565b5f610e9661265c565b610ea285858585612aa6565b9050610eba60015f8051602061592e83398151915255565b949350505050565b5f610ecb61244f565b5f848152600782016020526040808220815160e0810190925280549394509192909190829060ff166003811115610f0457610f04614b54565b6003811115610f1557610f15614b54565b8152815461010090046001600160a01b0316602082015260018201546040808301919091526002909201546001600160401b038082166060840152600160401b820481166080840152600160801b8204811660a0840152600160c01b9091041660c0909101528101519091505f610f8b82611b7a565b9050600183516003811115610fa257610fa2614b54565b14610fc3578251604051633b0d540d60e21b81526104ed91906004016152ee565b600481516005811115610fd857610fd8614b54565b03610fee57610fe686612c0b565b505050505050565b5f8073__$fd0c147b4031eef6079b0498cbafa865f0$__6350782b0f61101389612071565b604001516040518263ffffffff1660e01b81526004016110339190614e26565b606060405180830381865af415801561104e573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906110729190615308565b509150915081841461109f57846040015160405163089938b360e11b81526004016104ed91815260200190565b806001600160401b031683606001516001600160401b031610806110d85750806001600160401b03168560a001516001600160401b0316115b1561110157604051632e19bc2d60e11b81526001600160401b03821660048201526024016104ed565b5f888152600787016020908152604091829020805460ff1916600290811782550180546001600160401b034216600160401b81026fffffffffffffffff00000000000000001990921691909117909155915191825285918a917f047059b465069b8b751836b41f9f1d83daff583d2238cc7fbb461437ec23a4f6910160405180910390a35050505050505050565b5f61119861244f565b60030154610dd4906001600160401b038416615102565b5f6111b982611b7a565b6080015192915050565b6111ce838383612473565b6104f657604051635bff683f60e11b8152600481018490526024016104ed565b6111f661265c565b5f6111ff61244f565b5f848152600782016020526040808220815160e0810190925280549394509192909190829060ff16600381111561123857611238614b54565b600381111561124957611249614b54565b8152815461010090046001600160a01b03166020820152600182015460408201526002909101546001600160401b038082166060840152600160401b820481166080840152600160801b8204811660a0840152600160c01b9091041660c09091015290506003815160038111156112c2576112c2614b54565b146112e3578051604051633b0d540d60e21b81526104ed91906004016152ee565b60046112f28260400151611b7a565b51600581111561130457611304614b54565b14611403575f61131384612071565b90505f8073__$fd0c147b4031eef6079b0498cbafa865f0$__6350782b0f84604001516040518263ffffffff1660e01b81526004016113529190614e26565b606060405180830381865af415801561136d573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906113919190615308565b5091509150818460400151146113bd5760405163089938b360e11b8152600481018390526024016104ed565b806001600160401b03168460c001516001600160401b031611156113ff57604051632e19bc2d60e11b81526001600160401b03821660048201526024016104ed565b5050505b61140c84612c0b565b505061142460015f8051602061592e83398151915255565b5050565b5f61143161244f565b90505f61143d83611b7a565b519050600481600581111561145457611454614b54565b14611474578060405163170cc93360e21b81526004016104ed9190614cec565b5f8381526006830160205260409020546001600160a01b031633146114ba57335b604051636e2ccd7560e11b81526001600160a01b0390911660048201526024016104ed565b5f8381526006830160205260409020546104f6906001600160a01b031684612a46565b5f6114e661265c565b6114f1833384612dd9565b9050610dd460015f8051602061592e83398151915255565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00805460029190600160401b900460ff1680611552575080546001600160401b03808416911610155b156115705760405163f92ee8a960e01b815260040160405180910390fd5b805468ffffffffffffffffff19166001600160401b03831617600160401b17815561159b848461301c565b805460ff60401b191681556040516001600160401b03831681527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a150505050565b5f8051602061590e8339815191525f8073__$fd0c147b4031eef6079b0498cbafa865f0$__63021de88f61161b86612071565b604001516040518263ffffffff1660e01b815260040161163b9190614e26565b6040805180830381865af4158015611655573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906116799190615348565b915091508061169f57604051632d07135360e01b815281151560048201526024016104ed565b5f828152600684016020526040902080546116b990614cb4565b90505f036116dd5760405163089938b360e11b8152600481018390526024016104ed565b60015f83815260078501602052604090205460ff16600581111561170357611703614b54565b14611736575f8281526007840160205260409081902054905163170cc93360e21b81526104ed9160ff1690600401614cec565b5f828152600684016020526040812061174e916148b0565b5f828152600784016020908152604091829020805460ff1916600290811782550180546001600160401b0342818116600160c01b026001600160c01b0390931692909217928390558451600160801b9093041682529181019190915283917ff8fd1c90fb9cfa2ca2358fdf5806b086ad43315d92b221c929efc7f105ce7568910160405180910390a250505050565b5f6117e661244f565b5f838152600782016020526040808220815160e0810190925280549394509192909190829060ff16600381111561181f5761181f614b54565b600381111561183057611830614b54565b8152815461010090046001600160a01b0316602082015260018083015460408301526002909201546001600160401b038082166060840152600160401b820481166080840152600160801b8204811660a0840152600160c01b9091041660c090910152909150815160038111156118a9576118a9614b54565b141580156118ca57506003815160038111156118c7576118c7614b54565b14155b156118eb578051604051633b0d540d60e21b81526104ed91906004016152ee565b5f6118f98260400151611b7a565b905080606001516001600160401b03165f0361192b576040516339b894f960e21b8152600481018590526024016104ed565b60408083015160608301516080840151925163854a893f60e01b81526005600160991b019363ee5b48eb9373__$fd0c147b4031eef6079b0498cbafa865f0$__9363854a893f9361199993906004019283526001600160401b03918216602084015216604082015260600190565b5f60405180830381865af41580156119b3573d5f803e3d5ffd5b505050506040513d5f823e601f3d908101601f191682016040526119da9190810190614df5565b6040518263ffffffff1660e01b81526004016119f69190614e26565b6020604051808303815f875af1158015611a12573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611a369190614e38565b5050505050565b5f8181527fe92546d698950ddd38910d2e15ed1d923cd0a7b3dde9e2a6a3f380565559cb066020526040902080545f8051602061590e8339815191529190611a8490614cb4565b90505f03611aa85760405163089938b360e11b8152600481018390526024016104ed565b60015f83815260078301602052604090205460ff166005811115611ace57611ace614b54565b14611b01575f8281526007820160205260409081902054905163170cc93360e21b81526104ed9160ff1690600401614cec565b5f82815260068201602052604090819020905163ee5b48eb60e01b81526005600160991b019163ee5b48eb91611b3a919060040161536b565b6020604051808303815f875af1158015611b56573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906104f69190614e38565b611b826148e7565b5f8281525f8051602061594e833981519152602052604090819020815160e0810190925280545f8051602061590e833981519152929190829060ff166005811115611bcf57611bcf614b54565b6005811115611be057611be0614b54565b8152602001600182018054611bf490614cb4565b80601f0160208091040260200160405190810160405280929190818152602001828054611c2090614cb4565b8015611c6b5780601f10611c4257610100808354040283529160200191611c6b565b820191905f5260205f20905b815481529060010190602001808311611c4e57829003601f168201915b505050918352505060028201546001600160401b038082166020840152600160401b820481166040840152600160801b820481166060840152600160c01b9091048116608083015260039092015490911660a0909101529392505050565b6040515f905f8051602061590e833981519152907fe92546d698950ddd38910d2e15ed1d923cd0a7b3dde9e2a6a3f380565559cb0890611d0c90869086906153f5565b90815260200160405180910390205491505092915050565b5f80611d2e61244f565b5f868152600782016020526040808220815160e0810190925280549394509192909190829060ff166003811115611d6757611d67614b54565b6003811115611d7857611d78614b54565b8152815461010090046001600160a01b0316602082015260018201546040808301919091526002909201546001600160401b038082166060840152600160401b820481166080840152600160801b8204811660a0840152600160c01b9091041660c0909101528101519091505f611dee82611b7a565b9050600283516003811115611e0557611e05614b54565b14611e26578251604051633b0d540d60e21b81526104ed91906004016152ee565b60208301516001600160a01b03163314611ec2575f8281526006850160205260409020546001600160a01b03163314611e5f5733611495565b5f82815260068501602052604090205460a0820151611e8e91600160b01b90046001600160401b031690615404565b6001600160401b0316421015611ec25760405163fb6ce63f60e01b81526001600160401b03421660048201526024016104ed565b600281516005811115611ed757611ed7614b54565b036120055760028401546080840151611ef9916001600160401b031690615404565b6001600160401b0316421015611f2d5760405163fb6ce63f60e01b81526001600160401b03421660048201526024016104ed565b8615611f3f57611f3d82876121b0565b505b5f8881526007850160205260409020805460ff1916600317905560608301516080820151611f78918491611f739190615424565b613036565b505f898152600786016020526040812060020180546001600160401b03909316600160c01b026001600160c01b0390931692909217909155611fb98461320d565b5f8a81526008870160205260408082208390555191925084918b917f366d336c0ab380dc799f095a6f82a26326585c52909cc698b09ba4540709ed5791a31515945061206a9350505050565b60048151600581111561201a5761201a614b54565b0361204e576120288361320d565b5f89815260088601602052604090205561204188612c0b565b600194505050505061206a565b805160405163170cc93360e21b81526104ed9190600401614cec565b9392505050565b60408051606080820183525f8083526020830152918101919091526040516306f8253560e41b815263ffffffff831660048201525f9081906005600160991b0190636f825350906024015f60405180830381865afa1580156120d5573d5f803e3d5ffd5b505050506040513d5f823e601f3d908101601f191682016040526120fc9190810190615444565b915091508061211e57604051636b2f19e960e01b815260040160405180910390fd5b815115612144578151604051636ba589a560e01b815260048101919091526024016104ed565b60208201516001600160a01b031615612180576020820151604051624de75d60e31b81526001600160a01b0390911660048201526024016104ed565b5092915050565b5f8061219161244f565b5f938452600601602052505060409020546001600160a01b0316151590565b6040516306f8253560e41b815263ffffffff821660048201525f90819081906005600160991b0190636f825350906024015f60405180830381865afa1580156121fb573d5f803e3d5ffd5b505050506040513d5f823e601f3d908101601f191682016040526122229190810190615444565b915091508061224457604051636b2f19e960e01b815260040160405180910390fd5b5f61224d61244f565b600581015484519192501461227b578251604051636ba589a560e01b815260048101919091526024016104ed565b60208301516001600160a01b0316156122b7576020830151604051624de75d60e31b81526001600160a01b0390911660048201526024016104ed565b60208301516001600160a01b0316156122f3576020830151604051624de75d60e31b81526001600160a01b0390911660048201526024016104ed565b5f8073__$fd0c147b4031eef6079b0498cbafa865f0$__63088c246386604001516040518263ffffffff1660e01b81526004016123309190614e26565b6040805180830381865af415801561234a573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061236e91906154d4565b915091508188146123955760405163089938b360e11b8152600481018990526024016104ed565b5f8881526006840160205260409020600101546001600160401b039081169082161115612426575f888152600684016020908152604091829020600101805467ffffffffffffffff19166001600160401b038516908117909155915191825289917fec44148e8ff271f2d0bacef1142154abacb0abb3a29eb3eb50e2ca97e86d0435910160405180910390a2612444565b505f8781526006830160205260409020600101546001600160401b03165b979650505050505050565b7f4317713f7ecbdddd4bc99e95d903adedaa883b2e7c2551610bd13e2c7e473d0090565b5f8061247d61244f565b90505f612489866133a4565b905061249486612187565b6124a35760019250505061206a565b5f8681526006830160205260409020546001600160a01b031633146124c85733611495565b5f86815260068301602052604090205460a08201516124f791600160b01b90046001600160401b031690615404565b6001600160401b03168160c001516001600160401b0316101561253e5760c081015160405163fb6ce63f60e01b81526001600160401b0390911660048201526024016104ed565b5f85156125565761254f87866121b0565b9050612574565b505f8681526006830160205260409020600101546001600160401b03165b600483015460408301515f916001600160a01b031690634f22429f906125999061118f565b60a086015160c087015160405160e085901b6001600160e01b031916815260048101939093526001600160401b03918216602484018190526044840152811660648301528516608482015260a401602060405180830381865afa158015612602573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906126269190614e38565b905080846009015f8a81526020019081526020015f205f82825461264a91906150cd565b90915550501515979650505050505050565b5f8051602061592e83398151915280546001190161268d57604051633ee5aeb560e01b815260040160405180910390fd5b60029055565b5f61269c6148e7565b5f8051602061590e8339815191525f8073__$fd0c147b4031eef6079b0498cbafa865f0$__63021de88f6126cf88612071565b604001516040518263ffffffff1660e01b81526004016126ef9190614e26565b6040805180830381865af4158015612709573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061272d9190615348565b91509150801561275457604051632d07135360e01b815281151560048201526024016104ed565b5f828152600784016020526040808220815160e081019092528054829060ff16600581111561278557612785614b54565b600581111561279657612796614b54565b81526020016001820180546127aa90614cb4565b80601f01602080910402602001604051908101604052809291908181526020018280546127d690614cb4565b80156128215780601f106127f857610100808354040283529160200191612821565b820191905f5260205f20905b81548152906001019060200180831161280457829003601f168201915b505050918352505060028201546001600160401b038082166020840152600160401b820481166040840152600160801b820481166060840152600160c01b909104811660808301526003928301541660a0909101529091508151600581111561288c5761288c614b54565b141580156128ad57506001815160058111156128aa576128aa614b54565b14155b156128ce57805160405163170cc93360e21b81526104ed9190600401614cec565b6003815160058111156128e3576128e3614b54565b036128f157600481526128f6565b600581525b83600801816020015160405161290c9190614fa9565b90815260408051602092819003830190205f908190558581526007870190925290208151815483929190829060ff1916600183600581111561295057612950614b54565b0217905550602082015160018201906129699082614ffe565b5060408201516002820180546060850151608086015160a08701516001600160401b039586166001600160801b031990941693909317600160401b92861692909202919091176001600160801b0316600160801b918516919091026001600160c01b031617600160c01b9184169190910217905560c0909201516003909101805467ffffffffffffffff19169190921617905580516005811115612a0f57612a0f614b54565b60405184907f1c08e59656f1a18dc2da76826cdc52805c43e897a17c50faefb8ab3c1526cc16905f90a39196919550909350505050565b5f612a4f61244f565b5f8381526009820160205260408120805491905590915061077c8482613688565b5f805160206158ee83398151915254611424906001600160a01b031683836136fe565b60015f8051602061592e83398151915255565b5f80612ab061244f565b600281015490915061ffff600160401b90910481169086161080612ad9575061271061ffff8616115b15612afd57604051635f12e6c360e11b815261ffff861660048201526024016104ed565b60028101546001600160401b039081169085161015612b39576040516202a06d60e11b81526001600160401b03851660048201526024016104ed565b8054831080612b4b5750806001015483115b15612b6c5760405163222d164360e21b8152600481018490526024016104ed565b5f612b768461375d565b90505f612b8282610d86565b90505f612b8f8983613780565b5f818152600695909501602052604090942080546001600160b01b0319163317600160a01b61ffff9a909a16999099029890981767ffffffffffffffff60b01b1916600160b01b6001600160401b03989098169790970296909617875550506001909401805467ffffffffffffffff1916905550919392505050565b5f612c1461244f565b5f838152600782016020526040808220815160e0810190925280549394509192909190829060ff166003811115612c4d57612c4d614b54565b6003811115612c5e57612c5e614b54565b8152815461010090046001600160a01b0316602082015260018201546040808301919091526002909201546001600160401b038082166060840152600160401b820481166080840152600160801b8204811660a0840152600160c01b9091041660c090910152810151909150612cfb7fe92546d698950ddd38910d2e15ed1d923cd0a7b3dde9e2a6a3f380565559cb01546001600160401b031690565b8260800151612d0a9190615404565b6001600160401b0316421015612d3e5760405163fb6ce63f60e01b81526001600160401b03421660048201526024016104ed565b5f8481526007840160209081526040822080546001600160a81b0319168155600181018390556002018290558301519080612d7a838886613ca5565b91509150612d938560200151610e6a876060015161118f565b6040805183815260208101839052859189917f8ececf510070c320d9a55323ffabe350e294ae505fc0c509dc5736da6f5cc993910160405180910390a350505050505050565b5f80612de361244f565b90505f612df261028f8561375d565b90505f612dfe87611b7a565b9050612e0987612187565b612e29576040516330efa98b60e01b8152600481018890526024016104ed565b600281516005811115612e3e57612e3e614b54565b14612e5f57805160405163170cc93360e21b81526104ed9190600401614cec565b5f828260800151612e709190615404565b905083600201600a9054906101000a90046001600160401b03168260400151612e9991906154f7565b6001600160401b0316816001600160401b03161115612ed657604051636d51fe0560e11b81526001600160401b03821660048201526024016104ed565b5f80612ee28a84613036565b915091505f8a83604051602001612f1092919091825260c01b6001600160c01b031916602082015260280190565b60408051601f1981840301815291815281516020928301205f81815260078b019093529120805491925060019160ff1916828002179055505f8181526007880160209081526040918290208054610100600160a81b0319166101006001600160a01b038f16908102919091178255600182018f9055600290910180546001600160401b038b81166001600160c01b03199092168217600160801b8a8316908102919091176001600160c01b031690935585519283528916938201939093529283019190915260608201849052908c9083907fb0024b263bc3a0b728a6edea50a69efa841189f8d32ee8af9d1c2b1a1a2234269060800160405180910390a49a9950505050505050505050565b613024613d52565b61302d82613d9d565b61142481613e17565b5f8281525f8051602061594e833981519152602052604081206002015481905f8051602061590e83398151915290600160801b90046001600160401b031661307e8582613e7f565b5f613088876140a2565b5f888152600785016020526040808220600201805467ffffffffffffffff60801b1916600160801b6001600160401b038c811691820292909217909255915163854a893f60e01b8152600481018c905291841660248301526044820152919250906005600160991b019063ee5b48eb9073__$fd0c147b4031eef6079b0498cbafa865f0$__9063854a893f906064015f60405180830381865af4158015613131573d5f803e3d5ffd5b505050506040513d5f823e601f3d908101601f191682016040526131589190810190614df5565b6040518263ffffffff1660e01b81526004016131749190614e26565b6020604051808303815f875af1158015613190573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906131b49190614e38565b604080516001600160401b038a811682526020820184905282519394508516928b927f07de5ff35a674a8005e661f3333c907ca6333462808762d19dc7b3abb1a8c1df928290030190a3909450925050505b9250929050565b5f8061321761244f565b90505f6132278460400151611b7a565b90505f60038251600581111561323f5761323f614b54565b148061325d575060048251600581111561325b5761325b614b54565b145b1561326d575060c08101516132aa565b60028251600581111561328257613282614b54565b0361328e5750426132aa565b815160405163170cc93360e21b81526104ed9190600401614cec565b84608001516001600160401b0316816001600160401b0316116132d157505f949350505050565b600483015460608601516001600160a01b0390911690634f22429f906132f69061118f565b60a085015160808901516040808b01515f90815260068a0160205281902060010154905160e086901b6001600160e01b031916815260048101949094526001600160401b0392831660248501529082166044840152818616606484015216608482015260a401602060405180830381865afa158015613377573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061339b9190614e38565b95945050505050565b6133ac6148e7565b5f8281525f8051602061594e8339815191526020526040808220815160e0810190925280545f8051602061590e83398151915293929190829060ff1660058111156133f9576133f9614b54565b600581111561340a5761340a614b54565b815260200160018201805461341e90614cb4565b80601f016020809104026020016040519081016040528092919081815260200182805461344a90614cb4565b80156134955780601f1061346c57610100808354040283529160200191613495565b820191905f5260205f20905b81548152906001019060200180831161347857829003601f168201915b50505091835250506002828101546001600160401b038082166020850152600160401b820481166040850152600160801b820481166060850152600160c01b9091048116608084015260039093015490921660a0909101529091508151600581111561350357613503614b54565b14613536575f8481526007830160205260409081902054905163170cc93360e21b81526104ed9160ff1690600401614cec565b60038152426001600160401b031660c08201525f84815260078301602052604090208151815483929190829060ff1916600183600581111561357a5761357a614b54565b0217905550602082015160018201906135939082614ffe565b5060408201516002820180546060850151608086015160a08701516001600160401b039586166001600160801b031990941693909317600160401b92861692909202919091176001600160801b0316600160801b918516919091026001600160c01b031617600160c01b9184169190910217905560c0909201516003909101805467ffffffffffffffff1916919092161790555f6136318582613036565b6080840151604080516001600160401b03909216825242602083015291935083925087917f13d58394cf269d48bcf927959a29a5ffee7c9924dafff8927ecdf3c48ffa7c67910160405180910390a3509392505050565b5f5f805160206158ee83398151915280546040516340c10f1960e01b81526001600160a01b038681166004830152602482018690529293509116906340c10f19906044015f604051808303815f87803b1580156136e3575f80fd5b505af11580156136f5573d5f803e3d5ffd5b50505050505050565b6040516001600160a01b038381166024830152604482018390526104f691859182169063a9059cbb906064015b604051602081830303815290604052915060e01b6020820180516001600160e01b038381831617835250505050614117565b5f610dd4825f805160206158ee833981519152546001600160a01b031690614178565b7fe92546d698950ddd38910d2e15ed1d923cd0a7b3dde9e2a6a3f380565559cb09545f9060ff166137c457604051637fab81e560e01b815260040160405180910390fd5b5f8051602061590e833981519152426137e36060860160408701614ac7565b6001600160401b031611158061381d57506138016202a300426150cd565b6138116060860160408701614ac7565b6001600160401b031610155b15613857576138326060850160408601614ac7565b604051635879da1360e11b81526001600160401b0390911660048201526024016104ed565b61386c6138676060860186615522565b614184565b61387c6138676080860186615522565b603061388b6020860186615536565b9050146138bd5761389f6020850185615536565b6040516326475b2f60e11b81526104ed925060040190815260200190565b6138c78480615536565b90505f036138f4576138d98480615536565b604051633e08a12560e11b81526004016104ed929190615578565b5f600882016139038680615536565b6040516139119291906153f5565b9081526020016040518091039020541461394a5761392f8480615536565b60405163a41f772f60e01b81526004016104ed929190615578565b613954835f613e7f565b6040805160e08101909152815481525f90819073__$fd0c147b4031eef6079b0498cbafa865f0$__9063eb97ce5190602081016139918a80615536565b8080601f0160208091040260200160405190810160405280939291908181526020018383808284375f920191909152505050908252506020908101906139d9908b018b615536565b8080601f0160208091040260200160405190810160405280939291908181526020018383808284375f92019190915250505090825250602001613a2260608b0160408c01614ac7565b6001600160401b03168152602001613a3d60608b018b615522565b613a469061558b565b8152602001613a5860808b018b615522565b613a619061558b565b8152602001886001600160401b03168152506040518263ffffffff1660e01b8152600401613a8f91906156b8565b5f60405180830381865af4158015613aa9573d5f803e3d5ffd5b505050506040513d5f823e601f3d908101601f19168201604052613ad0919081019061576f565b5f82815260068601602052604090209193509150613aee8282614ffe565b508160088401613afe8880615536565b604051613b0c9291906153f5565b9081526040519081900360200181209190915563ee5b48eb60e01b81525f906005600160991b019063ee5b48eb90613b48908590600401614e26565b6020604051808303815f875af1158015613b64573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190613b889190614e38565b5f8481526007860160205260409020805460ff191660011790559050613bae8780615536565b5f858152600787016020526040902060010191613bcc9190836157b2565b505f83815260078501602052604090206002810180546001600160c01b0319166001600160401b038916908117600160801b91909102176001600160c01b03169055600301805467ffffffffffffffff1916905580613c2b8880615536565b604051613c399291906153f5565b6040518091039020847fb77297e3befc691bfc864a81e241f83e2ef722b6e7becaa2ecec250c6d52b430898b6040016020810190613c779190614ac7565b604080516001600160401b0393841681529290911660208301520160405180910390a4509095945050505050565b5f805f613cb061244f565b5f86815260088201602052604081208054908290559192509081908015613d44575f87815260068501602052604090205461271090613cfa90600160a01b900461ffff1683615102565b613d0491906152cf565b915081846009015f8981526020019081526020015f205f828254613d2891906150cd565b90915550613d389050828261586b565b9250613d448984613688565b509097909650945050505050565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0054600160401b900460ff16613d9b57604051631afcd79f60e31b815260040160405180910390fd5b565b613da5613d52565b613dae816142ed565b613db6614306565b610e8a60608201356080830135613dd360c0850160a08601614ac7565b613de360e0860160c0870161587e565b613df4610100870160e08801615897565b610100870135613e0c61014089016101208a01614e4f565b886101400135614316565b613e1f613d52565b5f805160206158ee8339815191526001600160a01b038216613e5f57604051637330680360e01b81526001600160a01b03831660048201526024016104ed565b80546001600160a01b0319166001600160a01b0392909216919091179055565b5f8051602061590e8339815191525f6001600160401b038084169085161115613eb357613eac8385615424565b9050613ec0565b613ebd8484615424565b90505b6040805160808101825260028401548082526003850154602083015260048501549282019290925260058401546001600160401b0316606082015242911580613f22575060018401548151613f1e916001600160401b0316906150cd565b8210155b15613f48576001600160401b038316606082015281815260408101516020820152613f67565b8281606001818151613f5a9190615404565b6001600160401b03169052505b6060810151613f779060646154f7565b602082015160018601546001600160401b039290921691613fa29190600160401b900460ff16615102565b1015613fd257606081015160405163dfae880160e01b81526001600160401b0390911660048201526024016104ed565b856001600160401b031681604001818151613fed91906150cd565b9052506040810180516001600160401b038716919061400d90839061586b565b9052506001840154604082015160649161403291600160401b90910460ff1690615102565b1015614059578060400151604051635943317f60e01b81526004016104ed91815260200190565b805160028501556020810151600385015560408101516004850155606001516005909301805467ffffffffffffffff19166001600160401b039094169390931790925550505050565b5f8181525f8051602061594e8339815191526020526040812060020180545f8051602061590e83398151915291906008906140ec90600160401b90046001600160401b03166158b7565b91906101000a8154816001600160401b0302191690836001600160401b031602179055915050919050565b5f61412b6001600160a01b038416836144fb565b905080515f1415801561414f57508080602001905181019061414d91906158d2565b155b156104f657604051635274afe760e01b81526001600160a01b03841660048201526024016104ed565b5f61206a833384614508565b6141916020820182614a22565b63ffffffff161580156141b157506141ac6020820182614e6a565b151590505b156141f8576141c36020820182614a22565b6141d06020830183614e6a565b60405163c08a0f1d60e01b815263ffffffff90931660048401526024830152506044016104ed565b6142056020820182614e6a565b90506142146020830183614a22565b63ffffffff16111561422d576141c36020820182614a22565b60015b61423d6020830183614e6a565b9050811015611424576142536020830183614e6a565b61425e60018461586b565b81811061426d5761426d614eaf565b90506020020160208101906142829190614e4f565b6001600160a01b03166142986020840184614e6a565b838181106142a8576142a8614eaf565b90506020020160208101906142bd9190614e4f565b6001600160a01b031610156142e557604051630dbc8d5f60e31b815260040160405180910390fd5b600101614230565b6142f5613d52565b6142fd61466b565b610e8a81614673565b61430e613d52565b613d9b61475b565b61431e613d52565b5f61432761244f565b905061ffff8616158061433f575061271061ffff8716115b1561436357604051635f12e6c360e11b815261ffff871660048201526024016104ed565b878911156143875760405163222d164360e21b8152600481018a90526024016104ed565b60ff8516158061439a5750600a60ff8616115b156143bd5760405163170db35960e31b815260ff861660048201526024016104ed565b7fe92546d698950ddd38910d2e15ed1d923cd0a7b3dde9e2a6a3f380565559cb01546001600160401b03166001600160401b0316876001600160401b03161015614424576040516202a06d60e11b81526001600160401b03881660048201526024016104ed565b835f036144445760405163a733007160e01b815260040160405180910390fd5b8161446557604051632f6bd1db60e01b8152600481018390526024016104ed565b97885560018801969096556002870180546001600160401b039690961669ffffffffffffffffffff1990961695909517600160401b61ffff95909516949094029390931767ffffffffffffffff60501b191660ff92909216600160501b029190911790925560038401919091556004830180546001600160a01b0319166001600160a01b03909216919091179055600590910155565b606061206a83835f614763565b6040516370a0823160e01b81523060048201525f9081906001600160a01b038616906370a0823190602401602060405180830381865afa15801561454e573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906145729190614e38565b90506145896001600160a01b0386168530866147f2565b6040516370a0823160e01b81523060048201525f906001600160a01b038716906370a0823190602401602060405180830381865afa1580156145cd573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906145f19190614e38565b90508181116146575760405162461bcd60e51b815260206004820152602c60248201527f5361666545524332305472616e7366657246726f6d3a2062616c616e6365206e60448201526b1bdd081a5b98dc99585cd95960a21b60648201526084016104ed565b614661828261586b565b9695505050505050565b613d9b613d52565b61467b613d52565b80355f8051602061590e83398151915290815560146146a06060840160408501615897565b60ff1611806146bf57506146ba6060830160408401615897565b60ff16155b156146f3576146d46060830160408401615897565b604051634a59bbff60e11b815260ff90911660048201526024016104ed565b6147036060830160408401615897565b60018201805460ff92909216600160401b0260ff60401b199092169190911790556147346040830160208401614ac7565b600191909101805467ffffffffffffffff19166001600160401b0390921691909117905550565b612a93613d52565b6060814710156147885760405163cd78605960e01b81523060048201526024016104ed565b5f80856001600160a01b031684866040516147a39190614fa9565b5f6040518083038185875af1925050503d805f81146147dd576040519150601f19603f3d011682016040523d82523d5f602084013e6147e2565b606091505b509150915061466186838361482b565b6040516001600160a01b03848116602483015283811660448301526064820183905261077c9186918216906323b872dd9060840161372b565b6060826148405761483b82614887565b61206a565b815115801561485757506001600160a01b0384163b155b1561488057604051639996b31560e01b81526001600160a01b03851660048201526024016104ed565b508061206a565b8051156148975780518082602001fd5b604051630a12f52160e11b815260040160405180910390fd5b5080546148bc90614cb4565b5f825580601f106148cb575050565b601f0160209004905f5260205f2090810190610e8a9190614924565b6040805160e08101909152805f81526060602082018190525f604083018190529082018190526080820181905260a0820181905260c09091015290565b5b80821115614938575f8155600101614925565b5090565b8015158114610e8a575f80fd5b803563ffffffff8116811461495c575f80fd5b919050565b5f805f60608486031215614973575f80fd5b8335925060208401356149858161493c565b915061499360408501614949565b90509250925092565b5f602082840312156149ac575f80fd5b5035919050565b5f80604083850312156149c4575f80fd5b82356001600160401b038111156149d9575f80fd5b8301608081860312156149ea575f80fd5b91506149f860208401614949565b90509250929050565b5f8060408385031215614a12575f80fd5b823591506149f860208401614949565b5f60208284031215614a32575f80fd5b61206a82614949565b803561ffff8116811461495c575f80fd5b6001600160401b0381168114610e8a575f80fd5b5f805f8060808587031215614a73575f80fd5b84356001600160401b03811115614a88575f80fd5b850160a08188031215614a99575f80fd5b9350614aa760208601614a3b565b92506040850135614ab781614a4c565b9396929550929360600135925050565b5f60208284031215614ad7575f80fd5b813561206a81614a4c565b5f8060408385031215614af3575f80fd5b50508035926020909101359150565b6001600160a01b0381168114610e8a575f80fd5b5f80828403610180811215614b29575f80fd5b61016080821215614b38575f80fd5b8493508301359050614b4981614b02565b809150509250929050565b634e487b7160e01b5f52602160045260245ffd5b60068110614b7857614b78614b54565b9052565b5f5b83811015614b96578181015183820152602001614b7e565b50505f910152565b5f8151808452614bb5816020860160208601614b7c565b601f01601f19169290920160200192915050565b60208152614bdb602082018351614b68565b5f602083015160e06040840152614bf6610100840182614b9e565b905060408401516001600160401b0380821660608601528060608701511660808601528060808701511660a08601528060a08701511660c08601528060c08701511660e086015250508091505092915050565b5f8060208385031215614c5a575f80fd5b82356001600160401b0380821115614c70575f80fd5b818501915085601f830112614c83575f80fd5b813581811115614c91575f80fd5b866020828501011115614ca2575f80fd5b60209290920196919550909350505050565b600181811c90821680614cc857607f821691505b602082108103614ce657634e487b7160e01b5f52602260045260245ffd5b50919050565b60208101610dd48284614b68565b634e487b7160e01b5f52604160045260245ffd5b604051606081016001600160401b0381118282101715614d3057614d30614cfa565b60405290565b604080519081016001600160401b0381118282101715614d3057614d30614cfa565b604051601f8201601f191681016001600160401b0381118282101715614d8057614d80614cfa565b604052919050565b5f6001600160401b03821115614da057614da0614cfa565b50601f01601f191660200190565b5f82601f830112614dbd575f80fd5b8151614dd0614dcb82614d88565b614d58565b818152846020838601011115614de4575f80fd5b610eba826020830160208701614b7c565b5f60208284031215614e05575f80fd5b81516001600160401b03811115614e1a575f80fd5b610eba84828501614dae565b602081525f61206a6020830184614b9e565b5f60208284031215614e48575f80fd5b5051919050565b5f60208284031215614e5f575f80fd5b813561206a81614b02565b5f808335601e19843603018112614e7f575f80fd5b8301803591506001600160401b03821115614e98575f80fd5b6020019150600581901b3603821315613206575f80fd5b634e487b7160e01b5f52603260045260245ffd5b5f8235605e19833603018112614ed7575f80fd5b9190910192915050565b5f82601f830112614ef0575f80fd5b8135614efe614dcb82614d88565b818152846020838601011115614f12575f80fd5b816020850160208301375f918101602001919091529392505050565b5f60608236031215614f3e575f80fd5b614f46614d0e565b82356001600160401b0380821115614f5c575f80fd5b614f6836838701614ee1565b83526020850135915080821115614f7d575f80fd5b50614f8a36828601614ee1565b6020830152506040830135614f9e81614a4c565b604082015292915050565b5f8251614ed7818460208701614b7c565b601f8211156104f657805f5260205f20601f840160051c81016020851015614fdf5750805b601f840160051c820191505b81811015611a36575f8155600101614feb565b81516001600160401b0381111561501757615017614cfa565b61502b816150258454614cb4565b84614fba565b602080601f83116001811461505e575f84156150475750858301515b5f19600386901b1c1916600185901b178555610fe6565b5f85815260208120601f198616915b8281101561508c5788860151825594840194600190910190840161506d565b50858210156150a957878501515f19600388901b60f8161c191681555b5050505050600190811b01905550565b634e487b7160e01b5f52601160045260245ffd5b80820180821115610dd457610dd46150b9565b5f63ffffffff8083168181036150f8576150f86150b9565b6001019392505050565b8082028115828204841417610dd457610dd46150b9565b5f808335601e1984360301811261512e575f80fd5b83016020810192503590506001600160401b0381111561514c575f80fd5b803603821315613206575f80fd5b81835281816020850137505f828201602090810191909152601f909101601f19169091010190565b5f8383855260208086019550808560051b830101845f5b8781101561523757848303601f19018952813536889003605e190181126151be575f80fd5b870160606151cc8280615119565b8287526151dc838801828461515a565b925050506151ec86830183615119565b868303888801526151fe83828461515a565b92505050604080830135925061521383614a4c565b6001600160401b039290921694909101939093529783019790830190600101615199565b5090979650505050505050565b6020815281356020820152602082013560408201525f604083013561526881614b02565b6001600160a01b031660608381019190915283013536849003601e1901811261528f575f80fd5b83016020810190356001600160401b038111156152aa575f80fd5b8060051b36038213156152bb575f80fd5b60808085015261339b60a085018284615182565b5f826152e957634e487b7160e01b5f52601260045260245ffd5b500490565b602081016004831061530257615302614b54565b91905290565b5f805f6060848603121561531a575f80fd5b83519250602084015161532c81614a4c565b604085015190925061533d81614a4c565b809150509250925092565b5f8060408385031215615359575f80fd5b825191506020830151614b498161493c565b5f60208083525f845461537d81614cb4565b806020870152604060018084165f811461539e57600181146153ba576153e7565b60ff19851660408a0152604084151560051b8a010195506153e7565b895f5260205f205f5b858110156153de5781548b82018601529083019088016153c3565b8a016040019650505b509398975050505050505050565b818382375f9101908152919050565b6001600160401b03818116838216019080821115612180576121806150b9565b6001600160401b03828116828216039080821115612180576121806150b9565b5f8060408385031215615455575f80fd5b82516001600160401b038082111561546b575f80fd5b908401906060828703121561547e575f80fd5b615486614d0e565b82518152602083015161549881614b02565b60208201526040830151828111156154ae575f80fd5b6154ba88828601614dae565b6040830152508094505050506020830151614b498161493c565b5f80604083850312156154e5575f80fd5b825191506020830151614b4981614a4c565b6001600160401b0381811683821602808216919082811461551a5761551a6150b9565b505092915050565b5f8235603e19833603018112614ed7575f80fd5b5f808335601e1984360301811261554b575f80fd5b8301803591506001600160401b03821115615564575f80fd5b602001915036819003821315613206575f80fd5b602081525f610eba60208301848661515a565b5f6040823603121561559b575f80fd5b6155a3614d36565b6155ac83614949565b81526020808401356001600160401b03808211156155c8575f80fd5b9085019036601f8301126155da575f80fd5b8135818111156155ec576155ec614cfa565b8060051b91506155fd848301614d58565b8181529183018401918481019036841115615616575f80fd5b938501935b83851015615640578435925061563083614b02565b828252938501939085019061561b565b94860194909452509295945050505050565b5f6040830163ffffffff8351168452602080840151604060208701528281518085526060880191506020830194505f92505b808310156156ad5784516001600160a01b03168252938301936001929092019190830190615684565b509695505050505050565b60208152815160208201525f602083015160e060408401526156de610100840182614b9e565b90506040840151601f19808584030160608601526156fc8383614b9e565b92506001600160401b03606087015116608086015260808601519150808584030160a086015261572c8383615652565b925060a08601519150808584030160c08601525061574a8282615652565b91505060c084015161576760e08501826001600160401b03169052565b509392505050565b5f8060408385031215615780575f80fd5b8251915060208301516001600160401b0381111561579c575f80fd5b6157a885828601614dae565b9150509250929050565b6001600160401b038311156157c9576157c9614cfa565b6157dd836157d78354614cb4565b83614fba565b5f601f84116001811461580e575f85156157f75750838201355b5f19600387901b1c1916600186901b178355611a36565b5f83815260208120601f198716915b8281101561583d578685013582556020948501946001909201910161581d565b5086821015615859575f1960f88860031b161c19848701351681555b505060018560011b0183555050505050565b81810381811115610dd457610dd46150b9565b5f6020828403121561588e575f80fd5b61206a82614a3b565b5f602082840312156158a7575f80fd5b813560ff8116811461206a575f80fd5b5f6001600160401b038083168181036150f8576150f86150b9565b5f602082840312156158e2575f80fd5b815161206a8161493c56fe6e5bdfcce15e53c3406ea67bfce37dcd26f5152d5492824e43fd5e3c8ac5ab00e92546d698950ddd38910d2e15ed1d923cd0a7b3dde9e2a6a3f380565559cb009b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f00e92546d698950ddd38910d2e15ed1d923cd0a7b3dde9e2a6a3f380565559cb07a264697066735822122078637ec7666dbc176ed83be02bad89b413eca60a0442f28e389bdc9f65f2f23a64736f6c63430008190033", } // ERC20TokenStakingManagerABI is the input ABI used to generate the binding from. @@ -2998,7 +2998,7 @@ func (_ERC20TokenStakingManager *ERC20TokenStakingManagerFilterer) ParseValidato // ValidatorMessagesMetaData contains all meta data concerning the ValidatorMessages contract. var ValidatorMessagesMetaData = &bind.MetaData{ ABI: "[{\"inputs\":[],\"name\":\"InvalidBLSPublicKey\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"id\",\"type\":\"uint32\"}],\"name\":\"InvalidCodecID\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"actual\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"expected\",\"type\":\"uint32\"}],\"name\":\"InvalidMessageLength\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidMessageType\",\"type\":\"error\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"subnetID\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"validatorManagerBlockchainID\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"validatorManagerAddress\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"bytes\",\"name\":\"nodeID\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"blsPublicKey\",\"type\":\"bytes\"},{\"internalType\":\"uint64\",\"name\":\"weight\",\"type\":\"uint64\"}],\"internalType\":\"structInitialValidator[]\",\"name\":\"initialValidators\",\"type\":\"tuple[]\"}],\"internalType\":\"structConversionData\",\"name\":\"conversionData\",\"type\":\"tuple\"}],\"name\":\"packConversionData\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"validationID\",\"type\":\"bytes32\"},{\"internalType\":\"bool\",\"name\":\"valid\",\"type\":\"bool\"}],\"name\":\"packL1ValidatorRegistrationMessage\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"validationID\",\"type\":\"bytes32\"},{\"internalType\":\"uint64\",\"name\":\"nonce\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"weight\",\"type\":\"uint64\"}],\"name\":\"packL1ValidatorWeightMessage\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"subnetID\",\"type\":\"bytes32\"},{\"internalType\":\"bytes\",\"name\":\"nodeID\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"blsPublicKey\",\"type\":\"bytes\"},{\"internalType\":\"uint64\",\"name\":\"registrationExpiry\",\"type\":\"uint64\"},{\"components\":[{\"internalType\":\"uint32\",\"name\":\"threshold\",\"type\":\"uint32\"},{\"internalType\":\"address[]\",\"name\":\"addresses\",\"type\":\"address[]\"}],\"internalType\":\"structPChainOwner\",\"name\":\"remainingBalanceOwner\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"uint32\",\"name\":\"threshold\",\"type\":\"uint32\"},{\"internalType\":\"address[]\",\"name\":\"addresses\",\"type\":\"address[]\"}],\"internalType\":\"structPChainOwner\",\"name\":\"disableOwner\",\"type\":\"tuple\"},{\"internalType\":\"uint64\",\"name\":\"weight\",\"type\":\"uint64\"}],\"internalType\":\"structValidatorMessages.ValidationPeriod\",\"name\":\"validationPeriod\",\"type\":\"tuple\"}],\"name\":\"packRegisterL1ValidatorMessage\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"conversionID\",\"type\":\"bytes32\"}],\"name\":\"packSubnetToL1ConversionMessage\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"validationID\",\"type\":\"bytes32\"},{\"internalType\":\"uint64\",\"name\":\"uptime\",\"type\":\"uint64\"}],\"name\":\"packValidationUptimeMessage\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"input\",\"type\":\"bytes\"}],\"name\":\"unpackL1ValidatorRegistrationMessage\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"},{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"input\",\"type\":\"bytes\"}],\"name\":\"unpackL1ValidatorWeightMessage\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"},{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"input\",\"type\":\"bytes\"}],\"name\":\"unpackRegisterL1ValidatorMessage\",\"outputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"subnetID\",\"type\":\"bytes32\"},{\"internalType\":\"bytes\",\"name\":\"nodeID\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"blsPublicKey\",\"type\":\"bytes\"},{\"internalType\":\"uint64\",\"name\":\"registrationExpiry\",\"type\":\"uint64\"},{\"components\":[{\"internalType\":\"uint32\",\"name\":\"threshold\",\"type\":\"uint32\"},{\"internalType\":\"address[]\",\"name\":\"addresses\",\"type\":\"address[]\"}],\"internalType\":\"structPChainOwner\",\"name\":\"remainingBalanceOwner\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"uint32\",\"name\":\"threshold\",\"type\":\"uint32\"},{\"internalType\":\"address[]\",\"name\":\"addresses\",\"type\":\"address[]\"}],\"internalType\":\"structPChainOwner\",\"name\":\"disableOwner\",\"type\":\"tuple\"},{\"internalType\":\"uint64\",\"name\":\"weight\",\"type\":\"uint64\"}],\"internalType\":\"structValidatorMessages.ValidationPeriod\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"input\",\"type\":\"bytes\"}],\"name\":\"unpackSubnetToL1ConversionMessage\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"input\",\"type\":\"bytes\"}],\"name\":\"unpackValidationUptimeMessage\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"},{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"pure\",\"type\":\"function\"}]", - Bin: "0x612160610034600b8282823980515f1a607314602857634e487b7160e01b5f525f60045260245ffd5b305f52607381538281f3fe73000000000000000000000000000000000000000030146080604052600436106100b1575f3560e01c8063854a893f11610079578063854a893f146101b257806387418b8e1461020f5780639b83546514610222578063a699c13514610242578063e1d68f3014610255578063eb97ce5114610268575f80fd5b8063021de88f146100b5578063088c2463146100e25780634d8478841461011257806350782b0f146101335780637f7c427a1461016b575b5f80fd5b6100c86100c3366004611904565b610289565b604080519283529015156020830152015b60405180910390f35b6100f56100f0366004611904565b61044a565b604080519283526001600160401b039091166020830152016100d9565b610125610120366004611904565b61063b565b6040519081526020016100d9565b610146610141366004611904565b6107c8565b604080519384526001600160401b0392831660208501529116908201526060016100d9565b6101a561017936600461193d565b604080515f60208201819052602282015260268082019390935281518082039093018352604601905290565b6040516100d991906119a1565b6101a56101c03660046119d5565b604080515f6020820152600360e01b602282015260268101949094526001600160c01b031960c093841b811660468601529190921b16604e830152805180830360360181526056909201905290565b6101a561021d366004611a0e565b610a1e565b610235610230366004611904565b610bff565b6040516100d99190611aaa565b6101a5610250366004611b61565b61154a565b6101a5610263366004611b93565b61158e565b61027b610276366004611ca1565b6115c4565b6040516100d9929190611d9d565b5f8082516027146102c457825160405163cc92daa160e01b815263ffffffff9091166004820152602760248201526044015b60405180910390fd5b5f805b6002811015610313576102db816001611dc9565b6102e6906008611ddc565b61ffff168582815181106102fc576102fc611df3565b016020015160f81c901b91909117906001016102c7565b5061ffff81161561033d5760405163407b587360e01b815261ffff821660048201526024016102bb565b5f805b600481101561039857610354816003611dc9565b61035f906008611ddc565b63ffffffff1686610371836002611e07565b8151811061038157610381611df3565b016020015160f81c901b9190911790600101610340565b5063ffffffff81166002146103c057604051635b60892f60e01b815260040160405180910390fd5b5f805b6020811015610415576103d781601f611dc9565b6103e2906008611ddc565b876103ee836006611e07565b815181106103fe576103fe611df3565b016020015160f81c901b91909117906001016103c3565b505f8660268151811061042a5761042a611df3565b016020015191976001600160f81b03199092161515965090945050505050565b5f808251602e1461048057825160405163cc92daa160e01b815263ffffffff9091166004820152602e60248201526044016102bb565b5f805b60028110156104cf57610497816001611dc9565b6104a2906008611ddc565b61ffff168582815181106104b8576104b8611df3565b016020015160f81c901b9190911790600101610483565b5061ffff8116156104f95760405163407b587360e01b815261ffff821660048201526024016102bb565b5f805b600481101561055457610510816003611dc9565b61051b906008611ddc565b63ffffffff168661052d836002611e07565b8151811061053d5761053d611df3565b016020015160f81c901b91909117906001016104fc565b5063ffffffff81161561057a57604051635b60892f60e01b815260040160405180910390fd5b5f805b60208110156105cf5761059181601f611dc9565b61059c906008611ddc565b876105a8836006611e07565b815181106105b8576105b8611df3565b016020015160f81c901b919091179060010161057d565b505f805b600881101561062e576105e7816007611dc9565b6105f2906008611ddc565b6001600160401b031688610607836026611e07565b8151811061061757610617611df3565b016020015160f81c901b91909117906001016105d3565b5090969095509350505050565b5f815160261461067057815160405163cc92daa160e01b815263ffffffff9091166004820152602660248201526044016102bb565b5f805b60028110156106bf57610687816001611dc9565b610692906008611ddc565b61ffff168482815181106106a8576106a8611df3565b016020015160f81c901b9190911790600101610673565b5061ffff8116156106e95760405163407b587360e01b815261ffff821660048201526024016102bb565b5f805b600481101561074457610700816003611dc9565b61070b906008611ddc565b63ffffffff168561071d836002611e07565b8151811061072d5761072d611df3565b016020015160f81c901b91909117906001016106ec565b5063ffffffff81161561076a57604051635b60892f60e01b815260040160405180910390fd5b5f805b60208110156107bf5761078181601f611dc9565b61078c906008611ddc565b86610798836006611e07565b815181106107a8576107a8611df3565b016020015160f81c901b919091179060010161076d565b50949350505050565b5f805f83516036146107ff57835160405163cc92daa160e01b815263ffffffff9091166004820152603660248201526044016102bb565b5f805b600281101561084e57610816816001611dc9565b610821906008611ddc565b61ffff1686828151811061083757610837611df3565b016020015160f81c901b9190911790600101610802565b5061ffff8116156108785760405163407b587360e01b815261ffff821660048201526024016102bb565b5f805b60048110156108d35761088f816003611dc9565b61089a906008611ddc565b63ffffffff16876108ac836002611e07565b815181106108bc576108bc611df3565b016020015160f81c901b919091179060010161087b565b5063ffffffff81166003146108fb57604051635b60892f60e01b815260040160405180910390fd5b5f805b60208110156109505761091281601f611dc9565b61091d906008611ddc565b88610929836006611e07565b8151811061093957610939611df3565b016020015160f81c901b91909117906001016108fe565b505f805b60088110156109af57610968816007611dc9565b610973906008611ddc565b6001600160401b031689610988836026611e07565b8151811061099857610998611df3565b016020015160f81c901b9190911790600101610954565b505f805b6008811015610a0e576109c7816007611dc9565b6109d2906008611ddc565b6001600160401b03168a6109e783602e611e07565b815181106109f7576109f7611df3565b016020015160f81c901b91909117906001016109b3565b5091989097509095509350505050565b60605f80833560208501356014610a3a87870160408901611e1a565b610a476060890189611e33565b60405160f09790971b6001600160f01b0319166020880152602287019590955250604285019290925260e090811b6001600160e01b0319908116606286015260609290921b6bffffffffffffffffffffffff191660668501529190911b16607a820152607e0160405160208183030381529060405290505f5b610acd6060850185611e33565b9050811015610bf85781610ae46060860186611e33565b83818110610af457610af4611df3565b9050602002810190610b069190611e7f565b610b109080611e9d565b9050610b1f6060870187611e33565b84818110610b2f57610b2f611df3565b9050602002810190610b419190611e7f565b610b4b9080611e9d565b610b586060890189611e33565b86818110610b6857610b68611df3565b9050602002810190610b7a9190611e7f565b610b88906020810190611e9d565b610b9560608b018b611e33565b88818110610ba557610ba5611df3565b9050602002810190610bb79190611e7f565b610bc8906060810190604001611edf565b604051602001610bde9796959493929190611ef8565b60408051601f198184030181529190529150600101610ac0565b5092915050565b610c076117b1565b5f610c106117b1565b5f805b6002811015610c6e57610c27816001611dc9565b610c32906008611ddc565b61ffff1686610c4763ffffffff871684611e07565b81518110610c5757610c57611df3565b016020015160f81c901b9190911790600101610c13565b5061ffff811615610c985760405163407b587360e01b815261ffff821660048201526024016102bb565b610ca3600284611f61565b9250505f805b6004811015610d0857610cbd816003611dc9565b610cc8906008611ddc565b63ffffffff16868563ffffffff1683610ce19190611e07565b81518110610cf157610cf1611df3565b016020015160f81c901b9190911790600101610ca9565b5063ffffffff8116600114610d3057604051635b60892f60e01b815260040160405180910390fd5b610d3b600484611f61565b9250505f805b6020811015610d9857610d5581601f611dc9565b610d60906008611ddc565b86610d7163ffffffff871684611e07565b81518110610d8157610d81611df3565b016020015160f81c901b9190911790600101610d41565b50808252610da7602084611f61565b9250505f805b6004811015610e0c57610dc1816003611dc9565b610dcc906008611ddc565b63ffffffff16868563ffffffff1683610de59190611e07565b81518110610df557610df5611df3565b016020015160f81c901b9190911790600101610dad565b50610e18600484611f61565b92505f8163ffffffff166001600160401b03811115610e3957610e3961180b565b6040519080825280601f01601f191660200182016040528015610e63576020820181803683370190505b5090505f5b8263ffffffff16811015610ed25786610e8763ffffffff871683611e07565b81518110610e9757610e97611df3565b602001015160f81c60f81b828281518110610eb457610eb4611df3565b60200101906001600160f81b03191690815f1a905350600101610e68565b5060208301819052610ee48285611f61565b604080516030808252606082019092529195505f92506020820181803683370190505090505f5b6030811015610f705786610f2563ffffffff871683611e07565b81518110610f3557610f35611df3565b602001015160f81c60f81b828281518110610f5257610f52611df3565b60200101906001600160f81b03191690815f1a905350600101610f0b565b5060408301819052610f83603085611f61565b9350505f805b6008811015610fe957610f9d816007611dc9565b610fa8906008611ddc565b6001600160401b031687610fc263ffffffff881684611e07565b81518110610fd257610fd2611df3565b016020015160f81c901b9190911790600101610f89565b506001600160401b0381166060840152611004600885611f61565b9350505f805f5b600481101561106a5761101f816003611dc9565b61102a906008611ddc565b63ffffffff16888763ffffffff16836110439190611e07565b8151811061105357611053611df3565b016020015160f81c901b919091179060010161100b565b50611076600486611f61565b94505f5b60048110156110d95761108e816003611dc9565b611099906008611ddc565b63ffffffff16888763ffffffff16836110b29190611e07565b815181106110c2576110c2611df3565b016020015160f81c901b929092179160010161107a565b506110e5600486611f61565b94505f8263ffffffff166001600160401b038111156111065761110661180b565b60405190808252806020026020018201604052801561112f578160200160208202803683370190505b5090505f5b8363ffffffff16811015611217576040805160148082528183019092525f916020820181803683370190505090505f5b60148110156111c9578a61117e63ffffffff8b1683611e07565b8151811061118e5761118e611df3565b602001015160f81c60f81b8282815181106111ab576111ab611df3565b60200101906001600160f81b03191690815f1a905350600101611164565b505f60148201519050808484815181106111e5576111e5611df3565b6001600160a01b039092166020928302919091019091015261120860148a611f61565b98505050806001019050611134565b506040805180820190915263ffffffff9092168252602082015260808401525f80805b60048110156112995761124e816003611dc9565b611259906008611ddc565b63ffffffff16898863ffffffff16836112729190611e07565b8151811061128257611282611df3565b016020015160f81c901b919091179060010161123a565b506112a5600487611f61565b95505f5b6004811015611308576112bd816003611dc9565b6112c8906008611ddc565b63ffffffff16898863ffffffff16836112e19190611e07565b815181106112f1576112f1611df3565b016020015160f81c901b92909217916001016112a9565b50611314600487611f61565b95505f8263ffffffff166001600160401b038111156113355761133561180b565b60405190808252806020026020018201604052801561135e578160200160208202803683370190505b5090505f5b8363ffffffff16811015611446576040805160148082528183019092525f916020820181803683370190505090505f5b60148110156113f8578b6113ad63ffffffff8c1683611e07565b815181106113bd576113bd611df3565b602001015160f81c60f81b8282815181106113da576113da611df3565b60200101906001600160f81b03191690815f1a905350600101611393565b505f601482015190508084848151811061141457611414611df3565b6001600160a01b039092166020928302919091019091015261143760148b611f61565b99505050806001019050611363565b506040805180820190915263ffffffff9092168252602082015260a08501525f6114708284611f61565b61147b906014611f7e565b61148685607a611f61565b6114909190611f61565b90508063ffffffff168851146114cc57875160405163cc92daa160e01b815263ffffffff918216600482015290821660248201526044016102bb565b5f805b600881101561152f576114e3816007611dc9565b6114ee906008611ddc565b6001600160401b03168a61150863ffffffff8b1684611e07565b8151811061151857611518611df3565b016020015160f81c901b91909117906001016114cf565b506001600160401b031660c086015250929695505050505050565b6040515f6020820152600160e11b60228201526026810183905281151560f81b60468201526060906047015b60405160208183030381529060405290505b92915050565b6040515f602082018190526022820152602681018390526001600160c01b031960c083901b166046820152606090604e01611576565b5f60608260400151516030146115ed5760405163180ffa0d60e01b815260040160405180910390fd5b82516020808501518051604080880151606089015160808a01518051908701515193515f9861162e988a986001989297929690959094909390929101611fa6565b60405160208183030381529060405290505f5b846080015160200151518110156116a05781856080015160200151828151811061166d5761166d611df3565b6020026020010151604051602001611686929190612060565b60408051601f198184030181529190529150600101611641565b5060a08401518051602091820151516040516116c0938593929101612096565b60405160208183030381529060405290505f5b8460a00151602001515181101561173257818560a001516020015182815181106116ff576116ff611df3565b6020026020010151604051602001611718929190612060565b60408051601f1981840301815291905291506001016116d3565b5060c08401516040516117499183916020016120d1565b604051602081830303815290604052905060028160405161176a9190612102565b602060405180830381855afa158015611785573d5f803e3d5ffd5b5050506040513d601f19601f820116820180604052508101906117a89190612113565b94909350915050565b6040805160e0810182525f808252606060208084018290528385018290528184018390528451808601865283815280820183905260808501528451808601909552918452908301529060a082019081525f60209091015290565b634e487b7160e01b5f52604160045260245ffd5b604080519081016001600160401b03811182821017156118415761184161180b565b60405290565b60405160e081016001600160401b03811182821017156118415761184161180b565b604051601f8201601f191681016001600160401b03811182821017156118915761189161180b565b604052919050565b5f82601f8301126118a8575f80fd5b81356001600160401b038111156118c1576118c161180b565b6118d4601f8201601f1916602001611869565b8181528460208386010111156118e8575f80fd5b816020850160208301375f918101602001919091529392505050565b5f60208284031215611914575f80fd5b81356001600160401b03811115611929575f80fd5b61193584828501611899565b949350505050565b5f6020828403121561194d575f80fd5b5035919050565b5f5b8381101561196e578181015183820152602001611956565b50505f910152565b5f815180845261198d816020860160208601611954565b601f01601f19169290920160200192915050565b602081525f6119b36020830184611976565b9392505050565b80356001600160401b03811681146119d0575f80fd5b919050565b5f805f606084860312156119e7575f80fd5b833592506119f7602085016119ba565b9150611a05604085016119ba565b90509250925092565b5f60208284031215611a1e575f80fd5b81356001600160401b03811115611a33575f80fd5b8201608081850312156119b3575f80fd5b5f6040830163ffffffff8351168452602080840151604060208701528281518085526060880191506020830194505f92505b80831015611a9f5784516001600160a01b03168252938301936001929092019190830190611a76565b509695505050505050565b60208152815160208201525f602083015160e06040840152611ad0610100840182611976565b90506040840151601f1980858403016060860152611aee8383611976565b92506001600160401b03606087015116608086015260808601519150808584030160a0860152611b1e8383611a44565b925060a08601519150808584030160c086015250611b3c8282611a44565b91505060c0840151611b5960e08501826001600160401b03169052565b509392505050565b5f8060408385031215611b72575f80fd5b8235915060208301358015158114611b88575f80fd5b809150509250929050565b5f8060408385031215611ba4575f80fd5b82359150611bb4602084016119ba565b90509250929050565b80356001600160a01b03811681146119d0575f80fd5b5f60408284031215611be3575f80fd5b611beb61181f565b9050813563ffffffff81168114611c00575f80fd5b81526020828101356001600160401b0380821115611c1c575f80fd5b818501915085601f830112611c2f575f80fd5b813581811115611c4157611c4161180b565b8060051b9150611c52848301611869565b8181529183018401918481019088841115611c6b575f80fd5b938501935b83851015611c9057611c8185611bbd565b82529385019390850190611c70565b808688015250505050505092915050565b5f60208284031215611cb1575f80fd5b81356001600160401b0380821115611cc7575f80fd5b9083019060e08286031215611cda575f80fd5b611ce2611847565b82358152602083013582811115611cf7575f80fd5b611d0387828601611899565b602083015250604083013582811115611d1a575f80fd5b611d2687828601611899565b604083015250611d38606084016119ba565b6060820152608083013582811115611d4e575f80fd5b611d5a87828601611bd3565b60808301525060a083013582811115611d71575f80fd5b611d7d87828601611bd3565b60a083015250611d8f60c084016119ba565b60c082015295945050505050565b828152604060208201525f6119356040830184611976565b634e487b7160e01b5f52601160045260245ffd5b8181038181111561158857611588611db5565b808202811582820484141761158857611588611db5565b634e487b7160e01b5f52603260045260245ffd5b8082018082111561158857611588611db5565b5f60208284031215611e2a575f80fd5b6119b382611bbd565b5f808335601e19843603018112611e48575f80fd5b8301803591506001600160401b03821115611e61575f80fd5b6020019150600581901b3603821315611e78575f80fd5b9250929050565b5f8235605e19833603018112611e93575f80fd5b9190910192915050565b5f808335601e19843603018112611eb2575f80fd5b8301803591506001600160401b03821115611ecb575f80fd5b602001915036819003821315611e78575f80fd5b5f60208284031215611eef575f80fd5b6119b3826119ba565b5f8851611f09818460208d01611954565b60e089901b6001600160e01b031916908301908152868860048301378681019050600481015f8152858782375060c09390931b6001600160c01b0319166004939094019283019390935250600c019695505050505050565b63ffffffff818116838216019080821115610bf857610bf8611db5565b63ffffffff818116838216028082169190828114611f9e57611f9e611db5565b505092915050565b61ffff60f01b8a60f01b1681525f63ffffffff60e01b808b60e01b166002840152896006840152808960e01b166026840152508651611fec81602a850160208b01611954565b86519083019061200381602a840160208b01611954565b60c087901b6001600160c01b031916602a9290910191820152612035603282018660e01b6001600160e01b0319169052565b61204e603682018560e01b6001600160e01b0319169052565b603a019b9a5050505050505050505050565b5f8351612071818460208801611954565b60609390931b6bffffffffffffffffffffffff19169190920190815260140192915050565b5f84516120a7818460208901611954565b6001600160e01b031960e095861b8116919093019081529290931b16600482015260080192915050565b5f83516120e2818460208801611954565b60c09390931b6001600160c01b0319169190920190815260080192915050565b5f8251611e93818460208701611954565b5f60208284031215612123575f80fd5b505191905056fea26469706673582212202d7d64f0428d7e99357ab60d9a73b8ca490d4f97c12eed734b80a5bb6df8eeea64736f6c63430008190033", + Bin: "0x612160610034600b8282823980515f1a607314602857634e487b7160e01b5f525f60045260245ffd5b305f52607381538281f3fe73000000000000000000000000000000000000000030146080604052600436106100b1575f3560e01c8063854a893f11610079578063854a893f146101b257806387418b8e1461020f5780639b83546514610222578063a699c13514610242578063e1d68f3014610255578063eb97ce5114610268575f80fd5b8063021de88f146100b5578063088c2463146100e25780634d8478841461011257806350782b0f146101335780637f7c427a1461016b575b5f80fd5b6100c86100c3366004611904565b610289565b604080519283529015156020830152015b60405180910390f35b6100f56100f0366004611904565b61044a565b604080519283526001600160401b039091166020830152016100d9565b610125610120366004611904565b61063b565b6040519081526020016100d9565b610146610141366004611904565b6107c8565b604080519384526001600160401b0392831660208501529116908201526060016100d9565b6101a561017936600461193d565b604080515f60208201819052602282015260268082019390935281518082039093018352604601905290565b6040516100d991906119a1565b6101a56101c03660046119d5565b604080515f6020820152600360e01b602282015260268101949094526001600160c01b031960c093841b811660468601529190921b16604e830152805180830360360181526056909201905290565b6101a561021d366004611a0e565b610a1e565b610235610230366004611904565b610bff565b6040516100d99190611aaa565b6101a5610250366004611b61565b61154a565b6101a5610263366004611b93565b61158e565b61027b610276366004611ca1565b6115c4565b6040516100d9929190611d9d565b5f8082516027146102c457825160405163cc92daa160e01b815263ffffffff9091166004820152602760248201526044015b60405180910390fd5b5f805b6002811015610313576102db816001611dc9565b6102e6906008611ddc565b61ffff168582815181106102fc576102fc611df3565b016020015160f81c901b91909117906001016102c7565b5061ffff81161561033d5760405163407b587360e01b815261ffff821660048201526024016102bb565b5f805b600481101561039857610354816003611dc9565b61035f906008611ddc565b63ffffffff1686610371836002611e07565b8151811061038157610381611df3565b016020015160f81c901b9190911790600101610340565b5063ffffffff81166002146103c057604051635b60892f60e01b815260040160405180910390fd5b5f805b6020811015610415576103d781601f611dc9565b6103e2906008611ddc565b876103ee836006611e07565b815181106103fe576103fe611df3565b016020015160f81c901b91909117906001016103c3565b505f8660268151811061042a5761042a611df3565b016020015191976001600160f81b03199092161515965090945050505050565b5f808251602e1461048057825160405163cc92daa160e01b815263ffffffff9091166004820152602e60248201526044016102bb565b5f805b60028110156104cf57610497816001611dc9565b6104a2906008611ddc565b61ffff168582815181106104b8576104b8611df3565b016020015160f81c901b9190911790600101610483565b5061ffff8116156104f95760405163407b587360e01b815261ffff821660048201526024016102bb565b5f805b600481101561055457610510816003611dc9565b61051b906008611ddc565b63ffffffff168661052d836002611e07565b8151811061053d5761053d611df3565b016020015160f81c901b91909117906001016104fc565b5063ffffffff81161561057a57604051635b60892f60e01b815260040160405180910390fd5b5f805b60208110156105cf5761059181601f611dc9565b61059c906008611ddc565b876105a8836006611e07565b815181106105b8576105b8611df3565b016020015160f81c901b919091179060010161057d565b505f805b600881101561062e576105e7816007611dc9565b6105f2906008611ddc565b6001600160401b031688610607836026611e07565b8151811061061757610617611df3565b016020015160f81c901b91909117906001016105d3565b5090969095509350505050565b5f815160261461067057815160405163cc92daa160e01b815263ffffffff9091166004820152602660248201526044016102bb565b5f805b60028110156106bf57610687816001611dc9565b610692906008611ddc565b61ffff168482815181106106a8576106a8611df3565b016020015160f81c901b9190911790600101610673565b5061ffff8116156106e95760405163407b587360e01b815261ffff821660048201526024016102bb565b5f805b600481101561074457610700816003611dc9565b61070b906008611ddc565b63ffffffff168561071d836002611e07565b8151811061072d5761072d611df3565b016020015160f81c901b91909117906001016106ec565b5063ffffffff81161561076a57604051635b60892f60e01b815260040160405180910390fd5b5f805b60208110156107bf5761078181601f611dc9565b61078c906008611ddc565b86610798836006611e07565b815181106107a8576107a8611df3565b016020015160f81c901b919091179060010161076d565b50949350505050565b5f805f83516036146107ff57835160405163cc92daa160e01b815263ffffffff9091166004820152603660248201526044016102bb565b5f805b600281101561084e57610816816001611dc9565b610821906008611ddc565b61ffff1686828151811061083757610837611df3565b016020015160f81c901b9190911790600101610802565b5061ffff8116156108785760405163407b587360e01b815261ffff821660048201526024016102bb565b5f805b60048110156108d35761088f816003611dc9565b61089a906008611ddc565b63ffffffff16876108ac836002611e07565b815181106108bc576108bc611df3565b016020015160f81c901b919091179060010161087b565b5063ffffffff81166003146108fb57604051635b60892f60e01b815260040160405180910390fd5b5f805b60208110156109505761091281601f611dc9565b61091d906008611ddc565b88610929836006611e07565b8151811061093957610939611df3565b016020015160f81c901b91909117906001016108fe565b505f805b60088110156109af57610968816007611dc9565b610973906008611ddc565b6001600160401b031689610988836026611e07565b8151811061099857610998611df3565b016020015160f81c901b9190911790600101610954565b505f805b6008811015610a0e576109c7816007611dc9565b6109d2906008611ddc565b6001600160401b03168a6109e783602e611e07565b815181106109f7576109f7611df3565b016020015160f81c901b91909117906001016109b3565b5091989097509095509350505050565b60605f80833560208501356014610a3a87870160408901611e1a565b610a476060890189611e33565b60405160f09790971b6001600160f01b0319166020880152602287019590955250604285019290925260e090811b6001600160e01b0319908116606286015260609290921b6bffffffffffffffffffffffff191660668501529190911b16607a820152607e0160405160208183030381529060405290505f5b610acd6060850185611e33565b9050811015610bf85781610ae46060860186611e33565b83818110610af457610af4611df3565b9050602002810190610b069190611e7f565b610b109080611e9d565b9050610b1f6060870187611e33565b84818110610b2f57610b2f611df3565b9050602002810190610b419190611e7f565b610b4b9080611e9d565b610b586060890189611e33565b86818110610b6857610b68611df3565b9050602002810190610b7a9190611e7f565b610b88906020810190611e9d565b610b9560608b018b611e33565b88818110610ba557610ba5611df3565b9050602002810190610bb79190611e7f565b610bc8906060810190604001611edf565b604051602001610bde9796959493929190611ef8565b60408051601f198184030181529190529150600101610ac0565b5092915050565b610c076117b1565b5f610c106117b1565b5f805b6002811015610c6e57610c27816001611dc9565b610c32906008611ddc565b61ffff1686610c4763ffffffff871684611e07565b81518110610c5757610c57611df3565b016020015160f81c901b9190911790600101610c13565b5061ffff811615610c985760405163407b587360e01b815261ffff821660048201526024016102bb565b610ca3600284611f61565b9250505f805b6004811015610d0857610cbd816003611dc9565b610cc8906008611ddc565b63ffffffff16868563ffffffff1683610ce19190611e07565b81518110610cf157610cf1611df3565b016020015160f81c901b9190911790600101610ca9565b5063ffffffff8116600114610d3057604051635b60892f60e01b815260040160405180910390fd5b610d3b600484611f61565b9250505f805b6020811015610d9857610d5581601f611dc9565b610d60906008611ddc565b86610d7163ffffffff871684611e07565b81518110610d8157610d81611df3565b016020015160f81c901b9190911790600101610d41565b50808252610da7602084611f61565b9250505f805b6004811015610e0c57610dc1816003611dc9565b610dcc906008611ddc565b63ffffffff16868563ffffffff1683610de59190611e07565b81518110610df557610df5611df3565b016020015160f81c901b9190911790600101610dad565b50610e18600484611f61565b92505f8163ffffffff166001600160401b03811115610e3957610e3961180b565b6040519080825280601f01601f191660200182016040528015610e63576020820181803683370190505b5090505f5b8263ffffffff16811015610ed25786610e8763ffffffff871683611e07565b81518110610e9757610e97611df3565b602001015160f81c60f81b828281518110610eb457610eb4611df3565b60200101906001600160f81b03191690815f1a905350600101610e68565b5060208301819052610ee48285611f61565b604080516030808252606082019092529195505f92506020820181803683370190505090505f5b6030811015610f705786610f2563ffffffff871683611e07565b81518110610f3557610f35611df3565b602001015160f81c60f81b828281518110610f5257610f52611df3565b60200101906001600160f81b03191690815f1a905350600101610f0b565b5060408301819052610f83603085611f61565b9350505f805b6008811015610fe957610f9d816007611dc9565b610fa8906008611ddc565b6001600160401b031687610fc263ffffffff881684611e07565b81518110610fd257610fd2611df3565b016020015160f81c901b9190911790600101610f89565b506001600160401b0381166060840152611004600885611f61565b9350505f805f5b600481101561106a5761101f816003611dc9565b61102a906008611ddc565b63ffffffff16888763ffffffff16836110439190611e07565b8151811061105357611053611df3565b016020015160f81c901b919091179060010161100b565b50611076600486611f61565b94505f5b60048110156110d95761108e816003611dc9565b611099906008611ddc565b63ffffffff16888763ffffffff16836110b29190611e07565b815181106110c2576110c2611df3565b016020015160f81c901b929092179160010161107a565b506110e5600486611f61565b94505f8263ffffffff166001600160401b038111156111065761110661180b565b60405190808252806020026020018201604052801561112f578160200160208202803683370190505b5090505f5b8363ffffffff16811015611217576040805160148082528183019092525f916020820181803683370190505090505f5b60148110156111c9578a61117e63ffffffff8b1683611e07565b8151811061118e5761118e611df3565b602001015160f81c60f81b8282815181106111ab576111ab611df3565b60200101906001600160f81b03191690815f1a905350600101611164565b505f60148201519050808484815181106111e5576111e5611df3565b6001600160a01b039092166020928302919091019091015261120860148a611f61565b98505050806001019050611134565b506040805180820190915263ffffffff9092168252602082015260808401525f80805b60048110156112995761124e816003611dc9565b611259906008611ddc565b63ffffffff16898863ffffffff16836112729190611e07565b8151811061128257611282611df3565b016020015160f81c901b919091179060010161123a565b506112a5600487611f61565b95505f5b6004811015611308576112bd816003611dc9565b6112c8906008611ddc565b63ffffffff16898863ffffffff16836112e19190611e07565b815181106112f1576112f1611df3565b016020015160f81c901b92909217916001016112a9565b50611314600487611f61565b95505f8263ffffffff166001600160401b038111156113355761133561180b565b60405190808252806020026020018201604052801561135e578160200160208202803683370190505b5090505f5b8363ffffffff16811015611446576040805160148082528183019092525f916020820181803683370190505090505f5b60148110156113f8578b6113ad63ffffffff8c1683611e07565b815181106113bd576113bd611df3565b602001015160f81c60f81b8282815181106113da576113da611df3565b60200101906001600160f81b03191690815f1a905350600101611393565b505f601482015190508084848151811061141457611414611df3565b6001600160a01b039092166020928302919091019091015261143760148b611f61565b99505050806001019050611363565b506040805180820190915263ffffffff9092168252602082015260a08501525f6114708284611f61565b61147b906014611f7e565b61148685607a611f61565b6114909190611f61565b90508063ffffffff168851146114cc57875160405163cc92daa160e01b815263ffffffff918216600482015290821660248201526044016102bb565b5f805b600881101561152f576114e3816007611dc9565b6114ee906008611ddc565b6001600160401b03168a61150863ffffffff8b1684611e07565b8151811061151857611518611df3565b016020015160f81c901b91909117906001016114cf565b506001600160401b031660c086015250929695505050505050565b6040515f6020820152600160e11b60228201526026810183905281151560f81b60468201526060906047015b60405160208183030381529060405290505b92915050565b6040515f602082018190526022820152602681018390526001600160c01b031960c083901b166046820152606090604e01611576565b5f60608260400151516030146115ed5760405163180ffa0d60e01b815260040160405180910390fd5b82516020808501518051604080880151606089015160808a01518051908701515193515f9861162e988a986001989297929690959094909390929101611fa6565b60405160208183030381529060405290505f5b846080015160200151518110156116a05781856080015160200151828151811061166d5761166d611df3565b6020026020010151604051602001611686929190612060565b60408051601f198184030181529190529150600101611641565b5060a08401518051602091820151516040516116c0938593929101612096565b60405160208183030381529060405290505f5b8460a00151602001515181101561173257818560a001516020015182815181106116ff576116ff611df3565b6020026020010151604051602001611718929190612060565b60408051601f1981840301815291905291506001016116d3565b5060c08401516040516117499183916020016120d1565b604051602081830303815290604052905060028160405161176a9190612102565b602060405180830381855afa158015611785573d5f803e3d5ffd5b5050506040513d601f19601f820116820180604052508101906117a89190612113565b94909350915050565b6040805160e0810182525f808252606060208084018290528385018290528184018390528451808601865283815280820183905260808501528451808601909552918452908301529060a082019081525f60209091015290565b634e487b7160e01b5f52604160045260245ffd5b604080519081016001600160401b03811182821017156118415761184161180b565b60405290565b60405160e081016001600160401b03811182821017156118415761184161180b565b604051601f8201601f191681016001600160401b03811182821017156118915761189161180b565b604052919050565b5f82601f8301126118a8575f80fd5b81356001600160401b038111156118c1576118c161180b565b6118d4601f8201601f1916602001611869565b8181528460208386010111156118e8575f80fd5b816020850160208301375f918101602001919091529392505050565b5f60208284031215611914575f80fd5b81356001600160401b03811115611929575f80fd5b61193584828501611899565b949350505050565b5f6020828403121561194d575f80fd5b5035919050565b5f5b8381101561196e578181015183820152602001611956565b50505f910152565b5f815180845261198d816020860160208601611954565b601f01601f19169290920160200192915050565b602081525f6119b36020830184611976565b9392505050565b80356001600160401b03811681146119d0575f80fd5b919050565b5f805f606084860312156119e7575f80fd5b833592506119f7602085016119ba565b9150611a05604085016119ba565b90509250925092565b5f60208284031215611a1e575f80fd5b81356001600160401b03811115611a33575f80fd5b8201608081850312156119b3575f80fd5b5f6040830163ffffffff8351168452602080840151604060208701528281518085526060880191506020830194505f92505b80831015611a9f5784516001600160a01b03168252938301936001929092019190830190611a76565b509695505050505050565b60208152815160208201525f602083015160e06040840152611ad0610100840182611976565b90506040840151601f1980858403016060860152611aee8383611976565b92506001600160401b03606087015116608086015260808601519150808584030160a0860152611b1e8383611a44565b925060a08601519150808584030160c086015250611b3c8282611a44565b91505060c0840151611b5960e08501826001600160401b03169052565b509392505050565b5f8060408385031215611b72575f80fd5b8235915060208301358015158114611b88575f80fd5b809150509250929050565b5f8060408385031215611ba4575f80fd5b82359150611bb4602084016119ba565b90509250929050565b80356001600160a01b03811681146119d0575f80fd5b5f60408284031215611be3575f80fd5b611beb61181f565b9050813563ffffffff81168114611c00575f80fd5b81526020828101356001600160401b0380821115611c1c575f80fd5b818501915085601f830112611c2f575f80fd5b813581811115611c4157611c4161180b565b8060051b9150611c52848301611869565b8181529183018401918481019088841115611c6b575f80fd5b938501935b83851015611c9057611c8185611bbd565b82529385019390850190611c70565b808688015250505050505092915050565b5f60208284031215611cb1575f80fd5b81356001600160401b0380821115611cc7575f80fd5b9083019060e08286031215611cda575f80fd5b611ce2611847565b82358152602083013582811115611cf7575f80fd5b611d0387828601611899565b602083015250604083013582811115611d1a575f80fd5b611d2687828601611899565b604083015250611d38606084016119ba565b6060820152608083013582811115611d4e575f80fd5b611d5a87828601611bd3565b60808301525060a083013582811115611d71575f80fd5b611d7d87828601611bd3565b60a083015250611d8f60c084016119ba565b60c082015295945050505050565b828152604060208201525f6119356040830184611976565b634e487b7160e01b5f52601160045260245ffd5b8181038181111561158857611588611db5565b808202811582820484141761158857611588611db5565b634e487b7160e01b5f52603260045260245ffd5b8082018082111561158857611588611db5565b5f60208284031215611e2a575f80fd5b6119b382611bbd565b5f808335601e19843603018112611e48575f80fd5b8301803591506001600160401b03821115611e61575f80fd5b6020019150600581901b3603821315611e78575f80fd5b9250929050565b5f8235605e19833603018112611e93575f80fd5b9190910192915050565b5f808335601e19843603018112611eb2575f80fd5b8301803591506001600160401b03821115611ecb575f80fd5b602001915036819003821315611e78575f80fd5b5f60208284031215611eef575f80fd5b6119b3826119ba565b5f8851611f09818460208d01611954565b60e089901b6001600160e01b031916908301908152868860048301378681019050600481015f8152858782375060c09390931b6001600160c01b0319166004939094019283019390935250600c019695505050505050565b63ffffffff818116838216019080821115610bf857610bf8611db5565b63ffffffff818116838216028082169190828114611f9e57611f9e611db5565b505092915050565b61ffff60f01b8a60f01b1681525f63ffffffff60e01b808b60e01b166002840152896006840152808960e01b166026840152508651611fec81602a850160208b01611954565b86519083019061200381602a840160208b01611954565b60c087901b6001600160c01b031916602a9290910191820152612035603282018660e01b6001600160e01b0319169052565b61204e603682018560e01b6001600160e01b0319169052565b603a019b9a5050505050505050505050565b5f8351612071818460208801611954565b60609390931b6bffffffffffffffffffffffff19169190920190815260140192915050565b5f84516120a7818460208901611954565b6001600160e01b031960e095861b8116919093019081529290931b16600482015260080192915050565b5f83516120e2818460208801611954565b60c09390931b6001600160c01b0319169190920190815260080192915050565b5f8251611e93818460208701611954565b5f60208284031215612123575f80fd5b505191905056fea2646970667358221220c0b30a7d1574f37fe27736317f68c07745760d3ce113e1505eb78f7757b3827064736f6c63430008190033", } // ValidatorMessagesABI is the input ABI used to generate the binding from. diff --git a/abi-bindings/go/validator-manager/ExampleRewardCalculator/ExampleRewardCalculator.go b/abi-bindings/go/validator-manager/ExampleRewardCalculator/ExampleRewardCalculator.go index e21e3f85f..4f7edbbf1 100644 --- a/abi-bindings/go/validator-manager/ExampleRewardCalculator/ExampleRewardCalculator.go +++ b/abi-bindings/go/validator-manager/ExampleRewardCalculator/ExampleRewardCalculator.go @@ -32,7 +32,7 @@ var ( // ExampleRewardCalculatorMetaData contains all meta data concerning the ExampleRewardCalculator contract. var ExampleRewardCalculatorMetaData = &bind.MetaData{ ABI: "[{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"rewardBasisPoints_\",\"type\":\"uint64\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"BIPS_CONVERSION_FACTOR\",\"outputs\":[{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"SECONDS_IN_YEAR\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"UPTIME_REWARDS_THRESHOLD_PERCENTAGE\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"stakeAmount\",\"type\":\"uint256\"},{\"internalType\":\"uint64\",\"name\":\"validatorStartTime\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"stakingStartTime\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"stakingEndTime\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"uptimeSeconds\",\"type\":\"uint64\"}],\"name\":\"calculateReward\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"rewardBasisPoints\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"}]", - Bin: "0x60a0604052348015600e575f80fd5b50604051610393380380610393833981016040819052602b91603b565b6001600160401b03166080526066565b5f60208284031215604a575f80fd5b81516001600160401b0381168114605f575f80fd5b9392505050565b60805161030f6100845f395f818160c50152610161015261030f5ff3fe608060405234801561000f575f80fd5b5060043610610055575f3560e01c80634f22429f146100595780635dcc93911461007f578063a9778a7a1461008a578063afba878a146100a6578063bb65b242146100c0575b5f80fd5b61006c6100673660046101db565b610100565b6040519081526020015b60405180910390f35b61006c6301e1338081565b61009361271081565b60405161ffff9091168152602001610076565b6100ae605081565b60405160ff9091168152602001610076565b6100e77f000000000000000000000000000000000000000000000000000000000000000081565b60405167ffffffffffffffff9091168152602001610076565b5f605061010d8685610249565b6101179190610271565b67ffffffffffffffff1661012c836064610271565b67ffffffffffffffff16101561014357505f6101b6565b6127106301e133806101558686610249565b67ffffffffffffffff167f000000000000000000000000000000000000000000000000000000000000000067ffffffffffffffff1689610195919061029d565b61019f919061029d565b6101a991906102ba565b6101b391906102ba565b90505b95945050505050565b803567ffffffffffffffff811681146101d6575f80fd5b919050565b5f805f805f60a086880312156101ef575f80fd5b853594506101ff602087016101bf565b935061020d604087016101bf565b925061021b606087016101bf565b9150610229608087016101bf565b90509295509295909350565b634e487b7160e01b5f52601160045260245ffd5b67ffffffffffffffff82811682821603908082111561026a5761026a610235565b5092915050565b67ffffffffffffffff81811683821602808216919082811461029557610295610235565b505092915050565b80820281158282048414176102b4576102b4610235565b92915050565b5f826102d457634e487b7160e01b5f52601260045260245ffd5b50049056fea264697066735822122028d2fb7a3833a38f49e49980ae503d498874495b2bbf7743383340f5b41d0d8c64736f6c63430008190033", + Bin: "0x60a0604052348015600e575f80fd5b50604051610393380380610393833981016040819052602b91603b565b6001600160401b03166080526066565b5f60208284031215604a575f80fd5b81516001600160401b0381168114605f575f80fd5b9392505050565b60805161030f6100845f395f818160c50152610161015261030f5ff3fe608060405234801561000f575f80fd5b5060043610610055575f3560e01c80634f22429f146100595780635dcc93911461007f578063a9778a7a1461008a578063afba878a146100a6578063bb65b242146100c0575b5f80fd5b61006c6100673660046101db565b610100565b6040519081526020015b60405180910390f35b61006c6301e1338081565b61009361271081565b60405161ffff9091168152602001610076565b6100ae605081565b60405160ff9091168152602001610076565b6100e77f000000000000000000000000000000000000000000000000000000000000000081565b60405167ffffffffffffffff9091168152602001610076565b5f605061010d8685610249565b6101179190610271565b67ffffffffffffffff1661012c836064610271565b67ffffffffffffffff16101561014357505f6101b6565b6127106301e133806101558686610249565b67ffffffffffffffff167f000000000000000000000000000000000000000000000000000000000000000067ffffffffffffffff1689610195919061029d565b61019f919061029d565b6101a991906102ba565b6101b391906102ba565b90505b95945050505050565b803567ffffffffffffffff811681146101d6575f80fd5b919050565b5f805f805f60a086880312156101ef575f80fd5b853594506101ff602087016101bf565b935061020d604087016101bf565b925061021b606087016101bf565b9150610229608087016101bf565b90509295509295909350565b634e487b7160e01b5f52601160045260245ffd5b67ffffffffffffffff82811682821603908082111561026a5761026a610235565b5092915050565b67ffffffffffffffff81811683821602808216919082811461029557610295610235565b505092915050565b80820281158282048414176102b4576102b4610235565b92915050565b5f826102d457634e487b7160e01b5f52601260045260245ffd5b50049056fea2646970667358221220a017f47278471e139b88da0cb4f0fedb8a1a5488085fabca75070c7dff9f008b64736f6c63430008190033", } // ExampleRewardCalculatorABI is the input ABI used to generate the binding from. diff --git a/abi-bindings/go/validator-manager/NativeTokenStakingManager/NativeTokenStakingManager.go b/abi-bindings/go/validator-manager/NativeTokenStakingManager/NativeTokenStakingManager.go index a9dbdde65..c6644a8a8 100644 --- a/abi-bindings/go/validator-manager/NativeTokenStakingManager/NativeTokenStakingManager.go +++ b/abi-bindings/go/validator-manager/NativeTokenStakingManager/NativeTokenStakingManager.go @@ -104,7 +104,7 @@ type ValidatorRegistrationInput struct { // NativeTokenStakingManagerMetaData contains all meta data concerning the NativeTokenStakingManager contract. var NativeTokenStakingManagerMetaData = &bind.MetaData{ ABI: "[{\"inputs\":[{\"internalType\":\"enumICMInitializable\",\"name\":\"init\",\"type\":\"uint8\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"AddressInsufficientBalance\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"delegationID\",\"type\":\"bytes32\"}],\"name\":\"DelegatorIneligibleForRewards\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"FailedInnerCall\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"length\",\"type\":\"uint256\"}],\"name\":\"InvalidBLSKeyLength\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"encodedConversionID\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"expectedConversionID\",\"type\":\"bytes32\"}],\"name\":\"InvalidConversionID\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"delegationFeeBips\",\"type\":\"uint16\"}],\"name\":\"InvalidDelegationFee\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"delegationID\",\"type\":\"bytes32\"}],\"name\":\"InvalidDelegationID\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"enumDelegatorStatus\",\"name\":\"status\",\"type\":\"uint8\"}],\"name\":\"InvalidDelegatorStatus\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidInitialization\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidInitializationStatus\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint8\",\"name\":\"maximumChurnPercentage\",\"type\":\"uint8\"}],\"name\":\"InvalidMaximumChurnPercentage\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"minStakeDuration\",\"type\":\"uint64\"}],\"name\":\"InvalidMinStakeDuration\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"nodeID\",\"type\":\"bytes\"}],\"name\":\"InvalidNodeID\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"nonce\",\"type\":\"uint64\"}],\"name\":\"InvalidNonce\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"threshold\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"addressesLength\",\"type\":\"uint256\"}],\"name\":\"InvalidPChainOwnerThreshold\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"registrationExpiry\",\"type\":\"uint64\"}],\"name\":\"InvalidRegistrationExpiry\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"stakeAmount\",\"type\":\"uint256\"}],\"name\":\"InvalidStakeAmount\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint8\",\"name\":\"maximumStakeMultiplier\",\"type\":\"uint8\"}],\"name\":\"InvalidStakeMultiplier\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"weight\",\"type\":\"uint256\"}],\"name\":\"InvalidTotalWeight\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"uptimeBlockchainID\",\"type\":\"bytes32\"}],\"name\":\"InvalidUptimeBlockchainID\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"validationID\",\"type\":\"bytes32\"}],\"name\":\"InvalidValidationID\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"validatorManagerAddress\",\"type\":\"address\"}],\"name\":\"InvalidValidatorManagerAddress\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"blockchainID\",\"type\":\"bytes32\"}],\"name\":\"InvalidValidatorManagerBlockchainID\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"enumValidatorStatus\",\"name\":\"status\",\"type\":\"uint8\"}],\"name\":\"InvalidValidatorStatus\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidWarpMessage\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"senderAddress\",\"type\":\"address\"}],\"name\":\"InvalidWarpOriginSenderAddress\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"sourceChainID\",\"type\":\"bytes32\"}],\"name\":\"InvalidWarpSourceChainID\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"churnAmount\",\"type\":\"uint64\"}],\"name\":\"MaxChurnRateExceeded\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"newValidatorWeight\",\"type\":\"uint64\"}],\"name\":\"MaxWeightExceeded\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"endTime\",\"type\":\"uint64\"}],\"name\":\"MinStakeDurationNotPassed\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"nodeID\",\"type\":\"bytes\"}],\"name\":\"NodeAlreadyRegistered\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotInitializing\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"PChainOwnerAddressesNotSorted\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ReentrancyGuardReentrantCall\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"UnauthorizedOwner\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bool\",\"name\":\"validRegistration\",\"type\":\"bool\"}],\"name\":\"UnexpectedRegistrationStatus\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"validationID\",\"type\":\"bytes32\"}],\"name\":\"ValidatorIneligibleForRewards\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"validationID\",\"type\":\"bytes32\"}],\"name\":\"ValidatorNotPoS\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ZeroWeightToValueFactor\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"delegationID\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"validationID\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"rewards\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"fees\",\"type\":\"uint256\"}],\"name\":\"DelegationEnded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"delegationID\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"validationID\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"delegatorAddress\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"nonce\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"validatorWeight\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"delegatorWeight\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"setWeightMessageID\",\"type\":\"bytes32\"}],\"name\":\"DelegatorAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"delegationID\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"validationID\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"startTime\",\"type\":\"uint256\"}],\"name\":\"DelegatorRegistered\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"delegationID\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"validationID\",\"type\":\"bytes32\"}],\"name\":\"DelegatorRemovalInitialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"validationID\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes\",\"name\":\"nodeID\",\"type\":\"bytes\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"weight\",\"type\":\"uint256\"}],\"name\":\"InitialValidatorCreated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"version\",\"type\":\"uint64\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"validationID\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"uptime\",\"type\":\"uint64\"}],\"name\":\"UptimeUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"validationID\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes\",\"name\":\"nodeID\",\"type\":\"bytes\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"registerValidationMessageID\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"weight\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"registrationExpiry\",\"type\":\"uint64\"}],\"name\":\"ValidationPeriodCreated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"validationID\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"enumValidatorStatus\",\"name\":\"status\",\"type\":\"uint8\"}],\"name\":\"ValidationPeriodEnded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"validationID\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"weight\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"}],\"name\":\"ValidationPeriodRegistered\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"validationID\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"setWeightMessageID\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"weight\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"endTime\",\"type\":\"uint256\"}],\"name\":\"ValidatorRemovalInitialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"validationID\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"uint64\",\"name\":\"nonce\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"validatorWeight\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"setWeightMessageID\",\"type\":\"bytes32\"}],\"name\":\"ValidatorWeightUpdate\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"ADDRESS_LENGTH\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"BIPS_CONVERSION_FACTOR\",\"outputs\":[{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"BLS_PUBLIC_KEY_LENGTH\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"MAXIMUM_CHURN_PERCENTAGE_LIMIT\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"MAXIMUM_DELEGATION_FEE_BIPS\",\"outputs\":[{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"MAXIMUM_REGISTRATION_EXPIRY_LENGTH\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"MAXIMUM_STAKE_MULTIPLIER_LIMIT\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"NATIVE_MINTER\",\"outputs\":[{\"internalType\":\"contractINativeMinter\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"POS_VALIDATOR_MANAGER_STORAGE_LOCATION\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"P_CHAIN_BLOCKCHAIN_ID\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"VALIDATOR_MANAGER_STORAGE_LOCATION\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"WARP_MESSENGER\",\"outputs\":[{\"internalType\":\"contractIWarpMessenger\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"validationID\",\"type\":\"bytes32\"}],\"name\":\"claimDelegationFees\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"delegationID\",\"type\":\"bytes32\"},{\"internalType\":\"uint32\",\"name\":\"messageIndex\",\"type\":\"uint32\"}],\"name\":\"completeDelegatorRegistration\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"delegationID\",\"type\":\"bytes32\"},{\"internalType\":\"uint32\",\"name\":\"messageIndex\",\"type\":\"uint32\"}],\"name\":\"completeEndDelegation\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"messageIndex\",\"type\":\"uint32\"}],\"name\":\"completeEndValidation\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"messageIndex\",\"type\":\"uint32\"}],\"name\":\"completeValidatorRegistration\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"delegationID\",\"type\":\"bytes32\"},{\"internalType\":\"bool\",\"name\":\"includeUptimeProof\",\"type\":\"bool\"},{\"internalType\":\"uint32\",\"name\":\"messageIndex\",\"type\":\"uint32\"}],\"name\":\"forceInitializeEndDelegation\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"validationID\",\"type\":\"bytes32\"},{\"internalType\":\"bool\",\"name\":\"includeUptimeProof\",\"type\":\"bool\"},{\"internalType\":\"uint32\",\"name\":\"messageIndex\",\"type\":\"uint32\"}],\"name\":\"forceInitializeEndValidation\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"validationID\",\"type\":\"bytes32\"}],\"name\":\"getValidator\",\"outputs\":[{\"components\":[{\"internalType\":\"enumValidatorStatus\",\"name\":\"status\",\"type\":\"uint8\"},{\"internalType\":\"bytes\",\"name\":\"nodeID\",\"type\":\"bytes\"},{\"internalType\":\"uint64\",\"name\":\"startingWeight\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"messageNonce\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"weight\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"startedAt\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"endedAt\",\"type\":\"uint64\"}],\"internalType\":\"structValidator\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"validationID\",\"type\":\"bytes32\"}],\"name\":\"getWeight\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"subnetID\",\"type\":\"bytes32\"},{\"internalType\":\"uint64\",\"name\":\"churnPeriodSeconds\",\"type\":\"uint64\"},{\"internalType\":\"uint8\",\"name\":\"maximumChurnPercentage\",\"type\":\"uint8\"}],\"internalType\":\"structValidatorManagerSettings\",\"name\":\"baseSettings\",\"type\":\"tuple\"},{\"internalType\":\"uint256\",\"name\":\"minimumStakeAmount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"maximumStakeAmount\",\"type\":\"uint256\"},{\"internalType\":\"uint64\",\"name\":\"minimumStakeDuration\",\"type\":\"uint64\"},{\"internalType\":\"uint16\",\"name\":\"minimumDelegationFeeBips\",\"type\":\"uint16\"},{\"internalType\":\"uint8\",\"name\":\"maximumStakeMultiplier\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"weightToValueFactor\",\"type\":\"uint256\"},{\"internalType\":\"contractIRewardCalculator\",\"name\":\"rewardCalculator\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"uptimeBlockchainID\",\"type\":\"bytes32\"}],\"internalType\":\"structPoSValidatorManagerSettings\",\"name\":\"settings\",\"type\":\"tuple\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"validationID\",\"type\":\"bytes32\"}],\"name\":\"initializeDelegatorRegistration\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"delegationID\",\"type\":\"bytes32\"},{\"internalType\":\"bool\",\"name\":\"includeUptimeProof\",\"type\":\"bool\"},{\"internalType\":\"uint32\",\"name\":\"messageIndex\",\"type\":\"uint32\"}],\"name\":\"initializeEndDelegation\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"validationID\",\"type\":\"bytes32\"},{\"internalType\":\"bool\",\"name\":\"includeUptimeProof\",\"type\":\"bool\"},{\"internalType\":\"uint32\",\"name\":\"messageIndex\",\"type\":\"uint32\"}],\"name\":\"initializeEndValidation\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes\",\"name\":\"nodeID\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"blsPublicKey\",\"type\":\"bytes\"},{\"internalType\":\"uint64\",\"name\":\"registrationExpiry\",\"type\":\"uint64\"},{\"components\":[{\"internalType\":\"uint32\",\"name\":\"threshold\",\"type\":\"uint32\"},{\"internalType\":\"address[]\",\"name\":\"addresses\",\"type\":\"address[]\"}],\"internalType\":\"structPChainOwner\",\"name\":\"remainingBalanceOwner\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"uint32\",\"name\":\"threshold\",\"type\":\"uint32\"},{\"internalType\":\"address[]\",\"name\":\"addresses\",\"type\":\"address[]\"}],\"internalType\":\"structPChainOwner\",\"name\":\"disableOwner\",\"type\":\"tuple\"}],\"internalType\":\"structValidatorRegistrationInput\",\"name\":\"registrationInput\",\"type\":\"tuple\"},{\"internalType\":\"uint16\",\"name\":\"delegationFeeBips\",\"type\":\"uint16\"},{\"internalType\":\"uint64\",\"name\":\"minStakeDuration\",\"type\":\"uint64\"}],\"name\":\"initializeValidatorRegistration\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"subnetID\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"validatorManagerBlockchainID\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"validatorManagerAddress\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"bytes\",\"name\":\"nodeID\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"blsPublicKey\",\"type\":\"bytes\"},{\"internalType\":\"uint64\",\"name\":\"weight\",\"type\":\"uint64\"}],\"internalType\":\"structInitialValidator[]\",\"name\":\"initialValidators\",\"type\":\"tuple[]\"}],\"internalType\":\"structConversionData\",\"name\":\"conversionData\",\"type\":\"tuple\"},{\"internalType\":\"uint32\",\"name\":\"messageIndex\",\"type\":\"uint32\"}],\"name\":\"initializeValidatorSet\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"nodeID\",\"type\":\"bytes\"}],\"name\":\"registeredValidators\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"validationID\",\"type\":\"bytes32\"}],\"name\":\"resendEndValidatorMessage\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"validationID\",\"type\":\"bytes32\"}],\"name\":\"resendRegisterValidatorMessage\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"delegationID\",\"type\":\"bytes32\"}],\"name\":\"resendUpdateDelegation\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"validationID\",\"type\":\"bytes32\"},{\"internalType\":\"uint32\",\"name\":\"messageIndex\",\"type\":\"uint32\"}],\"name\":\"submitUptimeProof\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"valueToWeight\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"weight\",\"type\":\"uint64\"}],\"name\":\"weightToValue\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"}]", - Bin: "0x608060405234801561000f575f80fd5b5060405161589438038061589483398101604081905261002e91610107565b60018160018111156100425761004261012c565b0361004f5761004f610055565b50610140565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00805468010000000000000000900460ff16156100a55760405163f92ee8a960e01b815260040160405180910390fd5b80546001600160401b03908116146101045780546001600160401b0319166001600160401b0390811782556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b50565b5f60208284031215610117575f80fd5b815160028110610125575f80fd5b9392505050565b634e487b7160e01b5f52602160045260245ffd5b6157478061014d5f395ff3fe6080604052600436106101f1575f3560e01c806376f7862111610108578063b771b3bc1161009d578063c599e24f1161006d578063c599e24f1461058d578063c974d1b6146105a0578063d5f20ff6146105b4578063df93d8de146105e0578063fd7ac5e7146105f6575f80fd5b8063b771b3bc14610515578063ba3a4b971461052f578063bc5fbfec1461054e578063bee0a03f1461056e575f80fd5b8063a3a65e48116100d8578063a3a65e48146104c3578063a9778a7a14610345578063af2f5feb146104e2578063afb98096146104f5575f80fd5b806376f786211461045257806380dd672f146104715780638280a25a1461049057806393e24598146104a4575f80fd5b8063329c3e121161018957806360305d621161015957806360305d62146103ab57806360ad7784146103d457806362065856146103f357806366435abf14610420578063732214f81461043f575f80fd5b8063329c3e121461031357806335455ded146103455780633a1cfff61461036d578063467ef06f1461038c575f80fd5b80631ec44724116101c45780631ec447241461027f57806320d91b7a1461029e57806325e1c776146102bd5780632e2194d8146102dc575f80fd5b80630118acc4146101f55780630322ed98146102165780630ba512d114610235578063151d30d114610254575b5f80fd5b348015610200575f80fd5b5061021461020f36600461474b565b610615565b005b348015610221575f80fd5b50610214610230366004614786565b61064a565b348015610240575f80fd5b5061021461024f36600461479d565b6108d1565b34801561025f575f80fd5b50610268600a81565b60405160ff90911681526020015b60405180910390f35b34801561028a575f80fd5b5061021461029936600461474b565b6109ae565b3480156102a9575f80fd5b506102146102b83660046147b4565b6109b9565b3480156102c8575f80fd5b506102146102d7366004614802565b610f3e565b3480156102e7575f80fd5b506102fb6102f6366004614786565b610fb2565b6040516001600160401b039091168152602001610276565b34801561031e575f80fd5b5061032d6001600160991b0181565b6040516001600160a01b039091168152602001610276565b348015610350575f80fd5b5061035a61271081565b60405161ffff9091168152602001610276565b348015610378575f80fd5b5061021461038736600461474b565b61100c565b348015610397575f80fd5b506102146103a6366004614823565b611017565b3480156103b6575f80fd5b506103bf601481565b60405163ffffffff9091168152602001610276565b3480156103df575f80fd5b506102146103ee366004614802565b6110d8565b3480156103fe575f80fd5b5061041261040d366004614850565b6113b0565b604051908152602001610276565b34801561042b575f80fd5b506102fb61043a366004614786565b6113e7565b34801561044a575f80fd5b506104125f81565b34801561045d575f80fd5b5061021461046c36600461474b565b6113fb565b34801561047c575f80fd5b5061021461048b366004614802565b611426565b34801561049b575f80fd5b50610268603081565b3480156104af575f80fd5b506102146104be366004614786565b61166b565b3480156104ce575f80fd5b506102146104dd366004614823565b611736565b6104126104f036600461487c565b61192b565b348015610500575f80fd5b506104125f8051602061569283398151915281565b348015610520575f80fd5b5061032d6005600160991b0181565b34801561053a575f80fd5b50610214610549366004614786565b61195f565b348015610559575f80fd5b506104125f805160206156b283398151915281565b348015610579575f80fd5b50610214610588366004614786565b611bca565b61041261059b366004614786565b611d07565b3480156105ab575f80fd5b50610268601481565b3480156105bf575f80fd5b506105d36105ce366004614786565b611d38565b6040516102769190614952565b3480156105eb575f80fd5b506102fb6202a30081565b348015610601575f80fd5b506104126106103660046149d2565b611e87565b610620838383611ee2565b61064557604051631036cf9160e11b8152600481018490526024015b60405180910390fd5b505050565b5f8181525f805160206156f28339815191526020526040808220815160e0810190925280545f805160206156b283398151915293929190829060ff166005811115610697576106976148dd565b60058111156106a8576106a86148dd565b81526020016001820180546106bc90614a3d565b80601f01602080910402602001604051908101604052809291908181526020018280546106e890614a3d565b80156107335780601f1061070a57610100808354040283529160200191610733565b820191905f5260205f20905b81548152906001019060200180831161071657829003601f168201915b505050918352505060028201546001600160401b038082166020840152600160401b820481166040840152600160801b820481166060840152600160c01b909104811660808301526003928301541660a0909101529091508151600581111561079e5761079e6148dd565b146107d1575f8381526007830160205260409081902054905163170cc93360e21b815261063c9160ff1690600401614a6f565b606081015160405163854a893f60e01b8152600481018590526001600160401b0390911660248201525f60448201526005600160991b019063ee5b48eb9073__$fd0c147b4031eef6079b0498cbafa865f0$__9063854a893f906064015f60405180830381865af4158015610848573d5f803e3d5ffd5b505050506040513d5f823e601f3d908101601f1916820160405261086f9190810190614b80565b6040518263ffffffff1660e01b815260040161088b9190614bb1565b6020604051808303815f875af11580156108a7573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906108cb9190614bc3565b50505050565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00805460029190600160401b900460ff168061091a575080546001600160401b03808416911610155b156109385760405163f92ee8a960e01b815260040160405180910390fd5b805468ffffffffffffffffff19166001600160401b03831617600160401b17815561096283612233565b805460ff60401b191681556040516001600160401b03831681527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a1505050565b6108cb838383611ee2565b7fe92546d698950ddd38910d2e15ed1d923cd0a7b3dde9e2a6a3f380565559cb09545f805160206156b28339815191529060ff1615610a0b57604051637fab81e560e01b815260040160405180910390fd5b6005600160991b016001600160a01b0316634213cf786040518163ffffffff1660e01b8152600401602060405180830381865afa158015610a4e573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610a729190614bc3565b836020013514610a9b576040516372b0a7e760e11b81526020840135600482015260240161063c565b30610aac6060850160408601614bee565b6001600160a01b031614610aef57610aca6060840160408501614bee565b604051632f88120d60e21b81526001600160a01b03909116600482015260240161063c565b5f610afd6060850185614c09565b905090505f805b828163ffffffff161015610d64575f610b206060880188614c09565b8363ffffffff16818110610b3657610b36614c4e565b9050602002810190610b489190614c62565b610b5190614ccd565b80516040519192505f916008880191610b6991614d48565b90815260200160405180910390205414610b9957805160405163a41f772f60e01b815261063c9190600401614bb1565b5f6002885f013584604051602001610bc892919091825260e01b6001600160e01b031916602082015260240190565b60408051601f1981840301815290829052610be291614d48565b602060405180830381855afa158015610bfd573d5f803e3d5ffd5b5050506040513d601f19601f82011682018060405250810190610c209190614bc3565b90508086600801835f0151604051610c389190614d48565b90815260408051918290036020908101909220929092555f8381526007890190915220805460ff191660021781558251600190910190610c789082614d9d565b50604080830180515f84815260078a01602052929092206002810180549251426001600160401b03908116600160c01b026001600160c01b03928216600160801b81026001600160c01b03199097169290971691909117949094171692909217909155600301805467ffffffffffffffff19169055610cf79085614e6c565b8251604051919550610d0891614d48565b60408051918290038220908401516001600160401b031682529082907f9d47fef9da077661546e646d61830bfcbda90506c2e5eed38195e82c4eb1cbdf9060200160405180910390a3505080610d5d90614e7f565b9050610b04565b50600483018190556001830154606490610d8890600160401b900460ff1683614ea1565b1015610daa57604051635943317f60e01b81526004810182905260240161063c565b5f73__$fd0c147b4031eef6079b0498cbafa865f0$__634d847884610dce87612244565b604001516040518263ffffffff1660e01b8152600401610dee9190614bb1565b602060405180830381865af4158015610e09573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610e2d9190614bc3565b90505f73__$fd0c147b4031eef6079b0498cbafa865f0$__6387418b8e886040518263ffffffff1660e01b8152600401610e679190614fe3565b5f60405180830381865af4158015610e81573d5f803e3d5ffd5b505050506040513d5f823e601f3d908101601f19168201604052610ea89190810190614b80565b90505f600282604051610ebb9190614d48565b602060405180830381855afa158015610ed6573d5f803e3d5ffd5b5050506040513d601f19601f82011682018060405250810190610ef99190614bc3565b9050828114610f255760405163baaea89d60e01b8152600481018290526024810184905260440161063c565b5050506009909201805460ff1916600117905550505050565b610f478261235a565b610f67576040516330efa98b60e01b81526004810183905260240161063c565b5f610f7183611d38565b5190506002816005811115610f8857610f886148dd565b14610fa8578060405163170cc93360e21b815260040161063c9190614a6f565b6108cb8383612395565b5f805f8051602061569283398151915260030154610fd0908461506e565b9050801580610fe557506001600160401b0381115b156110065760405163222d164360e21b81526004810184905260240161063c565b92915050565b6108cb838383612654565b61101f612840565b5f805160206156928339815191525f8061103884612877565b915091506110458261235a565b611051575050506110bf565b5f8281526006840160205260409020546001600160a01b031660048251600581111561107f5761107f6148dd565b036110a4575f838152600985016020526040812080549190556110a28282612c2a565b505b6110ba816110b584604001516113b0565b612c88565b505050505b6110d560015f805160206156d283398151915255565b50565b5f8281525f805160206156728339815191526020526040808220815160e0810190925280545f8051602061569283398151915293929190829060ff166003811115611125576111256148dd565b6003811115611136576111366148dd565b8152815461010090046001600160a01b0316602082015260018201546040808301919091526002909201546001600160401b038082166060840152600160401b820481166080840152600160801b8204811660a0840152600160c01b9091041660c0909101528101519091505f6111ac82611d38565b90506001835160038111156111c3576111c36148dd565b146111e4578251604051633b0d540d60e21b815261063c919060040161508d565b6004815160058111156111f9576111f96148dd565b0361120f5761120786612cae565b505050505050565b5f8073__$fd0c147b4031eef6079b0498cbafa865f0$__6350782b0f61123489612244565b604001516040518263ffffffff1660e01b81526004016112549190614bb1565b606060405180830381865af415801561126f573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061129391906150a7565b50915091508184146112c057846040015160405163089938b360e11b815260040161063c91815260200190565b806001600160401b031683606001516001600160401b031610806112f95750806001600160401b03168560a001516001600160401b0316115b1561132257604051632e19bc2d60e11b81526001600160401b038216600482015260240161063c565b5f888152600787016020908152604091829020805460ff1916600290811782550180546001600160401b034216600160401b81026fffffffffffffffff00000000000000001990921691909117909155915191825285918a917f047059b465069b8b751836b41f9f1d83daff583d2238cc7fbb461437ec23a4f6910160405180910390a35050505050505050565b7f4317713f7ecbdddd4bc99e95d903adedaa883b2e7c2551610bd13e2c7e473d03545f90611006906001600160401b038416614ea1565b5f6113f182611d38565b6080015192915050565b611406838383612654565b61064557604051635bff683f60e11b81526004810184905260240161063c565b61142e612840565b5f8281525f805160206156728339815191526020526040808220815160e0810190925280545f8051602061569283398151915293929190829060ff16600381111561147b5761147b6148dd565b600381111561148c5761148c6148dd565b8152815461010090046001600160a01b03166020820152600182015460408201526002909101546001600160401b038082166060840152600160401b820481166080840152600160801b8204811660a0840152600160c01b9091041660c0909101529050600381516003811115611505576115056148dd565b14611526578051604051633b0d540d60e21b815261063c919060040161508d565b60046115358260400151611d38565b516005811115611547576115476148dd565b14611646575f61155684612244565b90505f8073__$fd0c147b4031eef6079b0498cbafa865f0$__6350782b0f84604001516040518263ffffffff1660e01b81526004016115959190614bb1565b606060405180830381865af41580156115b0573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906115d491906150a7565b5091509150818460400151146116005760405163089938b360e11b81526004810183905260240161063c565b806001600160401b03168460c001516001600160401b0316111561164257604051632e19bc2d60e11b81526001600160401b038216600482015260240161063c565b5050505b61164f84612cae565b505061166760015f805160206156d283398151915255565b5050565b5f805160206156928339815191525f61168383611d38565b519050600481600581111561169a5761169a6148dd565b146116ba578060405163170cc93360e21b815260040161063c9190614a6f565b5f8381526006830160205260409020546001600160a01b0316331461170057335b604051636e2ccd7560e11b81526001600160a01b03909116600482015260240161063c565b5f838152600983016020908152604080832080549084905560068601909252909120546108cb906001600160a01b031682612c2a565b5f805160206156b28339815191525f8073__$fd0c147b4031eef6079b0498cbafa865f0$__63021de88f61176986612244565b604001516040518263ffffffff1660e01b81526004016117899190614bb1565b6040805180830381865af41580156117a3573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906117c791906150dc565b91509150806117ed57604051632d07135360e01b8152811515600482015260240161063c565b5f8281526006840160205260409020805461180790614a3d565b90505f0361182b5760405163089938b360e11b81526004810183905260240161063c565b60015f83815260078501602052604090205460ff166005811115611851576118516148dd565b14611884575f8281526007840160205260409081902054905163170cc93360e21b815261063c9160ff1690600401614a6f565b5f828152600684016020526040812061189c9161469f565b5f828152600784016020908152604091829020805460ff1916600290811782550180546001600160401b0342818116600160c01b026001600160c01b0390931692909217928390558451600160801b9093041682529181019190915283917ff8fd1c90fb9cfa2ca2358fdf5806b086ad43315d92b221c929efc7f105ce7568910160405180910390a250505050565b5f611934612840565b61194084848434612f02565b905061195860015f805160206156d283398151915255565b9392505050565b5f8181525f805160206156728339815191526020526040808220815160e0810190925280545f8051602061569283398151915293929190829060ff1660038111156119ac576119ac6148dd565b60038111156119bd576119bd6148dd565b8152815461010090046001600160a01b0316602082015260018083015460408301526002909201546001600160401b038082166060840152600160401b820481166080840152600160801b8204811660a0840152600160c01b9091041660c09091015290915081516003811115611a3657611a366148dd565b14158015611a575750600381516003811115611a5457611a546148dd565b14155b15611a78578051604051633b0d540d60e21b815261063c919060040161508d565b5f611a868260400151611d38565b905080606001516001600160401b03165f03611ab8576040516339b894f960e21b81526004810185905260240161063c565b60408083015160608301516080840151925163854a893f60e01b81526005600160991b019363ee5b48eb9373__$fd0c147b4031eef6079b0498cbafa865f0$__9363854a893f93611b2693906004019283526001600160401b03918216602084015216604082015260600190565b5f60405180830381865af4158015611b40573d5f803e3d5ffd5b505050506040513d5f823e601f3d908101601f19168201604052611b679190810190614b80565b6040518263ffffffff1660e01b8152600401611b839190614bb1565b6020604051808303815f875af1158015611b9f573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611bc39190614bc3565b5050505050565b5f8181527fe92546d698950ddd38910d2e15ed1d923cd0a7b3dde9e2a6a3f380565559cb066020526040902080545f805160206156b28339815191529190611c1190614a3d565b90505f03611c355760405163089938b360e11b81526004810183905260240161063c565b60015f83815260078301602052604090205460ff166005811115611c5b57611c5b6148dd565b14611c8e575f8281526007820160205260409081902054905163170cc93360e21b815261063c9160ff1690600401614a6f565b5f82815260068201602052604090819020905163ee5b48eb60e01b81526005600160991b019163ee5b48eb91611cc7919060040161510a565b6020604051808303815f875af1158015611ce3573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906106459190614bc3565b5f611d10612840565b611d1b82333461307d565b9050611d3360015f805160206156d283398151915255565b919050565b611d406146d6565b5f8281525f805160206156f2833981519152602052604090819020815160e0810190925280545f805160206156b2833981519152929190829060ff166005811115611d8d57611d8d6148dd565b6005811115611d9e57611d9e6148dd565b8152602001600182018054611db290614a3d565b80601f0160208091040260200160405190810160405280929190818152602001828054611dde90614a3d565b8015611e295780601f10611e0057610100808354040283529160200191611e29565b820191905f5260205f20905b815481529060010190602001808311611e0c57829003601f168201915b505050918352505060028201546001600160401b038082166020840152600160401b820481166040840152600160801b820481166060840152600160c01b9091048116608083015260039092015490911660a0909101529392505050565b6040515f905f805160206156b2833981519152907fe92546d698950ddd38910d2e15ed1d923cd0a7b3dde9e2a6a3f380565559cb0890611eca9086908690615194565b90815260200160405180910390205491505092915050565b5f8381525f805160206156728339815191526020526040808220815160e0810190925280545f805160206156928339815191529284929091829060ff166003811115611f3057611f306148dd565b6003811115611f4157611f416148dd565b8152815461010090046001600160a01b0316602082015260018201546040808301919091526002909201546001600160401b038082166060840152600160401b820481166080840152600160801b8204811660a0840152600160c01b9091041660c0909101528101519091505f611fb782611d38565b9050600283516003811115611fce57611fce6148dd565b14611fef578251604051633b0d540d60e21b815261063c919060040161508d565b60208301516001600160a01b0316331461208b575f8281526006850160205260409020546001600160a01b0316331461202857336116db565b5f82815260068501602052604090205460a082015161205791600160b01b90046001600160401b0316906151a3565b6001600160401b031642101561208b5760405163fb6ce63f60e01b81526001600160401b034216600482015260240161063c565b6002815160058111156120a0576120a06148dd565b036121ce57600284015460808401516120c2916001600160401b0316906151a3565b6001600160401b03164210156120f65760405163fb6ce63f60e01b81526001600160401b034216600482015260240161063c565b8615612108576121068287612395565b505b5f8881526007850160205260409020805460ff191660031790556060830151608082015161214191849161213c91906151c3565b6132c0565b505f898152600786016020526040812060020180546001600160401b03909316600160c01b026001600160c01b039093169290921790915561218284613497565b5f8a81526008870160205260408082208390555191925084918b917f366d336c0ab380dc799f095a6f82a26326585c52909cc698b09ba4540709ed5791a3151594506119589350505050565b6004815160058111156121e3576121e36148dd565b03612217576121f183613497565b5f89815260088601602052604090205561220a88612cae565b6001945050505050611958565b805160405163170cc93360e21b815261063c9190600401614a6f565b61223b613634565b6110d58161367f565b60408051606080820183525f8083526020830152918101919091526040516306f8253560e41b815263ffffffff831660048201525f9081906005600160991b0190636f825350906024015f60405180830381865afa1580156122a8573d5f803e3d5ffd5b505050506040513d5f823e601f3d908101601f191682016040526122cf91908101906151e3565b91509150806122f157604051636b2f19e960e01b815260040160405180910390fd5b815115612317578151604051636ba589a560e01b8152600481019190915260240161063c565b60208201516001600160a01b031615612353576020820151604051624de75d60e31b81526001600160a01b03909116600482015260240161063c565b5092915050565b5f9081527f4317713f7ecbdddd4bc99e95d903adedaa883b2e7c2551610bd13e2c7e473d0660205260409020546001600160a01b0316151590565b6040516306f8253560e41b815263ffffffff821660048201525f90819081906005600160991b0190636f825350906024015f60405180830381865afa1580156123e0573d5f803e3d5ffd5b505050506040513d5f823e601f3d908101601f1916820160405261240791908101906151e3565b915091508061242957604051636b2f19e960e01b815260040160405180910390fd5b7f4317713f7ecbdddd4bc99e95d903adedaa883b2e7c2551610bd13e2c7e473d055482515f805160206156928339815191529114612480578251604051636ba589a560e01b8152600481019190915260240161063c565b60208301516001600160a01b0316156124bc576020830151604051624de75d60e31b81526001600160a01b03909116600482015260240161063c565b60208301516001600160a01b0316156124f8576020830151604051624de75d60e31b81526001600160a01b03909116600482015260240161063c565b5f8073__$fd0c147b4031eef6079b0498cbafa865f0$__63088c246386604001516040518263ffffffff1660e01b81526004016125359190614bb1565b6040805180830381865af415801561254f573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906125739190615273565b9150915081881461259a5760405163089938b360e11b81526004810189905260240161063c565b5f8881526006840160205260409020600101546001600160401b03908116908216111561262b575f888152600684016020908152604091829020600101805467ffffffffffffffff19166001600160401b038516908117909155915191825289917fec44148e8ff271f2d0bacef1142154abacb0abb3a29eb3eb50e2ca97e86d0435910160405180910390a2612649565b505f8781526006830160205260409020600101546001600160401b03165b979650505050505050565b5f5f805160206156928339815191528161266d866136f9565b90506126788661235a565b61268757600192505050611958565b5f8681526006830160205260409020546001600160a01b031633146126ac57336116db565b5f86815260068301602052604090205460a08201516126db91600160b01b90046001600160401b0316906151a3565b6001600160401b03168160c001516001600160401b031610156127225760c081015160405163fb6ce63f60e01b81526001600160401b03909116600482015260240161063c565b5f851561273a576127338786612395565b9050612758565b505f8681526006830160205260409020600101546001600160401b03165b600483015460408301515f916001600160a01b031690634f22429f9061277d906113b0565b60a086015160c087015160405160e085901b6001600160e01b031916815260048101939093526001600160401b03918216602484018190526044840152811660648301528516608482015260a401602060405180830381865afa1580156127e6573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061280a9190614bc3565b905080846009015f8a81526020019081526020015f205f82825461282e9190614e6c565b90915550501515979650505050505050565b5f805160206156d283398151915280546001190161287157604051633ee5aeb560e01b815260040160405180910390fd5b60029055565b5f6128806146d6565b5f805160206156b28339815191525f8073__$fd0c147b4031eef6079b0498cbafa865f0$__63021de88f6128b388612244565b604001516040518263ffffffff1660e01b81526004016128d39190614bb1565b6040805180830381865af41580156128ed573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061291191906150dc565b91509150801561293857604051632d07135360e01b8152811515600482015260240161063c565b5f828152600784016020526040808220815160e081019092528054829060ff166005811115612969576129696148dd565b600581111561297a5761297a6148dd565b815260200160018201805461298e90614a3d565b80601f01602080910402602001604051908101604052809291908181526020018280546129ba90614a3d565b8015612a055780601f106129dc57610100808354040283529160200191612a05565b820191905f5260205f20905b8154815290600101906020018083116129e857829003601f168201915b505050918352505060028201546001600160401b038082166020840152600160401b820481166040840152600160801b820481166060840152600160c01b909104811660808301526003928301541660a09091015290915081516005811115612a7057612a706148dd565b14158015612a915750600181516005811115612a8e57612a8e6148dd565b14155b15612ab257805160405163170cc93360e21b815261063c9190600401614a6f565b600381516005811115612ac757612ac76148dd565b03612ad55760048152612ada565b600581525b836008018160200151604051612af09190614d48565b90815260408051602092819003830190205f908190558581526007870190925290208151815483929190829060ff19166001836005811115612b3457612b346148dd565b021790555060208201516001820190612b4d9082614d9d565b5060408201516002820180546060850151608086015160a08701516001600160401b039586166001600160801b031990941693909317600160401b92861692909202919091176001600160801b0316600160801b918516919091026001600160c01b031617600160c01b9184169190910217905560c0909201516003909101805467ffffffffffffffff19169190921617905580516005811115612bf357612bf36148dd565b60405184907f1c08e59656f1a18dc2da76826cdc52805c43e897a17c50faefb8ab3c1526cc16905f90a39196919550909350505050565b6040516327ad555d60e11b81526001600160a01b0383166004820152602481018290526001600160991b0190634f5aaaba906044015f604051808303815f87803b158015612c76575f80fd5b505af1158015611207573d5f803e3d5ffd5b6116676001600160a01b038316826139dd565b60015f805160206156d283398151915255565b5f8181525f805160206156728339815191526020526040808220815160e0810190925280545f8051602061569283398151915293929190829060ff166003811115612cfb57612cfb6148dd565b6003811115612d0c57612d0c6148dd565b8152815461010090046001600160a01b0316602082015260018201546040808301919091526002909201546001600160401b038082166060840152600160401b820481166080840152600160801b8204811660a0840152600160c01b9091041660c090910152810151909150612da97fe92546d698950ddd38910d2e15ed1d923cd0a7b3dde9e2a6a3f380565559cb01546001600160401b031690565b8260800151612db891906151a3565b6001600160401b0316421015612dec5760405163fb6ce63f60e01b81526001600160401b034216600482015260240161063c565b5f848152600784016020908152604080832080546001600160a81b03191681556001810184905560020183905560088601909152812080549082905590808215612ea7575f84815260068701602052604090205461271090612e5990600160a01b900461ffff1685614ea1565b612e63919061506e565b915081866009015f8681526020019081526020015f205f828254612e879190614e6c565b90915550612e9790508284615296565b9050612ea7856020015182612c2a565b612ebc85602001516110b587606001516113b0565b6040805182815260208101849052859189917f8ececf510070c320d9a55323ffabe350e294ae505fc0c509dc5736da6f5cc993910160405180910390a350505050505050565b7f4317713f7ecbdddd4bc99e95d903adedaa883b2e7c2551610bd13e2c7e473d02545f905f8051602061569283398151915290600160401b900461ffff9081169086161080612f56575061271061ffff8616115b15612f7a57604051635f12e6c360e11b815261ffff8616600482015260240161063c565b60028101546001600160401b039081169085161015612fb6576040516202a06d60e11b81526001600160401b038516600482015260240161063c565b8054831080612fc85750806001015483115b15612fe95760405163222d164360e21b81526004810184905260240161063c565b825f612ff482610fb2565b90505f6130018983613a70565b5f818152600695909501602052604090942080546001600160b01b0319163317600160a01b61ffff9a909a16999099029890981767ffffffffffffffff60b01b1916600160b01b6001600160401b03989098169790970296909617875550506001909401805467ffffffffffffffff1916905550919392505050565b5f5f805160206156928339815191528161309684610fb2565b90505f6130a287611d38565b90506130ad8761235a565b6130cd576040516330efa98b60e01b81526004810188905260240161063c565b6002815160058111156130e2576130e26148dd565b1461310357805160405163170cc93360e21b815261063c9190600401614a6f565b5f82826080015161311491906151a3565b905083600201600a9054906101000a90046001600160401b0316826040015161313d91906152a9565b6001600160401b0316816001600160401b0316111561317a57604051636d51fe0560e11b81526001600160401b038216600482015260240161063c565b5f806131868a846132c0565b915091505f8a836040516020016131b492919091825260c01b6001600160c01b031916602082015260280190565b60408051601f1981840301815291815281516020928301205f81815260078b019093529120805491925060019160ff1916828002179055505f8181526007880160209081526040918290208054610100600160a81b0319166101006001600160a01b038f16908102919091178255600182018f9055600290910180546001600160401b038b81166001600160c01b03199092168217600160801b8a8316908102919091176001600160c01b031690935585519283528916938201939093529283019190915260608201849052908c9083907fb0024b263bc3a0b728a6edea50a69efa841189f8d32ee8af9d1c2b1a1a2234269060800160405180910390a49a9950505050505050505050565b5f8281525f805160206156f2833981519152602052604081206002015481905f805160206156b283398151915290600160801b90046001600160401b03166133088582613f95565b5f613312876141b8565b5f888152600785016020526040808220600201805467ffffffffffffffff60801b1916600160801b6001600160401b038c811691820292909217909255915163854a893f60e01b8152600481018c905291841660248301526044820152919250906005600160991b019063ee5b48eb9073__$fd0c147b4031eef6079b0498cbafa865f0$__9063854a893f906064015f60405180830381865af41580156133bb573d5f803e3d5ffd5b505050506040513d5f823e601f3d908101601f191682016040526133e29190810190614b80565b6040518263ffffffff1660e01b81526004016133fe9190614bb1565b6020604051808303815f875af115801561341a573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061343e9190614bc3565b604080516001600160401b038a811682526020820184905282519394508516928b927f07de5ff35a674a8005e661f3333c907ca6333462808762d19dc7b3abb1a8c1df928290030190a3909450925050505b9250929050565b5f805f8051602061569283398151915290505f6134b78460400151611d38565b90505f6003825160058111156134cf576134cf6148dd565b14806134ed57506004825160058111156134eb576134eb6148dd565b145b156134fd575060c081015161353a565b600282516005811115613512576135126148dd565b0361351e57504261353a565b815160405163170cc93360e21b815261063c9190600401614a6f565b84608001516001600160401b0316816001600160401b03161161356157505f949350505050565b600483015460608601516001600160a01b0390911690634f22429f90613586906113b0565b60a085015160808901516040808b01515f90815260068a0160205281902060010154905160e086901b6001600160e01b031916815260048101949094526001600160401b0392831660248501529082166044840152818616606484015216608482015260a401602060405180830381865afa158015613607573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061362b9190614bc3565b95945050505050565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0054600160401b900460ff1661367d57604051631afcd79f60e31b815260040160405180910390fd5b565b613687613634565b6136908161422d565b613698614246565b6110d5606082013560808301356136b560c0850160a08601614850565b6136c560e0860160c087016152d4565b6136d6610100870160e088016152ed565b6101008701356136ee61014089016101208a01614bee565b886101400135614256565b6137016146d6565b5f8281525f805160206156f28339815191526020526040808220815160e0810190925280545f805160206156b283398151915293929190829060ff16600581111561374e5761374e6148dd565b600581111561375f5761375f6148dd565b815260200160018201805461377390614a3d565b80601f016020809104026020016040519081016040528092919081815260200182805461379f90614a3d565b80156137ea5780601f106137c1576101008083540402835291602001916137ea565b820191905f5260205f20905b8154815290600101906020018083116137cd57829003601f168201915b50505091835250506002828101546001600160401b038082166020850152600160401b820481166040850152600160801b820481166060850152600160c01b9091048116608084015260039093015490921660a09091015290915081516005811115613858576138586148dd565b1461388b575f8481526007830160205260409081902054905163170cc93360e21b815261063c9160ff1690600401614a6f565b60038152426001600160401b031660c08201525f84815260078301602052604090208151815483929190829060ff191660018360058111156138cf576138cf6148dd565b0217905550602082015160018201906138e89082614d9d565b5060408201516002820180546060850151608086015160a08701516001600160401b039586166001600160801b031990941693909317600160401b92861692909202919091176001600160801b0316600160801b918516919091026001600160c01b031617600160c01b9184169190910217905560c0909201516003909101805467ffffffffffffffff1916919092161790555f61398685826132c0565b6080840151604080516001600160401b03909216825242602083015291935083925087917f13d58394cf269d48bcf927959a29a5ffee7c9924dafff8927ecdf3c48ffa7c67910160405180910390a3509392505050565b80471015613a005760405163cd78605960e01b815230600482015260240161063c565b5f826001600160a01b0316826040515f6040518083038185875af1925050503d805f8114613a49576040519150601f19603f3d011682016040523d82523d5f602084013e613a4e565b606091505b505090508061064557604051630a12f52160e11b815260040160405180910390fd5b7fe92546d698950ddd38910d2e15ed1d923cd0a7b3dde9e2a6a3f380565559cb09545f9060ff16613ab457604051637fab81e560e01b815260040160405180910390fd5b5f805160206156b283398151915242613ad36060860160408701614850565b6001600160401b0316111580613b0d5750613af16202a30042614e6c565b613b016060860160408701614850565b6001600160401b031610155b15613b4757613b226060850160408601614850565b604051635879da1360e11b81526001600160401b03909116600482015260240161063c565b613b5c613b57606086018661530d565b61443e565b613b6c613b57608086018661530d565b6030613b7b6020860186615321565b905014613bad57613b8f6020850185615321565b6040516326475b2f60e11b815261063c925060040190815260200190565b613bb78480615321565b90505f03613be457613bc98480615321565b604051633e08a12560e11b815260040161063c929190615363565b5f60088201613bf38680615321565b604051613c01929190615194565b90815260200160405180910390205414613c3a57613c1f8480615321565b60405163a41f772f60e01b815260040161063c929190615363565b613c44835f613f95565b6040805160e08101909152815481525f90819073__$fd0c147b4031eef6079b0498cbafa865f0$__9063eb97ce519060208101613c818a80615321565b8080601f0160208091040260200160405190810160405280939291908181526020018383808284375f92019190915250505090825250602090810190613cc9908b018b615321565b8080601f0160208091040260200160405190810160405280939291908181526020018383808284375f92019190915250505090825250602001613d1260608b0160408c01614850565b6001600160401b03168152602001613d2d60608b018b61530d565b613d3690615376565b8152602001613d4860808b018b61530d565b613d5190615376565b8152602001886001600160401b03168152506040518263ffffffff1660e01b8152600401613d7f91906154a3565b5f60405180830381865af4158015613d99573d5f803e3d5ffd5b505050506040513d5f823e601f3d908101601f19168201604052613dc0919081019061555a565b5f82815260068601602052604090209193509150613dde8282614d9d565b508160088401613dee8880615321565b604051613dfc929190615194565b9081526040519081900360200181209190915563ee5b48eb60e01b81525f906005600160991b019063ee5b48eb90613e38908590600401614bb1565b6020604051808303815f875af1158015613e54573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190613e789190614bc3565b5f8481526007860160205260409020805460ff191660011790559050613e9e8780615321565b5f858152600787016020526040902060010191613ebc91908361559d565b505f83815260078501602052604090206002810180546001600160c01b0319166001600160401b038916908117600160801b91909102176001600160c01b03169055600301805467ffffffffffffffff1916905580613f1b8880615321565b604051613f29929190615194565b6040518091039020847fb77297e3befc691bfc864a81e241f83e2ef722b6e7becaa2ecec250c6d52b430898b6040016020810190613f679190614850565b604080516001600160401b0393841681529290911660208301520160405180910390a4509095945050505050565b5f805160206156b28339815191525f6001600160401b038084169085161115613fc957613fc283856151c3565b9050613fd6565b613fd384846151c3565b90505b6040805160808101825260028401548082526003850154602083015260048501549282019290925260058401546001600160401b0316606082015242911580614038575060018401548151614034916001600160401b031690614e6c565b8210155b1561405e576001600160401b03831660608201528181526040810151602082015261407d565b828160600181815161407091906151a3565b6001600160401b03169052505b606081015161408d9060646152a9565b602082015160018601546001600160401b0392909216916140b89190600160401b900460ff16614ea1565b10156140e857606081015160405163dfae880160e01b81526001600160401b03909116600482015260240161063c565b856001600160401b0316816040018181516141039190614e6c565b9052506040810180516001600160401b0387169190614123908390615296565b9052506001840154604082015160649161414891600160401b90910460ff1690614ea1565b101561416f578060400151604051635943317f60e01b815260040161063c91815260200190565b805160028501556020810151600385015560408101516004850155606001516005909301805467ffffffffffffffff19166001600160401b039094169390931790925550505050565b5f8181525f805160206156f28339815191526020526040812060020180545f805160206156b2833981519152919060089061420290600160401b90046001600160401b0316615656565b91906101000a8154816001600160401b0302191690836001600160401b031602179055915050919050565b614235613634565b61423d6145a7565b6110d5816145af565b61424e613634565b61367d614697565b61425e613634565b5f8051602061569283398151915261ffff86161580614282575061271061ffff8716115b156142a657604051635f12e6c360e11b815261ffff8716600482015260240161063c565b878911156142ca5760405163222d164360e21b8152600481018a905260240161063c565b60ff851615806142dd5750600a60ff8616115b156143005760405163170db35960e31b815260ff8616600482015260240161063c565b7fe92546d698950ddd38910d2e15ed1d923cd0a7b3dde9e2a6a3f380565559cb01546001600160401b03166001600160401b0316876001600160401b03161015614367576040516202a06d60e11b81526001600160401b038816600482015260240161063c565b835f036143875760405163a733007160e01b815260040160405180910390fd5b816143a857604051632f6bd1db60e01b81526004810183905260240161063c565b97885560018801969096556002870180546001600160401b039690961669ffffffffffffffffffff1990961695909517600160401b61ffff95909516949094029390931767ffffffffffffffff60501b191660ff92909216600160501b029190911790925560038401919091556004830180546001600160a01b0319166001600160a01b03909216919091179055600590910155565b61444b6020820182614823565b63ffffffff1615801561446b57506144666020820182614c09565b151590505b156144b25761447d6020820182614823565b61448a6020830183614c09565b60405163c08a0f1d60e01b815263ffffffff909316600484015260248301525060440161063c565b6144bf6020820182614c09565b90506144ce6020830183614823565b63ffffffff1611156144e75761447d6020820182614823565b60015b6144f76020830183614c09565b90508110156116675761450d6020830183614c09565b614518600184615296565b81811061452757614527614c4e565b905060200201602081019061453c9190614bee565b6001600160a01b03166145526020840184614c09565b8381811061456257614562614c4e565b90506020020160208101906145779190614bee565b6001600160a01b0316101561459f57604051630dbc8d5f60e31b815260040160405180910390fd5b6001016144ea565b61367d613634565b6145b7613634565b80355f805160206156b283398151915290815560146145dc60608401604085016152ed565b60ff1611806145fb57506145f660608301604084016152ed565b60ff16155b1561462f5761461060608301604084016152ed565b604051634a59bbff60e11b815260ff909116600482015260240161063c565b61463f60608301604084016152ed565b60018201805460ff92909216600160401b0260ff60401b199092169190911790556146706040830160208401614850565b600191909101805467ffffffffffffffff19166001600160401b0390921691909117905550565b612c9b613634565b5080546146ab90614a3d565b5f825580601f106146ba575050565b601f0160209004905f5260205f20908101906110d59190614713565b6040805160e08101909152805f81526060602082018190525f604083018190529082018190526080820181905260a0820181905260c09091015290565b5b80821115614727575f8155600101614714565b5090565b80151581146110d5575f80fd5b803563ffffffff81168114611d33575f80fd5b5f805f6060848603121561475d575f80fd5b83359250602084013561476f8161472b565b915061477d60408501614738565b90509250925092565b5f60208284031215614796575f80fd5b5035919050565b5f61016082840312156147ae575f80fd5b50919050565b5f80604083850312156147c5575f80fd5b82356001600160401b038111156147da575f80fd5b8301608081860312156147eb575f80fd5b91506147f960208401614738565b90509250929050565b5f8060408385031215614813575f80fd5b823591506147f960208401614738565b5f60208284031215614833575f80fd5b61195882614738565b6001600160401b03811681146110d5575f80fd5b5f60208284031215614860575f80fd5b81356119588161483c565b803561ffff81168114611d33575f80fd5b5f805f6060848603121561488e575f80fd5b83356001600160401b038111156148a3575f80fd5b840160a081870312156148b4575f80fd5b92506148c26020850161486b565b915060408401356148d28161483c565b809150509250925092565b634e487b7160e01b5f52602160045260245ffd5b60068110614901576149016148dd565b9052565b5f5b8381101561491f578181015183820152602001614907565b50505f910152565b5f815180845261493e816020860160208601614905565b601f01601f19169290920160200192915050565b602081526149646020820183516148f1565b5f602083015160e0604084015261497f610100840182614927565b905060408401516001600160401b0380821660608601528060608701511660808601528060808701511660a08601528060a08701511660c08601528060c08701511660e086015250508091505092915050565b5f80602083850312156149e3575f80fd5b82356001600160401b03808211156149f9575f80fd5b818501915085601f830112614a0c575f80fd5b813581811115614a1a575f80fd5b866020828501011115614a2b575f80fd5b60209290920196919550909350505050565b600181811c90821680614a5157607f821691505b6020821081036147ae57634e487b7160e01b5f52602260045260245ffd5b6020810161100682846148f1565b634e487b7160e01b5f52604160045260245ffd5b604051606081016001600160401b0381118282101715614ab357614ab3614a7d565b60405290565b604080519081016001600160401b0381118282101715614ab357614ab3614a7d565b604051601f8201601f191681016001600160401b0381118282101715614b0357614b03614a7d565b604052919050565b5f6001600160401b03821115614b2357614b23614a7d565b50601f01601f191660200190565b5f82601f830112614b40575f80fd5b8151614b53614b4e82614b0b565b614adb565b818152846020838601011115614b67575f80fd5b614b78826020830160208701614905565b949350505050565b5f60208284031215614b90575f80fd5b81516001600160401b03811115614ba5575f80fd5b614b7884828501614b31565b602081525f6119586020830184614927565b5f60208284031215614bd3575f80fd5b5051919050565b6001600160a01b03811681146110d5575f80fd5b5f60208284031215614bfe575f80fd5b813561195881614bda565b5f808335601e19843603018112614c1e575f80fd5b8301803591506001600160401b03821115614c37575f80fd5b6020019150600581901b3603821315613490575f80fd5b634e487b7160e01b5f52603260045260245ffd5b5f8235605e19833603018112614c76575f80fd5b9190910192915050565b5f82601f830112614c8f575f80fd5b8135614c9d614b4e82614b0b565b818152846020838601011115614cb1575f80fd5b816020850160208301375f918101602001919091529392505050565b5f60608236031215614cdd575f80fd5b614ce5614a91565b82356001600160401b0380821115614cfb575f80fd5b614d0736838701614c80565b83526020850135915080821115614d1c575f80fd5b50614d2936828601614c80565b6020830152506040830135614d3d8161483c565b604082015292915050565b5f8251614c76818460208701614905565b601f82111561064557805f5260205f20601f840160051c81016020851015614d7e5750805b601f840160051c820191505b81811015611bc3575f8155600101614d8a565b81516001600160401b03811115614db657614db6614a7d565b614dca81614dc48454614a3d565b84614d59565b602080601f831160018114614dfd575f8415614de65750858301515b5f19600386901b1c1916600185901b178555611207565b5f85815260208120601f198616915b82811015614e2b57888601518255948401946001909101908401614e0c565b5085821015614e4857878501515f19600388901b60f8161c191681555b5050505050600190811b01905550565b634e487b7160e01b5f52601160045260245ffd5b8082018082111561100657611006614e58565b5f63ffffffff808316818103614e9757614e97614e58565b6001019392505050565b808202811582820484141761100657611006614e58565b5f808335601e19843603018112614ecd575f80fd5b83016020810192503590506001600160401b03811115614eeb575f80fd5b803603821315613490575f80fd5b81835281816020850137505f828201602090810191909152601f909101601f19169091010190565b5f8383855260208086019550808560051b830101845f5b87811015614fd657848303601f19018952813536889003605e19018112614f5d575f80fd5b87016060614f6b8280614eb8565b828752614f7b8388018284614ef9565b92505050614f8b86830183614eb8565b86830388880152614f9d838284614ef9565b925050506040808301359250614fb28361483c565b6001600160401b039290921694909101939093529783019790830190600101614f38565b5090979650505050505050565b6020815281356020820152602082013560408201525f604083013561500781614bda565b6001600160a01b031660608381019190915283013536849003601e1901811261502e575f80fd5b83016020810190356001600160401b03811115615049575f80fd5b8060051b360382131561505a575f80fd5b60808085015261362b60a085018284614f21565b5f8261508857634e487b7160e01b5f52601260045260245ffd5b500490565b60208101600483106150a1576150a16148dd565b91905290565b5f805f606084860312156150b9575f80fd5b8351925060208401516150cb8161483c565b60408501519092506148d28161483c565b5f80604083850312156150ed575f80fd5b8251915060208301516150ff8161472b565b809150509250929050565b5f60208083525f845461511c81614a3d565b806020870152604060018084165f811461513d576001811461515957615186565b60ff19851660408a0152604084151560051b8a01019550615186565b895f5260205f205f5b8581101561517d5781548b8201860152908301908801615162565b8a016040019650505b509398975050505050505050565b818382375f9101908152919050565b6001600160401b0381811683821601908082111561235357612353614e58565b6001600160401b0382811682821603908082111561235357612353614e58565b5f80604083850312156151f4575f80fd5b82516001600160401b038082111561520a575f80fd5b908401906060828703121561521d575f80fd5b615225614a91565b82518152602083015161523781614bda565b602082015260408301518281111561524d575f80fd5b61525988828601614b31565b60408301525080945050505060208301516150ff8161472b565b5f8060408385031215615284575f80fd5b8251915060208301516150ff8161483c565b8181038181111561100657611006614e58565b6001600160401b038181168382160280821691908281146152cc576152cc614e58565b505092915050565b5f602082840312156152e4575f80fd5b6119588261486b565b5f602082840312156152fd575f80fd5b813560ff81168114611958575f80fd5b5f8235603e19833603018112614c76575f80fd5b5f808335601e19843603018112615336575f80fd5b8301803591506001600160401b0382111561534f575f80fd5b602001915036819003821315613490575f80fd5b602081525f614b78602083018486614ef9565b5f60408236031215615386575f80fd5b61538e614ab9565b61539783614738565b81526020808401356001600160401b03808211156153b3575f80fd5b9085019036601f8301126153c5575f80fd5b8135818111156153d7576153d7614a7d565b8060051b91506153e8848301614adb565b8181529183018401918481019036841115615401575f80fd5b938501935b8385101561542b578435925061541b83614bda565b8282529385019390850190615406565b94860194909452509295945050505050565b5f6040830163ffffffff8351168452602080840151604060208701528281518085526060880191506020830194505f92505b808310156154985784516001600160a01b0316825293830193600192909201919083019061546f565b509695505050505050565b60208152815160208201525f602083015160e060408401526154c9610100840182614927565b90506040840151601f19808584030160608601526154e78383614927565b92506001600160401b03606087015116608086015260808601519150808584030160a0860152615517838361543d565b925060a08601519150808584030160c086015250615535828261543d565b91505060c084015161555260e08501826001600160401b03169052565b509392505050565b5f806040838503121561556b575f80fd5b8251915060208301516001600160401b03811115615587575f80fd5b61559385828601614b31565b9150509250929050565b6001600160401b038311156155b4576155b4614a7d565b6155c8836155c28354614a3d565b83614d59565b5f601f8411600181146155f9575f85156155e25750838201355b5f19600387901b1c1916600186901b178355611bc3565b5f83815260208120601f198716915b828110156156285786850135825560209485019460019092019101615608565b5086821015615644575f1960f88860031b161c19848701351681555b505060018560011b0183555050505050565b5f6001600160401b03808316818103614e9757614e97614e5856fe4317713f7ecbdddd4bc99e95d903adedaa883b2e7c2551610bd13e2c7e473d074317713f7ecbdddd4bc99e95d903adedaa883b2e7c2551610bd13e2c7e473d00e92546d698950ddd38910d2e15ed1d923cd0a7b3dde9e2a6a3f380565559cb009b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f00e92546d698950ddd38910d2e15ed1d923cd0a7b3dde9e2a6a3f380565559cb07a26469706673582212207b2882e2fd8db6a0ce1ed7638fe234e86b308216a7385dbce218db4160ada68f64736f6c63430008190033", + Bin: "0x608060405234801561000f575f80fd5b5060405161580238038061580283398101604081905261002e91610107565b60018160018111156100425761004261012c565b0361004f5761004f610055565b50610140565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00805468010000000000000000900460ff16156100a55760405163f92ee8a960e01b815260040160405180910390fd5b80546001600160401b03908116146101045780546001600160401b0319166001600160401b0390811782556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b50565b5f60208284031215610117575f80fd5b815160028110610125575f80fd5b9392505050565b634e487b7160e01b5f52602160045260245ffd5b6156b58061014d5f395ff3fe6080604052600436106101f1575f3560e01c806376f7862111610108578063b771b3bc1161009d578063c599e24f1161006d578063c599e24f146105a0578063c974d1b6146105b3578063d5f20ff6146105c7578063df93d8de146105f3578063fd7ac5e714610609575f80fd5b8063b771b3bc14610528578063ba3a4b9714610542578063bc5fbfec14610561578063bee0a03f14610581575f80fd5b8063a3a65e48116100d8578063a3a65e48146104c3578063a9778a7a14610345578063af2f5feb146104e2578063afb98096146104f5575f80fd5b806376f786211461045257806380dd672f146104715780638280a25a1461049057806393e24598146104a4575f80fd5b8063329c3e121161018957806360305d621161015957806360305d62146103ab57806360ad7784146103d457806362065856146103f357806366435abf14610420578063732214f81461043f575f80fd5b8063329c3e121461031357806335455ded146103455780633a1cfff61461036d578063467ef06f1461038c575f80fd5b80631ec44724116101c45780631ec447241461027f57806320d91b7a1461029e57806325e1c776146102bd5780632e2194d8146102dc575f80fd5b80630118acc4146101f55780630322ed98146102165780630ba512d114610235578063151d30d114610254575b5f80fd5b348015610200575f80fd5b5061021461020f3660046146f9565b610628565b005b348015610221575f80fd5b50610214610230366004614734565b61065d565b348015610240575f80fd5b5061021461024f36600461474b565b6108e4565b34801561025f575f80fd5b50610268600a81565b60405160ff90911681526020015b60405180910390f35b34801561028a575f80fd5b506102146102993660046146f9565b6109c1565b3480156102a9575f80fd5b506102146102b8366004614762565b6109cc565b3480156102c8575f80fd5b506102146102d73660046147b0565b610f51565b3480156102e7575f80fd5b506102fb6102f6366004614734565b610fc5565b6040516001600160401b039091168152602001610276565b34801561031e575f80fd5b5061032d6001600160991b0181565b6040516001600160a01b039091168152602001610276565b348015610350575f80fd5b5061035a61271081565b60405161ffff9091168152602001610276565b348015610378575f80fd5b506102146103873660046146f9565b611019565b348015610397575f80fd5b506102146103a63660046147d1565b611024565b3480156103b6575f80fd5b506103bf601481565b60405163ffffffff9091168152602001610276565b3480156103df575f80fd5b506102146103ee3660046147b0565b6110cc565b3480156103fe575f80fd5b5061041261040d3660046147fe565b611399565b604051908152602001610276565b34801561042b575f80fd5b506102fb61043a366004614734565b6113b9565b34801561044a575f80fd5b506104125f81565b34801561045d575f80fd5b5061021461046c3660046146f9565b6113cd565b34801561047c575f80fd5b5061021461048b3660046147b0565b6113f8565b34801561049b575f80fd5b50610268603081565b3480156104af575f80fd5b506102146104be366004614734565b611632565b3480156104ce575f80fd5b506102146104dd3660046147d1565b6116e7565b6104126104f036600461482a565b6118dc565b348015610500575f80fd5b506104127f4317713f7ecbdddd4bc99e95d903adedaa883b2e7c2551610bd13e2c7e473d0081565b348015610533575f80fd5b5061032d6005600160991b0181565b34801561054d575f80fd5b5061021461055c366004614734565b611910565b34801561056c575f80fd5b506104125f8051602061562083398151915281565b34801561058c575f80fd5b5061021461059b366004614734565b611b70565b6104126105ae366004614734565b611cad565b3480156105be575f80fd5b50610268601481565b3480156105d2575f80fd5b506105e66105e1366004614734565b611cde565b6040516102769190614900565b3480156105fe575f80fd5b506102fb6202a30081565b348015610614575f80fd5b50610412610623366004614980565b611e2d565b610633838383611e88565b61065857604051631036cf9160e11b8152600481018490526024015b60405180910390fd5b505050565b5f8181525f805160206156608339815191526020526040808220815160e0810190925280545f8051602061562083398151915293929190829060ff1660058111156106aa576106aa61488b565b60058111156106bb576106bb61488b565b81526020016001820180546106cf906149eb565b80601f01602080910402602001604051908101604052809291908181526020018280546106fb906149eb565b80156107465780601f1061071d57610100808354040283529160200191610746565b820191905f5260205f20905b81548152906001019060200180831161072957829003601f168201915b505050918352505060028201546001600160401b038082166020840152600160401b820481166040840152600160801b820481166060840152600160c01b909104811660808301526003928301541660a090910152909150815160058111156107b1576107b161488b565b146107e4575f8381526007830160205260409081902054905163170cc93360e21b815261064f9160ff1690600401614a1d565b606081015160405163854a893f60e01b8152600481018590526001600160401b0390911660248201525f60448201526005600160991b019063ee5b48eb9073__$fd0c147b4031eef6079b0498cbafa865f0$__9063854a893f906064015f60405180830381865af415801561085b573d5f803e3d5ffd5b505050506040513d5f823e601f3d908101601f191682016040526108829190810190614b2e565b6040518263ffffffff1660e01b815260040161089e9190614b5f565b6020604051808303815f875af11580156108ba573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906108de9190614b71565b50505050565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00805460029190600160401b900460ff168061092d575080546001600160401b03808416911610155b1561094b5760405163f92ee8a960e01b815260040160405180910390fd5b805468ffffffffffffffffff19166001600160401b03831617600160401b178155610975836121ce565b805460ff60401b191681556040516001600160401b03831681527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a1505050565b6108de838383611e88565b7fe92546d698950ddd38910d2e15ed1d923cd0a7b3dde9e2a6a3f380565559cb09545f805160206156208339815191529060ff1615610a1e57604051637fab81e560e01b815260040160405180910390fd5b6005600160991b016001600160a01b0316634213cf786040518163ffffffff1660e01b8152600401602060405180830381865afa158015610a61573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610a859190614b71565b836020013514610aae576040516372b0a7e760e11b81526020840135600482015260240161064f565b30610abf6060850160408601614b9c565b6001600160a01b031614610b0257610add6060840160408501614b9c565b604051632f88120d60e21b81526001600160a01b03909116600482015260240161064f565b5f610b106060850185614bb7565b905090505f805b828163ffffffff161015610d77575f610b336060880188614bb7565b8363ffffffff16818110610b4957610b49614bfc565b9050602002810190610b5b9190614c10565b610b6490614c7b565b80516040519192505f916008880191610b7c91614cf6565b90815260200160405180910390205414610bac57805160405163a41f772f60e01b815261064f9190600401614b5f565b5f6002885f013584604051602001610bdb92919091825260e01b6001600160e01b031916602082015260240190565b60408051601f1981840301815290829052610bf591614cf6565b602060405180830381855afa158015610c10573d5f803e3d5ffd5b5050506040513d601f19601f82011682018060405250810190610c339190614b71565b90508086600801835f0151604051610c4b9190614cf6565b90815260408051918290036020908101909220929092555f8381526007890190915220805460ff191660021781558251600190910190610c8b9082614d4b565b50604080830180515f84815260078a01602052929092206002810180549251426001600160401b03908116600160c01b026001600160c01b03928216600160801b81026001600160c01b03199097169290971691909117949094171692909217909155600301805467ffffffffffffffff19169055610d0a9085614e1a565b8251604051919550610d1b91614cf6565b60408051918290038220908401516001600160401b031682529082907f9d47fef9da077661546e646d61830bfcbda90506c2e5eed38195e82c4eb1cbdf9060200160405180910390a3505080610d7090614e2d565b9050610b17565b50600483018190556001830154606490610d9b90600160401b900460ff1683614e4f565b1015610dbd57604051635943317f60e01b81526004810182905260240161064f565b5f73__$fd0c147b4031eef6079b0498cbafa865f0$__634d847884610de1876121df565b604001516040518263ffffffff1660e01b8152600401610e019190614b5f565b602060405180830381865af4158015610e1c573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610e409190614b71565b90505f73__$fd0c147b4031eef6079b0498cbafa865f0$__6387418b8e886040518263ffffffff1660e01b8152600401610e7a9190614f91565b5f60405180830381865af4158015610e94573d5f803e3d5ffd5b505050506040513d5f823e601f3d908101601f19168201604052610ebb9190810190614b2e565b90505f600282604051610ece9190614cf6565b602060405180830381855afa158015610ee9573d5f803e3d5ffd5b5050506040513d601f19601f82011682018060405250810190610f0c9190614b71565b9050828114610f385760405163baaea89d60e01b8152600481018290526024810184905260440161064f565b5050506009909201805460ff1916600117905550505050565b610f5a826122f5565b610f7a576040516330efa98b60e01b81526004810183905260240161064f565b5f610f8483611cde565b5190506002816005811115610f9b57610f9b61488b565b14610fbb578060405163170cc93360e21b815260040161064f9190614a1d565b6108de838361231e565b5f80610fcf6125bd565b60030154610fdd908461501c565b9050801580610ff257506001600160401b0381115b156110135760405163222d164360e21b81526004810184905260240161064f565b92915050565b6108de8383836125e1565b61102c6127ca565b5f6110356125bd565b90505f8061104284612801565b9150915061104f826122f5565b61105b575050506110b3565b5f8281526006840160205260409020546001600160a01b03166004825160058111156110895761108961488b565b03611098576110988184612bb4565b6110ae816110a98460400151611399565b612bde565b505050505b6110c960015f8051602061564083398151915255565b50565b5f6110d56125bd565b5f848152600782016020526040808220815160e0810190925280549394509192909190829060ff16600381111561110e5761110e61488b565b600381111561111f5761111f61488b565b8152815461010090046001600160a01b0316602082015260018201546040808301919091526002909201546001600160401b038082166060840152600160401b820481166080840152600160801b8204811660a0840152600160c01b9091041660c0909101528101519091505f61119582611cde565b90506001835160038111156111ac576111ac61488b565b146111cd578251604051633b0d540d60e21b815261064f919060040161503b565b6004815160058111156111e2576111e261488b565b036111f8576111f086612c04565b505050505050565b5f8073__$fd0c147b4031eef6079b0498cbafa865f0$__6350782b0f61121d896121df565b604001516040518263ffffffff1660e01b815260040161123d9190614b5f565b606060405180830381865af4158015611258573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061127c9190615055565b50915091508184146112a957846040015160405163089938b360e11b815260040161064f91815260200190565b806001600160401b031683606001516001600160401b031610806112e25750806001600160401b03168560a001516001600160401b0316115b1561130b57604051632e19bc2d60e11b81526001600160401b038216600482015260240161064f565b5f888152600787016020908152604091829020805460ff1916600290811782550180546001600160401b034216600160401b81026fffffffffffffffff00000000000000001990921691909117909155915191825285918a917f047059b465069b8b751836b41f9f1d83daff583d2238cc7fbb461437ec23a4f6910160405180910390a35050505050505050565b5f6113a26125bd565b60030154611013906001600160401b038416614e4f565b5f6113c382611cde565b6080015192915050565b6113d88383836125e1565b61065857604051635bff683f60e11b81526004810184905260240161064f565b6114006127ca565b5f6114096125bd565b5f848152600782016020526040808220815160e0810190925280549394509192909190829060ff1660038111156114425761144261488b565b60038111156114535761145361488b565b8152815461010090046001600160a01b03166020820152600182015460408201526002909101546001600160401b038082166060840152600160401b820481166080840152600160801b8204811660a0840152600160c01b9091041660c09091015290506003815160038111156114cc576114cc61488b565b146114ed578051604051633b0d540d60e21b815261064f919060040161503b565b60046114fc8260400151611cde565b51600581111561150e5761150e61488b565b1461160d575f61151d846121df565b90505f8073__$fd0c147b4031eef6079b0498cbafa865f0$__6350782b0f84604001516040518263ffffffff1660e01b815260040161155c9190614b5f565b606060405180830381865af4158015611577573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061159b9190615055565b5091509150818460400151146115c75760405163089938b360e11b81526004810183905260240161064f565b806001600160401b03168460c001516001600160401b0316111561160957604051632e19bc2d60e11b81526001600160401b038216600482015260240161064f565b5050505b61161684612c04565b505061162e60015f8051602061564083398151915255565b5050565b5f61163b6125bd565b90505f61164783611cde565b519050600481600581111561165e5761165e61488b565b1461167e578060405163170cc93360e21b815260040161064f9190614a1d565b5f8381526006830160205260409020546001600160a01b031633146116c457335b604051636e2ccd7560e11b81526001600160a01b03909116600482015260240161064f565b5f838152600683016020526040902054610658906001600160a01b031684612bb4565b5f805160206156208339815191525f8073__$fd0c147b4031eef6079b0498cbafa865f0$__63021de88f61171a866121df565b604001516040518263ffffffff1660e01b815260040161173a9190614b5f565b6040805180830381865af4158015611754573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611778919061508a565b915091508061179e57604051632d07135360e01b8152811515600482015260240161064f565b5f828152600684016020526040902080546117b8906149eb565b90505f036117dc5760405163089938b360e11b81526004810183905260240161064f565b60015f83815260078501602052604090205460ff1660058111156118025761180261488b565b14611835575f8281526007840160205260409081902054905163170cc93360e21b815261064f9160ff1690600401614a1d565b5f828152600684016020526040812061184d9161464d565b5f828152600784016020908152604091829020805460ff1916600290811782550180546001600160401b0342818116600160c01b026001600160c01b0390931692909217928390558451600160801b9093041682529181019190915283917ff8fd1c90fb9cfa2ca2358fdf5806b086ad43315d92b221c929efc7f105ce7568910160405180910390a250505050565b5f6118e56127ca565b6118f184848434612dd2565b905061190960015f8051602061564083398151915255565b9392505050565b5f6119196125bd565b5f838152600782016020526040808220815160e0810190925280549394509192909190829060ff1660038111156119525761195261488b565b60038111156119635761196361488b565b8152815461010090046001600160a01b0316602082015260018083015460408301526002909201546001600160401b038082166060840152600160401b820481166080840152600160801b8204811660a0840152600160c01b9091041660c090910152909150815160038111156119dc576119dc61488b565b141580156119fd57506003815160038111156119fa576119fa61488b565b14155b15611a1e578051604051633b0d540d60e21b815261064f919060040161503b565b5f611a2c8260400151611cde565b905080606001516001600160401b03165f03611a5e576040516339b894f960e21b81526004810185905260240161064f565b60408083015160608301516080840151925163854a893f60e01b81526005600160991b019363ee5b48eb9373__$fd0c147b4031eef6079b0498cbafa865f0$__9363854a893f93611acc93906004019283526001600160401b03918216602084015216604082015260600190565b5f60405180830381865af4158015611ae6573d5f803e3d5ffd5b505050506040513d5f823e601f3d908101601f19168201604052611b0d9190810190614b2e565b6040518263ffffffff1660e01b8152600401611b299190614b5f565b6020604051808303815f875af1158015611b45573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611b699190614b71565b5050505050565b5f8181527fe92546d698950ddd38910d2e15ed1d923cd0a7b3dde9e2a6a3f380565559cb066020526040902080545f805160206156208339815191529190611bb7906149eb565b90505f03611bdb5760405163089938b360e11b81526004810183905260240161064f565b60015f83815260078301602052604090205460ff166005811115611c0157611c0161488b565b14611c34575f8281526007820160205260409081902054905163170cc93360e21b815261064f9160ff1690600401614a1d565b5f82815260068201602052604090819020905163ee5b48eb60e01b81526005600160991b019163ee5b48eb91611c6d91906004016150b8565b6020604051808303815f875af1158015611c89573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906106589190614b71565b5f611cb66127ca565b611cc1823334612f2c565b9050611cd960015f8051602061564083398151915255565b919050565b611ce6614684565b5f8281525f80516020615660833981519152602052604090819020815160e0810190925280545f80516020615620833981519152929190829060ff166005811115611d3357611d3361488b565b6005811115611d4457611d4461488b565b8152602001600182018054611d58906149eb565b80601f0160208091040260200160405190810160405280929190818152602001828054611d84906149eb565b8015611dcf5780601f10611da657610100808354040283529160200191611dcf565b820191905f5260205f20905b815481529060010190602001808311611db257829003601f168201915b505050918352505060028201546001600160401b038082166020840152600160401b820481166040840152600160801b820481166060840152600160c01b9091048116608083015260039092015490911660a0909101529392505050565b6040515f905f80516020615620833981519152907fe92546d698950ddd38910d2e15ed1d923cd0a7b3dde9e2a6a3f380565559cb0890611e709086908690615142565b90815260200160405180910390205491505092915050565b5f80611e926125bd565b5f868152600782016020526040808220815160e0810190925280549394509192909190829060ff166003811115611ecb57611ecb61488b565b6003811115611edc57611edc61488b565b8152815461010090046001600160a01b0316602082015260018201546040808301919091526002909201546001600160401b038082166060840152600160401b820481166080840152600160801b8204811660a0840152600160c01b9091041660c0909101528101519091505f611f5282611cde565b9050600283516003811115611f6957611f6961488b565b14611f8a578251604051633b0d540d60e21b815261064f919060040161503b565b60208301516001600160a01b03163314612026575f8281526006850160205260409020546001600160a01b03163314611fc3573361169f565b5f82815260068501602052604090205460a0820151611ff291600160b01b90046001600160401b031690615151565b6001600160401b03164210156120265760405163fb6ce63f60e01b81526001600160401b034216600482015260240161064f565b60028151600581111561203b5761203b61488b565b03612169576002840154608084015161205d916001600160401b031690615151565b6001600160401b03164210156120915760405163fb6ce63f60e01b81526001600160401b034216600482015260240161064f565b86156120a3576120a1828761231e565b505b5f8881526007850160205260409020805460ff19166003179055606083015160808201516120dc9184916120d79190615171565b61316c565b505f898152600786016020526040812060020180546001600160401b03909316600160c01b026001600160c01b039093169290921790915561211d84613343565b5f8a81526008870160205260408082208390555191925084918b917f366d336c0ab380dc799f095a6f82a26326585c52909cc698b09ba4540709ed5791a3151594506119099350505050565b60048151600581111561217e5761217e61488b565b036121b25761218c83613343565b5f8981526008860160205260409020556121a588612c04565b6001945050505050611909565b805160405163170cc93360e21b815261064f9190600401614a1d565b6121d66134da565b6110c981613525565b60408051606080820183525f8083526020830152918101919091526040516306f8253560e41b815263ffffffff831660048201525f9081906005600160991b0190636f825350906024015f60405180830381865afa158015612243573d5f803e3d5ffd5b505050506040513d5f823e601f3d908101601f1916820160405261226a9190810190615191565b915091508061228c57604051636b2f19e960e01b815260040160405180910390fd5b8151156122b2578151604051636ba589a560e01b8152600481019190915260240161064f565b60208201516001600160a01b0316156122ee576020820151604051624de75d60e31b81526001600160a01b03909116600482015260240161064f565b5092915050565b5f806122ff6125bd565b5f938452600601602052505060409020546001600160a01b0316151590565b6040516306f8253560e41b815263ffffffff821660048201525f90819081906005600160991b0190636f825350906024015f60405180830381865afa158015612369573d5f803e3d5ffd5b505050506040513d5f823e601f3d908101601f191682016040526123909190810190615191565b91509150806123b257604051636b2f19e960e01b815260040160405180910390fd5b5f6123bb6125bd565b60058101548451919250146123e9578251604051636ba589a560e01b8152600481019190915260240161064f565b60208301516001600160a01b031615612425576020830151604051624de75d60e31b81526001600160a01b03909116600482015260240161064f565b60208301516001600160a01b031615612461576020830151604051624de75d60e31b81526001600160a01b03909116600482015260240161064f565b5f8073__$fd0c147b4031eef6079b0498cbafa865f0$__63088c246386604001516040518263ffffffff1660e01b815260040161249e9190614b5f565b6040805180830381865af41580156124b8573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906124dc9190615221565b915091508188146125035760405163089938b360e11b81526004810189905260240161064f565b5f8881526006840160205260409020600101546001600160401b039081169082161115612594575f888152600684016020908152604091829020600101805467ffffffffffffffff19166001600160401b038516908117909155915191825289917fec44148e8ff271f2d0bacef1142154abacb0abb3a29eb3eb50e2ca97e86d0435910160405180910390a26125b2565b505f8781526006830160205260409020600101546001600160401b03165b979650505050505050565b7f4317713f7ecbdddd4bc99e95d903adedaa883b2e7c2551610bd13e2c7e473d0090565b5f806125eb6125bd565b90505f6125f78661359f565b9050612602866122f5565b61261157600192505050611909565b5f8681526006830160205260409020546001600160a01b03163314612636573361169f565b5f86815260068301602052604090205460a082015161266591600160b01b90046001600160401b031690615151565b6001600160401b03168160c001516001600160401b031610156126ac5760c081015160405163fb6ce63f60e01b81526001600160401b03909116600482015260240161064f565b5f85156126c4576126bd878661231e565b90506126e2565b505f8681526006830160205260409020600101546001600160401b03165b600483015460408301515f916001600160a01b031690634f22429f9061270790611399565b60a086015160c087015160405160e085901b6001600160e01b031916815260048101939093526001600160401b03918216602484018190526044840152811660648301528516608482015260a401602060405180830381865afa158015612770573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906127949190614b71565b905080846009015f8a81526020019081526020015f205f8282546127b89190614e1a565b90915550501515979650505050505050565b5f805160206156408339815191528054600119016127fb57604051633ee5aeb560e01b815260040160405180910390fd5b60029055565b5f61280a614684565b5f805160206156208339815191525f8073__$fd0c147b4031eef6079b0498cbafa865f0$__63021de88f61283d886121df565b604001516040518263ffffffff1660e01b815260040161285d9190614b5f565b6040805180830381865af4158015612877573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061289b919061508a565b9150915080156128c257604051632d07135360e01b8152811515600482015260240161064f565b5f828152600784016020526040808220815160e081019092528054829060ff1660058111156128f3576128f361488b565b60058111156129045761290461488b565b8152602001600182018054612918906149eb565b80601f0160208091040260200160405190810160405280929190818152602001828054612944906149eb565b801561298f5780601f106129665761010080835404028352916020019161298f565b820191905f5260205f20905b81548152906001019060200180831161297257829003601f168201915b505050918352505060028201546001600160401b038082166020840152600160401b820481166040840152600160801b820481166060840152600160c01b909104811660808301526003928301541660a090910152909150815160058111156129fa576129fa61488b565b14158015612a1b5750600181516005811115612a1857612a1861488b565b14155b15612a3c57805160405163170cc93360e21b815261064f9190600401614a1d565b600381516005811115612a5157612a5161488b565b03612a5f5760048152612a64565b600581525b836008018160200151604051612a7a9190614cf6565b90815260408051602092819003830190205f908190558581526007870190925290208151815483929190829060ff19166001836005811115612abe57612abe61488b565b021790555060208201516001820190612ad79082614d4b565b5060408201516002820180546060850151608086015160a08701516001600160401b039586166001600160801b031990941693909317600160401b92861692909202919091176001600160801b0316600160801b918516919091026001600160c01b031617600160c01b9184169190910217905560c0909201516003909101805467ffffffffffffffff19169190921617905580516005811115612b7d57612b7d61488b565b60405184907f1c08e59656f1a18dc2da76826cdc52805c43e897a17c50faefb8ab3c1526cc16905f90a39196919550909350505050565b5f612bbd6125bd565b5f838152600982016020526040812080549190559091506108de8482613883565b61162e6001600160a01b038316826138e1565b60015f8051602061564083398151915255565b5f612c0d6125bd565b5f838152600782016020526040808220815160e0810190925280549394509192909190829060ff166003811115612c4657612c4661488b565b6003811115612c5757612c5761488b565b8152815461010090046001600160a01b0316602082015260018201546040808301919091526002909201546001600160401b038082166060840152600160401b820481166080840152600160801b8204811660a0840152600160c01b9091041660c090910152810151909150612cf47fe92546d698950ddd38910d2e15ed1d923cd0a7b3dde9e2a6a3f380565559cb01546001600160401b031690565b8260800151612d039190615151565b6001600160401b0316421015612d375760405163fb6ce63f60e01b81526001600160401b034216600482015260240161064f565b5f8481526007840160209081526040822080546001600160a81b0319168155600181018390556002018290558301519080612d73838886613974565b91509150612d8c85602001516110a98760600151611399565b6040805183815260208101839052859189917f8ececf510070c320d9a55323ffabe350e294ae505fc0c509dc5736da6f5cc993910160405180910390a350505050505050565b5f80612ddc6125bd565b600281015490915061ffff600160401b90910481169086161080612e05575061271061ffff8616115b15612e2957604051635f12e6c360e11b815261ffff8616600482015260240161064f565b60028101546001600160401b039081169085161015612e65576040516202a06d60e11b81526001600160401b038516600482015260240161064f565b8054831080612e775750806001015483115b15612e985760405163222d164360e21b81526004810184905260240161064f565b825f612ea382610fc5565b90505f612eb08983613a21565b5f818152600695909501602052604090942080546001600160b01b0319163317600160a01b61ffff9a909a16999099029890981767ffffffffffffffff60b01b1916600160b01b6001600160401b03989098169790970296909617875550506001909401805467ffffffffffffffff1916905550919392505050565b5f80612f366125bd565b90505f612f4284610fc5565b90505f612f4e87611cde565b9050612f59876122f5565b612f79576040516330efa98b60e01b81526004810188905260240161064f565b600281516005811115612f8e57612f8e61488b565b14612faf57805160405163170cc93360e21b815261064f9190600401614a1d565b5f828260800151612fc09190615151565b905083600201600a9054906101000a90046001600160401b03168260400151612fe99190615244565b6001600160401b0316816001600160401b0316111561302657604051636d51fe0560e11b81526001600160401b038216600482015260240161064f565b5f806130328a8461316c565b915091505f8a8360405160200161306092919091825260c01b6001600160c01b031916602082015260280190565b60408051601f1981840301815291815281516020928301205f81815260078b019093529120805491925060019160ff1916828002179055505f8181526007880160209081526040918290208054610100600160a81b0319166101006001600160a01b038f16908102919091178255600182018f9055600290910180546001600160401b038b81166001600160c01b03199092168217600160801b8a8316908102919091176001600160c01b031690935585519283528916938201939093529283019190915260608201849052908c9083907fb0024b263bc3a0b728a6edea50a69efa841189f8d32ee8af9d1c2b1a1a2234269060800160405180910390a49a9950505050505050505050565b5f8281525f80516020615660833981519152602052604081206002015481905f8051602061562083398151915290600160801b90046001600160401b03166131b48582613f46565b5f6131be87614169565b5f888152600785016020526040808220600201805467ffffffffffffffff60801b1916600160801b6001600160401b038c811691820292909217909255915163854a893f60e01b8152600481018c905291841660248301526044820152919250906005600160991b019063ee5b48eb9073__$fd0c147b4031eef6079b0498cbafa865f0$__9063854a893f906064015f60405180830381865af4158015613267573d5f803e3d5ffd5b505050506040513d5f823e601f3d908101601f1916820160405261328e9190810190614b2e565b6040518263ffffffff1660e01b81526004016132aa9190614b5f565b6020604051808303815f875af11580156132c6573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906132ea9190614b71565b604080516001600160401b038a811682526020820184905282519394508516928b927f07de5ff35a674a8005e661f3333c907ca6333462808762d19dc7b3abb1a8c1df928290030190a3909450925050505b9250929050565b5f8061334d6125bd565b90505f61335d8460400151611cde565b90505f6003825160058111156133755761337561488b565b148061339357506004825160058111156133915761339161488b565b145b156133a3575060c08101516133e0565b6002825160058111156133b8576133b861488b565b036133c45750426133e0565b815160405163170cc93360e21b815261064f9190600401614a1d565b84608001516001600160401b0316816001600160401b03161161340757505f949350505050565b600483015460608601516001600160a01b0390911690634f22429f9061342c90611399565b60a085015160808901516040808b01515f90815260068a0160205281902060010154905160e086901b6001600160e01b031916815260048101949094526001600160401b0392831660248501529082166044840152818616606484015216608482015260a401602060405180830381865afa1580156134ad573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906134d19190614b71565b95945050505050565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0054600160401b900460ff1661352357604051631afcd79f60e31b815260040160405180910390fd5b565b61352d6134da565b613536816141de565b61353e6141f7565b6110c96060820135608083013561355b60c0850160a086016147fe565b61356b60e0860160c0870161526f565b61357c610100870160e08801615288565b61010087013561359461014089016101208a01614b9c565b886101400135614207565b6135a7614684565b5f8281525f805160206156608339815191526020526040808220815160e0810190925280545f8051602061562083398151915293929190829060ff1660058111156135f4576135f461488b565b60058111156136055761360561488b565b8152602001600182018054613619906149eb565b80601f0160208091040260200160405190810160405280929190818152602001828054613645906149eb565b80156136905780601f1061366757610100808354040283529160200191613690565b820191905f5260205f20905b81548152906001019060200180831161367357829003601f168201915b50505091835250506002828101546001600160401b038082166020850152600160401b820481166040850152600160801b820481166060850152600160c01b9091048116608084015260039093015490921660a090910152909150815160058111156136fe576136fe61488b565b14613731575f8481526007830160205260409081902054905163170cc93360e21b815261064f9160ff1690600401614a1d565b60038152426001600160401b031660c08201525f84815260078301602052604090208151815483929190829060ff191660018360058111156137755761377561488b565b02179055506020820151600182019061378e9082614d4b565b5060408201516002820180546060850151608086015160a08701516001600160401b039586166001600160801b031990941693909317600160401b92861692909202919091176001600160801b0316600160801b918516919091026001600160c01b031617600160c01b9184169190910217905560c0909201516003909101805467ffffffffffffffff1916919092161790555f61382c858261316c565b6080840151604080516001600160401b03909216825242602083015291935083925087917f13d58394cf269d48bcf927959a29a5ffee7c9924dafff8927ecdf3c48ffa7c67910160405180910390a3509392505050565b6040516327ad555d60e11b81526001600160a01b0383166004820152602481018290526001600160991b0190634f5aaaba906044015f604051808303815f87803b1580156138cf575f80fd5b505af11580156111f0573d5f803e3d5ffd5b804710156139045760405163cd78605960e01b815230600482015260240161064f565b5f826001600160a01b0316826040515f6040518083038185875af1925050503d805f811461394d576040519150601f19603f3d011682016040523d82523d5f602084013e613952565b606091505b505090508061065857604051630a12f52160e11b815260040160405180910390fd5b5f805f61397f6125bd565b5f86815260088201602052604081208054908290559192509081908015613a13575f878152600685016020526040902054612710906139c990600160a01b900461ffff1683614e4f565b6139d3919061501c565b915081846009015f8981526020019081526020015f205f8282546139f79190614e1a565b90915550613a07905082826152a8565b9250613a138984613883565b509097909650945050505050565b7fe92546d698950ddd38910d2e15ed1d923cd0a7b3dde9e2a6a3f380565559cb09545f9060ff16613a6557604051637fab81e560e01b815260040160405180910390fd5b5f8051602061562083398151915242613a8460608601604087016147fe565b6001600160401b0316111580613abe5750613aa26202a30042614e1a565b613ab260608601604087016147fe565b6001600160401b031610155b15613af857613ad360608501604086016147fe565b604051635879da1360e11b81526001600160401b03909116600482015260240161064f565b613b0d613b0860608601866152bb565b6143ec565b613b1d613b0860808601866152bb565b6030613b2c60208601866152cf565b905014613b5e57613b4060208501856152cf565b6040516326475b2f60e11b815261064f925060040190815260200190565b613b6884806152cf565b90505f03613b9557613b7a84806152cf565b604051633e08a12560e11b815260040161064f929190615311565b5f60088201613ba486806152cf565b604051613bb2929190615142565b90815260200160405180910390205414613beb57613bd084806152cf565b60405163a41f772f60e01b815260040161064f929190615311565b613bf5835f613f46565b6040805160e08101909152815481525f90819073__$fd0c147b4031eef6079b0498cbafa865f0$__9063eb97ce519060208101613c328a806152cf565b8080601f0160208091040260200160405190810160405280939291908181526020018383808284375f92019190915250505090825250602090810190613c7a908b018b6152cf565b8080601f0160208091040260200160405190810160405280939291908181526020018383808284375f92019190915250505090825250602001613cc360608b0160408c016147fe565b6001600160401b03168152602001613cde60608b018b6152bb565b613ce790615324565b8152602001613cf960808b018b6152bb565b613d0290615324565b8152602001886001600160401b03168152506040518263ffffffff1660e01b8152600401613d309190615451565b5f60405180830381865af4158015613d4a573d5f803e3d5ffd5b505050506040513d5f823e601f3d908101601f19168201604052613d719190810190615508565b5f82815260068601602052604090209193509150613d8f8282614d4b565b508160088401613d9f88806152cf565b604051613dad929190615142565b9081526040519081900360200181209190915563ee5b48eb60e01b81525f906005600160991b019063ee5b48eb90613de9908590600401614b5f565b6020604051808303815f875af1158015613e05573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190613e299190614b71565b5f8481526007860160205260409020805460ff191660011790559050613e4f87806152cf565b5f858152600787016020526040902060010191613e6d91908361554b565b505f83815260078501602052604090206002810180546001600160c01b0319166001600160401b038916908117600160801b91909102176001600160c01b03169055600301805467ffffffffffffffff1916905580613ecc88806152cf565b604051613eda929190615142565b6040518091039020847fb77297e3befc691bfc864a81e241f83e2ef722b6e7becaa2ecec250c6d52b430898b6040016020810190613f1891906147fe565b604080516001600160401b0393841681529290911660208301520160405180910390a4509095945050505050565b5f805160206156208339815191525f6001600160401b038084169085161115613f7a57613f738385615171565b9050613f87565b613f848484615171565b90505b6040805160808101825260028401548082526003850154602083015260048501549282019290925260058401546001600160401b0316606082015242911580613fe9575060018401548151613fe5916001600160401b031690614e1a565b8210155b1561400f576001600160401b03831660608201528181526040810151602082015261402e565b82816060018181516140219190615151565b6001600160401b03169052505b606081015161403e906064615244565b602082015160018601546001600160401b0392909216916140699190600160401b900460ff16614e4f565b101561409957606081015160405163dfae880160e01b81526001600160401b03909116600482015260240161064f565b856001600160401b0316816040018181516140b49190614e1a565b9052506040810180516001600160401b03871691906140d49083906152a8565b905250600184015460408201516064916140f991600160401b90910460ff1690614e4f565b1015614120578060400151604051635943317f60e01b815260040161064f91815260200190565b805160028501556020810151600385015560408101516004850155606001516005909301805467ffffffffffffffff19166001600160401b039094169390931790925550505050565b5f8181525f805160206156608339815191526020526040812060020180545f8051602061562083398151915291906008906141b390600160401b90046001600160401b0316615604565b91906101000a8154816001600160401b0302191690836001600160401b031602179055915050919050565b6141e66134da565b6141ee614555565b6110c98161455d565b6141ff6134da565b613523614645565b61420f6134da565b5f6142186125bd565b905061ffff86161580614230575061271061ffff8716115b1561425457604051635f12e6c360e11b815261ffff8716600482015260240161064f565b878911156142785760405163222d164360e21b8152600481018a905260240161064f565b60ff8516158061428b5750600a60ff8616115b156142ae5760405163170db35960e31b815260ff8616600482015260240161064f565b7fe92546d698950ddd38910d2e15ed1d923cd0a7b3dde9e2a6a3f380565559cb01546001600160401b03166001600160401b0316876001600160401b03161015614315576040516202a06d60e11b81526001600160401b038816600482015260240161064f565b835f036143355760405163a733007160e01b815260040160405180910390fd5b8161435657604051632f6bd1db60e01b81526004810183905260240161064f565b97885560018801969096556002870180546001600160401b039690961669ffffffffffffffffffff1990961695909517600160401b61ffff95909516949094029390931767ffffffffffffffff60501b191660ff92909216600160501b029190911790925560038401919091556004830180546001600160a01b0319166001600160a01b03909216919091179055600590910155565b6143f960208201826147d1565b63ffffffff1615801561441957506144146020820182614bb7565b151590505b156144605761442b60208201826147d1565b6144386020830183614bb7565b60405163c08a0f1d60e01b815263ffffffff909316600484015260248301525060440161064f565b61446d6020820182614bb7565b905061447c60208301836147d1565b63ffffffff1611156144955761442b60208201826147d1565b60015b6144a56020830183614bb7565b905081101561162e576144bb6020830183614bb7565b6144c66001846152a8565b8181106144d5576144d5614bfc565b90506020020160208101906144ea9190614b9c565b6001600160a01b03166145006020840184614bb7565b8381811061451057614510614bfc565b90506020020160208101906145259190614b9c565b6001600160a01b0316101561454d57604051630dbc8d5f60e31b815260040160405180910390fd5b600101614498565b6135236134da565b6145656134da565b80355f80516020615620833981519152908155601461458a6060840160408501615288565b60ff1611806145a957506145a46060830160408401615288565b60ff16155b156145dd576145be6060830160408401615288565b604051634a59bbff60e11b815260ff909116600482015260240161064f565b6145ed6060830160408401615288565b60018201805460ff92909216600160401b0260ff60401b1990921691909117905561461e60408301602084016147fe565b600191909101805467ffffffffffffffff19166001600160401b0390921691909117905550565b612bf16134da565b508054614659906149eb565b5f825580601f10614668575050565b601f0160209004905f5260205f20908101906110c991906146c1565b6040805160e08101909152805f81526060602082018190525f604083018190529082018190526080820181905260a0820181905260c09091015290565b5b808211156146d5575f81556001016146c2565b5090565b80151581146110c9575f80fd5b803563ffffffff81168114611cd9575f80fd5b5f805f6060848603121561470b575f80fd5b83359250602084013561471d816146d9565b915061472b604085016146e6565b90509250925092565b5f60208284031215614744575f80fd5b5035919050565b5f610160828403121561475c575f80fd5b50919050565b5f8060408385031215614773575f80fd5b82356001600160401b03811115614788575f80fd5b830160808186031215614799575f80fd5b91506147a7602084016146e6565b90509250929050565b5f80604083850312156147c1575f80fd5b823591506147a7602084016146e6565b5f602082840312156147e1575f80fd5b611909826146e6565b6001600160401b03811681146110c9575f80fd5b5f6020828403121561480e575f80fd5b8135611909816147ea565b803561ffff81168114611cd9575f80fd5b5f805f6060848603121561483c575f80fd5b83356001600160401b03811115614851575f80fd5b840160a08187031215614862575f80fd5b925061487060208501614819565b91506040840135614880816147ea565b809150509250925092565b634e487b7160e01b5f52602160045260245ffd5b600681106148af576148af61488b565b9052565b5f5b838110156148cd5781810151838201526020016148b5565b50505f910152565b5f81518084526148ec8160208601602086016148b3565b601f01601f19169290920160200192915050565b6020815261491260208201835161489f565b5f602083015160e0604084015261492d6101008401826148d5565b905060408401516001600160401b0380821660608601528060608701511660808601528060808701511660a08601528060a08701511660c08601528060c08701511660e086015250508091505092915050565b5f8060208385031215614991575f80fd5b82356001600160401b03808211156149a7575f80fd5b818501915085601f8301126149ba575f80fd5b8135818111156149c8575f80fd5b8660208285010111156149d9575f80fd5b60209290920196919550909350505050565b600181811c908216806149ff57607f821691505b60208210810361475c57634e487b7160e01b5f52602260045260245ffd5b60208101611013828461489f565b634e487b7160e01b5f52604160045260245ffd5b604051606081016001600160401b0381118282101715614a6157614a61614a2b565b60405290565b604080519081016001600160401b0381118282101715614a6157614a61614a2b565b604051601f8201601f191681016001600160401b0381118282101715614ab157614ab1614a2b565b604052919050565b5f6001600160401b03821115614ad157614ad1614a2b565b50601f01601f191660200190565b5f82601f830112614aee575f80fd5b8151614b01614afc82614ab9565b614a89565b818152846020838601011115614b15575f80fd5b614b268260208301602087016148b3565b949350505050565b5f60208284031215614b3e575f80fd5b81516001600160401b03811115614b53575f80fd5b614b2684828501614adf565b602081525f61190960208301846148d5565b5f60208284031215614b81575f80fd5b5051919050565b6001600160a01b03811681146110c9575f80fd5b5f60208284031215614bac575f80fd5b813561190981614b88565b5f808335601e19843603018112614bcc575f80fd5b8301803591506001600160401b03821115614be5575f80fd5b6020019150600581901b360382131561333c575f80fd5b634e487b7160e01b5f52603260045260245ffd5b5f8235605e19833603018112614c24575f80fd5b9190910192915050565b5f82601f830112614c3d575f80fd5b8135614c4b614afc82614ab9565b818152846020838601011115614c5f575f80fd5b816020850160208301375f918101602001919091529392505050565b5f60608236031215614c8b575f80fd5b614c93614a3f565b82356001600160401b0380821115614ca9575f80fd5b614cb536838701614c2e565b83526020850135915080821115614cca575f80fd5b50614cd736828601614c2e565b6020830152506040830135614ceb816147ea565b604082015292915050565b5f8251614c248184602087016148b3565b601f82111561065857805f5260205f20601f840160051c81016020851015614d2c5750805b601f840160051c820191505b81811015611b69575f8155600101614d38565b81516001600160401b03811115614d6457614d64614a2b565b614d7881614d7284546149eb565b84614d07565b602080601f831160018114614dab575f8415614d945750858301515b5f19600386901b1c1916600185901b1785556111f0565b5f85815260208120601f198616915b82811015614dd957888601518255948401946001909101908401614dba565b5085821015614df657878501515f19600388901b60f8161c191681555b5050505050600190811b01905550565b634e487b7160e01b5f52601160045260245ffd5b8082018082111561101357611013614e06565b5f63ffffffff808316818103614e4557614e45614e06565b6001019392505050565b808202811582820484141761101357611013614e06565b5f808335601e19843603018112614e7b575f80fd5b83016020810192503590506001600160401b03811115614e99575f80fd5b80360382131561333c575f80fd5b81835281816020850137505f828201602090810191909152601f909101601f19169091010190565b5f8383855260208086019550808560051b830101845f5b87811015614f8457848303601f19018952813536889003605e19018112614f0b575f80fd5b87016060614f198280614e66565b828752614f298388018284614ea7565b92505050614f3986830183614e66565b86830388880152614f4b838284614ea7565b925050506040808301359250614f60836147ea565b6001600160401b039290921694909101939093529783019790830190600101614ee6565b5090979650505050505050565b6020815281356020820152602082013560408201525f6040830135614fb581614b88565b6001600160a01b031660608381019190915283013536849003601e19018112614fdc575f80fd5b83016020810190356001600160401b03811115614ff7575f80fd5b8060051b3603821315615008575f80fd5b6080808501526134d160a085018284614ecf565b5f8261503657634e487b7160e01b5f52601260045260245ffd5b500490565b602081016004831061504f5761504f61488b565b91905290565b5f805f60608486031215615067575f80fd5b835192506020840151615079816147ea565b6040850151909250614880816147ea565b5f806040838503121561509b575f80fd5b8251915060208301516150ad816146d9565b809150509250929050565b5f60208083525f84546150ca816149eb565b806020870152604060018084165f81146150eb576001811461510757615134565b60ff19851660408a0152604084151560051b8a01019550615134565b895f5260205f205f5b8581101561512b5781548b8201860152908301908801615110565b8a016040019650505b509398975050505050505050565b818382375f9101908152919050565b6001600160401b038181168382160190808211156122ee576122ee614e06565b6001600160401b038281168282160390808211156122ee576122ee614e06565b5f80604083850312156151a2575f80fd5b82516001600160401b03808211156151b8575f80fd5b90840190606082870312156151cb575f80fd5b6151d3614a3f565b8251815260208301516151e581614b88565b60208201526040830151828111156151fb575f80fd5b61520788828601614adf565b60408301525080945050505060208301516150ad816146d9565b5f8060408385031215615232575f80fd5b8251915060208301516150ad816147ea565b6001600160401b0381811683821602808216919082811461526757615267614e06565b505092915050565b5f6020828403121561527f575f80fd5b61190982614819565b5f60208284031215615298575f80fd5b813560ff81168114611909575f80fd5b8181038181111561101357611013614e06565b5f8235603e19833603018112614c24575f80fd5b5f808335601e198436030181126152e4575f80fd5b8301803591506001600160401b038211156152fd575f80fd5b60200191503681900382131561333c575f80fd5b602081525f614b26602083018486614ea7565b5f60408236031215615334575f80fd5b61533c614a67565b615345836146e6565b81526020808401356001600160401b0380821115615361575f80fd5b9085019036601f830112615373575f80fd5b81358181111561538557615385614a2b565b8060051b9150615396848301614a89565b81815291830184019184810190368411156153af575f80fd5b938501935b838510156153d957843592506153c983614b88565b82825293850193908501906153b4565b94860194909452509295945050505050565b5f6040830163ffffffff8351168452602080840151604060208701528281518085526060880191506020830194505f92505b808310156154465784516001600160a01b0316825293830193600192909201919083019061541d565b509695505050505050565b60208152815160208201525f602083015160e060408401526154776101008401826148d5565b90506040840151601f198085840301606086015261549583836148d5565b92506001600160401b03606087015116608086015260808601519150808584030160a08601526154c583836153eb565b925060a08601519150808584030160c0860152506154e382826153eb565b91505060c084015161550060e08501826001600160401b03169052565b509392505050565b5f8060408385031215615519575f80fd5b8251915060208301516001600160401b03811115615535575f80fd5b61554185828601614adf565b9150509250929050565b6001600160401b0383111561556257615562614a2b565b6155768361557083546149eb565b83614d07565b5f601f8411600181146155a7575f85156155905750838201355b5f19600387901b1c1916600186901b178355611b69565b5f83815260208120601f198716915b828110156155d657868501358255602094850194600190920191016155b6565b50868210156155f2575f1960f88860031b161c19848701351681555b505060018560011b0183555050505050565b5f6001600160401b03808316818103614e4557614e45614e0656fee92546d698950ddd38910d2e15ed1d923cd0a7b3dde9e2a6a3f380565559cb009b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f00e92546d698950ddd38910d2e15ed1d923cd0a7b3dde9e2a6a3f380565559cb07a2646970667358221220bd26175e3dd9e47b3760353da1bccc7f878e04eeb92e3a177d04561dd0671f2764736f6c63430008190033", } // NativeTokenStakingManagerABI is the input ABI used to generate the binding from. @@ -2998,7 +2998,7 @@ func (_NativeTokenStakingManager *NativeTokenStakingManagerFilterer) ParseValida // ValidatorMessagesMetaData contains all meta data concerning the ValidatorMessages contract. var ValidatorMessagesMetaData = &bind.MetaData{ ABI: "[{\"inputs\":[],\"name\":\"InvalidBLSPublicKey\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"id\",\"type\":\"uint32\"}],\"name\":\"InvalidCodecID\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"actual\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"expected\",\"type\":\"uint32\"}],\"name\":\"InvalidMessageLength\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidMessageType\",\"type\":\"error\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"subnetID\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"validatorManagerBlockchainID\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"validatorManagerAddress\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"bytes\",\"name\":\"nodeID\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"blsPublicKey\",\"type\":\"bytes\"},{\"internalType\":\"uint64\",\"name\":\"weight\",\"type\":\"uint64\"}],\"internalType\":\"structInitialValidator[]\",\"name\":\"initialValidators\",\"type\":\"tuple[]\"}],\"internalType\":\"structConversionData\",\"name\":\"conversionData\",\"type\":\"tuple\"}],\"name\":\"packConversionData\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"validationID\",\"type\":\"bytes32\"},{\"internalType\":\"bool\",\"name\":\"valid\",\"type\":\"bool\"}],\"name\":\"packL1ValidatorRegistrationMessage\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"validationID\",\"type\":\"bytes32\"},{\"internalType\":\"uint64\",\"name\":\"nonce\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"weight\",\"type\":\"uint64\"}],\"name\":\"packL1ValidatorWeightMessage\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"subnetID\",\"type\":\"bytes32\"},{\"internalType\":\"bytes\",\"name\":\"nodeID\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"blsPublicKey\",\"type\":\"bytes\"},{\"internalType\":\"uint64\",\"name\":\"registrationExpiry\",\"type\":\"uint64\"},{\"components\":[{\"internalType\":\"uint32\",\"name\":\"threshold\",\"type\":\"uint32\"},{\"internalType\":\"address[]\",\"name\":\"addresses\",\"type\":\"address[]\"}],\"internalType\":\"structPChainOwner\",\"name\":\"remainingBalanceOwner\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"uint32\",\"name\":\"threshold\",\"type\":\"uint32\"},{\"internalType\":\"address[]\",\"name\":\"addresses\",\"type\":\"address[]\"}],\"internalType\":\"structPChainOwner\",\"name\":\"disableOwner\",\"type\":\"tuple\"},{\"internalType\":\"uint64\",\"name\":\"weight\",\"type\":\"uint64\"}],\"internalType\":\"structValidatorMessages.ValidationPeriod\",\"name\":\"validationPeriod\",\"type\":\"tuple\"}],\"name\":\"packRegisterL1ValidatorMessage\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"conversionID\",\"type\":\"bytes32\"}],\"name\":\"packSubnetToL1ConversionMessage\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"validationID\",\"type\":\"bytes32\"},{\"internalType\":\"uint64\",\"name\":\"uptime\",\"type\":\"uint64\"}],\"name\":\"packValidationUptimeMessage\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"input\",\"type\":\"bytes\"}],\"name\":\"unpackL1ValidatorRegistrationMessage\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"},{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"input\",\"type\":\"bytes\"}],\"name\":\"unpackL1ValidatorWeightMessage\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"},{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"input\",\"type\":\"bytes\"}],\"name\":\"unpackRegisterL1ValidatorMessage\",\"outputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"subnetID\",\"type\":\"bytes32\"},{\"internalType\":\"bytes\",\"name\":\"nodeID\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"blsPublicKey\",\"type\":\"bytes\"},{\"internalType\":\"uint64\",\"name\":\"registrationExpiry\",\"type\":\"uint64\"},{\"components\":[{\"internalType\":\"uint32\",\"name\":\"threshold\",\"type\":\"uint32\"},{\"internalType\":\"address[]\",\"name\":\"addresses\",\"type\":\"address[]\"}],\"internalType\":\"structPChainOwner\",\"name\":\"remainingBalanceOwner\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"uint32\",\"name\":\"threshold\",\"type\":\"uint32\"},{\"internalType\":\"address[]\",\"name\":\"addresses\",\"type\":\"address[]\"}],\"internalType\":\"structPChainOwner\",\"name\":\"disableOwner\",\"type\":\"tuple\"},{\"internalType\":\"uint64\",\"name\":\"weight\",\"type\":\"uint64\"}],\"internalType\":\"structValidatorMessages.ValidationPeriod\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"input\",\"type\":\"bytes\"}],\"name\":\"unpackSubnetToL1ConversionMessage\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"input\",\"type\":\"bytes\"}],\"name\":\"unpackValidationUptimeMessage\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"},{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"pure\",\"type\":\"function\"}]", - Bin: "0x612160610034600b8282823980515f1a607314602857634e487b7160e01b5f525f60045260245ffd5b305f52607381538281f3fe73000000000000000000000000000000000000000030146080604052600436106100b1575f3560e01c8063854a893f11610079578063854a893f146101b257806387418b8e1461020f5780639b83546514610222578063a699c13514610242578063e1d68f3014610255578063eb97ce5114610268575f80fd5b8063021de88f146100b5578063088c2463146100e25780634d8478841461011257806350782b0f146101335780637f7c427a1461016b575b5f80fd5b6100c86100c3366004611904565b610289565b604080519283529015156020830152015b60405180910390f35b6100f56100f0366004611904565b61044a565b604080519283526001600160401b039091166020830152016100d9565b610125610120366004611904565b61063b565b6040519081526020016100d9565b610146610141366004611904565b6107c8565b604080519384526001600160401b0392831660208501529116908201526060016100d9565b6101a561017936600461193d565b604080515f60208201819052602282015260268082019390935281518082039093018352604601905290565b6040516100d991906119a1565b6101a56101c03660046119d5565b604080515f6020820152600360e01b602282015260268101949094526001600160c01b031960c093841b811660468601529190921b16604e830152805180830360360181526056909201905290565b6101a561021d366004611a0e565b610a1e565b610235610230366004611904565b610bff565b6040516100d99190611aaa565b6101a5610250366004611b61565b61154a565b6101a5610263366004611b93565b61158e565b61027b610276366004611ca1565b6115c4565b6040516100d9929190611d9d565b5f8082516027146102c457825160405163cc92daa160e01b815263ffffffff9091166004820152602760248201526044015b60405180910390fd5b5f805b6002811015610313576102db816001611dc9565b6102e6906008611ddc565b61ffff168582815181106102fc576102fc611df3565b016020015160f81c901b91909117906001016102c7565b5061ffff81161561033d5760405163407b587360e01b815261ffff821660048201526024016102bb565b5f805b600481101561039857610354816003611dc9565b61035f906008611ddc565b63ffffffff1686610371836002611e07565b8151811061038157610381611df3565b016020015160f81c901b9190911790600101610340565b5063ffffffff81166002146103c057604051635b60892f60e01b815260040160405180910390fd5b5f805b6020811015610415576103d781601f611dc9565b6103e2906008611ddc565b876103ee836006611e07565b815181106103fe576103fe611df3565b016020015160f81c901b91909117906001016103c3565b505f8660268151811061042a5761042a611df3565b016020015191976001600160f81b03199092161515965090945050505050565b5f808251602e1461048057825160405163cc92daa160e01b815263ffffffff9091166004820152602e60248201526044016102bb565b5f805b60028110156104cf57610497816001611dc9565b6104a2906008611ddc565b61ffff168582815181106104b8576104b8611df3565b016020015160f81c901b9190911790600101610483565b5061ffff8116156104f95760405163407b587360e01b815261ffff821660048201526024016102bb565b5f805b600481101561055457610510816003611dc9565b61051b906008611ddc565b63ffffffff168661052d836002611e07565b8151811061053d5761053d611df3565b016020015160f81c901b91909117906001016104fc565b5063ffffffff81161561057a57604051635b60892f60e01b815260040160405180910390fd5b5f805b60208110156105cf5761059181601f611dc9565b61059c906008611ddc565b876105a8836006611e07565b815181106105b8576105b8611df3565b016020015160f81c901b919091179060010161057d565b505f805b600881101561062e576105e7816007611dc9565b6105f2906008611ddc565b6001600160401b031688610607836026611e07565b8151811061061757610617611df3565b016020015160f81c901b91909117906001016105d3565b5090969095509350505050565b5f815160261461067057815160405163cc92daa160e01b815263ffffffff9091166004820152602660248201526044016102bb565b5f805b60028110156106bf57610687816001611dc9565b610692906008611ddc565b61ffff168482815181106106a8576106a8611df3565b016020015160f81c901b9190911790600101610673565b5061ffff8116156106e95760405163407b587360e01b815261ffff821660048201526024016102bb565b5f805b600481101561074457610700816003611dc9565b61070b906008611ddc565b63ffffffff168561071d836002611e07565b8151811061072d5761072d611df3565b016020015160f81c901b91909117906001016106ec565b5063ffffffff81161561076a57604051635b60892f60e01b815260040160405180910390fd5b5f805b60208110156107bf5761078181601f611dc9565b61078c906008611ddc565b86610798836006611e07565b815181106107a8576107a8611df3565b016020015160f81c901b919091179060010161076d565b50949350505050565b5f805f83516036146107ff57835160405163cc92daa160e01b815263ffffffff9091166004820152603660248201526044016102bb565b5f805b600281101561084e57610816816001611dc9565b610821906008611ddc565b61ffff1686828151811061083757610837611df3565b016020015160f81c901b9190911790600101610802565b5061ffff8116156108785760405163407b587360e01b815261ffff821660048201526024016102bb565b5f805b60048110156108d35761088f816003611dc9565b61089a906008611ddc565b63ffffffff16876108ac836002611e07565b815181106108bc576108bc611df3565b016020015160f81c901b919091179060010161087b565b5063ffffffff81166003146108fb57604051635b60892f60e01b815260040160405180910390fd5b5f805b60208110156109505761091281601f611dc9565b61091d906008611ddc565b88610929836006611e07565b8151811061093957610939611df3565b016020015160f81c901b91909117906001016108fe565b505f805b60088110156109af57610968816007611dc9565b610973906008611ddc565b6001600160401b031689610988836026611e07565b8151811061099857610998611df3565b016020015160f81c901b9190911790600101610954565b505f805b6008811015610a0e576109c7816007611dc9565b6109d2906008611ddc565b6001600160401b03168a6109e783602e611e07565b815181106109f7576109f7611df3565b016020015160f81c901b91909117906001016109b3565b5091989097509095509350505050565b60605f80833560208501356014610a3a87870160408901611e1a565b610a476060890189611e33565b60405160f09790971b6001600160f01b0319166020880152602287019590955250604285019290925260e090811b6001600160e01b0319908116606286015260609290921b6bffffffffffffffffffffffff191660668501529190911b16607a820152607e0160405160208183030381529060405290505f5b610acd6060850185611e33565b9050811015610bf85781610ae46060860186611e33565b83818110610af457610af4611df3565b9050602002810190610b069190611e7f565b610b109080611e9d565b9050610b1f6060870187611e33565b84818110610b2f57610b2f611df3565b9050602002810190610b419190611e7f565b610b4b9080611e9d565b610b586060890189611e33565b86818110610b6857610b68611df3565b9050602002810190610b7a9190611e7f565b610b88906020810190611e9d565b610b9560608b018b611e33565b88818110610ba557610ba5611df3565b9050602002810190610bb79190611e7f565b610bc8906060810190604001611edf565b604051602001610bde9796959493929190611ef8565b60408051601f198184030181529190529150600101610ac0565b5092915050565b610c076117b1565b5f610c106117b1565b5f805b6002811015610c6e57610c27816001611dc9565b610c32906008611ddc565b61ffff1686610c4763ffffffff871684611e07565b81518110610c5757610c57611df3565b016020015160f81c901b9190911790600101610c13565b5061ffff811615610c985760405163407b587360e01b815261ffff821660048201526024016102bb565b610ca3600284611f61565b9250505f805b6004811015610d0857610cbd816003611dc9565b610cc8906008611ddc565b63ffffffff16868563ffffffff1683610ce19190611e07565b81518110610cf157610cf1611df3565b016020015160f81c901b9190911790600101610ca9565b5063ffffffff8116600114610d3057604051635b60892f60e01b815260040160405180910390fd5b610d3b600484611f61565b9250505f805b6020811015610d9857610d5581601f611dc9565b610d60906008611ddc565b86610d7163ffffffff871684611e07565b81518110610d8157610d81611df3565b016020015160f81c901b9190911790600101610d41565b50808252610da7602084611f61565b9250505f805b6004811015610e0c57610dc1816003611dc9565b610dcc906008611ddc565b63ffffffff16868563ffffffff1683610de59190611e07565b81518110610df557610df5611df3565b016020015160f81c901b9190911790600101610dad565b50610e18600484611f61565b92505f8163ffffffff166001600160401b03811115610e3957610e3961180b565b6040519080825280601f01601f191660200182016040528015610e63576020820181803683370190505b5090505f5b8263ffffffff16811015610ed25786610e8763ffffffff871683611e07565b81518110610e9757610e97611df3565b602001015160f81c60f81b828281518110610eb457610eb4611df3565b60200101906001600160f81b03191690815f1a905350600101610e68565b5060208301819052610ee48285611f61565b604080516030808252606082019092529195505f92506020820181803683370190505090505f5b6030811015610f705786610f2563ffffffff871683611e07565b81518110610f3557610f35611df3565b602001015160f81c60f81b828281518110610f5257610f52611df3565b60200101906001600160f81b03191690815f1a905350600101610f0b565b5060408301819052610f83603085611f61565b9350505f805b6008811015610fe957610f9d816007611dc9565b610fa8906008611ddc565b6001600160401b031687610fc263ffffffff881684611e07565b81518110610fd257610fd2611df3565b016020015160f81c901b9190911790600101610f89565b506001600160401b0381166060840152611004600885611f61565b9350505f805f5b600481101561106a5761101f816003611dc9565b61102a906008611ddc565b63ffffffff16888763ffffffff16836110439190611e07565b8151811061105357611053611df3565b016020015160f81c901b919091179060010161100b565b50611076600486611f61565b94505f5b60048110156110d95761108e816003611dc9565b611099906008611ddc565b63ffffffff16888763ffffffff16836110b29190611e07565b815181106110c2576110c2611df3565b016020015160f81c901b929092179160010161107a565b506110e5600486611f61565b94505f8263ffffffff166001600160401b038111156111065761110661180b565b60405190808252806020026020018201604052801561112f578160200160208202803683370190505b5090505f5b8363ffffffff16811015611217576040805160148082528183019092525f916020820181803683370190505090505f5b60148110156111c9578a61117e63ffffffff8b1683611e07565b8151811061118e5761118e611df3565b602001015160f81c60f81b8282815181106111ab576111ab611df3565b60200101906001600160f81b03191690815f1a905350600101611164565b505f60148201519050808484815181106111e5576111e5611df3565b6001600160a01b039092166020928302919091019091015261120860148a611f61565b98505050806001019050611134565b506040805180820190915263ffffffff9092168252602082015260808401525f80805b60048110156112995761124e816003611dc9565b611259906008611ddc565b63ffffffff16898863ffffffff16836112729190611e07565b8151811061128257611282611df3565b016020015160f81c901b919091179060010161123a565b506112a5600487611f61565b95505f5b6004811015611308576112bd816003611dc9565b6112c8906008611ddc565b63ffffffff16898863ffffffff16836112e19190611e07565b815181106112f1576112f1611df3565b016020015160f81c901b92909217916001016112a9565b50611314600487611f61565b95505f8263ffffffff166001600160401b038111156113355761133561180b565b60405190808252806020026020018201604052801561135e578160200160208202803683370190505b5090505f5b8363ffffffff16811015611446576040805160148082528183019092525f916020820181803683370190505090505f5b60148110156113f8578b6113ad63ffffffff8c1683611e07565b815181106113bd576113bd611df3565b602001015160f81c60f81b8282815181106113da576113da611df3565b60200101906001600160f81b03191690815f1a905350600101611393565b505f601482015190508084848151811061141457611414611df3565b6001600160a01b039092166020928302919091019091015261143760148b611f61565b99505050806001019050611363565b506040805180820190915263ffffffff9092168252602082015260a08501525f6114708284611f61565b61147b906014611f7e565b61148685607a611f61565b6114909190611f61565b90508063ffffffff168851146114cc57875160405163cc92daa160e01b815263ffffffff918216600482015290821660248201526044016102bb565b5f805b600881101561152f576114e3816007611dc9565b6114ee906008611ddc565b6001600160401b03168a61150863ffffffff8b1684611e07565b8151811061151857611518611df3565b016020015160f81c901b91909117906001016114cf565b506001600160401b031660c086015250929695505050505050565b6040515f6020820152600160e11b60228201526026810183905281151560f81b60468201526060906047015b60405160208183030381529060405290505b92915050565b6040515f602082018190526022820152602681018390526001600160c01b031960c083901b166046820152606090604e01611576565b5f60608260400151516030146115ed5760405163180ffa0d60e01b815260040160405180910390fd5b82516020808501518051604080880151606089015160808a01518051908701515193515f9861162e988a986001989297929690959094909390929101611fa6565b60405160208183030381529060405290505f5b846080015160200151518110156116a05781856080015160200151828151811061166d5761166d611df3565b6020026020010151604051602001611686929190612060565b60408051601f198184030181529190529150600101611641565b5060a08401518051602091820151516040516116c0938593929101612096565b60405160208183030381529060405290505f5b8460a00151602001515181101561173257818560a001516020015182815181106116ff576116ff611df3565b6020026020010151604051602001611718929190612060565b60408051601f1981840301815291905291506001016116d3565b5060c08401516040516117499183916020016120d1565b604051602081830303815290604052905060028160405161176a9190612102565b602060405180830381855afa158015611785573d5f803e3d5ffd5b5050506040513d601f19601f820116820180604052508101906117a89190612113565b94909350915050565b6040805160e0810182525f808252606060208084018290528385018290528184018390528451808601865283815280820183905260808501528451808601909552918452908301529060a082019081525f60209091015290565b634e487b7160e01b5f52604160045260245ffd5b604080519081016001600160401b03811182821017156118415761184161180b565b60405290565b60405160e081016001600160401b03811182821017156118415761184161180b565b604051601f8201601f191681016001600160401b03811182821017156118915761189161180b565b604052919050565b5f82601f8301126118a8575f80fd5b81356001600160401b038111156118c1576118c161180b565b6118d4601f8201601f1916602001611869565b8181528460208386010111156118e8575f80fd5b816020850160208301375f918101602001919091529392505050565b5f60208284031215611914575f80fd5b81356001600160401b03811115611929575f80fd5b61193584828501611899565b949350505050565b5f6020828403121561194d575f80fd5b5035919050565b5f5b8381101561196e578181015183820152602001611956565b50505f910152565b5f815180845261198d816020860160208601611954565b601f01601f19169290920160200192915050565b602081525f6119b36020830184611976565b9392505050565b80356001600160401b03811681146119d0575f80fd5b919050565b5f805f606084860312156119e7575f80fd5b833592506119f7602085016119ba565b9150611a05604085016119ba565b90509250925092565b5f60208284031215611a1e575f80fd5b81356001600160401b03811115611a33575f80fd5b8201608081850312156119b3575f80fd5b5f6040830163ffffffff8351168452602080840151604060208701528281518085526060880191506020830194505f92505b80831015611a9f5784516001600160a01b03168252938301936001929092019190830190611a76565b509695505050505050565b60208152815160208201525f602083015160e06040840152611ad0610100840182611976565b90506040840151601f1980858403016060860152611aee8383611976565b92506001600160401b03606087015116608086015260808601519150808584030160a0860152611b1e8383611a44565b925060a08601519150808584030160c086015250611b3c8282611a44565b91505060c0840151611b5960e08501826001600160401b03169052565b509392505050565b5f8060408385031215611b72575f80fd5b8235915060208301358015158114611b88575f80fd5b809150509250929050565b5f8060408385031215611ba4575f80fd5b82359150611bb4602084016119ba565b90509250929050565b80356001600160a01b03811681146119d0575f80fd5b5f60408284031215611be3575f80fd5b611beb61181f565b9050813563ffffffff81168114611c00575f80fd5b81526020828101356001600160401b0380821115611c1c575f80fd5b818501915085601f830112611c2f575f80fd5b813581811115611c4157611c4161180b565b8060051b9150611c52848301611869565b8181529183018401918481019088841115611c6b575f80fd5b938501935b83851015611c9057611c8185611bbd565b82529385019390850190611c70565b808688015250505050505092915050565b5f60208284031215611cb1575f80fd5b81356001600160401b0380821115611cc7575f80fd5b9083019060e08286031215611cda575f80fd5b611ce2611847565b82358152602083013582811115611cf7575f80fd5b611d0387828601611899565b602083015250604083013582811115611d1a575f80fd5b611d2687828601611899565b604083015250611d38606084016119ba565b6060820152608083013582811115611d4e575f80fd5b611d5a87828601611bd3565b60808301525060a083013582811115611d71575f80fd5b611d7d87828601611bd3565b60a083015250611d8f60c084016119ba565b60c082015295945050505050565b828152604060208201525f6119356040830184611976565b634e487b7160e01b5f52601160045260245ffd5b8181038181111561158857611588611db5565b808202811582820484141761158857611588611db5565b634e487b7160e01b5f52603260045260245ffd5b8082018082111561158857611588611db5565b5f60208284031215611e2a575f80fd5b6119b382611bbd565b5f808335601e19843603018112611e48575f80fd5b8301803591506001600160401b03821115611e61575f80fd5b6020019150600581901b3603821315611e78575f80fd5b9250929050565b5f8235605e19833603018112611e93575f80fd5b9190910192915050565b5f808335601e19843603018112611eb2575f80fd5b8301803591506001600160401b03821115611ecb575f80fd5b602001915036819003821315611e78575f80fd5b5f60208284031215611eef575f80fd5b6119b3826119ba565b5f8851611f09818460208d01611954565b60e089901b6001600160e01b031916908301908152868860048301378681019050600481015f8152858782375060c09390931b6001600160c01b0319166004939094019283019390935250600c019695505050505050565b63ffffffff818116838216019080821115610bf857610bf8611db5565b63ffffffff818116838216028082169190828114611f9e57611f9e611db5565b505092915050565b61ffff60f01b8a60f01b1681525f63ffffffff60e01b808b60e01b166002840152896006840152808960e01b166026840152508651611fec81602a850160208b01611954565b86519083019061200381602a840160208b01611954565b60c087901b6001600160c01b031916602a9290910191820152612035603282018660e01b6001600160e01b0319169052565b61204e603682018560e01b6001600160e01b0319169052565b603a019b9a5050505050505050505050565b5f8351612071818460208801611954565b60609390931b6bffffffffffffffffffffffff19169190920190815260140192915050565b5f84516120a7818460208901611954565b6001600160e01b031960e095861b8116919093019081529290931b16600482015260080192915050565b5f83516120e2818460208801611954565b60c09390931b6001600160c01b0319169190920190815260080192915050565b5f8251611e93818460208701611954565b5f60208284031215612123575f80fd5b505191905056fea26469706673582212202d7d64f0428d7e99357ab60d9a73b8ca490d4f97c12eed734b80a5bb6df8eeea64736f6c63430008190033", + Bin: "0x612160610034600b8282823980515f1a607314602857634e487b7160e01b5f525f60045260245ffd5b305f52607381538281f3fe73000000000000000000000000000000000000000030146080604052600436106100b1575f3560e01c8063854a893f11610079578063854a893f146101b257806387418b8e1461020f5780639b83546514610222578063a699c13514610242578063e1d68f3014610255578063eb97ce5114610268575f80fd5b8063021de88f146100b5578063088c2463146100e25780634d8478841461011257806350782b0f146101335780637f7c427a1461016b575b5f80fd5b6100c86100c3366004611904565b610289565b604080519283529015156020830152015b60405180910390f35b6100f56100f0366004611904565b61044a565b604080519283526001600160401b039091166020830152016100d9565b610125610120366004611904565b61063b565b6040519081526020016100d9565b610146610141366004611904565b6107c8565b604080519384526001600160401b0392831660208501529116908201526060016100d9565b6101a561017936600461193d565b604080515f60208201819052602282015260268082019390935281518082039093018352604601905290565b6040516100d991906119a1565b6101a56101c03660046119d5565b604080515f6020820152600360e01b602282015260268101949094526001600160c01b031960c093841b811660468601529190921b16604e830152805180830360360181526056909201905290565b6101a561021d366004611a0e565b610a1e565b610235610230366004611904565b610bff565b6040516100d99190611aaa565b6101a5610250366004611b61565b61154a565b6101a5610263366004611b93565b61158e565b61027b610276366004611ca1565b6115c4565b6040516100d9929190611d9d565b5f8082516027146102c457825160405163cc92daa160e01b815263ffffffff9091166004820152602760248201526044015b60405180910390fd5b5f805b6002811015610313576102db816001611dc9565b6102e6906008611ddc565b61ffff168582815181106102fc576102fc611df3565b016020015160f81c901b91909117906001016102c7565b5061ffff81161561033d5760405163407b587360e01b815261ffff821660048201526024016102bb565b5f805b600481101561039857610354816003611dc9565b61035f906008611ddc565b63ffffffff1686610371836002611e07565b8151811061038157610381611df3565b016020015160f81c901b9190911790600101610340565b5063ffffffff81166002146103c057604051635b60892f60e01b815260040160405180910390fd5b5f805b6020811015610415576103d781601f611dc9565b6103e2906008611ddc565b876103ee836006611e07565b815181106103fe576103fe611df3565b016020015160f81c901b91909117906001016103c3565b505f8660268151811061042a5761042a611df3565b016020015191976001600160f81b03199092161515965090945050505050565b5f808251602e1461048057825160405163cc92daa160e01b815263ffffffff9091166004820152602e60248201526044016102bb565b5f805b60028110156104cf57610497816001611dc9565b6104a2906008611ddc565b61ffff168582815181106104b8576104b8611df3565b016020015160f81c901b9190911790600101610483565b5061ffff8116156104f95760405163407b587360e01b815261ffff821660048201526024016102bb565b5f805b600481101561055457610510816003611dc9565b61051b906008611ddc565b63ffffffff168661052d836002611e07565b8151811061053d5761053d611df3565b016020015160f81c901b91909117906001016104fc565b5063ffffffff81161561057a57604051635b60892f60e01b815260040160405180910390fd5b5f805b60208110156105cf5761059181601f611dc9565b61059c906008611ddc565b876105a8836006611e07565b815181106105b8576105b8611df3565b016020015160f81c901b919091179060010161057d565b505f805b600881101561062e576105e7816007611dc9565b6105f2906008611ddc565b6001600160401b031688610607836026611e07565b8151811061061757610617611df3565b016020015160f81c901b91909117906001016105d3565b5090969095509350505050565b5f815160261461067057815160405163cc92daa160e01b815263ffffffff9091166004820152602660248201526044016102bb565b5f805b60028110156106bf57610687816001611dc9565b610692906008611ddc565b61ffff168482815181106106a8576106a8611df3565b016020015160f81c901b9190911790600101610673565b5061ffff8116156106e95760405163407b587360e01b815261ffff821660048201526024016102bb565b5f805b600481101561074457610700816003611dc9565b61070b906008611ddc565b63ffffffff168561071d836002611e07565b8151811061072d5761072d611df3565b016020015160f81c901b91909117906001016106ec565b5063ffffffff81161561076a57604051635b60892f60e01b815260040160405180910390fd5b5f805b60208110156107bf5761078181601f611dc9565b61078c906008611ddc565b86610798836006611e07565b815181106107a8576107a8611df3565b016020015160f81c901b919091179060010161076d565b50949350505050565b5f805f83516036146107ff57835160405163cc92daa160e01b815263ffffffff9091166004820152603660248201526044016102bb565b5f805b600281101561084e57610816816001611dc9565b610821906008611ddc565b61ffff1686828151811061083757610837611df3565b016020015160f81c901b9190911790600101610802565b5061ffff8116156108785760405163407b587360e01b815261ffff821660048201526024016102bb565b5f805b60048110156108d35761088f816003611dc9565b61089a906008611ddc565b63ffffffff16876108ac836002611e07565b815181106108bc576108bc611df3565b016020015160f81c901b919091179060010161087b565b5063ffffffff81166003146108fb57604051635b60892f60e01b815260040160405180910390fd5b5f805b60208110156109505761091281601f611dc9565b61091d906008611ddc565b88610929836006611e07565b8151811061093957610939611df3565b016020015160f81c901b91909117906001016108fe565b505f805b60088110156109af57610968816007611dc9565b610973906008611ddc565b6001600160401b031689610988836026611e07565b8151811061099857610998611df3565b016020015160f81c901b9190911790600101610954565b505f805b6008811015610a0e576109c7816007611dc9565b6109d2906008611ddc565b6001600160401b03168a6109e783602e611e07565b815181106109f7576109f7611df3565b016020015160f81c901b91909117906001016109b3565b5091989097509095509350505050565b60605f80833560208501356014610a3a87870160408901611e1a565b610a476060890189611e33565b60405160f09790971b6001600160f01b0319166020880152602287019590955250604285019290925260e090811b6001600160e01b0319908116606286015260609290921b6bffffffffffffffffffffffff191660668501529190911b16607a820152607e0160405160208183030381529060405290505f5b610acd6060850185611e33565b9050811015610bf85781610ae46060860186611e33565b83818110610af457610af4611df3565b9050602002810190610b069190611e7f565b610b109080611e9d565b9050610b1f6060870187611e33565b84818110610b2f57610b2f611df3565b9050602002810190610b419190611e7f565b610b4b9080611e9d565b610b586060890189611e33565b86818110610b6857610b68611df3565b9050602002810190610b7a9190611e7f565b610b88906020810190611e9d565b610b9560608b018b611e33565b88818110610ba557610ba5611df3565b9050602002810190610bb79190611e7f565b610bc8906060810190604001611edf565b604051602001610bde9796959493929190611ef8565b60408051601f198184030181529190529150600101610ac0565b5092915050565b610c076117b1565b5f610c106117b1565b5f805b6002811015610c6e57610c27816001611dc9565b610c32906008611ddc565b61ffff1686610c4763ffffffff871684611e07565b81518110610c5757610c57611df3565b016020015160f81c901b9190911790600101610c13565b5061ffff811615610c985760405163407b587360e01b815261ffff821660048201526024016102bb565b610ca3600284611f61565b9250505f805b6004811015610d0857610cbd816003611dc9565b610cc8906008611ddc565b63ffffffff16868563ffffffff1683610ce19190611e07565b81518110610cf157610cf1611df3565b016020015160f81c901b9190911790600101610ca9565b5063ffffffff8116600114610d3057604051635b60892f60e01b815260040160405180910390fd5b610d3b600484611f61565b9250505f805b6020811015610d9857610d5581601f611dc9565b610d60906008611ddc565b86610d7163ffffffff871684611e07565b81518110610d8157610d81611df3565b016020015160f81c901b9190911790600101610d41565b50808252610da7602084611f61565b9250505f805b6004811015610e0c57610dc1816003611dc9565b610dcc906008611ddc565b63ffffffff16868563ffffffff1683610de59190611e07565b81518110610df557610df5611df3565b016020015160f81c901b9190911790600101610dad565b50610e18600484611f61565b92505f8163ffffffff166001600160401b03811115610e3957610e3961180b565b6040519080825280601f01601f191660200182016040528015610e63576020820181803683370190505b5090505f5b8263ffffffff16811015610ed25786610e8763ffffffff871683611e07565b81518110610e9757610e97611df3565b602001015160f81c60f81b828281518110610eb457610eb4611df3565b60200101906001600160f81b03191690815f1a905350600101610e68565b5060208301819052610ee48285611f61565b604080516030808252606082019092529195505f92506020820181803683370190505090505f5b6030811015610f705786610f2563ffffffff871683611e07565b81518110610f3557610f35611df3565b602001015160f81c60f81b828281518110610f5257610f52611df3565b60200101906001600160f81b03191690815f1a905350600101610f0b565b5060408301819052610f83603085611f61565b9350505f805b6008811015610fe957610f9d816007611dc9565b610fa8906008611ddc565b6001600160401b031687610fc263ffffffff881684611e07565b81518110610fd257610fd2611df3565b016020015160f81c901b9190911790600101610f89565b506001600160401b0381166060840152611004600885611f61565b9350505f805f5b600481101561106a5761101f816003611dc9565b61102a906008611ddc565b63ffffffff16888763ffffffff16836110439190611e07565b8151811061105357611053611df3565b016020015160f81c901b919091179060010161100b565b50611076600486611f61565b94505f5b60048110156110d95761108e816003611dc9565b611099906008611ddc565b63ffffffff16888763ffffffff16836110b29190611e07565b815181106110c2576110c2611df3565b016020015160f81c901b929092179160010161107a565b506110e5600486611f61565b94505f8263ffffffff166001600160401b038111156111065761110661180b565b60405190808252806020026020018201604052801561112f578160200160208202803683370190505b5090505f5b8363ffffffff16811015611217576040805160148082528183019092525f916020820181803683370190505090505f5b60148110156111c9578a61117e63ffffffff8b1683611e07565b8151811061118e5761118e611df3565b602001015160f81c60f81b8282815181106111ab576111ab611df3565b60200101906001600160f81b03191690815f1a905350600101611164565b505f60148201519050808484815181106111e5576111e5611df3565b6001600160a01b039092166020928302919091019091015261120860148a611f61565b98505050806001019050611134565b506040805180820190915263ffffffff9092168252602082015260808401525f80805b60048110156112995761124e816003611dc9565b611259906008611ddc565b63ffffffff16898863ffffffff16836112729190611e07565b8151811061128257611282611df3565b016020015160f81c901b919091179060010161123a565b506112a5600487611f61565b95505f5b6004811015611308576112bd816003611dc9565b6112c8906008611ddc565b63ffffffff16898863ffffffff16836112e19190611e07565b815181106112f1576112f1611df3565b016020015160f81c901b92909217916001016112a9565b50611314600487611f61565b95505f8263ffffffff166001600160401b038111156113355761133561180b565b60405190808252806020026020018201604052801561135e578160200160208202803683370190505b5090505f5b8363ffffffff16811015611446576040805160148082528183019092525f916020820181803683370190505090505f5b60148110156113f8578b6113ad63ffffffff8c1683611e07565b815181106113bd576113bd611df3565b602001015160f81c60f81b8282815181106113da576113da611df3565b60200101906001600160f81b03191690815f1a905350600101611393565b505f601482015190508084848151811061141457611414611df3565b6001600160a01b039092166020928302919091019091015261143760148b611f61565b99505050806001019050611363565b506040805180820190915263ffffffff9092168252602082015260a08501525f6114708284611f61565b61147b906014611f7e565b61148685607a611f61565b6114909190611f61565b90508063ffffffff168851146114cc57875160405163cc92daa160e01b815263ffffffff918216600482015290821660248201526044016102bb565b5f805b600881101561152f576114e3816007611dc9565b6114ee906008611ddc565b6001600160401b03168a61150863ffffffff8b1684611e07565b8151811061151857611518611df3565b016020015160f81c901b91909117906001016114cf565b506001600160401b031660c086015250929695505050505050565b6040515f6020820152600160e11b60228201526026810183905281151560f81b60468201526060906047015b60405160208183030381529060405290505b92915050565b6040515f602082018190526022820152602681018390526001600160c01b031960c083901b166046820152606090604e01611576565b5f60608260400151516030146115ed5760405163180ffa0d60e01b815260040160405180910390fd5b82516020808501518051604080880151606089015160808a01518051908701515193515f9861162e988a986001989297929690959094909390929101611fa6565b60405160208183030381529060405290505f5b846080015160200151518110156116a05781856080015160200151828151811061166d5761166d611df3565b6020026020010151604051602001611686929190612060565b60408051601f198184030181529190529150600101611641565b5060a08401518051602091820151516040516116c0938593929101612096565b60405160208183030381529060405290505f5b8460a00151602001515181101561173257818560a001516020015182815181106116ff576116ff611df3565b6020026020010151604051602001611718929190612060565b60408051601f1981840301815291905291506001016116d3565b5060c08401516040516117499183916020016120d1565b604051602081830303815290604052905060028160405161176a9190612102565b602060405180830381855afa158015611785573d5f803e3d5ffd5b5050506040513d601f19601f820116820180604052508101906117a89190612113565b94909350915050565b6040805160e0810182525f808252606060208084018290528385018290528184018390528451808601865283815280820183905260808501528451808601909552918452908301529060a082019081525f60209091015290565b634e487b7160e01b5f52604160045260245ffd5b604080519081016001600160401b03811182821017156118415761184161180b565b60405290565b60405160e081016001600160401b03811182821017156118415761184161180b565b604051601f8201601f191681016001600160401b03811182821017156118915761189161180b565b604052919050565b5f82601f8301126118a8575f80fd5b81356001600160401b038111156118c1576118c161180b565b6118d4601f8201601f1916602001611869565b8181528460208386010111156118e8575f80fd5b816020850160208301375f918101602001919091529392505050565b5f60208284031215611914575f80fd5b81356001600160401b03811115611929575f80fd5b61193584828501611899565b949350505050565b5f6020828403121561194d575f80fd5b5035919050565b5f5b8381101561196e578181015183820152602001611956565b50505f910152565b5f815180845261198d816020860160208601611954565b601f01601f19169290920160200192915050565b602081525f6119b36020830184611976565b9392505050565b80356001600160401b03811681146119d0575f80fd5b919050565b5f805f606084860312156119e7575f80fd5b833592506119f7602085016119ba565b9150611a05604085016119ba565b90509250925092565b5f60208284031215611a1e575f80fd5b81356001600160401b03811115611a33575f80fd5b8201608081850312156119b3575f80fd5b5f6040830163ffffffff8351168452602080840151604060208701528281518085526060880191506020830194505f92505b80831015611a9f5784516001600160a01b03168252938301936001929092019190830190611a76565b509695505050505050565b60208152815160208201525f602083015160e06040840152611ad0610100840182611976565b90506040840151601f1980858403016060860152611aee8383611976565b92506001600160401b03606087015116608086015260808601519150808584030160a0860152611b1e8383611a44565b925060a08601519150808584030160c086015250611b3c8282611a44565b91505060c0840151611b5960e08501826001600160401b03169052565b509392505050565b5f8060408385031215611b72575f80fd5b8235915060208301358015158114611b88575f80fd5b809150509250929050565b5f8060408385031215611ba4575f80fd5b82359150611bb4602084016119ba565b90509250929050565b80356001600160a01b03811681146119d0575f80fd5b5f60408284031215611be3575f80fd5b611beb61181f565b9050813563ffffffff81168114611c00575f80fd5b81526020828101356001600160401b0380821115611c1c575f80fd5b818501915085601f830112611c2f575f80fd5b813581811115611c4157611c4161180b565b8060051b9150611c52848301611869565b8181529183018401918481019088841115611c6b575f80fd5b938501935b83851015611c9057611c8185611bbd565b82529385019390850190611c70565b808688015250505050505092915050565b5f60208284031215611cb1575f80fd5b81356001600160401b0380821115611cc7575f80fd5b9083019060e08286031215611cda575f80fd5b611ce2611847565b82358152602083013582811115611cf7575f80fd5b611d0387828601611899565b602083015250604083013582811115611d1a575f80fd5b611d2687828601611899565b604083015250611d38606084016119ba565b6060820152608083013582811115611d4e575f80fd5b611d5a87828601611bd3565b60808301525060a083013582811115611d71575f80fd5b611d7d87828601611bd3565b60a083015250611d8f60c084016119ba565b60c082015295945050505050565b828152604060208201525f6119356040830184611976565b634e487b7160e01b5f52601160045260245ffd5b8181038181111561158857611588611db5565b808202811582820484141761158857611588611db5565b634e487b7160e01b5f52603260045260245ffd5b8082018082111561158857611588611db5565b5f60208284031215611e2a575f80fd5b6119b382611bbd565b5f808335601e19843603018112611e48575f80fd5b8301803591506001600160401b03821115611e61575f80fd5b6020019150600581901b3603821315611e78575f80fd5b9250929050565b5f8235605e19833603018112611e93575f80fd5b9190910192915050565b5f808335601e19843603018112611eb2575f80fd5b8301803591506001600160401b03821115611ecb575f80fd5b602001915036819003821315611e78575f80fd5b5f60208284031215611eef575f80fd5b6119b3826119ba565b5f8851611f09818460208d01611954565b60e089901b6001600160e01b031916908301908152868860048301378681019050600481015f8152858782375060c09390931b6001600160c01b0319166004939094019283019390935250600c019695505050505050565b63ffffffff818116838216019080821115610bf857610bf8611db5565b63ffffffff818116838216028082169190828114611f9e57611f9e611db5565b505092915050565b61ffff60f01b8a60f01b1681525f63ffffffff60e01b808b60e01b166002840152896006840152808960e01b166026840152508651611fec81602a850160208b01611954565b86519083019061200381602a840160208b01611954565b60c087901b6001600160c01b031916602a9290910191820152612035603282018660e01b6001600160e01b0319169052565b61204e603682018560e01b6001600160e01b0319169052565b603a019b9a5050505050505050505050565b5f8351612071818460208801611954565b60609390931b6bffffffffffffffffffffffff19169190920190815260140192915050565b5f84516120a7818460208901611954565b6001600160e01b031960e095861b8116919093019081529290931b16600482015260080192915050565b5f83516120e2818460208801611954565b60c09390931b6001600160c01b0319169190920190815260080192915050565b5f8251611e93818460208701611954565b5f60208284031215612123575f80fd5b505191905056fea2646970667358221220c0b30a7d1574f37fe27736317f68c07745760d3ce113e1505eb78f7757b3827064736f6c63430008190033", } // ValidatorMessagesABI is the input ABI used to generate the binding from. diff --git a/abi-bindings/go/validator-manager/PoAValidatorManager/PoAValidatorManager.go b/abi-bindings/go/validator-manager/PoAValidatorManager/PoAValidatorManager.go index e9a90076e..b9b2dc05e 100644 --- a/abi-bindings/go/validator-manager/PoAValidatorManager/PoAValidatorManager.go +++ b/abi-bindings/go/validator-manager/PoAValidatorManager/PoAValidatorManager.go @@ -91,7 +91,7 @@ type ValidatorRegistrationInput struct { // PoAValidatorManagerMetaData contains all meta data concerning the PoAValidatorManager contract. var PoAValidatorManagerMetaData = &bind.MetaData{ ABI: "[{\"inputs\":[{\"internalType\":\"enumICMInitializable\",\"name\":\"init\",\"type\":\"uint8\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"length\",\"type\":\"uint256\"}],\"name\":\"InvalidBLSKeyLength\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"encodedConversionID\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"expectedConversionID\",\"type\":\"bytes32\"}],\"name\":\"InvalidConversionID\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidInitialization\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidInitializationStatus\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint8\",\"name\":\"maximumChurnPercentage\",\"type\":\"uint8\"}],\"name\":\"InvalidMaximumChurnPercentage\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"nodeID\",\"type\":\"bytes\"}],\"name\":\"InvalidNodeID\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"threshold\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"addressesLength\",\"type\":\"uint256\"}],\"name\":\"InvalidPChainOwnerThreshold\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"registrationExpiry\",\"type\":\"uint64\"}],\"name\":\"InvalidRegistrationExpiry\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"weight\",\"type\":\"uint256\"}],\"name\":\"InvalidTotalWeight\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"validationID\",\"type\":\"bytes32\"}],\"name\":\"InvalidValidationID\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"validatorManagerAddress\",\"type\":\"address\"}],\"name\":\"InvalidValidatorManagerAddress\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"blockchainID\",\"type\":\"bytes32\"}],\"name\":\"InvalidValidatorManagerBlockchainID\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"enumValidatorStatus\",\"name\":\"status\",\"type\":\"uint8\"}],\"name\":\"InvalidValidatorStatus\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidWarpMessage\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"senderAddress\",\"type\":\"address\"}],\"name\":\"InvalidWarpOriginSenderAddress\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"sourceChainID\",\"type\":\"bytes32\"}],\"name\":\"InvalidWarpSourceChainID\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"churnAmount\",\"type\":\"uint64\"}],\"name\":\"MaxChurnRateExceeded\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"nodeID\",\"type\":\"bytes\"}],\"name\":\"NodeAlreadyRegistered\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotInitializing\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"OwnableInvalidOwner\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"OwnableUnauthorizedAccount\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"PChainOwnerAddressesNotSorted\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bool\",\"name\":\"validRegistration\",\"type\":\"bool\"}],\"name\":\"UnexpectedRegistrationStatus\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"validationID\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes\",\"name\":\"nodeID\",\"type\":\"bytes\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"weight\",\"type\":\"uint256\"}],\"name\":\"InitialValidatorCreated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"version\",\"type\":\"uint64\"}],\"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\":\"bytes32\",\"name\":\"validationID\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes\",\"name\":\"nodeID\",\"type\":\"bytes\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"registerValidationMessageID\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"weight\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"registrationExpiry\",\"type\":\"uint64\"}],\"name\":\"ValidationPeriodCreated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"validationID\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"enumValidatorStatus\",\"name\":\"status\",\"type\":\"uint8\"}],\"name\":\"ValidationPeriodEnded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"validationID\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"weight\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"}],\"name\":\"ValidationPeriodRegistered\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"validationID\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"setWeightMessageID\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"weight\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"endTime\",\"type\":\"uint256\"}],\"name\":\"ValidatorRemovalInitialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"validationID\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"uint64\",\"name\":\"nonce\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"validatorWeight\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"setWeightMessageID\",\"type\":\"bytes32\"}],\"name\":\"ValidatorWeightUpdate\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"ADDRESS_LENGTH\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"BLS_PUBLIC_KEY_LENGTH\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"MAXIMUM_CHURN_PERCENTAGE_LIMIT\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"MAXIMUM_REGISTRATION_EXPIRY_LENGTH\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"P_CHAIN_BLOCKCHAIN_ID\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"VALIDATOR_MANAGER_STORAGE_LOCATION\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"WARP_MESSENGER\",\"outputs\":[{\"internalType\":\"contractIWarpMessenger\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"messageIndex\",\"type\":\"uint32\"}],\"name\":\"completeEndValidation\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"messageIndex\",\"type\":\"uint32\"}],\"name\":\"completeValidatorRegistration\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"validationID\",\"type\":\"bytes32\"}],\"name\":\"getValidator\",\"outputs\":[{\"components\":[{\"internalType\":\"enumValidatorStatus\",\"name\":\"status\",\"type\":\"uint8\"},{\"internalType\":\"bytes\",\"name\":\"nodeID\",\"type\":\"bytes\"},{\"internalType\":\"uint64\",\"name\":\"startingWeight\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"messageNonce\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"weight\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"startedAt\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"endedAt\",\"type\":\"uint64\"}],\"internalType\":\"structValidator\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"validationID\",\"type\":\"bytes32\"}],\"name\":\"getWeight\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"subnetID\",\"type\":\"bytes32\"},{\"internalType\":\"uint64\",\"name\":\"churnPeriodSeconds\",\"type\":\"uint64\"},{\"internalType\":\"uint8\",\"name\":\"maximumChurnPercentage\",\"type\":\"uint8\"}],\"internalType\":\"structValidatorManagerSettings\",\"name\":\"settings\",\"type\":\"tuple\"},{\"internalType\":\"address\",\"name\":\"initialOwner\",\"type\":\"address\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"validationID\",\"type\":\"bytes32\"}],\"name\":\"initializeEndValidation\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes\",\"name\":\"nodeID\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"blsPublicKey\",\"type\":\"bytes\"},{\"internalType\":\"uint64\",\"name\":\"registrationExpiry\",\"type\":\"uint64\"},{\"components\":[{\"internalType\":\"uint32\",\"name\":\"threshold\",\"type\":\"uint32\"},{\"internalType\":\"address[]\",\"name\":\"addresses\",\"type\":\"address[]\"}],\"internalType\":\"structPChainOwner\",\"name\":\"remainingBalanceOwner\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"uint32\",\"name\":\"threshold\",\"type\":\"uint32\"},{\"internalType\":\"address[]\",\"name\":\"addresses\",\"type\":\"address[]\"}],\"internalType\":\"structPChainOwner\",\"name\":\"disableOwner\",\"type\":\"tuple\"}],\"internalType\":\"structValidatorRegistrationInput\",\"name\":\"registrationInput\",\"type\":\"tuple\"},{\"internalType\":\"uint64\",\"name\":\"weight\",\"type\":\"uint64\"}],\"name\":\"initializeValidatorRegistration\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"validationID\",\"type\":\"bytes32\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"subnetID\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"validatorManagerBlockchainID\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"validatorManagerAddress\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"bytes\",\"name\":\"nodeID\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"blsPublicKey\",\"type\":\"bytes\"},{\"internalType\":\"uint64\",\"name\":\"weight\",\"type\":\"uint64\"}],\"internalType\":\"structInitialValidator[]\",\"name\":\"initialValidators\",\"type\":\"tuple[]\"}],\"internalType\":\"structConversionData\",\"name\":\"conversionData\",\"type\":\"tuple\"},{\"internalType\":\"uint32\",\"name\":\"messageIndex\",\"type\":\"uint32\"}],\"name\":\"initializeValidatorSet\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"nodeID\",\"type\":\"bytes\"}],\"name\":\"registeredValidators\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"validationID\",\"type\":\"bytes32\"}],\"name\":\"resendEndValidatorMessage\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"validationID\",\"type\":\"bytes32\"}],\"name\":\"resendRegisterValidatorMessage\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", - Bin: "0x608060405234801561000f575f80fd5b5060405161374f38038061374f83398101604081905261002e91610107565b60018160018111156100425761004261012c565b0361004f5761004f610055565b50610140565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00805468010000000000000000900460ff16156100a55760405163f92ee8a960e01b815260040160405180910390fd5b80546001600160401b03908116146101045780546001600160401b0319166001600160401b0390811782556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b50565b5f60208284031215610117575f80fd5b815160028110610125575f80fd5b9392505050565b634e487b7160e01b5f52602160045260245ffd5b6136028061014d5f395ff3fe608060405234801561000f575f80fd5b5060043610610132575f3560e01c80639ba96b86116100b4578063c974d1b611610079578063c974d1b6146102a7578063d588c18f146102af578063d5f20ff6146102c2578063df93d8de146102e2578063f2fde38b146102ec578063fd7ac5e7146102ff575f80fd5b80639ba96b861461024c578063a3a65e481461025f578063b771b3bc14610272578063bc5fbfec14610280578063bee0a03f14610294575f80fd5b8063715018a6116100fa578063715018a6146101be578063732214f8146101c65780638280a25a146101db5780638da5cb5b146101f557806397fb70d414610239575f80fd5b80630322ed981461013657806320d91b7a1461014b578063467ef06f1461015e57806360305d621461017157806366435abf14610193575b5f80fd5b61014961014436600461273a565b610312565b005b610149610159366004612769565b6105a2565b61014961016c3660046127b7565b610b27565b610179601481565b60405163ffffffff90911681526020015b60405180910390f35b6101a66101a136600461273a565b610b35565b6040516001600160401b03909116815260200161018a565b610149610b49565b6101cd5f81565b60405190815260200161018a565b6101e3603081565b60405160ff909116815260200161018a565b7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300546001600160a01b03165b6040516001600160a01b03909116815260200161018a565b61014961024736600461273a565b610b5c565b6101cd61025a3660046127e6565b610b71565b61014961026d3660046127b7565b610b8d565b6102216005600160991b0181565b6101cd5f8051602061358d83398151915281565b6101496102a236600461273a565b610d82565b6101e3601481565b6101496102bd36600461283f565b610ebf565b6102d56102d036600461273a565b610fcd565b60405161018a91906128fc565b6101a66202a30081565b6101496102fa36600461297c565b61111c565b6101cd61030d36600461299e565b611159565b5f8181525f805160206135ad8339815191526020526040808220815160e0810190925280545f8051602061358d83398151915293929190829060ff16600581111561035f5761035f61287b565b60058111156103705761037061287b565b815260200160018201805461038490612a09565b80601f01602080910402602001604051908101604052809291908181526020018280546103b090612a09565b80156103fb5780601f106103d2576101008083540402835291602001916103fb565b820191905f5260205f20905b8154815290600101906020018083116103de57829003601f168201915b505050918352505060028201546001600160401b038082166020840152600160401b820481166040840152600160801b820481166060840152600160c01b909104811660808301526003928301541660a090910152909150815160058111156104665761046661287b565b146104a2575f8381526007830160205260409081902054905163170cc93360e21b81526104999160ff1690600401612a41565b60405180910390fd5b606081015160405163854a893f60e01b8152600481018590526001600160401b0390911660248201525f60448201526005600160991b019063ee5b48eb9073__$fd0c147b4031eef6079b0498cbafa865f0$__9063854a893f906064015f60405180830381865af4158015610519573d5f803e3d5ffd5b505050506040513d5f823e601f3d908101601f191682016040526105409190810190612b52565b6040518263ffffffff1660e01b815260040161055c9190612b83565b6020604051808303815f875af1158015610578573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061059c9190612b95565b50505050565b7fe92546d698950ddd38910d2e15ed1d923cd0a7b3dde9e2a6a3f380565559cb09545f8051602061358d8339815191529060ff16156105f457604051637fab81e560e01b815260040160405180910390fd5b6005600160991b016001600160a01b0316634213cf786040518163ffffffff1660e01b8152600401602060405180830381865afa158015610637573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061065b9190612b95565b836020013514610684576040516372b0a7e760e11b815260208401356004820152602401610499565b30610695606085016040860161297c565b6001600160a01b0316146106d8576106b3606084016040850161297c565b604051632f88120d60e21b81526001600160a01b039091166004820152602401610499565b5f6106e66060850185612bac565b905090505f805b828163ffffffff16101561094d575f6107096060880188612bac565b8363ffffffff1681811061071f5761071f612bf1565b90506020028101906107319190612c05565b61073a90612c70565b80516040519192505f91600888019161075291612ce9565b9081526020016040518091039020541461078257805160405163a41f772f60e01b81526104999190600401612b83565b5f6002885f0135846040516020016107b192919091825260e01b6001600160e01b031916602082015260240190565b60408051601f19818403018152908290526107cb91612ce9565b602060405180830381855afa1580156107e6573d5f803e3d5ffd5b5050506040513d601f19601f820116820180604052508101906108099190612b95565b90508086600801835f01516040516108219190612ce9565b90815260408051918290036020908101909220929092555f8381526007890190915220805460ff1916600217815582516001909101906108619082612d45565b50604080830180515f84815260078a01602052929092206002810180549251426001600160401b03908116600160c01b026001600160c01b03928216600160801b81026001600160c01b03199097169290971691909117949094171692909217909155600301805467ffffffffffffffff191690556108e09085612e18565b82516040519195506108f191612ce9565b60408051918290038220908401516001600160401b031682529082907f9d47fef9da077661546e646d61830bfcbda90506c2e5eed38195e82c4eb1cbdf9060200160405180910390a350508061094690612e2b565b90506106ed565b5060048301819055600183015460649061097190600160401b900460ff1683612e4d565b101561099357604051635943317f60e01b815260048101829052602401610499565b5f73__$fd0c147b4031eef6079b0498cbafa865f0$__634d8478846109b7876111b4565b604001516040518263ffffffff1660e01b81526004016109d79190612b83565b602060405180830381865af41580156109f2573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610a169190612b95565b90505f73__$fd0c147b4031eef6079b0498cbafa865f0$__6387418b8e886040518263ffffffff1660e01b8152600401610a509190612f87565b5f60405180830381865af4158015610a6a573d5f803e3d5ffd5b505050506040513d5f823e601f3d908101601f19168201604052610a919190810190612b52565b90505f600282604051610aa49190612ce9565b602060405180830381855afa158015610abf573d5f803e3d5ffd5b5050506040513d601f19601f82011682018060405250810190610ae29190612b95565b9050828114610b0e5760405163baaea89d60e01b81526004810182905260248101849052604401610499565b5050506009909201805460ff1916600117905550505050565b610b30816112ca565b505050565b5f610b3f82610fcd565b6080015192915050565b610b5161167d565b610b5a5f6116d8565b565b610b6461167d565b610b6d81611748565b5050565b5f610b7a61167d565b610b848383611a2c565b90505b92915050565b5f8051602061358d8339815191525f8073__$fd0c147b4031eef6079b0498cbafa865f0$__63021de88f610bc0866111b4565b604001516040518263ffffffff1660e01b8152600401610be09190612b83565b6040805180830381865af4158015610bfa573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610c1e919061302a565b9150915080610c4457604051632d07135360e01b81528115156004820152602401610499565b5f82815260068401602052604090208054610c5e90612a09565b90505f03610c825760405163089938b360e11b815260048101839052602401610499565b60015f83815260078501602052604090205460ff166005811115610ca857610ca861287b565b14610cdb575f8281526007840160205260409081902054905163170cc93360e21b81526104999160ff1690600401612a41565b5f8281526006840160205260408120610cf3916126ae565b5f828152600784016020908152604091829020805460ff1916600290811782550180546001600160401b0342818116600160c01b026001600160c01b0390931692909217928390558451600160801b9093041682529181019190915283917ff8fd1c90fb9cfa2ca2358fdf5806b086ad43315d92b221c929efc7f105ce7568910160405180910390a250505050565b5f8181527fe92546d698950ddd38910d2e15ed1d923cd0a7b3dde9e2a6a3f380565559cb066020526040902080545f8051602061358d8339815191529190610dc990612a09565b90505f03610ded5760405163089938b360e11b815260048101839052602401610499565b60015f83815260078301602052604090205460ff166005811115610e1357610e1361287b565b14610e46575f8281526007820160205260409081902054905163170cc93360e21b81526104999160ff1690600401612a41565b5f82815260068201602052604090819020905163ee5b48eb60e01b81526005600160991b019163ee5b48eb91610e7f919060040161304b565b6020604051808303815f875af1158015610e9b573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610b309190612b95565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a008054600160401b810460ff1615906001600160401b03165f81158015610f035750825b90505f826001600160401b03166001148015610f1e5750303b155b905081158015610f2c575080155b15610f4a5760405163f92ee8a960e01b815260040160405180910390fd5b845467ffffffffffffffff191660011785558315610f7457845460ff60401b1916600160401b1785555b610f7e8787611f51565b8315610fc457845460ff60401b19168555604051600181527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b50505050505050565b610fd56126e5565b5f8281525f805160206135ad833981519152602052604090819020815160e0810190925280545f8051602061358d833981519152929190829060ff1660058111156110225761102261287b565b60058111156110335761103361287b565b815260200160018201805461104790612a09565b80601f016020809104026020016040519081016040528092919081815260200182805461107390612a09565b80156110be5780601f10611095576101008083540402835291602001916110be565b820191905f5260205f20905b8154815290600101906020018083116110a157829003601f168201915b505050918352505060028201546001600160401b038082166020840152600160401b820481166040840152600160801b820481166060840152600160c01b9091048116608083015260039092015490911660a0909101529392505050565b61112461167d565b6001600160a01b03811661114d57604051631e4fbdf760e01b81525f6004820152602401610499565b611156816116d8565b50565b6040515f905f8051602061358d833981519152907fe92546d698950ddd38910d2e15ed1d923cd0a7b3dde9e2a6a3f380565559cb089061119c90869086906130d5565b90815260200160405180910390205491505092915050565b60408051606080820183525f8083526020830152918101919091526040516306f8253560e41b815263ffffffff831660048201525f9081906005600160991b0190636f825350906024015f60405180830381865afa158015611218573d5f803e3d5ffd5b505050506040513d5f823e601f3d908101601f1916820160405261123f91908101906130e4565b915091508061126157604051636b2f19e960e01b815260040160405180910390fd5b815115611287578151604051636ba589a560e01b81526004810191909152602401610499565b60208201516001600160a01b0316156112c3576020820151604051624de75d60e31b81526001600160a01b039091166004820152602401610499565b5092915050565b5f6112d36126e5565b5f8051602061358d8339815191525f8073__$fd0c147b4031eef6079b0498cbafa865f0$__63021de88f611306886111b4565b604001516040518263ffffffff1660e01b81526004016113269190612b83565b6040805180830381865af4158015611340573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611364919061302a565b91509150801561138b57604051632d07135360e01b81528115156004820152602401610499565b5f828152600784016020526040808220815160e081019092528054829060ff1660058111156113bc576113bc61287b565b60058111156113cd576113cd61287b565b81526020016001820180546113e190612a09565b80601f016020809104026020016040519081016040528092919081815260200182805461140d90612a09565b80156114585780601f1061142f57610100808354040283529160200191611458565b820191905f5260205f20905b81548152906001019060200180831161143b57829003601f168201915b505050918352505060028201546001600160401b038082166020840152600160401b820481166040840152600160801b820481166060840152600160c01b909104811660808301526003928301541660a090910152909150815160058111156114c3576114c361287b565b141580156114e457506001815160058111156114e1576114e161287b565b14155b1561150557805160405163170cc93360e21b81526104999190600401612a41565b60038151600581111561151a5761151a61287b565b03611528576004815261152d565b600581525b8360080181602001516040516115439190612ce9565b90815260408051602092819003830190205f908190558581526007870190925290208151815483929190829060ff191660018360058111156115875761158761287b565b0217905550602082015160018201906115a09082612d45565b5060408201516002820180546060850151608086015160a08701516001600160401b039586166001600160801b031990941693909317600160401b92861692909202919091176001600160801b0316600160801b918516919091026001600160c01b031617600160c01b9184169190910217905560c0909201516003909101805467ffffffffffffffff191691909216179055805160058111156116465761164661287b565b60405184907f1c08e59656f1a18dc2da76826cdc52805c43e897a17c50faefb8ab3c1526cc16905f90a39196919550909350505050565b336116af7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300546001600160a01b031690565b6001600160a01b031614610b5a5760405163118cdaa760e01b8152336004820152602401610499565b7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c19930080546001600160a01b031981166001600160a01b03848116918217845560405192169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0905f90a3505050565b6117506126e5565b5f8281525f805160206135ad8339815191526020526040808220815160e0810190925280545f8051602061358d83398151915293929190829060ff16600581111561179d5761179d61287b565b60058111156117ae576117ae61287b565b81526020016001820180546117c290612a09565b80601f01602080910402602001604051908101604052809291908181526020018280546117ee90612a09565b80156118395780601f1061181057610100808354040283529160200191611839565b820191905f5260205f20905b81548152906001019060200180831161181c57829003601f168201915b50505091835250506002828101546001600160401b038082166020850152600160401b820481166040850152600160801b820481166060850152600160c01b9091048116608084015260039093015490921660a090910152909150815160058111156118a7576118a761287b565b146118da575f8481526007830160205260409081902054905163170cc93360e21b81526104999160ff1690600401612a41565b60038152426001600160401b031660c08201525f84815260078301602052604090208151815483929190829060ff1916600183600581111561191e5761191e61287b565b0217905550602082015160018201906119379082612d45565b5060408201516002820180546060850151608086015160a08701516001600160401b039586166001600160801b031990941693909317600160401b92861692909202919091176001600160801b0316600160801b918516919091026001600160c01b031617600160c01b9184169190910217905560c0909201516003909101805467ffffffffffffffff1916919092161790555f6119d58582611f6b565b6080840151604080516001600160401b03909216825242602083015291935083925087917f13d58394cf269d48bcf927959a29a5ffee7c9924dafff8927ecdf3c48ffa7c67910160405180910390a3509392505050565b7fe92546d698950ddd38910d2e15ed1d923cd0a7b3dde9e2a6a3f380565559cb09545f9060ff16611a7057604051637fab81e560e01b815260040160405180910390fd5b5f8051602061358d83398151915242611a8f6060860160408701613171565b6001600160401b0316111580611ac95750611aad6202a30042612e18565b611abd6060860160408701613171565b6001600160401b031610155b15611b0357611ade6060850160408601613171565b604051635879da1360e11b81526001600160401b039091166004820152602401610499565b611b18611b13606086018661318a565b612142565b611b28611b13608086018661318a565b6030611b37602086018661319e565b905014611b6957611b4b602085018561319e565b6040516326475b2f60e11b8152610499925060040190815260200190565b611b73848061319e565b90505f03611ba057611b85848061319e565b604051633e08a12560e11b81526004016104999291906131e0565b5f60088201611baf868061319e565b604051611bbd9291906130d5565b90815260200160405180910390205414611bf657611bdb848061319e565b60405163a41f772f60e01b81526004016104999291906131e0565b611c00835f6122ab565b6040805160e08101909152815481525f90819073__$fd0c147b4031eef6079b0498cbafa865f0$__9063eb97ce519060208101611c3d8a8061319e565b8080601f0160208091040260200160405190810160405280939291908181526020018383808284375f92019190915250505090825250602090810190611c85908b018b61319e565b8080601f0160208091040260200160405190810160405280939291908181526020018383808284375f92019190915250505090825250602001611cce60608b0160408c01613171565b6001600160401b03168152602001611ce960608b018b61318a565b611cf2906131f3565b8152602001611d0460808b018b61318a565b611d0d906131f3565b8152602001886001600160401b03168152506040518263ffffffff1660e01b8152600401611d3b9190613320565b5f60405180830381865af4158015611d55573d5f803e3d5ffd5b505050506040513d5f823e601f3d908101601f19168201604052611d7c91908101906133d7565b5f82815260068601602052604090209193509150611d9a8282612d45565b508160088401611daa888061319e565b604051611db89291906130d5565b9081526040519081900360200181209190915563ee5b48eb60e01b81525f906005600160991b019063ee5b48eb90611df4908590600401612b83565b6020604051808303815f875af1158015611e10573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611e349190612b95565b5f8481526007860160205260409020805460ff191660011790559050611e5a878061319e565b5f858152600787016020526040902060010191611e7891908361341a565b505f83815260078501602052604090206002810180546001600160c01b0319166001600160401b038916908117600160801b91909102176001600160c01b03169055600301805467ffffffffffffffff1916905580611ed7888061319e565b604051611ee59291906130d5565b6040518091039020847fb77297e3befc691bfc864a81e241f83e2ef722b6e7becaa2ecec250c6d52b430898b6040016020810190611f239190613171565b604080516001600160401b0393841681529290911660208301520160405180910390a4509095945050505050565b611f596124ce565b611f6282612517565b610b6d81612530565b5f8281525f805160206135ad833981519152602052604081206002015481905f8051602061358d83398151915290600160801b90046001600160401b0316611fb385826122ab565b5f611fbd87612541565b5f888152600785016020526040808220600201805467ffffffffffffffff60801b1916600160801b6001600160401b038c811691820292909217909255915163854a893f60e01b8152600481018c905291841660248301526044820152919250906005600160991b019063ee5b48eb9073__$fd0c147b4031eef6079b0498cbafa865f0$__9063854a893f906064015f60405180830381865af4158015612066573d5f803e3d5ffd5b505050506040513d5f823e601f3d908101601f1916820160405261208d9190810190612b52565b6040518263ffffffff1660e01b81526004016120a99190612b83565b6020604051808303815f875af11580156120c5573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906120e99190612b95565b604080516001600160401b038a811682526020820184905282519394508516928b927f07de5ff35a674a8005e661f3333c907ca6333462808762d19dc7b3abb1a8c1df928290030190a3909450925050505b9250929050565b61214f60208201826127b7565b63ffffffff1615801561216f575061216a6020820182612bac565b151590505b156121b65761218160208201826127b7565b61218e6020830183612bac565b60405163c08a0f1d60e01b815263ffffffff9093166004840152602483015250604401610499565b6121c36020820182612bac565b90506121d260208301836127b7565b63ffffffff1611156121eb5761218160208201826127b7565b60015b6121fb6020830183612bac565b9050811015610b6d576122116020830183612bac565b61221c6001846134d3565b81811061222b5761222b612bf1565b9050602002016020810190612240919061297c565b6001600160a01b03166122566020840184612bac565b8381811061226657612266612bf1565b905060200201602081019061227b919061297c565b6001600160a01b031610156122a357604051630dbc8d5f60e31b815260040160405180910390fd5b6001016121ee565b5f8051602061358d8339815191525f6001600160401b0380841690851611156122df576122d883856134e6565b90506122ec565b6122e984846134e6565b90505b6040805160808101825260028401548082526003850154602083015260048501549282019290925260058401546001600160401b031660608201524291158061234e57506001840154815161234a916001600160401b031690612e18565b8210155b15612374576001600160401b038316606082015281815260408101516020820152612393565b82816060018181516123869190613506565b6001600160401b03169052505b60608101516123a3906064613526565b602082015160018601546001600160401b0392909216916123ce9190600160401b900460ff16612e4d565b10156123fe57606081015160405163dfae880160e01b81526001600160401b039091166004820152602401610499565b856001600160401b0316816040018181516124199190612e18565b9052506040810180516001600160401b03871691906124399083906134d3565b9052506001840154604082015160649161245e91600160401b90910460ff1690612e4d565b1015612485578060400151604051635943317f60e01b815260040161049991815260200190565b805160028501556020810151600385015560408101516004850155606001516005909301805467ffffffffffffffff19166001600160401b039094169390931790925550505050565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0054600160401b900460ff16610b5a57604051631afcd79f60e31b815260040160405180910390fd5b61251f6124ce565b6125276125b6565b611156816125be565b6125386124ce565b611156816126a6565b5f8181525f805160206135ad8339815191526020526040812060020180545f8051602061358d833981519152919060089061258b90600160401b90046001600160401b0316613551565b91906101000a8154816001600160401b0302191690836001600160401b031602179055915050919050565b610b5a6124ce565b6125c66124ce565b80355f8051602061358d83398151915290815560146125eb606084016040850161356c565b60ff16118061260a5750612605606083016040840161356c565b60ff16155b1561263e5761261f606083016040840161356c565b604051634a59bbff60e11b815260ff9091166004820152602401610499565b61264e606083016040840161356c565b60018201805460ff92909216600160401b0260ff60401b1990921691909117905561267f6040830160208401613171565b600191909101805467ffffffffffffffff19166001600160401b0390921691909117905550565b6111246124ce565b5080546126ba90612a09565b5f825580601f106126c9575050565b601f0160209004905f5260205f20908101906111569190612722565b6040805160e08101909152805f81526060602082018190525f604083018190529082018190526080820181905260a0820181905260c09091015290565b5b80821115612736575f8155600101612723565b5090565b5f6020828403121561274a575f80fd5b5035919050565b803563ffffffff81168114612764575f80fd5b919050565b5f806040838503121561277a575f80fd5b82356001600160401b0381111561278f575f80fd5b8301608081860312156127a0575f80fd5b91506127ae60208401612751565b90509250929050565b5f602082840312156127c7575f80fd5b610b8482612751565b80356001600160401b0381168114612764575f80fd5b5f80604083850312156127f7575f80fd5b82356001600160401b0381111561280c575f80fd5b830160a0818603121561281d575f80fd5b91506127ae602084016127d0565b6001600160a01b0381168114611156575f80fd5b5f808284036080811215612851575f80fd5b606081121561285e575f80fd5b5082915060608301356128708161282b565b809150509250929050565b634e487b7160e01b5f52602160045260245ffd5b600681106128ab57634e487b7160e01b5f52602160045260245ffd5b9052565b5f5b838110156128c95781810151838201526020016128b1565b50505f910152565b5f81518084526128e88160208601602086016128af565b601f01601f19169290920160200192915050565b6020815261290e60208201835161288f565b5f602083015160e060408401526129296101008401826128d1565b905060408401516001600160401b0380821660608601528060608701511660808601528060808701511660a08601528060a08701511660c08601528060c08701511660e086015250508091505092915050565b5f6020828403121561298c575f80fd5b81356129978161282b565b9392505050565b5f80602083850312156129af575f80fd5b82356001600160401b03808211156129c5575f80fd5b818501915085601f8301126129d8575f80fd5b8135818111156129e6575f80fd5b8660208285010111156129f7575f80fd5b60209290920196919550909350505050565b600181811c90821680612a1d57607f821691505b602082108103612a3b57634e487b7160e01b5f52602260045260245ffd5b50919050565b60208101610b87828461288f565b634e487b7160e01b5f52604160045260245ffd5b604051606081016001600160401b0381118282101715612a8557612a85612a4f565b60405290565b604080519081016001600160401b0381118282101715612a8557612a85612a4f565b604051601f8201601f191681016001600160401b0381118282101715612ad557612ad5612a4f565b604052919050565b5f6001600160401b03821115612af557612af5612a4f565b50601f01601f191660200190565b5f82601f830112612b12575f80fd5b8151612b25612b2082612add565b612aad565b818152846020838601011115612b39575f80fd5b612b4a8260208301602087016128af565b949350505050565b5f60208284031215612b62575f80fd5b81516001600160401b03811115612b77575f80fd5b612b4a84828501612b03565b602081525f610b8460208301846128d1565b5f60208284031215612ba5575f80fd5b5051919050565b5f808335601e19843603018112612bc1575f80fd5b8301803591506001600160401b03821115612bda575f80fd5b6020019150600581901b360382131561213b575f80fd5b634e487b7160e01b5f52603260045260245ffd5b5f8235605e19833603018112612c19575f80fd5b9190910192915050565b5f82601f830112612c32575f80fd5b8135612c40612b2082612add565b818152846020838601011115612c54575f80fd5b816020850160208301375f918101602001919091529392505050565b5f60608236031215612c80575f80fd5b612c88612a63565b82356001600160401b0380821115612c9e575f80fd5b612caa36838701612c23565b83526020850135915080821115612cbf575f80fd5b50612ccc36828601612c23565b602083015250612cde604084016127d0565b604082015292915050565b5f8251612c198184602087016128af565b601f821115610b3057805f5260205f20601f840160051c81016020851015612d1f5750805b601f840160051c820191505b81811015612d3e575f8155600101612d2b565b5050505050565b81516001600160401b03811115612d5e57612d5e612a4f565b612d7281612d6c8454612a09565b84612cfa565b602080601f831160018114612da5575f8415612d8e5750858301515b5f19600386901b1c1916600185901b178555612dfc565b5f85815260208120601f198616915b82811015612dd357888601518255948401946001909101908401612db4565b5085821015612df057878501515f19600388901b60f8161c191681555b505060018460011b0185555b505050505050565b634e487b7160e01b5f52601160045260245ffd5b80820180821115610b8757610b87612e04565b5f63ffffffff808316818103612e4357612e43612e04565b6001019392505050565b8082028115828204841417610b8757610b87612e04565b5f808335601e19843603018112612e79575f80fd5b83016020810192503590506001600160401b03811115612e97575f80fd5b80360382131561213b575f80fd5b81835281816020850137505f828201602090810191909152601f909101601f19169091010190565b5f8383855260208086019550808560051b830101845f5b87811015612f7a57848303601f19018952813536889003605e19018112612f09575f80fd5b87016060612f178280612e64565b828752612f278388018284612ea5565b92505050612f3786830183612e64565b86830388880152612f49838284612ea5565b9250505060406001600160401b03612f628285016127d0565b16950194909452509783019790830190600101612ee4565b5090979650505050505050565b6020815281356020820152602082013560408201525f6040830135612fab8161282b565b6001600160a01b031660608381019190915283013536849003601e19018112612fd2575f80fd5b83016020810190356001600160401b03811115612fed575f80fd5b8060051b3603821315612ffe575f80fd5b60808085015261301260a085018284612ecd565b95945050505050565b80518015158114612764575f80fd5b5f806040838503121561303b575f80fd5b825191506127ae6020840161301b565b5f60208083525f845461305d81612a09565b806020870152604060018084165f811461307e576001811461309a576130c7565b60ff19851660408a0152604084151560051b8a010195506130c7565b895f5260205f205f5b858110156130be5781548b82018601529083019088016130a3565b8a016040019650505b509398975050505050505050565b818382375f9101908152919050565b5f80604083850312156130f5575f80fd5b82516001600160401b038082111561310b575f80fd5b908401906060828703121561311e575f80fd5b613126612a63565b8251815260208301516131388161282b565b602082015260408301518281111561314e575f80fd5b61315a88828601612b03565b60408301525093506127ae9150506020840161301b565b5f60208284031215613181575f80fd5b610b84826127d0565b5f8235603e19833603018112612c19575f80fd5b5f808335601e198436030181126131b3575f80fd5b8301803591506001600160401b038211156131cc575f80fd5b60200191503681900382131561213b575f80fd5b602081525f612b4a602083018486612ea5565b5f60408236031215613203575f80fd5b61320b612a8b565b61321483612751565b81526020808401356001600160401b0380821115613230575f80fd5b9085019036601f830112613242575f80fd5b81358181111561325457613254612a4f565b8060051b9150613265848301612aad565b818152918301840191848101903684111561327e575f80fd5b938501935b838510156132a857843592506132988361282b565b8282529385019390850190613283565b94860194909452509295945050505050565b5f6040830163ffffffff8351168452602080840151604060208701528281518085526060880191506020830194505f92505b808310156133155784516001600160a01b031682529383019360019290920191908301906132ec565b509695505050505050565b60208152815160208201525f602083015160e060408401526133466101008401826128d1565b90506040840151601f198085840301606086015261336483836128d1565b92506001600160401b03606087015116608086015260808601519150808584030160a086015261339483836132ba565b925060a08601519150808584030160c0860152506133b282826132ba565b91505060c08401516133cf60e08501826001600160401b03169052565b509392505050565b5f80604083850312156133e8575f80fd5b8251915060208301516001600160401b03811115613404575f80fd5b61341085828601612b03565b9150509250929050565b6001600160401b0383111561343157613431612a4f565b6134458361343f8354612a09565b83612cfa565b5f601f841160018114613476575f851561345f5750838201355b5f19600387901b1c1916600186901b178355612d3e565b5f83815260208120601f198716915b828110156134a55786850135825560209485019460019092019101613485565b50868210156134c1575f1960f88860031b161c19848701351681555b505060018560011b0183555050505050565b81810381811115610b8757610b87612e04565b6001600160401b038281168282160390808211156112c3576112c3612e04565b6001600160401b038181168382160190808211156112c3576112c3612e04565b6001600160401b0381811683821602808216919082811461354957613549612e04565b505092915050565b5f6001600160401b03808316818103612e4357612e43612e04565b5f6020828403121561357c575f80fd5b813560ff81168114612997575f80fdfee92546d698950ddd38910d2e15ed1d923cd0a7b3dde9e2a6a3f380565559cb00e92546d698950ddd38910d2e15ed1d923cd0a7b3dde9e2a6a3f380565559cb07a26469706673582212203cb13ff6c4ebe88a4df468409136a252e58da894b3bc03214eda901b28ef432064736f6c63430008190033", + Bin: "0x608060405234801561000f575f80fd5b5060405161374f38038061374f83398101604081905261002e91610107565b60018160018111156100425761004261012c565b0361004f5761004f610055565b50610140565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00805468010000000000000000900460ff16156100a55760405163f92ee8a960e01b815260040160405180910390fd5b80546001600160401b03908116146101045780546001600160401b0319166001600160401b0390811782556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b50565b5f60208284031215610117575f80fd5b815160028110610125575f80fd5b9392505050565b634e487b7160e01b5f52602160045260245ffd5b6136028061014d5f395ff3fe608060405234801561000f575f80fd5b5060043610610132575f3560e01c80639ba96b86116100b4578063c974d1b611610079578063c974d1b6146102a7578063d588c18f146102af578063d5f20ff6146102c2578063df93d8de146102e2578063f2fde38b146102ec578063fd7ac5e7146102ff575f80fd5b80639ba96b861461024c578063a3a65e481461025f578063b771b3bc14610272578063bc5fbfec14610280578063bee0a03f14610294575f80fd5b8063715018a6116100fa578063715018a6146101be578063732214f8146101c65780638280a25a146101db5780638da5cb5b146101f557806397fb70d414610239575f80fd5b80630322ed981461013657806320d91b7a1461014b578063467ef06f1461015e57806360305d621461017157806366435abf14610193575b5f80fd5b61014961014436600461273a565b610312565b005b610149610159366004612769565b6105a2565b61014961016c3660046127b7565b610b27565b610179601481565b60405163ffffffff90911681526020015b60405180910390f35b6101a66101a136600461273a565b610b35565b6040516001600160401b03909116815260200161018a565b610149610b49565b6101cd5f81565b60405190815260200161018a565b6101e3603081565b60405160ff909116815260200161018a565b7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300546001600160a01b03165b6040516001600160a01b03909116815260200161018a565b61014961024736600461273a565b610b5c565b6101cd61025a3660046127e6565b610b71565b61014961026d3660046127b7565b610b8d565b6102216005600160991b0181565b6101cd5f8051602061358d83398151915281565b6101496102a236600461273a565b610d82565b6101e3601481565b6101496102bd36600461283f565b610ebf565b6102d56102d036600461273a565b610fcd565b60405161018a91906128fc565b6101a66202a30081565b6101496102fa36600461297c565b61111c565b6101cd61030d36600461299e565b611159565b5f8181525f805160206135ad8339815191526020526040808220815160e0810190925280545f8051602061358d83398151915293929190829060ff16600581111561035f5761035f61287b565b60058111156103705761037061287b565b815260200160018201805461038490612a09565b80601f01602080910402602001604051908101604052809291908181526020018280546103b090612a09565b80156103fb5780601f106103d2576101008083540402835291602001916103fb565b820191905f5260205f20905b8154815290600101906020018083116103de57829003601f168201915b505050918352505060028201546001600160401b038082166020840152600160401b820481166040840152600160801b820481166060840152600160c01b909104811660808301526003928301541660a090910152909150815160058111156104665761046661287b565b146104a2575f8381526007830160205260409081902054905163170cc93360e21b81526104999160ff1690600401612a41565b60405180910390fd5b606081015160405163854a893f60e01b8152600481018590526001600160401b0390911660248201525f60448201526005600160991b019063ee5b48eb9073__$fd0c147b4031eef6079b0498cbafa865f0$__9063854a893f906064015f60405180830381865af4158015610519573d5f803e3d5ffd5b505050506040513d5f823e601f3d908101601f191682016040526105409190810190612b52565b6040518263ffffffff1660e01b815260040161055c9190612b83565b6020604051808303815f875af1158015610578573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061059c9190612b95565b50505050565b7fe92546d698950ddd38910d2e15ed1d923cd0a7b3dde9e2a6a3f380565559cb09545f8051602061358d8339815191529060ff16156105f457604051637fab81e560e01b815260040160405180910390fd5b6005600160991b016001600160a01b0316634213cf786040518163ffffffff1660e01b8152600401602060405180830381865afa158015610637573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061065b9190612b95565b836020013514610684576040516372b0a7e760e11b815260208401356004820152602401610499565b30610695606085016040860161297c565b6001600160a01b0316146106d8576106b3606084016040850161297c565b604051632f88120d60e21b81526001600160a01b039091166004820152602401610499565b5f6106e66060850185612bac565b905090505f805b828163ffffffff16101561094d575f6107096060880188612bac565b8363ffffffff1681811061071f5761071f612bf1565b90506020028101906107319190612c05565b61073a90612c70565b80516040519192505f91600888019161075291612ce9565b9081526020016040518091039020541461078257805160405163a41f772f60e01b81526104999190600401612b83565b5f6002885f0135846040516020016107b192919091825260e01b6001600160e01b031916602082015260240190565b60408051601f19818403018152908290526107cb91612ce9565b602060405180830381855afa1580156107e6573d5f803e3d5ffd5b5050506040513d601f19601f820116820180604052508101906108099190612b95565b90508086600801835f01516040516108219190612ce9565b90815260408051918290036020908101909220929092555f8381526007890190915220805460ff1916600217815582516001909101906108619082612d45565b50604080830180515f84815260078a01602052929092206002810180549251426001600160401b03908116600160c01b026001600160c01b03928216600160801b81026001600160c01b03199097169290971691909117949094171692909217909155600301805467ffffffffffffffff191690556108e09085612e18565b82516040519195506108f191612ce9565b60408051918290038220908401516001600160401b031682529082907f9d47fef9da077661546e646d61830bfcbda90506c2e5eed38195e82c4eb1cbdf9060200160405180910390a350508061094690612e2b565b90506106ed565b5060048301819055600183015460649061097190600160401b900460ff1683612e4d565b101561099357604051635943317f60e01b815260048101829052602401610499565b5f73__$fd0c147b4031eef6079b0498cbafa865f0$__634d8478846109b7876111b4565b604001516040518263ffffffff1660e01b81526004016109d79190612b83565b602060405180830381865af41580156109f2573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610a169190612b95565b90505f73__$fd0c147b4031eef6079b0498cbafa865f0$__6387418b8e886040518263ffffffff1660e01b8152600401610a509190612f87565b5f60405180830381865af4158015610a6a573d5f803e3d5ffd5b505050506040513d5f823e601f3d908101601f19168201604052610a919190810190612b52565b90505f600282604051610aa49190612ce9565b602060405180830381855afa158015610abf573d5f803e3d5ffd5b5050506040513d601f19601f82011682018060405250810190610ae29190612b95565b9050828114610b0e5760405163baaea89d60e01b81526004810182905260248101849052604401610499565b5050506009909201805460ff1916600117905550505050565b610b30816112ca565b505050565b5f610b3f82610fcd565b6080015192915050565b610b5161167d565b610b5a5f6116d8565b565b610b6461167d565b610b6d81611748565b5050565b5f610b7a61167d565b610b848383611a2c565b90505b92915050565b5f8051602061358d8339815191525f8073__$fd0c147b4031eef6079b0498cbafa865f0$__63021de88f610bc0866111b4565b604001516040518263ffffffff1660e01b8152600401610be09190612b83565b6040805180830381865af4158015610bfa573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610c1e919061302a565b9150915080610c4457604051632d07135360e01b81528115156004820152602401610499565b5f82815260068401602052604090208054610c5e90612a09565b90505f03610c825760405163089938b360e11b815260048101839052602401610499565b60015f83815260078501602052604090205460ff166005811115610ca857610ca861287b565b14610cdb575f8281526007840160205260409081902054905163170cc93360e21b81526104999160ff1690600401612a41565b5f8281526006840160205260408120610cf3916126ae565b5f828152600784016020908152604091829020805460ff1916600290811782550180546001600160401b0342818116600160c01b026001600160c01b0390931692909217928390558451600160801b9093041682529181019190915283917ff8fd1c90fb9cfa2ca2358fdf5806b086ad43315d92b221c929efc7f105ce7568910160405180910390a250505050565b5f8181527fe92546d698950ddd38910d2e15ed1d923cd0a7b3dde9e2a6a3f380565559cb066020526040902080545f8051602061358d8339815191529190610dc990612a09565b90505f03610ded5760405163089938b360e11b815260048101839052602401610499565b60015f83815260078301602052604090205460ff166005811115610e1357610e1361287b565b14610e46575f8281526007820160205260409081902054905163170cc93360e21b81526104999160ff1690600401612a41565b5f82815260068201602052604090819020905163ee5b48eb60e01b81526005600160991b019163ee5b48eb91610e7f919060040161304b565b6020604051808303815f875af1158015610e9b573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610b309190612b95565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a008054600160401b810460ff1615906001600160401b03165f81158015610f035750825b90505f826001600160401b03166001148015610f1e5750303b155b905081158015610f2c575080155b15610f4a5760405163f92ee8a960e01b815260040160405180910390fd5b845467ffffffffffffffff191660011785558315610f7457845460ff60401b1916600160401b1785555b610f7e8787611f51565b8315610fc457845460ff60401b19168555604051600181527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b50505050505050565b610fd56126e5565b5f8281525f805160206135ad833981519152602052604090819020815160e0810190925280545f8051602061358d833981519152929190829060ff1660058111156110225761102261287b565b60058111156110335761103361287b565b815260200160018201805461104790612a09565b80601f016020809104026020016040519081016040528092919081815260200182805461107390612a09565b80156110be5780601f10611095576101008083540402835291602001916110be565b820191905f5260205f20905b8154815290600101906020018083116110a157829003601f168201915b505050918352505060028201546001600160401b038082166020840152600160401b820481166040840152600160801b820481166060840152600160c01b9091048116608083015260039092015490911660a0909101529392505050565b61112461167d565b6001600160a01b03811661114d57604051631e4fbdf760e01b81525f6004820152602401610499565b611156816116d8565b50565b6040515f905f8051602061358d833981519152907fe92546d698950ddd38910d2e15ed1d923cd0a7b3dde9e2a6a3f380565559cb089061119c90869086906130d5565b90815260200160405180910390205491505092915050565b60408051606080820183525f8083526020830152918101919091526040516306f8253560e41b815263ffffffff831660048201525f9081906005600160991b0190636f825350906024015f60405180830381865afa158015611218573d5f803e3d5ffd5b505050506040513d5f823e601f3d908101601f1916820160405261123f91908101906130e4565b915091508061126157604051636b2f19e960e01b815260040160405180910390fd5b815115611287578151604051636ba589a560e01b81526004810191909152602401610499565b60208201516001600160a01b0316156112c3576020820151604051624de75d60e31b81526001600160a01b039091166004820152602401610499565b5092915050565b5f6112d36126e5565b5f8051602061358d8339815191525f8073__$fd0c147b4031eef6079b0498cbafa865f0$__63021de88f611306886111b4565b604001516040518263ffffffff1660e01b81526004016113269190612b83565b6040805180830381865af4158015611340573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611364919061302a565b91509150801561138b57604051632d07135360e01b81528115156004820152602401610499565b5f828152600784016020526040808220815160e081019092528054829060ff1660058111156113bc576113bc61287b565b60058111156113cd576113cd61287b565b81526020016001820180546113e190612a09565b80601f016020809104026020016040519081016040528092919081815260200182805461140d90612a09565b80156114585780601f1061142f57610100808354040283529160200191611458565b820191905f5260205f20905b81548152906001019060200180831161143b57829003601f168201915b505050918352505060028201546001600160401b038082166020840152600160401b820481166040840152600160801b820481166060840152600160c01b909104811660808301526003928301541660a090910152909150815160058111156114c3576114c361287b565b141580156114e457506001815160058111156114e1576114e161287b565b14155b1561150557805160405163170cc93360e21b81526104999190600401612a41565b60038151600581111561151a5761151a61287b565b03611528576004815261152d565b600581525b8360080181602001516040516115439190612ce9565b90815260408051602092819003830190205f908190558581526007870190925290208151815483929190829060ff191660018360058111156115875761158761287b565b0217905550602082015160018201906115a09082612d45565b5060408201516002820180546060850151608086015160a08701516001600160401b039586166001600160801b031990941693909317600160401b92861692909202919091176001600160801b0316600160801b918516919091026001600160c01b031617600160c01b9184169190910217905560c0909201516003909101805467ffffffffffffffff191691909216179055805160058111156116465761164661287b565b60405184907f1c08e59656f1a18dc2da76826cdc52805c43e897a17c50faefb8ab3c1526cc16905f90a39196919550909350505050565b336116af7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300546001600160a01b031690565b6001600160a01b031614610b5a5760405163118cdaa760e01b8152336004820152602401610499565b7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c19930080546001600160a01b031981166001600160a01b03848116918217845560405192169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0905f90a3505050565b6117506126e5565b5f8281525f805160206135ad8339815191526020526040808220815160e0810190925280545f8051602061358d83398151915293929190829060ff16600581111561179d5761179d61287b565b60058111156117ae576117ae61287b565b81526020016001820180546117c290612a09565b80601f01602080910402602001604051908101604052809291908181526020018280546117ee90612a09565b80156118395780601f1061181057610100808354040283529160200191611839565b820191905f5260205f20905b81548152906001019060200180831161181c57829003601f168201915b50505091835250506002828101546001600160401b038082166020850152600160401b820481166040850152600160801b820481166060850152600160c01b9091048116608084015260039093015490921660a090910152909150815160058111156118a7576118a761287b565b146118da575f8481526007830160205260409081902054905163170cc93360e21b81526104999160ff1690600401612a41565b60038152426001600160401b031660c08201525f84815260078301602052604090208151815483929190829060ff1916600183600581111561191e5761191e61287b565b0217905550602082015160018201906119379082612d45565b5060408201516002820180546060850151608086015160a08701516001600160401b039586166001600160801b031990941693909317600160401b92861692909202919091176001600160801b0316600160801b918516919091026001600160c01b031617600160c01b9184169190910217905560c0909201516003909101805467ffffffffffffffff1916919092161790555f6119d58582611f6b565b6080840151604080516001600160401b03909216825242602083015291935083925087917f13d58394cf269d48bcf927959a29a5ffee7c9924dafff8927ecdf3c48ffa7c67910160405180910390a3509392505050565b7fe92546d698950ddd38910d2e15ed1d923cd0a7b3dde9e2a6a3f380565559cb09545f9060ff16611a7057604051637fab81e560e01b815260040160405180910390fd5b5f8051602061358d83398151915242611a8f6060860160408701613171565b6001600160401b0316111580611ac95750611aad6202a30042612e18565b611abd6060860160408701613171565b6001600160401b031610155b15611b0357611ade6060850160408601613171565b604051635879da1360e11b81526001600160401b039091166004820152602401610499565b611b18611b13606086018661318a565b612142565b611b28611b13608086018661318a565b6030611b37602086018661319e565b905014611b6957611b4b602085018561319e565b6040516326475b2f60e11b8152610499925060040190815260200190565b611b73848061319e565b90505f03611ba057611b85848061319e565b604051633e08a12560e11b81526004016104999291906131e0565b5f60088201611baf868061319e565b604051611bbd9291906130d5565b90815260200160405180910390205414611bf657611bdb848061319e565b60405163a41f772f60e01b81526004016104999291906131e0565b611c00835f6122ab565b6040805160e08101909152815481525f90819073__$fd0c147b4031eef6079b0498cbafa865f0$__9063eb97ce519060208101611c3d8a8061319e565b8080601f0160208091040260200160405190810160405280939291908181526020018383808284375f92019190915250505090825250602090810190611c85908b018b61319e565b8080601f0160208091040260200160405190810160405280939291908181526020018383808284375f92019190915250505090825250602001611cce60608b0160408c01613171565b6001600160401b03168152602001611ce960608b018b61318a565b611cf2906131f3565b8152602001611d0460808b018b61318a565b611d0d906131f3565b8152602001886001600160401b03168152506040518263ffffffff1660e01b8152600401611d3b9190613320565b5f60405180830381865af4158015611d55573d5f803e3d5ffd5b505050506040513d5f823e601f3d908101601f19168201604052611d7c91908101906133d7565b5f82815260068601602052604090209193509150611d9a8282612d45565b508160088401611daa888061319e565b604051611db89291906130d5565b9081526040519081900360200181209190915563ee5b48eb60e01b81525f906005600160991b019063ee5b48eb90611df4908590600401612b83565b6020604051808303815f875af1158015611e10573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611e349190612b95565b5f8481526007860160205260409020805460ff191660011790559050611e5a878061319e565b5f858152600787016020526040902060010191611e7891908361341a565b505f83815260078501602052604090206002810180546001600160c01b0319166001600160401b038916908117600160801b91909102176001600160c01b03169055600301805467ffffffffffffffff1916905580611ed7888061319e565b604051611ee59291906130d5565b6040518091039020847fb77297e3befc691bfc864a81e241f83e2ef722b6e7becaa2ecec250c6d52b430898b6040016020810190611f239190613171565b604080516001600160401b0393841681529290911660208301520160405180910390a4509095945050505050565b611f596124ce565b611f6282612517565b610b6d81612530565b5f8281525f805160206135ad833981519152602052604081206002015481905f8051602061358d83398151915290600160801b90046001600160401b0316611fb385826122ab565b5f611fbd87612541565b5f888152600785016020526040808220600201805467ffffffffffffffff60801b1916600160801b6001600160401b038c811691820292909217909255915163854a893f60e01b8152600481018c905291841660248301526044820152919250906005600160991b019063ee5b48eb9073__$fd0c147b4031eef6079b0498cbafa865f0$__9063854a893f906064015f60405180830381865af4158015612066573d5f803e3d5ffd5b505050506040513d5f823e601f3d908101601f1916820160405261208d9190810190612b52565b6040518263ffffffff1660e01b81526004016120a99190612b83565b6020604051808303815f875af11580156120c5573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906120e99190612b95565b604080516001600160401b038a811682526020820184905282519394508516928b927f07de5ff35a674a8005e661f3333c907ca6333462808762d19dc7b3abb1a8c1df928290030190a3909450925050505b9250929050565b61214f60208201826127b7565b63ffffffff1615801561216f575061216a6020820182612bac565b151590505b156121b65761218160208201826127b7565b61218e6020830183612bac565b60405163c08a0f1d60e01b815263ffffffff9093166004840152602483015250604401610499565b6121c36020820182612bac565b90506121d260208301836127b7565b63ffffffff1611156121eb5761218160208201826127b7565b60015b6121fb6020830183612bac565b9050811015610b6d576122116020830183612bac565b61221c6001846134d3565b81811061222b5761222b612bf1565b9050602002016020810190612240919061297c565b6001600160a01b03166122566020840184612bac565b8381811061226657612266612bf1565b905060200201602081019061227b919061297c565b6001600160a01b031610156122a357604051630dbc8d5f60e31b815260040160405180910390fd5b6001016121ee565b5f8051602061358d8339815191525f6001600160401b0380841690851611156122df576122d883856134e6565b90506122ec565b6122e984846134e6565b90505b6040805160808101825260028401548082526003850154602083015260048501549282019290925260058401546001600160401b031660608201524291158061234e57506001840154815161234a916001600160401b031690612e18565b8210155b15612374576001600160401b038316606082015281815260408101516020820152612393565b82816060018181516123869190613506565b6001600160401b03169052505b60608101516123a3906064613526565b602082015160018601546001600160401b0392909216916123ce9190600160401b900460ff16612e4d565b10156123fe57606081015160405163dfae880160e01b81526001600160401b039091166004820152602401610499565b856001600160401b0316816040018181516124199190612e18565b9052506040810180516001600160401b03871691906124399083906134d3565b9052506001840154604082015160649161245e91600160401b90910460ff1690612e4d565b1015612485578060400151604051635943317f60e01b815260040161049991815260200190565b805160028501556020810151600385015560408101516004850155606001516005909301805467ffffffffffffffff19166001600160401b039094169390931790925550505050565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0054600160401b900460ff16610b5a57604051631afcd79f60e31b815260040160405180910390fd5b61251f6124ce565b6125276125b6565b611156816125be565b6125386124ce565b611156816126a6565b5f8181525f805160206135ad8339815191526020526040812060020180545f8051602061358d833981519152919060089061258b90600160401b90046001600160401b0316613551565b91906101000a8154816001600160401b0302191690836001600160401b031602179055915050919050565b610b5a6124ce565b6125c66124ce565b80355f8051602061358d83398151915290815560146125eb606084016040850161356c565b60ff16118061260a5750612605606083016040840161356c565b60ff16155b1561263e5761261f606083016040840161356c565b604051634a59bbff60e11b815260ff9091166004820152602401610499565b61264e606083016040840161356c565b60018201805460ff92909216600160401b0260ff60401b1990921691909117905561267f6040830160208401613171565b600191909101805467ffffffffffffffff19166001600160401b0390921691909117905550565b6111246124ce565b5080546126ba90612a09565b5f825580601f106126c9575050565b601f0160209004905f5260205f20908101906111569190612722565b6040805160e08101909152805f81526060602082018190525f604083018190529082018190526080820181905260a0820181905260c09091015290565b5b80821115612736575f8155600101612723565b5090565b5f6020828403121561274a575f80fd5b5035919050565b803563ffffffff81168114612764575f80fd5b919050565b5f806040838503121561277a575f80fd5b82356001600160401b0381111561278f575f80fd5b8301608081860312156127a0575f80fd5b91506127ae60208401612751565b90509250929050565b5f602082840312156127c7575f80fd5b610b8482612751565b80356001600160401b0381168114612764575f80fd5b5f80604083850312156127f7575f80fd5b82356001600160401b0381111561280c575f80fd5b830160a0818603121561281d575f80fd5b91506127ae602084016127d0565b6001600160a01b0381168114611156575f80fd5b5f808284036080811215612851575f80fd5b606081121561285e575f80fd5b5082915060608301356128708161282b565b809150509250929050565b634e487b7160e01b5f52602160045260245ffd5b600681106128ab57634e487b7160e01b5f52602160045260245ffd5b9052565b5f5b838110156128c95781810151838201526020016128b1565b50505f910152565b5f81518084526128e88160208601602086016128af565b601f01601f19169290920160200192915050565b6020815261290e60208201835161288f565b5f602083015160e060408401526129296101008401826128d1565b905060408401516001600160401b0380821660608601528060608701511660808601528060808701511660a08601528060a08701511660c08601528060c08701511660e086015250508091505092915050565b5f6020828403121561298c575f80fd5b81356129978161282b565b9392505050565b5f80602083850312156129af575f80fd5b82356001600160401b03808211156129c5575f80fd5b818501915085601f8301126129d8575f80fd5b8135818111156129e6575f80fd5b8660208285010111156129f7575f80fd5b60209290920196919550909350505050565b600181811c90821680612a1d57607f821691505b602082108103612a3b57634e487b7160e01b5f52602260045260245ffd5b50919050565b60208101610b87828461288f565b634e487b7160e01b5f52604160045260245ffd5b604051606081016001600160401b0381118282101715612a8557612a85612a4f565b60405290565b604080519081016001600160401b0381118282101715612a8557612a85612a4f565b604051601f8201601f191681016001600160401b0381118282101715612ad557612ad5612a4f565b604052919050565b5f6001600160401b03821115612af557612af5612a4f565b50601f01601f191660200190565b5f82601f830112612b12575f80fd5b8151612b25612b2082612add565b612aad565b818152846020838601011115612b39575f80fd5b612b4a8260208301602087016128af565b949350505050565b5f60208284031215612b62575f80fd5b81516001600160401b03811115612b77575f80fd5b612b4a84828501612b03565b602081525f610b8460208301846128d1565b5f60208284031215612ba5575f80fd5b5051919050565b5f808335601e19843603018112612bc1575f80fd5b8301803591506001600160401b03821115612bda575f80fd5b6020019150600581901b360382131561213b575f80fd5b634e487b7160e01b5f52603260045260245ffd5b5f8235605e19833603018112612c19575f80fd5b9190910192915050565b5f82601f830112612c32575f80fd5b8135612c40612b2082612add565b818152846020838601011115612c54575f80fd5b816020850160208301375f918101602001919091529392505050565b5f60608236031215612c80575f80fd5b612c88612a63565b82356001600160401b0380821115612c9e575f80fd5b612caa36838701612c23565b83526020850135915080821115612cbf575f80fd5b50612ccc36828601612c23565b602083015250612cde604084016127d0565b604082015292915050565b5f8251612c198184602087016128af565b601f821115610b3057805f5260205f20601f840160051c81016020851015612d1f5750805b601f840160051c820191505b81811015612d3e575f8155600101612d2b565b5050505050565b81516001600160401b03811115612d5e57612d5e612a4f565b612d7281612d6c8454612a09565b84612cfa565b602080601f831160018114612da5575f8415612d8e5750858301515b5f19600386901b1c1916600185901b178555612dfc565b5f85815260208120601f198616915b82811015612dd357888601518255948401946001909101908401612db4565b5085821015612df057878501515f19600388901b60f8161c191681555b505060018460011b0185555b505050505050565b634e487b7160e01b5f52601160045260245ffd5b80820180821115610b8757610b87612e04565b5f63ffffffff808316818103612e4357612e43612e04565b6001019392505050565b8082028115828204841417610b8757610b87612e04565b5f808335601e19843603018112612e79575f80fd5b83016020810192503590506001600160401b03811115612e97575f80fd5b80360382131561213b575f80fd5b81835281816020850137505f828201602090810191909152601f909101601f19169091010190565b5f8383855260208086019550808560051b830101845f5b87811015612f7a57848303601f19018952813536889003605e19018112612f09575f80fd5b87016060612f178280612e64565b828752612f278388018284612ea5565b92505050612f3786830183612e64565b86830388880152612f49838284612ea5565b9250505060406001600160401b03612f628285016127d0565b16950194909452509783019790830190600101612ee4565b5090979650505050505050565b6020815281356020820152602082013560408201525f6040830135612fab8161282b565b6001600160a01b031660608381019190915283013536849003601e19018112612fd2575f80fd5b83016020810190356001600160401b03811115612fed575f80fd5b8060051b3603821315612ffe575f80fd5b60808085015261301260a085018284612ecd565b95945050505050565b80518015158114612764575f80fd5b5f806040838503121561303b575f80fd5b825191506127ae6020840161301b565b5f60208083525f845461305d81612a09565b806020870152604060018084165f811461307e576001811461309a576130c7565b60ff19851660408a0152604084151560051b8a010195506130c7565b895f5260205f205f5b858110156130be5781548b82018601529083019088016130a3565b8a016040019650505b509398975050505050505050565b818382375f9101908152919050565b5f80604083850312156130f5575f80fd5b82516001600160401b038082111561310b575f80fd5b908401906060828703121561311e575f80fd5b613126612a63565b8251815260208301516131388161282b565b602082015260408301518281111561314e575f80fd5b61315a88828601612b03565b60408301525093506127ae9150506020840161301b565b5f60208284031215613181575f80fd5b610b84826127d0565b5f8235603e19833603018112612c19575f80fd5b5f808335601e198436030181126131b3575f80fd5b8301803591506001600160401b038211156131cc575f80fd5b60200191503681900382131561213b575f80fd5b602081525f612b4a602083018486612ea5565b5f60408236031215613203575f80fd5b61320b612a8b565b61321483612751565b81526020808401356001600160401b0380821115613230575f80fd5b9085019036601f830112613242575f80fd5b81358181111561325457613254612a4f565b8060051b9150613265848301612aad565b818152918301840191848101903684111561327e575f80fd5b938501935b838510156132a857843592506132988361282b565b8282529385019390850190613283565b94860194909452509295945050505050565b5f6040830163ffffffff8351168452602080840151604060208701528281518085526060880191506020830194505f92505b808310156133155784516001600160a01b031682529383019360019290920191908301906132ec565b509695505050505050565b60208152815160208201525f602083015160e060408401526133466101008401826128d1565b90506040840151601f198085840301606086015261336483836128d1565b92506001600160401b03606087015116608086015260808601519150808584030160a086015261339483836132ba565b925060a08601519150808584030160c0860152506133b282826132ba565b91505060c08401516133cf60e08501826001600160401b03169052565b509392505050565b5f80604083850312156133e8575f80fd5b8251915060208301516001600160401b03811115613404575f80fd5b61341085828601612b03565b9150509250929050565b6001600160401b0383111561343157613431612a4f565b6134458361343f8354612a09565b83612cfa565b5f601f841160018114613476575f851561345f5750838201355b5f19600387901b1c1916600186901b178355612d3e565b5f83815260208120601f198716915b828110156134a55786850135825560209485019460019092019101613485565b50868210156134c1575f1960f88860031b161c19848701351681555b505060018560011b0183555050505050565b81810381811115610b8757610b87612e04565b6001600160401b038281168282160390808211156112c3576112c3612e04565b6001600160401b038181168382160190808211156112c3576112c3612e04565b6001600160401b0381811683821602808216919082811461354957613549612e04565b505092915050565b5f6001600160401b03808316818103612e4357612e43612e04565b5f6020828403121561357c575f80fd5b813560ff81168114612997575f80fdfee92546d698950ddd38910d2e15ed1d923cd0a7b3dde9e2a6a3f380565559cb00e92546d698950ddd38910d2e15ed1d923cd0a7b3dde9e2a6a3f380565559cb07a2646970667358221220eb579bb3f779586161cb1344088aa201289de9155f5865a0fa9eea86bd6b1ed464736f6c63430008190033", } // PoAValidatorManagerABI is the input ABI used to generate the binding from. @@ -2032,7 +2032,7 @@ func (_PoAValidatorManager *PoAValidatorManagerFilterer) ParseValidatorWeightUpd // ValidatorMessagesMetaData contains all meta data concerning the ValidatorMessages contract. var ValidatorMessagesMetaData = &bind.MetaData{ ABI: "[{\"inputs\":[],\"name\":\"InvalidBLSPublicKey\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"id\",\"type\":\"uint32\"}],\"name\":\"InvalidCodecID\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"actual\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"expected\",\"type\":\"uint32\"}],\"name\":\"InvalidMessageLength\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidMessageType\",\"type\":\"error\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"subnetID\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"validatorManagerBlockchainID\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"validatorManagerAddress\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"bytes\",\"name\":\"nodeID\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"blsPublicKey\",\"type\":\"bytes\"},{\"internalType\":\"uint64\",\"name\":\"weight\",\"type\":\"uint64\"}],\"internalType\":\"structInitialValidator[]\",\"name\":\"initialValidators\",\"type\":\"tuple[]\"}],\"internalType\":\"structConversionData\",\"name\":\"conversionData\",\"type\":\"tuple\"}],\"name\":\"packConversionData\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"validationID\",\"type\":\"bytes32\"},{\"internalType\":\"bool\",\"name\":\"valid\",\"type\":\"bool\"}],\"name\":\"packL1ValidatorRegistrationMessage\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"validationID\",\"type\":\"bytes32\"},{\"internalType\":\"uint64\",\"name\":\"nonce\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"weight\",\"type\":\"uint64\"}],\"name\":\"packL1ValidatorWeightMessage\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"subnetID\",\"type\":\"bytes32\"},{\"internalType\":\"bytes\",\"name\":\"nodeID\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"blsPublicKey\",\"type\":\"bytes\"},{\"internalType\":\"uint64\",\"name\":\"registrationExpiry\",\"type\":\"uint64\"},{\"components\":[{\"internalType\":\"uint32\",\"name\":\"threshold\",\"type\":\"uint32\"},{\"internalType\":\"address[]\",\"name\":\"addresses\",\"type\":\"address[]\"}],\"internalType\":\"structPChainOwner\",\"name\":\"remainingBalanceOwner\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"uint32\",\"name\":\"threshold\",\"type\":\"uint32\"},{\"internalType\":\"address[]\",\"name\":\"addresses\",\"type\":\"address[]\"}],\"internalType\":\"structPChainOwner\",\"name\":\"disableOwner\",\"type\":\"tuple\"},{\"internalType\":\"uint64\",\"name\":\"weight\",\"type\":\"uint64\"}],\"internalType\":\"structValidatorMessages.ValidationPeriod\",\"name\":\"validationPeriod\",\"type\":\"tuple\"}],\"name\":\"packRegisterL1ValidatorMessage\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"conversionID\",\"type\":\"bytes32\"}],\"name\":\"packSubnetToL1ConversionMessage\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"validationID\",\"type\":\"bytes32\"},{\"internalType\":\"uint64\",\"name\":\"uptime\",\"type\":\"uint64\"}],\"name\":\"packValidationUptimeMessage\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"input\",\"type\":\"bytes\"}],\"name\":\"unpackL1ValidatorRegistrationMessage\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"},{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"input\",\"type\":\"bytes\"}],\"name\":\"unpackL1ValidatorWeightMessage\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"},{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"input\",\"type\":\"bytes\"}],\"name\":\"unpackRegisterL1ValidatorMessage\",\"outputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"subnetID\",\"type\":\"bytes32\"},{\"internalType\":\"bytes\",\"name\":\"nodeID\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"blsPublicKey\",\"type\":\"bytes\"},{\"internalType\":\"uint64\",\"name\":\"registrationExpiry\",\"type\":\"uint64\"},{\"components\":[{\"internalType\":\"uint32\",\"name\":\"threshold\",\"type\":\"uint32\"},{\"internalType\":\"address[]\",\"name\":\"addresses\",\"type\":\"address[]\"}],\"internalType\":\"structPChainOwner\",\"name\":\"remainingBalanceOwner\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"uint32\",\"name\":\"threshold\",\"type\":\"uint32\"},{\"internalType\":\"address[]\",\"name\":\"addresses\",\"type\":\"address[]\"}],\"internalType\":\"structPChainOwner\",\"name\":\"disableOwner\",\"type\":\"tuple\"},{\"internalType\":\"uint64\",\"name\":\"weight\",\"type\":\"uint64\"}],\"internalType\":\"structValidatorMessages.ValidationPeriod\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"input\",\"type\":\"bytes\"}],\"name\":\"unpackSubnetToL1ConversionMessage\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"input\",\"type\":\"bytes\"}],\"name\":\"unpackValidationUptimeMessage\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"},{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"pure\",\"type\":\"function\"}]", - Bin: "0x612160610034600b8282823980515f1a607314602857634e487b7160e01b5f525f60045260245ffd5b305f52607381538281f3fe73000000000000000000000000000000000000000030146080604052600436106100b1575f3560e01c8063854a893f11610079578063854a893f146101b257806387418b8e1461020f5780639b83546514610222578063a699c13514610242578063e1d68f3014610255578063eb97ce5114610268575f80fd5b8063021de88f146100b5578063088c2463146100e25780634d8478841461011257806350782b0f146101335780637f7c427a1461016b575b5f80fd5b6100c86100c3366004611904565b610289565b604080519283529015156020830152015b60405180910390f35b6100f56100f0366004611904565b61044a565b604080519283526001600160401b039091166020830152016100d9565b610125610120366004611904565b61063b565b6040519081526020016100d9565b610146610141366004611904565b6107c8565b604080519384526001600160401b0392831660208501529116908201526060016100d9565b6101a561017936600461193d565b604080515f60208201819052602282015260268082019390935281518082039093018352604601905290565b6040516100d991906119a1565b6101a56101c03660046119d5565b604080515f6020820152600360e01b602282015260268101949094526001600160c01b031960c093841b811660468601529190921b16604e830152805180830360360181526056909201905290565b6101a561021d366004611a0e565b610a1e565b610235610230366004611904565b610bff565b6040516100d99190611aaa565b6101a5610250366004611b61565b61154a565b6101a5610263366004611b93565b61158e565b61027b610276366004611ca1565b6115c4565b6040516100d9929190611d9d565b5f8082516027146102c457825160405163cc92daa160e01b815263ffffffff9091166004820152602760248201526044015b60405180910390fd5b5f805b6002811015610313576102db816001611dc9565b6102e6906008611ddc565b61ffff168582815181106102fc576102fc611df3565b016020015160f81c901b91909117906001016102c7565b5061ffff81161561033d5760405163407b587360e01b815261ffff821660048201526024016102bb565b5f805b600481101561039857610354816003611dc9565b61035f906008611ddc565b63ffffffff1686610371836002611e07565b8151811061038157610381611df3565b016020015160f81c901b9190911790600101610340565b5063ffffffff81166002146103c057604051635b60892f60e01b815260040160405180910390fd5b5f805b6020811015610415576103d781601f611dc9565b6103e2906008611ddc565b876103ee836006611e07565b815181106103fe576103fe611df3565b016020015160f81c901b91909117906001016103c3565b505f8660268151811061042a5761042a611df3565b016020015191976001600160f81b03199092161515965090945050505050565b5f808251602e1461048057825160405163cc92daa160e01b815263ffffffff9091166004820152602e60248201526044016102bb565b5f805b60028110156104cf57610497816001611dc9565b6104a2906008611ddc565b61ffff168582815181106104b8576104b8611df3565b016020015160f81c901b9190911790600101610483565b5061ffff8116156104f95760405163407b587360e01b815261ffff821660048201526024016102bb565b5f805b600481101561055457610510816003611dc9565b61051b906008611ddc565b63ffffffff168661052d836002611e07565b8151811061053d5761053d611df3565b016020015160f81c901b91909117906001016104fc565b5063ffffffff81161561057a57604051635b60892f60e01b815260040160405180910390fd5b5f805b60208110156105cf5761059181601f611dc9565b61059c906008611ddc565b876105a8836006611e07565b815181106105b8576105b8611df3565b016020015160f81c901b919091179060010161057d565b505f805b600881101561062e576105e7816007611dc9565b6105f2906008611ddc565b6001600160401b031688610607836026611e07565b8151811061061757610617611df3565b016020015160f81c901b91909117906001016105d3565b5090969095509350505050565b5f815160261461067057815160405163cc92daa160e01b815263ffffffff9091166004820152602660248201526044016102bb565b5f805b60028110156106bf57610687816001611dc9565b610692906008611ddc565b61ffff168482815181106106a8576106a8611df3565b016020015160f81c901b9190911790600101610673565b5061ffff8116156106e95760405163407b587360e01b815261ffff821660048201526024016102bb565b5f805b600481101561074457610700816003611dc9565b61070b906008611ddc565b63ffffffff168561071d836002611e07565b8151811061072d5761072d611df3565b016020015160f81c901b91909117906001016106ec565b5063ffffffff81161561076a57604051635b60892f60e01b815260040160405180910390fd5b5f805b60208110156107bf5761078181601f611dc9565b61078c906008611ddc565b86610798836006611e07565b815181106107a8576107a8611df3565b016020015160f81c901b919091179060010161076d565b50949350505050565b5f805f83516036146107ff57835160405163cc92daa160e01b815263ffffffff9091166004820152603660248201526044016102bb565b5f805b600281101561084e57610816816001611dc9565b610821906008611ddc565b61ffff1686828151811061083757610837611df3565b016020015160f81c901b9190911790600101610802565b5061ffff8116156108785760405163407b587360e01b815261ffff821660048201526024016102bb565b5f805b60048110156108d35761088f816003611dc9565b61089a906008611ddc565b63ffffffff16876108ac836002611e07565b815181106108bc576108bc611df3565b016020015160f81c901b919091179060010161087b565b5063ffffffff81166003146108fb57604051635b60892f60e01b815260040160405180910390fd5b5f805b60208110156109505761091281601f611dc9565b61091d906008611ddc565b88610929836006611e07565b8151811061093957610939611df3565b016020015160f81c901b91909117906001016108fe565b505f805b60088110156109af57610968816007611dc9565b610973906008611ddc565b6001600160401b031689610988836026611e07565b8151811061099857610998611df3565b016020015160f81c901b9190911790600101610954565b505f805b6008811015610a0e576109c7816007611dc9565b6109d2906008611ddc565b6001600160401b03168a6109e783602e611e07565b815181106109f7576109f7611df3565b016020015160f81c901b91909117906001016109b3565b5091989097509095509350505050565b60605f80833560208501356014610a3a87870160408901611e1a565b610a476060890189611e33565b60405160f09790971b6001600160f01b0319166020880152602287019590955250604285019290925260e090811b6001600160e01b0319908116606286015260609290921b6bffffffffffffffffffffffff191660668501529190911b16607a820152607e0160405160208183030381529060405290505f5b610acd6060850185611e33565b9050811015610bf85781610ae46060860186611e33565b83818110610af457610af4611df3565b9050602002810190610b069190611e7f565b610b109080611e9d565b9050610b1f6060870187611e33565b84818110610b2f57610b2f611df3565b9050602002810190610b419190611e7f565b610b4b9080611e9d565b610b586060890189611e33565b86818110610b6857610b68611df3565b9050602002810190610b7a9190611e7f565b610b88906020810190611e9d565b610b9560608b018b611e33565b88818110610ba557610ba5611df3565b9050602002810190610bb79190611e7f565b610bc8906060810190604001611edf565b604051602001610bde9796959493929190611ef8565b60408051601f198184030181529190529150600101610ac0565b5092915050565b610c076117b1565b5f610c106117b1565b5f805b6002811015610c6e57610c27816001611dc9565b610c32906008611ddc565b61ffff1686610c4763ffffffff871684611e07565b81518110610c5757610c57611df3565b016020015160f81c901b9190911790600101610c13565b5061ffff811615610c985760405163407b587360e01b815261ffff821660048201526024016102bb565b610ca3600284611f61565b9250505f805b6004811015610d0857610cbd816003611dc9565b610cc8906008611ddc565b63ffffffff16868563ffffffff1683610ce19190611e07565b81518110610cf157610cf1611df3565b016020015160f81c901b9190911790600101610ca9565b5063ffffffff8116600114610d3057604051635b60892f60e01b815260040160405180910390fd5b610d3b600484611f61565b9250505f805b6020811015610d9857610d5581601f611dc9565b610d60906008611ddc565b86610d7163ffffffff871684611e07565b81518110610d8157610d81611df3565b016020015160f81c901b9190911790600101610d41565b50808252610da7602084611f61565b9250505f805b6004811015610e0c57610dc1816003611dc9565b610dcc906008611ddc565b63ffffffff16868563ffffffff1683610de59190611e07565b81518110610df557610df5611df3565b016020015160f81c901b9190911790600101610dad565b50610e18600484611f61565b92505f8163ffffffff166001600160401b03811115610e3957610e3961180b565b6040519080825280601f01601f191660200182016040528015610e63576020820181803683370190505b5090505f5b8263ffffffff16811015610ed25786610e8763ffffffff871683611e07565b81518110610e9757610e97611df3565b602001015160f81c60f81b828281518110610eb457610eb4611df3565b60200101906001600160f81b03191690815f1a905350600101610e68565b5060208301819052610ee48285611f61565b604080516030808252606082019092529195505f92506020820181803683370190505090505f5b6030811015610f705786610f2563ffffffff871683611e07565b81518110610f3557610f35611df3565b602001015160f81c60f81b828281518110610f5257610f52611df3565b60200101906001600160f81b03191690815f1a905350600101610f0b565b5060408301819052610f83603085611f61565b9350505f805b6008811015610fe957610f9d816007611dc9565b610fa8906008611ddc565b6001600160401b031687610fc263ffffffff881684611e07565b81518110610fd257610fd2611df3565b016020015160f81c901b9190911790600101610f89565b506001600160401b0381166060840152611004600885611f61565b9350505f805f5b600481101561106a5761101f816003611dc9565b61102a906008611ddc565b63ffffffff16888763ffffffff16836110439190611e07565b8151811061105357611053611df3565b016020015160f81c901b919091179060010161100b565b50611076600486611f61565b94505f5b60048110156110d95761108e816003611dc9565b611099906008611ddc565b63ffffffff16888763ffffffff16836110b29190611e07565b815181106110c2576110c2611df3565b016020015160f81c901b929092179160010161107a565b506110e5600486611f61565b94505f8263ffffffff166001600160401b038111156111065761110661180b565b60405190808252806020026020018201604052801561112f578160200160208202803683370190505b5090505f5b8363ffffffff16811015611217576040805160148082528183019092525f916020820181803683370190505090505f5b60148110156111c9578a61117e63ffffffff8b1683611e07565b8151811061118e5761118e611df3565b602001015160f81c60f81b8282815181106111ab576111ab611df3565b60200101906001600160f81b03191690815f1a905350600101611164565b505f60148201519050808484815181106111e5576111e5611df3565b6001600160a01b039092166020928302919091019091015261120860148a611f61565b98505050806001019050611134565b506040805180820190915263ffffffff9092168252602082015260808401525f80805b60048110156112995761124e816003611dc9565b611259906008611ddc565b63ffffffff16898863ffffffff16836112729190611e07565b8151811061128257611282611df3565b016020015160f81c901b919091179060010161123a565b506112a5600487611f61565b95505f5b6004811015611308576112bd816003611dc9565b6112c8906008611ddc565b63ffffffff16898863ffffffff16836112e19190611e07565b815181106112f1576112f1611df3565b016020015160f81c901b92909217916001016112a9565b50611314600487611f61565b95505f8263ffffffff166001600160401b038111156113355761133561180b565b60405190808252806020026020018201604052801561135e578160200160208202803683370190505b5090505f5b8363ffffffff16811015611446576040805160148082528183019092525f916020820181803683370190505090505f5b60148110156113f8578b6113ad63ffffffff8c1683611e07565b815181106113bd576113bd611df3565b602001015160f81c60f81b8282815181106113da576113da611df3565b60200101906001600160f81b03191690815f1a905350600101611393565b505f601482015190508084848151811061141457611414611df3565b6001600160a01b039092166020928302919091019091015261143760148b611f61565b99505050806001019050611363565b506040805180820190915263ffffffff9092168252602082015260a08501525f6114708284611f61565b61147b906014611f7e565b61148685607a611f61565b6114909190611f61565b90508063ffffffff168851146114cc57875160405163cc92daa160e01b815263ffffffff918216600482015290821660248201526044016102bb565b5f805b600881101561152f576114e3816007611dc9565b6114ee906008611ddc565b6001600160401b03168a61150863ffffffff8b1684611e07565b8151811061151857611518611df3565b016020015160f81c901b91909117906001016114cf565b506001600160401b031660c086015250929695505050505050565b6040515f6020820152600160e11b60228201526026810183905281151560f81b60468201526060906047015b60405160208183030381529060405290505b92915050565b6040515f602082018190526022820152602681018390526001600160c01b031960c083901b166046820152606090604e01611576565b5f60608260400151516030146115ed5760405163180ffa0d60e01b815260040160405180910390fd5b82516020808501518051604080880151606089015160808a01518051908701515193515f9861162e988a986001989297929690959094909390929101611fa6565b60405160208183030381529060405290505f5b846080015160200151518110156116a05781856080015160200151828151811061166d5761166d611df3565b6020026020010151604051602001611686929190612060565b60408051601f198184030181529190529150600101611641565b5060a08401518051602091820151516040516116c0938593929101612096565b60405160208183030381529060405290505f5b8460a00151602001515181101561173257818560a001516020015182815181106116ff576116ff611df3565b6020026020010151604051602001611718929190612060565b60408051601f1981840301815291905291506001016116d3565b5060c08401516040516117499183916020016120d1565b604051602081830303815290604052905060028160405161176a9190612102565b602060405180830381855afa158015611785573d5f803e3d5ffd5b5050506040513d601f19601f820116820180604052508101906117a89190612113565b94909350915050565b6040805160e0810182525f808252606060208084018290528385018290528184018390528451808601865283815280820183905260808501528451808601909552918452908301529060a082019081525f60209091015290565b634e487b7160e01b5f52604160045260245ffd5b604080519081016001600160401b03811182821017156118415761184161180b565b60405290565b60405160e081016001600160401b03811182821017156118415761184161180b565b604051601f8201601f191681016001600160401b03811182821017156118915761189161180b565b604052919050565b5f82601f8301126118a8575f80fd5b81356001600160401b038111156118c1576118c161180b565b6118d4601f8201601f1916602001611869565b8181528460208386010111156118e8575f80fd5b816020850160208301375f918101602001919091529392505050565b5f60208284031215611914575f80fd5b81356001600160401b03811115611929575f80fd5b61193584828501611899565b949350505050565b5f6020828403121561194d575f80fd5b5035919050565b5f5b8381101561196e578181015183820152602001611956565b50505f910152565b5f815180845261198d816020860160208601611954565b601f01601f19169290920160200192915050565b602081525f6119b36020830184611976565b9392505050565b80356001600160401b03811681146119d0575f80fd5b919050565b5f805f606084860312156119e7575f80fd5b833592506119f7602085016119ba565b9150611a05604085016119ba565b90509250925092565b5f60208284031215611a1e575f80fd5b81356001600160401b03811115611a33575f80fd5b8201608081850312156119b3575f80fd5b5f6040830163ffffffff8351168452602080840151604060208701528281518085526060880191506020830194505f92505b80831015611a9f5784516001600160a01b03168252938301936001929092019190830190611a76565b509695505050505050565b60208152815160208201525f602083015160e06040840152611ad0610100840182611976565b90506040840151601f1980858403016060860152611aee8383611976565b92506001600160401b03606087015116608086015260808601519150808584030160a0860152611b1e8383611a44565b925060a08601519150808584030160c086015250611b3c8282611a44565b91505060c0840151611b5960e08501826001600160401b03169052565b509392505050565b5f8060408385031215611b72575f80fd5b8235915060208301358015158114611b88575f80fd5b809150509250929050565b5f8060408385031215611ba4575f80fd5b82359150611bb4602084016119ba565b90509250929050565b80356001600160a01b03811681146119d0575f80fd5b5f60408284031215611be3575f80fd5b611beb61181f565b9050813563ffffffff81168114611c00575f80fd5b81526020828101356001600160401b0380821115611c1c575f80fd5b818501915085601f830112611c2f575f80fd5b813581811115611c4157611c4161180b565b8060051b9150611c52848301611869565b8181529183018401918481019088841115611c6b575f80fd5b938501935b83851015611c9057611c8185611bbd565b82529385019390850190611c70565b808688015250505050505092915050565b5f60208284031215611cb1575f80fd5b81356001600160401b0380821115611cc7575f80fd5b9083019060e08286031215611cda575f80fd5b611ce2611847565b82358152602083013582811115611cf7575f80fd5b611d0387828601611899565b602083015250604083013582811115611d1a575f80fd5b611d2687828601611899565b604083015250611d38606084016119ba565b6060820152608083013582811115611d4e575f80fd5b611d5a87828601611bd3565b60808301525060a083013582811115611d71575f80fd5b611d7d87828601611bd3565b60a083015250611d8f60c084016119ba565b60c082015295945050505050565b828152604060208201525f6119356040830184611976565b634e487b7160e01b5f52601160045260245ffd5b8181038181111561158857611588611db5565b808202811582820484141761158857611588611db5565b634e487b7160e01b5f52603260045260245ffd5b8082018082111561158857611588611db5565b5f60208284031215611e2a575f80fd5b6119b382611bbd565b5f808335601e19843603018112611e48575f80fd5b8301803591506001600160401b03821115611e61575f80fd5b6020019150600581901b3603821315611e78575f80fd5b9250929050565b5f8235605e19833603018112611e93575f80fd5b9190910192915050565b5f808335601e19843603018112611eb2575f80fd5b8301803591506001600160401b03821115611ecb575f80fd5b602001915036819003821315611e78575f80fd5b5f60208284031215611eef575f80fd5b6119b3826119ba565b5f8851611f09818460208d01611954565b60e089901b6001600160e01b031916908301908152868860048301378681019050600481015f8152858782375060c09390931b6001600160c01b0319166004939094019283019390935250600c019695505050505050565b63ffffffff818116838216019080821115610bf857610bf8611db5565b63ffffffff818116838216028082169190828114611f9e57611f9e611db5565b505092915050565b61ffff60f01b8a60f01b1681525f63ffffffff60e01b808b60e01b166002840152896006840152808960e01b166026840152508651611fec81602a850160208b01611954565b86519083019061200381602a840160208b01611954565b60c087901b6001600160c01b031916602a9290910191820152612035603282018660e01b6001600160e01b0319169052565b61204e603682018560e01b6001600160e01b0319169052565b603a019b9a5050505050505050505050565b5f8351612071818460208801611954565b60609390931b6bffffffffffffffffffffffff19169190920190815260140192915050565b5f84516120a7818460208901611954565b6001600160e01b031960e095861b8116919093019081529290931b16600482015260080192915050565b5f83516120e2818460208801611954565b60c09390931b6001600160c01b0319169190920190815260080192915050565b5f8251611e93818460208701611954565b5f60208284031215612123575f80fd5b505191905056fea26469706673582212202d7d64f0428d7e99357ab60d9a73b8ca490d4f97c12eed734b80a5bb6df8eeea64736f6c63430008190033", + Bin: "0x612160610034600b8282823980515f1a607314602857634e487b7160e01b5f525f60045260245ffd5b305f52607381538281f3fe73000000000000000000000000000000000000000030146080604052600436106100b1575f3560e01c8063854a893f11610079578063854a893f146101b257806387418b8e1461020f5780639b83546514610222578063a699c13514610242578063e1d68f3014610255578063eb97ce5114610268575f80fd5b8063021de88f146100b5578063088c2463146100e25780634d8478841461011257806350782b0f146101335780637f7c427a1461016b575b5f80fd5b6100c86100c3366004611904565b610289565b604080519283529015156020830152015b60405180910390f35b6100f56100f0366004611904565b61044a565b604080519283526001600160401b039091166020830152016100d9565b610125610120366004611904565b61063b565b6040519081526020016100d9565b610146610141366004611904565b6107c8565b604080519384526001600160401b0392831660208501529116908201526060016100d9565b6101a561017936600461193d565b604080515f60208201819052602282015260268082019390935281518082039093018352604601905290565b6040516100d991906119a1565b6101a56101c03660046119d5565b604080515f6020820152600360e01b602282015260268101949094526001600160c01b031960c093841b811660468601529190921b16604e830152805180830360360181526056909201905290565b6101a561021d366004611a0e565b610a1e565b610235610230366004611904565b610bff565b6040516100d99190611aaa565b6101a5610250366004611b61565b61154a565b6101a5610263366004611b93565b61158e565b61027b610276366004611ca1565b6115c4565b6040516100d9929190611d9d565b5f8082516027146102c457825160405163cc92daa160e01b815263ffffffff9091166004820152602760248201526044015b60405180910390fd5b5f805b6002811015610313576102db816001611dc9565b6102e6906008611ddc565b61ffff168582815181106102fc576102fc611df3565b016020015160f81c901b91909117906001016102c7565b5061ffff81161561033d5760405163407b587360e01b815261ffff821660048201526024016102bb565b5f805b600481101561039857610354816003611dc9565b61035f906008611ddc565b63ffffffff1686610371836002611e07565b8151811061038157610381611df3565b016020015160f81c901b9190911790600101610340565b5063ffffffff81166002146103c057604051635b60892f60e01b815260040160405180910390fd5b5f805b6020811015610415576103d781601f611dc9565b6103e2906008611ddc565b876103ee836006611e07565b815181106103fe576103fe611df3565b016020015160f81c901b91909117906001016103c3565b505f8660268151811061042a5761042a611df3565b016020015191976001600160f81b03199092161515965090945050505050565b5f808251602e1461048057825160405163cc92daa160e01b815263ffffffff9091166004820152602e60248201526044016102bb565b5f805b60028110156104cf57610497816001611dc9565b6104a2906008611ddc565b61ffff168582815181106104b8576104b8611df3565b016020015160f81c901b9190911790600101610483565b5061ffff8116156104f95760405163407b587360e01b815261ffff821660048201526024016102bb565b5f805b600481101561055457610510816003611dc9565b61051b906008611ddc565b63ffffffff168661052d836002611e07565b8151811061053d5761053d611df3565b016020015160f81c901b91909117906001016104fc565b5063ffffffff81161561057a57604051635b60892f60e01b815260040160405180910390fd5b5f805b60208110156105cf5761059181601f611dc9565b61059c906008611ddc565b876105a8836006611e07565b815181106105b8576105b8611df3565b016020015160f81c901b919091179060010161057d565b505f805b600881101561062e576105e7816007611dc9565b6105f2906008611ddc565b6001600160401b031688610607836026611e07565b8151811061061757610617611df3565b016020015160f81c901b91909117906001016105d3565b5090969095509350505050565b5f815160261461067057815160405163cc92daa160e01b815263ffffffff9091166004820152602660248201526044016102bb565b5f805b60028110156106bf57610687816001611dc9565b610692906008611ddc565b61ffff168482815181106106a8576106a8611df3565b016020015160f81c901b9190911790600101610673565b5061ffff8116156106e95760405163407b587360e01b815261ffff821660048201526024016102bb565b5f805b600481101561074457610700816003611dc9565b61070b906008611ddc565b63ffffffff168561071d836002611e07565b8151811061072d5761072d611df3565b016020015160f81c901b91909117906001016106ec565b5063ffffffff81161561076a57604051635b60892f60e01b815260040160405180910390fd5b5f805b60208110156107bf5761078181601f611dc9565b61078c906008611ddc565b86610798836006611e07565b815181106107a8576107a8611df3565b016020015160f81c901b919091179060010161076d565b50949350505050565b5f805f83516036146107ff57835160405163cc92daa160e01b815263ffffffff9091166004820152603660248201526044016102bb565b5f805b600281101561084e57610816816001611dc9565b610821906008611ddc565b61ffff1686828151811061083757610837611df3565b016020015160f81c901b9190911790600101610802565b5061ffff8116156108785760405163407b587360e01b815261ffff821660048201526024016102bb565b5f805b60048110156108d35761088f816003611dc9565b61089a906008611ddc565b63ffffffff16876108ac836002611e07565b815181106108bc576108bc611df3565b016020015160f81c901b919091179060010161087b565b5063ffffffff81166003146108fb57604051635b60892f60e01b815260040160405180910390fd5b5f805b60208110156109505761091281601f611dc9565b61091d906008611ddc565b88610929836006611e07565b8151811061093957610939611df3565b016020015160f81c901b91909117906001016108fe565b505f805b60088110156109af57610968816007611dc9565b610973906008611ddc565b6001600160401b031689610988836026611e07565b8151811061099857610998611df3565b016020015160f81c901b9190911790600101610954565b505f805b6008811015610a0e576109c7816007611dc9565b6109d2906008611ddc565b6001600160401b03168a6109e783602e611e07565b815181106109f7576109f7611df3565b016020015160f81c901b91909117906001016109b3565b5091989097509095509350505050565b60605f80833560208501356014610a3a87870160408901611e1a565b610a476060890189611e33565b60405160f09790971b6001600160f01b0319166020880152602287019590955250604285019290925260e090811b6001600160e01b0319908116606286015260609290921b6bffffffffffffffffffffffff191660668501529190911b16607a820152607e0160405160208183030381529060405290505f5b610acd6060850185611e33565b9050811015610bf85781610ae46060860186611e33565b83818110610af457610af4611df3565b9050602002810190610b069190611e7f565b610b109080611e9d565b9050610b1f6060870187611e33565b84818110610b2f57610b2f611df3565b9050602002810190610b419190611e7f565b610b4b9080611e9d565b610b586060890189611e33565b86818110610b6857610b68611df3565b9050602002810190610b7a9190611e7f565b610b88906020810190611e9d565b610b9560608b018b611e33565b88818110610ba557610ba5611df3565b9050602002810190610bb79190611e7f565b610bc8906060810190604001611edf565b604051602001610bde9796959493929190611ef8565b60408051601f198184030181529190529150600101610ac0565b5092915050565b610c076117b1565b5f610c106117b1565b5f805b6002811015610c6e57610c27816001611dc9565b610c32906008611ddc565b61ffff1686610c4763ffffffff871684611e07565b81518110610c5757610c57611df3565b016020015160f81c901b9190911790600101610c13565b5061ffff811615610c985760405163407b587360e01b815261ffff821660048201526024016102bb565b610ca3600284611f61565b9250505f805b6004811015610d0857610cbd816003611dc9565b610cc8906008611ddc565b63ffffffff16868563ffffffff1683610ce19190611e07565b81518110610cf157610cf1611df3565b016020015160f81c901b9190911790600101610ca9565b5063ffffffff8116600114610d3057604051635b60892f60e01b815260040160405180910390fd5b610d3b600484611f61565b9250505f805b6020811015610d9857610d5581601f611dc9565b610d60906008611ddc565b86610d7163ffffffff871684611e07565b81518110610d8157610d81611df3565b016020015160f81c901b9190911790600101610d41565b50808252610da7602084611f61565b9250505f805b6004811015610e0c57610dc1816003611dc9565b610dcc906008611ddc565b63ffffffff16868563ffffffff1683610de59190611e07565b81518110610df557610df5611df3565b016020015160f81c901b9190911790600101610dad565b50610e18600484611f61565b92505f8163ffffffff166001600160401b03811115610e3957610e3961180b565b6040519080825280601f01601f191660200182016040528015610e63576020820181803683370190505b5090505f5b8263ffffffff16811015610ed25786610e8763ffffffff871683611e07565b81518110610e9757610e97611df3565b602001015160f81c60f81b828281518110610eb457610eb4611df3565b60200101906001600160f81b03191690815f1a905350600101610e68565b5060208301819052610ee48285611f61565b604080516030808252606082019092529195505f92506020820181803683370190505090505f5b6030811015610f705786610f2563ffffffff871683611e07565b81518110610f3557610f35611df3565b602001015160f81c60f81b828281518110610f5257610f52611df3565b60200101906001600160f81b03191690815f1a905350600101610f0b565b5060408301819052610f83603085611f61565b9350505f805b6008811015610fe957610f9d816007611dc9565b610fa8906008611ddc565b6001600160401b031687610fc263ffffffff881684611e07565b81518110610fd257610fd2611df3565b016020015160f81c901b9190911790600101610f89565b506001600160401b0381166060840152611004600885611f61565b9350505f805f5b600481101561106a5761101f816003611dc9565b61102a906008611ddc565b63ffffffff16888763ffffffff16836110439190611e07565b8151811061105357611053611df3565b016020015160f81c901b919091179060010161100b565b50611076600486611f61565b94505f5b60048110156110d95761108e816003611dc9565b611099906008611ddc565b63ffffffff16888763ffffffff16836110b29190611e07565b815181106110c2576110c2611df3565b016020015160f81c901b929092179160010161107a565b506110e5600486611f61565b94505f8263ffffffff166001600160401b038111156111065761110661180b565b60405190808252806020026020018201604052801561112f578160200160208202803683370190505b5090505f5b8363ffffffff16811015611217576040805160148082528183019092525f916020820181803683370190505090505f5b60148110156111c9578a61117e63ffffffff8b1683611e07565b8151811061118e5761118e611df3565b602001015160f81c60f81b8282815181106111ab576111ab611df3565b60200101906001600160f81b03191690815f1a905350600101611164565b505f60148201519050808484815181106111e5576111e5611df3565b6001600160a01b039092166020928302919091019091015261120860148a611f61565b98505050806001019050611134565b506040805180820190915263ffffffff9092168252602082015260808401525f80805b60048110156112995761124e816003611dc9565b611259906008611ddc565b63ffffffff16898863ffffffff16836112729190611e07565b8151811061128257611282611df3565b016020015160f81c901b919091179060010161123a565b506112a5600487611f61565b95505f5b6004811015611308576112bd816003611dc9565b6112c8906008611ddc565b63ffffffff16898863ffffffff16836112e19190611e07565b815181106112f1576112f1611df3565b016020015160f81c901b92909217916001016112a9565b50611314600487611f61565b95505f8263ffffffff166001600160401b038111156113355761133561180b565b60405190808252806020026020018201604052801561135e578160200160208202803683370190505b5090505f5b8363ffffffff16811015611446576040805160148082528183019092525f916020820181803683370190505090505f5b60148110156113f8578b6113ad63ffffffff8c1683611e07565b815181106113bd576113bd611df3565b602001015160f81c60f81b8282815181106113da576113da611df3565b60200101906001600160f81b03191690815f1a905350600101611393565b505f601482015190508084848151811061141457611414611df3565b6001600160a01b039092166020928302919091019091015261143760148b611f61565b99505050806001019050611363565b506040805180820190915263ffffffff9092168252602082015260a08501525f6114708284611f61565b61147b906014611f7e565b61148685607a611f61565b6114909190611f61565b90508063ffffffff168851146114cc57875160405163cc92daa160e01b815263ffffffff918216600482015290821660248201526044016102bb565b5f805b600881101561152f576114e3816007611dc9565b6114ee906008611ddc565b6001600160401b03168a61150863ffffffff8b1684611e07565b8151811061151857611518611df3565b016020015160f81c901b91909117906001016114cf565b506001600160401b031660c086015250929695505050505050565b6040515f6020820152600160e11b60228201526026810183905281151560f81b60468201526060906047015b60405160208183030381529060405290505b92915050565b6040515f602082018190526022820152602681018390526001600160c01b031960c083901b166046820152606090604e01611576565b5f60608260400151516030146115ed5760405163180ffa0d60e01b815260040160405180910390fd5b82516020808501518051604080880151606089015160808a01518051908701515193515f9861162e988a986001989297929690959094909390929101611fa6565b60405160208183030381529060405290505f5b846080015160200151518110156116a05781856080015160200151828151811061166d5761166d611df3565b6020026020010151604051602001611686929190612060565b60408051601f198184030181529190529150600101611641565b5060a08401518051602091820151516040516116c0938593929101612096565b60405160208183030381529060405290505f5b8460a00151602001515181101561173257818560a001516020015182815181106116ff576116ff611df3565b6020026020010151604051602001611718929190612060565b60408051601f1981840301815291905291506001016116d3565b5060c08401516040516117499183916020016120d1565b604051602081830303815290604052905060028160405161176a9190612102565b602060405180830381855afa158015611785573d5f803e3d5ffd5b5050506040513d601f19601f820116820180604052508101906117a89190612113565b94909350915050565b6040805160e0810182525f808252606060208084018290528385018290528184018390528451808601865283815280820183905260808501528451808601909552918452908301529060a082019081525f60209091015290565b634e487b7160e01b5f52604160045260245ffd5b604080519081016001600160401b03811182821017156118415761184161180b565b60405290565b60405160e081016001600160401b03811182821017156118415761184161180b565b604051601f8201601f191681016001600160401b03811182821017156118915761189161180b565b604052919050565b5f82601f8301126118a8575f80fd5b81356001600160401b038111156118c1576118c161180b565b6118d4601f8201601f1916602001611869565b8181528460208386010111156118e8575f80fd5b816020850160208301375f918101602001919091529392505050565b5f60208284031215611914575f80fd5b81356001600160401b03811115611929575f80fd5b61193584828501611899565b949350505050565b5f6020828403121561194d575f80fd5b5035919050565b5f5b8381101561196e578181015183820152602001611956565b50505f910152565b5f815180845261198d816020860160208601611954565b601f01601f19169290920160200192915050565b602081525f6119b36020830184611976565b9392505050565b80356001600160401b03811681146119d0575f80fd5b919050565b5f805f606084860312156119e7575f80fd5b833592506119f7602085016119ba565b9150611a05604085016119ba565b90509250925092565b5f60208284031215611a1e575f80fd5b81356001600160401b03811115611a33575f80fd5b8201608081850312156119b3575f80fd5b5f6040830163ffffffff8351168452602080840151604060208701528281518085526060880191506020830194505f92505b80831015611a9f5784516001600160a01b03168252938301936001929092019190830190611a76565b509695505050505050565b60208152815160208201525f602083015160e06040840152611ad0610100840182611976565b90506040840151601f1980858403016060860152611aee8383611976565b92506001600160401b03606087015116608086015260808601519150808584030160a0860152611b1e8383611a44565b925060a08601519150808584030160c086015250611b3c8282611a44565b91505060c0840151611b5960e08501826001600160401b03169052565b509392505050565b5f8060408385031215611b72575f80fd5b8235915060208301358015158114611b88575f80fd5b809150509250929050565b5f8060408385031215611ba4575f80fd5b82359150611bb4602084016119ba565b90509250929050565b80356001600160a01b03811681146119d0575f80fd5b5f60408284031215611be3575f80fd5b611beb61181f565b9050813563ffffffff81168114611c00575f80fd5b81526020828101356001600160401b0380821115611c1c575f80fd5b818501915085601f830112611c2f575f80fd5b813581811115611c4157611c4161180b565b8060051b9150611c52848301611869565b8181529183018401918481019088841115611c6b575f80fd5b938501935b83851015611c9057611c8185611bbd565b82529385019390850190611c70565b808688015250505050505092915050565b5f60208284031215611cb1575f80fd5b81356001600160401b0380821115611cc7575f80fd5b9083019060e08286031215611cda575f80fd5b611ce2611847565b82358152602083013582811115611cf7575f80fd5b611d0387828601611899565b602083015250604083013582811115611d1a575f80fd5b611d2687828601611899565b604083015250611d38606084016119ba565b6060820152608083013582811115611d4e575f80fd5b611d5a87828601611bd3565b60808301525060a083013582811115611d71575f80fd5b611d7d87828601611bd3565b60a083015250611d8f60c084016119ba565b60c082015295945050505050565b828152604060208201525f6119356040830184611976565b634e487b7160e01b5f52601160045260245ffd5b8181038181111561158857611588611db5565b808202811582820484141761158857611588611db5565b634e487b7160e01b5f52603260045260245ffd5b8082018082111561158857611588611db5565b5f60208284031215611e2a575f80fd5b6119b382611bbd565b5f808335601e19843603018112611e48575f80fd5b8301803591506001600160401b03821115611e61575f80fd5b6020019150600581901b3603821315611e78575f80fd5b9250929050565b5f8235605e19833603018112611e93575f80fd5b9190910192915050565b5f808335601e19843603018112611eb2575f80fd5b8301803591506001600160401b03821115611ecb575f80fd5b602001915036819003821315611e78575f80fd5b5f60208284031215611eef575f80fd5b6119b3826119ba565b5f8851611f09818460208d01611954565b60e089901b6001600160e01b031916908301908152868860048301378681019050600481015f8152858782375060c09390931b6001600160c01b0319166004939094019283019390935250600c019695505050505050565b63ffffffff818116838216019080821115610bf857610bf8611db5565b63ffffffff818116838216028082169190828114611f9e57611f9e611db5565b505092915050565b61ffff60f01b8a60f01b1681525f63ffffffff60e01b808b60e01b166002840152896006840152808960e01b166026840152508651611fec81602a850160208b01611954565b86519083019061200381602a840160208b01611954565b60c087901b6001600160c01b031916602a9290910191820152612035603282018660e01b6001600160e01b0319169052565b61204e603682018560e01b6001600160e01b0319169052565b603a019b9a5050505050505050505050565b5f8351612071818460208801611954565b60609390931b6bffffffffffffffffffffffff19169190920190815260140192915050565b5f84516120a7818460208901611954565b6001600160e01b031960e095861b8116919093019081529290931b16600482015260080192915050565b5f83516120e2818460208801611954565b60c09390931b6001600160c01b0319169190920190815260080192915050565b5f8251611e93818460208701611954565b5f60208284031215612123575f80fd5b505191905056fea2646970667358221220c0b30a7d1574f37fe27736317f68c07745760d3ce113e1505eb78f7757b3827064736f6c63430008190033", } // ValidatorMessagesABI is the input ABI used to generate the binding from. diff --git a/contracts/ictt/README.md b/contracts/ictt/README.md new file mode 100644 index 000000000..24875fd9b --- /dev/null +++ b/contracts/ictt/README.md @@ -0,0 +1,94 @@ +# Avalanche Interchain Token Transfer (ICTT) + +## Overview + +Avalanche Interchain Token Transfer (ICTT) is an application that allows users to transfer tokens between Subnets. The implementation is a set of smart contracts that are deployed across multiple Subnets, and leverages [Teleporter](https://github.com/ava-labs/teleporter) for cross-chain communication. + +Each token transferrer instance consists of one "home" contract and at least one but possibly many "remote" contracts. Each home contract instance manages one asset to be transferred out to `TokenRemote` instances. The home contract lives on the Subnet where the asset to be transferred exists. A transfer consists of locking the asset as collateral on the home Subnet and minting a representation of the asset on the remote Subnet. The remote contracts, each of which has a single specified home contract, live on other Subnets that want to import the asset transferred by their specified home. The token transferrers are designed to be permissionless: anyone can register compatible `TokenRemote` instances to allow for transferring tokens from the `TokenHome` instance to that new `TokenRemote` instance. The home contract keeps track of token balances transferred to each `TokenRemote` instance, and handles returning the original tokens back to the user when assets are transferred back to the `TokenHome` instance. `TokenRemote` instances are registered with their home contract via a Teleporter message upon creation. + +Home contract instances specify the asset to be transferred as either an ERC20 token or the native token, and they allow for transferring the token to any registered `TokenRemote` instances. The token representation on the remote chain can also either be an ERC20 or native token, allowing users to have any combination of ERC20 and native tokens between home and remote chains: + +- `ERC20` -> `ERC20` +- `ERC20` -> `Native` +- `Native` -> `ERC20` +- `Native` -> `Native` + +The remote tokens are designed to have compatibility with the token transferrer on the home chain by default, and they allow custom logic to be implemented in addition. For example, developers can inherit and extend the `ERC20TokenRemote` contract to add additional functionality, such as a custom minting, burning, or transfer logic. + +The token transferrer also supports "multi-hop" transfers, where tokens can be transferred between remote chains. To illustrate, consider two remotes _Ra_ and _Rb_ that are both connected to the same home _H_. A multi-hop transfer from _Ra_ to _Rb_ first gets routed from _Ra_ to _H_, where remote balances are updated, and then _H_ automatically routes the transfer on to _Rb_. + +In addition to supporting basic token transfers, the token transferrer contracts offer a `sendAndCall` interface for transferring tokens and using them in a smart contract interaction all within a single Teleporter message. If the call to the recipient smart contract fails, the transferred tokens are sent to a fallback recipient address on the destination chain of the transfer. The `sendAndCall` interface enables the direct use of transferred tokens in dApps on other chains, such as performing swaps, using the tokens to pay for fees when invoking services, etc. + +A breakdown of the structure of the contracts that implement this function can be found under `./contracts` [here](./contracts/README.md). + +## Audits + +Some contracts in this repository have been audited. The `main` branch may contain unaudited code. Please check [here](./audits/README.md) for which versions of each contract have been audited. +DO NOT USE UN-AUDITED CODE IN PRODUCTION! + +## Upgradability + +The token transferrer contracts implement both upgradeable and non-upgradeable versions. The non-upgradeable versions are extensions of their respective upgradeable token transferrer contract, and has a `constructor` that calls the `initialize` function of the upgradeable version. The upgradeable contracts are ERC7201 compliant, and use namespace storage to store the state of the contract. + +## `ITokenTransferrer` + +Interface that defines the events token transfer contract implementations must emit. Also defines the message types and formats of messages between all implementations. + +## `IERC20TokenTransferrer` and `INativeTokenTransferrer` + +Interfaces that define the external functions for interacting with token transfer contract implementations of each type. ERC20 and native token transferrer interfaces vary from each other in that the native token transferrer functions are `payable` and do not take an explicit amount parameter (it is implied by `msg.value`), while the ERC20 token transferrer functions are not `payable` and require the explicit amount parameter. Otherwise, they include the same functions. + +## `TokenHome` + +An abstract implementation of `ITokenTransferrer` for a token transfer contract on the "home" chain with the asset to be transferred. Each `TokenHome` instance supports transferring exactly one token type (ERC20 or native) on its chain to arbitrarily many "remote" instances on other chains. It handles locking tokens to be sent to `TokenRemote` instances, as well as receiving token transfer messages to either redeem tokens it holds as collateral (i.e. unlock), or route them to other `TokenRemote` instances (i.e. "multi-hop"). In the case of a multi-hop transfer, the `TokenHome` already has the collateral locked from when the tokens were originally transferred to the first `TokenRemote` instance, so it simply updates the accounting of the transferred balances to each respective `TokenRemote` instance. Remote contracts must first be registered with a `TokenHome` instance before the home contract will allow for sending tokens to them. This is to prevent tokens from being transferred to invalid remote addresses. Anyone is able to deploy and register remote contracts, which may have been modified from this repository. It is the responsibility of the users of the home contract to independently evaluate each remote for its security and correctness. + +## `ERC20TokenHome` + +A concrete implementation of `TokenHome` and `IERC20TokenTransferrer` that handles the locking and releasing of an ERC20 token. + +## `NativeTokenHome` + +A concrete implementation of `TokenHome` and `INativeTokenTransferrer` that handles the locking and release of the native EVM asset. + +## `TokenRemote` + +An abstract implementation of `ITokenTransferrer` for a token transfer contract on a "remote" chain that receives transferred assets from a specific `TokenHome` instance. Each `TokenRemote` instance has a single `TokenHome` instance that it receives token transfers from to mint tokens. It also handles sending messages (and correspondingly burning tokens) to route tokens back to other chains (either its `TokenHome`, or other `TokenRemote` instances). Once deployed, a `TokenRemote` instance must be registered with its specified `TokenHome` contract. This is done by calling `registerWithHome` on the remote contract, which will send a Teleporter message to the home contract with the information to register. + +All messages sent by `TokenRemote` instances are sent to the specified `TokenHome` contract, whether they are to redeem the collateral from the `TokenHome` instance or route the tokens to another `TokenRemote` instance. Routing tokens from one `TokenRemote` instance to another is referred to as a "multi-hop", where the tokens are first sent back to their `TokenHome` contract to update its accounting, and then automatically routed on to their intended destination `TokenRemote` instance. + +TokenRemote contracts allow for scaling token amounts, which should be used when the remote asset has a higher or lower denomination than the home asset, such as allowing for a ERC20 home asset with a denomination of 6 to be used as the native EVM asset on a remote chain (with a denomination of 18). + +## `ERC20TokenRemote` + +A concrete implementation of `TokenRemote`, `IERC20TokenTransferrer`, and `IERC20` that handles the minting and burning of an ERC20 asset. Note that the `ERC20TokenRemote` contract is an ERC20 implementation itself, which is why it takes the `tokenName`, `tokenSymbol`, and `tokenDecimals` in its constructor. All of the ERC20 interface implementations are inherited from the standard OpenZeppelin ERC20 implementation, and can be overriden in other implementations if desired. + +## `NativeTokenRemote` + +A concrete implementation of `TokenRemote`, `INativeTokenTransferrer`, and `IWrappedNativeToken` that handles the minting and burning of the native EVM asset on its chain using the native minter precompile. Deployments of this contract must be given the permission to mint native coins in the chain's configuration. Note that the `NativeTokenRemote` is also an implementation of `IWrappedNativeToken` itself, which is why the `nativeAssetSymbol` must be provided in its constructor. `NativeTokenRemote` instances always have a denomination of 18, which is the denomination of the native asset of EVM chains. + +The [native minter precompile](https://docs.avax.network/build/subnet/upgrade/customize-a-subnet#minting-native-coins) must be configured to allow the contract address of the `NativeTokenRemote` instance to call `mintNativeCoin`. The correctness of a native token transferrer implemented using `NativeTokenRemote` relies on no other accounts being allowed to call `mintNativeCoin`, which could result in the token transferrer becoming undercollateralized. Example initialization steps for a `NativeTokenRemote` instance are shown below. + +Since the native minter precompile does not provide an interface for burning the native EVM asset, the "burn" functionality is implemented by transferring the native coins to an unowned address. The contract also provides a `reportBurnedTxFees` interface in order to burn the collateral in the `TokenHome` instance that should be made unredeemable to account for native tokens burnt on the chain with the `NativeTokenRemote` instance to pay for transaction fees. + +To account for the need to bootstrap the chain using a transferred asset as its native token, the `NativeTokenRemote` takes the `initialReserveImbalance` in its constructor. Once registered with its `TokenHome`, the `TokenHome` will require the `initialReserveImbalance` to be accounted for before sending token amounts to be minted on the given remote chain. The following example demonstrates the intended initialization flow: + +1. Create a new blockchain with 100 native tokens allocated in its genesis block, and set the pre-derived `NativeTokenRemote` contract address (based on the deployer nonce) to have the permission to mint native tokens using the native minter precompile. Note that the deployer account will need to be funded in order to deploy the `NativeTokenRemote` contract, and an account used to relay messages into this chain must also be funded to relay the first messages. +2. Deploy the `NativeTokenRemote` contract to the pre-derived address set in the blockchain configuration of step 1. The `initialReserveImbalance` should be 100, matching the number of tokens allocated in the genesis block that were not initially backed by collateral in the `TokenHome` instance. +3. Call the `registerWithHome` function on the `NativeTokenRemote` instance to send a Teleporter message registering this remote with its `TokenHome`. This message should be relayed and delivered to the `TokenHome` instance. +4. Once registered on the `TokenHome` contract, add 100 tokens as collateral for the new `NativeTokenRemote` instance by calling the `addCollateral` function on the `TokenHome` contract. A `CollateralAdded` event will be emitted by the `TokenHome` contract with a `remaining` amount of 0 once the `NativeTokenRemote` is fully collateralized. +5. Now that the `NativeTokenRemote` contract is fully collateralized, tokens can be moved normally in both directions across the token transfer contracts by calling their `send` functions. + +The `totalNativeAssetSupply` implementation of `NativeTokenRemote` takes into account: + +- the initial reserve imbalance +- the number of native tokens that it has minted +- the number of native tokens that have been burned to pay for transaction fees +- the number of native tokens "burned" to be transferred to other chains, which are sent to a pre-defined `BURNED_FOR_TRANSFER_ADDRESS`. + +Note that the value returned by `totalNativeAssetSupply` is an upper bound on the circulating supply of the native asset on the chain using the `NativeTokenRemote` instance since tokens could be burned in other ways that it does not account for. + +## Teleporter Message Fees + +Fees can be optionally added to Teleporter messages in order to incentivize relayers to deliver them, as documented [here](https://github.com/ava-labs/teleporter/tree/main/contracts/teleporter#fees). The token transfer contracts in this repository allow for specifying any ERC20 token and amount to be used as the Teleporter message fee for single-hop transfers in either direction between `TokenHome` and `TokenRemote` instances. Fee amounts must be pre-approved to be spent by the token transfer contract before initiating a transfer. + +Multi-hop transfers between two `TokenRemote` instances involve two Teleporter messages: the first from the initiating `TokenRemote` instance to its home, and the second from its home to the destination `TokenRemote` instance. In the multi-hop case, the first message fee can be paid in any ERC20 token and amount (similar to the single-hop case), but the second message fee must be paid in-kind of the asset being transferred and is deducted from the amount being transferred. This restriction on the secondary message fee is necessary because the transaction on the intermediate chain routing the funds to the destination `TokenRemote` instance is not sent by the wallet performing the transfer. Because of this, it can not directly spend an arbitrary ERC20 token from that wallet. Using the asset being transferred for the optional secondary fee allows users to perform an incentivized multi-hop transfer without needing to make any interaction with the home themselves. If there is a need for the second message from the home to the destination `TokenRemote` instance to pay a fee in another asset, it is recommended to perform two single-hop transfers, which allows for specifying an arbitrary ERC20 token to be used for the fee of each. diff --git a/contracts/ictt/TokenHome/ERC20TokenHome.sol b/contracts/ictt/TokenHome/ERC20TokenHome.sol new file mode 100644 index 000000000..447f3a16f --- /dev/null +++ b/contracts/ictt/TokenHome/ERC20TokenHome.sol @@ -0,0 +1,32 @@ +// (c) 2024, Ava Labs, Inc. All rights reserved. +// See the file LICENSE for licensing terms. + +// SPDX-License-Identifier: Ecosystem + +pragma solidity 0.8.25; + +import {ERC20TokenHomeUpgradeable} from "./ERC20TokenHomeUpgradeable.sol"; +import {ICMInitializable} from "@utilities/ICMInitializable.sol"; + +/** + * @title ERC20TokenHome + * @notice A non-upgradeable version of {ERC20TokenHomeUpgradeable} that calls the parent upgradeable contract's initialize function. + * @custom:security-contact https://github.com/ava-labs/teleporter/blob/main/SECURITY.md + */ +contract ERC20TokenHome is ERC20TokenHomeUpgradeable { + constructor( + address teleporterRegistryAddress, + address teleporterManager, + uint256 minTeleporterVersion, + address tokenAddress, + uint8 tokenDecimals + ) ERC20TokenHomeUpgradeable(ICMInitializable.Allowed) { + initialize( + teleporterRegistryAddress, + teleporterManager, + minTeleporterVersion, + tokenAddress, + tokenDecimals + ); + } +} diff --git a/contracts/ictt/TokenHome/ERC20TokenHomeUpgradeable.sol b/contracts/ictt/TokenHome/ERC20TokenHomeUpgradeable.sol new file mode 100644 index 000000000..54e08f9ee --- /dev/null +++ b/contracts/ictt/TokenHome/ERC20TokenHomeUpgradeable.sol @@ -0,0 +1,215 @@ +// (c) 2024, Ava Labs, Inc. All rights reserved. +// See the file LICENSE for licensing terms. + +// SPDX-License-Identifier: Ecosystem + +pragma solidity 0.8.25; + +import {TokenHome} from "./TokenHome.sol"; +import {IERC20TokenHome} from "./interfaces/IERC20TokenHome.sol"; +import {IERC20SendAndCallReceiver} from "../interfaces/IERC20SendAndCallReceiver.sol"; +import { + SendTokensInput, + SendAndCallInput, + SingleHopCallMessage +} from "../interfaces/ITokenTransferrer.sol"; +import {IERC20} from "@openzeppelin/contracts@5.0.2/token/ERC20/ERC20.sol"; +import {SafeERC20} from "@openzeppelin/contracts@5.0.2/token/ERC20/utils/SafeERC20.sol"; +import {SafeERC20TransferFrom} from "@utilities/SafeERC20TransferFrom.sol"; +import {CallUtils} from "@utilities/CallUtils.sol"; +import {ICMInitializable} from "@utilities/ICMInitializable.sol"; + +/** + * @title ERC20TokenHomeUpgradeable + * @notice An {IERC20TokenHome} implementation that locks a specified ERC20 token to be sent to + * TokenRemote instances on other chains. + * @custom:security-contact https://github.com/ava-labs/teleporter/blob/main/SECURITY.md + */ +contract ERC20TokenHomeUpgradeable is IERC20TokenHome, TokenHome { + using SafeERC20 for IERC20; + + // solhint-disable private-vars-leading-underscore + /** + * @dev Namespace storage slots following the ERC-7201 standard to prevent + * storage collisions between upgradeable contracts. + * + * @custom:storage-location erc7201:avalanche-ictt.storage.ERC20TokenHome + */ + struct ERC20TokenHomeStorage { + /// @notice The ERC20 token this home contract transfers to TokenRemote instances. + IERC20 _token; + } + // solhint-enable private-vars-leading-underscore + + /** + * @dev Storage slot computed based off ERC-7201 formula + * keccak256(abi.encode(uint256(keccak256("avalanche-ictt.storage.ERC20TokenHome")) - 1)) & ~bytes32(uint256(0xff)); + */ + bytes32 public constant ERC20_TOKEN_HOME_STORAGE_LOCATION = + 0x914a9547f6c3ddce1d5efbd9e687708f0d1d408ce129e8e1a88bce4f40e29500; + + // solhint-disable ordering + function _getERC20TokenHomeStorage() private pure returns (ERC20TokenHomeStorage storage $) { + // solhint-disable-next-line no-inline-assembly + assembly { + $.slot := ERC20_TOKEN_HOME_STORAGE_LOCATION + } + } + + constructor(ICMInitializable init) { + if (init == ICMInitializable.Disallowed) { + _disableInitializers(); + } + } + + /** + * @notice Initializes the token TokenHome instance to send ERC20 tokens to TokenRemote instances on other chains. + * @param teleporterRegistryAddress The current blockchain ID's Teleporter registry + * address. See here for details: https://github.com/ava-labs/teleporter/tree/main/contracts/teleporter/registry + * @param teleporterManager Address that manages this contract's integration with the + * Teleporter registry and Teleporter versions. + * @param minTeleporterVersion Minimum Teleporter version supported by this contract. + * @param tokenAddress The ERC20 token contract address to be transferred by the home. + * @param tokenDecimals The number of decimals for the ERC20 token + */ + function initialize( + address teleporterRegistryAddress, + address teleporterManager, + uint256 minTeleporterVersion, + address tokenAddress, + uint8 tokenDecimals + ) public initializer { + __ERC20TokenHome_init( + teleporterRegistryAddress, + teleporterManager, + minTeleporterVersion, + tokenAddress, + tokenDecimals + ); + } + + // solhint-disable-next-line func-name-mixedcase + function __ERC20TokenHome_init( + address teleporterRegistryAddress, + address teleporterManager, + uint256 minTeleporterVersion, + address tokenAddress, + uint8 tokenDecimals + ) internal onlyInitializing { + __TokenHome_init( + teleporterRegistryAddress, + teleporterManager, + minTeleporterVersion, + tokenAddress, + tokenDecimals + ); + __ERC20TokenHome_init_unchained(tokenAddress); + } + + // solhint-disable-next-line func-name-mixedcase + function __ERC20TokenHome_init_unchained(address tokenAddress) internal onlyInitializing { + _getERC20TokenHomeStorage()._token = IERC20(tokenAddress); + } + // solhint-enable ordering + + /** + * @dev See {IERC20TokenTransferrer-send} + */ + function send(SendTokensInput calldata input, uint256 amount) external { + _send(input, amount); + } + + /** + * @dev See {IERC20TokenTransferrer-sendAndCall} + */ + function sendAndCall(SendAndCallInput calldata input, uint256 amount) external { + _sendAndCall({ + sourceBlockchainID: getBlockchainID(), + originTokenTransferrerAddress: address(this), + originSenderAddress: _msgSender(), + input: input, + amount: amount + }); + } + + /** + * @dev See {IERC20TokenHome-addCollateral} + */ + function addCollateral( + bytes32 remoteBlockchainID, + address remoteTokenTransferrerAddress, + uint256 amount + ) external { + _addCollateral(remoteBlockchainID, remoteTokenTransferrerAddress, amount); + } + + /** + * @dev See {TokenHome-_deposit} + */ + function _deposit(uint256 amount) internal virtual override returns (uint256) { + ERC20TokenHomeStorage storage $ = _getERC20TokenHomeStorage(); + return SafeERC20TransferFrom.safeTransferFrom($._token, _msgSender(), amount); + } + + /** + * @dev See {TokenHome-_withdraw} + */ + function _withdraw(address recipient, uint256 amount) internal virtual override { + ERC20TokenHomeStorage storage $ = _getERC20TokenHomeStorage(); + emit TokensWithdrawn(recipient, amount); + $._token.safeTransfer(recipient, amount); + } + + /** + * @dev See {TokenHome-_handleSendAndCall} + * + * Approves the recipient contract to spend the amount of tokens from this contract, + * and calls {IERC20SendAndCallReceiver-receiveTokens} on the recipient contract. + * If the call fails or doesn't spend all of the tokens, the remaining amount is + * sent to the fallback recipient. + */ + function _handleSendAndCall( + SingleHopCallMessage memory message, + uint256 amount + ) internal virtual override { + ERC20TokenHomeStorage storage $ = _getERC20TokenHomeStorage(); + IERC20 token = $._token; + // Approve the recipient contract to spend the amount from the collateral. + SafeERC20.safeIncreaseAllowance($._token, message.recipientContract, amount); + + // Encode the call to {IERC20SendAndCallReceiver-receiveTokens} + bytes memory payload = abi.encodeCall( + IERC20SendAndCallReceiver.receiveTokens, + ( + message.sourceBlockchainID, + message.originTokenTransferrerAddress, + message.originSenderAddress, + address(token), + amount, + message.recipientPayload + ) + ); + + // Call the recipient contract with the given payload and gas amount. + bool success = CallUtils._callWithExactGas( + message.recipientGasLimit, message.recipientContract, payload + ); + + uint256 remainingAllowance = token.allowance(address(this), message.recipientContract); + + // Reset the recipient contract allowance to 0. + SafeERC20.forceApprove(token, message.recipientContract, 0); + + if (success) { + emit CallSucceeded(message.recipientContract, amount); + } else { + emit CallFailed(message.recipientContract, amount); + } + + // Transfer any remaining allowance to the fallback recipient. This will be the + // full amount if the call failed. + if (remainingAllowance > 0) { + token.safeTransfer(message.fallbackRecipient, remainingAllowance); + } + } +} diff --git a/contracts/ictt/TokenHome/NativeTokenHome.sol b/contracts/ictt/TokenHome/NativeTokenHome.sol new file mode 100644 index 000000000..574b22c67 --- /dev/null +++ b/contracts/ictt/TokenHome/NativeTokenHome.sol @@ -0,0 +1,27 @@ +// (c) 2024, Ava Labs, Inc. All rights reserved. +// See the file LICENSE for licensing terms. + +// SPDX-License-Identifier: Ecosystem + +pragma solidity 0.8.25; + +import {NativeTokenHomeUpgradeable} from "./NativeTokenHomeUpgradeable.sol"; +import {ICMInitializable} from "@utilities/ICMInitializable.sol"; + +/** + * @title NativeTokenHome + * @notice A non-upgradeable version of {NativeTokenHomeUpgradeable} that calls the parent upgradeable contract's initialize function. + * @custom:security-contact https://github.com/ava-labs/teleporter/blob/main/SECURITY.md + */ +contract NativeTokenHome is NativeTokenHomeUpgradeable { + constructor( + address teleporterRegistryAddress, + address teleporterManager, + uint256 minTeleporterVersion, + address wrappedTokenAddress + ) NativeTokenHomeUpgradeable(ICMInitializable.Allowed) { + initialize( + teleporterRegistryAddress, teleporterManager, minTeleporterVersion, wrappedTokenAddress + ); + } +} diff --git a/contracts/ictt/TokenHome/NativeTokenHomeUpgradeable.sol b/contracts/ictt/TokenHome/NativeTokenHomeUpgradeable.sol new file mode 100644 index 000000000..9ad999984 --- /dev/null +++ b/contracts/ictt/TokenHome/NativeTokenHomeUpgradeable.sol @@ -0,0 +1,217 @@ +// (c) 2024, Ava Labs, Inc. All rights reserved. +// See the file LICENSE for licensing terms. + +// SPDX-License-Identifier: Ecosystem + +pragma solidity 0.8.25; + +import {TokenHome} from "./TokenHome.sol"; +import {INativeTokenHome} from "./interfaces/INativeTokenHome.sol"; +import {INativeSendAndCallReceiver} from "../interfaces/INativeSendAndCallReceiver.sol"; +import { + SendTokensInput, + SendAndCallInput, + SingleHopCallMessage +} from "../interfaces/ITokenTransferrer.sol"; +import {IWrappedNativeToken} from "../interfaces/IWrappedNativeToken.sol"; +import {CallUtils} from "@utilities/CallUtils.sol"; +import {SafeWrappedNativeTokenDeposit} from "@utilities/SafeWrappedNativeTokenDeposit.sol"; +import {Address} from "@openzeppelin/contracts@5.0.2/utils/Address.sol"; +import {ICMInitializable} from "@utilities/ICMInitializable.sol"; + +/** + * @title NativeTokenHomeUpgradeable + * @notice An {INativeTokenHome} implementation that locks the native token of this chain to be transferred to + * TokenRemote instances on other chains. + * @custom:security-contact https://github.com/ava-labs/teleporter/blob/main/SECURITY.md + */ +contract NativeTokenHomeUpgradeable is INativeTokenHome, TokenHome { + using Address for address payable; + + // solhint-disable private-vars-leading-underscore + /** + * @dev Namespace storage slots following the ERC-7201 standard to prevent + * storage collisions between upgradeable contracts. + * + * @custom:storage-location erc7201:avalanche-ictt.storage.NativeTokenHome + */ + struct NativeTokenHomeStorage { + /** + * @notice The wrapped native token contract that represents the native tokens on this chain. + */ + IWrappedNativeToken _wrappedToken; + } + // solhint-enable private-vars-leading-underscore + + /** + * @dev Storage slot computed based off ERC-7201 formula + * keccak256(abi.encode(uint256(keccak256("avalanche-ictt.storage.NativeTokenHome")) - 1)) & ~bytes32(uint256(0xff)); + */ + bytes32 public constant NATIVE_TOKEN_HOME_STORAGE_LOCATION = + 0x3b5030f10c94fcbdaa3022348ff0b82dbd4c0c71339e41ff59d0bdc92179d600; + + // solhint-disable ordering + function _getNativeTokenHomeStorage() private pure returns (NativeTokenHomeStorage storage $) { + // solhint-disable-next-line no-inline-assembly + assembly { + $.slot := NATIVE_TOKEN_HOME_STORAGE_LOCATION + } + } + + constructor(ICMInitializable init) { + if (init == ICMInitializable.Disallowed) { + _disableInitializers(); + } + } + + /** + * @notice Initializes this token TokenHome instance to send native tokens to TokenRemote instances on other chains. + * Always uses a {tokenDecimals} value of 18 since it is the denomination of the native token of EVM instances. + * @param teleporterRegistryAddress The current blockchain ID's Teleporter registry + * address. See here for details: https://github.com/ava-labs/teleporter/tree/main/contracts/teleporter/registry + * @param teleporterManager Address that manages this contract's integration with the + * Teleporter registry and Teleporter versions. + * @param minTeleporterVersion Minimum Teleporter version supported by this contract. + * @param wrappedTokenAddress The wrapped native token contract address of the native asset + * to be transferred to TokenRemote instances. + */ + function initialize( + address teleporterRegistryAddress, + address teleporterManager, + uint256 minTeleporterVersion, + address wrappedTokenAddress + ) public initializer { + __NativeTokenHome_init( + teleporterRegistryAddress, teleporterManager, minTeleporterVersion, wrappedTokenAddress + ); + } + + // solhint-disable-next-line func-name-mixedcase + function __NativeTokenHome_init( + address teleporterRegistryAddress, + address teleporterManager, + uint256 minTeleporterVersion, + address wrappedTokenAddress + ) internal onlyInitializing { + __TokenHome_init( + teleporterRegistryAddress, + teleporterManager, + minTeleporterVersion, + wrappedTokenAddress, + 18 + ); + __NativeTokenHome_init_unchained(wrappedTokenAddress); + } + + // solhint-disable-next-line func-name-mixedcase + function __NativeTokenHome_init_unchained(address wrappedTokenAddress) + internal + onlyInitializing + { + _getNativeTokenHomeStorage()._wrappedToken = IWrappedNativeToken(wrappedTokenAddress); + } + // solhint-enable ordering + + /** + * @notice Receives native tokens transferred to this contract. + * @dev This function is called when the token transferrer is withdrawing native tokens to + * transfer to the recipient. The caller must be the wrapped native token contract. + */ + receive() external payable { + // The caller here is expected to be {tokenAddress} directly, and not through a meta-transaction, + // so we check for `msg.sender` instead of `_msgSender()`. + require(msg.sender == getTokenAddress(), "NativeTokenHome: invalid receive payable sender"); + } + + /** + * @dev See {INativeTokenTransferrer-send} + */ + function send(SendTokensInput calldata input) external payable { + _send(input, msg.value); + } + + /** + * @dev See {INativeTokenTransferrer-sendAndCall} + */ + function sendAndCall(SendAndCallInput calldata input) external payable { + _sendAndCall({ + sourceBlockchainID: getBlockchainID(), + originTokenTransferrerAddress: address(this), + originSenderAddress: _msgSender(), + input: input, + amount: msg.value + }); + } + + /** + * @dev See {INativeTokenHome-addCollateral} + */ + function addCollateral( + bytes32 remoteBlockchainID, + address remoteTokenTransferrerAddress + ) external payable { + _addCollateral(remoteBlockchainID, remoteTokenTransferrerAddress, msg.value); + } + + /** + * @dev See {TokenHome-_deposit} + * Deposits the native tokens sent to this contract + */ + function _deposit(uint256 amount) internal virtual override returns (uint256) { + NativeTokenHomeStorage storage $ = _getNativeTokenHomeStorage(); + return SafeWrappedNativeTokenDeposit.safeDeposit($._wrappedToken, amount); + } + + /** + * @dev See {TokenHome-_withdraw} + * Withdraws the wrapped tokens for native tokens, + * and sends them to the recipient. + */ + function _withdraw(address recipient, uint256 amount) internal virtual override { + NativeTokenHomeStorage storage $ = _getNativeTokenHomeStorage(); + emit TokensWithdrawn(recipient, amount); + $._wrappedToken.withdraw(amount); + payable(recipient).sendValue(amount); + } + + /** + * @dev See {TokenHome-_handleSendAndCall} + * + * Send the native tokens to the recipient contract as a part of the call to + * {INativeSendAndCallReceiver-receiveTokens} on the recipient contract. + * If the call fails or doesn't spend all of the tokens, the remaining amount is + * sent to the fallback recipient. + */ + function _handleSendAndCall( + SingleHopCallMessage memory message, + uint256 amount + ) internal virtual override { + NativeTokenHomeStorage storage $ = _getNativeTokenHomeStorage(); + // Withdraw the native token from the wrapped native token contract. + $._wrappedToken.withdraw(amount); + + // Encode the call to {INativeSendAndCallReceiver-receiveTokens} + bytes memory payload = abi.encodeCall( + INativeSendAndCallReceiver.receiveTokens, + ( + message.sourceBlockchainID, + message.originTokenTransferrerAddress, + message.originSenderAddress, + message.recipientPayload + ) + ); + + // Call the recipient contract with the given payload, gas amount, and value. + bool success = CallUtils._callWithExactGasAndValue( + message.recipientGasLimit, amount, message.recipientContract, payload + ); + + // If the call failed, send the funds to the fallback recipient. + if (success) { + emit CallSucceeded(message.recipientContract, amount); + } else { + emit CallFailed(message.recipientContract, amount); + payable(message.fallbackRecipient).sendValue(amount); + } + } +} diff --git a/contracts/ictt/TokenHome/TokenHome.sol b/contracts/ictt/TokenHome/TokenHome.sol new file mode 100644 index 000000000..b6d1c945d --- /dev/null +++ b/contracts/ictt/TokenHome/TokenHome.sol @@ -0,0 +1,818 @@ +// (c) 2024, Ava Labs, Inc. All rights reserved. +// See the file LICENSE for licensing terms. + +// SPDX-License-Identifier: Ecosystem + +pragma solidity 0.8.25; + +import {TeleporterMessageInput, TeleporterFeeInfo} from "@teleporter/ITeleporterMessenger.sol"; +import {TeleporterRegistryOwnableAppUpgradeable} from + "@teleporter/registry/TeleporterRegistryOwnableAppUpgradeable.sol"; +import {ITokenHome, RemoteTokenTransferrerSettings} from "./interfaces/ITokenHome.sol"; +import { + SendTokensInput, + SendAndCallInput, + TransferrerMessageType, + TransferrerMessage, + SingleHopSendMessage, + SingleHopCallMessage, + MultiHopSendMessage, + MultiHopCallMessage, + RegisterRemoteMessage +} from "../interfaces/ITokenTransferrer.sol"; +import {SendReentrancyGuardUpgradeable} from "@utilities/SendReentrancyGuardUpgradeable.sol"; +import {TokenScalingUtils} from "@utilities/TokenScalingUtils.sol"; +import {SafeERC20TransferFrom} from "@utilities/SafeERC20TransferFrom.sol"; +import {IWarpMessenger} from + "@avalabs/subnet-evm-contracts@1.2.0/contracts/interfaces/IWarpMessenger.sol"; +import {IERC20} from "@openzeppelin/contracts@5.0.2/token/ERC20/ERC20.sol"; + +/** + * @title TokenHome + * @dev Abstract contract for a token transferrer home that sends its specified token to {TokenRemote} instances. + * + * This contract also handles multi-hop transfers, where tokens sent from a {TokenRemote} + * instance are forwarded to another {TokenRemote} instance. + * + * @custom:security-contact https://github.com/ava-labs/teleporter/blob/main/SECURITY.md + */ +abstract contract TokenHome is + ITokenHome, + TeleporterRegistryOwnableAppUpgradeable, + SendReentrancyGuardUpgradeable +{ + // solhint-disable private-vars-leading-underscore + /** + * @dev Namespace storage slots following the ERC-7201 standard to prevent + * storage collisions between upgradeable contracts. + * + * @custom:storage-location erc7201:avalanche-ictt.storage.TokenHome + */ + struct TokenHomeStorage { + /// @notice The blockchain ID of the chain this contract is deployed on. + bytes32 _blockchainID; + /** + * @notice The token address this home contract transfers to TokenRemote instances. + * For multi-hop transfers, this {tokenAddress} is always used to pay for the secondary message fees. + * If the token is an ERC20 token, the contract address is directly passed in. + * If the token is a native asset, the contract address is the wrapped token contract. + */ + address _tokenAddress; + uint8 _tokenDecimals; + /** + * @notice Tracks the settings for each remote token transferrer instance. TokenRemote instances + * must register with their {TokenHome} contracts via Teleporter message to be able to + * receive tokens from this contract. + */ + mapping( + bytes32 remoteBlockchainID + => mapping( + address remoteTokenTransferrerAddress + => RemoteTokenTransferrerSettings remoteSettings + ) + ) _registeredRemotes; + /** + * @notice Tracks the balances of tokens sent to TokenRemote instances. + * Balances are represented in the remote token's denomination, + * and token transferrers are not allowed to unwrap more than has been sent to them. + * @dev (remoteBlockchainID, remoteTokenTransferrerAddress) -> balance + */ + mapping( + bytes32 remoteBlockchainID + => mapping(address remoteTokenTransferrerAddress => uint256 balance) + ) _transferredBalances; + } + // solhint-enable private-vars-leading-underscore + + /** + * @dev Storage slot computed based off ERC-7201 formula + * keccak256(abi.encode(uint256(keccak256("avalanche-ictt.storage.TokenHome")) - 1)) & ~bytes32(uint256(0xff)); + */ + bytes32 public constant TOKEN_HOME_STORAGE_LOCATION = + 0x9316912b5a9db88acbe872c934fdd0a46c436c6dcba332d649c4d57c7bc9e600; + + // solhint-disable ordering + function _getTokenHomeStorage() private pure returns (TokenHomeStorage storage $) { + // solhint-disable-next-line no-inline-assembly + assembly { + $.slot := TOKEN_HOME_STORAGE_LOCATION + } + } + + /** + * @notice Initializes this home token transferrer instance to send tokens to TokenRemote instances on other chains. + * @param teleporterRegistryAddress The address of the TeleporterRegistry contract. + * @param teleporterManager Address that manages this contract's integration with the + * Teleporter registry and Teleporter versions. + * @param minTeleporterVersion Minimum Teleporter version supported by this contract. + * @param tokenAddress The token contract address to be transferredd by the home instance. + * @param tokenDecimals The number of decimals for the token being transferred. + */ + // solhint-disable-next-line func-name-mixedcase + function __TokenHome_init( + address teleporterRegistryAddress, + address teleporterManager, + uint256 minTeleporterVersion, + address tokenAddress, + uint8 tokenDecimals + ) internal virtual onlyInitializing { + __TeleporterRegistryOwnableApp_init( + teleporterRegistryAddress, teleporterManager, minTeleporterVersion + ); + __SendReentrancyGuard_init(); + __TokenHome_init_unchained(tokenAddress, tokenDecimals); + } + + // solhint-disable-next-line func-name-mixedcase + function __TokenHome_init_unchained( + address tokenAddress, + uint8 tokenDecimals + ) internal onlyInitializing { + require(tokenAddress != address(0), "TokenHome: zero token address"); + require( + tokenDecimals <= TokenScalingUtils.MAX_TOKEN_DECIMALS, + "TokenHome: token decimals too high" + ); + TokenHomeStorage storage $ = _getTokenHomeStorage(); + $._blockchainID = + IWarpMessenger(0x0200000000000000000000000000000000000005).getBlockchainID(); + $._tokenAddress = tokenAddress; + $._tokenDecimals = tokenDecimals; + } + // solhint-enable ordering + + function getRemoteTokenTransferrerSettings( + bytes32 remoteBlockchainID, + address remoteTokenTransferrerAddress + ) public view returns (RemoteTokenTransferrerSettings memory) { + TokenHomeStorage storage $ = _getTokenHomeStorage(); + return $._registeredRemotes[remoteBlockchainID][remoteTokenTransferrerAddress]; + } + + function getTransferredBalance( + bytes32 remoteBlockchainID, + address remoteTokenTransferrerAddress + ) public view returns (uint256) { + TokenHomeStorage storage $ = _getTokenHomeStorage(); + return $._transferredBalances[remoteBlockchainID][remoteTokenTransferrerAddress]; + } + + function getTokenAddress() public view returns (address) { + TokenHomeStorage storage $ = _getTokenHomeStorage(); + return $._tokenAddress; + } + + function getBlockchainID() public view returns (bytes32) { + TokenHomeStorage storage $ = _getTokenHomeStorage(); + return $._blockchainID; + } + + function _registerRemote( + bytes32 remoteBlockchainID, + address remoteTokenTransferrerAddress, + RegisterRemoteMessage memory message + ) internal { + TokenHomeStorage storage $ = _getTokenHomeStorage(); + require(remoteBlockchainID != bytes32(0), "TokenHome: zero remote blockchain ID"); + require( + remoteBlockchainID != $._blockchainID, "TokenHome: cannot register remote on same chain" + ); + require( + remoteTokenTransferrerAddress != address(0), + "TokenHome: zero remote token transferrer address" + ); + require( + !$._registeredRemotes[remoteBlockchainID][remoteTokenTransferrerAddress].registered, + "TokenHome: remote already registered" + ); + require( + message.remoteTokenDecimals <= TokenScalingUtils.MAX_TOKEN_DECIMALS, + "TokenHome: remote token decimals too high" + ); + require( + message.homeTokenDecimals == $._tokenDecimals, "TokenHome: invalid home token decimals" + ); + + (uint256 tokenMultiplier, bool multiplyOnRemote) = TokenScalingUtils + .deriveTokenMultiplierValues($._tokenDecimals, message.remoteTokenDecimals); + + // Calculate the collateral needed in home token denomination. + uint256 collateralNeeded = TokenScalingUtils.removeTokenScale( + tokenMultiplier, multiplyOnRemote, message.initialReserveImbalance + ); + + // Round up the collateral needed by 1 in the case that {multiplyOnRemote} is true and + // {initialReserveImbalance} is not divisible by the {tokenMultiplier} to + // ensure that the full amount is accounted for. + if (multiplyOnRemote && message.initialReserveImbalance % tokenMultiplier != 0) { + collateralNeeded += 1; + } + + $._registeredRemotes[remoteBlockchainID][remoteTokenTransferrerAddress] = + RemoteTokenTransferrerSettings({ + registered: true, + collateralNeeded: collateralNeeded, + tokenMultiplier: tokenMultiplier, + multiplyOnRemote: multiplyOnRemote + }); + + emit RemoteRegistered( + remoteBlockchainID, + remoteTokenTransferrerAddress, + collateralNeeded, + message.remoteTokenDecimals + ); + } + + /** + * @notice Sends tokens to the specified remote token transferrer instance. + * + * @dev Increases the balance sent to the remote token transferrer instance, + * and uses Teleporter to send a cross chain message. The amount passed is assumed to + * be already scaled to the local denomination for this token home. + * Requirements: + * + * - The TokenRemote instance specified by {input.destinationBlockchainID} and {input.destinationTokenTransferrerAddress} must + * be registered with this contract. + * - {input.recipient} cannot be the zero address + * - {amount} must be greater than 0 + */ + function _send(SendTokensInput memory input, uint256 amount) internal sendNonReentrant { + _validateSendTokensInput(input); + // Require that a single hop transfer does not have a multi-hop fallback recipient. + require(input.multiHopFallback == address(0), "TokenHome: non-zero multi-hop fallback"); + + (uint256 adjustedAmount, uint256 feeAmount) = _prepareSend({ + remoteBlockchainID: input.destinationBlockchainID, + remoteTokenTransferrerAddress: input.destinationTokenTransferrerAddress, + amount: amount, + primaryFeeTokenAddress: input.primaryFeeTokenAddress, + feeAmount: input.primaryFee + }); + + TransferrerMessage memory message = TransferrerMessage({ + messageType: TransferrerMessageType.SINGLE_HOP_SEND, + payload: abi.encode( + SingleHopSendMessage({recipient: input.recipient, amount: adjustedAmount}) + ) + }); + + // Send message to the TokenRemote instance + bytes32 messageID = _sendTeleporterMessage( + TeleporterMessageInput({ + destinationBlockchainID: input.destinationBlockchainID, + destinationAddress: input.destinationTokenTransferrerAddress, + feeInfo: TeleporterFeeInfo({ + feeTokenAddress: input.primaryFeeTokenAddress, + amount: feeAmount + }), + requiredGasLimit: input.requiredGasLimit, + allowedRelayerAddresses: new address[](0), + message: abi.encode(message) + }) + ); + + emit TokensSent(messageID, _msgSender(), input, adjustedAmount); + } + + /** + * @notice Routes tokens from a multi-hop message to the specified remote token transferrer instance. + * + * @dev Increases the balance sent to the remote token transferrer instance, + * and uses Teleporter to send a cross chain message. The amount passed is assumed to + * be already scaled to the local denomination for this token home. + * Requirements: + * + * - The TokenRemote instance specified by {input.destinationBlockchainID} and {input.destinationTokenTransferrerAddress} must + * be registered with this contract. + * - {input.recipient} cannot be the zero address + * - {amount} must be greater than 0 + */ + function _routeMultiHop( + SendTokensInput memory input, + uint256 amount + ) internal sendNonReentrant { + _validateSendTokensInput(input); + + uint256 adjustedAmount = _prepareMultiHopRouting( + input.destinationBlockchainID, + input.destinationTokenTransferrerAddress, + amount, + input.primaryFee + ); + + if (adjustedAmount == 0) { + // If the adjusted amount is zero for any reason (i.e. unregistered remote, + // being scaled down to zero, etc.), send the tokens to the multi-hop fallback. + _withdraw(input.multiHopFallback, amount); + return; + } + + TransferrerMessage memory message = TransferrerMessage({ + messageType: TransferrerMessageType.SINGLE_HOP_SEND, + payload: abi.encode( + SingleHopSendMessage({recipient: input.recipient, amount: adjustedAmount}) + ) + }); + + // Send message to the TokenRemote instance. + bytes32 messageID = _sendTeleporterMessage( + TeleporterMessageInput({ + destinationBlockchainID: input.destinationBlockchainID, + destinationAddress: input.destinationTokenTransferrerAddress, + feeInfo: TeleporterFeeInfo({ + feeTokenAddress: input.primaryFeeTokenAddress, + amount: input.primaryFee + }), + requiredGasLimit: input.requiredGasLimit, + allowedRelayerAddresses: new address[](0), + message: abi.encode(message) + }) + ); + + emit TokensRouted(messageID, input, adjustedAmount); + } + + function _sendAndCall( + bytes32 sourceBlockchainID, + address originTokenTransferrerAddress, + address originSenderAddress, + SendAndCallInput memory input, + uint256 amount + ) internal sendNonReentrant { + _validateSendAndCallInput(input); + + // Require that a single hop transfer does not have a multi-hop fallback recipient. + require(input.multiHopFallback == address(0), "TokenHome: non-zero multi-hop fallback"); + + (uint256 adjustedAmount, uint256 feeAmount) = _prepareSend({ + remoteBlockchainID: input.destinationBlockchainID, + remoteTokenTransferrerAddress: input.destinationTokenTransferrerAddress, + amount: amount, + primaryFeeTokenAddress: input.primaryFeeTokenAddress, + feeAmount: input.primaryFee + }); + + TransferrerMessage memory message = TransferrerMessage({ + messageType: TransferrerMessageType.SINGLE_HOP_CALL, + payload: abi.encode( + SingleHopCallMessage({ + sourceBlockchainID: sourceBlockchainID, + originTokenTransferrerAddress: originTokenTransferrerAddress, + originSenderAddress: originSenderAddress, + recipientContract: input.recipientContract, + amount: adjustedAmount, + recipientPayload: input.recipientPayload, + recipientGasLimit: input.recipientGasLimit, + fallbackRecipient: input.fallbackRecipient + }) + ) + }); + + // Send message to the TokenRemote instance. + bytes32 messageID = _sendTeleporterMessage( + TeleporterMessageInput({ + destinationBlockchainID: input.destinationBlockchainID, + destinationAddress: input.destinationTokenTransferrerAddress, + feeInfo: TeleporterFeeInfo({ + feeTokenAddress: input.primaryFeeTokenAddress, + amount: feeAmount + }), + requiredGasLimit: input.requiredGasLimit, + allowedRelayerAddresses: new address[](0), + message: abi.encode(message) + }) + ); + + emit TokensAndCallSent(messageID, originSenderAddress, input, adjustedAmount); + } + + function _routeMultiHopSendAndCall( + bytes32 sourceBlockchainID, + address originTokenTransferrerAddress, + address originSenderAddress, + SendAndCallInput memory input, + uint256 amount + ) internal sendNonReentrant { + _validateSendAndCallInput(input); + uint256 adjustedAmount = _prepareMultiHopRouting( + input.destinationBlockchainID, + input.destinationTokenTransferrerAddress, + amount, + input.primaryFee + ); + + if (adjustedAmount == 0) { + // If the adjusted amount is zero for any reason (i.e. unregistered remote, + // being scaled down to zero, etc.), send the tokens to the multi-hop fallback recipient. + _withdraw(input.multiHopFallback, amount); + return; + } + + TransferrerMessage memory message = TransferrerMessage({ + messageType: TransferrerMessageType.SINGLE_HOP_CALL, + payload: abi.encode( + SingleHopCallMessage({ + sourceBlockchainID: sourceBlockchainID, + originTokenTransferrerAddress: originTokenTransferrerAddress, + originSenderAddress: originSenderAddress, + recipientContract: input.recipientContract, + amount: adjustedAmount, + recipientPayload: input.recipientPayload, + recipientGasLimit: input.recipientGasLimit, + fallbackRecipient: input.fallbackRecipient + }) + ) + }); + + // Send message to the TokenRemote instance. + bytes32 messageID = _sendTeleporterMessage( + TeleporterMessageInput({ + destinationBlockchainID: input.destinationBlockchainID, + destinationAddress: input.destinationTokenTransferrerAddress, + feeInfo: TeleporterFeeInfo({ + feeTokenAddress: input.primaryFeeTokenAddress, + amount: input.primaryFee + }), + requiredGasLimit: input.requiredGasLimit, + allowedRelayerAddresses: new address[](0), + message: abi.encode(message) + }) + ); + + emit TokensAndCallRouted(messageID, input, adjustedAmount); + } + + /** + * @dev See {INativeTokenHome-addCollateral} + */ + function _addCollateral( + bytes32 remoteBlockchainID, + address remoteTokenTransferrerAddress, + uint256 amount + ) internal sendNonReentrant { + TokenHomeStorage storage $ = _getTokenHomeStorage(); + RemoteTokenTransferrerSettings memory remoteSettings = + $._registeredRemotes[remoteBlockchainID][remoteTokenTransferrerAddress]; + require(remoteSettings.registered, "TokenHome: remote not registered"); + require(remoteSettings.collateralNeeded > 0, "TokenHome: zero collateral needed"); + + // Deposit the full amount, and withdraw back to the sender if there is excess. + amount = _deposit(amount); + + // Calculate the remaining collateral needed, any excess amount, and adjust + // {amount} to represent the amount of tokens added as collateral. + uint256 remainingCollateralNeeded; + uint256 excessAmount; + if (amount >= remoteSettings.collateralNeeded) { + remainingCollateralNeeded = 0; + excessAmount = amount - remoteSettings.collateralNeeded; + amount = remoteSettings.collateralNeeded; + } else { + remainingCollateralNeeded = remoteSettings.collateralNeeded - amount; + } + + // Update the remaining collateral needed. + $._registeredRemotes[remoteBlockchainID][remoteTokenTransferrerAddress].collateralNeeded = + remainingCollateralNeeded; + emit CollateralAdded( + remoteBlockchainID, remoteTokenTransferrerAddress, amount, remainingCollateralNeeded + ); + + // If there is excess amount, send it back to the sender. + if (excessAmount > 0) { + _withdraw(_msgSender(), excessAmount); + } + } + + /** + * @dev See {ITeleporterUpgradeable-_receiveTeleporterMessage} + * + * Handles the processing of Teleporter messages sent to this contract. + * Supported message types include registering a TokenRemote instance, single-hop sends, + * single-hop calls, multi-hop sends, and multi-hop calls. + */ + function _receiveTeleporterMessage( + bytes32 sourceBlockchainID, + address originSenderAddress, + bytes memory message + ) internal override { + TokenHomeStorage storage $ = _getTokenHomeStorage(); + TransferrerMessage memory transferrerMessage = abi.decode(message, (TransferrerMessage)); + if (transferrerMessage.messageType == TransferrerMessageType.SINGLE_HOP_SEND) { + SingleHopSendMessage memory payload = + abi.decode(transferrerMessage.payload, (SingleHopSendMessage)); + + uint256 homeAmount = + _processSingleHopTransfer(sourceBlockchainID, originSenderAddress, payload.amount); + + // Send the tokens to the recipient. + _withdraw(payload.recipient, homeAmount); + return; + } else if (transferrerMessage.messageType == TransferrerMessageType.SINGLE_HOP_CALL) { + SingleHopCallMessage memory payload = + abi.decode(transferrerMessage.payload, (SingleHopCallMessage)); + + uint256 homeAmount = + _processSingleHopTransfer(sourceBlockchainID, originSenderAddress, payload.amount); + + // Verify that the payload's source blockchain ID and origin token transferrer address matches the source blockchain ID + // and origin sender address passed from Teleporter. + require( + payload.sourceBlockchainID == sourceBlockchainID, + "TokenHome: mismatched source blockchain ID" + ); + require( + payload.originTokenTransferrerAddress == originSenderAddress, + "TokenHome: mismatched origin sender address" + ); + + _handleSendAndCall(payload, homeAmount); + return; + } else if (transferrerMessage.messageType == TransferrerMessageType.MULTI_HOP_SEND) { + MultiHopSendMessage memory payload = + abi.decode(transferrerMessage.payload, (MultiHopSendMessage)); + + (uint256 homeAmount, uint256 fee) = _processMultiHopTransfer( + sourceBlockchainID, originSenderAddress, payload.amount, payload.secondaryFee + ); + + // For a multi-hop send, the fee token address has to be {tokenAddress}, + // because the fee is taken from the amount that has already been deposited. + // For ERC20 tokens, the token address of the contract is directly passed. + // For native assets, the contract address is the wrapped token contract. + _routeMultiHop( + SendTokensInput({ + destinationBlockchainID: payload.destinationBlockchainID, + destinationTokenTransferrerAddress: payload.destinationTokenTransferrerAddress, + recipient: payload.recipient, + primaryFeeTokenAddress: $._tokenAddress, + primaryFee: fee, + secondaryFee: 0, + requiredGasLimit: payload.secondaryGasLimit, + multiHopFallback: payload.multiHopFallback + }), + homeAmount + ); + return; + } else if (transferrerMessage.messageType == TransferrerMessageType.MULTI_HOP_CALL) { + MultiHopCallMessage memory payload = + abi.decode(transferrerMessage.payload, (MultiHopCallMessage)); + + (uint256 homeAmount, uint256 fee) = _processMultiHopTransfer( + sourceBlockchainID, originSenderAddress, payload.amount, payload.secondaryFee + ); + + // For a multi-hop send, the fee token address has to be {tokenAddress}, + // because the fee is taken from the amount that has already been deposited. + // For ERC20 tokens, the token address of the contract is directly passed. + // For native assets, the contract address is the wrapped token contract. + _routeMultiHopSendAndCall({ + sourceBlockchainID: sourceBlockchainID, + originTokenTransferrerAddress: originSenderAddress, + originSenderAddress: payload.originSenderAddress, + input: SendAndCallInput({ + destinationBlockchainID: payload.destinationBlockchainID, + destinationTokenTransferrerAddress: payload.destinationTokenTransferrerAddress, + recipientContract: payload.recipientContract, + recipientPayload: payload.recipientPayload, + requiredGasLimit: payload.secondaryRequiredGasLimit, + recipientGasLimit: payload.recipientGasLimit, + multiHopFallback: payload.multiHopFallback, + fallbackRecipient: payload.fallbackRecipient, + primaryFeeTokenAddress: $._tokenAddress, + primaryFee: fee, + secondaryFee: 0 + }), + amount: homeAmount + }); + return; + } else if (transferrerMessage.messageType == TransferrerMessageType.REGISTER_REMOTE) { + RegisterRemoteMessage memory payload = + abi.decode(transferrerMessage.payload, (RegisterRemoteMessage)); + _registerRemote(sourceBlockchainID, originSenderAddress, payload); + } + } + + /** + * @notice Deposits tokens from the sender to this contract, + * and returns the adjusted amount of tokens deposited. + * @param amount The initial amount sent to this contract. + * @return The actual amount deposited to this contract. + */ + function _deposit(uint256 amount) internal virtual returns (uint256); + + /** + * @notice Withdraws tokens to the recipient address. + * @param recipient The address to withdraw tokens to + * @param amount The amount of tokens to withdraw + */ + function _withdraw(address recipient, uint256 amount) internal virtual; + + /** + * @notice Processes a send and call message by calling the recipient contract. + * @param message The send and call message include recipient calldata + * @param amount The amount of tokens to be sent to the recipient. This amount is assumed to be + * already scaled to the local denomination for this token home. + */ + function _handleSendAndCall( + SingleHopCallMessage memory message, + uint256 amount + ) internal virtual; + + /** + * @notice Processes a received single hop transfer from a TokenRemote instance. + * Validates that the message is sent from a registered TokenRemote instance, + * and is already collateralized. + * @param remoteBlockchainID The blockchain ID of the TokenRemote instance. + * @param remoteTokenTransferrerAddress The address of the TokenRemote instance. + * @param amount The amount of tokens sent back from remote, denominated by the + * remote's token scale amount. + */ + function _processSingleHopTransfer( + bytes32 remoteBlockchainID, + address remoteTokenTransferrerAddress, + uint256 amount + ) private returns (uint256) { + TokenHomeStorage storage $ = _getTokenHomeStorage(); + RemoteTokenTransferrerSettings memory remoteSettings = + $._registeredRemotes[remoteBlockchainID][remoteTokenTransferrerAddress]; + + return _processReceivedTransfer( + remoteSettings, remoteBlockchainID, remoteTokenTransferrerAddress, amount + ); + } + + /** + * @notice Processes a received multi-hop transfer from a TokenRemote instance. + * Validates that the message is sent from a registered TokenRemote instance, + * and is already collateralized. + * @param remoteBlockchainID The blockchain ID of the TokenRemote instance. + * @param remoteTokenTransferrerAddress The address of the TokenRemote instance. + * @param amount The amount of tokens sent back from remote, denominated by the + * remote's token scale amount. + * @param secondaryFee The Teleporter fee for the second hop of the mutihop transfer + */ + function _processMultiHopTransfer( + bytes32 remoteBlockchainID, + address remoteTokenTransferrerAddress, + uint256 amount, + uint256 secondaryFee + ) private returns (uint256, uint256) { + TokenHomeStorage storage $ = _getTokenHomeStorage(); + RemoteTokenTransferrerSettings memory remoteSettings = + $._registeredRemotes[remoteBlockchainID][remoteTokenTransferrerAddress]; + + uint256 transferAmount = _processReceivedTransfer( + remoteSettings, remoteBlockchainID, remoteTokenTransferrerAddress, amount + ); + + uint256 fee = TokenScalingUtils.removeTokenScale( + remoteSettings.tokenMultiplier, remoteSettings.multiplyOnRemote, secondaryFee + ); + + return (transferAmount, fee); + } + + /** + * @notice Processes a received transfer from a TokenRemote instance. + * Deducts the balance transferred to the given TokenRemote instance. + * Removes the token scaling of the remote, checks the associated home token + * amount is greater than zero, and returns the home token amount. + * @param remoteSettings The token transferrer settings for the TokenRemote instance we received the transfer from. + * @param remoteBlockchainID The blockchain ID of the TokenRemote instance. + * @param remoteTokenTransferrerAddress The address of the TokenRemote instance. + * @param amount The amount of tokens sent back from remote, denominated by the + * remote's token scale amount. + */ + function _processReceivedTransfer( + RemoteTokenTransferrerSettings memory remoteSettings, + bytes32 remoteBlockchainID, + address remoteTokenTransferrerAddress, + uint256 amount + ) private returns (uint256) { + // Require that the remote is registered and has no collateral needed. + require(remoteSettings.registered, "TokenHome: remote not registered"); + require(remoteSettings.collateralNeeded == 0, "TokenHome: remote not collateralized"); + + // Deduct the balance transferred to the given TokenRemote instance prior to scaling the amount. + _deductSenderBalance(remoteBlockchainID, remoteTokenTransferrerAddress, amount); + + // Remove the token scaling of the remote and get home token amount. + uint256 homeAmount = TokenScalingUtils.removeTokenScale( + remoteSettings.tokenMultiplier, remoteSettings.multiplyOnRemote, amount + ); + + // Require that the home token amount is greater than zero after removed scaling. + require(homeAmount > 0, "TokenHome: zero token amount"); + return homeAmount; + } + + /** + * @notice Prepares a multi-hop send by checking the TokenRemote instance settings + * and adjusting the amount to be sent. + * @return The scaled amount to be sent to the TokenRemote instance. Zero can be returned if the + * TokenRemote instance is not registered, needs collateral, or the scaled amount is zero. + */ + function _prepareMultiHopRouting( + bytes32 remoteBlockchainID, + address remoteTokenTransferrerAddress, + uint256 amount, + uint256 fee + ) private returns (uint256) { + TokenHomeStorage storage $ = _getTokenHomeStorage(); + RemoteTokenTransferrerSettings memory remoteSettings = + $._registeredRemotes[remoteBlockchainID][remoteTokenTransferrerAddress]; + if (!remoteSettings.registered || remoteSettings.collateralNeeded > 0) { + return 0; + } + + // Subtract fee amount from amount prior to scaling. + require(amount > fee, "TokenHome: insufficient amount to cover fees"); + amount -= fee; + + // Scale the amount based on the token multiplier for the given TokenRemote instance. + uint256 scaledAmount = TokenScalingUtils.applyTokenScale( + remoteSettings.tokenMultiplier, remoteSettings.multiplyOnRemote, amount + ); + if (scaledAmount == 0) { + return 0; + } + + // Increase the balance of the TokenRemote instance by the scaled amount. + $._transferredBalances[remoteBlockchainID][remoteTokenTransferrerAddress] += scaledAmount; + + return scaledAmount; + } + + /** + * @dev Prepares tokens to be sent to another chain by handling the + * locking of the token amount in this contract and updating the accounting + * balances. + */ + function _prepareSend( + bytes32 remoteBlockchainID, + address remoteTokenTransferrerAddress, + uint256 amount, + address primaryFeeTokenAddress, + uint256 feeAmount + ) private returns (uint256, uint256) { + TokenHomeStorage storage $ = _getTokenHomeStorage(); + RemoteTokenTransferrerSettings memory remoteSettings = + $._registeredRemotes[remoteBlockchainID][remoteTokenTransferrerAddress]; + require(remoteSettings.registered, "TokenHome: remote not registered"); + require(remoteSettings.collateralNeeded == 0, "TokenHome: collateral needed for remote"); + + // Deposit the funds sent from the user to the token transferrer, + // and set to adjusted amount after deposit. + amount = _deposit(amount); + + if (feeAmount > 0) { + feeAmount = SafeERC20TransferFrom.safeTransferFrom( + IERC20(primaryFeeTokenAddress), _msgSender(), feeAmount + ); + } + + // Scale the amount based on the token multiplier for the given TokenRemote instance. + uint256 scaledAmount = TokenScalingUtils.applyTokenScale( + remoteSettings.tokenMultiplier, remoteSettings.multiplyOnRemote, amount + ); + require(scaledAmount > 0, "TokenHome: zero scaled amount"); + + // Increase the balance of the TokenRemote instance by the scaled amount. + $._transferredBalances[remoteBlockchainID][remoteTokenTransferrerAddress] += scaledAmount; + + return (scaledAmount, feeAmount); + } + + function _deductSenderBalance( + bytes32 remoteBlockchainID, + address remoteTokenTransferrerAddress, + uint256 amount + ) private { + TokenHomeStorage storage $ = _getTokenHomeStorage(); + uint256 senderBalance = + $._transferredBalances[remoteBlockchainID][remoteTokenTransferrerAddress]; + require(senderBalance >= amount, "TokenHome: insufficient token transfer balance"); + $._transferredBalances[remoteBlockchainID][remoteTokenTransferrerAddress] = + senderBalance - amount; + } + + function _validateSendAndCallInput(SendAndCallInput memory input) private pure { + require(input.recipientContract != address(0), "TokenHome: zero recipient contract address"); + require(input.requiredGasLimit > 0, "TokenHome: zero required gas limit"); + require(input.recipientGasLimit > 0, "TokenHome: zero recipient gas limit"); + require( + input.recipientGasLimit < input.requiredGasLimit, + "TokenHome: invalid recipient gas limit" + ); + require(input.fallbackRecipient != address(0), "TokenHome: zero fallback recipient address"); + require(input.secondaryFee == 0, "TokenHome: non-zero secondary fee"); + } + + function _validateSendTokensInput(SendTokensInput memory input) private pure { + require(input.recipient != address(0), "TokenHome: zero recipient address"); + require(input.requiredGasLimit > 0, "TokenHome: zero required gas limit"); + require(input.secondaryFee == 0, "TokenHome: non-zero secondary fee"); + } +} diff --git a/contracts/ictt/TokenHome/interfaces/IERC20TokenHome.sol b/contracts/ictt/TokenHome/interfaces/IERC20TokenHome.sol new file mode 100644 index 000000000..ff0526dcd --- /dev/null +++ b/contracts/ictt/TokenHome/interfaces/IERC20TokenHome.sol @@ -0,0 +1,30 @@ +// (c) 2024, Ava Labs, Inc. All rights reserved. +// See the file LICENSE for licensing terms. + +// SPDX-License-Identifier: Ecosystem + +pragma solidity 0.8.25; + +import {IERC20TokenTransferrer} from "../../interfaces/IERC20TokenTransferrer.sol"; +import {ITokenHome} from "./ITokenHome.sol"; + +/** + * @notice Interface for a ERC20 token "home" contract that locks its specified ERC20 + * token on its chain to be transferred to supported remote token transfer contracts on other chains. + * + * @custom:security-contact https://github.com/ava-labs/teleporter/blob/main/SECURITY.md + */ +interface IERC20TokenHome is IERC20TokenTransferrer, ITokenHome { + /** + * @notice Adds collateral to the home token transfer contract for the specified TokenRemote instance. If more value is provided + * than the amount of collateral needed, the excess amount is returned to the caller. + * @param remoteBlockchainID The blockchain ID of the TokenRemote instance to add collateral for. + * @param remoteTokenTransferrerAddress The address of the TokenRemote instance to add collateral for on the {remoteBlockchainID}. + * @param amount Amount of tokens to add as collateral. + */ + function addCollateral( + bytes32 remoteBlockchainID, + address remoteTokenTransferrerAddress, + uint256 amount + ) external; +} diff --git a/contracts/ictt/TokenHome/interfaces/INativeTokenHome.sol b/contracts/ictt/TokenHome/interfaces/INativeTokenHome.sol new file mode 100644 index 000000000..863450650 --- /dev/null +++ b/contracts/ictt/TokenHome/interfaces/INativeTokenHome.sol @@ -0,0 +1,29 @@ +// (c) 2024, Ava Labs, Inc. All rights reserved. +// See the file LICENSE for licensing terms. + +// SPDX-License-Identifier: Ecosystem + +pragma solidity 0.8.25; + +import {INativeTokenTransferrer} from "../../interfaces/INativeTokenTransferrer.sol"; +import {ITokenHome} from "./ITokenHome.sol"; + +/** + * @notice Interface for a native token "home" contract that locks the native token + * on its chain to be transferred to supported remote token transfer contracts on other chains. + * + * @custom:security-contact https://github.com/ava-labs/teleporter/blob/main/SECURITY.md + */ +interface INativeTokenHome is INativeTokenTransferrer, ITokenHome { + /** + * @notice Adds collateral to the home token transfer contract for the specified TokenRemote instance. If more value is provided + * than the amount of collateral needed, the excess amount is returned to the caller. + * @param remoteBlockchainID The blockchain ID of the remote token transfer contract to add collateral for. + * @param remoteTokenTransferrerAddress The address of the remote token transfer contract to add collateral for on + * the {remoteBlockchainID}. + */ + function addCollateral( + bytes32 remoteBlockchainID, + address remoteTokenTransferrerAddress + ) external payable; +} diff --git a/contracts/ictt/TokenHome/interfaces/ITokenHome.sol b/contracts/ictt/TokenHome/interfaces/ITokenHome.sol new file mode 100644 index 000000000..139aa3edc --- /dev/null +++ b/contracts/ictt/TokenHome/interfaces/ITokenHome.sol @@ -0,0 +1,69 @@ +// (c) 2024, Ava Labs, Inc. All rights reserved. +// See the file LICENSE for licensing terms. + +// SPDX-License-Identifier: Ecosystem + +pragma solidity 0.8.25; + +import { + ITokenTransferrer, + SendTokensInput, + SendAndCallInput +} from "../../interfaces/ITokenTransferrer.sol"; + +/** + * @notice Each {ITokenRemote} instance registers with the home contract, and provides settings for transferring + * to the remote token transfer contract. + * @param registered Whether the remote token transferrer is registered + * @param collateralNeeded The amount of tokens that must be first added as collateral, + * through {addCollateral} calls, before tokens can be transferred to the remote token transferrer. + * @param tokenMultiplier The scaling factor for the amount of tokens to be transferred to the remote. + * @param multiplyOnRemote Whether the {tokenMultiplier} should be applied when transferring tokens to + * the remote (multiplyOnRemote=true), or when transferring tokens back to the home (multiplyOnRemote=false). + */ +struct RemoteTokenTransferrerSettings { + bool registered; + uint256 collateralNeeded; + uint256 tokenMultiplier; + bool multiplyOnRemote; +} +/** + * @dev Interface for a "home" token transferrer contract that locks a specific token + * on its chain to be transferred to supported "remote" token transferrer contracts on other chains. + */ + +interface ITokenHome is ITokenTransferrer { + /** + * @dev Emitted when tokens are added as collateral for a given {ITokenRemote} instance. + * The event emits a {remaining} value of 0 when the {ITokenRemote} instance is fully collateralized. + */ + event CollateralAdded( + bytes32 indexed remoteBlockchainID, + address indexed remoteTokenTransferrerAddress, + uint256 amount, + uint256 remaining + ); + + /** + * @notice Emitted when a new {ITokenRemote} instance is registered with the token transferrer. + */ + event RemoteRegistered( + bytes32 indexed remoteBlockchainID, + address indexed remoteTokenTransferrerAddress, + uint256 initialCollateralNeeded, + uint8 tokenDecimals + ); + + /** + * @notice Emitted when tokens are routed from a multi-hop send message to another chain. + */ + event TokensRouted(bytes32 indexed teleporterMessageID, SendTokensInput input, uint256 amount); + + /** + * @notice Emitted when tokens are routed from a mulit-hop send message, + * with calldata for a contract recipient, to another chain. + */ + event TokensAndCallRouted( + bytes32 indexed teleporterMessageID, SendAndCallInput input, uint256 amount + ); +} diff --git a/contracts/ictt/TokenRemote/ERC20TokenRemote.sol b/contracts/ictt/TokenRemote/ERC20TokenRemote.sol new file mode 100644 index 000000000..b37ed2142 --- /dev/null +++ b/contracts/ictt/TokenRemote/ERC20TokenRemote.sol @@ -0,0 +1,26 @@ +// (c) 2024, Ava Labs, Inc. All rights reserved. +// See the file LICENSE for licensing terms. + +// SPDX-License-Identifier: Ecosystem + +pragma solidity 0.8.25; + +import {ERC20TokenRemoteUpgradeable} from "./ERC20TokenRemoteUpgradeable.sol"; +import {TokenRemoteSettings} from "./interfaces/ITokenRemote.sol"; +import {ICMInitializable} from "@utilities/ICMInitializable.sol"; + +/** + * @title ERC20TokenRemote + * @notice A non-upgradeable version of {ERC20TokenRemoteUpgradeable} that calls the parent upgradeable contract's initialize function. + * @custom:security-contact https://github.com/ava-labs/teleporter/blob/main/SECURITY.md + */ +contract ERC20TokenRemote is ERC20TokenRemoteUpgradeable { + constructor( + TokenRemoteSettings memory settings, + string memory tokenName, + string memory tokenSymbol, + uint8 tokenDecimals + ) ERC20TokenRemoteUpgradeable(ICMInitializable.Allowed) { + initialize(settings, tokenName, tokenSymbol, tokenDecimals); + } +} diff --git a/contracts/ictt/TokenRemote/ERC20TokenRemoteUpgradeable.sol b/contracts/ictt/TokenRemote/ERC20TokenRemoteUpgradeable.sol new file mode 100644 index 000000000..1ced3942e --- /dev/null +++ b/contracts/ictt/TokenRemote/ERC20TokenRemoteUpgradeable.sol @@ -0,0 +1,232 @@ +// (c) 2024, Ava Labs, Inc. All rights reserved. +// See the file LICENSE for licensing terms. + +// SPDX-License-Identifier: Ecosystem + +pragma solidity 0.8.25; + +import {TokenRemote} from "./TokenRemote.sol"; +import {TokenRemoteSettings} from "./interfaces/ITokenRemote.sol"; +import {IERC20TokenTransferrer} from "../interfaces/IERC20TokenTransferrer.sol"; +import {IERC20SendAndCallReceiver} from "../interfaces/IERC20SendAndCallReceiver.sol"; +import { + SendTokensInput, + SendAndCallInput, + SingleHopCallMessage +} from "../interfaces/ITokenTransferrer.sol"; +import {IERC20} from "@openzeppelin/contracts@5.0.2/token/ERC20/ERC20.sol"; +import {ERC20Upgradeable} from + "@openzeppelin/contracts-upgradeable@5.0.2/token/ERC20/ERC20Upgradeable.sol"; +import {SafeERC20TransferFrom} from "@utilities/SafeERC20TransferFrom.sol"; +import {CallUtils} from "@utilities/CallUtils.sol"; +import {ICMInitializable} from "@utilities/ICMInitializable.sol"; + +/** + * @title ERC20TokenRemoteUpgradeable + * @notice This contract is an {IERC20TokenTransferrer} that receives tokens from its specifed {TokenHome} instance, + * and represents the received tokens with an ERC20 token on this chain. + * @custom:security-contact https://github.com/ava-labs/teleporter/blob/main/SECURITY.md + */ +contract ERC20TokenRemoteUpgradeable is IERC20TokenTransferrer, ERC20Upgradeable, TokenRemote { + // solhint-disable private-vars-leading-underscore + /** + * @dev Namespace storage slots following the ERC-7201 standard to prevent + * storage collisions between upgradeable contracts. + * + * @custom:storage-location erc7201:avalanche-ictt.storage.ERC20TokenRemote + */ + struct ERC20TokenRemoteStorage { + uint8 _decimals; + } + // solhint-enable private-vars-leading-underscore + + /** + * @dev Storage slot computed based off ERC-7201 formula + * keccak256(abi.encode(uint256(keccak256("avalanche-ictt.storage.ERC20TokenRemote")) - 1)) & ~bytes32(uint256(0xff)); + */ + bytes32 public constant ERC20_TOKEN_REMOTE_STORAGE_LOCATION = + 0x9b9029a3537fcf0e984763da4ac33bbf592a3462819171bf424e91cf62622300; + + // solhint-disable ordering + function _getERC20TokenRemoteStorage() + private + pure + returns (ERC20TokenRemoteStorage storage $) + { + // solhint-disable-next-line no-inline-assembly + assembly { + $.slot := ERC20_TOKEN_REMOTE_STORAGE_LOCATION + } + } + + constructor(ICMInitializable init) { + if (init == ICMInitializable.Disallowed) { + _disableInitializers(); + } + } + + /** + * @notice Initializes this token TokenRemote instance to receive tokens from the specified TokenHome instance, + * and represents the received tokens with an ERC20 token on this chain. + * @param settings Constructor settings for this token TokenRemote instance. + * @param tokenName The name of the ERC20 token. + * @param tokenSymbol The symbol of the ERC20 token. + * @param tokenDecimals The number of decimals for the ERC20 token. + */ + function initialize( + TokenRemoteSettings memory settings, + string memory tokenName, + string memory tokenSymbol, + uint8 tokenDecimals + ) public initializer { + __ERC20TokenRemote_init(settings, tokenName, tokenSymbol, tokenDecimals); + } + + // solhint-disable-next-line func-name-mixedcase + function __ERC20TokenRemote_init( + TokenRemoteSettings memory settings, + string memory tokenName, + string memory tokenSymbol, + uint8 tokenDecimals + ) internal onlyInitializing { + __ERC20_init(tokenName, tokenSymbol); + __TokenRemote_init(settings, 0, tokenDecimals); + __ERC20TokenRemote_init_unchained(tokenDecimals); + } + + // solhint-disable-next-line func-name-mixedcase + function __ERC20TokenRemote_init_unchained(uint8 tokenDecimals) internal { + _getERC20TokenRemoteStorage()._decimals = tokenDecimals; + } + // solhint-enable ordering + + /** + * @dev See {IERC20TokenTransferrer-send} + * + * Note: For transfers to an {input.destinationBlockchainID} that is not the {tokenHomeBlockchainID}, + * a multi-hop transfer is performed, where the tokens are sent back to the token TokenHome instance + * first to check for token transfer balance, and then routed to the final destination TokenRemote instance. + */ + function send(SendTokensInput calldata input, uint256 amount) external { + _send(input, amount); + } + + /** + * @dev See {IERC20TokenTransferrer-sendAndCall} + */ + function sendAndCall(SendAndCallInput calldata input, uint256 amount) external { + _sendAndCall(input, amount); + } + + /** + * @dev See {ERC20-decimals} + */ + function decimals() public view override returns (uint8) { + ERC20TokenRemoteStorage storage $ = _getERC20TokenRemoteStorage(); + return $._decimals; + } + + /** + * @dev See {TokenRemote-_withdraw} + */ + function _withdraw(address recipient, uint256 amount) internal virtual override { + emit TokensWithdrawn(recipient, amount); + _mint(recipient, amount); + } + + /** + * @dev See {TokenRemote-_burn} + * + * Spends the allowance the caller has given to this contract, and + * calls {ERC20-_burn} to burn tokens from the sender. + * + * Note: The amount returned must match the amount credited as a result of the burn. + * For a standard ERC20 implementation such as this contract, that is equal to the full amount given. + * Child contracts with different {_burn} implementations may need to override this + * implemenation to ensure the amount returned is correct. + */ + function _burn(uint256 amount) internal virtual override returns (uint256) { + _spendAllowance(_msgSender(), address(this), amount); + _burn(_msgSender(), amount); + return amount; + } + + /** + * @dev See {TokenRemote-_handleSendAndCall} + * + * Mints the tokens to this contract, approves the recipient contract to spend them, + * and calls {IERC20SendAndCallReceiver-receiveTokens} on the recipient contract. + * If the call fails or doesn't spend all of the tokens, the remaining amount is + * sent to the fallback recipient. + */ + function _handleSendAndCall( + SingleHopCallMessage memory message, + uint256 amount + ) internal virtual override { + // Mint the tokens to this contract address. + _mint(address(this), amount); + + // Approve the recipient contract to spend the amount. + _approve(address(this), message.recipientContract, amount); + + // Encode the call to {IERC20SendAndCallReceiver-receiveTokens} + bytes memory payload = abi.encodeCall( + IERC20SendAndCallReceiver.receiveTokens, + ( + message.sourceBlockchainID, + message.originTokenTransferrerAddress, + message.originSenderAddress, + address(this), + amount, + message.recipientPayload + ) + ); + + // Call the recipient contract with the given payload and gas amount. + bool success = CallUtils._callWithExactGas( + message.recipientGasLimit, message.recipientContract, payload + ); + + // Check what the remaining allowance is to transfer to the fallback recipient. + uint256 remainingAllowance = allowance(address(this), message.recipientContract); + + // Reset the recipient contract allowance to 0. + _approve(address(this), message.recipientContract, 0); + + if (success) { + emit CallSucceeded(message.recipientContract, amount); + } else { + emit CallFailed(message.recipientContract, amount); + } + + // Transfer any remaining allowance to the fallback recipient. This will be the + // full amount if the call failed. + if (remainingAllowance > 0) { + _transfer(address(this), message.fallbackRecipient, remainingAllowance); + } + } + + /** + * @notice See {TokenRemote-_handleFees} + * + * If the {feeTokenAddress} is this contract, use the internal ERC20 calls + * to transfer the tokens directly. Otherwise, use the {SafeERC20TransferFrom} library + * to transfer the tokens. + */ + function _handleFees( + address feeTokenAddress, + uint256 feeAmount + ) internal virtual override returns (uint256) { + if (feeAmount == 0) { + return 0; + } + // If the {feeTokenAddress} is this contract, then just deposit the tokens directly. + if (feeTokenAddress == address(this)) { + _spendAllowance(_msgSender(), address(this), feeAmount); + _transfer(_msgSender(), address(this), feeAmount); + return feeAmount; + } + return + SafeERC20TransferFrom.safeTransferFrom(IERC20(feeTokenAddress), _msgSender(), feeAmount); + } +} diff --git a/contracts/ictt/TokenRemote/NativeTokenRemote.sol b/contracts/ictt/TokenRemote/NativeTokenRemote.sol new file mode 100644 index 000000000..ea19ad3f9 --- /dev/null +++ b/contracts/ictt/TokenRemote/NativeTokenRemote.sol @@ -0,0 +1,31 @@ +// (c) 2024, Ava Labs, Inc. All rights reserved. +// See the file LICENSE for licensing terms. + +// SPDX-License-Identifier: Ecosystem + +pragma solidity 0.8.25; + +import {NativeTokenRemoteUpgradeable} from "./NativeTokenRemoteUpgradeable.sol"; +import {TokenRemoteSettings} from "./interfaces/ITokenRemote.sol"; +import {ICMInitializable} from "@utilities/ICMInitializable.sol"; + +/** + * @title NativeTokenRemote + * @notice A non-upgradeable version of {NativeTokenRemoteUpgradeable} that calls the parent upgradeable contract's initialize function. + * @custom:security-contact https://github.com/ava-labs/teleporter/blob/main/SECURITY.md + */ +contract NativeTokenRemote is NativeTokenRemoteUpgradeable { + constructor( + TokenRemoteSettings memory settings, + string memory nativeAssetSymbol, + uint256 initialReserveImbalance, + uint256 burnedFeesReportingRewardPercentage + ) NativeTokenRemoteUpgradeable(ICMInitializable.Allowed) { + initialize( + settings, + nativeAssetSymbol, + initialReserveImbalance, + burnedFeesReportingRewardPercentage + ); + } +} diff --git a/contracts/ictt/TokenRemote/NativeTokenRemoteUpgradeable.sol b/contracts/ictt/TokenRemote/NativeTokenRemoteUpgradeable.sol new file mode 100644 index 000000000..3c00304fc --- /dev/null +++ b/contracts/ictt/TokenRemote/NativeTokenRemoteUpgradeable.sol @@ -0,0 +1,410 @@ +// (c) 2024, Ava Labs, Inc. All rights reserved. +// See the file LICENSE for licensing terms. + +// SPDX-License-Identifier: Ecosystem + +pragma solidity 0.8.25; + +import {TokenRemote} from "./TokenRemote.sol"; +import {TokenRemoteSettings} from "./interfaces/ITokenRemote.sol"; +import {INativeTokenRemote} from "./interfaces/INativeTokenRemote.sol"; +import {INativeSendAndCallReceiver} from "../interfaces/INativeSendAndCallReceiver.sol"; +import {IWrappedNativeToken} from "../interfaces/IWrappedNativeToken.sol"; +import { + SendTokensInput, + SendAndCallInput, + TransferrerMessageType, + TransferrerMessage, + SingleHopSendMessage, + SingleHopCallMessage +} from "../interfaces/ITokenTransferrer.sol"; +import {TeleporterFeeInfo, TeleporterMessageInput} from "@teleporter/ITeleporterMessenger.sol"; +import {INativeMinter} from + "@avalabs/subnet-evm-contracts@1.2.0/contracts/interfaces/INativeMinter.sol"; +import {IERC20} from "@openzeppelin/contracts@5.0.2/token/ERC20/ERC20.sol"; +import {ERC20Upgradeable} from + "@openzeppelin/contracts-upgradeable@5.0.2/token/ERC20/ERC20Upgradeable.sol"; +import {Address} from "@openzeppelin/contracts@5.0.2/utils/Address.sol"; +import {CallUtils} from "@utilities/CallUtils.sol"; +import {TokenScalingUtils} from "@utilities/TokenScalingUtils.sol"; +import {SafeERC20TransferFrom} from "@utilities/SafeERC20TransferFrom.sol"; +import {ICMInitializable} from "@utilities/ICMInitializable.sol"; + +/** + * @title NativeTokenRemoteUpgradeable + * @notice This contract is an {INativeTokenRemote} that receives tokens from its specifed {TokenHome} instance, + * and represents the received tokens as the native token on this chain. + * @custom:security-contact https://github.com/ava-labs/teleporter/blob/main/SECURITY.md + */ +contract NativeTokenRemoteUpgradeable is + INativeTokenRemote, + IWrappedNativeToken, + ERC20Upgradeable, + TokenRemote +{ + using Address for address payable; + + // solhint-disable private-vars-leading-underscore + /** + * @dev Namespace storage slots following the ERC-7201 standard to prevent + * storage collisions between upgradeable contracts. + * + * @custom:storage-location erc7201:avalanche-ictt.storage.NativeTokenRemote + */ + struct NativeTokenRemoteStorage { + /** + * @notice Percentage of burned transaction fees that will be rewarded to a relayer delivering + * the message created by calling calling reportBurnedTxFees(). + */ + uint256 _burnedFeesReportingRewardPercentage; + /** + * @notice Total number of tokens minted by this contract through the native minter precompile. + */ + uint256 _totalMinted; + /** + * @notice The balance of BURNED_TX_FEES_ADDRESS the last time burned fees were reported to the TokenHome instance. + */ + uint256 _lastestBurnedFeesReported; + } + // solhint-enable private-vars-leading-underscore + + /** + * @dev Storage slot computed based off ERC-7201 formula + * keccak256(abi.encode(uint256(keccak256("avalanche-ictt.storage.NativeTokenRemote")) - 1)) & ~bytes32(uint256(0xff)); + */ + bytes32 public constant NATIVE_TOKEN_REMOTE_STORAGE_LOCATION = + 0x69a5f7616543528c4fbe43f410b1034bd6da4ba06c25bedf04617268014cf500; + + // solhint-disable ordering + function _getNativeTokenRemoteStorage() + private + pure + returns (NativeTokenRemoteStorage storage $) + { + // solhint-disable-next-line no-inline-assembly + assembly { + $.slot := NATIVE_TOKEN_REMOTE_STORAGE_LOCATION + } + } + + /** + * @notice The address where the burned transaction fees are credited. + * + * @dev Defined as BLACKHOLE_ADDRESS at + * https://github.com/ava-labs/subnet-evm/blob/v0.6.0/constants/constants.go + * C-Chain value found at https://github.com/ava-labs/coreth/blob/v0.13.2/constants/constants.go + * It is a system-reserved address by default in subnet-evm and coreth, and transfers cannot be sent here manually. + */ + address public constant BURNED_TX_FEES_ADDRESS = 0x0100000000000000000000000000000000000000; + + /** + * @notice The address where native tokens are sent in order to be burned to transfer to other chains. + * + * @dev This address is distinct from {BURNED_TX_FEES_ADDRESS} so that the amount of burned transaction + * fees and burned transferred amounts can be tracked separately. + * This address was chosen arbitrarily. + */ + address public constant BURNED_FOR_TRANSFER_ADDRESS = 0x0100000000000000000000000000000000010203; + + /** + * @notice Address used to blackhole funds on the home chain, effectively burning them. + * + * @dev When reporting burned transaction fee amounts, this address is used as the recipient + * address for the funds to be sent to be burned on the home chain. + * This address was chosen arbitrarily. + */ + address public constant HOME_CHAIN_BURN_ADDRESS = 0x0100000000000000000000000000000000010203; + + /** + * @notice The native minter precompile. + */ + INativeMinter public constant NATIVE_MINTER = + INativeMinter(0x0200000000000000000000000000000000000001); + + /** + * @dev When modifier is used, the function can only be called after the contract is fully collelateralized, + * accounting for the initialReserveImbalance. + */ + modifier onlyWhenCollateralized() { + require(getIsCollateralized(), "NativeTokenRemote: contract undercollateralized"); + _; + } + + constructor(ICMInitializable init) { + if (init == ICMInitializable.Disallowed) { + _disableInitializers(); + } + } + + /** + * @notice Initializes this token TokenRemote instance to receive tokens from the specified TokenHome instance, + * and represents the received tokens with the native token on this chain. + * @param settings Constructor settings for this token TokenRemote instance. + * @param nativeAssetSymbol The symbol of the native asset. + * @param initialReserveImbalance The initial reserve imbalance that must be collateralized before minting. + * @param burnedFeesReportingRewardPercentage The percentage of burned transaction fees + * that will be rewarded to sender of the report. + */ + function initialize( + TokenRemoteSettings memory settings, + string memory nativeAssetSymbol, + uint256 initialReserveImbalance, + uint256 burnedFeesReportingRewardPercentage + ) public initializer { + __NativeTokenRemote_init( + settings, + nativeAssetSymbol, + initialReserveImbalance, + burnedFeesReportingRewardPercentage + ); + } + + // solhint-disable-next-line func-name-mixedcase + function __NativeTokenRemote_init( + TokenRemoteSettings memory settings, + string memory nativeAssetSymbol, + uint256 initialReserveImbalance, + uint256 burnedFeesReportingRewardPercentage + ) internal onlyInitializing { + require(initialReserveImbalance != 0, "NativeTokenRemote: zero initial reserve imbalance"); + __ERC20_init(nativeAssetSymbol, nativeAssetSymbol); + __TokenRemote_init(settings, initialReserveImbalance, 18); + __NativeTokenRemote_init_unchained(burnedFeesReportingRewardPercentage); + } + + // solhint-disable-next-line func-name-mixedcase + function __NativeTokenRemote_init_unchained(uint256 burnedFeesReportingRewardPercentage) + internal + onlyInitializing + { + require(burnedFeesReportingRewardPercentage < 100, "NativeTokenRemote: invalid percentage"); + _getNativeTokenRemoteStorage()._burnedFeesReportingRewardPercentage = + burnedFeesReportingRewardPercentage; + } + // solhint-enable ordering + + /** + * @dev Receives native token with no calldata provided. The tokens are credited to the sender's + * wrapped native token balance. + */ + receive() external payable { + deposit(); + } + + /** + * @dev Fallback function for receiving native tokens. The tokens are credited to the sender's + * wrapped native token balance. + */ + fallback() external payable { + deposit(); + } + + /** + * @dev See {INativeTokenTransferrer-send}. + */ + function send(SendTokensInput calldata input) external payable onlyWhenCollateralized { + _send(input, msg.value); + } + + /** + * @dev See {INativeTokenTransferrer-sendAndCall} + */ + function sendAndCall(SendAndCallInput calldata input) external payable onlyWhenCollateralized { + _sendAndCall(input, msg.value); + } + + /** + * @dev See {INativeTokenRemote-reportBurnedTxFees}. + */ + function reportBurnedTxFees(uint256 requiredGasLimit) external sendNonReentrant { + NativeTokenRemoteStorage storage $ = _getNativeTokenRemoteStorage(); + uint256 burnAddressBalance = BURNED_TX_FEES_ADDRESS.balance; + require( + burnAddressBalance > $._lastestBurnedFeesReported, + "NativeTokenRemote: burn address balance not greater than last report" + ); + + uint256 burnedDifference = burnAddressBalance - $._lastestBurnedFeesReported; + uint256 reward = (burnedDifference * $._burnedFeesReportingRewardPercentage) / 100; + uint256 burnedTxFees = burnedDifference - reward; + $._lastestBurnedFeesReported = burnAddressBalance; + + if (reward > 0) { + // Re-mint the native tokens to this contract, and then deposit them to be the wrapped + // native token (ERC20) representation, such that they can be used as a Teleporter + // message fee. + _mintNativeCoin(address(this), reward); + _mint(address(this), reward); + } + + // Check that the scaled amount on the TokenHome instance will be non-zero. + require( + TokenScalingUtils.removeTokenScale( + getTokenMultiplier(), getMultiplyOnRemote(), burnedTxFees + ) > 0, + "NativeTokenRemote: zero scaled amount to report burn" + ); + + // Report the burned amount to the TokenHome instance. + TransferrerMessage memory message = TransferrerMessage({ + messageType: TransferrerMessageType.SINGLE_HOP_SEND, + payload: abi.encode( + SingleHopSendMessage({recipient: HOME_CHAIN_BURN_ADDRESS, amount: burnedTxFees}) + ) + }); + + bytes32 messageID = _sendTeleporterMessage( + TeleporterMessageInput({ + destinationBlockchainID: getTokenHomeBlockchainID(), + destinationAddress: getTokenHomeAddress(), + feeInfo: TeleporterFeeInfo({feeTokenAddress: address(this), amount: reward}), + requiredGasLimit: requiredGasLimit, + allowedRelayerAddresses: new address[](0), + message: abi.encode(message) + }) + ); + + emit ReportBurnedTxFees({teleporterMessageID: messageID, feesBurned: burnedTxFees}); + } + + /** + * @dev See {IWrappedNativeToken-withdraw}. + * + * Note: {IWrappedNativeToken-withdraw} should not be confused with {TokenRemote-_withdraw}. + * {IWrappedNativeToken-withdraw} is the external method to redeem a wrapped native token (ERC20) balance + * for the native token itself. {TokenRemote-_withdraw} is the internal method used when + * processing token transfers. + */ + function withdraw(uint256 amount) external { + emit Withdrawal(_msgSender(), amount); + _burn(_msgSender(), amount); + payable(_msgSender()).sendValue(amount); + } + + /** + * @dev See {IWrappedNativeToken-deposit}. + */ + function deposit() public payable { + emit Deposit(_msgSender(), msg.value); + _mint(_msgSender(), msg.value); + } + + /** + * @dev See {INativeTokenRemote-totalNativeAssetSupply}. + * + * Note: {INativeTokenRemote-totalNativeAssetSupply} should not be confused with {IERC20-totalSupply} + * {INativeTokenRemote-totalNativeAssetSupply} returns the supply of the native asset of the chain, + * accounting for the amounts that have been transferred in and out of the chain as well as burnt transaction + * fees. The {initialReserveBalance} is included in this supply since it is in circulation on this + * chain even prior to it being backed by collateral on the TokenHome instance. + * {IERC20-totalSupply} returns the supply of the native asset held by this contract + * that is represented as an ERC20. + */ + function totalNativeAssetSupply() public view returns (uint256) { + NativeTokenRemoteStorage storage $ = _getNativeTokenRemoteStorage(); + uint256 burned = BURNED_TX_FEES_ADDRESS.balance + BURNED_FOR_TRANSFER_ADDRESS.balance; + uint256 created = $._totalMinted + getInitialReserveImbalance(); + return created - burned; + } + + function getTotalMinted() external view returns (uint256) { + return _getNativeTokenRemoteStorage()._totalMinted; + } + + /** + * @dev See {TokenRemote-_withdraw} + */ + function _withdraw(address recipient, uint256 amount) internal virtual override { + emit TokensWithdrawn(recipient, amount); + _mintNativeCoin(recipient, amount); + } + + /** + * @dev See {TokenRemote-_burn} + * + * This is the internal {_burn} method called when transferring tokens to another chain. + * The tokens to be burnt are already held by this contract. To burn the tokens, send the + * native token amount to the BURNED_FOR_TRANSFER_ADDRESS. + */ + function _burn(uint256 amount) internal virtual override returns (uint256) { + payable(BURNED_FOR_TRANSFER_ADDRESS).sendValue(amount); + return amount; + } + + /** + * @dev See {TokenRemote-_handleSendAndCall} + * + * Mints the tokens to this contract, and send them to the recipient contract as a + * part of the call to {INativeSendAndCallReceiver-receiveTokens} on the recipient contract. + * If the call fails, the amount is sent to the fallback recipient. + * + * Note: If the recipient contract does not properly handle the full msg.value sent, + * the balance can be locked in the recipient contract. Receiving contracts must make + * sure to properly handle the balance to ensure it does not get locked improperly. + */ + function _handleSendAndCall( + SingleHopCallMessage memory message, + uint256 amount + ) internal virtual override { + // Mint the tokens to this contract address. + _mintNativeCoin(address(this), amount); + + // Encode the call to {INativeSendAndCallReceiver-receiveTokens} + bytes memory payload = abi.encodeCall( + INativeSendAndCallReceiver.receiveTokens, + ( + message.sourceBlockchainID, + message.originTokenTransferrerAddress, + message.originSenderAddress, + message.recipientPayload + ) + ); + + // Call the recipient contract with the given payload, gas amount, and value. + bool success = CallUtils._callWithExactGasAndValue( + message.recipientGasLimit, amount, message.recipientContract, payload + ); + + // If the call failed, send the funds to the fallback recipient. + if (success) { + emit CallSucceeded(message.recipientContract, amount); + } else { + emit CallFailed(message.recipientContract, amount); + payable(message.fallbackRecipient).sendValue(amount); + } + } + + /** + * @notice See {TokenRemote-_handleFees} + * + * If the {feeTokenAddress} is this contract, use the internal ERC20 calls + * to transfer the tokens directly. Otherwise, use the {SafeERC20TransferFrom} library + * to transfer the tokens. + */ + function _handleFees( + address feeTokenAddress, + uint256 feeAmount + ) internal virtual override returns (uint256) { + if (feeAmount == 0) { + return 0; + } + // If the {feeTokenAddress} is this contract, then just deposit the tokens directly. + if (feeTokenAddress == address(this)) { + _spendAllowance(_msgSender(), address(this), feeAmount); + _transfer(_msgSender(), address(this), feeAmount); + return feeAmount; + } + return + SafeERC20TransferFrom.safeTransferFrom(IERC20(feeTokenAddress), _msgSender(), feeAmount); + } + + /** + * @dev Mints coins to the recipient through the NativeMinter precompile. + */ + function _mintNativeCoin(address recipient, uint256 amount) private { + NativeTokenRemoteStorage storage $ = _getNativeTokenRemoteStorage(); + $._totalMinted += amount; + // Calls NativeMinter precompile through INativeMinter interface. + NATIVE_MINTER.mintNativeCoin(recipient, amount); + } +} diff --git a/contracts/ictt/TokenRemote/TokenRemote.sol b/contracts/ictt/TokenRemote/TokenRemote.sol new file mode 100644 index 000000000..7a9924cc7 --- /dev/null +++ b/contracts/ictt/TokenRemote/TokenRemote.sol @@ -0,0 +1,712 @@ +// (c) 2024, Ava Labs, Inc. All rights reserved. +// See the file LICENSE for licensing terms. + +// SPDX-License-Identifier: Ecosystem + +pragma solidity 0.8.25; + +import {ITokenRemote, TokenRemoteSettings} from "./interfaces/ITokenRemote.sol"; +import { + SendTokensInput, + SendAndCallInput, + TransferrerMessageType, + TransferrerMessage, + SingleHopSendMessage, + SingleHopCallMessage, + MultiHopSendMessage, + MultiHopCallMessage, + RegisterRemoteMessage +} from "../interfaces/ITokenTransferrer.sol"; +import {TeleporterMessageInput, TeleporterFeeInfo} from "@teleporter/ITeleporterMessenger.sol"; +import {TeleporterRegistryOwnableAppUpgradeable} from + "@teleporter/registry/TeleporterRegistryOwnableAppUpgradeable.sol"; +import {IWarpMessenger} from + "@avalabs/subnet-evm-contracts@1.2.0/contracts/interfaces/IWarpMessenger.sol"; +import {SendReentrancyGuardUpgradeable} from "@utilities/SendReentrancyGuardUpgradeable.sol"; +import {TokenScalingUtils} from "@utilities/TokenScalingUtils.sol"; + +/** + * @title TokenRemote + * @dev Abstract contract for a token transferrer remote that receives tokens from its specified token TokenHome instance, and + * allows for burning that token to redeem the backing asset on the home chain, or transferring to other remotes. + * + * @custom:security-contact https://github.com/ava-labs/teleporter/blob/main/SECURITY.md + */ +abstract contract TokenRemote is + ITokenRemote, + TeleporterRegistryOwnableAppUpgradeable, + SendReentrancyGuardUpgradeable +{ + // solhint-disable private-vars-leading-underscore + /** + * @dev Namespace storage slots following the ERC-7201 standard to prevent + * storage collisions between upgradeable contracts. + * + * @custom:storage-location erc7201:avalanche-ictt.storage.TokenRemote + */ + struct TokenRemoteStorage { + /// @notice The blockchain ID of the chain this contract is deployed on. + bytes32 _blockchainID; + /// @notice The blockchain ID of the TokenHome instance this contract receives tokens from. + bytes32 _tokenHomeBlockchainID; + /// @notice The address of the TokenHome instance this contract receives tokens from on the {tokenHomeBlockchainID}. + address _tokenHomeAddress; + /** + * @notice The number of decimal places in the denomination of the home + * token. + * @dev Used to derive tokenMultiplier and multiplyOnRemote. + */ + uint8 _homeTokenDecimals; + /** + * @notice The number of decimal places in the denomination of the remote token. + * @dev Used to derive tokenMultiplier and multiplyOnRemote. + */ + uint8 _tokenDecimals; + /** + * @notice tokenMultiplier allows this contract to scale the number of tokens it sends/receives to/from + * its token TokenHome instance. + * + * @dev This is used to normalize the number of decimal places between the token home asset and the + * token remote asset. It is derived from home and remote token decimals values passed in the constructor. + */ + uint256 _tokenMultiplier; + /** + * @notice If {multiplyOnRemote} is true, the home token amount will be multiplied by {tokenMultiplier} when tokens + * are transferred from the home into this remote, and divided by {tokenMultiplier} when tokens are transferred from + * this remote back to its home. + * If {multiplyOnRemote} is false, the home token amount value will be divided by {tokenMultiplier} when tokens + * are transferred from the home into this remote, and multiplied by {tokenMultiplier} when tokens are transferred + * from this remote back to its home. + */ + bool _multiplyOnRemote; + /** + * @notice Initial reserve imbalance that the token for this TokenRemote instance starts with. The home contract must + * collateralize a corresonding amount of home tokens before tokens can be minted on this contract. + */ + uint256 _initialReserveImbalance; + /** + * @notice Whether or not the contract is known to be fully collateralized. + */ + bool _isCollateralized; + /** + * @notice Whether or not the contract is known to be registered with its specified home contract. + * This is set to true when the first message is received from the home contract. Note that {isRegistered} + * will still be false after the remote contract is registered on the home contract until the first + * message is received back from that contract. + */ + bool _isRegistered; + } + // solhint-enable private-vars-leading-underscore + + /** + * @dev Storage slot computed based off ERC-7201 formula + * keccak256(abi.encode(uint256(keccak256("avalanche-ictt.storage.TokenRemote")) - 1)) & ~bytes32(uint256(0xff)); + */ + bytes32 public constant TOKEN_REMOTE_STORAGE_LOCATION = + 0x600d6a9b283d1eda563de594ce4843869b6f128a4baa222422ed94a60b0cef00; + + // solhint-disable ordering + function _getTokenRemoteStorage() private pure returns (TokenRemoteStorage storage $) { + // solhint-disable-next-line no-inline-assembly + assembly { + $.slot := TOKEN_REMOTE_STORAGE_LOCATION + } + } + + /** + * @notice Fixed gas cost for executing a multi-hop send message on the token home contract, + * before forwarding to the destination token TokenRemote instance. Note that for certain home implementations, + * a higher required gas limit may be needed depending on the gas expenditure of the external call to the + * token contract to approve the spending of the optional secondary fee amount. + */ + uint256 public constant MULTI_HOP_SEND_REQUIRED_GAS = 340_000; + + /** + * @notice Fixed gas cost for executing a multi-hop call message on the token home contract, + * before forwarding to the destination token TokenRemote instance. Note that for certain home implementations, + * a higher required gas limit may be needed depending on the gas expenditure of the external call to the + * token contract to approve the spending of the optional secondary fee amount. + */ + uint256 public constant MULTI_HOP_CALL_REQUIRED_GAS = 350_000; + + /** + * @notice The amount of gas added to the required gas limit for a multi-hop call message + * for each 32-byte word of the recipient payload. + */ + uint256 public constant MULTI_HOP_CALL_GAS_PER_WORD = 1_500; + + /** + * @notice Fixed gas cost for registering the remote contract on the home contract. + */ + uint256 public constant REGISTER_REMOTE_REQUIRED_GAS = 130_000; + + /** + * @notice Initializes this token TokenRemote instance. + * @param settings The settings for the token TokenRemote instance. + * @param initialReserveImbalance_ The initial reserve imbalance that must be collateralized before minting. + * @param tokenDecimals The number of decimal places in the denomination of the remote token. + */ + // solhint-disable ordering + // solhint-disable-next-line func-name-mixedcase + function __TokenRemote_init( + TokenRemoteSettings memory settings, + uint256 initialReserveImbalance_, + uint8 tokenDecimals + ) internal onlyInitializing { + __TeleporterRegistryOwnableApp_init( + settings.teleporterRegistryAddress, + settings.teleporterManager, + settings.minTeleporterVersion + ); + __SendReentrancyGuard_init(); + __TokenRemote_init_unchained(settings, initialReserveImbalance_, tokenDecimals); + } + + // solhint-disable-next-line func-name-mixedcase + function __TokenRemote_init_unchained( + TokenRemoteSettings memory settings, + uint256 initialReserveImbalance_, + uint8 tokenDecimals + ) internal onlyInitializing { + TokenRemoteStorage storage $ = _getTokenRemoteStorage(); + $._blockchainID = + IWarpMessenger(0x0200000000000000000000000000000000000005).getBlockchainID(); + require( + settings.tokenHomeBlockchainID != bytes32(0), + "TokenRemote: zero token home blockchain ID" + ); + require( + settings.tokenHomeBlockchainID != $._blockchainID, + "TokenRemote: cannot deploy to same blockchain as token home" + ); + require(settings.tokenHomeAddress != address(0), "TokenRemote: zero token home address"); + require( + settings.tokenHomeDecimals <= TokenScalingUtils.MAX_TOKEN_DECIMALS, + "TokenRemote: token home decimals too high" + ); + require( + tokenDecimals <= TokenScalingUtils.MAX_TOKEN_DECIMALS, + "TokenRemote: token decimals too high" + ); + $._tokenHomeBlockchainID = settings.tokenHomeBlockchainID; + $._tokenHomeAddress = settings.tokenHomeAddress; + $._initialReserveImbalance = initialReserveImbalance_; + $._isCollateralized = initialReserveImbalance_ == 0; + $._homeTokenDecimals = settings.tokenHomeDecimals; + $._tokenDecimals = tokenDecimals; + ($._tokenMultiplier, $._multiplyOnRemote) = + TokenScalingUtils.deriveTokenMultiplierValues(settings.tokenHomeDecimals, tokenDecimals); + } + // solhint-enable ordering + + /** + * @notice Sends a message to the contract's specified token TokenHome instance to register this remote + * instance. TokenRemote instances must be registered with their home contract prior to being able to receive + * tokens from them. + */ + function registerWithHome(TeleporterFeeInfo calldata feeInfo) external virtual { + TokenRemoteStorage storage $ = _getTokenRemoteStorage(); + require(!$._isRegistered, "TokenRemote: already registered"); + + // Send a message to the token TokenHome instance to register this TokenRemote instance. + RegisterRemoteMessage memory registerMessage = RegisterRemoteMessage({ + initialReserveImbalance: $._initialReserveImbalance, + homeTokenDecimals: $._homeTokenDecimals, + remoteTokenDecimals: $._tokenDecimals + }); + TransferrerMessage memory message = TransferrerMessage({ + messageType: TransferrerMessageType.REGISTER_REMOTE, + payload: abi.encode(registerMessage) + }); + + uint256 feeAmount = _handleFees(feeInfo.feeTokenAddress, feeInfo.amount); + _sendTeleporterMessage( + TeleporterMessageInput({ + destinationBlockchainID: $._tokenHomeBlockchainID, + destinationAddress: $._tokenHomeAddress, + feeInfo: TeleporterFeeInfo({feeTokenAddress: feeInfo.feeTokenAddress, amount: feeAmount}), + requiredGasLimit: REGISTER_REMOTE_REQUIRED_GAS, + allowedRelayerAddresses: new address[](0), + message: abi.encode(message) + }) + ); + } + + /** + * @dev Calculates the number of 32-byte words required to fit a payload of a given length. + * The payloads are padded to have a length that is a multiple of 32. + */ + function calculateNumWords(uint256 payloadSize) public pure returns (uint256) { + // Add 31 to effectively round up to the nearest multiple of 32. + // Right-shift by 5 bits to divide by 32. + return (payloadSize + 31) >> 5; + } + + function getIsCollateralized() public view returns (bool) { + TokenRemoteStorage storage $ = _getTokenRemoteStorage(); + return $._isCollateralized; + } + + function getTokenMultiplier() public view returns (uint256) { + TokenRemoteStorage storage $ = _getTokenRemoteStorage(); + return $._tokenMultiplier; + } + + function getMultiplyOnRemote() public view returns (bool) { + TokenRemoteStorage storage $ = _getTokenRemoteStorage(); + return $._multiplyOnRemote; + } + + function getTokenHomeBlockchainID() public view returns (bytes32) { + TokenRemoteStorage storage $ = _getTokenRemoteStorage(); + return $._tokenHomeBlockchainID; + } + + function getTokenHomeAddress() public view returns (address) { + TokenRemoteStorage storage $ = _getTokenRemoteStorage(); + return $._tokenHomeAddress; + } + + function getInitialReserveImbalance() public view returns (uint256) { + TokenRemoteStorage storage $ = _getTokenRemoteStorage(); + return $._initialReserveImbalance; + } + + function getBlockchainID() public view returns (bytes32) { + TokenRemoteStorage storage $ = _getTokenRemoteStorage(); + return $._blockchainID; + } + // solhint-enable ordering + + /** + * @notice Sends tokens to the specified destination. + * + * @dev Burns the transferred amount, and uses Teleporter to send a cross chain message to the token TokenHome instance. + * Tokens can be sent the token TokenHome instance, or to any TokenRemote instance registered with the home other than this one. + */ + function _send(SendTokensInput calldata input, uint256 amount) internal sendNonReentrant { + TokenRemoteStorage storage $ = _getTokenRemoteStorage(); + _validateSendTokensInput(input); + if (input.destinationBlockchainID == $._tokenHomeBlockchainID) { + _processSend(input, amount); + } else { + _processSendMultiHop(input, amount); + } + } + + /** + * @notice Sends tokens to the specified recipient contract on the destination blockchain ID by + * calling the {receiveTokens} method of the respective recipient. + * + * @dev Burns the transferred amount, and uses Teleporter to send a cross chain message. + * Tokens and data can be sent to the token TokenHome instance, or to any TokenRemote instance registered with the home + * other than this one. + */ + function _sendAndCall( + SendAndCallInput calldata input, + uint256 amount + ) internal sendNonReentrant { + TokenRemoteStorage storage $ = _getTokenRemoteStorage(); + _validateSendAndCallInput(input); + + if (input.destinationBlockchainID == $._tokenHomeBlockchainID) { + return _processSendAndCall(input, amount); + } else { + return _processSendAndCallMultiHop(input, amount); + } + } + + /** + * @notice Handles receiving messages from the token TokenHome instance. The supported message types are + * single-hop sends, and single-hop calls. + * + * @dev See {ITeleporterUpgradeable-_receiveTeleporterMessage} + */ + function _receiveTeleporterMessage( + bytes32 sourceBlockchainID, + address originSenderAddress, + bytes memory message + ) internal override { + TokenRemoteStorage storage $ = _getTokenRemoteStorage(); + require( + sourceBlockchainID == $._tokenHomeBlockchainID, + "TokenRemote: invalid source blockchain ID" + ); + require( + originSenderAddress == $._tokenHomeAddress, "TokenRemote: invalid origin sender address" + ); + TransferrerMessage memory transferrerMessage = abi.decode(message, (TransferrerMessage)); + + // If the contract was not previously known to be registered or collateralized, it is now given that + // the home has sent a message to mint funds. + if (!$._isRegistered || !$._isCollateralized) { + $._isRegistered = true; + $._isCollateralized = true; + } + + // Remote contracts should only ever receive single-hop messages because + // multi-hop messages are always routed through the home contract. + if (transferrerMessage.messageType == TransferrerMessageType.SINGLE_HOP_SEND) { + SingleHopSendMessage memory payload = + abi.decode(transferrerMessage.payload, (SingleHopSendMessage)); + _withdraw(payload.recipient, payload.amount); + } else if (transferrerMessage.messageType == TransferrerMessageType.SINGLE_HOP_CALL) { + // The {sourceBlockchainID}, and {originSenderAddress} specified in the message + // payload will not match the sender of this Teleporter message in the case of a + // multi-hop message. Since Teleporter messages are only received from the specified + // token TokenHome instance, no additional authentication is needed on the payload values. + SingleHopCallMessage memory payload = + abi.decode(transferrerMessage.payload, (SingleHopCallMessage)); + _handleSendAndCall(payload, payload.amount); + } else { + revert("TokenRemote: invalid message type"); + } + } + + /** + * @notice Withdraws tokens to the recipient address. + * @param recipient The address to withdraw tokens to + * @param amount The amount of tokens to withdraw + */ + function _withdraw(address recipient, uint256 amount) internal virtual; + + /** + * @notice Burns the user's tokens to initiate a token transfer. + * @param amount The amount of tokens to burn + * @return The amount of tokens burned, which is the amount to credit + * for the token transfer. + */ + function _burn(uint256 amount) internal virtual returns (uint256); + + /** + * @notice Processes a send and call message by calling the recipient contract. + * @param message The send and call message include recipient calldata + * @param amount The amount of tokens to be sent to the recipient. This amount is assumed to be + * already scaled to the local denomination of this contract. + */ + function _handleSendAndCall( + SingleHopCallMessage memory message, + uint256 amount + ) internal virtual; + + /** + * @notice Handles fees sent to this contract for a token transfer. + * The fee is expected to be approved by the sender for this token transfer contract to use, + * and will be transferred to this contract to allocate for the token transfer. + * @param feeTokenAddress The address of the fee token + * @param feeAmount The amount of the fee + */ + function _handleFees( + address feeTokenAddress, + uint256 feeAmount + ) internal virtual returns (uint256); + + /** + * @dev Prepares tokens to be sent to another chain by handling the + * deposit, burning, and checking that the corresonding amount of + * home tokens is greater than zero. + */ + function _prepareSend( + uint256 amount, + address primaryFeeTokenAddress, + uint256 primaryFee, + uint256 secondaryFee + ) private returns (uint256, uint256) { + TokenRemoteStorage storage $ = _getTokenRemoteStorage(); + + // Burn the amount of tokens that will be transferred. + amount = _burn(amount); + + // Transfer the primary fee to pay for fees on the first hop. + // The user can specify this contract as {primaryFeeTokenAddress}, + // in which case the fee will be paid on top of the transferred amount. + primaryFee = _handleFees(primaryFeeTokenAddress, primaryFee); + + // The transferred amount must cover the secondary fee, because the secondary fee + // is directly subtracted from the transferred amount on the intermediate (home) chain + // performing the multi-hop, before forwarding to the final destination TokenRemote instance. + require( + TokenScalingUtils.removeTokenScale($._tokenMultiplier, $._multiplyOnRemote, amount) + > TokenScalingUtils.removeTokenScale( + $._tokenMultiplier, $._multiplyOnRemote, secondaryFee + ), + "TokenRemote: insufficient tokens to transfer" + ); + + // Return the amount in this contract's local denomination and the primary fee. + return (amount, primaryFee); + } + + /** + * @dev Sends tokens to the specified destination. + */ + function _processSend(SendTokensInput calldata input, uint256 amount) private { + TokenRemoteStorage storage $ = _getTokenRemoteStorage(); + _validateSingleHopInput( + input.destinationTokenTransferrerAddress, input.secondaryFee, input.multiHopFallback + ); + + uint256 primaryFee; + (amount, primaryFee) = _prepareSend({ + amount: amount, + primaryFeeTokenAddress: input.primaryFeeTokenAddress, + primaryFee: input.primaryFee, + secondaryFee: input.secondaryFee + }); + + TransferrerMessage memory message = TransferrerMessage({ + messageType: TransferrerMessageType.SINGLE_HOP_SEND, + payload: abi.encode(SingleHopSendMessage({recipient: input.recipient, amount: amount})) + }); + + bytes32 messageID = _sendTeleporterMessage( + TeleporterMessageInput({ + destinationBlockchainID: $._tokenHomeBlockchainID, + destinationAddress: $._tokenHomeAddress, + feeInfo: TeleporterFeeInfo({ + feeTokenAddress: input.primaryFeeTokenAddress, + amount: primaryFee + }), + requiredGasLimit: input.requiredGasLimit, + allowedRelayerAddresses: new address[](0), + message: abi.encode(message) + }) + ); + + emit TokensSent(messageID, _msgSender(), input, amount); + } + + /** + * @dev Sends tokens to the specified destination via multi-hop. + */ + function _processSendMultiHop(SendTokensInput calldata input, uint256 amount) private { + TokenRemoteStorage storage $ = _getTokenRemoteStorage(); + _validateMultiHopInput( + input.destinationBlockchainID, + input.destinationTokenTransferrerAddress, + input.multiHopFallback + ); + + uint256 primaryFee; + (amount, primaryFee) = _prepareSend({ + amount: amount, + primaryFeeTokenAddress: input.primaryFeeTokenAddress, + primaryFee: input.primaryFee, + secondaryFee: input.secondaryFee + }); + + TransferrerMessage memory message = TransferrerMessage({ + messageType: TransferrerMessageType.MULTI_HOP_SEND, + payload: abi.encode( + MultiHopSendMessage({ + destinationBlockchainID: input.destinationBlockchainID, + destinationTokenTransferrerAddress: input.destinationTokenTransferrerAddress, + recipient: input.recipient, + amount: amount, + secondaryFee: input.secondaryFee, + secondaryGasLimit: input.requiredGasLimit, + multiHopFallback: input.multiHopFallback + }) + ) + }); + + bytes32 messageID = _sendTeleporterMessage( + TeleporterMessageInput({ + destinationBlockchainID: $._tokenHomeBlockchainID, + destinationAddress: $._tokenHomeAddress, + feeInfo: TeleporterFeeInfo({ + feeTokenAddress: input.primaryFeeTokenAddress, + amount: primaryFee + }), + requiredGasLimit: MULTI_HOP_SEND_REQUIRED_GAS, + allowedRelayerAddresses: new address[](0), + message: abi.encode(message) + }) + ); + + emit TokensSent(messageID, _msgSender(), input, amount); + } + + /** + * @dev Sends tokens to the specified recipient contract on the destination blockchain ID by + * calling the {receiveTokens} method of the respective recipient. + */ + function _processSendAndCall(SendAndCallInput calldata input, uint256 amount) private { + TokenRemoteStorage storage $ = _getTokenRemoteStorage(); + _validateSingleHopInput( + input.destinationTokenTransferrerAddress, input.secondaryFee, input.multiHopFallback + ); + + uint256 primaryFee; + (amount, primaryFee) = _prepareSend({ + amount: amount, + primaryFeeTokenAddress: input.primaryFeeTokenAddress, + primaryFee: input.primaryFee, + secondaryFee: input.secondaryFee + }); + + TransferrerMessage memory message = TransferrerMessage({ + messageType: TransferrerMessageType.SINGLE_HOP_CALL, + payload: abi.encode( + SingleHopCallMessage({ + sourceBlockchainID: $._blockchainID, + originTokenTransferrerAddress: address(this), + originSenderAddress: _msgSender(), + recipientContract: input.recipientContract, + amount: amount, + recipientPayload: input.recipientPayload, + recipientGasLimit: input.recipientGasLimit, + fallbackRecipient: input.fallbackRecipient + }) + ) + }); + + // Send message to the token TokenHome instance. + bytes32 messageID = _sendTeleporterMessage( + TeleporterMessageInput({ + destinationBlockchainID: $._tokenHomeBlockchainID, + destinationAddress: $._tokenHomeAddress, + feeInfo: TeleporterFeeInfo({ + feeTokenAddress: input.primaryFeeTokenAddress, + amount: primaryFee + }), + requiredGasLimit: input.requiredGasLimit, + allowedRelayerAddresses: new address[](0), + message: abi.encode(message) + }) + ); + + emit TokensAndCallSent(messageID, _msgSender(), input, amount); + } + + /** + * @dev Sends tokens to the specified recipient contract on the destination blockchain ID by + * calling the {receiveTokens} method of the respective recipient. + */ + function _processSendAndCallMultiHop(SendAndCallInput calldata input, uint256 amount) private { + TokenRemoteStorage storage $ = _getTokenRemoteStorage(); + _validateMultiHopInput( + input.destinationBlockchainID, + input.destinationTokenTransferrerAddress, + input.multiHopFallback + ); + + uint256 primaryFee; + (amount, primaryFee) = _prepareSend({ + amount: amount, + primaryFeeTokenAddress: input.primaryFeeTokenAddress, + primaryFee: input.primaryFee, + secondaryFee: input.secondaryFee + }); + + TransferrerMessage memory message = TransferrerMessage({ + messageType: TransferrerMessageType.MULTI_HOP_CALL, + payload: abi.encode( + MultiHopCallMessage({ + originSenderAddress: _msgSender(), + destinationBlockchainID: input.destinationBlockchainID, + destinationTokenTransferrerAddress: input.destinationTokenTransferrerAddress, + recipientContract: input.recipientContract, + amount: amount, + recipientPayload: input.recipientPayload, + recipientGasLimit: input.recipientGasLimit, + fallbackRecipient: input.fallbackRecipient, + multiHopFallback: input.multiHopFallback, + secondaryRequiredGasLimit: input.requiredGasLimit, + secondaryFee: input.secondaryFee + }) + ) + }); + + // The required gas limit for the first message sent back to the TokenHome instance + // needs to account for the number of words in the payload. Each word uses additional + // gas to include in the message to the final destination chain. + uint256 messageRequiredGasLimit = MULTI_HOP_CALL_REQUIRED_GAS + + (calculateNumWords(input.recipientPayload.length) * MULTI_HOP_CALL_GAS_PER_WORD); + + // Send message to the token TokenHome instance + bytes32 messageID = _sendTeleporterMessage( + TeleporterMessageInput({ + destinationBlockchainID: $._tokenHomeBlockchainID, + destinationAddress: $._tokenHomeAddress, + feeInfo: TeleporterFeeInfo({ + feeTokenAddress: input.primaryFeeTokenAddress, + amount: primaryFee + }), + requiredGasLimit: messageRequiredGasLimit, + allowedRelayerAddresses: new address[](0), + message: abi.encode(message) + }) + ); + + emit TokensAndCallSent(messageID, _msgSender(), input, amount); + } + + function _validateSingleHopInput( + address destinationTokenTransferrerAddress, + uint256 secondaryFee, + address multiHopFallback + ) private view { + TokenRemoteStorage storage $ = _getTokenRemoteStorage(); + require( + destinationTokenTransferrerAddress == $._tokenHomeAddress, + "TokenRemote: invalid destination token transferrer address" + ); + require(secondaryFee == 0, "TokenRemote: non-zero secondary fee"); + require(multiHopFallback == address(0), "TokenRemote: non-zero multi-hop fallback"); + } + + function _validateMultiHopInput( + bytes32 destinationBlockchainID, + address destinationTokenTransferrerAddress, + address multiHopFallback + ) private view { + TokenRemoteStorage storage $ = _getTokenRemoteStorage(); + // If the destination blockchain ID is this blockchain, the destination + // token transferrer address must be a different contract. This is a multi-hop case to + // a different token transfer contract on this chain. + if (destinationBlockchainID == $._blockchainID) { + require( + destinationTokenTransferrerAddress != address(this), + "TokenRemote: invalid destination token transferrer address" + ); + } + require(multiHopFallback != address(0), "TokenRemote: zero multi-hop fallback"); + } + + function _validateSendTokensInput(SendTokensInput calldata input) private pure { + require(input.recipient != address(0), "TokenRemote: zero recipient address"); + require(input.requiredGasLimit > 0, "TokenRemote: zero required gas limit"); + require( + input.destinationBlockchainID != bytes32(0), + "TokenRemote: zero destination blockchain ID" + ); + require( + input.destinationTokenTransferrerAddress != address(0), + "TokenRemote: zero destination token transferrer address" + ); + } + + function _validateSendAndCallInput(SendAndCallInput calldata input) private pure { + require( + input.destinationBlockchainID != bytes32(0), + "TokenRemote: zero destination blockchain ID" + ); + require( + input.destinationTokenTransferrerAddress != address(0), + "TokenRemote: zero destination token transferrer address" + ); + require( + input.recipientContract != address(0), "TokenRemote: zero recipient contract address" + ); + require(input.requiredGasLimit > 0, "TokenRemote: zero required gas limit"); + require(input.recipientGasLimit > 0, "TokenRemote: zero recipient gas limit"); + require( + input.recipientGasLimit < input.requiredGasLimit, + "TokenRemote: invalid recipient gas limit" + ); + require( + input.fallbackRecipient != address(0), "TokenRemote: zero fallback recipient address" + ); + } +} diff --git a/contracts/ictt/TokenRemote/interfaces/INativeTokenRemote.sol b/contracts/ictt/TokenRemote/interfaces/INativeTokenRemote.sol new file mode 100644 index 000000000..27943f4c6 --- /dev/null +++ b/contracts/ictt/TokenRemote/interfaces/INativeTokenRemote.sol @@ -0,0 +1,33 @@ +// (c) 2024, Ava Labs, Inc. All rights reserved. +// See the file LICENSE for licensing terms. + +// SPDX-License-Identifier: Ecosystem + +pragma solidity 0.8.25; + +import {INativeTokenTransferrer} from "../../interfaces/INativeTokenTransferrer.sol"; +import {ITokenRemote} from "./ITokenRemote.sol"; + +/** + * @dev Interface that describes functionalities for a contract that can mint native tokens when + * paired with a {ITokenHome} contract that will lock tokens on another chain. + */ +interface INativeTokenRemote is ITokenRemote, INativeTokenTransferrer { + /** + * @notice Emitted when reporting burned tx fees to home chain. + */ + event ReportBurnedTxFees(bytes32 indexed teleporterMessageID, uint256 feesBurned); + + /** + * @notice Reports the increase in total burned transaction fees on this chain to its corresponding TokenHome instance. + * @param requiredGasLimit The gas limit required to report the burned transaction fees to the home contract. + */ + function reportBurnedTxFees(uint256 requiredGasLimit) external; + + /** + * @notice Returns a best-estimate (upper bound) of the supply of the native asset + * in circulation on this chain. Does not account for other native asset burn mechanisms, + * which can result in the value returned being greater than true circulating supply. + */ + function totalNativeAssetSupply() external view returns (uint256); +} diff --git a/contracts/ictt/TokenRemote/interfaces/ITokenRemote.sol b/contracts/ictt/TokenRemote/interfaces/ITokenRemote.sol new file mode 100644 index 000000000..b2ace8c28 --- /dev/null +++ b/contracts/ictt/TokenRemote/interfaces/ITokenRemote.sol @@ -0,0 +1,41 @@ +// (c) 2024, Ava Labs, Inc. All rights reserved. +// See the file LICENSE for licensing terms. + +// SPDX-License-Identifier: Ecosystem + +pragma solidity 0.8.25; + +import {ITokenTransferrer} from "../../interfaces/ITokenTransferrer.sol"; +import {TeleporterFeeInfo} from "@teleporter/ITeleporterMessenger.sol"; + +/** + * @notice Settings for constructing a {ITokenRemote} contract. + * @param teleporterRegistryAddress The current blockchain ID's Teleporter registry + * address. See here for details: https://github.com/ava-labs/teleporter/tree/main/contracts/teleporter/registry. + * @param teleporterManager Address that manages this contract's integration with the + * Teleporter registry and Teleporter versions. + * @param minTeleporterVersion Minimum Teleporter version supported by this contract. + * @param tokenHomeBlockchainID The blockchain ID of the associated TokenHome instance. + * @param tokenHomeAddress The address of the associated token home contract. + * @param tokenHomeDecimals The number of decimal places used by the token home's token. + */ +struct TokenRemoteSettings { + address teleporterRegistryAddress; + address teleporterManager; + uint256 minTeleporterVersion; + bytes32 tokenHomeBlockchainID; + address tokenHomeAddress; + uint8 tokenHomeDecimals; +} + +/** + * @dev Interface for a remote token transfer contract that mints a representation token on its chain, and allows + * for burning that token to redeem the backing asset on the home chain, or transferring to other remotes. + */ +interface ITokenRemote is ITokenTransferrer { + /** + * @notice Sends a Teleporter message to register the TokenRemote instance with its configured home. + * @param feeInfo The optional fee asset and amount for the Teleporter message, for relayer incentivization. + */ + function registerWithHome(TeleporterFeeInfo calldata feeInfo) external; +} diff --git a/contracts/ictt/WrappedNativeToken.sol b/contracts/ictt/WrappedNativeToken.sol new file mode 100644 index 000000000..0c5dbfc5c --- /dev/null +++ b/contracts/ictt/WrappedNativeToken.sol @@ -0,0 +1,37 @@ +// (c) 2024, Ava Labs, Inc. All rights reserved. +// See the file LICENSE for licensing terms. + +// SPDX-License-Identifier: Ecosystem + +pragma solidity 0.8.25; + +import {IWrappedNativeToken} from "./interfaces/IWrappedNativeToken.sol"; +import {ERC20} from "@openzeppelin/contracts@5.0.2/token/ERC20/ERC20.sol"; +import {Address} from "@openzeppelin/contracts@5.0.2/utils/Address.sol"; + +contract WrappedNativeToken is IWrappedNativeToken, ERC20 { + using Address for address payable; + + constructor(string memory symbol) + ERC20(string.concat("Wrapped ", symbol), string.concat("W", symbol)) + {} + + receive() external payable { + deposit(); + } + + fallback() external payable { + deposit(); + } + + function withdraw(uint256 amount) external { + _burn(_msgSender(), amount); + emit Withdrawal(_msgSender(), amount); + payable(_msgSender()).sendValue(amount); + } + + function deposit() public payable { + _mint(_msgSender(), msg.value); + emit Deposit(_msgSender(), msg.value); + } +} diff --git a/contracts/ictt/audits/OpenZeppelin Audit (June 26th 2024).pdf b/contracts/ictt/audits/OpenZeppelin Audit (June 26th 2024).pdf new file mode 100644 index 000000000..677603fe4 Binary files /dev/null and b/contracts/ictt/audits/OpenZeppelin Audit (June 26th 2024).pdf differ diff --git a/contracts/ictt/audits/README.md b/contracts/ictt/audits/README.md new file mode 100644 index 000000000..2d8c0cb3f --- /dev/null +++ b/contracts/ictt/audits/README.md @@ -0,0 +1,8 @@ +# Audits + +Please check out __only__ listed audited version for production code. + +| Date | Version | Commit | Auditor | Scope | Links | +| ------------ | ------- | ---------- | ------------ | -------------------- | ----------------------------------------------------------- | +| June 2024 | v1.0.0 | `9e03a1e5` | OpenZeppelin | All contracts in `contracts/ictt/` excluding `mocks/` | [🔗](./OpenZeppelin%20Audit%20(June%2026th%202024).pdf) | + diff --git a/contracts/ictt/interfaces/IERC20SendAndCallReceiver.sol b/contracts/ictt/interfaces/IERC20SendAndCallReceiver.sol new file mode 100644 index 000000000..6f9cc04fc --- /dev/null +++ b/contracts/ictt/interfaces/IERC20SendAndCallReceiver.sol @@ -0,0 +1,30 @@ +// (c) 2024, Ava Labs, Inc. All rights reserved. +// See the file LICENSE for licensing terms. + +// SPDX-License-Identifier: Ecosystem + +pragma solidity 0.8.25; + +/** + * @notice Interface for contracts that are called to receive token transfers. + */ +interface IERC20SendAndCallReceiver { + /** + * @notice Called to receive the amount of the given token + * @param sourceBlockchainID Blockchain ID that the transfer originated from + * @param originTokenTransferrerAddress Address of the token transferrer that initiated the Teleporter message + * @param originSenderAddress Address of the sender that sent the transfer. This value + * should only be trusted if {originTokenTransferrerAddress} is verified and known. + * @param token Address of the token to be received + * @param amount Amount of the token to be received + * @param payload Arbitrary data provided by the caller + */ + function receiveTokens( + bytes32 sourceBlockchainID, + address originTokenTransferrerAddress, + address originSenderAddress, + address token, + uint256 amount, + bytes calldata payload + ) external; +} diff --git a/contracts/ictt/interfaces/IERC20TokenTransferrer.sol b/contracts/ictt/interfaces/IERC20TokenTransferrer.sol new file mode 100644 index 000000000..341a92aab --- /dev/null +++ b/contracts/ictt/interfaces/IERC20TokenTransferrer.sol @@ -0,0 +1,29 @@ +// (c) 2024, Ava Labs, Inc. All rights reserved. +// See the file LICENSE for licensing terms. + +// SPDX-License-Identifier: Ecosystem + +pragma solidity 0.8.25; + +import {ITokenTransferrer, SendTokensInput, SendAndCallInput} from "./ITokenTransferrer.sol"; + +/** + * @notice Interface for an Avalanche interchain token transferrer that sends ERC20 tokens to another chain. + * + * @custom:security-contact https://github.com/ava-labs/teleporter/blob/main/SECURITY.md + */ +interface IERC20TokenTransferrer is ITokenTransferrer { + /** + * @notice Sends ERC20 tokens to the specified destination. + * @param input Specifies information for delivery of the tokens + * @param amount Amount of tokens to send + */ + function send(SendTokensInput calldata input, uint256 amount) external; + + /** + * @notice Sends ERC20 tokens to the specified destination to be used in a smart contract interaction. + * @param input Specifies information for delivery of the tokens + * @param amount Amount of tokens to send + */ + function sendAndCall(SendAndCallInput calldata input, uint256 amount) external; +} diff --git a/contracts/ictt/interfaces/INativeSendAndCallReceiver.sol b/contracts/ictt/interfaces/INativeSendAndCallReceiver.sol new file mode 100644 index 000000000..bbb59d5dc --- /dev/null +++ b/contracts/ictt/interfaces/INativeSendAndCallReceiver.sol @@ -0,0 +1,28 @@ +// (c) 2024, Ava Labs, Inc. All rights reserved. +// See the file LICENSE for licensing terms. + +// SPDX-License-Identifier: Ecosystem + +pragma solidity 0.8.25; + +/** + * @notice Interface for a contracts that are called to receive native tokens. + */ +interface INativeSendAndCallReceiver { + /** + * @notice Called to receive the amount of the native token. Implementations + * must properly handle the msg.value of the call in order to ensure it doesn't + * become improperly made inaccessible. + * @param sourceBlockchainID Blockchain ID that the transfer originated from + * @param originTokenTransferrerAddress Address of the token transferrer that initiated the Teleporter message + * @param originSenderAddress Address of the sender that sent the transfer. This value + * should only be trusted if {originTokenTransferrerAddress} is verified and known. + * @param payload Arbitrary data provided by the caller + */ + function receiveTokens( + bytes32 sourceBlockchainID, + address originTokenTransferrerAddress, + address originSenderAddress, + bytes calldata payload + ) external payable; +} diff --git a/contracts/ictt/interfaces/INativeTokenTransferrer.sol b/contracts/ictt/interfaces/INativeTokenTransferrer.sol new file mode 100644 index 000000000..f18fddd98 --- /dev/null +++ b/contracts/ictt/interfaces/INativeTokenTransferrer.sol @@ -0,0 +1,28 @@ +// (c) 2024, Ava Labs, Inc. All rights reserved. +// See the file LICENSE for licensing terms. + +// SPDX-License-Identifier: Ecosystem + +pragma solidity 0.8.25; + +import {ITokenTransferrer, SendTokensInput, SendAndCallInput} from "./ITokenTransferrer.sol"; + +/** + * @notice Interface for an Avalanche interchain token transferrer that sends native tokens to another chain. + * + * @custom:security-contact https://github.com/ava-labs/teleporter/blob/main/SECURITY.md + */ +interface INativeTokenTransferrer is ITokenTransferrer { + /** + * @notice Sends native tokens to the specified destination. + * @param input Specifies information for delivery of the tokens + */ + function send(SendTokensInput calldata input) external payable; + + /** + * @notice Sends native tokens to the specified destination to be used in a smart contract interaction. + * @param input Specifies information for delivery of the tokens to the remote contract and contract to be called + * on the remote chain. + */ + function sendAndCall(SendAndCallInput calldata input) external payable; +} diff --git a/contracts/ictt/interfaces/ITokenTransferrer.sol b/contracts/ictt/interfaces/ITokenTransferrer.sol new file mode 100644 index 000000000..8863cf90e --- /dev/null +++ b/contracts/ictt/interfaces/ITokenTransferrer.sol @@ -0,0 +1,206 @@ +// (c) 2024, Ava Labs, Inc. All rights reserved. +// See the file LICENSE for licensing terms. + +// SPDX-License-Identifier: Ecosystem + +pragma solidity 0.8.25; + +import {ITeleporterReceiver} from "@teleporter/ITeleporterReceiver.sol"; + +/** + * @notice Input parameters for transferring tokens to another chain as part of a simple transfer. + * @param destinationBlockchainID Blockchain ID of the destination + * @param destinationTokenTransferrerAddress Address of the destination token transferrer instance + * @param recipient Address of the recipient on the destination chain + * @param primaryFeeTokenAddress Address of the ERC20 contract to optionally pay a Teleporter message fee + * @param primaryFee Amount of tokens to pay as the optional Teleporter message fee + * @param secondaryFee Amount of tokens to pay for Teleporter fee if a multi-hop is needed + * @param requiredGasLimit Gas limit requirement for sending to a token transferrer. + * This is required because the gas requirement varies based on the token transferrer instance + * specified by {destinationBlockchainID} and {destinationTokenTransferrerAddress}. + * @param multiHopFallback In the case of a multi-hop transfer, the address where the tokens + * are sent on the home chain if the transfer is unable to be routed to its final destination. + * Note that this address must be able to receive the tokens held as collateral in the home contract. + */ +struct SendTokensInput { + bytes32 destinationBlockchainID; + address destinationTokenTransferrerAddress; + address recipient; + address primaryFeeTokenAddress; + uint256 primaryFee; + uint256 secondaryFee; + uint256 requiredGasLimit; + address multiHopFallback; +} + +/** + * @notice Input parameters for transferring tokens to another chain as part of a transfer with a contract call. + * @param destinationBlockchainID BlockchainID of the destination + * @param destinationTokenTransferrerAddress Address of the destination token transferrer instance + * @param recipientContract The contract on the destination chain that will be called + * @param recipientPayload The payload that will be provided to the recipient contract on the destination chain + * @param requiredGasLimit The required amount of gas needed to deliver the message on its destination chain, + * including token operations and the call to the recipient contract. + * @param recipientGasLimit The amount of gas that will provided to the recipient contract on the destination chain, + * which must be less than the requiredGasLimit of the message as a whole. + * @param multiHopFallback In the case of a multi-hop transfer, the address where the tokens + * are sent on the home chain if the transfer is unable to be routed to its final destination. + * Note that this address must be able to receive the tokens held as collateral in the home contract. + * @param fallbackRecipient Address on the {destinationBlockchainID} where the transferred tokens are sent to if the call + * to the recipient contract fails. Note that this address must be able to receive the tokens on the destination + * chain of the transfer. + * @param primaryFeeTokenAddress Address of the ERC20 contract to optionally pay a Teleporter message fee + * @param primaryFee Amount of tokens to pay for Teleporter fee on the chain that iniiated the transfer + * @param secondaryFee Amount of tokens to pay for Teleporter fee if a multi-hop is needed + */ +struct SendAndCallInput { + bytes32 destinationBlockchainID; + address destinationTokenTransferrerAddress; + address recipientContract; + bytes recipientPayload; + uint256 requiredGasLimit; + uint256 recipientGasLimit; + address multiHopFallback; + address fallbackRecipient; + address primaryFeeTokenAddress; + uint256 primaryFee; + uint256 secondaryFee; +} + +enum TransferrerMessageType { + REGISTER_REMOTE, + SINGLE_HOP_SEND, + SINGLE_HOP_CALL, + MULTI_HOP_SEND, + MULTI_HOP_CALL +} + +/** + * @dev The TransferrerMessage struct is used to wrap messages between two token transferrer contracts + * with their message type so that the receiving token transferrer can decode the payload. + */ +struct TransferrerMessage { + TransferrerMessageType messageType; + bytes payload; +} + +/** + * @dev Register remote message payloads are sent to the home token transferrer contract to register a new remote contract + * instance on another chain. + * @param initialReserveImbalance The initial reserve imbalance of the remote contract to calculate + * associated collateral needed on home contract. + * @param homeTokenDecimals The number of decimals that the home token has. + * @param remoteTokenDecimals The number of decimals that the remote token has. + */ +struct RegisterRemoteMessage { + uint256 initialReserveImbalance; + uint8 homeTokenDecimals; + uint8 remoteTokenDecimals; +} + +/** + * @dev Single hop send message payloads include the recipient address and transferred amount. + * The destination chain and token transferrer address for the transfer are defined by the Teleporter message. + */ +struct SingleHopSendMessage { + address recipient; + uint256 amount; +} + +/** + * @dev Single hop call message payloads include the required information to call + * the target contract on the destination chain. The destination chain and token transferrer + * address are defined by the Teleporter message. The message also includes the + * blockchain ID and address of the original sender. + */ +struct SingleHopCallMessage { + bytes32 sourceBlockchainID; + address originTokenTransferrerAddress; + address originSenderAddress; + address recipientContract; + uint256 amount; + bytes recipientPayload; + uint256 recipientGasLimit; + address fallbackRecipient; +} + +/** + * @dev Multi hop send message payloads include the recipient address as well as all + * the information the intermediate (home) chain token transferrer contract needs to route + * the send message on to its final destination. + */ +struct MultiHopSendMessage { + bytes32 destinationBlockchainID; + address destinationTokenTransferrerAddress; + address recipient; + uint256 amount; + uint256 secondaryFee; + uint256 secondaryGasLimit; + address multiHopFallback; +} + +/** + * @dev Multi hop call message payloads include the required information to call the target contract on the + * destination chain, as well as the information the intermediate (home) chain token transferrer contract needs to route + * the call message on to its final destination. This includes the {secondaryRequiredGasLimit}, which is the + * required gas limit set for the second Teleporter message. The {secondaryRequiredGasLimit} should be sufficient + * to cover the destination token operations as well as the call to the recipient contract, and will always be + * greater than the recipientGasLimit. The multi-hop message also includes the address of the original sender. + * The source blockchain ID of the sender is known from the Teleporter message. + */ +struct MultiHopCallMessage { + address originSenderAddress; + bytes32 destinationBlockchainID; + address destinationTokenTransferrerAddress; + address recipientContract; + uint256 amount; + bytes recipientPayload; + uint256 recipientGasLimit; + address fallbackRecipient; + uint256 secondaryRequiredGasLimit; + address multiHopFallback; + uint256 secondaryFee; +} + +/** + * @notice Interface for an Avalanche interchain token transferrer that sends tokens to another chain. + * + * @custom:security-contact https://github.com/ava-labs/teleporter/blob/main/SECURITY.md + */ +interface ITokenTransferrer is ITeleporterReceiver { + /** + * @notice Emitted when tokens are sent to another chain. + */ + event TokensSent( + bytes32 indexed teleporterMessageID, + address indexed sender, + SendTokensInput input, + uint256 amount + ); + + /** + * @notice Emitted when tokens are sent to another chain with calldata for a contract recipient. + */ + event TokensAndCallSent( + bytes32 indexed teleporterMessageID, + address indexed sender, + SendAndCallInput input, + uint256 amount + ); + + /** + * @notice Emitted when tokens are withdrawn from the token transferrer contract. + */ + event TokensWithdrawn(address indexed recipient, uint256 amount); + + /** + * @notice Emitted when a call to a recipient contract to receive token succeeds. + */ + event CallSucceeded(address indexed recipientContract, uint256 amount); + + /** + * @notice Emitted when a call to a recipient contract to receive token fails, and the tokens are sent + * to a fallback recipient. + */ + event CallFailed(address indexed recipientContract, uint256 amount); +} diff --git a/contracts/ictt/interfaces/IWrappedNativeToken.sol b/contracts/ictt/interfaces/IWrappedNativeToken.sol new file mode 100644 index 000000000..895cf82a0 --- /dev/null +++ b/contracts/ictt/interfaces/IWrappedNativeToken.sol @@ -0,0 +1,42 @@ +// (c) 2024, Ava Labs, Inc. All rights reserved. +// See the file LICENSE for licensing terms. + +// SPDX-License-Identifier: Ecosystem + +pragma solidity 0.8.25; + +import {IERC20} from "@openzeppelin/contracts@5.0.2/token/ERC20/IERC20.sol"; + +/** + * @title IWrappedNativeToken + * @notice Interface for a wrapped native token + * @dev Implements the {IERC20} interface, and adds deposit and withdraw functions. + * + * @custom:security-contact https://github.com/ava-labs/teleporter/blob/main/SECURITY.md + */ +interface IWrappedNativeToken is IERC20 { + /** + * @notice Emitted when native tokens are deposited. + * @param sender Address that deposited the native tokens + * @param amount Amount of native tokens deposited + */ + event Deposit(address indexed sender, uint256 amount); + + /** + * @notice Emitted when wrapped tokens are withdrawn for native tokens. + * @param sender Address that withdrew the native tokens. + * @param amount Amount of native tokens withdrawn + */ + event Withdrawal(address indexed sender, uint256 amount); + + /** + * @notice Deposits native tokens to receive wrapped tokens. + */ + function deposit() external payable; + + /** + * @notice Withdraws native tokens for wrapped tokens. + * @param amount Amount of native tokens to withdraw + */ + function withdraw(uint256 amount) external; +} diff --git a/contracts/ictt/mocks/ExampleERC20Decimals.sol b/contracts/ictt/mocks/ExampleERC20Decimals.sol new file mode 100644 index 000000000..26a3d9960 --- /dev/null +++ b/contracts/ictt/mocks/ExampleERC20Decimals.sol @@ -0,0 +1,24 @@ +// (c) 2024, Ava Labs, Inc. All rights reserved. +// See the file LICENSE for licensing terms. + +// SPDX-License-Identifier: Ecosystem + +pragma solidity 0.8.25; + +/** + * THIS IS AN EXAMPLE CONTRACT THAT USES UN-AUDITED CODE. + * DO NOT USE THIS CODE IN PRODUCTION. + */ +import {ExampleERC20} from "@mocks/ExampleERC20.sol"; + +contract ExampleERC20Decimals is ExampleERC20 { + uint8 public immutable tokenDecimals; + + constructor(uint8 tokenDecimals_) ExampleERC20() { + tokenDecimals = tokenDecimals_; + } + + function decimals() public view virtual override returns (uint8) { + return tokenDecimals; + } +} diff --git a/contracts/ictt/mocks/MockERC20SendAndCallReceiver.sol b/contracts/ictt/mocks/MockERC20SendAndCallReceiver.sol new file mode 100644 index 000000000..c9aa526d2 --- /dev/null +++ b/contracts/ictt/mocks/MockERC20SendAndCallReceiver.sol @@ -0,0 +1,79 @@ +// (c) 2024, Ava Labs, Inc. All rights reserved. +// See the file LICENSE for licensing terms. + +// SPDX-License-Identifier: Ecosystem + +pragma solidity 0.8.25; + +import {IERC20SendAndCallReceiver} from "../interfaces/IERC20SendAndCallReceiver.sol"; +import {SafeERC20TransferFrom} from "@utilities/SafeERC20TransferFrom.sol"; +import {SafeERC20} from "@openzeppelin/contracts@5.0.2/token/ERC20/utils/SafeERC20.sol"; +import {IERC20} from "@openzeppelin/contracts@5.0.2/token/ERC20/IERC20.sol"; +import {Context} from "@openzeppelin/contracts@5.0.2/utils/Context.sol"; + +/** + * THIS IS AN EXAMPLE CONTRACT THAT USES UN-AUDITED CODE. + * DO NOT USE THIS CODE IN PRODUCTION. + */ + +/** + * @notice This is mock implementation of {receiveTokens} to be used in tests. + * This contract DOES NOT provide a mechanism for accessing the tokens transfered to it. + * Real implementations must ensure that tokens are properly handled and not incorrectly locked. + */ +contract MockERC20SendAndCallReceiver is Context, IERC20SendAndCallReceiver { + using SafeERC20 for IERC20; + + mapping(bytes32 blockchainID => mapping(address senderAddress => bool blocked)) public + blockedSenders; + + /** + * @dev Emitted when receiveTokens is called. + */ + event TokensReceived( + bytes32 indexed sourceBlockchainID, + address indexed originTokenTransferrerAddress, + address indexed originSenderAddress, + address token, + uint256 amount, + bytes payload + ); + + /** + * @dev See {IERC20SendAndCallReceiver-receiveTokens} + */ + function receiveTokens( + bytes32 sourceBlockchainID, + address originTokenTransferrerAddress, + address originSenderAddress, + address token, + uint256 amount, + bytes calldata payload + ) external { + require( + !blockedSenders[sourceBlockchainID][originSenderAddress], + "MockERC20SendAndCallReceiver: sender blocked" + ); + emit TokensReceived({ + sourceBlockchainID: sourceBlockchainID, + originTokenTransferrerAddress: originTokenTransferrerAddress, + originSenderAddress: originSenderAddress, + token: token, + amount: amount, + payload: payload + }); + + require(payload.length > 0, "MockERC20SendAndCallReceiver: empty payload"); + + SafeERC20TransferFrom.safeTransferFrom(IERC20(token), _msgSender(), amount); + } + + /** + * @notice Block a sender from sending tokens to this contract. + * @param blockchainID The blockchain ID of the sender. + * @param senderAddress The address of the sender. + */ + function blockSender(bytes32 blockchainID, address senderAddress) external { + blockedSenders[blockchainID][senderAddress] = true; + } +} diff --git a/contracts/ictt/mocks/MockNativeSendAndCallReceiver.sol b/contracts/ictt/mocks/MockNativeSendAndCallReceiver.sol new file mode 100644 index 000000000..0333ef3c6 --- /dev/null +++ b/contracts/ictt/mocks/MockNativeSendAndCallReceiver.sol @@ -0,0 +1,68 @@ +// (c) 2024, Ava Labs, Inc. All rights reserved. +// See the file LICENSE for licensing terms. + +// SPDX-License-Identifier: Ecosystem + +pragma solidity 0.8.25; + +import {INativeSendAndCallReceiver} from "../interfaces/INativeSendAndCallReceiver.sol"; + +/** + * THIS IS AN EXAMPLE CONTRACT THAT USES UN-AUDITED CODE. + * DO NOT USE THIS CODE IN PRODUCTION. + */ + +/** + * @notice This is mock implementation of {receiveTokens} to be used in tests. + * This contract DOES NOT provide a mechanism for accessing the tokens transfered to it. + * Real implementations must ensure that tokens are properly handled and not incorrectly locked. + */ +contract MockNativeSendAndCallReceiver is INativeSendAndCallReceiver { + mapping(bytes32 blockchainID => mapping(address senderAddress => bool blocked)) public + blockedSenders; + + /** + * @dev Emitted when receiveTokens is called. + */ + event TokensReceived( + bytes32 indexed sourceBlockchainID, + address indexed originTokenTransferrerAddress, + address indexed originSenderAddress, + uint256 amount, + bytes payload + ); + + /** + * @dev See {INativeSendAndCallReceiver-receiveTokens} + */ + function receiveTokens( + bytes32 sourceBlockchainID, + address originTokenTransferrerAddress, + address originSenderAddress, + bytes calldata payload + ) external payable { + require( + !blockedSenders[sourceBlockchainID][originSenderAddress], + "MockNativeSendAndCallReceiver: sender blocked" + ); + emit TokensReceived( + sourceBlockchainID, + originTokenTransferrerAddress, + originSenderAddress, + msg.value, + payload + ); + + require(payload.length != 0, "MockNativeSendAndCallReceiver: empty payload"); + // No implementation required to accept native tokens + } + + /** + * @notice Block a sender from sending tokens to this contract. + * @param blockchainID The blockchain ID of the sender. + * @param senderAddress The address of the sender. + */ + function blockSender(bytes32 blockchainID, address senderAddress) external { + blockedSenders[blockchainID][senderAddress] = true; + } +} diff --git a/contracts/ictt/tests/ERC20TokenHomeTests.t.sol b/contracts/ictt/tests/ERC20TokenHomeTests.t.sol new file mode 100644 index 000000000..fc2eadd75 --- /dev/null +++ b/contracts/ictt/tests/ERC20TokenHomeTests.t.sol @@ -0,0 +1,318 @@ +// (c) 2024, Ava Labs, Inc. All rights reserved. +// See the file LICENSE for licensing terms. + +// SPDX-License-Identifier: Ecosystem + +pragma solidity 0.8.25; + +import {ERC20TokenTransferrerTest} from "./ERC20TokenTransferrerTests.t.sol"; +import {TokenHomeTest} from "./TokenHomeTests.t.sol"; +import {IERC20SendAndCallReceiver} from "../interfaces/IERC20SendAndCallReceiver.sol"; +import {SendTokensInput} from "../interfaces/ITokenTransferrer.sol"; +import {ERC20TokenHomeUpgradeable} from "../TokenHome/ERC20TokenHomeUpgradeable.sol"; +import {ERC20TokenHome} from "../TokenHome/ERC20TokenHome.sol"; +import {IERC20} from "@openzeppelin/contracts@5.0.2/token/ERC20/IERC20.sol"; +import {ExampleERC20} from "@mocks/ExampleERC20.sol"; +import {SafeERC20} from "@openzeppelin/contracts@5.0.2/token/ERC20/utils/SafeERC20.sol"; +import {TeleporterMessageInput, TeleporterFeeInfo} from "@teleporter/ITeleporterMessenger.sol"; +import {TokenScalingUtils} from "@utilities/TokenScalingUtils.sol"; +import {RemoteTokenTransferrerSettings} from "../TokenHome/interfaces/ITokenHome.sol"; +import {Ownable} from "@openzeppelin/contracts@5.0.2/access/Ownable.sol"; +import {ICMInitializable} from "@utilities/ICMInitializable.sol"; +import {Initializable} from "@openzeppelin/contracts@5.0.2/proxy/utils/Initializable.sol"; + +contract ERC20TokenHomeTest is ERC20TokenTransferrerTest, TokenHomeTest { + using SafeERC20 for IERC20; + + ERC20TokenHomeUpgradeable public app; + IERC20 public mockERC20; + + function setUp() public override { + TokenHomeTest.setUp(); + + mockERC20 = new ExampleERC20(); + tokenHomeDecimals = 6; + app = new ERC20TokenHomeUpgradeable(ICMInitializable.Allowed); + app.initialize( + MOCK_TELEPORTER_REGISTRY_ADDRESS, + MOCK_TELEPORTER_MESSENGER_ADDRESS, + 1, + address(mockERC20), + tokenHomeDecimals + ); + erc20TokenTransferrer = app; + tokenHome = app; + tokenTransferrer = app; + + transferredToken = mockERC20; + } + + /** + * Initialization unit tests + */ + function testNonUpgradeableInitialization() public { + app = new ERC20TokenHome( + MOCK_TELEPORTER_REGISTRY_ADDRESS, + address(this), + 1, + address(mockERC20), + tokenHomeDecimals + ); + assertEq(app.getBlockchainID(), DEFAULT_TOKEN_HOME_BLOCKCHAIN_ID); + } + + function testDisableInitialization() public { + app = new ERC20TokenHomeUpgradeable(ICMInitializable.Disallowed); + vm.expectRevert(abi.encodeWithSelector(Initializable.InvalidInitialization.selector)); + app.initialize( + MOCK_TELEPORTER_REGISTRY_ADDRESS, + address(this), + 1, + address(mockERC20), + tokenHomeDecimals + ); + } + + function testZeroTeleporterRegistryAddress() public { + _invalidInitialization( + address(0), + address(this), + address(mockERC20), + tokenHomeDecimals, + "TeleporterRegistryApp: zero Teleporter registry address" + ); + } + + function testZeroTeleporterManagerAddress() public { + _invalidInitialization( + MOCK_TELEPORTER_REGISTRY_ADDRESS, + address(0), + address(mockERC20), + tokenHomeDecimals, + abi.encodeWithSelector(Ownable.OwnableInvalidOwner.selector, address(0)) + ); + } + + function testZeroFeeTokenAddress() public { + _invalidInitialization( + MOCK_TELEPORTER_REGISTRY_ADDRESS, + address(this), + address(0), + tokenHomeDecimals, + _formatErrorMessage("zero token address") + ); + } + + function testTokenDecimalsTooHigh() public { + _invalidInitialization( + MOCK_TELEPORTER_REGISTRY_ADDRESS, + address(this), + address(mockERC20), + uint8(TokenScalingUtils.MAX_TOKEN_DECIMALS) + 1, + _formatErrorMessage("token decimals too high") + ); + } + + function testReceiveZeroHomeTokenAmount() public { + // Set up a registered remote that will scale down the received amount + // to zero home tokens. + uint256 tokenMultiplier = 100_000; + _setUpRegisteredRemote( + DEFAULT_TOKEN_REMOTE_BLOCKCHAIN_ID, + DEFAULT_TOKEN_REMOTE_ADDRESS, + 0, + tokenMultiplier, + true + ); + + // Send over home token to the remote + // and check for expected calls for scaled amount of tokens sent. + SendTokensInput memory input = _createDefaultSendTokensInput(); + uint256 amount = 1; + _setUpExpectedDeposit(amount, input.primaryFee); + + uint256 scaledAmount = tokenMultiplier * amount; + _checkExpectedTeleporterCallsForSend( + _createSingleHopTeleporterMessageInput(input, scaledAmount) + ); + vm.expectEmit(true, true, true, true, address(tokenTransferrer)); + emit TokensSent(_MOCK_MESSAGE_ID, address(this), input, scaledAmount); + _send(input, amount); + + // Receive an amount from remote less than `scaledAmount` + // which will be scaled down to zero home tokens. + vm.expectRevert(_formatErrorMessage("zero token amount")); + vm.prank(MOCK_TELEPORTER_MESSENGER_ADDRESS); + tokenHome.receiveTeleporterMessage( + DEFAULT_TOKEN_REMOTE_BLOCKCHAIN_ID, + DEFAULT_TOKEN_REMOTE_ADDRESS, + _encodeSingleHopSendMessage(scaledAmount - 1, DEFAULT_RECIPIENT_ADDRESS) + ); + } + + function testRegisterDestinationRoundUpCollateralNeeded() public { + _setUpRegisteredRemote( + DEFAULT_TOKEN_REMOTE_BLOCKCHAIN_ID, DEFAULT_TOKEN_REMOTE_ADDRESS, 11, 10, true + ); + RemoteTokenTransferrerSettings memory settings = tokenHome.getRemoteTokenTransferrerSettings( + DEFAULT_TOKEN_REMOTE_BLOCKCHAIN_ID, DEFAULT_TOKEN_REMOTE_ADDRESS + ); + assertEq(settings.collateralNeeded, 2); + } + + function testSendScaledUpAmount() public { + uint256 amount = 100; + uint256 feeAmount = 1; + + SendTokensInput memory input = _createDefaultSendTokensInput(); + input.primaryFee = feeAmount; + + // Raw amount sent over wire should be multipled by 1e2. + uint256 tokenMultiplier = 1e2; + _setUpRegisteredRemote( + input.destinationBlockchainID, + input.destinationTokenTransferrerAddress, + 0, + tokenMultiplier, + true + ); + _setUpExpectedDeposit(amount, input.primaryFee); + TeleporterMessageInput memory expectedMessage = TeleporterMessageInput({ + destinationBlockchainID: input.destinationBlockchainID, + destinationAddress: input.destinationTokenTransferrerAddress, + feeInfo: TeleporterFeeInfo({ + feeTokenAddress: address(transferredToken), + amount: input.primaryFee + }), + requiredGasLimit: input.requiredGasLimit, + allowedRelayerAddresses: new address[](0), + message: _encodeSingleHopSendMessage(amount * tokenMultiplier, DEFAULT_RECIPIENT_ADDRESS) + }); + _checkExpectedTeleporterCallsForSend(expectedMessage); + vm.expectEmit(true, true, true, true, address(tokenTransferrer)); + emit TokensSent(_MOCK_MESSAGE_ID, address(this), input, amount * tokenMultiplier); + _send(input, amount); + } + + function _checkExpectedWithdrawal(address recipient, uint256 amount) internal override { + vm.expectEmit(true, true, true, true, address(tokenHome)); + emit TokensWithdrawn(recipient, amount); + vm.expectCall( + address(mockERC20), abi.encodeCall(IERC20.transfer, (address(recipient), amount)) + ); + vm.expectEmit(true, true, true, true, address(mockERC20)); + emit Transfer(address(app), recipient, amount); + } + + function _setUpExpectedSendAndCall( + bytes32 sourceBlockchainID, + OriginSenderInfo memory originInfo, + address recipient, + uint256 amount, + bytes memory payload, + uint256 gasLimit, + bool targetHasCode, + bool expectSuccess + ) internal override { + // The recipient contract will be approved to spend the tokens from the token home contract. + vm.expectEmit(true, true, true, true, address(mockERC20)); + emit Approval(address(app), DEFAULT_RECIPIENT_CONTRACT_ADDRESS, amount); + + if (targetHasCode) { + vm.etch(recipient, new bytes(1)); + + bytes memory expectedCalldata = abi.encodeCall( + IERC20SendAndCallReceiver.receiveTokens, + ( + sourceBlockchainID, + originInfo.tokenTransferrerAddress, + originInfo.senderAddress, + address(mockERC20), + amount, + payload + ) + ); + if (expectSuccess) { + vm.mockCall(recipient, expectedCalldata, new bytes(0)); + } else { + vm.mockCallRevert(recipient, expectedCalldata, new bytes(0)); + } + vm.expectCall(recipient, 0, uint64(gasLimit), expectedCalldata); + } else { + vm.etch(recipient, new bytes(0)); + } + + // Then recipient contract approval is reset + vm.expectEmit(true, true, true, true, address(mockERC20)); + emit Approval(address(app), DEFAULT_RECIPIENT_CONTRACT_ADDRESS, 0); + + if (targetHasCode && expectSuccess) { + // The call should have succeeded. + vm.expectEmit(true, true, true, true, address(app)); + emit CallSucceeded(DEFAULT_RECIPIENT_CONTRACT_ADDRESS, amount); + } else { + // The call should have failed. + vm.expectEmit(true, true, true, true, address(app)); + emit CallFailed(DEFAULT_RECIPIENT_CONTRACT_ADDRESS, amount); + + // Then the amount should be sent to the fallback recipient. + vm.expectEmit(true, true, true, true, address(mockERC20)); + emit Transfer(address(app), address(DEFAULT_FALLBACK_RECIPIENT_ADDRESS), amount); + } + } + + function _addCollateral( + bytes32 remoteBlockchainID, + address remoteTokenTransferrerAddress, + uint256 amount + ) internal override { + app.addCollateral(remoteBlockchainID, remoteTokenTransferrerAddress, amount); + } + + function _setUpDeposit(uint256 amount) internal virtual override { + // Increase the allowance of the token transferrer to transfer the funds from the user + transferredToken.safeIncreaseAllowance(address(tokenTransferrer), amount); + } + + function _setUpExpectedZeroAmountRevert() internal override { + vm.expectRevert("SafeERC20TransferFrom: balance not increased"); + } + + function _setUpExpectedDeposit(uint256 amount, uint256 feeAmount) internal virtual override { + // Transfer the fee to the token transferrer if it is greater than 0 + if (feeAmount > 0) { + transferredToken.safeIncreaseAllowance(address(tokenTransferrer), feeAmount); + vm.expectCall( + address(transferredToken), + abi.encodeCall( + IERC20.transferFrom, (address(this), address(tokenTransferrer), feeAmount) + ) + ); + } + // Increase the allowance of the token transferrer to transfer the funds from the user + transferredToken.safeIncreaseAllowance(address(tokenTransferrer), amount); + + // Check that transferFrom is called to deposit the funds sent from the user to the token transferrer + // This is the case because for the {ERC20TokenHomeUpgradeable) is not the fee token itself + vm.expectCall( + address(transferredToken), + abi.encodeCall(IERC20.transferFrom, (address(this), address(tokenTransferrer), amount)) + ); + vm.expectEmit(true, true, true, true, address(transferredToken)); + emit Transfer(address(this), address(tokenTransferrer), amount); + } + + function _invalidInitialization( + address teleporterRegistryAddress, + address teleporterManagerAddress, + address feeTokenAddress, + uint8 tokenDecimals, + bytes memory expectedErrorMessage + ) private { + app = new ERC20TokenHomeUpgradeable(ICMInitializable.Allowed); + vm.expectRevert(expectedErrorMessage); + app.initialize( + teleporterRegistryAddress, teleporterManagerAddress, 1, feeTokenAddress, tokenDecimals + ); + } +} diff --git a/contracts/ictt/tests/ERC20TokenRemoteTests.t.sol b/contracts/ictt/tests/ERC20TokenRemoteTests.t.sol new file mode 100644 index 000000000..a67f673cf --- /dev/null +++ b/contracts/ictt/tests/ERC20TokenRemoteTests.t.sol @@ -0,0 +1,338 @@ +// (c) 2024, Ava Labs, Inc. All rights reserved. +// See the file LICENSE for licensing terms. + +// SPDX-License-Identifier: Ecosystem + +pragma solidity 0.8.25; + +import {ERC20TokenTransferrerTest} from "./ERC20TokenTransferrerTests.t.sol"; +import {TokenRemoteTest} from "./TokenRemoteTests.t.sol"; +import {IERC20SendAndCallReceiver} from "../interfaces/IERC20SendAndCallReceiver.sol"; +import {TokenRemote} from "../TokenRemote/TokenRemote.sol"; +import {TokenRemoteSettings} from "../TokenRemote/interfaces/ITokenRemote.sol"; +import {ERC20TokenRemoteUpgradeable} from "../TokenRemote/ERC20TokenRemoteUpgradeable.sol"; +import {ERC20TokenRemote} from "../TokenRemote/ERC20TokenRemote.sol"; +import {SafeERC20} from "@openzeppelin/contracts@5.0.2/token/ERC20/utils/SafeERC20.sol"; +import {IERC20} from "@openzeppelin/contracts@5.0.2/token/ERC20/IERC20.sol"; +import {ExampleERC20} from "@mocks/ExampleERC20.sol"; +import {SendTokensInput} from "../interfaces/ITokenTransferrer.sol"; +import {Ownable} from "@openzeppelin/contracts@5.0.2/access/Ownable.sol"; +import {ICMInitializable} from "@utilities/ICMInitializable.sol"; +import {Initializable} from "@openzeppelin/contracts@5.0.2/proxy/utils/Initializable.sol"; + +contract ERC20TokenRemoteTest is ERC20TokenTransferrerTest, TokenRemoteTest { + using SafeERC20 for IERC20; + + string public constant MOCK_TOKEN_NAME = "Test Token"; + string public constant MOCK_TOKEN_SYMBOL = "TST"; + + ERC20TokenRemoteUpgradeable public app; + + function setUp() public virtual override { + TokenRemoteTest.setUp(); + + tokenDecimals = 14; + tokenHomeDecimals = 18; + app = ERC20TokenRemoteUpgradeable(address(_createNewRemoteInstance())); + + erc20TokenTransferrer = app; + tokenRemote = app; + tokenTransferrer = app; + + vm.expectEmit(true, true, true, true, address(app)); + emit Transfer(address(0), address(this), 10e18); + + vm.prank(MOCK_TELEPORTER_MESSENGER_ADDRESS); + app.receiveTeleporterMessage( + DEFAULT_TOKEN_HOME_BLOCKCHAIN_ID, + DEFAULT_TOKEN_HOME_ADDRESS, + _encodeSingleHopSendMessage(10e18, address(this)) + ); + } + + /** + * Initialization unit tests + */ + function testNonUpgradeableInitialization() public { + app = new ERC20TokenRemote( + TokenRemoteSettings({ + teleporterRegistryAddress: MOCK_TELEPORTER_REGISTRY_ADDRESS, + teleporterManager: address(this), + minTeleporterVersion: 1, + tokenHomeBlockchainID: DEFAULT_TOKEN_HOME_BLOCKCHAIN_ID, + tokenHomeAddress: DEFAULT_TOKEN_HOME_ADDRESS, + tokenHomeDecimals: tokenHomeDecimals + }), + MOCK_TOKEN_NAME, + MOCK_TOKEN_SYMBOL, + tokenDecimals + ); + assertEq(app.getBlockchainID(), DEFAULT_TOKEN_REMOTE_BLOCKCHAIN_ID); + } + + function testDisableInitialization() public { + app = new ERC20TokenRemoteUpgradeable(ICMInitializable.Disallowed); + vm.expectRevert(abi.encodeWithSelector(Initializable.InvalidInitialization.selector)); + app.initialize( + TokenRemoteSettings({ + teleporterRegistryAddress: MOCK_TELEPORTER_REGISTRY_ADDRESS, + teleporterManager: address(this), + minTeleporterVersion: 1, + tokenHomeBlockchainID: DEFAULT_TOKEN_HOME_BLOCKCHAIN_ID, + tokenHomeAddress: DEFAULT_TOKEN_HOME_ADDRESS, + tokenHomeDecimals: tokenHomeDecimals + }), + MOCK_TOKEN_NAME, + MOCK_TOKEN_SYMBOL, + tokenDecimals + ); + } + + function testZeroTeleporterRegistryAddress() public { + _invalidInitialization( + TokenRemoteSettings({ + teleporterRegistryAddress: address(0), + teleporterManager: address(this), + minTeleporterVersion: 1, + tokenHomeBlockchainID: DEFAULT_TOKEN_HOME_BLOCKCHAIN_ID, + tokenHomeAddress: DEFAULT_TOKEN_HOME_ADDRESS, + tokenHomeDecimals: tokenHomeDecimals + }), + MOCK_TOKEN_NAME, + MOCK_TOKEN_SYMBOL, + tokenDecimals, + "TeleporterRegistryApp: zero Teleporter registry address" + ); + } + + function testZeroTeleporterManagerAddress() public { + _invalidInitialization( + TokenRemoteSettings({ + teleporterRegistryAddress: MOCK_TELEPORTER_REGISTRY_ADDRESS, + teleporterManager: address(0), + minTeleporterVersion: 1, + tokenHomeBlockchainID: DEFAULT_TOKEN_HOME_BLOCKCHAIN_ID, + tokenHomeAddress: DEFAULT_TOKEN_HOME_ADDRESS, + tokenHomeDecimals: tokenHomeDecimals + }), + MOCK_TOKEN_NAME, + MOCK_TOKEN_SYMBOL, + tokenDecimals, + abi.encodeWithSelector(Ownable.OwnableInvalidOwner.selector, address(0)) + ); + } + + function testZeroTokenHomeBlockchainID() public { + _invalidInitialization( + TokenRemoteSettings({ + teleporterRegistryAddress: MOCK_TELEPORTER_REGISTRY_ADDRESS, + teleporterManager: address(this), + minTeleporterVersion: 1, + tokenHomeBlockchainID: bytes32(0), + tokenHomeAddress: DEFAULT_TOKEN_HOME_ADDRESS, + tokenHomeDecimals: tokenHomeDecimals + }), + MOCK_TOKEN_NAME, + MOCK_TOKEN_SYMBOL, + tokenDecimals, + _formatErrorMessage("zero token home blockchain ID") + ); + } + + function testDeployToSameBlockchain() public { + _invalidInitialization( + TokenRemoteSettings({ + teleporterRegistryAddress: MOCK_TELEPORTER_REGISTRY_ADDRESS, + teleporterManager: address(this), + minTeleporterVersion: 1, + tokenHomeBlockchainID: DEFAULT_TOKEN_REMOTE_BLOCKCHAIN_ID, + tokenHomeAddress: DEFAULT_TOKEN_HOME_ADDRESS, + tokenHomeDecimals: tokenHomeDecimals + }), + MOCK_TOKEN_NAME, + MOCK_TOKEN_SYMBOL, + tokenDecimals, + _formatErrorMessage("cannot deploy to same blockchain as token home") + ); + } + + function testZeroTokenHomeAddress() public { + _invalidInitialization( + TokenRemoteSettings({ + teleporterRegistryAddress: MOCK_TELEPORTER_REGISTRY_ADDRESS, + teleporterManager: address(this), + minTeleporterVersion: 1, + tokenHomeBlockchainID: DEFAULT_TOKEN_HOME_BLOCKCHAIN_ID, + tokenHomeAddress: address(0), + tokenHomeDecimals: 18 + }), + MOCK_TOKEN_NAME, + MOCK_TOKEN_SYMBOL, + 18, + _formatErrorMessage("zero token home address") + ); + } + + function testSendWithSeparateFeeAsset() public { + uint256 amount = 200_000; + uint256 feeAmount = 100; + ExampleERC20 separateFeeAsset = new ExampleERC20(); + SendTokensInput memory input = _createDefaultSendTokensInput(); + input.primaryFeeTokenAddress = address(separateFeeAsset); + input.primaryFee = feeAmount; + + IERC20(separateFeeAsset).safeIncreaseAllowance(address(tokenTransferrer), feeAmount); + vm.expectCall( + address(separateFeeAsset), + abi.encodeCall( + IERC20.transferFrom, (address(this), address(tokenTransferrer), feeAmount) + ) + ); + // Increase the allowance of the token transferrer to transfer the funds from the user + IERC20(app).safeIncreaseAllowance(address(tokenTransferrer), amount); + + vm.expectEmit(true, true, true, true, address(app)); + emit Transfer(address(this), address(0), amount); + _checkExpectedTeleporterCallsForSend(_createSingleHopTeleporterMessageInput(input, amount)); + vm.expectEmit(true, true, true, true, address(tokenTransferrer)); + emit TokensSent(_MOCK_MESSAGE_ID, address(this), input, amount); + _send(input, amount); + } + + function testDecimals() public view { + uint8 res = app.decimals(); + assertEq(tokenDecimals, res); + } + + function _createNewRemoteInstance() internal override returns (TokenRemote) { + ERC20TokenRemoteUpgradeable instance = + new ERC20TokenRemoteUpgradeable(ICMInitializable.Allowed); + instance.initialize( + TokenRemoteSettings({ + teleporterRegistryAddress: MOCK_TELEPORTER_REGISTRY_ADDRESS, + teleporterManager: address(this), + minTeleporterVersion: 1, + tokenHomeBlockchainID: DEFAULT_TOKEN_HOME_BLOCKCHAIN_ID, + tokenHomeAddress: DEFAULT_TOKEN_HOME_ADDRESS, + tokenHomeDecimals: tokenHomeDecimals + }), + MOCK_TOKEN_NAME, + MOCK_TOKEN_SYMBOL, + tokenDecimals + ); + return instance; + } + + function _checkExpectedWithdrawal(address recipient, uint256 amount) internal override { + vm.expectEmit(true, true, true, true, address(tokenRemote)); + emit TokensWithdrawn(recipient, amount); + vm.expectEmit(true, true, true, true, address(tokenRemote)); + emit Transfer(address(0), recipient, amount); + } + + function _setUpExpectedSendAndCall( + bytes32 sourceBlockchainID, + OriginSenderInfo memory originInfo, + address recipient, + uint256 amount, + bytes memory payload, + uint256 gasLimit, + bool targetHasCode, + bool expectSuccess + ) internal override { + // The transferred tokens will be minted to the contract itself + vm.expectEmit(true, true, true, true, address(app)); + emit Transfer(address(0), address(tokenRemote), amount); + + // Then recipient contract is then approved to spend them + vm.expectEmit(true, true, true, true, address(app)); + emit Approval(address(app), DEFAULT_RECIPIENT_CONTRACT_ADDRESS, amount); + + if (targetHasCode) { + vm.etch(recipient, new bytes(1)); + + bytes memory expectedCalldata = abi.encodeCall( + IERC20SendAndCallReceiver.receiveTokens, + ( + sourceBlockchainID, + originInfo.tokenTransferrerAddress, + originInfo.senderAddress, + address(app), + amount, + payload + ) + ); + if (expectSuccess) { + vm.mockCall(recipient, expectedCalldata, new bytes(0)); + } else { + vm.mockCallRevert(recipient, expectedCalldata, new bytes(0)); + } + vm.expectCall(recipient, 0, uint64(gasLimit), expectedCalldata); + } else { + vm.etch(recipient, new bytes(0)); + } + + // Then recipient contract approval is reset + vm.expectEmit(true, true, true, true, address(app)); + emit Approval(address(app), DEFAULT_RECIPIENT_CONTRACT_ADDRESS, 0); + + if (targetHasCode && expectSuccess) { + // The call should have succeeded. + vm.expectEmit(true, true, true, true, address(app)); + emit CallSucceeded(DEFAULT_RECIPIENT_CONTRACT_ADDRESS, amount); + } else { + // The call should have failed. + vm.expectEmit(true, true, true, true, address(app)); + emit CallFailed(DEFAULT_RECIPIENT_CONTRACT_ADDRESS, amount); + + // Then the amount should be sent to the fallback recipient. + vm.expectEmit(true, true, true, true, address(app)); + emit Transfer(address(app), address(DEFAULT_FALLBACK_RECIPIENT_ADDRESS), amount); + } + } + + function _setUpExpectedZeroAmountRevert() internal override { + vm.expectRevert(_formatErrorMessage("insufficient tokens to transfer")); + } + + function _setUpExpectedDeposit(uint256 amount, uint256 feeAmount) internal virtual override { + // Transfer the fee to the token transferrer if it is greater than 0 + if (feeAmount > 0) { + IERC20(app).safeIncreaseAllowance(address(tokenTransferrer), feeAmount); + } + + // Increase the allowance of the token transferrer to transfer the funds from the user + IERC20(app).safeIncreaseAllowance(address(tokenTransferrer), amount); + + // Account for the burn before sending + vm.expectEmit(true, true, true, true, address(app)); + emit Transfer(address(this), address(0), amount); + + if (feeAmount > 0) { + vm.expectEmit(true, true, true, true, address(app)); + emit Transfer(address(this), address(tokenTransferrer), feeAmount); + } + } + + function _getTotalSupply() internal view override returns (uint256) { + return app.totalSupply(); + } + + function _setUpMockMint(address, uint256) internal pure override { + // Don't need to mock the minting of an ERC20TokenRemoteUpgradeable since it is an internal call + // on the remote contract. + return; + } + + function _invalidInitialization( + TokenRemoteSettings memory settings, + string memory tokenName, + string memory tokenSymbol, + uint8 tokenDecimals_, + bytes memory expectedErrorMessage + ) private { + app = new ERC20TokenRemoteUpgradeable(ICMInitializable.Allowed); + vm.expectRevert(expectedErrorMessage); + app.initialize(settings, tokenName, tokenSymbol, tokenDecimals_); + } +} diff --git a/contracts/ictt/tests/ERC20TokenTransferrerTests.t.sol b/contracts/ictt/tests/ERC20TokenTransferrerTests.t.sol new file mode 100644 index 000000000..b11b07f9a --- /dev/null +++ b/contracts/ictt/tests/ERC20TokenTransferrerTests.t.sol @@ -0,0 +1,70 @@ +// (c) 2024, Ava Labs, Inc. All rights reserved. +// See the file LICENSE for licensing terms. + +// SPDX-License-Identifier: Ecosystem + +pragma solidity 0.8.25; + +import {TokenTransferrerTest} from "./TokenTransferrerTests.t.sol"; +import {IERC20TokenTransferrer} from "../interfaces/IERC20TokenTransferrer.sol"; +import {SendTokensInput, SendAndCallInput} from "../interfaces/ITokenTransferrer.sol"; +import {IERC20} from "@openzeppelin/contracts@5.0.2/token/ERC20/IERC20.sol"; +import {SafeERC20} from "@openzeppelin/contracts@5.0.2/token/ERC20/utils/SafeERC20.sol"; +import {IERC20Errors} from "@openzeppelin/contracts@5.0.2/interfaces/draft-IERC6093.sol"; + +abstract contract ERC20TokenTransferrerTest is TokenTransferrerTest { + using SafeERC20 for IERC20; + + IERC20TokenTransferrer public erc20TokenTransferrer; + + function testZeroSendAmount() public { + SendTokensInput memory input = _createDefaultSendTokensInput(); + _setUpRegisteredRemote( + input.destinationBlockchainID, input.destinationTokenTransferrerAddress, 0 + ); + _setUpExpectedZeroAmountRevert(); + _send(input, 0); + } + + function testSendNoAllowance() public { + uint256 amount = 2e15; + + SendTokensInput memory input = _createDefaultSendTokensInput(); + _setUpRegisteredRemote( + input.destinationBlockchainID, input.destinationTokenTransferrerAddress, 0 + ); + vm.expectRevert( + abi.encodeWithSelector( + IERC20Errors.ERC20InsufficientAllowance.selector, erc20TokenTransferrer, 0, amount + ) + ); + _send(input, amount); + } + + function testSendAndCallNoAllowance() public { + uint256 amount = 2e15; + + SendAndCallInput memory input = _createDefaultSendAndCallInput(); + _setUpRegisteredRemote( + input.destinationBlockchainID, input.destinationTokenTransferrerAddress, 0 + ); + vm.expectRevert( + abi.encodeWithSelector( + IERC20Errors.ERC20InsufficientAllowance.selector, erc20TokenTransferrer, 0, amount + ) + ); + _sendAndCall(input, amount); + } + + function _send(SendTokensInput memory input, uint256 amount) internal virtual override { + // solhint-disable-next-line check-send-result + erc20TokenTransferrer.send(input, amount); + } + + function _sendAndCall( + SendAndCallInput memory input, + uint256 amount + ) internal virtual override { + erc20TokenTransferrer.sendAndCall(input, amount); + } +} diff --git a/contracts/ictt/tests/ExampleERC20DecimalsTests.t.sol b/contracts/ictt/tests/ExampleERC20DecimalsTests.t.sol new file mode 100644 index 000000000..3575bb645 --- /dev/null +++ b/contracts/ictt/tests/ExampleERC20DecimalsTests.t.sol @@ -0,0 +1,22 @@ +// (c) 2024, Ava Labs, Inc. All rights reserved. +// See the file LICENSE for licensing terms. + +// SPDX-License-Identifier: Ecosystem + +pragma solidity 0.8.25; + +import {Test} from "@forge-std/Test.sol"; +import {ExampleERC20Decimals} from "../mocks/ExampleERC20Decimals.sol"; + +contract ExampleERC20DecimalsTest is Test { + uint8 public constant MOCK_DECIMALS = 11; + ExampleERC20Decimals public exampleERC20; + + function setUp() public virtual { + exampleERC20 = new ExampleERC20Decimals(MOCK_DECIMALS); + } + + function testDecimals() public view { + assertEq(exampleERC20.decimals(), MOCK_DECIMALS); + } +} diff --git a/contracts/ictt/tests/MockSendAndCallReceiverTest.t.sol b/contracts/ictt/tests/MockSendAndCallReceiverTest.t.sol new file mode 100644 index 000000000..0ff3c7e84 --- /dev/null +++ b/contracts/ictt/tests/MockSendAndCallReceiverTest.t.sol @@ -0,0 +1,167 @@ +// (c) 2024, Ava Labs, Inc. All rights reserved. +// See the file LICENSE for licensing terms. + +// SPDX-License-Identifier: Ecosystem + +pragma solidity 0.8.25; + +import {Test} from "@forge-std/Test.sol"; +import {MockERC20SendAndCallReceiver} from "../mocks/MockERC20SendAndCallReceiver.sol"; +import {MockNativeSendAndCallReceiver} from "../mocks/MockNativeSendAndCallReceiver.sol"; +import {IERC20} from "@openzeppelin/contracts@5.0.2/token/ERC20/IERC20.sol"; +import {ExampleERC20} from "@mocks/ExampleERC20.sol"; + +contract MockERC20SendAndCallReceiverTest is Test { + IERC20 public erc20; + MockERC20SendAndCallReceiver public erc20SendAndCallReceiver; + + bytes32 public constant DEFAULT_TOKEN_HOME_BLOCKCHAIN_ID = + bytes32(hex"abcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcd"); + address internal _originSenderAddress = vm.addr(0x1); + address internal _originTokenTransferrerAddress = vm.addr(0x2); + + event TokensReceived( + bytes32 indexed sourceBlockchainID, + address indexed originTokenTransferrerAddress, + address indexed originSenderAddress, + address token, + uint256 amount, + bytes payload + ); + + function setUp() public virtual { + erc20 = new ExampleERC20(); + erc20SendAndCallReceiver = new MockERC20SendAndCallReceiver(); + } + + function testRevert() public { + vm.expectRevert("MockERC20SendAndCallReceiver: empty payload"); + erc20SendAndCallReceiver.receiveTokens({ + sourceBlockchainID: bytes32(0), + originTokenTransferrerAddress: address(this), + originSenderAddress: address(this), + token: address(erc20), + amount: 10, + payload: new bytes(0) + }); + } + + function testSuccess() public { + uint256 amount = 100; + bytes memory payload = hex"9876543210"; + erc20.approve(address(erc20SendAndCallReceiver), amount); + vm.expectEmit(true, true, true, true, address(erc20SendAndCallReceiver)); + emit TokensReceived({ + sourceBlockchainID: DEFAULT_TOKEN_HOME_BLOCKCHAIN_ID, + originTokenTransferrerAddress: _originTokenTransferrerAddress, + originSenderAddress: _originSenderAddress, + token: address(erc20), + amount: amount, + payload: payload + }); + erc20SendAndCallReceiver.receiveTokens({ + sourceBlockchainID: DEFAULT_TOKEN_HOME_BLOCKCHAIN_ID, + originTokenTransferrerAddress: _originTokenTransferrerAddress, + originSenderAddress: _originSenderAddress, + token: address(erc20), + amount: amount, + payload: payload + }); + assertEq(erc20.balanceOf(address(erc20SendAndCallReceiver)), amount); + } + + function testReceiveSenderCheck() public { + uint256 amount = 100; + bytes memory payload = hex"9876543210"; + erc20.approve(address(erc20SendAndCallReceiver), amount); + + erc20SendAndCallReceiver.blockSender(DEFAULT_TOKEN_HOME_BLOCKCHAIN_ID, _originSenderAddress); + assertTrue( + erc20SendAndCallReceiver.blockedSenders( + DEFAULT_TOKEN_HOME_BLOCKCHAIN_ID, _originSenderAddress + ) + ); + + vm.expectRevert("MockERC20SendAndCallReceiver: sender blocked"); + erc20SendAndCallReceiver.receiveTokens({ + sourceBlockchainID: DEFAULT_TOKEN_HOME_BLOCKCHAIN_ID, + originTokenTransferrerAddress: _originTokenTransferrerAddress, + originSenderAddress: _originSenderAddress, + token: address(erc20), + amount: amount, + payload: payload + }); + assertEq(erc20.balanceOf(address(erc20SendAndCallReceiver)), 0); + } +} + +contract MockNativeSendAndCallReceiverTest is Test { + MockNativeSendAndCallReceiver public nativeSendAndCallReceiver; + + bytes32 public constant DEFAULT_TOKEN_HOME_BLOCKCHAIN_ID = + bytes32(hex"abcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcd"); + address internal _originSenderAddress = vm.addr(0x1); + address internal _originTokenTransferrerAddress = vm.addr(0x2); + + event TokensReceived( + bytes32 indexed sourceBlockchainID, + address indexed originTokenTransferrerAddress, + address indexed originSenderAddress, + uint256 amount, + bytes payload + ); + + function setUp() public virtual { + nativeSendAndCallReceiver = new MockNativeSendAndCallReceiver(); + } + + function testRevert() public { + vm.expectRevert("MockNativeSendAndCallReceiver: empty payload"); + nativeSendAndCallReceiver.receiveTokens( + bytes32(0), address(this), address(this), new bytes(0) + ); + } + + function testSuccess() public { + uint256 amount = 10; + bytes memory payload = hex"1234567890"; + vm.expectEmit(true, true, true, true, address(nativeSendAndCallReceiver)); + emit TokensReceived( + DEFAULT_TOKEN_HOME_BLOCKCHAIN_ID, + _originTokenTransferrerAddress, + _originSenderAddress, + amount, + payload + ); + nativeSendAndCallReceiver.receiveTokens{value: amount}( + DEFAULT_TOKEN_HOME_BLOCKCHAIN_ID, + _originTokenTransferrerAddress, + _originSenderAddress, + payload + ); + assertEq(address(nativeSendAndCallReceiver).balance, amount); + } + + function testReceiveSenderCheck() public { + uint256 amount = 10; + bytes memory payload = hex"1234567890"; + + nativeSendAndCallReceiver.blockSender( + DEFAULT_TOKEN_HOME_BLOCKCHAIN_ID, _originSenderAddress + ); + assertTrue( + nativeSendAndCallReceiver.blockedSenders( + DEFAULT_TOKEN_HOME_BLOCKCHAIN_ID, _originSenderAddress + ) + ); + + vm.expectRevert("MockNativeSendAndCallReceiver: sender blocked"); + nativeSendAndCallReceiver.receiveTokens{value: amount}( + DEFAULT_TOKEN_HOME_BLOCKCHAIN_ID, + _originTokenTransferrerAddress, + _originSenderAddress, + payload + ); + assertEq(address(nativeSendAndCallReceiver).balance, 0); + } +} diff --git a/contracts/ictt/tests/NativeTokenHomeTests.t.sol b/contracts/ictt/tests/NativeTokenHomeTests.t.sol new file mode 100644 index 000000000..95f6f6338 --- /dev/null +++ b/contracts/ictt/tests/NativeTokenHomeTests.t.sol @@ -0,0 +1,182 @@ +// (c) 2024, Ava Labs, Inc. All rights reserved. +// See the file LICENSE for licensing terms. + +// SPDX-License-Identifier: Ecosystem + +pragma solidity 0.8.25; + +import {TokenHomeTest} from "./TokenHomeTests.t.sol"; +import {NativeTokenTransferrerTest} from "./NativeTokenTransferrerTests.t.sol"; +import {NativeTokenHomeUpgradeable} from "../TokenHome/NativeTokenHomeUpgradeable.sol"; +import {NativeTokenHome} from "../TokenHome/NativeTokenHome.sol"; +import {IWrappedNativeToken} from "../interfaces/IWrappedNativeToken.sol"; +import {INativeSendAndCallReceiver} from "../interfaces/INativeSendAndCallReceiver.sol"; +import {WrappedNativeToken} from "../WrappedNativeToken.sol"; +import {IERC20} from "@openzeppelin/contracts@5.0.2/token/ERC20/IERC20.sol"; +import {SafeERC20} from "@openzeppelin/contracts@5.0.2/token/ERC20/utils/SafeERC20.sol"; +import {Ownable} from "@openzeppelin/contracts@5.0.2/access/Ownable.sol"; +import {ICMInitializable} from "@utilities/ICMInitializable.sol"; +import {Initializable} from "@openzeppelin/contracts@5.0.2/proxy/utils/Initializable.sol"; + +contract NativeTokenHomeTest is NativeTokenTransferrerTest, TokenHomeTest { + using SafeERC20 for IERC20; + + NativeTokenHomeUpgradeable public app; + IWrappedNativeToken public wavax; + + receive() external payable { + require(msg.sender == address(app), "NativeTokenHomeTest: invalid receive payable sender"); + } + + function setUp() public override { + TokenHomeTest.setUp(); + + wavax = new WrappedNativeToken("AVAX"); + app = new NativeTokenHomeUpgradeable(ICMInitializable.Allowed); + app.initialize( + MOCK_TELEPORTER_REGISTRY_ADDRESS, MOCK_TELEPORTER_MESSENGER_ADDRESS, 1, address(wavax) + ); + tokenHome = app; + nativeTokenTransferrer = app; + tokenTransferrer = app; + transferredToken = IERC20(wavax); + tokenHomeDecimals = 18; + } + + /** + * Initialization unit tests + */ + function testNonUpgradeableInitialization() public { + app = + new NativeTokenHome(MOCK_TELEPORTER_REGISTRY_ADDRESS, address(this), 1, address(wavax)); + assertEq(app.getBlockchainID(), DEFAULT_TOKEN_HOME_BLOCKCHAIN_ID); + } + + function testDisableInitialization() public { + app = new NativeTokenHomeUpgradeable(ICMInitializable.Disallowed); + vm.expectRevert(abi.encodeWithSelector(Initializable.InvalidInitialization.selector)); + app.initialize(MOCK_TELEPORTER_REGISTRY_ADDRESS, address(this), 1, address(wavax)); + } + + function testZeroTeleporterRegistryAddress() public { + _invalidInitialization( + address(0), + address(this), + address(wavax), + "TeleporterRegistryApp: zero Teleporter registry address" + ); + } + + function testZeroTeleporterManagerAddress() public { + _invalidInitialization( + MOCK_TELEPORTER_REGISTRY_ADDRESS, + address(0), + address(wavax), + abi.encodeWithSelector(Ownable.OwnableInvalidOwner.selector, address(0)) + ); + } + + function testZeroFeeTokenAddress() public { + _invalidInitialization( + MOCK_TELEPORTER_REGISTRY_ADDRESS, + address(this), + address(0), + _formatErrorMessage("zero token address") + ); + } + + function _checkExpectedWithdrawal(address recipient, uint256 amount) internal override { + vm.expectEmit(true, true, true, true, address(tokenHome)); + emit TokensWithdrawn(recipient, amount); + vm.expectCall(address(wavax), abi.encodeCall(IWrappedNativeToken.withdraw, (amount))); + vm.expectEmit(true, true, true, true, address(wavax)); + emit Withdrawal(address(app), amount); + } + + function _setUpExpectedSendAndCall( + bytes32 sourceBlockchainID, + OriginSenderInfo memory originInfo, + address recipient, + uint256 amount, + bytes memory payload, + uint256 gasLimit, + bool targetHasCode, + bool expectSuccess + ) internal override { + if (targetHasCode) { + // Non-zero code length + vm.etch(recipient, new bytes(1)); + + bytes memory expectedCalldata = abi.encodeCall( + INativeSendAndCallReceiver.receiveTokens, + ( + sourceBlockchainID, + originInfo.tokenTransferrerAddress, + originInfo.senderAddress, + payload + ) + ); + if (expectSuccess) { + vm.mockCall(recipient, amount, expectedCalldata, new bytes(0)); + } else { + vm.mockCallRevert(recipient, amount, expectedCalldata, new bytes(0)); + } + vm.expectCall(recipient, amount, uint64(gasLimit), expectedCalldata); + } else { + // No code at target + vm.etch(recipient, new bytes(0)); + } + + if (targetHasCode && expectSuccess) { + vm.expectEmit(true, true, true, true, address(app)); + emit CallSucceeded(DEFAULT_RECIPIENT_CONTRACT_ADDRESS, amount); + } else { + vm.expectEmit(true, true, true, true, address(app)); + emit CallFailed(DEFAULT_RECIPIENT_CONTRACT_ADDRESS, amount); + } + } + + function _setUpExpectedDeposit(uint256 amount, uint256 feeAmount) internal override { + wavax.deposit{value: feeAmount}(); + // Transfer the fee to the token transferrer if it is greater than 0 + if (feeAmount > 0) { + transferredToken.safeIncreaseAllowance(address(tokenTransferrer), feeAmount); + vm.expectCall( + address(transferredToken), + abi.encodeCall( + IERC20.transferFrom, (address(this), address(tokenTransferrer), feeAmount) + ) + ); + } + + vm.expectCall(address(transferredToken), abi.encodeCall(IWrappedNativeToken.deposit, ())); + vm.expectEmit(true, true, true, true, address(transferredToken)); + emit Deposit(address(nativeTokenTransferrer), amount); + } + + // solhint-disable-next-line no-empty-blocks + function _setUpDeposit(uint256 amount) internal virtual override {} + + function _setUpExpectedZeroAmountRevert() internal override { + vm.expectRevert("SafeWrappedNativeTokenDeposit: balance not increased"); + } + + function _addCollateral( + bytes32 remoteBlockchainID, + address remoteTokenTransferrerAddress, + uint256 amount + ) internal override { + app.addCollateral{value: amount}(remoteBlockchainID, remoteTokenTransferrerAddress); + } + + function _invalidInitialization( + address teleporterRegistryAddress, + address teleporterManagerAddress, + address wrappedTokenAddress, + bytes memory expectedErrorMessage + ) private { + app = new NativeTokenHomeUpgradeable(ICMInitializable.Allowed); + vm.expectRevert(expectedErrorMessage); + app.initialize(teleporterRegistryAddress, teleporterManagerAddress, 1, wrappedTokenAddress); + } +} diff --git a/contracts/ictt/tests/NativeTokenRemoteTests.t.sol b/contracts/ictt/tests/NativeTokenRemoteTests.t.sol new file mode 100644 index 000000000..21eb3a34f --- /dev/null +++ b/contracts/ictt/tests/NativeTokenRemoteTests.t.sol @@ -0,0 +1,559 @@ +// (c) 2024, Ava Labs, Inc. All rights reserved. +// See the file LICENSE for licensing terms. + +// SPDX-License-Identifier: Ecosystem + +pragma solidity 0.8.25; + +import {TokenRemoteTest} from "./TokenRemoteTests.t.sol"; +import {NativeTokenTransferrerTest} from "./NativeTokenTransferrerTests.t.sol"; +import {INativeSendAndCallReceiver} from "../interfaces/INativeSendAndCallReceiver.sol"; +import {TokenRemote} from "../TokenRemote/TokenRemote.sol"; +import {NativeTokenRemoteUpgradeable} from "../TokenRemote/NativeTokenRemoteUpgradeable.sol"; +import {NativeTokenRemote} from "../TokenRemote/NativeTokenRemote.sol"; +import {TokenRemoteSettings} from "../TokenRemote/interfaces/ITokenRemote.sol"; +import {INativeMinter} from + "@avalabs/subnet-evm-contracts@1.2.0/contracts/interfaces/INativeMinter.sol"; +import { + ITeleporterMessenger, + TeleporterMessageInput, + TeleporterFeeInfo +} from "@teleporter/ITeleporterMessenger.sol"; +import {SendTokensInput} from "../interfaces/ITokenTransferrer.sol"; +import {IERC20} from "@openzeppelin/contracts@5.0.2/token/ERC20/IERC20.sol"; +import {SafeERC20} from "@openzeppelin/contracts@5.0.2/token/ERC20/utils/SafeERC20.sol"; +import {ExampleERC20} from "@mocks/ExampleERC20.sol"; +import {ICMInitializable} from "@utilities/ICMInitializable.sol"; +import {Initializable} from "@openzeppelin/contracts@5.0.2/proxy/utils/Initializable.sol"; + +contract NativeTokenRemoteTest is NativeTokenTransferrerTest, TokenRemoteTest { + using SafeERC20 for IERC20; + + address public constant TEST_ACCOUNT = 0xd4E96eF8eee8678dBFf4d535E033Ed1a4F7605b7; + string public constant DEFAULT_SYMBOL = "XYZ"; + NativeTokenRemoteUpgradeable public app; + + event ReportBurnedTxFees(bytes32 indexed teleporterMessageID, uint256 feesBurned); + + function setUp() public override { + TokenRemoteTest.setUp(); + + tokenHomeDecimals = 6; + app = NativeTokenRemoteUpgradeable(payable(address(_createNewRemoteInstance()))); + tokenRemote = app; + nativeTokenTransferrer = app; + tokenTransferrer = app; + assertEq(app.totalNativeAssetSupply(), _DEFAULT_INITIAL_RESERVE_IMBALANCE); + _collateralizeTokenTransferrer(); + } + + /** + * Initialization unit tests + */ + function testNonUpgradeableInitialization() public { + app = new NativeTokenRemote({ + settings: TokenRemoteSettings({ + teleporterRegistryAddress: MOCK_TELEPORTER_REGISTRY_ADDRESS, + teleporterManager: address(this), + minTeleporterVersion: 1, + tokenHomeBlockchainID: DEFAULT_TOKEN_HOME_BLOCKCHAIN_ID, + tokenHomeAddress: DEFAULT_TOKEN_HOME_ADDRESS, + tokenHomeDecimals: tokenHomeDecimals + }), + nativeAssetSymbol: DEFAULT_SYMBOL, + initialReserveImbalance: _DEFAULT_INITIAL_RESERVE_IMBALANCE, + burnedFeesReportingRewardPercentage: _DEFAULT_BURN_FEE_REWARDS_PERCENTAGE + }); + assertEq(app.getBlockchainID(), DEFAULT_TOKEN_REMOTE_BLOCKCHAIN_ID); + } + + function testDisableInitialization() public { + app = new NativeTokenRemoteUpgradeable(ICMInitializable.Disallowed); + vm.expectRevert(abi.encodeWithSelector(Initializable.InvalidInitialization.selector)); + app.initialize({ + settings: TokenRemoteSettings({ + teleporterRegistryAddress: MOCK_TELEPORTER_REGISTRY_ADDRESS, + teleporterManager: address(this), + minTeleporterVersion: 1, + tokenHomeBlockchainID: DEFAULT_TOKEN_HOME_BLOCKCHAIN_ID, + tokenHomeAddress: DEFAULT_TOKEN_HOME_ADDRESS, + tokenHomeDecimals: tokenHomeDecimals + }), + nativeAssetSymbol: DEFAULT_SYMBOL, + initialReserveImbalance: _DEFAULT_INITIAL_RESERVE_IMBALANCE, + burnedFeesReportingRewardPercentage: _DEFAULT_BURN_FEE_REWARDS_PERCENTAGE + }); + } + + function testZeroInitialReserveImbalance() public { + _invalidInitialization({ + settings: TokenRemoteSettings({ + teleporterRegistryAddress: MOCK_TELEPORTER_REGISTRY_ADDRESS, + teleporterManager: address(this), + minTeleporterVersion: 1, + tokenHomeBlockchainID: DEFAULT_TOKEN_HOME_BLOCKCHAIN_ID, + tokenHomeAddress: DEFAULT_TOKEN_HOME_ADDRESS, + tokenHomeDecimals: tokenHomeDecimals + }), + nativeAssetSymbol: DEFAULT_SYMBOL, + initialReserveImbalance: 0, + burnedFeesReportingRewardPercentage: _DEFAULT_BURN_FEE_REWARDS_PERCENTAGE, + expectedErrorMessage: "NativeTokenRemote: zero initial reserve imbalance" + }); + } + + function testInvalidBurnedRewardPercentage() public { + _invalidInitialization({ + settings: TokenRemoteSettings({ + teleporterRegistryAddress: MOCK_TELEPORTER_REGISTRY_ADDRESS, + teleporterManager: address(this), + minTeleporterVersion: 1, + tokenHomeBlockchainID: DEFAULT_TOKEN_HOME_BLOCKCHAIN_ID, + tokenHomeAddress: DEFAULT_TOKEN_HOME_ADDRESS, + tokenHomeDecimals: tokenHomeDecimals + }), + nativeAssetSymbol: DEFAULT_SYMBOL, + initialReserveImbalance: _DEFAULT_INITIAL_RESERVE_IMBALANCE, + burnedFeesReportingRewardPercentage: 100, + expectedErrorMessage: "NativeTokenRemote: invalid percentage" + }); + } + + function testZeroTokenHomeBlockchainID() public { + _invalidInitialization({ + settings: TokenRemoteSettings({ + teleporterRegistryAddress: MOCK_TELEPORTER_REGISTRY_ADDRESS, + teleporterManager: address(this), + minTeleporterVersion: 1, + tokenHomeBlockchainID: bytes32(0), + tokenHomeAddress: DEFAULT_TOKEN_HOME_ADDRESS, + tokenHomeDecimals: tokenHomeDecimals + }), + nativeAssetSymbol: DEFAULT_SYMBOL, + initialReserveImbalance: _DEFAULT_INITIAL_RESERVE_IMBALANCE, + burnedFeesReportingRewardPercentage: _DEFAULT_BURN_FEE_REWARDS_PERCENTAGE, + expectedErrorMessage: _formatErrorMessage("zero token home blockchain ID") + }); + } + + function testDeployToSameBlockchain() public { + _invalidInitialization({ + settings: TokenRemoteSettings({ + teleporterRegistryAddress: MOCK_TELEPORTER_REGISTRY_ADDRESS, + teleporterManager: address(this), + minTeleporterVersion: 1, + tokenHomeBlockchainID: DEFAULT_TOKEN_REMOTE_BLOCKCHAIN_ID, + tokenHomeAddress: DEFAULT_TOKEN_HOME_ADDRESS, + tokenHomeDecimals: tokenHomeDecimals + }), + nativeAssetSymbol: DEFAULT_SYMBOL, + initialReserveImbalance: _DEFAULT_INITIAL_RESERVE_IMBALANCE, + burnedFeesReportingRewardPercentage: _DEFAULT_BURN_FEE_REWARDS_PERCENTAGE, + expectedErrorMessage: _formatErrorMessage("cannot deploy to same blockchain as token home") + }); + } + + function testSendBeforeCollateralized() public { + // Need a new instance since the default set up pre-collateralizes the contract. + app = NativeTokenRemoteUpgradeable(payable(address(_createNewRemoteInstance()))); + tokenRemote = app; + nativeTokenTransferrer = app; + tokenTransferrer = app; + + vm.expectRevert("NativeTokenRemote: contract undercollateralized"); + // solhint-disable-next-line check-send-result + app.send{value: 1e17}(_createDefaultSendTokensInput()); + + // Now mark the contract as collateralized and confirm sending is enabled. + _collateralizeTokenTransferrer(); + _sendSingleHopSendSuccess(1e17, 0); + } + + function testSendAndCallBeforeCollateralized() public { + // Need a new instance since the default set up pre-collateralizes the contract. + app = NativeTokenRemoteUpgradeable(payable(address(_createNewRemoteInstance()))); + tokenRemote = app; + nativeTokenTransferrer = app; + tokenTransferrer = app; + + vm.expectRevert("NativeTokenRemote: contract undercollateralized"); + app.sendAndCall{value: 1e15}(_createDefaultSendAndCallInput()); + + // Now mark the contract as collateralized and confirm sending is enabled. + _collateralizeTokenTransferrer(); + _sendSingleHopSendSuccess(1e15, 0); + } + + function testSendWithSeparateFeeAsset() public { + uint256 amount = 2e15; + uint256 feeAmount = 100; + ExampleERC20 separateFeeAsset = new ExampleERC20(); + SendTokensInput memory input = _createDefaultSendTokensInput(); + input.primaryFeeTokenAddress = address(separateFeeAsset); + input.primaryFee = feeAmount; + + IERC20(separateFeeAsset).safeIncreaseAllowance(address(app), feeAmount); + vm.expectCall( + address(separateFeeAsset), + abi.encodeCall(IERC20.transferFrom, (address(this), address(app), feeAmount)) + ); + + _checkExpectedTeleporterCallsForSend(_createSingleHopTeleporterMessageInput(input, amount)); + vm.expectEmit(true, true, true, true, address(app)); + emit TokensSent(_MOCK_MESSAGE_ID, address(this), input, amount); + _send(input, amount); + } + + function testTotalNativeAssetSupply() public { + uint256 initialTotalMinted = app.getTotalMinted(); + uint256 initialExpectedBalance = _DEFAULT_INITIAL_RESERVE_IMBALANCE + initialTotalMinted; + assertEq(app.totalNativeAssetSupply(), initialExpectedBalance); + + // Mock tokens being burned as tx fees. + vm.deal(app.BURNED_TX_FEES_ADDRESS(), initialExpectedBalance - 1); + assertEq(app.totalNativeAssetSupply(), 1); + + // Reset the burned tx fee amount. + vm.deal(app.BURNED_TX_FEES_ADDRESS(), 0); + assertEq(app.totalNativeAssetSupply(), initialExpectedBalance); + + // Mock tokens being transferred out by crediting them to the native token remote contract + vm.deal(app.BURNED_FOR_TRANSFER_ADDRESS(), initialExpectedBalance - 1); + assertEq(app.totalNativeAssetSupply(), 1); + + // Depositing native tokens into the contract to be wrapped native tokens shouldn't affect the supply + // of the native asset, but should be reflected in the total supply of the ERC20 representation. + app.deposit{value: 2}(); + assertEq(app.totalNativeAssetSupply(), 1); + assertEq(app.totalSupply(), 2); + } + + function testTransferToHome() public { + SendTokensInput memory input = _createDefaultSendTokensInput(); + uint256 amount = _DEFAULT_TRANSFER_AMOUNT; + vm.expectEmit(true, true, true, true, address(app)); + emit TokensSent({ + teleporterMessageID: _MOCK_MESSAGE_ID, + sender: address(this), + input: input, + amount: amount + }); + + TeleporterMessageInput memory expectedMessageInput = TeleporterMessageInput({ + destinationBlockchainID: input.destinationBlockchainID, + destinationAddress: input.destinationTokenTransferrerAddress, + feeInfo: TeleporterFeeInfo({feeTokenAddress: address(app), amount: input.primaryFee}), + requiredGasLimit: input.requiredGasLimit, + allowedRelayerAddresses: new address[](0), + message: _encodeSingleHopSendMessage(amount, input.recipient) + }); + + vm.expectCall( + MOCK_TELEPORTER_MESSENGER_ADDRESS, + abi.encodeCall(ITeleporterMessenger.sendCrossChainMessage, (expectedMessageInput)) + ); + // solhint-disable-next-line check-send-result + app.send{value: amount}(input); + } + + function testReceiveSendAndCallFailureInsufficientValue() public { + uint256 amount = 200; + bytes memory payload = hex"DEADBEEF"; + OriginSenderInfo memory originInfo; + originInfo.tokenTransferrerAddress = address(app); + originInfo.senderAddress = address(this); + bytes memory message = _encodeSingleHopCallMessage({ + sourceBlockchainID: DEFAULT_TOKEN_HOME_BLOCKCHAIN_ID, + originInfo: originInfo, + amount: amount, + recipientContract: DEFAULT_RECIPIENT_CONTRACT_ADDRESS, + recipientPayload: payload, + recipientGasLimit: DEFAULT_RECIPIENT_GAS_LIMIT, + fallbackRecipient: DEFAULT_FALLBACK_RECIPIENT_ADDRESS + }); + + _setUpMockMint(address(app), amount); + vm.deal(address(app), amount - 1); + vm.expectRevert("CallUtils: insufficient value"); + vm.prank(MOCK_TELEPORTER_MESSENGER_ADDRESS); + tokenRemote.receiveTeleporterMessage( + DEFAULT_TOKEN_HOME_BLOCKCHAIN_ID, DEFAULT_TOKEN_HOME_ADDRESS, message + ); + } + + function testReportBurnFeesNoNewAmount() public { + vm.expectRevert("NativeTokenRemote: burn address balance not greater than last report"); + app.reportBurnedTxFees(DEFAULT_REQUIRED_GAS_LIMIT); + } + + function testReportBurnFeesScaledToZero() public { + vm.deal(app.BURNED_TX_FEES_ADDRESS(), 1); + vm.expectRevert("NativeTokenRemote: zero scaled amount to report burn"); + app.reportBurnedTxFees(DEFAULT_REQUIRED_GAS_LIMIT); + } + + function testReportBurnFeesSuccess() public { + uint256 initialBurnedTxFeeAmount = 1e19; + uint256 expectedReward = initialBurnedTxFeeAmount / 100; // 1% of 1e17 + uint256 expectedReportedAmount = initialBurnedTxFeeAmount - expectedReward; + vm.deal(app.BURNED_TX_FEES_ADDRESS(), initialBurnedTxFeeAmount); + + _setUpMockMint(address(app), expectedReward); + TeleporterMessageInput memory expectedMessageInput = _createSingleHopTeleporterMessageInput( + SendTokensInput({ + destinationBlockchainID: app.getTokenHomeBlockchainID(), + destinationTokenTransferrerAddress: app.getTokenHomeAddress(), + recipient: app.HOME_CHAIN_BURN_ADDRESS(), + primaryFeeTokenAddress: address(app), + primaryFee: expectedReward, + secondaryFee: 0, + requiredGasLimit: DEFAULT_REQUIRED_GAS_LIMIT, + multiHopFallback: address(0) + }), + expectedReportedAmount + ); + _checkExpectedTeleporterCallsForSend(expectedMessageInput); + app.reportBurnedTxFees(DEFAULT_REQUIRED_GAS_LIMIT); + + // Calling it again should revert since no additional amount as been burned. + vm.expectRevert("NativeTokenRemote: burn address balance not greater than last report"); + app.reportBurnedTxFees(DEFAULT_REQUIRED_GAS_LIMIT); + + // Mock more transaction fees being burned. + uint256 additionalBurnTxFeeAmount = 5 * 1e15 + 3; + expectedReward = additionalBurnTxFeeAmount / 100; // 1%, rounded down due to integer division. + expectedReportedAmount = additionalBurnTxFeeAmount - expectedReward; + vm.deal(app.BURNED_TX_FEES_ADDRESS(), initialBurnedTxFeeAmount + additionalBurnTxFeeAmount); + + _setUpMockMint(address(app), expectedReward); + expectedMessageInput = _createSingleHopTeleporterMessageInput( + SendTokensInput({ + destinationBlockchainID: app.getTokenHomeBlockchainID(), + destinationTokenTransferrerAddress: app.getTokenHomeAddress(), + recipient: app.HOME_CHAIN_BURN_ADDRESS(), + primaryFeeTokenAddress: address(app), + primaryFee: expectedReward, + secondaryFee: 0, + requiredGasLimit: DEFAULT_REQUIRED_GAS_LIMIT, + multiHopFallback: address(0) + }), + expectedReportedAmount + ); + _checkExpectedTeleporterCallsForSend(expectedMessageInput); + app.reportBurnedTxFees(DEFAULT_REQUIRED_GAS_LIMIT); + } + + function testReportBurnFeesNoRewardSuccess() public { + // Create a new TokenRemote instance with no rewards for reporting burned fees. + app = new NativeTokenRemoteUpgradeable(ICMInitializable.Allowed); + app.initialize({ + settings: TokenRemoteSettings({ + teleporterRegistryAddress: MOCK_TELEPORTER_REGISTRY_ADDRESS, + teleporterManager: address(this), + minTeleporterVersion: 1, + tokenHomeBlockchainID: DEFAULT_TOKEN_HOME_BLOCKCHAIN_ID, + tokenHomeAddress: DEFAULT_TOKEN_HOME_ADDRESS, + tokenHomeDecimals: tokenHomeDecimals + }), + nativeAssetSymbol: DEFAULT_SYMBOL, + initialReserveImbalance: _DEFAULT_INITIAL_RESERVE_IMBALANCE, + burnedFeesReportingRewardPercentage: 0 + }); + tokenRemote = app; + nativeTokenTransferrer = app; + tokenTransferrer = app; + + uint256 burnedTxFeeAmount = 1e15; + vm.deal(app.BURNED_TX_FEES_ADDRESS(), burnedTxFeeAmount); + TeleporterMessageInput memory expectedMessageInput = _createSingleHopTeleporterMessageInput( + SendTokensInput({ + destinationBlockchainID: app.getTokenHomeBlockchainID(), + destinationTokenTransferrerAddress: app.getTokenHomeAddress(), + recipient: app.HOME_CHAIN_BURN_ADDRESS(), + primaryFeeTokenAddress: address(app), + primaryFee: 0, + secondaryFee: 0, + requiredGasLimit: DEFAULT_REQUIRED_GAS_LIMIT, + multiHopFallback: address(0) + }), + burnedTxFeeAmount + ); + _checkExpectedTeleporterCallsForSend(expectedMessageInput); + app.reportBurnedTxFees(DEFAULT_REQUIRED_GAS_LIMIT); + } + + function testFallback() public { + (bool success,) = address(app).call{value: 1}("1234567812345678"); + assertTrue(success); + assertEq(app.balanceOf(address(this)), 1); + } + + function testDepositWithdrawWrappedNativeToken() public { + uint256 depositAmount = 500; + uint256 withdrawAmount = 100; + vm.deal(TEST_ACCOUNT, depositAmount); + vm.startPrank(TEST_ACCOUNT); + app.deposit{value: depositAmount}(); + assertEq(app.balanceOf(TEST_ACCOUNT), depositAmount); + app.withdraw(withdrawAmount); + assertEq(app.balanceOf(TEST_ACCOUNT), depositAmount - withdrawAmount); + assertEq(TEST_ACCOUNT.balance, withdrawAmount); + } + + function _createNewRemoteInstance() internal override returns (TokenRemote) { + NativeTokenRemoteUpgradeable instance = + new NativeTokenRemoteUpgradeable(ICMInitializable.Allowed); + instance.initialize({ + settings: TokenRemoteSettings({ + teleporterRegistryAddress: MOCK_TELEPORTER_REGISTRY_ADDRESS, + teleporterManager: address(this), + minTeleporterVersion: 1, + tokenHomeBlockchainID: DEFAULT_TOKEN_HOME_BLOCKCHAIN_ID, + tokenHomeAddress: DEFAULT_TOKEN_HOME_ADDRESS, + tokenHomeDecimals: tokenHomeDecimals + }), + nativeAssetSymbol: DEFAULT_SYMBOL, + initialReserveImbalance: _DEFAULT_INITIAL_RESERVE_IMBALANCE, + burnedFeesReportingRewardPercentage: _DEFAULT_BURN_FEE_REWARDS_PERCENTAGE + }); + return instance; + } + + function _checkExpectedWithdrawal(address recipient, uint256 amount) internal override { + vm.expectEmit(true, true, true, true, address(tokenRemote)); + emit TokensWithdrawn(recipient, amount); + vm.mockCall( + NATIVE_MINTER_PRECOMPILE_ADDRESS, + abi.encodeCall(INativeMinter.mintNativeCoin, (recipient, amount)), + new bytes(0) + ); + vm.expectCall( + NATIVE_MINTER_PRECOMPILE_ADDRESS, + abi.encodeCall(INativeMinter.mintNativeCoin, (recipient, amount)) + ); + vm.deal(recipient, amount); + } + + function _setUpMockMint(address recipient, uint256 amount) internal override { + vm.mockCall( + NATIVE_MINTER_PRECOMPILE_ADDRESS, + abi.encodeCall(INativeMinter.mintNativeCoin, (recipient, amount)), + new bytes(0) + ); + vm.expectCall( + NATIVE_MINTER_PRECOMPILE_ADDRESS, + abi.encodeCall(INativeMinter.mintNativeCoin, (recipient, amount)) + ); + vm.deal(recipient, amount); + } + + function _setUpExpectedSendAndCall( + bytes32 sourceBlockchainID, + OriginSenderInfo memory originInfo, + address recipient, + uint256 amount, + bytes memory payload, + uint256 gasLimit, + bool targetHasCode, + bool expectSuccess + ) internal override { + vm.mockCall( + NATIVE_MINTER_PRECOMPILE_ADDRESS, + abi.encodeCall(INativeMinter.mintNativeCoin, (address(app), amount)), + new bytes(0) + ); + vm.expectCall( + NATIVE_MINTER_PRECOMPILE_ADDRESS, + abi.encodeCall(INativeMinter.mintNativeCoin, (address(app), amount)) + ); + + // Mock the native minter precompile crediting native balance to the contract. + vm.deal(address(app), amount); + + if (targetHasCode) { + // Non-zero code length + vm.etch(recipient, new bytes(1)); + + bytes memory expectedCalldata = abi.encodeCall( + INativeSendAndCallReceiver.receiveTokens, + ( + sourceBlockchainID, + originInfo.tokenTransferrerAddress, + originInfo.senderAddress, + payload + ) + ); + if (expectSuccess) { + vm.mockCall(recipient, amount, expectedCalldata, new bytes(0)); + } else { + vm.mockCallRevert(recipient, amount, expectedCalldata, new bytes(0)); + } + vm.expectCall(recipient, amount, uint64(gasLimit), expectedCalldata); + } else { + // No code at target + vm.etch(recipient, new bytes(0)); + } + + if (targetHasCode && expectSuccess) { + vm.expectEmit(true, true, true, true, address(app)); + emit CallSucceeded(DEFAULT_RECIPIENT_CONTRACT_ADDRESS, amount); + } else { + vm.expectEmit(true, true, true, true, address(app)); + emit CallFailed(DEFAULT_RECIPIENT_CONTRACT_ADDRESS, amount); + } + } + + function _setUpExpectedDeposit(uint256, uint256 feeAmount) internal override { + app.deposit{value: feeAmount}(); + // Transfer the fee to the token transferrer if it is greater than 0 + if (feeAmount > 0) { + IERC20(app).safeIncreaseAllowance(address(tokenTransferrer), feeAmount); + } + + if (feeAmount > 0) { + vm.expectEmit(true, true, true, true, address(app)); + emit Transfer(address(this), address(tokenTransferrer), feeAmount); + } + } + + function _setUpExpectedZeroAmountRevert() internal override { + vm.expectRevert(_formatErrorMessage("insufficient tokens to transfer")); + } + + function _getTotalSupply() internal view override returns (uint256) { + return app.totalNativeAssetSupply(); + } + + // The native token remote contract is considered collateralized once it has received + // a message from its configured home to mint tokens. Until then, the home contract is + // still assumed to have insufficient collateral. + function _collateralizeTokenTransferrer() private { + assertFalse(app.getIsCollateralized()); + uint256 amount = 10e18; + _setUpMockMint(DEFAULT_RECIPIENT_ADDRESS, amount); + vm.prank(MOCK_TELEPORTER_MESSENGER_ADDRESS); + app.receiveTeleporterMessage( + app.getTokenHomeBlockchainID(), + app.getTokenHomeAddress(), + _encodeSingleHopSendMessage(amount, DEFAULT_RECIPIENT_ADDRESS) + ); + assertTrue(app.getIsCollateralized()); + } + + function _invalidInitialization( + TokenRemoteSettings memory settings, + string memory nativeAssetSymbol, + uint256 initialReserveImbalance, + uint256 burnedFeesReportingRewardPercentage, + bytes memory expectedErrorMessage + ) private { + app = new NativeTokenRemoteUpgradeable(ICMInitializable.Allowed); + vm.expectRevert(expectedErrorMessage); + app.initialize( + settings, + nativeAssetSymbol, + initialReserveImbalance, + burnedFeesReportingRewardPercentage + ); + } +} diff --git a/contracts/ictt/tests/NativeTokenTransferrerTests.t.sol b/contracts/ictt/tests/NativeTokenTransferrerTests.t.sol new file mode 100644 index 000000000..59326cbcd --- /dev/null +++ b/contracts/ictt/tests/NativeTokenTransferrerTests.t.sol @@ -0,0 +1,38 @@ +// (c) 2024, Ava Labs, Inc. All rights reserved. +// See the file LICENSE for licensing terms. + +// SPDX-License-Identifier: Ecosystem + +pragma solidity 0.8.25; + +import {TokenTransferrerTest} from "./TokenTransferrerTests.t.sol"; +import {INativeTokenTransferrer} from "../interfaces/INativeTokenTransferrer.sol"; +import {SendTokensInput, SendAndCallInput} from "../interfaces/ITokenTransferrer.sol"; + +abstract contract NativeTokenTransferrerTest is TokenTransferrerTest { + INativeTokenTransferrer public nativeTokenTransferrer; + + event Deposit(address indexed sender, uint256 amount); + event Withdrawal(address indexed sender, uint256 amount); + + function testZeroSendAmount() public { + SendTokensInput memory input = _createDefaultSendTokensInput(); + _setUpRegisteredRemote( + input.destinationBlockchainID, input.destinationTokenTransferrerAddress, 0 + ); + _setUpExpectedZeroAmountRevert(); + _send(input, 0); + } + + function _send(SendTokensInput memory input, uint256 amount) internal virtual override { + // solhint-disable-next-line check-send-result + nativeTokenTransferrer.send{value: amount}(input); + } + + function _sendAndCall( + SendAndCallInput memory input, + uint256 amount + ) internal virtual override { + nativeTokenTransferrer.sendAndCall{value: amount}(input); + } +} diff --git a/contracts/ictt/tests/StorageSlotTests.t.sol b/contracts/ictt/tests/StorageSlotTests.t.sol new file mode 100644 index 000000000..576798a2c --- /dev/null +++ b/contracts/ictt/tests/StorageSlotTests.t.sol @@ -0,0 +1,77 @@ +// (c) 2024, Ava Labs, Inc. All rights reserved. +// See the file LICENSE for licensing terms. + +// SPDX-License-Identifier: Ecosystem + +pragma solidity 0.8.25; + +import {Test} from "@forge-std/Test.sol"; +// solhint-disable no-console +import {ERC20TokenHomeUpgradeable} from "../TokenHome/ERC20TokenHomeUpgradeable.sol"; +import {ERC20TokenRemoteUpgradeable} from "../TokenRemote/ERC20TokenRemoteUpgradeable.sol"; +import {NativeTokenHomeUpgradeable} from "../TokenHome/NativeTokenHomeUpgradeable.sol"; +import {NativeTokenRemoteUpgradeable} from "../TokenRemote/NativeTokenRemoteUpgradeable.sol"; +import {ICMInitializable} from "@utilities/ICMInitializable.sol"; + +contract StorageSlotTest is Test { + function testERC20TokenHomeStorageSlot() public { + bytes32 slot = _erc7201StorageSlot("ERC20TokenHome"); + assertEq( + new ERC20TokenHomeUpgradeable(ICMInitializable.Disallowed) + .ERC20_TOKEN_HOME_STORAGE_LOCATION(), + slot + ); + } + + function testERC20TokenRemoteStorageSlot() public { + bytes32 slot = _erc7201StorageSlot("ERC20TokenRemote"); + assertEq( + new ERC20TokenRemoteUpgradeable(ICMInitializable.Disallowed) + .ERC20_TOKEN_REMOTE_STORAGE_LOCATION(), + slot + ); + } + + function testNativeTokenHomeStorageSlot() public { + bytes32 slot = _erc7201StorageSlot("NativeTokenHome"); + assertEq( + new NativeTokenHomeUpgradeable(ICMInitializable.Disallowed) + .NATIVE_TOKEN_HOME_STORAGE_LOCATION(), + slot + ); + } + + function testNativeTokenRemoteStorageSlot() public { + bytes32 slot = _erc7201StorageSlot("NativeTokenRemote"); + assertEq( + new NativeTokenRemoteUpgradeable(ICMInitializable.Disallowed) + .NATIVE_TOKEN_REMOTE_STORAGE_LOCATION(), + slot + ); + } + + function testTokenHomeStorageSlot() public { + bytes32 slot = _erc7201StorageSlot("TokenHome"); + assertEq( + new ERC20TokenHomeUpgradeable(ICMInitializable.Disallowed).TOKEN_HOME_STORAGE_LOCATION(), + slot + ); + } + + function testTokenRemoteStorageSlot() public { + bytes32 slot = _erc7201StorageSlot("TokenRemote"); + assertEq( + new NativeTokenRemoteUpgradeable(ICMInitializable.Disallowed) + .TOKEN_REMOTE_STORAGE_LOCATION(), + slot + ); + } + + function _erc7201StorageSlot(bytes memory storageName) private pure returns (bytes32) { + return keccak256( + abi.encode( + uint256(keccak256(abi.encodePacked("avalanche-ictt.storage.", storageName))) - 1 + ) + ) & ~bytes32(uint256(0xff)); + } +} diff --git a/contracts/ictt/tests/TokenHomeTests.t.sol b/contracts/ictt/tests/TokenHomeTests.t.sol new file mode 100644 index 000000000..525afc82c --- /dev/null +++ b/contracts/ictt/tests/TokenHomeTests.t.sol @@ -0,0 +1,917 @@ +// (c) 2024, Ava Labs, Inc. All rights reserved. +// See the file LICENSE for licensing terms. + +// SPDX-License-Identifier: Ecosystem + +pragma solidity 0.8.25; + +import {TokenTransferrerTest} from "./TokenTransferrerTests.t.sol"; +import {TokenHome, IWarpMessenger} from "../TokenHome/TokenHome.sol"; +import {RemoteTokenTransferrerSettings} from "../TokenHome/interfaces/ITokenHome.sol"; +import {TeleporterRegistry} from "@teleporter/registry/TeleporterRegistry.sol"; +import { + SendTokensInput, + SendAndCallInput, + TransferrerMessageType, + TransferrerMessage, + MultiHopSendMessage, + RegisterRemoteMessage +} from "../interfaces/ITokenTransferrer.sol"; +import { + ITeleporterMessenger, + TeleporterMessageInput, + TeleporterFeeInfo +} from "@teleporter/ITeleporterMessenger.sol"; +import {Math} from "@openzeppelin/contracts@5.0.2/utils/math/Math.sol"; +import {IERC20} from "@openzeppelin/contracts@5.0.2/token/ERC20/IERC20.sol"; + +abstract contract TokenHomeTest is TokenTransferrerTest { + TokenHome public tokenHome; + + /** + * @notice The token that is transferred. + * For native assets, the wrapped token contract is used. + */ + IERC20 public transferredToken; + + event CollateralAdded( + bytes32 indexed remoteBlockchainID, + address indexed remoteTokenTransferrerAddress, + uint256 amount, + uint256 remaining + ); + + function setUp() public virtual { + vm.mockCall( + MOCK_TELEPORTER_MESSENGER_ADDRESS, + abi.encodeWithSelector(ITeleporterMessenger.sendCrossChainMessage.selector), + abi.encode(_MOCK_MESSAGE_ID) + ); + vm.mockCall( + WARP_PRECOMPILE_ADDRESS, + abi.encodeWithSelector(IWarpMessenger.getBlockchainID.selector), + abi.encode(DEFAULT_TOKEN_HOME_BLOCKCHAIN_ID) + ); + vm.expectCall( + WARP_PRECOMPILE_ADDRESS, abi.encodeWithSelector(IWarpMessenger.getBlockchainID.selector) + ); + + _initMockTeleporterRegistry(); + + vm.expectCall( + MOCK_TELEPORTER_REGISTRY_ADDRESS, + abi.encodeWithSelector( + TeleporterRegistry(MOCK_TELEPORTER_REGISTRY_ADDRESS).latestVersion.selector + ) + ); + } + + function testAddCollateralRemoteNotRegistered() public { + vm.expectRevert(_formatErrorMessage("remote not registered")); + _addCollateral(DEFAULT_TOKEN_REMOTE_BLOCKCHAIN_ID, DEFAULT_TOKEN_REMOTE_ADDRESS, 100); + } + + function testAddCollateralAlreadyCollateralized() public { + _setUpRegisteredRemote(DEFAULT_TOKEN_REMOTE_BLOCKCHAIN_ID, DEFAULT_TOKEN_REMOTE_ADDRESS, 0); + vm.expectRevert(_formatErrorMessage("zero collateral needed")); + _addCollateral(DEFAULT_TOKEN_REMOTE_BLOCKCHAIN_ID, DEFAULT_TOKEN_REMOTE_ADDRESS, 100); + } + + function testAddCollateralPartialAmount() public { + uint256 initialReserveImbalance = 100; + uint256 collateralAmount = 50; + _setUpRegisteredRemote( + DEFAULT_TOKEN_REMOTE_BLOCKCHAIN_ID, + DEFAULT_TOKEN_REMOTE_ADDRESS, + initialReserveImbalance + ); + _setUpExpectedDeposit(collateralAmount, 0); + vm.expectEmit(true, true, true, true, address(tokenHome)); + emit CollateralAdded( + DEFAULT_TOKEN_REMOTE_BLOCKCHAIN_ID, + DEFAULT_TOKEN_REMOTE_ADDRESS, + collateralAmount, + initialReserveImbalance - collateralAmount + ); + _addCollateral( + DEFAULT_TOKEN_REMOTE_BLOCKCHAIN_ID, DEFAULT_TOKEN_REMOTE_ADDRESS, collateralAmount + ); + RemoteTokenTransferrerSettings memory settings = tokenHome.getRemoteTokenTransferrerSettings( + DEFAULT_TOKEN_REMOTE_BLOCKCHAIN_ID, DEFAULT_TOKEN_REMOTE_ADDRESS + ); + assertEq(settings.collateralNeeded, initialReserveImbalance - collateralAmount); + } + + function testAddCollateralMoreThanFullAmount() public { + uint256 initialReserveImbalance = 100; + uint256 collateralAmount = 150; + _setUpRegisteredRemote( + DEFAULT_TOKEN_REMOTE_BLOCKCHAIN_ID, + DEFAULT_TOKEN_REMOTE_ADDRESS, + initialReserveImbalance + ); + _setUpExpectedDeposit(collateralAmount, 0); + vm.expectEmit(true, true, true, true, address(tokenHome)); + emit CollateralAdded( + DEFAULT_TOKEN_REMOTE_BLOCKCHAIN_ID, + DEFAULT_TOKEN_REMOTE_ADDRESS, + initialReserveImbalance, + 0 + ); + + uint256 excessAmount = collateralAmount - initialReserveImbalance; + _checkExpectedWithdrawal(address(this), excessAmount); + + _addCollateral( + DEFAULT_TOKEN_REMOTE_BLOCKCHAIN_ID, DEFAULT_TOKEN_REMOTE_ADDRESS, collateralAmount + ); + RemoteTokenTransferrerSettings memory settings = tokenHome.getRemoteTokenTransferrerSettings( + DEFAULT_TOKEN_REMOTE_BLOCKCHAIN_ID, DEFAULT_TOKEN_REMOTE_ADDRESS + ); + assertEq(settings.collateralNeeded, 0); + assertTrue(address(this).balance > 0); + } + + function testSendToUnregisteredRemote() public { + SendTokensInput memory input = _createDefaultSendTokensInput(); + vm.expectRevert(_formatErrorMessage("remote not registered")); + _send(input, _DEFAULT_TRANSFER_AMOUNT); + } + + function testSendDestinationNotCollateralized() public { + SendTokensInput memory input = _createDefaultSendTokensInput(); + _setUpRegisteredRemote( + input.destinationBlockchainID, input.destinationTokenTransferrerAddress, 1 + ); + vm.expectRevert(_formatErrorMessage("collateral needed for remote")); + _send(input, _DEFAULT_TRANSFER_AMOUNT); + } + + function testSendZeroScaledAmount() public { + _setUpRegisteredRemote( + DEFAULT_TOKEN_REMOTE_BLOCKCHAIN_ID, DEFAULT_TOKEN_REMOTE_ADDRESS, 0, 100_000, false + ); + SendTokensInput memory input = _createDefaultSendTokensInput(); + uint256 amount = 10_000; // Amount is less than the token multiplier, so will be rounded down to zero. + _setUpDeposit(amount); + vm.expectRevert(_formatErrorMessage("zero scaled amount")); + _send(input, amount); + } + + function testNonZeroFallbackRecipientForSingleHop() public { + SendTokensInput memory input = _createDefaultSendTokensInput(); + input.multiHopFallback = DEFAULT_MULTIHOP_FALLBACK_ADDRESS; + vm.expectRevert(_formatErrorMessage("non-zero multi-hop fallback")); + _send(input, 100_000); + } + + function testNonZeroFallbackRecipientForSingleHopCall() public { + SendAndCallInput memory input = _createDefaultSendAndCallInput(); + input.multiHopFallback = DEFAULT_MULTIHOP_FALLBACK_ADDRESS; + vm.expectRevert(_formatErrorMessage("non-zero multi-hop fallback")); + _sendAndCall(input, 100_000); + } + + function testNonZeroSecondaryFee() public { + SendTokensInput memory input = _createDefaultSendTokensInput(); + input.secondaryFee = 1; + vm.expectRevert(_formatErrorMessage("non-zero secondary fee")); + _send(input, 0); + } + + function testNonZeroSecondaryFeeCall() public { + SendAndCallInput memory input = _createDefaultSendAndCallInput(); + input.secondaryFee = 1; + vm.expectRevert(_formatErrorMessage("non-zero secondary fee")); + _sendAndCall(input, 0); + } + + function testReceiveInvalidMessage() public { + vm.expectRevert(); + vm.prank(MOCK_TELEPORTER_MESSENGER_ADDRESS); + tokenHome.receiveTeleporterMessage( + DEFAULT_TOKEN_REMOTE_BLOCKCHAIN_ID, DEFAULT_TOKEN_REMOTE_ADDRESS, bytes("test") + ); + } + + function testReceiveFromNonRegisteredRemote() public { + vm.expectRevert(_formatErrorMessage("remote not registered")); + vm.prank(MOCK_TELEPORTER_MESSENGER_ADDRESS); + tokenHome.receiveTeleporterMessage( + DEFAULT_TOKEN_REMOTE_BLOCKCHAIN_ID, + DEFAULT_TOKEN_REMOTE_ADDRESS, + _encodeSingleHopSendMessage(1, DEFAULT_RECIPIENT_ADDRESS) + ); + } + + function testReceiveFromNonCollateralizedRemote() public { + _setUpRegisteredRemote( + DEFAULT_TOKEN_REMOTE_BLOCKCHAIN_ID, DEFAULT_TOKEN_REMOTE_ADDRESS, 100 + ); + vm.expectRevert(_formatErrorMessage("remote not collateralized")); + vm.prank(MOCK_TELEPORTER_MESSENGER_ADDRESS); + tokenHome.receiveTeleporterMessage( + DEFAULT_TOKEN_REMOTE_BLOCKCHAIN_ID, + DEFAULT_TOKEN_REMOTE_ADDRESS, + _encodeSingleHopSendMessage(1, DEFAULT_RECIPIENT_ADDRESS) + ); + } + + function testReceiveInsufficientTokenTransferBalance() public { + uint256 collateralAmount = 100; + _setUpRegisteredRemote( + DEFAULT_TOKEN_REMOTE_BLOCKCHAIN_ID, DEFAULT_TOKEN_REMOTE_ADDRESS, collateralAmount + ); + _setUpExpectedDeposit(collateralAmount, 0); + _addCollateral( + DEFAULT_TOKEN_REMOTE_BLOCKCHAIN_ID, DEFAULT_TOKEN_REMOTE_ADDRESS, collateralAmount + ); + vm.expectRevert(_formatErrorMessage("insufficient token transfer balance")); + vm.prank(MOCK_TELEPORTER_MESSENGER_ADDRESS); + tokenHome.receiveTeleporterMessage( + DEFAULT_TOKEN_REMOTE_BLOCKCHAIN_ID, + DEFAULT_TOKEN_REMOTE_ADDRESS, + _encodeSingleHopSendMessage(1, DEFAULT_RECIPIENT_ADDRESS) + ); + } + + function testReceiveWithdrawSuccess() public { + uint256 amount = 200; + uint256 feeAmount = 10; + _sendSingleHopSendSuccess(amount, feeAmount); + + // Withdraw an amount less than transferred amount + uint256 withdrawAmount = amount / 2; + + _checkExpectedWithdrawal(DEFAULT_RECIPIENT_ADDRESS, withdrawAmount); + vm.prank(MOCK_TELEPORTER_MESSENGER_ADDRESS); + tokenHome.receiveTeleporterMessage( + DEFAULT_TOKEN_REMOTE_BLOCKCHAIN_ID, + DEFAULT_TOKEN_REMOTE_ADDRESS, + _encodeSingleHopSendMessage(withdrawAmount, DEFAULT_RECIPIENT_ADDRESS) + ); + + // Make sure the balance is correct. Only the remaining amount remains locked in the home + // contract. The rest is withdrawn. + assertEq( + tokenHome.getTransferredBalance( + DEFAULT_TOKEN_REMOTE_BLOCKCHAIN_ID, DEFAULT_TOKEN_REMOTE_ADDRESS + ), + withdrawAmount + ); + } + + function testReceiveSendAndCallSuccess() public { + // First send to ç to increase the token transfer balance + uint256 amount = 200_000; + _sendSingleHopSendSuccess(amount, 0); + + bytes32 sourceBlockchainID = DEFAULT_TOKEN_REMOTE_BLOCKCHAIN_ID; + OriginSenderInfo memory originInfo; + originInfo.tokenTransferrerAddress = DEFAULT_TOKEN_REMOTE_ADDRESS; + originInfo.senderAddress = address(this); + bytes memory payload = hex"DEADBEEF"; + _setUpExpectedSendAndCall({ + sourceBlockchainID: sourceBlockchainID, + originInfo: originInfo, + recipient: DEFAULT_RECIPIENT_CONTRACT_ADDRESS, + amount: amount, + payload: payload, + gasLimit: DEFAULT_RECIPIENT_GAS_LIMIT, + targetHasCode: true, + expectSuccess: true + }); + + bytes memory message = _encodeSingleHopCallMessage({ + sourceBlockchainID: sourceBlockchainID, + originInfo: originInfo, + amount: amount, + recipientContract: DEFAULT_RECIPIENT_CONTRACT_ADDRESS, + recipientPayload: payload, + recipientGasLimit: DEFAULT_RECIPIENT_GAS_LIMIT, + fallbackRecipient: DEFAULT_FALLBACK_RECIPIENT_ADDRESS + }); + + vm.prank(MOCK_TELEPORTER_MESSENGER_ADDRESS); + tokenHome.receiveTeleporterMessage( + DEFAULT_TOKEN_REMOTE_BLOCKCHAIN_ID, originInfo.tokenTransferrerAddress, message + ); + } + + function testReceiveSendAndCallFailure() public { + // First send to remote instance to increase the token transfer balance + uint256 amount = 2; + _sendSingleHopSendSuccess(amount, 0); + + bytes32 sourceBlockchainID = DEFAULT_TOKEN_REMOTE_BLOCKCHAIN_ID; + OriginSenderInfo memory originInfo; + originInfo.tokenTransferrerAddress = DEFAULT_TOKEN_REMOTE_ADDRESS; + originInfo.senderAddress = address(this); + bytes memory payload = hex"DEADBEEF"; + _setUpExpectedSendAndCall({ + sourceBlockchainID: sourceBlockchainID, + originInfo: originInfo, + recipient: DEFAULT_RECIPIENT_CONTRACT_ADDRESS, + amount: amount, + payload: payload, + gasLimit: DEFAULT_RECIPIENT_GAS_LIMIT, + targetHasCode: true, + expectSuccess: false + }); + + bytes memory message = _encodeSingleHopCallMessage({ + sourceBlockchainID: sourceBlockchainID, + originInfo: originInfo, + amount: amount, + recipientContract: DEFAULT_RECIPIENT_CONTRACT_ADDRESS, + recipientPayload: payload, + recipientGasLimit: DEFAULT_RECIPIENT_GAS_LIMIT, + fallbackRecipient: DEFAULT_FALLBACK_RECIPIENT_ADDRESS + }); + + vm.prank(MOCK_TELEPORTER_MESSENGER_ADDRESS); + tokenHome.receiveTeleporterMessage( + DEFAULT_TOKEN_REMOTE_BLOCKCHAIN_ID, originInfo.tokenTransferrerAddress, message + ); + } + + function testReceiveMismatchedSourceBlockchainID() public { + // First send to remote instance to increase the token transfer balance + uint256 amount = 200_000; + bytes memory payload = hex"DEADBEEF"; + _sendSingleHopSendSuccess(amount, 0); + + OriginSenderInfo memory originInfo; + originInfo.tokenTransferrerAddress = DEFAULT_TOKEN_REMOTE_ADDRESS; + originInfo.senderAddress = address(this); + + bytes memory message = _encodeSingleHopCallMessage({ + sourceBlockchainID: OTHER_BLOCKCHAIN_ID, + originInfo: originInfo, + amount: amount, + recipientContract: DEFAULT_RECIPIENT_CONTRACT_ADDRESS, + recipientPayload: payload, + recipientGasLimit: DEFAULT_RECIPIENT_GAS_LIMIT, + fallbackRecipient: DEFAULT_FALLBACK_RECIPIENT_ADDRESS + }); + + vm.prank(MOCK_TELEPORTER_MESSENGER_ADDRESS); + vm.expectRevert(_formatErrorMessage("mismatched source blockchain ID")); + tokenHome.receiveTeleporterMessage( + DEFAULT_TOKEN_REMOTE_BLOCKCHAIN_ID, DEFAULT_TOKEN_REMOTE_ADDRESS, message + ); + } + + function testReceiveWrongOriginTokenTransferrerAddress() public { + // First send to remote instance to increase the token transfer balance + uint256 amount = 200_000; + _sendSingleHopSendSuccess(amount, 0); + + address originTokenTransferrerAddress = DEFAULT_TOKEN_REMOTE_ADDRESS; + bytes memory payload = hex"DEADBEEF"; + + address wrongAddress = address(0x1); + assertNotEq(originTokenTransferrerAddress, wrongAddress); + + OriginSenderInfo memory originInfo; + originInfo.tokenTransferrerAddress = wrongAddress; + originInfo.senderAddress = address(this); + + bytes memory message = _encodeSingleHopCallMessage({ + sourceBlockchainID: DEFAULT_TOKEN_REMOTE_BLOCKCHAIN_ID, + originInfo: originInfo, + amount: amount, + recipientContract: DEFAULT_RECIPIENT_CONTRACT_ADDRESS, + recipientPayload: payload, + recipientGasLimit: DEFAULT_RECIPIENT_GAS_LIMIT, + fallbackRecipient: DEFAULT_FALLBACK_RECIPIENT_ADDRESS + }); + + vm.prank(MOCK_TELEPORTER_MESSENGER_ADDRESS); + vm.expectRevert(_formatErrorMessage("mismatched origin sender address")); + tokenHome.receiveTeleporterMessage( + DEFAULT_TOKEN_REMOTE_BLOCKCHAIN_ID, originTokenTransferrerAddress, message + ); + } + + function testMultiHopInvalidDestinationSendsToFallback() public { + // First send to remote instance to increase the token transfer balance + uint256 amount = 200_000; + _sendSingleHopSendSuccess(amount, 0); + + // The multi-hop will not be routed to the OTHER_BLOCKCHAIN_ID remote since it + // is not registered. Instead, the tokens are sent to the multi-hop fallback. + _checkExpectedWithdrawal(DEFAULT_MULTIHOP_FALLBACK_ADDRESS, amount); + vm.prank(MOCK_TELEPORTER_MESSENGER_ADDRESS); + tokenHome.receiveTeleporterMessage( + DEFAULT_TOKEN_REMOTE_BLOCKCHAIN_ID, + DEFAULT_TOKEN_REMOTE_ADDRESS, + _encodeMultiHopSendMessage({ + amount: amount, + destinationBlockchainID: OTHER_BLOCKCHAIN_ID, + destinationTokenTransferrerAddress: DEFAULT_TOKEN_REMOTE_ADDRESS, + recipient: DEFAULT_RECIPIENT_ADDRESS, + secondaryFee: 0, + secondaryGasLimit: 500_000, + multiHopFallback: DEFAULT_MULTIHOP_FALLBACK_ADDRESS + }) + ); + } + + function testMultiHopDestinationNotCollateralized() public { + // First send to remote instance to increase the token transfer balance + uint256 amount = 200_000; + _sendSingleHopSendSuccess(amount, 0); + + _setUpRegisteredRemote(OTHER_BLOCKCHAIN_ID, DEFAULT_TOKEN_REMOTE_ADDRESS, 100); + + // The multi-hop will not be routed to the OTHER_BLOCKCHAIN_ID remote since it is not yet + // fully collateralized. Instead, the tokens are sent to the multi-hop fallback. + _checkExpectedWithdrawal(DEFAULT_MULTIHOP_FALLBACK_ADDRESS, amount); + vm.prank(MOCK_TELEPORTER_MESSENGER_ADDRESS); + tokenHome.receiveTeleporterMessage( + DEFAULT_TOKEN_REMOTE_BLOCKCHAIN_ID, + DEFAULT_TOKEN_REMOTE_ADDRESS, + _encodeMultiHopSendMessage({ + amount: amount, + destinationBlockchainID: OTHER_BLOCKCHAIN_ID, + destinationTokenTransferrerAddress: DEFAULT_TOKEN_REMOTE_ADDRESS, + recipient: DEFAULT_RECIPIENT_ADDRESS, + secondaryFee: 0, + secondaryGasLimit: 500_000, + multiHopFallback: DEFAULT_MULTIHOP_FALLBACK_ADDRESS + }) + ); + } + + function testMultiHopDestinationAmountScaledToZero() public { + // First send to remote instance to increase the token transfer balance + uint256 amount = 1_000; + _sendSingleHopSendSuccess(amount, 0); + + _setUpRegisteredRemote(OTHER_BLOCKCHAIN_ID, DEFAULT_TOKEN_REMOTE_ADDRESS, 0, 100_000, false); + + // The multi-hop will not be routed to the OTHER_BLOCKCHAIN_ID remote since the token + // amount would be scaled to zero. Instead, the tokens are sent to the multi-hop fallback. + _checkExpectedWithdrawal(DEFAULT_MULTIHOP_FALLBACK_ADDRESS, amount); + vm.prank(MOCK_TELEPORTER_MESSENGER_ADDRESS); + tokenHome.receiveTeleporterMessage( + DEFAULT_TOKEN_REMOTE_BLOCKCHAIN_ID, + DEFAULT_TOKEN_REMOTE_ADDRESS, + _encodeMultiHopSendMessage({ + amount: amount, + destinationBlockchainID: OTHER_BLOCKCHAIN_ID, + destinationTokenTransferrerAddress: DEFAULT_TOKEN_REMOTE_ADDRESS, + recipient: DEFAULT_RECIPIENT_ADDRESS, + secondaryFee: 0, + secondaryGasLimit: 500_000, + multiHopFallback: DEFAULT_MULTIHOP_FALLBACK_ADDRESS + }) + ); + } + + function testMultiHopSendSuccess() public { + // First send to remote instance to increase the token transfer balance + uint256 amount = 200_000; + _sendSingleHopSendSuccess(amount, 0); + + uint256 feeAmount = 1; + uint256 transferAmount = amount - feeAmount; + SendTokensInput memory input = SendTokensInput({ + destinationBlockchainID: DEFAULT_TOKEN_REMOTE_BLOCKCHAIN_ID, + destinationTokenTransferrerAddress: DEFAULT_TOKEN_REMOTE_ADDRESS, + recipient: DEFAULT_RECIPIENT_ADDRESS, + primaryFeeTokenAddress: address(transferredToken), + primaryFee: feeAmount, + secondaryFee: 0, + requiredGasLimit: DEFAULT_REQUIRED_GAS_LIMIT, + multiHopFallback: DEFAULT_MULTIHOP_FALLBACK_ADDRESS + }); + _checkExpectedTeleporterCallsForSend( + _createSingleHopTeleporterMessageInput(input, transferAmount) + ); + + vm.expectEmit(true, true, true, true, address(tokenHome)); + emit TokensRouted(_MOCK_MESSAGE_ID, input, transferAmount); + + vm.prank(MOCK_TELEPORTER_MESSENGER_ADDRESS); + tokenHome.receiveTeleporterMessage( + DEFAULT_TOKEN_REMOTE_BLOCKCHAIN_ID, + DEFAULT_TOKEN_REMOTE_ADDRESS, + _encodeMultiHopSendMessage({ + amount: amount, + destinationBlockchainID: input.destinationBlockchainID, + destinationTokenTransferrerAddress: input.destinationTokenTransferrerAddress, + recipient: input.recipient, + secondaryFee: input.primaryFee, + secondaryGasLimit: input.requiredGasLimit, + multiHopFallback: DEFAULT_MULTIHOP_FALLBACK_ADDRESS + }) + ); + } + + function testMultiHopSendInsufficientFees() public { + // First send to remote instance to increase the token transfer balance + uint256 amount = 2; + _sendSingleHopSendSuccess(amount, 0); + uint256 balanceBefore = tokenHome.getTransferredBalance( + DEFAULT_TOKEN_REMOTE_BLOCKCHAIN_ID, DEFAULT_TOKEN_REMOTE_ADDRESS + ); + assertEq(balanceBefore, amount); + + // Fail due to insufficient amount to cover fees + MultiHopSendMessage memory message = MultiHopSendMessage({ + destinationBlockchainID: DEFAULT_TOKEN_REMOTE_BLOCKCHAIN_ID, + destinationTokenTransferrerAddress: DEFAULT_TOKEN_REMOTE_ADDRESS, + recipient: DEFAULT_RECIPIENT_ADDRESS, + amount: amount, + secondaryFee: amount, + secondaryGasLimit: 50_000, + multiHopFallback: DEFAULT_MULTIHOP_FALLBACK_ADDRESS + }); + + vm.expectRevert(_formatErrorMessage("insufficient amount to cover fees")); + vm.prank(MOCK_TELEPORTER_MESSENGER_ADDRESS); + tokenHome.receiveTeleporterMessage( + DEFAULT_TOKEN_REMOTE_BLOCKCHAIN_ID, + DEFAULT_TOKEN_REMOTE_ADDRESS, + _encodeMultiHopSendMessage({ + amount: amount, + destinationBlockchainID: message.destinationBlockchainID, + destinationTokenTransferrerAddress: message.destinationTokenTransferrerAddress, + recipient: message.recipient, + secondaryFee: message.secondaryFee, + secondaryGasLimit: message.secondaryGasLimit, + multiHopFallback: DEFAULT_MULTIHOP_FALLBACK_ADDRESS + }) + ); + + // Make sure the token transfer balance is still the same + assertEq( + tokenHome.getTransferredBalance( + DEFAULT_TOKEN_REMOTE_BLOCKCHAIN_ID, DEFAULT_TOKEN_REMOTE_ADDRESS + ), + balanceBefore + ); + } + + function testMultiHopCallInvalidDestination() public { + // First send to remote instance to increase the token transfer balance + uint256 amount = 200_000; + _sendSingleHopSendSuccess(amount, 0); + + // The multi-hop will not be routed to the OTHER_BLOCKCHAIN_ID remote since it is not registered. + // Instead, the tokens are sent to the multi-hop fallback. + _checkExpectedWithdrawal(DEFAULT_MULTIHOP_FALLBACK_ADDRESS, amount); + vm.prank(MOCK_TELEPORTER_MESSENGER_ADDRESS); + address originSenderAddress = address(this); + tokenHome.receiveTeleporterMessage( + DEFAULT_TOKEN_REMOTE_BLOCKCHAIN_ID, + DEFAULT_TOKEN_REMOTE_ADDRESS, + _encodeMultiHopCallMessage({ + originSenderAddress: originSenderAddress, + amount: amount, + destinationBlockchainID: OTHER_BLOCKCHAIN_ID, + destinationTokenTransferrerAddress: DEFAULT_TOKEN_REMOTE_ADDRESS, + recipientContract: DEFAULT_RECIPIENT_CONTRACT_ADDRESS, + recipientPayload: new bytes(16), + recipientGasLimit: DEFAULT_RECIPIENT_GAS_LIMIT, + fallbackRecipient: DEFAULT_FALLBACK_RECIPIENT_ADDRESS, + multiHopFallback: DEFAULT_MULTIHOP_FALLBACK_ADDRESS, + secondaryRequiredGasLimit: 500_000, + secondaryFee: 0 + }) + ); + } + + function testMultiHopCallDestinationNotCollateralized() public { + // First send to remote instance to increase the token transfer balance + uint256 amount = 200_000; + _sendSingleHopSendSuccess(amount, 0); + + _setUpRegisteredRemote(OTHER_BLOCKCHAIN_ID, DEFAULT_TOKEN_REMOTE_ADDRESS, 100); + + // The multi-hop will not be routed to the OTHER_BLOCKCHAIN_ID remote since it is not yet + // fully collateralized. Instead, the tokens are sent to the multi-hop fallback. + _checkExpectedWithdrawal(DEFAULT_MULTIHOP_FALLBACK_ADDRESS, amount); + vm.prank(MOCK_TELEPORTER_MESSENGER_ADDRESS); + address originSenderAddress = address(this); + tokenHome.receiveTeleporterMessage( + DEFAULT_TOKEN_REMOTE_BLOCKCHAIN_ID, + DEFAULT_TOKEN_REMOTE_ADDRESS, + _encodeMultiHopCallMessage({ + originSenderAddress: originSenderAddress, + amount: amount, + destinationBlockchainID: OTHER_BLOCKCHAIN_ID, + destinationTokenTransferrerAddress: DEFAULT_TOKEN_REMOTE_ADDRESS, + recipientContract: DEFAULT_RECIPIENT_CONTRACT_ADDRESS, + recipientPayload: new bytes(16), + recipientGasLimit: DEFAULT_RECIPIENT_GAS_LIMIT, + fallbackRecipient: DEFAULT_FALLBACK_RECIPIENT_ADDRESS, + multiHopFallback: DEFAULT_MULTIHOP_FALLBACK_ADDRESS, + secondaryRequiredGasLimit: 500_000, + secondaryFee: 0 + }) + ); + } + + function testMultiHopCallAmountScaledToZero() public { + // First send to remote instance to increase the token transfer balance + uint256 amount = 1_000; + _sendSingleHopSendSuccess(amount, 0); + + _setUpRegisteredRemote(OTHER_BLOCKCHAIN_ID, DEFAULT_TOKEN_REMOTE_ADDRESS, 0, 100_000, false); + + // The multi-hop will not be routed to the OTHER_BLOCKCHAIN_ID remote since the token + // amount would be scaled to zero. Instead, the tokens are sent to the multi-hop fallback. + _checkExpectedWithdrawal(DEFAULT_MULTIHOP_FALLBACK_ADDRESS, amount); + vm.prank(MOCK_TELEPORTER_MESSENGER_ADDRESS); + address originSenderAddress = address(this); + tokenHome.receiveTeleporterMessage( + DEFAULT_TOKEN_REMOTE_BLOCKCHAIN_ID, + DEFAULT_TOKEN_REMOTE_ADDRESS, + _encodeMultiHopCallMessage({ + originSenderAddress: originSenderAddress, + amount: amount, + destinationBlockchainID: OTHER_BLOCKCHAIN_ID, + destinationTokenTransferrerAddress: DEFAULT_TOKEN_REMOTE_ADDRESS, + recipientContract: DEFAULT_RECIPIENT_CONTRACT_ADDRESS, + recipientPayload: new bytes(16), + recipientGasLimit: DEFAULT_RECIPIENT_GAS_LIMIT, + fallbackRecipient: DEFAULT_FALLBACK_RECIPIENT_ADDRESS, + multiHopFallback: DEFAULT_MULTIHOP_FALLBACK_ADDRESS, + secondaryRequiredGasLimit: 500_000, + secondaryFee: 0 + }) + ); + } + + function testMultiHopCallSuccess() public { + // First send to remote instance to increase the token transfer balance + uint256 amount = 200_000; + _sendSingleHopSendSuccess(amount, 0); + + uint256 feeAmount = 1; + uint256 transferAmount = amount - feeAmount; + OriginSenderInfo memory originInfo; + originInfo.tokenTransferrerAddress = DEFAULT_TOKEN_REMOTE_ADDRESS; + originInfo.senderAddress = address(this); + SendAndCallInput memory input = SendAndCallInput({ + destinationBlockchainID: DEFAULT_TOKEN_REMOTE_BLOCKCHAIN_ID, + destinationTokenTransferrerAddress: DEFAULT_TOKEN_REMOTE_ADDRESS, + recipientContract: DEFAULT_RECIPIENT_CONTRACT_ADDRESS, + recipientPayload: hex"65465465", + requiredGasLimit: DEFAULT_REQUIRED_GAS_LIMIT, + recipientGasLimit: DEFAULT_RECIPIENT_GAS_LIMIT, + fallbackRecipient: DEFAULT_FALLBACK_RECIPIENT_ADDRESS, + primaryFeeTokenAddress: address(transferredToken), + multiHopFallback: DEFAULT_MULTIHOP_FALLBACK_ADDRESS, + primaryFee: feeAmount, + secondaryFee: 0 + }); + _checkExpectedTeleporterCallsForSend( + _createSingleHopCallTeleporterMessageInput( + DEFAULT_TOKEN_REMOTE_BLOCKCHAIN_ID, originInfo, input, transferAmount + ) + ); + + vm.expectEmit(true, true, true, true, address(tokenHome)); + emit TokensAndCallRouted(_MOCK_MESSAGE_ID, input, transferAmount); + + vm.prank(MOCK_TELEPORTER_MESSENGER_ADDRESS); + tokenHome.receiveTeleporterMessage( + DEFAULT_TOKEN_REMOTE_BLOCKCHAIN_ID, + DEFAULT_TOKEN_REMOTE_ADDRESS, + _encodeMultiHopCallMessage({ + originSenderAddress: originInfo.senderAddress, + amount: amount, + destinationBlockchainID: input.destinationBlockchainID, + destinationTokenTransferrerAddress: input.destinationTokenTransferrerAddress, + recipientContract: input.recipientContract, + recipientPayload: input.recipientPayload, + recipientGasLimit: input.recipientGasLimit, + fallbackRecipient: input.fallbackRecipient, + multiHopFallback: DEFAULT_MULTIHOP_FALLBACK_ADDRESS, + secondaryRequiredGasLimit: input.requiredGasLimit, + secondaryFee: input.primaryFee + }) + ); + } + + function testRegisterRemoteZeroBlockchainID() public { + vm.expectRevert(_formatErrorMessage("zero remote blockchain ID")); + _setUpRegisteredRemote(bytes32(0), DEFAULT_TOKEN_REMOTE_ADDRESS, 0); + } + + function testRegisterRemoteSameChain() public { + bytes32 localBlockchainID = tokenHome.getBlockchainID(); + vm.expectRevert(_formatErrorMessage("cannot register remote on same chain")); + _setUpRegisteredRemote(localBlockchainID, DEFAULT_TOKEN_REMOTE_ADDRESS, 0); + } + + function testRegisterRemoteZeroAddress() public { + vm.expectRevert(_formatErrorMessage("zero remote token transferrer address")); + _setUpRegisteredRemote(DEFAULT_TOKEN_REMOTE_BLOCKCHAIN_ID, address(0), 0); + } + + function testRegisterRemoteAlreadyReigstered() public { + _setUpRegisteredRemote(DEFAULT_TOKEN_REMOTE_BLOCKCHAIN_ID, DEFAULT_TOKEN_REMOTE_ADDRESS, 0); + vm.expectRevert(_formatErrorMessage("remote already registered")); + _setUpRegisteredRemote(DEFAULT_TOKEN_REMOTE_BLOCKCHAIN_ID, DEFAULT_TOKEN_REMOTE_ADDRESS, 0); + } + + function testRegisterRemoteTokenDecimalsTooHigh() public { + vm.expectRevert(_formatErrorMessage("remote token decimals too high")); + _setUpRegisteredRemote( + DEFAULT_TOKEN_REMOTE_BLOCKCHAIN_ID, DEFAULT_TOKEN_REMOTE_ADDRESS, 0, 1e19, true + ); + } + + function testRegisterInvalidHomeTokenDecimals() public { + vm.expectRevert(_formatErrorMessage("invalid home token decimals")); + uint8 remoteTokenDecimals = uint8(18); + RegisterRemoteMessage memory payload = RegisterRemoteMessage({ + initialReserveImbalance: 0, + homeTokenDecimals: tokenHomeDecimals + 1, + remoteTokenDecimals: uint8(remoteTokenDecimals) + }); + TransferrerMessage memory message = TransferrerMessage({ + messageType: TransferrerMessageType.REGISTER_REMOTE, + payload: abi.encode(payload) + }); + vm.prank(MOCK_TELEPORTER_MESSENGER_ADDRESS); + tokenHome.receiveTeleporterMessage( + DEFAULT_TOKEN_REMOTE_BLOCKCHAIN_ID, DEFAULT_TOKEN_REMOTE_ADDRESS, abi.encode(message) + ); + } + + function testSendScaledDownAmount() public { + uint256 amount = 100; + uint256 feeAmount = 1; + + SendTokensInput memory input = _createDefaultSendTokensInput(); + input.primaryFee = feeAmount; + + uint256 tokenMultiplier = 1e2; + + // For another destination, the raw amount sent over the wire should be divided by 1e2. + amount = 42 * tokenMultiplier; + feeAmount = 0; + input.destinationBlockchainID = OTHER_BLOCKCHAIN_ID; + input.primaryFee = feeAmount; + _setUpRegisteredRemote( + input.destinationBlockchainID, + input.destinationTokenTransferrerAddress, + 0, + tokenMultiplier, + false + ); + _setUpExpectedDeposit(amount, input.primaryFee); + TeleporterMessageInput memory expectedMessage = TeleporterMessageInput({ + destinationBlockchainID: input.destinationBlockchainID, + destinationAddress: input.destinationTokenTransferrerAddress, + feeInfo: TeleporterFeeInfo({ + feeTokenAddress: address(transferredToken), + amount: input.primaryFee + }), + requiredGasLimit: input.requiredGasLimit, + allowedRelayerAddresses: new address[](0), + message: _encodeSingleHopSendMessage(amount / tokenMultiplier, DEFAULT_RECIPIENT_ADDRESS) + }); + _checkExpectedTeleporterCallsForSend(expectedMessage); + vm.expectEmit(true, true, true, true, address(tokenTransferrer)); + emit TokensSent(_MOCK_MESSAGE_ID, address(this), input, amount / tokenMultiplier); + _send(input, amount); + } + + function testGetTokenAddress() public view { + assertEq(address(transferredToken), address(tokenHome.getTokenAddress())); + } + + function _setUpExpectedSendAndCall( + bytes32 sourceBlockchainID, + OriginSenderInfo memory originInfo, + address recipient, + uint256 amount, + bytes memory payload, + uint256 gasLimit, + bool targetHasCode, + bool expectSuccess + ) internal virtual; + + function _addCollateral( + bytes32 remoteBlockchainID, + address remoteTokenTransferrerAddress, + uint256 amount + ) internal virtual; + + /** + * @notice Set up necessary calls to deposit funds and call `send` or `sendAndCall` + * on the token home contract. + * Different from `_setUpExpectedDeposit` since the send that follows isn't + * expected to succeed. So `setUpDeposit` does not check for expected emit events. + */ + function _setUpDeposit(uint256 amount) internal virtual; + + function _setUpRegisteredRemote( + bytes32 remoteBlockchainID, + address remoteTokenTransferrerAddress, + uint256 initialReserveImbalance + ) internal virtual override { + _setUpRegisteredRemote( + remoteBlockchainID, remoteTokenTransferrerAddress, initialReserveImbalance, 1, true + ); + } + + function _setUpRegisteredRemote( + bytes32 remoteBlockchainID, + address remoteTokenTransferrerAddress, + uint256 initialReserveImbalance, + uint256 tokenMultiplier, + bool multiplyOnRemote + ) internal virtual { + uint8 remoteTokenDecimals = uint8( + multiplyOnRemote + ? tokenHomeDecimals + Math.log10(tokenMultiplier) + : tokenHomeDecimals - Math.log10(tokenMultiplier) + ); + RegisterRemoteMessage memory payload = RegisterRemoteMessage({ + initialReserveImbalance: initialReserveImbalance, + homeTokenDecimals: tokenHomeDecimals, + remoteTokenDecimals: remoteTokenDecimals + }); + TransferrerMessage memory message = TransferrerMessage({ + messageType: TransferrerMessageType.REGISTER_REMOTE, + payload: abi.encode(payload) + }); + vm.prank(MOCK_TELEPORTER_MESSENGER_ADDRESS); + tokenHome.receiveTeleporterMessage( + remoteBlockchainID, remoteTokenTransferrerAddress, abi.encode(message) + ); + } + + function _createDefaultSendTokensInput() + internal + view + override + returns (SendTokensInput memory) + { + return SendTokensInput({ + destinationBlockchainID: DEFAULT_TOKEN_REMOTE_BLOCKCHAIN_ID, + destinationTokenTransferrerAddress: DEFAULT_TOKEN_REMOTE_ADDRESS, + recipient: DEFAULT_RECIPIENT_ADDRESS, + primaryFeeTokenAddress: address(transferredToken), + primaryFee: 0, + secondaryFee: 0, + requiredGasLimit: DEFAULT_REQUIRED_GAS_LIMIT, + multiHopFallback: address(0) + }); + } + + function _createDefaultSendAndCallInput() + internal + view + override + returns (SendAndCallInput memory) + { + return SendAndCallInput({ + destinationBlockchainID: DEFAULT_TOKEN_REMOTE_BLOCKCHAIN_ID, + destinationTokenTransferrerAddress: DEFAULT_TOKEN_REMOTE_ADDRESS, + recipientContract: DEFAULT_RECIPIENT_CONTRACT_ADDRESS, + recipientPayload: new bytes(16), + requiredGasLimit: DEFAULT_REQUIRED_GAS_LIMIT, + recipientGasLimit: DEFAULT_RECIPIENT_GAS_LIMIT, + fallbackRecipient: DEFAULT_FALLBACK_RECIPIENT_ADDRESS, + multiHopFallback: address(0), + primaryFeeTokenAddress: address(transferredToken), + primaryFee: 0, + secondaryFee: 0 + }); + } + + function _createDefaultReceiveTokensInput() internal view returns (SendTokensInput memory) { + return SendTokensInput({ + destinationBlockchainID: DEFAULT_TOKEN_HOME_BLOCKCHAIN_ID, + destinationTokenTransferrerAddress: address(tokenHome), + recipient: DEFAULT_RECIPIENT_ADDRESS, + primaryFeeTokenAddress: address(transferredToken), + primaryFee: 0, + secondaryFee: 0, + requiredGasLimit: 0, + multiHopFallback: DEFAULT_MULTIHOP_FALLBACK_ADDRESS + }); + } + + function _getDefaultMessageSourceBlockchainID() internal pure override returns (bytes32) { + return DEFAULT_TOKEN_HOME_BLOCKCHAIN_ID; + } + + function _formatErrorMessage(string memory message) + internal + pure + override + returns (bytes memory) + { + return bytes(string.concat("TokenHome: ", message)); + } +} diff --git a/contracts/ictt/tests/TokenRemoteTests.t.sol b/contracts/ictt/tests/TokenRemoteTests.t.sol new file mode 100644 index 000000000..bd96f80eb --- /dev/null +++ b/contracts/ictt/tests/TokenRemoteTests.t.sol @@ -0,0 +1,661 @@ +// (c) 2024, Ava Labs, Inc. All rights reserved. +// See the file LICENSE for licensing terms. + +// SPDX-License-Identifier: Ecosystem + +pragma solidity 0.8.25; + +import {TeleporterMessageInput, TeleporterFeeInfo} from "@teleporter/ITeleporterMessenger.sol"; +import {TokenTransferrerTest} from "./TokenTransferrerTests.t.sol"; +import {TokenRemote, IWarpMessenger} from "../TokenRemote/TokenRemote.sol"; +import {TeleporterRegistry} from "@teleporter/registry/TeleporterRegistry.sol"; +import {SendTokensInput, SendAndCallInput} from "../interfaces/ITokenTransferrer.sol"; +import {ITeleporterMessenger} from "@teleporter/ITeleporterMessenger.sol"; +import {TokenScalingUtils} from "@utilities/TokenScalingUtils.sol"; +import { + SendTokensInput, + SendAndCallInput, + TransferrerMessageType, + TransferrerMessage, + RegisterRemoteMessage +} from "../interfaces/ITokenTransferrer.sol"; +import {IERC20} from "@openzeppelin/contracts@5.0.2/token/ERC20/IERC20.sol"; +import {ExampleERC20} from "@mocks/ExampleERC20.sol"; +import {SafeERC20} from "@openzeppelin/contracts@5.0.2/token/ERC20/utils/SafeERC20.sol"; + +abstract contract TokenRemoteTest is TokenTransferrerTest { + using SafeERC20 for IERC20; + + TokenRemote public tokenRemote; + uint8 public tokenDecimals = 18; + + function setUp() public virtual { + vm.mockCall( + MOCK_TELEPORTER_MESSENGER_ADDRESS, + abi.encodeWithSelector(ITeleporterMessenger.sendCrossChainMessage.selector), + abi.encode(_MOCK_MESSAGE_ID) + ); + vm.mockCall( + WARP_PRECOMPILE_ADDRESS, + abi.encodeCall(IWarpMessenger.getBlockchainID, ()), + abi.encode(DEFAULT_TOKEN_REMOTE_BLOCKCHAIN_ID) + ); + vm.expectCall(WARP_PRECOMPILE_ADDRESS, abi.encodeCall(IWarpMessenger.getBlockchainID, ())); + + _initMockTeleporterRegistry(); + + vm.expectCall( + MOCK_TELEPORTER_REGISTRY_ADDRESS, + abi.encodeCall(TeleporterRegistry(MOCK_TELEPORTER_REGISTRY_ADDRESS).latestVersion, ()) + ); + } + + function testZeroDestinationBlockchain() public { + SendTokensInput memory input = _createDefaultSendTokensInput(); + input.destinationBlockchainID = bytes32(0); + vm.expectRevert(_formatErrorMessage("zero destination blockchain ID")); + _send(input, _DEFAULT_TRANSFER_AMOUNT); + } + + function testZeroDestinationBlockchainWithSendAndCall() public { + SendAndCallInput memory input = _createDefaultSendAndCallInput(); + input.destinationBlockchainID = bytes32(0); + vm.expectRevert(_formatErrorMessage("zero destination blockchain ID")); + _sendAndCall(input, _DEFAULT_TRANSFER_AMOUNT); + } + + function testZeroDestinationTokenTransferrerAddress() public { + SendTokensInput memory input = _createDefaultSendTokensInput(); + input.destinationTokenTransferrerAddress = address(0); + vm.expectRevert(_formatErrorMessage("zero destination token transferrer address")); + _send(input, _DEFAULT_TRANSFER_AMOUNT); + } + + function testZeroDestinationTokenTransferrerAddressWithSendAndCall() public { + SendAndCallInput memory input = _createDefaultSendAndCallInput(); + input.destinationTokenTransferrerAddress = address(0); + vm.expectRevert(_formatErrorMessage("zero destination token transferrer address")); + _sendAndCall(input, _DEFAULT_TRANSFER_AMOUNT); + } + + function testInvalidSendingBackToHomeBlockchain() public { + SendTokensInput memory input = _createDefaultSendTokensInput(); + input.destinationTokenTransferrerAddress = address(this); + vm.expectRevert(_formatErrorMessage("invalid destination token transferrer address")); + _send(input, _DEFAULT_TRANSFER_AMOUNT); + } + + function testInvalidSendAndCallingBackToHomeBlockchain() public { + SendAndCallInput memory input = _createDefaultSendAndCallInput(); + input.destinationTokenTransferrerAddress = address(this); + vm.expectRevert(_formatErrorMessage("invalid destination token transferrer address")); + _sendAndCall(input, _DEFAULT_TRANSFER_AMOUNT); + } + + function testNonZeroSecondaryFeeToHomeBlockchain() public { + SendTokensInput memory input = _createDefaultSendTokensInput(); + input.secondaryFee = 1; + vm.expectRevert(_formatErrorMessage("non-zero secondary fee")); + _send(input, _DEFAULT_TRANSFER_AMOUNT); + } + + function testNonZeroSecondaryFeeToHomeBlockchainCall() public { + SendAndCallInput memory input = _createDefaultSendAndCallInput(); + input.secondaryFee = 1; + vm.expectRevert(_formatErrorMessage("non-zero secondary fee")); + _sendAndCall(input, _DEFAULT_TRANSFER_AMOUNT); + } + + function testNonZeroMultiHopFallbackForSingleHop() public { + SendTokensInput memory input = _createDefaultSendTokensInput(); + input.multiHopFallback = DEFAULT_MULTIHOP_FALLBACK_ADDRESS; + vm.expectRevert(_formatErrorMessage("non-zero multi-hop fallback")); + _send(input, _DEFAULT_TRANSFER_AMOUNT); + } + + function testNonZeroMultiHopFallbackForSingleHopCall() public { + SendAndCallInput memory input = _createDefaultSendAndCallInput(); + input.multiHopFallback = DEFAULT_MULTIHOP_FALLBACK_ADDRESS; + vm.expectRevert(_formatErrorMessage("non-zero multi-hop fallback")); + _sendAndCall(input, _DEFAULT_TRANSFER_AMOUNT); + } + + function testSendingToSameInstance() public { + SendTokensInput memory input = _createDefaultSendTokensInput(); + input.destinationBlockchainID = tokenRemote.getBlockchainID(); + input.destinationTokenTransferrerAddress = address(tokenRemote); + input.multiHopFallback = DEFAULT_MULTIHOP_FALLBACK_ADDRESS; + vm.expectRevert(_formatErrorMessage("invalid destination token transferrer address")); + _send(input, _DEFAULT_TRANSFER_AMOUNT); + } + + function testSendingToOtherInstanceOnSameChain() public { + _sendMultiHopSendSuccess(tokenRemote.getBlockchainID(), 1e18, 999, 555); + } + + function testSendAndCallingToSameInstance() public { + SendAndCallInput memory input = _createDefaultSendAndCallInput(); + input.destinationBlockchainID = tokenRemote.getBlockchainID(); + input.destinationTokenTransferrerAddress = address(tokenRemote); + input.multiHopFallback = DEFAULT_MULTIHOP_FALLBACK_ADDRESS; + vm.expectRevert(_formatErrorMessage("invalid destination token transferrer address")); + _sendAndCall(input, _DEFAULT_TRANSFER_AMOUNT); + } + + function testSendAndCallingToOtherInstanceOnSameChain() public { + _sendMultiHopCallSuccess(tokenRemote.getBlockchainID(), 1e18, 999, 555); + } + + function testSendZeroAmountAfterRemoveScaling() public { + SendAndCallInput memory input = _createDefaultSendAndCallInput(); + input.primaryFee = 0; + input.secondaryFee = 0; + uint256 amount = 1; + + if ( + TokenScalingUtils.removeTokenScale( + tokenRemote.getTokenMultiplier(), tokenRemote.getMultiplyOnRemote(), amount + ) != 0 + ) { + return; + } + + _setUpExpectedDeposit(amount, input.primaryFee); + vm.expectRevert(_formatErrorMessage("insufficient tokens to transfer")); + _sendAndCall(input, amount); + } + + function testSendToSameBlockchainDifferentDestination() public { + uint256 amount = 2e15; + SendTokensInput memory input = _createDefaultSendTokensInput(); + input.destinationBlockchainID = tokenRemote.getBlockchainID(); + // Set the desintation token transferrer address to an address different than the token remote contract. + input.destinationTokenTransferrerAddress = address(0x55); + + _sendSingleHopSendSuccess(amount, input.primaryFee); + } + + function testSendMultiHopInsufficientAmountToCoverFees() public { + SendTokensInput memory input = _createDefaultSendMultiHopInput(); + uint256 amount = 1; + input.secondaryFee = 2; + _setUpExpectedDeposit(amount, input.primaryFee); + vm.expectRevert(_formatErrorMessage("insufficient tokens to transfer")); + _send(input, amount); + } + + function testSendMultiHopZeroMultiHopFallback() public { + uint256 amount = 200_000; + SendTokensInput memory input = _createDefaultSendMultiHopInput(); + input.multiHopFallback = address(0); + vm.expectRevert(_formatErrorMessage("zero multi-hop fallback")); + _send(input, amount); + } + + function testSendAndCallMultiHopZeroMultiHopFallback() public { + uint256 amount = 200_000; + SendAndCallInput memory input = _createDefaultSendAndCallInput(); + input.destinationBlockchainID = OTHER_BLOCKCHAIN_ID; + input.multiHopFallback = address(0); + vm.expectRevert(_formatErrorMessage("zero multi-hop fallback")); + _sendAndCall(input, amount); + } + + function testSendMultiHopSendSuccess() public { + uint256 amount = 4e15; + uint256 primaryFee = 5; + uint256 secondaryFee = 2; + _sendMultiHopSendSuccess(OTHER_BLOCKCHAIN_ID, amount, primaryFee, secondaryFee); + } + + function testSendMultiHopCallSuccess() public { + uint256 amount = 4e18; + uint256 primaryFee = 5; + uint256 secondaryFee = 1; + _sendMultiHopCallSuccess(OTHER_BLOCKCHAIN_ID, amount, primaryFee, secondaryFee); + } + + function testReceiveInvalidSourceBlockchainID() public { + vm.expectRevert(_formatErrorMessage("invalid source blockchain ID")); + vm.prank(MOCK_TELEPORTER_MESSENGER_ADDRESS); + tokenRemote.receiveTeleporterMessage( + DEFAULT_TOKEN_REMOTE_BLOCKCHAIN_ID, DEFAULT_TOKEN_HOME_ADDRESS, new bytes(0) + ); + } + + function testReceiveInvalidOriginSenderAddress() public { + vm.expectRevert(_formatErrorMessage("invalid origin sender address")); + vm.prank(MOCK_TELEPORTER_MESSENGER_ADDRESS); + tokenRemote.receiveTeleporterMessage( + DEFAULT_TOKEN_HOME_BLOCKCHAIN_ID, address(0), new bytes(0) + ); + } + + function testReceiveInvalidMessage() public { + vm.expectRevert(); + vm.prank(MOCK_TELEPORTER_MESSENGER_ADDRESS); + tokenRemote.receiveTeleporterMessage( + DEFAULT_TOKEN_HOME_BLOCKCHAIN_ID, DEFAULT_TOKEN_HOME_ADDRESS, bytes("test") + ); + } + + function testReceiveWithdrawSuccess() public { + uint256 amount = 200; + vm.prank(MOCK_TELEPORTER_MESSENGER_ADDRESS); + _checkExpectedWithdrawal(DEFAULT_RECIPIENT_ADDRESS, amount); + uint256 initialSupply = _getTotalSupply(); + tokenRemote.receiveTeleporterMessage( + DEFAULT_TOKEN_HOME_BLOCKCHAIN_ID, + DEFAULT_TOKEN_HOME_ADDRESS, + _encodeSingleHopSendMessage(amount, DEFAULT_RECIPIENT_ADDRESS) + ); + assertEq(_getTotalSupply(), initialSupply + amount); + } + + function testReceiveSendAndCallSuccess() public { + uint256 amount = 2; + bytes memory payload = hex"DEADBEEF"; + + bytes32 sourceBlockchainID = DEFAULT_TOKEN_HOME_BLOCKCHAIN_ID; + OriginSenderInfo memory originInfo; + originInfo.senderAddress = address(this); + _setUpExpectedSendAndCall({ + sourceBlockchainID: sourceBlockchainID, + originInfo: originInfo, + recipient: DEFAULT_RECIPIENT_CONTRACT_ADDRESS, + amount: amount, + payload: payload, + gasLimit: DEFAULT_RECIPIENT_GAS_LIMIT, + targetHasCode: true, + expectSuccess: true + }); + + bytes memory message = _encodeSingleHopCallMessage({ + sourceBlockchainID: sourceBlockchainID, + originInfo: originInfo, + amount: amount, + recipientContract: DEFAULT_RECIPIENT_CONTRACT_ADDRESS, + recipientPayload: payload, + recipientGasLimit: DEFAULT_RECIPIENT_GAS_LIMIT, + fallbackRecipient: DEFAULT_FALLBACK_RECIPIENT_ADDRESS + }); + + uint256 initialSupply = _getTotalSupply(); + + vm.prank(MOCK_TELEPORTER_MESSENGER_ADDRESS); + tokenRemote.receiveTeleporterMessage( + DEFAULT_TOKEN_HOME_BLOCKCHAIN_ID, DEFAULT_TOKEN_HOME_ADDRESS, message + ); + + assertEq(_getTotalSupply(), initialSupply + amount); + } + + function testReceiveSendAndCallFailure() public { + uint256 amount = 2; + bytes memory payload = hex"DEADBEEF"; + + OriginSenderInfo memory originInfo; + originInfo.tokenTransferrerAddress = address(tokenTransferrer); + originInfo.senderAddress = address(this); + _setUpExpectedSendAndCall({ + sourceBlockchainID: DEFAULT_TOKEN_HOME_BLOCKCHAIN_ID, + originInfo: originInfo, + recipient: DEFAULT_RECIPIENT_CONTRACT_ADDRESS, + amount: amount, + payload: payload, + gasLimit: DEFAULT_RECIPIENT_GAS_LIMIT, + targetHasCode: true, + expectSuccess: false + }); + + bytes memory message = _encodeSingleHopCallMessage({ + sourceBlockchainID: DEFAULT_TOKEN_HOME_BLOCKCHAIN_ID, + originInfo: originInfo, + amount: amount, + recipientContract: DEFAULT_RECIPIENT_CONTRACT_ADDRESS, + recipientPayload: payload, + recipientGasLimit: DEFAULT_RECIPIENT_GAS_LIMIT, + fallbackRecipient: DEFAULT_FALLBACK_RECIPIENT_ADDRESS + }); + vm.prank(MOCK_TELEPORTER_MESSENGER_ADDRESS); + tokenRemote.receiveTeleporterMessage( + DEFAULT_TOKEN_HOME_BLOCKCHAIN_ID, DEFAULT_TOKEN_HOME_ADDRESS, message + ); + } + + function testReceiveSendAndCallFailureNoCode() public { + uint256 amount = 2; + bytes memory payload = hex"DEADBEEF"; + + bytes32 sourceBlockchainID = DEFAULT_TOKEN_HOME_BLOCKCHAIN_ID; + OriginSenderInfo memory originInfo; + originInfo.tokenTransferrerAddress = address(tokenTransferrer); + originInfo.senderAddress = address(this); + _setUpExpectedSendAndCall({ + sourceBlockchainID: sourceBlockchainID, + originInfo: originInfo, + recipient: DEFAULT_RECIPIENT_CONTRACT_ADDRESS, + amount: amount, + payload: payload, + gasLimit: DEFAULT_RECIPIENT_GAS_LIMIT, + targetHasCode: false, + expectSuccess: false + }); + + bytes memory message = _encodeSingleHopCallMessage({ + sourceBlockchainID: sourceBlockchainID, + originInfo: originInfo, + amount: amount, + recipientContract: DEFAULT_RECIPIENT_CONTRACT_ADDRESS, + recipientPayload: payload, + recipientGasLimit: DEFAULT_RECIPIENT_GAS_LIMIT, + fallbackRecipient: DEFAULT_FALLBACK_RECIPIENT_ADDRESS + }); + vm.prank(MOCK_TELEPORTER_MESSENGER_ADDRESS); + tokenRemote.receiveTeleporterMessage( + DEFAULT_TOKEN_HOME_BLOCKCHAIN_ID, DEFAULT_TOKEN_HOME_ADDRESS, message + ); + } + + function testReceiveSendAndCallFailureInsufficientGas() public { + uint256 amount = 200; + bytes memory payload = hex"DEADBEEF"; + uint256 gasLimit = 5_000_000; + OriginSenderInfo memory originInfo; + originInfo.tokenTransferrerAddress = address(tokenTransferrer); + originInfo.senderAddress = address(this); + + bytes memory message = _encodeSingleHopCallMessage({ + sourceBlockchainID: DEFAULT_TOKEN_HOME_BLOCKCHAIN_ID, + originInfo: originInfo, + amount: amount, + recipientContract: DEFAULT_RECIPIENT_CONTRACT_ADDRESS, + recipientPayload: payload, + recipientGasLimit: gasLimit, + fallbackRecipient: DEFAULT_FALLBACK_RECIPIENT_ADDRESS + }); + + _setUpMockMint(address(tokenRemote), amount); + vm.expectRevert("CallUtils: insufficient gas"); + vm.prank(MOCK_TELEPORTER_MESSENGER_ADDRESS); + tokenRemote.receiveTeleporterMessage{gas: gasLimit - 1}( + DEFAULT_TOKEN_HOME_BLOCKCHAIN_ID, DEFAULT_TOKEN_HOME_ADDRESS, message + ); + } + + function testReceiveInvalidMessageType() public { + vm.expectRevert(_formatErrorMessage("invalid message type")); + vm.prank(MOCK_TELEPORTER_MESSENGER_ADDRESS); + tokenRemote.receiveTeleporterMessage( + DEFAULT_TOKEN_HOME_BLOCKCHAIN_ID, + DEFAULT_TOKEN_HOME_ADDRESS, + _encodeMultiHopSendMessage({ + amount: 1, + destinationBlockchainID: DEFAULT_TOKEN_REMOTE_BLOCKCHAIN_ID, + destinationTokenTransferrerAddress: DEFAULT_TOKEN_REMOTE_ADDRESS, + recipient: DEFAULT_RECIPIENT_ADDRESS, + secondaryFee: 0, + secondaryGasLimit: 1_000, + multiHopFallback: DEFAULT_MULTIHOP_FALLBACK_ADDRESS + }) + ); + } + + function testRegisterWithHomeSuccess() public { + // Create a new instance that has not yet received any messages. + tokenRemote = _createNewRemoteInstance(); + tokenTransferrer = tokenRemote; + + // Deploy a separate fee asset for registering with the token home. + ExampleERC20 separateFeeAsset = new ExampleERC20(); + uint256 feeAmount = 13; + TeleporterFeeInfo memory feeInfo = + TeleporterFeeInfo({feeTokenAddress: address(separateFeeAsset), amount: feeAmount}); + + IERC20(separateFeeAsset).safeIncreaseAllowance(address(tokenTransferrer), feeAmount); + vm.expectCall( + address(separateFeeAsset), + abi.encodeCall( + IERC20.transferFrom, (address(this), address(tokenTransferrer), feeAmount) + ) + ); + + TransferrerMessage memory expectedTokenTransfer = TransferrerMessage({ + messageType: TransferrerMessageType.REGISTER_REMOTE, + payload: abi.encode( + RegisterRemoteMessage({ + initialReserveImbalance: tokenRemote.getInitialReserveImbalance(), + remoteTokenDecimals: tokenDecimals, + homeTokenDecimals: tokenHomeDecimals + }) + ) + }); + TeleporterMessageInput memory expectedMessageInput = TeleporterMessageInput({ + destinationBlockchainID: tokenRemote.getTokenHomeBlockchainID(), + destinationAddress: tokenRemote.getTokenHomeAddress(), + feeInfo: feeInfo, + requiredGasLimit: tokenRemote.REGISTER_REMOTE_REQUIRED_GAS(), + allowedRelayerAddresses: new address[](0), + message: abi.encode(expectedTokenTransfer) + }); + vm.mockCall( + MOCK_TELEPORTER_MESSENGER_ADDRESS, + abi.encodeCall(ITeleporterMessenger.sendCrossChainMessage, (expectedMessageInput)), + abi.encode(_MOCK_MESSAGE_ID) + ); + vm.expectCall( + MOCK_TELEPORTER_MESSENGER_ADDRESS, + abi.encodeCall(ITeleporterMessenger.sendCrossChainMessage, (expectedMessageInput)) + ); + + tokenRemote.registerWithHome(feeInfo); + } + + function testRegisterWithHomeAlreadyRegistered() public { + // Mock receiving a message from the home so that the remote knows + // that it is registered already. + uint256 amount = 1; + _setUpMockMint(DEFAULT_RECIPIENT_ADDRESS, amount); + vm.prank(MOCK_TELEPORTER_MESSENGER_ADDRESS); + tokenRemote.receiveTeleporterMessage( + tokenRemote.getTokenHomeBlockchainID(), + tokenRemote.getTokenHomeAddress(), + _encodeSingleHopSendMessage(amount, DEFAULT_RECIPIENT_ADDRESS) + ); + + vm.expectRevert(_formatErrorMessage("already registered")); + tokenRemote.registerWithHome(TeleporterFeeInfo({feeTokenAddress: address(0), amount: 0})); + } + + function testCalculateNumWords() public view { + assertEq(tokenRemote.calculateNumWords(0), 0); + assertEq(tokenRemote.calculateNumWords(1), 1); + assertEq(tokenRemote.calculateNumWords(32), 1); + assertEq(tokenRemote.calculateNumWords(33), 2); + assertEq(tokenRemote.calculateNumWords(64), 2); + assertEq(tokenRemote.calculateNumWords(65), 3); + } + + function _sendMultiHopSendSuccess( + bytes32 destinationBlockchainID, + uint256 amount, + uint256 primaryFee, + uint256 secondaryFee + ) internal { + uint256 transferAmount = amount; + SendTokensInput memory input = _createDefaultSendTokensInput(); + input.destinationBlockchainID = destinationBlockchainID; + input.primaryFee = primaryFee; + input.secondaryFee = secondaryFee; + input.multiHopFallback = DEFAULT_MULTIHOP_FALLBACK_ADDRESS; + + _setUpExpectedDeposit(amount, input.primaryFee); + _checkExpectedTeleporterCallsForSend( + _createMultiHopSendTeleporterMessageInput(input, transferAmount) + ); + vm.expectEmit(true, true, true, true, address(tokenTransferrer)); + emit TokensSent(_MOCK_MESSAGE_ID, address(this), input, transferAmount); + _send(input, amount); + } + + function _sendMultiHopCallSuccess( + bytes32 destinationBlockchainID, + uint256 amount, + uint256 primaryFee, + uint256 secondaryFee + ) internal { + uint256 transferAmount = amount; + SendAndCallInput memory input = _createDefaultSendAndCallInput(); + input.destinationBlockchainID = destinationBlockchainID; + input.primaryFee = primaryFee; + input.secondaryFee = secondaryFee; + input.multiHopFallback = DEFAULT_MULTIHOP_FALLBACK_ADDRESS; + + _setUpExpectedDeposit(amount, input.primaryFee); + + // Only tokens destinations scale tokens, so isReceive is always false here. + address originSenderAddress = address(this); + + _checkExpectedTeleporterCallsForSend( + _createMultiHopCallTeleporterMessageInput(originSenderAddress, input, transferAmount) + ); + vm.expectEmit(true, true, true, true, address(tokenTransferrer)); + emit TokensAndCallSent(_MOCK_MESSAGE_ID, originSenderAddress, input, transferAmount); + _sendAndCall(input, amount); + } + + function _setUpMockMint(address recipient, uint256 amount) internal virtual; + + function _setUpExpectedSendAndCall( + bytes32 sourceBlockchainID, + OriginSenderInfo memory originInfo, + address recipient, + uint256 amount, + bytes memory payload, + uint256 gasLimit, + bool targetHasCode, + bool expectSuccess + ) internal virtual; + + // Remotes don't need to register supported remotes because they + // only send messages to their configured token home. + function _setUpRegisteredRemote(bytes32, address, uint256) internal virtual override { + return; + } + + function _createNewRemoteInstance() internal virtual returns (TokenRemote); + + function _getTotalSupply() internal view virtual returns (uint256); + + function _createMultiHopSendTeleporterMessageInput( + SendTokensInput memory input, + uint256 transferAmount + ) internal view returns (TeleporterMessageInput memory) { + return TeleporterMessageInput({ + destinationBlockchainID: tokenRemote.getTokenHomeBlockchainID(), + destinationAddress: tokenRemote.getTokenHomeAddress(), + feeInfo: TeleporterFeeInfo({feeTokenAddress: address(tokenRemote), amount: input.primaryFee}), + requiredGasLimit: tokenRemote.MULTI_HOP_SEND_REQUIRED_GAS(), + allowedRelayerAddresses: new address[](0), + message: _encodeMultiHopSendMessage({ + amount: transferAmount, + destinationBlockchainID: input.destinationBlockchainID, + destinationTokenTransferrerAddress: input.destinationTokenTransferrerAddress, + recipient: input.recipient, + secondaryFee: input.secondaryFee, + secondaryGasLimit: input.requiredGasLimit, + multiHopFallback: input.multiHopFallback + }) + }); + } + + function _createMultiHopCallTeleporterMessageInput( + address originSenderAddress, + SendAndCallInput memory input, + uint256 transferAmount + ) internal view returns (TeleporterMessageInput memory) { + return TeleporterMessageInput({ + destinationBlockchainID: tokenRemote.getTokenHomeBlockchainID(), + destinationAddress: tokenRemote.getTokenHomeAddress(), + feeInfo: TeleporterFeeInfo({feeTokenAddress: address(tokenRemote), amount: input.primaryFee}), + requiredGasLimit: tokenRemote.MULTI_HOP_CALL_REQUIRED_GAS() + + ( + tokenRemote.calculateNumWords(input.recipientPayload.length) + * tokenRemote.MULTI_HOP_CALL_GAS_PER_WORD() + ), + allowedRelayerAddresses: new address[](0), + message: _encodeMultiHopCallMessage({ + originSenderAddress: originSenderAddress, + amount: transferAmount, + destinationBlockchainID: input.destinationBlockchainID, + destinationTokenTransferrerAddress: input.destinationTokenTransferrerAddress, + recipientContract: input.recipientContract, + recipientPayload: input.recipientPayload, + recipientGasLimit: input.recipientGasLimit, + fallbackRecipient: input.fallbackRecipient, + multiHopFallback: input.multiHopFallback, + secondaryRequiredGasLimit: input.requiredGasLimit, + secondaryFee: input.secondaryFee + }) + }); + } + + function _createDefaultSendTokensInput() + internal + view + override + returns (SendTokensInput memory) + { + return SendTokensInput({ + destinationBlockchainID: DEFAULT_TOKEN_HOME_BLOCKCHAIN_ID, + destinationTokenTransferrerAddress: DEFAULT_TOKEN_HOME_ADDRESS, + recipient: DEFAULT_RECIPIENT_ADDRESS, + primaryFeeTokenAddress: address(tokenRemote), + primaryFee: 0, + secondaryFee: 0, + requiredGasLimit: DEFAULT_REQUIRED_GAS_LIMIT, + multiHopFallback: address(0) + }); + } + + function _createDefaultSendMultiHopInput() internal view returns (SendTokensInput memory) { + SendTokensInput memory input = _createDefaultSendTokensInput(); + input.destinationBlockchainID = OTHER_BLOCKCHAIN_ID; + input.multiHopFallback = DEFAULT_FALLBACK_RECIPIENT_ADDRESS; + return input; + } + + function _createDefaultSendAndCallInput() + internal + view + override + returns (SendAndCallInput memory) + { + return SendAndCallInput({ + destinationBlockchainID: DEFAULT_TOKEN_HOME_BLOCKCHAIN_ID, + destinationTokenTransferrerAddress: DEFAULT_TOKEN_HOME_ADDRESS, + recipientContract: DEFAULT_RECIPIENT_CONTRACT_ADDRESS, + recipientPayload: new bytes(16), + requiredGasLimit: DEFAULT_REQUIRED_GAS_LIMIT, + recipientGasLimit: DEFAULT_RECIPIENT_GAS_LIMIT, + fallbackRecipient: DEFAULT_FALLBACK_RECIPIENT_ADDRESS, + multiHopFallback: address(0), + primaryFeeTokenAddress: address(tokenRemote), + primaryFee: 0, + secondaryFee: 0 + }); + } + + function _getDefaultMessageSourceBlockchainID() internal pure override returns (bytes32) { + return DEFAULT_TOKEN_REMOTE_BLOCKCHAIN_ID; + } + + function _formatErrorMessage(string memory message) + internal + pure + override + returns (bytes memory) + { + return bytes(string.concat("TokenRemote: ", message)); + } +} diff --git a/contracts/ictt/tests/TokenTransferrerTests.t.sol b/contracts/ictt/tests/TokenTransferrerTests.t.sol new file mode 100644 index 000000000..40b34b79c --- /dev/null +++ b/contracts/ictt/tests/TokenTransferrerTests.t.sol @@ -0,0 +1,480 @@ +// (c) 2024, Ava Labs, Inc. All rights reserved. +// See the file LICENSE for licensing terms. + +// SPDX-License-Identifier: Ecosystem + +pragma solidity 0.8.25; + +import {Test} from "@forge-std/Test.sol"; +import {TeleporterRegistry} from "@teleporter/registry/TeleporterRegistry.sol"; +import { + ITeleporterMessenger, + TeleporterMessageInput, + TeleporterFeeInfo +} from "@teleporter/ITeleporterMessenger.sol"; +import { + ITokenTransferrer, + SendTokensInput, + SendAndCallInput, + TransferrerMessageType, + TransferrerMessage, + SingleHopSendMessage, + SingleHopCallMessage, + MultiHopSendMessage, + MultiHopCallMessage +} from "../interfaces/ITokenTransferrer.sol"; +import {IERC20} from "@openzeppelin/contracts@5.0.2/token/ERC20/IERC20.sol"; +import {IERC20Errors} from "@openzeppelin/contracts@5.0.2/interfaces/draft-IERC6093.sol"; + +abstract contract TokenTransferrerTest is Test { + // convenience struct to reduce stack usage + struct OriginSenderInfo { + address tokenTransferrerAddress; + address senderAddress; + } + + bytes32 public constant DEFAULT_TOKEN_HOME_BLOCKCHAIN_ID = + bytes32(hex"abcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcd"); + bytes32 public constant DEFAULT_TOKEN_REMOTE_BLOCKCHAIN_ID = + bytes32(hex"1234567812345678123456781234567812345678123456781234567812345678"); + bytes32 public constant OTHER_BLOCKCHAIN_ID = + bytes32(hex"9876987698769876987698769876987698769876987698769876987698769876"); + address public constant DEFAULT_TOKEN_REMOTE_ADDRESS = + 0xd878229c9c3575F224784DE610911B5607a3ad15; + address public constant DEFAULT_TOKEN_HOME_ADDRESS = 0xd54e3E251b9b0EEd3ed70A858e927bbC2659587d; + address public constant DEFAULT_SENDER_ADDRESS = 0x95222290DD7278Aa3Ddd389Cc1E1d165CC4BAfe5; + address public constant DEFAULT_RECIPIENT_ADDRESS = 0xABCDabcdABcDabcDaBCDAbcdABcdAbCdABcDABCd; + address public constant DEFAULT_RECIPIENT_CONTRACT_ADDRESS = + 0xa83114A443dA1CecEFC50368531cACE9F37fCCcb; + uint256 public constant DEFAULT_REQUIRED_GAS_LIMIT = 200_000; + uint256 public constant DEFAULT_RECIPIENT_GAS_LIMIT = 100_000; + address public constant DEFAULT_MULTIHOP_FALLBACK_ADDRESS = + 0x043448b3FE2F24522D9CeB32AD8623c0b6b53E26; + address public constant DEFAULT_FALLBACK_RECIPIENT_ADDRESS = + 0xe69Ea1BAF997002602c0A3D451b2b5c9B7F8E6A1; + address public constant WARP_PRECOMPILE_ADDRESS = 0x0200000000000000000000000000000000000005; + address public constant NATIVE_MINTER_PRECOMPILE_ADDRESS = + address(0x0200000000000000000000000000000000000001); + address public constant MOCK_TELEPORTER_MESSENGER_ADDRESS = + 0x644E5b7c5D4Bc8073732CEa72c66e0BB90dFC00f; + address public constant MOCK_TELEPORTER_REGISTRY_ADDRESS = + 0xf9FA4a0c696b659328DDaaBCB46Ae4eBFC9e68e4; + bytes32 internal constant _MOCK_MESSAGE_ID = + bytes32(hex"1111111111111111111111111111111111111111111111111111111111111111"); + + uint256 internal constant _DEFAULT_FEE_AMOUNT = 123456; + uint256 internal constant _DEFAULT_TRANSFER_AMOUNT = 1e18; + uint256 internal constant _DEFAULT_INITIAL_RESERVE_IMBALANCE = 1e18; + uint256 internal constant _DEFAULT_BURN_FEE_REWARDS_PERCENTAGE = 1; + + uint8 public tokenHomeDecimals; + + ITokenTransferrer public tokenTransferrer; + + event TokensSent( + bytes32 indexed teleporterMessageID, + address indexed sender, + SendTokensInput input, + uint256 amount + ); + event TokensRouted(bytes32 indexed teleporterMessageID, SendTokensInput input, uint256 amount); + event TokensAndCallSent( + bytes32 indexed teleporterMessageID, + address indexed sender, + SendAndCallInput input, + uint256 amount + ); + event TokensAndCallRouted( + bytes32 indexed teleporterMessageID, SendAndCallInput input, uint256 amount + ); + + event TokensWithdrawn(address indexed recipient, uint256 amount); + event CallSucceeded(address indexed recipientContract, uint256 amount); + event CallFailed(address indexed recipientContract, uint256 amount); + event Transfer(address indexed from, address indexed to, uint256 value); + event Approval(address indexed owner, address indexed spender, uint256 value); + + function testSendZeroRecipient() public { + SendTokensInput memory input = _createDefaultSendTokensInput(); + input.recipient = address(0); + vm.expectRevert(_formatErrorMessage("zero recipient address")); + _send(input, 0); + } + + function testSendAndCallZeroRecipientContract() public { + SendAndCallInput memory input = _createDefaultSendAndCallInput(); + input.recipientContract = address(0); + vm.expectRevert(_formatErrorMessage("zero recipient contract address")); + _sendAndCall(input, 0); + } + + function testSendZeroRequiredGasLimit() public { + SendTokensInput memory input = _createDefaultSendTokensInput(); + input.requiredGasLimit = 0; + vm.expectRevert(_formatErrorMessage("zero required gas limit")); + _send(input, 0); + } + + function testSendAndCallZeroRequiredGasLimit() public { + SendAndCallInput memory input = _createDefaultSendAndCallInput(); + input.requiredGasLimit = 0; + vm.expectRevert(_formatErrorMessage("zero required gas limit")); + _sendAndCall(input, 0); + } + + function testSendAndCallZeroRecipientGasLimit() public { + SendAndCallInput memory input = _createDefaultSendAndCallInput(); + input.recipientGasLimit = 0; + vm.expectRevert(_formatErrorMessage("zero recipient gas limit")); + _sendAndCall(input, 0); + } + + function testSendAndCallInvalidRecipientGasLimit() public { + SendAndCallInput memory input = _createDefaultSendAndCallInput(); + input.recipientGasLimit = input.requiredGasLimit + 1; + vm.expectRevert(_formatErrorMessage("invalid recipient gas limit")); + _sendAndCall(input, 0); + } + + function testSendAndCallZeroFallbackRecipient() public { + SendAndCallInput memory input = _createDefaultSendAndCallInput(); + input.fallbackRecipient = address(0); + vm.expectRevert(_formatErrorMessage("zero fallback recipient address")); + _sendAndCall(input, 0); + } + + function testSendWithNoFeeAllowance() public { + uint256 amount = 2e15; + uint256 primaryFee = 100; + + SendTokensInput memory input = _createDefaultSendTokensInput(); + input.primaryFee = primaryFee; + + _setUpRegisteredRemote( + input.destinationBlockchainID, input.destinationTokenTransferrerAddress, 0 + ); + _setUpExpectedDeposit(amount, 0); + vm.expectRevert( + abi.encodeWithSelector( + IERC20Errors.ERC20InsufficientAllowance.selector, tokenTransferrer, 0, primaryFee + ) + ); + _send(input, amount); + } + + function testSendAndCallWithNoFeeAllowance() public { + uint256 amount = 2e15; + uint256 primaryFee = 100; + + SendAndCallInput memory input = _createDefaultSendAndCallInput(); + input.primaryFee = primaryFee; + + _setUpRegisteredRemote( + input.destinationBlockchainID, input.destinationTokenTransferrerAddress, 0 + ); + _setUpExpectedDeposit(amount, 0); + vm.expectRevert( + abi.encodeWithSelector( + IERC20Errors.ERC20InsufficientAllowance.selector, tokenTransferrer, 0, primaryFee + ) + ); + _sendAndCall(input, amount); + } + + function testSendWithFees() public { + uint256 amount = 2e15; + uint256 primaryFee = 100; + _sendSingleHopSendSuccess(amount, primaryFee); + } + + function testSendNoFees() public { + uint256 amount = 2e15; + uint256 primaryFee = 0; + _sendSingleHopSendSuccess(amount, primaryFee); + } + + function testSendAndCallWithFees() public { + uint256 amount = 1e17; + uint256 primaryFee = 10; + _sendSingleHopCallSuccess(amount, primaryFee); + } + + function _initMockTeleporterRegistry() internal { + vm.mockCall( + MOCK_TELEPORTER_REGISTRY_ADDRESS, + abi.encodeWithSelector( + TeleporterRegistry(MOCK_TELEPORTER_REGISTRY_ADDRESS).latestVersion.selector + ), + abi.encode(1) + ); + + vm.mockCall( + MOCK_TELEPORTER_REGISTRY_ADDRESS, + abi.encodeWithSelector(TeleporterRegistry.getVersionFromAddress.selector), + abi.encode(1) + ); + + vm.mockCall( + MOCK_TELEPORTER_REGISTRY_ADDRESS, + abi.encodeWithSelector(TeleporterRegistry.getAddressFromVersion.selector, (1)), + abi.encode(MOCK_TELEPORTER_MESSENGER_ADDRESS) + ); + + vm.mockCall( + MOCK_TELEPORTER_REGISTRY_ADDRESS, + abi.encodeWithSelector(TeleporterRegistry.getLatestTeleporter.selector), + abi.encode(ITeleporterMessenger(MOCK_TELEPORTER_MESSENGER_ADDRESS)) + ); + + vm.mockCall( + MOCK_TELEPORTER_REGISTRY_ADDRESS, + abi.encodeWithSelector(TeleporterRegistry.getVersionFromAddress.selector), + abi.encode(1) + ); + } + + function _send(SendTokensInput memory input, uint256 amount) internal virtual; + + function _sendAndCall(SendAndCallInput memory input, uint256 amount) internal virtual; + + function _sendSingleHopSendSuccess(uint256 amount, uint256 feeAmount) internal { + SendTokensInput memory input = _createDefaultSendTokensInput(); + input.primaryFee = feeAmount; + + _setUpRegisteredRemote( + input.destinationBlockchainID, input.destinationTokenTransferrerAddress, 0 + ); + _setUpExpectedDeposit(amount, input.primaryFee); + _checkExpectedTeleporterCallsForSend(_createSingleHopTeleporterMessageInput(input, amount)); + vm.expectEmit(true, true, true, true, address(tokenTransferrer)); + emit TokensSent(_MOCK_MESSAGE_ID, address(this), input, amount); + _send(input, amount); + } + + function _sendSingleHopCallSuccess(uint256 amount, uint256 feeAmount) internal { + SendAndCallInput memory input = _createDefaultSendAndCallInput(); + input.primaryFee = feeAmount; + + _setUpRegisteredRemote( + input.destinationBlockchainID, input.destinationTokenTransferrerAddress, 0 + ); + _setUpExpectedDeposit(amount, input.primaryFee); + OriginSenderInfo memory originInfo; + originInfo.tokenTransferrerAddress = address(tokenTransferrer); + originInfo.senderAddress = address(this); + _checkExpectedTeleporterCallsForSend( + _createSingleHopCallTeleporterMessageInput( + _getDefaultMessageSourceBlockchainID(), originInfo, input, amount + ) + ); + vm.expectEmit(true, true, true, true, address(tokenTransferrer)); + emit TokensAndCallSent(_MOCK_MESSAGE_ID, address(this), input, amount); + _sendAndCall(input, amount); + } + + function _setUpRegisteredRemote( + bytes32 remoteBlockchainID, + address remoteTokenTransferrerAddress, + uint256 initialReserveImbalance + ) internal virtual; + + function _setUpExpectedDeposit(uint256 amount, uint256 feeAmount) internal virtual; + + function _setUpExpectedZeroAmountRevert() internal virtual; + + function _checkExpectedWithdrawal(address recipient, uint256 amount) internal virtual; + + function _checkExpectedTeleporterCallsForSend( + TeleporterMessageInput memory expectedMessageInput + ) internal { + if (expectedMessageInput.feeInfo.amount > 0) { + vm.expectCall( + expectedMessageInput.feeInfo.feeTokenAddress, + abi.encodeCall( + IERC20.allowance, + (address(tokenTransferrer), address(MOCK_TELEPORTER_MESSENGER_ADDRESS)) + ) + ); + } + vm.mockCall( + MOCK_TELEPORTER_MESSENGER_ADDRESS, + abi.encodeCall(ITeleporterMessenger.sendCrossChainMessage, (expectedMessageInput)), + abi.encode(_MOCK_MESSAGE_ID) + ); + vm.expectCall( + MOCK_TELEPORTER_MESSENGER_ADDRESS, + abi.encodeCall(ITeleporterMessenger.sendCrossChainMessage, (expectedMessageInput)) + ); + } + + // This function is overridden by TeleporterTokenDestinationTests + function _scaleTokens(uint256 amount, bool) internal virtual returns (uint256) { + return amount; + } + + function _createDefaultSendTokensInput() + internal + view + virtual + returns (SendTokensInput memory); + + function _createDefaultSendAndCallInput() + internal + view + virtual + returns (SendAndCallInput memory); + + function _createSingleHopTeleporterMessageInput( + SendTokensInput memory input, + uint256 transferAmount + ) internal pure returns (TeleporterMessageInput memory) { + return TeleporterMessageInput({ + destinationBlockchainID: input.destinationBlockchainID, + destinationAddress: input.destinationTokenTransferrerAddress, + feeInfo: TeleporterFeeInfo({ + feeTokenAddress: address(input.primaryFeeTokenAddress), + amount: input.primaryFee + }), + requiredGasLimit: input.requiredGasLimit, + allowedRelayerAddresses: new address[](0), + message: _encodeSingleHopSendMessage(transferAmount, input.recipient) + }); + } + + function _createSingleHopCallTeleporterMessageInput( + bytes32 sourceBlockchainID, + OriginSenderInfo memory originInfo, + SendAndCallInput memory input, + uint256 transferAmount + ) internal pure returns (TeleporterMessageInput memory) { + return TeleporterMessageInput({ + destinationBlockchainID: input.destinationBlockchainID, + destinationAddress: input.destinationTokenTransferrerAddress, + feeInfo: TeleporterFeeInfo({ + feeTokenAddress: address(input.primaryFeeTokenAddress), + amount: input.primaryFee + }), + requiredGasLimit: input.requiredGasLimit, + allowedRelayerAddresses: new address[](0), + message: _encodeSingleHopCallMessage({ + sourceBlockchainID: sourceBlockchainID, + originInfo: originInfo, + amount: transferAmount, + recipientContract: input.recipientContract, + recipientPayload: input.recipientPayload, + recipientGasLimit: input.recipientGasLimit, + fallbackRecipient: input.fallbackRecipient + }) + }); + } + + function _getDefaultMessageSourceBlockchainID() internal pure virtual returns (bytes32); + + function _formatErrorMessage(string memory message) + internal + pure + virtual + returns (bytes memory); + + function _encodeSingleHopSendMessage( + uint256 amount, + address recipient + ) internal pure returns (bytes memory) { + return abi.encode( + TransferrerMessage({ + messageType: TransferrerMessageType.SINGLE_HOP_SEND, + payload: abi.encode(SingleHopSendMessage({recipient: recipient, amount: amount})) + }) + ); + } + + function _encodeSingleHopCallMessage( + bytes32 sourceBlockchainID, + OriginSenderInfo memory originInfo, + uint256 amount, + address recipientContract, + bytes memory recipientPayload, + uint256 recipientGasLimit, + address fallbackRecipient + ) internal pure returns (bytes memory) { + return abi.encode( + TransferrerMessage({ + messageType: TransferrerMessageType.SINGLE_HOP_CALL, + payload: abi.encode( + SingleHopCallMessage({ + sourceBlockchainID: sourceBlockchainID, + originTokenTransferrerAddress: originInfo.tokenTransferrerAddress, + originSenderAddress: originInfo.senderAddress, + recipientContract: recipientContract, + amount: amount, + recipientPayload: recipientPayload, + recipientGasLimit: recipientGasLimit, + fallbackRecipient: fallbackRecipient + }) + ) + }) + ); + } + + function _encodeMultiHopSendMessage( + uint256 amount, + bytes32 destinationBlockchainID, + address destinationTokenTransferrerAddress, + address recipient, + uint256 secondaryFee, + uint256 secondaryGasLimit, + address multiHopFallback + ) internal pure returns (bytes memory) { + return abi.encode( + TransferrerMessage({ + messageType: TransferrerMessageType.MULTI_HOP_SEND, + payload: abi.encode( + MultiHopSendMessage({ + destinationBlockchainID: destinationBlockchainID, + destinationTokenTransferrerAddress: destinationTokenTransferrerAddress, + recipient: recipient, + amount: amount, + secondaryFee: secondaryFee, + secondaryGasLimit: secondaryGasLimit, + multiHopFallback: multiHopFallback + }) + ) + }) + ); + } + + function _encodeMultiHopCallMessage( + address originSenderAddress, + uint256 amount, + bytes32 destinationBlockchainID, + address destinationTokenTransferrerAddress, + address recipientContract, + bytes memory recipientPayload, + uint256 recipientGasLimit, + address fallbackRecipient, + address multiHopFallback, + uint256 secondaryRequiredGasLimit, + uint256 secondaryFee + ) internal pure returns (bytes memory) { + return abi.encode( + TransferrerMessage({ + messageType: TransferrerMessageType.MULTI_HOP_CALL, + payload: abi.encode( + MultiHopCallMessage({ + originSenderAddress: originSenderAddress, + destinationBlockchainID: destinationBlockchainID, + destinationTokenTransferrerAddress: destinationTokenTransferrerAddress, + recipientContract: recipientContract, + amount: amount, + recipientPayload: recipientPayload, + recipientGasLimit: recipientGasLimit, + fallbackRecipient: fallbackRecipient, + multiHopFallback: multiHopFallback, + secondaryRequiredGasLimit: secondaryRequiredGasLimit, + secondaryFee: secondaryFee + }) + ) + }) + ); + } +} diff --git a/contracts/ictt/tests/WrappedNativeTokenTests.t.sol b/contracts/ictt/tests/WrappedNativeTokenTests.t.sol new file mode 100644 index 000000000..de02a6abe --- /dev/null +++ b/contracts/ictt/tests/WrappedNativeTokenTests.t.sol @@ -0,0 +1,36 @@ +// (c) 2024, Ava Labs, Inc. All rights reserved. +// See the file LICENSE for licensing terms. + +// SPDX-License-Identifier: Ecosystem + +pragma solidity 0.8.25; + +import {Test} from "@forge-std/Test.sol"; +import {WrappedNativeToken} from "../WrappedNativeToken.sol"; + +contract WrappedNativeTokenTest is Test { + address public constant TEST_ACCOUNT = 0xd4E96eF8eee8678dBFf4d535E033Ed1a4F7605b7; + WrappedNativeToken public wavax; + + function setUp() public virtual { + wavax = new WrappedNativeToken("AVAX"); + } + + function testFallback() public { + (bool success,) = address(wavax).call{value: 1}("1234567812345678"); + assertTrue(success); + assertEq(wavax.balanceOf(address(this)), 1); + } + + function testDepositWithdraw() public { + uint256 depositAmount = 500; + uint256 withdrawAmount = 100; + vm.deal(TEST_ACCOUNT, depositAmount); + vm.startPrank(TEST_ACCOUNT); + wavax.deposit{value: depositAmount}(); + assertEq(wavax.balanceOf(TEST_ACCOUNT), depositAmount); + wavax.withdraw(withdrawAmount); + assertEq(wavax.balanceOf(TEST_ACCOUNT), depositAmount - withdrawAmount); + assertEq(TEST_ACCOUNT.balance, withdrawAmount); + } +} diff --git a/contracts/utilities/CallUtils.sol b/contracts/utilities/CallUtils.sol new file mode 100644 index 000000000..1c9e9b08b --- /dev/null +++ b/contracts/utilities/CallUtils.sol @@ -0,0 +1,60 @@ +// (c) 2024, Ava Labs, Inc. All rights reserved. +// See the file LICENSE for licensing terms. + +// SPDX-License-Identifier: Ecosystem +pragma solidity 0.8.25; + +library CallUtils { + /** + * @dev calls target address with exactly gasAmount gas and data as calldata + * or reverts if at least gasAmount gas is not available. + */ + function _callWithExactGas( + uint256 gasAmount, + address target, + bytes memory data + ) internal returns (bool) { + return _callWithExactGasAndValue(gasAmount, 0, target, data); + } + + /** + * @dev calls target address with exactly gasAmount gas and data as calldata + * or reverts if at least gasAmount gas is not available. + */ + function _callWithExactGasAndValue( + uint256 gasAmount, + uint256 value, + address target, + bytes memory data + ) internal returns (bool) { + require(gasleft() >= gasAmount, "CallUtils: insufficient gas"); + require(address(this).balance >= value, "CallUtils: insufficient value"); + + // If there is no code at the target, automatically consider the call to have failed since it + // doesn't have any effect on state. + if (target.code.length == 0) { + return false; + } + + // Call the target address of the message with the provided data and amount of gas. + // + // Assembly is used for the low-level call to avoid unnecessary expansion of the return data in memory. + // This prevents possible "return bomb" vectors where the external contract could force the caller + // to use an arbitrary amount of gas. See Solidity issue here: https://github.com/ethereum/solidity/issues/12306 + bool success; + // solhint-disable-next-line no-inline-assembly + assembly { + success := + call( + gasAmount, // gas provided to the call + target, // call target + value, // value transferred + add(data, 0x20), // input data - 0x20 needs to be added to an array because the first 32-byte slot contains the array length (0x20 in hex is 32 in decimal). + mload(data), // input data size - mload returns mem[p..(p+32)], which is the first 32-byte slot of the array. In this case, the array length. + 0, // output + 0 // output size + ) + } + return success; + } +} diff --git a/contracts/utilities/SafeERC20TransferFrom.sol b/contracts/utilities/SafeERC20TransferFrom.sol index 986606956..62b4c251f 100644 --- a/contracts/utilities/SafeERC20TransferFrom.sol +++ b/contracts/utilities/SafeERC20TransferFrom.sol @@ -29,8 +29,27 @@ library SafeERC20TransferFrom { */ // solhint-disable private-vars-leading-underscore function safeTransferFrom(IERC20 erc20, uint256 amount) internal returns (uint256) { + return safeTransferFrom(erc20, msg.sender, amount); + } + // solhint-enable private-vars-leading-underscore + + /** + * @dev Checks the balance of the contract before and after the call to safeTransferFrom, and returns the balance + * increase. Designed for safely handling ERC20 "fee on transfer" and "burn on transfer" implementations. + * + * Supports passing arbitrary sender address values, allowing its use in ERC-2771 compliant meta-transactions. + * Note: Contracts that use this function must ensure that users cannot pass arbitrary addresses as + * the {from} address for the {transferFrom} call. Proper authorization (such as msg.sender) must + * be required to ensure no one can improperly transfer tokens from any address. + */ + // solhint-disable private-vars-leading-underscore + function safeTransferFrom( + IERC20 erc20, + address from, + uint256 amount + ) internal returns (uint256) { uint256 balanceBefore = erc20.balanceOf(address(this)); - erc20.safeTransferFrom(msg.sender, address(this), amount); + erc20.safeTransferFrom(from, address(this), amount); uint256 balanceAfter = erc20.balanceOf(address(this)); require(balanceAfter > balanceBefore, "SafeERC20TransferFrom: balance not increased"); diff --git a/contracts/utilities/SafeWrappedNativeTokenDeposit.sol b/contracts/utilities/SafeWrappedNativeTokenDeposit.sol new file mode 100644 index 000000000..e9002b4ed --- /dev/null +++ b/contracts/utilities/SafeWrappedNativeTokenDeposit.sol @@ -0,0 +1,40 @@ +// (c) 2024, Ava Labs, Inc. All rights reserved. +// See the file LICENSE for licensing terms. + +// SPDX-License-Identifier: Ecosystem + +pragma solidity 0.8.25; + +import {IWrappedNativeToken} from "../ictt/interfaces/IWrappedNativeToken.sol"; + +/** + * @dev Provides a wrapper used for calling the {IWrappedNativeToken-deposit} method + * to deposit native tokens into the contract. + * + * Checks the balance of the contract before and after the call to deposit, and returns the balance + * increase. + * + * Note: A reentrancy guard must always be used when calling token.safeDeposit in order to + * prevent against possible "before-after" pattern vulnerabilities. + * + * @custom:security-contact https://github.com/ava-labs/teleporter/blob/main/SECURITY.md + */ +library SafeWrappedNativeTokenDeposit { + /** + * @dev Checks the balance of the contract before and after the call to deposit, and returns the balance + * increase. + */ + // solhint-disable private-vars-leading-underscore + function safeDeposit(IWrappedNativeToken token, uint256 amount) internal returns (uint256) { + uint256 balanceBefore = token.balanceOf(address(this)); + token.deposit{value: amount}(); + uint256 balanceAfter = token.balanceOf(address(this)); + + require( + balanceAfter > balanceBefore, "SafeWrappedNativeTokenDeposit: balance not increased" + ); + + return balanceAfter - balanceBefore; + } + // solhint-enable private-vars-leading-underscore +} diff --git a/contracts/utilities/SendReentrancyGuardUpgradeable.sol b/contracts/utilities/SendReentrancyGuardUpgradeable.sol new file mode 100644 index 000000000..611808828 --- /dev/null +++ b/contracts/utilities/SendReentrancyGuardUpgradeable.sol @@ -0,0 +1,69 @@ +// (c) 2024, Ava Labs, Inc. All rights reserved. +// See the file LICENSE for licensing terms. + +// SPDX-License-Identifier: Ecosystem + +pragma solidity 0.8.25; + +import {Initializable} from + "@openzeppelin/contracts-upgradeable@5.0.2/proxy/utils/Initializable.sol"; + +/** + * @dev Abstract contract that helps implement reentrancy guards for Avalanche interchain token transfer {_send} and {_sendAndCall} + * functions. + * + * The send methods must not allow reentry given that can make calls to external contracts such as {safeTransferFrom} + * and {safeDeposit}. However, the send methods should be allowed to be called from {receiveTeleporterMessage}, either + * as a part of processing a multi-hop transfer, or as a part of an external call made to process a "sendAndCall" + * message. + * + * @custom:security-contact https://github.com/ava-labs/teleporter/blob/main/SECURITY.md + */ +abstract contract SendReentrancyGuardUpgradeable is Initializable { + // solhint-disable private-vars-leading-underscore + /// @custom:storage-location erc7201:avalanche-ictt.storage.SendReentrancyGuard + struct SendReentrancyGuardStorage { + uint256 _sendEntered; + } + // solhint-enable private-vars-leading-underscore + + // keccak256(abi.encode(uint256(keccak256("avalanche-ictt.storage.SendReentrancyGuard")) - 1)) & ~bytes32(uint256(0xff)); + bytes32 private constant _SEND_REENTRANCY_GUARD_STORAGE_LOCATION = + 0xd2f1ed38b7d242bfb8b41862afb813a15193219a4bc717f2056607593e6c7500; + + // solhint-disable ordering + function _getSendReentrancyGuardStorage() + private + pure + returns (SendReentrancyGuardStorage storage $) + { + // solhint-disable-next-line no-inline-assembly + assembly { + $.slot := _SEND_REENTRANCY_GUARD_STORAGE_LOCATION + } + } + + uint256 private constant _NOT_ENTERED = 1; + uint256 private constant _ENTERED = 2; + + // sendNonReentrant modifier makes sure there is not reentry between {_send} or {_sendAndCall} calls. + modifier sendNonReentrant() { + SendReentrancyGuardStorage storage $ = _getSendReentrancyGuardStorage(); + require($._sendEntered == _NOT_ENTERED, "SendReentrancyGuard: send reentrancy"); + $._sendEntered = _ENTERED; + _; + $._sendEntered = _NOT_ENTERED; + } + + //solhint-disable-next-line func-name-mixedcase + function __SendReentrancyGuard_init() internal onlyInitializing { + __SendReentrnacyGuard_init_unchained(); + } + + //solhint-disable-next-line func-name-mixedcase + function __SendReentrnacyGuard_init_unchained() internal { + SendReentrancyGuardStorage storage $ = _getSendReentrancyGuardStorage(); + $._sendEntered = _NOT_ENTERED; + } + // solhint-enable ordering +} diff --git a/contracts/utilities/TokenScalingUtils.sol b/contracts/utilities/TokenScalingUtils.sol new file mode 100644 index 000000000..c33b2cde8 --- /dev/null +++ b/contracts/utilities/TokenScalingUtils.sol @@ -0,0 +1,84 @@ +// (c) 2024, Ava Labs, Inc. All rights reserved. +// See the file LICENSE for licensing terms. + +// SPDX-License-Identifier: Ecosystem +pragma solidity 0.8.25; + +library TokenScalingUtils { + uint256 public constant MAX_TOKEN_DECIMALS = 18; + + /** + * @notice Scales the {amount} of home tokens to a TokenRemote instance's token scale. + * @param tokenMultiplier The token multiplier of the TokenRemote instance. + * @param multiplyOnRemote Whether the amount of home tokens will be multiplied on the remote, or divided. + * @param homeTokenAmount The amount of home tokens to scale. + */ + function applyTokenScale( + uint256 tokenMultiplier, + bool multiplyOnRemote, + uint256 homeTokenAmount + ) internal pure returns (uint256) { + return _scaleTokens(tokenMultiplier, multiplyOnRemote, homeTokenAmount, true); + } + + /** + * @notice Removes the TokenRemote instance's token scaling, and returns the corresponding + * amount of home tokens. + * @param tokenMultiplier The token multiplier of the TokenRemote instance. + * @param multiplyOnRemote Whether the amount of home tokens will be multiplied on the remote, or divided. + * @param remoteTokenAmount The amount of remote tokens to remove scaling from. + */ + function removeTokenScale( + uint256 tokenMultiplier, + bool multiplyOnRemote, + uint256 remoteTokenAmount + ) internal pure returns (uint256) { + return _scaleTokens(tokenMultiplier, multiplyOnRemote, remoteTokenAmount, false); + } + + /** + * @notice Takes both the home and remote token denominations and uses + * them to derive the token transferrer scaling multiplier values + * @param homeTokenDecimals The number of decimals of the home token. + * @param remoteTokenDecimals The number of decimals of the remote token. + */ + function deriveTokenMultiplierValues( + uint8 homeTokenDecimals, + uint8 remoteTokenDecimals + ) internal pure returns (uint256, bool) { + bool multiplyOnRemote = remoteTokenDecimals > homeTokenDecimals; + uint256 tokenMultiplier = 10 + ** ( + multiplyOnRemote + ? uint256(remoteTokenDecimals - homeTokenDecimals) + : uint256(homeTokenDecimals - remoteTokenDecimals) + ); + return (tokenMultiplier, multiplyOnRemote); + } + + /** + * @dev Scales {value} based on {tokenMultiplier} and if the amount is applying or + * removing the TokenRemote instance's token scale. + * Should be used for all tokens and fees being transferred to/from other subnets. + * @param tokenMultiplier The token multiplier of the TokenRemote instance. + * @param multiplyOnRemote Whether the amount of home tokens will be multiplied on the remote, or divided. + * @param amount The amount of tokens to scale. + * @param isSendToRemote If true, indicates the amount is being sent to the + * TokenRemote instance, so applies token scale. If false, indicates the amount is being + * sent back to the TokenHome instance, so removes token scale. + */ + function _scaleTokens( + uint256 tokenMultiplier, + bool multiplyOnRemote, + uint256 amount, + bool isSendToRemote + ) private pure returns (uint256) { + // Multiply when multiplyOnRemote and isSendToRemote are + // both true or both false. + if (multiplyOnRemote == isSendToRemote) { + return amount * tokenMultiplier; + } + // Otherwise divide. + return amount / tokenMultiplier; + } +} diff --git a/contracts/validator-manager/PoSValidatorManager.sol b/contracts/validator-manager/PoSValidatorManager.sol index 941d67d42..e50f814dc 100644 --- a/contracts/validator-manager/PoSValidatorManager.sol +++ b/contracts/validator-manager/PoSValidatorManager.sol @@ -202,9 +202,7 @@ abstract contract PoSValidatorManager is revert UnauthorizedOwner(_msgSender()); } - uint256 rewards = $._redeemableValidatorRewards[validationID]; - delete $._redeemableValidatorRewards[validationID]; - _reward($._posValidatorInfo[validationID].owner, rewards); + _withdrawValidationRewards($._posValidatorInfo[validationID].owner, validationID); } /** @@ -300,9 +298,7 @@ abstract contract PoSValidatorManager is address owner = $._posValidatorInfo[validationID].owner; // The validator can either be Completed or Invalidated here. We only grant rewards for Completed. if (validator.status == ValidatorStatus.Completed) { - uint256 rewards = $._redeemableValidatorRewards[validationID]; - delete $._redeemableValidatorRewards[validationID]; - _reward(owner, rewards); + _withdrawValidationRewards(owner, validationID); } // The stake is unlocked whether the validation period is completed or invalidated. @@ -740,27 +736,15 @@ abstract contract PoSValidatorManager is // Once this function completes, the delegation is completed so we can clear it from state now. delete $._delegatorStakes[delegationID]; - uint256 rewards = $._redeemableDelegatorRewards[delegationID]; - delete $._redeemableDelegatorRewards[delegationID]; + address rewardRecipient = delegator.owner; - uint256 validatorFees; - uint256 delegatorRewards; - if (rewards > 0) { - validatorFees = (rewards * $._posValidatorInfo[validationID].delegationFeeBips) - / BIPS_CONVERSION_FACTOR; - - // Allocate the delegation fees to the validator. - $._redeemableValidatorRewards[validationID] += validatorFees; - - // Reward the remaining tokens to the delegator. - delegatorRewards = rewards - validatorFees; - _reward(delegator.owner, delegatorRewards); - } + (uint256 delegationRewards, uint256 validatorFees) = + _withdrawDelegationRewards(rewardRecipient, delegationID, validationID); // Unlock the delegator's stake. _unlock(delegator.owner, weightToValue(delegator.weight)); - emit DelegationEnded(delegationID, validationID, delegatorRewards, validatorFees); + emit DelegationEnded(delegationID, validationID, delegationRewards, validatorFees); } /** @@ -776,4 +760,41 @@ abstract contract PoSValidatorManager is PoSValidatorManagerStorage storage $ = _getPoSValidatorManagerStorage(); return $._posValidatorInfo[validationID].owner != address(0); } + + function _withdrawValidationRewards(address rewardRecipient, bytes32 validationID) internal { + PoSValidatorManagerStorage storage $ = _getPoSValidatorManagerStorage(); + + uint256 rewards = $._redeemableValidatorRewards[validationID]; + delete $._redeemableValidatorRewards[validationID]; + + _reward(rewardRecipient, rewards); + } + + function _withdrawDelegationRewards( + address rewardRecipient, + bytes32 delegationID, + bytes32 validationID + ) internal returns (uint256, uint256) { + PoSValidatorManagerStorage storage $ = _getPoSValidatorManagerStorage(); + + uint256 delegationRewards; + uint256 validatorFees; + + uint256 rewards = $._redeemableDelegatorRewards[delegationID]; + delete $._redeemableDelegatorRewards[delegationID]; + + if (rewards > 0) { + validatorFees = (rewards * $._posValidatorInfo[validationID].delegationFeeBips) + / BIPS_CONVERSION_FACTOR; + + // Allocate the delegation fees to the validator. + $._redeemableValidatorRewards[validationID] += validatorFees; + + // Reward the remaining tokens to the delegator. + delegationRewards = rewards - validatorFees; + _reward(rewardRecipient, delegationRewards); + } + + return (delegationRewards, validatorFees); + } } diff --git a/foundry.toml b/foundry.toml index 773f49fb4..04e08b02a 100644 --- a/foundry.toml +++ b/foundry.toml @@ -6,7 +6,6 @@ solc_version = '0.8.25' evm_version = 'shanghai' test = 'tests' bytecode_hash = "none" -auto_detect_remappings = false [fmt] line_length = 100 diff --git a/go.mod b/go.mod index bcac41f50..7d66a4281 100644 --- a/go.mod +++ b/go.mod @@ -8,17 +8,17 @@ require ( ) require ( - github.com/ava-labs/awm-relayer v1.4.1-0.20241010161724-2db445c994d6 + github.com/ava-labs/awm-relayer v1.4.1-0.20241114185359-5cd5a982832d github.com/ava-labs/subnet-evm v0.6.12-rc.0 github.com/ethereum/go-ethereum v1.13.14 github.com/onsi/ginkgo/v2 v2.21.0 - github.com/onsi/gomega v1.35.0 + github.com/onsi/gomega v1.35.1 github.com/pkg/errors v0.9.1 github.com/prometheus/client_golang v1.20.5 github.com/spf13/cobra v1.8.1 github.com/stretchr/testify v1.9.0 go.uber.org/zap v1.27.0 - golang.org/x/tools v0.26.0 + golang.org/x/tools v0.27.0 google.golang.org/protobuf v1.35.1 ) @@ -48,6 +48,7 @@ require ( github.com/decred/dcrd/dcrec/secp256k1/v4 v4.1.0 // indirect github.com/dlclark/regexp2 v1.7.0 // indirect github.com/dop251/goja v0.0.0-20230806174421-c933cf95e127 // indirect + github.com/emicklei/go-restful/v3 v3.11.0 // indirect github.com/ethereum/c-kzg-4844 v0.4.0 // indirect github.com/fsnotify/fsnotify v1.6.0 // indirect github.com/gballet/go-libpcsclite v0.0.0-20191108122812-4678299bea08 // indirect @@ -57,12 +58,18 @@ require ( github.com/go-logr/logr v1.4.2 // indirect github.com/go-logr/stdr v1.2.2 // indirect github.com/go-ole/go-ole v1.3.0 // indirect + github.com/go-openapi/jsonpointer v0.19.6 // indirect + github.com/go-openapi/jsonreference v0.20.2 // indirect + github.com/go-openapi/swag v0.22.3 // indirect github.com/go-sourcemap/sourcemap v2.1.3+incompatible // indirect github.com/go-task/slim-sprig/v3 v3.0.0 // indirect github.com/gogo/protobuf v1.3.2 // indirect + github.com/golang/protobuf v1.5.4 // indirect github.com/golang/snappy v0.0.5-0.20220116011046-fa5810519dcb // indirect github.com/google/btree v1.1.2 // indirect + github.com/google/gnostic-models v0.6.8 // indirect github.com/google/go-cmp v0.6.0 // indirect + github.com/google/gofuzz v1.2.0 // indirect github.com/google/pprof v0.0.0-20241029153458-d1b30febd7db // indirect github.com/google/renameio/v2 v2.0.0 // indirect github.com/google/uuid v1.6.0 // indirect @@ -82,18 +89,25 @@ require ( github.com/inconshreveable/mousetrap v1.1.0 // indirect github.com/jackpal/gateway v1.0.6 // indirect github.com/jackpal/go-nat-pmp v1.0.2 // indirect + github.com/josharian/intern v1.0.0 // indirect + github.com/json-iterator/go v1.1.12 // indirect github.com/klauspost/compress v1.17.9 // indirect github.com/kr/pretty v0.3.1 // indirect github.com/kr/text v0.2.0 // indirect github.com/magiconair/properties v1.8.7 // indirect + github.com/mailru/easyjson v0.7.7 // indirect github.com/mattn/go-colorable v0.1.13 // indirect github.com/mattn/go-isatty v0.0.17 // indirect github.com/mattn/go-runewidth v0.0.13 // indirect github.com/mitchellh/mapstructure v1.5.0 // indirect github.com/mitchellh/pointerstructure v1.2.0 // indirect github.com/mmcloughlin/addchain v0.4.0 // indirect + github.com/moby/spdystream v0.2.0 // indirect + github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect + github.com/modern-go/reflect2 v1.0.2 // indirect github.com/mr-tron/base58 v1.2.0 // indirect github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect + github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f // indirect github.com/nbutton23/zxcvbn-go v0.0.0-20180912185939-ae427f1e4c1d // indirect github.com/olekukonko/tablewriter v0.0.5 // indirect github.com/pelletier/go-toml/v2 v2.0.8 // indirect @@ -130,23 +144,35 @@ require ( go.opentelemetry.io/otel/sdk v1.22.0 // indirect go.opentelemetry.io/otel/trace v1.22.0 // indirect go.opentelemetry.io/proto/otlp v1.0.0 // indirect - go.uber.org/mock v0.4.0 // indirect + go.uber.org/mock v0.5.0 // indirect go.uber.org/multierr v1.11.0 // indirect - golang.org/x/crypto v0.28.0 // indirect + golang.org/x/crypto v0.29.0 // indirect golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56 // indirect - golang.org/x/mod v0.21.0 // indirect - golang.org/x/net v0.30.0 // indirect - golang.org/x/sync v0.8.0 // indirect - golang.org/x/sys v0.26.0 // indirect - golang.org/x/term v0.25.0 // indirect - golang.org/x/text v0.19.0 // indirect + golang.org/x/mod v0.22.0 // indirect + golang.org/x/net v0.31.0 // indirect + golang.org/x/oauth2 v0.23.0 // indirect + golang.org/x/sync v0.9.0 // indirect + golang.org/x/sys v0.27.0 // indirect + golang.org/x/term v0.26.0 // indirect + golang.org/x/text v0.20.0 // indirect golang.org/x/time v0.3.0 // indirect gonum.org/v1/gonum v0.11.0 // indirect - google.golang.org/genproto/googleapis/api v0.0.0-20240814211410-ddb44dafa142 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20240827150818-7e3bb234dfed // indirect - google.golang.org/grpc v1.67.1 // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20240903143218-8af14fe29dc1 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240903143218-8af14fe29dc1 // indirect + google.golang.org/grpc v1.68.0 // indirect + gopkg.in/inf.v0 v0.9.1 // indirect gopkg.in/ini.v1 v1.67.0 // indirect gopkg.in/natefinch/lumberjack.v2 v2.0.0 // indirect + gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect + k8s.io/api v0.29.0 // indirect + k8s.io/apimachinery v0.29.0 // indirect + k8s.io/client-go v0.29.0 // indirect + k8s.io/klog/v2 v2.110.1 // indirect + k8s.io/kube-openapi v0.0.0-20231010175941-2dd684a91f00 // indirect + k8s.io/utils v0.0.0-20230726121419-3b25d923346b // indirect rsc.io/tmplfunc v0.0.3 // indirect + sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect + sigs.k8s.io/structured-merge-diff/v4 v4.4.1 // indirect + sigs.k8s.io/yaml v1.3.0 // indirect ) diff --git a/go.sum b/go.sum index e0af4467d..a74ed7f73 100644 --- a/go.sum +++ b/go.sum @@ -56,16 +56,14 @@ github.com/ajg/form v1.5.1/go.mod h1:uL1WgH+h2mgNtvBq0339dVnzXdBETtL2LeUXaIv25UY github.com/allegro/bigcache v1.2.1-0.20190218064605-e24eb225f156 h1:eMwmnE/GDgah4HI848JfFxHt+iPb26b4zyfspmqY0/8= github.com/allegro/bigcache v1.2.1-0.20190218064605-e24eb225f156/go.mod h1:Cb/ax3seSYIx7SuZdm2G2xzfwmv3TPSk2ucNfQESPXM= github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= -github.com/ava-labs/avalanchego v1.12.0-initial-poc.6 h1:7Ijm0POq/NGX6jQG08BlOPfuHi9JYtDy4HylNAjel2A= -github.com/ava-labs/avalanchego v1.12.0-initial-poc.6/go.mod h1:gYlTU42Q4b29hzhUN22yclym5qwB3Si0jh4+LTn7DZM= +github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5 h1:0CwZNZbxp69SHPdPJAN/hZIm0C4OItdklCFmMRWYpio= +github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkYZB8zMSxRWpUBQtwG5a7fFgvEO+odwuTv2gs= github.com/ava-labs/avalanchego v1.12.0-initial-poc.9 h1:dQhb+KlPoud+AkRV3A0suKCTodlUSzflGcZElESeVKo= github.com/ava-labs/avalanchego v1.12.0-initial-poc.9/go.mod h1:86tO6F1FT8emclUwdQ2WCwAtAerqjm5A4IbV6XxNUyM= -github.com/ava-labs/awm-relayer v1.4.1-0.20241010161724-2db445c994d6 h1:WdFWoZ8clWfTPp3cKyWYTsveMKW/0SQzWk8U1aCcdnw= -github.com/ava-labs/awm-relayer v1.4.1-0.20241010161724-2db445c994d6/go.mod h1:6eqh3V1Og40gXmZUOP6tCrlmMEcVuj9l737yYh1s8uw= +github.com/ava-labs/awm-relayer v1.4.1-0.20241114185359-5cd5a982832d h1:Sgn2uD8axkyafPty1iY2ZkPVmT2eVoYgJEAPxkYNYqw= +github.com/ava-labs/awm-relayer v1.4.1-0.20241114185359-5cd5a982832d/go.mod h1:xrZ8FX+mC0PBvUL9yTVqmvCIA9rYYfmdDDY9oTTI6n8= github.com/ava-labs/coreth v0.13.8 h1:f14X3KgwHl9LwzfxlN6S4bbn5VA2rhEsNnHaRLSTo/8= github.com/ava-labs/coreth v0.13.8/go.mod h1:t3BSv/eQv0AlDPMfEDCMMoD/jq1RkUsbFzQAFg5qBcE= -github.com/ava-labs/subnet-evm v0.6.12-0.20241030152601-17be88218497 h1:4vmfim7BzjB25ipzPIrPOZqwvfEoRYA7mNo1zz/Osh0= -github.com/ava-labs/subnet-evm v0.6.12-0.20241030152601-17be88218497/go.mod h1:3HTZyhHdxu217Fx2k1fmpeV8AvqCMyQAfpjInlBQkD4= github.com/ava-labs/subnet-evm v0.6.12-rc.0 h1:I7s4QkUO8bjg+JB/KTwrmDH8Q2mQYVTKF8mFUSDqk+E= github.com/ava-labs/subnet-evm v0.6.12-rc.0/go.mod h1:Pf122zopW1fELpOsw0PrdX4u6K/4VOWU2p5C3cHsYAs= github.com/aymerick/raymond v2.0.3-0.20180322193309-b565731e1464+incompatible/go.mod h1:osfaiScAUVup+UC9Nfq76eWqDhXlp+4UYaA8uhTBO6g= @@ -169,6 +167,8 @@ github.com/dop251/goja_nodejs v0.0.0-20210225215109-d91c329300e7/go.mod h1:hn7BA github.com/dop251/goja_nodejs v0.0.0-20211022123610-8dd9abb0616d/go.mod h1:DngW8aVqWbuLRMHItjPUyqdj+HWPvnQe8V8y1nDpIbM= github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= github.com/eknkc/amber v0.0.0-20171010120322-cdade1c07385/go.mod h1:0vRUJqYpeSZifjYj7uP3BG/gKcuzL9xWVV/Y+cK33KM= +github.com/emicklei/go-restful/v3 v3.11.0 h1:rAQeMHw1c7zTmncogyy8VvRZwtkmkZ4FxERmMY4rD+g= +github.com/emicklei/go-restful/v3 v3.11.0/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= @@ -210,6 +210,7 @@ github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9 github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= +github.com/go-logr/logr v1.3.0/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= github.com/go-logr/logr v1.4.2 h1:6pFjapn8bFcIbiKo3XT4j/BhANplGihG6tvd+8rYgrY= github.com/go-logr/logr v1.4.2/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= @@ -218,6 +219,12 @@ github.com/go-martini/martini v0.0.0-20170121215854-22fa46961aab/go.mod h1:/P9AE github.com/go-ole/go-ole v1.2.6/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0= github.com/go-ole/go-ole v1.3.0 h1:Dt6ye7+vXGIKZ7Xtk4s6/xVdGDQynvom7xCFEdWr6uE= github.com/go-ole/go-ole v1.3.0/go.mod h1:5LS6F96DhAwUc7C+1HLexzMXY1xGRSryjyPPKW6zv78= +github.com/go-openapi/jsonpointer v0.19.6 h1:eCs3fxoIi3Wh6vtgmLTOjdhSpiqphQ+DaPn38N2ZdrE= +github.com/go-openapi/jsonpointer v0.19.6/go.mod h1:osyAmYz/mB/C3I+WsTTSgw1ONzaLJoLCyoi6/zppojs= +github.com/go-openapi/jsonreference v0.20.2 h1:3sVjiK66+uXK/6oQ8xgcRKcFgQ5KXa2KvnJRumpMGbE= +github.com/go-openapi/jsonreference v0.20.2/go.mod h1:Bl1zwGIM8/wsvqjsOQLJ/SH+En5Ap4rVB5KVcIDZG2k= +github.com/go-openapi/swag v0.22.3 h1:yMBqmnQ0gyZvEb/+KzuWZOXgllrXT4SADYbvDaXHv/g= +github.com/go-openapi/swag v0.22.3/go.mod h1:UzaqsxGiab7freDnrUUra0MwWfN/q7tE4j+VcZ0yl14= github.com/go-sourcemap/sourcemap v2.1.3+incompatible h1:W1iEw64niKVGogNgBN3ePyLFfuisuzeidWPMPWmECqU= github.com/go-sourcemap/sourcemap v2.1.3+incompatible/go.mod h1:F8jJfvm2KbVjc5NqelyYJmf/v5J0dwNLS2mL4sNA1Jg= github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE= @@ -274,6 +281,8 @@ github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Z github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.1.2 h1:xf4v41cLI2Z6FxbKm+8Bu+m8ifhj15JuZ9sa0jZCMUU= github.com/google/btree v1.1.2/go.mod h1:qOPhT0dTNdNzV6Z/lhRX0YXUafgPLFUh+gZMl761Gm4= +github.com/google/gnostic-models v0.6.8 h1:yo/ABAfM5IMRsS1VnXjTBvUb61tFIHozhlYvRgGre9I= +github.com/google/gnostic-models v0.6.8/go.mod h1:5n7qKqH0f5wFt+aWF8CW6pZLLNOfYuF5OpfBSENuI8U= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= @@ -284,10 +293,13 @@ github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/go-querystring v1.0.0/go.mod h1:odCYkC5MyYFN7vkCjXpyrEuKhc/BUO6wN/zVPAxq5ck= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= +github.com/google/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0= +github.com/google/gofuzz v1.2.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= github.com/google/martian/v3 v3.1.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= @@ -321,6 +333,7 @@ github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB7 github.com/gorilla/rpc v1.2.0 h1:WvvdC2lNeT1SP32zrIce5l0ECBfbAlmrmSBsuc57wfk= github.com/gorilla/rpc v1.2.0/go.mod h1:V4h9r+4sF5HnzqbwIez0fKSpANP0zlYd3qR7p36jkTQ= github.com/gorilla/websocket v1.4.1/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= +github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/gorilla/websocket v1.5.0 h1:PPwGk2jz7EePpoHN/+ClbZu8SPxiqlu12wZP/3sWmnc= github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 h1:Ovs26xHkKqVztRpIrF/92BcuyuQ/YW4NSIpoGtfXNho= @@ -366,9 +379,13 @@ github.com/jackpal/go-nat-pmp v1.0.2 h1:KzKSgb7qkJvOUTqYl9/Hg/me3pWgBmERKrTGD7Bd github.com/jackpal/go-nat-pmp v1.0.2/go.mod h1:QPH045xvCAeXUZOxsnwmrtiCoxIr9eob+4orBN1SBKc= github.com/jessevdk/go-flags v0.0.0-20141203071132-1679536dcc89/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= +github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY= +github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= github.com/jrick/logrotate v1.0.0/go.mod h1:LNinyqDIJnpAur+b8yyulnQw/wDuN1+BYKlTRt3OuAQ= github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= +github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= +github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= @@ -405,6 +422,8 @@ github.com/leanovate/gopter v0.2.9/go.mod h1:U2L/78B+KVFIx2VmW6onHJQzXtFb+p5y3y2 github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/magiconair/properties v1.8.7 h1:IeQXZAiQcpL9mgcAe1Nu6cX9LLw6ExEHKjN0VQdvPDY= github.com/magiconair/properties v1.8.7/go.mod h1:Dhd985XPs7jluiymwWYZ0G4Z61jb3vdS329zhj2hYo0= +github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0= +github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= github.com/mattn/go-colorable v0.1.2/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= github.com/mattn/go-colorable v0.1.8/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= github.com/mattn/go-colorable v0.1.11/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4= @@ -434,15 +453,22 @@ github.com/mitchellh/pointerstructure v1.2.0/go.mod h1:BRAsLI5zgXmw97Lf6s25bs8oh github.com/mmcloughlin/addchain v0.4.0 h1:SobOdjm2xLj1KkXN5/n0xTIWyZA2+s99UCY1iPfkHRY= github.com/mmcloughlin/addchain v0.4.0/go.mod h1:A86O+tHqZLMNO4w6ZZ4FlVQEadcoqkyU72HC5wJ4RlU= github.com/mmcloughlin/profile v0.1.1/go.mod h1:IhHD7q1ooxgwTgjxQYkACGA77oFTDdFVejUS1/tS/qU= +github.com/moby/spdystream v0.2.0 h1:cjW1zVyyoiM0T7b6UoySUFqzXMoqRckQtXwGPiBhOM8= +github.com/moby/spdystream v0.2.0/go.mod h1:f7i0iNDQJ059oMTcWxx8MA/zKFIuD/lY+0GqbN2Wy8c= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= +github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= +github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= +github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= github.com/moul/http2curl v1.0.0/go.mod h1:8UbvGypXm98wA/IqH45anm5Y2Z6ep6O31QGOAZ3H0fQ= github.com/mr-tron/base58 v1.2.0 h1:T/HDJBh4ZCPbU39/+c3rRvE0uKBQlU27+QI8LJ4t64o= github.com/mr-tron/base58 v1.2.0/go.mod h1:BinMc/sQntlIE1frQmRFPUoPA1Zkr8VRgBdjWI2mNwc= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= +github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f h1:y5//uYreIhSUg3J1GEMiLbxo1LJaP8RfCpH6pymGZus= +github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f/go.mod h1:ZdcZmHo+o7JKHSa8/e818NopupXU1YMK5fe1lsApnBw= github.com/nats-io/jwt v0.3.0/go.mod h1:fRYCDE99xlTsqUzISS1Bi75UBJ6ljOJQOAAu5VglpSg= github.com/nats-io/nats.go v1.9.1/go.mod h1:ZjDU1L/7fJ09jvUSRVBR2e7+RnLiiIQyqyzEE/Zbp4w= github.com/nats-io/nkeys v0.1.0/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxziKVo7w= @@ -471,8 +497,8 @@ github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7J github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= github.com/onsi/gomega v1.17.0/go.mod h1:HnhC7FXeEQY45zxNK3PPoIUhzk/80Xly9PcubAlGdZY= github.com/onsi/gomega v1.19.0/go.mod h1:LY+I3pBVzYsTBU1AnDwOSxaYi9WoWiqgwooUqq9yPro= -github.com/onsi/gomega v1.35.0 h1:xuM1M/UvMp9BCdS4hojhS9/4jEuVqS9Er3bqupeaoPM= -github.com/onsi/gomega v1.35.0/go.mod h1:PvZbdDc8J6XJEpDK4HCuRBm8a6Fzp9/DmhC9C7yFlog= +github.com/onsi/gomega v1.35.1 h1:Cwbd75ZBPxFSuZ6T+rN/WCb/gOc6YgFBXLlZLhC7Ds4= +github.com/onsi/gomega v1.35.1/go.mod h1:PvZbdDc8J6XJEpDK4HCuRBm8a6Fzp9/DmhC9C7yFlog= github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= github.com/pelletier/go-toml/v2 v2.0.8 h1:0ctb6s9mE31h0/lhu+J6OPmVeDxJn+kYnJc2jZR9tGQ= github.com/pelletier/go-toml/v2 v2.0.8/go.mod h1:vuYfssBdrU2XDZ9bYydBu6t+6a6PYNcZljzZR9VXg+4= @@ -550,13 +576,13 @@ github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/ github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.2/go.mod h1:R6va5+xMeoiuVRoj+gSkQ7d3FALtqAAGI1FQKckRals= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= +github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/stretchr/testify v1.8.3/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/subosito/gotenv v1.4.2 h1:X1TuBLAMDFbaTAChgCBLu3DU3UPyELpnF2jjJ2cz/S8= github.com/subosito/gotenv v1.4.2/go.mod h1:ayKnFf/c6rvx/2iiLrJUk1e6plDbT3edrFNGqEflhK0= -github.com/supranational/blst v0.3.11 h1:LyU6FolezeWAhvQk0k6O/d49jqgO52MSDDfYgbeoEm4= -github.com/supranational/blst v0.3.11/go.mod h1:jZJtfjgudtNl4en1tzwPIV3KjUnQUvG3/j+w+fVonLw= +github.com/supranational/blst v0.3.13 h1:AYeSxdOMacwu7FBmpfloBz5pbFXDmJL33RuwnKtmTjk= github.com/supranational/blst v0.3.13/go.mod h1:jZJtfjgudtNl4en1tzwPIV3KjUnQUvG3/j+w+fVonLw= github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7/go.mod h1:q4W45IWZaF22tdD+VEXcAWRA037jwmWEB5VWYORlTpc= github.com/syndtr/goleveldb v1.0.1-0.20220614013038-64ee5596c38a h1:1ur3QoCqvE5fl+nylMaIr9PVV1w343YRDtsy+Rwu7XI= @@ -623,8 +649,8 @@ go.opentelemetry.io/proto/otlp v1.0.0 h1:T0TX0tmXU8a3CbNXzEKGeU5mIVOdf0oykP+u2lI go.opentelemetry.io/proto/otlp v1.0.0/go.mod h1:Sy6pihPLfYHkr3NkUbEhGHFhINUSI/v80hjKIs5JXpM= go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= -go.uber.org/mock v0.4.0 h1:VcM4ZOtdbR4f6VXfiOpwpVJDL6lCReaZ6mw31wqh7KU= -go.uber.org/mock v0.4.0/go.mod h1:a6FSlNadKUHUa9IP5Vyt1zh4fC7uAwxMutEAscFbkZc= +go.uber.org/mock v0.5.0 h1:KAMbZvZPyBPWgD14IrIQ38QCyjwpvVVV6K/bHl1IwQU= +go.uber.org/mock v0.5.0/go.mod h1:ge71pBPLYDk7QIi1LupWxdAykm7KIEFchiOqd6z7qMM= go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8= @@ -642,8 +668,8 @@ golang.org/x/crypto v0.0.0-20210322153248-0c34fe9e7dc2/go.mod h1:T9bdIzuCu7OtxOm golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= -golang.org/x/crypto v0.28.0 h1:GBDwsMXVQi34v5CCYUm2jkJvu4cbtru2U4TN2PSyQnw= -golang.org/x/crypto v0.28.0/go.mod h1:rmgy+3RHxRZMyY0jjAJShp2zgEdOqj2AO7U0pYmeQ7U= +golang.org/x/crypto v0.29.0 h1:L5SG1JTTXupVV3n6sUqMTeWbjAyfPwoda2DLX8J8FrQ= +golang.org/x/crypto v0.29.0/go.mod h1:+F4F4N5hv6v38hfeYwTdx20oUvLLc+QfrE9Ax9HtgRg= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= @@ -682,8 +708,8 @@ golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= -golang.org/x/mod v0.21.0 h1:vvrHzRwRfVKSiLrG+d4FMl/Qi4ukBCE6kZlTUkDYRT0= -golang.org/x/mod v0.21.0/go.mod h1:6SkKJ3Xj0I0BrPOZoBy3bdMptDDU9oJrpohJ3eWZ1fY= +golang.org/x/mod v0.22.0 h1:D4nJWe9zXqHOmWqj4VMOJhvzj7bEZg4wEYa759z1pH4= +golang.org/x/mod v0.22.0/go.mod h1:6SkKJ3Xj0I0BrPOZoBy3bdMptDDU9oJrpohJ3eWZ1fY= golang.org/x/net v0.0.0-20180719180050-a680a1efc54d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -729,8 +755,8 @@ golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qx golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220607020251-c690dde0001d/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= -golang.org/x/net v0.30.0 h1:AcW1SDZMkb8IpzCdQUaIq2sP4sZ4zw+55h6ynffypl4= -golang.org/x/net v0.30.0/go.mod h1:2wGyMJ5iFasEhkwi13ChkO/t1ECNC4X4eBKkVFyYFlU= +golang.org/x/net v0.31.0 h1:68CPQngjLL0r2AlUKiSxtQFKvzRVbnzLwMUn5SzcLHo= +golang.org/x/net v0.31.0/go.mod h1:P4fl1q7dY2hnZFxEk4pPSkDHF+QqjitcnDjUQyMM+pM= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -740,6 +766,8 @@ golang.org/x/oauth2 v0.0.0-20200902213428-5d25da1a8d43/go.mod h1:KelEdhl1UZF7XfJ golang.org/x/oauth2 v0.0.0-20201109201403-9fd604954f58/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20201208152858-08078c50e5b5/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210218202405-ba52d332ba99/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.23.0 h1:PbgcYx2W7i4LvjJWEbf0ngHV6qJYr86PkAV3bXdLEbs= +golang.org/x/oauth2 v0.23.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -752,8 +780,8 @@ golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.8.0 h1:3NFvSEYkUoMifnESzZl15y791HH1qU2xm6eCJU5ZPXQ= -golang.org/x/sync v0.8.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= +golang.org/x/sync v0.9.0 h1:fEo0HyrW1GIgZdpbhCRO0PkJajUS5H9IFUztCgEo2jQ= +golang.org/x/sync v0.9.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181205085412-a5c9d58dba9a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -820,12 +848,12 @@ golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.26.0 h1:KHjCJyddX0LoSTb3J+vWpupP9p0oznkqVk/IfjymZbo= -golang.org/x/sys v0.26.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.27.0 h1:wBqf8DvsY9Y/2P8gAfPDEYNuS30J4lPHJxXSb/nJZ+s= +golang.org/x/sys v0.27.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= -golang.org/x/term v0.25.0 h1:WtHI/ltw4NvSUig5KARz9h521QvRC8RmF/cuYqifU24= -golang.org/x/term v0.25.0/go.mod h1:RPyXicDX+6vLxogjjRxjgD2TKtmAO6NZBsBRfrOLu7M= +golang.org/x/term v0.26.0 h1:WEQa6V3Gja/BhNxg540hBip/kkaYtRg3cxg4oXSw4AU= +golang.org/x/term v0.26.0/go.mod h1:Si5m1o57C5nBNQo5z1iq+XDijt21BDBDp2bK0QI8e3E= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -836,8 +864,8 @@ golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ= -golang.org/x/text v0.19.0 h1:kTxAhCbGbxhK0IwgSKiMO5awPoDQ0RpfiVYBfK860YM= -golang.org/x/text v0.19.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY= +golang.org/x/text v0.20.0 h1:gK/Kv2otX8gz+wn7Rmb3vT96ZwuoxnQlY+HlJVj7Qug= +golang.org/x/text v0.20.0/go.mod h1:D4IsuqiFMhST5bX19pQ9ikHC2GsaKyk/oF+pn3ducp4= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= @@ -899,8 +927,8 @@ golang.org/x/tools v0.0.0-20210108195828-e2f9c7f1fc8e/go.mod h1:emZCQorbCU4vsT4f golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= golang.org/x/tools v0.1.3/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= -golang.org/x/tools v0.26.0 h1:v/60pFQmzmT9ExmjDv2gGIfi3OqfKoEP6I5+umXlbnQ= -golang.org/x/tools v0.26.0/go.mod h1:TPVVj70c7JJ3WCazhD8OdXcZg/og+b9+tH/KxylGwH0= +golang.org/x/tools v0.27.0 h1:qEKojBykQkQ4EynWy4S8Weg69NumxKdn40Fce3uc/8o= +golang.org/x/tools v0.27.0/go.mod h1:sUi0ZgbwW9ZPAq26Ekut+weQPR5eIM6GQLQ1Yjm1H0Q= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -972,10 +1000,10 @@ google.golang.org/genproto v0.0.0-20201214200347-8c77b98c765d/go.mod h1:FWY/as6D google.golang.org/genproto v0.0.0-20210108203827-ffc7fda8c3d7/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210226172003-ab064af71705/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210624195500-8bfb893ecb84/go.mod h1:SzzZ/N+nwJDaO1kznhnlzqS8ocJICar6hYhVyhi++24= -google.golang.org/genproto/googleapis/api v0.0.0-20240814211410-ddb44dafa142 h1:wKguEg1hsxI2/L3hUYrpo1RVi48K+uTyzKqprwLXsb8= -google.golang.org/genproto/googleapis/api v0.0.0-20240814211410-ddb44dafa142/go.mod h1:d6be+8HhtEtucleCbxpPW9PA9XwISACu8nvpPqF0BVo= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240827150818-7e3bb234dfed h1:J6izYgfBXAI3xTKLgxzTmUltdYaLsuBxFCgDHWJ/eXg= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240827150818-7e3bb234dfed/go.mod h1:UqMtugtsSgubUsoxbuAoiCXvqvErP7Gf0so0mK9tHxU= +google.golang.org/genproto/googleapis/api v0.0.0-20240903143218-8af14fe29dc1 h1:hjSy6tcFQZ171igDaN5QHOw2n6vx40juYbC/x67CEhc= +google.golang.org/genproto/googleapis/api v0.0.0-20240903143218-8af14fe29dc1/go.mod h1:qpvKtACPCQhAdu3PyQgV4l3LMXZEtft7y8QcarRsp9I= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240903143218-8af14fe29dc1 h1:pPJltXNxVzT4pK9yD8vR9X75DaWYYmLGMsEvBfFQZzQ= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240903143218-8af14fe29dc1/go.mod h1:UqMtugtsSgubUsoxbuAoiCXvqvErP7Gf0so0mK9tHxU= google.golang.org/grpc v1.12.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= @@ -994,8 +1022,8 @@ google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv google.golang.org/grpc v1.34.0/go.mod h1:WotjhfgOW/POjDeRt8vscBtXq+2VjORFy659qA51WJ8= google.golang.org/grpc v1.35.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= google.golang.org/grpc v1.38.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= -google.golang.org/grpc v1.67.1 h1:zWnc1Vrcno+lHZCOofnIMvycFcc0QRGIzm9dhnDX68E= -google.golang.org/grpc v1.67.1/go.mod h1:1gLDyUQU7CTLJI90u3nXZ9ekeghjeM7pTDZlqFNg2AA= +google.golang.org/grpc v1.68.0 h1:aHQeeJbo8zAkAa3pRzrVjZlbz6uSfeOXlJNQM0RAbz0= +google.golang.org/grpc v1.68.0/go.mod h1:fmSPC5AsjSBCK54MyHRx48kpOti1/jRfOlwEWywNjWA= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= @@ -1019,6 +1047,8 @@ gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= gopkg.in/go-playground/assert.v1 v1.2.1/go.mod h1:9RXL0bg/zibRAgZUYszZSwO/z8Y/a8bDuhia5mkpMnE= gopkg.in/go-playground/validator.v8 v8.18.2/go.mod h1:RX2a/7Ha8BgOhfk7j780h4/u/RRjR0eouCJSH80/M2Y= +gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc= +gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= gopkg.in/ini.v1 v1.51.1/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/ini.v1 v1.67.0 h1:Dgnx+6+nfE+IfzjUEISNeydPJh9AXNNsWbGP9KzCsOA= gopkg.in/ini.v1 v1.67.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= @@ -1030,6 +1060,7 @@ gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWD gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= @@ -1045,8 +1076,26 @@ honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWh honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= +k8s.io/api v0.29.0 h1:NiCdQMY1QOp1H8lfRyeEf8eOwV6+0xA6XEE44ohDX2A= +k8s.io/api v0.29.0/go.mod h1:sdVmXoz2Bo/cb77Pxi71IPTSErEW32xa4aXwKH7gfBA= +k8s.io/apimachinery v0.29.0 h1:+ACVktwyicPz0oc6MTMLwa2Pw3ouLAfAon1wPLtG48o= +k8s.io/apimachinery v0.29.0/go.mod h1:eVBxQ/cwiJxH58eK/jd/vAk4mrxmVlnpBH5J2GbMeis= +k8s.io/client-go v0.29.0 h1:KmlDtFcrdUzOYrBhXHgKw5ycWzc3ryPX5mQe0SkG3y8= +k8s.io/client-go v0.29.0/go.mod h1:yLkXH4HKMAywcrD82KMSmfYg2DlE8mepPR4JGSo5n38= +k8s.io/klog/v2 v2.110.1 h1:U/Af64HJf7FcwMcXyKm2RPM22WZzyR7OSpYj5tg3cL0= +k8s.io/klog/v2 v2.110.1/go.mod h1:YGtd1984u+GgbuZ7e08/yBuAfKLSO0+uR1Fhi6ExXjo= +k8s.io/kube-openapi v0.0.0-20231010175941-2dd684a91f00 h1:aVUu9fTY98ivBPKR9Y5w/AuzbMm96cd3YHRTU83I780= +k8s.io/kube-openapi v0.0.0-20231010175941-2dd684a91f00/go.mod h1:AsvuZPBlUDVuCdzJ87iajxtXuR9oktsTctW/R9wwouA= +k8s.io/utils v0.0.0-20230726121419-3b25d923346b h1:sgn3ZU783SCgtaSJjpcVVlRqd6GSnlTLKgpAAttJvpI= +k8s.io/utils v0.0.0-20230726121419-3b25d923346b/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= rsc.io/tmplfunc v0.0.3 h1:53XFQh69AfOa8Tw0Jm7t+GV7KZhOi6jzsCzTtKbMvzU= rsc.io/tmplfunc v0.0.3/go.mod h1:AG3sTPzElb1Io3Yg4voV9AGZJuleGAwaVRxL9M49PhA= +sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd h1:EDPBXCAspyGV4jQlpZSudPeMmr1bNJefnuqLsRAsHZo= +sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd/go.mod h1:B8JuhiUyNFVKdsE8h686QcCxMaH6HrOAZj4vswFpcB0= +sigs.k8s.io/structured-merge-diff/v4 v4.4.1 h1:150L+0vs/8DA78h1u02ooW1/fFq/Lwr+sGiqlzvrtq4= +sigs.k8s.io/structured-merge-diff/v4 v4.4.1/go.mod h1:N8hJocpFajUSSeSJ9bOZ77VzejKZaXsTtZo4/u7Io08= +sigs.k8s.io/yaml v1.3.0 h1:a2VclLzOGrwOHDiV8EfBGhvjHvP46CtW5j6POvhYGGo= +sigs.k8s.io/yaml v1.3.0/go.mod h1:GeOyir5tyXNByN85N/dRIT9es5UQNerPYEKK56eTBm8= diff --git a/remappings.txt b/remappings.txt index b94e774eb..afd54042d 100644 --- a/remappings.txt +++ b/remappings.txt @@ -1,7 +1,7 @@ -@avalabs/subnet-evm-contracts@1.2.0/=lib/subnet-evm/contracts/ +@avalabs/subnet-evm-contracts@1.2.0=lib/subnet-evm/contracts @openzeppelin/contracts@5.0.2=lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/contracts @openzeppelin/contracts-upgradeable@5.0.2=lib/openzeppelin-contracts-upgradeable/contracts @forge-std=lib/forge-std/src -@teleporter/=contracts/teleporter/ -@mocks/=contracts/mocks -@utilities/=contracts/utilities/ +@teleporter=contracts/teleporter +@mocks=contracts/mocks +@utilities=contracts/utilities diff --git a/scripts/abi_bindings.sh b/scripts/abi_bindings.sh index eb9bbcb19..8a79ff82a 100755 --- a/scripts/abi_bindings.sh +++ b/scripts/abi_bindings.sh @@ -16,7 +16,8 @@ export ARCH=$(uname -m) [ $ARCH = x86_64 ] && ARCH=amd64 echo "ARCH set to $ARCH" -DEFAULT_CONTRACT_LIST="TeleporterMessenger TeleporterRegistry ExampleERC20 ExampleRewardCalculator TestMessenger ValidatorSetSig NativeTokenStakingManager ERC20TokenStakingManager PoAValidatorManager" +DEFAULT_CONTRACT_LIST="TeleporterMessenger TeleporterRegistry ExampleERC20 ExampleRewardCalculator TestMessenger ValidatorSetSig NativeTokenStakingManager ERC20TokenStakingManager PoAValidatorManager +TokenHome TokenRemote ERC20TokenHome ERC20TokenHomeUpgradeable ERC20TokenRemote ERC20TokenRemoteUpgradeable NativeTokenHome NativeTokenHomeUpgradeable NativeTokenRemote NativeTokenRemoteUpgradeable WrappedNativeToken MockERC20SendAndCallReceiver MockNativeSendAndCallReceiver ExampleERC20Decimals" PROXY_LIST="TransparentUpgradeableProxy ProxyAdmin" @@ -64,9 +65,26 @@ if ! [[ "$extracted_version" == "$SOLIDITY_VERSION" ]]; then echo "Expected solc version $SOLIDITY_VERSION, but found $extracted_version. Please install the correct version." && exit 1 fi +# Install abigen echo "Building subnet-evm abigen" go install github.com/ava-labs/subnet-evm/cmd/abigen@${SUBNET_EVM_VERSION} +# Solc does not recursively expand remappings, so we must construct them manually +remappings=$(cat $TELEPORTER_PATH/remappings.txt) + +# Recursively search for all remappings.txt files in the lib directory. +# For each file, prepend the remapping with the relative path to the file. +while read -r filepath; do + relative_path="${filepath#$TELEPORTER_PATH/}" + dir_path=$(dirname "$relative_path") + echo $dir_path + + # Use sed to transform each line with the relative path if it matches the @token=remapping pattern, + # so that each remapping is of the form @token=lib/path/to/remapping + transformed_lines=$(sed -n "s|^\(@[^=]*=\)\(.*\)|\1$dir_path/\2|p" "$filepath") + remappings+=" $transformed_lines " +done < <(find "$TELEPORTER_PATH/lib" -type f -name "remappings.txt" ) + function convertToLower() { if [ "$ARCH" = 'arm64' ]; then echo $1 | perl -ne 'print lc' @@ -113,7 +131,7 @@ function generate_bindings() { cwd=$(pwd) cd $TELEPORTER_PATH - solc --optimize --evm-version $EVM_VERSION --combined-json abi,bin,metadata,ast,devdoc,userdoc --pretty-json $cwd/$dir/$contract_name.sol $(cat $TELEPORTER_PATH/remappings.txt) > $combined_json + solc --optimize --evm-version $EVM_VERSION --combined-json abi,bin,metadata,ast,devdoc,userdoc --pretty-json $cwd/$dir/$contract_name.sol $remappings > $combined_json cd $cwd # construct the exclude list diff --git a/scripts/local/e2e_test.sh b/scripts/e2e_test.sh similarity index 91% rename from scripts/local/e2e_test.sh rename to scripts/e2e_test.sh index e716ed907..475367684 100755 --- a/scripts/local/e2e_test.sh +++ b/scripts/e2e_test.sh @@ -6,11 +6,11 @@ set -e TELEPORTER_PATH=$( cd "$(dirname "${BASH_SOURCE[0]}")" - cd ../.. && pwd + cd ../ && pwd ) function printHelp() { - echo "Usage: ./scripts/local/e2e_test.sh [--component component]" + echo "Usage: ./scripts/e2e_test.sh [--component component]" echo "" printUsage } @@ -26,7 +26,7 @@ Options: EOF } -valid_components=$(ls -d $TELEPORTER_PATH/tests/local/*/ | xargs -n 1 basename) +valid_components=$(ls -d $TELEPORTER_PATH/tests/suites/*/ | xargs -n 1 basename) components= while [ $# -gt 0 ]; do @@ -89,11 +89,11 @@ go install -v github.com/onsi/ginkgo/v2/ginkgo@${GINKGO_VERSION} for component in $(echo $components | tr ',' ' '); do echo "Building e2e tests for $component" - ginkgo build ./tests/local/$component + ginkgo build ./tests/suites/$component echo "Running e2e tests for $component" - RUN_E2E=true ./tests/local/$component/$component.test \ + RUN_E2E=true ./tests/suites/$component/$component.test \ --ginkgo.vv \ --ginkgo.label-filter=${GINKGO_LABEL_FILTER:-""} \ --ginkgo.focus=${GINKGO_FOCUS:-""} \ diff --git a/scripts/testnet/run_testnet_e2e_flows.sh b/scripts/testnet/run_testnet_e2e_flows.sh deleted file mode 100755 index 05a04de69..000000000 --- a/scripts/testnet/run_testnet_e2e_flows.sh +++ /dev/null @@ -1,18 +0,0 @@ -#!/usr/bin/env bash -# Copyright (C) 2023, Ava Labs, Inc. All rights reserved. -# See the file LICENSE for licensing terms. - -set -e - -TELEPORTER_PATH=$( - cd "$(dirname "${BASH_SOURCE[0]}")" - cd ../.. && pwd -) - -set -a - -source "$TELEPORTER_PATH"/scripts/versions.sh -source $TELEPORTER_PATH/.env -source $TELEPORTER_PATH/.env.testnet - -go run tests/testnet/main/run_testnet_flows.go diff --git a/tests/flows/governance/validator_set_sig.go b/tests/flows/governance/validator_set_sig.go index cb32a09e8..270b22afa 100644 --- a/tests/flows/governance/validator_set_sig.go +++ b/tests/flows/governance/validator_set_sig.go @@ -8,12 +8,12 @@ import ( "github.com/ava-labs/subnet-evm/accounts/abi/bind" validatorsetsig "github.com/ava-labs/teleporter/abi-bindings/go/governance/ValidatorSetSig" exampleerc20 "github.com/ava-labs/teleporter/abi-bindings/go/mocks/ExampleERC20" - "github.com/ava-labs/teleporter/tests/interfaces" + localnetwork "github.com/ava-labs/teleporter/tests/network" "github.com/ava-labs/teleporter/tests/utils" . "github.com/onsi/gomega" ) -func ValidatorSetSig(network interfaces.LocalNetwork) { +func ValidatorSetSig(network *localnetwork.LocalNetwork) { // ************************************************************************************************ // Setup // ************************************************************************************************ @@ -36,7 +36,7 @@ func ValidatorSetSig(network interfaces.LocalNetwork) { // ************************************************************************************************ // Setup // ************************************************************************************************ - subnetA, subnetB := utils.GetTwoSubnets(network) + subnetA, subnetB := network.GetTwoSubnets() _, fundedKey := network.GetFundedAccountInfo() ctx := context.Background() @@ -152,7 +152,6 @@ func ValidatorSetSig(network interfaces.LocalNetwork) { // Execute the ValidatorSetSig executeCall and wait for acceptance receipt := utils.ExecuteValidatorSetSigCallAndVerify( ctx, - network, subnetB, subnetA, validatorSetSigContractAddress, @@ -175,7 +174,6 @@ func ValidatorSetSig(network interfaces.LocalNetwork) { _ = utils.ExecuteValidatorSetSigCallAndVerify( ctx, - network, subnetB, subnetA, validatorSetSigContractAddress, @@ -192,7 +190,6 @@ func ValidatorSetSig(network interfaces.LocalNetwork) { // Send another valid transaction with the incremented nonce receipt2 := utils.ExecuteValidatorSetSigCallAndVerify( ctx, - network, subnetB, subnetA, validatorSetSigContractAddress, @@ -224,7 +221,6 @@ func ValidatorSetSig(network interfaces.LocalNetwork) { // from the same chain that it is deployed on. receipt3 := utils.ExecuteValidatorSetSigCallAndVerify( ctx, - network, subnetB, subnetB, validatorSetSigContractAddress2, diff --git a/tests/flows/ictt/erc20_home_erc20_remote.go b/tests/flows/ictt/erc20_home_erc20_remote.go new file mode 100644 index 000000000..80a9c007a --- /dev/null +++ b/tests/flows/ictt/erc20_home_erc20_remote.go @@ -0,0 +1,186 @@ +package ictt + +import ( + "context" + "math/big" + + "github.com/ava-labs/subnet-evm/accounts/abi/bind" + erc20tokenhome "github.com/ava-labs/teleporter/abi-bindings/go/ictt/TokenHome/ERC20TokenHome" + erc20tokenremote "github.com/ava-labs/teleporter/abi-bindings/go/ictt/TokenRemote/ERC20TokenRemote" + localnetwork "github.com/ava-labs/teleporter/tests/network" + "github.com/ava-labs/teleporter/tests/utils" + "github.com/ethereum/go-ethereum/crypto" + . "github.com/onsi/gomega" +) + +/** + * Deploy an ERC20TokenHome on the primary network + * Deploys ERC20TokenRemote to Subnet A + * Transfers C-Chain example ERC20 tokens to Subnet A + * Transfer tokens from Subnet A to C-Chain + */ +func ERC20TokenHomeERC20TokenRemote(network *localnetwork.LocalNetwork, teleporter utils.TeleporterTestInfo) { + cChainInfo := network.GetPrimaryNetworkInfo() + subnetAInfo, _ := network.GetTwoSubnets() + fundedAddress, fundedKey := network.GetFundedAccountInfo() + + ctx := context.Background() + + // Deploy an ExampleERC20 on the primary network as the token to be transferred + exampleERC20Address, exampleERC20 := utils.DeployExampleERC20Decimals( + ctx, + fundedKey, + cChainInfo, + erc20TokenHomeDecimals, + ) + + exampleERC20Decimals, err := exampleERC20.Decimals(&bind.CallOpts{}) + Expect(err).Should(BeNil()) + + // Create an ERC20TokenHome for transferring the ERC20 token + erc20TokenHomeAddress, erc20TokenHome := utils.DeployERC20TokenHome( + ctx, + teleporter, + fundedKey, + cChainInfo, + fundedAddress, + exampleERC20Address, + exampleERC20Decimals, + ) + + // Token representation on subnet A will have same name, symbol, and decimals + tokenName, err := exampleERC20.Name(&bind.CallOpts{}) + Expect(err).Should(BeNil()) + tokenSymbol, err := exampleERC20.Symbol(&bind.CallOpts{}) + Expect(err).Should(BeNil()) + tokenDecimals, err := exampleERC20.Decimals(&bind.CallOpts{}) + Expect(err).Should(BeNil()) + + // Deploy an ERC20TokenRemote to Subnet A + erc20TokenRemoteAddress, erc20TokenRemote := utils.DeployERC20TokenRemote( + ctx, + teleporter, + fundedKey, + subnetAInfo, + fundedAddress, + cChainInfo.BlockchainID, + erc20TokenHomeAddress, + exampleERC20Decimals, + tokenName, + tokenSymbol, + tokenDecimals, + ) + + utils.RegisterERC20TokenRemoteOnHome( + ctx, + teleporter, + cChainInfo, + erc20TokenHomeAddress, + subnetAInfo, + erc20TokenRemoteAddress, + fundedKey, + ) + + // Generate new recipient to receive transferred tokens + recipientKey, err := crypto.GenerateKey() + Expect(err).Should(BeNil()) + recipientAddress := crypto.PubkeyToAddress(recipientKey.PublicKey) + + // Send tokens from C-Chain to recipient on subnet A + input := erc20tokenhome.SendTokensInput{ + DestinationBlockchainID: subnetAInfo.BlockchainID, + DestinationTokenTransferrerAddress: erc20TokenRemoteAddress, + Recipient: recipientAddress, + PrimaryFeeTokenAddress: exampleERC20Address, + PrimaryFee: big.NewInt(1e18), + SecondaryFee: big.NewInt(0), + RequiredGasLimit: utils.DefaultERC20RequiredGas, + } + amount := new(big.Int).Mul(big.NewInt(1e18), big.NewInt(13)) + + receipt, transferredAmount := utils.SendERC20TokenHome( + ctx, + cChainInfo, + erc20TokenHome, + erc20TokenHomeAddress, + exampleERC20, + input, + amount, + fundedKey, + ) + + // Relay the message to Subnet A and check for message delivery + receipt = teleporter.RelayTeleporterMessage( + ctx, + receipt, + cChainInfo, + subnetAInfo, + true, + fundedKey, + ) + + utils.CheckERC20TokenRemoteWithdrawal( + ctx, + erc20TokenRemote, + receipt, + recipientAddress, + transferredAmount, + ) + + // Check that the recipient received the tokens + balance, err := erc20TokenRemote.BalanceOf(&bind.CallOpts{}, recipientAddress) + Expect(err).Should(BeNil()) + Expect(balance).Should(Equal(transferredAmount)) + + // Transfer back to home chain + // Fund recipient with gas tokens on subnet A + utils.SendNativeTransfer( + ctx, + subnetAInfo, + fundedKey, + recipientAddress, + big.NewInt(1e18), + ) + inputB := erc20tokenremote.SendTokensInput{ + DestinationBlockchainID: cChainInfo.BlockchainID, + DestinationTokenTransferrerAddress: erc20TokenHomeAddress, + Recipient: recipientAddress, + PrimaryFeeTokenAddress: erc20TokenRemoteAddress, + PrimaryFee: big.NewInt(1e10), + SecondaryFee: big.NewInt(0), + RequiredGasLimit: utils.DefaultERC20RequiredGas, + } + + receipt, transferredAmount = utils.SendERC20TokenRemote( + ctx, + subnetAInfo, + erc20TokenRemote, + erc20TokenRemoteAddress, + inputB, + utils.BigIntSub(transferredAmount, inputB.PrimaryFee), + recipientKey, + ) + + receipt = teleporter.RelayTeleporterMessage( + ctx, + receipt, + subnetAInfo, + cChainInfo, + true, + fundedKey, + ) + + utils.CheckERC20TokenHomeWithdrawal( + ctx, + erc20TokenHomeAddress, + exampleERC20, + receipt, + recipientAddress, + transferredAmount, + ) + + // Check that the recipient received the tokens + balance, err = exampleERC20.BalanceOf(&bind.CallOpts{}, recipientAddress) + Expect(err).Should(BeNil()) + Expect(balance).Should(Equal(transferredAmount)) +} diff --git a/tests/flows/ictt/erc20_home_erc20_remote_multihop.go b/tests/flows/ictt/erc20_home_erc20_remote_multihop.go new file mode 100644 index 000000000..5f3addf52 --- /dev/null +++ b/tests/flows/ictt/erc20_home_erc20_remote_multihop.go @@ -0,0 +1,199 @@ +package ictt + +import ( + "context" + "math/big" + + "github.com/ava-labs/subnet-evm/accounts/abi/bind" + erc20tokenhome "github.com/ava-labs/teleporter/abi-bindings/go/ictt/TokenHome/ERC20TokenHome" + localnetwork "github.com/ava-labs/teleporter/tests/network" + "github.com/ava-labs/teleporter/tests/utils" + "github.com/ethereum/go-ethereum/crypto" + . "github.com/onsi/gomega" +) + +/** + * Deploy a ERC20 token home on the primary network + * Deploys ERC20 token remote to Subnet A and Subnet B + * Transfers C-Chain example ERC20 tokens to Subnet A + * Transfer tokens from Subnet A to Subnet B through multi-hop + * Transfer back tokens from Subnet B to Subnet A through multi-hop + */ +func ERC20TokenHomeERC20TokenRemoteMultiHop(network *localnetwork.LocalNetwork, teleporter utils.TeleporterTestInfo) { + cChainInfo := network.GetPrimaryNetworkInfo() + subnetAInfo, subnetBInfo := network.GetTwoSubnets() + fundedAddress, fundedKey := network.GetFundedAccountInfo() + + ctx := context.Background() + + // Deploy an ExampleERC20 on subnet A as the token to be transferred + exampleERC20Address, exampleERC20 := utils.DeployExampleERC20Decimals( + ctx, + fundedKey, + cChainInfo, + erc20TokenHomeDecimals, + ) + + homeTokenDecimals, err := exampleERC20.Decimals(&bind.CallOpts{}) + Expect(err).Should(BeNil()) + + // Create an ERC20TokenHome for transferring the ERC20 token + erc20TokenHomeAddress, erc20TokenHome := utils.DeployERC20TokenHome( + ctx, + teleporter, + fundedKey, + cChainInfo, + fundedAddress, + exampleERC20Address, + homeTokenDecimals, + ) + + // Token representation on subnets A and B will have same name, symbol, and decimals + tokenName, err := exampleERC20.Name(&bind.CallOpts{}) + Expect(err).Should(BeNil()) + tokenSymbol, err := exampleERC20.Symbol(&bind.CallOpts{}) + Expect(err).Should(BeNil()) + tokenDecimals, err := exampleERC20.Decimals(&bind.CallOpts{}) + Expect(err).Should(BeNil()) + + // Deploy an ERC20TokenRemote tp Subnet A + erc20TokenRemoteAddressA, erc20TokenRemoteA := utils.DeployERC20TokenRemote( + ctx, + teleporter, + fundedKey, + subnetAInfo, + fundedAddress, + cChainInfo.BlockchainID, + erc20TokenHomeAddress, + homeTokenDecimals, + tokenName, + tokenSymbol, + tokenDecimals, + ) + + // Deploy an ERC20TokenRemote for Subnet B + erc20TokenRemoteAddressB, erc20TokenRemoteB := utils.DeployERC20TokenRemote( + ctx, + teleporter, + fundedKey, + subnetBInfo, + fundedAddress, + cChainInfo.BlockchainID, + erc20TokenHomeAddress, + homeTokenDecimals, + tokenName, + tokenSymbol, + tokenDecimals, + ) + + // Register both ERC20TokenRemote instances on the ERC20TokenHome + utils.RegisterERC20TokenRemoteOnHome( + ctx, + teleporter, + cChainInfo, + erc20TokenHomeAddress, + subnetAInfo, + erc20TokenRemoteAddressA, + fundedKey, + ) + utils.RegisterERC20TokenRemoteOnHome( + ctx, + teleporter, + cChainInfo, + erc20TokenHomeAddress, + subnetBInfo, + erc20TokenRemoteAddressB, + fundedKey, + ) + + // Generate new recipient to receive transferred tokens + recipientKey, err := crypto.GenerateKey() + Expect(err).Should(BeNil()) + recipientAddress := crypto.PubkeyToAddress(recipientKey.PublicKey) + + // Send tokens from C-Chain to Subnet A + input := erc20tokenhome.SendTokensInput{ + DestinationBlockchainID: subnetAInfo.BlockchainID, + DestinationTokenTransferrerAddress: erc20TokenRemoteAddressA, + Recipient: recipientAddress, + PrimaryFeeTokenAddress: exampleERC20Address, + PrimaryFee: big.NewInt(1e18), + SecondaryFee: big.NewInt(0), + RequiredGasLimit: utils.DefaultERC20RequiredGas, + } + amount := new(big.Int).Mul(big.NewInt(1e18), big.NewInt(13)) + + receipt, transferredAmount := utils.SendERC20TokenHome( + ctx, + cChainInfo, + erc20TokenHome, + erc20TokenHomeAddress, + exampleERC20, + input, + amount, + fundedKey, + ) + + // Relay the message to subnet A and check for ERC20TokenRemote withdrawal + receipt = teleporter.RelayTeleporterMessage( + ctx, + receipt, + cChainInfo, + subnetAInfo, + true, + fundedKey, + ) + + utils.CheckERC20TokenRemoteWithdrawal( + ctx, + erc20TokenRemoteA, + receipt, + recipientAddress, + transferredAmount, + ) + + // Check that the recipient received the tokens + balance, err := erc20TokenRemoteA.BalanceOf(&bind.CallOpts{}, recipientAddress) + Expect(err).Should(BeNil()) + Expect(balance).Should(Equal(transferredAmount)) + + // Multi-hop transfer to Subnet B + transferredAmount = big.NewInt(0).Div(transferredAmount, big.NewInt(2)) + secondaryFeeAmount := big.NewInt(0).Div(transferredAmount, big.NewInt(4)) + utils.SendERC20TokenMultiHopAndVerify( + ctx, + teleporter, + fundedKey, + recipientKey, + recipientAddress, + subnetAInfo, + erc20TokenRemoteA, + erc20TokenRemoteAddressA, + subnetBInfo, + erc20TokenRemoteB, + erc20TokenRemoteAddressB, + cChainInfo, + transferredAmount, + secondaryFeeAmount, + ) + + // Multi-hop transfer back to Subnet A + transferredAmount = big.NewInt(0).Sub(transferredAmount, secondaryFeeAmount) + secondaryFeeAmount = big.NewInt(0).Div(transferredAmount, big.NewInt(4)) + utils.SendERC20TokenMultiHopAndVerify( + ctx, + teleporter, + fundedKey, + recipientKey, + recipientAddress, + subnetBInfo, + erc20TokenRemoteB, + erc20TokenRemoteAddressB, + subnetAInfo, + erc20TokenRemoteA, + erc20TokenRemoteAddressA, + cChainInfo, + transferredAmount, + secondaryFeeAmount, + ) +} diff --git a/tests/flows/ictt/erc20_home_erc20_remote_send_and_call.go b/tests/flows/ictt/erc20_home_erc20_remote_send_and_call.go new file mode 100644 index 000000000..87971b9c6 --- /dev/null +++ b/tests/flows/ictt/erc20_home_erc20_remote_send_and_call.go @@ -0,0 +1,272 @@ +package ictt + +import ( + "context" + "math/big" + + "github.com/ava-labs/subnet-evm/accounts/abi/bind" + erc20tokenhome "github.com/ava-labs/teleporter/abi-bindings/go/ictt/TokenHome/ERC20TokenHome" + erc20tokenremote "github.com/ava-labs/teleporter/abi-bindings/go/ictt/TokenRemote/ERC20TokenRemote" + localnetwork "github.com/ava-labs/teleporter/tests/network" + "github.com/ava-labs/teleporter/tests/utils" + "github.com/ethereum/go-ethereum/crypto" + . "github.com/onsi/gomega" +) + +/** + * Deploy an ERC20TokenHome on the primary network + * Deploys ERC20TokenRemote to Subnet A + * Transfers C-Chain example ERC20 tokens to Subnet A and calls contract on Subnet A using sendAndCall + * Transfers C-Chain example ERC20 to EOA on Subnet A, and then transfer tokens from Subnet A back + * C-Chain and calls contract on the C-Chain using sendAndCall + */ +func ERC20TokenHomeERC20TokenRemoteSendAndCall( + network *localnetwork.LocalNetwork, + teleporter utils.TeleporterTestInfo, +) { + cChainInfo := network.GetPrimaryNetworkInfo() + subnetAInfo, _ := network.GetTwoSubnets() + fundedAddress, fundedKey := network.GetFundedAccountInfo() + + ctx := context.Background() + + // Deploy an ExampleERC20 on the primary network as the token to be transferred + exampleERC20Address, exampleERC20 := utils.DeployExampleERC20Decimals( + ctx, + fundedKey, + cChainInfo, + erc20TokenHomeDecimals, + ) + + exampleERC20Decimals, err := exampleERC20.Decimals(&bind.CallOpts{}) + Expect(err).Should(BeNil()) + + // Create an ERC20TokenHome for transferring the ERC20 token + erc20TokenHomeAddress, erc20TokenHome := utils.DeployERC20TokenHome( + ctx, + teleporter, + fundedKey, + cChainInfo, + fundedAddress, + exampleERC20Address, + exampleERC20Decimals, + ) + + homeMockERC20SACRAddress, homeMockERC20SACR := utils.DeployMockERC20SendAndCallReceiver( + ctx, + fundedKey, + cChainInfo, + ) + + remoteMockERC20SACRAddress, remoteMockERC20SACR := utils.DeployMockERC20SendAndCallReceiver( + ctx, + fundedKey, + subnetAInfo, + ) + + // Token representation on subnet A will have same name, symbol, and decimals + tokenName, err := exampleERC20.Name(&bind.CallOpts{}) + Expect(err).Should(BeNil()) + tokenSymbol, err := exampleERC20.Symbol(&bind.CallOpts{}) + Expect(err).Should(BeNil()) + tokenDecimals, err := exampleERC20.Decimals(&bind.CallOpts{}) + Expect(err).Should(BeNil()) + + // Deploy an ERC20TokenRemote to Subnet A + erc20TokenRemoteAddress, erc20TokenRemote := utils.DeployERC20TokenRemote( + ctx, + teleporter, + fundedKey, + subnetAInfo, + fundedAddress, + cChainInfo.BlockchainID, + erc20TokenHomeAddress, + exampleERC20Decimals, + tokenName, + tokenSymbol, + tokenDecimals, + ) + + utils.RegisterERC20TokenRemoteOnHome( + ctx, + teleporter, + cChainInfo, + erc20TokenHomeAddress, + subnetAInfo, + erc20TokenRemoteAddress, + fundedKey, + ) + + // Generate new recipient to receive transferred tokens + recipientKey, err := crypto.GenerateKey() + Expect(err).Should(BeNil()) + recipientAddress := crypto.PubkeyToAddress(recipientKey.PublicKey) + + // Generate new recipient to receive transferred tokens + fallbackKey, err := crypto.GenerateKey() + Expect(err).Should(BeNil()) + fallbackAddress := crypto.PubkeyToAddress(fallbackKey.PublicKey) + + amount := big.NewInt(0).Mul(big.NewInt(1e18), big.NewInt(13)) + primaryFee := big.NewInt(1e18) + transferredAmount := utils.BigIntSub(amount, primaryFee) + + // Send tokens from C-Chain to Mock contract on subnet A + { + input := erc20tokenhome.SendAndCallInput{ + DestinationBlockchainID: subnetAInfo.BlockchainID, + DestinationTokenTransferrerAddress: erc20TokenRemoteAddress, + RecipientContract: remoteMockERC20SACRAddress, + RecipientPayload: []byte{1}, + RequiredGasLimit: utils.BigIntMul(big.NewInt(10), utils.DefaultERC20RequiredGas), + RecipientGasLimit: utils.BigIntMul(big.NewInt(5), utils.DefaultERC20RequiredGas), + FallbackRecipient: fallbackAddress, + PrimaryFeeTokenAddress: exampleERC20Address, + PrimaryFee: big.NewInt(1e18), + SecondaryFee: big.NewInt(0), + } + + receipt, transferredAmount := utils.SendAndCallERC20TokenHome( + ctx, + cChainInfo, + erc20TokenHome, + erc20TokenHomeAddress, + exampleERC20, + input, + amount, + fundedKey, + ) + + // Relay the message to Subnet A and check for message delivery + receipt = teleporter.RelayTeleporterMessage( + ctx, + receipt, + cChainInfo, + subnetAInfo, + true, + fundedKey, + ) + + event, err := utils.GetEventFromLogs(receipt.Logs, erc20TokenRemote.ParseCallSucceeded) + Expect(err).Should(BeNil()) + Expect(event.RecipientContract).Should(Equal(input.RecipientContract)) + Expect(event.Amount).Should(Equal(transferredAmount)) + + receiverEvent, err := utils.GetEventFromLogs(receipt.Logs, remoteMockERC20SACR.ParseTokensReceived) + Expect(err).Should(BeNil()) + Expect(receiverEvent.Amount).Should(Equal(transferredAmount)) + Expect(receiverEvent.Payload).Should(Equal(input.RecipientPayload)) + + // Check that the contract received the tokens + balance, err := erc20TokenRemote.BalanceOf(&bind.CallOpts{}, remoteMockERC20SACRAddress) + Expect(err).Should(BeNil()) + Expect(balance).Should(Equal(transferredAmount)) + } + + // Transfer ERC20 tokens to account on subnet A + { + // Send ERC20 tokens from C-Chain to recipient on subnet A + input := erc20tokenhome.SendTokensInput{ + DestinationBlockchainID: subnetAInfo.BlockchainID, + DestinationTokenTransferrerAddress: erc20TokenRemoteAddress, + Recipient: recipientAddress, + PrimaryFeeTokenAddress: exampleERC20Address, + PrimaryFee: big.NewInt(1e18), + SecondaryFee: big.NewInt(0), + RequiredGasLimit: utils.DefaultERC20RequiredGas, + } + + receipt, transferredAmount := utils.SendERC20TokenHome( + ctx, + cChainInfo, + erc20TokenHome, + erc20TokenHomeAddress, + exampleERC20, + input, + amount, + fundedKey, + ) + + // Relay the message to Subnet A and check for message delivery + receipt = teleporter.RelayTeleporterMessage( + ctx, + receipt, + cChainInfo, + subnetAInfo, + true, + fundedKey, + ) + + utils.CheckERC20TokenRemoteWithdrawal( + ctx, + erc20TokenRemote, + receipt, + recipientAddress, + transferredAmount, + ) + + // Check that the recipient received the tokens + balance, err := erc20TokenRemote.BalanceOf(&bind.CallOpts{}, recipientAddress) + Expect(err).Should(BeNil()) + Expect(balance).Should(Equal(transferredAmount)) + } + + // Send tokens to mock contract on C-Chain using sendAndCall + { + // Fund recipient with gas tokens on subnet A + utils.SendNativeTransfer( + ctx, + subnetAInfo, + fundedKey, + recipientAddress, + big.NewInt(1e18), + ) + + inputB := erc20tokenremote.SendAndCallInput{ + DestinationBlockchainID: cChainInfo.BlockchainID, + DestinationTokenTransferrerAddress: erc20TokenHomeAddress, + RecipientContract: homeMockERC20SACRAddress, + RecipientPayload: []byte{1}, + RequiredGasLimit: utils.BigIntMul(big.NewInt(10), utils.DefaultERC20RequiredGas), + RecipientGasLimit: utils.BigIntMul(big.NewInt(5), utils.DefaultERC20RequiredGas), + FallbackRecipient: fallbackAddress, + PrimaryFeeTokenAddress: erc20TokenRemoteAddress, + PrimaryFee: big.NewInt(1e10), + SecondaryFee: big.NewInt(0), + } + + receipt, transferredAmount := utils.SendAndCallERC20TokenRemote( + ctx, + subnetAInfo, + erc20TokenRemote, + erc20TokenRemoteAddress, + inputB, + utils.BigIntSub(transferredAmount, inputB.PrimaryFee), + recipientKey, + ) + + receipt = teleporter.RelayTeleporterMessage( + ctx, + receipt, + subnetAInfo, + cChainInfo, + true, + fundedKey, + ) + + homeEvent, err := utils.GetEventFromLogs(receipt.Logs, erc20TokenHome.ParseCallSucceeded) + Expect(err).Should(BeNil()) + Expect(homeEvent.RecipientContract).Should(Equal(inputB.RecipientContract)) + Expect(homeEvent.Amount).Should(Equal(transferredAmount)) + + receiverEvent, err := utils.GetEventFromLogs(receipt.Logs, homeMockERC20SACR.ParseTokensReceived) + Expect(err).Should(BeNil()) + Expect(receiverEvent.Amount).Should(Equal(transferredAmount)) + Expect(receiverEvent.Payload).Should(Equal(inputB.RecipientPayload)) + + // Check that the recipient received the tokens + balance, err := exampleERC20.BalanceOf(&bind.CallOpts{}, homeMockERC20SACRAddress) + Expect(err).Should(BeNil()) + Expect(balance).Should(Equal(transferredAmount)) + } +} diff --git a/tests/flows/ictt/erc20_home_native_remote.go b/tests/flows/ictt/erc20_home_native_remote.go new file mode 100644 index 000000000..06ad686ae --- /dev/null +++ b/tests/flows/ictt/erc20_home_native_remote.go @@ -0,0 +1,190 @@ +package ictt + +import ( + "context" + "math/big" + + "github.com/ava-labs/subnet-evm/accounts/abi/bind" + erc20tokenhome "github.com/ava-labs/teleporter/abi-bindings/go/ictt/TokenHome/ERC20TokenHome" + nativetokenremote "github.com/ava-labs/teleporter/abi-bindings/go/ictt/TokenRemote/NativeTokenRemote" + localnetwork "github.com/ava-labs/teleporter/tests/network" + "github.com/ava-labs/teleporter/tests/utils" + "github.com/ethereum/go-ethereum/crypto" + . "github.com/onsi/gomega" +) + +var ( + decimalsShift = uint8(1) + tokenMultiplier = utils.GetTokenMultiplier(decimalsShift) + initialReserveImbalance = new(big.Int).Mul(big.NewInt(1e18), big.NewInt(1e6)) + + // These two should be changed together + multiplyOnRemote = true + erc20TokenHomeDecimals = utils.NativeTokenDecimals - decimalsShift + + burnedFeesReportingRewardPercentage = big.NewInt(1) +) + +/** + * Deploy a ERC20Token on the primary network + * Deploys NativeTokenRemote to Subnet A and Subnet B + * Transfers C-Chain example ERC20 tokens to Subnet A as Subnet A's native token + * Transfer back tokens from Subnet A to C-Chain + */ +func ERC20TokenHomeNativeTokenRemote(network *localnetwork.LocalNetwork, teleporter utils.TeleporterTestInfo) { + cChainInfo := network.GetPrimaryNetworkInfo() + subnetAInfo, _ := network.GetTwoSubnets() + fundedAddress, fundedKey := network.GetFundedAccountInfo() + + ctx := context.Background() + + // Deploy an ExampleERC20 on subnet A as the token to be transferred + exampleERC20Address, exampleERC20 := utils.DeployExampleERC20Decimals( + ctx, + fundedKey, + cChainInfo, + erc20TokenHomeDecimals, + ) + + exampleERC20Decimals, err := exampleERC20.Decimals(&bind.CallOpts{}) + Expect(err).Should(BeNil()) + + // Create an ERC20TokenHome for transferring the ERC20 token + erc20TokenHomeAddress, erc20TokenHome := utils.DeployERC20TokenHome( + ctx, + teleporter, + fundedKey, + cChainInfo, + fundedAddress, + exampleERC20Address, + exampleERC20Decimals, + ) + + // Deploy a NativeTokenRemote to Subnet A + nativeTokenRemoteAddressA, nativeTokenRemoteA := utils.DeployNativeTokenRemote( + ctx, + teleporter, + subnetAInfo, + "SUBA", + fundedAddress, + cChainInfo.BlockchainID, + erc20TokenHomeAddress, + exampleERC20Decimals, + initialReserveImbalance, + burnedFeesReportingRewardPercentage, + ) + + collateralAmount := utils.RegisterTokenRemoteOnHome( + ctx, + teleporter, + cChainInfo, + erc20TokenHomeAddress, + subnetAInfo, + nativeTokenRemoteAddressA, + initialReserveImbalance, + utils.GetTokenMultiplier(decimalsShift), + multiplyOnRemote, + fundedKey, + ) + + utils.AddCollateralToERC20TokenHome( + ctx, + cChainInfo, + erc20TokenHome, + erc20TokenHomeAddress, + exampleERC20, + subnetAInfo.BlockchainID, + nativeTokenRemoteAddressA, + collateralAmount, + fundedKey, + ) + + // Generate new recipient to receive transferred tokens + recipientKey, err := crypto.GenerateKey() + recipientKey.ECDH() + Expect(err).Should(BeNil()) + recipientAddress := crypto.PubkeyToAddress(recipientKey.PublicKey) + + // Send tokens from C-Chain to Subnet A + input := erc20tokenhome.SendTokensInput{ + DestinationBlockchainID: subnetAInfo.BlockchainID, + DestinationTokenTransferrerAddress: nativeTokenRemoteAddressA, + Recipient: recipientAddress, + PrimaryFeeTokenAddress: exampleERC20Address, + PrimaryFee: big.NewInt(1e18), + SecondaryFee: big.NewInt(0), + RequiredGasLimit: utils.DefaultNativeTokenRequiredGas, + } + + amount := big.NewInt(0).Mul(big.NewInt(1e18), big.NewInt(10)) + receipt, transferredAmount := utils.SendERC20TokenHome( + ctx, + cChainInfo, + erc20TokenHome, + erc20TokenHomeAddress, + exampleERC20, + input, + amount, + fundedKey, + ) + + // Relay the message to subnet A and check for a native token mint withdrawal + teleporter.RelayTeleporterMessage( + ctx, + receipt, + cChainInfo, + subnetAInfo, + true, + fundedKey, + ) + + // Verify the recipient received the tokens + utils.CheckBalance(ctx, recipientAddress, transferredAmount, subnetAInfo.RPCClient) + + // Send back to the home chain and check that ERC20TokenHome received the tokens + input_A := nativetokenremote.SendTokensInput{ + DestinationBlockchainID: cChainInfo.BlockchainID, + DestinationTokenTransferrerAddress: erc20TokenHomeAddress, + Recipient: recipientAddress, + PrimaryFeeTokenAddress: nativeTokenRemoteAddressA, + PrimaryFee: big.NewInt(1e10), + SecondaryFee: big.NewInt(0), + RequiredGasLimit: utils.DefaultNativeTokenRequiredGas, + } + // Send half of the received amount to account for gas expenses + amountToSendA := new(big.Int).Div(transferredAmount, big.NewInt(2)) + receipt, transferredAmount = utils.SendNativeTokenRemote( + ctx, + subnetAInfo, + nativeTokenRemoteA, + nativeTokenRemoteAddressA, + input_A, + amountToSendA, + recipientKey, + ) + + receipt = teleporter.RelayTeleporterMessage( + ctx, + receipt, + subnetAInfo, + cChainInfo, + true, + fundedKey, + ) + + // Check that the recipient received the tokens + scaledAmount := utils.RemoveTokenScaling(tokenMultiplier, multiplyOnRemote, transferredAmount) + utils.CheckERC20TokenHomeWithdrawal( + ctx, + erc20TokenHomeAddress, + exampleERC20, + receipt, + recipientAddress, + scaledAmount, + ) + + // Check that the recipient received the tokens + balance, err := exampleERC20.BalanceOf(&bind.CallOpts{}, recipientAddress) + Expect(err).Should(BeNil()) + Expect(balance).Should(Equal(scaledAmount)) +} diff --git a/tests/flows/ictt/erc20_home_native_remote_multihop.go b/tests/flows/ictt/erc20_home_native_remote_multihop.go new file mode 100644 index 000000000..33d38d6b5 --- /dev/null +++ b/tests/flows/ictt/erc20_home_native_remote_multihop.go @@ -0,0 +1,248 @@ +package ictt + +import ( + "context" + "math/big" + + "github.com/ava-labs/subnet-evm/accounts/abi/bind" + erc20tokenhome "github.com/ava-labs/teleporter/abi-bindings/go/ictt/TokenHome/ERC20TokenHome" + localnetwork "github.com/ava-labs/teleporter/tests/network" + "github.com/ava-labs/teleporter/tests/utils" + "github.com/ethereum/go-ethereum/crypto" + . "github.com/onsi/gomega" +) + +/* +* + - Deploy a ERC20TokenHome on the primary network + - Deploys NativeTokenRemote to Subnet A and Subnet B + - Transfers C-Chain example ERC20 tokens to Subnet A as Subnet A's native token + - Transfers C-Chain example ERC20 tokens to Subnet B as Subnet B's native token + to collateralize the token transferrer on Subnet B + - Transfer tokens from Subnet A to Subnet B through multi-hop + - Transfer back tokens from Subnet B to Subnet A through multi-hop +*/ +func ERC20TokenHomeNativeTokenRemoteMultiHop(network *localnetwork.LocalNetwork, teleporter utils.TeleporterTestInfo) { + cChainInfo := network.GetPrimaryNetworkInfo() + subnetAInfo, subnetBInfo := network.GetTwoSubnets() + fundedAddress, fundedKey := network.GetFundedAccountInfo() + + ctx := context.Background() + + // Deploy an ExampleERC20 on subnet A as the token to be transferred + exampleERC20Address, exampleERC20 := utils.DeployExampleERC20Decimals( + ctx, + fundedKey, + cChainInfo, + erc20TokenHomeDecimals, + ) + + exampleERC20Decimals, err := exampleERC20.Decimals(&bind.CallOpts{}) + Expect(err).Should(BeNil()) + + erc20TokenHomeAddress, erc20TokenHome := utils.DeployERC20TokenHome( + ctx, + teleporter, + fundedKey, + cChainInfo, + fundedAddress, + exampleERC20Address, + exampleERC20Decimals, + ) + + // Deploy a NativeTokenRemote to Subnet A + nativeTokenRemoteAddressA, nativeTokenRemoteA := utils.DeployNativeTokenRemote( + ctx, + teleporter, + subnetAInfo, + "SUBA", + fundedAddress, + cChainInfo.BlockchainID, + erc20TokenHomeAddress, + exampleERC20Decimals, + initialReserveImbalance, + burnedFeesReportingRewardPercentage, + ) + + // Deploy a NativeTokenRemote to Subnet B + nativeTokenRemoteAddressB, nativeTokenRemoteB := utils.DeployNativeTokenRemote( + ctx, + teleporter, + subnetBInfo, + "SUBB", + fundedAddress, + cChainInfo.BlockchainID, + erc20TokenHomeAddress, + exampleERC20Decimals, + initialReserveImbalance, + burnedFeesReportingRewardPercentage, + ) + + // Register both NativeTokenDestinations on the ERC20TokenHome + collateralAmountA := utils.RegisterTokenRemoteOnHome( + ctx, + teleporter, + cChainInfo, + erc20TokenHomeAddress, + subnetAInfo, + nativeTokenRemoteAddressA, + initialReserveImbalance, + utils.GetTokenMultiplier(decimalsShift), + multiplyOnRemote, + fundedKey, + ) + + collateralAmountB := utils.RegisterTokenRemoteOnHome( + ctx, + teleporter, + cChainInfo, + erc20TokenHomeAddress, + subnetBInfo, + nativeTokenRemoteAddressB, + initialReserveImbalance, + utils.GetTokenMultiplier(decimalsShift), + multiplyOnRemote, + fundedKey, + ) + + // Add collateral for both NativeTokenDestinations + utils.AddCollateralToERC20TokenHome( + ctx, + cChainInfo, + erc20TokenHome, + erc20TokenHomeAddress, + exampleERC20, + subnetAInfo.BlockchainID, + nativeTokenRemoteAddressA, + collateralAmountA, + fundedKey, + ) + + utils.AddCollateralToERC20TokenHome( + ctx, + cChainInfo, + erc20TokenHome, + erc20TokenHomeAddress, + exampleERC20, + subnetBInfo.BlockchainID, + nativeTokenRemoteAddressB, + collateralAmountB, + fundedKey, + ) + + // Generate new recipient to receive transferred tokens + recipientKey, err := crypto.GenerateKey() + Expect(err).Should(BeNil()) + recipientAddress := crypto.PubkeyToAddress(recipientKey.PublicKey) + + // These are set during the initial transferring, and used in the multi-hop transfers + amount := big.NewInt(0).Mul(big.NewInt(1e18), big.NewInt(10)) + + // Send tokens from C-Chain to Subnet A + inputA := erc20tokenhome.SendTokensInput{ + DestinationBlockchainID: subnetAInfo.BlockchainID, + DestinationTokenTransferrerAddress: nativeTokenRemoteAddressA, + Recipient: recipientAddress, + PrimaryFeeTokenAddress: exampleERC20Address, + PrimaryFee: big.NewInt(1e18), + SecondaryFee: big.NewInt(0), + RequiredGasLimit: utils.DefaultNativeTokenRequiredGas, + } + + receipt, transferredAmountA := utils.SendERC20TokenHome( + ctx, + cChainInfo, + erc20TokenHome, + erc20TokenHomeAddress, + exampleERC20, + inputA, + amount, + fundedKey, + ) + + // Relay the message to subnet A and check for a native token mint withdrawal + teleporter.RelayTeleporterMessage( + ctx, + receipt, + cChainInfo, + subnetAInfo, + true, + fundedKey, + ) + + // Verify the recipient received the tokens + utils.CheckBalance(ctx, recipientAddress, transferredAmountA, subnetAInfo.RPCClient) + + // Send tokens from C-Chain to Subnet B + inputB := erc20tokenhome.SendTokensInput{ + DestinationBlockchainID: subnetBInfo.BlockchainID, + DestinationTokenTransferrerAddress: nativeTokenRemoteAddressB, + Recipient: recipientAddress, + PrimaryFeeTokenAddress: exampleERC20Address, + PrimaryFee: big.NewInt(1e18), + SecondaryFee: big.NewInt(0), + RequiredGasLimit: utils.DefaultNativeTokenRequiredGas, + } + + receipt, transferredAmountB := utils.SendERC20TokenHome( + ctx, + cChainInfo, + erc20TokenHome, + erc20TokenHomeAddress, + exampleERC20, + inputB, + amount, + fundedKey, + ) + + // Relay the message to subnet B and check for a native token mint withdrawal + teleporter.RelayTeleporterMessage( + ctx, + receipt, + cChainInfo, + subnetBInfo, + true, + fundedKey, + ) + + // Verify the recipient received the tokens + utils.CheckBalance(ctx, recipientAddress, transferredAmountB, subnetBInfo.RPCClient) + + // Multi-hop transfer to Subnet B + // Send half of the received amount to account for gas expenses + amountToSend := new(big.Int).Div(transferredAmountA, big.NewInt(2)) + + utils.SendNativeMultiHopAndVerify( + ctx, + teleporter, + fundedKey, + recipientAddress, + subnetAInfo, + nativeTokenRemoteA, + nativeTokenRemoteAddressA, + subnetBInfo, + nativeTokenRemoteB, + nativeTokenRemoteAddressB, + cChainInfo, + amountToSend, + big.NewInt(0), + ) + + // Multi-hop transfer back to Subnet A + secondaryFeeAmount := new(big.Int).Div(amountToSend, big.NewInt(4)) + utils.SendNativeMultiHopAndVerify( + ctx, + teleporter, + fundedKey, + recipientAddress, + subnetBInfo, + nativeTokenRemoteB, + nativeTokenRemoteAddressB, + subnetAInfo, + nativeTokenRemoteA, + nativeTokenRemoteAddressA, + cChainInfo, + amountToSend, + secondaryFeeAmount, + ) +} diff --git a/tests/flows/ictt/errors.go b/tests/flows/ictt/errors.go new file mode 100644 index 000000000..125fbfeb6 --- /dev/null +++ b/tests/flows/ictt/errors.go @@ -0,0 +1,6 @@ +package ictt + +const ( + ErrRemoteNotRegistered = "remote not registered" + ErrNonZeroCollateralNeeded = "collateral needed for remote" +) diff --git a/tests/flows/ictt/native_home_erc20_remote.go b/tests/flows/ictt/native_home_erc20_remote.go new file mode 100644 index 000000000..5bf88611c --- /dev/null +++ b/tests/flows/ictt/native_home_erc20_remote.go @@ -0,0 +1,180 @@ +package ictt + +import ( + "context" + "math/big" + + "github.com/ava-labs/subnet-evm/accounts/abi/bind" + nativetokenhome "github.com/ava-labs/teleporter/abi-bindings/go/ictt/TokenHome/NativeTokenHome" + erc20tokenremote "github.com/ava-labs/teleporter/abi-bindings/go/ictt/TokenRemote/ERC20TokenRemote" + localnetwork "github.com/ava-labs/teleporter/tests/network" + "github.com/ava-labs/teleporter/tests/utils" + "github.com/ethereum/go-ethereum/crypto" + . "github.com/onsi/gomega" +) + +/** + * Deploy a NativeTokenHome on the primary network + * Deploys ERC20TokenRemote to Subnet A + * Transfers C-Chain native tokens to Subnet A + * Transfer back tokens from Subnet A to C-Chain + */ +func NativeTokenHomeERC20TokenRemote(network *localnetwork.LocalNetwork, teleporter utils.TeleporterTestInfo) { + cChainInfo := network.GetPrimaryNetworkInfo() + subnetAInfo, _ := network.GetTwoSubnets() + fundedAddress, fundedKey := network.GetFundedAccountInfo() + + ctx := context.Background() + + // Deploy an example WAVAX on the primary network + wavaxAddress, wavax := utils.DeployWrappedNativeToken( + ctx, + fundedKey, + cChainInfo, + "AVAX", + ) + + // Create a NativeTokenHome for transferring the native token + nativeTokenHomeAddress, nativeTokenHome := utils.DeployNativeTokenHome( + ctx, + teleporter, + fundedKey, + cChainInfo, + fundedAddress, + wavaxAddress, + ) + + // Token representation on subnet A will have same name, symbol, and decimals + tokenName, err := wavax.Name(&bind.CallOpts{}) + Expect(err).Should(BeNil()) + tokenSymbol, err := wavax.Symbol(&bind.CallOpts{}) + Expect(err).Should(BeNil()) + tokenDecimals, err := wavax.Decimals(&bind.CallOpts{}) + Expect(err).Should(BeNil()) + + // Deploy an ERC20TokenRemote to Subnet A + erc20TokenRemoteAddress, erc20TokenRemote := utils.DeployERC20TokenRemote( + ctx, + teleporter, + fundedKey, + subnetAInfo, + fundedAddress, + cChainInfo.BlockchainID, + nativeTokenHomeAddress, + 18, + tokenName, + tokenSymbol, + tokenDecimals, + ) + + utils.RegisterERC20TokenRemoteOnHome( + ctx, + teleporter, + cChainInfo, + nativeTokenHomeAddress, + subnetAInfo, + erc20TokenRemoteAddress, + fundedKey, + ) + + // Generate new recipient to receive transferred tokens + recipientKey, err := crypto.GenerateKey() + Expect(err).Should(BeNil()) + recipientAddress := crypto.PubkeyToAddress(recipientKey.PublicKey) + + // Send tokens from C-Chain to recipient on subnet A + input := nativetokenhome.SendTokensInput{ + DestinationBlockchainID: subnetAInfo.BlockchainID, + DestinationTokenTransferrerAddress: erc20TokenRemoteAddress, + Recipient: recipientAddress, + PrimaryFeeTokenAddress: wavaxAddress, + PrimaryFee: big.NewInt(1e18), + SecondaryFee: big.NewInt(0), + RequiredGasLimit: utils.DefaultERC20RequiredGas, + } + + // Send the tokens and verify expected events + amount := big.NewInt(2e18) + receipt, transferredAmount := utils.SendNativeTokenHome( + ctx, + cChainInfo, + nativeTokenHome, + nativeTokenHomeAddress, + wavax, + input, + amount, + fundedKey, + ) + + // Relay the message to Subnet A and check for message delivery + receipt = teleporter.RelayTeleporterMessage( + ctx, + receipt, + cChainInfo, + subnetAInfo, + true, + fundedKey, + ) + + utils.CheckERC20TokenRemoteWithdrawal( + ctx, + erc20TokenRemote, + receipt, + recipientAddress, + transferredAmount, + ) + + // Check that the recipient received the tokens + balance, err := erc20TokenRemote.BalanceOf(&bind.CallOpts{}, recipientAddress) + Expect(err).Should(BeNil()) + Expect(balance).Should(Equal(transferredAmount)) + + // Fund recipient with gas tokens on subnet A + utils.SendNativeTransfer( + ctx, + subnetAInfo, + fundedKey, + recipientAddress, + big.NewInt(1e18), + ) + inputA := erc20tokenremote.SendTokensInput{ + DestinationBlockchainID: cChainInfo.BlockchainID, + DestinationTokenTransferrerAddress: nativeTokenHomeAddress, + Recipient: recipientAddress, + PrimaryFeeTokenAddress: erc20TokenRemoteAddress, + PrimaryFee: big.NewInt(1e10), + SecondaryFee: big.NewInt(0), + RequiredGasLimit: utils.DefaultNativeTokenRequiredGas, + } + + // Send tokens on Subnet A back for native tokens on C-Chain + receipt, transferredAmount = utils.SendERC20TokenRemote( + ctx, + subnetAInfo, + erc20TokenRemote, + erc20TokenRemoteAddress, + inputA, + utils.BigIntSub(transferredAmount, inputA.PrimaryFee), + recipientKey, + ) + + receipt = teleporter.RelayTeleporterMessage( + ctx, + receipt, + subnetAInfo, + cChainInfo, + true, + fundedKey, + ) + + // Check that the recipient received the tokens + utils.CheckNativeTokenHomeWithdrawal( + ctx, + nativeTokenHomeAddress, + wavax, + receipt, + transferredAmount, + ) + + utils.CheckBalance(ctx, recipientAddress, transferredAmount, cChainInfo.RPCClient) +} diff --git a/tests/flows/ictt/native_home_erc20_remote_multihop.go b/tests/flows/ictt/native_home_erc20_remote_multihop.go new file mode 100644 index 000000000..9b6a8fdd3 --- /dev/null +++ b/tests/flows/ictt/native_home_erc20_remote_multihop.go @@ -0,0 +1,175 @@ +package ictt + +import ( + "context" + "math/big" + + "github.com/ava-labs/subnet-evm/accounts/abi/bind" + nativetokenhome "github.com/ava-labs/teleporter/abi-bindings/go/ictt/TokenHome/NativeTokenHome" + localnetwork "github.com/ava-labs/teleporter/tests/network" + "github.com/ava-labs/teleporter/tests/utils" + "github.com/ethereum/go-ethereum/crypto" + + . "github.com/onsi/gomega" +) + +/** + * Deploy a NativeTokenHome on the primary network + * Deploys ERC20TokenRemote to Subnet A and Subnet B + * Transfers C-Chain native tokens to Subnet A + * Transfer tokens from Subnet A to Subnet B through multi-hop + * Brige back tokens from Subnet B to Subnet A through multi-hop + */ +func NativeTokenHomeERC20TokenRemoteMultiHop(network *localnetwork.LocalNetwork, teleporter utils.TeleporterTestInfo) { + cChainInfo := network.GetPrimaryNetworkInfo() + subnetAInfo, subnetBInfo := network.GetTwoSubnets() + fundedAddress, fundedKey := network.GetFundedAccountInfo() + + ctx := context.Background() + + // Deploy a NativeTokenHome on the primary network + wavaxAddress, wavax := utils.DeployWrappedNativeToken( + ctx, + fundedKey, + cChainInfo, + "AVAX", + ) + nativeTokenHomeAddress, nativeTokenHome := utils.DeployNativeTokenHome( + ctx, + teleporter, + fundedKey, + cChainInfo, + fundedAddress, + wavaxAddress, + ) + + // Token representation on subnet B will have same name, symbol, and decimals + tokenName, err := wavax.Name(&bind.CallOpts{}) + Expect(err).Should(BeNil()) + tokenSymbol, err := wavax.Symbol(&bind.CallOpts{}) + Expect(err).Should(BeNil()) + tokenDecimals, err := wavax.Decimals(&bind.CallOpts{}) + Expect(err).Should(BeNil()) + + // Deploy an ERC20TokenRemote on Subnet A + erc20TokenRemoteAddressA, erc20TokenRemoteA := utils.DeployERC20TokenRemote( + ctx, + teleporter, + fundedKey, + subnetAInfo, + fundedAddress, + cChainInfo.BlockchainID, + nativeTokenHomeAddress, + 18, + tokenName, + tokenSymbol, + tokenDecimals, + ) + + // Deploy an ERC20TokenRemote on Subnet B + erc20TokenRemoteAddressB, erc20TokenRemoteB := utils.DeployERC20TokenRemote( + ctx, + teleporter, + fundedKey, + subnetBInfo, + fundedAddress, + cChainInfo.BlockchainID, + nativeTokenHomeAddress, + 18, + tokenName, + tokenSymbol, + tokenDecimals, + ) + + // Register both ERC20Destinations on the NativeTokenHome + utils.RegisterERC20TokenRemoteOnHome( + ctx, + teleporter, + cChainInfo, + nativeTokenHomeAddress, + subnetAInfo, + erc20TokenRemoteAddressA, + fundedKey, + ) + + utils.RegisterERC20TokenRemoteOnHome( + ctx, + teleporter, + cChainInfo, + nativeTokenHomeAddress, + subnetBInfo, + erc20TokenRemoteAddressB, + fundedKey, + ) + + // Generate new recipient to receive transferred tokens + recipientKey, err := crypto.GenerateKey() + Expect(err).Should(BeNil()) + recipientAddress := crypto.PubkeyToAddress(recipientKey.PublicKey) + + // Send tokens from C-Chain to recipient on subnet A + input := nativetokenhome.SendTokensInput{ + DestinationBlockchainID: subnetAInfo.BlockchainID, + DestinationTokenTransferrerAddress: erc20TokenRemoteAddressA, + Recipient: recipientAddress, + PrimaryFeeTokenAddress: wavaxAddress, + PrimaryFee: big.NewInt(1e10), + SecondaryFee: big.NewInt(0), + RequiredGasLimit: utils.DefaultERC20RequiredGas, + } + + // Send the tokens and verify expected events + amount := big.NewInt(2e18) + receipt, transferredAmount := utils.SendNativeTokenHome( + ctx, + cChainInfo, + nativeTokenHome, + nativeTokenHomeAddress, + wavax, + input, + utils.BigIntSub(amount, input.PrimaryFee), + fundedKey, + ) + + // Relay the message to subnet B and check for message delivery + receipt = teleporter.RelayTeleporterMessage( + ctx, + receipt, + cChainInfo, + subnetAInfo, + true, + fundedKey, + ) + + utils.CheckERC20TokenRemoteWithdrawal( + ctx, + erc20TokenRemoteA, + receipt, + recipientAddress, + transferredAmount, + ) + + // Check that the recipient received the tokens + balance, err := erc20TokenRemoteA.BalanceOf(&bind.CallOpts{}, recipientAddress) + Expect(err).Should(BeNil()) + Expect(balance).Should(Equal(transferredAmount)) + + // Send tokens from subnet A to recipient on subnet B through a multi-hop + secondaryFeeAmount := new(big.Int).Div(transferredAmount, big.NewInt(4)) + utils.SendERC20TokenMultiHopAndVerify( + ctx, + teleporter, + fundedKey, + recipientKey, + recipientAddress, + subnetAInfo, + erc20TokenRemoteA, + erc20TokenRemoteAddressA, + subnetBInfo, + erc20TokenRemoteB, + erc20TokenRemoteAddressB, + cChainInfo, + transferredAmount, + secondaryFeeAmount, + ) +} diff --git a/tests/flows/ictt/native_home_native_remote.go b/tests/flows/ictt/native_home_native_remote.go new file mode 100644 index 000000000..fff3a86ec --- /dev/null +++ b/tests/flows/ictt/native_home_native_remote.go @@ -0,0 +1,177 @@ +package ictt + +import ( + "context" + "math/big" + + nativetokenhome "github.com/ava-labs/teleporter/abi-bindings/go/ictt/TokenHome/NativeTokenHome" + nativetokenremote "github.com/ava-labs/teleporter/abi-bindings/go/ictt/TokenRemote/NativeTokenRemote" + localnetwork "github.com/ava-labs/teleporter/tests/network" + "github.com/ava-labs/teleporter/tests/utils" + "github.com/ethereum/go-ethereum/crypto" + . "github.com/onsi/gomega" +) + +/** + * Deploy a NativeTokenHome on the primary network + * Deploys a NativeTokenRemote to Subnet A + * Transfers C-Chain native tokens to Subnet A + * Transfer back tokens from Subnet A to C-Chain + */ +func NativeTokenHomeNativeDestination(network *localnetwork.LocalNetwork, teleporter utils.TeleporterTestInfo) { + cChainInfo := network.GetPrimaryNetworkInfo() + subnetAInfo, _ := network.GetTwoSubnets() + fundedAddress, fundedKey := network.GetFundedAccountInfo() + + ctx := context.Background() + + // Deploy an example WAVAX on the primary network + cChainWAVAXAddress, wavax := utils.DeployWrappedNativeToken( + ctx, + fundedKey, + cChainInfo, + "AVAX", + ) + + // Create a NativeTokenHome on the primary network + nativeTokenHomeAddress, nativeTokenHome := utils.DeployNativeTokenHome( + ctx, + teleporter, + fundedKey, + cChainInfo, + fundedAddress, + cChainWAVAXAddress, + ) + + // Deploy a NativeTokenRemote to Subnet A + nativeTokenRemoteAddress, nativeTokenRemote := utils.DeployNativeTokenRemote( + ctx, + teleporter, + subnetAInfo, + "SUBA", + fundedAddress, + cChainInfo.BlockchainID, + nativeTokenHomeAddress, + 18, + initialReserveImbalance, + burnedFeesReportingRewardPercentage, + ) + + // Register the NativeTokenRemote on the NativeTokenHome + collateralAmount := utils.RegisterTokenRemoteOnHome( + ctx, + teleporter, + cChainInfo, + nativeTokenHomeAddress, + subnetAInfo, + nativeTokenRemoteAddress, + initialReserveImbalance, + big.NewInt(1), + multiplyOnRemote, + fundedKey, + ) + + utils.AddCollateralToNativeTokenHome( + ctx, + cChainInfo, + nativeTokenHome, + nativeTokenHomeAddress, + subnetAInfo.BlockchainID, + nativeTokenRemoteAddress, + collateralAmount, + fundedKey, + ) + + // Generate new recipient to receive transferred tokens + recipientKey, err := crypto.GenerateKey() + Expect(err).Should(BeNil()) + recipientAddress := crypto.PubkeyToAddress(recipientKey.PublicKey) + + // Send tokens from C-Chain to recipient on subnet A that fully collateralize token transferrer with leftover tokens. + amount := new(big.Int).Mul(big.NewInt(1e18), big.NewInt(13)) + { + input := nativetokenhome.SendTokensInput{ + DestinationBlockchainID: subnetAInfo.BlockchainID, + DestinationTokenTransferrerAddress: nativeTokenRemoteAddress, + Recipient: recipientAddress, + PrimaryFeeTokenAddress: cChainWAVAXAddress, + PrimaryFee: big.NewInt(1e18), + SecondaryFee: big.NewInt(0), + RequiredGasLimit: utils.DefaultNativeTokenRequiredGas, + } + + // Send initialReserveImbalance tokens to fully collateralize token transferrer and mint the remainder. + receipt, _ := utils.SendNativeTokenHome( + ctx, + cChainInfo, + nativeTokenHome, + nativeTokenHomeAddress, + wavax, + input, + amount, + fundedKey, + ) + + teleporter.RelayTeleporterMessage( + ctx, + receipt, + cChainInfo, + subnetAInfo, + true, + fundedKey, + ) + + utils.CheckBalance( + ctx, + recipientAddress, + amount, + subnetAInfo.RPCClient, + ) + } + + // Send tokens on Subnet A back for native tokens on C-Chain + { + input_A := nativetokenremote.SendTokensInput{ + DestinationBlockchainID: cChainInfo.BlockchainID, + DestinationTokenTransferrerAddress: nativeTokenHomeAddress, + Recipient: recipientAddress, + PrimaryFeeTokenAddress: nativeTokenRemoteAddress, + PrimaryFee: big.NewInt(1e18), + SecondaryFee: big.NewInt(0), + RequiredGasLimit: utils.DefaultNativeTokenRequiredGas, + } + + // Send half of the tokens back to C-Chain + amount := big.NewInt(0).Div(amount, big.NewInt(2)) + receipt, transferredAmount := utils.SendNativeTokenRemote( + ctx, + subnetAInfo, + nativeTokenRemote, + nativeTokenRemoteAddress, + input_A, + amount, + recipientKey, + ) + + receipt = teleporter.RelayTeleporterMessage( + ctx, + receipt, + subnetAInfo, + cChainInfo, + true, + fundedKey, + ) + + // Check that the recipient received the tokens + homeAmount := transferredAmount + utils.CheckNativeTokenHomeWithdrawal( + ctx, + nativeTokenHomeAddress, + wavax, + receipt, + homeAmount, + ) + + utils.CheckBalance(ctx, recipientAddress, homeAmount, cChainInfo.RPCClient) + } +} diff --git a/tests/flows/ictt/native_home_native_remote_multihop.go b/tests/flows/ictt/native_home_native_remote_multihop.go new file mode 100644 index 000000000..4866a2af4 --- /dev/null +++ b/tests/flows/ictt/native_home_native_remote_multihop.go @@ -0,0 +1,246 @@ +package ictt + +import ( + "context" + "math/big" + + nativetokenhome "github.com/ava-labs/teleporter/abi-bindings/go/ictt/TokenHome/NativeTokenHome" + localnetwork "github.com/ava-labs/teleporter/tests/network" + "github.com/ava-labs/teleporter/tests/utils" + "github.com/ethereum/go-ethereum/crypto" + . "github.com/onsi/gomega" +) + +/* +* + - Deploy a NativeTokenHome on the primary network + - Deploys NativeTokenRemote to Subnet A and Subnet B + - Transfers native tokens from the C-Chain to Subnet A as Subnet A's native token + - Transfers native tokens from the C-Chain to Subnet B as Subnet B's native token + to collateralize the Subnet B token transferrer + - Transfer tokens from Subnet A to Subnet B through multi-hop + - Transfer back tokens from Subnet B to Subnet A through multi-hop +*/ +func NativeTokenHomeNativeTokenRemoteMultiHop(network *localnetwork.LocalNetwork, teleporter utils.TeleporterTestInfo) { + cChainInfo := network.GetPrimaryNetworkInfo() + subnetAInfo, subnetBInfo := network.GetTwoSubnets() + fundedAddress, fundedKey := network.GetFundedAccountInfo() + + ctx := context.Background() + + // decimalsShift is always 0 for native to native + decimalsShift := uint8(0) + + // Deploy an example WAVAX on the primary network + wavaxAddress, wavax := utils.DeployWrappedNativeToken( + ctx, + fundedKey, + cChainInfo, + "AVAX", + ) + + // Create a NativeTokenHome on the primary network + nativeTokenHomeAddress, nativeTokenHome := utils.DeployNativeTokenHome( + ctx, + teleporter, + fundedKey, + cChainInfo, + fundedAddress, + wavaxAddress, + ) + + // Deploy a NativeTokenRemote to Subnet A + nativeTokenRemoteAddressA, nativeTokenRemoteA := utils.DeployNativeTokenRemote( + ctx, + teleporter, + subnetAInfo, + "SUBA", + fundedAddress, + cChainInfo.BlockchainID, + nativeTokenHomeAddress, + utils.NativeTokenDecimals, + initialReserveImbalance, + burnedFeesReportingRewardPercentage, + ) + + // Deploy a NativeTokenRemote to Subnet B + nativeTokenRemoteAddressB, nativeTokenRemoteB := utils.DeployNativeTokenRemote( + ctx, + teleporter, + subnetBInfo, + "SUBB", + fundedAddress, + cChainInfo.BlockchainID, + nativeTokenHomeAddress, + utils.NativeTokenDecimals, + initialReserveImbalance, + burnedFeesReportingRewardPercentage, + ) + + // Register both NativeTokenDestinations on the NativeTokenHome + collateralAmountA := utils.RegisterTokenRemoteOnHome( + ctx, + teleporter, + cChainInfo, + nativeTokenHomeAddress, + subnetAInfo, + nativeTokenRemoteAddressA, + initialReserveImbalance, + utils.GetTokenMultiplier(decimalsShift), + multiplyOnRemote, + fundedKey, + ) + + collateralAmountB := utils.RegisterTokenRemoteOnHome( + ctx, + teleporter, + cChainInfo, + nativeTokenHomeAddress, + subnetBInfo, + nativeTokenRemoteAddressB, + initialReserveImbalance, + utils.GetTokenMultiplier(decimalsShift), + multiplyOnRemote, + fundedKey, + ) + + // Add collateral for both NativeTokenDestinations + utils.AddCollateralToNativeTokenHome( + ctx, + cChainInfo, + nativeTokenHome, + nativeTokenHomeAddress, + subnetAInfo.BlockchainID, + nativeTokenRemoteAddressA, + collateralAmountA, + fundedKey, + ) + + utils.AddCollateralToNativeTokenHome( + ctx, + cChainInfo, + nativeTokenHome, + nativeTokenHomeAddress, + subnetBInfo.BlockchainID, + nativeTokenRemoteAddressB, + collateralAmountB, + fundedKey, + ) + + // Generate new recipient to receive transferred tokens + recipientKey, err := crypto.GenerateKey() + Expect(err).Should(BeNil()) + recipientAddress := crypto.PubkeyToAddress(recipientKey.PublicKey) + + amount := big.NewInt(0).Mul(big.NewInt(1e18), big.NewInt(10)) + + // Send tokens from C-Chain to Subnet A + inputA := nativetokenhome.SendTokensInput{ + DestinationBlockchainID: subnetAInfo.BlockchainID, + DestinationTokenTransferrerAddress: nativeTokenRemoteAddressA, + Recipient: recipientAddress, + PrimaryFeeTokenAddress: wavaxAddress, + PrimaryFee: big.NewInt(1e18), + SecondaryFee: big.NewInt(0), + RequiredGasLimit: utils.DefaultNativeTokenRequiredGas, + } + + receipt, transferredAmountA := utils.SendNativeTokenHome( + ctx, + cChainInfo, + nativeTokenHome, + nativeTokenHomeAddress, + wavax, + inputA, + amount, + fundedKey, + ) + + // Relay the message to subnet A and check for a native token mint withdrawal + teleporter.RelayTeleporterMessage( + ctx, + receipt, + cChainInfo, + subnetAInfo, + true, + fundedKey, + ) + + // Verify the recipient received the tokens + utils.CheckBalance(ctx, recipientAddress, transferredAmountA, subnetAInfo.RPCClient) + + // Send tokens from C-Chain to Subnet B + inputB := nativetokenhome.SendTokensInput{ + DestinationBlockchainID: subnetBInfo.BlockchainID, + DestinationTokenTransferrerAddress: nativeTokenRemoteAddressB, + Recipient: recipientAddress, + PrimaryFeeTokenAddress: wavaxAddress, + PrimaryFee: big.NewInt(1e18), + SecondaryFee: big.NewInt(0), + RequiredGasLimit: utils.DefaultNativeTokenRequiredGas, + } + receipt, transferredAmountB := utils.SendNativeTokenHome( + ctx, + cChainInfo, + nativeTokenHome, + nativeTokenHomeAddress, + wavax, + inputB, + amount, + fundedKey, + ) + + // Relay the message to subnet B and check for a native token mint withdrawal + teleporter.RelayTeleporterMessage( + ctx, + receipt, + cChainInfo, + subnetBInfo, + true, + fundedKey, + ) + + // Verify the recipient received the tokens + utils.CheckBalance(ctx, recipientAddress, transferredAmountB, subnetBInfo.RPCClient) + + // Multi-hop transfer to Subnet B + // Send half of the received amount to account for gas expenses + amountToSendA := new(big.Int).Div(transferredAmountA, big.NewInt(2)) + + utils.SendNativeMultiHopAndVerify( + ctx, + teleporter, + fundedKey, + recipientAddress, + subnetAInfo, + nativeTokenRemoteA, + nativeTokenRemoteAddressA, + subnetBInfo, + nativeTokenRemoteB, + nativeTokenRemoteAddressB, + cChainInfo, + amountToSendA, + big.NewInt(0), + ) + + // Again, send half of the received amount to account for gas expenses + amountToSendB := new(big.Int).Div(amountToSendA, big.NewInt(2)) + secondaryFeeAmount := new(big.Int).Div(amountToSendB, big.NewInt(4)) + + // Multi-hop transfer back to Subnet A + utils.SendNativeMultiHopAndVerify( + ctx, + teleporter, + fundedKey, + recipientAddress, + subnetBInfo, + nativeTokenRemoteB, + nativeTokenRemoteAddressB, + subnetAInfo, + nativeTokenRemoteA, + nativeTokenRemoteAddressA, + cChainInfo, + amountToSendB, + secondaryFeeAmount, + ) +} diff --git a/tests/flows/ictt/registration_and_collateral_check.go b/tests/flows/ictt/registration_and_collateral_check.go new file mode 100644 index 000000000..39f612a0e --- /dev/null +++ b/tests/flows/ictt/registration_and_collateral_check.go @@ -0,0 +1,195 @@ +package ictt + +import ( + "context" + "math/big" + + "github.com/ava-labs/subnet-evm/accounts/abi/bind" + erc20tokenhome "github.com/ava-labs/teleporter/abi-bindings/go/ictt/TokenHome/ERC20TokenHome" + localnetwork "github.com/ava-labs/teleporter/tests/network" + "github.com/ava-labs/teleporter/tests/utils" + "github.com/ethereum/go-ethereum/crypto" + . "github.com/onsi/gomega" +) + +/** + * Deploys an ERC20TokenHome contract on the C-Chain + * Deploys an ERC20TokenRemote contract on Subnet A + * Check sending to unregistered remote fails + * Register the ERC20TokenRemote to home contract + * Check sending to non-collateralized remote fails + * Collateralize the remote + * Check sending to collateralized remote succeeds and withdraws with correct scale. + */ +func RegistrationAndCollateralCheck(network *localnetwork.LocalNetwork, teleporter utils.TeleporterTestInfo) { + cChainInfo := network.GetPrimaryNetworkInfo() + subnetAInfo, _ := network.GetTwoSubnets() + fundedAddress, fundedKey := network.GetFundedAccountInfo() + + ctx := context.Background() + + // Deploy an ExampleERC20 on subnet A as the token to be transferred + exampleERC20Address, exampleERC20 := utils.DeployExampleERC20Decimals( + ctx, + fundedKey, + cChainInfo, + erc20TokenHomeDecimals, + ) + + // Create an ERC20TokenHome for transferring the ERC20 token + erc20TokenHomeAddress, erc20TokenHome := utils.DeployERC20TokenHome( + ctx, + teleporter, + fundedKey, + cChainInfo, + fundedAddress, + exampleERC20Address, + erc20TokenHomeDecimals, + ) + + // Deploy a NativeTokenRemote to Subnet A + nativeTokenRemoteAddressA, _ := utils.DeployNativeTokenRemote( + ctx, + teleporter, + subnetAInfo, + "SUBA", + fundedAddress, + cChainInfo.BlockchainID, + erc20TokenHomeAddress, + erc20TokenHomeDecimals, + initialReserveImbalance, + burnedFeesReportingRewardPercentage, + ) + + // Generate new recipient to receive transferred tokens + recipientKey, err := crypto.GenerateKey() + Expect(err).Should(BeNil()) + recipientAddress := crypto.PubkeyToAddress(recipientKey.PublicKey) + + // Send tokens from C-Chain to Subnet A + input := erc20tokenhome.SendTokensInput{ + DestinationBlockchainID: subnetAInfo.BlockchainID, + DestinationTokenTransferrerAddress: nativeTokenRemoteAddressA, + Recipient: recipientAddress, + PrimaryFeeTokenAddress: exampleERC20Address, + PrimaryFee: big.NewInt(1e18), + SecondaryFee: big.NewInt(0), + RequiredGasLimit: utils.DefaultNativeTokenRequiredGas, + } + + amount := big.NewInt(0).Mul(big.NewInt(1e18), big.NewInt(10)) + + initialBalance, err := exampleERC20.BalanceOf(&bind.CallOpts{}, erc20TokenHomeAddress) + Expect(err).Should(BeNil()) + + // Send the tokens and expect for failure since TokenRemote instance is not registered. + optsA, err := bind.NewKeyedTransactorWithChainID(fundedKey, cChainInfo.EVMChainID) + Expect(err).Should(BeNil()) + _, err = erc20TokenHome.Send( + optsA, + input, + amount, + ) + Expect(err).Should(Not(BeNil())) + Expect(err.Error()).Should(ContainSubstring(ErrRemoteNotRegistered)) + + // Check the balance of the ERC20TokenHome to ensure it was not changed + balance, err := exampleERC20.BalanceOf(&bind.CallOpts{}, erc20TokenHomeAddress) + Expect(err).Should(BeNil()) + utils.ExpectBigEqual(balance, initialBalance) + + // Register the NativeTokenRemote to the ERC20TokenHome + collateralNeeded := utils.RegisterTokenRemoteOnHome( + ctx, + teleporter, + cChainInfo, + erc20TokenHomeAddress, + subnetAInfo, + nativeTokenRemoteAddressA, + initialReserveImbalance, + utils.GetTokenMultiplier(decimalsShift), + multiplyOnRemote, + fundedKey, + ) + + // Try sending again and expect failure since remote is not collateralized + _, err = erc20TokenHome.Send( + optsA, + input, + amount, + ) + Expect(err).Should(Not(BeNil())) + Expect(err.Error()).Should(ContainSubstring(ErrNonZeroCollateralNeeded)) + + // Check the balance of the ERC20TokenHome to ensure it was not changed + balance, err = exampleERC20.BalanceOf(&bind.CallOpts{}, erc20TokenHomeAddress) + Expect(err).Should(BeNil()) + utils.ExpectBigEqual(balance, initialBalance) + + // Add collateral to the ERC20TokenHome + utils.AddCollateralToERC20TokenHome( + ctx, + cChainInfo, + erc20TokenHome, + erc20TokenHomeAddress, + exampleERC20, + subnetAInfo.BlockchainID, + nativeTokenRemoteAddressA, + collateralNeeded, + fundedKey, + ) + + // Check the balance of the ERC20TokenHome to ensure it was increased by the collateral amount. + // Also set the new initial balance before sending tokens + balance, err = exampleERC20.BalanceOf(&bind.CallOpts{}, erc20TokenHomeAddress) + Expect(err).Should(BeNil()) + utils.ExpectBigEqual(balance, initialBalance.Add(initialBalance, collateralNeeded)) + + // Send the tokens and expect success now that collateral is added + utils.ERC20DecimalsApprove( + ctx, + exampleERC20, + erc20TokenHomeAddress, + big.NewInt(0).Add(amount, input.PrimaryFee), + cChainInfo, + fundedKey, + ) + tx, err := erc20TokenHome.Send( + optsA, + input, + amount, + ) + Expect(err).Should(BeNil()) + + receipt := utils.WaitForTransactionSuccess(ctx, cChainInfo, tx.Hash()) + event, err := utils.GetEventFromLogs(receipt.Logs, erc20TokenHome.ParseTokensSent) + Expect(err).Should(BeNil()) + Expect(event.Sender).Should(Equal(crypto.PubkeyToAddress(fundedKey.PublicKey))) + + // Compute the scaled amount + scaledAmount := utils.GetScaledAmountFromERC20TokenHome( + erc20TokenHome, + input.DestinationBlockchainID, + input.DestinationTokenTransferrerAddress, + amount, + ) + utils.ExpectBigEqual(event.Amount, scaledAmount) + + // Check the balance of the ERC20TokenHome increased by the transferred amount + balance, err = exampleERC20.BalanceOf(&bind.CallOpts{}, erc20TokenHomeAddress) + Expect(err).Should(BeNil()) + utils.ExpectBigEqual(balance, big.NewInt(0).Add(initialBalance, amount)) + + // Relay the message to subnet A and check for a native token mint withdrawal + teleporter.RelayTeleporterMessage( + ctx, + receipt, + cChainInfo, + subnetAInfo, + true, + fundedKey, + ) + + // Verify the recipient received the tokens + utils.CheckBalance(ctx, recipientAddress, scaledAmount, subnetAInfo.RPCClient) +} diff --git a/tests/flows/ictt/transparent_proxy_upgradeability.go b/tests/flows/ictt/transparent_proxy_upgradeability.go new file mode 100644 index 000000000..15132f009 --- /dev/null +++ b/tests/flows/ictt/transparent_proxy_upgradeability.go @@ -0,0 +1,225 @@ +package ictt + +import ( + "context" + "math/big" + + "github.com/ava-labs/subnet-evm/accounts/abi/bind" + erc20tokenhome "github.com/ava-labs/teleporter/abi-bindings/go/ictt/TokenHome/ERC20TokenHome" + erc20tokenhomeupgradeable "github.com/ava-labs/teleporter/abi-bindings/go/ictt/TokenHome/ERC20TokenHomeUpgradeable" + erc20tokenremote "github.com/ava-labs/teleporter/abi-bindings/go/ictt/TokenRemote/ERC20TokenRemote" + localnetwork "github.com/ava-labs/teleporter/tests/network" + "github.com/ava-labs/teleporter/tests/utils" + "github.com/ethereum/go-ethereum/crypto" + . "github.com/onsi/gomega" +) + +/** + * Deploy an upgradeable ERC20TokenHome on the primary network + * Deploys a transparent upgradeable proxy that uses the ERC20TokenHome logic contract + * Deploys a proxy admin contract to manage the upgradeable proxy + * Deploy an ERC20TokenRemote to Subnet A + * Transfers example erc20 tokens from the primary network to Subnet A + * Deploy a new ERC20TokenHome logic contract on the primary network + * Upgrade the transparent upgradeable proxy to use the new logic contract + * Transfer tokens from Subnet A back to the primary network + * Check that the transfer was successful, and expected balances are correct + */ + +func TransparentUpgradeableProxy(network *localnetwork.LocalNetwork, teleporter utils.TeleporterTestInfo) { + cChainInfo := network.GetPrimaryNetworkInfo() + subnetAInfo, _ := network.GetTwoSubnets() + fundedAddress, fundedKey := network.GetFundedAccountInfo() + + ctx := context.Background() + + // Deploy an ExampleERC20 on the primary network as the token to be transferred + exampleERC20Address, exampleERC20 := utils.DeployExampleERC20Decimals( + ctx, + fundedKey, + cChainInfo, + erc20TokenHomeDecimals, + ) + + tokenName, err := exampleERC20.Name(&bind.CallOpts{}) + Expect(err).Should(BeNil()) + tokenSymbol, err := exampleERC20.Symbol(&bind.CallOpts{}) + Expect(err).Should(BeNil()) + tokenDecimals, err := exampleERC20.Decimals(&bind.CallOpts{}) + Expect(err).Should(BeNil()) + + opts, err := bind.NewKeyedTransactorWithChainID( + fundedKey, + cChainInfo.EVMChainID, + ) + Expect(err).Should(BeNil()) + implAddress, tx, _, err := erc20tokenhomeupgradeable.DeployERC20TokenHomeUpgradeable( + opts, + cChainInfo.RPCClient, + uint8(1), + ) + Expect(err).Should(BeNil()) + utils.WaitForTransactionSuccess(ctx, cChainInfo, tx.Hash()) + + // Deploy a TransparentUpgradeableProxy contract on primary network for the ERC20TokenHome logic contract + erc20TokenHomeAddress, proxyAdmin, erc20TokenHome := utils.DeployTransparentUpgradeableProxy( + ctx, + cChainInfo, + fundedKey, + implAddress, + erc20tokenhome.NewERC20TokenHome, + ) + + tx, err = erc20TokenHome.Initialize( + opts, + teleporter.TeleporterRegistryAddress(cChainInfo), + fundedAddress, + big.NewInt(1), + exampleERC20Address, + tokenDecimals, + ) + Expect(err).Should(BeNil()) + utils.WaitForTransactionSuccess(ctx, cChainInfo, tx.Hash()) + + // Deploy the ERC20TokenRemote contract on Subnet A + erc20TokenRemoteAddress, erc20TokenRemote := utils.DeployERC20TokenRemote( + ctx, + teleporter, + fundedKey, + subnetAInfo, + fundedAddress, + cChainInfo.BlockchainID, + erc20TokenHomeAddress, + tokenDecimals, + tokenName, + tokenSymbol, + tokenDecimals, + ) + + utils.RegisterERC20TokenRemoteOnHome( + ctx, + teleporter, + cChainInfo, + erc20TokenHomeAddress, + subnetAInfo, + erc20TokenRemoteAddress, + fundedKey, + ) + + // Send a transfer from primary network to Subnet A + // Generate new recipient to receive transferred tokens + recipientKey, err := crypto.GenerateKey() + Expect(err).Should(BeNil()) + recipientAddress := crypto.PubkeyToAddress(recipientKey.PublicKey) + + input := erc20tokenhome.SendTokensInput{ + DestinationBlockchainID: subnetAInfo.BlockchainID, + DestinationTokenTransferrerAddress: erc20TokenRemoteAddress, + Recipient: recipientAddress, + PrimaryFeeTokenAddress: exampleERC20Address, + PrimaryFee: big.NewInt(1e18), + SecondaryFee: big.NewInt(0), + RequiredGasLimit: utils.DefaultERC20RequiredGas, + } + amount := new(big.Int).Mul(big.NewInt(1e18), big.NewInt(13)) + + receipt, transferredAmount := utils.SendERC20TokenHome( + ctx, + cChainInfo, + erc20TokenHome, + erc20TokenHomeAddress, + exampleERC20, + input, + amount, + fundedKey, + ) + + // Check that the transfer was successful, and expected balances are correct + receipt = teleporter.RelayTeleporterMessage( + ctx, + receipt, + cChainInfo, + subnetAInfo, + true, + fundedKey, + ) + + utils.CheckERC20TokenRemoteWithdrawal( + ctx, + erc20TokenRemote, + receipt, + recipientAddress, + transferredAmount, + ) + + // Check that the recipient received the tokens + balance, err := erc20TokenRemote.BalanceOf(&bind.CallOpts{}, recipientAddress) + Expect(err).Should(BeNil()) + Expect(balance).Should(Equal(transferredAmount)) + + // Deploy a new ERC20TokenHome logic contract on primary network + newLogic, tx, _, err := erc20tokenhomeupgradeable.DeployERC20TokenHomeUpgradeable( + opts, + cChainInfo.RPCClient, + uint8(1), + ) + Expect(err).Should(BeNil()) + utils.WaitForTransactionSuccess(ctx, cChainInfo, tx.Hash()) + + // Upgrade the TransparentUpgradeableProxy contract to use the new logic contract + tx, err = proxyAdmin.UpgradeAndCall(opts, erc20TokenHomeAddress, newLogic, []byte{}) + Expect(err).Should(BeNil()) + utils.WaitForTransactionSuccess(ctx, cChainInfo, tx.Hash()) + + // Send a transfer from Subnet A back to primary network + utils.SendNativeTransfer( + ctx, + subnetAInfo, + fundedKey, + recipientAddress, + big.NewInt(1e18), + ) + inputB := erc20tokenremote.SendTokensInput{ + DestinationBlockchainID: cChainInfo.BlockchainID, + DestinationTokenTransferrerAddress: erc20TokenHomeAddress, + Recipient: recipientAddress, + PrimaryFeeTokenAddress: erc20TokenRemoteAddress, + PrimaryFee: big.NewInt(1e10), + SecondaryFee: big.NewInt(0), + RequiredGasLimit: utils.DefaultERC20RequiredGas, + } + + receipt, transferredAmount = utils.SendERC20TokenRemote( + ctx, + subnetAInfo, + erc20TokenRemote, + erc20TokenRemoteAddress, + inputB, + utils.BigIntSub(transferredAmount, inputB.PrimaryFee), + recipientKey, + ) + + receipt = teleporter.RelayTeleporterMessage( + ctx, + receipt, + subnetAInfo, + cChainInfo, + true, + fundedKey, + ) + + // Check that the transfer was successful, and expected balances are correct + utils.CheckERC20TokenHomeWithdrawal( + ctx, + erc20TokenHomeAddress, + exampleERC20, + receipt, + recipientAddress, + transferredAmount, + ) + + // Check that the recipient received the tokens + balance, err = exampleERC20.BalanceOf(&bind.CallOpts{}, recipientAddress) + Expect(err).Should(BeNil()) + Expect(balance).Should(Equal(transferredAmount)) +} diff --git a/tests/flows/teleporter/add_fee_amount.go b/tests/flows/teleporter/add_fee_amount.go index abf6c7932..843b38a83 100644 --- a/tests/flows/teleporter/add_fee_amount.go +++ b/tests/flows/teleporter/add_fee_amount.go @@ -6,15 +6,15 @@ import ( "github.com/ava-labs/subnet-evm/accounts/abi/bind" teleportermessenger "github.com/ava-labs/teleporter/abi-bindings/go/teleporter/TeleporterMessenger" - "github.com/ava-labs/teleporter/tests/interfaces" + localnetwork "github.com/ava-labs/teleporter/tests/network" "github.com/ava-labs/teleporter/tests/utils" "github.com/ethereum/go-ethereum/common" . "github.com/onsi/gomega" ) -func AddFeeAmount(network interfaces.Network, teleporter utils.TeleporterTestInfo) { +func AddFeeAmount(network *localnetwork.LocalNetwork, teleporter utils.TeleporterTestInfo) { subnetAInfo := network.GetPrimaryNetworkInfo() - subnetBInfo, _ := utils.GetTwoSubnets(network) + subnetBInfo, _ := network.GetTwoSubnets() teleporterContractAddress := teleporter.TeleporterMessengerAddress(subnetAInfo) fundedAddress, fundedKey := network.GetFundedAccountInfo() ctx := context.Background() diff --git a/tests/flows/teleporter/basic_send_receive.go b/tests/flows/teleporter/basic_send_receive.go index c75f24a5a..41ae53be2 100644 --- a/tests/flows/teleporter/basic_send_receive.go +++ b/tests/flows/teleporter/basic_send_receive.go @@ -6,16 +6,16 @@ import ( "github.com/ava-labs/subnet-evm/accounts/abi/bind" teleportermessenger "github.com/ava-labs/teleporter/abi-bindings/go/teleporter/TeleporterMessenger" - "github.com/ava-labs/teleporter/tests/interfaces" + localnetwork "github.com/ava-labs/teleporter/tests/network" "github.com/ava-labs/teleporter/tests/utils" "github.com/ethereum/go-ethereum/common" . "github.com/onsi/gomega" ) // Tests basic one-way send from Subnet A to Subnet B and vice versa -func BasicSendReceive(network interfaces.Network, teleporter utils.TeleporterTestInfo) { +func BasicSendReceive(network *localnetwork.LocalNetwork, teleporter utils.TeleporterTestInfo) { subnetAInfo := network.GetPrimaryNetworkInfo() - subnetBInfo, _ := utils.GetTwoSubnets(network) + subnetBInfo, _ := network.GetTwoSubnets() teleporterContractAddress := teleporter.TeleporterMessengerAddress(subnetAInfo) fundedAddress, fundedKey := network.GetFundedAccountInfo() @@ -25,9 +25,7 @@ func BasicSendReceive(network interfaces.Network, teleporter utils.TeleporterTes // Clear the receipt queue from Subnet B -> Subnet A to have a clean slate for the test flow. // This is only done if the test non-external networks because external networks may have // an arbitrarily high number of receipts to be cleared from a given queue from unrelated messages. - if !network.IsExternalNetwork() { - utils.ClearReceiptQueue(ctx, teleporter, subnetBInfo, subnetAInfo, fundedKey) - } + teleporter.ClearReceiptQueue(ctx, fundedKey, subnetBInfo, subnetAInfo) feeAmount := big.NewInt(1) feeTokenAddress, feeToken := utils.DeployExampleERC20( @@ -96,15 +94,10 @@ func BasicSendReceive(network interfaces.Network, teleporter utils.TeleporterTes // Relay the message to the destination deliveryReceipt = teleporter.RelayTeleporterMessage(ctx, receipt, subnetBInfo, subnetAInfo, true, fundedKey) - // Check that the receipt was received for expected Teleporter message ID - // This check is not performed for external networks because the specific receipt for this message - // may not have been included if the receipt queue had an existing build up of more than 5 messages. - if !network.IsExternalNetwork() { - Expect(utils.CheckReceiptReceived( - deliveryReceipt, - expectedReceiptID, - teleporter.TeleporterMessenger(subnetAInfo))).Should(BeTrue()) - } + Expect(utils.CheckReceiptReceived( + deliveryReceipt, + expectedReceiptID, + teleporter.TeleporterMessenger(subnetAInfo))).Should(BeTrue()) // Check Teleporter message received on the destination delivered, err = teleporter.TeleporterMessenger(subnetAInfo).MessageReceived( @@ -114,9 +107,8 @@ func BasicSendReceive(network interfaces.Network, teleporter utils.TeleporterTes Expect(delivered).Should(BeTrue()) // If the reward address of the message from A->B is the funded address, which is able to send - // transactions on subnet A, then redeem the rewards. This check is not performed for external - // networks since the specific receipt may not have been included in the message, as noted above. - if !network.IsExternalNetwork() && receiveEvent.RewardRedeemer == fundedAddress { + // transactions on subnet A, then redeem the rewards. + if receiveEvent.RewardRedeemer == fundedAddress { utils.RedeemRelayerRewardsAndConfirm( ctx, teleporter.TeleporterMessenger(subnetAInfo), subnetAInfo, feeToken, feeTokenAddress, fundedKey, feeAmount, ) diff --git a/tests/flows/teleporter/deliver_to_nonexistent_contract.go b/tests/flows/teleporter/deliver_to_nonexistent_contract.go index e5787f999..9a4f976fc 100644 --- a/tests/flows/teleporter/deliver_to_nonexistent_contract.go +++ b/tests/flows/teleporter/deliver_to_nonexistent_contract.go @@ -6,7 +6,7 @@ import ( "github.com/ava-labs/subnet-evm/accounts/abi/bind" testmessenger "github.com/ava-labs/teleporter/abi-bindings/go/teleporter/tests/TestMessenger" - "github.com/ava-labs/teleporter/tests/interfaces" + localnetwork "github.com/ava-labs/teleporter/tests/network" "github.com/ava-labs/teleporter/tests/utils" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/crypto" @@ -14,9 +14,9 @@ import ( . "github.com/onsi/gomega" ) -func DeliverToNonExistentContract(network interfaces.Network, teleporter utils.TeleporterTestInfo) { +func DeliverToNonExistentContract(network *localnetwork.LocalNetwork, teleporter utils.TeleporterTestInfo) { subnetAInfo := network.GetPrimaryNetworkInfo() - subnetBInfo, _ := utils.GetTwoSubnets(network) + subnetBInfo, _ := network.GetTwoSubnets() fundedAddress, fundedKey := network.GetFundedAccountInfo() deployerKey, err := crypto.GenerateKey() diff --git a/tests/flows/teleporter/deliver_to_wrong_chain.go b/tests/flows/teleporter/deliver_to_wrong_chain.go index 1c87ccdd2..3ce462d69 100644 --- a/tests/flows/teleporter/deliver_to_wrong_chain.go +++ b/tests/flows/teleporter/deliver_to_wrong_chain.go @@ -2,22 +2,20 @@ package teleporter import ( "context" - "crypto/ecdsa" "math/big" "github.com/ava-labs/subnet-evm/accounts/abi/bind" - "github.com/ava-labs/subnet-evm/core/types" teleportermessenger "github.com/ava-labs/teleporter/abi-bindings/go/teleporter/TeleporterMessenger" - "github.com/ava-labs/teleporter/tests/interfaces" + localnetwork "github.com/ava-labs/teleporter/tests/network" "github.com/ava-labs/teleporter/tests/utils" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/log" . "github.com/onsi/gomega" ) -func DeliverToWrongChain(network interfaces.Network, teleporter utils.TeleporterTestInfo) { +func DeliverToWrongChain(network *localnetwork.LocalNetwork, teleporter utils.TeleporterTestInfo) { subnetAInfo := network.GetPrimaryNetworkInfo() - subnetBInfo, subnetCInfo := utils.GetTwoSubnets(network) + subnetBInfo, subnetCInfo := network.GetTwoSubnets() fundedAddress, fundedKey := network.GetFundedAccountInfo() // @@ -59,27 +57,7 @@ func DeliverToWrongChain(network interfaces.Network, teleporter utils.Teleporter fundedKey, ) - if network.SupportsIndependentRelaying() { - // - // Try to relay the message to subnet C, should fail - // - teleporter.RelayTeleporterMessage(ctx, receipt, subnetAInfo, subnetCInfo, false, fundedKey) - } else { - // - // Wait for external relayer to properly deliver the message to subnet B - // - deliveryReceipt := teleporter.RelayTeleporterMessage(ctx, receipt, subnetAInfo, subnetBInfo, true, fundedKey) - deliveryTx, isPending, err := subnetBInfo.RPCClient.TransactionByHash(ctx, deliveryReceipt.TxHash) - Expect(err).Should(BeNil()) - Expect(isPending).Should(BeFalse()) - - // - // Take the successful delivery transaction, and use it to create a transaction that attempts to deliver - // the same message to subnet C. - // - wrongChainDeliveryTx := createWrongChainDeliveryTransaction(ctx, deliveryTx, fundedKey, fundedAddress, subnetCInfo) - utils.SendTransactionAndWaitForFailure(ctx, subnetCInfo, wrongChainDeliveryTx) - } + teleporter.RelayTeleporterMessage(ctx, receipt, subnetAInfo, subnetCInfo, false, fundedKey) // // Check that the message was not received on the Subnet C @@ -90,25 +68,3 @@ func DeliverToWrongChain(network interfaces.Network, teleporter utils.Teleporter Expect(err).Should(BeNil()) Expect(delivered).Should(BeFalse()) } - -func createWrongChainDeliveryTransaction( - ctx context.Context, - deliveryTx *types.Transaction, - fundedKey *ecdsa.PrivateKey, - fundedAddress common.Address, - destination interfaces.SubnetTestInfo, -) *types.Transaction { - gasFeeCap, gasTipCap, nonce := utils.CalculateTxParams(ctx, destination, fundedAddress) - unsignedTx := types.NewTx(&types.DynamicFeeTx{ - ChainID: destination.EVMChainID, - Nonce: nonce, - To: deliveryTx.To(), - Gas: deliveryTx.Gas(), - GasFeeCap: gasFeeCap, - GasTipCap: gasTipCap, - Value: big.NewInt(0), - Data: deliveryTx.Data(), - AccessList: deliveryTx.AccessList(), - }) - return utils.SignTransaction(unsignedTx, fundedKey, destination.EVMChainID) -} diff --git a/tests/flows/teleporter/insufficient_gas.go b/tests/flows/teleporter/insufficient_gas.go index 5af9f4ddb..66bcef13c 100644 --- a/tests/flows/teleporter/insufficient_gas.go +++ b/tests/flows/teleporter/insufficient_gas.go @@ -5,14 +5,14 @@ import ( "math/big" "github.com/ava-labs/subnet-evm/accounts/abi/bind" - "github.com/ava-labs/teleporter/tests/interfaces" + localnetwork "github.com/ava-labs/teleporter/tests/network" "github.com/ava-labs/teleporter/tests/utils" . "github.com/onsi/gomega" ) -func InsufficientGas(network interfaces.Network, teleporter utils.TeleporterTestInfo) { +func InsufficientGas(network *localnetwork.LocalNetwork, teleporter utils.TeleporterTestInfo) { subnetAInfo := network.GetPrimaryNetworkInfo() - subnetBInfo, _ := utils.GetTwoSubnets(network) + subnetBInfo, _ := network.GetTwoSubnets() fundedAddress, fundedKey := network.GetFundedAccountInfo() ctx := context.Background() diff --git a/tests/flows/teleporter/registry/check_upgrade_access.go b/tests/flows/teleporter/registry/check_upgrade_access.go index 027db6017..07d66c2e7 100644 --- a/tests/flows/teleporter/registry/check_upgrade_access.go +++ b/tests/flows/teleporter/registry/check_upgrade_access.go @@ -6,14 +6,14 @@ import ( "github.com/ava-labs/subnet-evm/accounts/abi/bind" "github.com/ava-labs/teleporter/tests/flows" - "github.com/ava-labs/teleporter/tests/interfaces" + localnetwork "github.com/ava-labs/teleporter/tests/network" "github.com/ava-labs/teleporter/tests/utils" "github.com/ethereum/go-ethereum/crypto" . "github.com/onsi/gomega" ) -func CheckUpgradeAccess(network interfaces.Network, teleporter utils.TeleporterTestInfo) { +func CheckUpgradeAccess(network *localnetwork.LocalNetwork, teleporter utils.TeleporterTestInfo) { subnetInfo := network.GetPrimaryNetworkInfo() fundedAddress, fundedKey := network.GetFundedAccountInfo() diff --git a/tests/flows/teleporter/registry/pause_teleporter.go b/tests/flows/teleporter/registry/pause_teleporter.go index 58fd4ded2..4f6fa2763 100644 --- a/tests/flows/teleporter/registry/pause_teleporter.go +++ b/tests/flows/teleporter/registry/pause_teleporter.go @@ -4,14 +4,14 @@ import ( "context" "github.com/ava-labs/subnet-evm/accounts/abi/bind" - "github.com/ava-labs/teleporter/tests/interfaces" + localnetwork "github.com/ava-labs/teleporter/tests/network" "github.com/ava-labs/teleporter/tests/utils" . "github.com/onsi/gomega" ) -func PauseTeleporter(network interfaces.Network, teleporter utils.TeleporterTestInfo) { +func PauseTeleporter(network *localnetwork.LocalNetwork, teleporter utils.TeleporterTestInfo) { subnetAInfo := network.GetPrimaryNetworkInfo() - subnetBInfo, _ := utils.GetTwoSubnets(network) + subnetBInfo, _ := network.GetTwoSubnets() fundedAddress, fundedKey := network.GetFundedAccountInfo() // @@ -51,9 +51,8 @@ func PauseTeleporter(network interfaces.Network, teleporter utils.TeleporterTest Expect(isPaused).Should(BeTrue()) // Send a message from subnet A to subnet B, which should fail - utils.SendExampleCrossChainMessageAndVerify( + teleporter.SendExampleCrossChainMessageAndVerify( ctx, - teleporter, subnetAInfo, testMessengerA, subnetBInfo, @@ -61,7 +60,8 @@ func PauseTeleporter(network interfaces.Network, teleporter utils.TeleporterTest testMessengerB, fundedKey, "message_1", - false) + false, + ) // Unpause Teleporter on subnet B tx, err = testMessengerB.UnpauseTeleporterAddress(opts, teleporterAddress) @@ -77,9 +77,8 @@ func PauseTeleporter(network interfaces.Network, teleporter utils.TeleporterTest Expect(isPaused).Should(BeFalse()) // Send a message from subnet A to subnet B again, which should now succeed - utils.SendExampleCrossChainMessageAndVerify( + teleporter.SendExampleCrossChainMessageAndVerify( ctx, - teleporter, subnetAInfo, testMessengerA, subnetBInfo, @@ -87,5 +86,6 @@ func PauseTeleporter(network interfaces.Network, teleporter utils.TeleporterTest testMessengerB, fundedKey, "message_2", - true) + true, + ) } diff --git a/tests/flows/teleporter/registry/teleporter_registry.go b/tests/flows/teleporter/registry/teleporter_registry.go index a43ae276b..60bfb3431 100644 --- a/tests/flows/teleporter/registry/teleporter_registry.go +++ b/tests/flows/teleporter/registry/teleporter_registry.go @@ -5,7 +5,7 @@ import ( "time" "github.com/ava-labs/subnet-evm/accounts/abi/bind" - "github.com/ava-labs/teleporter/tests/interfaces" + localnetwork "github.com/ava-labs/teleporter/tests/network" "github.com/ava-labs/teleporter/tests/utils" "github.com/ethereum/go-ethereum/common" . "github.com/onsi/gomega" @@ -15,7 +15,7 @@ const ( teleporterByteCodeFile = "./out/TeleporterMessenger.sol/TeleporterMessenger.json" ) -func TeleporterRegistry(network interfaces.LocalNetwork, teleporter utils.TeleporterTestInfo) { +func TeleporterRegistry(network *localnetwork.LocalNetwork, teleporter utils.TeleporterTestInfo) { // Deploy dApp on both chains that use Teleporter Registry // Deploy version 2 of Teleporter to both chains // Construct AddProtocolVersion txs for both chains @@ -28,7 +28,7 @@ func TeleporterRegistry(network interfaces.LocalNetwork, teleporter utils.Telepo // Retry the previously failed message execution, verify message is now able to be delivered to dApp cChainInfo := network.GetPrimaryNetworkInfo() - subnetAInfo, subnetBInfo := utils.GetTwoSubnets(network) + subnetAInfo, subnetBInfo := network.GetTwoSubnets() fundedAddress, fundedKey := network.GetFundedAccountInfo() ctx := context.Background() @@ -52,8 +52,9 @@ func TeleporterRegistry(network interfaces.LocalNetwork, teleporter utils.Telepo // Deploy the new version of Teleporter to both chains var newTeleporterAddress common.Address for _, subnet := range network.GetAllSubnetsInfo() { - newTeleporterAddress = utils.DeployNewTeleporterVersion(ctx, teleporter, subnet, fundedKey, teleporterByteCodeFile) + newTeleporterAddress = teleporter.DeployNewTeleporterVersion(ctx, subnet, fundedKey, teleporterByteCodeFile) } + networkID := network.GetNetworkID() // Create chain config file with off chain message for each chain offchainMessageC, warpEnabledChainConfigC := utils.InitOffChainMessageChainConfig( @@ -91,9 +92,8 @@ func TeleporterRegistry(network interfaces.LocalNetwork, teleporter utils.Telepo network.RestartNodes(restartCtx, nil) // Call addProtocolVersion on subnetB to register the new Teleporter version - utils.AddProtocolVersionAndWaitForAcceptance( + teleporter.AddProtocolVersionAndWaitForAcceptance( ctx, - *teleporter[subnetBInfo.BlockchainID], subnetBInfo, newTeleporterAddress, fundedKey, @@ -102,9 +102,8 @@ func TeleporterRegistry(network interfaces.LocalNetwork, teleporter utils.Telepo // Send a message using old Teleporter version to test messenger using new Teleporter version. // Message should be received successfully since we haven't updated mininum Teleporter version yet. - utils.SendExampleCrossChainMessageAndVerify( + teleporter.SendExampleCrossChainMessageAndVerify( ctx, - teleporter, cChainInfo, testMessengerC, subnetBInfo, @@ -139,9 +138,8 @@ func TeleporterRegistry(network interfaces.LocalNetwork, teleporter utils.Telepo // Send a message using old Teleporter version to test messenger with updated minimum Teleporter version. // Message should fail since we updated minimum Teleporter version. - utils.SendExampleCrossChainMessageAndVerify( + teleporter.SendExampleCrossChainMessageAndVerify( ctx, - teleporter, cChainInfo, testMessengerC, subnetBInfo, @@ -158,9 +156,8 @@ func TeleporterRegistry(network interfaces.LocalNetwork, teleporter utils.Telepo teleporter.InitializeBlockchainID(subnet, fundedKey) } - utils.SendExampleCrossChainMessageAndVerify( + teleporter.SendExampleCrossChainMessageAndVerify( ctx, - teleporter, subnetBInfo, testMessengerB, cChainInfo, @@ -172,9 +169,8 @@ func TeleporterRegistry(network interfaces.LocalNetwork, teleporter utils.Telepo ) // Call addProtocolVersion on subnetA to register the new Teleporter version - utils.AddProtocolVersionAndWaitForAcceptance( + teleporter.AddProtocolVersionAndWaitForAcceptance( ctx, - *teleporter[cChainInfo.BlockchainID], cChainInfo, newTeleporterAddress, fundedKey, @@ -183,9 +179,8 @@ func TeleporterRegistry(network interfaces.LocalNetwork, teleporter utils.Telepo // Send a message from A->B, which previously failed, but now using the new Teleporter version. // Teleporter versions should match, so message should be received successfully. - utils.SendExampleCrossChainMessageAndVerify( + teleporter.SendExampleCrossChainMessageAndVerify( ctx, - teleporter, subnetBInfo, testMessengerB, cChainInfo, @@ -198,9 +193,8 @@ func TeleporterRegistry(network interfaces.LocalNetwork, teleporter utils.Telepo // To make sure all subnets are using the same Teleporter version, call addProtocolVersion on subnetA // to register the new Teleporter version - utils.AddProtocolVersionAndWaitForAcceptance( + teleporter.AddProtocolVersionAndWaitForAcceptance( ctx, - *teleporter[subnetAInfo.BlockchainID], subnetAInfo, newTeleporterAddress, fundedKey, diff --git a/tests/flows/teleporter/relay_message_twice.go b/tests/flows/teleporter/relay_message_twice.go index dc28cc763..791e177b8 100644 --- a/tests/flows/teleporter/relay_message_twice.go +++ b/tests/flows/teleporter/relay_message_twice.go @@ -6,7 +6,7 @@ import ( "github.com/ava-labs/subnet-evm/accounts/abi/bind" teleportermessenger "github.com/ava-labs/teleporter/abi-bindings/go/teleporter/TeleporterMessenger" - "github.com/ava-labs/teleporter/tests/interfaces" + localnetwork "github.com/ava-labs/teleporter/tests/network" "github.com/ava-labs/teleporter/tests/utils" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/log" @@ -14,9 +14,9 @@ import ( . "github.com/onsi/gomega" ) -func RelayMessageTwice(network interfaces.Network, teleporter utils.TeleporterTestInfo) { +func RelayMessageTwice(network *localnetwork.LocalNetwork, teleporter utils.TeleporterTestInfo) { subnetAInfo := network.GetPrimaryNetworkInfo() - subnetBInfo, _ := utils.GetTwoSubnets(network) + subnetBInfo, _ := network.GetTwoSubnets() fundedAddress, fundedKey := network.GetFundedAccountInfo() // diff --git a/tests/flows/teleporter/relayer_modifies_message.go b/tests/flows/teleporter/relayer_modifies_message.go index 32c1385d4..a328593c7 100644 --- a/tests/flows/teleporter/relayer_modifies_message.go +++ b/tests/flows/teleporter/relayer_modifies_message.go @@ -13,6 +13,7 @@ import ( predicateutils "github.com/ava-labs/subnet-evm/predicate" teleportermessenger "github.com/ava-labs/teleporter/abi-bindings/go/teleporter/TeleporterMessenger" "github.com/ava-labs/teleporter/tests/interfaces" + localnetwork "github.com/ava-labs/teleporter/tests/network" "github.com/ava-labs/teleporter/tests/utils" gasUtils "github.com/ava-labs/teleporter/utils/gas-utils" "github.com/ethereum/go-ethereum/common" @@ -22,9 +23,9 @@ import ( ) // Disallow this test from being run on anything but a local network, since it requires special behavior by the relayer -func RelayerModifiesMessage(network interfaces.LocalNetwork, teleporter utils.TeleporterTestInfo) { +func RelayerModifiesMessage(network *localnetwork.LocalNetwork, teleporter utils.TeleporterTestInfo) { subnetAInfo := network.GetPrimaryNetworkInfo() - subnetBInfo, _ := utils.GetTwoSubnets(network) + subnetBInfo, _ := network.GetTwoSubnets() fundedAddress, fundedKey := network.GetFundedAccountInfo() // Send a transaction to Subnet A to issue a Warp Message from the Teleporter contract to Subnet B @@ -53,7 +54,8 @@ func RelayerModifiesMessage(network interfaces.LocalNetwork, teleporter utils.Te receipt, subnetAInfo, subnetBInfo, - network) + network, + ) // Check Teleporter message was not received on the destination delivered, err := teleporter.TeleporterMessenger(subnetBInfo).MessageReceived(&bind.CallOpts{}, messageID) @@ -67,7 +69,7 @@ func relayAlteredMessage( sourceReceipt *types.Receipt, source interfaces.SubnetTestInfo, destination interfaces.SubnetTestInfo, - network interfaces.LocalNetwork, + network *localnetwork.LocalNetwork, ) { // Fetch the Teleporter message from the logs sendEvent, err := utils.GetEventFromLogs( diff --git a/tests/flows/teleporter/resubmit_altered_message.go b/tests/flows/teleporter/resubmit_altered_message.go index dcc47c75f..3df24f170 100644 --- a/tests/flows/teleporter/resubmit_altered_message.go +++ b/tests/flows/teleporter/resubmit_altered_message.go @@ -6,16 +6,16 @@ import ( "github.com/ava-labs/subnet-evm/accounts/abi/bind" teleportermessenger "github.com/ava-labs/teleporter/abi-bindings/go/teleporter/TeleporterMessenger" - "github.com/ava-labs/teleporter/tests/interfaces" + localnetwork "github.com/ava-labs/teleporter/tests/network" "github.com/ava-labs/teleporter/tests/utils" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/log" . "github.com/onsi/gomega" ) -func ResubmitAlteredMessage(network interfaces.Network, teleporter utils.TeleporterTestInfo) { +func ResubmitAlteredMessage(network *localnetwork.LocalNetwork, teleporter utils.TeleporterTestInfo) { subnetAInfo := network.GetPrimaryNetworkInfo() - subnetBInfo, _ := utils.GetTwoSubnets(network) + subnetBInfo, _ := network.GetTwoSubnets() fundedAddress, fundedKey := network.GetFundedAccountInfo() // Send a transaction to Subnet A to issue a Warp Message from the Teleporter contract to Subnet B diff --git a/tests/flows/teleporter/retry_successful_execution.go b/tests/flows/teleporter/retry_successful_execution.go index a90cb5305..23b9a64fe 100644 --- a/tests/flows/teleporter/retry_successful_execution.go +++ b/tests/flows/teleporter/retry_successful_execution.go @@ -6,14 +6,14 @@ import ( "github.com/ava-labs/subnet-evm/accounts/abi/bind" testmessenger "github.com/ava-labs/teleporter/abi-bindings/go/teleporter/tests/TestMessenger" - "github.com/ava-labs/teleporter/tests/interfaces" + localnetwork "github.com/ava-labs/teleporter/tests/network" "github.com/ava-labs/teleporter/tests/utils" . "github.com/onsi/gomega" ) -func RetrySuccessfulExecution(network interfaces.Network, teleporter utils.TeleporterTestInfo) { +func RetrySuccessfulExecution(network *localnetwork.LocalNetwork, teleporter utils.TeleporterTestInfo) { subnetAInfo := network.GetPrimaryNetworkInfo() - subnetBInfo, _ := utils.GetTwoSubnets(network) + subnetBInfo, _ := network.GetTwoSubnets() fundedAddress, fundedKey := network.GetFundedAccountInfo() // @@ -95,6 +95,7 @@ func RetrySuccessfulExecution(network interfaces.Network, teleporter utils.Telep // optsB, err := bind.NewKeyedTransactorWithChainID(fundedKey, subnetBInfo.EVMChainID) Expect(err).Should(BeNil()) + tx, err = teleporter.TeleporterMessenger(subnetBInfo).RetryMessageExecution( optsB, subnetAInfo.BlockchainID, diff --git a/tests/flows/teleporter/send_specific_receipts.go b/tests/flows/teleporter/send_specific_receipts.go index baf958f9c..386aee8e1 100644 --- a/tests/flows/teleporter/send_specific_receipts.go +++ b/tests/flows/teleporter/send_specific_receipts.go @@ -9,6 +9,7 @@ import ( "github.com/ava-labs/subnet-evm/accounts/abi/bind" teleportermessenger "github.com/ava-labs/teleporter/abi-bindings/go/teleporter/TeleporterMessenger" "github.com/ava-labs/teleporter/tests/interfaces" + localnetwork "github.com/ava-labs/teleporter/tests/network" "github.com/ava-labs/teleporter/tests/utils" teleporterutils "github.com/ava-labs/teleporter/utils/teleporter-utils" "github.com/ethereum/go-ethereum/common" @@ -16,19 +17,17 @@ import ( . "github.com/onsi/gomega" ) -func SendSpecificReceipts(network interfaces.Network, teleporter utils.TeleporterTestInfo) { +func SendSpecificReceipts(network *localnetwork.LocalNetwork, teleporter utils.TeleporterTestInfo) { subnetAInfo := network.GetPrimaryNetworkInfo() - subnetBInfo, _ := utils.GetTwoSubnets(network) + subnetBInfo, _ := network.GetTwoSubnets() + subnetATeleporterMessenger := teleporter.TeleporterMessenger(subnetAInfo) + subnetBTeleporterMessenger := teleporter.TeleporterMessenger(subnetBInfo) teleporterContractAddress := teleporter.TeleporterMessengerAddress(subnetAInfo) _, fundedKey := network.GetFundedAccountInfo() ctx := context.Background() // Clear the receipt queue from Subnet B -> Subnet A to have a clean slate for the test flow. - // This is only done if the test non-external networks because external networks may have - // an arbitrarily high number of receipts to be cleared from a given queue from unrelated messages. - if !network.IsExternalNetwork() { - utils.ClearReceiptQueue(ctx, teleporter, subnetBInfo, subnetAInfo, fundedKey) - } + teleporter.ClearReceiptQueue(ctx, fundedKey, subnetBInfo, subnetAInfo) // Use mock token as the fee token mockTokenAddress, mockToken := utils.DeployExampleERC20( @@ -61,7 +60,7 @@ func SendSpecificReceipts(network interfaces.Network, teleporter utils.Teleporte // Send first message from Subnet A to Subnet B with fee amount 5 sendCrossChainMsgReceipt, messageID1 := utils.SendCrossChainMessageAndWaitForAcceptance( - ctx, teleporter.TeleporterMessenger(subnetAInfo), subnetAInfo, subnetBInfo, sendCrossChainMessageInput, fundedKey) + ctx, subnetATeleporterMessenger, subnetAInfo, subnetBInfo, sendCrossChainMessageInput, fundedKey) // Relay the message from SubnetA to SubnetB deliveryReceipt1 := teleporter.RelayTeleporterMessage( @@ -74,18 +73,18 @@ func SendSpecificReceipts(network interfaces.Network, teleporter utils.Teleporte ) receiveEvent1, err := utils.GetEventFromLogs( deliveryReceipt1.Logs, - teleporter.TeleporterMessenger(subnetBInfo).ParseReceiveCrossChainMessage) + subnetBTeleporterMessenger.ParseReceiveCrossChainMessage) Expect(err).Should(BeNil()) Expect(receiveEvent1.MessageID[:]).Should(Equal(messageID1[:])) // Check that the first message was delivered - delivered, err := teleporter.TeleporterMessenger(subnetBInfo).MessageReceived(&bind.CallOpts{}, messageID1) + delivered, err := subnetBTeleporterMessenger.MessageReceived(&bind.CallOpts{}, messageID1) Expect(err).Should(BeNil()) Expect(delivered).Should(BeTrue()) // Send second message from Subnet A to Subnet B with fee amount 5 sendCrossChainMsgReceipt, messageID2 := utils.SendCrossChainMessageAndWaitForAcceptance( - ctx, teleporter.TeleporterMessenger(subnetAInfo), subnetAInfo, subnetBInfo, sendCrossChainMessageInput, fundedKey) + ctx, subnetATeleporterMessenger, subnetAInfo, subnetBInfo, sendCrossChainMessageInput, fundedKey) // Relay the message from SubnetA to SubnetB deliveryReceipt2 := teleporter.RelayTeleporterMessage( @@ -98,19 +97,19 @@ func SendSpecificReceipts(network interfaces.Network, teleporter utils.Teleporte ) receiveEvent2, err := utils.GetEventFromLogs( deliveryReceipt2.Logs, - teleporter.TeleporterMessenger(subnetBInfo).ParseReceiveCrossChainMessage) + subnetBTeleporterMessenger.ParseReceiveCrossChainMessage) Expect(err).Should(BeNil()) Expect(receiveEvent2.MessageID[:]).Should(Equal(messageID2[:])) // Check that the second message was delivered - delivered, err = teleporter.TeleporterMessenger(subnetBInfo).MessageReceived(&bind.CallOpts{}, messageID2) + delivered, err = subnetBTeleporterMessenger.MessageReceived(&bind.CallOpts{}, messageID2) Expect(err).Should(BeNil()) Expect(delivered).Should(BeTrue()) // Call send specific receipts to get reward of relaying two messages receipt, messageID := utils.SendSpecifiedReceiptsAndWaitForAcceptance( ctx, - teleporter.TeleporterMessenger(subnetBInfo), + subnetBTeleporterMessenger, subnetBInfo, subnetAInfo.BlockchainID, [][32]byte{messageID1, messageID2}, @@ -126,13 +125,13 @@ func SendSpecificReceipts(network interfaces.Network, teleporter utils.Teleporte receipt = teleporter.RelayTeleporterMessage(ctx, receipt, subnetBInfo, subnetAInfo, true, fundedKey) // Check that the message back to Subnet A was delivered - delivered, err = teleporter.TeleporterMessenger(subnetAInfo).MessageReceived(&bind.CallOpts{}, messageID) + delivered, err = subnetATeleporterMessenger.MessageReceived(&bind.CallOpts{}, messageID) Expect(err).Should(BeNil()) Expect(delivered).Should(BeTrue()) // Check that the expected receipts were received and emitted ReceiptReceived - Expect(utils.CheckReceiptReceived(receipt, messageID1, teleporter.TeleporterMessenger(subnetAInfo))).Should(BeTrue()) - Expect(utils.CheckReceiptReceived(receipt, messageID2, teleporter.TeleporterMessenger(subnetAInfo))).Should(BeTrue()) + Expect(utils.CheckReceiptReceived(receipt, messageID1, subnetATeleporterMessenger)).Should(BeTrue()) + Expect(utils.CheckReceiptReceived(receipt, messageID2, subnetATeleporterMessenger)).Should(BeTrue()) // Check the reward amounts. // Even on external networks, the relayer should only have the expected fee amount @@ -146,71 +145,68 @@ func SendSpecificReceipts(network interfaces.Network, teleporter utils.Teleporte relayerFeePerMessage, ) - // If the network is internal to the test application, send a message from Subnet B to Subnet A to trigger + // Send a message from Subnet B to Subnet A to trigger // the "regular" method of delivering receipts. The next message from B->A will contain the same receipts // that were manually sent in the above steps, but they should not be processed again on Subnet A. - // These checks are not performed for external networks because unrelated messages may have already changed - // the state of the receipt queues. - if !network.IsExternalNetwork() { - sendCrossChainMessageInput = teleportermessenger.TeleporterMessageInput{ - DestinationBlockchainID: subnetAInfo.BlockchainID, - DestinationAddress: destinationAddress, - FeeInfo: teleportermessenger.TeleporterFeeInfo{ - FeeTokenAddress: mockTokenAddress, - Amount: big.NewInt(0), - }, - RequiredGasLimit: big.NewInt(1), - AllowedRelayerAddresses: []common.Address{}, - Message: []byte{1, 2, 3, 4}, - } + sendCrossChainMessageInput = teleportermessenger.TeleporterMessageInput{ + DestinationBlockchainID: subnetAInfo.BlockchainID, + DestinationAddress: destinationAddress, + FeeInfo: teleportermessenger.TeleporterFeeInfo{ + FeeTokenAddress: mockTokenAddress, + Amount: big.NewInt(0), + }, + RequiredGasLimit: big.NewInt(1), + AllowedRelayerAddresses: []common.Address{}, + Message: []byte{1, 2, 3, 4}, + } - // This message will also have the same receipts as the previous message - receipt, messageID = utils.SendCrossChainMessageAndWaitForAcceptance( - ctx, teleporter.TeleporterMessenger(subnetBInfo), subnetBInfo, subnetAInfo, sendCrossChainMessageInput, fundedKey) + // This message will also have the same receipts as the previous message + receipt, messageID = utils.SendCrossChainMessageAndWaitForAcceptance( + ctx, subnetBTeleporterMessenger, subnetBInfo, subnetAInfo, sendCrossChainMessageInput, fundedKey) - // Relay message from Subnet B to Subnet A - receipt = teleporter.RelayTeleporterMessage(ctx, receipt, subnetBInfo, subnetAInfo, true, fundedKey) - // Check delivered - delivered, err = teleporter.TeleporterMessenger(subnetAInfo).MessageReceived( - &bind.CallOpts{}, - messageID) - Expect(err).Should(BeNil()) - Expect(delivered).Should(BeTrue()) + // Relay message from Subnet B to Subnet A + receipt = teleporter.RelayTeleporterMessage(ctx, receipt, subnetBInfo, subnetAInfo, true, fundedKey) + // Check delivered + delivered, err = subnetATeleporterMessenger.MessageReceived( + &bind.CallOpts{}, + messageID, + ) + Expect(err).Should(BeNil()) + Expect(delivered).Should(BeTrue()) - // Check that the expected receipts were included in the message but did not emit ReceiptReceived - // because they were previously received - Expect(utils.CheckReceiptReceived(receipt, messageID1, teleporter.TeleporterMessenger(subnetAInfo))).Should(BeFalse()) - Expect(utils.CheckReceiptReceived(receipt, messageID2, teleporter.TeleporterMessenger(subnetAInfo))).Should(BeFalse()) + // Check that the expected receipts were included in the message but did not emit ReceiptReceived + // because they were previously received + Expect(utils.CheckReceiptReceived(receipt, messageID1, subnetATeleporterMessenger)).Should(BeFalse()) + Expect(utils.CheckReceiptReceived(receipt, messageID2, subnetATeleporterMessenger)).Should(BeFalse()) - receiveEvent, err := utils.GetEventFromLogs( - receipt.Logs, - teleporter.TeleporterMessenger(subnetAInfo).ParseReceiveCrossChainMessage, - ) - Expect(err).Should(BeNil()) - log.Info("Receipt included", "count", len(receiveEvent.Message.Receipts), "receipts", receiveEvent.Message.Receipts) - Expect(receiptIncluded( - teleporterContractAddress, - messageID1, - subnetAInfo, - subnetBInfo, - receiveEvent.Message.Receipts)).Should(BeTrue()) - Expect(receiptIncluded( - teleporterContractAddress, - messageID2, - subnetAInfo, - subnetBInfo, - receiveEvent.Message.Receipts)).Should(BeTrue()) + receiveEvent, err := utils.GetEventFromLogs( + receipt.Logs, + subnetATeleporterMessenger.ParseReceiveCrossChainMessage, + ) + Expect(err).Should(BeNil()) + log.Info("Receipt included", "count", len(receiveEvent.Message.Receipts), "receipts", receiveEvent.Message.Receipts) + Expect(receiptIncluded( + teleporterContractAddress, + messageID1, + subnetAInfo, + subnetBInfo, + receiveEvent.Message.Receipts)).Should(BeTrue()) + Expect(receiptIncluded( + teleporterContractAddress, + messageID2, + subnetAInfo, + subnetBInfo, + receiveEvent.Message.Receipts)).Should(BeTrue()) - // Check the reward amount remains the same - checkExpectedRewardAmounts( - teleporter, - subnetAInfo, - receiveEvent1, - receiveEvent2, - mockTokenAddress, - relayerFeePerMessage, - ) - } + // Check the reward amount remains the same + checkExpectedRewardAmounts( + teleporter, + subnetAInfo, + receiveEvent1, + receiveEvent2, + mockTokenAddress, + relayerFeePerMessage, + ) } // Checks the given message ID is included in the list of receipts. diff --git a/tests/flows/teleporter/teleporter_message_ids.go b/tests/flows/teleporter/teleporter_message_ids.go index a00d0cf17..a3be9ee3e 100644 --- a/tests/flows/teleporter/teleporter_message_ids.go +++ b/tests/flows/teleporter/teleporter_message_ids.go @@ -8,7 +8,7 @@ import ( "github.com/ava-labs/avalanchego/ids" "github.com/ava-labs/subnet-evm/accounts/abi/bind" - "github.com/ava-labs/teleporter/tests/interfaces" + localnetwork "github.com/ava-labs/teleporter/tests/network" "github.com/ava-labs/teleporter/tests/utils" teleporterutils "github.com/ava-labs/teleporter/utils/teleporter-utils" "github.com/ethereum/go-ethereum/common" @@ -16,7 +16,7 @@ import ( ) // Tests Teleporter message ID calculation -func CalculateMessageID(network interfaces.Network, teleporter utils.TeleporterTestInfo) { +func CalculateMessageID(network *localnetwork.LocalNetwork, teleporter utils.TeleporterTestInfo) { subnetInfo := network.GetPrimaryNetworkInfo() teleporterContractAddress := teleporter.TeleporterMessengerAddress(subnetInfo) diff --git a/tests/flows/teleporter/unallowed_relayer.go b/tests/flows/teleporter/unallowed_relayer.go index 0da726cee..252523733 100644 --- a/tests/flows/teleporter/unallowed_relayer.go +++ b/tests/flows/teleporter/unallowed_relayer.go @@ -6,16 +6,16 @@ import ( "github.com/ava-labs/subnet-evm/accounts/abi/bind" teleportermessenger "github.com/ava-labs/teleporter/abi-bindings/go/teleporter/TeleporterMessenger" - "github.com/ava-labs/teleporter/tests/interfaces" + localnetwork "github.com/ava-labs/teleporter/tests/network" "github.com/ava-labs/teleporter/tests/utils" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/log" . "github.com/onsi/gomega" ) -func UnallowedRelayer(network interfaces.Network, teleporter utils.TeleporterTestInfo) { +func UnallowedRelayer(network *localnetwork.LocalNetwork, teleporter utils.TeleporterTestInfo) { subnetAInfo := network.GetPrimaryNetworkInfo() - subnetBInfo, _ := utils.GetTwoSubnets(network) + subnetBInfo, _ := network.GetTwoSubnets() fundedAddress, fundedKey := network.GetFundedAccountInfo() // diff --git a/tests/flows/teleporter/validator_churn.go b/tests/flows/teleporter/validator_churn.go index da7ec7016..ef4fc1f01 100644 --- a/tests/flows/teleporter/validator_churn.go +++ b/tests/flows/teleporter/validator_churn.go @@ -8,7 +8,7 @@ import ( "github.com/ava-labs/subnet-evm/accounts/abi/bind" subnetEvmUtils "github.com/ava-labs/subnet-evm/tests/utils" teleportermessenger "github.com/ava-labs/teleporter/abi-bindings/go/teleporter/TeleporterMessenger" - "github.com/ava-labs/teleporter/tests/interfaces" + localnetwork "github.com/ava-labs/teleporter/tests/network" "github.com/ava-labs/teleporter/tests/utils" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/log" @@ -17,8 +17,8 @@ import ( const newNodeCount = 2 -func ValidatorChurn(network interfaces.LocalNetwork, teleporter utils.TeleporterTestInfo) { - subnetAInfo, subnetBInfo := utils.GetTwoSubnets(network) +func ValidatorChurn(network *localnetwork.LocalNetwork, teleporter utils.TeleporterTestInfo) { + subnetAInfo, subnetBInfo := network.GetTwoSubnets() teleporterContractAddress := teleporter.TeleporterMessengerAddress(subnetAInfo) fundedAddress, fundedKey := network.GetFundedAccountInfo() @@ -69,7 +69,7 @@ func ValidatorChurn(network interfaces.LocalNetwork, teleporter utils.Teleporter network.AddSubnetValidators(addValidatorsCtx, subnetAInfo.SubnetID, newNodeCount) // Refresh the subnet info - subnetAInfo, subnetBInfo = utils.GetTwoSubnets(network) + subnetAInfo, subnetBInfo = network.GetTwoSubnets() // Trigger the proposer VM to update its height so that the inner VM can see the new validator set // We have to update all subnets, not just the ones directly involved in this test to ensure that the diff --git a/tests/flows/validator-manager/erc20_token_staking.go b/tests/flows/validator-manager/erc20_token_staking.go index ec1e0d701..07d4a6c3a 100644 --- a/tests/flows/validator-manager/erc20_token_staking.go +++ b/tests/flows/validator-manager/erc20_token_staking.go @@ -8,7 +8,7 @@ import ( "github.com/ava-labs/avalanchego/ids" "github.com/ava-labs/subnet-evm/accounts/abi/bind" - "github.com/ava-labs/teleporter/tests/interfaces" + localnetwork "github.com/ava-labs/teleporter/tests/network" "github.com/ava-labs/teleporter/tests/utils" . "github.com/onsi/gomega" ) @@ -29,10 +29,10 @@ import ( * - Deliver the Warp message to the subnet * - Verify that the validator is delisted from the staking contract */ -func ERC20TokenStakingManager(network interfaces.LocalNetwork) { +func ERC20TokenStakingManager(network *localnetwork.LocalNetwork) { // Get the subnets info cChainInfo := network.GetPrimaryNetworkInfo() - subnetAInfo, _ := utils.GetTwoSubnets(network) + subnetAInfo, _ := network.GetTwoSubnets() _, fundedKey := network.GetFundedAccountInfo() pChainInfo := utils.GetPChainInfo(cChainInfo) @@ -55,7 +55,7 @@ func ERC20TokenStakingManager(network interfaces.LocalNetwork) { nodes := utils.ConvertSubnet( ctx, subnetAInfo, - network, + network.GetPChainWallet(), stakingManagerAddress, fundedKey, ) @@ -69,7 +69,7 @@ func ERC20TokenStakingManager(network interfaces.LocalNetwork) { pChainInfo, stakingManager, stakingManagerAddress, - network, + network.GetNetworkID(), signatureAggregator, nodes, ) @@ -79,7 +79,6 @@ func ERC20TokenStakingManager(network interfaces.LocalNetwork) { // utils.InitializeAndCompleteEndInitialERC20Validation( ctx, - network, signatureAggregator, fundedKey, subnetAInfo, @@ -89,6 +88,8 @@ func ERC20TokenStakingManager(network interfaces.LocalNetwork) { initialValidationIDs[0], 0, nodes[0].Weight, + network.GetPChainWallet(), + network.GetNetworkID(), ) // @@ -97,7 +98,6 @@ func ERC20TokenStakingManager(network interfaces.LocalNetwork) { expiry := uint64(time.Now().Add(24 * time.Hour).Unix()) validationID := utils.InitializeAndCompleteERC20ValidatorRegistration( ctx, - network, signatureAggregator, fundedKey, subnetAInfo, @@ -107,6 +107,8 @@ func ERC20TokenStakingManager(network interfaces.LocalNetwork) { erc20, expiry, nodes[0], + network.GetPChainWallet(), + network.GetNetworkID(), ) validatorStartTime := time.Now() @@ -153,7 +155,7 @@ func ERC20TokenStakingManager(network interfaces.LocalNetwork) { // Issue a tx to update the validator's weight on the P-Chain network.GetPChainWallet().IssueSetSubnetValidatorWeightTx(signedWarpMessage.Bytes()) - utils.PChainProposerVMWorkaround(network) + utils.PChainProposerVMWorkaround(network.GetPChainWallet()) utils.AdvanceProposerVM(ctx, subnetAInfo, fundedKey, 5) // Construct a SubnetValidatorWeightUpdateMessage Warp message from the P-Chain @@ -163,8 +165,8 @@ func ERC20TokenStakingManager(network interfaces.LocalNetwork) { newValidatorWeight, subnetAInfo, pChainInfo, - network, signatureAggregator, + network.GetNetworkID(), ) // Deliver the Warp message to the subnet @@ -214,7 +216,7 @@ func ERC20TokenStakingManager(network interfaces.LocalNetwork) { // Issue a tx to update the validator's weight on the P-Chain network.GetPChainWallet().IssueSetSubnetValidatorWeightTx(signedWarpMessage.Bytes()) - utils.PChainProposerVMWorkaround(network) + utils.PChainProposerVMWorkaround(network.GetPChainWallet()) utils.AdvanceProposerVM(ctx, subnetAInfo, fundedKey, 5) // Construct a SubnetValidatorWeightUpdateMessage Warp message from the P-Chain @@ -224,8 +226,8 @@ func ERC20TokenStakingManager(network interfaces.LocalNetwork) { nodes[0].Weight, subnetAInfo, pChainInfo, - network, signatureAggregator, + network.GetNetworkID(), ) // Deliver the Warp message to the subnet @@ -253,7 +255,6 @@ func ERC20TokenStakingManager(network interfaces.LocalNetwork) { // utils.InitializeAndCompleteEndERC20Validation( ctx, - network, signatureAggregator, fundedKey, subnetAInfo, @@ -266,5 +267,7 @@ func ERC20TokenStakingManager(network interfaces.LocalNetwork) { 1, true, validatorStartTime, + network.GetPChainWallet(), + network.GetNetworkID(), ) } diff --git a/tests/flows/validator-manager/native_token_staking.go b/tests/flows/validator-manager/native_token_staking.go index 161bbd4a8..ec4a467d5 100644 --- a/tests/flows/validator-manager/native_token_staking.go +++ b/tests/flows/validator-manager/native_token_staking.go @@ -8,7 +8,7 @@ import ( "github.com/ava-labs/avalanchego/ids" "github.com/ava-labs/subnet-evm/accounts/abi/bind" - "github.com/ava-labs/teleporter/tests/interfaces" + localnetwork "github.com/ava-labs/teleporter/tests/network" "github.com/ava-labs/teleporter/tests/utils" . "github.com/onsi/gomega" ) @@ -29,10 +29,10 @@ import ( * - Deliver the Warp message to the subnet * - Verify that the validator is delisted from the staking contract */ -func NativeTokenStakingManager(network interfaces.LocalNetwork) { +func NativeTokenStakingManager(network *localnetwork.LocalNetwork) { // Get the subnets info cChainInfo := network.GetPrimaryNetworkInfo() - subnetAInfo, _ := utils.GetTwoSubnets(network) + subnetAInfo, _ := network.GetTwoSubnets() _, fundedKey := network.GetFundedAccountInfo() pChainInfo := utils.GetPChainInfo(cChainInfo) @@ -57,7 +57,7 @@ func NativeTokenStakingManager(network interfaces.LocalNetwork) { nodes := utils.ConvertSubnet( ctx, subnetAInfo, - network, + network.GetPChainWallet(), stakingManagerAddress, fundedKey, ) @@ -71,7 +71,7 @@ func NativeTokenStakingManager(network interfaces.LocalNetwork) { pChainInfo, stakingManager, stakingManagerAddress, - network, + network.GetNetworkID(), signatureAggregator, nodes, ) @@ -81,7 +81,6 @@ func NativeTokenStakingManager(network interfaces.LocalNetwork) { // utils.InitializeAndCompleteEndInitialNativeValidation( ctx, - network, signatureAggregator, fundedKey, subnetAInfo, @@ -91,6 +90,8 @@ func NativeTokenStakingManager(network interfaces.LocalNetwork) { initialValidationIDs[0], 0, nodes[0].Weight, + network.GetPChainWallet(), + network.GetNetworkID(), ) // @@ -99,7 +100,6 @@ func NativeTokenStakingManager(network interfaces.LocalNetwork) { expiry := uint64(time.Now().Add(24 * time.Hour).Unix()) validationID := utils.InitializeAndCompleteNativeValidatorRegistration( ctx, - network, signatureAggregator, fundedKey, subnetAInfo, @@ -108,6 +108,8 @@ func NativeTokenStakingManager(network interfaces.LocalNetwork) { stakingManagerAddress, expiry, nodes[0], + network.GetPChainWallet(), + network.GetNetworkID(), ) validatorStartTime := time.Now() @@ -153,7 +155,7 @@ func NativeTokenStakingManager(network interfaces.LocalNetwork) { // Issue a tx to update the validator's weight on the P-Chain network.GetPChainWallet().IssueSetSubnetValidatorWeightTx(signedWarpMessage.Bytes()) - utils.PChainProposerVMWorkaround(network) + utils.PChainProposerVMWorkaround(network.GetPChainWallet()) utils.AdvanceProposerVM(ctx, subnetAInfo, fundedKey, 5) // Construct a SubnetValidatorWeightUpdateMessage Warp message from the P-Chain @@ -163,8 +165,8 @@ func NativeTokenStakingManager(network interfaces.LocalNetwork) { newValidatorWeight, subnetAInfo, pChainInfo, - network, signatureAggregator, + network.GetNetworkID(), ) // Deliver the Warp message to the subnet @@ -213,7 +215,7 @@ func NativeTokenStakingManager(network interfaces.LocalNetwork) { // Issue a tx to update the validator's weight on the P-Chain network.GetPChainWallet().IssueSetSubnetValidatorWeightTx(signedWarpMessage.Bytes()) - utils.PChainProposerVMWorkaround(network) + utils.PChainProposerVMWorkaround(network.GetPChainWallet()) utils.AdvanceProposerVM(ctx, subnetAInfo, fundedKey, 5) // Construct a SubnetValidatorWeightUpdateMessage Warp message from the P-Chain @@ -223,8 +225,8 @@ func NativeTokenStakingManager(network interfaces.LocalNetwork) { nodes[0].Weight, subnetAInfo, pChainInfo, - network, signatureAggregator, + network.GetNetworkID(), ) // Deliver the Warp message to the subnet @@ -252,7 +254,6 @@ func NativeTokenStakingManager(network interfaces.LocalNetwork) { // utils.InitializeAndCompleteEndNativeValidation( ctx, - network, signatureAggregator, fundedKey, subnetAInfo, @@ -265,5 +266,7 @@ func NativeTokenStakingManager(network interfaces.LocalNetwork) { 1, true, validatorStartTime, + network.GetPChainWallet(), + network.GetNetworkID(), ) } diff --git a/tests/flows/validator-manager/poa_to_pos.go b/tests/flows/validator-manager/poa_to_pos.go index 8d06cc62b..3432d0a0c 100644 --- a/tests/flows/validator-manager/poa_to_pos.go +++ b/tests/flows/validator-manager/poa_to_pos.go @@ -10,7 +10,7 @@ import ( "github.com/ava-labs/subnet-evm/accounts/abi/bind" nativetokenstakingmanager "github.com/ava-labs/teleporter/abi-bindings/go/validator-manager/NativeTokenStakingManager" poavalidatormanager "github.com/ava-labs/teleporter/abi-bindings/go/validator-manager/PoAValidatorManager" - "github.com/ava-labs/teleporter/tests/interfaces" + localnetwork "github.com/ava-labs/teleporter/tests/network" "github.com/ava-labs/teleporter/tests/utils" "github.com/ethereum/go-ethereum/crypto" @@ -36,9 +36,9 @@ import ( * - Delist the previous PoA validator properly * - Delist the PoS validator */ -func PoAMigrationToPoS(network interfaces.LocalNetwork) { +func PoAMigrationToPoS(network *localnetwork.LocalNetwork) { cChainInfo := network.GetPrimaryNetworkInfo() - subnetAInfo, _ := utils.GetTwoSubnets(network) + subnetAInfo, _ := network.GetTwoSubnets() _, fundedKey := network.GetFundedAccountInfo() pChainInfo := utils.GetPChainInfo(cChainInfo) @@ -102,7 +102,7 @@ func PoAMigrationToPoS(network interfaces.LocalNetwork) { nodes := utils.ConvertSubnet( ctx, subnetAInfo, - network, + network.GetPChainWallet(), proxyAddress, fundedKey, ) @@ -116,7 +116,7 @@ func PoAMigrationToPoS(network interfaces.LocalNetwork) { pChainInfo, poaValidatorManager, proxyAddress, - network, + network.GetNetworkID(), signatureAggregator, nodes, ) @@ -126,7 +126,6 @@ func PoAMigrationToPoS(network interfaces.LocalNetwork) { // utils.InitializeAndCompleteEndInitialPoAValidation( ctx, - network, signatureAggregator, ownerKey, fundedKey, @@ -137,6 +136,8 @@ func PoAMigrationToPoS(network interfaces.LocalNetwork) { initialValidationIDs[0], 0, nodes[0].Weight, + network.GetPChainWallet(), + network.GetNetworkID(), ) // Try to call with invalid owner @@ -160,7 +161,6 @@ func PoAMigrationToPoS(network interfaces.LocalNetwork) { expiry := uint64(time.Now().Add(24 * time.Hour).Unix()) poaValidationID := utils.InitializeAndCompletePoAValidatorRegistration( ctx, - network, signatureAggregator, ownerKey, fundedKey, @@ -170,6 +170,8 @@ func PoAMigrationToPoS(network interfaces.LocalNetwork) { proxyAddress, expiry, nodes[0], + network.GetPChainWallet(), + network.GetNetworkID(), ) poaValidator, err := poaValidatorManager.GetValidator(&bind.CallOpts{}, poaValidationID) Expect(err).Should(BeNil()) @@ -241,7 +243,6 @@ func PoAMigrationToPoS(network interfaces.LocalNetwork) { utils.InitializeAndCompleteEndNativeValidation( ctx, - network, signatureAggregator, ownerKey, subnetAInfo, @@ -254,12 +255,13 @@ func PoAMigrationToPoS(network interfaces.LocalNetwork) { 1, false, time.Time{}, + network.GetPChainWallet(), + network.GetNetworkID(), ) expiry2 := uint64(time.Now().Add(24 * time.Hour).Unix()) posValidationID := utils.InitializeAndCompleteNativeValidatorRegistration( ctx, - network, signatureAggregator, fundedKey, subnetAInfo, @@ -268,13 +270,14 @@ func PoAMigrationToPoS(network interfaces.LocalNetwork) { proxyAddress, expiry2, nodes[0], + network.GetPChainWallet(), + network.GetNetworkID(), ) validatorStartTime := time.Now() // Delist the PoS validator utils.InitializeAndCompleteEndNativeValidation( ctx, - network, signatureAggregator, fundedKey, subnetAInfo, @@ -287,5 +290,7 @@ func PoAMigrationToPoS(network interfaces.LocalNetwork) { 1, true, validatorStartTime, + network.GetPChainWallet(), + network.GetNetworkID(), ) } diff --git a/tests/interfaces/local_network.go b/tests/interfaces/local_network.go deleted file mode 100644 index 2639cc662..000000000 --- a/tests/interfaces/local_network.go +++ /dev/null @@ -1,17 +0,0 @@ -package interfaces - -import ( - "context" - - "github.com/ava-labs/avalanchego/ids" - pwallet "github.com/ava-labs/avalanchego/wallet/chain/p/wallet" -) - -type LocalNetwork interface { - Network - AddSubnetValidators(ctx context.Context, subnetID ids.ID, count uint) - SetChainConfigs(chainConfigs map[string]string) - RestartNodes(ctx context.Context, nodeIDs []ids.NodeID) - GetNetworkID() uint32 - GetPChainWallet() pwallet.Wallet -} diff --git a/tests/interfaces/network.go b/tests/interfaces/network.go deleted file mode 100644 index 204813dfb..000000000 --- a/tests/interfaces/network.go +++ /dev/null @@ -1,33 +0,0 @@ -package interfaces - -import ( - "crypto/ecdsa" - - "github.com/ethereum/go-ethereum/common" -) - -// Defines the interface for the network setup functions used in the E2E tests -type Network interface { - // Returns information about the primary network - GetPrimaryNetworkInfo() SubnetTestInfo - - // Returns all of the subnets support by this network, excluding the primary network - GetSubnetsInfo() []SubnetTestInfo - - // Returns all of the subnets support by this network in no particular order, including the primary network. - // If the distinction between primary network and other subnets needs to be made, - // use GetPrimaryNetworkInfo() and GetSubnetsInfo() instead. - GetAllSubnetsInfo() []SubnetTestInfo - - // An address and corresponding key that has native tokens on each of the subnets in this network. - GetFundedAccountInfo() (common.Address, *ecdsa.PrivateKey) - - // Whether or not the Avalanche network being used is available outside the scope of the test application. - IsExternalNetwork() bool - - // Whether or not the funded wallet is capable of relaying messages between subnets in this network. - // Intended to be true for local networks where all nodes are querable by the test application for their - // BLS signatures, and false for testnet networks where test application does not necessarily have - // connections with each validator. - SupportsIndependentRelaying() bool -} diff --git a/tests/interfaces/subnet_test_info.go b/tests/interfaces/subnet_test_info.go index 0ab8e6807..73aa58d62 100644 --- a/tests/interfaces/subnet_test_info.go +++ b/tests/interfaces/subnet_test_info.go @@ -9,7 +9,6 @@ import ( // Tracks information about a test subnet used for executing tests against. type SubnetTestInfo struct { - SubnetName string SubnetID ids.ID BlockchainID ids.ID NodeURIs []string diff --git a/tests/local/network.go b/tests/network/network.go similarity index 60% rename from tests/local/network.go rename to tests/network/network.go index 2839b082c..2580260f3 100644 --- a/tests/local/network.go +++ b/tests/network/network.go @@ -1,4 +1,4 @@ -package local +package network import ( "context" @@ -8,7 +8,6 @@ import ( "encoding/json" "os" "slices" - "sort" "time" "github.com/ava-labs/avalanchego/api/info" @@ -16,7 +15,6 @@ import ( "github.com/ava-labs/avalanchego/ids" "github.com/ava-labs/avalanchego/tests/fixture/tmpnet" "github.com/ava-labs/avalanchego/upgrade" - "github.com/ava-labs/avalanchego/utils/constants" "github.com/ava-labs/avalanchego/utils/crypto/secp256k1" "github.com/ava-labs/avalanchego/vms/platformvm" "github.com/ava-labs/avalanchego/vms/secp256k1fx" @@ -26,26 +24,21 @@ import ( subnetEvmTestUtils "github.com/ava-labs/subnet-evm/tests/utils" "github.com/ava-labs/teleporter/tests/interfaces" "github.com/ava-labs/teleporter/tests/utils" + "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/crypto" "github.com/ethereum/go-ethereum/log" . "github.com/onsi/gomega" ) -var _ interfaces.LocalNetwork = &LocalNetwork{} - // Implements Network, pointing to the network setup in local_network_setup.go type LocalNetwork struct { - primaryNetworkInfo *interfaces.SubnetTestInfo - subnetsInfo map[ids.ID]*interfaces.SubnetTestInfo - - extraNodes []*tmpnet.Node // to add as more subnet validators in the tests - - globalFundedKey *ecdsa.PrivateKey - pChainWallet pwallet.Wallet + tmpnet.Network - // Internal vars only used to set up the local network - tmpnet *tmpnet.Network + extraNodes []*tmpnet.Node // to add as more subnet validators in the tests + primaryNetworkValidators []ids.NodeID + globalFundedKey *ecdsa.PrivateKey + pChainWallet pwallet.Wallet } const ( @@ -147,17 +140,18 @@ func NewLocalNetwork( utils.SetupProposerVM(ctx, globalFundedECDSAKey, network, subnet.SubnetID) } - localNetwork := &LocalNetwork{ - primaryNetworkInfo: &interfaces.SubnetTestInfo{}, - subnetsInfo: make(map[ids.ID]*interfaces.SubnetTestInfo), - extraNodes: extraNodes, - globalFundedKey: globalFundedECDSAKey, - tmpnet: network, + // All nodes are specified as bootstrap validators + var primaryNetworkValidators []ids.NodeID + for _, node := range network.Nodes { + primaryNetworkValidators = append(primaryNetworkValidators, node.NodeID) } - for _, subnet := range network.Subnets { - localNetwork.setSubnetValues(subnet) + + localNetwork := &LocalNetwork{ + Network: *network, + extraNodes: extraNodes, + globalFundedKey: globalFundedECDSAKey, + primaryNetworkValidators: primaryNetworkValidators, } - localNetwork.setPrimaryNetworkValues() // Create the P-Chain wallet to issue transactions kc := secp256k1fx.NewKeychain(globalFundedKey) @@ -178,103 +172,65 @@ func NewLocalNetwork( return localNetwork } -// Should be called after setSubnetValues for all subnets -func (n *LocalNetwork) setPrimaryNetworkValues() { - // Get the C-Chain node URIs. - // All subnet nodes validate the C-Chain, so we can include them all here +func (n *LocalNetwork) GetPrimaryNetworkInfo() interfaces.SubnetTestInfo { var nodeURIs []string - for _, subnetInfo := range n.subnetsInfo { - nodeURIs = append(nodeURIs, subnetInfo.NodeURIs...) - } - for _, extraNode := range n.extraNodes { - uri, err := n.tmpnet.GetURIForNodeID(extraNode.NodeID) + for _, nodeID := range n.primaryNetworkValidators { + uri, err := n.Network.GetURIForNodeID(nodeID) Expect(err).Should(BeNil()) + nodeURIs = append(nodeURIs, uri) } - - cChainBlockchainID, err := info.NewClient(nodeURIs[0]).GetBlockchainID(context.Background(), "C") + infoClient := info.NewClient(nodeURIs[0]) + cChainBlockchainID, err := infoClient.GetBlockchainID(context.Background(), "C") Expect(err).Should(BeNil()) - Expect(cChainBlockchainID).ShouldNot(Equal(ids.Empty)) - chainWSURI := utils.HttpToWebsocketURI(nodeURIs[0], cChainBlockchainID.String()) - chainRPCURI := utils.HttpToRPCURI(nodeURIs[0], cChainBlockchainID.String()) - if n.primaryNetworkInfo != nil && n.primaryNetworkInfo.WSClient != nil { - n.primaryNetworkInfo.WSClient.Close() - } - chainWSClient, err := ethclient.Dial(chainWSURI) - Expect(err).Should(BeNil()) - if n.primaryNetworkInfo != nil && n.primaryNetworkInfo.RPCClient != nil { - n.primaryNetworkInfo.RPCClient.Close() - } - chainRPCClient, err := ethclient.Dial(chainRPCURI) - Expect(err).Should(BeNil()) - chainIDInt, err := chainRPCClient.ChainID(context.Background()) + wsClient, err := ethclient.Dial(utils.HttpToWebsocketURI(nodeURIs[0], cChainBlockchainID.String())) Expect(err).Should(BeNil()) - n.primaryNetworkInfo.SubnetID = constants.PrimaryNetworkID - n.primaryNetworkInfo.BlockchainID = cChainBlockchainID - n.primaryNetworkInfo.NodeURIs = nodeURIs - n.primaryNetworkInfo.WSClient = chainWSClient - n.primaryNetworkInfo.RPCClient = chainRPCClient - n.primaryNetworkInfo.EVMChainID = chainIDInt -} - -func (n *LocalNetwork) setSubnetValues(subnet *tmpnet.Subnet) { - blockchainID := subnet.Chains[0].ChainID - - var chainNodeURIs []string - for _, validatorID := range subnet.ValidatorIDs { - uri, err := n.tmpnet.GetURIForNodeID(validatorID) - Expect(err).Should(BeNil(), "failed to get URI for node ID %s", validatorID) - Expect(uri).ShouldNot(HaveLen(0)) - chainNodeURIs = append(chainNodeURIs, uri) - } - - chainWSURI := utils.HttpToWebsocketURI(chainNodeURIs[0], blockchainID.String()) - chainRPCURI := utils.HttpToRPCURI(chainNodeURIs[0], blockchainID.String()) - - subnetID := subnet.SubnetID - - if n.subnetsInfo[subnetID] != nil && n.subnetsInfo[subnetID].WSClient != nil { - n.subnetsInfo[subnetID].WSClient.Close() - } - chainWSClient, err := ethclient.Dial(chainWSURI) - Expect(err).Should(BeNil()) - if n.subnetsInfo[subnetID] != nil && n.subnetsInfo[subnetID].RPCClient != nil { - n.subnetsInfo[subnetID].RPCClient.Close() - } - chainRPCClient, err := ethclient.Dial(chainRPCURI) - Expect(err).Should(BeNil()) - chainIDInt, err := chainRPCClient.ChainID(context.Background()) + rpcClient, err := ethclient.Dial(utils.HttpToRPCURI(nodeURIs[0], cChainBlockchainID.String())) Expect(err).Should(BeNil()) - // Set the new values in the subnetsInfo map - if n.subnetsInfo[subnetID] == nil { - n.subnetsInfo[subnetID] = &interfaces.SubnetTestInfo{} + evmChainID, err := rpcClient.ChainID(context.Background()) + Expect(err).Should(BeNil()) + return interfaces.SubnetTestInfo{ + SubnetID: ids.Empty, + BlockchainID: cChainBlockchainID, + NodeURIs: nodeURIs, + WSClient: wsClient, + RPCClient: rpcClient, + EVMChainID: evmChainID, } - n.subnetsInfo[subnetID].SubnetName = subnet.Name - n.subnetsInfo[subnetID].SubnetID = subnetID - n.subnetsInfo[subnetID].BlockchainID = blockchainID - n.subnetsInfo[subnetID].NodeURIs = chainNodeURIs - n.subnetsInfo[subnetID].WSClient = chainWSClient - n.subnetsInfo[subnetID].RPCClient = chainRPCClient - n.subnetsInfo[subnetID].EVMChainID = chainIDInt } // Returns all subnet info sorted in lexicographic order of SubnetName. func (n *LocalNetwork) GetSubnetsInfo() []interfaces.SubnetTestInfo { - subnetsInfo := make([]interfaces.SubnetTestInfo, 0, len(n.subnetsInfo)) - for _, subnetInfo := range n.subnetsInfo { - subnetsInfo = append(subnetsInfo, *subnetInfo) - } - sort.Slice(subnetsInfo, func(i, j int) bool { - return subnetsInfo[i].SubnetName < subnetsInfo[j].SubnetName - }) - return subnetsInfo -} + subnets := make([]interfaces.SubnetTestInfo, len(n.Network.Subnets)) + for i, subnet := range n.Network.Subnets { + var nodeURIs []string + for _, nodeID := range subnet.ValidatorIDs { + uri, err := n.Network.GetURIForNodeID(nodeID) + Expect(err).Should(BeNil()) + + nodeURIs = append(nodeURIs, uri) + } + blockchainID := subnet.Chains[0].ChainID + wsClient, err := ethclient.Dial(utils.HttpToWebsocketURI(nodeURIs[0], blockchainID.String())) + Expect(err).Should(BeNil()) -func (n *LocalNetwork) GetPrimaryNetworkInfo() interfaces.SubnetTestInfo { - return *n.primaryNetworkInfo + rpcClient, err := ethclient.Dial(utils.HttpToRPCURI(nodeURIs[0], blockchainID.String())) + Expect(err).Should(BeNil()) + evmChainID, err := rpcClient.ChainID(context.Background()) + Expect(err).Should(BeNil()) + subnets[i] = interfaces.SubnetTestInfo{ + SubnetID: subnet.SubnetID, + BlockchainID: blockchainID, + NodeURIs: nodeURIs, + WSClient: wsClient, + RPCClient: rpcClient, + EVMChainID: evmChainID, + } + } + return subnets } // Returns subnet info for all subnets, including the primary network @@ -288,34 +244,11 @@ func (n *LocalNetwork) GetFundedAccountInfo() (common.Address, *ecdsa.PrivateKey return fundedAddress, n.globalFundedKey } -func (n *LocalNetwork) IsExternalNetwork() bool { - return false -} - -func (n *LocalNetwork) SupportsIndependentRelaying() bool { - // Messages can be relayed by the test application for local - // networks with connections to each node. - return true -} - -func (n *LocalNetwork) setAllSubnetValues() { - subnetIDs := n.GetSubnetsInfo() - Expect(len(subnetIDs)).Should(Equal(2)) - - for _, subnetInfo := range n.subnetsInfo { - subnet := n.tmpnet.GetSubnet(subnetInfo.SubnetName) - Expect(subnet).ShouldNot(BeNil()) - n.setSubnetValues(subnet) - } - - n.setPrimaryNetworkValues() -} - func (n *LocalNetwork) TearDownNetwork() { log.Info("Tearing down network") Expect(n).ShouldNot(BeNil()) - Expect(n.tmpnet).ShouldNot(BeNil()) - Expect(n.tmpnet.Stop(context.Background())).Should(BeNil()) + Expect(n.Network).ShouldNot(BeNil()) + Expect(n.Network.Stop(context.Background())).Should(BeNil()) } func (n *LocalNetwork) AddSubnetValidators(ctx context.Context, subnetID ids.ID, count uint) { @@ -325,8 +258,8 @@ func (n *LocalNetwork) AddSubnetValidators(ctx context.Context, subnetID ids.ID, "not enough extra nodes to use", ) - subnet := n.tmpnet.Subnets[slices.IndexFunc( - n.tmpnet.Subnets, + subnet := n.Network.Subnets[slices.IndexFunc( + n.Network.Subnets, func(s *tmpnet.Subnet) bool { return s.SubnetID == subnetID }, )] @@ -335,7 +268,7 @@ func (n *LocalNetwork) AddSubnetValidators(ctx context.Context, subnetID ids.ID, newValidatorNodes = append(newValidatorNodes, n.extraNodes[0:count]...) n.extraNodes = n.extraNodes[count:] - apiURI, err := n.tmpnet.GetURIForNodeID(subnet.ValidatorIDs[0]) + apiURI, err := n.Network.GetURIForNodeID(subnet.ValidatorIDs[0]) Expect(err).Should(BeNil()) ctx, cancel := context.WithCancel(ctx) @@ -353,15 +286,14 @@ func (n *LocalNetwork) AddSubnetValidators(ctx context.Context, subnetID ids.ID, node.Flags[config.TrackSubnetsKey] = subnetID.String() } - tmpnet.WaitForActiveValidators(ctx, os.Stdout, platformvm.NewClient(n.tmpnet.Nodes[0].URI), subnet) + tmpnet.WaitForActiveValidators(ctx, os.Stdout, platformvm.NewClient(n.Network.Nodes[0].URI), subnet) nodeIdsToRestart := make([]ids.NodeID, len(newValidatorNodes)) for i, node := range newValidatorNodes { + n.primaryNetworkValidators = append(n.primaryNetworkValidators, node.NodeID) nodeIdsToRestart[i] = node.NodeID } n.RestartNodes(ctx, nodeIdsToRestart) - - n.setAllSubnetValues() } // Restarts the nodes with the given nodeIDs. If nodeIDs is empty, restarts all nodes. @@ -369,10 +301,10 @@ func (n *LocalNetwork) RestartNodes(ctx context.Context, nodeIDs []ids.NodeID) { log.Info("Restarting nodes", "nodeIDs", nodeIDs) var nodes []*tmpnet.Node if len(nodeIDs) == 0 { - nodes = n.tmpnet.Nodes + nodes = n.Network.Nodes } else { for _, nodeID := range nodeIDs { - for _, node := range n.tmpnet.Nodes { + for _, node := range n.Network.Nodes { if node.NodeID == nodeID { nodes = append(nodes, node) } @@ -389,7 +321,7 @@ func (n *LocalNetwork) RestartNodes(ctx context.Context, nodeIDs []ids.NodeID) { err = node.Stop(ctx) Expect(err).Should(BeNil()) - err = n.tmpnet.StartNode(ctx, os.Stdout, node) + err = n.Network.StartNode(ctx, os.Stdout, node) Expect(err).Should(BeNil()) } @@ -400,8 +332,6 @@ func (n *LocalNetwork) RestartNodes(ctx context.Context, nodeIDs []ids.NodeID) { err := tmpnet.WaitForHealthy(ctx, node) Expect(err).Should(BeNil()) } - - n.setAllSubnetValues() } func (n *LocalNetwork) SetChainConfigs(chainConfigs map[string]string) { @@ -416,11 +346,11 @@ func (n *LocalNetwork) SetChainConfigs(chainConfigs map[string]string) { "chainConfig", chainConfig, ) } - n.tmpnet.ChainConfigs[utils.CChainPathSpecifier] = cfg + n.Network.ChainConfigs[utils.CChainPathSpecifier] = cfg continue } - for _, subnet := range n.tmpnet.Subnets { + for _, subnet := range n.Network.Subnets { for _, chain := range subnet.Chains { if chain.ChainID.String() == chainIDStr { chain.Config = chainConfig @@ -428,12 +358,12 @@ func (n *LocalNetwork) SetChainConfigs(chainConfigs map[string]string) { } } } - err := n.tmpnet.Write() + err := n.Network.Write() if err != nil { log.Error("failed to write network", "error", err) } - for _, subnet := range n.tmpnet.Subnets { - err := subnet.Write(n.tmpnet.GetSubnetDir(), n.tmpnet.GetChainConfigDir()) + for _, subnet := range n.Network.Subnets { + err := subnet.Write(n.Network.GetSubnetDir(), n.Network.GetChainConfigDir()) if err != nil { log.Error("failed to write subnets", "error", err) } @@ -441,13 +371,22 @@ func (n *LocalNetwork) SetChainConfigs(chainConfigs map[string]string) { } func (n *LocalNetwork) GetNetworkID() uint32 { - return n.tmpnet.Genesis.NetworkID + return n.Network.Genesis.NetworkID } func (n *LocalNetwork) Dir() string { - return n.tmpnet.Dir + return n.Network.Dir } func (n *LocalNetwork) GetPChainWallet() pwallet.Wallet { return n.pChainWallet } + +func (n *LocalNetwork) GetTwoSubnets() ( + interfaces.SubnetTestInfo, + interfaces.SubnetTestInfo, +) { + subnets := n.GetSubnetsInfo() + Expect(len(subnets)).Should(BeNumerically(">=", 2)) + return subnets[0], subnets[1] +} diff --git a/tests/local/governance/governance_suite_test.go b/tests/suites/governance/governance_suite_test.go similarity index 88% rename from tests/local/governance/governance_suite_test.go rename to tests/suites/governance/governance_suite_test.go index b7fd6beea..dc94a2cde 100644 --- a/tests/local/governance/governance_suite_test.go +++ b/tests/suites/governance/governance_suite_test.go @@ -7,7 +7,7 @@ import ( "time" governanceFlows "github.com/ava-labs/teleporter/tests/flows/governance" - "github.com/ava-labs/teleporter/tests/local" + localnetwork "github.com/ava-labs/teleporter/tests/network" "github.com/ethereum/go-ethereum/log" "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" @@ -19,7 +19,7 @@ const ( ) var ( - LocalNetworkInstance *local.LocalNetwork + LocalNetworkInstance *localnetwork.LocalNetwork ) func TestGovernance(t *testing.T) { @@ -36,11 +36,11 @@ var _ = ginkgo.BeforeSuite(func() { // Create the local network instance ctx, cancel := context.WithTimeout(context.Background(), 120*time.Second) defer cancel() - LocalNetworkInstance = local.NewLocalNetwork( + LocalNetworkInstance = localnetwork.NewLocalNetwork( ctx, "governance-test-local-network", warpGenesisTemplateFile, - []local.SubnetSpec{ + []localnetwork.SubnetSpec{ { Name: "A", EVMChainID: 12345, diff --git a/tests/suites/ictt/ictt_suite_test.go b/tests/suites/ictt/ictt_suite_test.go new file mode 100644 index 000000000..d984c9877 --- /dev/null +++ b/tests/suites/ictt/ictt_suite_test.go @@ -0,0 +1,171 @@ +package ictt_test + +import ( + "context" + "os" + "testing" + "time" + + icttFlows "github.com/ava-labs/teleporter/tests/flows/ictt" + localnetwork "github.com/ava-labs/teleporter/tests/network" + "github.com/ava-labs/teleporter/tests/utils" + deploymentUtils "github.com/ava-labs/teleporter/utils/deployment-utils" + "github.com/ethereum/go-ethereum/log" + "github.com/onsi/ginkgo/v2" + . "github.com/onsi/gomega" +) + +const ( + teleporterByteCodeFile = "./out/TeleporterMessenger.sol/TeleporterMessenger.json" + warpGenesisTemplateFile = "./tests/utils/warp-genesis-template.json" + + icttLabel = "ICTT" + erc20TokenHomeLabel = "ERC20TokenHome" + erc20TokenRemoteLabel = "ERC20TokenRemote" + nativeTokenHomeLabel = "NativeTokenHome" + nativeTokenRemoteLabel = "NativeTokenRemote" + multiHopLabel = "MultiHop" + sendAndCallLabel = "SendAndCall" + registrationLabel = "Registration" + upgradabilityLabel = "upgradability" +) + +var ( + LocalNetworkInstance *localnetwork.LocalNetwork + TeleporterInfo utils.TeleporterTestInfo +) + +func TestValidatorManager(t *testing.T) { + if os.Getenv("RUN_E2E") == "" { + t.Skip("Environment variable RUN_E2E not set; skipping E2E tests") + } + + RegisterFailHandler(ginkgo.Fail) + ginkgo.RunSpecs(t, "Teleporter e2e test") +} + +// Define the Teleporter before and after suite functions. +var _ = ginkgo.BeforeSuite(func() { + // Generate the Teleporter deployment values + teleporterDeployerTransaction, + teleporterDeployedBytecode, + teleporterDeployerAddress, + teleporterContractAddress, + err := deploymentUtils.ConstructKeylessTransaction( + teleporterByteCodeFile, + false, + deploymentUtils.GetDefaultContractCreationGasPrice(), + ) + Expect(err).Should(BeNil()) + + // Create the local network instance + ctx, cancel := context.WithTimeout(context.Background(), 120*time.Second) + defer cancel() + LocalNetworkInstance = localnetwork.NewLocalNetwork( + ctx, + "teleporter-test-local-network", + warpGenesisTemplateFile, + []localnetwork.SubnetSpec{ + { + Name: "A", + EVMChainID: 12345, + TeleporterContractAddress: teleporterContractAddress, + TeleporterDeployedBytecode: teleporterDeployedBytecode, + TeleporterDeployerAddress: teleporterDeployerAddress, + NodeCount: 2, + }, + { + Name: "B", + EVMChainID: 54321, + TeleporterContractAddress: teleporterContractAddress, + TeleporterDeployedBytecode: teleporterDeployedBytecode, + TeleporterDeployerAddress: teleporterDeployerAddress, + NodeCount: 2, + }, + }, + 2, + ) + TeleporterInfo = utils.NewTeleporterTestInfo(LocalNetworkInstance.GetAllSubnetsInfo()) + log.Info("Started local network") + + // Only need to deploy Teleporter on the C-Chain since it is included in the genesis of the subnet chains. + _, fundedKey := LocalNetworkInstance.GetFundedAccountInfo() + TeleporterInfo.DeployTeleporterMessenger( + ctx, + LocalNetworkInstance.GetPrimaryNetworkInfo(), + teleporterDeployerTransaction, + teleporterDeployerAddress, + teleporterContractAddress, + fundedKey, + ) + for _, subnet := range LocalNetworkInstance.GetAllSubnetsInfo() { + TeleporterInfo.SetTeleporter(teleporterContractAddress, subnet) + TeleporterInfo.InitializeBlockchainID(subnet, fundedKey) + TeleporterInfo.DeployTeleporterRegistry(subnet, fundedKey) + } +}) + +var _ = ginkgo.AfterSuite(func() { + LocalNetworkInstance.TearDownNetwork() + LocalNetworkInstance = nil +}) + +var _ = ginkgo.Describe("[Validator manager integration tests]", func() { + // ICTT tests + + ginkgo.It("Transfer an ERC20 token between two Subnets", + ginkgo.Label(icttLabel, erc20TokenHomeLabel, erc20TokenRemoteLabel), + func() { + icttFlows.ERC20TokenHomeERC20TokenRemote(LocalNetworkInstance, TeleporterInfo) + }) + ginkgo.It("Transfer a native token to an ERC20 token", + ginkgo.Label(icttLabel, nativeTokenHomeLabel, erc20TokenRemoteLabel), + func() { + icttFlows.NativeTokenHomeERC20TokenRemote(LocalNetworkInstance, TeleporterInfo) + }) + ginkgo.It("Transfer a native token to a native token", + ginkgo.Label(icttLabel, nativeTokenHomeLabel, nativeTokenRemoteLabel), + func() { + icttFlows.NativeTokenHomeNativeDestination(LocalNetworkInstance, TeleporterInfo) + }) + ginkgo.It("Transfer an ERC20 token with ERC20TokenHome multi-hop", + ginkgo.Label(icttLabel, erc20TokenHomeLabel, erc20TokenRemoteLabel, multiHopLabel), + func() { + icttFlows.ERC20TokenHomeERC20TokenRemoteMultiHop(LocalNetworkInstance, TeleporterInfo) + }) + ginkgo.It("Transfer a native token with NativeTokenHome multi-hop", + ginkgo.Label(icttLabel, nativeTokenHomeLabel, erc20TokenRemoteLabel, multiHopLabel), + func() { + icttFlows.NativeTokenHomeERC20TokenRemoteMultiHop(LocalNetworkInstance, TeleporterInfo) + }) + ginkgo.It("Transfer an ERC20 token to a native token", + ginkgo.Label(icttLabel, erc20TokenHomeLabel, nativeTokenRemoteLabel), + func() { + icttFlows.ERC20TokenHomeNativeTokenRemote(LocalNetworkInstance, TeleporterInfo) + }) + ginkgo.It("Transfer a native token with ERC20TokenHome multi-hop", + ginkgo.Label(icttLabel, erc20TokenHomeLabel, nativeTokenRemoteLabel, multiHopLabel), + func() { + icttFlows.ERC20TokenHomeNativeTokenRemoteMultiHop(LocalNetworkInstance, TeleporterInfo) + }) + ginkgo.It("Transfer a native token to a native token multi-hop", + ginkgo.Label(icttLabel, nativeTokenHomeLabel, nativeTokenRemoteLabel, multiHopLabel), + func() { + icttFlows.NativeTokenHomeNativeTokenRemoteMultiHop(LocalNetworkInstance, TeleporterInfo) + }) + ginkgo.It("Transfer an ERC20 token using sendAndCall", + ginkgo.Label(icttLabel, erc20TokenHomeLabel, erc20TokenRemoteLabel, sendAndCallLabel), + func() { + icttFlows.ERC20TokenHomeERC20TokenRemoteSendAndCall(LocalNetworkInstance, TeleporterInfo) + }) + ginkgo.It("Registration and collateral checks", + ginkgo.Label(icttLabel, erc20TokenHomeLabel, nativeTokenRemoteLabel, registrationLabel), + func() { + icttFlows.RegistrationAndCollateralCheck(LocalNetworkInstance, TeleporterInfo) + }) + ginkgo.It("Transparent proxy upgrade", + ginkgo.Label(icttLabel, erc20TokenHomeLabel, erc20TokenRemoteLabel, upgradabilityLabel), + func() { + icttFlows.TransparentUpgradeableProxy(LocalNetworkInstance, TeleporterInfo) + }) +}) diff --git a/tests/local/teleporter/teleporter_suite_test.go b/tests/suites/teleporter/teleporter_suite_test.go similarity index 91% rename from tests/local/teleporter/teleporter_suite_test.go rename to tests/suites/teleporter/teleporter_suite_test.go index 99ccd651f..9c97c806e 100644 --- a/tests/local/teleporter/teleporter_suite_test.go +++ b/tests/suites/teleporter/teleporter_suite_test.go @@ -1,3 +1,6 @@ +// Copyright (C) 2023, Ava Labs, Inc. All rights reserved. +// See the file LICENSE for licensing terms. + package teleporter_test import ( @@ -8,7 +11,7 @@ import ( teleporterFlows "github.com/ava-labs/teleporter/tests/flows/teleporter" registryFlows "github.com/ava-labs/teleporter/tests/flows/teleporter/registry" - "github.com/ava-labs/teleporter/tests/local" + localnetwork "github.com/ava-labs/teleporter/tests/network" "github.com/ava-labs/teleporter/tests/utils" deploymentUtils "github.com/ava-labs/teleporter/utils/deployment-utils" "github.com/ethereum/go-ethereum/log" @@ -26,7 +29,7 @@ const ( ) var ( - LocalNetworkInstance *local.LocalNetwork + LocalNetworkInstance *localnetwork.LocalNetwork TeleporterInfo utils.TeleporterTestInfo ) @@ -42,22 +45,26 @@ func TestTeleporter(t *testing.T) { // Define the Teleporter before and after suite functions. var _ = ginkgo.BeforeSuite(func() { // Generate the Teleporter deployment values - teleporterDeployerTransaction, teleporterDeployedBytecode, teleporterDeployerAddress, teleporterContractAddress, err := - deploymentUtils.ConstructKeylessTransaction( - teleporterByteCodeFile, - false, - deploymentUtils.GetDefaultContractCreationGasPrice(), - ) + teleporterDeployerTransaction, + teleporterDeployedBytecode, + teleporterDeployerAddress, + teleporterContractAddress, + err := deploymentUtils.ConstructKeylessTransaction( + teleporterByteCodeFile, + false, + deploymentUtils.GetDefaultContractCreationGasPrice(), + ) Expect(err).Should(BeNil()) // Create the local network instance ctx, cancel := context.WithTimeout(context.Background(), 120*time.Second) defer cancel() - LocalNetworkInstance = local.NewLocalNetwork( + + LocalNetworkInstance = localnetwork.NewLocalNetwork( ctx, "teleporter-test-local-network", warpGenesisTemplateFile, - []local.SubnetSpec{ + []localnetwork.SubnetSpec{ { Name: "A", EVMChainID: 12345, @@ -90,6 +97,7 @@ var _ = ginkgo.BeforeSuite(func() { teleporterContractAddress, fundedKey, ) + for _, subnet := range LocalNetworkInstance.GetAllSubnetsInfo() { TeleporterInfo.SetTeleporter(teleporterContractAddress, subnet) TeleporterInfo.InitializeBlockchainID(subnet, fundedKey) diff --git a/tests/local/validator-manager/validator_manager_suite_test.go b/tests/suites/validator-manager/validator_manager_suite_test.go similarity index 90% rename from tests/local/validator-manager/validator_manager_suite_test.go rename to tests/suites/validator-manager/validator_manager_suite_test.go index 92f7eaf41..ccbd2f103 100644 --- a/tests/local/validator-manager/validator_manager_suite_test.go +++ b/tests/suites/validator-manager/validator_manager_suite_test.go @@ -7,7 +7,7 @@ import ( "time" validatorManagerFlows "github.com/ava-labs/teleporter/tests/flows/validator-manager" - "github.com/ava-labs/teleporter/tests/local" + localnetwork "github.com/ava-labs/teleporter/tests/network" "github.com/ethereum/go-ethereum/log" "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" @@ -19,7 +19,7 @@ const ( ) var ( - LocalNetworkInstance *local.LocalNetwork + LocalNetworkInstance *localnetwork.LocalNetwork ) func TestValidatorManager(t *testing.T) { @@ -36,11 +36,11 @@ var _ = ginkgo.BeforeEach(func() { // Create the local network instance ctx, cancel := context.WithTimeout(context.Background(), 120*time.Second) defer cancel() - LocalNetworkInstance = local.NewLocalNetwork( + LocalNetworkInstance = localnetwork.NewLocalNetwork( ctx, "validator-manager-test-local-network", warpGenesisTemplateFile, - []local.SubnetSpec{ + []localnetwork.SubnetSpec{ { Name: "A", EVMChainID: 12345, diff --git a/tests/utils/chain.go b/tests/utils/chain.go index 2d872fdc2..fc9d6887d 100644 --- a/tests/utils/chain.go +++ b/tests/utils/chain.go @@ -453,15 +453,6 @@ func GetPChainInfo(cChainInfo interfaces.SubnetTestInfo) interfaces.SubnetTestIn } } -func GetTwoSubnets(network interfaces.Network) ( - interfaces.SubnetTestInfo, - interfaces.SubnetTestInfo, -) { - subnets := network.GetSubnetsInfo() - Expect(len(subnets)).Should(BeNumerically(">=", 2)) - return subnets[0], subnets[1] -} - type ChainConfigMap map[string]string // Sets the chain config in customChainConfigs for the specified subnet @@ -570,6 +561,7 @@ func NewSignatureAggregator(apiUri string, subnets []ids.ID) *aggregator.Signatu logging.Info, registry, trackedSubnets, + nil, &cfg, ) Expect(err).Should(BeNil()) diff --git a/tests/utils/constants.go b/tests/utils/constants.go new file mode 100644 index 000000000..3d18fb0c8 --- /dev/null +++ b/tests/utils/constants.go @@ -0,0 +1,8 @@ +package utils + +import "math/big" + +var ( + DefaultERC20RequiredGas = big.NewInt(100_000) + DefaultNativeTokenRequiredGas = big.NewInt(135_000) +) diff --git a/tests/utils/governance.go b/tests/utils/governance.go index 96d03555d..3df3ae29b 100644 --- a/tests/utils/governance.go +++ b/tests/utils/governance.go @@ -40,7 +40,6 @@ func DeployValidatorSetSig( // and we don't want to add the ValidatorSetSig ABI to the subnetInfo func ExecuteValidatorSetSigCallAndVerify( ctx context.Context, - network interfaces.Network, source interfaces.SubnetTestInfo, destination interfaces.SubnetTestInfo, validatorSetSigAddress common.Address, diff --git a/tests/utils/ictt.go b/tests/utils/ictt.go new file mode 100644 index 000000000..d41e801d4 --- /dev/null +++ b/tests/utils/ictt.go @@ -0,0 +1,1091 @@ +// Copyright (C) 2024, Ava Labs, Inc. All rights reserved. +// See the file LICENSE for licensing terms. + +package utils + +import ( + "context" + "crypto/ecdsa" + "math" + "math/big" + + "github.com/ava-labs/avalanchego/ids" + "github.com/ava-labs/subnet-evm/accounts/abi/bind" + "github.com/ava-labs/subnet-evm/core/types" + erc20tokenhome "github.com/ava-labs/teleporter/abi-bindings/go/ictt/TokenHome/ERC20TokenHome" + nativetokenhome "github.com/ava-labs/teleporter/abi-bindings/go/ictt/TokenHome/NativeTokenHome" + tokenhome "github.com/ava-labs/teleporter/abi-bindings/go/ictt/TokenHome/TokenHome" + erc20tokenremote "github.com/ava-labs/teleporter/abi-bindings/go/ictt/TokenRemote/ERC20TokenRemote" + nativetokenremote "github.com/ava-labs/teleporter/abi-bindings/go/ictt/TokenRemote/NativeTokenRemote" + tokenremote "github.com/ava-labs/teleporter/abi-bindings/go/ictt/TokenRemote/TokenRemote" + wrappednativetoken "github.com/ava-labs/teleporter/abi-bindings/go/ictt/WrappedNativeToken" + exampleerc20 "github.com/ava-labs/teleporter/abi-bindings/go/ictt/mocks/ExampleERC20Decimals" + mockERC20SACR "github.com/ava-labs/teleporter/abi-bindings/go/ictt/mocks/MockERC20SendAndCallReceiver" + mockNSACR "github.com/ava-labs/teleporter/abi-bindings/go/ictt/mocks/MockNativeSendAndCallReceiver" + "github.com/ava-labs/teleporter/tests/interfaces" + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/crypto" + "github.com/ethereum/go-ethereum/log" + + . "github.com/onsi/gomega" +) + +// Deployer keys set in the genesis file in order to determine the deployed address in advance. +// The deployed address is set as an admin for the Native Minter precompile. + +var nativeTokenRemoteDeployerKeys = []string{ + // Deployer address: 0x1337cfd2dCff6270615B90938aCB1efE79801704 + // NativeTokenRemote address: 0xAcB633F5B00099c7ec187eB00156c5cd9D854b5B + "aad7440febfc8f9d73a58c3cb1f1754779a566978f9ebffcd4f4698e9b043985", + + // Deployer address: 0xFcec6c0674037f99fa473de09609B4b6D8158863 + // NativeTokenRemote address: 0x962c62B01529ecc0561D85d3fe395921ddC3665B + "81e5e98c89023dabbe43e1081314eaae174330aae6b44c9d1371b6c0bb7ae74a", + + // Deployer address: 0x2e1533d976A675bCD6306deC3B05e9f73e6722Fb + // NativeTokenRemote address: 0x1549B96D9D97F435CA9b25000FEDE3A7e54C0bb9 + "5ded9cacaca7b88d6a3dc24641cfe41ef00186f98e7fa65135eac50fd5977f7a", + + // Deployer address: 0xA638b0a597dc0520e2f20E83cFbeBBCd45a79990 + // NativeTokenRemote address: 0x190110D1228EB2cDd36559b2215A572Dc8592C3d + "a6c530cb407778d10e1f70be6624aa57d0c724f6f9cb585e9744052d7f48ba19", + + // Deployer address: 0x787C079cB0d5A7AA1Cae95d991F76Dce771A432D + // NativeTokenRemote address: 0xf9EF017A764F265A1fD0975bfc200725E41d860E + "e95fa6fd1d2a6b02890b75062bed583ce6256c5b473b3323b93ac4cbf20dbe7a", + + // Deployer address: 0x741D536f5B07bcD43727CD8435389CA36aE5A4Ae + // NativeTokenRemote address: 0x4f3663be6d22B0F19F8617f1A9E9485aB0144Bff + "8a92f3f468ce5b0d99f9aaa55695f93e03dbbb6d5e3faba80f92a7876be740d6", + // Deployer address: 0xd466f12795BA59d0fef389c21fA63c287956fb18 + // NativeTokenRemote address: 0x463a6bE7a5098A5f06435c6c468adD338F15B93A + "ebb7f0cf71e0b6fd880326e5f5061b8456b0aef81901566cbe578b5024852ec9", +} + +var ( + nativeTokenRemoteDeployerKeyIndex = 0 +) + +const NativeTokenDecimals = 18 + +func DeployERC20TokenHome( + ctx context.Context, + teleporter TeleporterTestInfo, + senderKey *ecdsa.PrivateKey, + subnet interfaces.SubnetTestInfo, + teleporterManager common.Address, + tokenAddress common.Address, + tokenHomeDecimals uint8, +) (common.Address, *erc20tokenhome.ERC20TokenHome) { + opts, err := bind.NewKeyedTransactorWithChainID( + senderKey, + subnet.EVMChainID, + ) + Expect(err).Should(BeNil()) + implAddress, tx, erc20TokenHome, err := erc20tokenhome.DeployERC20TokenHome( + opts, + subnet.RPCClient, + teleporter.TeleporterRegistryAddress(subnet), + teleporterManager, + teleporter.GetLatestTeleporterVersion(subnet), + tokenAddress, + tokenHomeDecimals, + ) + Expect(err).Should(BeNil()) + WaitForTransactionSuccess(ctx, subnet, tx.Hash()) + + return implAddress, erc20TokenHome +} + +func DeployERC20TokenRemote( + ctx context.Context, + teleporter TeleporterTestInfo, + senderKey *ecdsa.PrivateKey, + subnet interfaces.SubnetTestInfo, + teleporterManager common.Address, + tokenHomeBlockchainID ids.ID, + tokenHomeAddress common.Address, + tokenHomeDecimals uint8, + tokenName string, + tokenSymbol string, + tokenDecimals uint8, +) (common.Address, *erc20tokenremote.ERC20TokenRemote) { + opts, err := bind.NewKeyedTransactorWithChainID( + senderKey, + subnet.EVMChainID, + ) + Expect(err).Should(BeNil()) + implAddress, tx, erc20TokenRemote, err := erc20tokenremote.DeployERC20TokenRemote( + opts, + subnet.RPCClient, + erc20tokenremote.TokenRemoteSettings{ + TeleporterRegistryAddress: teleporter.TeleporterRegistryAddress(subnet), + TeleporterManager: teleporterManager, + MinTeleporterVersion: teleporter.GetLatestTeleporterVersion(subnet), + TokenHomeBlockchainID: tokenHomeBlockchainID, + TokenHomeAddress: tokenHomeAddress, + TokenHomeDecimals: tokenHomeDecimals, + }, + tokenName, + tokenSymbol, + tokenDecimals, + ) + Expect(err).Should(BeNil()) + + WaitForTransactionSuccess(ctx, subnet, tx.Hash()) + + return implAddress, erc20TokenRemote +} + +func DeployNativeTokenRemote( + ctx context.Context, + teleporter TeleporterTestInfo, + subnet interfaces.SubnetTestInfo, + symbol string, + teleporterManager common.Address, + tokenHomeBlockchainID ids.ID, + tokenHomeAddress common.Address, + tokenHomeDecimals uint8, + initialReserveImbalance *big.Int, + burnedFeesReportingRewardPercentage *big.Int, +) (common.Address, *nativetokenremote.NativeTokenRemote) { + // The NativeTokenRemote needs a unique deployer key, whose nonce 0 is used to deploy the contract. + // The resulting contract address has been added to the genesis file as an admin for the Native Minter precompile. + Expect(nativeTokenRemoteDeployerKeyIndex).Should(BeNumerically("<", len(nativeTokenRemoteDeployerKeys))) + deployerKeyStr := nativeTokenRemoteDeployerKeys[nativeTokenRemoteDeployerKeyIndex] + deployerPK, err := crypto.HexToECDSA(deployerKeyStr) + Expect(err).Should(BeNil()) + + opts, err := bind.NewKeyedTransactorWithChainID( + deployerPK, + subnet.EVMChainID, + ) + Expect(err).Should(BeNil()) + + implAddress, tx, nativeTokenRemote, err := nativetokenremote.DeployNativeTokenRemote( + opts, + subnet.RPCClient, + nativetokenremote.TokenRemoteSettings{ + TeleporterRegistryAddress: teleporter.TeleporterRegistryAddress(subnet), + TeleporterManager: teleporterManager, + MinTeleporterVersion: teleporter.GetLatestTeleporterVersion(subnet), + TokenHomeBlockchainID: tokenHomeBlockchainID, + TokenHomeAddress: tokenHomeAddress, + TokenHomeDecimals: tokenHomeDecimals, + }, + symbol, + initialReserveImbalance, + burnedFeesReportingRewardPercentage, + ) + Expect(err).Should(BeNil()) + WaitForTransactionSuccess(ctx, subnet, tx.Hash()) + + // Increment to the next deployer key so that the next contract deployment succeeds + nativeTokenRemoteDeployerKeyIndex++ + + return implAddress, nativeTokenRemote +} + +func DeployNativeTokenHome( + ctx context.Context, + teleporter TeleporterTestInfo, + senderKey *ecdsa.PrivateKey, + subnet interfaces.SubnetTestInfo, + teleporterManager common.Address, + tokenAddress common.Address, +) (common.Address, *nativetokenhome.NativeTokenHome) { + opts, err := bind.NewKeyedTransactorWithChainID( + senderKey, + subnet.EVMChainID, + ) + Expect(err).Should(BeNil()) + implAddress, tx, nativeTokenHome, err := nativetokenhome.DeployNativeTokenHome( + opts, + subnet.RPCClient, + teleporter.TeleporterRegistryAddress(subnet), + teleporterManager, + teleporter.GetLatestTeleporterVersion(subnet), + tokenAddress, + ) + Expect(err).Should(BeNil()) + WaitForTransactionSuccess(ctx, subnet, tx.Hash()) + + return implAddress, nativeTokenHome +} + +func DeployWrappedNativeToken( + ctx context.Context, + senderKey *ecdsa.PrivateKey, + subnet interfaces.SubnetTestInfo, + tokenSymbol string, +) (common.Address, *wrappednativetoken.WrappedNativeToken) { + opts, err := bind.NewKeyedTransactorWithChainID(senderKey, subnet.EVMChainID) + Expect(err).Should(BeNil()) + + // Deploy mock WAVAX contract + address, tx, token, err := wrappednativetoken.DeployWrappedNativeToken( + opts, + subnet.RPCClient, + tokenSymbol, + ) + Expect(err).Should(BeNil()) + // Wait for the transaction to be mined + WaitForTransactionSuccess(ctx, subnet, tx.Hash()) + + return address, token +} + +func DeployMockNativeSendAndCallReceiver( + ctx context.Context, + senderKey *ecdsa.PrivateKey, + subnet interfaces.SubnetTestInfo, +) (common.Address, *mockNSACR.MockNativeSendAndCallReceiver) { + opts, err := bind.NewKeyedTransactorWithChainID(senderKey, subnet.EVMChainID) + Expect(err).Should(BeNil()) + + // Deploy MockNativeSendAndCallReceiver contract + address, tx, contract, err := mockNSACR.DeployMockNativeSendAndCallReceiver(opts, subnet.RPCClient) + Expect(err).Should(BeNil()) + log.Info("Deployed MockNativeSendAndCallReceiver contract", "address", address.Hex(), "txHash", tx.Hash().Hex()) + + // Wait for the transaction to be mined + WaitForTransactionSuccess(ctx, subnet, tx.Hash()) + + return address, contract +} + +func DeployMockERC20SendAndCallReceiver( + ctx context.Context, + senderKey *ecdsa.PrivateKey, + subnet interfaces.SubnetTestInfo, +) (common.Address, *mockERC20SACR.MockERC20SendAndCallReceiver) { + opts, err := bind.NewKeyedTransactorWithChainID(senderKey, subnet.EVMChainID) + Expect(err).Should(BeNil()) + + // Deploy MockERC20SendAndCallReceiver contract + address, tx, contract, err := mockERC20SACR.DeployMockERC20SendAndCallReceiver(opts, subnet.RPCClient) + Expect(err).Should(BeNil()) + log.Info("Deployed MockERC20SendAndCallReceiver contract", "address", address.Hex(), "txHash", tx.Hash().Hex()) + + // Wait for the transaction to be mined + WaitForTransactionSuccess(ctx, subnet, tx.Hash()) + + return address, contract +} + +func DeployExampleERC20Decimals( + ctx context.Context, + senderKey *ecdsa.PrivateKey, + subnet interfaces.SubnetTestInfo, + tokenDecimals uint8, +) (common.Address, *exampleerc20.ExampleERC20Decimals) { + opts, err := bind.NewKeyedTransactorWithChainID(senderKey, subnet.EVMChainID) + Expect(err).Should(BeNil()) + + // Deploy Mock ERC20 contract + address, tx, token, err := exampleerc20.DeployExampleERC20Decimals(opts, subnet.RPCClient, tokenDecimals) + Expect(err).Should(BeNil()) + log.Info("Deployed Mock ERC20 contract", "address", address.Hex(), "txHash", tx.Hash().Hex()) + + // Wait for the transaction to be mined + WaitForTransactionSuccess(ctx, subnet, tx.Hash()) + + // Check that the deployer has the expected initial balance + senderAddress := crypto.PubkeyToAddress(senderKey.PublicKey) + balance, err := token.BalanceOf(&bind.CallOpts{}, senderAddress) + Expect(err).Should(BeNil()) + Expect(balance).Should(Equal(ExpectedExampleERC20DeployerBalance)) + + return address, token +} + +func RegisterERC20TokenRemoteOnHome( + ctx context.Context, + teleporter TeleporterTestInfo, + homeSubnet interfaces.SubnetTestInfo, + homeAddress common.Address, + remoteSubnet interfaces.SubnetTestInfo, + remoteAddress common.Address, + fundedKey *ecdsa.PrivateKey, +) { + RegisterTokenRemoteOnHome( + ctx, + teleporter, + homeSubnet, + homeAddress, + remoteSubnet, + remoteAddress, + big.NewInt(0), + big.NewInt(1), + false, + fundedKey, + ) +} + +func RegisterTokenRemoteOnHome( + ctx context.Context, + teleporter TeleporterTestInfo, + homeSubnet interfaces.SubnetTestInfo, + homeAddress common.Address, + remoteSubnet interfaces.SubnetTestInfo, + remoteAddress common.Address, + expectedInitialReserveBalance *big.Int, + expectedTokenMultiplier *big.Int, + expectedmultiplyOnRemote bool, + fundedKey *ecdsa.PrivateKey, +) *big.Int { + // Call the remote to send a register message to the home + tokenRemote, err := tokenremote.NewTokenRemote( + remoteAddress, + remoteSubnet.RPCClient, + ) + Expect(err).Should(BeNil()) + + // Deploy a new ERC20 token for testing registering with fees + feeTokenAddress, feeToken := DeployExampleERC20Decimals( + ctx, + fundedKey, + remoteSubnet, + 18, + ) + + // Approve the ERC20TokenHome to spend the tokens + feeAmount := big.NewInt(1e18) + ERC20DecimalsApprove( + ctx, + feeToken, + remoteAddress, + feeAmount, + remoteSubnet, + fundedKey, + ) + + opts, err := bind.NewKeyedTransactorWithChainID(fundedKey, remoteSubnet.EVMChainID) + Expect(err).Should(BeNil()) + + sendRegisterTx, err := tokenRemote.RegisterWithHome( + opts, + tokenremote.TeleporterFeeInfo{ + FeeTokenAddress: feeTokenAddress, + Amount: feeAmount, + }, + ) + Expect(err).Should(BeNil()) + receipt := WaitForTransactionSuccess(ctx, remoteSubnet, sendRegisterTx.Hash()) + + // Relay the register message to the home + receipt = teleporter.RelayTeleporterMessage(ctx, receipt, remoteSubnet, homeSubnet, true, fundedKey) + _, err = GetEventFromLogs( + receipt.Logs, + teleporter.TeleporterMessenger(homeSubnet).ParseMessageExecuted, + ) + if err != nil { + TraceTransactionAndExit(ctx, homeSubnet.RPCClient, receipt.TxHash) + } + + // Check that the remote registered event was emitted + tokenHome, err := tokenhome.NewTokenHome(homeAddress, homeSubnet.RPCClient) + Expect(err).Should(BeNil()) + registerEvent, err := GetEventFromLogs(receipt.Logs, tokenHome.ParseRemoteRegistered) + Expect(err).Should(BeNil()) + Expect(registerEvent.RemoteBlockchainID[:]).Should(Equal(remoteSubnet.BlockchainID[:])) + Expect(registerEvent.RemoteTokenTransferrerAddress).Should(Equal(remoteAddress)) + + // Based on the initial reserve balance of the TokenRemote instance, + // calculate the collateral amount of home tokens needed to collateralize the remote. + collateralNeeded := calculateCollateralNeeded( + expectedInitialReserveBalance, + expectedTokenMultiplier, + expectedmultiplyOnRemote, + ) + ExpectBigEqual(registerEvent.InitialCollateralNeeded, collateralNeeded) + + return collateralNeeded +} + +// AddCollateralToERC20TokenHome adds collateral to the ERC20TokenHome contract +// and verifies the collateral was added successfully. Any excess amount +// is returned to the caller. +func AddCollateralToERC20TokenHome( + ctx context.Context, + subnet interfaces.SubnetTestInfo, + erc20TokenHome *erc20tokenhome.ERC20TokenHome, + erc20TokenHomeAddress common.Address, + exampleERC20 *exampleerc20.ExampleERC20Decimals, + remoteBlockchainID ids.ID, + remoteAddress common.Address, + collateralAmount *big.Int, + senderKey *ecdsa.PrivateKey, +) { + // Approve the ERC20TokenHome to spend the collateral + ERC20DecimalsApprove( + ctx, + exampleERC20, + erc20TokenHomeAddress, + collateralAmount, + subnet, + senderKey, + ) + + // Add collateral to the ERC20TokenHome + opts, err := bind.NewKeyedTransactorWithChainID(senderKey, subnet.EVMChainID) + Expect(err).Should(BeNil()) + tx, err := erc20TokenHome.AddCollateral( + opts, + remoteBlockchainID, + remoteAddress, + collateralAmount, + ) + Expect(err).Should(BeNil()) + receipt := WaitForTransactionSuccess(ctx, subnet, tx.Hash()) + event, err := GetEventFromLogs(receipt.Logs, erc20TokenHome.ParseCollateralAdded) + Expect(err).Should(BeNil()) + Expect(event.RemoteBlockchainID[:]).Should(Equal(remoteBlockchainID[:])) + Expect(event.RemoteTokenTransferrerAddress).Should(Equal(remoteAddress)) + + remoteSettings, err := erc20TokenHome.GetRemoteTokenTransferrerSettings( + &bind.CallOpts{}, + remoteBlockchainID, + remoteAddress) + Expect(err).Should(BeNil()) + if collateralAmount.Cmp(remoteSettings.CollateralNeeded) > 0 { + collateralAmount.Sub(collateralAmount, remoteSettings.CollateralNeeded) + } + ExpectBigEqual(event.Amount, collateralAmount) + ExpectBigEqual(event.Remaining, big.NewInt(0)) +} + +// AddCollateralToNativeTokenHome adds collateral to the NativeTokenHome contract +// and verifies the collateral was added successfully. Any excess amount +// is returned to the caller. +func AddCollateralToNativeTokenHome( + ctx context.Context, + subnet interfaces.SubnetTestInfo, + nativeTokenHome *nativetokenhome.NativeTokenHome, + nativeTokenHomeAddress common.Address, + remoteBlockchainID ids.ID, + remoteAddress common.Address, + collateralAmount *big.Int, + senderKey *ecdsa.PrivateKey, +) { + // Add collateral to the ERC20TokenHome + opts, err := bind.NewKeyedTransactorWithChainID(senderKey, subnet.EVMChainID) + Expect(err).Should(BeNil()) + opts.Value = collateralAmount + + tx, err := nativeTokenHome.AddCollateral( + opts, + remoteBlockchainID, + remoteAddress, + ) + Expect(err).Should(BeNil()) + receipt := WaitForTransactionSuccess(ctx, subnet, tx.Hash()) + event, err := GetEventFromLogs(receipt.Logs, nativeTokenHome.ParseCollateralAdded) + Expect(err).Should(BeNil()) + Expect(event.RemoteBlockchainID[:]).Should(Equal(remoteBlockchainID[:])) + Expect(event.RemoteTokenTransferrerAddress).Should(Equal(remoteAddress)) + remoteSettings, err := nativeTokenHome.GetRemoteTokenTransferrerSettings( + &bind.CallOpts{}, + remoteBlockchainID, + remoteAddress) + Expect(err).Should(BeNil()) + if collateralAmount.Cmp(remoteSettings.CollateralNeeded) > 0 { + collateralAmount.Sub(collateralAmount, remoteSettings.CollateralNeeded) + } + ExpectBigEqual(event.Amount, collateralAmount) + ExpectBigEqual(event.Remaining, big.NewInt(0)) +} + +func SendERC20TokenHome( + ctx context.Context, + subnet interfaces.SubnetTestInfo, + erc20TokenHome *erc20tokenhome.ERC20TokenHome, + erc20TokenHomeAddress common.Address, + token *exampleerc20.ExampleERC20Decimals, + input erc20tokenhome.SendTokensInput, + amount *big.Int, + senderKey *ecdsa.PrivateKey, +) (*types.Receipt, *big.Int) { + // Approve the ERC20TokenHome to spend the tokens + ERC20DecimalsApprove( + ctx, + token, + erc20TokenHomeAddress, + big.NewInt(0).Add(amount, input.PrimaryFee), + subnet, + senderKey, + ) + + // Send the tokens and verify expected events + optsA, err := bind.NewKeyedTransactorWithChainID(senderKey, subnet.EVMChainID) + Expect(err).Should(BeNil()) + tx, err := erc20TokenHome.Send( + optsA, + input, + amount, + ) + Expect(err).Should(BeNil()) + + receipt := WaitForTransactionSuccess(ctx, subnet, tx.Hash()) + event, err := GetEventFromLogs(receipt.Logs, erc20TokenHome.ParseTokensSent) + Expect(err).Should(BeNil()) + Expect(event.Sender).Should(Equal(crypto.PubkeyToAddress(senderKey.PublicKey))) + + // Compute the scaled amount + scaledAmount := GetScaledAmountFromERC20TokenHome( + erc20TokenHome, + input.DestinationBlockchainID, + input.DestinationTokenTransferrerAddress, + amount, + ) + ExpectBigEqual(event.Amount, scaledAmount) + + return receipt, event.Amount +} + +func SendNativeTokenHome( + ctx context.Context, + subnet interfaces.SubnetTestInfo, + nativeTokenHome *nativetokenhome.NativeTokenHome, + nativeTokenHomeAddress common.Address, + wrappedToken *wrappednativetoken.WrappedNativeToken, + input nativetokenhome.SendTokensInput, + amount *big.Int, + senderKey *ecdsa.PrivateKey, +) (*types.Receipt, *big.Int) { + DepositAndApproveWrappedTokenForFees( + ctx, + subnet, + wrappedToken, + input.PrimaryFee, + nativeTokenHomeAddress, + senderKey, + ) + + opts, err := bind.NewKeyedTransactorWithChainID(senderKey, subnet.EVMChainID) + Expect(err).Should(BeNil()) + opts.Value = amount + + tx, err := nativeTokenHome.Send( + opts, + input, + ) + Expect(err).Should(BeNil()) + + receipt := WaitForTransactionSuccess(ctx, subnet, tx.Hash()) + event, err := GetEventFromLogs(receipt.Logs, nativeTokenHome.ParseTokensSent) + Expect(err).Should(BeNil()) + Expect(event.Sender).Should(Equal(crypto.PubkeyToAddress(senderKey.PublicKey))) + + // Compute the scaled amount + scaledAmount := GetScaledAmountFromNativeTokenHome( + nativeTokenHome, + input.DestinationBlockchainID, + input.DestinationTokenTransferrerAddress, + amount, + ) + ExpectBigEqual(event.Amount, scaledAmount) + + return receipt, event.Amount +} + +func SendNativeTokenRemote( + ctx context.Context, + subnet interfaces.SubnetTestInfo, + nativeTokenRemote *nativetokenremote.NativeTokenRemote, + nativeTokenRemoteAddress common.Address, + input nativetokenremote.SendTokensInput, + amount *big.Int, + senderKey *ecdsa.PrivateKey, +) (*types.Receipt, *big.Int) { + DepositAndApproveWrappedTokenForFees( + ctx, + subnet, + nativeTokenRemote, + input.PrimaryFee, + nativeTokenRemoteAddress, + senderKey, + ) + + opts, err := bind.NewKeyedTransactorWithChainID(senderKey, subnet.EVMChainID) + Expect(err).Should(BeNil()) + opts.Value = amount + + tx, err := nativeTokenRemote.Send( + opts, + input, + ) + Expect(err).Should(BeNil()) + + receipt := WaitForTransactionSuccess(ctx, subnet, tx.Hash()) + event, err := GetEventFromLogs(receipt.Logs, nativeTokenRemote.ParseTokensSent) + Expect(err).Should(BeNil()) + Expect(event.Sender).Should(Equal(crypto.PubkeyToAddress(senderKey.PublicKey))) + ExpectBigEqual(event.Amount, amount) + + return receipt, event.Amount +} + +func SendERC20TokenRemote( + ctx context.Context, + subnet interfaces.SubnetTestInfo, + erc20TokenRemote *erc20tokenremote.ERC20TokenRemote, + erc20TokenRemoteAddress common.Address, + input erc20tokenremote.SendTokensInput, + amount *big.Int, + senderKey *ecdsa.PrivateKey, +) (*types.Receipt, *big.Int) { + opts, err := bind.NewKeyedTransactorWithChainID(senderKey, subnet.EVMChainID) + Expect(err).Should(BeNil()) + tx, err := erc20TokenRemote.Approve( + opts, + erc20TokenRemoteAddress, + big.NewInt(0).Add(amount, input.PrimaryFee), + ) + Expect(err).Should(BeNil()) + + WaitForTransactionSuccess(ctx, subnet, tx.Hash()) + + // Transfer the tokens back to subnet A + tx, err = erc20TokenRemote.Send( + opts, + input, + amount, + ) + Expect(err).Should(BeNil()) + + receipt := WaitForTransactionSuccess(ctx, subnet, tx.Hash()) + event, err := GetEventFromLogs(receipt.Logs, erc20TokenRemote.ParseTokensSent) + Expect(err).Should(BeNil()) + Expect(event.Sender).Should(Equal(crypto.PubkeyToAddress(senderKey.PublicKey))) + ExpectBigEqual(event.Amount, amount) + + return receipt, event.Amount +} + +func SendAndCallERC20TokenHome( + ctx context.Context, + subnet interfaces.SubnetTestInfo, + erc20TokenHome *erc20tokenhome.ERC20TokenHome, + erc20TokenHomeAddress common.Address, + exampleToken *exampleerc20.ExampleERC20Decimals, + input erc20tokenhome.SendAndCallInput, + amount *big.Int, + senderKey *ecdsa.PrivateKey, +) (*types.Receipt, *big.Int) { + // Approve the ERC20TokenHome to spend the tokens + ERC20DecimalsApprove( + ctx, + exampleToken, + erc20TokenHomeAddress, + big.NewInt(0).Add(amount, input.PrimaryFee), + subnet, + senderKey, + ) + + // Send the tokens and verify expected events + optsA, err := bind.NewKeyedTransactorWithChainID(senderKey, subnet.EVMChainID) + Expect(err).Should(BeNil()) + tx, err := erc20TokenHome.SendAndCall( + optsA, + input, + amount, + ) + Expect(err).Should(BeNil()) + + receipt := WaitForTransactionSuccess(ctx, subnet, tx.Hash()) + event, err := GetEventFromLogs(receipt.Logs, erc20TokenHome.ParseTokensAndCallSent) + Expect(err).Should(BeNil()) + Expect(event.Input.RecipientContract).Should(Equal(input.RecipientContract)) + + // Computer the scaled amount + scaledAmount := GetScaledAmountFromERC20TokenHome( + erc20TokenHome, + input.DestinationBlockchainID, + input.DestinationTokenTransferrerAddress, + amount, + ) + ExpectBigEqual(event.Amount, scaledAmount) + + return receipt, event.Amount +} + +func SendAndCallNativeTokenHome( + ctx context.Context, + subnet interfaces.SubnetTestInfo, + nativeTokenHome *nativetokenhome.NativeTokenHome, + input nativetokenhome.SendAndCallInput, + amount *big.Int, + senderKey *ecdsa.PrivateKey, +) (*types.Receipt, *big.Int) { + opts, err := bind.NewKeyedTransactorWithChainID(senderKey, subnet.EVMChainID) + Expect(err).Should(BeNil()) + opts.Value = amount + + tx, err := nativeTokenHome.SendAndCall( + opts, + input, + ) + Expect(err).Should(BeNil()) + + receipt := WaitForTransactionSuccess(ctx, subnet, tx.Hash()) + event, err := GetEventFromLogs(receipt.Logs, nativeTokenHome.ParseTokensAndCallSent) + Expect(err).Should(BeNil()) + Expect(event.Input.RecipientContract).Should(Equal(input.RecipientContract)) + + // Compute the scaled amount + remoteSettings, err := nativeTokenHome.GetRemoteTokenTransferrerSettings( + &bind.CallOpts{}, + input.DestinationBlockchainID, + input.DestinationTokenTransferrerAddress) + Expect(err).Should(BeNil()) + + scaledAmount := ApplyTokenScaling( + remoteSettings.TokenMultiplier, + remoteSettings.MultiplyOnRemote, + amount, + ) + ExpectBigEqual(event.Amount, scaledAmount) + + return receipt, event.Amount +} + +func SendAndCallNativeTokenRemote( + ctx context.Context, + subnet interfaces.SubnetTestInfo, + nativeTokenRemote *nativetokenremote.NativeTokenRemote, + input nativetokenremote.SendAndCallInput, + amount *big.Int, + senderKey *ecdsa.PrivateKey, + tokenMultiplier *big.Int, + multiplyOnRemote bool, +) (*types.Receipt, *big.Int) { + opts, err := bind.NewKeyedTransactorWithChainID(senderKey, subnet.EVMChainID) + Expect(err).Should(BeNil()) + opts.Value = amount + + tx, err := nativeTokenRemote.SendAndCall( + opts, + input, + ) + Expect(err).Should(BeNil()) + + transferredAmount := big.NewInt(0).Sub(amount, input.PrimaryFee) + + receipt := WaitForTransactionSuccess(ctx, subnet, tx.Hash()) + event, err := GetEventFromLogs(receipt.Logs, nativeTokenRemote.ParseTokensAndCallSent) + Expect(err).Should(BeNil()) + Expect(event.Input.RecipientContract).Should(Equal(input.RecipientContract)) + ExpectBigEqual(event.Amount, transferredAmount) + + return receipt, event.Amount +} + +func SendAndCallERC20TokenRemote( + ctx context.Context, + subnet interfaces.SubnetTestInfo, + erc20TokenRemote *erc20tokenremote.ERC20TokenRemote, + erc20TokenRemoteAddress common.Address, + input erc20tokenremote.SendAndCallInput, + amount *big.Int, + senderKey *ecdsa.PrivateKey, +) (*types.Receipt, *big.Int) { + opts, err := bind.NewKeyedTransactorWithChainID(senderKey, subnet.EVMChainID) + Expect(err).Should(BeNil()) + tx, err := erc20TokenRemote.Approve( + opts, + erc20TokenRemoteAddress, + big.NewInt(0).Add(amount, input.PrimaryFee), + ) + Expect(err).Should(BeNil()) + + WaitForTransactionSuccess(ctx, subnet, tx.Hash()) + + // Transfer the tokens back to subnet A + tx, err = erc20TokenRemote.SendAndCall( + opts, + input, + amount, + ) + Expect(err).Should(BeNil()) + + receipt := WaitForTransactionSuccess(ctx, subnet, tx.Hash()) + event, err := GetEventFromLogs(receipt.Logs, erc20TokenRemote.ParseTokensAndCallSent) + Expect(err).Should(BeNil()) + Expect(event.Input.RecipientContract).Should(Equal(input.RecipientContract)) + ExpectBigEqual(event.Amount, amount) + + return receipt, event.Amount +} + +// Send a native token from fromTokenTransferrer to toTokenTransferrer via multi-hop through the C-Chain +// Requires that both fromTokenTransferrer and toTokenTransferrer are fully collateralized +// Requires that both fromTokenTransferrer and toTokenTransferrer have the same tokenMultiplier and multiplyOnRemote +// with respect to the original asset on the C-Chain +func SendNativeMultiHopAndVerify( + ctx context.Context, + teleporter TeleporterTestInfo, + sendingKey *ecdsa.PrivateKey, + recipientAddress common.Address, + fromSubnet interfaces.SubnetTestInfo, + fromTokenTransferrer *nativetokenremote.NativeTokenRemote, + fromTokenTransferrerAddress common.Address, + toSubnet interfaces.SubnetTestInfo, + toTokenTransferrer *nativetokenremote.NativeTokenRemote, + toTokenTransferrerAddress common.Address, + cChainInfo interfaces.SubnetTestInfo, + amount *big.Int, + secondaryFeeAmount *big.Int, +) { + input := nativetokenremote.SendTokensInput{ + DestinationBlockchainID: toSubnet.BlockchainID, + DestinationTokenTransferrerAddress: toTokenTransferrerAddress, + Recipient: recipientAddress, + PrimaryFeeTokenAddress: fromTokenTransferrerAddress, + PrimaryFee: big.NewInt(0), + SecondaryFee: secondaryFeeAmount, + RequiredGasLimit: DefaultNativeTokenRequiredGas, + MultiHopFallback: recipientAddress, + } + + // Send tokens through a multi-hop transfer + originReceipt, amount := SendNativeTokenRemote( + ctx, + fromSubnet, + fromTokenTransferrer, + fromTokenTransferrerAddress, + input, + amount, + sendingKey, + ) + + // Relay the first message back to the home chain, in this case C-Chain, + // which then performs the multi-hop transfer to the destination TokenRemote instance. + intermediateReceipt := teleporter.RelayTeleporterMessage( + ctx, + originReceipt, + fromSubnet, + cChainInfo, + true, + sendingKey, + ) + + initialBalance, err := toSubnet.RPCClient.BalanceAt(ctx, recipientAddress, nil) + Expect(err).Should(BeNil()) + + // When we relay the above message to the home chain, a multi-hop transfer + // is performed to the destination TokenRemote instance. Parse for the send tokens event + // and relay to the destination TokenRemote instance. + teleporter.RelayTeleporterMessage( + ctx, + intermediateReceipt, + cChainInfo, + toSubnet, + true, + sendingKey, + ) + + transferredAmount := big.NewInt(0).Sub(amount, input.SecondaryFee) + CheckBalance( + ctx, + recipientAddress, + big.NewInt(0).Add(initialBalance, transferredAmount), + toSubnet.RPCClient, + ) +} + +func SendERC20TokenMultiHopAndVerify( + ctx context.Context, + teleporter TeleporterTestInfo, + fundedKey *ecdsa.PrivateKey, + sendingKey *ecdsa.PrivateKey, + recipientAddress common.Address, + fromSubnet interfaces.SubnetTestInfo, + fromTokenTransferrer *erc20tokenremote.ERC20TokenRemote, + fromTokenTransferrerAddress common.Address, + toSubnet interfaces.SubnetTestInfo, + toTokenTransferrer *erc20tokenremote.ERC20TokenRemote, + toTokenTransferrerAddress common.Address, + cChainInfo interfaces.SubnetTestInfo, + amount *big.Int, + secondaryFeeAmount *big.Int, +) { + // Send tokens to the sender address to have gas for submitting the send tokens transaction + SendNativeTransfer( + ctx, + fromSubnet, + fundedKey, + crypto.PubkeyToAddress(sendingKey.PublicKey), + big.NewInt(1e18), + ) + input := erc20tokenremote.SendTokensInput{ + DestinationBlockchainID: toSubnet.BlockchainID, + DestinationTokenTransferrerAddress: toTokenTransferrerAddress, + Recipient: recipientAddress, + PrimaryFeeTokenAddress: common.Address{}, + PrimaryFee: big.NewInt(0), + SecondaryFee: secondaryFeeAmount, + RequiredGasLimit: DefaultERC20RequiredGas, + MultiHopFallback: recipientAddress, + } + + // Send tokens through a multi-hop transfer + originReceipt, amount := SendERC20TokenRemote( + ctx, + fromSubnet, + fromTokenTransferrer, + fromTokenTransferrerAddress, + input, + amount, + sendingKey, + ) + + // Relay the first message back to the home chain, in this case C-Chain, + // which then performs the multi-hop transfer to the destination TokenRemote instance. + intermediateReceipt := teleporter.RelayTeleporterMessage( + ctx, + originReceipt, + fromSubnet, + cChainInfo, + true, + fundedKey, + ) + _, err := GetEventFromLogs( + intermediateReceipt.Logs, + teleporter.TeleporterMessenger(cChainInfo).ParseMessageExecuted, + ) + if err != nil { + TraceTransactionAndExit(ctx, cChainInfo.RPCClient, intermediateReceipt.TxHash) + } + + initialBalance, err := toTokenTransferrer.BalanceOf(&bind.CallOpts{}, recipientAddress) + Expect(err).Should(BeNil()) + + // When we relay the above message to the home chain, a multi-hop transfer + // is performed to the destination TokenRemote instance. Parse for the send tokens event + // and relay to the destination TokenRemote instance. + remoteReceipt := teleporter.RelayTeleporterMessage( + ctx, + intermediateReceipt, + cChainInfo, + toSubnet, + true, + fundedKey, + ) + _, err = GetEventFromLogs(remoteReceipt.Logs, teleporter.TeleporterMessenger(toSubnet).ParseMessageExecuted) + if err != nil { + TraceTransactionAndExit(ctx, toSubnet.RPCClient, remoteReceipt.TxHash) + } + + transferredAmount := big.NewInt(0).Sub(amount, input.SecondaryFee) + CheckERC20TokenRemoteWithdrawal( + ctx, + toTokenTransferrer, + remoteReceipt, + recipientAddress, + transferredAmount, + ) + + balance, err := toTokenTransferrer.BalanceOf(&bind.CallOpts{}, recipientAddress) + Expect(err).Should(BeNil()) + ExpectBigEqual(balance, big.NewInt(0).Add(initialBalance, transferredAmount)) +} + +func CheckERC20TokenHomeWithdrawal( + ctx context.Context, + erc20TokenHomeAddress common.Address, + exampleERC20 *exampleerc20.ExampleERC20Decimals, + receipt *types.Receipt, + expectedRecipientAddress common.Address, + expectedAmount *big.Int, +) { + homeTransferEvent, err := GetEventFromLogs(receipt.Logs, exampleERC20.ParseTransfer) + Expect(err).Should(BeNil()) + Expect(homeTransferEvent.From).Should(Equal(erc20TokenHomeAddress)) + Expect(homeTransferEvent.To).Should(Equal(expectedRecipientAddress)) + ExpectBigEqual(homeTransferEvent.Value, expectedAmount) +} + +func CheckERC20TokenRemoteWithdrawal( + ctx context.Context, + erc20TokenRemote *erc20tokenremote.ERC20TokenRemote, + receipt *types.Receipt, + expectedRecipientAddress common.Address, + expectedAmount *big.Int, +) { + transferEvent, err := GetEventFromLogs(receipt.Logs, erc20TokenRemote.ParseTransfer) + Expect(err).Should(BeNil()) + Expect(transferEvent.From).Should(Equal(common.Address{})) + Expect(transferEvent.To).Should(Equal(expectedRecipientAddress)) + ExpectBigEqual(transferEvent.Value, expectedAmount) +} + +func CheckNativeTokenHomeWithdrawal( + ctx context.Context, + nativeTokenHomeAddress common.Address, + wrappedNativeToken *wrappednativetoken.WrappedNativeToken, + receipt *types.Receipt, + expectedAmount *big.Int, +) { + withdrawalEvent, err := GetEventFromLogs(receipt.Logs, wrappedNativeToken.ParseWithdrawal) + Expect(err).Should(BeNil()) + Expect(withdrawalEvent.Sender).Should(Equal(nativeTokenHomeAddress)) + ExpectBigEqual(withdrawalEvent.Amount, expectedAmount) +} + +func GetTokenMultiplier( + decimalsShift uint8, +) *big.Int { + return big.NewInt(int64(math.Pow10(int(decimalsShift)))) +} + +type WrappedToken interface { + Deposit(opts *bind.TransactOpts) (*types.Transaction, error) + Approve(opts *bind.TransactOpts, spender common.Address, amount *big.Int) (*types.Transaction, error) +} + +func DepositAndApproveWrappedTokenForFees( + ctx context.Context, + subnet interfaces.SubnetTestInfo, + wrappedToken WrappedToken, + amount *big.Int, + spender common.Address, + senderKey *ecdsa.PrivateKey, +) { + if amount.Cmp(big.NewInt(0)) == 0 { + return + } + + // Deposit the native tokens for paying the fee + opts, err := bind.NewKeyedTransactorWithChainID(senderKey, subnet.EVMChainID) + Expect(err).Should(BeNil()) + opts.Value = amount + tx, err := wrappedToken.Deposit(opts) + Expect(err).Should(BeNil()) + + _ = WaitForTransactionSuccess(ctx, subnet, tx.Hash()) + + opts, err = bind.NewKeyedTransactorWithChainID(senderKey, subnet.EVMChainID) + Expect(err).Should(BeNil()) + tx, err = wrappedToken.Approve(opts, spender, amount) + Expect(err).Should(BeNil()) + + _ = WaitForTransactionSuccess(ctx, subnet, tx.Hash()) +} + +func ERC20DecimalsApprove( + ctx context.Context, + token *exampleerc20.ExampleERC20Decimals, + spender common.Address, + amount *big.Int, + subnet interfaces.SubnetTestInfo, + senderKey *ecdsa.PrivateKey, +) { + opts, err := bind.NewKeyedTransactorWithChainID(senderKey, subnet.EVMChainID) + Expect(err).Should(BeNil()) + tx, err := token.Approve(opts, spender, amount) + Expect(err).Should(BeNil()) + log.Info("Approved ERC20", "spender", spender.Hex(), "txHash", tx.Hash().Hex()) + + WaitForTransactionSuccess(ctx, subnet, tx.Hash()) +} diff --git a/tests/utils/teleporter.go b/tests/utils/teleporter.go index 3c92413b7..a140d51eb 100644 --- a/tests/utils/teleporter.go +++ b/tests/utils/teleporter.go @@ -188,15 +188,173 @@ func (t TeleporterTestInfo) RelayTeleporterMessage( return receipt } -// -// Deployment utils -// +func (t TeleporterTestInfo) SendExampleCrossChainMessageAndVerify( + ctx context.Context, + source interfaces.SubnetTestInfo, + sourceExampleMessenger *testmessenger.TestMessenger, + destination interfaces.SubnetTestInfo, + destExampleMessengerAddress common.Address, + destExampleMessenger *testmessenger.TestMessenger, + senderKey *ecdsa.PrivateKey, + message string, + expectSuccess bool, +) { + // Call the example messenger contract on Subnet A + optsA, err := bind.NewKeyedTransactorWithChainID(senderKey, source.EVMChainID) + Expect(err).Should(BeNil()) + tx, err := sourceExampleMessenger.SendMessage( + optsA, + destination.BlockchainID, + destExampleMessengerAddress, + common.BigToAddress(common.Big0), + big.NewInt(0), + testmessenger.SendMessageRequiredGas, + message, + ) + Expect(err).Should(BeNil()) + + // Wait for the transaction to be mined + receipt := WaitForTransactionSuccess(ctx, source, tx.Hash()) + + sourceTeleporterMessenger := t.TeleporterMessenger(source) + destTeleporterMessenger := t.TeleporterMessenger(destination) + + event, err := GetEventFromLogs(receipt.Logs, sourceTeleporterMessenger.ParseSendCrossChainMessage) + Expect(err).Should(BeNil()) + Expect(event.DestinationBlockchainID[:]).Should(Equal(destination.BlockchainID[:])) + + teleporterMessageID := event.MessageID + + // + // Relay the message to the destination + // + receipt = t.RelayTeleporterMessage(ctx, receipt, source, destination, true, senderKey) + + // + // Check Teleporter message received on the destination + // + delivered, err := destTeleporterMessenger.MessageReceived( + &bind.CallOpts{}, teleporterMessageID, + ) + Expect(err).Should(BeNil()) + Expect(delivered).Should(BeTrue()) + + if expectSuccess { + // Check that message execution was successful + messageExecutedEvent, err := GetEventFromLogs( + receipt.Logs, + destTeleporterMessenger.ParseMessageExecuted, + ) + Expect(err).Should(BeNil()) + Expect(messageExecutedEvent.MessageID[:]).Should(Equal(teleporterMessageID[:])) + } else { + // Check that message execution failed + messageExecutionFailedEvent, err := GetEventFromLogs( + receipt.Logs, + destTeleporterMessenger.ParseMessageExecutionFailed, + ) + Expect(err).Should(BeNil()) + Expect(messageExecutionFailedEvent.MessageID[:]).Should(Equal(teleporterMessageID[:])) + } + + // + // Verify we received the expected string + // + _, currMessage, err := destExampleMessenger.GetCurrentMessage(&bind.CallOpts{}, source.BlockchainID) + Expect(err).Should(BeNil()) + if expectSuccess { + Expect(currMessage).Should(Equal(message)) + } else { + Expect(currMessage).ShouldNot(Equal(message)) + } +} + +func (t TeleporterTestInfo) AddProtocolVersionAndWaitForAcceptance( + ctx context.Context, + subnet interfaces.SubnetTestInfo, + newTeleporterAddress common.Address, + senderKey *ecdsa.PrivateKey, + unsignedMessage *avalancheWarp.UnsignedMessage, +) { + signedWarpMsg := GetSignedMessage(ctx, subnet, subnet, unsignedMessage.ID()) + log.Info("Got signed warp message", "messageID", signedWarpMsg.ID()) + + // Construct tx to add protocol version and send to destination chain + signedTx := CreateAddProtocolVersionTransaction( + ctx, + signedWarpMsg, + t.TeleporterRegistryAddress(subnet), + senderKey, + subnet, + ) + + curLatestVersion := t.GetLatestTeleporterVersion(subnet) + expectedLatestVersion := big.NewInt(curLatestVersion.Int64() + 1) + + // Wait for tx to be accepted, and verify events emitted + receipt := SendTransactionAndWaitForSuccess(ctx, subnet, signedTx) + teleporterRegistry := t.TeleporterRegistry(subnet) + addProtocolVersionEvent, err := GetEventFromLogs(receipt.Logs, teleporterRegistry.ParseAddProtocolVersion) + Expect(err).Should(BeNil()) + Expect(addProtocolVersionEvent.Version.Cmp(expectedLatestVersion)).Should(Equal(0)) + Expect(addProtocolVersionEvent.ProtocolAddress).Should(Equal(newTeleporterAddress)) + + versionUpdatedEvent, err := GetEventFromLogs(receipt.Logs, teleporterRegistry.ParseLatestVersionUpdated) + Expect(err).Should(BeNil()) + Expect(versionUpdatedEvent.OldVersion.Cmp(curLatestVersion)).Should(Equal(0)) + Expect(versionUpdatedEvent.NewVersion.Cmp(expectedLatestVersion)).Should(Equal(0)) +} + +func (t TeleporterTestInfo) GetLatestTeleporterVersion(subnet interfaces.SubnetTestInfo) *big.Int { + version, err := t.TeleporterRegistry(subnet).LatestVersion(&bind.CallOpts{}) + Expect(err).Should(BeNil()) + return version +} + +func (t TeleporterTestInfo) ClearReceiptQueue( + ctx context.Context, + fundedKey *ecdsa.PrivateKey, + source interfaces.SubnetTestInfo, + destination interfaces.SubnetTestInfo, +) { + sourceTeleporterMessenger := t.TeleporterMessenger(source) + outstandReceiptCount := GetOutstandingReceiptCount( + t.TeleporterMessenger(source), + destination.BlockchainID, + ) + for outstandReceiptCount.Cmp(big.NewInt(0)) != 0 { + log.Info("Emptying receipt queue", "remainingReceipts", outstandReceiptCount.String()) + // Send message from Subnet B to Subnet A to trigger the "regular" method of delivering receipts. + // The next message from B->A will contain the same receipts that were manually sent in the above steps, + // but they should not be processed again on Subnet A. + sendCrossChainMessageInput := teleportermessenger.TeleporterMessageInput{ + DestinationBlockchainID: destination.BlockchainID, + DestinationAddress: common.HexToAddress("0x1111111111111111111111111111111111111111"), + RequiredGasLimit: big.NewInt(1), + FeeInfo: teleportermessenger.TeleporterFeeInfo{ + FeeTokenAddress: common.Address{}, + Amount: big.NewInt(0), + }, + AllowedRelayerAddresses: []common.Address{}, + Message: []byte{1, 2, 3, 4}, + } + + // This message will also have the same receipts as the previous message + receipt, _ := SendCrossChainMessageAndWaitForAcceptance( + ctx, sourceTeleporterMessenger, source, destination, sendCrossChainMessageInput, fundedKey) + + // Relay message + t.RelayTeleporterMessage(ctx, receipt, source, destination, true, fundedKey) + + outstandReceiptCount = GetOutstandingReceiptCount(sourceTeleporterMessenger, destination.BlockchainID) + } + log.Info("Receipt queue emptied") +} // Deploys a new version of Teleporter and returns its address // Does NOT modify the global Teleporter contract address to provide greater testing flexibility. -func DeployNewTeleporterVersion( +func (t TeleporterTestInfo) DeployNewTeleporterVersion( ctx context.Context, - teleporterInfo TeleporterTestInfo, subnet interfaces.SubnetTestInfo, fundedKey *ecdsa.PrivateKey, teleporterByteCodeFile string, @@ -213,7 +371,7 @@ func DeployNewTeleporterVersion( ) Expect(err).Should(BeNil()) - teleporterInfo.DeployTeleporterMessenger( + t.DeployTeleporterMessenger( ctx, subnet, teleporterDeployerTransaction, @@ -225,6 +383,10 @@ func DeployNewTeleporterVersion( return teleporterContractAddress } +// +// Deployment utils +// + func DeployTestMessenger( ctx context.Context, senderKey *ecdsa.PrivateKey, @@ -406,49 +568,6 @@ func SendSpecifiedReceiptsAndWaitForAcceptance( return receipt, event.MessageID } -func AddProtocolVersionAndWaitForAcceptance( - ctx context.Context, - sourceTeleporterInfo ChainTeleporterInfo, - subnet interfaces.SubnetTestInfo, - newTeleporterAddress common.Address, - senderKey *ecdsa.PrivateKey, - unsignedMessage *avalancheWarp.UnsignedMessage, -) { - signedWarpMsg := GetSignedMessage(ctx, subnet, subnet, unsignedMessage.ID()) - log.Info("Got signed warp message", "messageID", signedWarpMsg.ID()) - - // Construct tx to add protocol version and send to destination chain - signedTx := CreateAddProtocolVersionTransaction( - ctx, - signedWarpMsg, - sourceTeleporterInfo.TeleporterRegistryAddress, - senderKey, - subnet, - ) - - curLatestVersion, err := sourceTeleporterInfo.TeleporterRegistry.LatestVersion(&bind.CallOpts{}) - Expect(err).Should(BeNil()) - expectedLatestVersion := big.NewInt(curLatestVersion.Int64() + 1) - - // Wait for tx to be accepted, and verify events emitted - receipt := SendTransactionAndWaitForSuccess(ctx, subnet, signedTx) - addProtocolVersionEvent, err := GetEventFromLogs( - receipt.Logs, - sourceTeleporterInfo.TeleporterRegistry.ParseAddProtocolVersion, - ) - Expect(err).Should(BeNil()) - Expect(addProtocolVersionEvent.Version.Cmp(expectedLatestVersion)).Should(Equal(0)) - Expect(addProtocolVersionEvent.ProtocolAddress).Should(Equal(newTeleporterAddress)) - - versionUpdatedEvent, err := GetEventFromLogs( - receipt.Logs, - sourceTeleporterInfo.TeleporterRegistry.ParseLatestVersionUpdated, - ) - Expect(err).Should(BeNil()) - Expect(versionUpdatedEvent.OldVersion.Cmp(curLatestVersion)).Should(Equal(0)) - Expect(versionUpdatedEvent.NewVersion.Cmp(expectedLatestVersion)).Should(Equal(0)) -} - func SendCrossChainMessageAndWaitForAcceptance( ctx context.Context, sourceTeleporterMessenger *teleportermessenger.TeleporterMessenger, @@ -494,49 +613,6 @@ func CheckReceiptReceived( return false } -func ClearReceiptQueue( - ctx context.Context, - teleporterInfo TeleporterTestInfo, - source interfaces.SubnetTestInfo, - destination interfaces.SubnetTestInfo, - fundedKey *ecdsa.PrivateKey, -) { - outstandReceiptCount := GetOutstandingReceiptCount( - teleporterInfo.TeleporterMessenger(source), - destination.BlockchainID, - ) - for outstandReceiptCount.Cmp(big.NewInt(0)) != 0 { - log.Info("Emptying receipt queue", "remainingReceipts", outstandReceiptCount.String()) - // Send message from Subnet B to Subnet A to trigger the "regular" method of delivering receipts. - // The next message from B->A will contain the same receipts that were manually sent in the above steps, - // but they should not be processed again on Subnet A. - sendCrossChainMessageInput := teleportermessenger.TeleporterMessageInput{ - DestinationBlockchainID: destination.BlockchainID, - DestinationAddress: common.HexToAddress("0x1111111111111111111111111111111111111111"), - RequiredGasLimit: big.NewInt(1), - FeeInfo: teleportermessenger.TeleporterFeeInfo{ - FeeTokenAddress: common.Address{}, - Amount: big.NewInt(0), - }, - AllowedRelayerAddresses: []common.Address{}, - Message: []byte{1, 2, 3, 4}, - } - - // This message will also have the same receipts as the previous message - receipt, _ := SendCrossChainMessageAndWaitForAcceptance( - ctx, teleporterInfo.TeleporterMessenger(source), source, destination, sendCrossChainMessageInput, fundedKey) - - // Relay message - teleporterInfo.RelayTeleporterMessage(ctx, receipt, source, destination, true, fundedKey) - - outstandReceiptCount = GetOutstandingReceiptCount( - teleporterInfo.TeleporterMessenger(source), - destination.BlockchainID, - ) - } - log.Info("Receipt queue emptied") -} - func GetOutstandingReceiptCount( teleporterMessenger *teleportermessenger.TeleporterMessenger, destinationBlockchainID ids.ID, @@ -546,85 +622,6 @@ func GetOutstandingReceiptCount( return size } -func SendExampleCrossChainMessageAndVerify( - ctx context.Context, - teleporterInfo TeleporterTestInfo, - source interfaces.SubnetTestInfo, - sourceExampleMessenger *testmessenger.TestMessenger, - destination interfaces.SubnetTestInfo, - destExampleMessengerAddress common.Address, - destExampleMessenger *testmessenger.TestMessenger, - senderKey *ecdsa.PrivateKey, - message string, - expectSuccess bool, -) { - // Call the example messenger contract on Subnet A - optsA, err := bind.NewKeyedTransactorWithChainID(senderKey, source.EVMChainID) - Expect(err).Should(BeNil()) - tx, err := sourceExampleMessenger.SendMessage( - optsA, - destination.BlockchainID, - destExampleMessengerAddress, - common.BigToAddress(common.Big0), - big.NewInt(0), - testmessenger.SendMessageRequiredGas, - message, - ) - Expect(err).Should(BeNil()) - - // Wait for the transaction to be mined - receipt := WaitForTransactionSuccess(ctx, source, tx.Hash()) - - event, err := GetEventFromLogs(receipt.Logs, teleporterInfo.TeleporterMessenger(source).ParseSendCrossChainMessage) - Expect(err).Should(BeNil()) - Expect(event.DestinationBlockchainID[:]).Should(Equal(destination.BlockchainID[:])) - - teleporterMessageID := event.MessageID - - // - // Relay the message to the destination - // - receipt = teleporterInfo.RelayTeleporterMessage(ctx, receipt, source, destination, true, senderKey) - - // - // Check Teleporter message received on the destination - // - delivered, err := teleporterInfo.TeleporterMessenger(destination).MessageReceived( - &bind.CallOpts{}, teleporterMessageID, - ) - Expect(err).Should(BeNil()) - Expect(delivered).Should(BeTrue()) - - if expectSuccess { - // Check that message execution was successful - messageExecutedEvent, err := GetEventFromLogs( - receipt.Logs, - teleporterInfo.TeleporterMessenger(destination).ParseMessageExecuted, - ) - Expect(err).Should(BeNil()) - Expect(messageExecutedEvent.MessageID[:]).Should(Equal(teleporterMessageID[:])) - } else { - // Check that message execution failed - messageExecutionFailedEvent, err := GetEventFromLogs( - receipt.Logs, - teleporterInfo.TeleporterMessenger(destination).ParseMessageExecutionFailed, - ) - Expect(err).Should(BeNil()) - Expect(messageExecutionFailedEvent.MessageID[:]).Should(Equal(teleporterMessageID[:])) - } - - // - // Verify we received the expected string - // - _, currMessage, err := destExampleMessenger.GetCurrentMessage(&bind.CallOpts{}, source.BlockchainID) - Expect(err).Should(BeNil()) - if expectSuccess { - Expect(currMessage).Should(Equal(message)) - } else { - Expect(currMessage).ShouldNot(Equal(message)) - } -} - // // Transaction utils // diff --git a/tests/utils/token_scaling.go b/tests/utils/token_scaling.go new file mode 100644 index 000000000..7c09bbec6 --- /dev/null +++ b/tests/utils/token_scaling.go @@ -0,0 +1,106 @@ +package utils + +import ( + "math/big" + + "github.com/ava-labs/avalanchego/ids" + "github.com/ava-labs/subnet-evm/accounts/abi/bind" + erc20tokenhome "github.com/ava-labs/teleporter/abi-bindings/go/ictt/TokenHome/ERC20TokenHome" + nativetokenhome "github.com/ava-labs/teleporter/abi-bindings/go/ictt/TokenHome/NativeTokenHome" + "github.com/ethereum/go-ethereum/common" + + . "github.com/onsi/gomega" +) + +// ApplyTokenScaling applies token scaling to the given amount of home tokens. +// Token scaling is applied when sending tokens from the home to the TokenRemote instances. +func ApplyTokenScaling( + tokenMultiplier *big.Int, + multiplyOnRemote bool, + homeTokenAmount *big.Int, +) *big.Int { + return scaleTokens(tokenMultiplier, multiplyOnRemote, homeTokenAmount, true) +} + +// RemoveTokenScaling removes token scaling from the given amount of remote tokens. +// Token scaling is removed when sending tokens from the remote back to the TokenHome instance. +func RemoveTokenScaling( + tokenMultiplier *big.Int, + multiplyOnRemote bool, + remoteTokenAmount *big.Int, +) *big.Int { + return scaleTokens(tokenMultiplier, multiplyOnRemote, remoteTokenAmount, false) +} + +func scaleTokens( + tokenMultiplier *big.Int, + multiplyOnRemote bool, + amount *big.Int, + isSendToRemote bool, +) *big.Int { + // Multiply when multiplyOnRemote and isSendToRemote are + // both true or both false. + if multiplyOnRemote == isSendToRemote { + return big.NewInt(0).Mul(amount, tokenMultiplier) + } + + return big.NewInt(0).Div(amount, tokenMultiplier) +} + +// GetScaledAmountFromERC20TokenHome returns the scaled amount of remote tokens that +// will be sent to the remote token transferrer for an amount of home tokens. +func GetScaledAmountFromERC20TokenHome( + erc20TokenHome *erc20tokenhome.ERC20TokenHome, + remoteBlockchainID ids.ID, + remoteAddress common.Address, + homeTokenAmount *big.Int, +) *big.Int { + remoteSettings, err := erc20TokenHome.GetRemoteTokenTransferrerSettings( + &bind.CallOpts{}, + remoteBlockchainID, + remoteAddress, + ) + Expect(err).Should(BeNil()) + + return ApplyTokenScaling( + remoteSettings.TokenMultiplier, + remoteSettings.MultiplyOnRemote, + homeTokenAmount, + ) +} + +// GetScaledAmountFromNativeTokenHome returns the scaled amount of tokens that will be sent to +// the remote token transferrer for corresponding amount of home tokens. +func GetScaledAmountFromNativeTokenHome( + nativeTokenHome *nativetokenhome.NativeTokenHome, + remoteBlockchainID ids.ID, + remoteAddress common.Address, + amount *big.Int, +) *big.Int { + remoteSettings, err := nativeTokenHome.GetRemoteTokenTransferrerSettings( + &bind.CallOpts{}, + remoteBlockchainID, + remoteAddress, + ) + Expect(err).Should(BeNil()) + + return ApplyTokenScaling( + remoteSettings.TokenMultiplier, + remoteSettings.MultiplyOnRemote, + amount, + ) +} + +func calculateCollateralNeeded( + initialReserveImbalance *big.Int, + tokenMultiplier *big.Int, + multiplyOnRemote bool, +) *big.Int { + collateralNeeded := RemoveTokenScaling(tokenMultiplier, multiplyOnRemote, initialReserveImbalance) + + remainder := big.NewInt(0).Mod(collateralNeeded, tokenMultiplier) + if multiplyOnRemote && (remainder.Cmp(big.NewInt(0)) != 0) { + collateralNeeded.Add(collateralNeeded, big.NewInt(1)) + } + return collateralNeeded +} diff --git a/tests/utils/validator_manager.go b/tests/utils/validator_manager.go index 050ab32c7..754f6a367 100644 --- a/tests/utils/validator_manager.go +++ b/tests/utils/validator_manager.go @@ -25,6 +25,7 @@ import ( warpMessage "github.com/ava-labs/avalanchego/vms/platformvm/warp/message" warpPayload "github.com/ava-labs/avalanchego/vms/platformvm/warp/payload" "github.com/ava-labs/avalanchego/vms/secp256k1fx" + pwallet "github.com/ava-labs/avalanchego/wallet/chain/p/wallet" "github.com/ava-labs/awm-relayer/signature-aggregator/aggregator" "github.com/ava-labs/subnet-evm/accounts/abi/bind" "github.com/ava-labs/subnet-evm/core/types" @@ -286,7 +287,7 @@ func InitializeNativeTokenValidatorSet( pChainInfo interfaces.SubnetTestInfo, validatorManager *nativetokenstakingmanager.NativeTokenStakingManager, validatorManagerAddress common.Address, - network interfaces.LocalNetwork, + networkID uint32, signatureAggregator *aggregator.SignatureAggregator, nodes []Node, ) []ids.ID { @@ -323,7 +324,7 @@ func InitializeNativeTokenValidatorSet( subnetConversionID, subnetInfo, pChainInfo, - network, + networkID, signatureAggregator, ) // Deliver the Warp message to the subnet @@ -360,7 +361,7 @@ func InitializeERC20TokenValidatorSet( pChainInfo interfaces.SubnetTestInfo, validatorManager *erc20tokenstakingmanager.ERC20TokenStakingManager, validatorManagerAddress common.Address, - network interfaces.LocalNetwork, + networkID uint32, signatureAggregator *aggregator.SignatureAggregator, nodes []Node, ) []ids.ID { @@ -397,7 +398,7 @@ func InitializeERC20TokenValidatorSet( subnetConversionID, subnetInfo, pChainInfo, - network, + networkID, signatureAggregator, ) @@ -435,7 +436,7 @@ func InitializePoAValidatorSet( pChainInfo interfaces.SubnetTestInfo, validatorManager *poavalidatormanager.PoAValidatorManager, validatorManagerAddress common.Address, - network interfaces.LocalNetwork, + networkID uint32, signatureAggregator *aggregator.SignatureAggregator, nodes []Node, ) []ids.ID { @@ -472,7 +473,7 @@ func InitializePoAValidatorSet( subnetConversionID, subnetInfo, pChainInfo, - network, + networkID, signatureAggregator, ) // Deliver the Warp message to the subnet @@ -771,7 +772,6 @@ func CallWarpReceiver( func InitializeAndCompleteNativeValidatorRegistration( ctx context.Context, - network interfaces.LocalNetwork, signatureAggregator *aggregator.SignatureAggregator, fundedKey *ecdsa.PrivateKey, subnetInfo interfaces.SubnetTestInfo, @@ -780,6 +780,8 @@ func InitializeAndCompleteNativeValidatorRegistration( stakingManagerContractAddress common.Address, expiry uint64, node Node, + pchainWallet pwallet.Wallet, + networkID uint32, ) ids.ID { stakeAmount, err := stakingManager.WeightToValue( &bind.CallOpts{}, @@ -801,13 +803,13 @@ func InitializeAndCompleteNativeValidatorRegistration( // (Sending to the P-Chain will be skipped for now) signedWarpMessage := ConstructSignedWarpMessage(ctx, receipt, subnetInfo, pChainInfo) - _, err = network.GetPChainWallet().IssueRegisterSubnetValidatorTx( + _, err = pchainWallet.IssueRegisterSubnetValidatorTx( 100*units.Avax, node.NodePoP.ProofOfPossession, signedWarpMessage.Bytes(), ) Expect(err).Should(BeNil()) - PChainProposerVMWorkaround(network) + PChainProposerVMWorkaround(pchainWallet) AdvanceProposerVM(ctx, subnetInfo, fundedKey, 5) // Construct a SubnetValidatorRegistrationMessage Warp message from the P-Chain @@ -819,7 +821,7 @@ func InitializeAndCompleteNativeValidatorRegistration( true, subnetInfo, pChainInfo, - network, + networkID, signatureAggregator, ) @@ -844,7 +846,6 @@ func InitializeAndCompleteNativeValidatorRegistration( func InitializeAndCompleteERC20ValidatorRegistration( ctx context.Context, - network interfaces.LocalNetwork, signatureAggregator *aggregator.SignatureAggregator, fundedKey *ecdsa.PrivateKey, subnetInfo interfaces.SubnetTestInfo, @@ -854,6 +855,8 @@ func InitializeAndCompleteERC20ValidatorRegistration( erc20 *exampleerc20.ExampleERC20, expiry uint64, node Node, + pchainWallet pwallet.Wallet, + networkID uint32, ) ids.ID { stakeAmount, err := stakingManager.WeightToValue( &bind.CallOpts{}, @@ -878,13 +881,13 @@ func InitializeAndCompleteERC20ValidatorRegistration( // Gather subnet-evm Warp signatures for the RegisterSubnetValidatorMessage & relay to the P-Chain signedWarpMessage := ConstructSignedWarpMessage(ctx, receipt, subnetInfo, pChainInfo) - _, err = network.GetPChainWallet().IssueRegisterSubnetValidatorTx( + _, err = pchainWallet.IssueRegisterSubnetValidatorTx( 100*units.Avax, node.NodePoP.ProofOfPossession, signedWarpMessage.Bytes(), ) Expect(err).Should(BeNil()) - PChainProposerVMWorkaround(network) + PChainProposerVMWorkaround(pchainWallet) AdvanceProposerVM(ctx, subnetInfo, fundedKey, 5) // Construct a SubnetValidatorRegistrationMessage Warp message from the P-Chain @@ -896,7 +899,7 @@ func InitializeAndCompleteERC20ValidatorRegistration( true, subnetInfo, pChainInfo, - network, + networkID, signatureAggregator, ) @@ -921,7 +924,6 @@ func InitializeAndCompleteERC20ValidatorRegistration( func InitializeAndCompletePoAValidatorRegistration( ctx context.Context, - network interfaces.LocalNetwork, signatureAggregator *aggregator.SignatureAggregator, ownerKey *ecdsa.PrivateKey, fundedKey *ecdsa.PrivateKey, @@ -931,6 +933,8 @@ func InitializeAndCompletePoAValidatorRegistration( validatorManagerAddress common.Address, expiry uint64, node Node, + pchainWallet pwallet.Wallet, + networkID uint32, ) ids.ID { // Initiate validator registration receipt, validationID := InitializePoAValidatorRegistration( @@ -945,13 +949,13 @@ func InitializeAndCompletePoAValidatorRegistration( // Gather subnet-evm Warp signatures for the RegisterSubnetValidatorMessage & relay to the P-Chain signedWarpMessage := ConstructSignedWarpMessage(ctx, receipt, subnetInfo, pChainInfo) - _, err := network.GetPChainWallet().IssueRegisterSubnetValidatorTx( + _, err := pchainWallet.IssueRegisterSubnetValidatorTx( 100*units.Avax, node.NodePoP.ProofOfPossession, signedWarpMessage.Bytes(), ) Expect(err).Should(BeNil()) - PChainProposerVMWorkaround(network) + PChainProposerVMWorkaround(pchainWallet) AdvanceProposerVM(ctx, subnetInfo, fundedKey, 5) // Construct a SubnetValidatorRegistrationMessage Warp message from the P-Chain @@ -963,7 +967,7 @@ func InitializeAndCompletePoAValidatorRegistration( true, subnetInfo, pChainInfo, - network, + networkID, signatureAggregator, ) @@ -990,7 +994,7 @@ func ConstructUptimeProofMessage( validationID ids.ID, uptime uint64, subnet interfaces.SubnetTestInfo, - network interfaces.LocalNetwork, + networkID uint32, signatureAggregator *aggregator.SignatureAggregator, ) *avalancheWarp.Message { uptimePayload, err := messages.NewValidatorUptime(validationID, uptime) @@ -998,7 +1002,7 @@ func ConstructUptimeProofMessage( addressedCall, err := warpPayload.NewAddressedCall(nil, uptimePayload.Bytes()) Expect(err).Should(BeNil()) uptimeProofUnsignedMessage, err := avalancheWarp.NewUnsignedMessage( - network.GetNetworkID(), + networkID, subnet.BlockchainID, addressedCall.Bytes(), ) @@ -1016,7 +1020,7 @@ func ConstructUptimeProofMessage( func InitializeEndNativeValidationWithUptime( ctx context.Context, - network interfaces.LocalNetwork, + networkID uint32, signatureAggregator *aggregator.SignatureAggregator, senderKey *ecdsa.PrivateKey, subnet interfaces.SubnetTestInfo, @@ -1028,7 +1032,7 @@ func InitializeEndNativeValidationWithUptime( validationID, uptime, subnet, - network, + networkID, signatureAggregator, ) @@ -1067,7 +1071,7 @@ func InitializeEndNativeValidation( func ForceInitializeEndNativeValidationWithUptime( ctx context.Context, - network interfaces.LocalNetwork, + networkID uint32, signatureAggregator *aggregator.SignatureAggregator, senderKey *ecdsa.PrivateKey, subnet interfaces.SubnetTestInfo, @@ -1079,7 +1083,7 @@ func ForceInitializeEndNativeValidationWithUptime( validationID, uptime, subnet, - network, + networkID, signatureAggregator, ) @@ -1118,7 +1122,7 @@ func ForceInitializeEndNativeValidation( func InitializeEndERC20ValidationWithUptime( ctx context.Context, - network interfaces.LocalNetwork, + networkID uint32, signatureAggregator *aggregator.SignatureAggregator, senderKey *ecdsa.PrivateKey, subnet interfaces.SubnetTestInfo, @@ -1130,7 +1134,7 @@ func InitializeEndERC20ValidationWithUptime( validationID, uptime, subnet, - network, + networkID, signatureAggregator, ) @@ -1169,7 +1173,7 @@ func InitializeEndERC20Validation( func ForceInitializeEndERC20ValidationWithUptime( ctx context.Context, - network interfaces.LocalNetwork, + networkID uint32, signatureAggregator *aggregator.SignatureAggregator, senderKey *ecdsa.PrivateKey, subnet interfaces.SubnetTestInfo, @@ -1181,7 +1185,7 @@ func ForceInitializeEndERC20ValidationWithUptime( validationID, uptime, subnet, - network, + networkID, signatureAggregator, ) @@ -1492,7 +1496,6 @@ func CompleteEndNativeDelegation( func InitializeAndCompleteEndInitialNativeValidation( ctx context.Context, - network interfaces.LocalNetwork, signatureAggregator *aggregator.SignatureAggregator, fundedKey *ecdsa.PrivateKey, subnetInfo interfaces.SubnetTestInfo, @@ -1502,6 +1505,8 @@ func InitializeAndCompleteEndInitialNativeValidation( validationID ids.ID, index uint32, weight uint64, + pchainWallet pwallet.Wallet, + networkID uint32, ) { log.Println("Initializing initial validator removal") WaitMinStakeDuration(ctx, subnetInfo, fundedKey) @@ -1532,8 +1537,8 @@ func InitializeAndCompleteEndInitialNativeValidation( Expect(err).Should(BeNil()) // Deliver the Warp message to the P-Chain - network.GetPChainWallet().IssueSetSubnetValidatorWeightTx(signedWarpMessage.Bytes()) - PChainProposerVMWorkaround(network) + pchainWallet.IssueSetSubnetValidatorWeightTx(signedWarpMessage.Bytes()) + PChainProposerVMWorkaround(pchainWallet) AdvanceProposerVM(ctx, subnetInfo, fundedKey, 5) // Construct a SubnetValidatorRegistrationMessage Warp message from the P-Chain @@ -1544,7 +1549,7 @@ func InitializeAndCompleteEndInitialNativeValidation( false, subnetInfo, pChainInfo, - network, + networkID, signatureAggregator, ) @@ -1568,7 +1573,6 @@ func InitializeAndCompleteEndInitialNativeValidation( func InitializeAndCompleteEndNativeValidation( ctx context.Context, - network interfaces.LocalNetwork, signatureAggregator *aggregator.SignatureAggregator, fundedKey *ecdsa.PrivateKey, subnetInfo interfaces.SubnetTestInfo, @@ -1581,6 +1585,8 @@ func InitializeAndCompleteEndNativeValidation( nonce uint64, includeUptime bool, validatorStartTime time.Time, + pchainWallet pwallet.Wallet, + networkID uint32, ) { log.Println("Initializing validator removal") WaitMinStakeDuration(ctx, subnetInfo, fundedKey) @@ -1590,7 +1596,7 @@ func InitializeAndCompleteEndNativeValidation( uptime := uint64(time.Since(validatorStartTime).Seconds()) receipt = ForceInitializeEndNativeValidationWithUptime( ctx, - network, + networkID, signatureAggregator, fundedKey, subnetInfo, @@ -1627,8 +1633,8 @@ func InitializeAndCompleteEndNativeValidation( Expect(err).Should(BeNil()) // Deliver the Warp message to the P-Chain - network.GetPChainWallet().IssueSetSubnetValidatorWeightTx(signedWarpMessage.Bytes()) - PChainProposerVMWorkaround(network) + pchainWallet.IssueSetSubnetValidatorWeightTx(signedWarpMessage.Bytes()) + PChainProposerVMWorkaround(pchainWallet) AdvanceProposerVM(ctx, subnetInfo, fundedKey, 5) // Construct a SubnetValidatorRegistrationMessage Warp message from the P-Chain @@ -1640,7 +1646,7 @@ func InitializeAndCompleteEndNativeValidation( false, subnetInfo, pChainInfo, - network, + networkID, signatureAggregator, ) @@ -1664,7 +1670,6 @@ func InitializeAndCompleteEndNativeValidation( func InitializeAndCompleteEndInitialERC20Validation( ctx context.Context, - network interfaces.LocalNetwork, signatureAggregator *aggregator.SignatureAggregator, fundedKey *ecdsa.PrivateKey, subnetInfo interfaces.SubnetTestInfo, @@ -1674,6 +1679,8 @@ func InitializeAndCompleteEndInitialERC20Validation( validationID ids.ID, index uint32, weight uint64, + pchainWallet pwallet.Wallet, + networkID uint32, ) { log.Println("Initializing initial validator removal") WaitMinStakeDuration(ctx, subnetInfo, fundedKey) @@ -1704,8 +1711,8 @@ func InitializeAndCompleteEndInitialERC20Validation( Expect(err).Should(BeNil()) // Deliver the Warp message to the P-Chain - network.GetPChainWallet().IssueSetSubnetValidatorWeightTx(signedWarpMessage.Bytes()) - PChainProposerVMWorkaround(network) + pchainWallet.IssueSetSubnetValidatorWeightTx(signedWarpMessage.Bytes()) + PChainProposerVMWorkaround(pchainWallet) AdvanceProposerVM(ctx, subnetInfo, fundedKey, 5) // Construct a SubnetValidatorRegistrationMessage Warp message from the P-Chain @@ -1716,7 +1723,7 @@ func InitializeAndCompleteEndInitialERC20Validation( false, subnetInfo, pChainInfo, - network, + networkID, signatureAggregator, ) @@ -1740,7 +1747,6 @@ func InitializeAndCompleteEndInitialERC20Validation( func InitializeAndCompleteEndERC20Validation( ctx context.Context, - network interfaces.LocalNetwork, signatureAggregator *aggregator.SignatureAggregator, fundedKey *ecdsa.PrivateKey, subnetInfo interfaces.SubnetTestInfo, @@ -1753,6 +1759,8 @@ func InitializeAndCompleteEndERC20Validation( nonce uint64, includeUptime bool, validatorStartTime time.Time, + pchainWallet pwallet.Wallet, + networkID uint32, ) { log.Println("Initializing validator removal") WaitMinStakeDuration(ctx, subnetInfo, fundedKey) @@ -1761,7 +1769,7 @@ func InitializeAndCompleteEndERC20Validation( uptime := uint64(time.Since(validatorStartTime).Seconds()) receipt = ForceInitializeEndERC20ValidationWithUptime( ctx, - network, + networkID, signatureAggregator, fundedKey, subnetInfo, @@ -1797,8 +1805,8 @@ func InitializeAndCompleteEndERC20Validation( Expect(err).Should(BeNil()) // Deliver the Warp message to the P-Chain - network.GetPChainWallet().IssueSetSubnetValidatorWeightTx(signedWarpMessage.Bytes()) - PChainProposerVMWorkaround(network) + pchainWallet.IssueSetSubnetValidatorWeightTx(signedWarpMessage.Bytes()) + PChainProposerVMWorkaround(pchainWallet) AdvanceProposerVM(ctx, subnetInfo, fundedKey, 5) // Construct a SubnetValidatorRegistrationMessage Warp message from the P-Chain @@ -1810,7 +1818,7 @@ func InitializeAndCompleteEndERC20Validation( false, subnetInfo, pChainInfo, - network, + networkID, signatureAggregator, ) @@ -1834,7 +1842,6 @@ func InitializeAndCompleteEndERC20Validation( func InitializeAndCompleteEndInitialPoAValidation( ctx context.Context, - network interfaces.LocalNetwork, signatureAggregator *aggregator.SignatureAggregator, ownerKey *ecdsa.PrivateKey, fundedKey *ecdsa.PrivateKey, @@ -1845,6 +1852,8 @@ func InitializeAndCompleteEndInitialPoAValidation( validationID ids.ID, index uint32, weight uint64, + pchainWallet pwallet.Wallet, + networkID uint32, ) { log.Println("Initializing initial validator removal") WaitMinStakeDuration(ctx, subnetInfo, fundedKey) @@ -1875,8 +1884,8 @@ func InitializeAndCompleteEndInitialPoAValidation( Expect(err).Should(BeNil()) // Deliver the Warp message to the P-Chain - network.GetPChainWallet().IssueSetSubnetValidatorWeightTx(signedWarpMessage.Bytes()) - PChainProposerVMWorkaround(network) + pchainWallet.IssueSetSubnetValidatorWeightTx(signedWarpMessage.Bytes()) + PChainProposerVMWorkaround(pchainWallet) AdvanceProposerVM(ctx, subnetInfo, fundedKey, 5) // Construct a SubnetValidatorRegistrationMessage Warp message from the P-Chain @@ -1887,7 +1896,7 @@ func InitializeAndCompleteEndInitialPoAValidation( false, subnetInfo, pChainInfo, - network, + networkID, signatureAggregator, ) @@ -1911,7 +1920,6 @@ func InitializeAndCompleteEndInitialPoAValidation( func InitializeAndCompleteEndPoAValidation( ctx context.Context, - network interfaces.LocalNetwork, signatureAggregator *aggregator.SignatureAggregator, ownerKey *ecdsa.PrivateKey, fundedKey *ecdsa.PrivateKey, @@ -1922,6 +1930,7 @@ func InitializeAndCompleteEndPoAValidation( validationID ids.ID, weight uint64, nonce uint64, + networkID uint32, ) { receipt := InitializeEndPoAValidation( ctx, @@ -1954,7 +1963,7 @@ func InitializeAndCompleteEndPoAValidation( false, subnetInfo, pChainInfo, - network, + networkID, signatureAggregator, ) @@ -1986,7 +1995,7 @@ func ConstructSubnetValidatorRegistrationMessageForInitialValidator( valid bool, subnet interfaces.SubnetTestInfo, pChainInfo interfaces.SubnetTestInfo, - network interfaces.LocalNetwork, + networkID uint32, signatureAggregator *aggregator.SignatureAggregator, ) *avalancheWarp.Message { justification := platformvm.SubnetValidatorRegistrationJustification{ @@ -2005,7 +2014,7 @@ func ConstructSubnetValidatorRegistrationMessageForInitialValidator( registrationAddressedCall, err := warpPayload.NewAddressedCall(nil, registrationPayload.Bytes()) Expect(err).Should(BeNil()) registrationUnsignedMessage, err := avalancheWarp.NewUnsignedMessage( - network.GetNetworkID(), + networkID, pChainInfo.BlockchainID, registrationAddressedCall.Bytes(), ) @@ -2029,7 +2038,7 @@ func ConstructSubnetValidatorRegistrationMessage( valid bool, subnet interfaces.SubnetTestInfo, pChainInfo interfaces.SubnetTestInfo, - network interfaces.LocalNetwork, + networkID uint32, signatureAggregator *aggregator.SignatureAggregator, ) *avalancheWarp.Message { msg, err := warpMessage.NewRegisterSubnetValidator( @@ -2055,7 +2064,7 @@ func ConstructSubnetValidatorRegistrationMessage( registrationAddressedCall, err := warpPayload.NewAddressedCall(nil, registrationPayload.Bytes()) Expect(err).Should(BeNil()) registrationUnsignedMessage, err := avalancheWarp.NewUnsignedMessage( - network.GetNetworkID(), + networkID, pChainInfo.BlockchainID, registrationAddressedCall.Bytes(), ) @@ -2078,15 +2087,15 @@ func ConstructSubnetValidatorWeightUpdateMessage( weight uint64, subnet interfaces.SubnetTestInfo, pChainInfo interfaces.SubnetTestInfo, - network interfaces.LocalNetwork, signatureAggregator *aggregator.SignatureAggregator, + networkID uint32, ) *avalancheWarp.Message { payload, err := warpMessage.NewSubnetValidatorWeight(validationID, nonce, weight) Expect(err).Should(BeNil()) updateAddressedCall, err := warpPayload.NewAddressedCall(nil, payload.Bytes()) Expect(err).Should(BeNil()) updateUnsignedMessage, err := avalancheWarp.NewUnsignedMessage( - network.GetNetworkID(), + networkID, pChainInfo.BlockchainID, updateAddressedCall.Bytes(), ) @@ -2106,7 +2115,7 @@ func ConstructSubnetConversionMessage( subnetConversionID ids.ID, subnet interfaces.SubnetTestInfo, pChainInfo interfaces.SubnetTestInfo, - network interfaces.LocalNetwork, + networkID uint32, signatureAggregator *aggregator.SignatureAggregator, ) *avalancheWarp.Message { subnetConversionPayload, err := warpMessage.NewSubnetConversion(subnetConversionID) @@ -2117,7 +2126,7 @@ func ConstructSubnetConversionMessage( ) Expect(err).Should(BeNil()) subnetConversionUnsignedMessage, err := avalancheWarp.NewUnsignedMessage( - network.GetNetworkID(), + networkID, pChainInfo.BlockchainID, subnetConversionAddressedCall.Bytes(), ) @@ -2326,7 +2335,7 @@ func PackInitialValidator(iv interface{}) ([]byte, error) { } func PChainProposerVMWorkaround( - network interfaces.LocalNetwork, + pchainWallet pwallet.Wallet, ) { // Workaround current block map rules destAddr, err := address.ParseToID(DefaultPChainAddress) @@ -2334,12 +2343,12 @@ func PChainProposerVMWorkaround( log.Println("Waiting for P-Chain...") time.Sleep(30 * time.Second) - pBuilder := network.GetPChainWallet().Builder() + pBuilder := pchainWallet.Builder() pContext := pBuilder.Context() avaxAssetID := pContext.AVAXAssetID locktime := uint64(time.Date(2030, 1, 1, 0, 0, 0, 0, time.UTC).Unix()) amount := 500 * units.MilliAvax - _, err = network.GetPChainWallet().IssueBaseTx([]*avax.TransferableOutput{ + _, err = pchainWallet.IssueBaseTx([]*avax.TransferableOutput{ { Asset: avax.Asset{ ID: avaxAssetID, @@ -2359,7 +2368,7 @@ func PChainProposerVMWorkaround( }, }) Expect(err).Should(BeNil()) - _, err = network.GetPChainWallet().IssueBaseTx([]*avax.TransferableOutput{ + _, err = pchainWallet.IssueBaseTx([]*avax.TransferableOutput{ { Asset: avax.Asset{ ID: avaxAssetID, @@ -2399,7 +2408,7 @@ func AdvanceProposerVM( func ConvertSubnet( ctx context.Context, subnetInfo interfaces.SubnetTestInfo, - network interfaces.LocalNetwork, + pchainWallet pwallet.Wallet, stakingManagerAddress common.Address, fundedKey *ecdsa.PrivateKey, ) []Node { @@ -2414,7 +2423,7 @@ func ConvertSubnet( NodePoP: nodePoP, }) - _, err = network.GetPChainWallet().IssueRemoveSubnetValidatorTx( + _, err = pchainWallet.IssueRemoveSubnetValidatorTx( nodeID, subnetInfo.SubnetID, ) @@ -2456,7 +2465,7 @@ func ConvertSubnet( } log.Println("Issuing ConvertSubnetTx") - _, err = network.GetPChainWallet().IssueConvertSubnetTx( + _, err = pchainWallet.IssueConvertSubnetTx( subnetInfo.SubnetID, subnetInfo.BlockchainID, stakingManagerAddress[:], @@ -2464,7 +2473,7 @@ func ConvertSubnet( ) Expect(err).Should(BeNil()) - PChainProposerVMWorkaround(network) + PChainProposerVMWorkaround(pchainWallet) AdvanceProposerVM(ctx, subnetInfo, fundedKey, 5) return nodes diff --git a/tests/utils/warp-genesis-template.json b/tests/utils/warp-genesis-template.json index 5dab415be..4cf2d62eb 100644 --- a/tests/utils/warp-genesis-template.json +++ b/tests/utils/warp-genesis-template.json @@ -1,55 +1,82 @@ { "config": { - "chainId": , - "homesteadBlock": 0, - "eip150Block": 0, - "eip150Hash": "0x2086799aeebeae135c246c65021c82b4e15a2c451340993aacfd2751886514f0", - "eip155Block": 0, - "eip158Block": 0, - "byzantiumBlock": 0, - "constantinopleBlock": 0, - "petersburgBlock": 0, - "istanbulBlock": 0, - "muirGlacierBlock": 0, - "feeConfig": { - "gasLimit": 20000000, - "minBaseFee": 1000000000, - "targetGas": 100000000, - "baseFeeChangeDenominator": 48, - "minBlockGasCost": 0, - "maxBlockGasCost": 10000000, - "targetBlockRate": 2, - "blockGasCostStep": 500000 - }, - "warpConfig": { - "blockTimestamp": 1719343601 - }, - "contractNativeMinterConfig": { - "blockTimestamp": 0, - "adminAddresses": [ - "0xAcB633F5B00099c7ec187eB00156c5cd9D854b5B", - "0x3405506b3711859c5070949ed9b700c7ba7bf750", - "0x8db97C7cEcE249c2b98bDC0226Cc4C2A57BF52FC" - ] - } + "chainId": , + "homesteadBlock": 0, + "eip150Block": 0, + "eip150Hash": "0x2086799aeebeae135c246c65021c82b4e15a2c451340993aacfd2751886514f0", + "eip155Block": 0, + "eip158Block": 0, + "byzantiumBlock": 0, + "constantinopleBlock": 0, + "petersburgBlock": 0, + "istanbulBlock": 0, + "muirGlacierBlock": 0, + "feeConfig": { + "gasLimit": 20000000, + "minBaseFee": 1000000000, + "targetGas": 100000000, + "baseFeeChangeDenominator": 48, + "minBlockGasCost": 0, + "maxBlockGasCost": 10000000, + "targetBlockRate": 2, + "blockGasCostStep": 500000 + }, + "warpConfig": { + "blockTimestamp": 1719343601 + }, + "contractNativeMinterConfig": { + "blockTimestamp": 0, + "adminAddresses": [ + "0xAcB633F5B00099c7ec187eB00156c5cd9D854b5B", + "0x3405506b3711859c5070949ed9b700c7ba7bf750", + "0x962c62B01529ecc0561D85d3fe395921ddC3665B", + "0x1549B96D9D97F435CA9b25000FEDE3A7e54C0bb9", + "0x190110D1228EB2cDd36559b2215A572Dc8592C3d", + "0xf9EF017A764F265A1fD0975bfc200725E41d860E", + "0x4f3663be6d22B0F19F8617f1A9E9485aB0144Bff", + "0x463a6bE7a5098A5f06435c6c468adD338F15B93A", + "0x8db97C7cEcE249c2b98bDC0226Cc4C2A57BF52FC" + ] + } }, "alloc": { - "0x8db97C7cEcE249c2b98bDC0226Cc4C2A57BF52FC": { - "balance": "0x52B7D2DCC80CD2E4000000" - }, - "": { - "balance": "0x0", - "code": "", - "storage": { - "0x0000000000000000000000000000000000000000000000000000000000000000": "0x0000000000000000000000000000000000000000000000000000000000000001", - "0x0000000000000000000000000000000000000000000000000000000000000001": "0x0000000000000000000000000000000000000000000000000000000000000001" - }, - "nonce": 1 + "": { + "balance": "0x0", + "code": "", + "storage": { + "0x0000000000000000000000000000000000000000000000000000000000000000": "0x0000000000000000000000000000000000000000000000000000000000000001", + "0x0000000000000000000000000000000000000000000000000000000000000001": "0x0000000000000000000000000000000000000000000000000000000000000001" }, - "": { - "balance": "0x0", - "nonce": 1 - } + "nonce": 1 + }, + "": { + "balance": "0x0", + "nonce": 1 + }, + "0x8db97C7cEcE249c2b98bDC0226Cc4C2A57BF52FC": { + "balance": "0x52B7D2DCC80CD2E4000000" + }, + "0x1337cfd2dCff6270615B90938aCB1efE79801704": { + "balance": "0x52B7D2DCC80CD2E4000000" + }, + "0xFcec6c0674037f99fa473de09609B4b6D8158863": { + "balance": "0x52B7D2DCC80CD2E4000000" + }, + "0x2e1533d976A675bCD6306deC3B05e9f73e6722Fb": { + "balance": "0x52B7D2DCC80CD2E4000000" + }, + "0xA638b0a597dc0520e2f20E83cFbeBBCd45a79990": { + "balance": "0x52B7D2DCC80CD2E4000000" + }, + "0x787C079cB0d5A7AA1Cae95d991F76Dce771A432D": { + "balance": "0x52B7D2DCC80CD2E4000000" + }, + "0x741D536f5B07bcD43727CD8435389CA36aE5A4Ae": { + "balance": "0x52B7D2DCC80CD2E4000000" + }, + "0xd466f12795BA59d0fef389c21fA63c287956fb18": { + "balance": "0x52B7D2DCC80CD2E4000000" + } }, "nonce": "0x0", "timestamp": "0x667B19F0", @@ -61,4 +88,4 @@ "number": "0x0", "gasUsed": "0x0", "parentHash": "0x0000000000000000000000000000000000000000000000000000000000000000" -} + }