From cc6f94b72c98755098ad1006bb6cb8a758102ab3 Mon Sep 17 00:00:00 2001 From: Geoff Stuart Date: Wed, 13 Dec 2023 13:34:11 -0500 Subject: [PATCH 01/12] Update contracts --- .../ERC20TokenSource/ERC20TokenSource.go | 481 +++++++++++++++++- .../NativeTokenDestination.go | 481 +++++++++++++++++- .../NativeTokenSource/NativeTokenSource.go | 481 +++++++++++++++++- .../NativeTokenBridge/ERC20TokenSource.sol | 32 +- .../NativeTokenDestination.sol | 48 +- .../NativeTokenBridge/NativeTokenSource.sol | 32 +- 6 files changed, 1408 insertions(+), 147 deletions(-) diff --git a/abi-bindings/go/CrossChainApplications/NativeTokenBridge/ERC20TokenSource/ERC20TokenSource.go b/abi-bindings/go/CrossChainApplications/NativeTokenBridge/ERC20TokenSource/ERC20TokenSource.go index bc06d7c95..2de592320 100644 --- a/abi-bindings/go/CrossChainApplications/NativeTokenBridge/ERC20TokenSource/ERC20TokenSource.go +++ b/abi-bindings/go/CrossChainApplications/NativeTokenBridge/ERC20TokenSource/ERC20TokenSource.go @@ -31,8 +31,8 @@ var ( // ERC20TokenSourceMetaData contains all meta data concerning the ERC20TokenSource contract. var ERC20TokenSourceMetaData = &bind.MetaData{ - ABI: "[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"teleporterMessengerAddress\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"destinationBlockchainID_\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"nativeTokenDestinationAddress_\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"erc20ContractAddress_\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"BurnTokens\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"teleporterMessageID\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"TransferToDestination\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"UnlockTokens\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"BURNED_TX_FEES_ADDRESS\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"MINT_NATIVE_TOKENS_REQUIRED_GAS\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"destinationBlockchainID\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"destinationBurnedTotal\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"erc20ContractAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"nativeTokenDestinationAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"senderBlockchainID\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"senderAddress\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"message\",\"type\":\"bytes\"}],\"name\":\"receiveTeleporterMessage\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"teleporterMessenger\",\"outputs\":[{\"internalType\":\"contractITeleporterMessenger\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"totalAmount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"feeAmount\",\"type\":\"uint256\"},{\"internalType\":\"address[]\",\"name\":\"allowedRelayerAddresses\",\"type\":\"address[]\"}],\"name\":\"transferToDestination\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", - Bin: "0x6101006040523480156200001257600080fd5b50604051620016f1380380620016f183398101604081905262000035916200031d565b60016000556001600160a01b038416620000b15760405162461bcd60e51b815260206004820152603260248201527f4552433230546f6b656e536f757263653a207a65726f2054656c65706f727465604482015271724d657373656e676572206164647265737360701b60648201526084015b60405180910390fd5b6001600160a01b03841660e05282620001155760405162461bcd60e51b81526020600482015260306024820152600080516020620016d183398151915260448201526f1bdb88189b1bd8dad8da185a5b88125160821b6064820152608401620000a8565b7302000000000000000000000000000000000000056001600160a01b0316634213cf786040518163ffffffff1660e01b8152600401602060405180830381865afa15801562000168573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200018e919062000371565b8303620002045760405162461bcd60e51b815260206004820152603460248201527f4552433230546f6b656e536f757263653a2063616e6e6f74206272696467652060448201527f776974682073616d6520626c6f636b636861696e0000000000000000000000006064820152608401620000a8565b60808390526001600160a01b038216620002765760405162461bcd60e51b81526020600482015260336024820152600080516020620016d183398151915260448201527f6f6e20636f6e74726163742061646472657373000000000000000000000000006064820152608401620000a8565b6001600160a01b0380831660a0528116620002ea5760405162461bcd60e51b815260206004820152602d60248201527f4552433230546f6b656e536f757263653a207a65726f20455243323020636f6e60448201526c7472616374206164647265737360981b6064820152608401620000a8565b6001600160a01b031660c052506200038b915050565b80516001600160a01b03811681146200031857600080fd5b919050565b600080600080608085870312156200033457600080fd5b6200033f8562000300565b935060208501519250620003566040860162000300565b9150620003666060860162000300565b905092959194509250565b6000602082840312156200038457600080fd5b5051919050565b60805160a05160c05160e0516112ba620004176000396000818160f50152818161029c015281816102d301526104ed015260008181610183015281816101e30152818161027b0152818161036d01528181610a9a0152610c6a01526000818161013e015281816103330152610605015260008181609d0152818161030d015261058201526112ba6000f3fe608060405234801561001057600080fd5b50600436106100935760003560e01c8063b6171f7311610066578063b6171f731461012f578063b8c9091a14610139578063c452165e14610160578063c868efaa1461016b578063e486df151461017e57600080fd5b806341d3014d1461009857806355db3e9e146100d257806387a2edba146100db5780639b3e5803146100f0575b600080fd5b6100bf7f000000000000000000000000000000000000000000000000000000000000000081565b6040519081526020015b60405180910390f35b6100bf60015481565b6100ee6100e9366004610e39565b6101a5565b005b6101177f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020016100c9565b6100bf620186a081565b6101177f000000000000000000000000000000000000000000000000000000000000000081565b610117600160981b81565b6100ee610179366004610ed2565b6104da565b6101177f000000000000000000000000000000000000000000000000000000000000000081565b6101ad610785565b6001600160a01b0385166101dc5760405162461bcd60e51b81526004016101d390610f5b565b60405180910390fd5b60006102087f0000000000000000000000000000000000000000000000000000000000000000866107de565b90508381116102705760405162461bcd60e51b815260206004820152602e60248201527f4552433230546f6b656e536f757263653a20696e73756666696369656e74206160448201526d191a9d5cdd195908185b5bdd5b9d60921b60648201526084016101d3565b83156102c1576102c17f00000000000000000000000000000000000000000000000000000000000000007f000000000000000000000000000000000000000000000000000000000000000086610948565b60006102cd8583610fb9565b905060007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663624488506040518060c001604052807f000000000000000000000000000000000000000000000000000000000000000081526020017f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316815260200160405180604001604052807f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031681526020018b8152508152602001620186a08152602001888880806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250505090825250604080516001600160a01b038e166020808301919091529181018890529101906060016040516020818303038152906040528152506040518263ffffffff1660e01b81526004016104339190611060565b6020604051808303816000875af1158015610452573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061047691906110de565b905080886001600160a01b0316336001600160a01b03167f2b4e8f08417773e367064a6aea9ca2df303a60876676f70b6c3c5e66b314ca5a856040516104be91815260200190565b60405180910390a45050506104d36001600055565b5050505050565b6104e2610785565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146105805760405162461bcd60e51b815260206004820152603b60248201527f4552433230546f6b656e536f757263653a20756e617574686f72697a6564205460448201527f656c65706f727465724d657373656e67657220636f6e7472616374000000000060648201526084016101d3565b7f000000000000000000000000000000000000000000000000000000000000000084146106035760405162461bcd60e51b815260206004820152602b60248201527f4552433230546f6b656e536f757263653a20696e76616c69642064657374696e60448201526a30ba34b7b71031b430b4b760a91b60648201526084016101d3565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316836001600160a01b0316146106925760405162461bcd60e51b815260206004820152602560248201527f4552433230546f6b656e536f757263653a20756e617574686f72697a6564207360448201526432b73232b960d91b60648201526084016101d3565b6000806106a18385018561110d565b909250905060008260018111156106ba576106ba6111d5565b036106eb57600080828060200190518101906106d691906111eb565b915091506106e48282610a2d565b5050610773565b60018260018111156106ff576106ff6111d5565b0361072b5760008180602001905181019061071a91906110de565b905061072581610ac4565b50610773565b60405162461bcd60e51b815260206004820181905260248201527f4552433230546f6b656e536f757263653a20696e76616c696420616374696f6e60448201526064016101d3565b505061077f6001600055565b50505050565b6002600054036107d75760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016101d3565b6002600055565b6040516370a0823160e01b815230600482015260009081906001600160a01b038516906370a0823190602401602060405180830381865afa158015610827573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061084b91906110de565b90506108626001600160a01b038516333086610af3565b6040516370a0823160e01b81523060048201526000906001600160a01b038616906370a0823190602401602060405180830381865afa1580156108a9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108cd91906110de565b90508181116109335760405162461bcd60e51b815260206004820152602c60248201527f5361666545524332305472616e7366657246726f6d3a2062616c616e6365206e60448201526b1bdd081a5b98dc99585cd95960a21b60648201526084016101d3565b61093d8282610fb9565b925050505b92915050565b604051636eb1769f60e11b81523060048201526001600160a01b038381166024830152600091839186169063dd62ed3e90604401602060405180830381865afa158015610999573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109bd91906110de565b6109c79190611219565b6040516001600160a01b03851660248201526044810182905290915061077f90859063095ea7b360e01b906064015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152610b2b565b6001600160a01b038216610a535760405162461bcd60e51b81526004016101d390610f5b565b604080516001600160a01b0384168152602081018390527f55aaef8fd8c07238c3618a93c8a1627194187d3b0952908e58f2ab0f944fb407910160405180910390a1610ac07f00000000000000000000000000000000000000000000000000000000000000008383610c02565b5050565b600154811115610af057600060015482610ade9190610fb9565b9050610ae981610c32565b5060018190555b50565b6040516001600160a01b038085166024830152831660448201526064810182905261077f9085906323b872dd60e01b906084016109f6565b6000610b80826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316610c949092919063ffffffff16565b805190915015610bfd5780806020019051810190610b9e919061122c565b610bfd5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b60648201526084016101d3565b505050565b6040516001600160a01b038316602482015260448101829052610bfd90849063a9059cbb60e01b906064016109f6565b6040518181527f2cd3fd70cd5a5d6d805e90d22741aa1a84590ace7cf01b244719558d266143829060200160405180910390a1610af07f0000000000000000000000000000000000000000000000000000000000000000600160981b83610c02565b6060610ca38484600085610cab565b949350505050565b606082471015610d0c5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b60648201526084016101d3565b600080866001600160a01b03168587604051610d289190611255565b60006040518083038185875af1925050503d8060008114610d65576040519150601f19603f3d011682016040523d82523d6000602084013e610d6a565b606091505b5091509150610d7b87838387610d86565b979650505050505050565b60608315610df5578251600003610dee576001600160a01b0385163b610dee5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016101d3565b5081610ca3565b610ca38383815115610e0a5781518083602001fd5b8060405162461bcd60e51b81526004016101d39190611271565b6001600160a01b0381168114610af057600080fd5b600080600080600060808688031215610e5157600080fd5b8535610e5c81610e24565b94506020860135935060408601359250606086013567ffffffffffffffff80821115610e8757600080fd5b818801915088601f830112610e9b57600080fd5b813581811115610eaa57600080fd5b8960208260051b8501011115610ebf57600080fd5b9699959850939650602001949392505050565b60008060008060608587031215610ee857600080fd5b843593506020850135610efa81610e24565b9250604085013567ffffffffffffffff80821115610f1757600080fd5b818701915087601f830112610f2b57600080fd5b813581811115610f3a57600080fd5b886020828501011115610f4c57600080fd5b95989497505060200194505050565b60208082526028908201527f4552433230546f6b656e536f757263653a207a65726f20726563697069656e74604082015267206164647265737360c01b606082015260800190565b634e487b7160e01b600052601160045260246000fd5b8181038181111561094257610942610fa3565b600081518084526020808501945080840160005b838110156110055781516001600160a01b031687529582019590820190600101610fe0565b509495945050505050565b60005b8381101561102b578181015183820152602001611013565b50506000910152565b6000815180845261104c816020860160208601611010565b601f01601f19169290920160200192915050565b60208152815160208201526000602083015160018060a01b03808216604085015260408501519150808251166060850152506020810151608084015250606083015160a0830152608083015160e060c08401526110c1610100840182610fcc565b905060a0840151601f198483030160e085015261093d8282611034565b6000602082840312156110f057600080fd5b5051919050565b634e487b7160e01b600052604160045260246000fd5b6000806040838503121561112057600080fd5b82356002811061112f57600080fd5b9150602083013567ffffffffffffffff8082111561114c57600080fd5b818501915085601f83011261116057600080fd5b813581811115611172576111726110f7565b604051601f8201601f19908116603f0116810190838211818310171561119a5761119a6110f7565b816040528281528860208487010111156111b357600080fd5b8260208601602083013760006020848301015280955050505050509250929050565b634e487b7160e01b600052602160045260246000fd5b600080604083850312156111fe57600080fd5b825161120981610e24565b6020939093015192949293505050565b8082018082111561094257610942610fa3565b60006020828403121561123e57600080fd5b8151801515811461124e57600080fd5b9392505050565b60008251611267818460208701611010565b9190910192915050565b60208152600061124e602083018461103456fea2646970667358221220ea4f7fe2fb79a487153a86e34946c46d0dc03e1eb717523b03577a4cf4212c9a64736f6c634300081200334552433230546f6b656e536f757263653a207a65726f2064657374696e617469", + ABI: "[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"teleporterRegistryAddress\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"destinationBlockchainID_\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"nativeTokenDestinationAddress_\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"erc20ContractAddress_\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"BurnTokens\",\"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\":\"sender\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"teleporterMessageID\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"TransferToDestination\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"UnlockTokens\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"BURNED_TX_FEES_ADDRESS\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"MINT_NATIVE_TOKENS_REQUIRED_GAS\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"destinationBlockchainID\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"destinationBurnedTotal\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"erc20ContractAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getMinTeleporterVersion\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"nativeTokenDestinationAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"originBlockchainID\",\"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\":[],\"name\":\"teleporterRegistry\",\"outputs\":[{\"internalType\":\"contractTeleporterRegistry\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"totalAmount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"feeAmount\",\"type\":\"uint256\"},{\"internalType\":\"address[]\",\"name\":\"allowedRelayerAddresses\",\"type\":\"address[]\"}],\"name\":\"transferToDestination\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"version\",\"type\":\"uint256\"}],\"name\":\"updateMinTeleporterVersion\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", + Bin: "0x6101006040523480156200001257600080fd5b5060405162001c6f38038062001c6f8339810160408190526200003591620003f0565b83806001600160a01b038116620000b95760405162461bcd60e51b815260206004820152603760248201527f54656c65706f727465725570677261646561626c653a207a65726f2074656c6560448201527f706f72746572207265676973747279206164647265737300000000000000000060648201526084015b60405180910390fd5b6001600160a01b03811660808190526040805163301fd1f560e21b8152905163c07f47d4916004808201926020929091908290030181865afa15801562000104573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200012a919062000444565b60005550620001393362000381565b50600160025582620001965760405162461bcd60e51b8152602060048201526030602482015260008051602062001c4f83398151915260448201526f1bdb88189b1bd8dad8da185a5b88125160821b6064820152608401620000b0565b7302000000000000000000000000000000000000056001600160a01b0316634213cf786040518163ffffffff1660e01b8152600401602060405180830381865afa158015620001e9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200020f919062000444565b8303620002855760405162461bcd60e51b815260206004820152603460248201527f4552433230546f6b656e536f757263653a2063616e6e6f74206272696467652060448201527f776974682073616d6520626c6f636b636861696e0000000000000000000000006064820152608401620000b0565b60a08390526001600160a01b038216620002f75760405162461bcd60e51b8152602060048201526033602482015260008051602062001c4f83398151915260448201527f6f6e20636f6e74726163742061646472657373000000000000000000000000006064820152608401620000b0565b6001600160a01b0380831660c05281166200036b5760405162461bcd60e51b815260206004820152602d60248201527f4552433230546f6b656e536f757263653a207a65726f20455243323020636f6e60448201526c7472616374206164647265737360981b6064820152608401620000b0565b6001600160a01b031660e052506200045e915050565b600180546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b80516001600160a01b0381168114620003eb57600080fd5b919050565b600080600080608085870312156200040757600080fd5b6200041285620003d3565b9350602085015192506200042960408601620003d3565b91506200043960608601620003d3565b905092959194509250565b6000602082840312156200045757600080fd5b5051919050565b60805160a05160c05160e051611764620004eb6000396000818161020e0152818161032f015281816103c7015281816104790152818161100501526110d90152600081816101c10152818161043f0152610d13015260008181610138015281816104190152610c9001526000818160f401528181610277015281816105ff01526107a201526117646000f3fe608060405234801561001057600080fd5b50600436106100ea5760003560e01c8063b6171f731161008c578063c868efaa11610066578063c868efaa146101ee578063d2cc7a7014610201578063e486df1514610209578063f2fde38b1461023057600080fd5b8063b6171f73146101b2578063b8c9091a146101bc578063c452165e146101e357600080fd5b80635eb99514116100c85780635eb9951414610171578063715018a61461018657806387a2edba1461018e5780638da5cb5b146101a157600080fd5b80631a7f5bec146100ef57806341d3014d1461013357806355db3e9e14610168575b600080fd5b6101167f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020015b60405180910390f35b61015a7f000000000000000000000000000000000000000000000000000000000000000081565b60405190815260200161012a565b61015a60035481565b61018461017f36600461127c565b610243565b005b610184610257565b61018461019c3660046112aa565b61026b565b6001546001600160a01b0316610116565b61015a620186a081565b6101167f000000000000000000000000000000000000000000000000000000000000000081565b610116600160981b81565b6101846101fc366004611343565b6105e7565b60005461015a565b6101167f000000000000000000000000000000000000000000000000000000000000000081565b61018461023e3660046113cc565b610720565b61024b610796565b6102548161079e565b50565b61025f61093c565b6102696000610996565b565b6102736109e8565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d820e64f6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156102d3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102f791906113f0565b90506001600160a01b0386166103285760405162461bcd60e51b815260040161031f9061140d565b60405180910390fd5b60006103547f000000000000000000000000000000000000000000000000000000000000000087610a3f565b90508481116103bc5760405162461bcd60e51b815260206004820152602e60248201527f4552433230546f6b656e536f757263653a20696e73756666696369656e74206160448201526d191a9d5cdd195908185b5bdd5b9d60921b606482015260840161031f565b84156103ed576103ed7f00000000000000000000000000000000000000000000000000000000000000008387610ba9565b60006103f9868361146b565b90506000836001600160a01b031663624488506040518060c001604052807f000000000000000000000000000000000000000000000000000000000000000081526020017f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316815260200160405180604001604052807f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031681526020018c8152508152602001620186a08152602001898980806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250505090825250604080516001600160a01b038f166020808301919091529181018890529101906060016040516020818303038152906040528152506040518263ffffffff1660e01b815260040161053f9190611512565b6020604051808303816000875af115801561055e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105829190611590565b905080896001600160a01b0316336001600160a01b03167f2b4e8f08417773e367064a6aea9ca2df303a60876676f70b6c3c5e66b314ca5a856040516105ca91815260200190565b60405180910390a4505050506105e06001600255565b5050505050565b60005460405163260f846760e11b81523360048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690634c1f08ce90602401602060405180830381865afa15801561064e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106729190611590565b10156106d95760405162461bcd60e51b815260206004820152603060248201527f54656c65706f727465725570677261646561626c653a20696e76616c6964205460448201526f32b632b837b93a32b91039b2b73232b960811b606482015260840161031f565b61071a848484848080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250610c8e92505050565b50505050565b61072861093c565b6001600160a01b03811661078d5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161031f565b61025481610996565b61026961093c565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663c07f47d46040518163ffffffff1660e01b8152600401602060405180830381865afa1580156107fe573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108229190611590565b600054909150818311156108925760405162461bcd60e51b815260206004820152603160248201527f54656c65706f727465725570677261646561626c653a20696e76616c6964205460448201527032b632b837b93a32b9103b32b939b4b7b760791b606482015260840161031f565b8083116109075760405162461bcd60e51b815260206004820152603f60248201527f54656c65706f727465725570677261646561626c653a206e6f7420677265617460448201527f6572207468616e2063757272656e74206d696e696d756d2076657273696f6e00606482015260840161031f565b6000838155604051849183917fa9a7ef57e41f05b4c15480842f5f0c27edfcbb553fed281f7c4068452cc1c02d9190a3505050565b6001546001600160a01b031633146102695760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161031f565b600180546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6002805403610a395760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015260640161031f565b60028055565b6040516370a0823160e01b815230600482015260009081906001600160a01b038516906370a0823190602401602060405180830381865afa158015610a88573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610aac9190611590565b9050610ac36001600160a01b038516333086610e89565b6040516370a0823160e01b81523060048201526000906001600160a01b038616906370a0823190602401602060405180830381865afa158015610b0a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b2e9190611590565b9050818111610b945760405162461bcd60e51b815260206004820152602c60248201527f5361666545524332305472616e7366657246726f6d3a2062616c616e6365206e60448201526b1bdd081a5b98dc99585cd95960a21b606482015260840161031f565b610b9e828261146b565b925050505b92915050565b604051636eb1769f60e11b81523060048201526001600160a01b038381166024830152600091839186169063dd62ed3e90604401602060405180830381865afa158015610bfa573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c1e9190611590565b610c2891906115a9565b6040516001600160a01b03851660248201526044810182905290915061071a90859063095ea7b360e01b906064015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152610ec1565b7f00000000000000000000000000000000000000000000000000000000000000008314610d115760405162461bcd60e51b815260206004820152602b60248201527f4552433230546f6b656e536f757263653a20696e76616c69642064657374696e60448201526a30ba34b7b71031b430b4b760a91b606482015260840161031f565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316826001600160a01b031614610da05760405162461bcd60e51b815260206004820152602560248201527f4552433230546f6b656e536f757263653a20756e617574686f72697a6564207360448201526432b73232b960d91b606482015260840161031f565b60008082806020019051810190610db791906115d2565b90925090506000826001811115610dd057610dd0611699565b03610e015760008082806020019051810190610dec91906116af565b91509150610dfa8282610f98565b50506105e0565b6001826001811115610e1557610e15611699565b03610e4157600081806020019051810190610e309190611590565b9050610e3b8161102f565b506105e0565b60405162461bcd60e51b815260206004820181905260248201527f4552433230546f6b656e536f757263653a20696e76616c696420616374696f6e604482015260640161031f565b6040516001600160a01b038085166024830152831660448201526064810182905261071a9085906323b872dd60e01b90608401610c57565b6000610f16826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b031661105a9092919063ffffffff16565b805190915015610f935780806020019051810190610f3491906116dd565b610f935760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b606482015260840161031f565b505050565b6001600160a01b038216610fbe5760405162461bcd60e51b815260040161031f9061140d565b604080516001600160a01b0384168152602081018390527f55aaef8fd8c07238c3618a93c8a1627194187d3b0952908e58f2ab0f944fb407910160405180910390a161102b7f00000000000000000000000000000000000000000000000000000000000000008383611071565b5050565b60035481111561025457600060035482611049919061146b565b9050611054816110a1565b50600355565b60606110698484600085611103565b949350505050565b6040516001600160a01b038316602482015260448101829052610f9390849063a9059cbb60e01b90606401610c57565b6040518181527f2cd3fd70cd5a5d6d805e90d22741aa1a84590ace7cf01b244719558d266143829060200160405180910390a16102547f0000000000000000000000000000000000000000000000000000000000000000600160981b83611071565b6060824710156111645760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b606482015260840161031f565b600080866001600160a01b0316858760405161118091906116ff565b60006040518083038185875af1925050503d80600081146111bd576040519150601f19603f3d011682016040523d82523d6000602084013e6111c2565b606091505b50915091506111d3878383876111de565b979650505050505050565b6060831561124d578251600003611246576001600160a01b0385163b6112465760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015260640161031f565b5081611069565b61106983838151156112625781518083602001fd5b8060405162461bcd60e51b815260040161031f919061171b565b60006020828403121561128e57600080fd5b5035919050565b6001600160a01b038116811461025457600080fd5b6000806000806000608086880312156112c257600080fd5b85356112cd81611295565b94506020860135935060408601359250606086013567ffffffffffffffff808211156112f857600080fd5b818801915088601f83011261130c57600080fd5b81358181111561131b57600080fd5b8960208260051b850101111561133057600080fd5b9699959850939650602001949392505050565b6000806000806060858703121561135957600080fd5b84359350602085013561136b81611295565b9250604085013567ffffffffffffffff8082111561138857600080fd5b818701915087601f83011261139c57600080fd5b8135818111156113ab57600080fd5b8860208285010111156113bd57600080fd5b95989497505060200194505050565b6000602082840312156113de57600080fd5b81356113e981611295565b9392505050565b60006020828403121561140257600080fd5b81516113e981611295565b60208082526028908201527f4552433230546f6b656e536f757263653a207a65726f20726563697069656e74604082015267206164647265737360c01b606082015260800190565b634e487b7160e01b600052601160045260246000fd5b81810381811115610ba357610ba3611455565b600081518084526020808501945080840160005b838110156114b75781516001600160a01b031687529582019590820190600101611492565b509495945050505050565b60005b838110156114dd5781810151838201526020016114c5565b50506000910152565b600081518084526114fe8160208601602086016114c2565b601f01601f19169290920160200192915050565b60208152815160208201526000602083015160018060a01b03808216604085015260408501519150808251166060850152506020810151608084015250606083015160a0830152608083015160e060c084015261157361010084018261147e565b905060a0840151601f198483030160e0850152610b9e82826114e6565b6000602082840312156115a257600080fd5b5051919050565b80820180821115610ba357610ba3611455565b634e487b7160e01b600052604160045260246000fd5b600080604083850312156115e557600080fd5b8251600281106115f457600080fd5b602084015190925067ffffffffffffffff8082111561161257600080fd5b818501915085601f83011261162657600080fd5b815181811115611638576116386115bc565b604051601f8201601f19908116603f01168101908382118183101715611660576116606115bc565b8160405282815288602084870101111561167957600080fd5b61168a8360208301602088016114c2565b80955050505050509250929050565b634e487b7160e01b600052602160045260246000fd5b600080604083850312156116c257600080fd5b82516116cd81611295565b6020939093015192949293505050565b6000602082840312156116ef57600080fd5b815180151581146113e957600080fd5b600082516117118184602087016114c2565b9190910192915050565b6020815260006113e960208301846114e656fea2646970667358221220d7d02f99d536a41e27b5caea9de0917bbe42efa0de817e4197c4f53418c10e2664736f6c634300081200334552433230546f6b656e536f757263653a207a65726f2064657374696e617469", } // ERC20TokenSourceABI is the input ABI used to generate the binding from. @@ -44,7 +44,7 @@ var ERC20TokenSourceABI = ERC20TokenSourceMetaData.ABI var ERC20TokenSourceBin = ERC20TokenSourceMetaData.Bin // DeployERC20TokenSource deploys a new Ethereum contract, binding an instance of ERC20TokenSource to it. -func DeployERC20TokenSource(auth *bind.TransactOpts, backend bind.ContractBackend, teleporterMessengerAddress common.Address, destinationBlockchainID_ [32]byte, nativeTokenDestinationAddress_ common.Address, erc20ContractAddress_ common.Address) (common.Address, *types.Transaction, *ERC20TokenSource, error) { +func DeployERC20TokenSource(auth *bind.TransactOpts, backend bind.ContractBackend, teleporterRegistryAddress common.Address, destinationBlockchainID_ [32]byte, nativeTokenDestinationAddress_ common.Address, erc20ContractAddress_ common.Address) (common.Address, *types.Transaction, *ERC20TokenSource, error) { parsed, err := ERC20TokenSourceMetaData.GetAbi() if err != nil { return common.Address{}, nil, nil, err @@ -53,7 +53,7 @@ func DeployERC20TokenSource(auth *bind.TransactOpts, backend bind.ContractBacken return common.Address{}, nil, nil, errors.New("GetABI returned nil") } - address, tx, contract, err := bind.DeployContract(auth, *parsed, common.FromHex(ERC20TokenSourceBin), backend, teleporterMessengerAddress, destinationBlockchainID_, nativeTokenDestinationAddress_, erc20ContractAddress_) + address, tx, contract, err := bind.DeployContract(auth, *parsed, common.FromHex(ERC20TokenSourceBin), backend, teleporterRegistryAddress, destinationBlockchainID_, nativeTokenDestinationAddress_, erc20ContractAddress_) if err != nil { return common.Address{}, nil, nil, err } @@ -357,6 +357,37 @@ func (_ERC20TokenSource *ERC20TokenSourceCallerSession) Erc20ContractAddress() ( return _ERC20TokenSource.Contract.Erc20ContractAddress(&_ERC20TokenSource.CallOpts) } +// GetMinTeleporterVersion is a free data retrieval call binding the contract method 0xd2cc7a70. +// +// Solidity: function getMinTeleporterVersion() view returns(uint256) +func (_ERC20TokenSource *ERC20TokenSourceCaller) GetMinTeleporterVersion(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _ERC20TokenSource.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 (_ERC20TokenSource *ERC20TokenSourceSession) GetMinTeleporterVersion() (*big.Int, error) { + return _ERC20TokenSource.Contract.GetMinTeleporterVersion(&_ERC20TokenSource.CallOpts) +} + +// GetMinTeleporterVersion is a free data retrieval call binding the contract method 0xd2cc7a70. +// +// Solidity: function getMinTeleporterVersion() view returns(uint256) +func (_ERC20TokenSource *ERC20TokenSourceCallerSession) GetMinTeleporterVersion() (*big.Int, error) { + return _ERC20TokenSource.Contract.GetMinTeleporterVersion(&_ERC20TokenSource.CallOpts) +} + // NativeTokenDestinationAddress is a free data retrieval call binding the contract method 0xb8c9091a. // // Solidity: function nativeTokenDestinationAddress() view returns(address) @@ -388,12 +419,12 @@ func (_ERC20TokenSource *ERC20TokenSourceCallerSession) NativeTokenDestinationAd return _ERC20TokenSource.Contract.NativeTokenDestinationAddress(&_ERC20TokenSource.CallOpts) } -// TeleporterMessenger is a free data retrieval call binding the contract method 0x9b3e5803. +// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. // -// Solidity: function teleporterMessenger() view returns(address) -func (_ERC20TokenSource *ERC20TokenSourceCaller) TeleporterMessenger(opts *bind.CallOpts) (common.Address, error) { +// Solidity: function owner() view returns(address) +func (_ERC20TokenSource *ERC20TokenSourceCaller) Owner(opts *bind.CallOpts) (common.Address, error) { var out []interface{} - err := _ERC20TokenSource.contract.Call(opts, &out, "teleporterMessenger") + err := _ERC20TokenSource.contract.Call(opts, &out, "owner") if err != nil { return *new(common.Address), err @@ -405,39 +436,112 @@ func (_ERC20TokenSource *ERC20TokenSourceCaller) TeleporterMessenger(opts *bind. } -// TeleporterMessenger is a free data retrieval call binding the contract method 0x9b3e5803. +// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. // -// Solidity: function teleporterMessenger() view returns(address) -func (_ERC20TokenSource *ERC20TokenSourceSession) TeleporterMessenger() (common.Address, error) { - return _ERC20TokenSource.Contract.TeleporterMessenger(&_ERC20TokenSource.CallOpts) +// Solidity: function owner() view returns(address) +func (_ERC20TokenSource *ERC20TokenSourceSession) Owner() (common.Address, error) { + return _ERC20TokenSource.Contract.Owner(&_ERC20TokenSource.CallOpts) } -// TeleporterMessenger is a free data retrieval call binding the contract method 0x9b3e5803. +// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. // -// Solidity: function teleporterMessenger() view returns(address) -func (_ERC20TokenSource *ERC20TokenSourceCallerSession) TeleporterMessenger() (common.Address, error) { - return _ERC20TokenSource.Contract.TeleporterMessenger(&_ERC20TokenSource.CallOpts) +// Solidity: function owner() view returns(address) +func (_ERC20TokenSource *ERC20TokenSourceCallerSession) Owner() (common.Address, error) { + return _ERC20TokenSource.Contract.Owner(&_ERC20TokenSource.CallOpts) +} + +// TeleporterRegistry is a free data retrieval call binding the contract method 0x1a7f5bec. +// +// Solidity: function teleporterRegistry() view returns(address) +func (_ERC20TokenSource *ERC20TokenSourceCaller) TeleporterRegistry(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _ERC20TokenSource.contract.Call(opts, &out, "teleporterRegistry") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// TeleporterRegistry is a free data retrieval call binding the contract method 0x1a7f5bec. +// +// Solidity: function teleporterRegistry() view returns(address) +func (_ERC20TokenSource *ERC20TokenSourceSession) TeleporterRegistry() (common.Address, error) { + return _ERC20TokenSource.Contract.TeleporterRegistry(&_ERC20TokenSource.CallOpts) +} + +// TeleporterRegistry is a free data retrieval call binding the contract method 0x1a7f5bec. +// +// Solidity: function teleporterRegistry() view returns(address) +func (_ERC20TokenSource *ERC20TokenSourceCallerSession) TeleporterRegistry() (common.Address, error) { + return _ERC20TokenSource.Contract.TeleporterRegistry(&_ERC20TokenSource.CallOpts) } // ReceiveTeleporterMessage is a paid mutator transaction binding the contract method 0xc868efaa. // -// Solidity: function receiveTeleporterMessage(bytes32 senderBlockchainID, address senderAddress, bytes message) returns() -func (_ERC20TokenSource *ERC20TokenSourceTransactor) ReceiveTeleporterMessage(opts *bind.TransactOpts, senderBlockchainID [32]byte, senderAddress common.Address, message []byte) (*types.Transaction, error) { - return _ERC20TokenSource.contract.Transact(opts, "receiveTeleporterMessage", senderBlockchainID, senderAddress, message) +// Solidity: function receiveTeleporterMessage(bytes32 originBlockchainID, address originSenderAddress, bytes message) returns() +func (_ERC20TokenSource *ERC20TokenSourceTransactor) ReceiveTeleporterMessage(opts *bind.TransactOpts, originBlockchainID [32]byte, originSenderAddress common.Address, message []byte) (*types.Transaction, error) { + return _ERC20TokenSource.contract.Transact(opts, "receiveTeleporterMessage", originBlockchainID, originSenderAddress, message) } // ReceiveTeleporterMessage is a paid mutator transaction binding the contract method 0xc868efaa. // -// Solidity: function receiveTeleporterMessage(bytes32 senderBlockchainID, address senderAddress, bytes message) returns() -func (_ERC20TokenSource *ERC20TokenSourceSession) ReceiveTeleporterMessage(senderBlockchainID [32]byte, senderAddress common.Address, message []byte) (*types.Transaction, error) { - return _ERC20TokenSource.Contract.ReceiveTeleporterMessage(&_ERC20TokenSource.TransactOpts, senderBlockchainID, senderAddress, message) +// Solidity: function receiveTeleporterMessage(bytes32 originBlockchainID, address originSenderAddress, bytes message) returns() +func (_ERC20TokenSource *ERC20TokenSourceSession) ReceiveTeleporterMessage(originBlockchainID [32]byte, originSenderAddress common.Address, message []byte) (*types.Transaction, error) { + return _ERC20TokenSource.Contract.ReceiveTeleporterMessage(&_ERC20TokenSource.TransactOpts, originBlockchainID, originSenderAddress, message) } // ReceiveTeleporterMessage is a paid mutator transaction binding the contract method 0xc868efaa. // -// Solidity: function receiveTeleporterMessage(bytes32 senderBlockchainID, address senderAddress, bytes message) returns() -func (_ERC20TokenSource *ERC20TokenSourceTransactorSession) ReceiveTeleporterMessage(senderBlockchainID [32]byte, senderAddress common.Address, message []byte) (*types.Transaction, error) { - return _ERC20TokenSource.Contract.ReceiveTeleporterMessage(&_ERC20TokenSource.TransactOpts, senderBlockchainID, senderAddress, message) +// Solidity: function receiveTeleporterMessage(bytes32 originBlockchainID, address originSenderAddress, bytes message) returns() +func (_ERC20TokenSource *ERC20TokenSourceTransactorSession) ReceiveTeleporterMessage(originBlockchainID [32]byte, originSenderAddress common.Address, message []byte) (*types.Transaction, error) { + return _ERC20TokenSource.Contract.ReceiveTeleporterMessage(&_ERC20TokenSource.TransactOpts, originBlockchainID, originSenderAddress, message) +} + +// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. +// +// Solidity: function renounceOwnership() returns() +func (_ERC20TokenSource *ERC20TokenSourceTransactor) RenounceOwnership(opts *bind.TransactOpts) (*types.Transaction, error) { + return _ERC20TokenSource.contract.Transact(opts, "renounceOwnership") +} + +// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. +// +// Solidity: function renounceOwnership() returns() +func (_ERC20TokenSource *ERC20TokenSourceSession) RenounceOwnership() (*types.Transaction, error) { + return _ERC20TokenSource.Contract.RenounceOwnership(&_ERC20TokenSource.TransactOpts) +} + +// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. +// +// Solidity: function renounceOwnership() returns() +func (_ERC20TokenSource *ERC20TokenSourceTransactorSession) RenounceOwnership() (*types.Transaction, error) { + return _ERC20TokenSource.Contract.RenounceOwnership(&_ERC20TokenSource.TransactOpts) +} + +// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// +// Solidity: function transferOwnership(address newOwner) returns() +func (_ERC20TokenSource *ERC20TokenSourceTransactor) TransferOwnership(opts *bind.TransactOpts, newOwner common.Address) (*types.Transaction, error) { + return _ERC20TokenSource.contract.Transact(opts, "transferOwnership", newOwner) +} + +// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// +// Solidity: function transferOwnership(address newOwner) returns() +func (_ERC20TokenSource *ERC20TokenSourceSession) TransferOwnership(newOwner common.Address) (*types.Transaction, error) { + return _ERC20TokenSource.Contract.TransferOwnership(&_ERC20TokenSource.TransactOpts, newOwner) +} + +// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// +// Solidity: function transferOwnership(address newOwner) returns() +func (_ERC20TokenSource *ERC20TokenSourceTransactorSession) TransferOwnership(newOwner common.Address) (*types.Transaction, error) { + return _ERC20TokenSource.Contract.TransferOwnership(&_ERC20TokenSource.TransactOpts, newOwner) } // TransferToDestination is a paid mutator transaction binding the contract method 0x87a2edba. @@ -461,6 +565,27 @@ func (_ERC20TokenSource *ERC20TokenSourceTransactorSession) TransferToDestinatio return _ERC20TokenSource.Contract.TransferToDestination(&_ERC20TokenSource.TransactOpts, recipient, totalAmount, feeAmount, allowedRelayerAddresses) } +// UpdateMinTeleporterVersion is a paid mutator transaction binding the contract method 0x5eb99514. +// +// Solidity: function updateMinTeleporterVersion(uint256 version) returns() +func (_ERC20TokenSource *ERC20TokenSourceTransactor) UpdateMinTeleporterVersion(opts *bind.TransactOpts, version *big.Int) (*types.Transaction, error) { + return _ERC20TokenSource.contract.Transact(opts, "updateMinTeleporterVersion", version) +} + +// UpdateMinTeleporterVersion is a paid mutator transaction binding the contract method 0x5eb99514. +// +// Solidity: function updateMinTeleporterVersion(uint256 version) returns() +func (_ERC20TokenSource *ERC20TokenSourceSession) UpdateMinTeleporterVersion(version *big.Int) (*types.Transaction, error) { + return _ERC20TokenSource.Contract.UpdateMinTeleporterVersion(&_ERC20TokenSource.TransactOpts, version) +} + +// UpdateMinTeleporterVersion is a paid mutator transaction binding the contract method 0x5eb99514. +// +// Solidity: function updateMinTeleporterVersion(uint256 version) returns() +func (_ERC20TokenSource *ERC20TokenSourceTransactorSession) UpdateMinTeleporterVersion(version *big.Int) (*types.Transaction, error) { + return _ERC20TokenSource.Contract.UpdateMinTeleporterVersion(&_ERC20TokenSource.TransactOpts, version) +} + // ERC20TokenSourceBurnTokensIterator is returned from FilterBurnTokens and is used to iterate over the raw logs and unpacked data for BurnTokens events raised by the ERC20TokenSource contract. type ERC20TokenSourceBurnTokensIterator struct { Event *ERC20TokenSourceBurnTokens // Event containing the contract specifics and raw log @@ -595,6 +720,312 @@ func (_ERC20TokenSource *ERC20TokenSourceFilterer) ParseBurnTokens(log types.Log return event, nil } +// ERC20TokenSourceMinTeleporterVersionUpdatedIterator is returned from FilterMinTeleporterVersionUpdated and is used to iterate over the raw logs and unpacked data for MinTeleporterVersionUpdated events raised by the ERC20TokenSource contract. +type ERC20TokenSourceMinTeleporterVersionUpdatedIterator struct { + Event *ERC20TokenSourceMinTeleporterVersionUpdated // 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 *ERC20TokenSourceMinTeleporterVersionUpdatedIterator) 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(ERC20TokenSourceMinTeleporterVersionUpdated) + 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(ERC20TokenSourceMinTeleporterVersionUpdated) + 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 *ERC20TokenSourceMinTeleporterVersionUpdatedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *ERC20TokenSourceMinTeleporterVersionUpdatedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// ERC20TokenSourceMinTeleporterVersionUpdated represents a MinTeleporterVersionUpdated event raised by the ERC20TokenSource contract. +type ERC20TokenSourceMinTeleporterVersionUpdated 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 (_ERC20TokenSource *ERC20TokenSourceFilterer) FilterMinTeleporterVersionUpdated(opts *bind.FilterOpts, oldMinTeleporterVersion []*big.Int, newMinTeleporterVersion []*big.Int) (*ERC20TokenSourceMinTeleporterVersionUpdatedIterator, 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 := _ERC20TokenSource.contract.FilterLogs(opts, "MinTeleporterVersionUpdated", oldMinTeleporterVersionRule, newMinTeleporterVersionRule) + if err != nil { + return nil, err + } + return &ERC20TokenSourceMinTeleporterVersionUpdatedIterator{contract: _ERC20TokenSource.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 (_ERC20TokenSource *ERC20TokenSourceFilterer) WatchMinTeleporterVersionUpdated(opts *bind.WatchOpts, sink chan<- *ERC20TokenSourceMinTeleporterVersionUpdated, 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 := _ERC20TokenSource.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(ERC20TokenSourceMinTeleporterVersionUpdated) + if err := _ERC20TokenSource.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 (_ERC20TokenSource *ERC20TokenSourceFilterer) ParseMinTeleporterVersionUpdated(log types.Log) (*ERC20TokenSourceMinTeleporterVersionUpdated, error) { + event := new(ERC20TokenSourceMinTeleporterVersionUpdated) + if err := _ERC20TokenSource.contract.UnpackLog(event, "MinTeleporterVersionUpdated", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// ERC20TokenSourceOwnershipTransferredIterator is returned from FilterOwnershipTransferred and is used to iterate over the raw logs and unpacked data for OwnershipTransferred events raised by the ERC20TokenSource contract. +type ERC20TokenSourceOwnershipTransferredIterator struct { + Event *ERC20TokenSourceOwnershipTransferred // 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 *ERC20TokenSourceOwnershipTransferredIterator) 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(ERC20TokenSourceOwnershipTransferred) + 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(ERC20TokenSourceOwnershipTransferred) + 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 *ERC20TokenSourceOwnershipTransferredIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *ERC20TokenSourceOwnershipTransferredIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// ERC20TokenSourceOwnershipTransferred represents a OwnershipTransferred event raised by the ERC20TokenSource contract. +type ERC20TokenSourceOwnershipTransferred 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 (_ERC20TokenSource *ERC20TokenSourceFilterer) FilterOwnershipTransferred(opts *bind.FilterOpts, previousOwner []common.Address, newOwner []common.Address) (*ERC20TokenSourceOwnershipTransferredIterator, 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 := _ERC20TokenSource.contract.FilterLogs(opts, "OwnershipTransferred", previousOwnerRule, newOwnerRule) + if err != nil { + return nil, err + } + return &ERC20TokenSourceOwnershipTransferredIterator{contract: _ERC20TokenSource.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 (_ERC20TokenSource *ERC20TokenSourceFilterer) WatchOwnershipTransferred(opts *bind.WatchOpts, sink chan<- *ERC20TokenSourceOwnershipTransferred, 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 := _ERC20TokenSource.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(ERC20TokenSourceOwnershipTransferred) + if err := _ERC20TokenSource.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 (_ERC20TokenSource *ERC20TokenSourceFilterer) ParseOwnershipTransferred(log types.Log) (*ERC20TokenSourceOwnershipTransferred, error) { + event := new(ERC20TokenSourceOwnershipTransferred) + if err := _ERC20TokenSource.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + // ERC20TokenSourceTransferToDestinationIterator is returned from FilterTransferToDestination and is used to iterate over the raw logs and unpacked data for TransferToDestination events raised by the ERC20TokenSource contract. type ERC20TokenSourceTransferToDestinationIterator struct { Event *ERC20TokenSourceTransferToDestination // Event containing the contract specifics and raw log diff --git a/abi-bindings/go/CrossChainApplications/NativeTokenBridge/NativeTokenDestination/NativeTokenDestination.go b/abi-bindings/go/CrossChainApplications/NativeTokenBridge/NativeTokenDestination/NativeTokenDestination.go index 3ac3a2f87..4e33d50f3 100644 --- a/abi-bindings/go/CrossChainApplications/NativeTokenBridge/NativeTokenDestination/NativeTokenDestination.go +++ b/abi-bindings/go/CrossChainApplications/NativeTokenBridge/NativeTokenDestination/NativeTokenDestination.go @@ -37,8 +37,8 @@ type TeleporterFeeInfo struct { // NativeTokenDestinationMetaData contains all meta data concerning the NativeTokenDestination contract. var NativeTokenDestinationMetaData = &bind.MetaData{ - ABI: "[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"teleporterMessengerAddress\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"sourceBlockchainID_\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"nativeTokenSourceAddress_\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"initialReserveImbalance_\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"remaining\",\"type\":\"uint256\"}],\"name\":\"CollateralAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"NativeTokensMinted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"teleporterMessageID\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"burnAddressBalance\",\"type\":\"uint256\"}],\"name\":\"ReportTotalBurnedTxFees\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"teleporterMessageID\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"TransferToSource\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"BURNED_TX_FEES_ADDRESS\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"BURN_FOR_TRANSFER_ADDRESS\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"REPORT_BURNED_TOKENS_REQUIRED_GAS\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"TRANSFER_NATIVE_TOKENS_REQUIRED_GAS\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"currentReserveImbalance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"initialReserveImbalance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"isCollateralized\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"nativeTokenSourceAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"senderBlockchainID\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"senderAddress\",\"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\"},{\"internalType\":\"address[]\",\"name\":\"allowedRelayerAddresses\",\"type\":\"address[]\"}],\"name\":\"reportTotalBurnedTxFees\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sourceBlockchainID\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"teleporterMessenger\",\"outputs\":[{\"internalType\":\"contractITeleporterMessenger\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalMinted\",\"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\":\"recipient\",\"type\":\"address\"},{\"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\":\"transferToSource\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"}]", - Bin: "0x6101206040527302000000000000000000000000000000000000016080523480156200002a57600080fd5b5060405162001bf138038062001bf18339810160408190526200004d9162000350565b60016000556001600160a01b038416620000d45760405162461bcd60e51b815260206004820152603860248201527f4e6174697665546f6b656e44657374696e6174696f6e3a207a65726f2054656c60448201527f65706f727465724d657373656e6765722061646472657373000000000000000060648201526084015b60405180910390fd5b6001600160a01b03841661010052826200013a5760405162461bcd60e51b8152602060048201526031602482015260008051602062001bd18339815191526044820152701c98d948189b1bd8dad8da185a5b881251607a1b6064820152608401620000cb565b7302000000000000000000000000000000000000056001600160a01b0316634213cf786040518163ffffffff1660e01b8152600401602060405180830381865afa1580156200018d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620001b3919062000399565b8303620002295760405162461bcd60e51b815260206004820152603a60248201527f4e6174697665546f6b656e44657374696e6174696f6e3a2063616e6e6f74206260448201527f726964676520776974682073616d6520626c6f636b636861696e0000000000006064820152608401620000cb565b60a08390526001600160a01b0382166200029b5760405162461bcd60e51b8152602060048201526034602482015260008051602062001bd183398151915260448201527f72636520636f6e747261637420616464726573730000000000000000000000006064820152608401620000cb565b6001600160a01b03821660c0526000819003620003215760405162461bcd60e51b815260206004820152603660248201527f4e6174697665546f6b656e44657374696e6174696f6e3a207a65726f20696e6960448201527f7469616c207265736572766520696d62616c616e6365000000000000000000006064820152608401620000cb565b60e081905260015550620003b3915050565b80516001600160a01b03811681146200034b57600080fd5b919050565b600080600080608085870312156200036757600080fd5b620003728562000333565b935060208501519250620003896040860162000333565b6060959095015193969295505050565b600060208284031215620003ac57600080fd5b5051919050565b60805160a05160c05160e0516101005161178c62000445600039600081816102440152818161035c015281816105fe01528181610638015261084801526000818161021001526103060152600081816101b1015281816103bc01528181610698015261096b01526000818161013c015281816103960152818161067201526108e701526000610bdc015261178c6000f3fe6080604052600436106100e75760003560e01c80638ac7dd201161008a578063ab28523011610059578063ab28523014610297578063c452165e146102ae578063c868efaa146102c6578063d30951261461029757600080fd5b80638ac7dd20146101fe5780639b3e580314610232578063a2309ff814610266578063a2a950171461027c57600080fd5b80633a94fe51116100c65780633a94fe511461015e57806349e3284e146101805780635d93f9af1461019f57806375846562146101eb57600080fd5b8062d872ae146100ec57806318160ddd1461011557806329b7b3fd1461012a575b600080fd5b3480156100f857600080fd5b5061010260015481565b6040519081526020015b60405180910390f35b34801561012157600080fd5b506101026102e6565b34801561013657600080fd5b506101027f000000000000000000000000000000000000000000000000000000000000000081565b34801561016a57600080fd5b5061017e61017936600461130a565b610345565b005b34801561018c57600080fd5b506001546040519015815260200161010c565b3480156101ab57600080fd5b506101d37f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b03909116815260200161010c565b61017e6101f9366004611376565b610520565b34801561020a57600080fd5b506101027f000000000000000000000000000000000000000000000000000000000000000081565b34801561023e57600080fd5b506101d37f000000000000000000000000000000000000000000000000000000000000000081565b34801561027257600080fd5b5061010260025481565b34801561028857600080fd5b506101d36001600160981b0181565b3480156102a357600080fd5b50610102620186a081565b3480156102ba57600080fd5b506101d3600160981b81565b3480156102d257600080fd5b5061017e6102e13660046113da565b610835565b6000806103006001600160981b0131600160981b31611479565b905060007f00000000000000000000000000000000000000000000000000000000000000006002546103329190611479565b905061033e828261148c565b9250505090565b6000600160981b6001600160a01b031631905060007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663624488506040518060c001604052807f000000000000000000000000000000000000000000000000000000000000000081526020017f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03168152602001888036038101906103fa919061149f565b8152602001620186a081526020018787808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152505050908252506040805160208082018990528251808303820181528284019093529092019161046c91600191606001611555565b6040516020818303038152906040528152506040518263ffffffff1660e01b815260040161049a91906115d0565b6020604051808303816000875af11580156104b9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104dd919061164e565b9050807f2550fa6041684d40e635e29e93dde9017d70c25b46aa88393317b5182ed6ae7c8360405161051191815260200190565b60405180910390a25050505050565b610528610c46565b6001600160a01b0384166105575760405162461bcd60e51b815260040161054e90611667565b60405180910390fd5b600154156105c45760405162461bcd60e51b815260206004820152603460248201527f4e6174697665546f6b656e44657374696e6174696f6e3a20636f6e7472616374604482015273081d5b99195c98dbdb1b185d195c985b1a5e995960621b606482015260840161054e565b6000602084013515610623576105ea6105e060208601866116b5565b8560200135610c9f565b90506106236105fc60208601866116b5565b7f000000000000000000000000000000000000000000000000000000000000000083610e09565b6106346001600160981b0134610eee565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663624488506040518060c001604052807f000000000000000000000000000000000000000000000000000000000000000081526020017f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03168152602001888036038101906106d6919061149f565b8152602001620186a081526020018787808060200260200160405190810160405280939291908181526020018383602002808284376000920182905250938552505060405160209384019361074492508d913491016001600160a01b03929092168252602082015260400190565b60408051601f19818403018152908290526107629291602001611555565b6040516020818303038152906040528152506040518263ffffffff1660e01b815260040161079091906115d0565b6020604051808303816000875af11580156107af573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107d3919061164e565b905080866001600160a01b0316336001600160a01b03167f0322cbb1d3c23f6dbf1deddb3b4ef3ce0f93ae6eec7b44e4f395804104466d143460405161081b91815260200190565b60405180910390a4505061082f6001600055565b50505050565b61083d610c46565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146108e55760405162461bcd60e51b815260206004820152604160248201527f4e6174697665546f6b656e44657374696e6174696f6e3a20756e617574686f7260448201527f697a65642054656c65706f727465724d657373656e67657220636f6e747261636064820152601d60fa1b608482015260a40161054e565b7f000000000000000000000000000000000000000000000000000000000000000084146109695760405162461bcd60e51b815260206004820152602c60248201527f4e6174697665546f6b656e44657374696e6174696f6e3a20696e76616c69642060448201526b39b7bab931b29031b430b4b760a11b606482015260840161054e565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316836001600160a01b0316146109fe5760405162461bcd60e51b815260206004820152602b60248201527f4e6174697665546f6b656e44657374696e6174696f6e3a20756e617574686f7260448201526a34bd32b21039b2b73232b960a91b606482015260840161054e565b600080610a0d838501856116d9565b90925090506001600160a01b038216610a385760405162461bcd60e51b815260040161054e90611667565b80600003610a9c5760405162461bcd60e51b815260206004820152602b60248201527f4e6174697665546f6b656e44657374696e6174696f6e3a207a65726f2074726160448201526a6e736665722076616c756560a81b606482015260840161054e565b600154819015610b6157600154821115610b055760015460408051918252600060208301527f244160b15e69cc411f041d94ae7fab6f6bba85dade8403216c05ff4b920d5449910160405180910390a1600154610af9908361148c565b60006001559050610b61565b8160016000828254610b17919061148c565b90915550506001546040805184815260208101929092527f244160b15e69cc411f041d94ae7fab6f6bba85dade8403216c05ff4b920d5449910160405180910390a1505050610c3c565b8060026000828254610b739190611479565b90915550506040518181526001600160a01b038416907fd949ea0e9d5db53492d77f28fd5467fb2f6c4f5b88e3350e3c36729b76e99cf29060200160405180910390a26040516327ad555d60e11b81526001600160a01b038481166004830152602482018390527f00000000000000000000000000000000000000000000000000000000000000001690634f5aaaba90604401600060405180830381600087803b158015610c2057600080fd5b505af1158015610c34573d6000803e3d6000fd5b505050505050505b61082f6001600055565b600260005403610c985760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015260640161054e565b6002600055565b6040516370a0823160e01b815230600482015260009081906001600160a01b038516906370a0823190602401602060405180830381865afa158015610ce8573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d0c919061164e565b9050610d236001600160a01b03851633308661100c565b6040516370a0823160e01b81523060048201526000906001600160a01b038616906370a0823190602401602060405180830381865afa158015610d6a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d8e919061164e565b9050818111610df45760405162461bcd60e51b815260206004820152602c60248201527f5361666545524332305472616e7366657246726f6d3a2062616c616e6365206e60448201526b1bdd081a5b98dc99585cd95960a21b606482015260840161054e565b610dfe828261148c565b925050505b92915050565b604051636eb1769f60e11b81523060048201526001600160a01b038381166024830152600091839186169063dd62ed3e90604401602060405180830381865afa158015610e5a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e7e919061164e565b610e889190611479565b6040516001600160a01b03851660248201526044810182905290915061082f90859063095ea7b360e01b906064015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152611044565b80471015610f3e5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e6365000000604482015260640161054e565b6000826001600160a01b03168260405160006040518083038185875af1925050503d8060008114610f8b576040519150601f19603f3d011682016040523d82523d6000602084013e610f90565b606091505b50509050806110075760405162461bcd60e51b815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d61792068617665207265766572746564000000000000606482015260840161054e565b505050565b6040516001600160a01b038085166024830152831660448201526064810182905261082f9085906323b872dd60e01b90608401610eb7565b6000611099826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166111169092919063ffffffff16565b80519091501561100757808060200190518101906110b79190611705565b6110075760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b606482015260840161054e565b6060611125848460008561112d565b949350505050565b60608247101561118e5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b606482015260840161054e565b600080866001600160a01b031685876040516111aa9190611727565b60006040518083038185875af1925050503d80600081146111e7576040519150601f19603f3d011682016040523d82523d6000602084013e6111ec565b606091505b50915091506111fd87838387611208565b979650505050505050565b60608315611277578251600003611270576001600160a01b0385163b6112705760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015260640161054e565b5081611125565b611125838381511561128c5781518083602001fd5b8060405162461bcd60e51b815260040161054e9190611743565b6000604082840312156112b857600080fd5b50919050565b60008083601f8401126112d057600080fd5b50813567ffffffffffffffff8111156112e857600080fd5b6020830191508360208260051b850101111561130357600080fd5b9250929050565b60008060006060848603121561131f57600080fd5b61132985856112a6565b9250604084013567ffffffffffffffff81111561134557600080fd5b611351868287016112be565b9497909650939450505050565b6001600160a01b038116811461137357600080fd5b50565b6000806000806080858703121561138c57600080fd5b84356113978161135e565b93506113a686602087016112a6565b9250606085013567ffffffffffffffff8111156113c257600080fd5b6113ce878288016112be565b95989497509550505050565b600080600080606085870312156113f057600080fd5b8435935060208501356114028161135e565b9250604085013567ffffffffffffffff8082111561141f57600080fd5b818701915087601f83011261143357600080fd5b81358181111561144257600080fd5b88602082850101111561145457600080fd5b95989497505060200194505050565b634e487b7160e01b600052601160045260246000fd5b80820180821115610e0357610e03611463565b81810381811115610e0357610e03611463565b6000604082840312156114b157600080fd5b6040516040810181811067ffffffffffffffff821117156114e257634e487b7160e01b600052604160045260246000fd5b60405282356114f08161135e565b81526020928301359281019290925250919050565b60005b83811015611520578181015183820152602001611508565b50506000910152565b60008151808452611541816020860160208601611505565b601f01601f19169290920160200192915050565b60006002841061157557634e487b7160e01b600052602160045260246000fd5b838252604060208301526111256040830184611529565b600081518084526020808501945080840160005b838110156115c55781516001600160a01b0316875295820195908201906001016115a0565b509495945050505050565b60208152815160208201526000602083015160018060a01b03808216604085015260408501519150808251166060850152506020810151608084015250606083015160a0830152608083015160e060c084015261163161010084018261158c565b905060a0840151601f198483030160e0850152610dfe8282611529565b60006020828403121561166057600080fd5b5051919050565b6020808252602e908201527f4e6174697665546f6b656e44657374696e6174696f6e3a207a65726f2072656360408201526d697069656e74206164647265737360901b606082015260800190565b6000602082840312156116c757600080fd5b81356116d28161135e565b9392505050565b600080604083850312156116ec57600080fd5b82356116f78161135e565b946020939093013593505050565b60006020828403121561171757600080fd5b815180151581146116d257600080fd5b60008251611739818460208701611505565b9190910192915050565b6020815260006116d2602083018461152956fea26469706673582212205d326fcb3551f8c55e1f7f5b63b34a003743c912c76760197098dab12cb9165764736f6c634300081200334e6174697665546f6b656e44657374696e6174696f6e3a207a65726f20736f75", + ABI: "[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"teleporterRegistryAddress\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"sourceBlockchainID_\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"nativeTokenSourceAddress_\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"initialReserveImbalance_\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"remaining\",\"type\":\"uint256\"}],\"name\":\"CollateralAdded\",\"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\":\"recipient\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"NativeTokensMinted\",\"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\":\"uint256\",\"name\":\"teleporterMessageID\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"burnAddressBalance\",\"type\":\"uint256\"}],\"name\":\"ReportTotalBurnedTxFees\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"teleporterMessageID\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"TransferToSource\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"BURNED_TX_FEES_ADDRESS\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"BURN_FOR_TRANSFER_ADDRESS\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"REPORT_BURNED_TOKENS_REQUIRED_GAS\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"TRANSFER_NATIVE_TOKENS_REQUIRED_GAS\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"currentReserveImbalance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getMinTeleporterVersion\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"initialReserveImbalance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"isCollateralized\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"nativeTokenSourceAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"originBlockchainID\",\"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\":\"address\",\"name\":\"feeTokenAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"internalType\":\"structTeleporterFeeInfo\",\"name\":\"feeInfo\",\"type\":\"tuple\"},{\"internalType\":\"address[]\",\"name\":\"allowedRelayerAddresses\",\"type\":\"address[]\"}],\"name\":\"reportTotalBurnedTxFees\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sourceBlockchainID\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"teleporterRegistry\",\"outputs\":[{\"internalType\":\"contractTeleporterRegistry\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalMinted\",\"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\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"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\":\"transferToSource\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"version\",\"type\":\"uint256\"}],\"name\":\"updateMinTeleporterVersion\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", + Bin: "0x61012060405273020000000000000000000000000000000000000160a0523480156200002a57600080fd5b50604051620021ce380380620021ce8339810160408190526200004d9162000418565b83806001600160a01b038116620000d15760405162461bcd60e51b815260206004820152603760248201527f54656c65706f727465725570677261646561626c653a207a65726f2074656c6560448201527f706f72746572207265676973747279206164647265737300000000000000000060648201526084015b60405180910390fd5b6001600160a01b03811660808190526040805163301fd1f560e21b8152905163c07f47d4916004808201926020929091908290030181865afa1580156200011c573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000142919062000461565b600055506200015133620003a9565b50600160025582620001af5760405162461bcd60e51b81526020600482015260316024820152600080516020620021ae8339815191526044820152701c98d948189b1bd8dad8da185a5b881251607a1b6064820152608401620000c8565b7302000000000000000000000000000000000000056001600160a01b0316634213cf786040518163ffffffff1660e01b8152600401602060405180830381865afa15801562000202573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000228919062000461565b83036200029e5760405162461bcd60e51b815260206004820152603a60248201527f4e6174697665546f6b656e44657374696e6174696f6e3a2063616e6e6f74206260448201527f726964676520776974682073616d6520626c6f636b636861696e0000000000006064820152608401620000c8565b60c08390526001600160a01b038216620003105760405162461bcd60e51b81526020600482015260346024820152600080516020620021ae83398151915260448201527f72636520636f6e747261637420616464726573730000000000000000000000006064820152608401620000c8565b6001600160a01b03821660e0526000819003620003965760405162461bcd60e51b815260206004820152603660248201527f4e6174697665546f6b656e44657374696e6174696f6e3a207a65726f20696e6960448201527f7469616c207265736572766520696d62616c616e6365000000000000000000006064820152608401620000c8565b610100819052600355506200047b915050565b600180546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b80516001600160a01b03811681146200041357600080fd5b919050565b600080600080608085870312156200042f57600080fd5b6200043a85620003fb565b9350602085015192506200045160408601620003fb565b6060959095015193969295505050565b6000602082840312156200047457600080fd5b5051919050565b60805160a05160c05160e05161010051611ca16200050d600039600081816102b001526103c5015260008181610234015281816104e10152818161082c015261120f0152600081816101bf015281816104bb01528181610806015261118b01526000611488015260008181610173015281816104080152818161067a015281816109e20152610b7f0152611ca16000f3fe60806040526004361061011e5760003560e01c80638ac7dd20116100a0578063c452165e11610064578063c452165e14610338578063c868efaa14610350578063d2cc7a7014610370578063d309512614610321578063f2fde38b1461038557600080fd5b80638ac7dd201461029e5780638da5cb5b146102d2578063a2309ff8146102f0578063a2a9501714610306578063ab2852301461032157600080fd5b806349e3284e116100e757806349e3284e146102035780635d93f9af146102225780635eb9951414610256578063715018a614610276578063758465621461028b57600080fd5b8062d872ae1461012357806318160ddd1461014c5780631a7f5bec1461016157806329b7b3fd146101ad5780633a94fe51146101e1575b600080fd5b34801561012f57600080fd5b5061013960035481565b6040519081526020015b60405180910390f35b34801561015857600080fd5b506101396103a5565b34801561016d57600080fd5b506101957f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b039091168152602001610143565b3480156101b957600080fd5b506101397f000000000000000000000000000000000000000000000000000000000000000081565b3480156101ed57600080fd5b506102016101fc3660046117ea565b610404565b005b34801561020f57600080fd5b5060035460405190158152602001610143565b34801561022e57600080fd5b506101957f000000000000000000000000000000000000000000000000000000000000000081565b34801561026257600080fd5b5061020161027136600461183e565b610646565b34801561028257600080fd5b5061020161065a565b61020161029936600461186c565b61066e565b3480156102aa57600080fd5b506101397f000000000000000000000000000000000000000000000000000000000000000081565b3480156102de57600080fd5b506001546001600160a01b0316610195565b3480156102fc57600080fd5b5061013960045481565b34801561031257600080fd5b506101956001600160981b0181565b34801561032d57600080fd5b50610139620186a081565b34801561034457600080fd5b50610195600160981b81565b34801561035c57600080fd5b5061020161036b3660046118d0565b6109ca565b34801561037c57600080fd5b50600054610139565b34801561039157600080fd5b506102016103a0366004611959565b610afd565b6000806103bf6001600160981b0131600160981b31611993565b905060007f00000000000000000000000000000000000000000000000000000000000000006004546103f19190611993565b90506103fd82826119a6565b9250505090565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d820e64f6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610464573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061048891906119b9565b90506000600160981b6001600160a01b03163190506000826001600160a01b031663624488506040518060c001604052807f000000000000000000000000000000000000000000000000000000000000000081526020017f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031681526020018980360381019061051f91906119d6565b8152602001620186a081526020018888808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152505050908252506040805160208082018990528251808303820181528284019093529092019161059191600191606001611a8c565b6040516020818303038152906040528152506040518263ffffffff1660e01b81526004016105bf9190611b07565b6020604051808303816000875af11580156105de573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106029190611b85565b9050807f2550fa6041684d40e635e29e93dde9017d70c25b46aa88393317b5182ed6ae7c8360405161063691815260200190565b60405180910390a2505050505050565b61064e610b73565b61065781610b7b565b50565b610662610d19565b61066c6000610d73565b565b610676610dc5565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d820e64f6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156106d6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106fa91906119b9565b90506001600160a01b03851661072b5760405162461bcd60e51b815260040161072290611b9e565b60405180910390fd5b600354156107985760405162461bcd60e51b815260206004820152603460248201527f4e6174697665546f6b656e44657374696e6174696f6e3a20636f6e7472616374604482015273081d5b99195c98dbdb1b185d195c985b1a5e995960621b6064820152608401610722565b60006020850135156107d7576107be6107b46020870187611959565b8660200135610e1c565b90506107d76107d06020870187611959565b8383610f86565b6107e86001600160981b013461106b565b6000826001600160a01b031663624488506040518060c001604052807f000000000000000000000000000000000000000000000000000000000000000081526020017f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031681526020018980360381019061086a91906119d6565b8152602001620186a08152602001888880806020026020016040519081016040528093929190818152602001838360200280828437600092018290525093855250506040516020938401936108d892508e913491016001600160a01b03929092168252602082015260400190565b60408051601f19818403018152908290526108f69291602001611a8c565b6040516020818303038152906040528152506040518263ffffffff1660e01b81526004016109249190611b07565b6020604051808303816000875af1158015610943573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109679190611b85565b905080876001600160a01b0316336001600160a01b03167f0322cbb1d3c23f6dbf1deddb3b4ef3ce0f93ae6eec7b44e4f395804104466d14346040516109af91815260200190565b60405180910390a45050506109c46001600255565b50505050565b60005460405163260f846760e11b81523360048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690634c1f08ce90602401602060405180830381865afa158015610a31573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a559190611b85565b1015610abc5760405162461bcd60e51b815260206004820152603060248201527f54656c65706f727465725570677261646561626c653a20696e76616c6964205460448201526f32b632b837b93a32b91039b2b73232b960811b6064820152608401610722565b6109c4848484848080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061118992505050565b610b05610d19565b6001600160a01b038116610b6a5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610722565b61065781610d73565b61066c610d19565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663c07f47d46040518163ffffffff1660e01b8152600401602060405180830381865afa158015610bdb573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610bff9190611b85565b60005490915081831115610c6f5760405162461bcd60e51b815260206004820152603160248201527f54656c65706f727465725570677261646561626c653a20696e76616c6964205460448201527032b632b837b93a32b9103b32b939b4b7b760791b6064820152608401610722565b808311610ce45760405162461bcd60e51b815260206004820152603f60248201527f54656c65706f727465725570677261646561626c653a206e6f7420677265617460448201527f6572207468616e2063757272656e74206d696e696d756d2076657273696f6e006064820152608401610722565b6000838155604051849183917fa9a7ef57e41f05b4c15480842f5f0c27edfcbb553fed281f7c4068452cc1c02d9190a3505050565b6001546001600160a01b0316331461066c5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610722565b600180546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6002805403610e165760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610722565b60028055565b6040516370a0823160e01b815230600482015260009081906001600160a01b038516906370a0823190602401602060405180830381865afa158015610e65573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e899190611b85565b9050610ea06001600160a01b0385163330866114ec565b6040516370a0823160e01b81523060048201526000906001600160a01b038616906370a0823190602401602060405180830381865afa158015610ee7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f0b9190611b85565b9050818111610f715760405162461bcd60e51b815260206004820152602c60248201527f5361666545524332305472616e7366657246726f6d3a2062616c616e6365206e60448201526b1bdd081a5b98dc99585cd95960a21b6064820152608401610722565b610f7b82826119a6565b925050505b92915050565b604051636eb1769f60e11b81523060048201526001600160a01b038381166024830152600091839186169063dd62ed3e90604401602060405180830381865afa158015610fd7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ffb9190611b85565b6110059190611993565b6040516001600160a01b0385166024820152604481018290529091506109c490859063095ea7b360e01b906064015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152611524565b804710156110bb5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e63650000006044820152606401610722565b6000826001600160a01b03168260405160006040518083038185875af1925050503d8060008114611108576040519150601f19603f3d011682016040523d82523d6000602084013e61110d565b606091505b50509050806111845760405162461bcd60e51b815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d617920686176652072657665727465640000000000006064820152608401610722565b505050565b7f0000000000000000000000000000000000000000000000000000000000000000831461120d5760405162461bcd60e51b815260206004820152602c60248201527f4e6174697665546f6b656e44657374696e6174696f6e3a20696e76616c69642060448201526b39b7bab931b29031b430b4b760a11b6064820152608401610722565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316826001600160a01b0316146112a25760405162461bcd60e51b815260206004820152602b60248201527f4e6174697665546f6b656e44657374696e6174696f6e3a20756e617574686f7260448201526a34bd32b21039b2b73232b960a91b6064820152608401610722565b600080828060200190518101906112b99190611bec565b90925090506001600160a01b0382166112e45760405162461bcd60e51b815260040161072290611b9e565b806000036113485760405162461bcd60e51b815260206004820152602b60248201527f4e6174697665546f6b656e44657374696e6174696f6e3a207a65726f2074726160448201526a6e736665722076616c756560a81b6064820152608401610722565b60035481901561140d576003548211156113b15760035460408051918252600060208301527f244160b15e69cc411f041d94ae7fab6f6bba85dade8403216c05ff4b920d5449910160405180910390a16003546113a590836119a6565b6000600355905061140d565b81600360008282546113c391906119a6565b90915550506003546040805184815260208101929092527f244160b15e69cc411f041d94ae7fab6f6bba85dade8403216c05ff4b920d5449910160405180910390a1505050505050565b806004600082825461141f9190611993565b90915550506040518181526001600160a01b038416907fd949ea0e9d5db53492d77f28fd5467fb2f6c4f5b88e3350e3c36729b76e99cf29060200160405180910390a26040516327ad555d60e11b81526001600160a01b038481166004830152602482018390527f00000000000000000000000000000000000000000000000000000000000000001690634f5aaaba90604401600060405180830381600087803b1580156114cc57600080fd5b505af11580156114e0573d6000803e3d6000fd5b50505050505050505050565b6040516001600160a01b03808516602483015283166044820152606481018290526109c49085906323b872dd60e01b90608401611034565b6000611579826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166115f69092919063ffffffff16565b80519091501561118457808060200190518101906115979190611c1a565b6111845760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610722565b6060611605848460008561160d565b949350505050565b60608247101561166e5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b6064820152608401610722565b600080866001600160a01b0316858760405161168a9190611c3c565b60006040518083038185875af1925050503d80600081146116c7576040519150601f19603f3d011682016040523d82523d6000602084013e6116cc565b606091505b50915091506116dd878383876116e8565b979650505050505050565b60608315611757578251600003611750576001600160a01b0385163b6117505760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610722565b5081611605565b611605838381511561176c5781518083602001fd5b8060405162461bcd60e51b81526004016107229190611c58565b60006040828403121561179857600080fd5b50919050565b60008083601f8401126117b057600080fd5b50813567ffffffffffffffff8111156117c857600080fd5b6020830191508360208260051b85010111156117e357600080fd5b9250929050565b6000806000606084860312156117ff57600080fd5b6118098585611786565b9250604084013567ffffffffffffffff81111561182557600080fd5b6118318682870161179e565b9497909650939450505050565b60006020828403121561185057600080fd5b5035919050565b6001600160a01b038116811461065757600080fd5b6000806000806080858703121561188257600080fd5b843561188d81611857565b935061189c8660208701611786565b9250606085013567ffffffffffffffff8111156118b857600080fd5b6118c48782880161179e565b95989497509550505050565b600080600080606085870312156118e657600080fd5b8435935060208501356118f881611857565b9250604085013567ffffffffffffffff8082111561191557600080fd5b818701915087601f83011261192957600080fd5b81358181111561193857600080fd5b88602082850101111561194a57600080fd5b95989497505060200194505050565b60006020828403121561196b57600080fd5b813561197681611857565b9392505050565b634e487b7160e01b600052601160045260246000fd5b80820180821115610f8057610f8061197d565b81810381811115610f8057610f8061197d565b6000602082840312156119cb57600080fd5b815161197681611857565b6000604082840312156119e857600080fd5b6040516040810181811067ffffffffffffffff82111715611a1957634e487b7160e01b600052604160045260246000fd5b6040528235611a2781611857565b81526020928301359281019290925250919050565b60005b83811015611a57578181015183820152602001611a3f565b50506000910152565b60008151808452611a78816020860160208601611a3c565b601f01601f19169290920160200192915050565b600060028410611aac57634e487b7160e01b600052602160045260246000fd5b838252604060208301526116056040830184611a60565b600081518084526020808501945080840160005b83811015611afc5781516001600160a01b031687529582019590820190600101611ad7565b509495945050505050565b60208152815160208201526000602083015160018060a01b03808216604085015260408501519150808251166060850152506020810151608084015250606083015160a0830152608083015160e060c0840152611b68610100840182611ac3565b905060a0840151601f198483030160e0850152610f7b8282611a60565b600060208284031215611b9757600080fd5b5051919050565b6020808252602e908201527f4e6174697665546f6b656e44657374696e6174696f6e3a207a65726f2072656360408201526d697069656e74206164647265737360901b606082015260800190565b60008060408385031215611bff57600080fd5b8251611c0a81611857565b6020939093015192949293505050565b600060208284031215611c2c57600080fd5b8151801515811461197657600080fd5b60008251611c4e818460208701611a3c565b9190910192915050565b6020815260006119766020830184611a6056fea2646970667358221220b34091d933be188bf6b9667db585a8317ab395aedc3581a0af8d490671a3411a64736f6c634300081200334e6174697665546f6b656e44657374696e6174696f6e3a207a65726f20736f75", } // NativeTokenDestinationABI is the input ABI used to generate the binding from. @@ -50,7 +50,7 @@ var NativeTokenDestinationABI = NativeTokenDestinationMetaData.ABI var NativeTokenDestinationBin = NativeTokenDestinationMetaData.Bin // DeployNativeTokenDestination deploys a new Ethereum contract, binding an instance of NativeTokenDestination to it. -func DeployNativeTokenDestination(auth *bind.TransactOpts, backend bind.ContractBackend, teleporterMessengerAddress common.Address, sourceBlockchainID_ [32]byte, nativeTokenSourceAddress_ common.Address, initialReserveImbalance_ *big.Int) (common.Address, *types.Transaction, *NativeTokenDestination, error) { +func DeployNativeTokenDestination(auth *bind.TransactOpts, backend bind.ContractBackend, teleporterRegistryAddress common.Address, sourceBlockchainID_ [32]byte, nativeTokenSourceAddress_ common.Address, initialReserveImbalance_ *big.Int) (common.Address, *types.Transaction, *NativeTokenDestination, error) { parsed, err := NativeTokenDestinationMetaData.GetAbi() if err != nil { return common.Address{}, nil, nil, err @@ -59,7 +59,7 @@ func DeployNativeTokenDestination(auth *bind.TransactOpts, backend bind.Contract return common.Address{}, nil, nil, errors.New("GetABI returned nil") } - address, tx, contract, err := bind.DeployContract(auth, *parsed, common.FromHex(NativeTokenDestinationBin), backend, teleporterMessengerAddress, sourceBlockchainID_, nativeTokenSourceAddress_, initialReserveImbalance_) + address, tx, contract, err := bind.DeployContract(auth, *parsed, common.FromHex(NativeTokenDestinationBin), backend, teleporterRegistryAddress, sourceBlockchainID_, nativeTokenSourceAddress_, initialReserveImbalance_) if err != nil { return common.Address{}, nil, nil, err } @@ -363,6 +363,37 @@ func (_NativeTokenDestination *NativeTokenDestinationCallerSession) CurrentReser return _NativeTokenDestination.Contract.CurrentReserveImbalance(&_NativeTokenDestination.CallOpts) } +// GetMinTeleporterVersion is a free data retrieval call binding the contract method 0xd2cc7a70. +// +// Solidity: function getMinTeleporterVersion() view returns(uint256) +func (_NativeTokenDestination *NativeTokenDestinationCaller) GetMinTeleporterVersion(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _NativeTokenDestination.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 (_NativeTokenDestination *NativeTokenDestinationSession) GetMinTeleporterVersion() (*big.Int, error) { + return _NativeTokenDestination.Contract.GetMinTeleporterVersion(&_NativeTokenDestination.CallOpts) +} + +// GetMinTeleporterVersion is a free data retrieval call binding the contract method 0xd2cc7a70. +// +// Solidity: function getMinTeleporterVersion() view returns(uint256) +func (_NativeTokenDestination *NativeTokenDestinationCallerSession) GetMinTeleporterVersion() (*big.Int, error) { + return _NativeTokenDestination.Contract.GetMinTeleporterVersion(&_NativeTokenDestination.CallOpts) +} + // InitialReserveImbalance is a free data retrieval call binding the contract method 0x8ac7dd20. // // Solidity: function initialReserveImbalance() view returns(uint256) @@ -456,6 +487,37 @@ func (_NativeTokenDestination *NativeTokenDestinationCallerSession) NativeTokenS return _NativeTokenDestination.Contract.NativeTokenSourceAddress(&_NativeTokenDestination.CallOpts) } +// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. +// +// Solidity: function owner() view returns(address) +func (_NativeTokenDestination *NativeTokenDestinationCaller) Owner(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _NativeTokenDestination.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 (_NativeTokenDestination *NativeTokenDestinationSession) Owner() (common.Address, error) { + return _NativeTokenDestination.Contract.Owner(&_NativeTokenDestination.CallOpts) +} + +// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. +// +// Solidity: function owner() view returns(address) +func (_NativeTokenDestination *NativeTokenDestinationCallerSession) Owner() (common.Address, error) { + return _NativeTokenDestination.Contract.Owner(&_NativeTokenDestination.CallOpts) +} + // SourceBlockchainID is a free data retrieval call binding the contract method 0x29b7b3fd. // // Solidity: function sourceBlockchainID() view returns(bytes32) @@ -487,12 +549,12 @@ func (_NativeTokenDestination *NativeTokenDestinationCallerSession) SourceBlockc return _NativeTokenDestination.Contract.SourceBlockchainID(&_NativeTokenDestination.CallOpts) } -// TeleporterMessenger is a free data retrieval call binding the contract method 0x9b3e5803. +// TeleporterRegistry is a free data retrieval call binding the contract method 0x1a7f5bec. // -// Solidity: function teleporterMessenger() view returns(address) -func (_NativeTokenDestination *NativeTokenDestinationCaller) TeleporterMessenger(opts *bind.CallOpts) (common.Address, error) { +// Solidity: function teleporterRegistry() view returns(address) +func (_NativeTokenDestination *NativeTokenDestinationCaller) TeleporterRegistry(opts *bind.CallOpts) (common.Address, error) { var out []interface{} - err := _NativeTokenDestination.contract.Call(opts, &out, "teleporterMessenger") + err := _NativeTokenDestination.contract.Call(opts, &out, "teleporterRegistry") if err != nil { return *new(common.Address), err @@ -504,18 +566,18 @@ func (_NativeTokenDestination *NativeTokenDestinationCaller) TeleporterMessenger } -// TeleporterMessenger is a free data retrieval call binding the contract method 0x9b3e5803. +// TeleporterRegistry is a free data retrieval call binding the contract method 0x1a7f5bec. // -// Solidity: function teleporterMessenger() view returns(address) -func (_NativeTokenDestination *NativeTokenDestinationSession) TeleporterMessenger() (common.Address, error) { - return _NativeTokenDestination.Contract.TeleporterMessenger(&_NativeTokenDestination.CallOpts) +// Solidity: function teleporterRegistry() view returns(address) +func (_NativeTokenDestination *NativeTokenDestinationSession) TeleporterRegistry() (common.Address, error) { + return _NativeTokenDestination.Contract.TeleporterRegistry(&_NativeTokenDestination.CallOpts) } -// TeleporterMessenger is a free data retrieval call binding the contract method 0x9b3e5803. +// TeleporterRegistry is a free data retrieval call binding the contract method 0x1a7f5bec. // -// Solidity: function teleporterMessenger() view returns(address) -func (_NativeTokenDestination *NativeTokenDestinationCallerSession) TeleporterMessenger() (common.Address, error) { - return _NativeTokenDestination.Contract.TeleporterMessenger(&_NativeTokenDestination.CallOpts) +// Solidity: function teleporterRegistry() view returns(address) +func (_NativeTokenDestination *NativeTokenDestinationCallerSession) TeleporterRegistry() (common.Address, error) { + return _NativeTokenDestination.Contract.TeleporterRegistry(&_NativeTokenDestination.CallOpts) } // TotalMinted is a free data retrieval call binding the contract method 0xa2309ff8. @@ -582,23 +644,44 @@ func (_NativeTokenDestination *NativeTokenDestinationCallerSession) TotalSupply( // ReceiveTeleporterMessage is a paid mutator transaction binding the contract method 0xc868efaa. // -// Solidity: function receiveTeleporterMessage(bytes32 senderBlockchainID, address senderAddress, bytes message) returns() -func (_NativeTokenDestination *NativeTokenDestinationTransactor) ReceiveTeleporterMessage(opts *bind.TransactOpts, senderBlockchainID [32]byte, senderAddress common.Address, message []byte) (*types.Transaction, error) { - return _NativeTokenDestination.contract.Transact(opts, "receiveTeleporterMessage", senderBlockchainID, senderAddress, message) +// Solidity: function receiveTeleporterMessage(bytes32 originBlockchainID, address originSenderAddress, bytes message) returns() +func (_NativeTokenDestination *NativeTokenDestinationTransactor) ReceiveTeleporterMessage(opts *bind.TransactOpts, originBlockchainID [32]byte, originSenderAddress common.Address, message []byte) (*types.Transaction, error) { + return _NativeTokenDestination.contract.Transact(opts, "receiveTeleporterMessage", originBlockchainID, originSenderAddress, message) } // ReceiveTeleporterMessage is a paid mutator transaction binding the contract method 0xc868efaa. // -// Solidity: function receiveTeleporterMessage(bytes32 senderBlockchainID, address senderAddress, bytes message) returns() -func (_NativeTokenDestination *NativeTokenDestinationSession) ReceiveTeleporterMessage(senderBlockchainID [32]byte, senderAddress common.Address, message []byte) (*types.Transaction, error) { - return _NativeTokenDestination.Contract.ReceiveTeleporterMessage(&_NativeTokenDestination.TransactOpts, senderBlockchainID, senderAddress, message) +// Solidity: function receiveTeleporterMessage(bytes32 originBlockchainID, address originSenderAddress, bytes message) returns() +func (_NativeTokenDestination *NativeTokenDestinationSession) ReceiveTeleporterMessage(originBlockchainID [32]byte, originSenderAddress common.Address, message []byte) (*types.Transaction, error) { + return _NativeTokenDestination.Contract.ReceiveTeleporterMessage(&_NativeTokenDestination.TransactOpts, originBlockchainID, originSenderAddress, message) } // ReceiveTeleporterMessage is a paid mutator transaction binding the contract method 0xc868efaa. // -// Solidity: function receiveTeleporterMessage(bytes32 senderBlockchainID, address senderAddress, bytes message) returns() -func (_NativeTokenDestination *NativeTokenDestinationTransactorSession) ReceiveTeleporterMessage(senderBlockchainID [32]byte, senderAddress common.Address, message []byte) (*types.Transaction, error) { - return _NativeTokenDestination.Contract.ReceiveTeleporterMessage(&_NativeTokenDestination.TransactOpts, senderBlockchainID, senderAddress, message) +// Solidity: function receiveTeleporterMessage(bytes32 originBlockchainID, address originSenderAddress, bytes message) returns() +func (_NativeTokenDestination *NativeTokenDestinationTransactorSession) ReceiveTeleporterMessage(originBlockchainID [32]byte, originSenderAddress common.Address, message []byte) (*types.Transaction, error) { + return _NativeTokenDestination.Contract.ReceiveTeleporterMessage(&_NativeTokenDestination.TransactOpts, originBlockchainID, originSenderAddress, message) +} + +// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. +// +// Solidity: function renounceOwnership() returns() +func (_NativeTokenDestination *NativeTokenDestinationTransactor) RenounceOwnership(opts *bind.TransactOpts) (*types.Transaction, error) { + return _NativeTokenDestination.contract.Transact(opts, "renounceOwnership") +} + +// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. +// +// Solidity: function renounceOwnership() returns() +func (_NativeTokenDestination *NativeTokenDestinationSession) RenounceOwnership() (*types.Transaction, error) { + return _NativeTokenDestination.Contract.RenounceOwnership(&_NativeTokenDestination.TransactOpts) +} + +// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. +// +// Solidity: function renounceOwnership() returns() +func (_NativeTokenDestination *NativeTokenDestinationTransactorSession) RenounceOwnership() (*types.Transaction, error) { + return _NativeTokenDestination.Contract.RenounceOwnership(&_NativeTokenDestination.TransactOpts) } // ReportTotalBurnedTxFees is a paid mutator transaction binding the contract method 0x3a94fe51. @@ -622,6 +705,27 @@ func (_NativeTokenDestination *NativeTokenDestinationTransactorSession) ReportTo return _NativeTokenDestination.Contract.ReportTotalBurnedTxFees(&_NativeTokenDestination.TransactOpts, feeInfo, allowedRelayerAddresses) } +// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// +// Solidity: function transferOwnership(address newOwner) returns() +func (_NativeTokenDestination *NativeTokenDestinationTransactor) TransferOwnership(opts *bind.TransactOpts, newOwner common.Address) (*types.Transaction, error) { + return _NativeTokenDestination.contract.Transact(opts, "transferOwnership", newOwner) +} + +// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// +// Solidity: function transferOwnership(address newOwner) returns() +func (_NativeTokenDestination *NativeTokenDestinationSession) TransferOwnership(newOwner common.Address) (*types.Transaction, error) { + return _NativeTokenDestination.Contract.TransferOwnership(&_NativeTokenDestination.TransactOpts, newOwner) +} + +// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// +// Solidity: function transferOwnership(address newOwner) returns() +func (_NativeTokenDestination *NativeTokenDestinationTransactorSession) TransferOwnership(newOwner common.Address) (*types.Transaction, error) { + return _NativeTokenDestination.Contract.TransferOwnership(&_NativeTokenDestination.TransactOpts, newOwner) +} + // TransferToSource is a paid mutator transaction binding the contract method 0x75846562. // // Solidity: function transferToSource(address recipient, (address,uint256) feeInfo, address[] allowedRelayerAddresses) payable returns() @@ -643,6 +747,27 @@ func (_NativeTokenDestination *NativeTokenDestinationTransactorSession) Transfer return _NativeTokenDestination.Contract.TransferToSource(&_NativeTokenDestination.TransactOpts, recipient, feeInfo, allowedRelayerAddresses) } +// UpdateMinTeleporterVersion is a paid mutator transaction binding the contract method 0x5eb99514. +// +// Solidity: function updateMinTeleporterVersion(uint256 version) returns() +func (_NativeTokenDestination *NativeTokenDestinationTransactor) UpdateMinTeleporterVersion(opts *bind.TransactOpts, version *big.Int) (*types.Transaction, error) { + return _NativeTokenDestination.contract.Transact(opts, "updateMinTeleporterVersion", version) +} + +// UpdateMinTeleporterVersion is a paid mutator transaction binding the contract method 0x5eb99514. +// +// Solidity: function updateMinTeleporterVersion(uint256 version) returns() +func (_NativeTokenDestination *NativeTokenDestinationSession) UpdateMinTeleporterVersion(version *big.Int) (*types.Transaction, error) { + return _NativeTokenDestination.Contract.UpdateMinTeleporterVersion(&_NativeTokenDestination.TransactOpts, version) +} + +// UpdateMinTeleporterVersion is a paid mutator transaction binding the contract method 0x5eb99514. +// +// Solidity: function updateMinTeleporterVersion(uint256 version) returns() +func (_NativeTokenDestination *NativeTokenDestinationTransactorSession) UpdateMinTeleporterVersion(version *big.Int) (*types.Transaction, error) { + return _NativeTokenDestination.Contract.UpdateMinTeleporterVersion(&_NativeTokenDestination.TransactOpts, version) +} + // NativeTokenDestinationCollateralAddedIterator is returned from FilterCollateralAdded and is used to iterate over the raw logs and unpacked data for CollateralAdded events raised by the NativeTokenDestination contract. type NativeTokenDestinationCollateralAddedIterator struct { Event *NativeTokenDestinationCollateralAdded // Event containing the contract specifics and raw log @@ -778,6 +903,159 @@ func (_NativeTokenDestination *NativeTokenDestinationFilterer) ParseCollateralAd return event, nil } +// NativeTokenDestinationMinTeleporterVersionUpdatedIterator is returned from FilterMinTeleporterVersionUpdated and is used to iterate over the raw logs and unpacked data for MinTeleporterVersionUpdated events raised by the NativeTokenDestination contract. +type NativeTokenDestinationMinTeleporterVersionUpdatedIterator struct { + Event *NativeTokenDestinationMinTeleporterVersionUpdated // 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 *NativeTokenDestinationMinTeleporterVersionUpdatedIterator) 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(NativeTokenDestinationMinTeleporterVersionUpdated) + 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(NativeTokenDestinationMinTeleporterVersionUpdated) + 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 *NativeTokenDestinationMinTeleporterVersionUpdatedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *NativeTokenDestinationMinTeleporterVersionUpdatedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// NativeTokenDestinationMinTeleporterVersionUpdated represents a MinTeleporterVersionUpdated event raised by the NativeTokenDestination contract. +type NativeTokenDestinationMinTeleporterVersionUpdated 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 (_NativeTokenDestination *NativeTokenDestinationFilterer) FilterMinTeleporterVersionUpdated(opts *bind.FilterOpts, oldMinTeleporterVersion []*big.Int, newMinTeleporterVersion []*big.Int) (*NativeTokenDestinationMinTeleporterVersionUpdatedIterator, 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 := _NativeTokenDestination.contract.FilterLogs(opts, "MinTeleporterVersionUpdated", oldMinTeleporterVersionRule, newMinTeleporterVersionRule) + if err != nil { + return nil, err + } + return &NativeTokenDestinationMinTeleporterVersionUpdatedIterator{contract: _NativeTokenDestination.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 (_NativeTokenDestination *NativeTokenDestinationFilterer) WatchMinTeleporterVersionUpdated(opts *bind.WatchOpts, sink chan<- *NativeTokenDestinationMinTeleporterVersionUpdated, 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 := _NativeTokenDestination.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(NativeTokenDestinationMinTeleporterVersionUpdated) + if err := _NativeTokenDestination.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 (_NativeTokenDestination *NativeTokenDestinationFilterer) ParseMinTeleporterVersionUpdated(log types.Log) (*NativeTokenDestinationMinTeleporterVersionUpdated, error) { + event := new(NativeTokenDestinationMinTeleporterVersionUpdated) + if err := _NativeTokenDestination.contract.UnpackLog(event, "MinTeleporterVersionUpdated", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + // NativeTokenDestinationNativeTokensMintedIterator is returned from FilterNativeTokensMinted and is used to iterate over the raw logs and unpacked data for NativeTokensMinted events raised by the NativeTokenDestination contract. type NativeTokenDestinationNativeTokensMintedIterator struct { Event *NativeTokenDestinationNativeTokensMinted // Event containing the contract specifics and raw log @@ -923,6 +1201,159 @@ func (_NativeTokenDestination *NativeTokenDestinationFilterer) ParseNativeTokens return event, nil } +// NativeTokenDestinationOwnershipTransferredIterator is returned from FilterOwnershipTransferred and is used to iterate over the raw logs and unpacked data for OwnershipTransferred events raised by the NativeTokenDestination contract. +type NativeTokenDestinationOwnershipTransferredIterator struct { + Event *NativeTokenDestinationOwnershipTransferred // 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 *NativeTokenDestinationOwnershipTransferredIterator) 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(NativeTokenDestinationOwnershipTransferred) + 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(NativeTokenDestinationOwnershipTransferred) + 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 *NativeTokenDestinationOwnershipTransferredIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *NativeTokenDestinationOwnershipTransferredIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// NativeTokenDestinationOwnershipTransferred represents a OwnershipTransferred event raised by the NativeTokenDestination contract. +type NativeTokenDestinationOwnershipTransferred 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 (_NativeTokenDestination *NativeTokenDestinationFilterer) FilterOwnershipTransferred(opts *bind.FilterOpts, previousOwner []common.Address, newOwner []common.Address) (*NativeTokenDestinationOwnershipTransferredIterator, 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 := _NativeTokenDestination.contract.FilterLogs(opts, "OwnershipTransferred", previousOwnerRule, newOwnerRule) + if err != nil { + return nil, err + } + return &NativeTokenDestinationOwnershipTransferredIterator{contract: _NativeTokenDestination.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 (_NativeTokenDestination *NativeTokenDestinationFilterer) WatchOwnershipTransferred(opts *bind.WatchOpts, sink chan<- *NativeTokenDestinationOwnershipTransferred, 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 := _NativeTokenDestination.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(NativeTokenDestinationOwnershipTransferred) + if err := _NativeTokenDestination.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 (_NativeTokenDestination *NativeTokenDestinationFilterer) ParseOwnershipTransferred(log types.Log) (*NativeTokenDestinationOwnershipTransferred, error) { + event := new(NativeTokenDestinationOwnershipTransferred) + if err := _NativeTokenDestination.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + // NativeTokenDestinationReportTotalBurnedTxFeesIterator is returned from FilterReportTotalBurnedTxFees and is used to iterate over the raw logs and unpacked data for ReportTotalBurnedTxFees events raised by the NativeTokenDestination contract. type NativeTokenDestinationReportTotalBurnedTxFeesIterator struct { Event *NativeTokenDestinationReportTotalBurnedTxFees // Event containing the contract specifics and raw log diff --git a/abi-bindings/go/CrossChainApplications/NativeTokenBridge/NativeTokenSource/NativeTokenSource.go b/abi-bindings/go/CrossChainApplications/NativeTokenBridge/NativeTokenSource/NativeTokenSource.go index 6a481c666..f708f86d7 100644 --- a/abi-bindings/go/CrossChainApplications/NativeTokenBridge/NativeTokenSource/NativeTokenSource.go +++ b/abi-bindings/go/CrossChainApplications/NativeTokenBridge/NativeTokenSource/NativeTokenSource.go @@ -37,8 +37,8 @@ type TeleporterFeeInfo struct { // NativeTokenSourceMetaData contains all meta data concerning the NativeTokenSource contract. var NativeTokenSourceMetaData = &bind.MetaData{ - ABI: "[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"teleporterMessengerAddress\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"destinationBlockchainID_\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"nativeTokenDestinationAddress_\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"BurnTokens\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"teleporterMessageID\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"TransferToDestination\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"UnlockTokens\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"BURNED_TX_FEES_ADDRESS\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"MINT_NATIVE_TOKENS_REQUIRED_GAS\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"destinationBlockchainID\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"destinationBurnedTotal\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"nativeTokenDestinationAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"senderBlockchainID\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"senderAddress\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"message\",\"type\":\"bytes\"}],\"name\":\"receiveTeleporterMessage\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"teleporterMessenger\",\"outputs\":[{\"internalType\":\"contractITeleporterMessenger\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"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\":\"transferToDestination\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"}]", - Bin: "0x60e06040523480156200001157600080fd5b506040516200173a3803806200173a8339810160408190526200003491620002b3565b60016000556001600160a01b038316620000bb5760405162461bcd60e51b815260206004820152603360248201527f4e6174697665546f6b656e536f757263653a207a65726f2054656c65706f727460448201527f65724d657373656e67657220616464726573730000000000000000000000000060648201526084015b60405180910390fd5b6001600160a01b03831660c05281620001205760405162461bcd60e51b815260206004820152603160248201526000805160206200171a8339815191526044820152701a5bdb88189b1bd8dad8da185a5b881251607a1b6064820152608401620000b2565b7302000000000000000000000000000000000000056001600160a01b0316634213cf786040518163ffffffff1660e01b8152600401602060405180830381865afa15801562000173573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620001999190620002f4565b82036200020f5760405162461bcd60e51b815260206004820152603560248201527f4e6174697665546f6b656e536f757263653a2063616e6e6f742062726964676560448201527f20776974682073616d6520626c6f636b636861696e00000000000000000000006064820152608401620000b2565b60808290526001600160a01b038116620002815760405162461bcd60e51b815260206004820152603460248201526000805160206200171a83398151915260448201527f696f6e20636f6e747261637420616464726573730000000000000000000000006064820152608401620000b2565b6001600160a01b031660a052506200030e9050565b80516001600160a01b0381168114620002ae57600080fd5b919050565b600080600060608486031215620002c957600080fd5b620002d48462000296565b925060208401519150620002eb6040850162000296565b90509250925092565b6000602082840312156200030757600080fd5b5051919050565b60805160a05160c0516113ad6200036d6000396000818160ef015281816102320152818161025b015261044e015260008181610167015281816102bb015261056701526000818160920152818161029501526104e301526113ad6000f3fe60806040526004361061007b5760003560e01c8063b6171f731161004e578063b6171f731461013e578063b8c9091a14610155578063c452165e14610189578063c868efaa146101a157600080fd5b806341d3014d1461008057806355db3e9e146100c75780639b3e5803146100dd578063ad0aee2514610129575b600080fd5b34801561008c57600080fd5b506100b47f000000000000000000000000000000000000000000000000000000000000000081565b6040519081526020015b60405180910390f35b3480156100d357600080fd5b506100b460015481565b3480156100e957600080fd5b506101117f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020016100be565b61013c610137366004610eaa565b6101c1565b005b34801561014a57600080fd5b506100b4620186a081565b34801561016157600080fd5b506101117f000000000000000000000000000000000000000000000000000000000000000081565b34801561019557600080fd5b50610111600160981b81565b3480156101ad57600080fd5b5061013c6101bc366004610f49565b61043b565b6101c96106ec565b6001600160a01b0384166101f85760405162461bcd60e51b81526004016101ef90610fc3565b60405180910390fd5b60006020840135156102575761021e610214602086018661100c565b8560200135610745565b9050610257610230602086018661100c565b7f0000000000000000000000000000000000000000000000000000000000000000836108af565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663624488506040518060c001604052807f000000000000000000000000000000000000000000000000000000000000000081526020017f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03168152602001888036038101906102f99190611077565b8152602001620186a08152602001878780806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250505090825250604051602091820191610368918c913491016001600160a01b03929092168252602082015260400190565b6040516020818303038152906040528152506040518263ffffffff1660e01b81526004016103969190611163565b6020604051808303816000875af11580156103b5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103d991906111e1565b905080866001600160a01b0316336001600160a01b03167f2b4e8f08417773e367064a6aea9ca2df303a60876676f70b6c3c5e66b314ca5a3460405161042191815260200190565b60405180910390a450506104356001600055565b50505050565b6104436106ec565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146104e15760405162461bcd60e51b815260206004820152603c60248201527f4e6174697665546f6b656e536f757263653a20756e617574686f72697a65642060448201527f54656c65706f727465724d657373656e67657220636f6e74726163740000000060648201526084016101ef565b7f000000000000000000000000000000000000000000000000000000000000000084146105655760405162461bcd60e51b815260206004820152602c60248201527f4e6174697665546f6b656e536f757263653a20696e76616c696420646573746960448201526b3730ba34b7b71031b430b4b760a11b60648201526084016101ef565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316836001600160a01b0316146105f55760405162461bcd60e51b815260206004820152602660248201527f4e6174697665546f6b656e536f757263653a20756e617574686f72697a65642060448201526539b2b73232b960d11b60648201526084016101ef565b600080610604838501856111fa565b9092509050600082600181111561061d5761061d6112a6565b0361064e576000808280602001905181019061063991906112bc565b915091506106478282610994565b50506106e0565b6001826001811115610662576106626112a6565b0361068e5760008180602001905181019061067d91906111e1565b905061068881610a6d565b506106e0565b60405162461bcd60e51b815260206004820152602160248201527f4e6174697665546f6b656e536f757263653a20696e76616c696420616374696f6044820152603760f91b60648201526084016101ef565b50506104356001600055565b60026000540361073e5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016101ef565b6002600055565b6040516370a0823160e01b815230600482015260009081906001600160a01b038516906370a0823190602401602060405180830381865afa15801561078e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107b291906111e1565b90506107c96001600160a01b038516333086610a9c565b6040516370a0823160e01b81523060048201526000906001600160a01b038616906370a0823190602401602060405180830381865afa158015610810573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061083491906111e1565b905081811161089a5760405162461bcd60e51b815260206004820152602c60248201527f5361666545524332305472616e7366657246726f6d3a2062616c616e6365206e60448201526b1bdd081a5b98dc99585cd95960a21b60648201526084016101ef565b6108a48282611300565b925050505b92915050565b604051636eb1769f60e11b81523060048201526001600160a01b038381166024830152600091839186169063dd62ed3e90604401602060405180830381865afa158015610900573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061092491906111e1565b61092e9190611313565b6040516001600160a01b03851660248201526044810182905290915061043590859063095ea7b360e01b906064015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152610ad4565b6001600160a01b0382166109ba5760405162461bcd60e51b81526004016101ef90610fc3565b80471015610a1d5760405162461bcd60e51b815260206004820152602a60248201527f4e6174697665546f6b656e536f757263653a20696e73756666696369656e742060448201526918dbdb1b185d195c985b60b21b60648201526084016101ef565b604080516001600160a01b0384168152602081018390527f55aaef8fd8c07238c3618a93c8a1627194187d3b0952908e58f2ab0f944fb407910160405180910390a1610a698282610bab565b5050565b600154811115610a9957600060015482610a879190611300565b9050610a9281610cc4565b5060018190555b50565b6040516001600160a01b03808516602483015283166044820152606481018290526104359085906323b872dd60e01b9060840161095d565b6000610b29826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316610d059092919063ffffffff16565b805190915015610ba65780806020019051810190610b479190611326565b610ba65760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b60648201526084016101ef565b505050565b80471015610bfb5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e636500000060448201526064016101ef565b6000826001600160a01b03168260405160006040518083038185875af1925050503d8060008114610c48576040519150601f19603f3d011682016040523d82523d6000602084013e610c4d565b606091505b5050905080610ba65760405162461bcd60e51b815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d6179206861766520726576657274656400000000000060648201526084016101ef565b6040518181527f2cd3fd70cd5a5d6d805e90d22741aa1a84590ace7cf01b244719558d266143829060200160405180910390a1610a99600160981b82610bab565b6060610d148484600085610d1c565b949350505050565b606082471015610d7d5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b60648201526084016101ef565b600080866001600160a01b03168587604051610d999190611348565b60006040518083038185875af1925050503d8060008114610dd6576040519150601f19603f3d011682016040523d82523d6000602084013e610ddb565b606091505b5091509150610dec87838387610df7565b979650505050505050565b60608315610e66578251600003610e5f576001600160a01b0385163b610e5f5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016101ef565b5081610d14565b610d148383815115610e7b5781518083602001fd5b8060405162461bcd60e51b81526004016101ef9190611364565b6001600160a01b0381168114610a9957600080fd5b6000806000808486036080811215610ec157600080fd5b8535610ecc81610e95565b94506040601f1982011215610ee057600080fd5b50602085019250606085013567ffffffffffffffff80821115610f0257600080fd5b818701915087601f830112610f1657600080fd5b813581811115610f2557600080fd5b8860208260051b8501011115610f3a57600080fd5b95989497505060200194505050565b60008060008060608587031215610f5f57600080fd5b843593506020850135610f7181610e95565b9250604085013567ffffffffffffffff80821115610f8e57600080fd5b818701915087601f830112610fa257600080fd5b813581811115610fb157600080fd5b886020828501011115610f3a57600080fd5b60208082526029908201527f4e6174697665546f6b656e536f757263653a207a65726f20726563697069656e60408201526874206164647265737360b81b606082015260800190565b60006020828403121561101e57600080fd5b813561102981610e95565b9392505050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff8111828210171561106f5761106f611030565b604052919050565b60006040828403121561108957600080fd5b6040516040810181811067ffffffffffffffff821117156110ac576110ac611030565b60405282356110ba81610e95565b81526020928301359281019290925250919050565b600081518084526020808501945080840160005b838110156111085781516001600160a01b0316875295820195908201906001016110e3565b509495945050505050565b60005b8381101561112e578181015183820152602001611116565b50506000910152565b6000815180845261114f816020860160208601611113565b601f01601f19169290920160200192915050565b60208152815160208201526000602083015160018060a01b03808216604085015260408501519150808251166060850152506020810151608084015250606083015160a0830152608083015160e060c08401526111c46101008401826110cf565b905060a0840151601f198483030160e08501526108a48282611137565b6000602082840312156111f357600080fd5b5051919050565b6000806040838503121561120d57600080fd5b82356002811061121c57600080fd5b915060208381013567ffffffffffffffff8082111561123a57600080fd5b818601915086601f83011261124e57600080fd5b81358181111561126057611260611030565b611272601f8201601f19168501611046565b9150808252878482850101111561128857600080fd5b80848401858401376000848284010152508093505050509250929050565b634e487b7160e01b600052602160045260246000fd5b600080604083850312156112cf57600080fd5b82516112da81610e95565b6020939093015192949293505050565b634e487b7160e01b600052601160045260246000fd5b818103818111156108a9576108a96112ea565b808201808211156108a9576108a96112ea565b60006020828403121561133857600080fd5b8151801515811461102957600080fd5b6000825161135a818460208701611113565b9190910192915050565b602081526000611029602083018461113756fea2646970667358221220f70e4662c2679fb4a73f670c09d6430821f46cf73e7d1213af9e4e3ec525091f64736f6c634300081200334e6174697665546f6b656e536f757263653a207a65726f2064657374696e6174", + ABI: "[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"teleporterRegistryAddress\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"destinationBlockchainID_\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"nativeTokenDestinationAddress_\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"BurnTokens\",\"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\":\"sender\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"teleporterMessageID\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"TransferToDestination\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"UnlockTokens\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"BURNED_TX_FEES_ADDRESS\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"MINT_NATIVE_TOKENS_REQUIRED_GAS\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"destinationBlockchainID\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"destinationBurnedTotal\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getMinTeleporterVersion\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"nativeTokenDestinationAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"originBlockchainID\",\"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\":[],\"name\":\"teleporterRegistry\",\"outputs\":[{\"internalType\":\"contractTeleporterRegistry\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"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\":\"transferToDestination\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"version\",\"type\":\"uint256\"}],\"name\":\"updateMinTeleporterVersion\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", + Bin: "0x60e06040523480156200001157600080fd5b5060405162001ccb38038062001ccb83398101604081905262000034916200037b565b82806001600160a01b038116620000b85760405162461bcd60e51b815260206004820152603760248201527f54656c65706f727465725570677261646561626c653a207a65726f2074656c6560448201527f706f72746572207265676973747279206164647265737300000000000000000060648201526084015b60405180910390fd5b6001600160a01b03811660808190526040805163301fd1f560e21b8152905163c07f47d4916004808201926020929091908290030181865afa15801562000103573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620001299190620003bc565b6000555062000138336200030c565b50600160025581620001965760405162461bcd60e51b8152602060048201526031602482015260008051602062001cab8339815191526044820152701a5bdb88189b1bd8dad8da185a5b881251607a1b6064820152608401620000af565b7302000000000000000000000000000000000000056001600160a01b0316634213cf786040518163ffffffff1660e01b8152600401602060405180830381865afa158015620001e9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200020f9190620003bc565b8203620002855760405162461bcd60e51b815260206004820152603560248201527f4e6174697665546f6b656e536f757263653a2063616e6e6f742062726964676560448201527f20776974682073616d6520626c6f636b636861696e00000000000000000000006064820152608401620000af565b60a08290526001600160a01b038116620002f75760405162461bcd60e51b8152602060048201526034602482015260008051602062001cab83398151915260448201527f696f6e20636f6e747261637420616464726573730000000000000000000000006064820152608401620000af565b6001600160a01b031660c05250620003d69050565b600180546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b80516001600160a01b03811681146200037657600080fd5b919050565b6000806000606084860312156200039157600080fd5b6200039c846200035e565b925060208401519150620003b3604085016200035e565b90509250925092565b600060208284031215620003cf57600080fd5b5051919050565b60805160a05160c0516118756200043660003960008181610201015281816103f80152610ca001526000818161012a015281816103d20152610c1c01526000818160d9015281816102c401528181610591015261072e01526118756000f3fe6080604052600436106100c25760003560e01c8063ad0aee251161007f578063c452165e11610059578063c452165e14610223578063c868efaa1461023b578063d2cc7a701461025b578063f2fde38b1461027057600080fd5b8063ad0aee25146101c5578063b6171f73146101d8578063b8c9091a146101ef57600080fd5b80631a7f5bec146100c757806341d3014d1461011857806355db3e9e1461015a5780635eb9951414610170578063715018a6146101925780638da5cb5b146101a7575b600080fd5b3480156100d357600080fd5b506100fb7f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020015b60405180910390f35b34801561012457600080fd5b5061014c7f000000000000000000000000000000000000000000000000000000000000000081565b60405190815260200161010f565b34801561016657600080fd5b5061014c60035481565b34801561017c57600080fd5b5061019061018b366004611325565b610290565b005b34801561019e57600080fd5b506101906102a4565b3480156101b357600080fd5b506001546001600160a01b03166100fb565b6101906101d3366004611353565b6102b8565b3480156101e457600080fd5b5061014c620186a081565b3480156101fb57600080fd5b506100fb7f000000000000000000000000000000000000000000000000000000000000000081565b34801561022f57600080fd5b506100fb600160981b81565b34801561024757600080fd5b506101906102563660046113f2565b610579565b34801561026757600080fd5b5060005461014c565b34801561027c57600080fd5b5061019061028b36600461146c565b6106ac565b610298610722565b6102a18161072a565b50565b6102ac6108c8565b6102b66000610922565b565b6102c0610974565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d820e64f6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610320573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103449190611490565b90506001600160a01b0385166103755760405162461bcd60e51b815260040161036c906114ad565b60405180910390fd5b60006020850135156103b45761039b610391602087018761146c565b86602001356109cb565b90506103b46103ad602087018761146c565b8383610b35565b6000826001600160a01b031663624488506040518060c001604052807f000000000000000000000000000000000000000000000000000000000000000081526020017f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316815260200189803603810190610436919061153d565b8152602001620186a081526020018888808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152505050908252506040516020918201916104a5918d913491016001600160a01b03929092168252602082015260400190565b6040516020818303038152906040528152506040518263ffffffff1660e01b81526004016104d39190611629565b6020604051808303816000875af11580156104f2573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061051691906116a7565b905080876001600160a01b0316336001600160a01b03167f2b4e8f08417773e367064a6aea9ca2df303a60876676f70b6c3c5e66b314ca5a3460405161055e91815260200190565b60405180910390a45050506105736001600255565b50505050565b60005460405163260f846760e11b81523360048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690634c1f08ce90602401602060405180830381865afa1580156105e0573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061060491906116a7565b101561066b5760405162461bcd60e51b815260206004820152603060248201527f54656c65706f727465725570677261646561626c653a20696e76616c6964205460448201526f32b632b837b93a32b91039b2b73232b960811b606482015260840161036c565b610573848484848080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250610c1a92505050565b6106b46108c8565b6001600160a01b0381166107195760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161036c565b6102a181610922565b6102b66108c8565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663c07f47d46040518163ffffffff1660e01b8152600401602060405180830381865afa15801561078a573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107ae91906116a7565b6000549091508183111561081e5760405162461bcd60e51b815260206004820152603160248201527f54656c65706f727465725570677261646561626c653a20696e76616c6964205460448201527032b632b837b93a32b9103b32b939b4b7b760791b606482015260840161036c565b8083116108935760405162461bcd60e51b815260206004820152603f60248201527f54656c65706f727465725570677261646561626c653a206e6f7420677265617460448201527f6572207468616e2063757272656e74206d696e696d756d2076657273696f6e00606482015260840161036c565b6000838155604051849183917fa9a7ef57e41f05b4c15480842f5f0c27edfcbb553fed281f7c4068452cc1c02d9190a3505050565b6001546001600160a01b031633146102b65760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161036c565b600180546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b60028054036109c55760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015260640161036c565b60028055565b6040516370a0823160e01b815230600482015260009081906001600160a01b038516906370a0823190602401602060405180830381865afa158015610a14573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a3891906116a7565b9050610a4f6001600160a01b038516333086610e28565b6040516370a0823160e01b81523060048201526000906001600160a01b038616906370a0823190602401602060405180830381865afa158015610a96573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610aba91906116a7565b9050818111610b205760405162461bcd60e51b815260206004820152602c60248201527f5361666545524332305472616e7366657246726f6d3a2062616c616e6365206e60448201526b1bdd081a5b98dc99585cd95960a21b606482015260840161036c565b610b2a82826116d6565b925050505b92915050565b604051636eb1769f60e11b81523060048201526001600160a01b038381166024830152600091839186169063dd62ed3e90604401602060405180830381865afa158015610b86573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610baa91906116a7565b610bb491906116e9565b6040516001600160a01b03851660248201526044810182905290915061057390859063095ea7b360e01b906064015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152610e60565b7f00000000000000000000000000000000000000000000000000000000000000008314610c9e5760405162461bcd60e51b815260206004820152602c60248201527f4e6174697665546f6b656e536f757263653a20696e76616c696420646573746960448201526b3730ba34b7b71031b430b4b760a11b606482015260840161036c565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316826001600160a01b031614610d2e5760405162461bcd60e51b815260206004820152602660248201527f4e6174697665546f6b656e536f757263653a20756e617574686f72697a65642060448201526539b2b73232b960d11b606482015260840161036c565b60008082806020019051810190610d4591906116fc565b90925090506000826001811115610d5e57610d5e6117aa565b03610d8f5760008082806020019051810190610d7a91906117c0565b91509150610d888282610f37565b5050610e21565b6001826001811115610da357610da36117aa565b03610dcf57600081806020019051810190610dbe91906116a7565b9050610dc981611010565b50610e21565b60405162461bcd60e51b815260206004820152602160248201527f4e6174697665546f6b656e536f757263653a20696e76616c696420616374696f6044820152603760f91b606482015260840161036c565b5050505050565b6040516001600160a01b03808516602483015283166044820152606481018290526105739085906323b872dd60e01b90608401610be3565b6000610eb5826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b031661103b9092919063ffffffff16565b805190915015610f325780806020019051810190610ed391906117ee565b610f325760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b606482015260840161036c565b505050565b6001600160a01b038216610f5d5760405162461bcd60e51b815260040161036c906114ad565b80471015610fc05760405162461bcd60e51b815260206004820152602a60248201527f4e6174697665546f6b656e536f757263653a20696e73756666696369656e742060448201526918dbdb1b185d195c985b60b21b606482015260840161036c565b604080516001600160a01b0384168152602081018390527f55aaef8fd8c07238c3618a93c8a1627194187d3b0952908e58f2ab0f944fb407910160405180910390a161100c8282611052565b5050565b6003548111156102a15760006003548261102a91906116d6565b90506110358161116b565b50600355565b606061104a84846000856111ac565b949350505050565b804710156110a25760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e6365000000604482015260640161036c565b6000826001600160a01b03168260405160006040518083038185875af1925050503d80600081146110ef576040519150601f19603f3d011682016040523d82523d6000602084013e6110f4565b606091505b5050905080610f325760405162461bcd60e51b815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d61792068617665207265766572746564000000000000606482015260840161036c565b6040518181527f2cd3fd70cd5a5d6d805e90d22741aa1a84590ace7cf01b244719558d266143829060200160405180910390a16102a1600160981b82611052565b60608247101561120d5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b606482015260840161036c565b600080866001600160a01b031685876040516112299190611810565b60006040518083038185875af1925050503d8060008114611266576040519150601f19603f3d011682016040523d82523d6000602084013e61126b565b606091505b509150915061127c87838387611287565b979650505050505050565b606083156112f65782516000036112ef576001600160a01b0385163b6112ef5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015260640161036c565b508161104a565b61104a838381511561130b5781518083602001fd5b8060405162461bcd60e51b815260040161036c919061182c565b60006020828403121561133757600080fd5b5035919050565b6001600160a01b03811681146102a157600080fd5b600080600080848603608081121561136a57600080fd5b85356113758161133e565b94506040601f198201121561138957600080fd5b50602085019250606085013567ffffffffffffffff808211156113ab57600080fd5b818701915087601f8301126113bf57600080fd5b8135818111156113ce57600080fd5b8860208260051b85010111156113e357600080fd5b95989497505060200194505050565b6000806000806060858703121561140857600080fd5b84359350602085013561141a8161133e565b9250604085013567ffffffffffffffff8082111561143757600080fd5b818701915087601f83011261144b57600080fd5b81358181111561145a57600080fd5b8860208285010111156113e357600080fd5b60006020828403121561147e57600080fd5b81356114898161133e565b9392505050565b6000602082840312156114a257600080fd5b81516114898161133e565b60208082526029908201527f4e6174697665546f6b656e536f757263653a207a65726f20726563697069656e60408201526874206164647265737360b81b606082015260800190565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff81118282101715611535576115356114f6565b604052919050565b60006040828403121561154f57600080fd5b6040516040810181811067ffffffffffffffff82111715611572576115726114f6565b60405282356115808161133e565b81526020928301359281019290925250919050565b600081518084526020808501945080840160005b838110156115ce5781516001600160a01b0316875295820195908201906001016115a9565b509495945050505050565b60005b838110156115f45781810151838201526020016115dc565b50506000910152565b600081518084526116158160208601602086016115d9565b601f01601f19169290920160200192915050565b60208152815160208201526000602083015160018060a01b03808216604085015260408501519150808251166060850152506020810151608084015250606083015160a0830152608083015160e060c084015261168a610100840182611595565b905060a0840151601f198483030160e0850152610b2a82826115fd565b6000602082840312156116b957600080fd5b5051919050565b634e487b7160e01b600052601160045260246000fd5b81810381811115610b2f57610b2f6116c0565b80820180821115610b2f57610b2f6116c0565b6000806040838503121561170f57600080fd5b82516002811061171e57600080fd5b602084015190925067ffffffffffffffff8082111561173c57600080fd5b818501915085601f83011261175057600080fd5b815181811115611762576117626114f6565b611775601f8201601f191660200161150c565b915080825286602082850101111561178c57600080fd5b61179d8160208401602086016115d9565b5080925050509250929050565b634e487b7160e01b600052602160045260246000fd5b600080604083850312156117d357600080fd5b82516117de8161133e565b6020939093015192949293505050565b60006020828403121561180057600080fd5b8151801515811461148957600080fd5b600082516118228184602087016115d9565b9190910192915050565b60208152600061148960208301846115fd56fea264697066735822122029f7f3d5049f3bafb473ef105dca8fb8afca06fda0ebad3a35e0210ae0a8336264736f6c634300081200334e6174697665546f6b656e536f757263653a207a65726f2064657374696e6174", } // NativeTokenSourceABI is the input ABI used to generate the binding from. @@ -50,7 +50,7 @@ var NativeTokenSourceABI = NativeTokenSourceMetaData.ABI var NativeTokenSourceBin = NativeTokenSourceMetaData.Bin // DeployNativeTokenSource deploys a new Ethereum contract, binding an instance of NativeTokenSource to it. -func DeployNativeTokenSource(auth *bind.TransactOpts, backend bind.ContractBackend, teleporterMessengerAddress common.Address, destinationBlockchainID_ [32]byte, nativeTokenDestinationAddress_ common.Address) (common.Address, *types.Transaction, *NativeTokenSource, error) { +func DeployNativeTokenSource(auth *bind.TransactOpts, backend bind.ContractBackend, teleporterRegistryAddress common.Address, destinationBlockchainID_ [32]byte, nativeTokenDestinationAddress_ common.Address) (common.Address, *types.Transaction, *NativeTokenSource, error) { parsed, err := NativeTokenSourceMetaData.GetAbi() if err != nil { return common.Address{}, nil, nil, err @@ -59,7 +59,7 @@ func DeployNativeTokenSource(auth *bind.TransactOpts, backend bind.ContractBacke return common.Address{}, nil, nil, errors.New("GetABI returned nil") } - address, tx, contract, err := bind.DeployContract(auth, *parsed, common.FromHex(NativeTokenSourceBin), backend, teleporterMessengerAddress, destinationBlockchainID_, nativeTokenDestinationAddress_) + address, tx, contract, err := bind.DeployContract(auth, *parsed, common.FromHex(NativeTokenSourceBin), backend, teleporterRegistryAddress, destinationBlockchainID_, nativeTokenDestinationAddress_) if err != nil { return common.Address{}, nil, nil, err } @@ -332,6 +332,37 @@ func (_NativeTokenSource *NativeTokenSourceCallerSession) DestinationBurnedTotal return _NativeTokenSource.Contract.DestinationBurnedTotal(&_NativeTokenSource.CallOpts) } +// GetMinTeleporterVersion is a free data retrieval call binding the contract method 0xd2cc7a70. +// +// Solidity: function getMinTeleporterVersion() view returns(uint256) +func (_NativeTokenSource *NativeTokenSourceCaller) GetMinTeleporterVersion(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _NativeTokenSource.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 (_NativeTokenSource *NativeTokenSourceSession) GetMinTeleporterVersion() (*big.Int, error) { + return _NativeTokenSource.Contract.GetMinTeleporterVersion(&_NativeTokenSource.CallOpts) +} + +// GetMinTeleporterVersion is a free data retrieval call binding the contract method 0xd2cc7a70. +// +// Solidity: function getMinTeleporterVersion() view returns(uint256) +func (_NativeTokenSource *NativeTokenSourceCallerSession) GetMinTeleporterVersion() (*big.Int, error) { + return _NativeTokenSource.Contract.GetMinTeleporterVersion(&_NativeTokenSource.CallOpts) +} + // NativeTokenDestinationAddress is a free data retrieval call binding the contract method 0xb8c9091a. // // Solidity: function nativeTokenDestinationAddress() view returns(address) @@ -363,12 +394,12 @@ func (_NativeTokenSource *NativeTokenSourceCallerSession) NativeTokenDestination return _NativeTokenSource.Contract.NativeTokenDestinationAddress(&_NativeTokenSource.CallOpts) } -// TeleporterMessenger is a free data retrieval call binding the contract method 0x9b3e5803. +// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. // -// Solidity: function teleporterMessenger() view returns(address) -func (_NativeTokenSource *NativeTokenSourceCaller) TeleporterMessenger(opts *bind.CallOpts) (common.Address, error) { +// Solidity: function owner() view returns(address) +func (_NativeTokenSource *NativeTokenSourceCaller) Owner(opts *bind.CallOpts) (common.Address, error) { var out []interface{} - err := _NativeTokenSource.contract.Call(opts, &out, "teleporterMessenger") + err := _NativeTokenSource.contract.Call(opts, &out, "owner") if err != nil { return *new(common.Address), err @@ -380,39 +411,112 @@ func (_NativeTokenSource *NativeTokenSourceCaller) TeleporterMessenger(opts *bin } -// TeleporterMessenger is a free data retrieval call binding the contract method 0x9b3e5803. +// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. // -// Solidity: function teleporterMessenger() view returns(address) -func (_NativeTokenSource *NativeTokenSourceSession) TeleporterMessenger() (common.Address, error) { - return _NativeTokenSource.Contract.TeleporterMessenger(&_NativeTokenSource.CallOpts) +// Solidity: function owner() view returns(address) +func (_NativeTokenSource *NativeTokenSourceSession) Owner() (common.Address, error) { + return _NativeTokenSource.Contract.Owner(&_NativeTokenSource.CallOpts) } -// TeleporterMessenger is a free data retrieval call binding the contract method 0x9b3e5803. +// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. // -// Solidity: function teleporterMessenger() view returns(address) -func (_NativeTokenSource *NativeTokenSourceCallerSession) TeleporterMessenger() (common.Address, error) { - return _NativeTokenSource.Contract.TeleporterMessenger(&_NativeTokenSource.CallOpts) +// Solidity: function owner() view returns(address) +func (_NativeTokenSource *NativeTokenSourceCallerSession) Owner() (common.Address, error) { + return _NativeTokenSource.Contract.Owner(&_NativeTokenSource.CallOpts) +} + +// TeleporterRegistry is a free data retrieval call binding the contract method 0x1a7f5bec. +// +// Solidity: function teleporterRegistry() view returns(address) +func (_NativeTokenSource *NativeTokenSourceCaller) TeleporterRegistry(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _NativeTokenSource.contract.Call(opts, &out, "teleporterRegistry") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// TeleporterRegistry is a free data retrieval call binding the contract method 0x1a7f5bec. +// +// Solidity: function teleporterRegistry() view returns(address) +func (_NativeTokenSource *NativeTokenSourceSession) TeleporterRegistry() (common.Address, error) { + return _NativeTokenSource.Contract.TeleporterRegistry(&_NativeTokenSource.CallOpts) +} + +// TeleporterRegistry is a free data retrieval call binding the contract method 0x1a7f5bec. +// +// Solidity: function teleporterRegistry() view returns(address) +func (_NativeTokenSource *NativeTokenSourceCallerSession) TeleporterRegistry() (common.Address, error) { + return _NativeTokenSource.Contract.TeleporterRegistry(&_NativeTokenSource.CallOpts) } // ReceiveTeleporterMessage is a paid mutator transaction binding the contract method 0xc868efaa. // -// Solidity: function receiveTeleporterMessage(bytes32 senderBlockchainID, address senderAddress, bytes message) returns() -func (_NativeTokenSource *NativeTokenSourceTransactor) ReceiveTeleporterMessage(opts *bind.TransactOpts, senderBlockchainID [32]byte, senderAddress common.Address, message []byte) (*types.Transaction, error) { - return _NativeTokenSource.contract.Transact(opts, "receiveTeleporterMessage", senderBlockchainID, senderAddress, message) +// Solidity: function receiveTeleporterMessage(bytes32 originBlockchainID, address originSenderAddress, bytes message) returns() +func (_NativeTokenSource *NativeTokenSourceTransactor) ReceiveTeleporterMessage(opts *bind.TransactOpts, originBlockchainID [32]byte, originSenderAddress common.Address, message []byte) (*types.Transaction, error) { + return _NativeTokenSource.contract.Transact(opts, "receiveTeleporterMessage", originBlockchainID, originSenderAddress, message) } // ReceiveTeleporterMessage is a paid mutator transaction binding the contract method 0xc868efaa. // -// Solidity: function receiveTeleporterMessage(bytes32 senderBlockchainID, address senderAddress, bytes message) returns() -func (_NativeTokenSource *NativeTokenSourceSession) ReceiveTeleporterMessage(senderBlockchainID [32]byte, senderAddress common.Address, message []byte) (*types.Transaction, error) { - return _NativeTokenSource.Contract.ReceiveTeleporterMessage(&_NativeTokenSource.TransactOpts, senderBlockchainID, senderAddress, message) +// Solidity: function receiveTeleporterMessage(bytes32 originBlockchainID, address originSenderAddress, bytes message) returns() +func (_NativeTokenSource *NativeTokenSourceSession) ReceiveTeleporterMessage(originBlockchainID [32]byte, originSenderAddress common.Address, message []byte) (*types.Transaction, error) { + return _NativeTokenSource.Contract.ReceiveTeleporterMessage(&_NativeTokenSource.TransactOpts, originBlockchainID, originSenderAddress, message) } // ReceiveTeleporterMessage is a paid mutator transaction binding the contract method 0xc868efaa. // -// Solidity: function receiveTeleporterMessage(bytes32 senderBlockchainID, address senderAddress, bytes message) returns() -func (_NativeTokenSource *NativeTokenSourceTransactorSession) ReceiveTeleporterMessage(senderBlockchainID [32]byte, senderAddress common.Address, message []byte) (*types.Transaction, error) { - return _NativeTokenSource.Contract.ReceiveTeleporterMessage(&_NativeTokenSource.TransactOpts, senderBlockchainID, senderAddress, message) +// Solidity: function receiveTeleporterMessage(bytes32 originBlockchainID, address originSenderAddress, bytes message) returns() +func (_NativeTokenSource *NativeTokenSourceTransactorSession) ReceiveTeleporterMessage(originBlockchainID [32]byte, originSenderAddress common.Address, message []byte) (*types.Transaction, error) { + return _NativeTokenSource.Contract.ReceiveTeleporterMessage(&_NativeTokenSource.TransactOpts, originBlockchainID, originSenderAddress, message) +} + +// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. +// +// Solidity: function renounceOwnership() returns() +func (_NativeTokenSource *NativeTokenSourceTransactor) RenounceOwnership(opts *bind.TransactOpts) (*types.Transaction, error) { + return _NativeTokenSource.contract.Transact(opts, "renounceOwnership") +} + +// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. +// +// Solidity: function renounceOwnership() returns() +func (_NativeTokenSource *NativeTokenSourceSession) RenounceOwnership() (*types.Transaction, error) { + return _NativeTokenSource.Contract.RenounceOwnership(&_NativeTokenSource.TransactOpts) +} + +// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. +// +// Solidity: function renounceOwnership() returns() +func (_NativeTokenSource *NativeTokenSourceTransactorSession) RenounceOwnership() (*types.Transaction, error) { + return _NativeTokenSource.Contract.RenounceOwnership(&_NativeTokenSource.TransactOpts) +} + +// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// +// Solidity: function transferOwnership(address newOwner) returns() +func (_NativeTokenSource *NativeTokenSourceTransactor) TransferOwnership(opts *bind.TransactOpts, newOwner common.Address) (*types.Transaction, error) { + return _NativeTokenSource.contract.Transact(opts, "transferOwnership", newOwner) +} + +// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// +// Solidity: function transferOwnership(address newOwner) returns() +func (_NativeTokenSource *NativeTokenSourceSession) TransferOwnership(newOwner common.Address) (*types.Transaction, error) { + return _NativeTokenSource.Contract.TransferOwnership(&_NativeTokenSource.TransactOpts, newOwner) +} + +// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// +// Solidity: function transferOwnership(address newOwner) returns() +func (_NativeTokenSource *NativeTokenSourceTransactorSession) TransferOwnership(newOwner common.Address) (*types.Transaction, error) { + return _NativeTokenSource.Contract.TransferOwnership(&_NativeTokenSource.TransactOpts, newOwner) } // TransferToDestination is a paid mutator transaction binding the contract method 0xad0aee25. @@ -436,6 +540,27 @@ func (_NativeTokenSource *NativeTokenSourceTransactorSession) TransferToDestinat return _NativeTokenSource.Contract.TransferToDestination(&_NativeTokenSource.TransactOpts, recipient, feeInfo, allowedRelayerAddresses) } +// UpdateMinTeleporterVersion is a paid mutator transaction binding the contract method 0x5eb99514. +// +// Solidity: function updateMinTeleporterVersion(uint256 version) returns() +func (_NativeTokenSource *NativeTokenSourceTransactor) UpdateMinTeleporterVersion(opts *bind.TransactOpts, version *big.Int) (*types.Transaction, error) { + return _NativeTokenSource.contract.Transact(opts, "updateMinTeleporterVersion", version) +} + +// UpdateMinTeleporterVersion is a paid mutator transaction binding the contract method 0x5eb99514. +// +// Solidity: function updateMinTeleporterVersion(uint256 version) returns() +func (_NativeTokenSource *NativeTokenSourceSession) UpdateMinTeleporterVersion(version *big.Int) (*types.Transaction, error) { + return _NativeTokenSource.Contract.UpdateMinTeleporterVersion(&_NativeTokenSource.TransactOpts, version) +} + +// UpdateMinTeleporterVersion is a paid mutator transaction binding the contract method 0x5eb99514. +// +// Solidity: function updateMinTeleporterVersion(uint256 version) returns() +func (_NativeTokenSource *NativeTokenSourceTransactorSession) UpdateMinTeleporterVersion(version *big.Int) (*types.Transaction, error) { + return _NativeTokenSource.Contract.UpdateMinTeleporterVersion(&_NativeTokenSource.TransactOpts, version) +} + // NativeTokenSourceBurnTokensIterator is returned from FilterBurnTokens and is used to iterate over the raw logs and unpacked data for BurnTokens events raised by the NativeTokenSource contract. type NativeTokenSourceBurnTokensIterator struct { Event *NativeTokenSourceBurnTokens // Event containing the contract specifics and raw log @@ -570,6 +695,312 @@ func (_NativeTokenSource *NativeTokenSourceFilterer) ParseBurnTokens(log types.L return event, nil } +// NativeTokenSourceMinTeleporterVersionUpdatedIterator is returned from FilterMinTeleporterVersionUpdated and is used to iterate over the raw logs and unpacked data for MinTeleporterVersionUpdated events raised by the NativeTokenSource contract. +type NativeTokenSourceMinTeleporterVersionUpdatedIterator struct { + Event *NativeTokenSourceMinTeleporterVersionUpdated // 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 *NativeTokenSourceMinTeleporterVersionUpdatedIterator) 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(NativeTokenSourceMinTeleporterVersionUpdated) + 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(NativeTokenSourceMinTeleporterVersionUpdated) + 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 *NativeTokenSourceMinTeleporterVersionUpdatedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *NativeTokenSourceMinTeleporterVersionUpdatedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// NativeTokenSourceMinTeleporterVersionUpdated represents a MinTeleporterVersionUpdated event raised by the NativeTokenSource contract. +type NativeTokenSourceMinTeleporterVersionUpdated 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 (_NativeTokenSource *NativeTokenSourceFilterer) FilterMinTeleporterVersionUpdated(opts *bind.FilterOpts, oldMinTeleporterVersion []*big.Int, newMinTeleporterVersion []*big.Int) (*NativeTokenSourceMinTeleporterVersionUpdatedIterator, 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 := _NativeTokenSource.contract.FilterLogs(opts, "MinTeleporterVersionUpdated", oldMinTeleporterVersionRule, newMinTeleporterVersionRule) + if err != nil { + return nil, err + } + return &NativeTokenSourceMinTeleporterVersionUpdatedIterator{contract: _NativeTokenSource.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 (_NativeTokenSource *NativeTokenSourceFilterer) WatchMinTeleporterVersionUpdated(opts *bind.WatchOpts, sink chan<- *NativeTokenSourceMinTeleporterVersionUpdated, 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 := _NativeTokenSource.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(NativeTokenSourceMinTeleporterVersionUpdated) + if err := _NativeTokenSource.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 (_NativeTokenSource *NativeTokenSourceFilterer) ParseMinTeleporterVersionUpdated(log types.Log) (*NativeTokenSourceMinTeleporterVersionUpdated, error) { + event := new(NativeTokenSourceMinTeleporterVersionUpdated) + if err := _NativeTokenSource.contract.UnpackLog(event, "MinTeleporterVersionUpdated", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// NativeTokenSourceOwnershipTransferredIterator is returned from FilterOwnershipTransferred and is used to iterate over the raw logs and unpacked data for OwnershipTransferred events raised by the NativeTokenSource contract. +type NativeTokenSourceOwnershipTransferredIterator struct { + Event *NativeTokenSourceOwnershipTransferred // 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 *NativeTokenSourceOwnershipTransferredIterator) 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(NativeTokenSourceOwnershipTransferred) + 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(NativeTokenSourceOwnershipTransferred) + 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 *NativeTokenSourceOwnershipTransferredIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *NativeTokenSourceOwnershipTransferredIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// NativeTokenSourceOwnershipTransferred represents a OwnershipTransferred event raised by the NativeTokenSource contract. +type NativeTokenSourceOwnershipTransferred 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 (_NativeTokenSource *NativeTokenSourceFilterer) FilterOwnershipTransferred(opts *bind.FilterOpts, previousOwner []common.Address, newOwner []common.Address) (*NativeTokenSourceOwnershipTransferredIterator, 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 := _NativeTokenSource.contract.FilterLogs(opts, "OwnershipTransferred", previousOwnerRule, newOwnerRule) + if err != nil { + return nil, err + } + return &NativeTokenSourceOwnershipTransferredIterator{contract: _NativeTokenSource.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 (_NativeTokenSource *NativeTokenSourceFilterer) WatchOwnershipTransferred(opts *bind.WatchOpts, sink chan<- *NativeTokenSourceOwnershipTransferred, 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 := _NativeTokenSource.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(NativeTokenSourceOwnershipTransferred) + if err := _NativeTokenSource.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 (_NativeTokenSource *NativeTokenSourceFilterer) ParseOwnershipTransferred(log types.Log) (*NativeTokenSourceOwnershipTransferred, error) { + event := new(NativeTokenSourceOwnershipTransferred) + if err := _NativeTokenSource.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + // NativeTokenSourceTransferToDestinationIterator is returned from FilterTransferToDestination and is used to iterate over the raw logs and unpacked data for TransferToDestination events raised by the NativeTokenSource contract. type NativeTokenSourceTransferToDestinationIterator struct { Event *NativeTokenSourceTransferToDestination // Event containing the contract specifics and raw log diff --git a/contracts/src/CrossChainApplications/NativeTokenBridge/ERC20TokenSource.sol b/contracts/src/CrossChainApplications/NativeTokenBridge/ERC20TokenSource.sol index 0b07a7283..7b1877092 100644 --- a/contracts/src/CrossChainApplications/NativeTokenBridge/ERC20TokenSource.sol +++ b/contracts/src/CrossChainApplications/NativeTokenBridge/ERC20TokenSource.sol @@ -10,13 +10,13 @@ import {IWarpMessenger} from "@subnet-evm-contracts/interfaces/IWarpMessenger.so import {IERC20TokenSource} from "./IERC20TokenSource.sol"; import {ITokenSource} from "./ITokenSource.sol"; import {ITeleporterMessenger, TeleporterMessageInput, TeleporterFeeInfo} from "../../Teleporter/ITeleporterMessenger.sol"; -import {ITeleporterReceiver} from "../../Teleporter/ITeleporterReceiver.sol"; +import {TeleporterOwnerUpgradeable} from "../../Teleporter/upgrades/TeleporterOwnerUpgradeable.sol"; import {SafeERC20TransferFrom} from "../../Teleporter/SafeERC20TransferFrom.sol"; import {IERC20} from "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import {SafeERC20} from "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; contract ERC20TokenSource is - ITeleporterReceiver, + TeleporterOwnerUpgradeable, IERC20TokenSource, ITokenSource, ReentrancyGuard @@ -34,21 +34,12 @@ contract ERC20TokenSource is address public immutable nativeTokenDestinationAddress; address public immutable erc20ContractAddress; - // Used for sending and receiving Teleporter messages. - ITeleporterMessenger public immutable teleporterMessenger; - constructor( - address teleporterMessengerAddress, + address teleporterRegistryAddress, bytes32 destinationBlockchainID_, address nativeTokenDestinationAddress_, address erc20ContractAddress_ - ) { - require( - teleporterMessengerAddress != address(0), - "ERC20TokenSource: zero TeleporterMessenger address" - ); - teleporterMessenger = ITeleporterMessenger(teleporterMessengerAddress); - + ) TeleporterOwnerUpgradeable(teleporterRegistryAddress) { require( destinationBlockchainID_ != bytes32(0), "ERC20TokenSource: zero destination blockchain ID" @@ -79,17 +70,11 @@ contract ERC20TokenSource is * * Receives a Teleporter message and routes to the appropriate internal function call. */ - function receiveTeleporterMessage( + function _receiveTeleporterMessage( bytes32 senderBlockchainID, address senderAddress, - bytes calldata message - ) external nonReentrant { - // Only allow the Teleporter messenger to deliver messages. - require( - msg.sender == address(teleporterMessenger), - "ERC20TokenSource: unauthorized TeleporterMessenger contract" - ); - + bytes memory message + ) internal override { // Only allow messages from the destination chain. require( senderBlockchainID == destinationBlockchainID, @@ -132,6 +117,9 @@ contract ERC20TokenSource is uint256 feeAmount, address[] calldata allowedRelayerAddresses ) external nonReentrant { + ITeleporterMessenger teleporterMessenger = teleporterRegistry + .getLatestTeleporter(); + // The recipient cannot be the zero address. require( recipient != address(0), diff --git a/contracts/src/CrossChainApplications/NativeTokenBridge/NativeTokenDestination.sol b/contracts/src/CrossChainApplications/NativeTokenBridge/NativeTokenDestination.sol index 3d8648619..aaa72911d 100644 --- a/contracts/src/CrossChainApplications/NativeTokenBridge/NativeTokenDestination.sol +++ b/contracts/src/CrossChainApplications/NativeTokenBridge/NativeTokenDestination.sol @@ -12,7 +12,7 @@ import {INativeMinter} from "@subnet-evm-contracts/interfaces/INativeMinter.sol" import {INativeTokenDestination} from "./INativeTokenDestination.sol"; import {ITokenSource} from "./ITokenSource.sol"; import {ITeleporterMessenger, TeleporterFeeInfo, TeleporterMessageInput} from "../../Teleporter/ITeleporterMessenger.sol"; -import {ITeleporterReceiver} from "../../Teleporter/ITeleporterReceiver.sol"; +import {TeleporterOwnerUpgradeable} from "../../Teleporter/upgrades/TeleporterOwnerUpgradeable.sol"; import {SafeERC20TransferFrom} from "../../Teleporter/SafeERC20TransferFrom.sol"; import {IERC20} from "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import {SafeERC20} from "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; @@ -21,18 +21,20 @@ import {SafeERC20} from "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol import {IAllowList} from "@subnet-evm-contracts/interfaces/IAllowList.sol"; contract NativeTokenDestination is - ITeleporterReceiver, + TeleporterOwnerUpgradeable, INativeTokenDestination, ReentrancyGuard { - // The address where the burned transaction fees are credited. - // Defined as BLACKHOLE_ADDRESS at + // The address where the burned transaction fees are credited. + // Defined as BLACKHOLE_ADDRESS at // https://github.com/ava-labs/subnet-evm/blob/e23ab058d039ff9c8469c89b139d21d52c4bd283/constants/constants.go - address public constant BURNED_TX_FEES_ADDRESS = 0x0100000000000000000000000000000000000000; - // Designated Blackhole Address for this contract. Tokens are sent here to be "burned" before - // sending an unlock message to the source chain. Different from the burned tx fee address so + address public constant BURNED_TX_FEES_ADDRESS = + 0x0100000000000000000000000000000000000000; + // Designated Blackhole Address for this contract. Tokens are sent here to be "burned" before + // sending an unlock message to the source chain. Different from the burned tx fee address so // they can be tracked separately. - address public constant BURN_FOR_TRANSFER_ADDRESS = 0x0100000000000000000000000000000000000001; + address public constant BURN_FOR_TRANSFER_ADDRESS = + 0x0100000000000000000000000000000000000001; INativeMinter private immutable _nativeMinter = INativeMinter(0x0200000000000000000000000000000000000001); @@ -48,21 +50,12 @@ contract NativeTokenDestination is uint256 public currentReserveImbalance; uint256 public totalMinted; - // Used for sending and receiving Teleporter messages. - ITeleporterMessenger public immutable teleporterMessenger; - constructor( - address teleporterMessengerAddress, + address teleporterRegistryAddress, bytes32 sourceBlockchainID_, address nativeTokenSourceAddress_, uint256 initialReserveImbalance_ - ) { - require( - teleporterMessengerAddress != address(0), - "NativeTokenDestination: zero TeleporterMessenger address" - ); - teleporterMessenger = ITeleporterMessenger(teleporterMessengerAddress); - + ) TeleporterOwnerUpgradeable(teleporterRegistryAddress) { require( sourceBlockchainID_ != bytes32(0), "NativeTokenDestination: zero source blockchain ID" @@ -95,17 +88,11 @@ contract NativeTokenDestination is * * Receives a Teleporter message. */ - function receiveTeleporterMessage( + function _receiveTeleporterMessage( bytes32 senderBlockchainID, address senderAddress, - bytes calldata message - ) external nonReentrant { - // Only allow the Teleporter messenger to deliver messages. - require( - msg.sender == address(teleporterMessenger), - "NativeTokenDestination: unauthorized TeleporterMessenger contract" - ); - + bytes memory message + ) internal override { // Only allow messages from the source chain. require( senderBlockchainID == sourceBlockchainID, @@ -164,6 +151,8 @@ contract NativeTokenDestination is TeleporterFeeInfo calldata feeInfo, address[] calldata allowedRelayerAddresses ) external payable nonReentrant { + ITeleporterMessenger teleporterMessenger = teleporterRegistry + .getLatestTeleporter(); // The recipient cannot be the zero address. require( recipient != address(0), @@ -223,6 +212,9 @@ contract NativeTokenDestination is TeleporterFeeInfo calldata feeInfo, address[] calldata allowedRelayerAddresses ) external { + ITeleporterMessenger teleporterMessenger = teleporterRegistry + .getLatestTeleporter(); + uint256 totalBurnedTxFees = address(BURNED_TX_FEES_ADDRESS).balance; uint256 messageID = teleporterMessenger.sendCrossChainMessage( TeleporterMessageInput({ diff --git a/contracts/src/CrossChainApplications/NativeTokenBridge/NativeTokenSource.sol b/contracts/src/CrossChainApplications/NativeTokenBridge/NativeTokenSource.sol index 75a238518..5ae128b9f 100644 --- a/contracts/src/CrossChainApplications/NativeTokenBridge/NativeTokenSource.sol +++ b/contracts/src/CrossChainApplications/NativeTokenBridge/NativeTokenSource.sol @@ -11,14 +11,14 @@ import {IWarpMessenger} from "@subnet-evm-contracts/interfaces/IWarpMessenger.so import {INativeTokenSource} from "./INativeTokenSource.sol"; import {ITokenSource} from "./ITokenSource.sol"; import {ITeleporterMessenger, TeleporterFeeInfo, TeleporterMessageInput} from "../../Teleporter/ITeleporterMessenger.sol"; -import {ITeleporterReceiver} from "../../Teleporter/ITeleporterReceiver.sol"; +import {TeleporterOwnerUpgradeable} from "../../Teleporter/upgrades/TeleporterOwnerUpgradeable.sol"; import {SafeERC20TransferFrom} from "../../Teleporter/SafeERC20TransferFrom.sol"; import {SafeERC20TransferFrom} from "../../Teleporter/SafeERC20TransferFrom.sol"; import {IERC20} from "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import {SafeERC20} from "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; contract NativeTokenSource is - ITeleporterReceiver, + TeleporterOwnerUpgradeable, INativeTokenSource, ITokenSource, ReentrancyGuard @@ -35,20 +35,11 @@ contract NativeTokenSource is bytes32 public immutable destinationBlockchainID; address public immutable nativeTokenDestinationAddress; - // Used for sending and receiving Teleporter messages. - ITeleporterMessenger public immutable teleporterMessenger; - constructor( - address teleporterMessengerAddress, + address teleporterRegistryAddress, bytes32 destinationBlockchainID_, address nativeTokenDestinationAddress_ - ) { - require( - teleporterMessengerAddress != address(0), - "NativeTokenSource: zero TeleporterMessenger address" - ); - teleporterMessenger = ITeleporterMessenger(teleporterMessengerAddress); - + ) TeleporterOwnerUpgradeable(teleporterRegistryAddress) { require( destinationBlockchainID_ != bytes32(0), "NativeTokenSource: zero destination blockchain ID" @@ -73,17 +64,11 @@ contract NativeTokenSource is * * Receives a Teleporter message and routes to the appropriate internal function call. */ - function receiveTeleporterMessage( + function _receiveTeleporterMessage( bytes32 senderBlockchainID, address senderAddress, - bytes calldata message - ) external nonReentrant { - // Only allow the Teleporter messenger to deliver messages. - require( - msg.sender == address(teleporterMessenger), - "NativeTokenSource: unauthorized TeleporterMessenger contract" - ); - + bytes memory message + ) internal override { // Only allow messages from the destination chain. require( senderBlockchainID == destinationBlockchainID, @@ -125,6 +110,9 @@ contract NativeTokenSource is TeleporterFeeInfo calldata feeInfo, address[] calldata allowedRelayerAddresses ) external payable nonReentrant { + ITeleporterMessenger teleporterMessenger = teleporterRegistry + .getLatestTeleporter(); + // The recipient cannot be the zero address. require( recipient != address(0), From 7f76f5cdfec19141c5a584523b8212443c1b24cd Mon Sep 17 00:00:00 2001 From: Geoff Stuart Date: Wed, 13 Dec 2023 14:27:49 -0500 Subject: [PATCH 02/12] Fix unit tests --- .../tests/ERC20TokenSourceTests.t.sol | 120 +++++++++++------- .../tests/NativeTokenDestinationTests.t.sol | 83 +++++++++--- .../tests/NativeTokenSourceTests.t.sol | 93 ++++++++++---- 3 files changed, 214 insertions(+), 82 deletions(-) diff --git a/contracts/src/CrossChainApplications/NativeTokenBridge/tests/ERC20TokenSourceTests.t.sol b/contracts/src/CrossChainApplications/NativeTokenBridge/tests/ERC20TokenSourceTests.t.sol index 3afd106d2..630074f1b 100644 --- a/contracts/src/CrossChainApplications/NativeTokenBridge/tests/ERC20TokenSourceTests.t.sol +++ b/contracts/src/CrossChainApplications/NativeTokenBridge/tests/ERC20TokenSourceTests.t.sol @@ -7,11 +7,14 @@ pragma solidity 0.8.18; import {Test} from "forge-std/Test.sol"; import {ERC20TokenSource, IERC20, ITokenSource, TeleporterMessageInput, TeleporterFeeInfo, IWarpMessenger, ITeleporterMessenger} from "../ERC20TokenSource.sol"; +import {TeleporterRegistry} from "../../../Teleporter/upgrades/TeleporterRegistry.sol"; import {UnitTestMockERC20} from "../../../Mocks/UnitTestMockERC20.sol"; contract ERC20TokenSourceTest is Test { address public constant MOCK_TELEPORTER_MESSENGER_ADDRESS = 0x644E5b7c5D4Bc8073732CEa72c66e0BB90dFC00f; + address public constant MOCK_TELEPORTER_REGISTRY_ADDRESS = + 0xf9FA4a0c696b659328DDaaBCB46Ae4eBFC9e68e4; address public constant WARP_PRECOMPILE_ADDRESS = address(0x0200000000000000000000000000000000000005); bytes32 private constant _MOCK_BLOCKCHAIN_ID = bytes32(uint256(123456)); @@ -58,9 +61,11 @@ contract ERC20TokenSourceTest is Test { abi.encodeWithSelector(IWarpMessenger.getBlockchainID.selector) ); + _initMockTeleporterRegistry(); + mockERC20 = new UnitTestMockERC20(); erc20TokenSource = new ERC20TokenSource( - MOCK_TELEPORTER_MESSENGER_ADDRESS, + MOCK_TELEPORTER_REGISTRY_ADDRESS, _DEFAULT_OTHER_CHAIN_ID, _DEFAULT_OTHER_BRIDGE_ADDRESS, address(mockERC20) @@ -98,7 +103,10 @@ contract ERC20TokenSourceTest is Test { requiredGasLimit: erc20TokenSource .MINT_NATIVE_TOKENS_REQUIRED_GAS(), allowedRelayerAddresses: new address[](0), - message: abi.encode(_DEFAULT_RECIPIENT, _DEFAULT_TRANSFER_AMOUNT) + message: abi.encode( + _DEFAULT_RECIPIENT, + _DEFAULT_TRANSFER_AMOUNT + ) }); vm.expectCall( @@ -121,7 +129,7 @@ contract ERC20TokenSourceTest is Test { // Give the contract some tokens to burn. erc20TokenSource.transferToDestination( _DEFAULT_RECIPIENT, - _DEFAULT_TRANSFER_AMOUNT * 2 + _DEFAULT_FEE_AMOUNT , + _DEFAULT_TRANSFER_AMOUNT * 2 + _DEFAULT_FEE_AMOUNT, _DEFAULT_FEE_AMOUNT, new address[](0) ); @@ -139,7 +147,10 @@ contract ERC20TokenSourceTest is Test { ) ); - assertEq(_DEFAULT_TRANSFER_AMOUNT, mockERC20.balanceOf(_DEFAULT_RECIPIENT)); + assertEq( + _DEFAULT_TRANSFER_AMOUNT, + mockERC20.balanceOf(_DEFAULT_RECIPIENT) + ); } function testBurnedTxFees() public { @@ -162,14 +173,14 @@ contract ERC20TokenSourceTest is Test { erc20TokenSource.receiveTeleporterMessage( _DEFAULT_OTHER_CHAIN_ID, _DEFAULT_OTHER_BRIDGE_ADDRESS, - abi.encode( - ITokenSource.SourceAction.Burn, - abi.encode(burnedTxFees) - ) + abi.encode(ITokenSource.SourceAction.Burn, abi.encode(burnedTxFees)) ); assertEq(burnedTxFees, erc20TokenSource.destinationBurnedTotal()); - assertEq(burnedTxFees, mockERC20.balanceOf(erc20TokenSource.BURNED_TX_FEES_ADDRESS())); + assertEq( + burnedTxFees, + mockERC20.balanceOf(erc20TokenSource.BURNED_TX_FEES_ADDRESS()) + ); vm.prank(MOCK_TELEPORTER_MESSENGER_ADDRESS); erc20TokenSource.receiveTeleporterMessage( @@ -182,7 +193,10 @@ contract ERC20TokenSourceTest is Test { ); assertEq(burnedTxFees, erc20TokenSource.destinationBurnedTotal()); - assertEq(burnedTxFees, mockERC20.balanceOf(erc20TokenSource.BURNED_TX_FEES_ADDRESS())); + assertEq( + burnedTxFees, + mockERC20.balanceOf(erc20TokenSource.BURNED_TX_FEES_ADDRESS()) + ); emit BurnTokens(additionalTxFees); @@ -196,15 +210,19 @@ contract ERC20TokenSourceTest is Test { ) ); - assertEq(burnedTxFees + additionalTxFees, erc20TokenSource.destinationBurnedTotal()); - assertEq(burnedTxFees + additionalTxFees, mockERC20.balanceOf(erc20TokenSource.BURNED_TX_FEES_ADDRESS())); + assertEq( + burnedTxFees + additionalTxFees, + erc20TokenSource.destinationBurnedTotal() + ); + assertEq( + burnedTxFees + additionalTxFees, + mockERC20.balanceOf(erc20TokenSource.BURNED_TX_FEES_ADDRESS()) + ); } function testZeroTeleporterAddress() public { vm.expectRevert( - _formatERC20TokenSourceErrorMessage( - "zero TeleporterMessenger address" - ) + "TeleporterUpgradeable: zero teleporter registry address" ); new ERC20TokenSource( @@ -223,7 +241,7 @@ contract ERC20TokenSourceTest is Test { ); new ERC20TokenSource( - MOCK_TELEPORTER_MESSENGER_ADDRESS, + MOCK_TELEPORTER_REGISTRY_ADDRESS, bytes32(0), _DEFAULT_OTHER_BRIDGE_ADDRESS, address(mockERC20) @@ -238,7 +256,7 @@ contract ERC20TokenSourceTest is Test { ); new ERC20TokenSource( - MOCK_TELEPORTER_MESSENGER_ADDRESS, + MOCK_TELEPORTER_REGISTRY_ADDRESS, _MOCK_BLOCKCHAIN_ID, _DEFAULT_OTHER_BRIDGE_ADDRESS, address(mockERC20) @@ -253,7 +271,7 @@ contract ERC20TokenSourceTest is Test { ); new ERC20TokenSource( - MOCK_TELEPORTER_MESSENGER_ADDRESS, + MOCK_TELEPORTER_REGISTRY_ADDRESS, _DEFAULT_OTHER_CHAIN_ID, address(0x0), address(mockERC20) @@ -262,41 +280,19 @@ contract ERC20TokenSourceTest is Test { function testZeroERC20ContractAddress() public { vm.expectRevert( - _formatERC20TokenSourceErrorMessage( - "zero ERC20 contract address" - ) + _formatERC20TokenSourceErrorMessage("zero ERC20 contract address") ); new ERC20TokenSource( - MOCK_TELEPORTER_MESSENGER_ADDRESS, + MOCK_TELEPORTER_REGISTRY_ADDRESS, _DEFAULT_OTHER_CHAIN_ID, _DEFAULT_OTHER_BRIDGE_ADDRESS, address(0x0) ); } - function testInvalidTeleporterAddress() public { - vm.expectRevert( - _formatERC20TokenSourceErrorMessage( - "unauthorized TeleporterMessenger contract" - ) - ); - - vm.prank(address(0x123)); - erc20TokenSource.receiveTeleporterMessage( - _DEFAULT_OTHER_CHAIN_ID, - _DEFAULT_OTHER_BRIDGE_ADDRESS, - abi.encode( - ITokenSource.SourceAction.Unlock, - abi.encode(_DEFAULT_RECIPIENT, _DEFAULT_TRANSFER_AMOUNT) - ) - ); - } - function testInvalidDestinationBlockchain() public { - vm.expectRevert( - _formatERC20TokenSourceErrorMessage("invalid destination chain") - ); + vm.expectRevert(); vm.prank(MOCK_TELEPORTER_MESSENGER_ADDRESS); erc20TokenSource.receiveTeleporterMessage( @@ -359,4 +355,42 @@ contract ERC20TokenSourceTest is Test { ) private pure returns (bytes memory) { return bytes(string.concat("ERC20TokenSource: ", errorMessage)); } + + 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, + (MOCK_TELEPORTER_MESSENGER_ADDRESS) + ), + 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)) + ); + } } diff --git a/contracts/src/CrossChainApplications/NativeTokenBridge/tests/NativeTokenDestinationTests.t.sol b/contracts/src/CrossChainApplications/NativeTokenBridge/tests/NativeTokenDestinationTests.t.sol index 32e65b470..0a245cdfd 100644 --- a/contracts/src/CrossChainApplications/NativeTokenBridge/tests/NativeTokenDestinationTests.t.sol +++ b/contracts/src/CrossChainApplications/NativeTokenBridge/tests/NativeTokenDestinationTests.t.sol @@ -7,12 +7,15 @@ pragma solidity 0.8.18; import {Test} from "forge-std/Test.sol"; import {NativeTokenDestination, IERC20, ITokenSource, TeleporterMessageInput, TeleporterFeeInfo, IWarpMessenger, ITeleporterMessenger} from "../NativeTokenDestination.sol"; +import {TeleporterRegistry} from "../../../Teleporter/upgrades/TeleporterRegistry.sol"; import {UnitTestMockERC20} from "../../../Mocks/UnitTestMockERC20.sol"; import {INativeMinter} from "@subnet-evm-contracts/interfaces/INativeMinter.sol"; contract NativeTokenDestinationTest is Test { address public constant MOCK_TELEPORTER_MESSENGER_ADDRESS = 0x644E5b7c5D4Bc8073732CEa72c66e0BB90dFC00f; + address public constant MOCK_TELEPORTER_REGISTRY_ADDRESS = + 0xf9FA4a0c696b659328DDaaBCB46Ae4eBFC9e68e4; address public constant WARP_PRECOMPILE_ADDRESS = address(0x0200000000000000000000000000000000000005); address public constant NATIVE_MINTER_PRECOMPILE_ADDRESS = @@ -70,8 +73,10 @@ contract NativeTokenDestinationTest is Test { abi.encodeWithSelector(IWarpMessenger.getBlockchainID.selector) ); + _initMockTeleporterRegistry(); + nativeTokenDestination = new NativeTokenDestination( - MOCK_TELEPORTER_MESSENGER_ADDRESS, + MOCK_TELEPORTER_REGISTRY_ADDRESS, _DEFAULT_OTHER_CHAIN_ID, _DEFAULT_OTHER_BRIDGE_ADDRESS, _DEFAULT_INITIAL_RESERVE_IMBALANCE @@ -164,7 +169,10 @@ contract NativeTokenDestinationTest is Test { function testCollateralizeBridge() public { uint256 firstTransfer = _DEFAULT_INITIAL_RESERVE_IMBALANCE / 4; - assertEq(_DEFAULT_INITIAL_RESERVE_IMBALANCE, nativeTokenDestination.totalSupply()); + assertEq( + _DEFAULT_INITIAL_RESERVE_IMBALANCE, + nativeTokenDestination.totalSupply() + ); vm.expectEmit(true, true, true, true, address(nativeTokenDestination)); emit CollateralAdded({ @@ -179,8 +187,14 @@ contract NativeTokenDestinationTest is Test { abi.encode(_DEFAULT_RECIPIENT, firstTransfer) ); - assertEq(_DEFAULT_INITIAL_RESERVE_IMBALANCE - firstTransfer, nativeTokenDestination.currentReserveImbalance()); - assertEq(_DEFAULT_INITIAL_RESERVE_IMBALANCE, nativeTokenDestination.totalSupply()); + assertEq( + _DEFAULT_INITIAL_RESERVE_IMBALANCE - firstTransfer, + nativeTokenDestination.currentReserveImbalance() + ); + assertEq( + _DEFAULT_INITIAL_RESERVE_IMBALANCE, + nativeTokenDestination.totalSupply() + ); vm.expectEmit(true, true, true, true, address(nativeTokenDestination)); emit CollateralAdded({ @@ -203,7 +217,10 @@ contract NativeTokenDestinationTest is Test { ); assertEq(0, nativeTokenDestination.currentReserveImbalance()); - assertEq(_DEFAULT_INITIAL_RESERVE_IMBALANCE + firstTransfer, nativeTokenDestination.totalSupply()); + assertEq( + _DEFAULT_INITIAL_RESERVE_IMBALANCE + firstTransfer, + nativeTokenDestination.totalSupply() + ); } function testReportBurnedTxFees() public { @@ -253,9 +270,7 @@ contract NativeTokenDestinationTest is Test { function testZeroTeleporterAddress() public { vm.expectRevert( - _formatNativeTokenDestinationErrorMessage( - "zero TeleporterMessenger address" - ) + "TeleporterUpgradeable: zero teleporter registry address" ); new NativeTokenDestination( @@ -274,7 +289,7 @@ contract NativeTokenDestinationTest is Test { ); new NativeTokenDestination( - MOCK_TELEPORTER_MESSENGER_ADDRESS, + MOCK_TELEPORTER_REGISTRY_ADDRESS, bytes32(0), _DEFAULT_OTHER_BRIDGE_ADDRESS, _DEFAULT_INITIAL_RESERVE_IMBALANCE @@ -289,7 +304,7 @@ contract NativeTokenDestinationTest is Test { ); new NativeTokenDestination( - MOCK_TELEPORTER_MESSENGER_ADDRESS, + MOCK_TELEPORTER_REGISTRY_ADDRESS, _MOCK_BLOCKCHAIN_ID, _DEFAULT_OTHER_BRIDGE_ADDRESS, _DEFAULT_INITIAL_RESERVE_IMBALANCE @@ -304,7 +319,7 @@ contract NativeTokenDestinationTest is Test { ); new NativeTokenDestination( - MOCK_TELEPORTER_MESSENGER_ADDRESS, + MOCK_TELEPORTER_REGISTRY_ADDRESS, _DEFAULT_OTHER_CHAIN_ID, address(0x0), _DEFAULT_INITIAL_RESERVE_IMBALANCE @@ -319,7 +334,7 @@ contract NativeTokenDestinationTest is Test { ); new NativeTokenDestination( - MOCK_TELEPORTER_MESSENGER_ADDRESS, + MOCK_TELEPORTER_REGISTRY_ADDRESS, _DEFAULT_OTHER_CHAIN_ID, _DEFAULT_OTHER_BRIDGE_ADDRESS, 0 @@ -327,11 +342,7 @@ contract NativeTokenDestinationTest is Test { } function testInvalidTeleporterAddress() public { - vm.expectRevert( - _formatNativeTokenDestinationErrorMessage( - "unauthorized TeleporterMessenger contract" - ) - ); + vm.expectRevert(); vm.prank(address(0x123)); nativeTokenDestination.receiveTeleporterMessage( @@ -435,4 +446,42 @@ contract NativeTokenDestinationTest is Test { ) private pure returns (bytes memory) { return bytes(string.concat("NativeTokenDestination: ", errorMessage)); } + + 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, + (MOCK_TELEPORTER_MESSENGER_ADDRESS) + ), + 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)) + ); + } } diff --git a/contracts/src/CrossChainApplications/NativeTokenBridge/tests/NativeTokenSourceTests.t.sol b/contracts/src/CrossChainApplications/NativeTokenBridge/tests/NativeTokenSourceTests.t.sol index 0091ca6f0..c98967298 100644 --- a/contracts/src/CrossChainApplications/NativeTokenBridge/tests/NativeTokenSourceTests.t.sol +++ b/contracts/src/CrossChainApplications/NativeTokenBridge/tests/NativeTokenSourceTests.t.sol @@ -7,11 +7,14 @@ pragma solidity 0.8.18; import {Test} from "forge-std/Test.sol"; import {NativeTokenSource, IERC20, ITokenSource, TeleporterMessageInput, TeleporterFeeInfo, IWarpMessenger, ITeleporterMessenger} from "../NativeTokenSource.sol"; +import {TeleporterRegistry} from "../../../Teleporter/upgrades/TeleporterRegistry.sol"; import {UnitTestMockERC20} from "../../../Mocks/UnitTestMockERC20.sol"; contract NativeTokenSourceTest is Test { address public constant MOCK_TELEPORTER_MESSENGER_ADDRESS = 0x644E5b7c5D4Bc8073732CEa72c66e0BB90dFC00f; + address public constant MOCK_TELEPORTER_REGISTRY_ADDRESS = + 0xf9FA4a0c696b659328DDaaBCB46Ae4eBFC9e68e4; address public constant WARP_PRECOMPILE_ADDRESS = address(0x0200000000000000000000000000000000000005); bytes32 private constant _MOCK_BLOCKCHAIN_ID = bytes32(uint256(123456)); @@ -58,8 +61,10 @@ contract NativeTokenSourceTest is Test { abi.encodeWithSelector(IWarpMessenger.getBlockchainID.selector) ); + _initMockTeleporterRegistry(); + nativeTokenSource = new NativeTokenSource( - MOCK_TELEPORTER_MESSENGER_ADDRESS, + MOCK_TELEPORTER_REGISTRY_ADDRESS, _DEFAULT_OTHER_CHAIN_ID, _DEFAULT_OTHER_BRIDGE_ADDRESS ); @@ -97,7 +102,10 @@ contract NativeTokenSourceTest is Test { requiredGasLimit: nativeTokenSource .MINT_NATIVE_TOKENS_REQUIRED_GAS(), allowedRelayerAddresses: new address[](0), - message: abi.encode(_DEFAULT_RECIPIENT, _DEFAULT_TRANSFER_AMOUNT) + message: abi.encode( + _DEFAULT_RECIPIENT, + _DEFAULT_TRANSFER_AMOUNT + ) }); vm.expectCall( @@ -173,14 +181,14 @@ contract NativeTokenSourceTest is Test { nativeTokenSource.receiveTeleporterMessage( _DEFAULT_OTHER_CHAIN_ID, _DEFAULT_OTHER_BRIDGE_ADDRESS, - abi.encode( - ITokenSource.SourceAction.Burn, - abi.encode(burnedTxFees) - ) + abi.encode(ITokenSource.SourceAction.Burn, abi.encode(burnedTxFees)) ); assertEq(burnedTxFees, nativeTokenSource.destinationBurnedTotal()); - assertEq(burnedTxFees, nativeTokenSource.BURNED_TX_FEES_ADDRESS().balance); + assertEq( + burnedTxFees, + nativeTokenSource.BURNED_TX_FEES_ADDRESS().balance + ); vm.prank(MOCK_TELEPORTER_MESSENGER_ADDRESS); nativeTokenSource.receiveTeleporterMessage( @@ -193,7 +201,10 @@ contract NativeTokenSourceTest is Test { ); assertEq(burnedTxFees, nativeTokenSource.destinationBurnedTotal()); - assertEq(burnedTxFees, nativeTokenSource.BURNED_TX_FEES_ADDRESS().balance); + assertEq( + burnedTxFees, + nativeTokenSource.BURNED_TX_FEES_ADDRESS().balance + ); emit BurnTokens(additionalTxFees); @@ -207,15 +218,19 @@ contract NativeTokenSourceTest is Test { ) ); - assertEq(burnedTxFees + additionalTxFees, nativeTokenSource.destinationBurnedTotal()); - assertEq(burnedTxFees + additionalTxFees, nativeTokenSource.BURNED_TX_FEES_ADDRESS().balance); + assertEq( + burnedTxFees + additionalTxFees, + nativeTokenSource.destinationBurnedTotal() + ); + assertEq( + burnedTxFees + additionalTxFees, + nativeTokenSource.BURNED_TX_FEES_ADDRESS().balance + ); } function testZeroTeleporterAddress() public { vm.expectRevert( - _formatNativeTokenSourceErrorMessage( - "zero TeleporterMessenger address" - ) + "TeleporterUpgradeable: zero teleporter registry address" ); new NativeTokenSource( @@ -233,7 +248,7 @@ contract NativeTokenSourceTest is Test { ); new NativeTokenSource( - MOCK_TELEPORTER_MESSENGER_ADDRESS, + MOCK_TELEPORTER_REGISTRY_ADDRESS, bytes32(0), _DEFAULT_OTHER_BRIDGE_ADDRESS ); @@ -247,7 +262,7 @@ contract NativeTokenSourceTest is Test { ); new NativeTokenSource( - MOCK_TELEPORTER_MESSENGER_ADDRESS, + MOCK_TELEPORTER_REGISTRY_ADDRESS, _MOCK_BLOCKCHAIN_ID, _DEFAULT_OTHER_BRIDGE_ADDRESS ); @@ -261,18 +276,14 @@ contract NativeTokenSourceTest is Test { ); new NativeTokenSource( - MOCK_TELEPORTER_MESSENGER_ADDRESS, + MOCK_TELEPORTER_REGISTRY_ADDRESS, _DEFAULT_OTHER_CHAIN_ID, address(0x0) ); } function testInvalidTeleporterAddress() public { - vm.expectRevert( - _formatNativeTokenSourceErrorMessage( - "unauthorized TeleporterMessenger contract" - ) - ); + vm.expectRevert(); vm.prank(address(0x123)); nativeTokenSource.receiveTeleporterMessage( @@ -354,7 +365,7 @@ contract NativeTokenSourceTest is Test { vm.expectRevert( _formatNativeTokenSourceErrorMessage("insufficient collateral") ); - + vm.prank(MOCK_TELEPORTER_MESSENGER_ADDRESS); nativeTokenSource.receiveTeleporterMessage( _DEFAULT_OTHER_CHAIN_ID, @@ -371,4 +382,42 @@ contract NativeTokenSourceTest is Test { ) private pure returns (bytes memory) { return bytes(string.concat("NativeTokenSource: ", errorMessage)); } + + 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, + (MOCK_TELEPORTER_MESSENGER_ADDRESS) + ), + 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)) + ); + } } From bcd564cd125349fcd1e1302f6614f6d58779f46a Mon Sep 17 00:00:00 2001 From: Geoff Stuart Date: Wed, 13 Dec 2023 14:31:14 -0500 Subject: [PATCH 03/12] Fix e2e tests --- tests/flows/erc20_to_native_token_bridge.go | 5 ++--- tests/flows/native_token_bridge.go | 5 ++--- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/tests/flows/erc20_to_native_token_bridge.go b/tests/flows/erc20_to_native_token_bridge.go index 61ec05dd5..26116d086 100644 --- a/tests/flows/erc20_to_native_token_bridge.go +++ b/tests/flows/erc20_to_native_token_bridge.go @@ -47,7 +47,6 @@ func ERC20ToNativeTokenBridge(network interfaces.LocalNetwork) { ) sourceSubnet, destSubnet, _ := utils.GetThreeSubnets(network) - teleporterContractAddress := network.GetTeleporterContractAddress() // Info we need to calculate for the test deployerPK, err := crypto.HexToECDSA(deployerKeyStr) @@ -73,7 +72,7 @@ func ERC20ToNativeTokenBridge(network interfaces.LocalNetwork) { deployerPK, sourceSubnet, erc20TokenSourceAbi, - teleporterContractAddress, + sourceSubnet.TeleporterRegistryAddress, destSubnet.BlockchainID, bridgeContractAddress, exampleERC20ContractAddress, @@ -87,7 +86,7 @@ func ERC20ToNativeTokenBridge(network interfaces.LocalNetwork) { deployerPK, destSubnet, nativeTokenDestinationAbi, - teleporterContractAddress, + destSubnet.TeleporterRegistryAddress, sourceSubnet.BlockchainID, bridgeContractAddress, initialReserveImbalance, diff --git a/tests/flows/native_token_bridge.go b/tests/flows/native_token_bridge.go index 4ab292e6d..f20b7a892 100644 --- a/tests/flows/native_token_bridge.go +++ b/tests/flows/native_token_bridge.go @@ -47,7 +47,6 @@ func NativeTokenBridge(network interfaces.LocalNetwork) { ) sourceSubnet, destSubnet, _ := utils.GetThreeSubnets(network) - teleporterContractAddress := network.GetTeleporterContractAddress() // Info we need to calculate for the test deployerPK, err := crypto.HexToECDSA(deployerKeyStr) @@ -71,7 +70,7 @@ func NativeTokenBridge(network interfaces.LocalNetwork) { deployerPK, sourceSubnet, erc20TokenSourceAbi, - teleporterContractAddress, + sourceSubnet.TeleporterRegistryAddress, destSubnet.BlockchainID, bridgeContractAddress, ) @@ -85,7 +84,7 @@ func NativeTokenBridge(network interfaces.LocalNetwork) { deployerPK, destSubnet, nativeTokenDestinationAbi, - teleporterContractAddress, + destSubnet.TeleporterRegistryAddress, sourceSubnet.BlockchainID, bridgeContractAddress, initialReserveImbalance, From 57c3a175c86e5bc18c3c400e7b4b0a4b6a57b3a4 Mon Sep 17 00:00:00 2001 From: Geoff Stuart Date: Wed, 13 Dec 2023 14:42:09 -0500 Subject: [PATCH 04/12] Solhint --- .../NativeTokenBridge/ERC20TokenSource.sol | 86 ++++++------- .../NativeTokenDestination.sol | 120 +++++++++--------- .../NativeTokenBridge/NativeTokenSource.sol | 86 ++++++------- .../tests/ERC20TokenSourceTests.t.sol | 12 +- .../tests/NativeTokenDestinationTests.t.sol | 12 +- .../tests/NativeTokenSourceTests.t.sol | 32 ++--- 6 files changed, 174 insertions(+), 174 deletions(-) diff --git a/contracts/src/CrossChainApplications/NativeTokenBridge/ERC20TokenSource.sol b/contracts/src/CrossChainApplications/NativeTokenBridge/ERC20TokenSource.sol index 7b1877092..f45cac283 100644 --- a/contracts/src/CrossChainApplications/NativeTokenBridge/ERC20TokenSource.sol +++ b/contracts/src/CrossChainApplications/NativeTokenBridge/ERC20TokenSource.sol @@ -65,49 +65,6 @@ contract ERC20TokenSource is erc20ContractAddress = erc20ContractAddress_; } - /** - * @dev See {ITeleporterReceiver-receiveTeleporterMessage}. - * - * Receives a Teleporter message and routes to the appropriate internal function call. - */ - function _receiveTeleporterMessage( - bytes32 senderBlockchainID, - address senderAddress, - bytes memory message - ) internal override { - // Only allow messages from the destination chain. - require( - senderBlockchainID == destinationBlockchainID, - "ERC20TokenSource: invalid destination chain" - ); - - // Only allow the partner contract to send messages. - require( - senderAddress == nativeTokenDestinationAddress, - "ERC20TokenSource: unauthorized sender" - ); - - // Decode the payload to recover the action and corresponding function parameters - (SourceAction action, bytes memory actionData) = abi.decode( - message, - (SourceAction, bytes) - ); - - // Route to the appropriate function. - if (action == SourceAction.Unlock) { - (address recipient, uint256 amount) = abi.decode( - actionData, - (address, uint256) - ); - _unlockTokens(recipient, amount); - } else if (action == SourceAction.Burn) { - uint256 newBurnTotal = abi.decode(actionData, (uint256)); - _handleBurnTokens(newBurnTotal); - } else { - revert("ERC20TokenSource: invalid action"); - } - } - /** * @dev See {IERC20TokenSource-transferToDestination}. */ @@ -173,6 +130,49 @@ contract ERC20TokenSource is }); } + /** + * @dev See {ITeleporterReceiver-receiveTeleporterMessage}. + * + * Receives a Teleporter message and routes to the appropriate internal function call. + */ + function _receiveTeleporterMessage( + bytes32 senderBlockchainID, + address senderAddress, + bytes memory message + ) internal override { + // Only allow messages from the destination chain. + require( + senderBlockchainID == destinationBlockchainID, + "ERC20TokenSource: invalid destination chain" + ); + + // Only allow the partner contract to send messages. + require( + senderAddress == nativeTokenDestinationAddress, + "ERC20TokenSource: unauthorized sender" + ); + + // Decode the payload to recover the action and corresponding function parameters + (SourceAction action, bytes memory actionData) = abi.decode( + message, + (SourceAction, bytes) + ); + + // Route to the appropriate function. + if (action == SourceAction.Unlock) { + (address recipient, uint256 amount) = abi.decode( + actionData, + (address, uint256) + ); + _unlockTokens(recipient, amount); + } else if (action == SourceAction.Burn) { + uint256 newBurnTotal = abi.decode(actionData, (uint256)); + _handleBurnTokens(newBurnTotal); + } else { + revert("ERC20TokenSource: invalid action"); + } + } + /** * @dev Unlocks tokens to recipient. */ diff --git a/contracts/src/CrossChainApplications/NativeTokenBridge/NativeTokenDestination.sol b/contracts/src/CrossChainApplications/NativeTokenBridge/NativeTokenDestination.sol index aaa72911d..2bbd4455d 100644 --- a/contracts/src/CrossChainApplications/NativeTokenBridge/NativeTokenDestination.sol +++ b/contracts/src/CrossChainApplications/NativeTokenBridge/NativeTokenDestination.sol @@ -83,66 +83,6 @@ contract NativeTokenDestination is currentReserveImbalance = initialReserveImbalance_; } - /** - * @dev See {ITeleporterReceiver-receiveTeleporterMessage}. - * - * Receives a Teleporter message. - */ - function _receiveTeleporterMessage( - bytes32 senderBlockchainID, - address senderAddress, - bytes memory message - ) internal override { - // Only allow messages from the source chain. - require( - senderBlockchainID == sourceBlockchainID, - "NativeTokenDestination: invalid source chain" - ); - - // Only allow the partner contract to send messages. - require( - senderAddress == nativeTokenSourceAddress, - "NativeTokenDestination: unauthorized sender" - ); - - (address recipient, uint256 amount) = abi.decode( - message, - (address, uint256) - ); - require( - recipient != address(0), - "NativeTokenDestination: zero recipient address" - ); - require(amount != 0, "NativeTokenDestination: zero transfer value"); - - // If the contract has not yet been collateralized, we will deduct as many tokens - // as needed from the transfer as needed. If there are any excess tokens, they will - // be minted and sent to the recipient. - uint256 adjustedAmount = amount; - if (currentReserveImbalance > 0) { - if (amount > currentReserveImbalance) { - emit CollateralAdded({ - amount: currentReserveImbalance, - remaining: 0 - }); - adjustedAmount = amount - currentReserveImbalance; - currentReserveImbalance = 0; - } else { - currentReserveImbalance -= amount; - emit CollateralAdded({ - amount: amount, - remaining: currentReserveImbalance - }); - return; - } - } - - totalMinted += adjustedAmount; - emit NativeTokensMinted(recipient, adjustedAmount); - // Calls NativeMinter precompile through INativeMinter interface. - _nativeMinter.mintNativeCoin(recipient, adjustedAmount); - } - /** * @dev See {INativeTokenDestination-transferToSource}. */ @@ -236,6 +176,66 @@ contract NativeTokenDestination is }); } + /** + * @dev See {ITeleporterReceiver-receiveTeleporterMessage}. + * + * Receives a Teleporter message. + */ + function _receiveTeleporterMessage( + bytes32 senderBlockchainID, + address senderAddress, + bytes memory message + ) internal override { + // Only allow messages from the source chain. + require( + senderBlockchainID == sourceBlockchainID, + "NativeTokenDestination: invalid source chain" + ); + + // Only allow the partner contract to send messages. + require( + senderAddress == nativeTokenSourceAddress, + "NativeTokenDestination: unauthorized sender" + ); + + (address recipient, uint256 amount) = abi.decode( + message, + (address, uint256) + ); + require( + recipient != address(0), + "NativeTokenDestination: zero recipient address" + ); + require(amount != 0, "NativeTokenDestination: zero transfer value"); + + // If the contract has not yet been collateralized, we will deduct as many tokens + // as needed from the transfer as needed. If there are any excess tokens, they will + // be minted and sent to the recipient. + uint256 adjustedAmount = amount; + if (currentReserveImbalance > 0) { + if (amount > currentReserveImbalance) { + emit CollateralAdded({ + amount: currentReserveImbalance, + remaining: 0 + }); + adjustedAmount = amount - currentReserveImbalance; + currentReserveImbalance = 0; + } else { + currentReserveImbalance -= amount; + emit CollateralAdded({ + amount: amount, + remaining: currentReserveImbalance + }); + return; + } + } + + totalMinted += adjustedAmount; + emit NativeTokensMinted(recipient, adjustedAmount); + // Calls NativeMinter precompile through INativeMinter interface. + _nativeMinter.mintNativeCoin(recipient, adjustedAmount); + } + /** * @dev See {INativeTokenDestination-isCollateralized}. */ diff --git a/contracts/src/CrossChainApplications/NativeTokenBridge/NativeTokenSource.sol b/contracts/src/CrossChainApplications/NativeTokenBridge/NativeTokenSource.sol index 5ae128b9f..cbac57e69 100644 --- a/contracts/src/CrossChainApplications/NativeTokenBridge/NativeTokenSource.sol +++ b/contracts/src/CrossChainApplications/NativeTokenBridge/NativeTokenSource.sol @@ -59,49 +59,6 @@ contract NativeTokenSource is nativeTokenDestinationAddress = nativeTokenDestinationAddress_; } - /** - * @dev See {ITeleporterReceiver-receiveTeleporterMessage}. - * - * Receives a Teleporter message and routes to the appropriate internal function call. - */ - function _receiveTeleporterMessage( - bytes32 senderBlockchainID, - address senderAddress, - bytes memory message - ) internal override { - // Only allow messages from the destination chain. - require( - senderBlockchainID == destinationBlockchainID, - "NativeTokenSource: invalid destination chain" - ); - - // Only allow the partner contract to send messages. - require( - senderAddress == nativeTokenDestinationAddress, - "NativeTokenSource: unauthorized sender" - ); - - // Decode the payload to recover the action and corresponding function parameters - (SourceAction action, bytes memory actionData) = abi.decode( - message, - (SourceAction, bytes) - ); - - // Route to the appropriate function. - if (action == SourceAction.Unlock) { - (address recipient, uint256 amount) = abi.decode( - actionData, - (address, uint256) - ); - _unlockTokens(recipient, amount); - } else if (action == SourceAction.Burn) { - uint256 newBurnTotal = abi.decode(actionData, (uint256)); - _handleBurnTokens(newBurnTotal); - } else { - revert("NativeTokenSource: invalid action"); - } - } - /** * @dev See {INativeTokenSource-transferToDestination}. */ @@ -154,6 +111,49 @@ contract NativeTokenSource is }); } + /** + * @dev See {ITeleporterReceiver-receiveTeleporterMessage}. + * + * Receives a Teleporter message and routes to the appropriate internal function call. + */ + function _receiveTeleporterMessage( + bytes32 senderBlockchainID, + address senderAddress, + bytes memory message + ) internal override { + // Only allow messages from the destination chain. + require( + senderBlockchainID == destinationBlockchainID, + "NativeTokenSource: invalid destination chain" + ); + + // Only allow the partner contract to send messages. + require( + senderAddress == nativeTokenDestinationAddress, + "NativeTokenSource: unauthorized sender" + ); + + // Decode the payload to recover the action and corresponding function parameters + (SourceAction action, bytes memory actionData) = abi.decode( + message, + (SourceAction, bytes) + ); + + // Route to the appropriate function. + if (action == SourceAction.Unlock) { + (address recipient, uint256 amount) = abi.decode( + actionData, + (address, uint256) + ); + _unlockTokens(recipient, amount); + } else if (action == SourceAction.Burn) { + uint256 newBurnTotal = abi.decode(actionData, (uint256)); + _handleBurnTokens(newBurnTotal); + } else { + revert("NativeTokenSource: invalid action"); + } + } + /** * @dev Unlocks tokens to recipient. */ diff --git a/contracts/src/CrossChainApplications/NativeTokenBridge/tests/ERC20TokenSourceTests.t.sol b/contracts/src/CrossChainApplications/NativeTokenBridge/tests/ERC20TokenSourceTests.t.sol index 630074f1b..27ec95fc5 100644 --- a/contracts/src/CrossChainApplications/NativeTokenBridge/tests/ERC20TokenSourceTests.t.sol +++ b/contracts/src/CrossChainApplications/NativeTokenBridge/tests/ERC20TokenSourceTests.t.sol @@ -350,12 +350,6 @@ contract ERC20TokenSourceTest is Test { ); } - function _formatERC20TokenSourceErrorMessage( - string memory errorMessage - ) private pure returns (bytes memory) { - return bytes(string.concat("ERC20TokenSource: ", errorMessage)); - } - function _initMockTeleporterRegistry() internal { vm.mockCall( MOCK_TELEPORTER_REGISTRY_ADDRESS, @@ -393,4 +387,10 @@ contract ERC20TokenSourceTest is Test { abi.encode(ITeleporterMessenger(MOCK_TELEPORTER_MESSENGER_ADDRESS)) ); } + + function _formatERC20TokenSourceErrorMessage( + string memory errorMessage + ) private pure returns (bytes memory) { + return bytes(string.concat("ERC20TokenSource: ", errorMessage)); + } } diff --git a/contracts/src/CrossChainApplications/NativeTokenBridge/tests/NativeTokenDestinationTests.t.sol b/contracts/src/CrossChainApplications/NativeTokenBridge/tests/NativeTokenDestinationTests.t.sol index 0a245cdfd..1cfc78f29 100644 --- a/contracts/src/CrossChainApplications/NativeTokenBridge/tests/NativeTokenDestinationTests.t.sol +++ b/contracts/src/CrossChainApplications/NativeTokenBridge/tests/NativeTokenDestinationTests.t.sol @@ -441,12 +441,6 @@ contract NativeTokenDestinationTest is Test { ); } - function _formatNativeTokenDestinationErrorMessage( - string memory errorMessage - ) private pure returns (bytes memory) { - return bytes(string.concat("NativeTokenDestination: ", errorMessage)); - } - function _initMockTeleporterRegistry() internal { vm.mockCall( MOCK_TELEPORTER_REGISTRY_ADDRESS, @@ -484,4 +478,10 @@ contract NativeTokenDestinationTest is Test { abi.encode(ITeleporterMessenger(MOCK_TELEPORTER_MESSENGER_ADDRESS)) ); } + + function _formatNativeTokenDestinationErrorMessage( + string memory errorMessage + ) private pure returns (bytes memory) { + return bytes(string.concat("NativeTokenDestination: ", errorMessage)); + } } diff --git a/contracts/src/CrossChainApplications/NativeTokenBridge/tests/NativeTokenSourceTests.t.sol b/contracts/src/CrossChainApplications/NativeTokenBridge/tests/NativeTokenSourceTests.t.sol index c98967298..afb3bce78 100644 --- a/contracts/src/CrossChainApplications/NativeTokenBridge/tests/NativeTokenSourceTests.t.sol +++ b/contracts/src/CrossChainApplications/NativeTokenBridge/tests/NativeTokenSourceTests.t.sol @@ -361,22 +361,6 @@ contract NativeTokenSourceTest is Test { ); } - function testInsufficientCollateral() public { - vm.expectRevert( - _formatNativeTokenSourceErrorMessage("insufficient collateral") - ); - - vm.prank(MOCK_TELEPORTER_MESSENGER_ADDRESS); - nativeTokenSource.receiveTeleporterMessage( - _DEFAULT_OTHER_CHAIN_ID, - _DEFAULT_OTHER_BRIDGE_ADDRESS, - abi.encode( - ITokenSource.SourceAction.Unlock, - abi.encode(_DEFAULT_RECIPIENT, _DEFAULT_TRANSFER_AMOUNT) - ) - ); - } - function _formatNativeTokenSourceErrorMessage( string memory errorMessage ) private pure returns (bytes memory) { @@ -420,4 +404,20 @@ contract NativeTokenSourceTest is Test { abi.encode(ITeleporterMessenger(MOCK_TELEPORTER_MESSENGER_ADDRESS)) ); } + + function testInsufficientCollateral() public { + vm.expectRevert( + _formatNativeTokenSourceErrorMessage("insufficient collateral") + ); + + vm.prank(MOCK_TELEPORTER_MESSENGER_ADDRESS); + nativeTokenSource.receiveTeleporterMessage( + _DEFAULT_OTHER_CHAIN_ID, + _DEFAULT_OTHER_BRIDGE_ADDRESS, + abi.encode( + ITokenSource.SourceAction.Unlock, + abi.encode(_DEFAULT_RECIPIENT, _DEFAULT_TRANSFER_AMOUNT) + ) + ); + } } From e34de0f2a8829a09affaae274ae0ed19acafab8e Mon Sep 17 00:00:00 2001 From: Geoff Stuart Date: Wed, 13 Dec 2023 14:42:42 -0500 Subject: [PATCH 05/12] Bindings --- .../NativeTokenBridge/ERC20TokenSource/ERC20TokenSource.go | 2 +- .../NativeTokenDestination/NativeTokenDestination.go | 2 +- .../NativeTokenBridge/NativeTokenSource/NativeTokenSource.go | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/abi-bindings/go/CrossChainApplications/NativeTokenBridge/ERC20TokenSource/ERC20TokenSource.go b/abi-bindings/go/CrossChainApplications/NativeTokenBridge/ERC20TokenSource/ERC20TokenSource.go index 2de592320..91c1b7c04 100644 --- a/abi-bindings/go/CrossChainApplications/NativeTokenBridge/ERC20TokenSource/ERC20TokenSource.go +++ b/abi-bindings/go/CrossChainApplications/NativeTokenBridge/ERC20TokenSource/ERC20TokenSource.go @@ -32,7 +32,7 @@ var ( // ERC20TokenSourceMetaData contains all meta data concerning the ERC20TokenSource contract. var ERC20TokenSourceMetaData = &bind.MetaData{ ABI: "[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"teleporterRegistryAddress\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"destinationBlockchainID_\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"nativeTokenDestinationAddress_\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"erc20ContractAddress_\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"BurnTokens\",\"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\":\"sender\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"teleporterMessageID\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"TransferToDestination\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"UnlockTokens\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"BURNED_TX_FEES_ADDRESS\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"MINT_NATIVE_TOKENS_REQUIRED_GAS\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"destinationBlockchainID\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"destinationBurnedTotal\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"erc20ContractAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getMinTeleporterVersion\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"nativeTokenDestinationAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"originBlockchainID\",\"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\":[],\"name\":\"teleporterRegistry\",\"outputs\":[{\"internalType\":\"contractTeleporterRegistry\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"totalAmount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"feeAmount\",\"type\":\"uint256\"},{\"internalType\":\"address[]\",\"name\":\"allowedRelayerAddresses\",\"type\":\"address[]\"}],\"name\":\"transferToDestination\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"version\",\"type\":\"uint256\"}],\"name\":\"updateMinTeleporterVersion\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", - Bin: "0x6101006040523480156200001257600080fd5b5060405162001c6f38038062001c6f8339810160408190526200003591620003f0565b83806001600160a01b038116620000b95760405162461bcd60e51b815260206004820152603760248201527f54656c65706f727465725570677261646561626c653a207a65726f2074656c6560448201527f706f72746572207265676973747279206164647265737300000000000000000060648201526084015b60405180910390fd5b6001600160a01b03811660808190526040805163301fd1f560e21b8152905163c07f47d4916004808201926020929091908290030181865afa15801562000104573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200012a919062000444565b60005550620001393362000381565b50600160025582620001965760405162461bcd60e51b8152602060048201526030602482015260008051602062001c4f83398151915260448201526f1bdb88189b1bd8dad8da185a5b88125160821b6064820152608401620000b0565b7302000000000000000000000000000000000000056001600160a01b0316634213cf786040518163ffffffff1660e01b8152600401602060405180830381865afa158015620001e9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200020f919062000444565b8303620002855760405162461bcd60e51b815260206004820152603460248201527f4552433230546f6b656e536f757263653a2063616e6e6f74206272696467652060448201527f776974682073616d6520626c6f636b636861696e0000000000000000000000006064820152608401620000b0565b60a08390526001600160a01b038216620002f75760405162461bcd60e51b8152602060048201526033602482015260008051602062001c4f83398151915260448201527f6f6e20636f6e74726163742061646472657373000000000000000000000000006064820152608401620000b0565b6001600160a01b0380831660c05281166200036b5760405162461bcd60e51b815260206004820152602d60248201527f4552433230546f6b656e536f757263653a207a65726f20455243323020636f6e60448201526c7472616374206164647265737360981b6064820152608401620000b0565b6001600160a01b031660e052506200045e915050565b600180546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b80516001600160a01b0381168114620003eb57600080fd5b919050565b600080600080608085870312156200040757600080fd5b6200041285620003d3565b9350602085015192506200042960408601620003d3565b91506200043960608601620003d3565b905092959194509250565b6000602082840312156200045757600080fd5b5051919050565b60805160a05160c05160e051611764620004eb6000396000818161020e0152818161032f015281816103c7015281816104790152818161100501526110d90152600081816101c10152818161043f0152610d13015260008181610138015281816104190152610c9001526000818160f401528181610277015281816105ff01526107a201526117646000f3fe608060405234801561001057600080fd5b50600436106100ea5760003560e01c8063b6171f731161008c578063c868efaa11610066578063c868efaa146101ee578063d2cc7a7014610201578063e486df1514610209578063f2fde38b1461023057600080fd5b8063b6171f73146101b2578063b8c9091a146101bc578063c452165e146101e357600080fd5b80635eb99514116100c85780635eb9951414610171578063715018a61461018657806387a2edba1461018e5780638da5cb5b146101a157600080fd5b80631a7f5bec146100ef57806341d3014d1461013357806355db3e9e14610168575b600080fd5b6101167f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020015b60405180910390f35b61015a7f000000000000000000000000000000000000000000000000000000000000000081565b60405190815260200161012a565b61015a60035481565b61018461017f36600461127c565b610243565b005b610184610257565b61018461019c3660046112aa565b61026b565b6001546001600160a01b0316610116565b61015a620186a081565b6101167f000000000000000000000000000000000000000000000000000000000000000081565b610116600160981b81565b6101846101fc366004611343565b6105e7565b60005461015a565b6101167f000000000000000000000000000000000000000000000000000000000000000081565b61018461023e3660046113cc565b610720565b61024b610796565b6102548161079e565b50565b61025f61093c565b6102696000610996565b565b6102736109e8565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d820e64f6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156102d3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102f791906113f0565b90506001600160a01b0386166103285760405162461bcd60e51b815260040161031f9061140d565b60405180910390fd5b60006103547f000000000000000000000000000000000000000000000000000000000000000087610a3f565b90508481116103bc5760405162461bcd60e51b815260206004820152602e60248201527f4552433230546f6b656e536f757263653a20696e73756666696369656e74206160448201526d191a9d5cdd195908185b5bdd5b9d60921b606482015260840161031f565b84156103ed576103ed7f00000000000000000000000000000000000000000000000000000000000000008387610ba9565b60006103f9868361146b565b90506000836001600160a01b031663624488506040518060c001604052807f000000000000000000000000000000000000000000000000000000000000000081526020017f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316815260200160405180604001604052807f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031681526020018c8152508152602001620186a08152602001898980806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250505090825250604080516001600160a01b038f166020808301919091529181018890529101906060016040516020818303038152906040528152506040518263ffffffff1660e01b815260040161053f9190611512565b6020604051808303816000875af115801561055e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105829190611590565b905080896001600160a01b0316336001600160a01b03167f2b4e8f08417773e367064a6aea9ca2df303a60876676f70b6c3c5e66b314ca5a856040516105ca91815260200190565b60405180910390a4505050506105e06001600255565b5050505050565b60005460405163260f846760e11b81523360048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690634c1f08ce90602401602060405180830381865afa15801561064e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106729190611590565b10156106d95760405162461bcd60e51b815260206004820152603060248201527f54656c65706f727465725570677261646561626c653a20696e76616c6964205460448201526f32b632b837b93a32b91039b2b73232b960811b606482015260840161031f565b61071a848484848080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250610c8e92505050565b50505050565b61072861093c565b6001600160a01b03811661078d5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161031f565b61025481610996565b61026961093c565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663c07f47d46040518163ffffffff1660e01b8152600401602060405180830381865afa1580156107fe573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108229190611590565b600054909150818311156108925760405162461bcd60e51b815260206004820152603160248201527f54656c65706f727465725570677261646561626c653a20696e76616c6964205460448201527032b632b837b93a32b9103b32b939b4b7b760791b606482015260840161031f565b8083116109075760405162461bcd60e51b815260206004820152603f60248201527f54656c65706f727465725570677261646561626c653a206e6f7420677265617460448201527f6572207468616e2063757272656e74206d696e696d756d2076657273696f6e00606482015260840161031f565b6000838155604051849183917fa9a7ef57e41f05b4c15480842f5f0c27edfcbb553fed281f7c4068452cc1c02d9190a3505050565b6001546001600160a01b031633146102695760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161031f565b600180546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6002805403610a395760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015260640161031f565b60028055565b6040516370a0823160e01b815230600482015260009081906001600160a01b038516906370a0823190602401602060405180830381865afa158015610a88573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610aac9190611590565b9050610ac36001600160a01b038516333086610e89565b6040516370a0823160e01b81523060048201526000906001600160a01b038616906370a0823190602401602060405180830381865afa158015610b0a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b2e9190611590565b9050818111610b945760405162461bcd60e51b815260206004820152602c60248201527f5361666545524332305472616e7366657246726f6d3a2062616c616e6365206e60448201526b1bdd081a5b98dc99585cd95960a21b606482015260840161031f565b610b9e828261146b565b925050505b92915050565b604051636eb1769f60e11b81523060048201526001600160a01b038381166024830152600091839186169063dd62ed3e90604401602060405180830381865afa158015610bfa573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c1e9190611590565b610c2891906115a9565b6040516001600160a01b03851660248201526044810182905290915061071a90859063095ea7b360e01b906064015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152610ec1565b7f00000000000000000000000000000000000000000000000000000000000000008314610d115760405162461bcd60e51b815260206004820152602b60248201527f4552433230546f6b656e536f757263653a20696e76616c69642064657374696e60448201526a30ba34b7b71031b430b4b760a91b606482015260840161031f565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316826001600160a01b031614610da05760405162461bcd60e51b815260206004820152602560248201527f4552433230546f6b656e536f757263653a20756e617574686f72697a6564207360448201526432b73232b960d91b606482015260840161031f565b60008082806020019051810190610db791906115d2565b90925090506000826001811115610dd057610dd0611699565b03610e015760008082806020019051810190610dec91906116af565b91509150610dfa8282610f98565b50506105e0565b6001826001811115610e1557610e15611699565b03610e4157600081806020019051810190610e309190611590565b9050610e3b8161102f565b506105e0565b60405162461bcd60e51b815260206004820181905260248201527f4552433230546f6b656e536f757263653a20696e76616c696420616374696f6e604482015260640161031f565b6040516001600160a01b038085166024830152831660448201526064810182905261071a9085906323b872dd60e01b90608401610c57565b6000610f16826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b031661105a9092919063ffffffff16565b805190915015610f935780806020019051810190610f3491906116dd565b610f935760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b606482015260840161031f565b505050565b6001600160a01b038216610fbe5760405162461bcd60e51b815260040161031f9061140d565b604080516001600160a01b0384168152602081018390527f55aaef8fd8c07238c3618a93c8a1627194187d3b0952908e58f2ab0f944fb407910160405180910390a161102b7f00000000000000000000000000000000000000000000000000000000000000008383611071565b5050565b60035481111561025457600060035482611049919061146b565b9050611054816110a1565b50600355565b60606110698484600085611103565b949350505050565b6040516001600160a01b038316602482015260448101829052610f9390849063a9059cbb60e01b90606401610c57565b6040518181527f2cd3fd70cd5a5d6d805e90d22741aa1a84590ace7cf01b244719558d266143829060200160405180910390a16102547f0000000000000000000000000000000000000000000000000000000000000000600160981b83611071565b6060824710156111645760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b606482015260840161031f565b600080866001600160a01b0316858760405161118091906116ff565b60006040518083038185875af1925050503d80600081146111bd576040519150601f19603f3d011682016040523d82523d6000602084013e6111c2565b606091505b50915091506111d3878383876111de565b979650505050505050565b6060831561124d578251600003611246576001600160a01b0385163b6112465760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015260640161031f565b5081611069565b61106983838151156112625781518083602001fd5b8060405162461bcd60e51b815260040161031f919061171b565b60006020828403121561128e57600080fd5b5035919050565b6001600160a01b038116811461025457600080fd5b6000806000806000608086880312156112c257600080fd5b85356112cd81611295565b94506020860135935060408601359250606086013567ffffffffffffffff808211156112f857600080fd5b818801915088601f83011261130c57600080fd5b81358181111561131b57600080fd5b8960208260051b850101111561133057600080fd5b9699959850939650602001949392505050565b6000806000806060858703121561135957600080fd5b84359350602085013561136b81611295565b9250604085013567ffffffffffffffff8082111561138857600080fd5b818701915087601f83011261139c57600080fd5b8135818111156113ab57600080fd5b8860208285010111156113bd57600080fd5b95989497505060200194505050565b6000602082840312156113de57600080fd5b81356113e981611295565b9392505050565b60006020828403121561140257600080fd5b81516113e981611295565b60208082526028908201527f4552433230546f6b656e536f757263653a207a65726f20726563697069656e74604082015267206164647265737360c01b606082015260800190565b634e487b7160e01b600052601160045260246000fd5b81810381811115610ba357610ba3611455565b600081518084526020808501945080840160005b838110156114b75781516001600160a01b031687529582019590820190600101611492565b509495945050505050565b60005b838110156114dd5781810151838201526020016114c5565b50506000910152565b600081518084526114fe8160208601602086016114c2565b601f01601f19169290920160200192915050565b60208152815160208201526000602083015160018060a01b03808216604085015260408501519150808251166060850152506020810151608084015250606083015160a0830152608083015160e060c084015261157361010084018261147e565b905060a0840151601f198483030160e0850152610b9e82826114e6565b6000602082840312156115a257600080fd5b5051919050565b80820180821115610ba357610ba3611455565b634e487b7160e01b600052604160045260246000fd5b600080604083850312156115e557600080fd5b8251600281106115f457600080fd5b602084015190925067ffffffffffffffff8082111561161257600080fd5b818501915085601f83011261162657600080fd5b815181811115611638576116386115bc565b604051601f8201601f19908116603f01168101908382118183101715611660576116606115bc565b8160405282815288602084870101111561167957600080fd5b61168a8360208301602088016114c2565b80955050505050509250929050565b634e487b7160e01b600052602160045260246000fd5b600080604083850312156116c257600080fd5b82516116cd81611295565b6020939093015192949293505050565b6000602082840312156116ef57600080fd5b815180151581146113e957600080fd5b600082516117118184602087016114c2565b9190910192915050565b6020815260006113e960208301846114e656fea2646970667358221220d7d02f99d536a41e27b5caea9de0917bbe42efa0de817e4197c4f53418c10e2664736f6c634300081200334552433230546f6b656e536f757263653a207a65726f2064657374696e617469", + Bin: "0x6101006040523480156200001257600080fd5b5060405162001c6f38038062001c6f8339810160408190526200003591620003f0565b83806001600160a01b038116620000b95760405162461bcd60e51b815260206004820152603760248201527f54656c65706f727465725570677261646561626c653a207a65726f2074656c6560448201527f706f72746572207265676973747279206164647265737300000000000000000060648201526084015b60405180910390fd5b6001600160a01b03811660808190526040805163301fd1f560e21b8152905163c07f47d4916004808201926020929091908290030181865afa15801562000104573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200012a919062000444565b60005550620001393362000381565b50600160025582620001965760405162461bcd60e51b8152602060048201526030602482015260008051602062001c4f83398151915260448201526f1bdb88189b1bd8dad8da185a5b88125160821b6064820152608401620000b0565b7302000000000000000000000000000000000000056001600160a01b0316634213cf786040518163ffffffff1660e01b8152600401602060405180830381865afa158015620001e9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200020f919062000444565b8303620002855760405162461bcd60e51b815260206004820152603460248201527f4552433230546f6b656e536f757263653a2063616e6e6f74206272696467652060448201527f776974682073616d6520626c6f636b636861696e0000000000000000000000006064820152608401620000b0565b60a08390526001600160a01b038216620002f75760405162461bcd60e51b8152602060048201526033602482015260008051602062001c4f83398151915260448201527f6f6e20636f6e74726163742061646472657373000000000000000000000000006064820152608401620000b0565b6001600160a01b0380831660c05281166200036b5760405162461bcd60e51b815260206004820152602d60248201527f4552433230546f6b656e536f757263653a207a65726f20455243323020636f6e60448201526c7472616374206164647265737360981b6064820152608401620000b0565b6001600160a01b031660e052506200045e915050565b600180546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b80516001600160a01b0381168114620003eb57600080fd5b919050565b600080600080608085870312156200040757600080fd5b6200041285620003d3565b9350602085015192506200042960408601620003d3565b91506200043960608601620003d3565b905092959194509250565b6000602082840312156200045757600080fd5b5051919050565b60805160a05160c05160e051611764620004eb6000396000818161020e0152818161032f015281816103c7015281816104790152818161100501526110d90152600081816101c10152818161043f0152610d13015260008181610138015281816104190152610c9001526000818160f401528181610277015281816105ff01526107a201526117646000f3fe608060405234801561001057600080fd5b50600436106100ea5760003560e01c8063b6171f731161008c578063c868efaa11610066578063c868efaa146101ee578063d2cc7a7014610201578063e486df1514610209578063f2fde38b1461023057600080fd5b8063b6171f73146101b2578063b8c9091a146101bc578063c452165e146101e357600080fd5b80635eb99514116100c85780635eb9951414610171578063715018a61461018657806387a2edba1461018e5780638da5cb5b146101a157600080fd5b80631a7f5bec146100ef57806341d3014d1461013357806355db3e9e14610168575b600080fd5b6101167f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020015b60405180910390f35b61015a7f000000000000000000000000000000000000000000000000000000000000000081565b60405190815260200161012a565b61015a60035481565b61018461017f36600461127c565b610243565b005b610184610257565b61018461019c3660046112aa565b61026b565b6001546001600160a01b0316610116565b61015a620186a081565b6101167f000000000000000000000000000000000000000000000000000000000000000081565b610116600160981b81565b6101846101fc366004611343565b6105e7565b60005461015a565b6101167f000000000000000000000000000000000000000000000000000000000000000081565b61018461023e3660046113cc565b610720565b61024b610796565b6102548161079e565b50565b61025f61093c565b6102696000610996565b565b6102736109e8565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d820e64f6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156102d3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102f791906113f0565b90506001600160a01b0386166103285760405162461bcd60e51b815260040161031f9061140d565b60405180910390fd5b60006103547f000000000000000000000000000000000000000000000000000000000000000087610a3f565b90508481116103bc5760405162461bcd60e51b815260206004820152602e60248201527f4552433230546f6b656e536f757263653a20696e73756666696369656e74206160448201526d191a9d5cdd195908185b5bdd5b9d60921b606482015260840161031f565b84156103ed576103ed7f00000000000000000000000000000000000000000000000000000000000000008387610ba9565b60006103f9868361146b565b90506000836001600160a01b031663624488506040518060c001604052807f000000000000000000000000000000000000000000000000000000000000000081526020017f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316815260200160405180604001604052807f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031681526020018c8152508152602001620186a08152602001898980806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250505090825250604080516001600160a01b038f166020808301919091529181018890529101906060016040516020818303038152906040528152506040518263ffffffff1660e01b815260040161053f9190611512565b6020604051808303816000875af115801561055e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105829190611590565b905080896001600160a01b0316336001600160a01b03167f2b4e8f08417773e367064a6aea9ca2df303a60876676f70b6c3c5e66b314ca5a856040516105ca91815260200190565b60405180910390a4505050506105e06001600255565b5050505050565b60005460405163260f846760e11b81523360048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690634c1f08ce90602401602060405180830381865afa15801561064e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106729190611590565b10156106d95760405162461bcd60e51b815260206004820152603060248201527f54656c65706f727465725570677261646561626c653a20696e76616c6964205460448201526f32b632b837b93a32b91039b2b73232b960811b606482015260840161031f565b61071a848484848080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250610c8e92505050565b50505050565b61072861093c565b6001600160a01b03811661078d5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161031f565b61025481610996565b61026961093c565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663c07f47d46040518163ffffffff1660e01b8152600401602060405180830381865afa1580156107fe573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108229190611590565b600054909150818311156108925760405162461bcd60e51b815260206004820152603160248201527f54656c65706f727465725570677261646561626c653a20696e76616c6964205460448201527032b632b837b93a32b9103b32b939b4b7b760791b606482015260840161031f565b8083116109075760405162461bcd60e51b815260206004820152603f60248201527f54656c65706f727465725570677261646561626c653a206e6f7420677265617460448201527f6572207468616e2063757272656e74206d696e696d756d2076657273696f6e00606482015260840161031f565b6000838155604051849183917fa9a7ef57e41f05b4c15480842f5f0c27edfcbb553fed281f7c4068452cc1c02d9190a3505050565b6001546001600160a01b031633146102695760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161031f565b600180546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6002805403610a395760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015260640161031f565b60028055565b6040516370a0823160e01b815230600482015260009081906001600160a01b038516906370a0823190602401602060405180830381865afa158015610a88573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610aac9190611590565b9050610ac36001600160a01b038516333086610e89565b6040516370a0823160e01b81523060048201526000906001600160a01b038616906370a0823190602401602060405180830381865afa158015610b0a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b2e9190611590565b9050818111610b945760405162461bcd60e51b815260206004820152602c60248201527f5361666545524332305472616e7366657246726f6d3a2062616c616e6365206e60448201526b1bdd081a5b98dc99585cd95960a21b606482015260840161031f565b610b9e828261146b565b925050505b92915050565b604051636eb1769f60e11b81523060048201526001600160a01b038381166024830152600091839186169063dd62ed3e90604401602060405180830381865afa158015610bfa573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c1e9190611590565b610c2891906115a9565b6040516001600160a01b03851660248201526044810182905290915061071a90859063095ea7b360e01b906064015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152610ec1565b7f00000000000000000000000000000000000000000000000000000000000000008314610d115760405162461bcd60e51b815260206004820152602b60248201527f4552433230546f6b656e536f757263653a20696e76616c69642064657374696e60448201526a30ba34b7b71031b430b4b760a91b606482015260840161031f565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316826001600160a01b031614610da05760405162461bcd60e51b815260206004820152602560248201527f4552433230546f6b656e536f757263653a20756e617574686f72697a6564207360448201526432b73232b960d91b606482015260840161031f565b60008082806020019051810190610db791906115d2565b90925090506000826001811115610dd057610dd0611699565b03610e015760008082806020019051810190610dec91906116af565b91509150610dfa8282610f98565b50506105e0565b6001826001811115610e1557610e15611699565b03610e4157600081806020019051810190610e309190611590565b9050610e3b8161102f565b506105e0565b60405162461bcd60e51b815260206004820181905260248201527f4552433230546f6b656e536f757263653a20696e76616c696420616374696f6e604482015260640161031f565b6040516001600160a01b038085166024830152831660448201526064810182905261071a9085906323b872dd60e01b90608401610c57565b6000610f16826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b031661105a9092919063ffffffff16565b805190915015610f935780806020019051810190610f3491906116dd565b610f935760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b606482015260840161031f565b505050565b6001600160a01b038216610fbe5760405162461bcd60e51b815260040161031f9061140d565b604080516001600160a01b0384168152602081018390527f55aaef8fd8c07238c3618a93c8a1627194187d3b0952908e58f2ab0f944fb407910160405180910390a161102b7f00000000000000000000000000000000000000000000000000000000000000008383611071565b5050565b60035481111561025457600060035482611049919061146b565b9050611054816110a1565b50600355565b60606110698484600085611103565b949350505050565b6040516001600160a01b038316602482015260448101829052610f9390849063a9059cbb60e01b90606401610c57565b6040518181527f2cd3fd70cd5a5d6d805e90d22741aa1a84590ace7cf01b244719558d266143829060200160405180910390a16102547f0000000000000000000000000000000000000000000000000000000000000000600160981b83611071565b6060824710156111645760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b606482015260840161031f565b600080866001600160a01b0316858760405161118091906116ff565b60006040518083038185875af1925050503d80600081146111bd576040519150601f19603f3d011682016040523d82523d6000602084013e6111c2565b606091505b50915091506111d3878383876111de565b979650505050505050565b6060831561124d578251600003611246576001600160a01b0385163b6112465760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015260640161031f565b5081611069565b61106983838151156112625781518083602001fd5b8060405162461bcd60e51b815260040161031f919061171b565b60006020828403121561128e57600080fd5b5035919050565b6001600160a01b038116811461025457600080fd5b6000806000806000608086880312156112c257600080fd5b85356112cd81611295565b94506020860135935060408601359250606086013567ffffffffffffffff808211156112f857600080fd5b818801915088601f83011261130c57600080fd5b81358181111561131b57600080fd5b8960208260051b850101111561133057600080fd5b9699959850939650602001949392505050565b6000806000806060858703121561135957600080fd5b84359350602085013561136b81611295565b9250604085013567ffffffffffffffff8082111561138857600080fd5b818701915087601f83011261139c57600080fd5b8135818111156113ab57600080fd5b8860208285010111156113bd57600080fd5b95989497505060200194505050565b6000602082840312156113de57600080fd5b81356113e981611295565b9392505050565b60006020828403121561140257600080fd5b81516113e981611295565b60208082526028908201527f4552433230546f6b656e536f757263653a207a65726f20726563697069656e74604082015267206164647265737360c01b606082015260800190565b634e487b7160e01b600052601160045260246000fd5b81810381811115610ba357610ba3611455565b600081518084526020808501945080840160005b838110156114b75781516001600160a01b031687529582019590820190600101611492565b509495945050505050565b60005b838110156114dd5781810151838201526020016114c5565b50506000910152565b600081518084526114fe8160208601602086016114c2565b601f01601f19169290920160200192915050565b60208152815160208201526000602083015160018060a01b03808216604085015260408501519150808251166060850152506020810151608084015250606083015160a0830152608083015160e060c084015261157361010084018261147e565b905060a0840151601f198483030160e0850152610b9e82826114e6565b6000602082840312156115a257600080fd5b5051919050565b80820180821115610ba357610ba3611455565b634e487b7160e01b600052604160045260246000fd5b600080604083850312156115e557600080fd5b8251600281106115f457600080fd5b602084015190925067ffffffffffffffff8082111561161257600080fd5b818501915085601f83011261162657600080fd5b815181811115611638576116386115bc565b604051601f8201601f19908116603f01168101908382118183101715611660576116606115bc565b8160405282815288602084870101111561167957600080fd5b61168a8360208301602088016114c2565b80955050505050509250929050565b634e487b7160e01b600052602160045260246000fd5b600080604083850312156116c257600080fd5b82516116cd81611295565b6020939093015192949293505050565b6000602082840312156116ef57600080fd5b815180151581146113e957600080fd5b600082516117118184602087016114c2565b9190910192915050565b6020815260006113e960208301846114e656fea26469706673582212202b477debc413e4df6b88956d9daee867841d0e80d4658bf39da44b529b21686964736f6c634300081200334552433230546f6b656e536f757263653a207a65726f2064657374696e617469", } // ERC20TokenSourceABI is the input ABI used to generate the binding from. diff --git a/abi-bindings/go/CrossChainApplications/NativeTokenBridge/NativeTokenDestination/NativeTokenDestination.go b/abi-bindings/go/CrossChainApplications/NativeTokenBridge/NativeTokenDestination/NativeTokenDestination.go index 4e33d50f3..4debaea2f 100644 --- a/abi-bindings/go/CrossChainApplications/NativeTokenBridge/NativeTokenDestination/NativeTokenDestination.go +++ b/abi-bindings/go/CrossChainApplications/NativeTokenBridge/NativeTokenDestination/NativeTokenDestination.go @@ -38,7 +38,7 @@ type TeleporterFeeInfo struct { // NativeTokenDestinationMetaData contains all meta data concerning the NativeTokenDestination contract. var NativeTokenDestinationMetaData = &bind.MetaData{ ABI: "[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"teleporterRegistryAddress\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"sourceBlockchainID_\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"nativeTokenSourceAddress_\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"initialReserveImbalance_\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"remaining\",\"type\":\"uint256\"}],\"name\":\"CollateralAdded\",\"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\":\"recipient\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"NativeTokensMinted\",\"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\":\"uint256\",\"name\":\"teleporterMessageID\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"burnAddressBalance\",\"type\":\"uint256\"}],\"name\":\"ReportTotalBurnedTxFees\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"teleporterMessageID\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"TransferToSource\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"BURNED_TX_FEES_ADDRESS\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"BURN_FOR_TRANSFER_ADDRESS\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"REPORT_BURNED_TOKENS_REQUIRED_GAS\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"TRANSFER_NATIVE_TOKENS_REQUIRED_GAS\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"currentReserveImbalance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getMinTeleporterVersion\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"initialReserveImbalance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"isCollateralized\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"nativeTokenSourceAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"originBlockchainID\",\"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\":\"address\",\"name\":\"feeTokenAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"internalType\":\"structTeleporterFeeInfo\",\"name\":\"feeInfo\",\"type\":\"tuple\"},{\"internalType\":\"address[]\",\"name\":\"allowedRelayerAddresses\",\"type\":\"address[]\"}],\"name\":\"reportTotalBurnedTxFees\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sourceBlockchainID\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"teleporterRegistry\",\"outputs\":[{\"internalType\":\"contractTeleporterRegistry\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalMinted\",\"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\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"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\":\"transferToSource\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"version\",\"type\":\"uint256\"}],\"name\":\"updateMinTeleporterVersion\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", - Bin: "0x61012060405273020000000000000000000000000000000000000160a0523480156200002a57600080fd5b50604051620021ce380380620021ce8339810160408190526200004d9162000418565b83806001600160a01b038116620000d15760405162461bcd60e51b815260206004820152603760248201527f54656c65706f727465725570677261646561626c653a207a65726f2074656c6560448201527f706f72746572207265676973747279206164647265737300000000000000000060648201526084015b60405180910390fd5b6001600160a01b03811660808190526040805163301fd1f560e21b8152905163c07f47d4916004808201926020929091908290030181865afa1580156200011c573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000142919062000461565b600055506200015133620003a9565b50600160025582620001af5760405162461bcd60e51b81526020600482015260316024820152600080516020620021ae8339815191526044820152701c98d948189b1bd8dad8da185a5b881251607a1b6064820152608401620000c8565b7302000000000000000000000000000000000000056001600160a01b0316634213cf786040518163ffffffff1660e01b8152600401602060405180830381865afa15801562000202573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000228919062000461565b83036200029e5760405162461bcd60e51b815260206004820152603a60248201527f4e6174697665546f6b656e44657374696e6174696f6e3a2063616e6e6f74206260448201527f726964676520776974682073616d6520626c6f636b636861696e0000000000006064820152608401620000c8565b60c08390526001600160a01b038216620003105760405162461bcd60e51b81526020600482015260346024820152600080516020620021ae83398151915260448201527f72636520636f6e747261637420616464726573730000000000000000000000006064820152608401620000c8565b6001600160a01b03821660e0526000819003620003965760405162461bcd60e51b815260206004820152603660248201527f4e6174697665546f6b656e44657374696e6174696f6e3a207a65726f20696e6960448201527f7469616c207265736572766520696d62616c616e6365000000000000000000006064820152608401620000c8565b610100819052600355506200047b915050565b600180546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b80516001600160a01b03811681146200041357600080fd5b919050565b600080600080608085870312156200042f57600080fd5b6200043a85620003fb565b9350602085015192506200045160408601620003fb565b6060959095015193969295505050565b6000602082840312156200047457600080fd5b5051919050565b60805160a05160c05160e05161010051611ca16200050d600039600081816102b001526103c5015260008181610234015281816104e10152818161082c015261120f0152600081816101bf015281816104bb01528181610806015261118b01526000611488015260008181610173015281816104080152818161067a015281816109e20152610b7f0152611ca16000f3fe60806040526004361061011e5760003560e01c80638ac7dd20116100a0578063c452165e11610064578063c452165e14610338578063c868efaa14610350578063d2cc7a7014610370578063d309512614610321578063f2fde38b1461038557600080fd5b80638ac7dd201461029e5780638da5cb5b146102d2578063a2309ff8146102f0578063a2a9501714610306578063ab2852301461032157600080fd5b806349e3284e116100e757806349e3284e146102035780635d93f9af146102225780635eb9951414610256578063715018a614610276578063758465621461028b57600080fd5b8062d872ae1461012357806318160ddd1461014c5780631a7f5bec1461016157806329b7b3fd146101ad5780633a94fe51146101e1575b600080fd5b34801561012f57600080fd5b5061013960035481565b6040519081526020015b60405180910390f35b34801561015857600080fd5b506101396103a5565b34801561016d57600080fd5b506101957f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b039091168152602001610143565b3480156101b957600080fd5b506101397f000000000000000000000000000000000000000000000000000000000000000081565b3480156101ed57600080fd5b506102016101fc3660046117ea565b610404565b005b34801561020f57600080fd5b5060035460405190158152602001610143565b34801561022e57600080fd5b506101957f000000000000000000000000000000000000000000000000000000000000000081565b34801561026257600080fd5b5061020161027136600461183e565b610646565b34801561028257600080fd5b5061020161065a565b61020161029936600461186c565b61066e565b3480156102aa57600080fd5b506101397f000000000000000000000000000000000000000000000000000000000000000081565b3480156102de57600080fd5b506001546001600160a01b0316610195565b3480156102fc57600080fd5b5061013960045481565b34801561031257600080fd5b506101956001600160981b0181565b34801561032d57600080fd5b50610139620186a081565b34801561034457600080fd5b50610195600160981b81565b34801561035c57600080fd5b5061020161036b3660046118d0565b6109ca565b34801561037c57600080fd5b50600054610139565b34801561039157600080fd5b506102016103a0366004611959565b610afd565b6000806103bf6001600160981b0131600160981b31611993565b905060007f00000000000000000000000000000000000000000000000000000000000000006004546103f19190611993565b90506103fd82826119a6565b9250505090565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d820e64f6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610464573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061048891906119b9565b90506000600160981b6001600160a01b03163190506000826001600160a01b031663624488506040518060c001604052807f000000000000000000000000000000000000000000000000000000000000000081526020017f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031681526020018980360381019061051f91906119d6565b8152602001620186a081526020018888808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152505050908252506040805160208082018990528251808303820181528284019093529092019161059191600191606001611a8c565b6040516020818303038152906040528152506040518263ffffffff1660e01b81526004016105bf9190611b07565b6020604051808303816000875af11580156105de573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106029190611b85565b9050807f2550fa6041684d40e635e29e93dde9017d70c25b46aa88393317b5182ed6ae7c8360405161063691815260200190565b60405180910390a2505050505050565b61064e610b73565b61065781610b7b565b50565b610662610d19565b61066c6000610d73565b565b610676610dc5565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d820e64f6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156106d6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106fa91906119b9565b90506001600160a01b03851661072b5760405162461bcd60e51b815260040161072290611b9e565b60405180910390fd5b600354156107985760405162461bcd60e51b815260206004820152603460248201527f4e6174697665546f6b656e44657374696e6174696f6e3a20636f6e7472616374604482015273081d5b99195c98dbdb1b185d195c985b1a5e995960621b6064820152608401610722565b60006020850135156107d7576107be6107b46020870187611959565b8660200135610e1c565b90506107d76107d06020870187611959565b8383610f86565b6107e86001600160981b013461106b565b6000826001600160a01b031663624488506040518060c001604052807f000000000000000000000000000000000000000000000000000000000000000081526020017f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031681526020018980360381019061086a91906119d6565b8152602001620186a08152602001888880806020026020016040519081016040528093929190818152602001838360200280828437600092018290525093855250506040516020938401936108d892508e913491016001600160a01b03929092168252602082015260400190565b60408051601f19818403018152908290526108f69291602001611a8c565b6040516020818303038152906040528152506040518263ffffffff1660e01b81526004016109249190611b07565b6020604051808303816000875af1158015610943573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109679190611b85565b905080876001600160a01b0316336001600160a01b03167f0322cbb1d3c23f6dbf1deddb3b4ef3ce0f93ae6eec7b44e4f395804104466d14346040516109af91815260200190565b60405180910390a45050506109c46001600255565b50505050565b60005460405163260f846760e11b81523360048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690634c1f08ce90602401602060405180830381865afa158015610a31573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a559190611b85565b1015610abc5760405162461bcd60e51b815260206004820152603060248201527f54656c65706f727465725570677261646561626c653a20696e76616c6964205460448201526f32b632b837b93a32b91039b2b73232b960811b6064820152608401610722565b6109c4848484848080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061118992505050565b610b05610d19565b6001600160a01b038116610b6a5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610722565b61065781610d73565b61066c610d19565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663c07f47d46040518163ffffffff1660e01b8152600401602060405180830381865afa158015610bdb573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610bff9190611b85565b60005490915081831115610c6f5760405162461bcd60e51b815260206004820152603160248201527f54656c65706f727465725570677261646561626c653a20696e76616c6964205460448201527032b632b837b93a32b9103b32b939b4b7b760791b6064820152608401610722565b808311610ce45760405162461bcd60e51b815260206004820152603f60248201527f54656c65706f727465725570677261646561626c653a206e6f7420677265617460448201527f6572207468616e2063757272656e74206d696e696d756d2076657273696f6e006064820152608401610722565b6000838155604051849183917fa9a7ef57e41f05b4c15480842f5f0c27edfcbb553fed281f7c4068452cc1c02d9190a3505050565b6001546001600160a01b0316331461066c5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610722565b600180546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6002805403610e165760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610722565b60028055565b6040516370a0823160e01b815230600482015260009081906001600160a01b038516906370a0823190602401602060405180830381865afa158015610e65573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e899190611b85565b9050610ea06001600160a01b0385163330866114ec565b6040516370a0823160e01b81523060048201526000906001600160a01b038616906370a0823190602401602060405180830381865afa158015610ee7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f0b9190611b85565b9050818111610f715760405162461bcd60e51b815260206004820152602c60248201527f5361666545524332305472616e7366657246726f6d3a2062616c616e6365206e60448201526b1bdd081a5b98dc99585cd95960a21b6064820152608401610722565b610f7b82826119a6565b925050505b92915050565b604051636eb1769f60e11b81523060048201526001600160a01b038381166024830152600091839186169063dd62ed3e90604401602060405180830381865afa158015610fd7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ffb9190611b85565b6110059190611993565b6040516001600160a01b0385166024820152604481018290529091506109c490859063095ea7b360e01b906064015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152611524565b804710156110bb5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e63650000006044820152606401610722565b6000826001600160a01b03168260405160006040518083038185875af1925050503d8060008114611108576040519150601f19603f3d011682016040523d82523d6000602084013e61110d565b606091505b50509050806111845760405162461bcd60e51b815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d617920686176652072657665727465640000000000006064820152608401610722565b505050565b7f0000000000000000000000000000000000000000000000000000000000000000831461120d5760405162461bcd60e51b815260206004820152602c60248201527f4e6174697665546f6b656e44657374696e6174696f6e3a20696e76616c69642060448201526b39b7bab931b29031b430b4b760a11b6064820152608401610722565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316826001600160a01b0316146112a25760405162461bcd60e51b815260206004820152602b60248201527f4e6174697665546f6b656e44657374696e6174696f6e3a20756e617574686f7260448201526a34bd32b21039b2b73232b960a91b6064820152608401610722565b600080828060200190518101906112b99190611bec565b90925090506001600160a01b0382166112e45760405162461bcd60e51b815260040161072290611b9e565b806000036113485760405162461bcd60e51b815260206004820152602b60248201527f4e6174697665546f6b656e44657374696e6174696f6e3a207a65726f2074726160448201526a6e736665722076616c756560a81b6064820152608401610722565b60035481901561140d576003548211156113b15760035460408051918252600060208301527f244160b15e69cc411f041d94ae7fab6f6bba85dade8403216c05ff4b920d5449910160405180910390a16003546113a590836119a6565b6000600355905061140d565b81600360008282546113c391906119a6565b90915550506003546040805184815260208101929092527f244160b15e69cc411f041d94ae7fab6f6bba85dade8403216c05ff4b920d5449910160405180910390a1505050505050565b806004600082825461141f9190611993565b90915550506040518181526001600160a01b038416907fd949ea0e9d5db53492d77f28fd5467fb2f6c4f5b88e3350e3c36729b76e99cf29060200160405180910390a26040516327ad555d60e11b81526001600160a01b038481166004830152602482018390527f00000000000000000000000000000000000000000000000000000000000000001690634f5aaaba90604401600060405180830381600087803b1580156114cc57600080fd5b505af11580156114e0573d6000803e3d6000fd5b50505050505050505050565b6040516001600160a01b03808516602483015283166044820152606481018290526109c49085906323b872dd60e01b90608401611034565b6000611579826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166115f69092919063ffffffff16565b80519091501561118457808060200190518101906115979190611c1a565b6111845760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610722565b6060611605848460008561160d565b949350505050565b60608247101561166e5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b6064820152608401610722565b600080866001600160a01b0316858760405161168a9190611c3c565b60006040518083038185875af1925050503d80600081146116c7576040519150601f19603f3d011682016040523d82523d6000602084013e6116cc565b606091505b50915091506116dd878383876116e8565b979650505050505050565b60608315611757578251600003611750576001600160a01b0385163b6117505760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610722565b5081611605565b611605838381511561176c5781518083602001fd5b8060405162461bcd60e51b81526004016107229190611c58565b60006040828403121561179857600080fd5b50919050565b60008083601f8401126117b057600080fd5b50813567ffffffffffffffff8111156117c857600080fd5b6020830191508360208260051b85010111156117e357600080fd5b9250929050565b6000806000606084860312156117ff57600080fd5b6118098585611786565b9250604084013567ffffffffffffffff81111561182557600080fd5b6118318682870161179e565b9497909650939450505050565b60006020828403121561185057600080fd5b5035919050565b6001600160a01b038116811461065757600080fd5b6000806000806080858703121561188257600080fd5b843561188d81611857565b935061189c8660208701611786565b9250606085013567ffffffffffffffff8111156118b857600080fd5b6118c48782880161179e565b95989497509550505050565b600080600080606085870312156118e657600080fd5b8435935060208501356118f881611857565b9250604085013567ffffffffffffffff8082111561191557600080fd5b818701915087601f83011261192957600080fd5b81358181111561193857600080fd5b88602082850101111561194a57600080fd5b95989497505060200194505050565b60006020828403121561196b57600080fd5b813561197681611857565b9392505050565b634e487b7160e01b600052601160045260246000fd5b80820180821115610f8057610f8061197d565b81810381811115610f8057610f8061197d565b6000602082840312156119cb57600080fd5b815161197681611857565b6000604082840312156119e857600080fd5b6040516040810181811067ffffffffffffffff82111715611a1957634e487b7160e01b600052604160045260246000fd5b6040528235611a2781611857565b81526020928301359281019290925250919050565b60005b83811015611a57578181015183820152602001611a3f565b50506000910152565b60008151808452611a78816020860160208601611a3c565b601f01601f19169290920160200192915050565b600060028410611aac57634e487b7160e01b600052602160045260246000fd5b838252604060208301526116056040830184611a60565b600081518084526020808501945080840160005b83811015611afc5781516001600160a01b031687529582019590820190600101611ad7565b509495945050505050565b60208152815160208201526000602083015160018060a01b03808216604085015260408501519150808251166060850152506020810151608084015250606083015160a0830152608083015160e060c0840152611b68610100840182611ac3565b905060a0840151601f198483030160e0850152610f7b8282611a60565b600060208284031215611b9757600080fd5b5051919050565b6020808252602e908201527f4e6174697665546f6b656e44657374696e6174696f6e3a207a65726f2072656360408201526d697069656e74206164647265737360901b606082015260800190565b60008060408385031215611bff57600080fd5b8251611c0a81611857565b6020939093015192949293505050565b600060208284031215611c2c57600080fd5b8151801515811461197657600080fd5b60008251611c4e818460208701611a3c565b9190910192915050565b6020815260006119766020830184611a6056fea2646970667358221220b34091d933be188bf6b9667db585a8317ab395aedc3581a0af8d490671a3411a64736f6c634300081200334e6174697665546f6b656e44657374696e6174696f6e3a207a65726f20736f75", + Bin: "0x61012060405273020000000000000000000000000000000000000160a0523480156200002a57600080fd5b50604051620021ce380380620021ce8339810160408190526200004d9162000418565b83806001600160a01b038116620000d15760405162461bcd60e51b815260206004820152603760248201527f54656c65706f727465725570677261646561626c653a207a65726f2074656c6560448201527f706f72746572207265676973747279206164647265737300000000000000000060648201526084015b60405180910390fd5b6001600160a01b03811660808190526040805163301fd1f560e21b8152905163c07f47d4916004808201926020929091908290030181865afa1580156200011c573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000142919062000461565b600055506200015133620003a9565b50600160025582620001af5760405162461bcd60e51b81526020600482015260316024820152600080516020620021ae8339815191526044820152701c98d948189b1bd8dad8da185a5b881251607a1b6064820152608401620000c8565b7302000000000000000000000000000000000000056001600160a01b0316634213cf786040518163ffffffff1660e01b8152600401602060405180830381865afa15801562000202573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000228919062000461565b83036200029e5760405162461bcd60e51b815260206004820152603a60248201527f4e6174697665546f6b656e44657374696e6174696f6e3a2063616e6e6f74206260448201527f726964676520776974682073616d6520626c6f636b636861696e0000000000006064820152608401620000c8565b60c08390526001600160a01b038216620003105760405162461bcd60e51b81526020600482015260346024820152600080516020620021ae83398151915260448201527f72636520636f6e747261637420616464726573730000000000000000000000006064820152608401620000c8565b6001600160a01b03821660e0526000819003620003965760405162461bcd60e51b815260206004820152603660248201527f4e6174697665546f6b656e44657374696e6174696f6e3a207a65726f20696e6960448201527f7469616c207265736572766520696d62616c616e6365000000000000000000006064820152608401620000c8565b610100819052600355506200047b915050565b600180546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b80516001600160a01b03811681146200041357600080fd5b919050565b600080600080608085870312156200042f57600080fd5b6200043a85620003fb565b9350602085015192506200045160408601620003fb565b6060959095015193969295505050565b6000602082840312156200047457600080fd5b5051919050565b60805160a05160c05160e05161010051611ca16200050d600039600081816102b001526103c5015260008181610234015281816104e10152818161082c015261120f0152600081816101bf015281816104bb01528181610806015261118b01526000611488015260008181610173015281816104080152818161067a015281816109e20152610b7f0152611ca16000f3fe60806040526004361061011e5760003560e01c80638ac7dd20116100a0578063c452165e11610064578063c452165e14610338578063c868efaa14610350578063d2cc7a7014610370578063d309512614610321578063f2fde38b1461038557600080fd5b80638ac7dd201461029e5780638da5cb5b146102d2578063a2309ff8146102f0578063a2a9501714610306578063ab2852301461032157600080fd5b806349e3284e116100e757806349e3284e146102035780635d93f9af146102225780635eb9951414610256578063715018a614610276578063758465621461028b57600080fd5b8062d872ae1461012357806318160ddd1461014c5780631a7f5bec1461016157806329b7b3fd146101ad5780633a94fe51146101e1575b600080fd5b34801561012f57600080fd5b5061013960035481565b6040519081526020015b60405180910390f35b34801561015857600080fd5b506101396103a5565b34801561016d57600080fd5b506101957f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b039091168152602001610143565b3480156101b957600080fd5b506101397f000000000000000000000000000000000000000000000000000000000000000081565b3480156101ed57600080fd5b506102016101fc3660046117ea565b610404565b005b34801561020f57600080fd5b5060035460405190158152602001610143565b34801561022e57600080fd5b506101957f000000000000000000000000000000000000000000000000000000000000000081565b34801561026257600080fd5b5061020161027136600461183e565b610646565b34801561028257600080fd5b5061020161065a565b61020161029936600461186c565b61066e565b3480156102aa57600080fd5b506101397f000000000000000000000000000000000000000000000000000000000000000081565b3480156102de57600080fd5b506001546001600160a01b0316610195565b3480156102fc57600080fd5b5061013960045481565b34801561031257600080fd5b506101956001600160981b0181565b34801561032d57600080fd5b50610139620186a081565b34801561034457600080fd5b50610195600160981b81565b34801561035c57600080fd5b5061020161036b3660046118d0565b6109ca565b34801561037c57600080fd5b50600054610139565b34801561039157600080fd5b506102016103a0366004611959565b610afd565b6000806103bf6001600160981b0131600160981b31611993565b905060007f00000000000000000000000000000000000000000000000000000000000000006004546103f19190611993565b90506103fd82826119a6565b9250505090565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d820e64f6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610464573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061048891906119b9565b90506000600160981b6001600160a01b03163190506000826001600160a01b031663624488506040518060c001604052807f000000000000000000000000000000000000000000000000000000000000000081526020017f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031681526020018980360381019061051f91906119d6565b8152602001620186a081526020018888808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152505050908252506040805160208082018990528251808303820181528284019093529092019161059191600191606001611a8c565b6040516020818303038152906040528152506040518263ffffffff1660e01b81526004016105bf9190611b07565b6020604051808303816000875af11580156105de573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106029190611b85565b9050807f2550fa6041684d40e635e29e93dde9017d70c25b46aa88393317b5182ed6ae7c8360405161063691815260200190565b60405180910390a2505050505050565b61064e610b73565b61065781610b7b565b50565b610662610d19565b61066c6000610d73565b565b610676610dc5565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d820e64f6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156106d6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106fa91906119b9565b90506001600160a01b03851661072b5760405162461bcd60e51b815260040161072290611b9e565b60405180910390fd5b600354156107985760405162461bcd60e51b815260206004820152603460248201527f4e6174697665546f6b656e44657374696e6174696f6e3a20636f6e7472616374604482015273081d5b99195c98dbdb1b185d195c985b1a5e995960621b6064820152608401610722565b60006020850135156107d7576107be6107b46020870187611959565b8660200135610e1c565b90506107d76107d06020870187611959565b8383610f86565b6107e86001600160981b013461106b565b6000826001600160a01b031663624488506040518060c001604052807f000000000000000000000000000000000000000000000000000000000000000081526020017f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031681526020018980360381019061086a91906119d6565b8152602001620186a08152602001888880806020026020016040519081016040528093929190818152602001838360200280828437600092018290525093855250506040516020938401936108d892508e913491016001600160a01b03929092168252602082015260400190565b60408051601f19818403018152908290526108f69291602001611a8c565b6040516020818303038152906040528152506040518263ffffffff1660e01b81526004016109249190611b07565b6020604051808303816000875af1158015610943573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109679190611b85565b905080876001600160a01b0316336001600160a01b03167f0322cbb1d3c23f6dbf1deddb3b4ef3ce0f93ae6eec7b44e4f395804104466d14346040516109af91815260200190565b60405180910390a45050506109c46001600255565b50505050565b60005460405163260f846760e11b81523360048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690634c1f08ce90602401602060405180830381865afa158015610a31573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a559190611b85565b1015610abc5760405162461bcd60e51b815260206004820152603060248201527f54656c65706f727465725570677261646561626c653a20696e76616c6964205460448201526f32b632b837b93a32b91039b2b73232b960811b6064820152608401610722565b6109c4848484848080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061118992505050565b610b05610d19565b6001600160a01b038116610b6a5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610722565b61065781610d73565b61066c610d19565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663c07f47d46040518163ffffffff1660e01b8152600401602060405180830381865afa158015610bdb573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610bff9190611b85565b60005490915081831115610c6f5760405162461bcd60e51b815260206004820152603160248201527f54656c65706f727465725570677261646561626c653a20696e76616c6964205460448201527032b632b837b93a32b9103b32b939b4b7b760791b6064820152608401610722565b808311610ce45760405162461bcd60e51b815260206004820152603f60248201527f54656c65706f727465725570677261646561626c653a206e6f7420677265617460448201527f6572207468616e2063757272656e74206d696e696d756d2076657273696f6e006064820152608401610722565b6000838155604051849183917fa9a7ef57e41f05b4c15480842f5f0c27edfcbb553fed281f7c4068452cc1c02d9190a3505050565b6001546001600160a01b0316331461066c5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610722565b600180546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6002805403610e165760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610722565b60028055565b6040516370a0823160e01b815230600482015260009081906001600160a01b038516906370a0823190602401602060405180830381865afa158015610e65573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e899190611b85565b9050610ea06001600160a01b0385163330866114ec565b6040516370a0823160e01b81523060048201526000906001600160a01b038616906370a0823190602401602060405180830381865afa158015610ee7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f0b9190611b85565b9050818111610f715760405162461bcd60e51b815260206004820152602c60248201527f5361666545524332305472616e7366657246726f6d3a2062616c616e6365206e60448201526b1bdd081a5b98dc99585cd95960a21b6064820152608401610722565b610f7b82826119a6565b925050505b92915050565b604051636eb1769f60e11b81523060048201526001600160a01b038381166024830152600091839186169063dd62ed3e90604401602060405180830381865afa158015610fd7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ffb9190611b85565b6110059190611993565b6040516001600160a01b0385166024820152604481018290529091506109c490859063095ea7b360e01b906064015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152611524565b804710156110bb5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e63650000006044820152606401610722565b6000826001600160a01b03168260405160006040518083038185875af1925050503d8060008114611108576040519150601f19603f3d011682016040523d82523d6000602084013e61110d565b606091505b50509050806111845760405162461bcd60e51b815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d617920686176652072657665727465640000000000006064820152608401610722565b505050565b7f0000000000000000000000000000000000000000000000000000000000000000831461120d5760405162461bcd60e51b815260206004820152602c60248201527f4e6174697665546f6b656e44657374696e6174696f6e3a20696e76616c69642060448201526b39b7bab931b29031b430b4b760a11b6064820152608401610722565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316826001600160a01b0316146112a25760405162461bcd60e51b815260206004820152602b60248201527f4e6174697665546f6b656e44657374696e6174696f6e3a20756e617574686f7260448201526a34bd32b21039b2b73232b960a91b6064820152608401610722565b600080828060200190518101906112b99190611bec565b90925090506001600160a01b0382166112e45760405162461bcd60e51b815260040161072290611b9e565b806000036113485760405162461bcd60e51b815260206004820152602b60248201527f4e6174697665546f6b656e44657374696e6174696f6e3a207a65726f2074726160448201526a6e736665722076616c756560a81b6064820152608401610722565b60035481901561140d576003548211156113b15760035460408051918252600060208301527f244160b15e69cc411f041d94ae7fab6f6bba85dade8403216c05ff4b920d5449910160405180910390a16003546113a590836119a6565b6000600355905061140d565b81600360008282546113c391906119a6565b90915550506003546040805184815260208101929092527f244160b15e69cc411f041d94ae7fab6f6bba85dade8403216c05ff4b920d5449910160405180910390a1505050505050565b806004600082825461141f9190611993565b90915550506040518181526001600160a01b038416907fd949ea0e9d5db53492d77f28fd5467fb2f6c4f5b88e3350e3c36729b76e99cf29060200160405180910390a26040516327ad555d60e11b81526001600160a01b038481166004830152602482018390527f00000000000000000000000000000000000000000000000000000000000000001690634f5aaaba90604401600060405180830381600087803b1580156114cc57600080fd5b505af11580156114e0573d6000803e3d6000fd5b50505050505050505050565b6040516001600160a01b03808516602483015283166044820152606481018290526109c49085906323b872dd60e01b90608401611034565b6000611579826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166115f69092919063ffffffff16565b80519091501561118457808060200190518101906115979190611c1a565b6111845760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610722565b6060611605848460008561160d565b949350505050565b60608247101561166e5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b6064820152608401610722565b600080866001600160a01b0316858760405161168a9190611c3c565b60006040518083038185875af1925050503d80600081146116c7576040519150601f19603f3d011682016040523d82523d6000602084013e6116cc565b606091505b50915091506116dd878383876116e8565b979650505050505050565b60608315611757578251600003611750576001600160a01b0385163b6117505760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610722565b5081611605565b611605838381511561176c5781518083602001fd5b8060405162461bcd60e51b81526004016107229190611c58565b60006040828403121561179857600080fd5b50919050565b60008083601f8401126117b057600080fd5b50813567ffffffffffffffff8111156117c857600080fd5b6020830191508360208260051b85010111156117e357600080fd5b9250929050565b6000806000606084860312156117ff57600080fd5b6118098585611786565b9250604084013567ffffffffffffffff81111561182557600080fd5b6118318682870161179e565b9497909650939450505050565b60006020828403121561185057600080fd5b5035919050565b6001600160a01b038116811461065757600080fd5b6000806000806080858703121561188257600080fd5b843561188d81611857565b935061189c8660208701611786565b9250606085013567ffffffffffffffff8111156118b857600080fd5b6118c48782880161179e565b95989497509550505050565b600080600080606085870312156118e657600080fd5b8435935060208501356118f881611857565b9250604085013567ffffffffffffffff8082111561191557600080fd5b818701915087601f83011261192957600080fd5b81358181111561193857600080fd5b88602082850101111561194a57600080fd5b95989497505060200194505050565b60006020828403121561196b57600080fd5b813561197681611857565b9392505050565b634e487b7160e01b600052601160045260246000fd5b80820180821115610f8057610f8061197d565b81810381811115610f8057610f8061197d565b6000602082840312156119cb57600080fd5b815161197681611857565b6000604082840312156119e857600080fd5b6040516040810181811067ffffffffffffffff82111715611a1957634e487b7160e01b600052604160045260246000fd5b6040528235611a2781611857565b81526020928301359281019290925250919050565b60005b83811015611a57578181015183820152602001611a3f565b50506000910152565b60008151808452611a78816020860160208601611a3c565b601f01601f19169290920160200192915050565b600060028410611aac57634e487b7160e01b600052602160045260246000fd5b838252604060208301526116056040830184611a60565b600081518084526020808501945080840160005b83811015611afc5781516001600160a01b031687529582019590820190600101611ad7565b509495945050505050565b60208152815160208201526000602083015160018060a01b03808216604085015260408501519150808251166060850152506020810151608084015250606083015160a0830152608083015160e060c0840152611b68610100840182611ac3565b905060a0840151601f198483030160e0850152610f7b8282611a60565b600060208284031215611b9757600080fd5b5051919050565b6020808252602e908201527f4e6174697665546f6b656e44657374696e6174696f6e3a207a65726f2072656360408201526d697069656e74206164647265737360901b606082015260800190565b60008060408385031215611bff57600080fd5b8251611c0a81611857565b6020939093015192949293505050565b600060208284031215611c2c57600080fd5b8151801515811461197657600080fd5b60008251611c4e818460208701611a3c565b9190910192915050565b6020815260006119766020830184611a6056fea2646970667358221220a9b9852cbb764d852e2b457469358e3b4975ec744ef96db91de4e69a0877c78d64736f6c634300081200334e6174697665546f6b656e44657374696e6174696f6e3a207a65726f20736f75", } // NativeTokenDestinationABI is the input ABI used to generate the binding from. diff --git a/abi-bindings/go/CrossChainApplications/NativeTokenBridge/NativeTokenSource/NativeTokenSource.go b/abi-bindings/go/CrossChainApplications/NativeTokenBridge/NativeTokenSource/NativeTokenSource.go index f708f86d7..63dc776c6 100644 --- a/abi-bindings/go/CrossChainApplications/NativeTokenBridge/NativeTokenSource/NativeTokenSource.go +++ b/abi-bindings/go/CrossChainApplications/NativeTokenBridge/NativeTokenSource/NativeTokenSource.go @@ -38,7 +38,7 @@ type TeleporterFeeInfo struct { // NativeTokenSourceMetaData contains all meta data concerning the NativeTokenSource contract. var NativeTokenSourceMetaData = &bind.MetaData{ ABI: "[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"teleporterRegistryAddress\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"destinationBlockchainID_\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"nativeTokenDestinationAddress_\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"BurnTokens\",\"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\":\"sender\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"teleporterMessageID\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"TransferToDestination\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"UnlockTokens\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"BURNED_TX_FEES_ADDRESS\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"MINT_NATIVE_TOKENS_REQUIRED_GAS\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"destinationBlockchainID\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"destinationBurnedTotal\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getMinTeleporterVersion\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"nativeTokenDestinationAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"originBlockchainID\",\"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\":[],\"name\":\"teleporterRegistry\",\"outputs\":[{\"internalType\":\"contractTeleporterRegistry\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"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\":\"transferToDestination\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"version\",\"type\":\"uint256\"}],\"name\":\"updateMinTeleporterVersion\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", - Bin: "0x60e06040523480156200001157600080fd5b5060405162001ccb38038062001ccb83398101604081905262000034916200037b565b82806001600160a01b038116620000b85760405162461bcd60e51b815260206004820152603760248201527f54656c65706f727465725570677261646561626c653a207a65726f2074656c6560448201527f706f72746572207265676973747279206164647265737300000000000000000060648201526084015b60405180910390fd5b6001600160a01b03811660808190526040805163301fd1f560e21b8152905163c07f47d4916004808201926020929091908290030181865afa15801562000103573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620001299190620003bc565b6000555062000138336200030c565b50600160025581620001965760405162461bcd60e51b8152602060048201526031602482015260008051602062001cab8339815191526044820152701a5bdb88189b1bd8dad8da185a5b881251607a1b6064820152608401620000af565b7302000000000000000000000000000000000000056001600160a01b0316634213cf786040518163ffffffff1660e01b8152600401602060405180830381865afa158015620001e9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200020f9190620003bc565b8203620002855760405162461bcd60e51b815260206004820152603560248201527f4e6174697665546f6b656e536f757263653a2063616e6e6f742062726964676560448201527f20776974682073616d6520626c6f636b636861696e00000000000000000000006064820152608401620000af565b60a08290526001600160a01b038116620002f75760405162461bcd60e51b8152602060048201526034602482015260008051602062001cab83398151915260448201527f696f6e20636f6e747261637420616464726573730000000000000000000000006064820152608401620000af565b6001600160a01b031660c05250620003d69050565b600180546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b80516001600160a01b03811681146200037657600080fd5b919050565b6000806000606084860312156200039157600080fd5b6200039c846200035e565b925060208401519150620003b3604085016200035e565b90509250925092565b600060208284031215620003cf57600080fd5b5051919050565b60805160a05160c0516118756200043660003960008181610201015281816103f80152610ca001526000818161012a015281816103d20152610c1c01526000818160d9015281816102c401528181610591015261072e01526118756000f3fe6080604052600436106100c25760003560e01c8063ad0aee251161007f578063c452165e11610059578063c452165e14610223578063c868efaa1461023b578063d2cc7a701461025b578063f2fde38b1461027057600080fd5b8063ad0aee25146101c5578063b6171f73146101d8578063b8c9091a146101ef57600080fd5b80631a7f5bec146100c757806341d3014d1461011857806355db3e9e1461015a5780635eb9951414610170578063715018a6146101925780638da5cb5b146101a7575b600080fd5b3480156100d357600080fd5b506100fb7f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020015b60405180910390f35b34801561012457600080fd5b5061014c7f000000000000000000000000000000000000000000000000000000000000000081565b60405190815260200161010f565b34801561016657600080fd5b5061014c60035481565b34801561017c57600080fd5b5061019061018b366004611325565b610290565b005b34801561019e57600080fd5b506101906102a4565b3480156101b357600080fd5b506001546001600160a01b03166100fb565b6101906101d3366004611353565b6102b8565b3480156101e457600080fd5b5061014c620186a081565b3480156101fb57600080fd5b506100fb7f000000000000000000000000000000000000000000000000000000000000000081565b34801561022f57600080fd5b506100fb600160981b81565b34801561024757600080fd5b506101906102563660046113f2565b610579565b34801561026757600080fd5b5060005461014c565b34801561027c57600080fd5b5061019061028b36600461146c565b6106ac565b610298610722565b6102a18161072a565b50565b6102ac6108c8565b6102b66000610922565b565b6102c0610974565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d820e64f6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610320573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103449190611490565b90506001600160a01b0385166103755760405162461bcd60e51b815260040161036c906114ad565b60405180910390fd5b60006020850135156103b45761039b610391602087018761146c565b86602001356109cb565b90506103b46103ad602087018761146c565b8383610b35565b6000826001600160a01b031663624488506040518060c001604052807f000000000000000000000000000000000000000000000000000000000000000081526020017f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316815260200189803603810190610436919061153d565b8152602001620186a081526020018888808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152505050908252506040516020918201916104a5918d913491016001600160a01b03929092168252602082015260400190565b6040516020818303038152906040528152506040518263ffffffff1660e01b81526004016104d39190611629565b6020604051808303816000875af11580156104f2573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061051691906116a7565b905080876001600160a01b0316336001600160a01b03167f2b4e8f08417773e367064a6aea9ca2df303a60876676f70b6c3c5e66b314ca5a3460405161055e91815260200190565b60405180910390a45050506105736001600255565b50505050565b60005460405163260f846760e11b81523360048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690634c1f08ce90602401602060405180830381865afa1580156105e0573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061060491906116a7565b101561066b5760405162461bcd60e51b815260206004820152603060248201527f54656c65706f727465725570677261646561626c653a20696e76616c6964205460448201526f32b632b837b93a32b91039b2b73232b960811b606482015260840161036c565b610573848484848080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250610c1a92505050565b6106b46108c8565b6001600160a01b0381166107195760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161036c565b6102a181610922565b6102b66108c8565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663c07f47d46040518163ffffffff1660e01b8152600401602060405180830381865afa15801561078a573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107ae91906116a7565b6000549091508183111561081e5760405162461bcd60e51b815260206004820152603160248201527f54656c65706f727465725570677261646561626c653a20696e76616c6964205460448201527032b632b837b93a32b9103b32b939b4b7b760791b606482015260840161036c565b8083116108935760405162461bcd60e51b815260206004820152603f60248201527f54656c65706f727465725570677261646561626c653a206e6f7420677265617460448201527f6572207468616e2063757272656e74206d696e696d756d2076657273696f6e00606482015260840161036c565b6000838155604051849183917fa9a7ef57e41f05b4c15480842f5f0c27edfcbb553fed281f7c4068452cc1c02d9190a3505050565b6001546001600160a01b031633146102b65760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161036c565b600180546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b60028054036109c55760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015260640161036c565b60028055565b6040516370a0823160e01b815230600482015260009081906001600160a01b038516906370a0823190602401602060405180830381865afa158015610a14573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a3891906116a7565b9050610a4f6001600160a01b038516333086610e28565b6040516370a0823160e01b81523060048201526000906001600160a01b038616906370a0823190602401602060405180830381865afa158015610a96573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610aba91906116a7565b9050818111610b205760405162461bcd60e51b815260206004820152602c60248201527f5361666545524332305472616e7366657246726f6d3a2062616c616e6365206e60448201526b1bdd081a5b98dc99585cd95960a21b606482015260840161036c565b610b2a82826116d6565b925050505b92915050565b604051636eb1769f60e11b81523060048201526001600160a01b038381166024830152600091839186169063dd62ed3e90604401602060405180830381865afa158015610b86573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610baa91906116a7565b610bb491906116e9565b6040516001600160a01b03851660248201526044810182905290915061057390859063095ea7b360e01b906064015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152610e60565b7f00000000000000000000000000000000000000000000000000000000000000008314610c9e5760405162461bcd60e51b815260206004820152602c60248201527f4e6174697665546f6b656e536f757263653a20696e76616c696420646573746960448201526b3730ba34b7b71031b430b4b760a11b606482015260840161036c565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316826001600160a01b031614610d2e5760405162461bcd60e51b815260206004820152602660248201527f4e6174697665546f6b656e536f757263653a20756e617574686f72697a65642060448201526539b2b73232b960d11b606482015260840161036c565b60008082806020019051810190610d4591906116fc565b90925090506000826001811115610d5e57610d5e6117aa565b03610d8f5760008082806020019051810190610d7a91906117c0565b91509150610d888282610f37565b5050610e21565b6001826001811115610da357610da36117aa565b03610dcf57600081806020019051810190610dbe91906116a7565b9050610dc981611010565b50610e21565b60405162461bcd60e51b815260206004820152602160248201527f4e6174697665546f6b656e536f757263653a20696e76616c696420616374696f6044820152603760f91b606482015260840161036c565b5050505050565b6040516001600160a01b03808516602483015283166044820152606481018290526105739085906323b872dd60e01b90608401610be3565b6000610eb5826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b031661103b9092919063ffffffff16565b805190915015610f325780806020019051810190610ed391906117ee565b610f325760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b606482015260840161036c565b505050565b6001600160a01b038216610f5d5760405162461bcd60e51b815260040161036c906114ad565b80471015610fc05760405162461bcd60e51b815260206004820152602a60248201527f4e6174697665546f6b656e536f757263653a20696e73756666696369656e742060448201526918dbdb1b185d195c985b60b21b606482015260840161036c565b604080516001600160a01b0384168152602081018390527f55aaef8fd8c07238c3618a93c8a1627194187d3b0952908e58f2ab0f944fb407910160405180910390a161100c8282611052565b5050565b6003548111156102a15760006003548261102a91906116d6565b90506110358161116b565b50600355565b606061104a84846000856111ac565b949350505050565b804710156110a25760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e6365000000604482015260640161036c565b6000826001600160a01b03168260405160006040518083038185875af1925050503d80600081146110ef576040519150601f19603f3d011682016040523d82523d6000602084013e6110f4565b606091505b5050905080610f325760405162461bcd60e51b815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d61792068617665207265766572746564000000000000606482015260840161036c565b6040518181527f2cd3fd70cd5a5d6d805e90d22741aa1a84590ace7cf01b244719558d266143829060200160405180910390a16102a1600160981b82611052565b60608247101561120d5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b606482015260840161036c565b600080866001600160a01b031685876040516112299190611810565b60006040518083038185875af1925050503d8060008114611266576040519150601f19603f3d011682016040523d82523d6000602084013e61126b565b606091505b509150915061127c87838387611287565b979650505050505050565b606083156112f65782516000036112ef576001600160a01b0385163b6112ef5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015260640161036c565b508161104a565b61104a838381511561130b5781518083602001fd5b8060405162461bcd60e51b815260040161036c919061182c565b60006020828403121561133757600080fd5b5035919050565b6001600160a01b03811681146102a157600080fd5b600080600080848603608081121561136a57600080fd5b85356113758161133e565b94506040601f198201121561138957600080fd5b50602085019250606085013567ffffffffffffffff808211156113ab57600080fd5b818701915087601f8301126113bf57600080fd5b8135818111156113ce57600080fd5b8860208260051b85010111156113e357600080fd5b95989497505060200194505050565b6000806000806060858703121561140857600080fd5b84359350602085013561141a8161133e565b9250604085013567ffffffffffffffff8082111561143757600080fd5b818701915087601f83011261144b57600080fd5b81358181111561145a57600080fd5b8860208285010111156113e357600080fd5b60006020828403121561147e57600080fd5b81356114898161133e565b9392505050565b6000602082840312156114a257600080fd5b81516114898161133e565b60208082526029908201527f4e6174697665546f6b656e536f757263653a207a65726f20726563697069656e60408201526874206164647265737360b81b606082015260800190565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff81118282101715611535576115356114f6565b604052919050565b60006040828403121561154f57600080fd5b6040516040810181811067ffffffffffffffff82111715611572576115726114f6565b60405282356115808161133e565b81526020928301359281019290925250919050565b600081518084526020808501945080840160005b838110156115ce5781516001600160a01b0316875295820195908201906001016115a9565b509495945050505050565b60005b838110156115f45781810151838201526020016115dc565b50506000910152565b600081518084526116158160208601602086016115d9565b601f01601f19169290920160200192915050565b60208152815160208201526000602083015160018060a01b03808216604085015260408501519150808251166060850152506020810151608084015250606083015160a0830152608083015160e060c084015261168a610100840182611595565b905060a0840151601f198483030160e0850152610b2a82826115fd565b6000602082840312156116b957600080fd5b5051919050565b634e487b7160e01b600052601160045260246000fd5b81810381811115610b2f57610b2f6116c0565b80820180821115610b2f57610b2f6116c0565b6000806040838503121561170f57600080fd5b82516002811061171e57600080fd5b602084015190925067ffffffffffffffff8082111561173c57600080fd5b818501915085601f83011261175057600080fd5b815181811115611762576117626114f6565b611775601f8201601f191660200161150c565b915080825286602082850101111561178c57600080fd5b61179d8160208401602086016115d9565b5080925050509250929050565b634e487b7160e01b600052602160045260246000fd5b600080604083850312156117d357600080fd5b82516117de8161133e565b6020939093015192949293505050565b60006020828403121561180057600080fd5b8151801515811461148957600080fd5b600082516118228184602087016115d9565b9190910192915050565b60208152600061148960208301846115fd56fea264697066735822122029f7f3d5049f3bafb473ef105dca8fb8afca06fda0ebad3a35e0210ae0a8336264736f6c634300081200334e6174697665546f6b656e536f757263653a207a65726f2064657374696e6174", + Bin: "0x60e06040523480156200001157600080fd5b5060405162001ccb38038062001ccb83398101604081905262000034916200037b565b82806001600160a01b038116620000b85760405162461bcd60e51b815260206004820152603760248201527f54656c65706f727465725570677261646561626c653a207a65726f2074656c6560448201527f706f72746572207265676973747279206164647265737300000000000000000060648201526084015b60405180910390fd5b6001600160a01b03811660808190526040805163301fd1f560e21b8152905163c07f47d4916004808201926020929091908290030181865afa15801562000103573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620001299190620003bc565b6000555062000138336200030c565b50600160025581620001965760405162461bcd60e51b8152602060048201526031602482015260008051602062001cab8339815191526044820152701a5bdb88189b1bd8dad8da185a5b881251607a1b6064820152608401620000af565b7302000000000000000000000000000000000000056001600160a01b0316634213cf786040518163ffffffff1660e01b8152600401602060405180830381865afa158015620001e9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200020f9190620003bc565b8203620002855760405162461bcd60e51b815260206004820152603560248201527f4e6174697665546f6b656e536f757263653a2063616e6e6f742062726964676560448201527f20776974682073616d6520626c6f636b636861696e00000000000000000000006064820152608401620000af565b60a08290526001600160a01b038116620002f75760405162461bcd60e51b8152602060048201526034602482015260008051602062001cab83398151915260448201527f696f6e20636f6e747261637420616464726573730000000000000000000000006064820152608401620000af565b6001600160a01b031660c05250620003d69050565b600180546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b80516001600160a01b03811681146200037657600080fd5b919050565b6000806000606084860312156200039157600080fd5b6200039c846200035e565b925060208401519150620003b3604085016200035e565b90509250925092565b600060208284031215620003cf57600080fd5b5051919050565b60805160a05160c0516118756200043660003960008181610201015281816103f80152610ca001526000818161012a015281816103d20152610c1c01526000818160d9015281816102c401528181610591015261072e01526118756000f3fe6080604052600436106100c25760003560e01c8063ad0aee251161007f578063c452165e11610059578063c452165e14610223578063c868efaa1461023b578063d2cc7a701461025b578063f2fde38b1461027057600080fd5b8063ad0aee25146101c5578063b6171f73146101d8578063b8c9091a146101ef57600080fd5b80631a7f5bec146100c757806341d3014d1461011857806355db3e9e1461015a5780635eb9951414610170578063715018a6146101925780638da5cb5b146101a7575b600080fd5b3480156100d357600080fd5b506100fb7f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020015b60405180910390f35b34801561012457600080fd5b5061014c7f000000000000000000000000000000000000000000000000000000000000000081565b60405190815260200161010f565b34801561016657600080fd5b5061014c60035481565b34801561017c57600080fd5b5061019061018b366004611325565b610290565b005b34801561019e57600080fd5b506101906102a4565b3480156101b357600080fd5b506001546001600160a01b03166100fb565b6101906101d3366004611353565b6102b8565b3480156101e457600080fd5b5061014c620186a081565b3480156101fb57600080fd5b506100fb7f000000000000000000000000000000000000000000000000000000000000000081565b34801561022f57600080fd5b506100fb600160981b81565b34801561024757600080fd5b506101906102563660046113f2565b610579565b34801561026757600080fd5b5060005461014c565b34801561027c57600080fd5b5061019061028b36600461146c565b6106ac565b610298610722565b6102a18161072a565b50565b6102ac6108c8565b6102b66000610922565b565b6102c0610974565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d820e64f6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610320573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103449190611490565b90506001600160a01b0385166103755760405162461bcd60e51b815260040161036c906114ad565b60405180910390fd5b60006020850135156103b45761039b610391602087018761146c565b86602001356109cb565b90506103b46103ad602087018761146c565b8383610b35565b6000826001600160a01b031663624488506040518060c001604052807f000000000000000000000000000000000000000000000000000000000000000081526020017f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316815260200189803603810190610436919061153d565b8152602001620186a081526020018888808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152505050908252506040516020918201916104a5918d913491016001600160a01b03929092168252602082015260400190565b6040516020818303038152906040528152506040518263ffffffff1660e01b81526004016104d39190611629565b6020604051808303816000875af11580156104f2573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061051691906116a7565b905080876001600160a01b0316336001600160a01b03167f2b4e8f08417773e367064a6aea9ca2df303a60876676f70b6c3c5e66b314ca5a3460405161055e91815260200190565b60405180910390a45050506105736001600255565b50505050565b60005460405163260f846760e11b81523360048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690634c1f08ce90602401602060405180830381865afa1580156105e0573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061060491906116a7565b101561066b5760405162461bcd60e51b815260206004820152603060248201527f54656c65706f727465725570677261646561626c653a20696e76616c6964205460448201526f32b632b837b93a32b91039b2b73232b960811b606482015260840161036c565b610573848484848080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250610c1a92505050565b6106b46108c8565b6001600160a01b0381166107195760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161036c565b6102a181610922565b6102b66108c8565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663c07f47d46040518163ffffffff1660e01b8152600401602060405180830381865afa15801561078a573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107ae91906116a7565b6000549091508183111561081e5760405162461bcd60e51b815260206004820152603160248201527f54656c65706f727465725570677261646561626c653a20696e76616c6964205460448201527032b632b837b93a32b9103b32b939b4b7b760791b606482015260840161036c565b8083116108935760405162461bcd60e51b815260206004820152603f60248201527f54656c65706f727465725570677261646561626c653a206e6f7420677265617460448201527f6572207468616e2063757272656e74206d696e696d756d2076657273696f6e00606482015260840161036c565b6000838155604051849183917fa9a7ef57e41f05b4c15480842f5f0c27edfcbb553fed281f7c4068452cc1c02d9190a3505050565b6001546001600160a01b031633146102b65760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161036c565b600180546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b60028054036109c55760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015260640161036c565b60028055565b6040516370a0823160e01b815230600482015260009081906001600160a01b038516906370a0823190602401602060405180830381865afa158015610a14573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a3891906116a7565b9050610a4f6001600160a01b038516333086610e28565b6040516370a0823160e01b81523060048201526000906001600160a01b038616906370a0823190602401602060405180830381865afa158015610a96573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610aba91906116a7565b9050818111610b205760405162461bcd60e51b815260206004820152602c60248201527f5361666545524332305472616e7366657246726f6d3a2062616c616e6365206e60448201526b1bdd081a5b98dc99585cd95960a21b606482015260840161036c565b610b2a82826116d6565b925050505b92915050565b604051636eb1769f60e11b81523060048201526001600160a01b038381166024830152600091839186169063dd62ed3e90604401602060405180830381865afa158015610b86573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610baa91906116a7565b610bb491906116e9565b6040516001600160a01b03851660248201526044810182905290915061057390859063095ea7b360e01b906064015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152610e60565b7f00000000000000000000000000000000000000000000000000000000000000008314610c9e5760405162461bcd60e51b815260206004820152602c60248201527f4e6174697665546f6b656e536f757263653a20696e76616c696420646573746960448201526b3730ba34b7b71031b430b4b760a11b606482015260840161036c565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316826001600160a01b031614610d2e5760405162461bcd60e51b815260206004820152602660248201527f4e6174697665546f6b656e536f757263653a20756e617574686f72697a65642060448201526539b2b73232b960d11b606482015260840161036c565b60008082806020019051810190610d4591906116fc565b90925090506000826001811115610d5e57610d5e6117aa565b03610d8f5760008082806020019051810190610d7a91906117c0565b91509150610d888282610f37565b5050610e21565b6001826001811115610da357610da36117aa565b03610dcf57600081806020019051810190610dbe91906116a7565b9050610dc981611010565b50610e21565b60405162461bcd60e51b815260206004820152602160248201527f4e6174697665546f6b656e536f757263653a20696e76616c696420616374696f6044820152603760f91b606482015260840161036c565b5050505050565b6040516001600160a01b03808516602483015283166044820152606481018290526105739085906323b872dd60e01b90608401610be3565b6000610eb5826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b031661103b9092919063ffffffff16565b805190915015610f325780806020019051810190610ed391906117ee565b610f325760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b606482015260840161036c565b505050565b6001600160a01b038216610f5d5760405162461bcd60e51b815260040161036c906114ad565b80471015610fc05760405162461bcd60e51b815260206004820152602a60248201527f4e6174697665546f6b656e536f757263653a20696e73756666696369656e742060448201526918dbdb1b185d195c985b60b21b606482015260840161036c565b604080516001600160a01b0384168152602081018390527f55aaef8fd8c07238c3618a93c8a1627194187d3b0952908e58f2ab0f944fb407910160405180910390a161100c8282611052565b5050565b6003548111156102a15760006003548261102a91906116d6565b90506110358161116b565b50600355565b606061104a84846000856111ac565b949350505050565b804710156110a25760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e6365000000604482015260640161036c565b6000826001600160a01b03168260405160006040518083038185875af1925050503d80600081146110ef576040519150601f19603f3d011682016040523d82523d6000602084013e6110f4565b606091505b5050905080610f325760405162461bcd60e51b815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d61792068617665207265766572746564000000000000606482015260840161036c565b6040518181527f2cd3fd70cd5a5d6d805e90d22741aa1a84590ace7cf01b244719558d266143829060200160405180910390a16102a1600160981b82611052565b60608247101561120d5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b606482015260840161036c565b600080866001600160a01b031685876040516112299190611810565b60006040518083038185875af1925050503d8060008114611266576040519150601f19603f3d011682016040523d82523d6000602084013e61126b565b606091505b509150915061127c87838387611287565b979650505050505050565b606083156112f65782516000036112ef576001600160a01b0385163b6112ef5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015260640161036c565b508161104a565b61104a838381511561130b5781518083602001fd5b8060405162461bcd60e51b815260040161036c919061182c565b60006020828403121561133757600080fd5b5035919050565b6001600160a01b03811681146102a157600080fd5b600080600080848603608081121561136a57600080fd5b85356113758161133e565b94506040601f198201121561138957600080fd5b50602085019250606085013567ffffffffffffffff808211156113ab57600080fd5b818701915087601f8301126113bf57600080fd5b8135818111156113ce57600080fd5b8860208260051b85010111156113e357600080fd5b95989497505060200194505050565b6000806000806060858703121561140857600080fd5b84359350602085013561141a8161133e565b9250604085013567ffffffffffffffff8082111561143757600080fd5b818701915087601f83011261144b57600080fd5b81358181111561145a57600080fd5b8860208285010111156113e357600080fd5b60006020828403121561147e57600080fd5b81356114898161133e565b9392505050565b6000602082840312156114a257600080fd5b81516114898161133e565b60208082526029908201527f4e6174697665546f6b656e536f757263653a207a65726f20726563697069656e60408201526874206164647265737360b81b606082015260800190565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff81118282101715611535576115356114f6565b604052919050565b60006040828403121561154f57600080fd5b6040516040810181811067ffffffffffffffff82111715611572576115726114f6565b60405282356115808161133e565b81526020928301359281019290925250919050565b600081518084526020808501945080840160005b838110156115ce5781516001600160a01b0316875295820195908201906001016115a9565b509495945050505050565b60005b838110156115f45781810151838201526020016115dc565b50506000910152565b600081518084526116158160208601602086016115d9565b601f01601f19169290920160200192915050565b60208152815160208201526000602083015160018060a01b03808216604085015260408501519150808251166060850152506020810151608084015250606083015160a0830152608083015160e060c084015261168a610100840182611595565b905060a0840151601f198483030160e0850152610b2a82826115fd565b6000602082840312156116b957600080fd5b5051919050565b634e487b7160e01b600052601160045260246000fd5b81810381811115610b2f57610b2f6116c0565b80820180821115610b2f57610b2f6116c0565b6000806040838503121561170f57600080fd5b82516002811061171e57600080fd5b602084015190925067ffffffffffffffff8082111561173c57600080fd5b818501915085601f83011261175057600080fd5b815181811115611762576117626114f6565b611775601f8201601f191660200161150c565b915080825286602082850101111561178c57600080fd5b61179d8160208401602086016115d9565b5080925050509250929050565b634e487b7160e01b600052602160045260246000fd5b600080604083850312156117d357600080fd5b82516117de8161133e565b6020939093015192949293505050565b60006020828403121561180057600080fd5b8151801515811461148957600080fd5b600082516118228184602087016115d9565b9190910192915050565b60208152600061148960208301846115fd56fea26469706673582212200576a269de80bf07a558fa6049b292106cfc0d84c93a12384399d4653ed6712964736f6c634300081200334e6174697665546f6b656e536f757263653a207a65726f2064657374696e6174", } // NativeTokenSourceABI is the input ABI used to generate the binding from. From fe9079a9a60216c37982f6c5f822e56ae706c6e4 Mon Sep 17 00:00:00 2001 From: Geoff Stuart Date: Wed, 13 Dec 2023 15:05:32 -0500 Subject: [PATCH 06/12] Linter --- .../NativeTokenDestination.go | 2 +- .../NativeTokenDestination.sol | 36 +++++++++---------- .../tests/NativeTokenSourceTests.t.sol | 36 +++++++++---------- 3 files changed, 37 insertions(+), 37 deletions(-) diff --git a/abi-bindings/go/CrossChainApplications/NativeTokenBridge/NativeTokenDestination/NativeTokenDestination.go b/abi-bindings/go/CrossChainApplications/NativeTokenBridge/NativeTokenDestination/NativeTokenDestination.go index 4debaea2f..211b3c9d2 100644 --- a/abi-bindings/go/CrossChainApplications/NativeTokenBridge/NativeTokenDestination/NativeTokenDestination.go +++ b/abi-bindings/go/CrossChainApplications/NativeTokenBridge/NativeTokenDestination/NativeTokenDestination.go @@ -38,7 +38,7 @@ type TeleporterFeeInfo struct { // NativeTokenDestinationMetaData contains all meta data concerning the NativeTokenDestination contract. var NativeTokenDestinationMetaData = &bind.MetaData{ ABI: "[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"teleporterRegistryAddress\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"sourceBlockchainID_\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"nativeTokenSourceAddress_\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"initialReserveImbalance_\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"remaining\",\"type\":\"uint256\"}],\"name\":\"CollateralAdded\",\"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\":\"recipient\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"NativeTokensMinted\",\"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\":\"uint256\",\"name\":\"teleporterMessageID\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"burnAddressBalance\",\"type\":\"uint256\"}],\"name\":\"ReportTotalBurnedTxFees\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"teleporterMessageID\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"TransferToSource\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"BURNED_TX_FEES_ADDRESS\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"BURN_FOR_TRANSFER_ADDRESS\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"REPORT_BURNED_TOKENS_REQUIRED_GAS\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"TRANSFER_NATIVE_TOKENS_REQUIRED_GAS\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"currentReserveImbalance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getMinTeleporterVersion\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"initialReserveImbalance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"isCollateralized\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"nativeTokenSourceAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"originBlockchainID\",\"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\":\"address\",\"name\":\"feeTokenAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"internalType\":\"structTeleporterFeeInfo\",\"name\":\"feeInfo\",\"type\":\"tuple\"},{\"internalType\":\"address[]\",\"name\":\"allowedRelayerAddresses\",\"type\":\"address[]\"}],\"name\":\"reportTotalBurnedTxFees\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sourceBlockchainID\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"teleporterRegistry\",\"outputs\":[{\"internalType\":\"contractTeleporterRegistry\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalMinted\",\"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\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"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\":\"transferToSource\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"version\",\"type\":\"uint256\"}],\"name\":\"updateMinTeleporterVersion\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", - Bin: "0x61012060405273020000000000000000000000000000000000000160a0523480156200002a57600080fd5b50604051620021ce380380620021ce8339810160408190526200004d9162000418565b83806001600160a01b038116620000d15760405162461bcd60e51b815260206004820152603760248201527f54656c65706f727465725570677261646561626c653a207a65726f2074656c6560448201527f706f72746572207265676973747279206164647265737300000000000000000060648201526084015b60405180910390fd5b6001600160a01b03811660808190526040805163301fd1f560e21b8152905163c07f47d4916004808201926020929091908290030181865afa1580156200011c573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000142919062000461565b600055506200015133620003a9565b50600160025582620001af5760405162461bcd60e51b81526020600482015260316024820152600080516020620021ae8339815191526044820152701c98d948189b1bd8dad8da185a5b881251607a1b6064820152608401620000c8565b7302000000000000000000000000000000000000056001600160a01b0316634213cf786040518163ffffffff1660e01b8152600401602060405180830381865afa15801562000202573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000228919062000461565b83036200029e5760405162461bcd60e51b815260206004820152603a60248201527f4e6174697665546f6b656e44657374696e6174696f6e3a2063616e6e6f74206260448201527f726964676520776974682073616d6520626c6f636b636861696e0000000000006064820152608401620000c8565b60c08390526001600160a01b038216620003105760405162461bcd60e51b81526020600482015260346024820152600080516020620021ae83398151915260448201527f72636520636f6e747261637420616464726573730000000000000000000000006064820152608401620000c8565b6001600160a01b03821660e0526000819003620003965760405162461bcd60e51b815260206004820152603660248201527f4e6174697665546f6b656e44657374696e6174696f6e3a207a65726f20696e6960448201527f7469616c207265736572766520696d62616c616e6365000000000000000000006064820152608401620000c8565b610100819052600355506200047b915050565b600180546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b80516001600160a01b03811681146200041357600080fd5b919050565b600080600080608085870312156200042f57600080fd5b6200043a85620003fb565b9350602085015192506200045160408601620003fb565b6060959095015193969295505050565b6000602082840312156200047457600080fd5b5051919050565b60805160a05160c05160e05161010051611ca16200050d600039600081816102b001526103c5015260008181610234015281816104e10152818161082c015261120f0152600081816101bf015281816104bb01528181610806015261118b01526000611488015260008181610173015281816104080152818161067a015281816109e20152610b7f0152611ca16000f3fe60806040526004361061011e5760003560e01c80638ac7dd20116100a0578063c452165e11610064578063c452165e14610338578063c868efaa14610350578063d2cc7a7014610370578063d309512614610321578063f2fde38b1461038557600080fd5b80638ac7dd201461029e5780638da5cb5b146102d2578063a2309ff8146102f0578063a2a9501714610306578063ab2852301461032157600080fd5b806349e3284e116100e757806349e3284e146102035780635d93f9af146102225780635eb9951414610256578063715018a614610276578063758465621461028b57600080fd5b8062d872ae1461012357806318160ddd1461014c5780631a7f5bec1461016157806329b7b3fd146101ad5780633a94fe51146101e1575b600080fd5b34801561012f57600080fd5b5061013960035481565b6040519081526020015b60405180910390f35b34801561015857600080fd5b506101396103a5565b34801561016d57600080fd5b506101957f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b039091168152602001610143565b3480156101b957600080fd5b506101397f000000000000000000000000000000000000000000000000000000000000000081565b3480156101ed57600080fd5b506102016101fc3660046117ea565b610404565b005b34801561020f57600080fd5b5060035460405190158152602001610143565b34801561022e57600080fd5b506101957f000000000000000000000000000000000000000000000000000000000000000081565b34801561026257600080fd5b5061020161027136600461183e565b610646565b34801561028257600080fd5b5061020161065a565b61020161029936600461186c565b61066e565b3480156102aa57600080fd5b506101397f000000000000000000000000000000000000000000000000000000000000000081565b3480156102de57600080fd5b506001546001600160a01b0316610195565b3480156102fc57600080fd5b5061013960045481565b34801561031257600080fd5b506101956001600160981b0181565b34801561032d57600080fd5b50610139620186a081565b34801561034457600080fd5b50610195600160981b81565b34801561035c57600080fd5b5061020161036b3660046118d0565b6109ca565b34801561037c57600080fd5b50600054610139565b34801561039157600080fd5b506102016103a0366004611959565b610afd565b6000806103bf6001600160981b0131600160981b31611993565b905060007f00000000000000000000000000000000000000000000000000000000000000006004546103f19190611993565b90506103fd82826119a6565b9250505090565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d820e64f6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610464573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061048891906119b9565b90506000600160981b6001600160a01b03163190506000826001600160a01b031663624488506040518060c001604052807f000000000000000000000000000000000000000000000000000000000000000081526020017f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031681526020018980360381019061051f91906119d6565b8152602001620186a081526020018888808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152505050908252506040805160208082018990528251808303820181528284019093529092019161059191600191606001611a8c565b6040516020818303038152906040528152506040518263ffffffff1660e01b81526004016105bf9190611b07565b6020604051808303816000875af11580156105de573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106029190611b85565b9050807f2550fa6041684d40e635e29e93dde9017d70c25b46aa88393317b5182ed6ae7c8360405161063691815260200190565b60405180910390a2505050505050565b61064e610b73565b61065781610b7b565b50565b610662610d19565b61066c6000610d73565b565b610676610dc5565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d820e64f6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156106d6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106fa91906119b9565b90506001600160a01b03851661072b5760405162461bcd60e51b815260040161072290611b9e565b60405180910390fd5b600354156107985760405162461bcd60e51b815260206004820152603460248201527f4e6174697665546f6b656e44657374696e6174696f6e3a20636f6e7472616374604482015273081d5b99195c98dbdb1b185d195c985b1a5e995960621b6064820152608401610722565b60006020850135156107d7576107be6107b46020870187611959565b8660200135610e1c565b90506107d76107d06020870187611959565b8383610f86565b6107e86001600160981b013461106b565b6000826001600160a01b031663624488506040518060c001604052807f000000000000000000000000000000000000000000000000000000000000000081526020017f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031681526020018980360381019061086a91906119d6565b8152602001620186a08152602001888880806020026020016040519081016040528093929190818152602001838360200280828437600092018290525093855250506040516020938401936108d892508e913491016001600160a01b03929092168252602082015260400190565b60408051601f19818403018152908290526108f69291602001611a8c565b6040516020818303038152906040528152506040518263ffffffff1660e01b81526004016109249190611b07565b6020604051808303816000875af1158015610943573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109679190611b85565b905080876001600160a01b0316336001600160a01b03167f0322cbb1d3c23f6dbf1deddb3b4ef3ce0f93ae6eec7b44e4f395804104466d14346040516109af91815260200190565b60405180910390a45050506109c46001600255565b50505050565b60005460405163260f846760e11b81523360048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690634c1f08ce90602401602060405180830381865afa158015610a31573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a559190611b85565b1015610abc5760405162461bcd60e51b815260206004820152603060248201527f54656c65706f727465725570677261646561626c653a20696e76616c6964205460448201526f32b632b837b93a32b91039b2b73232b960811b6064820152608401610722565b6109c4848484848080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061118992505050565b610b05610d19565b6001600160a01b038116610b6a5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610722565b61065781610d73565b61066c610d19565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663c07f47d46040518163ffffffff1660e01b8152600401602060405180830381865afa158015610bdb573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610bff9190611b85565b60005490915081831115610c6f5760405162461bcd60e51b815260206004820152603160248201527f54656c65706f727465725570677261646561626c653a20696e76616c6964205460448201527032b632b837b93a32b9103b32b939b4b7b760791b6064820152608401610722565b808311610ce45760405162461bcd60e51b815260206004820152603f60248201527f54656c65706f727465725570677261646561626c653a206e6f7420677265617460448201527f6572207468616e2063757272656e74206d696e696d756d2076657273696f6e006064820152608401610722565b6000838155604051849183917fa9a7ef57e41f05b4c15480842f5f0c27edfcbb553fed281f7c4068452cc1c02d9190a3505050565b6001546001600160a01b0316331461066c5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610722565b600180546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6002805403610e165760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610722565b60028055565b6040516370a0823160e01b815230600482015260009081906001600160a01b038516906370a0823190602401602060405180830381865afa158015610e65573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e899190611b85565b9050610ea06001600160a01b0385163330866114ec565b6040516370a0823160e01b81523060048201526000906001600160a01b038616906370a0823190602401602060405180830381865afa158015610ee7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f0b9190611b85565b9050818111610f715760405162461bcd60e51b815260206004820152602c60248201527f5361666545524332305472616e7366657246726f6d3a2062616c616e6365206e60448201526b1bdd081a5b98dc99585cd95960a21b6064820152608401610722565b610f7b82826119a6565b925050505b92915050565b604051636eb1769f60e11b81523060048201526001600160a01b038381166024830152600091839186169063dd62ed3e90604401602060405180830381865afa158015610fd7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ffb9190611b85565b6110059190611993565b6040516001600160a01b0385166024820152604481018290529091506109c490859063095ea7b360e01b906064015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152611524565b804710156110bb5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e63650000006044820152606401610722565b6000826001600160a01b03168260405160006040518083038185875af1925050503d8060008114611108576040519150601f19603f3d011682016040523d82523d6000602084013e61110d565b606091505b50509050806111845760405162461bcd60e51b815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d617920686176652072657665727465640000000000006064820152608401610722565b505050565b7f0000000000000000000000000000000000000000000000000000000000000000831461120d5760405162461bcd60e51b815260206004820152602c60248201527f4e6174697665546f6b656e44657374696e6174696f6e3a20696e76616c69642060448201526b39b7bab931b29031b430b4b760a11b6064820152608401610722565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316826001600160a01b0316146112a25760405162461bcd60e51b815260206004820152602b60248201527f4e6174697665546f6b656e44657374696e6174696f6e3a20756e617574686f7260448201526a34bd32b21039b2b73232b960a91b6064820152608401610722565b600080828060200190518101906112b99190611bec565b90925090506001600160a01b0382166112e45760405162461bcd60e51b815260040161072290611b9e565b806000036113485760405162461bcd60e51b815260206004820152602b60248201527f4e6174697665546f6b656e44657374696e6174696f6e3a207a65726f2074726160448201526a6e736665722076616c756560a81b6064820152608401610722565b60035481901561140d576003548211156113b15760035460408051918252600060208301527f244160b15e69cc411f041d94ae7fab6f6bba85dade8403216c05ff4b920d5449910160405180910390a16003546113a590836119a6565b6000600355905061140d565b81600360008282546113c391906119a6565b90915550506003546040805184815260208101929092527f244160b15e69cc411f041d94ae7fab6f6bba85dade8403216c05ff4b920d5449910160405180910390a1505050505050565b806004600082825461141f9190611993565b90915550506040518181526001600160a01b038416907fd949ea0e9d5db53492d77f28fd5467fb2f6c4f5b88e3350e3c36729b76e99cf29060200160405180910390a26040516327ad555d60e11b81526001600160a01b038481166004830152602482018390527f00000000000000000000000000000000000000000000000000000000000000001690634f5aaaba90604401600060405180830381600087803b1580156114cc57600080fd5b505af11580156114e0573d6000803e3d6000fd5b50505050505050505050565b6040516001600160a01b03808516602483015283166044820152606481018290526109c49085906323b872dd60e01b90608401611034565b6000611579826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166115f69092919063ffffffff16565b80519091501561118457808060200190518101906115979190611c1a565b6111845760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610722565b6060611605848460008561160d565b949350505050565b60608247101561166e5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b6064820152608401610722565b600080866001600160a01b0316858760405161168a9190611c3c565b60006040518083038185875af1925050503d80600081146116c7576040519150601f19603f3d011682016040523d82523d6000602084013e6116cc565b606091505b50915091506116dd878383876116e8565b979650505050505050565b60608315611757578251600003611750576001600160a01b0385163b6117505760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610722565b5081611605565b611605838381511561176c5781518083602001fd5b8060405162461bcd60e51b81526004016107229190611c58565b60006040828403121561179857600080fd5b50919050565b60008083601f8401126117b057600080fd5b50813567ffffffffffffffff8111156117c857600080fd5b6020830191508360208260051b85010111156117e357600080fd5b9250929050565b6000806000606084860312156117ff57600080fd5b6118098585611786565b9250604084013567ffffffffffffffff81111561182557600080fd5b6118318682870161179e565b9497909650939450505050565b60006020828403121561185057600080fd5b5035919050565b6001600160a01b038116811461065757600080fd5b6000806000806080858703121561188257600080fd5b843561188d81611857565b935061189c8660208701611786565b9250606085013567ffffffffffffffff8111156118b857600080fd5b6118c48782880161179e565b95989497509550505050565b600080600080606085870312156118e657600080fd5b8435935060208501356118f881611857565b9250604085013567ffffffffffffffff8082111561191557600080fd5b818701915087601f83011261192957600080fd5b81358181111561193857600080fd5b88602082850101111561194a57600080fd5b95989497505060200194505050565b60006020828403121561196b57600080fd5b813561197681611857565b9392505050565b634e487b7160e01b600052601160045260246000fd5b80820180821115610f8057610f8061197d565b81810381811115610f8057610f8061197d565b6000602082840312156119cb57600080fd5b815161197681611857565b6000604082840312156119e857600080fd5b6040516040810181811067ffffffffffffffff82111715611a1957634e487b7160e01b600052604160045260246000fd5b6040528235611a2781611857565b81526020928301359281019290925250919050565b60005b83811015611a57578181015183820152602001611a3f565b50506000910152565b60008151808452611a78816020860160208601611a3c565b601f01601f19169290920160200192915050565b600060028410611aac57634e487b7160e01b600052602160045260246000fd5b838252604060208301526116056040830184611a60565b600081518084526020808501945080840160005b83811015611afc5781516001600160a01b031687529582019590820190600101611ad7565b509495945050505050565b60208152815160208201526000602083015160018060a01b03808216604085015260408501519150808251166060850152506020810151608084015250606083015160a0830152608083015160e060c0840152611b68610100840182611ac3565b905060a0840151601f198483030160e0850152610f7b8282611a60565b600060208284031215611b9757600080fd5b5051919050565b6020808252602e908201527f4e6174697665546f6b656e44657374696e6174696f6e3a207a65726f2072656360408201526d697069656e74206164647265737360901b606082015260800190565b60008060408385031215611bff57600080fd5b8251611c0a81611857565b6020939093015192949293505050565b600060208284031215611c2c57600080fd5b8151801515811461197657600080fd5b60008251611c4e818460208701611a3c565b9190910192915050565b6020815260006119766020830184611a6056fea2646970667358221220a9b9852cbb764d852e2b457469358e3b4975ec744ef96db91de4e69a0877c78d64736f6c634300081200334e6174697665546f6b656e44657374696e6174696f6e3a207a65726f20736f75", + Bin: "0x61012060405273020000000000000000000000000000000000000160a0523480156200002a57600080fd5b50604051620021ce380380620021ce8339810160408190526200004d9162000418565b83806001600160a01b038116620000d15760405162461bcd60e51b815260206004820152603760248201527f54656c65706f727465725570677261646561626c653a207a65726f2074656c6560448201527f706f72746572207265676973747279206164647265737300000000000000000060648201526084015b60405180910390fd5b6001600160a01b03811660808190526040805163301fd1f560e21b8152905163c07f47d4916004808201926020929091908290030181865afa1580156200011c573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000142919062000461565b600055506200015133620003a9565b50600160025582620001af5760405162461bcd60e51b81526020600482015260316024820152600080516020620021ae8339815191526044820152701c98d948189b1bd8dad8da185a5b881251607a1b6064820152608401620000c8565b7302000000000000000000000000000000000000056001600160a01b0316634213cf786040518163ffffffff1660e01b8152600401602060405180830381865afa15801562000202573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000228919062000461565b83036200029e5760405162461bcd60e51b815260206004820152603a60248201527f4e6174697665546f6b656e44657374696e6174696f6e3a2063616e6e6f74206260448201527f726964676520776974682073616d6520626c6f636b636861696e0000000000006064820152608401620000c8565b60c08390526001600160a01b038216620003105760405162461bcd60e51b81526020600482015260346024820152600080516020620021ae83398151915260448201527f72636520636f6e747261637420616464726573730000000000000000000000006064820152608401620000c8565b6001600160a01b03821660e0526000819003620003965760405162461bcd60e51b815260206004820152603660248201527f4e6174697665546f6b656e44657374696e6174696f6e3a207a65726f20696e6960448201527f7469616c207265736572766520696d62616c616e6365000000000000000000006064820152608401620000c8565b610100819052600355506200047b915050565b600180546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b80516001600160a01b03811681146200041357600080fd5b919050565b600080600080608085870312156200042f57600080fd5b6200043a85620003fb565b9350602085015192506200045160408601620003fb565b6060959095015193969295505050565b6000602082840312156200047457600080fd5b5051919050565b60805160a05160c05160e05161010051611ca16200050d600039600081816102b001526103c5015260008181610234015281816104e10152818161082c015261120f0152600081816101bf015281816104bb01528181610806015261118b01526000611488015260008181610173015281816104080152818161067a015281816109e20152610b7f0152611ca16000f3fe60806040526004361061011e5760003560e01c80638ac7dd20116100a0578063c452165e11610064578063c452165e14610338578063c868efaa14610350578063d2cc7a7014610370578063d309512614610321578063f2fde38b1461038557600080fd5b80638ac7dd201461029e5780638da5cb5b146102d2578063a2309ff8146102f0578063a2a9501714610306578063ab2852301461032157600080fd5b806349e3284e116100e757806349e3284e146102035780635d93f9af146102225780635eb9951414610256578063715018a614610276578063758465621461028b57600080fd5b8062d872ae1461012357806318160ddd1461014c5780631a7f5bec1461016157806329b7b3fd146101ad5780633a94fe51146101e1575b600080fd5b34801561012f57600080fd5b5061013960035481565b6040519081526020015b60405180910390f35b34801561015857600080fd5b506101396103a5565b34801561016d57600080fd5b506101957f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b039091168152602001610143565b3480156101b957600080fd5b506101397f000000000000000000000000000000000000000000000000000000000000000081565b3480156101ed57600080fd5b506102016101fc3660046117ea565b610404565b005b34801561020f57600080fd5b5060035460405190158152602001610143565b34801561022e57600080fd5b506101957f000000000000000000000000000000000000000000000000000000000000000081565b34801561026257600080fd5b5061020161027136600461183e565b610646565b34801561028257600080fd5b5061020161065a565b61020161029936600461186c565b61066e565b3480156102aa57600080fd5b506101397f000000000000000000000000000000000000000000000000000000000000000081565b3480156102de57600080fd5b506001546001600160a01b0316610195565b3480156102fc57600080fd5b5061013960045481565b34801561031257600080fd5b506101956001600160981b0181565b34801561032d57600080fd5b50610139620186a081565b34801561034457600080fd5b50610195600160981b81565b34801561035c57600080fd5b5061020161036b3660046118d0565b6109ca565b34801561037c57600080fd5b50600054610139565b34801561039157600080fd5b506102016103a0366004611959565b610afd565b6000806103bf6001600160981b0131600160981b31611993565b905060007f00000000000000000000000000000000000000000000000000000000000000006004546103f19190611993565b90506103fd82826119a6565b9250505090565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d820e64f6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610464573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061048891906119b9565b90506000600160981b6001600160a01b03163190506000826001600160a01b031663624488506040518060c001604052807f000000000000000000000000000000000000000000000000000000000000000081526020017f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031681526020018980360381019061051f91906119d6565b8152602001620186a081526020018888808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152505050908252506040805160208082018990528251808303820181528284019093529092019161059191600191606001611a8c565b6040516020818303038152906040528152506040518263ffffffff1660e01b81526004016105bf9190611b07565b6020604051808303816000875af11580156105de573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106029190611b85565b9050807f2550fa6041684d40e635e29e93dde9017d70c25b46aa88393317b5182ed6ae7c8360405161063691815260200190565b60405180910390a2505050505050565b61064e610b73565b61065781610b7b565b50565b610662610d19565b61066c6000610d73565b565b610676610dc5565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d820e64f6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156106d6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106fa91906119b9565b90506001600160a01b03851661072b5760405162461bcd60e51b815260040161072290611b9e565b60405180910390fd5b600354156107985760405162461bcd60e51b815260206004820152603460248201527f4e6174697665546f6b656e44657374696e6174696f6e3a20636f6e7472616374604482015273081d5b99195c98dbdb1b185d195c985b1a5e995960621b6064820152608401610722565b60006020850135156107d7576107be6107b46020870187611959565b8660200135610e1c565b90506107d76107d06020870187611959565b8383610f86565b6107e86001600160981b013461106b565b6000826001600160a01b031663624488506040518060c001604052807f000000000000000000000000000000000000000000000000000000000000000081526020017f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031681526020018980360381019061086a91906119d6565b8152602001620186a08152602001888880806020026020016040519081016040528093929190818152602001838360200280828437600092018290525093855250506040516020938401936108d892508e913491016001600160a01b03929092168252602082015260400190565b60408051601f19818403018152908290526108f69291602001611a8c565b6040516020818303038152906040528152506040518263ffffffff1660e01b81526004016109249190611b07565b6020604051808303816000875af1158015610943573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109679190611b85565b905080876001600160a01b0316336001600160a01b03167f0322cbb1d3c23f6dbf1deddb3b4ef3ce0f93ae6eec7b44e4f395804104466d14346040516109af91815260200190565b60405180910390a45050506109c46001600255565b50505050565b60005460405163260f846760e11b81523360048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690634c1f08ce90602401602060405180830381865afa158015610a31573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a559190611b85565b1015610abc5760405162461bcd60e51b815260206004820152603060248201527f54656c65706f727465725570677261646561626c653a20696e76616c6964205460448201526f32b632b837b93a32b91039b2b73232b960811b6064820152608401610722565b6109c4848484848080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061118992505050565b610b05610d19565b6001600160a01b038116610b6a5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610722565b61065781610d73565b61066c610d19565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663c07f47d46040518163ffffffff1660e01b8152600401602060405180830381865afa158015610bdb573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610bff9190611b85565b60005490915081831115610c6f5760405162461bcd60e51b815260206004820152603160248201527f54656c65706f727465725570677261646561626c653a20696e76616c6964205460448201527032b632b837b93a32b9103b32b939b4b7b760791b6064820152608401610722565b808311610ce45760405162461bcd60e51b815260206004820152603f60248201527f54656c65706f727465725570677261646561626c653a206e6f7420677265617460448201527f6572207468616e2063757272656e74206d696e696d756d2076657273696f6e006064820152608401610722565b6000838155604051849183917fa9a7ef57e41f05b4c15480842f5f0c27edfcbb553fed281f7c4068452cc1c02d9190a3505050565b6001546001600160a01b0316331461066c5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610722565b600180546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6002805403610e165760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610722565b60028055565b6040516370a0823160e01b815230600482015260009081906001600160a01b038516906370a0823190602401602060405180830381865afa158015610e65573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e899190611b85565b9050610ea06001600160a01b0385163330866114ec565b6040516370a0823160e01b81523060048201526000906001600160a01b038616906370a0823190602401602060405180830381865afa158015610ee7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f0b9190611b85565b9050818111610f715760405162461bcd60e51b815260206004820152602c60248201527f5361666545524332305472616e7366657246726f6d3a2062616c616e6365206e60448201526b1bdd081a5b98dc99585cd95960a21b6064820152608401610722565b610f7b82826119a6565b925050505b92915050565b604051636eb1769f60e11b81523060048201526001600160a01b038381166024830152600091839186169063dd62ed3e90604401602060405180830381865afa158015610fd7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ffb9190611b85565b6110059190611993565b6040516001600160a01b0385166024820152604481018290529091506109c490859063095ea7b360e01b906064015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152611524565b804710156110bb5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e63650000006044820152606401610722565b6000826001600160a01b03168260405160006040518083038185875af1925050503d8060008114611108576040519150601f19603f3d011682016040523d82523d6000602084013e61110d565b606091505b50509050806111845760405162461bcd60e51b815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d617920686176652072657665727465640000000000006064820152608401610722565b505050565b7f0000000000000000000000000000000000000000000000000000000000000000831461120d5760405162461bcd60e51b815260206004820152602c60248201527f4e6174697665546f6b656e44657374696e6174696f6e3a20696e76616c69642060448201526b39b7bab931b29031b430b4b760a11b6064820152608401610722565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316826001600160a01b0316146112a25760405162461bcd60e51b815260206004820152602b60248201527f4e6174697665546f6b656e44657374696e6174696f6e3a20756e617574686f7260448201526a34bd32b21039b2b73232b960a91b6064820152608401610722565b600080828060200190518101906112b99190611bec565b90925090506001600160a01b0382166112e45760405162461bcd60e51b815260040161072290611b9e565b806000036113485760405162461bcd60e51b815260206004820152602b60248201527f4e6174697665546f6b656e44657374696e6174696f6e3a207a65726f2074726160448201526a6e736665722076616c756560a81b6064820152608401610722565b60035481901561140d576003548211156113b15760035460408051918252600060208301527f244160b15e69cc411f041d94ae7fab6f6bba85dade8403216c05ff4b920d5449910160405180910390a16003546113a590836119a6565b6000600355905061140d565b81600360008282546113c391906119a6565b90915550506003546040805184815260208101929092527f244160b15e69cc411f041d94ae7fab6f6bba85dade8403216c05ff4b920d5449910160405180910390a1505050505050565b806004600082825461141f9190611993565b90915550506040518181526001600160a01b038416907fd949ea0e9d5db53492d77f28fd5467fb2f6c4f5b88e3350e3c36729b76e99cf29060200160405180910390a26040516327ad555d60e11b81526001600160a01b038481166004830152602482018390527f00000000000000000000000000000000000000000000000000000000000000001690634f5aaaba90604401600060405180830381600087803b1580156114cc57600080fd5b505af11580156114e0573d6000803e3d6000fd5b50505050505050505050565b6040516001600160a01b03808516602483015283166044820152606481018290526109c49085906323b872dd60e01b90608401611034565b6000611579826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166115f69092919063ffffffff16565b80519091501561118457808060200190518101906115979190611c1a565b6111845760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610722565b6060611605848460008561160d565b949350505050565b60608247101561166e5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b6064820152608401610722565b600080866001600160a01b0316858760405161168a9190611c3c565b60006040518083038185875af1925050503d80600081146116c7576040519150601f19603f3d011682016040523d82523d6000602084013e6116cc565b606091505b50915091506116dd878383876116e8565b979650505050505050565b60608315611757578251600003611750576001600160a01b0385163b6117505760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610722565b5081611605565b611605838381511561176c5781518083602001fd5b8060405162461bcd60e51b81526004016107229190611c58565b60006040828403121561179857600080fd5b50919050565b60008083601f8401126117b057600080fd5b50813567ffffffffffffffff8111156117c857600080fd5b6020830191508360208260051b85010111156117e357600080fd5b9250929050565b6000806000606084860312156117ff57600080fd5b6118098585611786565b9250604084013567ffffffffffffffff81111561182557600080fd5b6118318682870161179e565b9497909650939450505050565b60006020828403121561185057600080fd5b5035919050565b6001600160a01b038116811461065757600080fd5b6000806000806080858703121561188257600080fd5b843561188d81611857565b935061189c8660208701611786565b9250606085013567ffffffffffffffff8111156118b857600080fd5b6118c48782880161179e565b95989497509550505050565b600080600080606085870312156118e657600080fd5b8435935060208501356118f881611857565b9250604085013567ffffffffffffffff8082111561191557600080fd5b818701915087601f83011261192957600080fd5b81358181111561193857600080fd5b88602082850101111561194a57600080fd5b95989497505060200194505050565b60006020828403121561196b57600080fd5b813561197681611857565b9392505050565b634e487b7160e01b600052601160045260246000fd5b80820180821115610f8057610f8061197d565b81810381811115610f8057610f8061197d565b6000602082840312156119cb57600080fd5b815161197681611857565b6000604082840312156119e857600080fd5b6040516040810181811067ffffffffffffffff82111715611a1957634e487b7160e01b600052604160045260246000fd5b6040528235611a2781611857565b81526020928301359281019290925250919050565b60005b83811015611a57578181015183820152602001611a3f565b50506000910152565b60008151808452611a78816020860160208601611a3c565b601f01601f19169290920160200192915050565b600060028410611aac57634e487b7160e01b600052602160045260246000fd5b838252604060208301526116056040830184611a60565b600081518084526020808501945080840160005b83811015611afc5781516001600160a01b031687529582019590820190600101611ad7565b509495945050505050565b60208152815160208201526000602083015160018060a01b03808216604085015260408501519150808251166060850152506020810151608084015250606083015160a0830152608083015160e060c0840152611b68610100840182611ac3565b905060a0840151601f198483030160e0850152610f7b8282611a60565b600060208284031215611b9757600080fd5b5051919050565b6020808252602e908201527f4e6174697665546f6b656e44657374696e6174696f6e3a207a65726f2072656360408201526d697069656e74206164647265737360901b606082015260800190565b60008060408385031215611bff57600080fd5b8251611c0a81611857565b6020939093015192949293505050565b600060208284031215611c2c57600080fd5b8151801515811461197657600080fd5b60008251611c4e818460208701611a3c565b9190910192915050565b6020815260006119766020830184611a6056fea26469706673582212209aa49d86bfc3a8e13710af327408a51a1a6df9af0dba5cd63b0423382ed4d7d564736f6c634300081200334e6174697665546f6b656e44657374696e6174696f6e3a207a65726f20736f75", } // NativeTokenDestinationABI is the input ABI used to generate the binding from. diff --git a/contracts/src/CrossChainApplications/NativeTokenBridge/NativeTokenDestination.sol b/contracts/src/CrossChainApplications/NativeTokenBridge/NativeTokenDestination.sol index 2bbd4455d..98f166005 100644 --- a/contracts/src/CrossChainApplications/NativeTokenBridge/NativeTokenDestination.sol +++ b/contracts/src/CrossChainApplications/NativeTokenBridge/NativeTokenDestination.sol @@ -176,6 +176,24 @@ contract NativeTokenDestination is }); } + /** + * @dev See {INativeTokenDestination-isCollateralized}. + */ + function isCollateralized() external view returns (bool) { + return currentReserveImbalance == 0; + } + + /** + * @dev See {INativeTokenDestination-totalSupply}. + */ + function totalSupply() external view returns (uint256) { + uint256 burned = address(BURNED_TX_FEES_ADDRESS).balance + + address(BURN_FOR_TRANSFER_ADDRESS).balance; + uint256 created = totalMinted + initialReserveImbalance; + + return created - burned; + } + /** * @dev See {ITeleporterReceiver-receiveTeleporterMessage}. * @@ -235,22 +253,4 @@ contract NativeTokenDestination is // Calls NativeMinter precompile through INativeMinter interface. _nativeMinter.mintNativeCoin(recipient, adjustedAmount); } - - /** - * @dev See {INativeTokenDestination-isCollateralized}. - */ - function isCollateralized() external view returns (bool) { - return currentReserveImbalance == 0; - } - - /** - * @dev See {INativeTokenDestination-totalSupply}. - */ - function totalSupply() external view returns (uint256) { - uint256 burned = address(BURNED_TX_FEES_ADDRESS).balance + - address(BURN_FOR_TRANSFER_ADDRESS).balance; - uint256 created = totalMinted + initialReserveImbalance; - - return created - burned; - } } diff --git a/contracts/src/CrossChainApplications/NativeTokenBridge/tests/NativeTokenSourceTests.t.sol b/contracts/src/CrossChainApplications/NativeTokenBridge/tests/NativeTokenSourceTests.t.sol index afb3bce78..2201d925c 100644 --- a/contracts/src/CrossChainApplications/NativeTokenBridge/tests/NativeTokenSourceTests.t.sol +++ b/contracts/src/CrossChainApplications/NativeTokenBridge/tests/NativeTokenSourceTests.t.sol @@ -361,10 +361,20 @@ contract NativeTokenSourceTest is Test { ); } - function _formatNativeTokenSourceErrorMessage( - string memory errorMessage - ) private pure returns (bytes memory) { - return bytes(string.concat("NativeTokenSource: ", errorMessage)); + function testInsufficientCollateral() public { + vm.expectRevert( + _formatNativeTokenSourceErrorMessage("insufficient collateral") + ); + + vm.prank(MOCK_TELEPORTER_MESSENGER_ADDRESS); + nativeTokenSource.receiveTeleporterMessage( + _DEFAULT_OTHER_CHAIN_ID, + _DEFAULT_OTHER_BRIDGE_ADDRESS, + abi.encode( + ITokenSource.SourceAction.Unlock, + abi.encode(_DEFAULT_RECIPIENT, _DEFAULT_TRANSFER_AMOUNT) + ) + ); } function _initMockTeleporterRegistry() internal { @@ -405,19 +415,9 @@ contract NativeTokenSourceTest is Test { ); } - function testInsufficientCollateral() public { - vm.expectRevert( - _formatNativeTokenSourceErrorMessage("insufficient collateral") - ); - - vm.prank(MOCK_TELEPORTER_MESSENGER_ADDRESS); - nativeTokenSource.receiveTeleporterMessage( - _DEFAULT_OTHER_CHAIN_ID, - _DEFAULT_OTHER_BRIDGE_ADDRESS, - abi.encode( - ITokenSource.SourceAction.Unlock, - abi.encode(_DEFAULT_RECIPIENT, _DEFAULT_TRANSFER_AMOUNT) - ) - ); + function _formatNativeTokenSourceErrorMessage( + string memory errorMessage + ) private pure returns (bytes memory) { + return bytes(string.concat("NativeTokenSource: ", errorMessage)); } } From e2e6b337924e3010e2bea6c3f13264ad09046220 Mon Sep 17 00:00:00 2001 From: Geoff Stuart Date: Fri, 15 Dec 2023 13:29:09 -0500 Subject: [PATCH 07/12] Merge cleanup --- .../ERC20TokenSource/ERC20TokenSource.go | 365 +++++++++++++++++- .../NativeTokenDestination.go | 365 +++++++++++++++++- .../NativeTokenSource/NativeTokenSource.go | 365 +++++++++++++++++- .../NativeTokenBridge/ERC20TokenSource.sol | 22 +- .../NativeTokenDestination.sol | 44 +-- .../NativeTokenBridge/NativeTokenSource.sol | 22 +- .../tests/ERC20TokenSourceTests.t.sol | 86 ++--- .../tests/NativeTokenDestinationTests.t.sol | 48 +-- .../tests/NativeTokenSourceTests.t.sol | 84 ++-- 9 files changed, 1211 insertions(+), 190 deletions(-) diff --git a/abi-bindings/go/CrossChainApplications/NativeTokenBridge/ERC20TokenSource/ERC20TokenSource.go b/abi-bindings/go/CrossChainApplications/NativeTokenBridge/ERC20TokenSource/ERC20TokenSource.go index 91c1b7c04..d8a8909f8 100644 --- a/abi-bindings/go/CrossChainApplications/NativeTokenBridge/ERC20TokenSource/ERC20TokenSource.go +++ b/abi-bindings/go/CrossChainApplications/NativeTokenBridge/ERC20TokenSource/ERC20TokenSource.go @@ -31,8 +31,8 @@ var ( // ERC20TokenSourceMetaData contains all meta data concerning the ERC20TokenSource contract. var ERC20TokenSourceMetaData = &bind.MetaData{ - ABI: "[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"teleporterRegistryAddress\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"destinationBlockchainID_\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"nativeTokenDestinationAddress_\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"erc20ContractAddress_\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"BurnTokens\",\"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\":\"sender\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"teleporterMessageID\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"TransferToDestination\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"UnlockTokens\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"BURNED_TX_FEES_ADDRESS\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"MINT_NATIVE_TOKENS_REQUIRED_GAS\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"destinationBlockchainID\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"destinationBurnedTotal\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"erc20ContractAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getMinTeleporterVersion\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"nativeTokenDestinationAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"originBlockchainID\",\"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\":[],\"name\":\"teleporterRegistry\",\"outputs\":[{\"internalType\":\"contractTeleporterRegistry\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"totalAmount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"feeAmount\",\"type\":\"uint256\"},{\"internalType\":\"address[]\",\"name\":\"allowedRelayerAddresses\",\"type\":\"address[]\"}],\"name\":\"transferToDestination\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"version\",\"type\":\"uint256\"}],\"name\":\"updateMinTeleporterVersion\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", - Bin: "0x6101006040523480156200001257600080fd5b5060405162001c6f38038062001c6f8339810160408190526200003591620003f0565b83806001600160a01b038116620000b95760405162461bcd60e51b815260206004820152603760248201527f54656c65706f727465725570677261646561626c653a207a65726f2074656c6560448201527f706f72746572207265676973747279206164647265737300000000000000000060648201526084015b60405180910390fd5b6001600160a01b03811660808190526040805163301fd1f560e21b8152905163c07f47d4916004808201926020929091908290030181865afa15801562000104573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200012a919062000444565b60005550620001393362000381565b50600160025582620001965760405162461bcd60e51b8152602060048201526030602482015260008051602062001c4f83398151915260448201526f1bdb88189b1bd8dad8da185a5b88125160821b6064820152608401620000b0565b7302000000000000000000000000000000000000056001600160a01b0316634213cf786040518163ffffffff1660e01b8152600401602060405180830381865afa158015620001e9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200020f919062000444565b8303620002855760405162461bcd60e51b815260206004820152603460248201527f4552433230546f6b656e536f757263653a2063616e6e6f74206272696467652060448201527f776974682073616d6520626c6f636b636861696e0000000000000000000000006064820152608401620000b0565b60a08390526001600160a01b038216620002f75760405162461bcd60e51b8152602060048201526033602482015260008051602062001c4f83398151915260448201527f6f6e20636f6e74726163742061646472657373000000000000000000000000006064820152608401620000b0565b6001600160a01b0380831660c05281166200036b5760405162461bcd60e51b815260206004820152602d60248201527f4552433230546f6b656e536f757263653a207a65726f20455243323020636f6e60448201526c7472616374206164647265737360981b6064820152608401620000b0565b6001600160a01b031660e052506200045e915050565b600180546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b80516001600160a01b0381168114620003eb57600080fd5b919050565b600080600080608085870312156200040757600080fd5b6200041285620003d3565b9350602085015192506200042960408601620003d3565b91506200043960608601620003d3565b905092959194509250565b6000602082840312156200045757600080fd5b5051919050565b60805160a05160c05160e051611764620004eb6000396000818161020e0152818161032f015281816103c7015281816104790152818161100501526110d90152600081816101c10152818161043f0152610d13015260008181610138015281816104190152610c9001526000818160f401528181610277015281816105ff01526107a201526117646000f3fe608060405234801561001057600080fd5b50600436106100ea5760003560e01c8063b6171f731161008c578063c868efaa11610066578063c868efaa146101ee578063d2cc7a7014610201578063e486df1514610209578063f2fde38b1461023057600080fd5b8063b6171f73146101b2578063b8c9091a146101bc578063c452165e146101e357600080fd5b80635eb99514116100c85780635eb9951414610171578063715018a61461018657806387a2edba1461018e5780638da5cb5b146101a157600080fd5b80631a7f5bec146100ef57806341d3014d1461013357806355db3e9e14610168575b600080fd5b6101167f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020015b60405180910390f35b61015a7f000000000000000000000000000000000000000000000000000000000000000081565b60405190815260200161012a565b61015a60035481565b61018461017f36600461127c565b610243565b005b610184610257565b61018461019c3660046112aa565b61026b565b6001546001600160a01b0316610116565b61015a620186a081565b6101167f000000000000000000000000000000000000000000000000000000000000000081565b610116600160981b81565b6101846101fc366004611343565b6105e7565b60005461015a565b6101167f000000000000000000000000000000000000000000000000000000000000000081565b61018461023e3660046113cc565b610720565b61024b610796565b6102548161079e565b50565b61025f61093c565b6102696000610996565b565b6102736109e8565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d820e64f6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156102d3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102f791906113f0565b90506001600160a01b0386166103285760405162461bcd60e51b815260040161031f9061140d565b60405180910390fd5b60006103547f000000000000000000000000000000000000000000000000000000000000000087610a3f565b90508481116103bc5760405162461bcd60e51b815260206004820152602e60248201527f4552433230546f6b656e536f757263653a20696e73756666696369656e74206160448201526d191a9d5cdd195908185b5bdd5b9d60921b606482015260840161031f565b84156103ed576103ed7f00000000000000000000000000000000000000000000000000000000000000008387610ba9565b60006103f9868361146b565b90506000836001600160a01b031663624488506040518060c001604052807f000000000000000000000000000000000000000000000000000000000000000081526020017f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316815260200160405180604001604052807f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031681526020018c8152508152602001620186a08152602001898980806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250505090825250604080516001600160a01b038f166020808301919091529181018890529101906060016040516020818303038152906040528152506040518263ffffffff1660e01b815260040161053f9190611512565b6020604051808303816000875af115801561055e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105829190611590565b905080896001600160a01b0316336001600160a01b03167f2b4e8f08417773e367064a6aea9ca2df303a60876676f70b6c3c5e66b314ca5a856040516105ca91815260200190565b60405180910390a4505050506105e06001600255565b5050505050565b60005460405163260f846760e11b81523360048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690634c1f08ce90602401602060405180830381865afa15801561064e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106729190611590565b10156106d95760405162461bcd60e51b815260206004820152603060248201527f54656c65706f727465725570677261646561626c653a20696e76616c6964205460448201526f32b632b837b93a32b91039b2b73232b960811b606482015260840161031f565b61071a848484848080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250610c8e92505050565b50505050565b61072861093c565b6001600160a01b03811661078d5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161031f565b61025481610996565b61026961093c565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663c07f47d46040518163ffffffff1660e01b8152600401602060405180830381865afa1580156107fe573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108229190611590565b600054909150818311156108925760405162461bcd60e51b815260206004820152603160248201527f54656c65706f727465725570677261646561626c653a20696e76616c6964205460448201527032b632b837b93a32b9103b32b939b4b7b760791b606482015260840161031f565b8083116109075760405162461bcd60e51b815260206004820152603f60248201527f54656c65706f727465725570677261646561626c653a206e6f7420677265617460448201527f6572207468616e2063757272656e74206d696e696d756d2076657273696f6e00606482015260840161031f565b6000838155604051849183917fa9a7ef57e41f05b4c15480842f5f0c27edfcbb553fed281f7c4068452cc1c02d9190a3505050565b6001546001600160a01b031633146102695760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161031f565b600180546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6002805403610a395760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015260640161031f565b60028055565b6040516370a0823160e01b815230600482015260009081906001600160a01b038516906370a0823190602401602060405180830381865afa158015610a88573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610aac9190611590565b9050610ac36001600160a01b038516333086610e89565b6040516370a0823160e01b81523060048201526000906001600160a01b038616906370a0823190602401602060405180830381865afa158015610b0a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b2e9190611590565b9050818111610b945760405162461bcd60e51b815260206004820152602c60248201527f5361666545524332305472616e7366657246726f6d3a2062616c616e6365206e60448201526b1bdd081a5b98dc99585cd95960a21b606482015260840161031f565b610b9e828261146b565b925050505b92915050565b604051636eb1769f60e11b81523060048201526001600160a01b038381166024830152600091839186169063dd62ed3e90604401602060405180830381865afa158015610bfa573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c1e9190611590565b610c2891906115a9565b6040516001600160a01b03851660248201526044810182905290915061071a90859063095ea7b360e01b906064015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152610ec1565b7f00000000000000000000000000000000000000000000000000000000000000008314610d115760405162461bcd60e51b815260206004820152602b60248201527f4552433230546f6b656e536f757263653a20696e76616c69642064657374696e60448201526a30ba34b7b71031b430b4b760a91b606482015260840161031f565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316826001600160a01b031614610da05760405162461bcd60e51b815260206004820152602560248201527f4552433230546f6b656e536f757263653a20756e617574686f72697a6564207360448201526432b73232b960d91b606482015260840161031f565b60008082806020019051810190610db791906115d2565b90925090506000826001811115610dd057610dd0611699565b03610e015760008082806020019051810190610dec91906116af565b91509150610dfa8282610f98565b50506105e0565b6001826001811115610e1557610e15611699565b03610e4157600081806020019051810190610e309190611590565b9050610e3b8161102f565b506105e0565b60405162461bcd60e51b815260206004820181905260248201527f4552433230546f6b656e536f757263653a20696e76616c696420616374696f6e604482015260640161031f565b6040516001600160a01b038085166024830152831660448201526064810182905261071a9085906323b872dd60e01b90608401610c57565b6000610f16826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b031661105a9092919063ffffffff16565b805190915015610f935780806020019051810190610f3491906116dd565b610f935760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b606482015260840161031f565b505050565b6001600160a01b038216610fbe5760405162461bcd60e51b815260040161031f9061140d565b604080516001600160a01b0384168152602081018390527f55aaef8fd8c07238c3618a93c8a1627194187d3b0952908e58f2ab0f944fb407910160405180910390a161102b7f00000000000000000000000000000000000000000000000000000000000000008383611071565b5050565b60035481111561025457600060035482611049919061146b565b9050611054816110a1565b50600355565b60606110698484600085611103565b949350505050565b6040516001600160a01b038316602482015260448101829052610f9390849063a9059cbb60e01b90606401610c57565b6040518181527f2cd3fd70cd5a5d6d805e90d22741aa1a84590ace7cf01b244719558d266143829060200160405180910390a16102547f0000000000000000000000000000000000000000000000000000000000000000600160981b83611071565b6060824710156111645760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b606482015260840161031f565b600080866001600160a01b0316858760405161118091906116ff565b60006040518083038185875af1925050503d80600081146111bd576040519150601f19603f3d011682016040523d82523d6000602084013e6111c2565b606091505b50915091506111d3878383876111de565b979650505050505050565b6060831561124d578251600003611246576001600160a01b0385163b6112465760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015260640161031f565b5081611069565b61106983838151156112625781518083602001fd5b8060405162461bcd60e51b815260040161031f919061171b565b60006020828403121561128e57600080fd5b5035919050565b6001600160a01b038116811461025457600080fd5b6000806000806000608086880312156112c257600080fd5b85356112cd81611295565b94506020860135935060408601359250606086013567ffffffffffffffff808211156112f857600080fd5b818801915088601f83011261130c57600080fd5b81358181111561131b57600080fd5b8960208260051b850101111561133057600080fd5b9699959850939650602001949392505050565b6000806000806060858703121561135957600080fd5b84359350602085013561136b81611295565b9250604085013567ffffffffffffffff8082111561138857600080fd5b818701915087601f83011261139c57600080fd5b8135818111156113ab57600080fd5b8860208285010111156113bd57600080fd5b95989497505060200194505050565b6000602082840312156113de57600080fd5b81356113e981611295565b9392505050565b60006020828403121561140257600080fd5b81516113e981611295565b60208082526028908201527f4552433230546f6b656e536f757263653a207a65726f20726563697069656e74604082015267206164647265737360c01b606082015260800190565b634e487b7160e01b600052601160045260246000fd5b81810381811115610ba357610ba3611455565b600081518084526020808501945080840160005b838110156114b75781516001600160a01b031687529582019590820190600101611492565b509495945050505050565b60005b838110156114dd5781810151838201526020016114c5565b50506000910152565b600081518084526114fe8160208601602086016114c2565b601f01601f19169290920160200192915050565b60208152815160208201526000602083015160018060a01b03808216604085015260408501519150808251166060850152506020810151608084015250606083015160a0830152608083015160e060c084015261157361010084018261147e565b905060a0840151601f198483030160e0850152610b9e82826114e6565b6000602082840312156115a257600080fd5b5051919050565b80820180821115610ba357610ba3611455565b634e487b7160e01b600052604160045260246000fd5b600080604083850312156115e557600080fd5b8251600281106115f457600080fd5b602084015190925067ffffffffffffffff8082111561161257600080fd5b818501915085601f83011261162657600080fd5b815181811115611638576116386115bc565b604051601f8201601f19908116603f01168101908382118183101715611660576116606115bc565b8160405282815288602084870101111561167957600080fd5b61168a8360208301602088016114c2565b80955050505050509250929050565b634e487b7160e01b600052602160045260246000fd5b600080604083850312156116c257600080fd5b82516116cd81611295565b6020939093015192949293505050565b6000602082840312156116ef57600080fd5b815180151581146113e957600080fd5b600082516117118184602087016114c2565b9190910192915050565b6020815260006113e960208301846114e656fea26469706673582212202b477debc413e4df6b88956d9daee867841d0e80d4658bf39da44b529b21686964736f6c634300081200334552433230546f6b656e536f757263653a207a65726f2064657374696e617469", + ABI: "[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"teleporterRegistryAddress\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"destinationBlockchainID_\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"nativeTokenDestinationAddress_\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"erc20ContractAddress_\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"BurnTokens\",\"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\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"teleporterMessageID\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"TransferToDestination\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"UnlockTokens\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"BURNED_TX_FEES_ADDRESS\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"MINT_NATIVE_TOKENS_REQUIRED_GAS\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"destinationBlockchainID\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"destinationBurnedTotal\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"erc20ContractAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"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\":\"nativeTokenDestinationAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"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\":\"originBlockchainID\",\"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\":[],\"name\":\"teleporterRegistry\",\"outputs\":[{\"internalType\":\"contractTeleporterRegistry\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"totalAmount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"feeAmount\",\"type\":\"uint256\"},{\"internalType\":\"address[]\",\"name\":\"allowedRelayerAddresses\",\"type\":\"address[]\"}],\"name\":\"transferToDestination\",\"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: "0x6101006040523480156200001257600080fd5b5060405162001fb438038062001fb48339810160408190526200003591620003f0565b83806001600160a01b038116620000b95760405162461bcd60e51b815260206004820152603760248201527f54656c65706f727465725570677261646561626c653a207a65726f2074656c6560448201527f706f72746572207265676973747279206164647265737300000000000000000060648201526084015b60405180910390fd5b6001600160a01b03811660808190526040805163301fd1f560e21b8152905163c07f47d4916004808201926020929091908290030181865afa15801562000104573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200012a919062000444565b60015550620001393362000381565b50600160035582620001965760405162461bcd60e51b8152602060048201526030602482015260008051602062001f9483398151915260448201526f1bdb88189b1bd8dad8da185a5b88125160821b6064820152608401620000b0565b7302000000000000000000000000000000000000056001600160a01b0316634213cf786040518163ffffffff1660e01b8152600401602060405180830381865afa158015620001e9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200020f919062000444565b8303620002855760405162461bcd60e51b815260206004820152603460248201527f4552433230546f6b656e536f757263653a2063616e6e6f74206272696467652060448201527f776974682073616d6520626c6f636b636861696e0000000000000000000000006064820152608401620000b0565b60a08390526001600160a01b038216620002f75760405162461bcd60e51b8152602060048201526033602482015260008051602062001f9483398151915260448201527f6f6e20636f6e74726163742061646472657373000000000000000000000000006064820152608401620000b0565b6001600160a01b0380831660c05281166200036b5760405162461bcd60e51b815260206004820152602d60248201527f4552433230546f6b656e536f757263653a207a65726f20455243323020636f6e60448201526c7472616374206164647265737360981b6064820152608401620000b0565b6001600160a01b031660e052506200045e915050565b600280546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b80516001600160a01b0381168114620003eb57600080fd5b919050565b600080600080608085870312156200040757600080fd5b6200041285620003d3565b9350602085015192506200042960408601620003d3565b91506200043960608601620003d3565b905092959194509250565b6000602082840312156200045757600080fd5b5051919050565b60805160a05160c05160e051611aa8620004ec60003960008181610291015281816105a801528181610640015281816106f2015281816112fb01526113cf015260008181610244015281816106b8015261100901526000818161016e015281816106920152610f86015260008181610115015281816104f9015281816108780152610a940152611aa86000f3fe608060405234801561001057600080fd5b506004361061010b5760003560e01c80638da5cb5b116100a2578063c452165e11610071578063c452165e14610266578063c868efaa14610271578063d2cc7a7014610284578063e486df151461028c578063f2fde38b146102b357600080fd5b80638da5cb5b146101e857806397314297146101f9578063b6171f7314610235578063b8c9091a1461023f57600080fd5b806355db3e9e116100de57806355db3e9e146101b15780635eb99514146101ba578063715018a6146101cd57806387a2edba146101d557600080fd5b80631a7f5bec146101105780632b0d8f181461015457806341d3014d146101695780634511243e1461019e575b600080fd5b6101377f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020015b60405180910390f35b610167610162366004611587565b6102c6565b005b6101907f000000000000000000000000000000000000000000000000000000000000000081565b60405190815260200161014b565b6101676101ac366004611587565b6103c8565b61019060045481565b6101676101c83660046115ab565b6104c5565b6101676104d9565b6101676101e33660046115c4565b6104ed565b6002546001600160a01b0316610137565b610225610207366004611587565b6001600160a01b031660009081526020819052604090205460ff1690565b604051901515815260200161014b565b610190620186a081565b6101377f000000000000000000000000000000000000000000000000000000000000000081565b610137600160981b81565b61016761027f36600461165d565b610860565b600154610190565b6101377f000000000000000000000000000000000000000000000000000000000000000081565b6101676102c1366004611587565b610a12565b6102ce610a88565b6001600160a01b0381166102fd5760405162461bcd60e51b81526004016102f4906116e6565b60405180910390fd5b6001600160a01b03811660009081526020819052604090205460ff161561037c5760405162461bcd60e51b815260206004820152602d60248201527f54656c65706f727465725570677261646561626c653a2061646472657373206160448201526c1b1c9958591e481c185d5cd959609a1b60648201526084016102f4565b6001600160a01b038116600081815260208190526040808220805460ff19166001179055517f933f93e57a222e6330362af8b376d0a8725b6901e9a2fb86d00f169702b28a4c9190a250565b6103d0610a88565b6001600160a01b0381166103f65760405162461bcd60e51b81526004016102f4906116e6565b6001600160a01b03811660009081526020819052604090205460ff166104705760405162461bcd60e51b815260206004820152602960248201527f54656c65706f727465725570677261646561626c653a2061646472657373206e6044820152681bdd081c185d5cd95960ba1b60648201526084016102f4565b6040516001600160a01b038216907f844e2f3154214672229235858fd029d1dfd543901c6d05931f0bc2480a2d72c390600090a26001600160a01b03166000908152602081905260409020805460ff19169055565b6104cd610a88565b6104d681610a90565b50565b6104e1610c30565b6104eb6000610c8a565b565b6104f5610cdc565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d820e64f6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610555573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105799190611734565b90506001600160a01b0386166105a15760405162461bcd60e51b81526004016102f490611751565b60006105cd7f000000000000000000000000000000000000000000000000000000000000000087610d35565b90508481116106355760405162461bcd60e51b815260206004820152602e60248201527f4552433230546f6b656e536f757263653a20696e73756666696369656e74206160448201526d191a9d5cdd195908185b5bdd5b9d60921b60648201526084016102f4565b8415610666576106667f00000000000000000000000000000000000000000000000000000000000000008387610e9f565b600061067286836117af565b90506000836001600160a01b031663624488506040518060c001604052807f000000000000000000000000000000000000000000000000000000000000000081526020017f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316815260200160405180604001604052807f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031681526020018c8152508152602001620186a08152602001898980806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250505090825250604080516001600160a01b038f166020808301919091529181018890529101906060016040516020818303038152906040528152506040518263ffffffff1660e01b81526004016107b89190611856565b6020604051808303816000875af11580156107d7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107fb91906118d4565b905080896001600160a01b0316336001600160a01b03167f2b4e8f08417773e367064a6aea9ca2df303a60876676f70b6c3c5e66b314ca5a8560405161084391815260200190565b60405180910390a4505050506108596001600355565b5050505050565b60015460405163260f846760e11b81523360048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690634c1f08ce90602401602060405180830381865afa1580156108c7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108eb91906118d4565b10156109525760405162461bcd60e51b815260206004820152603060248201527f54656c65706f727465725570677261646561626c653a20696e76616c6964205460448201526f32b632b837b93a32b91039b2b73232b960811b60648201526084016102f4565b3360009081526020819052604090205460ff16156109cb5760405162461bcd60e51b815260206004820152603060248201527f54656c65706f727465725570677261646561626c653a2054656c65706f72746560448201526f1c881859191c995cdcc81c185d5cd95960821b60648201526084016102f4565b610a0c848484848080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250610f8492505050565b50505050565b610a1a610c30565b6001600160a01b038116610a7f5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016102f4565b6104d681610c8a565b6104eb610c30565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663c07f47d46040518163ffffffff1660e01b8152600401602060405180830381865afa158015610af0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b1491906118d4565b60015490915081831115610b845760405162461bcd60e51b815260206004820152603160248201527f54656c65706f727465725570677261646561626c653a20696e76616c6964205460448201527032b632b837b93a32b9103b32b939b4b7b760791b60648201526084016102f4565b808311610bf95760405162461bcd60e51b815260206004820152603f60248201527f54656c65706f727465725570677261646561626c653a206e6f7420677265617460448201527f6572207468616e2063757272656e74206d696e696d756d2076657273696f6e0060648201526084016102f4565b6001839055604051839082907fa9a7ef57e41f05b4c15480842f5f0c27edfcbb553fed281f7c4068452cc1c02d90600090a3505050565b6002546001600160a01b031633146104eb5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016102f4565b600280546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600260035403610d2e5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016102f4565b6002600355565b6040516370a0823160e01b815230600482015260009081906001600160a01b038516906370a0823190602401602060405180830381865afa158015610d7e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610da291906118d4565b9050610db96001600160a01b03851633308661117f565b6040516370a0823160e01b81523060048201526000906001600160a01b038616906370a0823190602401602060405180830381865afa158015610e00573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e2491906118d4565b9050818111610e8a5760405162461bcd60e51b815260206004820152602c60248201527f5361666545524332305472616e7366657246726f6d3a2062616c616e6365206e60448201526b1bdd081a5b98dc99585cd95960a21b60648201526084016102f4565b610e9482826117af565b925050505b92915050565b604051636eb1769f60e11b81523060048201526001600160a01b038381166024830152600091839186169063dd62ed3e90604401602060405180830381865afa158015610ef0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f1491906118d4565b610f1e91906118ed565b6040516001600160a01b038516602482015260448101829052909150610a0c90859063095ea7b360e01b906064015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b0319909316929092179091526111b7565b7f000000000000000000000000000000000000000000000000000000000000000083146110075760405162461bcd60e51b815260206004820152602b60248201527f4552433230546f6b656e536f757263653a20696e76616c69642064657374696e60448201526a30ba34b7b71031b430b4b760a91b60648201526084016102f4565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316826001600160a01b0316146110965760405162461bcd60e51b815260206004820152602560248201527f4552433230546f6b656e536f757263653a20756e617574686f72697a6564207360448201526432b73232b960d91b60648201526084016102f4565b600080828060200190518101906110ad9190611916565b909250905060008260018111156110c6576110c66119dd565b036110f757600080828060200190518101906110e291906119f3565b915091506110f0828261128e565b5050610859565b600182600181111561110b5761110b6119dd565b036111375760008180602001905181019061112691906118d4565b905061113181611325565b50610859565b60405162461bcd60e51b815260206004820181905260248201527f4552433230546f6b656e536f757263653a20696e76616c696420616374696f6e60448201526064016102f4565b6040516001600160a01b0380851660248301528316604482015260648101829052610a0c9085906323b872dd60e01b90608401610f4d565b600061120c826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166113509092919063ffffffff16565b805190915015611289578080602001905181019061122a9190611a21565b6112895760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b60648201526084016102f4565b505050565b6001600160a01b0382166112b45760405162461bcd60e51b81526004016102f490611751565b604080516001600160a01b0384168152602081018390527f55aaef8fd8c07238c3618a93c8a1627194187d3b0952908e58f2ab0f944fb407910160405180910390a16113217f00000000000000000000000000000000000000000000000000000000000000008383611367565b5050565b6004548111156104d65760006004548261133f91906117af565b905061134a81611397565b50600455565b606061135f84846000856113f9565b949350505050565b6040516001600160a01b03831660248201526044810182905261128990849063a9059cbb60e01b90606401610f4d565b6040518181527f2cd3fd70cd5a5d6d805e90d22741aa1a84590ace7cf01b244719558d266143829060200160405180910390a16104d67f0000000000000000000000000000000000000000000000000000000000000000600160981b83611367565b60608247101561145a5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b60648201526084016102f4565b600080866001600160a01b031685876040516114769190611a43565b60006040518083038185875af1925050503d80600081146114b3576040519150601f19603f3d011682016040523d82523d6000602084013e6114b8565b606091505b50915091506114c9878383876114d4565b979650505050505050565b6060831561154357825160000361153c576001600160a01b0385163b61153c5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016102f4565b508161135f565b61135f83838151156115585781518083602001fd5b8060405162461bcd60e51b81526004016102f49190611a5f565b6001600160a01b03811681146104d657600080fd5b60006020828403121561159957600080fd5b81356115a481611572565b9392505050565b6000602082840312156115bd57600080fd5b5035919050565b6000806000806000608086880312156115dc57600080fd5b85356115e781611572565b94506020860135935060408601359250606086013567ffffffffffffffff8082111561161257600080fd5b818801915088601f83011261162657600080fd5b81358181111561163557600080fd5b8960208260051b850101111561164a57600080fd5b9699959850939650602001949392505050565b6000806000806060858703121561167357600080fd5b84359350602085013561168581611572565b9250604085013567ffffffffffffffff808211156116a257600080fd5b818701915087601f8301126116b657600080fd5b8135818111156116c557600080fd5b8860208285010111156116d757600080fd5b95989497505060200194505050565b6020808252602e908201527f54656c65706f727465725570677261646561626c653a207a65726f2054656c6560408201526d706f72746572206164647265737360901b606082015260800190565b60006020828403121561174657600080fd5b81516115a481611572565b60208082526028908201527f4552433230546f6b656e536f757263653a207a65726f20726563697069656e74604082015267206164647265737360c01b606082015260800190565b634e487b7160e01b600052601160045260246000fd5b81810381811115610e9957610e99611799565b600081518084526020808501945080840160005b838110156117fb5781516001600160a01b0316875295820195908201906001016117d6565b509495945050505050565b60005b83811015611821578181015183820152602001611809565b50506000910152565b60008151808452611842816020860160208601611806565b601f01601f19169290920160200192915050565b60208152815160208201526000602083015160018060a01b03808216604085015260408501519150808251166060850152506020810151608084015250606083015160a0830152608083015160e060c08401526118b76101008401826117c2565b905060a0840151601f198483030160e0850152610e94828261182a565b6000602082840312156118e657600080fd5b5051919050565b80820180821115610e9957610e99611799565b634e487b7160e01b600052604160045260246000fd5b6000806040838503121561192957600080fd5b82516002811061193857600080fd5b602084015190925067ffffffffffffffff8082111561195657600080fd5b818501915085601f83011261196a57600080fd5b81518181111561197c5761197c611900565b604051601f8201601f19908116603f011681019083821181831017156119a4576119a4611900565b816040528281528860208487010111156119bd57600080fd5b6119ce836020830160208801611806565b80955050505050509250929050565b634e487b7160e01b600052602160045260246000fd5b60008060408385031215611a0657600080fd5b8251611a1181611572565b6020939093015192949293505050565b600060208284031215611a3357600080fd5b815180151581146115a457600080fd5b60008251611a55818460208701611806565b9190910192915050565b6020815260006115a4602083018461182a56fea26469706673582212208eecb6fb91c7ca138f143292f60a67eff025a96a41c98e5928bc7750f9f5474364736f6c634300081200334552433230546f6b656e536f757263653a207a65726f2064657374696e617469", } // ERC20TokenSourceABI is the input ABI used to generate the binding from. @@ -388,6 +388,37 @@ func (_ERC20TokenSource *ERC20TokenSourceCallerSession) GetMinTeleporterVersion( return _ERC20TokenSource.Contract.GetMinTeleporterVersion(&_ERC20TokenSource.CallOpts) } +// IsTeleporterAddressPaused is a free data retrieval call binding the contract method 0x97314297. +// +// Solidity: function isTeleporterAddressPaused(address teleporterAddress) view returns(bool) +func (_ERC20TokenSource *ERC20TokenSourceCaller) IsTeleporterAddressPaused(opts *bind.CallOpts, teleporterAddress common.Address) (bool, error) { + var out []interface{} + err := _ERC20TokenSource.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 (_ERC20TokenSource *ERC20TokenSourceSession) IsTeleporterAddressPaused(teleporterAddress common.Address) (bool, error) { + return _ERC20TokenSource.Contract.IsTeleporterAddressPaused(&_ERC20TokenSource.CallOpts, teleporterAddress) +} + +// IsTeleporterAddressPaused is a free data retrieval call binding the contract method 0x97314297. +// +// Solidity: function isTeleporterAddressPaused(address teleporterAddress) view returns(bool) +func (_ERC20TokenSource *ERC20TokenSourceCallerSession) IsTeleporterAddressPaused(teleporterAddress common.Address) (bool, error) { + return _ERC20TokenSource.Contract.IsTeleporterAddressPaused(&_ERC20TokenSource.CallOpts, teleporterAddress) +} + // NativeTokenDestinationAddress is a free data retrieval call binding the contract method 0xb8c9091a. // // Solidity: function nativeTokenDestinationAddress() view returns(address) @@ -481,6 +512,27 @@ func (_ERC20TokenSource *ERC20TokenSourceCallerSession) TeleporterRegistry() (co return _ERC20TokenSource.Contract.TeleporterRegistry(&_ERC20TokenSource.CallOpts) } +// PauseTeleporterAddress is a paid mutator transaction binding the contract method 0x2b0d8f18. +// +// Solidity: function pauseTeleporterAddress(address teleporterAddress) returns() +func (_ERC20TokenSource *ERC20TokenSourceTransactor) PauseTeleporterAddress(opts *bind.TransactOpts, teleporterAddress common.Address) (*types.Transaction, error) { + return _ERC20TokenSource.contract.Transact(opts, "pauseTeleporterAddress", teleporterAddress) +} + +// PauseTeleporterAddress is a paid mutator transaction binding the contract method 0x2b0d8f18. +// +// Solidity: function pauseTeleporterAddress(address teleporterAddress) returns() +func (_ERC20TokenSource *ERC20TokenSourceSession) PauseTeleporterAddress(teleporterAddress common.Address) (*types.Transaction, error) { + return _ERC20TokenSource.Contract.PauseTeleporterAddress(&_ERC20TokenSource.TransactOpts, teleporterAddress) +} + +// PauseTeleporterAddress is a paid mutator transaction binding the contract method 0x2b0d8f18. +// +// Solidity: function pauseTeleporterAddress(address teleporterAddress) returns() +func (_ERC20TokenSource *ERC20TokenSourceTransactorSession) PauseTeleporterAddress(teleporterAddress common.Address) (*types.Transaction, error) { + return _ERC20TokenSource.Contract.PauseTeleporterAddress(&_ERC20TokenSource.TransactOpts, teleporterAddress) +} + // ReceiveTeleporterMessage is a paid mutator transaction binding the contract method 0xc868efaa. // // Solidity: function receiveTeleporterMessage(bytes32 originBlockchainID, address originSenderAddress, bytes message) returns() @@ -565,6 +617,27 @@ func (_ERC20TokenSource *ERC20TokenSourceTransactorSession) TransferToDestinatio return _ERC20TokenSource.Contract.TransferToDestination(&_ERC20TokenSource.TransactOpts, recipient, totalAmount, feeAmount, allowedRelayerAddresses) } +// UnpauseTeleporterAddress is a paid mutator transaction binding the contract method 0x4511243e. +// +// Solidity: function unpauseTeleporterAddress(address teleporterAddress) returns() +func (_ERC20TokenSource *ERC20TokenSourceTransactor) UnpauseTeleporterAddress(opts *bind.TransactOpts, teleporterAddress common.Address) (*types.Transaction, error) { + return _ERC20TokenSource.contract.Transact(opts, "unpauseTeleporterAddress", teleporterAddress) +} + +// UnpauseTeleporterAddress is a paid mutator transaction binding the contract method 0x4511243e. +// +// Solidity: function unpauseTeleporterAddress(address teleporterAddress) returns() +func (_ERC20TokenSource *ERC20TokenSourceSession) UnpauseTeleporterAddress(teleporterAddress common.Address) (*types.Transaction, error) { + return _ERC20TokenSource.Contract.UnpauseTeleporterAddress(&_ERC20TokenSource.TransactOpts, teleporterAddress) +} + +// UnpauseTeleporterAddress is a paid mutator transaction binding the contract method 0x4511243e. +// +// Solidity: function unpauseTeleporterAddress(address teleporterAddress) returns() +func (_ERC20TokenSource *ERC20TokenSourceTransactorSession) UnpauseTeleporterAddress(teleporterAddress common.Address) (*types.Transaction, error) { + return _ERC20TokenSource.Contract.UnpauseTeleporterAddress(&_ERC20TokenSource.TransactOpts, teleporterAddress) +} + // UpdateMinTeleporterVersion is a paid mutator transaction binding the contract method 0x5eb99514. // // Solidity: function updateMinTeleporterVersion(uint256 version) returns() @@ -1026,6 +1099,294 @@ func (_ERC20TokenSource *ERC20TokenSourceFilterer) ParseOwnershipTransferred(log return event, nil } +// ERC20TokenSourceTeleporterAddressPausedIterator is returned from FilterTeleporterAddressPaused and is used to iterate over the raw logs and unpacked data for TeleporterAddressPaused events raised by the ERC20TokenSource contract. +type ERC20TokenSourceTeleporterAddressPausedIterator struct { + Event *ERC20TokenSourceTeleporterAddressPaused // 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 *ERC20TokenSourceTeleporterAddressPausedIterator) 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(ERC20TokenSourceTeleporterAddressPaused) + 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(ERC20TokenSourceTeleporterAddressPaused) + 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 *ERC20TokenSourceTeleporterAddressPausedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *ERC20TokenSourceTeleporterAddressPausedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// ERC20TokenSourceTeleporterAddressPaused represents a TeleporterAddressPaused event raised by the ERC20TokenSource contract. +type ERC20TokenSourceTeleporterAddressPaused 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 (_ERC20TokenSource *ERC20TokenSourceFilterer) FilterTeleporterAddressPaused(opts *bind.FilterOpts, teleporterAddress []common.Address) (*ERC20TokenSourceTeleporterAddressPausedIterator, error) { + + var teleporterAddressRule []interface{} + for _, teleporterAddressItem := range teleporterAddress { + teleporterAddressRule = append(teleporterAddressRule, teleporterAddressItem) + } + + logs, sub, err := _ERC20TokenSource.contract.FilterLogs(opts, "TeleporterAddressPaused", teleporterAddressRule) + if err != nil { + return nil, err + } + return &ERC20TokenSourceTeleporterAddressPausedIterator{contract: _ERC20TokenSource.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 (_ERC20TokenSource *ERC20TokenSourceFilterer) WatchTeleporterAddressPaused(opts *bind.WatchOpts, sink chan<- *ERC20TokenSourceTeleporterAddressPaused, teleporterAddress []common.Address) (event.Subscription, error) { + + var teleporterAddressRule []interface{} + for _, teleporterAddressItem := range teleporterAddress { + teleporterAddressRule = append(teleporterAddressRule, teleporterAddressItem) + } + + logs, sub, err := _ERC20TokenSource.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(ERC20TokenSourceTeleporterAddressPaused) + if err := _ERC20TokenSource.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 (_ERC20TokenSource *ERC20TokenSourceFilterer) ParseTeleporterAddressPaused(log types.Log) (*ERC20TokenSourceTeleporterAddressPaused, error) { + event := new(ERC20TokenSourceTeleporterAddressPaused) + if err := _ERC20TokenSource.contract.UnpackLog(event, "TeleporterAddressPaused", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// ERC20TokenSourceTeleporterAddressUnpausedIterator is returned from FilterTeleporterAddressUnpaused and is used to iterate over the raw logs and unpacked data for TeleporterAddressUnpaused events raised by the ERC20TokenSource contract. +type ERC20TokenSourceTeleporterAddressUnpausedIterator struct { + Event *ERC20TokenSourceTeleporterAddressUnpaused // 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 *ERC20TokenSourceTeleporterAddressUnpausedIterator) 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(ERC20TokenSourceTeleporterAddressUnpaused) + 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(ERC20TokenSourceTeleporterAddressUnpaused) + 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 *ERC20TokenSourceTeleporterAddressUnpausedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *ERC20TokenSourceTeleporterAddressUnpausedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// ERC20TokenSourceTeleporterAddressUnpaused represents a TeleporterAddressUnpaused event raised by the ERC20TokenSource contract. +type ERC20TokenSourceTeleporterAddressUnpaused 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 (_ERC20TokenSource *ERC20TokenSourceFilterer) FilterTeleporterAddressUnpaused(opts *bind.FilterOpts, teleporterAddress []common.Address) (*ERC20TokenSourceTeleporterAddressUnpausedIterator, error) { + + var teleporterAddressRule []interface{} + for _, teleporterAddressItem := range teleporterAddress { + teleporterAddressRule = append(teleporterAddressRule, teleporterAddressItem) + } + + logs, sub, err := _ERC20TokenSource.contract.FilterLogs(opts, "TeleporterAddressUnpaused", teleporterAddressRule) + if err != nil { + return nil, err + } + return &ERC20TokenSourceTeleporterAddressUnpausedIterator{contract: _ERC20TokenSource.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 (_ERC20TokenSource *ERC20TokenSourceFilterer) WatchTeleporterAddressUnpaused(opts *bind.WatchOpts, sink chan<- *ERC20TokenSourceTeleporterAddressUnpaused, teleporterAddress []common.Address) (event.Subscription, error) { + + var teleporterAddressRule []interface{} + for _, teleporterAddressItem := range teleporterAddress { + teleporterAddressRule = append(teleporterAddressRule, teleporterAddressItem) + } + + logs, sub, err := _ERC20TokenSource.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(ERC20TokenSourceTeleporterAddressUnpaused) + if err := _ERC20TokenSource.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 (_ERC20TokenSource *ERC20TokenSourceFilterer) ParseTeleporterAddressUnpaused(log types.Log) (*ERC20TokenSourceTeleporterAddressUnpaused, error) { + event := new(ERC20TokenSourceTeleporterAddressUnpaused) + if err := _ERC20TokenSource.contract.UnpackLog(event, "TeleporterAddressUnpaused", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + // ERC20TokenSourceTransferToDestinationIterator is returned from FilterTransferToDestination and is used to iterate over the raw logs and unpacked data for TransferToDestination events raised by the ERC20TokenSource contract. type ERC20TokenSourceTransferToDestinationIterator struct { Event *ERC20TokenSourceTransferToDestination // Event containing the contract specifics and raw log diff --git a/abi-bindings/go/CrossChainApplications/NativeTokenBridge/NativeTokenDestination/NativeTokenDestination.go b/abi-bindings/go/CrossChainApplications/NativeTokenBridge/NativeTokenDestination/NativeTokenDestination.go index 211b3c9d2..ce911f3c5 100644 --- a/abi-bindings/go/CrossChainApplications/NativeTokenBridge/NativeTokenDestination/NativeTokenDestination.go +++ b/abi-bindings/go/CrossChainApplications/NativeTokenBridge/NativeTokenDestination/NativeTokenDestination.go @@ -37,8 +37,8 @@ type TeleporterFeeInfo struct { // NativeTokenDestinationMetaData contains all meta data concerning the NativeTokenDestination contract. var NativeTokenDestinationMetaData = &bind.MetaData{ - ABI: "[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"teleporterRegistryAddress\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"sourceBlockchainID_\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"nativeTokenSourceAddress_\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"initialReserveImbalance_\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"remaining\",\"type\":\"uint256\"}],\"name\":\"CollateralAdded\",\"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\":\"recipient\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"NativeTokensMinted\",\"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\":\"uint256\",\"name\":\"teleporterMessageID\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"burnAddressBalance\",\"type\":\"uint256\"}],\"name\":\"ReportTotalBurnedTxFees\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"teleporterMessageID\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"TransferToSource\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"BURNED_TX_FEES_ADDRESS\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"BURN_FOR_TRANSFER_ADDRESS\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"REPORT_BURNED_TOKENS_REQUIRED_GAS\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"TRANSFER_NATIVE_TOKENS_REQUIRED_GAS\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"currentReserveImbalance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getMinTeleporterVersion\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"initialReserveImbalance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"isCollateralized\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"nativeTokenSourceAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"originBlockchainID\",\"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\":\"address\",\"name\":\"feeTokenAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"internalType\":\"structTeleporterFeeInfo\",\"name\":\"feeInfo\",\"type\":\"tuple\"},{\"internalType\":\"address[]\",\"name\":\"allowedRelayerAddresses\",\"type\":\"address[]\"}],\"name\":\"reportTotalBurnedTxFees\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sourceBlockchainID\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"teleporterRegistry\",\"outputs\":[{\"internalType\":\"contractTeleporterRegistry\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalMinted\",\"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\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"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\":\"transferToSource\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"version\",\"type\":\"uint256\"}],\"name\":\"updateMinTeleporterVersion\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", - Bin: "0x61012060405273020000000000000000000000000000000000000160a0523480156200002a57600080fd5b50604051620021ce380380620021ce8339810160408190526200004d9162000418565b83806001600160a01b038116620000d15760405162461bcd60e51b815260206004820152603760248201527f54656c65706f727465725570677261646561626c653a207a65726f2074656c6560448201527f706f72746572207265676973747279206164647265737300000000000000000060648201526084015b60405180910390fd5b6001600160a01b03811660808190526040805163301fd1f560e21b8152905163c07f47d4916004808201926020929091908290030181865afa1580156200011c573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000142919062000461565b600055506200015133620003a9565b50600160025582620001af5760405162461bcd60e51b81526020600482015260316024820152600080516020620021ae8339815191526044820152701c98d948189b1bd8dad8da185a5b881251607a1b6064820152608401620000c8565b7302000000000000000000000000000000000000056001600160a01b0316634213cf786040518163ffffffff1660e01b8152600401602060405180830381865afa15801562000202573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000228919062000461565b83036200029e5760405162461bcd60e51b815260206004820152603a60248201527f4e6174697665546f6b656e44657374696e6174696f6e3a2063616e6e6f74206260448201527f726964676520776974682073616d6520626c6f636b636861696e0000000000006064820152608401620000c8565b60c08390526001600160a01b038216620003105760405162461bcd60e51b81526020600482015260346024820152600080516020620021ae83398151915260448201527f72636520636f6e747261637420616464726573730000000000000000000000006064820152608401620000c8565b6001600160a01b03821660e0526000819003620003965760405162461bcd60e51b815260206004820152603660248201527f4e6174697665546f6b656e44657374696e6174696f6e3a207a65726f20696e6960448201527f7469616c207265736572766520696d62616c616e6365000000000000000000006064820152608401620000c8565b610100819052600355506200047b915050565b600180546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b80516001600160a01b03811681146200041357600080fd5b919050565b600080600080608085870312156200042f57600080fd5b6200043a85620003fb565b9350602085015192506200045160408601620003fb565b6060959095015193969295505050565b6000602082840312156200047457600080fd5b5051919050565b60805160a05160c05160e05161010051611ca16200050d600039600081816102b001526103c5015260008181610234015281816104e10152818161082c015261120f0152600081816101bf015281816104bb01528181610806015261118b01526000611488015260008181610173015281816104080152818161067a015281816109e20152610b7f0152611ca16000f3fe60806040526004361061011e5760003560e01c80638ac7dd20116100a0578063c452165e11610064578063c452165e14610338578063c868efaa14610350578063d2cc7a7014610370578063d309512614610321578063f2fde38b1461038557600080fd5b80638ac7dd201461029e5780638da5cb5b146102d2578063a2309ff8146102f0578063a2a9501714610306578063ab2852301461032157600080fd5b806349e3284e116100e757806349e3284e146102035780635d93f9af146102225780635eb9951414610256578063715018a614610276578063758465621461028b57600080fd5b8062d872ae1461012357806318160ddd1461014c5780631a7f5bec1461016157806329b7b3fd146101ad5780633a94fe51146101e1575b600080fd5b34801561012f57600080fd5b5061013960035481565b6040519081526020015b60405180910390f35b34801561015857600080fd5b506101396103a5565b34801561016d57600080fd5b506101957f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b039091168152602001610143565b3480156101b957600080fd5b506101397f000000000000000000000000000000000000000000000000000000000000000081565b3480156101ed57600080fd5b506102016101fc3660046117ea565b610404565b005b34801561020f57600080fd5b5060035460405190158152602001610143565b34801561022e57600080fd5b506101957f000000000000000000000000000000000000000000000000000000000000000081565b34801561026257600080fd5b5061020161027136600461183e565b610646565b34801561028257600080fd5b5061020161065a565b61020161029936600461186c565b61066e565b3480156102aa57600080fd5b506101397f000000000000000000000000000000000000000000000000000000000000000081565b3480156102de57600080fd5b506001546001600160a01b0316610195565b3480156102fc57600080fd5b5061013960045481565b34801561031257600080fd5b506101956001600160981b0181565b34801561032d57600080fd5b50610139620186a081565b34801561034457600080fd5b50610195600160981b81565b34801561035c57600080fd5b5061020161036b3660046118d0565b6109ca565b34801561037c57600080fd5b50600054610139565b34801561039157600080fd5b506102016103a0366004611959565b610afd565b6000806103bf6001600160981b0131600160981b31611993565b905060007f00000000000000000000000000000000000000000000000000000000000000006004546103f19190611993565b90506103fd82826119a6565b9250505090565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d820e64f6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610464573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061048891906119b9565b90506000600160981b6001600160a01b03163190506000826001600160a01b031663624488506040518060c001604052807f000000000000000000000000000000000000000000000000000000000000000081526020017f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031681526020018980360381019061051f91906119d6565b8152602001620186a081526020018888808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152505050908252506040805160208082018990528251808303820181528284019093529092019161059191600191606001611a8c565b6040516020818303038152906040528152506040518263ffffffff1660e01b81526004016105bf9190611b07565b6020604051808303816000875af11580156105de573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106029190611b85565b9050807f2550fa6041684d40e635e29e93dde9017d70c25b46aa88393317b5182ed6ae7c8360405161063691815260200190565b60405180910390a2505050505050565b61064e610b73565b61065781610b7b565b50565b610662610d19565b61066c6000610d73565b565b610676610dc5565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d820e64f6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156106d6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106fa91906119b9565b90506001600160a01b03851661072b5760405162461bcd60e51b815260040161072290611b9e565b60405180910390fd5b600354156107985760405162461bcd60e51b815260206004820152603460248201527f4e6174697665546f6b656e44657374696e6174696f6e3a20636f6e7472616374604482015273081d5b99195c98dbdb1b185d195c985b1a5e995960621b6064820152608401610722565b60006020850135156107d7576107be6107b46020870187611959565b8660200135610e1c565b90506107d76107d06020870187611959565b8383610f86565b6107e86001600160981b013461106b565b6000826001600160a01b031663624488506040518060c001604052807f000000000000000000000000000000000000000000000000000000000000000081526020017f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031681526020018980360381019061086a91906119d6565b8152602001620186a08152602001888880806020026020016040519081016040528093929190818152602001838360200280828437600092018290525093855250506040516020938401936108d892508e913491016001600160a01b03929092168252602082015260400190565b60408051601f19818403018152908290526108f69291602001611a8c565b6040516020818303038152906040528152506040518263ffffffff1660e01b81526004016109249190611b07565b6020604051808303816000875af1158015610943573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109679190611b85565b905080876001600160a01b0316336001600160a01b03167f0322cbb1d3c23f6dbf1deddb3b4ef3ce0f93ae6eec7b44e4f395804104466d14346040516109af91815260200190565b60405180910390a45050506109c46001600255565b50505050565b60005460405163260f846760e11b81523360048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690634c1f08ce90602401602060405180830381865afa158015610a31573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a559190611b85565b1015610abc5760405162461bcd60e51b815260206004820152603060248201527f54656c65706f727465725570677261646561626c653a20696e76616c6964205460448201526f32b632b837b93a32b91039b2b73232b960811b6064820152608401610722565b6109c4848484848080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061118992505050565b610b05610d19565b6001600160a01b038116610b6a5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610722565b61065781610d73565b61066c610d19565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663c07f47d46040518163ffffffff1660e01b8152600401602060405180830381865afa158015610bdb573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610bff9190611b85565b60005490915081831115610c6f5760405162461bcd60e51b815260206004820152603160248201527f54656c65706f727465725570677261646561626c653a20696e76616c6964205460448201527032b632b837b93a32b9103b32b939b4b7b760791b6064820152608401610722565b808311610ce45760405162461bcd60e51b815260206004820152603f60248201527f54656c65706f727465725570677261646561626c653a206e6f7420677265617460448201527f6572207468616e2063757272656e74206d696e696d756d2076657273696f6e006064820152608401610722565b6000838155604051849183917fa9a7ef57e41f05b4c15480842f5f0c27edfcbb553fed281f7c4068452cc1c02d9190a3505050565b6001546001600160a01b0316331461066c5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610722565b600180546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6002805403610e165760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610722565b60028055565b6040516370a0823160e01b815230600482015260009081906001600160a01b038516906370a0823190602401602060405180830381865afa158015610e65573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e899190611b85565b9050610ea06001600160a01b0385163330866114ec565b6040516370a0823160e01b81523060048201526000906001600160a01b038616906370a0823190602401602060405180830381865afa158015610ee7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f0b9190611b85565b9050818111610f715760405162461bcd60e51b815260206004820152602c60248201527f5361666545524332305472616e7366657246726f6d3a2062616c616e6365206e60448201526b1bdd081a5b98dc99585cd95960a21b6064820152608401610722565b610f7b82826119a6565b925050505b92915050565b604051636eb1769f60e11b81523060048201526001600160a01b038381166024830152600091839186169063dd62ed3e90604401602060405180830381865afa158015610fd7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ffb9190611b85565b6110059190611993565b6040516001600160a01b0385166024820152604481018290529091506109c490859063095ea7b360e01b906064015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152611524565b804710156110bb5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e63650000006044820152606401610722565b6000826001600160a01b03168260405160006040518083038185875af1925050503d8060008114611108576040519150601f19603f3d011682016040523d82523d6000602084013e61110d565b606091505b50509050806111845760405162461bcd60e51b815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d617920686176652072657665727465640000000000006064820152608401610722565b505050565b7f0000000000000000000000000000000000000000000000000000000000000000831461120d5760405162461bcd60e51b815260206004820152602c60248201527f4e6174697665546f6b656e44657374696e6174696f6e3a20696e76616c69642060448201526b39b7bab931b29031b430b4b760a11b6064820152608401610722565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316826001600160a01b0316146112a25760405162461bcd60e51b815260206004820152602b60248201527f4e6174697665546f6b656e44657374696e6174696f6e3a20756e617574686f7260448201526a34bd32b21039b2b73232b960a91b6064820152608401610722565b600080828060200190518101906112b99190611bec565b90925090506001600160a01b0382166112e45760405162461bcd60e51b815260040161072290611b9e565b806000036113485760405162461bcd60e51b815260206004820152602b60248201527f4e6174697665546f6b656e44657374696e6174696f6e3a207a65726f2074726160448201526a6e736665722076616c756560a81b6064820152608401610722565b60035481901561140d576003548211156113b15760035460408051918252600060208301527f244160b15e69cc411f041d94ae7fab6f6bba85dade8403216c05ff4b920d5449910160405180910390a16003546113a590836119a6565b6000600355905061140d565b81600360008282546113c391906119a6565b90915550506003546040805184815260208101929092527f244160b15e69cc411f041d94ae7fab6f6bba85dade8403216c05ff4b920d5449910160405180910390a1505050505050565b806004600082825461141f9190611993565b90915550506040518181526001600160a01b038416907fd949ea0e9d5db53492d77f28fd5467fb2f6c4f5b88e3350e3c36729b76e99cf29060200160405180910390a26040516327ad555d60e11b81526001600160a01b038481166004830152602482018390527f00000000000000000000000000000000000000000000000000000000000000001690634f5aaaba90604401600060405180830381600087803b1580156114cc57600080fd5b505af11580156114e0573d6000803e3d6000fd5b50505050505050505050565b6040516001600160a01b03808516602483015283166044820152606481018290526109c49085906323b872dd60e01b90608401611034565b6000611579826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166115f69092919063ffffffff16565b80519091501561118457808060200190518101906115979190611c1a565b6111845760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610722565b6060611605848460008561160d565b949350505050565b60608247101561166e5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b6064820152608401610722565b600080866001600160a01b0316858760405161168a9190611c3c565b60006040518083038185875af1925050503d80600081146116c7576040519150601f19603f3d011682016040523d82523d6000602084013e6116cc565b606091505b50915091506116dd878383876116e8565b979650505050505050565b60608315611757578251600003611750576001600160a01b0385163b6117505760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610722565b5081611605565b611605838381511561176c5781518083602001fd5b8060405162461bcd60e51b81526004016107229190611c58565b60006040828403121561179857600080fd5b50919050565b60008083601f8401126117b057600080fd5b50813567ffffffffffffffff8111156117c857600080fd5b6020830191508360208260051b85010111156117e357600080fd5b9250929050565b6000806000606084860312156117ff57600080fd5b6118098585611786565b9250604084013567ffffffffffffffff81111561182557600080fd5b6118318682870161179e565b9497909650939450505050565b60006020828403121561185057600080fd5b5035919050565b6001600160a01b038116811461065757600080fd5b6000806000806080858703121561188257600080fd5b843561188d81611857565b935061189c8660208701611786565b9250606085013567ffffffffffffffff8111156118b857600080fd5b6118c48782880161179e565b95989497509550505050565b600080600080606085870312156118e657600080fd5b8435935060208501356118f881611857565b9250604085013567ffffffffffffffff8082111561191557600080fd5b818701915087601f83011261192957600080fd5b81358181111561193857600080fd5b88602082850101111561194a57600080fd5b95989497505060200194505050565b60006020828403121561196b57600080fd5b813561197681611857565b9392505050565b634e487b7160e01b600052601160045260246000fd5b80820180821115610f8057610f8061197d565b81810381811115610f8057610f8061197d565b6000602082840312156119cb57600080fd5b815161197681611857565b6000604082840312156119e857600080fd5b6040516040810181811067ffffffffffffffff82111715611a1957634e487b7160e01b600052604160045260246000fd5b6040528235611a2781611857565b81526020928301359281019290925250919050565b60005b83811015611a57578181015183820152602001611a3f565b50506000910152565b60008151808452611a78816020860160208601611a3c565b601f01601f19169290920160200192915050565b600060028410611aac57634e487b7160e01b600052602160045260246000fd5b838252604060208301526116056040830184611a60565b600081518084526020808501945080840160005b83811015611afc5781516001600160a01b031687529582019590820190600101611ad7565b509495945050505050565b60208152815160208201526000602083015160018060a01b03808216604085015260408501519150808251166060850152506020810151608084015250606083015160a0830152608083015160e060c0840152611b68610100840182611ac3565b905060a0840151601f198483030160e0850152610f7b8282611a60565b600060208284031215611b9757600080fd5b5051919050565b6020808252602e908201527f4e6174697665546f6b656e44657374696e6174696f6e3a207a65726f2072656360408201526d697069656e74206164647265737360901b606082015260800190565b60008060408385031215611bff57600080fd5b8251611c0a81611857565b6020939093015192949293505050565b600060208284031215611c2c57600080fd5b8151801515811461197657600080fd5b60008251611c4e818460208701611a3c565b9190910192915050565b6020815260006119766020830184611a6056fea26469706673582212209aa49d86bfc3a8e13710af327408a51a1a6df9af0dba5cd63b0423382ed4d7d564736f6c634300081200334e6174697665546f6b656e44657374696e6174696f6e3a207a65726f20736f75", + ABI: "[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"teleporterRegistryAddress\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"sourceBlockchainID_\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"nativeTokenSourceAddress_\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"initialReserveImbalance_\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"remaining\",\"type\":\"uint256\"}],\"name\":\"CollateralAdded\",\"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\":\"recipient\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"NativeTokensMinted\",\"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\":\"uint256\",\"name\":\"teleporterMessageID\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"burnAddressBalance\",\"type\":\"uint256\"}],\"name\":\"ReportTotalBurnedTxFees\",\"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\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"teleporterMessageID\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"TransferToSource\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"BURNED_TX_FEES_ADDRESS\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"BURN_FOR_TRANSFER_ADDRESS\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"REPORT_BURNED_TOKENS_REQUIRED_GAS\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"TRANSFER_NATIVE_TOKENS_REQUIRED_GAS\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"currentReserveImbalance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getMinTeleporterVersion\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"initialReserveImbalance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"isCollateralized\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"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\":\"nativeTokenSourceAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"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\":\"originBlockchainID\",\"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\":\"address\",\"name\":\"feeTokenAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"internalType\":\"structTeleporterFeeInfo\",\"name\":\"feeInfo\",\"type\":\"tuple\"},{\"internalType\":\"address[]\",\"name\":\"allowedRelayerAddresses\",\"type\":\"address[]\"}],\"name\":\"reportTotalBurnedTxFees\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sourceBlockchainID\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"teleporterRegistry\",\"outputs\":[{\"internalType\":\"contractTeleporterRegistry\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalMinted\",\"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\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"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\":\"transferToSource\",\"outputs\":[],\"stateMutability\":\"payable\",\"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: "0x61012060405273020000000000000000000000000000000000000160a0523480156200002a57600080fd5b506040516200252c3803806200252c8339810160408190526200004d9162000418565b83806001600160a01b038116620000d15760405162461bcd60e51b815260206004820152603760248201527f54656c65706f727465725570677261646561626c653a207a65726f2074656c6560448201527f706f72746572207265676973747279206164647265737300000000000000000060648201526084015b60405180910390fd5b6001600160a01b03811660808190526040805163301fd1f560e21b8152905163c07f47d4916004808201926020929091908290030181865afa1580156200011c573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000142919062000461565b600155506200015133620003a9565b50600160035582620001af5760405162461bcd60e51b815260206004820152603160248201526000805160206200250c8339815191526044820152701c98d948189b1bd8dad8da185a5b881251607a1b6064820152608401620000c8565b7302000000000000000000000000000000000000056001600160a01b0316634213cf786040518163ffffffff1660e01b8152600401602060405180830381865afa15801562000202573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000228919062000461565b83036200029e5760405162461bcd60e51b815260206004820152603a60248201527f4e6174697665546f6b656e44657374696e6174696f6e3a2063616e6e6f74206260448201527f726964676520776974682073616d6520626c6f636b636861696e0000000000006064820152608401620000c8565b60c08390526001600160a01b038216620003105760405162461bcd60e51b815260206004820152603460248201526000805160206200250c83398151915260448201527f72636520636f6e747261637420616464726573730000000000000000000000006064820152608401620000c8565b6001600160a01b03821660e0526000819003620003965760405162461bcd60e51b815260206004820152603660248201527f4e6174697665546f6b656e44657374696e6174696f6e3a207a65726f20696e6960448201527f7469616c207265736572766520696d62616c616e6365000000000000000000006064820152608401620000c8565b610100819052600455506200047b915050565b600280546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b80516001600160a01b03811681146200041357600080fd5b919050565b600080600080608085870312156200042f57600080fd5b6200043a85620003fb565b9350602085015192506200045160408601620003fb565b6060959095015193969295505050565b6000602082840312156200047457600080fd5b5051919050565b60805160a05160c05160e05161010051611fff6200050d6000396000818161031401526104620152600081816102980152818161068001528181610abf015261151f0152600081816101e00152818161065a01528181610a99015261149b01526000611798015260008181610194015281816105a70152818161091601528181610c750152610e8b0152611fff6000f3fe60806040526004361061013f5760003560e01c806375846562116100b6578063ab2852301161006f578063ab285230146103be578063c452165e146103d5578063c868efaa146103ed578063d2cc7a701461040d578063d3095126146103be578063f2fde38b1461042257600080fd5b806375846562146102ef5780638ac7dd20146103025780638da5cb5b146103365780639731429714610354578063a2309ff81461038d578063a2a95017146103a357600080fd5b80633a94fe51116101085780633a94fe51146102245780634511243e1461024457806349e3284e146102645780635d93f9af146102865780635eb99514146102ba578063715018a6146102da57600080fd5b8062d872ae1461014457806318160ddd1461016d5780631a7f5bec1461018257806329b7b3fd146101ce5780632b0d8f1814610202575b600080fd5b34801561015057600080fd5b5061015a60045481565b6040519081526020015b60405180910390f35b34801561017957600080fd5b5061015a610442565b34801561018e57600080fd5b506101b67f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b039091168152602001610164565b3480156101da57600080fd5b5061015a7f000000000000000000000000000000000000000000000000000000000000000081565b34801561020e57600080fd5b5061022261021d366004611aab565b6104a1565b005b34801561023057600080fd5b5061022261023f366004611b33565b6105a3565b34801561025057600080fd5b5061022261025f366004611aab565b6107e5565b34801561027057600080fd5b50600454155b6040519015158152602001610164565b34801561029257600080fd5b506101b67f000000000000000000000000000000000000000000000000000000000000000081565b3480156102c657600080fd5b506102226102d5366004611b87565b6108e2565b3480156102e657600080fd5b506102226108f6565b6102226102fd366004611ba0565b61090a565b34801561030e57600080fd5b5061015a7f000000000000000000000000000000000000000000000000000000000000000081565b34801561034257600080fd5b506002546001600160a01b03166101b6565b34801561036057600080fd5b5061027661036f366004611aab565b6001600160a01b031660009081526020819052604090205460ff1690565b34801561039957600080fd5b5061015a60055481565b3480156103af57600080fd5b506101b66001600160981b0181565b3480156103ca57600080fd5b5061015a620186a081565b3480156103e157600080fd5b506101b6600160981b81565b3480156103f957600080fd5b50610222610408366004611c04565b610c5d565b34801561041957600080fd5b5060015461015a565b34801561042e57600080fd5b5061022261043d366004611aab565b610e09565b60008061045c6001600160981b0131600160981b31611ca3565b905060007f000000000000000000000000000000000000000000000000000000000000000060055461048e9190611ca3565b905061049a8282611cb6565b9250505090565b6104a9610e7f565b6001600160a01b0381166104d85760405162461bcd60e51b81526004016104cf90611cc9565b60405180910390fd5b6001600160a01b03811660009081526020819052604090205460ff16156105575760405162461bcd60e51b815260206004820152602d60248201527f54656c65706f727465725570677261646561626c653a2061646472657373206160448201526c1b1c9958591e481c185d5cd959609a1b60648201526084016104cf565b6001600160a01b038116600081815260208190526040808220805460ff19166001179055517f933f93e57a222e6330362af8b376d0a8725b6901e9a2fb86d00f169702b28a4c9190a250565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d820e64f6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610603573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106279190611d17565b90506000600160981b6001600160a01b03163190506000826001600160a01b031663624488506040518060c001604052807f000000000000000000000000000000000000000000000000000000000000000081526020017f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03168152602001898036038101906106be9190611d34565b8152602001620186a081526020018888808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152505050908252506040805160208082018990528251808303820181528284019093529092019161073091600191606001611dea565b6040516020818303038152906040528152506040518263ffffffff1660e01b815260040161075e9190611e65565b6020604051808303816000875af115801561077d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107a19190611ee3565b9050807f2550fa6041684d40e635e29e93dde9017d70c25b46aa88393317b5182ed6ae7c836040516107d591815260200190565b60405180910390a2505050505050565b6107ed610e7f565b6001600160a01b0381166108135760405162461bcd60e51b81526004016104cf90611cc9565b6001600160a01b03811660009081526020819052604090205460ff1661088d5760405162461bcd60e51b815260206004820152602960248201527f54656c65706f727465725570677261646561626c653a2061646472657373206e6044820152681bdd081c185d5cd95960ba1b60648201526084016104cf565b6040516001600160a01b038216907f844e2f3154214672229235858fd029d1dfd543901c6d05931f0bc2480a2d72c390600090a26001600160a01b03166000908152602081905260409020805460ff19169055565b6108ea610e7f565b6108f381610e87565b50565b6108fe611027565b6109086000611081565b565b6109126110d3565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d820e64f6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610972573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109969190611d17565b90506001600160a01b0385166109be5760405162461bcd60e51b81526004016104cf90611efc565b60045415610a2b5760405162461bcd60e51b815260206004820152603460248201527f4e6174697665546f6b656e44657374696e6174696f6e3a20636f6e7472616374604482015273081d5b99195c98dbdb1b185d195c985b1a5e995960621b60648201526084016104cf565b6000602085013515610a6a57610a51610a476020870187611aab565b866020013561112c565b9050610a6a610a636020870187611aab565b8383611296565b610a7b6001600160981b013461137b565b6000826001600160a01b031663624488506040518060c001604052807f000000000000000000000000000000000000000000000000000000000000000081526020017f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316815260200189803603810190610afd9190611d34565b8152602001620186a0815260200188888080602002602001604051908101604052809392919081815260200183836020028082843760009201829052509385525050604051602093840193610b6b92508e913491016001600160a01b03929092168252602082015260400190565b60408051601f1981840301815290829052610b899291602001611dea565b6040516020818303038152906040528152506040518263ffffffff1660e01b8152600401610bb79190611e65565b6020604051808303816000875af1158015610bd6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610bfa9190611ee3565b905080876001600160a01b0316336001600160a01b03167f0322cbb1d3c23f6dbf1deddb3b4ef3ce0f93ae6eec7b44e4f395804104466d1434604051610c4291815260200190565b60405180910390a4505050610c576001600355565b50505050565b60015460405163260f846760e11b81523360048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690634c1f08ce90602401602060405180830381865afa158015610cc4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ce89190611ee3565b1015610d4f5760405162461bcd60e51b815260206004820152603060248201527f54656c65706f727465725570677261646561626c653a20696e76616c6964205460448201526f32b632b837b93a32b91039b2b73232b960811b60648201526084016104cf565b3360009081526020819052604090205460ff1615610dc85760405162461bcd60e51b815260206004820152603060248201527f54656c65706f727465725570677261646561626c653a2054656c65706f72746560448201526f1c881859191c995cdcc81c185d5cd95960821b60648201526084016104cf565b610c57848484848080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061149992505050565b610e11611027565b6001600160a01b038116610e765760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016104cf565b6108f381611081565b610908611027565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663c07f47d46040518163ffffffff1660e01b8152600401602060405180830381865afa158015610ee7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f0b9190611ee3565b60015490915081831115610f7b5760405162461bcd60e51b815260206004820152603160248201527f54656c65706f727465725570677261646561626c653a20696e76616c6964205460448201527032b632b837b93a32b9103b32b939b4b7b760791b60648201526084016104cf565b808311610ff05760405162461bcd60e51b815260206004820152603f60248201527f54656c65706f727465725570677261646561626c653a206e6f7420677265617460448201527f6572207468616e2063757272656e74206d696e696d756d2076657273696f6e0060648201526084016104cf565b6001839055604051839082907fa9a7ef57e41f05b4c15480842f5f0c27edfcbb553fed281f7c4068452cc1c02d90600090a3505050565b6002546001600160a01b031633146109085760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016104cf565b600280546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6002600354036111255760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016104cf565b6002600355565b6040516370a0823160e01b815230600482015260009081906001600160a01b038516906370a0823190602401602060405180830381865afa158015611175573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111999190611ee3565b90506111b06001600160a01b0385163330866117fc565b6040516370a0823160e01b81523060048201526000906001600160a01b038616906370a0823190602401602060405180830381865afa1580156111f7573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061121b9190611ee3565b90508181116112815760405162461bcd60e51b815260206004820152602c60248201527f5361666545524332305472616e7366657246726f6d3a2062616c616e6365206e60448201526b1bdd081a5b98dc99585cd95960a21b60648201526084016104cf565b61128b8282611cb6565b925050505b92915050565b604051636eb1769f60e11b81523060048201526001600160a01b038381166024830152600091839186169063dd62ed3e90604401602060405180830381865afa1580156112e7573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061130b9190611ee3565b6113159190611ca3565b6040516001600160a01b038516602482015260448101829052909150610c5790859063095ea7b360e01b906064015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152611834565b804710156113cb5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e636500000060448201526064016104cf565b6000826001600160a01b03168260405160006040518083038185875af1925050503d8060008114611418576040519150601f19603f3d011682016040523d82523d6000602084013e61141d565b606091505b50509050806114945760405162461bcd60e51b815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d6179206861766520726576657274656400000000000060648201526084016104cf565b505050565b7f0000000000000000000000000000000000000000000000000000000000000000831461151d5760405162461bcd60e51b815260206004820152602c60248201527f4e6174697665546f6b656e44657374696e6174696f6e3a20696e76616c69642060448201526b39b7bab931b29031b430b4b760a11b60648201526084016104cf565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316826001600160a01b0316146115b25760405162461bcd60e51b815260206004820152602b60248201527f4e6174697665546f6b656e44657374696e6174696f6e3a20756e617574686f7260448201526a34bd32b21039b2b73232b960a91b60648201526084016104cf565b600080828060200190518101906115c99190611f4a565b90925090506001600160a01b0382166115f45760405162461bcd60e51b81526004016104cf90611efc565b806000036116585760405162461bcd60e51b815260206004820152602b60248201527f4e6174697665546f6b656e44657374696e6174696f6e3a207a65726f2074726160448201526a6e736665722076616c756560a81b60648201526084016104cf565b60045481901561171d576004548211156116c15760045460408051918252600060208301527f244160b15e69cc411f041d94ae7fab6f6bba85dade8403216c05ff4b920d5449910160405180910390a16004546116b59083611cb6565b6000600455905061171d565b81600460008282546116d39190611cb6565b90915550506004546040805184815260208101929092527f244160b15e69cc411f041d94ae7fab6f6bba85dade8403216c05ff4b920d5449910160405180910390a1505050505050565b806005600082825461172f9190611ca3565b90915550506040518181526001600160a01b038416907fd949ea0e9d5db53492d77f28fd5467fb2f6c4f5b88e3350e3c36729b76e99cf29060200160405180910390a26040516327ad555d60e11b81526001600160a01b038481166004830152602482018390527f00000000000000000000000000000000000000000000000000000000000000001690634f5aaaba90604401600060405180830381600087803b1580156117dc57600080fd5b505af11580156117f0573d6000803e3d6000fd5b50505050505050505050565b6040516001600160a01b0380851660248301528316604482015260648101829052610c579085906323b872dd60e01b90608401611344565b6000611889826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166119069092919063ffffffff16565b80519091501561149457808060200190518101906118a79190611f78565b6114945760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b60648201526084016104cf565b6060611915848460008561191d565b949350505050565b60608247101561197e5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b60648201526084016104cf565b600080866001600160a01b0316858760405161199a9190611f9a565b60006040518083038185875af1925050503d80600081146119d7576040519150601f19603f3d011682016040523d82523d6000602084013e6119dc565b606091505b50915091506119ed878383876119f8565b979650505050505050565b60608315611a67578251600003611a60576001600160a01b0385163b611a605760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016104cf565b5081611915565b6119158383815115611a7c5781518083602001fd5b8060405162461bcd60e51b81526004016104cf9190611fb6565b6001600160a01b03811681146108f357600080fd5b600060208284031215611abd57600080fd5b8135611ac881611a96565b9392505050565b600060408284031215611ae157600080fd5b50919050565b60008083601f840112611af957600080fd5b50813567ffffffffffffffff811115611b1157600080fd5b6020830191508360208260051b8501011115611b2c57600080fd5b9250929050565b600080600060608486031215611b4857600080fd5b611b528585611acf565b9250604084013567ffffffffffffffff811115611b6e57600080fd5b611b7a86828701611ae7565b9497909650939450505050565b600060208284031215611b9957600080fd5b5035919050565b60008060008060808587031215611bb657600080fd5b8435611bc181611a96565b9350611bd08660208701611acf565b9250606085013567ffffffffffffffff811115611bec57600080fd5b611bf887828801611ae7565b95989497509550505050565b60008060008060608587031215611c1a57600080fd5b843593506020850135611c2c81611a96565b9250604085013567ffffffffffffffff80821115611c4957600080fd5b818701915087601f830112611c5d57600080fd5b813581811115611c6c57600080fd5b886020828501011115611c7e57600080fd5b95989497505060200194505050565b634e487b7160e01b600052601160045260246000fd5b8082018082111561129057611290611c8d565b8181038181111561129057611290611c8d565b6020808252602e908201527f54656c65706f727465725570677261646561626c653a207a65726f2054656c6560408201526d706f72746572206164647265737360901b606082015260800190565b600060208284031215611d2957600080fd5b8151611ac881611a96565b600060408284031215611d4657600080fd5b6040516040810181811067ffffffffffffffff82111715611d7757634e487b7160e01b600052604160045260246000fd5b6040528235611d8581611a96565b81526020928301359281019290925250919050565b60005b83811015611db5578181015183820152602001611d9d565b50506000910152565b60008151808452611dd6816020860160208601611d9a565b601f01601f19169290920160200192915050565b600060028410611e0a57634e487b7160e01b600052602160045260246000fd5b838252604060208301526119156040830184611dbe565b600081518084526020808501945080840160005b83811015611e5a5781516001600160a01b031687529582019590820190600101611e35565b509495945050505050565b60208152815160208201526000602083015160018060a01b03808216604085015260408501519150808251166060850152506020810151608084015250606083015160a0830152608083015160e060c0840152611ec6610100840182611e21565b905060a0840151601f198483030160e085015261128b8282611dbe565b600060208284031215611ef557600080fd5b5051919050565b6020808252602e908201527f4e6174697665546f6b656e44657374696e6174696f6e3a207a65726f2072656360408201526d697069656e74206164647265737360901b606082015260800190565b60008060408385031215611f5d57600080fd5b8251611f6881611a96565b6020939093015192949293505050565b600060208284031215611f8a57600080fd5b81518015158114611ac857600080fd5b60008251611fac818460208701611d9a565b9190910192915050565b602081526000611ac86020830184611dbe56fea2646970667358221220699eb7cd5dc9d7a68df5bd8baf0f87397ce7505132037cac6ae97c690b3bfdaf64736f6c634300081200334e6174697665546f6b656e44657374696e6174696f6e3a207a65726f20736f75", } // NativeTokenDestinationABI is the input ABI used to generate the binding from. @@ -456,6 +456,37 @@ func (_NativeTokenDestination *NativeTokenDestinationCallerSession) IsCollateral return _NativeTokenDestination.Contract.IsCollateralized(&_NativeTokenDestination.CallOpts) } +// IsTeleporterAddressPaused is a free data retrieval call binding the contract method 0x97314297. +// +// Solidity: function isTeleporterAddressPaused(address teleporterAddress) view returns(bool) +func (_NativeTokenDestination *NativeTokenDestinationCaller) IsTeleporterAddressPaused(opts *bind.CallOpts, teleporterAddress common.Address) (bool, error) { + var out []interface{} + err := _NativeTokenDestination.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 (_NativeTokenDestination *NativeTokenDestinationSession) IsTeleporterAddressPaused(teleporterAddress common.Address) (bool, error) { + return _NativeTokenDestination.Contract.IsTeleporterAddressPaused(&_NativeTokenDestination.CallOpts, teleporterAddress) +} + +// IsTeleporterAddressPaused is a free data retrieval call binding the contract method 0x97314297. +// +// Solidity: function isTeleporterAddressPaused(address teleporterAddress) view returns(bool) +func (_NativeTokenDestination *NativeTokenDestinationCallerSession) IsTeleporterAddressPaused(teleporterAddress common.Address) (bool, error) { + return _NativeTokenDestination.Contract.IsTeleporterAddressPaused(&_NativeTokenDestination.CallOpts, teleporterAddress) +} + // NativeTokenSourceAddress is a free data retrieval call binding the contract method 0x5d93f9af. // // Solidity: function nativeTokenSourceAddress() view returns(address) @@ -642,6 +673,27 @@ func (_NativeTokenDestination *NativeTokenDestinationCallerSession) TotalSupply( return _NativeTokenDestination.Contract.TotalSupply(&_NativeTokenDestination.CallOpts) } +// PauseTeleporterAddress is a paid mutator transaction binding the contract method 0x2b0d8f18. +// +// Solidity: function pauseTeleporterAddress(address teleporterAddress) returns() +func (_NativeTokenDestination *NativeTokenDestinationTransactor) PauseTeleporterAddress(opts *bind.TransactOpts, teleporterAddress common.Address) (*types.Transaction, error) { + return _NativeTokenDestination.contract.Transact(opts, "pauseTeleporterAddress", teleporterAddress) +} + +// PauseTeleporterAddress is a paid mutator transaction binding the contract method 0x2b0d8f18. +// +// Solidity: function pauseTeleporterAddress(address teleporterAddress) returns() +func (_NativeTokenDestination *NativeTokenDestinationSession) PauseTeleporterAddress(teleporterAddress common.Address) (*types.Transaction, error) { + return _NativeTokenDestination.Contract.PauseTeleporterAddress(&_NativeTokenDestination.TransactOpts, teleporterAddress) +} + +// PauseTeleporterAddress is a paid mutator transaction binding the contract method 0x2b0d8f18. +// +// Solidity: function pauseTeleporterAddress(address teleporterAddress) returns() +func (_NativeTokenDestination *NativeTokenDestinationTransactorSession) PauseTeleporterAddress(teleporterAddress common.Address) (*types.Transaction, error) { + return _NativeTokenDestination.Contract.PauseTeleporterAddress(&_NativeTokenDestination.TransactOpts, teleporterAddress) +} + // ReceiveTeleporterMessage is a paid mutator transaction binding the contract method 0xc868efaa. // // Solidity: function receiveTeleporterMessage(bytes32 originBlockchainID, address originSenderAddress, bytes message) returns() @@ -747,6 +799,27 @@ func (_NativeTokenDestination *NativeTokenDestinationTransactorSession) Transfer return _NativeTokenDestination.Contract.TransferToSource(&_NativeTokenDestination.TransactOpts, recipient, feeInfo, allowedRelayerAddresses) } +// UnpauseTeleporterAddress is a paid mutator transaction binding the contract method 0x4511243e. +// +// Solidity: function unpauseTeleporterAddress(address teleporterAddress) returns() +func (_NativeTokenDestination *NativeTokenDestinationTransactor) UnpauseTeleporterAddress(opts *bind.TransactOpts, teleporterAddress common.Address) (*types.Transaction, error) { + return _NativeTokenDestination.contract.Transact(opts, "unpauseTeleporterAddress", teleporterAddress) +} + +// UnpauseTeleporterAddress is a paid mutator transaction binding the contract method 0x4511243e. +// +// Solidity: function unpauseTeleporterAddress(address teleporterAddress) returns() +func (_NativeTokenDestination *NativeTokenDestinationSession) UnpauseTeleporterAddress(teleporterAddress common.Address) (*types.Transaction, error) { + return _NativeTokenDestination.Contract.UnpauseTeleporterAddress(&_NativeTokenDestination.TransactOpts, teleporterAddress) +} + +// UnpauseTeleporterAddress is a paid mutator transaction binding the contract method 0x4511243e. +// +// Solidity: function unpauseTeleporterAddress(address teleporterAddress) returns() +func (_NativeTokenDestination *NativeTokenDestinationTransactorSession) UnpauseTeleporterAddress(teleporterAddress common.Address) (*types.Transaction, error) { + return _NativeTokenDestination.Contract.UnpauseTeleporterAddress(&_NativeTokenDestination.TransactOpts, teleporterAddress) +} + // UpdateMinTeleporterVersion is a paid mutator transaction binding the contract method 0x5eb99514. // // Solidity: function updateMinTeleporterVersion(uint256 version) returns() @@ -1499,6 +1572,294 @@ func (_NativeTokenDestination *NativeTokenDestinationFilterer) ParseReportTotalB return event, nil } +// NativeTokenDestinationTeleporterAddressPausedIterator is returned from FilterTeleporterAddressPaused and is used to iterate over the raw logs and unpacked data for TeleporterAddressPaused events raised by the NativeTokenDestination contract. +type NativeTokenDestinationTeleporterAddressPausedIterator struct { + Event *NativeTokenDestinationTeleporterAddressPaused // 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 *NativeTokenDestinationTeleporterAddressPausedIterator) 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(NativeTokenDestinationTeleporterAddressPaused) + 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(NativeTokenDestinationTeleporterAddressPaused) + 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 *NativeTokenDestinationTeleporterAddressPausedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *NativeTokenDestinationTeleporterAddressPausedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// NativeTokenDestinationTeleporterAddressPaused represents a TeleporterAddressPaused event raised by the NativeTokenDestination contract. +type NativeTokenDestinationTeleporterAddressPaused 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 (_NativeTokenDestination *NativeTokenDestinationFilterer) FilterTeleporterAddressPaused(opts *bind.FilterOpts, teleporterAddress []common.Address) (*NativeTokenDestinationTeleporterAddressPausedIterator, error) { + + var teleporterAddressRule []interface{} + for _, teleporterAddressItem := range teleporterAddress { + teleporterAddressRule = append(teleporterAddressRule, teleporterAddressItem) + } + + logs, sub, err := _NativeTokenDestination.contract.FilterLogs(opts, "TeleporterAddressPaused", teleporterAddressRule) + if err != nil { + return nil, err + } + return &NativeTokenDestinationTeleporterAddressPausedIterator{contract: _NativeTokenDestination.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 (_NativeTokenDestination *NativeTokenDestinationFilterer) WatchTeleporterAddressPaused(opts *bind.WatchOpts, sink chan<- *NativeTokenDestinationTeleporterAddressPaused, teleporterAddress []common.Address) (event.Subscription, error) { + + var teleporterAddressRule []interface{} + for _, teleporterAddressItem := range teleporterAddress { + teleporterAddressRule = append(teleporterAddressRule, teleporterAddressItem) + } + + logs, sub, err := _NativeTokenDestination.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(NativeTokenDestinationTeleporterAddressPaused) + if err := _NativeTokenDestination.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 (_NativeTokenDestination *NativeTokenDestinationFilterer) ParseTeleporterAddressPaused(log types.Log) (*NativeTokenDestinationTeleporterAddressPaused, error) { + event := new(NativeTokenDestinationTeleporterAddressPaused) + if err := _NativeTokenDestination.contract.UnpackLog(event, "TeleporterAddressPaused", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// NativeTokenDestinationTeleporterAddressUnpausedIterator is returned from FilterTeleporterAddressUnpaused and is used to iterate over the raw logs and unpacked data for TeleporterAddressUnpaused events raised by the NativeTokenDestination contract. +type NativeTokenDestinationTeleporterAddressUnpausedIterator struct { + Event *NativeTokenDestinationTeleporterAddressUnpaused // 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 *NativeTokenDestinationTeleporterAddressUnpausedIterator) 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(NativeTokenDestinationTeleporterAddressUnpaused) + 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(NativeTokenDestinationTeleporterAddressUnpaused) + 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 *NativeTokenDestinationTeleporterAddressUnpausedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *NativeTokenDestinationTeleporterAddressUnpausedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// NativeTokenDestinationTeleporterAddressUnpaused represents a TeleporterAddressUnpaused event raised by the NativeTokenDestination contract. +type NativeTokenDestinationTeleporterAddressUnpaused 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 (_NativeTokenDestination *NativeTokenDestinationFilterer) FilterTeleporterAddressUnpaused(opts *bind.FilterOpts, teleporterAddress []common.Address) (*NativeTokenDestinationTeleporterAddressUnpausedIterator, error) { + + var teleporterAddressRule []interface{} + for _, teleporterAddressItem := range teleporterAddress { + teleporterAddressRule = append(teleporterAddressRule, teleporterAddressItem) + } + + logs, sub, err := _NativeTokenDestination.contract.FilterLogs(opts, "TeleporterAddressUnpaused", teleporterAddressRule) + if err != nil { + return nil, err + } + return &NativeTokenDestinationTeleporterAddressUnpausedIterator{contract: _NativeTokenDestination.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 (_NativeTokenDestination *NativeTokenDestinationFilterer) WatchTeleporterAddressUnpaused(opts *bind.WatchOpts, sink chan<- *NativeTokenDestinationTeleporterAddressUnpaused, teleporterAddress []common.Address) (event.Subscription, error) { + + var teleporterAddressRule []interface{} + for _, teleporterAddressItem := range teleporterAddress { + teleporterAddressRule = append(teleporterAddressRule, teleporterAddressItem) + } + + logs, sub, err := _NativeTokenDestination.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(NativeTokenDestinationTeleporterAddressUnpaused) + if err := _NativeTokenDestination.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 (_NativeTokenDestination *NativeTokenDestinationFilterer) ParseTeleporterAddressUnpaused(log types.Log) (*NativeTokenDestinationTeleporterAddressUnpaused, error) { + event := new(NativeTokenDestinationTeleporterAddressUnpaused) + if err := _NativeTokenDestination.contract.UnpackLog(event, "TeleporterAddressUnpaused", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + // NativeTokenDestinationTransferToSourceIterator is returned from FilterTransferToSource and is used to iterate over the raw logs and unpacked data for TransferToSource events raised by the NativeTokenDestination contract. type NativeTokenDestinationTransferToSourceIterator struct { Event *NativeTokenDestinationTransferToSource // Event containing the contract specifics and raw log diff --git a/abi-bindings/go/CrossChainApplications/NativeTokenBridge/NativeTokenSource/NativeTokenSource.go b/abi-bindings/go/CrossChainApplications/NativeTokenBridge/NativeTokenSource/NativeTokenSource.go index 63dc776c6..14c9c998b 100644 --- a/abi-bindings/go/CrossChainApplications/NativeTokenBridge/NativeTokenSource/NativeTokenSource.go +++ b/abi-bindings/go/CrossChainApplications/NativeTokenBridge/NativeTokenSource/NativeTokenSource.go @@ -37,8 +37,8 @@ type TeleporterFeeInfo struct { // NativeTokenSourceMetaData contains all meta data concerning the NativeTokenSource contract. var NativeTokenSourceMetaData = &bind.MetaData{ - ABI: "[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"teleporterRegistryAddress\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"destinationBlockchainID_\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"nativeTokenDestinationAddress_\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"BurnTokens\",\"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\":\"sender\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"teleporterMessageID\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"TransferToDestination\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"UnlockTokens\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"BURNED_TX_FEES_ADDRESS\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"MINT_NATIVE_TOKENS_REQUIRED_GAS\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"destinationBlockchainID\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"destinationBurnedTotal\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getMinTeleporterVersion\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"nativeTokenDestinationAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"originBlockchainID\",\"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\":[],\"name\":\"teleporterRegistry\",\"outputs\":[{\"internalType\":\"contractTeleporterRegistry\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"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\":\"transferToDestination\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"version\",\"type\":\"uint256\"}],\"name\":\"updateMinTeleporterVersion\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", - Bin: "0x60e06040523480156200001157600080fd5b5060405162001ccb38038062001ccb83398101604081905262000034916200037b565b82806001600160a01b038116620000b85760405162461bcd60e51b815260206004820152603760248201527f54656c65706f727465725570677261646561626c653a207a65726f2074656c6560448201527f706f72746572207265676973747279206164647265737300000000000000000060648201526084015b60405180910390fd5b6001600160a01b03811660808190526040805163301fd1f560e21b8152905163c07f47d4916004808201926020929091908290030181865afa15801562000103573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620001299190620003bc565b6000555062000138336200030c565b50600160025581620001965760405162461bcd60e51b8152602060048201526031602482015260008051602062001cab8339815191526044820152701a5bdb88189b1bd8dad8da185a5b881251607a1b6064820152608401620000af565b7302000000000000000000000000000000000000056001600160a01b0316634213cf786040518163ffffffff1660e01b8152600401602060405180830381865afa158015620001e9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200020f9190620003bc565b8203620002855760405162461bcd60e51b815260206004820152603560248201527f4e6174697665546f6b656e536f757263653a2063616e6e6f742062726964676560448201527f20776974682073616d6520626c6f636b636861696e00000000000000000000006064820152608401620000af565b60a08290526001600160a01b038116620002f75760405162461bcd60e51b8152602060048201526034602482015260008051602062001cab83398151915260448201527f696f6e20636f6e747261637420616464726573730000000000000000000000006064820152608401620000af565b6001600160a01b031660c05250620003d69050565b600180546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b80516001600160a01b03811681146200037657600080fd5b919050565b6000806000606084860312156200039157600080fd5b6200039c846200035e565b925060208401519150620003b3604085016200035e565b90509250925092565b600060208284031215620003cf57600080fd5b5051919050565b60805160a05160c0516118756200043660003960008181610201015281816103f80152610ca001526000818161012a015281816103d20152610c1c01526000818160d9015281816102c401528181610591015261072e01526118756000f3fe6080604052600436106100c25760003560e01c8063ad0aee251161007f578063c452165e11610059578063c452165e14610223578063c868efaa1461023b578063d2cc7a701461025b578063f2fde38b1461027057600080fd5b8063ad0aee25146101c5578063b6171f73146101d8578063b8c9091a146101ef57600080fd5b80631a7f5bec146100c757806341d3014d1461011857806355db3e9e1461015a5780635eb9951414610170578063715018a6146101925780638da5cb5b146101a7575b600080fd5b3480156100d357600080fd5b506100fb7f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020015b60405180910390f35b34801561012457600080fd5b5061014c7f000000000000000000000000000000000000000000000000000000000000000081565b60405190815260200161010f565b34801561016657600080fd5b5061014c60035481565b34801561017c57600080fd5b5061019061018b366004611325565b610290565b005b34801561019e57600080fd5b506101906102a4565b3480156101b357600080fd5b506001546001600160a01b03166100fb565b6101906101d3366004611353565b6102b8565b3480156101e457600080fd5b5061014c620186a081565b3480156101fb57600080fd5b506100fb7f000000000000000000000000000000000000000000000000000000000000000081565b34801561022f57600080fd5b506100fb600160981b81565b34801561024757600080fd5b506101906102563660046113f2565b610579565b34801561026757600080fd5b5060005461014c565b34801561027c57600080fd5b5061019061028b36600461146c565b6106ac565b610298610722565b6102a18161072a565b50565b6102ac6108c8565b6102b66000610922565b565b6102c0610974565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d820e64f6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610320573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103449190611490565b90506001600160a01b0385166103755760405162461bcd60e51b815260040161036c906114ad565b60405180910390fd5b60006020850135156103b45761039b610391602087018761146c565b86602001356109cb565b90506103b46103ad602087018761146c565b8383610b35565b6000826001600160a01b031663624488506040518060c001604052807f000000000000000000000000000000000000000000000000000000000000000081526020017f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316815260200189803603810190610436919061153d565b8152602001620186a081526020018888808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152505050908252506040516020918201916104a5918d913491016001600160a01b03929092168252602082015260400190565b6040516020818303038152906040528152506040518263ffffffff1660e01b81526004016104d39190611629565b6020604051808303816000875af11580156104f2573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061051691906116a7565b905080876001600160a01b0316336001600160a01b03167f2b4e8f08417773e367064a6aea9ca2df303a60876676f70b6c3c5e66b314ca5a3460405161055e91815260200190565b60405180910390a45050506105736001600255565b50505050565b60005460405163260f846760e11b81523360048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690634c1f08ce90602401602060405180830381865afa1580156105e0573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061060491906116a7565b101561066b5760405162461bcd60e51b815260206004820152603060248201527f54656c65706f727465725570677261646561626c653a20696e76616c6964205460448201526f32b632b837b93a32b91039b2b73232b960811b606482015260840161036c565b610573848484848080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250610c1a92505050565b6106b46108c8565b6001600160a01b0381166107195760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161036c565b6102a181610922565b6102b66108c8565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663c07f47d46040518163ffffffff1660e01b8152600401602060405180830381865afa15801561078a573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107ae91906116a7565b6000549091508183111561081e5760405162461bcd60e51b815260206004820152603160248201527f54656c65706f727465725570677261646561626c653a20696e76616c6964205460448201527032b632b837b93a32b9103b32b939b4b7b760791b606482015260840161036c565b8083116108935760405162461bcd60e51b815260206004820152603f60248201527f54656c65706f727465725570677261646561626c653a206e6f7420677265617460448201527f6572207468616e2063757272656e74206d696e696d756d2076657273696f6e00606482015260840161036c565b6000838155604051849183917fa9a7ef57e41f05b4c15480842f5f0c27edfcbb553fed281f7c4068452cc1c02d9190a3505050565b6001546001600160a01b031633146102b65760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161036c565b600180546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b60028054036109c55760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015260640161036c565b60028055565b6040516370a0823160e01b815230600482015260009081906001600160a01b038516906370a0823190602401602060405180830381865afa158015610a14573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a3891906116a7565b9050610a4f6001600160a01b038516333086610e28565b6040516370a0823160e01b81523060048201526000906001600160a01b038616906370a0823190602401602060405180830381865afa158015610a96573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610aba91906116a7565b9050818111610b205760405162461bcd60e51b815260206004820152602c60248201527f5361666545524332305472616e7366657246726f6d3a2062616c616e6365206e60448201526b1bdd081a5b98dc99585cd95960a21b606482015260840161036c565b610b2a82826116d6565b925050505b92915050565b604051636eb1769f60e11b81523060048201526001600160a01b038381166024830152600091839186169063dd62ed3e90604401602060405180830381865afa158015610b86573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610baa91906116a7565b610bb491906116e9565b6040516001600160a01b03851660248201526044810182905290915061057390859063095ea7b360e01b906064015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152610e60565b7f00000000000000000000000000000000000000000000000000000000000000008314610c9e5760405162461bcd60e51b815260206004820152602c60248201527f4e6174697665546f6b656e536f757263653a20696e76616c696420646573746960448201526b3730ba34b7b71031b430b4b760a11b606482015260840161036c565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316826001600160a01b031614610d2e5760405162461bcd60e51b815260206004820152602660248201527f4e6174697665546f6b656e536f757263653a20756e617574686f72697a65642060448201526539b2b73232b960d11b606482015260840161036c565b60008082806020019051810190610d4591906116fc565b90925090506000826001811115610d5e57610d5e6117aa565b03610d8f5760008082806020019051810190610d7a91906117c0565b91509150610d888282610f37565b5050610e21565b6001826001811115610da357610da36117aa565b03610dcf57600081806020019051810190610dbe91906116a7565b9050610dc981611010565b50610e21565b60405162461bcd60e51b815260206004820152602160248201527f4e6174697665546f6b656e536f757263653a20696e76616c696420616374696f6044820152603760f91b606482015260840161036c565b5050505050565b6040516001600160a01b03808516602483015283166044820152606481018290526105739085906323b872dd60e01b90608401610be3565b6000610eb5826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b031661103b9092919063ffffffff16565b805190915015610f325780806020019051810190610ed391906117ee565b610f325760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b606482015260840161036c565b505050565b6001600160a01b038216610f5d5760405162461bcd60e51b815260040161036c906114ad565b80471015610fc05760405162461bcd60e51b815260206004820152602a60248201527f4e6174697665546f6b656e536f757263653a20696e73756666696369656e742060448201526918dbdb1b185d195c985b60b21b606482015260840161036c565b604080516001600160a01b0384168152602081018390527f55aaef8fd8c07238c3618a93c8a1627194187d3b0952908e58f2ab0f944fb407910160405180910390a161100c8282611052565b5050565b6003548111156102a15760006003548261102a91906116d6565b90506110358161116b565b50600355565b606061104a84846000856111ac565b949350505050565b804710156110a25760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e6365000000604482015260640161036c565b6000826001600160a01b03168260405160006040518083038185875af1925050503d80600081146110ef576040519150601f19603f3d011682016040523d82523d6000602084013e6110f4565b606091505b5050905080610f325760405162461bcd60e51b815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d61792068617665207265766572746564000000000000606482015260840161036c565b6040518181527f2cd3fd70cd5a5d6d805e90d22741aa1a84590ace7cf01b244719558d266143829060200160405180910390a16102a1600160981b82611052565b60608247101561120d5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b606482015260840161036c565b600080866001600160a01b031685876040516112299190611810565b60006040518083038185875af1925050503d8060008114611266576040519150601f19603f3d011682016040523d82523d6000602084013e61126b565b606091505b509150915061127c87838387611287565b979650505050505050565b606083156112f65782516000036112ef576001600160a01b0385163b6112ef5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015260640161036c565b508161104a565b61104a838381511561130b5781518083602001fd5b8060405162461bcd60e51b815260040161036c919061182c565b60006020828403121561133757600080fd5b5035919050565b6001600160a01b03811681146102a157600080fd5b600080600080848603608081121561136a57600080fd5b85356113758161133e565b94506040601f198201121561138957600080fd5b50602085019250606085013567ffffffffffffffff808211156113ab57600080fd5b818701915087601f8301126113bf57600080fd5b8135818111156113ce57600080fd5b8860208260051b85010111156113e357600080fd5b95989497505060200194505050565b6000806000806060858703121561140857600080fd5b84359350602085013561141a8161133e565b9250604085013567ffffffffffffffff8082111561143757600080fd5b818701915087601f83011261144b57600080fd5b81358181111561145a57600080fd5b8860208285010111156113e357600080fd5b60006020828403121561147e57600080fd5b81356114898161133e565b9392505050565b6000602082840312156114a257600080fd5b81516114898161133e565b60208082526029908201527f4e6174697665546f6b656e536f757263653a207a65726f20726563697069656e60408201526874206164647265737360b81b606082015260800190565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff81118282101715611535576115356114f6565b604052919050565b60006040828403121561154f57600080fd5b6040516040810181811067ffffffffffffffff82111715611572576115726114f6565b60405282356115808161133e565b81526020928301359281019290925250919050565b600081518084526020808501945080840160005b838110156115ce5781516001600160a01b0316875295820195908201906001016115a9565b509495945050505050565b60005b838110156115f45781810151838201526020016115dc565b50506000910152565b600081518084526116158160208601602086016115d9565b601f01601f19169290920160200192915050565b60208152815160208201526000602083015160018060a01b03808216604085015260408501519150808251166060850152506020810151608084015250606083015160a0830152608083015160e060c084015261168a610100840182611595565b905060a0840151601f198483030160e0850152610b2a82826115fd565b6000602082840312156116b957600080fd5b5051919050565b634e487b7160e01b600052601160045260246000fd5b81810381811115610b2f57610b2f6116c0565b80820180821115610b2f57610b2f6116c0565b6000806040838503121561170f57600080fd5b82516002811061171e57600080fd5b602084015190925067ffffffffffffffff8082111561173c57600080fd5b818501915085601f83011261175057600080fd5b815181811115611762576117626114f6565b611775601f8201601f191660200161150c565b915080825286602082850101111561178c57600080fd5b61179d8160208401602086016115d9565b5080925050509250929050565b634e487b7160e01b600052602160045260246000fd5b600080604083850312156117d357600080fd5b82516117de8161133e565b6020939093015192949293505050565b60006020828403121561180057600080fd5b8151801515811461148957600080fd5b600082516118228184602087016115d9565b9190910192915050565b60208152600061148960208301846115fd56fea26469706673582212200576a269de80bf07a558fa6049b292106cfc0d84c93a12384399d4653ed6712964736f6c634300081200334e6174697665546f6b656e536f757263653a207a65726f2064657374696e6174", + ABI: "[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"teleporterRegistryAddress\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"destinationBlockchainID_\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"nativeTokenDestinationAddress_\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"BurnTokens\",\"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\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"teleporterMessageID\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"TransferToDestination\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"UnlockTokens\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"BURNED_TX_FEES_ADDRESS\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"MINT_NATIVE_TOKENS_REQUIRED_GAS\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"destinationBlockchainID\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"destinationBurnedTotal\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"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\":\"nativeTokenDestinationAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"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\":\"originBlockchainID\",\"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\":[],\"name\":\"teleporterRegistry\",\"outputs\":[{\"internalType\":\"contractTeleporterRegistry\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"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\":\"transferToDestination\",\"outputs\":[],\"stateMutability\":\"payable\",\"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: "0x60e06040523480156200001157600080fd5b50604051620020473803806200204783398101604081905262000034916200037b565b82806001600160a01b038116620000b85760405162461bcd60e51b815260206004820152603760248201527f54656c65706f727465725570677261646561626c653a207a65726f2074656c6560448201527f706f72746572207265676973747279206164647265737300000000000000000060648201526084015b60405180910390fd5b6001600160a01b03811660808190526040805163301fd1f560e21b8152905163c07f47d4916004808201926020929091908290030181865afa15801562000103573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620001299190620003bc565b6001555062000138336200030c565b50600160035581620001965760405162461bcd60e51b81526020600482015260316024820152600080516020620020278339815191526044820152701a5bdb88189b1bd8dad8da185a5b881251607a1b6064820152608401620000af565b7302000000000000000000000000000000000000056001600160a01b0316634213cf786040518163ffffffff1660e01b8152600401602060405180830381865afa158015620001e9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200020f9190620003bc565b8203620002855760405162461bcd60e51b815260206004820152603560248201527f4e6174697665546f6b656e536f757263653a2063616e6e6f742062726964676560448201527f20776974682073616d6520626c6f636b636861696e00000000000000000000006064820152608401620000af565b60a08290526001600160a01b038116620002f75760405162461bcd60e51b815260206004820152603460248201526000805160206200202783398151915260448201527f696f6e20636f6e747261637420616464726573730000000000000000000000006064820152608401620000af565b6001600160a01b031660c05250620003d69050565b600280546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b80516001600160a01b03811681146200037657600080fd5b919050565b6000806000606084860312156200039157600080fd5b6200039c846200035e565b925060208401519150620003b3604085016200035e565b90509250925092565b600060208284031215620003cf57600080fd5b5051919050565b60805160a05160c051611bf062000437600039600081816102bb015281816106a80152610fcd01526000818161017d015281816106820152610f4901526000818161010a0152818161057d015281816108410152610a570152611bf06000f3fe6080604052600436106100f35760003560e01c8063973142971161008a578063c452165e11610059578063c452165e146102dd578063c868efaa146102f5578063d2cc7a7014610315578063f2fde38b1461032a57600080fd5b80639731429714610236578063ad0aee251461027f578063b6171f7314610292578063b8c9091a146102a957600080fd5b806355db3e9e116100c657806355db3e9e146101cd5780635eb99514146101e3578063715018a6146102035780638da5cb5b1461021857600080fd5b80631a7f5bec146100f85780632b0d8f181461014957806341d3014d1461016b5780634511243e146101ad575b600080fd5b34801561010457600080fd5b5061012c7f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020015b60405180910390f35b34801561015557600080fd5b50610169610164366004611667565b61034a565b005b34801561017757600080fd5b5061019f7f000000000000000000000000000000000000000000000000000000000000000081565b604051908152602001610140565b3480156101b957600080fd5b506101696101c8366004611667565b61044c565b3480156101d957600080fd5b5061019f60045481565b3480156101ef57600080fd5b506101696101fe36600461168b565b610549565b34801561020f57600080fd5b5061016961055d565b34801561022457600080fd5b506002546001600160a01b031661012c565b34801561024257600080fd5b5061026f610251366004611667565b6001600160a01b031660009081526020819052604090205460ff1690565b6040519015158152602001610140565b61016961028d3660046116a4565b610571565b34801561029e57600080fd5b5061019f620186a081565b3480156102b557600080fd5b5061012c7f000000000000000000000000000000000000000000000000000000000000000081565b3480156102e957600080fd5b5061012c600160981b81565b34801561030157600080fd5b50610169610310366004611743565b610829565b34801561032157600080fd5b5060015461019f565b34801561033657600080fd5b50610169610345366004611667565b6109d5565b610352610a4b565b6001600160a01b0381166103815760405162461bcd60e51b8152600401610378906117bd565b60405180910390fd5b6001600160a01b03811660009081526020819052604090205460ff16156104005760405162461bcd60e51b815260206004820152602d60248201527f54656c65706f727465725570677261646561626c653a2061646472657373206160448201526c1b1c9958591e481c185d5cd959609a1b6064820152608401610378565b6001600160a01b038116600081815260208190526040808220805460ff19166001179055517f933f93e57a222e6330362af8b376d0a8725b6901e9a2fb86d00f169702b28a4c9190a250565b610454610a4b565b6001600160a01b03811661047a5760405162461bcd60e51b8152600401610378906117bd565b6001600160a01b03811660009081526020819052604090205460ff166104f45760405162461bcd60e51b815260206004820152602960248201527f54656c65706f727465725570677261646561626c653a2061646472657373206e6044820152681bdd081c185d5cd95960ba1b6064820152608401610378565b6040516001600160a01b038216907f844e2f3154214672229235858fd029d1dfd543901c6d05931f0bc2480a2d72c390600090a26001600160a01b03166000908152602081905260409020805460ff19169055565b610551610a4b565b61055a81610a53565b50565b610565610bf3565b61056f6000610c4d565b565b610579610c9f565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d820e64f6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156105d9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105fd919061180b565b90506001600160a01b0385166106255760405162461bcd60e51b815260040161037890611828565b60006020850135156106645761064b6106416020870187611667565b8660200135610cf8565b905061066461065d6020870187611667565b8383610e62565b6000826001600160a01b031663624488506040518060c001604052807f000000000000000000000000000000000000000000000000000000000000000081526020017f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03168152602001898036038101906106e691906118b8565b8152602001620186a08152602001888880806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250505090825250604051602091820191610755918d913491016001600160a01b03929092168252602082015260400190565b6040516020818303038152906040528152506040518263ffffffff1660e01b815260040161078391906119a4565b6020604051808303816000875af11580156107a2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107c69190611a22565b905080876001600160a01b0316336001600160a01b03167f2b4e8f08417773e367064a6aea9ca2df303a60876676f70b6c3c5e66b314ca5a3460405161080e91815260200190565b60405180910390a45050506108236001600355565b50505050565b60015460405163260f846760e11b81523360048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690634c1f08ce90602401602060405180830381865afa158015610890573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108b49190611a22565b101561091b5760405162461bcd60e51b815260206004820152603060248201527f54656c65706f727465725570677261646561626c653a20696e76616c6964205460448201526f32b632b837b93a32b91039b2b73232b960811b6064820152608401610378565b3360009081526020819052604090205460ff16156109945760405162461bcd60e51b815260206004820152603060248201527f54656c65706f727465725570677261646561626c653a2054656c65706f72746560448201526f1c881859191c995cdcc81c185d5cd95960821b6064820152608401610378565b610823848484848080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250610f4792505050565b6109dd610bf3565b6001600160a01b038116610a425760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610378565b61055a81610c4d565b61056f610bf3565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663c07f47d46040518163ffffffff1660e01b8152600401602060405180830381865afa158015610ab3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ad79190611a22565b60015490915081831115610b475760405162461bcd60e51b815260206004820152603160248201527f54656c65706f727465725570677261646561626c653a20696e76616c6964205460448201527032b632b837b93a32b9103b32b939b4b7b760791b6064820152608401610378565b808311610bbc5760405162461bcd60e51b815260206004820152603f60248201527f54656c65706f727465725570677261646561626c653a206e6f7420677265617460448201527f6572207468616e2063757272656e74206d696e696d756d2076657273696f6e006064820152608401610378565b6001839055604051839082907fa9a7ef57e41f05b4c15480842f5f0c27edfcbb553fed281f7c4068452cc1c02d90600090a3505050565b6002546001600160a01b0316331461056f5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610378565b600280546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600260035403610cf15760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610378565b6002600355565b6040516370a0823160e01b815230600482015260009081906001600160a01b038516906370a0823190602401602060405180830381865afa158015610d41573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d659190611a22565b9050610d7c6001600160a01b038516333086611155565b6040516370a0823160e01b81523060048201526000906001600160a01b038616906370a0823190602401602060405180830381865afa158015610dc3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610de79190611a22565b9050818111610e4d5760405162461bcd60e51b815260206004820152602c60248201527f5361666545524332305472616e7366657246726f6d3a2062616c616e6365206e60448201526b1bdd081a5b98dc99585cd95960a21b6064820152608401610378565b610e578282611a51565b925050505b92915050565b604051636eb1769f60e11b81523060048201526001600160a01b038381166024830152600091839186169063dd62ed3e90604401602060405180830381865afa158015610eb3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ed79190611a22565b610ee19190611a64565b6040516001600160a01b03851660248201526044810182905290915061082390859063095ea7b360e01b906064015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b03199093169290921790915261118d565b7f00000000000000000000000000000000000000000000000000000000000000008314610fcb5760405162461bcd60e51b815260206004820152602c60248201527f4e6174697665546f6b656e536f757263653a20696e76616c696420646573746960448201526b3730ba34b7b71031b430b4b760a11b6064820152608401610378565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316826001600160a01b03161461105b5760405162461bcd60e51b815260206004820152602660248201527f4e6174697665546f6b656e536f757263653a20756e617574686f72697a65642060448201526539b2b73232b960d11b6064820152608401610378565b600080828060200190518101906110729190611a77565b9092509050600082600181111561108b5761108b611b25565b036110bc57600080828060200190518101906110a79190611b3b565b915091506110b58282611264565b505061114e565b60018260018111156110d0576110d0611b25565b036110fc576000818060200190518101906110eb9190611a22565b90506110f68161133d565b5061114e565b60405162461bcd60e51b815260206004820152602160248201527f4e6174697665546f6b656e536f757263653a20696e76616c696420616374696f6044820152603760f91b6064820152608401610378565b5050505050565b6040516001600160a01b03808516602483015283166044820152606481018290526108239085906323b872dd60e01b90608401610f10565b60006111e2826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166113689092919063ffffffff16565b80519091501561125f57808060200190518101906112009190611b69565b61125f5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610378565b505050565b6001600160a01b03821661128a5760405162461bcd60e51b815260040161037890611828565b804710156112ed5760405162461bcd60e51b815260206004820152602a60248201527f4e6174697665546f6b656e536f757263653a20696e73756666696369656e742060448201526918dbdb1b185d195c985b60b21b6064820152608401610378565b604080516001600160a01b0384168152602081018390527f55aaef8fd8c07238c3618a93c8a1627194187d3b0952908e58f2ab0f944fb407910160405180910390a1611339828261137f565b5050565b60045481111561055a576000600454826113579190611a51565b905061136281611498565b50600455565b606061137784846000856114d9565b949350505050565b804710156113cf5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e63650000006044820152606401610378565b6000826001600160a01b03168260405160006040518083038185875af1925050503d806000811461141c576040519150601f19603f3d011682016040523d82523d6000602084013e611421565b606091505b505090508061125f5760405162461bcd60e51b815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d617920686176652072657665727465640000000000006064820152608401610378565b6040518181527f2cd3fd70cd5a5d6d805e90d22741aa1a84590ace7cf01b244719558d266143829060200160405180910390a161055a600160981b8261137f565b60608247101561153a5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b6064820152608401610378565b600080866001600160a01b031685876040516115569190611b8b565b60006040518083038185875af1925050503d8060008114611593576040519150601f19603f3d011682016040523d82523d6000602084013e611598565b606091505b50915091506115a9878383876115b4565b979650505050505050565b6060831561162357825160000361161c576001600160a01b0385163b61161c5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610378565b5081611377565b61137783838151156116385781518083602001fd5b8060405162461bcd60e51b81526004016103789190611ba7565b6001600160a01b038116811461055a57600080fd5b60006020828403121561167957600080fd5b813561168481611652565b9392505050565b60006020828403121561169d57600080fd5b5035919050565b60008060008084860360808112156116bb57600080fd5b85356116c681611652565b94506040601f19820112156116da57600080fd5b50602085019250606085013567ffffffffffffffff808211156116fc57600080fd5b818701915087601f83011261171057600080fd5b81358181111561171f57600080fd5b8860208260051b850101111561173457600080fd5b95989497505060200194505050565b6000806000806060858703121561175957600080fd5b84359350602085013561176b81611652565b9250604085013567ffffffffffffffff8082111561178857600080fd5b818701915087601f83011261179c57600080fd5b8135818111156117ab57600080fd5b88602082850101111561173457600080fd5b6020808252602e908201527f54656c65706f727465725570677261646561626c653a207a65726f2054656c6560408201526d706f72746572206164647265737360901b606082015260800190565b60006020828403121561181d57600080fd5b815161168481611652565b60208082526029908201527f4e6174697665546f6b656e536f757263653a207a65726f20726563697069656e60408201526874206164647265737360b81b606082015260800190565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff811182821017156118b0576118b0611871565b604052919050565b6000604082840312156118ca57600080fd5b6040516040810181811067ffffffffffffffff821117156118ed576118ed611871565b60405282356118fb81611652565b81526020928301359281019290925250919050565b600081518084526020808501945080840160005b838110156119495781516001600160a01b031687529582019590820190600101611924565b509495945050505050565b60005b8381101561196f578181015183820152602001611957565b50506000910152565b60008151808452611990816020860160208601611954565b601f01601f19169290920160200192915050565b60208152815160208201526000602083015160018060a01b03808216604085015260408501519150808251166060850152506020810151608084015250606083015160a0830152608083015160e060c0840152611a05610100840182611910565b905060a0840151601f198483030160e0850152610e578282611978565b600060208284031215611a3457600080fd5b5051919050565b634e487b7160e01b600052601160045260246000fd5b81810381811115610e5c57610e5c611a3b565b80820180821115610e5c57610e5c611a3b565b60008060408385031215611a8a57600080fd5b825160028110611a9957600080fd5b602084015190925067ffffffffffffffff80821115611ab757600080fd5b818501915085601f830112611acb57600080fd5b815181811115611add57611add611871565b611af0601f8201601f1916602001611887565b9150808252866020828501011115611b0757600080fd5b611b18816020840160208601611954565b5080925050509250929050565b634e487b7160e01b600052602160045260246000fd5b60008060408385031215611b4e57600080fd5b8251611b5981611652565b6020939093015192949293505050565b600060208284031215611b7b57600080fd5b8151801515811461168457600080fd5b60008251611b9d818460208701611954565b9190910192915050565b602081526000611684602083018461197856fea26469706673582212200081473b80bf9943477af1a418ce19e5fd5ec8e2948badcb9904b579c585a81364736f6c634300081200334e6174697665546f6b656e536f757263653a207a65726f2064657374696e6174", } // NativeTokenSourceABI is the input ABI used to generate the binding from. @@ -363,6 +363,37 @@ func (_NativeTokenSource *NativeTokenSourceCallerSession) GetMinTeleporterVersio return _NativeTokenSource.Contract.GetMinTeleporterVersion(&_NativeTokenSource.CallOpts) } +// IsTeleporterAddressPaused is a free data retrieval call binding the contract method 0x97314297. +// +// Solidity: function isTeleporterAddressPaused(address teleporterAddress) view returns(bool) +func (_NativeTokenSource *NativeTokenSourceCaller) IsTeleporterAddressPaused(opts *bind.CallOpts, teleporterAddress common.Address) (bool, error) { + var out []interface{} + err := _NativeTokenSource.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 (_NativeTokenSource *NativeTokenSourceSession) IsTeleporterAddressPaused(teleporterAddress common.Address) (bool, error) { + return _NativeTokenSource.Contract.IsTeleporterAddressPaused(&_NativeTokenSource.CallOpts, teleporterAddress) +} + +// IsTeleporterAddressPaused is a free data retrieval call binding the contract method 0x97314297. +// +// Solidity: function isTeleporterAddressPaused(address teleporterAddress) view returns(bool) +func (_NativeTokenSource *NativeTokenSourceCallerSession) IsTeleporterAddressPaused(teleporterAddress common.Address) (bool, error) { + return _NativeTokenSource.Contract.IsTeleporterAddressPaused(&_NativeTokenSource.CallOpts, teleporterAddress) +} + // NativeTokenDestinationAddress is a free data retrieval call binding the contract method 0xb8c9091a. // // Solidity: function nativeTokenDestinationAddress() view returns(address) @@ -456,6 +487,27 @@ func (_NativeTokenSource *NativeTokenSourceCallerSession) TeleporterRegistry() ( return _NativeTokenSource.Contract.TeleporterRegistry(&_NativeTokenSource.CallOpts) } +// PauseTeleporterAddress is a paid mutator transaction binding the contract method 0x2b0d8f18. +// +// Solidity: function pauseTeleporterAddress(address teleporterAddress) returns() +func (_NativeTokenSource *NativeTokenSourceTransactor) PauseTeleporterAddress(opts *bind.TransactOpts, teleporterAddress common.Address) (*types.Transaction, error) { + return _NativeTokenSource.contract.Transact(opts, "pauseTeleporterAddress", teleporterAddress) +} + +// PauseTeleporterAddress is a paid mutator transaction binding the contract method 0x2b0d8f18. +// +// Solidity: function pauseTeleporterAddress(address teleporterAddress) returns() +func (_NativeTokenSource *NativeTokenSourceSession) PauseTeleporterAddress(teleporterAddress common.Address) (*types.Transaction, error) { + return _NativeTokenSource.Contract.PauseTeleporterAddress(&_NativeTokenSource.TransactOpts, teleporterAddress) +} + +// PauseTeleporterAddress is a paid mutator transaction binding the contract method 0x2b0d8f18. +// +// Solidity: function pauseTeleporterAddress(address teleporterAddress) returns() +func (_NativeTokenSource *NativeTokenSourceTransactorSession) PauseTeleporterAddress(teleporterAddress common.Address) (*types.Transaction, error) { + return _NativeTokenSource.Contract.PauseTeleporterAddress(&_NativeTokenSource.TransactOpts, teleporterAddress) +} + // ReceiveTeleporterMessage is a paid mutator transaction binding the contract method 0xc868efaa. // // Solidity: function receiveTeleporterMessage(bytes32 originBlockchainID, address originSenderAddress, bytes message) returns() @@ -540,6 +592,27 @@ func (_NativeTokenSource *NativeTokenSourceTransactorSession) TransferToDestinat return _NativeTokenSource.Contract.TransferToDestination(&_NativeTokenSource.TransactOpts, recipient, feeInfo, allowedRelayerAddresses) } +// UnpauseTeleporterAddress is a paid mutator transaction binding the contract method 0x4511243e. +// +// Solidity: function unpauseTeleporterAddress(address teleporterAddress) returns() +func (_NativeTokenSource *NativeTokenSourceTransactor) UnpauseTeleporterAddress(opts *bind.TransactOpts, teleporterAddress common.Address) (*types.Transaction, error) { + return _NativeTokenSource.contract.Transact(opts, "unpauseTeleporterAddress", teleporterAddress) +} + +// UnpauseTeleporterAddress is a paid mutator transaction binding the contract method 0x4511243e. +// +// Solidity: function unpauseTeleporterAddress(address teleporterAddress) returns() +func (_NativeTokenSource *NativeTokenSourceSession) UnpauseTeleporterAddress(teleporterAddress common.Address) (*types.Transaction, error) { + return _NativeTokenSource.Contract.UnpauseTeleporterAddress(&_NativeTokenSource.TransactOpts, teleporterAddress) +} + +// UnpauseTeleporterAddress is a paid mutator transaction binding the contract method 0x4511243e. +// +// Solidity: function unpauseTeleporterAddress(address teleporterAddress) returns() +func (_NativeTokenSource *NativeTokenSourceTransactorSession) UnpauseTeleporterAddress(teleporterAddress common.Address) (*types.Transaction, error) { + return _NativeTokenSource.Contract.UnpauseTeleporterAddress(&_NativeTokenSource.TransactOpts, teleporterAddress) +} + // UpdateMinTeleporterVersion is a paid mutator transaction binding the contract method 0x5eb99514. // // Solidity: function updateMinTeleporterVersion(uint256 version) returns() @@ -1001,6 +1074,294 @@ func (_NativeTokenSource *NativeTokenSourceFilterer) ParseOwnershipTransferred(l return event, nil } +// NativeTokenSourceTeleporterAddressPausedIterator is returned from FilterTeleporterAddressPaused and is used to iterate over the raw logs and unpacked data for TeleporterAddressPaused events raised by the NativeTokenSource contract. +type NativeTokenSourceTeleporterAddressPausedIterator struct { + Event *NativeTokenSourceTeleporterAddressPaused // 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 *NativeTokenSourceTeleporterAddressPausedIterator) 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(NativeTokenSourceTeleporterAddressPaused) + 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(NativeTokenSourceTeleporterAddressPaused) + 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 *NativeTokenSourceTeleporterAddressPausedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *NativeTokenSourceTeleporterAddressPausedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// NativeTokenSourceTeleporterAddressPaused represents a TeleporterAddressPaused event raised by the NativeTokenSource contract. +type NativeTokenSourceTeleporterAddressPaused 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 (_NativeTokenSource *NativeTokenSourceFilterer) FilterTeleporterAddressPaused(opts *bind.FilterOpts, teleporterAddress []common.Address) (*NativeTokenSourceTeleporterAddressPausedIterator, error) { + + var teleporterAddressRule []interface{} + for _, teleporterAddressItem := range teleporterAddress { + teleporterAddressRule = append(teleporterAddressRule, teleporterAddressItem) + } + + logs, sub, err := _NativeTokenSource.contract.FilterLogs(opts, "TeleporterAddressPaused", teleporterAddressRule) + if err != nil { + return nil, err + } + return &NativeTokenSourceTeleporterAddressPausedIterator{contract: _NativeTokenSource.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 (_NativeTokenSource *NativeTokenSourceFilterer) WatchTeleporterAddressPaused(opts *bind.WatchOpts, sink chan<- *NativeTokenSourceTeleporterAddressPaused, teleporterAddress []common.Address) (event.Subscription, error) { + + var teleporterAddressRule []interface{} + for _, teleporterAddressItem := range teleporterAddress { + teleporterAddressRule = append(teleporterAddressRule, teleporterAddressItem) + } + + logs, sub, err := _NativeTokenSource.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(NativeTokenSourceTeleporterAddressPaused) + if err := _NativeTokenSource.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 (_NativeTokenSource *NativeTokenSourceFilterer) ParseTeleporterAddressPaused(log types.Log) (*NativeTokenSourceTeleporterAddressPaused, error) { + event := new(NativeTokenSourceTeleporterAddressPaused) + if err := _NativeTokenSource.contract.UnpackLog(event, "TeleporterAddressPaused", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// NativeTokenSourceTeleporterAddressUnpausedIterator is returned from FilterTeleporterAddressUnpaused and is used to iterate over the raw logs and unpacked data for TeleporterAddressUnpaused events raised by the NativeTokenSource contract. +type NativeTokenSourceTeleporterAddressUnpausedIterator struct { + Event *NativeTokenSourceTeleporterAddressUnpaused // 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 *NativeTokenSourceTeleporterAddressUnpausedIterator) 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(NativeTokenSourceTeleporterAddressUnpaused) + 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(NativeTokenSourceTeleporterAddressUnpaused) + 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 *NativeTokenSourceTeleporterAddressUnpausedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *NativeTokenSourceTeleporterAddressUnpausedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// NativeTokenSourceTeleporterAddressUnpaused represents a TeleporterAddressUnpaused event raised by the NativeTokenSource contract. +type NativeTokenSourceTeleporterAddressUnpaused 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 (_NativeTokenSource *NativeTokenSourceFilterer) FilterTeleporterAddressUnpaused(opts *bind.FilterOpts, teleporterAddress []common.Address) (*NativeTokenSourceTeleporterAddressUnpausedIterator, error) { + + var teleporterAddressRule []interface{} + for _, teleporterAddressItem := range teleporterAddress { + teleporterAddressRule = append(teleporterAddressRule, teleporterAddressItem) + } + + logs, sub, err := _NativeTokenSource.contract.FilterLogs(opts, "TeleporterAddressUnpaused", teleporterAddressRule) + if err != nil { + return nil, err + } + return &NativeTokenSourceTeleporterAddressUnpausedIterator{contract: _NativeTokenSource.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 (_NativeTokenSource *NativeTokenSourceFilterer) WatchTeleporterAddressUnpaused(opts *bind.WatchOpts, sink chan<- *NativeTokenSourceTeleporterAddressUnpaused, teleporterAddress []common.Address) (event.Subscription, error) { + + var teleporterAddressRule []interface{} + for _, teleporterAddressItem := range teleporterAddress { + teleporterAddressRule = append(teleporterAddressRule, teleporterAddressItem) + } + + logs, sub, err := _NativeTokenSource.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(NativeTokenSourceTeleporterAddressUnpaused) + if err := _NativeTokenSource.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 (_NativeTokenSource *NativeTokenSourceFilterer) ParseTeleporterAddressUnpaused(log types.Log) (*NativeTokenSourceTeleporterAddressUnpaused, error) { + event := new(NativeTokenSourceTeleporterAddressUnpaused) + if err := _NativeTokenSource.contract.UnpackLog(event, "TeleporterAddressUnpaused", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + // NativeTokenSourceTransferToDestinationIterator is returned from FilterTransferToDestination and is used to iterate over the raw logs and unpacked data for TransferToDestination events raised by the NativeTokenSource contract. type NativeTokenSourceTransferToDestinationIterator struct { Event *NativeTokenSourceTransferToDestination // Event containing the contract specifics and raw log diff --git a/contracts/src/CrossChainApplications/NativeTokenBridge/ERC20TokenSource.sol b/contracts/src/CrossChainApplications/NativeTokenBridge/ERC20TokenSource.sol index 8353ea35f..5ba1b8209 100644 --- a/contracts/src/CrossChainApplications/NativeTokenBridge/ERC20TokenSource.sol +++ b/contracts/src/CrossChainApplications/NativeTokenBridge/ERC20TokenSource.sol @@ -9,7 +9,11 @@ import {ReentrancyGuard} from "@openzeppelin/contracts/security/ReentrancyGuard. import {IWarpMessenger} from "@subnet-evm-contracts/interfaces/IWarpMessenger.sol"; import {IERC20TokenSource} from "./IERC20TokenSource.sol"; import {ITokenSource} from "./ITokenSource.sol"; -import {ITeleporterMessenger, TeleporterMessageInput, TeleporterFeeInfo} from "../../Teleporter/ITeleporterMessenger.sol"; +import { + ITeleporterMessenger, + TeleporterMessageInput, + TeleporterFeeInfo +} from "../../Teleporter/ITeleporterMessenger.sol"; import {TeleporterOwnerUpgradeable} from "../../Teleporter/upgrades/TeleporterOwnerUpgradeable.sol"; import {SafeERC20TransferFrom} from "../../Teleporter/SafeERC20TransferFrom.sol"; import {IERC20} from "@openzeppelin/contracts/token/ERC20/IERC20.sol"; @@ -71,8 +75,7 @@ contract ERC20TokenSource is uint256 feeAmount, address[] calldata allowedRelayerAddresses ) external nonReentrant { - ITeleporterMessenger teleporterMessenger = teleporterRegistry - .getLatestTeleporter(); + ITeleporterMessenger teleporterMessenger = teleporterRegistry.getLatestTeleporter(); // The recipient cannot be the zero address. require(recipient != address(0), "ERC20TokenSource: zero recipient address"); @@ -132,22 +135,15 @@ contract ERC20TokenSource is // Only allow the partner contract to send messages. require( - senderAddress == nativeTokenDestinationAddress, - "ERC20TokenSource: unauthorized sender" + senderAddress == nativeTokenDestinationAddress, "ERC20TokenSource: unauthorized sender" ); // Decode the payload to recover the action and corresponding function parameters - (SourceAction action, bytes memory actionData) = abi.decode( - message, - (SourceAction, bytes) - ); + (SourceAction action, bytes memory actionData) = abi.decode(message, (SourceAction, bytes)); // Route to the appropriate function. if (action == SourceAction.Unlock) { - (address recipient, uint256 amount) = abi.decode( - actionData, - (address, uint256) - ); + (address recipient, uint256 amount) = abi.decode(actionData, (address, uint256)); _unlockTokens(recipient, amount); } else if (action == SourceAction.Burn) { uint256 newBurnTotal = abi.decode(actionData, (uint256)); diff --git a/contracts/src/CrossChainApplications/NativeTokenBridge/NativeTokenDestination.sol b/contracts/src/CrossChainApplications/NativeTokenBridge/NativeTokenDestination.sol index f97e26da4..3d584ef6d 100644 --- a/contracts/src/CrossChainApplications/NativeTokenBridge/NativeTokenDestination.sol +++ b/contracts/src/CrossChainApplications/NativeTokenBridge/NativeTokenDestination.sol @@ -11,7 +11,11 @@ import {IWarpMessenger} from "@subnet-evm-contracts/interfaces/IWarpMessenger.so import {INativeMinter} from "@subnet-evm-contracts/interfaces/INativeMinter.sol"; import {INativeTokenDestination} from "./INativeTokenDestination.sol"; import {ITokenSource} from "./ITokenSource.sol"; -import {ITeleporterMessenger, TeleporterFeeInfo, TeleporterMessageInput} from "../../Teleporter/ITeleporterMessenger.sol"; +import { + ITeleporterMessenger, + TeleporterFeeInfo, + TeleporterMessageInput +} from "../../Teleporter/ITeleporterMessenger.sol"; import {TeleporterOwnerUpgradeable} from "../../Teleporter/upgrades/TeleporterOwnerUpgradeable.sol"; import {SafeERC20TransferFrom} from "../../Teleporter/SafeERC20TransferFrom.sol"; import {IERC20} from "@openzeppelin/contracts/token/ERC20/IERC20.sol"; @@ -28,13 +32,11 @@ contract NativeTokenDestination is // The address where the burned transaction fees are credited. // Defined as BLACKHOLE_ADDRESS at // https://github.com/ava-labs/subnet-evm/blob/e23ab058d039ff9c8469c89b139d21d52c4bd283/constants/constants.go - address public constant BURNED_TX_FEES_ADDRESS = - 0x0100000000000000000000000000000000000000; + address public constant BURNED_TX_FEES_ADDRESS = 0x0100000000000000000000000000000000000000; // Designated Blackhole Address for this contract. Tokens are sent here to be "burned" before // sending an unlock message to the source chain. Different from the burned tx fee address so // they can be tracked separately. - address public constant BURN_FOR_TRANSFER_ADDRESS = - 0x0100000000000000000000000000000000000001; + address public constant BURN_FOR_TRANSFER_ADDRESS = 0x0100000000000000000000000000000000000001; INativeMinter private immutable _nativeMinter = INativeMinter(0x0200000000000000000000000000000000000001); @@ -88,8 +90,7 @@ contract NativeTokenDestination is TeleporterFeeInfo calldata feeInfo, address[] calldata allowedRelayerAddresses ) external payable nonReentrant { - ITeleporterMessenger teleporterMessenger = teleporterRegistry - .getLatestTeleporter(); + ITeleporterMessenger teleporterMessenger = teleporterRegistry.getLatestTeleporter(); // The recipient cannot be the zero address. require(recipient != address(0), "NativeTokenDestination: zero recipient address"); @@ -139,8 +140,7 @@ contract NativeTokenDestination is TeleporterFeeInfo calldata feeInfo, address[] calldata allowedRelayerAddresses ) external { - ITeleporterMessenger teleporterMessenger = teleporterRegistry - .getLatestTeleporter(); + ITeleporterMessenger teleporterMessenger = teleporterRegistry.getLatestTeleporter(); uint256 totalBurnedTxFees = address(BURNED_TX_FEES_ADDRESS).balance; uint256 messageID = teleporterMessenger.sendCrossChainMessage( @@ -190,24 +190,16 @@ contract NativeTokenDestination is ) internal override { // Only allow messages from the source chain. require( - senderBlockchainID == sourceBlockchainID, - "NativeTokenDestination: invalid source chain" + senderBlockchainID == sourceBlockchainID, "NativeTokenDestination: invalid source chain" ); // Only allow the partner contract to send messages. require( - senderAddress == nativeTokenSourceAddress, - "NativeTokenDestination: unauthorized sender" + senderAddress == nativeTokenSourceAddress, "NativeTokenDestination: unauthorized sender" ); - (address recipient, uint256 amount) = abi.decode( - message, - (address, uint256) - ); - require( - recipient != address(0), - "NativeTokenDestination: zero recipient address" - ); + (address recipient, uint256 amount) = abi.decode(message, (address, uint256)); + require(recipient != address(0), "NativeTokenDestination: zero recipient address"); require(amount != 0, "NativeTokenDestination: zero transfer value"); // If the contract has not yet been collateralized, we will deduct as many tokens @@ -216,18 +208,12 @@ contract NativeTokenDestination is uint256 adjustedAmount = amount; if (currentReserveImbalance > 0) { if (amount > currentReserveImbalance) { - emit CollateralAdded({ - amount: currentReserveImbalance, - remaining: 0 - }); + emit CollateralAdded({amount: currentReserveImbalance, remaining: 0}); adjustedAmount = amount - currentReserveImbalance; currentReserveImbalance = 0; } else { currentReserveImbalance -= amount; - emit CollateralAdded({ - amount: amount, - remaining: currentReserveImbalance - }); + emit CollateralAdded({amount: amount, remaining: currentReserveImbalance}); return; } } diff --git a/contracts/src/CrossChainApplications/NativeTokenBridge/NativeTokenSource.sol b/contracts/src/CrossChainApplications/NativeTokenBridge/NativeTokenSource.sol index 0b9f2e655..74e3d0ffb 100644 --- a/contracts/src/CrossChainApplications/NativeTokenBridge/NativeTokenSource.sol +++ b/contracts/src/CrossChainApplications/NativeTokenBridge/NativeTokenSource.sol @@ -10,7 +10,11 @@ import {Address} from "@openzeppelin/contracts/utils/Address.sol"; import {IWarpMessenger} from "@subnet-evm-contracts/interfaces/IWarpMessenger.sol"; import {INativeTokenSource} from "./INativeTokenSource.sol"; import {ITokenSource} from "./ITokenSource.sol"; -import {ITeleporterMessenger, TeleporterFeeInfo, TeleporterMessageInput} from "../../Teleporter/ITeleporterMessenger.sol"; +import { + ITeleporterMessenger, + TeleporterFeeInfo, + TeleporterMessageInput +} from "../../Teleporter/ITeleporterMessenger.sol"; import {TeleporterOwnerUpgradeable} from "../../Teleporter/upgrades/TeleporterOwnerUpgradeable.sol"; import {SafeERC20TransferFrom} from "../../Teleporter/SafeERC20TransferFrom.sol"; import {SafeERC20TransferFrom} from "../../Teleporter/SafeERC20TransferFrom.sol"; @@ -65,8 +69,7 @@ contract NativeTokenSource is TeleporterFeeInfo calldata feeInfo, address[] calldata allowedRelayerAddresses ) external payable nonReentrant { - ITeleporterMessenger teleporterMessenger = teleporterRegistry - .getLatestTeleporter(); + ITeleporterMessenger teleporterMessenger = teleporterRegistry.getLatestTeleporter(); // The recipient cannot be the zero address. require(recipient != address(0), "NativeTokenSource: zero recipient address"); @@ -121,22 +124,15 @@ contract NativeTokenSource is // Only allow the partner contract to send messages. require( - senderAddress == nativeTokenDestinationAddress, - "NativeTokenSource: unauthorized sender" + senderAddress == nativeTokenDestinationAddress, "NativeTokenSource: unauthorized sender" ); // Decode the payload to recover the action and corresponding function parameters - (SourceAction action, bytes memory actionData) = abi.decode( - message, - (SourceAction, bytes) - ); + (SourceAction action, bytes memory actionData) = abi.decode(message, (SourceAction, bytes)); // Route to the appropriate function. if (action == SourceAction.Unlock) { - (address recipient, uint256 amount) = abi.decode( - actionData, - (address, uint256) - ); + (address recipient, uint256 amount) = abi.decode(actionData, (address, uint256)); _unlockTokens(recipient, amount); } else if (action == SourceAction.Burn) { uint256 newBurnTotal = abi.decode(actionData, (uint256)); diff --git a/contracts/src/CrossChainApplications/NativeTokenBridge/tests/ERC20TokenSourceTests.t.sol b/contracts/src/CrossChainApplications/NativeTokenBridge/tests/ERC20TokenSourceTests.t.sol index dd4ef6402..39a8592f8 100644 --- a/contracts/src/CrossChainApplications/NativeTokenBridge/tests/ERC20TokenSourceTests.t.sol +++ b/contracts/src/CrossChainApplications/NativeTokenBridge/tests/ERC20TokenSourceTests.t.sol @@ -6,7 +6,15 @@ pragma solidity 0.8.18; import {Test} from "forge-std/Test.sol"; -import {ERC20TokenSource, IERC20, ITokenSource, TeleporterMessageInput, TeleporterFeeInfo, IWarpMessenger, ITeleporterMessenger} from "../ERC20TokenSource.sol"; +import { + ERC20TokenSource, + IERC20, + ITokenSource, + TeleporterMessageInput, + TeleporterFeeInfo, + IWarpMessenger, + ITeleporterMessenger +} from "../ERC20TokenSource.sol"; import {TeleporterRegistry} from "../../../Teleporter/upgrades/TeleporterRegistry.sol"; import {UnitTestMockERC20} from "../../../Mocks/UnitTestMockERC20.sol"; @@ -82,22 +90,17 @@ contract ERC20TokenSourceTest is Test { teleporterMessageID: 1 }); - TeleporterMessageInput - memory expectedMessageInput = TeleporterMessageInput({ - destinationBlockchainID: _DEFAULT_OTHER_CHAIN_ID, - destinationAddress: _DEFAULT_OTHER_BRIDGE_ADDRESS, - feeInfo: TeleporterFeeInfo({ - feeTokenAddress: address(mockERC20), - amount: _DEFAULT_FEE_AMOUNT - }), - requiredGasLimit: erc20TokenSource - .MINT_NATIVE_TOKENS_REQUIRED_GAS(), - allowedRelayerAddresses: new address[](0), - message: abi.encode( - _DEFAULT_RECIPIENT, - _DEFAULT_TRANSFER_AMOUNT - ) - }); + TeleporterMessageInput memory expectedMessageInput = TeleporterMessageInput({ + destinationBlockchainID: _DEFAULT_OTHER_CHAIN_ID, + destinationAddress: _DEFAULT_OTHER_BRIDGE_ADDRESS, + feeInfo: TeleporterFeeInfo({ + feeTokenAddress: address(mockERC20), + amount: _DEFAULT_FEE_AMOUNT + }), + requiredGasLimit: erc20TokenSource.MINT_NATIVE_TOKENS_REQUIRED_GAS(), + allowedRelayerAddresses: new address[](0), + message: abi.encode(_DEFAULT_RECIPIENT, _DEFAULT_TRANSFER_AMOUNT) + }); vm.expectCall( MOCK_TELEPORTER_MESSENGER_ADDRESS, @@ -134,10 +137,7 @@ contract ERC20TokenSourceTest is Test { ) ); - assertEq( - _DEFAULT_TRANSFER_AMOUNT, - mockERC20.balanceOf(_DEFAULT_RECIPIENT) - ); + assertEq(_DEFAULT_TRANSFER_AMOUNT, mockERC20.balanceOf(_DEFAULT_RECIPIENT)); } function testBurnedTxFees() public { @@ -164,10 +164,7 @@ contract ERC20TokenSourceTest is Test { ); assertEq(burnedTxFees, erc20TokenSource.destinationBurnedTotal()); - assertEq( - burnedTxFees, - mockERC20.balanceOf(erc20TokenSource.BURNED_TX_FEES_ADDRESS()) - ); + assertEq(burnedTxFees, mockERC20.balanceOf(erc20TokenSource.BURNED_TX_FEES_ADDRESS())); vm.prank(MOCK_TELEPORTER_MESSENGER_ADDRESS); erc20TokenSource.receiveTeleporterMessage( @@ -177,10 +174,7 @@ contract ERC20TokenSourceTest is Test { ); assertEq(burnedTxFees, erc20TokenSource.destinationBurnedTotal()); - assertEq( - burnedTxFees, - mockERC20.balanceOf(erc20TokenSource.BURNED_TX_FEES_ADDRESS()) - ); + assertEq(burnedTxFees, mockERC20.balanceOf(erc20TokenSource.BURNED_TX_FEES_ADDRESS())); emit BurnTokens(additionalTxFees); @@ -191,10 +185,7 @@ contract ERC20TokenSourceTest is Test { abi.encode(ITokenSource.SourceAction.Burn, abi.encode(burnedTxFees + additionalTxFees)) ); - assertEq( - burnedTxFees + additionalTxFees, - erc20TokenSource.destinationBurnedTotal() - ); + assertEq(burnedTxFees + additionalTxFees, erc20TokenSource.destinationBurnedTotal()); assertEq( burnedTxFees + additionalTxFees, mockERC20.balanceOf(erc20TokenSource.BURNED_TX_FEES_ADDRESS()) @@ -202,9 +193,7 @@ contract ERC20TokenSourceTest is Test { } function testZeroTeleporterAddress() public { - vm.expectRevert( - "TeleporterUpgradeable: zero teleporter registry address" - ); + vm.expectRevert("TeleporterUpgradeable: zero teleporter registry address"); new ERC20TokenSource( address(0x0), @@ -248,9 +237,7 @@ contract ERC20TokenSourceTest is Test { } function testZeroERC20ContractAddress() public { - vm.expectRevert( - _formatERC20TokenSourceErrorMessage("zero ERC20 contract address") - ); + vm.expectRevert(_formatERC20TokenSourceErrorMessage("zero ERC20 contract address")); new ERC20TokenSource( MOCK_TELEPORTER_REGISTRY_ADDRESS, @@ -316,9 +303,7 @@ contract ERC20TokenSourceTest is Test { vm.mockCall( MOCK_TELEPORTER_REGISTRY_ADDRESS, abi.encodeWithSelector( - TeleporterRegistry(MOCK_TELEPORTER_REGISTRY_ADDRESS) - .latestVersion - .selector + TeleporterRegistry(MOCK_TELEPORTER_REGISTRY_ADDRESS).latestVersion.selector ), abi.encode(1) ); @@ -334,25 +319,22 @@ contract ERC20TokenSourceTest is Test { vm.mockCall( MOCK_TELEPORTER_REGISTRY_ADDRESS, - abi.encodeWithSelector( - TeleporterRegistry.getAddressFromVersion.selector, - (1) - ), + abi.encodeWithSelector(TeleporterRegistry.getAddressFromVersion.selector, (1)), abi.encode(MOCK_TELEPORTER_MESSENGER_ADDRESS) ); vm.mockCall( MOCK_TELEPORTER_REGISTRY_ADDRESS, - abi.encodeWithSelector( - TeleporterRegistry.getLatestTeleporter.selector - ), + abi.encodeWithSelector(TeleporterRegistry.getLatestTeleporter.selector), abi.encode(ITeleporterMessenger(MOCK_TELEPORTER_MESSENGER_ADDRESS)) ); } - function _formatERC20TokenSourceErrorMessage( - string memory errorMessage - ) private pure returns (bytes memory) { + function _formatERC20TokenSourceErrorMessage(string memory errorMessage) + private + pure + returns (bytes memory) + { return bytes(string.concat("ERC20TokenSource: ", errorMessage)); } } diff --git a/contracts/src/CrossChainApplications/NativeTokenBridge/tests/NativeTokenDestinationTests.t.sol b/contracts/src/CrossChainApplications/NativeTokenBridge/tests/NativeTokenDestinationTests.t.sol index a3b559d96..d4756a386 100644 --- a/contracts/src/CrossChainApplications/NativeTokenBridge/tests/NativeTokenDestinationTests.t.sol +++ b/contracts/src/CrossChainApplications/NativeTokenBridge/tests/NativeTokenDestinationTests.t.sol @@ -6,7 +6,15 @@ pragma solidity 0.8.18; import {Test} from "forge-std/Test.sol"; -import {NativeTokenDestination, IERC20, ITokenSource, TeleporterMessageInput, TeleporterFeeInfo, IWarpMessenger, ITeleporterMessenger} from "../NativeTokenDestination.sol"; +import { + NativeTokenDestination, + IERC20, + ITokenSource, + TeleporterMessageInput, + TeleporterFeeInfo, + IWarpMessenger, + ITeleporterMessenger +} from "../NativeTokenDestination.sol"; import {TeleporterRegistry} from "../../../Teleporter/upgrades/TeleporterRegistry.sol"; import {UnitTestMockERC20} from "../../../Mocks/UnitTestMockERC20.sol"; import {INativeMinter} from "@subnet-evm-contracts/interfaces/INativeMinter.sol"; @@ -142,10 +150,7 @@ contract NativeTokenDestinationTest is Test { function testCollateralizeBridge() public { uint256 firstTransfer = _DEFAULT_INITIAL_RESERVE_IMBALANCE / 4; - assertEq( - _DEFAULT_INITIAL_RESERVE_IMBALANCE, - nativeTokenDestination.totalSupply() - ); + assertEq(_DEFAULT_INITIAL_RESERVE_IMBALANCE, nativeTokenDestination.totalSupply()); vm.expectEmit(true, true, true, true, address(nativeTokenDestination)); emit CollateralAdded({ @@ -164,10 +169,7 @@ contract NativeTokenDestinationTest is Test { _DEFAULT_INITIAL_RESERVE_IMBALANCE - firstTransfer, nativeTokenDestination.currentReserveImbalance() ); - assertEq( - _DEFAULT_INITIAL_RESERVE_IMBALANCE, - nativeTokenDestination.totalSupply() - ); + assertEq(_DEFAULT_INITIAL_RESERVE_IMBALANCE, nativeTokenDestination.totalSupply()); vm.expectEmit(true, true, true, true, address(nativeTokenDestination)); emit CollateralAdded({ @@ -191,8 +193,7 @@ contract NativeTokenDestinationTest is Test { assertEq(0, nativeTokenDestination.currentReserveImbalance()); assertEq( - _DEFAULT_INITIAL_RESERVE_IMBALANCE + firstTransfer, - nativeTokenDestination.totalSupply() + _DEFAULT_INITIAL_RESERVE_IMBALANCE + firstTransfer, nativeTokenDestination.totalSupply() ); } @@ -226,9 +227,7 @@ contract NativeTokenDestinationTest is Test { } function testZeroTeleporterAddress() public { - vm.expectRevert( - "TeleporterUpgradeable: zero teleporter registry address" - ); + vm.expectRevert("TeleporterUpgradeable: zero teleporter registry address"); new NativeTokenDestination( address(0x0), @@ -364,9 +363,7 @@ contract NativeTokenDestinationTest is Test { vm.mockCall( MOCK_TELEPORTER_REGISTRY_ADDRESS, abi.encodeWithSelector( - TeleporterRegistry(MOCK_TELEPORTER_REGISTRY_ADDRESS) - .latestVersion - .selector + TeleporterRegistry(MOCK_TELEPORTER_REGISTRY_ADDRESS).latestVersion.selector ), abi.encode(1) ); @@ -382,25 +379,22 @@ contract NativeTokenDestinationTest is Test { vm.mockCall( MOCK_TELEPORTER_REGISTRY_ADDRESS, - abi.encodeWithSelector( - TeleporterRegistry.getAddressFromVersion.selector, - (1) - ), + abi.encodeWithSelector(TeleporterRegistry.getAddressFromVersion.selector, (1)), abi.encode(MOCK_TELEPORTER_MESSENGER_ADDRESS) ); vm.mockCall( MOCK_TELEPORTER_REGISTRY_ADDRESS, - abi.encodeWithSelector( - TeleporterRegistry.getLatestTeleporter.selector - ), + abi.encodeWithSelector(TeleporterRegistry.getLatestTeleporter.selector), abi.encode(ITeleporterMessenger(MOCK_TELEPORTER_MESSENGER_ADDRESS)) ); } - function _formatNativeTokenDestinationErrorMessage( - string memory errorMessage - ) private pure returns (bytes memory) { + function _formatNativeTokenDestinationErrorMessage(string memory errorMessage) + private + pure + returns (bytes memory) + { return bytes(string.concat("NativeTokenDestination: ", errorMessage)); } } diff --git a/contracts/src/CrossChainApplications/NativeTokenBridge/tests/NativeTokenSourceTests.t.sol b/contracts/src/CrossChainApplications/NativeTokenBridge/tests/NativeTokenSourceTests.t.sol index 9b403cb62..2d2c651a8 100644 --- a/contracts/src/CrossChainApplications/NativeTokenBridge/tests/NativeTokenSourceTests.t.sol +++ b/contracts/src/CrossChainApplications/NativeTokenBridge/tests/NativeTokenSourceTests.t.sol @@ -6,7 +6,15 @@ pragma solidity 0.8.18; import {Test} from "forge-std/Test.sol"; -import {NativeTokenSource, IERC20, ITokenSource, TeleporterMessageInput, TeleporterFeeInfo, IWarpMessenger, ITeleporterMessenger} from "../NativeTokenSource.sol"; +import { + NativeTokenSource, + IERC20, + ITokenSource, + TeleporterMessageInput, + TeleporterFeeInfo, + IWarpMessenger, + ITeleporterMessenger +} from "../NativeTokenSource.sol"; import {TeleporterRegistry} from "../../../Teleporter/upgrades/TeleporterRegistry.sol"; import {UnitTestMockERC20} from "../../../Mocks/UnitTestMockERC20.sol"; @@ -81,22 +89,17 @@ contract NativeTokenSourceTest is Test { teleporterMessageID: 1 }); - TeleporterMessageInput - memory expectedMessageInput = TeleporterMessageInput({ - destinationBlockchainID: _DEFAULT_OTHER_CHAIN_ID, - destinationAddress: _DEFAULT_OTHER_BRIDGE_ADDRESS, - feeInfo: TeleporterFeeInfo({ - feeTokenAddress: address(mockERC20), - amount: _DEFAULT_FEE_AMOUNT - }), - requiredGasLimit: nativeTokenSource - .MINT_NATIVE_TOKENS_REQUIRED_GAS(), - allowedRelayerAddresses: new address[](0), - message: abi.encode( - _DEFAULT_RECIPIENT, - _DEFAULT_TRANSFER_AMOUNT - ) - }); + TeleporterMessageInput memory expectedMessageInput = TeleporterMessageInput({ + destinationBlockchainID: _DEFAULT_OTHER_CHAIN_ID, + destinationAddress: _DEFAULT_OTHER_BRIDGE_ADDRESS, + feeInfo: TeleporterFeeInfo({ + feeTokenAddress: address(mockERC20), + amount: _DEFAULT_FEE_AMOUNT + }), + requiredGasLimit: nativeTokenSource.MINT_NATIVE_TOKENS_REQUIRED_GAS(), + allowedRelayerAddresses: new address[](0), + message: abi.encode(_DEFAULT_RECIPIENT, _DEFAULT_TRANSFER_AMOUNT) + }); vm.expectCall( MOCK_TELEPORTER_MESSENGER_ADDRESS, @@ -157,10 +160,7 @@ contract NativeTokenSourceTest is Test { ); assertEq(burnedTxFees, nativeTokenSource.destinationBurnedTotal()); - assertEq( - burnedTxFees, - nativeTokenSource.BURNED_TX_FEES_ADDRESS().balance - ); + assertEq(burnedTxFees, nativeTokenSource.BURNED_TX_FEES_ADDRESS().balance); vm.prank(MOCK_TELEPORTER_MESSENGER_ADDRESS); nativeTokenSource.receiveTeleporterMessage( @@ -170,10 +170,7 @@ contract NativeTokenSourceTest is Test { ); assertEq(burnedTxFees, nativeTokenSource.destinationBurnedTotal()); - assertEq( - burnedTxFees, - nativeTokenSource.BURNED_TX_FEES_ADDRESS().balance - ); + assertEq(burnedTxFees, nativeTokenSource.BURNED_TX_FEES_ADDRESS().balance); emit BurnTokens(additionalTxFees); @@ -184,20 +181,14 @@ contract NativeTokenSourceTest is Test { abi.encode(ITokenSource.SourceAction.Burn, abi.encode(burnedTxFees + additionalTxFees)) ); + assertEq(burnedTxFees + additionalTxFees, nativeTokenSource.destinationBurnedTotal()); assertEq( - burnedTxFees + additionalTxFees, - nativeTokenSource.destinationBurnedTotal() - ); - assertEq( - burnedTxFees + additionalTxFees, - nativeTokenSource.BURNED_TX_FEES_ADDRESS().balance + burnedTxFees + additionalTxFees, nativeTokenSource.BURNED_TX_FEES_ADDRESS().balance ); } function testZeroTeleporterAddress() public { - vm.expectRevert( - "TeleporterUpgradeable: zero teleporter registry address" - ); + vm.expectRevert("TeleporterUpgradeable: zero teleporter registry address"); new NativeTokenSource( address(0x0), @@ -302,9 +293,7 @@ contract NativeTokenSourceTest is Test { } function testInsufficientCollateral() public { - vm.expectRevert( - _formatNativeTokenSourceErrorMessage("insufficient collateral") - ); + vm.expectRevert(_formatNativeTokenSourceErrorMessage("insufficient collateral")); vm.prank(MOCK_TELEPORTER_MESSENGER_ADDRESS); nativeTokenSource.receiveTeleporterMessage( @@ -321,9 +310,7 @@ contract NativeTokenSourceTest is Test { vm.mockCall( MOCK_TELEPORTER_REGISTRY_ADDRESS, abi.encodeWithSelector( - TeleporterRegistry(MOCK_TELEPORTER_REGISTRY_ADDRESS) - .latestVersion - .selector + TeleporterRegistry(MOCK_TELEPORTER_REGISTRY_ADDRESS).latestVersion.selector ), abi.encode(1) ); @@ -339,25 +326,22 @@ contract NativeTokenSourceTest is Test { vm.mockCall( MOCK_TELEPORTER_REGISTRY_ADDRESS, - abi.encodeWithSelector( - TeleporterRegistry.getAddressFromVersion.selector, - (1) - ), + abi.encodeWithSelector(TeleporterRegistry.getAddressFromVersion.selector, (1)), abi.encode(MOCK_TELEPORTER_MESSENGER_ADDRESS) ); vm.mockCall( MOCK_TELEPORTER_REGISTRY_ADDRESS, - abi.encodeWithSelector( - TeleporterRegistry.getLatestTeleporter.selector - ), + abi.encodeWithSelector(TeleporterRegistry.getLatestTeleporter.selector), abi.encode(ITeleporterMessenger(MOCK_TELEPORTER_MESSENGER_ADDRESS)) ); } - function _formatNativeTokenSourceErrorMessage( - string memory errorMessage - ) private pure returns (bytes memory) { + function _formatNativeTokenSourceErrorMessage(string memory errorMessage) + private + pure + returns (bytes memory) + { return bytes(string.concat("NativeTokenSource: ", errorMessage)); } } From c8754d2e5032fc59bf8f2ea00da5835f8a374815 Mon Sep 17 00:00:00 2001 From: Geoff Stuart Date: Fri, 15 Dec 2023 13:42:07 -0500 Subject: [PATCH 08/12] Bindings --- .../NativeTokenBridge/ERC20TokenSource/ERC20TokenSource.go | 2 +- .../NativeTokenDestination/NativeTokenDestination.go | 2 +- .../NativeTokenBridge/NativeTokenSource/NativeTokenSource.go | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/abi-bindings/go/CrossChainApplications/NativeTokenBridge/ERC20TokenSource/ERC20TokenSource.go b/abi-bindings/go/CrossChainApplications/NativeTokenBridge/ERC20TokenSource/ERC20TokenSource.go index d8a8909f8..087415768 100644 --- a/abi-bindings/go/CrossChainApplications/NativeTokenBridge/ERC20TokenSource/ERC20TokenSource.go +++ b/abi-bindings/go/CrossChainApplications/NativeTokenBridge/ERC20TokenSource/ERC20TokenSource.go @@ -32,7 +32,7 @@ var ( // ERC20TokenSourceMetaData contains all meta data concerning the ERC20TokenSource contract. var ERC20TokenSourceMetaData = &bind.MetaData{ ABI: "[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"teleporterRegistryAddress\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"destinationBlockchainID_\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"nativeTokenDestinationAddress_\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"erc20ContractAddress_\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"BurnTokens\",\"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\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"teleporterMessageID\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"TransferToDestination\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"UnlockTokens\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"BURNED_TX_FEES_ADDRESS\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"MINT_NATIVE_TOKENS_REQUIRED_GAS\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"destinationBlockchainID\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"destinationBurnedTotal\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"erc20ContractAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"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\":\"nativeTokenDestinationAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"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\":\"originBlockchainID\",\"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\":[],\"name\":\"teleporterRegistry\",\"outputs\":[{\"internalType\":\"contractTeleporterRegistry\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"totalAmount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"feeAmount\",\"type\":\"uint256\"},{\"internalType\":\"address[]\",\"name\":\"allowedRelayerAddresses\",\"type\":\"address[]\"}],\"name\":\"transferToDestination\",\"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: "0x6101006040523480156200001257600080fd5b5060405162001fb438038062001fb48339810160408190526200003591620003f0565b83806001600160a01b038116620000b95760405162461bcd60e51b815260206004820152603760248201527f54656c65706f727465725570677261646561626c653a207a65726f2074656c6560448201527f706f72746572207265676973747279206164647265737300000000000000000060648201526084015b60405180910390fd5b6001600160a01b03811660808190526040805163301fd1f560e21b8152905163c07f47d4916004808201926020929091908290030181865afa15801562000104573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200012a919062000444565b60015550620001393362000381565b50600160035582620001965760405162461bcd60e51b8152602060048201526030602482015260008051602062001f9483398151915260448201526f1bdb88189b1bd8dad8da185a5b88125160821b6064820152608401620000b0565b7302000000000000000000000000000000000000056001600160a01b0316634213cf786040518163ffffffff1660e01b8152600401602060405180830381865afa158015620001e9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200020f919062000444565b8303620002855760405162461bcd60e51b815260206004820152603460248201527f4552433230546f6b656e536f757263653a2063616e6e6f74206272696467652060448201527f776974682073616d6520626c6f636b636861696e0000000000000000000000006064820152608401620000b0565b60a08390526001600160a01b038216620002f75760405162461bcd60e51b8152602060048201526033602482015260008051602062001f9483398151915260448201527f6f6e20636f6e74726163742061646472657373000000000000000000000000006064820152608401620000b0565b6001600160a01b0380831660c05281166200036b5760405162461bcd60e51b815260206004820152602d60248201527f4552433230546f6b656e536f757263653a207a65726f20455243323020636f6e60448201526c7472616374206164647265737360981b6064820152608401620000b0565b6001600160a01b031660e052506200045e915050565b600280546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b80516001600160a01b0381168114620003eb57600080fd5b919050565b600080600080608085870312156200040757600080fd5b6200041285620003d3565b9350602085015192506200042960408601620003d3565b91506200043960608601620003d3565b905092959194509250565b6000602082840312156200045757600080fd5b5051919050565b60805160a05160c05160e051611aa8620004ec60003960008181610291015281816105a801528181610640015281816106f2015281816112fb01526113cf015260008181610244015281816106b8015261100901526000818161016e015281816106920152610f86015260008181610115015281816104f9015281816108780152610a940152611aa86000f3fe608060405234801561001057600080fd5b506004361061010b5760003560e01c80638da5cb5b116100a2578063c452165e11610071578063c452165e14610266578063c868efaa14610271578063d2cc7a7014610284578063e486df151461028c578063f2fde38b146102b357600080fd5b80638da5cb5b146101e857806397314297146101f9578063b6171f7314610235578063b8c9091a1461023f57600080fd5b806355db3e9e116100de57806355db3e9e146101b15780635eb99514146101ba578063715018a6146101cd57806387a2edba146101d557600080fd5b80631a7f5bec146101105780632b0d8f181461015457806341d3014d146101695780634511243e1461019e575b600080fd5b6101377f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020015b60405180910390f35b610167610162366004611587565b6102c6565b005b6101907f000000000000000000000000000000000000000000000000000000000000000081565b60405190815260200161014b565b6101676101ac366004611587565b6103c8565b61019060045481565b6101676101c83660046115ab565b6104c5565b6101676104d9565b6101676101e33660046115c4565b6104ed565b6002546001600160a01b0316610137565b610225610207366004611587565b6001600160a01b031660009081526020819052604090205460ff1690565b604051901515815260200161014b565b610190620186a081565b6101377f000000000000000000000000000000000000000000000000000000000000000081565b610137600160981b81565b61016761027f36600461165d565b610860565b600154610190565b6101377f000000000000000000000000000000000000000000000000000000000000000081565b6101676102c1366004611587565b610a12565b6102ce610a88565b6001600160a01b0381166102fd5760405162461bcd60e51b81526004016102f4906116e6565b60405180910390fd5b6001600160a01b03811660009081526020819052604090205460ff161561037c5760405162461bcd60e51b815260206004820152602d60248201527f54656c65706f727465725570677261646561626c653a2061646472657373206160448201526c1b1c9958591e481c185d5cd959609a1b60648201526084016102f4565b6001600160a01b038116600081815260208190526040808220805460ff19166001179055517f933f93e57a222e6330362af8b376d0a8725b6901e9a2fb86d00f169702b28a4c9190a250565b6103d0610a88565b6001600160a01b0381166103f65760405162461bcd60e51b81526004016102f4906116e6565b6001600160a01b03811660009081526020819052604090205460ff166104705760405162461bcd60e51b815260206004820152602960248201527f54656c65706f727465725570677261646561626c653a2061646472657373206e6044820152681bdd081c185d5cd95960ba1b60648201526084016102f4565b6040516001600160a01b038216907f844e2f3154214672229235858fd029d1dfd543901c6d05931f0bc2480a2d72c390600090a26001600160a01b03166000908152602081905260409020805460ff19169055565b6104cd610a88565b6104d681610a90565b50565b6104e1610c30565b6104eb6000610c8a565b565b6104f5610cdc565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d820e64f6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610555573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105799190611734565b90506001600160a01b0386166105a15760405162461bcd60e51b81526004016102f490611751565b60006105cd7f000000000000000000000000000000000000000000000000000000000000000087610d35565b90508481116106355760405162461bcd60e51b815260206004820152602e60248201527f4552433230546f6b656e536f757263653a20696e73756666696369656e74206160448201526d191a9d5cdd195908185b5bdd5b9d60921b60648201526084016102f4565b8415610666576106667f00000000000000000000000000000000000000000000000000000000000000008387610e9f565b600061067286836117af565b90506000836001600160a01b031663624488506040518060c001604052807f000000000000000000000000000000000000000000000000000000000000000081526020017f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316815260200160405180604001604052807f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031681526020018c8152508152602001620186a08152602001898980806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250505090825250604080516001600160a01b038f166020808301919091529181018890529101906060016040516020818303038152906040528152506040518263ffffffff1660e01b81526004016107b89190611856565b6020604051808303816000875af11580156107d7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107fb91906118d4565b905080896001600160a01b0316336001600160a01b03167f2b4e8f08417773e367064a6aea9ca2df303a60876676f70b6c3c5e66b314ca5a8560405161084391815260200190565b60405180910390a4505050506108596001600355565b5050505050565b60015460405163260f846760e11b81523360048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690634c1f08ce90602401602060405180830381865afa1580156108c7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108eb91906118d4565b10156109525760405162461bcd60e51b815260206004820152603060248201527f54656c65706f727465725570677261646561626c653a20696e76616c6964205460448201526f32b632b837b93a32b91039b2b73232b960811b60648201526084016102f4565b3360009081526020819052604090205460ff16156109cb5760405162461bcd60e51b815260206004820152603060248201527f54656c65706f727465725570677261646561626c653a2054656c65706f72746560448201526f1c881859191c995cdcc81c185d5cd95960821b60648201526084016102f4565b610a0c848484848080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250610f8492505050565b50505050565b610a1a610c30565b6001600160a01b038116610a7f5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016102f4565b6104d681610c8a565b6104eb610c30565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663c07f47d46040518163ffffffff1660e01b8152600401602060405180830381865afa158015610af0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b1491906118d4565b60015490915081831115610b845760405162461bcd60e51b815260206004820152603160248201527f54656c65706f727465725570677261646561626c653a20696e76616c6964205460448201527032b632b837b93a32b9103b32b939b4b7b760791b60648201526084016102f4565b808311610bf95760405162461bcd60e51b815260206004820152603f60248201527f54656c65706f727465725570677261646561626c653a206e6f7420677265617460448201527f6572207468616e2063757272656e74206d696e696d756d2076657273696f6e0060648201526084016102f4565b6001839055604051839082907fa9a7ef57e41f05b4c15480842f5f0c27edfcbb553fed281f7c4068452cc1c02d90600090a3505050565b6002546001600160a01b031633146104eb5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016102f4565b600280546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600260035403610d2e5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016102f4565b6002600355565b6040516370a0823160e01b815230600482015260009081906001600160a01b038516906370a0823190602401602060405180830381865afa158015610d7e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610da291906118d4565b9050610db96001600160a01b03851633308661117f565b6040516370a0823160e01b81523060048201526000906001600160a01b038616906370a0823190602401602060405180830381865afa158015610e00573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e2491906118d4565b9050818111610e8a5760405162461bcd60e51b815260206004820152602c60248201527f5361666545524332305472616e7366657246726f6d3a2062616c616e6365206e60448201526b1bdd081a5b98dc99585cd95960a21b60648201526084016102f4565b610e9482826117af565b925050505b92915050565b604051636eb1769f60e11b81523060048201526001600160a01b038381166024830152600091839186169063dd62ed3e90604401602060405180830381865afa158015610ef0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f1491906118d4565b610f1e91906118ed565b6040516001600160a01b038516602482015260448101829052909150610a0c90859063095ea7b360e01b906064015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b0319909316929092179091526111b7565b7f000000000000000000000000000000000000000000000000000000000000000083146110075760405162461bcd60e51b815260206004820152602b60248201527f4552433230546f6b656e536f757263653a20696e76616c69642064657374696e60448201526a30ba34b7b71031b430b4b760a91b60648201526084016102f4565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316826001600160a01b0316146110965760405162461bcd60e51b815260206004820152602560248201527f4552433230546f6b656e536f757263653a20756e617574686f72697a6564207360448201526432b73232b960d91b60648201526084016102f4565b600080828060200190518101906110ad9190611916565b909250905060008260018111156110c6576110c66119dd565b036110f757600080828060200190518101906110e291906119f3565b915091506110f0828261128e565b5050610859565b600182600181111561110b5761110b6119dd565b036111375760008180602001905181019061112691906118d4565b905061113181611325565b50610859565b60405162461bcd60e51b815260206004820181905260248201527f4552433230546f6b656e536f757263653a20696e76616c696420616374696f6e60448201526064016102f4565b6040516001600160a01b0380851660248301528316604482015260648101829052610a0c9085906323b872dd60e01b90608401610f4d565b600061120c826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166113509092919063ffffffff16565b805190915015611289578080602001905181019061122a9190611a21565b6112895760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b60648201526084016102f4565b505050565b6001600160a01b0382166112b45760405162461bcd60e51b81526004016102f490611751565b604080516001600160a01b0384168152602081018390527f55aaef8fd8c07238c3618a93c8a1627194187d3b0952908e58f2ab0f944fb407910160405180910390a16113217f00000000000000000000000000000000000000000000000000000000000000008383611367565b5050565b6004548111156104d65760006004548261133f91906117af565b905061134a81611397565b50600455565b606061135f84846000856113f9565b949350505050565b6040516001600160a01b03831660248201526044810182905261128990849063a9059cbb60e01b90606401610f4d565b6040518181527f2cd3fd70cd5a5d6d805e90d22741aa1a84590ace7cf01b244719558d266143829060200160405180910390a16104d67f0000000000000000000000000000000000000000000000000000000000000000600160981b83611367565b60608247101561145a5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b60648201526084016102f4565b600080866001600160a01b031685876040516114769190611a43565b60006040518083038185875af1925050503d80600081146114b3576040519150601f19603f3d011682016040523d82523d6000602084013e6114b8565b606091505b50915091506114c9878383876114d4565b979650505050505050565b6060831561154357825160000361153c576001600160a01b0385163b61153c5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016102f4565b508161135f565b61135f83838151156115585781518083602001fd5b8060405162461bcd60e51b81526004016102f49190611a5f565b6001600160a01b03811681146104d657600080fd5b60006020828403121561159957600080fd5b81356115a481611572565b9392505050565b6000602082840312156115bd57600080fd5b5035919050565b6000806000806000608086880312156115dc57600080fd5b85356115e781611572565b94506020860135935060408601359250606086013567ffffffffffffffff8082111561161257600080fd5b818801915088601f83011261162657600080fd5b81358181111561163557600080fd5b8960208260051b850101111561164a57600080fd5b9699959850939650602001949392505050565b6000806000806060858703121561167357600080fd5b84359350602085013561168581611572565b9250604085013567ffffffffffffffff808211156116a257600080fd5b818701915087601f8301126116b657600080fd5b8135818111156116c557600080fd5b8860208285010111156116d757600080fd5b95989497505060200194505050565b6020808252602e908201527f54656c65706f727465725570677261646561626c653a207a65726f2054656c6560408201526d706f72746572206164647265737360901b606082015260800190565b60006020828403121561174657600080fd5b81516115a481611572565b60208082526028908201527f4552433230546f6b656e536f757263653a207a65726f20726563697069656e74604082015267206164647265737360c01b606082015260800190565b634e487b7160e01b600052601160045260246000fd5b81810381811115610e9957610e99611799565b600081518084526020808501945080840160005b838110156117fb5781516001600160a01b0316875295820195908201906001016117d6565b509495945050505050565b60005b83811015611821578181015183820152602001611809565b50506000910152565b60008151808452611842816020860160208601611806565b601f01601f19169290920160200192915050565b60208152815160208201526000602083015160018060a01b03808216604085015260408501519150808251166060850152506020810151608084015250606083015160a0830152608083015160e060c08401526118b76101008401826117c2565b905060a0840151601f198483030160e0850152610e94828261182a565b6000602082840312156118e657600080fd5b5051919050565b80820180821115610e9957610e99611799565b634e487b7160e01b600052604160045260246000fd5b6000806040838503121561192957600080fd5b82516002811061193857600080fd5b602084015190925067ffffffffffffffff8082111561195657600080fd5b818501915085601f83011261196a57600080fd5b81518181111561197c5761197c611900565b604051601f8201601f19908116603f011681019083821181831017156119a4576119a4611900565b816040528281528860208487010111156119bd57600080fd5b6119ce836020830160208801611806565b80955050505050509250929050565b634e487b7160e01b600052602160045260246000fd5b60008060408385031215611a0657600080fd5b8251611a1181611572565b6020939093015192949293505050565b600060208284031215611a3357600080fd5b815180151581146115a457600080fd5b60008251611a55818460208701611806565b9190910192915050565b6020815260006115a4602083018461182a56fea26469706673582212208eecb6fb91c7ca138f143292f60a67eff025a96a41c98e5928bc7750f9f5474364736f6c634300081200334552433230546f6b656e536f757263653a207a65726f2064657374696e617469", + Bin: "0x6101006040523480156200001257600080fd5b5060405162001fb438038062001fb48339810160408190526200003591620003f0565b83806001600160a01b038116620000b95760405162461bcd60e51b815260206004820152603760248201527f54656c65706f727465725570677261646561626c653a207a65726f2074656c6560448201527f706f72746572207265676973747279206164647265737300000000000000000060648201526084015b60405180910390fd5b6001600160a01b03811660808190526040805163301fd1f560e21b8152905163c07f47d4916004808201926020929091908290030181865afa15801562000104573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200012a919062000444565b60015550620001393362000381565b50600160035582620001965760405162461bcd60e51b8152602060048201526030602482015260008051602062001f9483398151915260448201526f1bdb88189b1bd8dad8da185a5b88125160821b6064820152608401620000b0565b7302000000000000000000000000000000000000056001600160a01b0316634213cf786040518163ffffffff1660e01b8152600401602060405180830381865afa158015620001e9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200020f919062000444565b8303620002855760405162461bcd60e51b815260206004820152603460248201527f4552433230546f6b656e536f757263653a2063616e6e6f74206272696467652060448201527f776974682073616d6520626c6f636b636861696e0000000000000000000000006064820152608401620000b0565b60a08390526001600160a01b038216620002f75760405162461bcd60e51b8152602060048201526033602482015260008051602062001f9483398151915260448201527f6f6e20636f6e74726163742061646472657373000000000000000000000000006064820152608401620000b0565b6001600160a01b0380831660c05281166200036b5760405162461bcd60e51b815260206004820152602d60248201527f4552433230546f6b656e536f757263653a207a65726f20455243323020636f6e60448201526c7472616374206164647265737360981b6064820152608401620000b0565b6001600160a01b031660e052506200045e915050565b600280546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b80516001600160a01b0381168114620003eb57600080fd5b919050565b600080600080608085870312156200040757600080fd5b6200041285620003d3565b9350602085015192506200042960408601620003d3565b91506200043960608601620003d3565b905092959194509250565b6000602082840312156200045757600080fd5b5051919050565b60805160a05160c05160e051611aa8620004ec60003960008181610291015281816105a801528181610640015281816106f2015281816112fb01526113cf015260008181610244015281816106b8015261100901526000818161016e015281816106920152610f86015260008181610115015281816104f9015281816108780152610a940152611aa86000f3fe608060405234801561001057600080fd5b506004361061010b5760003560e01c80638da5cb5b116100a2578063c452165e11610071578063c452165e14610266578063c868efaa14610271578063d2cc7a7014610284578063e486df151461028c578063f2fde38b146102b357600080fd5b80638da5cb5b146101e857806397314297146101f9578063b6171f7314610235578063b8c9091a1461023f57600080fd5b806355db3e9e116100de57806355db3e9e146101b15780635eb99514146101ba578063715018a6146101cd57806387a2edba146101d557600080fd5b80631a7f5bec146101105780632b0d8f181461015457806341d3014d146101695780634511243e1461019e575b600080fd5b6101377f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020015b60405180910390f35b610167610162366004611587565b6102c6565b005b6101907f000000000000000000000000000000000000000000000000000000000000000081565b60405190815260200161014b565b6101676101ac366004611587565b6103c8565b61019060045481565b6101676101c83660046115ab565b6104c5565b6101676104d9565b6101676101e33660046115c4565b6104ed565b6002546001600160a01b0316610137565b610225610207366004611587565b6001600160a01b031660009081526020819052604090205460ff1690565b604051901515815260200161014b565b610190620186a081565b6101377f000000000000000000000000000000000000000000000000000000000000000081565b610137600160981b81565b61016761027f36600461165d565b610860565b600154610190565b6101377f000000000000000000000000000000000000000000000000000000000000000081565b6101676102c1366004611587565b610a12565b6102ce610a88565b6001600160a01b0381166102fd5760405162461bcd60e51b81526004016102f4906116e6565b60405180910390fd5b6001600160a01b03811660009081526020819052604090205460ff161561037c5760405162461bcd60e51b815260206004820152602d60248201527f54656c65706f727465725570677261646561626c653a2061646472657373206160448201526c1b1c9958591e481c185d5cd959609a1b60648201526084016102f4565b6001600160a01b038116600081815260208190526040808220805460ff19166001179055517f933f93e57a222e6330362af8b376d0a8725b6901e9a2fb86d00f169702b28a4c9190a250565b6103d0610a88565b6001600160a01b0381166103f65760405162461bcd60e51b81526004016102f4906116e6565b6001600160a01b03811660009081526020819052604090205460ff166104705760405162461bcd60e51b815260206004820152602960248201527f54656c65706f727465725570677261646561626c653a2061646472657373206e6044820152681bdd081c185d5cd95960ba1b60648201526084016102f4565b6040516001600160a01b038216907f844e2f3154214672229235858fd029d1dfd543901c6d05931f0bc2480a2d72c390600090a26001600160a01b03166000908152602081905260409020805460ff19169055565b6104cd610a88565b6104d681610a90565b50565b6104e1610c30565b6104eb6000610c8a565b565b6104f5610cdc565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d820e64f6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610555573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105799190611734565b90506001600160a01b0386166105a15760405162461bcd60e51b81526004016102f490611751565b60006105cd7f000000000000000000000000000000000000000000000000000000000000000087610d35565b90508481116106355760405162461bcd60e51b815260206004820152602e60248201527f4552433230546f6b656e536f757263653a20696e73756666696369656e74206160448201526d191a9d5cdd195908185b5bdd5b9d60921b60648201526084016102f4565b8415610666576106667f00000000000000000000000000000000000000000000000000000000000000008387610e9f565b600061067286836117af565b90506000836001600160a01b031663624488506040518060c001604052807f000000000000000000000000000000000000000000000000000000000000000081526020017f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316815260200160405180604001604052807f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031681526020018c8152508152602001620186a08152602001898980806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250505090825250604080516001600160a01b038f166020808301919091529181018890529101906060016040516020818303038152906040528152506040518263ffffffff1660e01b81526004016107b89190611856565b6020604051808303816000875af11580156107d7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107fb91906118d4565b905080896001600160a01b0316336001600160a01b03167f2b4e8f08417773e367064a6aea9ca2df303a60876676f70b6c3c5e66b314ca5a8560405161084391815260200190565b60405180910390a4505050506108596001600355565b5050505050565b60015460405163260f846760e11b81523360048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690634c1f08ce90602401602060405180830381865afa1580156108c7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108eb91906118d4565b10156109525760405162461bcd60e51b815260206004820152603060248201527f54656c65706f727465725570677261646561626c653a20696e76616c6964205460448201526f32b632b837b93a32b91039b2b73232b960811b60648201526084016102f4565b3360009081526020819052604090205460ff16156109cb5760405162461bcd60e51b815260206004820152603060248201527f54656c65706f727465725570677261646561626c653a2054656c65706f72746560448201526f1c881859191c995cdcc81c185d5cd95960821b60648201526084016102f4565b610a0c848484848080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250610f8492505050565b50505050565b610a1a610c30565b6001600160a01b038116610a7f5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016102f4565b6104d681610c8a565b6104eb610c30565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663c07f47d46040518163ffffffff1660e01b8152600401602060405180830381865afa158015610af0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b1491906118d4565b60015490915081831115610b845760405162461bcd60e51b815260206004820152603160248201527f54656c65706f727465725570677261646561626c653a20696e76616c6964205460448201527032b632b837b93a32b9103b32b939b4b7b760791b60648201526084016102f4565b808311610bf95760405162461bcd60e51b815260206004820152603f60248201527f54656c65706f727465725570677261646561626c653a206e6f7420677265617460448201527f6572207468616e2063757272656e74206d696e696d756d2076657273696f6e0060648201526084016102f4565b6001839055604051839082907fa9a7ef57e41f05b4c15480842f5f0c27edfcbb553fed281f7c4068452cc1c02d90600090a3505050565b6002546001600160a01b031633146104eb5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016102f4565b600280546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600260035403610d2e5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016102f4565b6002600355565b6040516370a0823160e01b815230600482015260009081906001600160a01b038516906370a0823190602401602060405180830381865afa158015610d7e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610da291906118d4565b9050610db96001600160a01b03851633308661117f565b6040516370a0823160e01b81523060048201526000906001600160a01b038616906370a0823190602401602060405180830381865afa158015610e00573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e2491906118d4565b9050818111610e8a5760405162461bcd60e51b815260206004820152602c60248201527f5361666545524332305472616e7366657246726f6d3a2062616c616e6365206e60448201526b1bdd081a5b98dc99585cd95960a21b60648201526084016102f4565b610e9482826117af565b925050505b92915050565b604051636eb1769f60e11b81523060048201526001600160a01b038381166024830152600091839186169063dd62ed3e90604401602060405180830381865afa158015610ef0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f1491906118d4565b610f1e91906118ed565b6040516001600160a01b038516602482015260448101829052909150610a0c90859063095ea7b360e01b906064015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b0319909316929092179091526111b7565b7f000000000000000000000000000000000000000000000000000000000000000083146110075760405162461bcd60e51b815260206004820152602b60248201527f4552433230546f6b656e536f757263653a20696e76616c69642064657374696e60448201526a30ba34b7b71031b430b4b760a91b60648201526084016102f4565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316826001600160a01b0316146110965760405162461bcd60e51b815260206004820152602560248201527f4552433230546f6b656e536f757263653a20756e617574686f72697a6564207360448201526432b73232b960d91b60648201526084016102f4565b600080828060200190518101906110ad9190611916565b909250905060008260018111156110c6576110c66119dd565b036110f757600080828060200190518101906110e291906119f3565b915091506110f0828261128e565b5050610859565b600182600181111561110b5761110b6119dd565b036111375760008180602001905181019061112691906118d4565b905061113181611325565b50610859565b60405162461bcd60e51b815260206004820181905260248201527f4552433230546f6b656e536f757263653a20696e76616c696420616374696f6e60448201526064016102f4565b6040516001600160a01b0380851660248301528316604482015260648101829052610a0c9085906323b872dd60e01b90608401610f4d565b600061120c826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166113509092919063ffffffff16565b805190915015611289578080602001905181019061122a9190611a21565b6112895760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b60648201526084016102f4565b505050565b6001600160a01b0382166112b45760405162461bcd60e51b81526004016102f490611751565b604080516001600160a01b0384168152602081018390527f55aaef8fd8c07238c3618a93c8a1627194187d3b0952908e58f2ab0f944fb407910160405180910390a16113217f00000000000000000000000000000000000000000000000000000000000000008383611367565b5050565b6004548111156104d65760006004548261133f91906117af565b905061134a81611397565b50600455565b606061135f84846000856113f9565b949350505050565b6040516001600160a01b03831660248201526044810182905261128990849063a9059cbb60e01b90606401610f4d565b6040518181527f2cd3fd70cd5a5d6d805e90d22741aa1a84590ace7cf01b244719558d266143829060200160405180910390a16104d67f0000000000000000000000000000000000000000000000000000000000000000600160981b83611367565b60608247101561145a5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b60648201526084016102f4565b600080866001600160a01b031685876040516114769190611a43565b60006040518083038185875af1925050503d80600081146114b3576040519150601f19603f3d011682016040523d82523d6000602084013e6114b8565b606091505b50915091506114c9878383876114d4565b979650505050505050565b6060831561154357825160000361153c576001600160a01b0385163b61153c5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016102f4565b508161135f565b61135f83838151156115585781518083602001fd5b8060405162461bcd60e51b81526004016102f49190611a5f565b6001600160a01b03811681146104d657600080fd5b60006020828403121561159957600080fd5b81356115a481611572565b9392505050565b6000602082840312156115bd57600080fd5b5035919050565b6000806000806000608086880312156115dc57600080fd5b85356115e781611572565b94506020860135935060408601359250606086013567ffffffffffffffff8082111561161257600080fd5b818801915088601f83011261162657600080fd5b81358181111561163557600080fd5b8960208260051b850101111561164a57600080fd5b9699959850939650602001949392505050565b6000806000806060858703121561167357600080fd5b84359350602085013561168581611572565b9250604085013567ffffffffffffffff808211156116a257600080fd5b818701915087601f8301126116b657600080fd5b8135818111156116c557600080fd5b8860208285010111156116d757600080fd5b95989497505060200194505050565b6020808252602e908201527f54656c65706f727465725570677261646561626c653a207a65726f2054656c6560408201526d706f72746572206164647265737360901b606082015260800190565b60006020828403121561174657600080fd5b81516115a481611572565b60208082526028908201527f4552433230546f6b656e536f757263653a207a65726f20726563697069656e74604082015267206164647265737360c01b606082015260800190565b634e487b7160e01b600052601160045260246000fd5b81810381811115610e9957610e99611799565b600081518084526020808501945080840160005b838110156117fb5781516001600160a01b0316875295820195908201906001016117d6565b509495945050505050565b60005b83811015611821578181015183820152602001611809565b50506000910152565b60008151808452611842816020860160208601611806565b601f01601f19169290920160200192915050565b60208152815160208201526000602083015160018060a01b03808216604085015260408501519150808251166060850152506020810151608084015250606083015160a0830152608083015160e060c08401526118b76101008401826117c2565b905060a0840151601f198483030160e0850152610e94828261182a565b6000602082840312156118e657600080fd5b5051919050565b80820180821115610e9957610e99611799565b634e487b7160e01b600052604160045260246000fd5b6000806040838503121561192957600080fd5b82516002811061193857600080fd5b602084015190925067ffffffffffffffff8082111561195657600080fd5b818501915085601f83011261196a57600080fd5b81518181111561197c5761197c611900565b604051601f8201601f19908116603f011681019083821181831017156119a4576119a4611900565b816040528281528860208487010111156119bd57600080fd5b6119ce836020830160208801611806565b80955050505050509250929050565b634e487b7160e01b600052602160045260246000fd5b60008060408385031215611a0657600080fd5b8251611a1181611572565b6020939093015192949293505050565b600060208284031215611a3357600080fd5b815180151581146115a457600080fd5b60008251611a55818460208701611806565b9190910192915050565b6020815260006115a4602083018461182a56fea2646970667358221220c63649f32f739ed261ca17987c50e6b522b7841640d709cf118adc31d461e54264736f6c634300081200334552433230546f6b656e536f757263653a207a65726f2064657374696e617469", } // ERC20TokenSourceABI is the input ABI used to generate the binding from. diff --git a/abi-bindings/go/CrossChainApplications/NativeTokenBridge/NativeTokenDestination/NativeTokenDestination.go b/abi-bindings/go/CrossChainApplications/NativeTokenBridge/NativeTokenDestination/NativeTokenDestination.go index ce911f3c5..2af027474 100644 --- a/abi-bindings/go/CrossChainApplications/NativeTokenBridge/NativeTokenDestination/NativeTokenDestination.go +++ b/abi-bindings/go/CrossChainApplications/NativeTokenBridge/NativeTokenDestination/NativeTokenDestination.go @@ -38,7 +38,7 @@ type TeleporterFeeInfo struct { // NativeTokenDestinationMetaData contains all meta data concerning the NativeTokenDestination contract. var NativeTokenDestinationMetaData = &bind.MetaData{ ABI: "[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"teleporterRegistryAddress\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"sourceBlockchainID_\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"nativeTokenSourceAddress_\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"initialReserveImbalance_\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"remaining\",\"type\":\"uint256\"}],\"name\":\"CollateralAdded\",\"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\":\"recipient\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"NativeTokensMinted\",\"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\":\"uint256\",\"name\":\"teleporterMessageID\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"burnAddressBalance\",\"type\":\"uint256\"}],\"name\":\"ReportTotalBurnedTxFees\",\"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\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"teleporterMessageID\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"TransferToSource\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"BURNED_TX_FEES_ADDRESS\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"BURN_FOR_TRANSFER_ADDRESS\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"REPORT_BURNED_TOKENS_REQUIRED_GAS\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"TRANSFER_NATIVE_TOKENS_REQUIRED_GAS\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"currentReserveImbalance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getMinTeleporterVersion\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"initialReserveImbalance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"isCollateralized\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"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\":\"nativeTokenSourceAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"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\":\"originBlockchainID\",\"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\":\"address\",\"name\":\"feeTokenAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"internalType\":\"structTeleporterFeeInfo\",\"name\":\"feeInfo\",\"type\":\"tuple\"},{\"internalType\":\"address[]\",\"name\":\"allowedRelayerAddresses\",\"type\":\"address[]\"}],\"name\":\"reportTotalBurnedTxFees\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sourceBlockchainID\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"teleporterRegistry\",\"outputs\":[{\"internalType\":\"contractTeleporterRegistry\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalMinted\",\"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\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"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\":\"transferToSource\",\"outputs\":[],\"stateMutability\":\"payable\",\"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: "0x61012060405273020000000000000000000000000000000000000160a0523480156200002a57600080fd5b506040516200252c3803806200252c8339810160408190526200004d9162000418565b83806001600160a01b038116620000d15760405162461bcd60e51b815260206004820152603760248201527f54656c65706f727465725570677261646561626c653a207a65726f2074656c6560448201527f706f72746572207265676973747279206164647265737300000000000000000060648201526084015b60405180910390fd5b6001600160a01b03811660808190526040805163301fd1f560e21b8152905163c07f47d4916004808201926020929091908290030181865afa1580156200011c573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000142919062000461565b600155506200015133620003a9565b50600160035582620001af5760405162461bcd60e51b815260206004820152603160248201526000805160206200250c8339815191526044820152701c98d948189b1bd8dad8da185a5b881251607a1b6064820152608401620000c8565b7302000000000000000000000000000000000000056001600160a01b0316634213cf786040518163ffffffff1660e01b8152600401602060405180830381865afa15801562000202573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000228919062000461565b83036200029e5760405162461bcd60e51b815260206004820152603a60248201527f4e6174697665546f6b656e44657374696e6174696f6e3a2063616e6e6f74206260448201527f726964676520776974682073616d6520626c6f636b636861696e0000000000006064820152608401620000c8565b60c08390526001600160a01b038216620003105760405162461bcd60e51b815260206004820152603460248201526000805160206200250c83398151915260448201527f72636520636f6e747261637420616464726573730000000000000000000000006064820152608401620000c8565b6001600160a01b03821660e0526000819003620003965760405162461bcd60e51b815260206004820152603660248201527f4e6174697665546f6b656e44657374696e6174696f6e3a207a65726f20696e6960448201527f7469616c207265736572766520696d62616c616e6365000000000000000000006064820152608401620000c8565b610100819052600455506200047b915050565b600280546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b80516001600160a01b03811681146200041357600080fd5b919050565b600080600080608085870312156200042f57600080fd5b6200043a85620003fb565b9350602085015192506200045160408601620003fb565b6060959095015193969295505050565b6000602082840312156200047457600080fd5b5051919050565b60805160a05160c05160e05161010051611fff6200050d6000396000818161031401526104620152600081816102980152818161068001528181610abf015261151f0152600081816101e00152818161065a01528181610a99015261149b01526000611798015260008181610194015281816105a70152818161091601528181610c750152610e8b0152611fff6000f3fe60806040526004361061013f5760003560e01c806375846562116100b6578063ab2852301161006f578063ab285230146103be578063c452165e146103d5578063c868efaa146103ed578063d2cc7a701461040d578063d3095126146103be578063f2fde38b1461042257600080fd5b806375846562146102ef5780638ac7dd20146103025780638da5cb5b146103365780639731429714610354578063a2309ff81461038d578063a2a95017146103a357600080fd5b80633a94fe51116101085780633a94fe51146102245780634511243e1461024457806349e3284e146102645780635d93f9af146102865780635eb99514146102ba578063715018a6146102da57600080fd5b8062d872ae1461014457806318160ddd1461016d5780631a7f5bec1461018257806329b7b3fd146101ce5780632b0d8f1814610202575b600080fd5b34801561015057600080fd5b5061015a60045481565b6040519081526020015b60405180910390f35b34801561017957600080fd5b5061015a610442565b34801561018e57600080fd5b506101b67f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b039091168152602001610164565b3480156101da57600080fd5b5061015a7f000000000000000000000000000000000000000000000000000000000000000081565b34801561020e57600080fd5b5061022261021d366004611aab565b6104a1565b005b34801561023057600080fd5b5061022261023f366004611b33565b6105a3565b34801561025057600080fd5b5061022261025f366004611aab565b6107e5565b34801561027057600080fd5b50600454155b6040519015158152602001610164565b34801561029257600080fd5b506101b67f000000000000000000000000000000000000000000000000000000000000000081565b3480156102c657600080fd5b506102226102d5366004611b87565b6108e2565b3480156102e657600080fd5b506102226108f6565b6102226102fd366004611ba0565b61090a565b34801561030e57600080fd5b5061015a7f000000000000000000000000000000000000000000000000000000000000000081565b34801561034257600080fd5b506002546001600160a01b03166101b6565b34801561036057600080fd5b5061027661036f366004611aab565b6001600160a01b031660009081526020819052604090205460ff1690565b34801561039957600080fd5b5061015a60055481565b3480156103af57600080fd5b506101b66001600160981b0181565b3480156103ca57600080fd5b5061015a620186a081565b3480156103e157600080fd5b506101b6600160981b81565b3480156103f957600080fd5b50610222610408366004611c04565b610c5d565b34801561041957600080fd5b5060015461015a565b34801561042e57600080fd5b5061022261043d366004611aab565b610e09565b60008061045c6001600160981b0131600160981b31611ca3565b905060007f000000000000000000000000000000000000000000000000000000000000000060055461048e9190611ca3565b905061049a8282611cb6565b9250505090565b6104a9610e7f565b6001600160a01b0381166104d85760405162461bcd60e51b81526004016104cf90611cc9565b60405180910390fd5b6001600160a01b03811660009081526020819052604090205460ff16156105575760405162461bcd60e51b815260206004820152602d60248201527f54656c65706f727465725570677261646561626c653a2061646472657373206160448201526c1b1c9958591e481c185d5cd959609a1b60648201526084016104cf565b6001600160a01b038116600081815260208190526040808220805460ff19166001179055517f933f93e57a222e6330362af8b376d0a8725b6901e9a2fb86d00f169702b28a4c9190a250565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d820e64f6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610603573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106279190611d17565b90506000600160981b6001600160a01b03163190506000826001600160a01b031663624488506040518060c001604052807f000000000000000000000000000000000000000000000000000000000000000081526020017f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03168152602001898036038101906106be9190611d34565b8152602001620186a081526020018888808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152505050908252506040805160208082018990528251808303820181528284019093529092019161073091600191606001611dea565b6040516020818303038152906040528152506040518263ffffffff1660e01b815260040161075e9190611e65565b6020604051808303816000875af115801561077d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107a19190611ee3565b9050807f2550fa6041684d40e635e29e93dde9017d70c25b46aa88393317b5182ed6ae7c836040516107d591815260200190565b60405180910390a2505050505050565b6107ed610e7f565b6001600160a01b0381166108135760405162461bcd60e51b81526004016104cf90611cc9565b6001600160a01b03811660009081526020819052604090205460ff1661088d5760405162461bcd60e51b815260206004820152602960248201527f54656c65706f727465725570677261646561626c653a2061646472657373206e6044820152681bdd081c185d5cd95960ba1b60648201526084016104cf565b6040516001600160a01b038216907f844e2f3154214672229235858fd029d1dfd543901c6d05931f0bc2480a2d72c390600090a26001600160a01b03166000908152602081905260409020805460ff19169055565b6108ea610e7f565b6108f381610e87565b50565b6108fe611027565b6109086000611081565b565b6109126110d3565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d820e64f6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610972573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109969190611d17565b90506001600160a01b0385166109be5760405162461bcd60e51b81526004016104cf90611efc565b60045415610a2b5760405162461bcd60e51b815260206004820152603460248201527f4e6174697665546f6b656e44657374696e6174696f6e3a20636f6e7472616374604482015273081d5b99195c98dbdb1b185d195c985b1a5e995960621b60648201526084016104cf565b6000602085013515610a6a57610a51610a476020870187611aab565b866020013561112c565b9050610a6a610a636020870187611aab565b8383611296565b610a7b6001600160981b013461137b565b6000826001600160a01b031663624488506040518060c001604052807f000000000000000000000000000000000000000000000000000000000000000081526020017f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316815260200189803603810190610afd9190611d34565b8152602001620186a0815260200188888080602002602001604051908101604052809392919081815260200183836020028082843760009201829052509385525050604051602093840193610b6b92508e913491016001600160a01b03929092168252602082015260400190565b60408051601f1981840301815290829052610b899291602001611dea565b6040516020818303038152906040528152506040518263ffffffff1660e01b8152600401610bb79190611e65565b6020604051808303816000875af1158015610bd6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610bfa9190611ee3565b905080876001600160a01b0316336001600160a01b03167f0322cbb1d3c23f6dbf1deddb3b4ef3ce0f93ae6eec7b44e4f395804104466d1434604051610c4291815260200190565b60405180910390a4505050610c576001600355565b50505050565b60015460405163260f846760e11b81523360048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690634c1f08ce90602401602060405180830381865afa158015610cc4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ce89190611ee3565b1015610d4f5760405162461bcd60e51b815260206004820152603060248201527f54656c65706f727465725570677261646561626c653a20696e76616c6964205460448201526f32b632b837b93a32b91039b2b73232b960811b60648201526084016104cf565b3360009081526020819052604090205460ff1615610dc85760405162461bcd60e51b815260206004820152603060248201527f54656c65706f727465725570677261646561626c653a2054656c65706f72746560448201526f1c881859191c995cdcc81c185d5cd95960821b60648201526084016104cf565b610c57848484848080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061149992505050565b610e11611027565b6001600160a01b038116610e765760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016104cf565b6108f381611081565b610908611027565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663c07f47d46040518163ffffffff1660e01b8152600401602060405180830381865afa158015610ee7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f0b9190611ee3565b60015490915081831115610f7b5760405162461bcd60e51b815260206004820152603160248201527f54656c65706f727465725570677261646561626c653a20696e76616c6964205460448201527032b632b837b93a32b9103b32b939b4b7b760791b60648201526084016104cf565b808311610ff05760405162461bcd60e51b815260206004820152603f60248201527f54656c65706f727465725570677261646561626c653a206e6f7420677265617460448201527f6572207468616e2063757272656e74206d696e696d756d2076657273696f6e0060648201526084016104cf565b6001839055604051839082907fa9a7ef57e41f05b4c15480842f5f0c27edfcbb553fed281f7c4068452cc1c02d90600090a3505050565b6002546001600160a01b031633146109085760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016104cf565b600280546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6002600354036111255760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016104cf565b6002600355565b6040516370a0823160e01b815230600482015260009081906001600160a01b038516906370a0823190602401602060405180830381865afa158015611175573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111999190611ee3565b90506111b06001600160a01b0385163330866117fc565b6040516370a0823160e01b81523060048201526000906001600160a01b038616906370a0823190602401602060405180830381865afa1580156111f7573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061121b9190611ee3565b90508181116112815760405162461bcd60e51b815260206004820152602c60248201527f5361666545524332305472616e7366657246726f6d3a2062616c616e6365206e60448201526b1bdd081a5b98dc99585cd95960a21b60648201526084016104cf565b61128b8282611cb6565b925050505b92915050565b604051636eb1769f60e11b81523060048201526001600160a01b038381166024830152600091839186169063dd62ed3e90604401602060405180830381865afa1580156112e7573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061130b9190611ee3565b6113159190611ca3565b6040516001600160a01b038516602482015260448101829052909150610c5790859063095ea7b360e01b906064015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152611834565b804710156113cb5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e636500000060448201526064016104cf565b6000826001600160a01b03168260405160006040518083038185875af1925050503d8060008114611418576040519150601f19603f3d011682016040523d82523d6000602084013e61141d565b606091505b50509050806114945760405162461bcd60e51b815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d6179206861766520726576657274656400000000000060648201526084016104cf565b505050565b7f0000000000000000000000000000000000000000000000000000000000000000831461151d5760405162461bcd60e51b815260206004820152602c60248201527f4e6174697665546f6b656e44657374696e6174696f6e3a20696e76616c69642060448201526b39b7bab931b29031b430b4b760a11b60648201526084016104cf565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316826001600160a01b0316146115b25760405162461bcd60e51b815260206004820152602b60248201527f4e6174697665546f6b656e44657374696e6174696f6e3a20756e617574686f7260448201526a34bd32b21039b2b73232b960a91b60648201526084016104cf565b600080828060200190518101906115c99190611f4a565b90925090506001600160a01b0382166115f45760405162461bcd60e51b81526004016104cf90611efc565b806000036116585760405162461bcd60e51b815260206004820152602b60248201527f4e6174697665546f6b656e44657374696e6174696f6e3a207a65726f2074726160448201526a6e736665722076616c756560a81b60648201526084016104cf565b60045481901561171d576004548211156116c15760045460408051918252600060208301527f244160b15e69cc411f041d94ae7fab6f6bba85dade8403216c05ff4b920d5449910160405180910390a16004546116b59083611cb6565b6000600455905061171d565b81600460008282546116d39190611cb6565b90915550506004546040805184815260208101929092527f244160b15e69cc411f041d94ae7fab6f6bba85dade8403216c05ff4b920d5449910160405180910390a1505050505050565b806005600082825461172f9190611ca3565b90915550506040518181526001600160a01b038416907fd949ea0e9d5db53492d77f28fd5467fb2f6c4f5b88e3350e3c36729b76e99cf29060200160405180910390a26040516327ad555d60e11b81526001600160a01b038481166004830152602482018390527f00000000000000000000000000000000000000000000000000000000000000001690634f5aaaba90604401600060405180830381600087803b1580156117dc57600080fd5b505af11580156117f0573d6000803e3d6000fd5b50505050505050505050565b6040516001600160a01b0380851660248301528316604482015260648101829052610c579085906323b872dd60e01b90608401611344565b6000611889826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166119069092919063ffffffff16565b80519091501561149457808060200190518101906118a79190611f78565b6114945760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b60648201526084016104cf565b6060611915848460008561191d565b949350505050565b60608247101561197e5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b60648201526084016104cf565b600080866001600160a01b0316858760405161199a9190611f9a565b60006040518083038185875af1925050503d80600081146119d7576040519150601f19603f3d011682016040523d82523d6000602084013e6119dc565b606091505b50915091506119ed878383876119f8565b979650505050505050565b60608315611a67578251600003611a60576001600160a01b0385163b611a605760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016104cf565b5081611915565b6119158383815115611a7c5781518083602001fd5b8060405162461bcd60e51b81526004016104cf9190611fb6565b6001600160a01b03811681146108f357600080fd5b600060208284031215611abd57600080fd5b8135611ac881611a96565b9392505050565b600060408284031215611ae157600080fd5b50919050565b60008083601f840112611af957600080fd5b50813567ffffffffffffffff811115611b1157600080fd5b6020830191508360208260051b8501011115611b2c57600080fd5b9250929050565b600080600060608486031215611b4857600080fd5b611b528585611acf565b9250604084013567ffffffffffffffff811115611b6e57600080fd5b611b7a86828701611ae7565b9497909650939450505050565b600060208284031215611b9957600080fd5b5035919050565b60008060008060808587031215611bb657600080fd5b8435611bc181611a96565b9350611bd08660208701611acf565b9250606085013567ffffffffffffffff811115611bec57600080fd5b611bf887828801611ae7565b95989497509550505050565b60008060008060608587031215611c1a57600080fd5b843593506020850135611c2c81611a96565b9250604085013567ffffffffffffffff80821115611c4957600080fd5b818701915087601f830112611c5d57600080fd5b813581811115611c6c57600080fd5b886020828501011115611c7e57600080fd5b95989497505060200194505050565b634e487b7160e01b600052601160045260246000fd5b8082018082111561129057611290611c8d565b8181038181111561129057611290611c8d565b6020808252602e908201527f54656c65706f727465725570677261646561626c653a207a65726f2054656c6560408201526d706f72746572206164647265737360901b606082015260800190565b600060208284031215611d2957600080fd5b8151611ac881611a96565b600060408284031215611d4657600080fd5b6040516040810181811067ffffffffffffffff82111715611d7757634e487b7160e01b600052604160045260246000fd5b6040528235611d8581611a96565b81526020928301359281019290925250919050565b60005b83811015611db5578181015183820152602001611d9d565b50506000910152565b60008151808452611dd6816020860160208601611d9a565b601f01601f19169290920160200192915050565b600060028410611e0a57634e487b7160e01b600052602160045260246000fd5b838252604060208301526119156040830184611dbe565b600081518084526020808501945080840160005b83811015611e5a5781516001600160a01b031687529582019590820190600101611e35565b509495945050505050565b60208152815160208201526000602083015160018060a01b03808216604085015260408501519150808251166060850152506020810151608084015250606083015160a0830152608083015160e060c0840152611ec6610100840182611e21565b905060a0840151601f198483030160e085015261128b8282611dbe565b600060208284031215611ef557600080fd5b5051919050565b6020808252602e908201527f4e6174697665546f6b656e44657374696e6174696f6e3a207a65726f2072656360408201526d697069656e74206164647265737360901b606082015260800190565b60008060408385031215611f5d57600080fd5b8251611f6881611a96565b6020939093015192949293505050565b600060208284031215611f8a57600080fd5b81518015158114611ac857600080fd5b60008251611fac818460208701611d9a565b9190910192915050565b602081526000611ac86020830184611dbe56fea2646970667358221220699eb7cd5dc9d7a68df5bd8baf0f87397ce7505132037cac6ae97c690b3bfdaf64736f6c634300081200334e6174697665546f6b656e44657374696e6174696f6e3a207a65726f20736f75", + Bin: "0x61012060405273020000000000000000000000000000000000000160a0523480156200002a57600080fd5b506040516200252c3803806200252c8339810160408190526200004d9162000418565b83806001600160a01b038116620000d15760405162461bcd60e51b815260206004820152603760248201527f54656c65706f727465725570677261646561626c653a207a65726f2074656c6560448201527f706f72746572207265676973747279206164647265737300000000000000000060648201526084015b60405180910390fd5b6001600160a01b03811660808190526040805163301fd1f560e21b8152905163c07f47d4916004808201926020929091908290030181865afa1580156200011c573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000142919062000461565b600155506200015133620003a9565b50600160035582620001af5760405162461bcd60e51b815260206004820152603160248201526000805160206200250c8339815191526044820152701c98d948189b1bd8dad8da185a5b881251607a1b6064820152608401620000c8565b7302000000000000000000000000000000000000056001600160a01b0316634213cf786040518163ffffffff1660e01b8152600401602060405180830381865afa15801562000202573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000228919062000461565b83036200029e5760405162461bcd60e51b815260206004820152603a60248201527f4e6174697665546f6b656e44657374696e6174696f6e3a2063616e6e6f74206260448201527f726964676520776974682073616d6520626c6f636b636861696e0000000000006064820152608401620000c8565b60c08390526001600160a01b038216620003105760405162461bcd60e51b815260206004820152603460248201526000805160206200250c83398151915260448201527f72636520636f6e747261637420616464726573730000000000000000000000006064820152608401620000c8565b6001600160a01b03821660e0526000819003620003965760405162461bcd60e51b815260206004820152603660248201527f4e6174697665546f6b656e44657374696e6174696f6e3a207a65726f20696e6960448201527f7469616c207265736572766520696d62616c616e6365000000000000000000006064820152608401620000c8565b610100819052600455506200047b915050565b600280546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b80516001600160a01b03811681146200041357600080fd5b919050565b600080600080608085870312156200042f57600080fd5b6200043a85620003fb565b9350602085015192506200045160408601620003fb565b6060959095015193969295505050565b6000602082840312156200047457600080fd5b5051919050565b60805160a05160c05160e05161010051611fff6200050d6000396000818161031401526104620152600081816102980152818161068001528181610abf015261151f0152600081816101e00152818161065a01528181610a99015261149b01526000611798015260008181610194015281816105a70152818161091601528181610c750152610e8b0152611fff6000f3fe60806040526004361061013f5760003560e01c806375846562116100b6578063ab2852301161006f578063ab285230146103be578063c452165e146103d5578063c868efaa146103ed578063d2cc7a701461040d578063d3095126146103be578063f2fde38b1461042257600080fd5b806375846562146102ef5780638ac7dd20146103025780638da5cb5b146103365780639731429714610354578063a2309ff81461038d578063a2a95017146103a357600080fd5b80633a94fe51116101085780633a94fe51146102245780634511243e1461024457806349e3284e146102645780635d93f9af146102865780635eb99514146102ba578063715018a6146102da57600080fd5b8062d872ae1461014457806318160ddd1461016d5780631a7f5bec1461018257806329b7b3fd146101ce5780632b0d8f1814610202575b600080fd5b34801561015057600080fd5b5061015a60045481565b6040519081526020015b60405180910390f35b34801561017957600080fd5b5061015a610442565b34801561018e57600080fd5b506101b67f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b039091168152602001610164565b3480156101da57600080fd5b5061015a7f000000000000000000000000000000000000000000000000000000000000000081565b34801561020e57600080fd5b5061022261021d366004611aab565b6104a1565b005b34801561023057600080fd5b5061022261023f366004611b33565b6105a3565b34801561025057600080fd5b5061022261025f366004611aab565b6107e5565b34801561027057600080fd5b50600454155b6040519015158152602001610164565b34801561029257600080fd5b506101b67f000000000000000000000000000000000000000000000000000000000000000081565b3480156102c657600080fd5b506102226102d5366004611b87565b6108e2565b3480156102e657600080fd5b506102226108f6565b6102226102fd366004611ba0565b61090a565b34801561030e57600080fd5b5061015a7f000000000000000000000000000000000000000000000000000000000000000081565b34801561034257600080fd5b506002546001600160a01b03166101b6565b34801561036057600080fd5b5061027661036f366004611aab565b6001600160a01b031660009081526020819052604090205460ff1690565b34801561039957600080fd5b5061015a60055481565b3480156103af57600080fd5b506101b66001600160981b0181565b3480156103ca57600080fd5b5061015a620186a081565b3480156103e157600080fd5b506101b6600160981b81565b3480156103f957600080fd5b50610222610408366004611c04565b610c5d565b34801561041957600080fd5b5060015461015a565b34801561042e57600080fd5b5061022261043d366004611aab565b610e09565b60008061045c6001600160981b0131600160981b31611ca3565b905060007f000000000000000000000000000000000000000000000000000000000000000060055461048e9190611ca3565b905061049a8282611cb6565b9250505090565b6104a9610e7f565b6001600160a01b0381166104d85760405162461bcd60e51b81526004016104cf90611cc9565b60405180910390fd5b6001600160a01b03811660009081526020819052604090205460ff16156105575760405162461bcd60e51b815260206004820152602d60248201527f54656c65706f727465725570677261646561626c653a2061646472657373206160448201526c1b1c9958591e481c185d5cd959609a1b60648201526084016104cf565b6001600160a01b038116600081815260208190526040808220805460ff19166001179055517f933f93e57a222e6330362af8b376d0a8725b6901e9a2fb86d00f169702b28a4c9190a250565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d820e64f6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610603573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106279190611d17565b90506000600160981b6001600160a01b03163190506000826001600160a01b031663624488506040518060c001604052807f000000000000000000000000000000000000000000000000000000000000000081526020017f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03168152602001898036038101906106be9190611d34565b8152602001620186a081526020018888808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152505050908252506040805160208082018990528251808303820181528284019093529092019161073091600191606001611dea565b6040516020818303038152906040528152506040518263ffffffff1660e01b815260040161075e9190611e65565b6020604051808303816000875af115801561077d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107a19190611ee3565b9050807f2550fa6041684d40e635e29e93dde9017d70c25b46aa88393317b5182ed6ae7c836040516107d591815260200190565b60405180910390a2505050505050565b6107ed610e7f565b6001600160a01b0381166108135760405162461bcd60e51b81526004016104cf90611cc9565b6001600160a01b03811660009081526020819052604090205460ff1661088d5760405162461bcd60e51b815260206004820152602960248201527f54656c65706f727465725570677261646561626c653a2061646472657373206e6044820152681bdd081c185d5cd95960ba1b60648201526084016104cf565b6040516001600160a01b038216907f844e2f3154214672229235858fd029d1dfd543901c6d05931f0bc2480a2d72c390600090a26001600160a01b03166000908152602081905260409020805460ff19169055565b6108ea610e7f565b6108f381610e87565b50565b6108fe611027565b6109086000611081565b565b6109126110d3565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d820e64f6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610972573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109969190611d17565b90506001600160a01b0385166109be5760405162461bcd60e51b81526004016104cf90611efc565b60045415610a2b5760405162461bcd60e51b815260206004820152603460248201527f4e6174697665546f6b656e44657374696e6174696f6e3a20636f6e7472616374604482015273081d5b99195c98dbdb1b185d195c985b1a5e995960621b60648201526084016104cf565b6000602085013515610a6a57610a51610a476020870187611aab565b866020013561112c565b9050610a6a610a636020870187611aab565b8383611296565b610a7b6001600160981b013461137b565b6000826001600160a01b031663624488506040518060c001604052807f000000000000000000000000000000000000000000000000000000000000000081526020017f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316815260200189803603810190610afd9190611d34565b8152602001620186a0815260200188888080602002602001604051908101604052809392919081815260200183836020028082843760009201829052509385525050604051602093840193610b6b92508e913491016001600160a01b03929092168252602082015260400190565b60408051601f1981840301815290829052610b899291602001611dea565b6040516020818303038152906040528152506040518263ffffffff1660e01b8152600401610bb79190611e65565b6020604051808303816000875af1158015610bd6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610bfa9190611ee3565b905080876001600160a01b0316336001600160a01b03167f0322cbb1d3c23f6dbf1deddb3b4ef3ce0f93ae6eec7b44e4f395804104466d1434604051610c4291815260200190565b60405180910390a4505050610c576001600355565b50505050565b60015460405163260f846760e11b81523360048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690634c1f08ce90602401602060405180830381865afa158015610cc4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ce89190611ee3565b1015610d4f5760405162461bcd60e51b815260206004820152603060248201527f54656c65706f727465725570677261646561626c653a20696e76616c6964205460448201526f32b632b837b93a32b91039b2b73232b960811b60648201526084016104cf565b3360009081526020819052604090205460ff1615610dc85760405162461bcd60e51b815260206004820152603060248201527f54656c65706f727465725570677261646561626c653a2054656c65706f72746560448201526f1c881859191c995cdcc81c185d5cd95960821b60648201526084016104cf565b610c57848484848080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061149992505050565b610e11611027565b6001600160a01b038116610e765760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016104cf565b6108f381611081565b610908611027565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663c07f47d46040518163ffffffff1660e01b8152600401602060405180830381865afa158015610ee7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f0b9190611ee3565b60015490915081831115610f7b5760405162461bcd60e51b815260206004820152603160248201527f54656c65706f727465725570677261646561626c653a20696e76616c6964205460448201527032b632b837b93a32b9103b32b939b4b7b760791b60648201526084016104cf565b808311610ff05760405162461bcd60e51b815260206004820152603f60248201527f54656c65706f727465725570677261646561626c653a206e6f7420677265617460448201527f6572207468616e2063757272656e74206d696e696d756d2076657273696f6e0060648201526084016104cf565b6001839055604051839082907fa9a7ef57e41f05b4c15480842f5f0c27edfcbb553fed281f7c4068452cc1c02d90600090a3505050565b6002546001600160a01b031633146109085760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016104cf565b600280546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6002600354036111255760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016104cf565b6002600355565b6040516370a0823160e01b815230600482015260009081906001600160a01b038516906370a0823190602401602060405180830381865afa158015611175573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111999190611ee3565b90506111b06001600160a01b0385163330866117fc565b6040516370a0823160e01b81523060048201526000906001600160a01b038616906370a0823190602401602060405180830381865afa1580156111f7573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061121b9190611ee3565b90508181116112815760405162461bcd60e51b815260206004820152602c60248201527f5361666545524332305472616e7366657246726f6d3a2062616c616e6365206e60448201526b1bdd081a5b98dc99585cd95960a21b60648201526084016104cf565b61128b8282611cb6565b925050505b92915050565b604051636eb1769f60e11b81523060048201526001600160a01b038381166024830152600091839186169063dd62ed3e90604401602060405180830381865afa1580156112e7573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061130b9190611ee3565b6113159190611ca3565b6040516001600160a01b038516602482015260448101829052909150610c5790859063095ea7b360e01b906064015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152611834565b804710156113cb5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e636500000060448201526064016104cf565b6000826001600160a01b03168260405160006040518083038185875af1925050503d8060008114611418576040519150601f19603f3d011682016040523d82523d6000602084013e61141d565b606091505b50509050806114945760405162461bcd60e51b815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d6179206861766520726576657274656400000000000060648201526084016104cf565b505050565b7f0000000000000000000000000000000000000000000000000000000000000000831461151d5760405162461bcd60e51b815260206004820152602c60248201527f4e6174697665546f6b656e44657374696e6174696f6e3a20696e76616c69642060448201526b39b7bab931b29031b430b4b760a11b60648201526084016104cf565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316826001600160a01b0316146115b25760405162461bcd60e51b815260206004820152602b60248201527f4e6174697665546f6b656e44657374696e6174696f6e3a20756e617574686f7260448201526a34bd32b21039b2b73232b960a91b60648201526084016104cf565b600080828060200190518101906115c99190611f4a565b90925090506001600160a01b0382166115f45760405162461bcd60e51b81526004016104cf90611efc565b806000036116585760405162461bcd60e51b815260206004820152602b60248201527f4e6174697665546f6b656e44657374696e6174696f6e3a207a65726f2074726160448201526a6e736665722076616c756560a81b60648201526084016104cf565b60045481901561171d576004548211156116c15760045460408051918252600060208301527f244160b15e69cc411f041d94ae7fab6f6bba85dade8403216c05ff4b920d5449910160405180910390a16004546116b59083611cb6565b6000600455905061171d565b81600460008282546116d39190611cb6565b90915550506004546040805184815260208101929092527f244160b15e69cc411f041d94ae7fab6f6bba85dade8403216c05ff4b920d5449910160405180910390a1505050505050565b806005600082825461172f9190611ca3565b90915550506040518181526001600160a01b038416907fd949ea0e9d5db53492d77f28fd5467fb2f6c4f5b88e3350e3c36729b76e99cf29060200160405180910390a26040516327ad555d60e11b81526001600160a01b038481166004830152602482018390527f00000000000000000000000000000000000000000000000000000000000000001690634f5aaaba90604401600060405180830381600087803b1580156117dc57600080fd5b505af11580156117f0573d6000803e3d6000fd5b50505050505050505050565b6040516001600160a01b0380851660248301528316604482015260648101829052610c579085906323b872dd60e01b90608401611344565b6000611889826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166119069092919063ffffffff16565b80519091501561149457808060200190518101906118a79190611f78565b6114945760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b60648201526084016104cf565b6060611915848460008561191d565b949350505050565b60608247101561197e5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b60648201526084016104cf565b600080866001600160a01b0316858760405161199a9190611f9a565b60006040518083038185875af1925050503d80600081146119d7576040519150601f19603f3d011682016040523d82523d6000602084013e6119dc565b606091505b50915091506119ed878383876119f8565b979650505050505050565b60608315611a67578251600003611a60576001600160a01b0385163b611a605760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016104cf565b5081611915565b6119158383815115611a7c5781518083602001fd5b8060405162461bcd60e51b81526004016104cf9190611fb6565b6001600160a01b03811681146108f357600080fd5b600060208284031215611abd57600080fd5b8135611ac881611a96565b9392505050565b600060408284031215611ae157600080fd5b50919050565b60008083601f840112611af957600080fd5b50813567ffffffffffffffff811115611b1157600080fd5b6020830191508360208260051b8501011115611b2c57600080fd5b9250929050565b600080600060608486031215611b4857600080fd5b611b528585611acf565b9250604084013567ffffffffffffffff811115611b6e57600080fd5b611b7a86828701611ae7565b9497909650939450505050565b600060208284031215611b9957600080fd5b5035919050565b60008060008060808587031215611bb657600080fd5b8435611bc181611a96565b9350611bd08660208701611acf565b9250606085013567ffffffffffffffff811115611bec57600080fd5b611bf887828801611ae7565b95989497509550505050565b60008060008060608587031215611c1a57600080fd5b843593506020850135611c2c81611a96565b9250604085013567ffffffffffffffff80821115611c4957600080fd5b818701915087601f830112611c5d57600080fd5b813581811115611c6c57600080fd5b886020828501011115611c7e57600080fd5b95989497505060200194505050565b634e487b7160e01b600052601160045260246000fd5b8082018082111561129057611290611c8d565b8181038181111561129057611290611c8d565b6020808252602e908201527f54656c65706f727465725570677261646561626c653a207a65726f2054656c6560408201526d706f72746572206164647265737360901b606082015260800190565b600060208284031215611d2957600080fd5b8151611ac881611a96565b600060408284031215611d4657600080fd5b6040516040810181811067ffffffffffffffff82111715611d7757634e487b7160e01b600052604160045260246000fd5b6040528235611d8581611a96565b81526020928301359281019290925250919050565b60005b83811015611db5578181015183820152602001611d9d565b50506000910152565b60008151808452611dd6816020860160208601611d9a565b601f01601f19169290920160200192915050565b600060028410611e0a57634e487b7160e01b600052602160045260246000fd5b838252604060208301526119156040830184611dbe565b600081518084526020808501945080840160005b83811015611e5a5781516001600160a01b031687529582019590820190600101611e35565b509495945050505050565b60208152815160208201526000602083015160018060a01b03808216604085015260408501519150808251166060850152506020810151608084015250606083015160a0830152608083015160e060c0840152611ec6610100840182611e21565b905060a0840151601f198483030160e085015261128b8282611dbe565b600060208284031215611ef557600080fd5b5051919050565b6020808252602e908201527f4e6174697665546f6b656e44657374696e6174696f6e3a207a65726f2072656360408201526d697069656e74206164647265737360901b606082015260800190565b60008060408385031215611f5d57600080fd5b8251611f6881611a96565b6020939093015192949293505050565b600060208284031215611f8a57600080fd5b81518015158114611ac857600080fd5b60008251611fac818460208701611d9a565b9190910192915050565b602081526000611ac86020830184611dbe56fea26469706673582212206363644d435f0f9cde875245c1a5dc0e494cdad51948071be70f083554f405df64736f6c634300081200334e6174697665546f6b656e44657374696e6174696f6e3a207a65726f20736f75", } // NativeTokenDestinationABI is the input ABI used to generate the binding from. diff --git a/abi-bindings/go/CrossChainApplications/NativeTokenBridge/NativeTokenSource/NativeTokenSource.go b/abi-bindings/go/CrossChainApplications/NativeTokenBridge/NativeTokenSource/NativeTokenSource.go index 14c9c998b..8e04ec410 100644 --- a/abi-bindings/go/CrossChainApplications/NativeTokenBridge/NativeTokenSource/NativeTokenSource.go +++ b/abi-bindings/go/CrossChainApplications/NativeTokenBridge/NativeTokenSource/NativeTokenSource.go @@ -38,7 +38,7 @@ type TeleporterFeeInfo struct { // NativeTokenSourceMetaData contains all meta data concerning the NativeTokenSource contract. var NativeTokenSourceMetaData = &bind.MetaData{ ABI: "[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"teleporterRegistryAddress\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"destinationBlockchainID_\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"nativeTokenDestinationAddress_\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"BurnTokens\",\"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\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"teleporterMessageID\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"TransferToDestination\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"UnlockTokens\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"BURNED_TX_FEES_ADDRESS\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"MINT_NATIVE_TOKENS_REQUIRED_GAS\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"destinationBlockchainID\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"destinationBurnedTotal\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"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\":\"nativeTokenDestinationAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"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\":\"originBlockchainID\",\"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\":[],\"name\":\"teleporterRegistry\",\"outputs\":[{\"internalType\":\"contractTeleporterRegistry\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"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\":\"transferToDestination\",\"outputs\":[],\"stateMutability\":\"payable\",\"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: "0x60e06040523480156200001157600080fd5b50604051620020473803806200204783398101604081905262000034916200037b565b82806001600160a01b038116620000b85760405162461bcd60e51b815260206004820152603760248201527f54656c65706f727465725570677261646561626c653a207a65726f2074656c6560448201527f706f72746572207265676973747279206164647265737300000000000000000060648201526084015b60405180910390fd5b6001600160a01b03811660808190526040805163301fd1f560e21b8152905163c07f47d4916004808201926020929091908290030181865afa15801562000103573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620001299190620003bc565b6001555062000138336200030c565b50600160035581620001965760405162461bcd60e51b81526020600482015260316024820152600080516020620020278339815191526044820152701a5bdb88189b1bd8dad8da185a5b881251607a1b6064820152608401620000af565b7302000000000000000000000000000000000000056001600160a01b0316634213cf786040518163ffffffff1660e01b8152600401602060405180830381865afa158015620001e9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200020f9190620003bc565b8203620002855760405162461bcd60e51b815260206004820152603560248201527f4e6174697665546f6b656e536f757263653a2063616e6e6f742062726964676560448201527f20776974682073616d6520626c6f636b636861696e00000000000000000000006064820152608401620000af565b60a08290526001600160a01b038116620002f75760405162461bcd60e51b815260206004820152603460248201526000805160206200202783398151915260448201527f696f6e20636f6e747261637420616464726573730000000000000000000000006064820152608401620000af565b6001600160a01b031660c05250620003d69050565b600280546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b80516001600160a01b03811681146200037657600080fd5b919050565b6000806000606084860312156200039157600080fd5b6200039c846200035e565b925060208401519150620003b3604085016200035e565b90509250925092565b600060208284031215620003cf57600080fd5b5051919050565b60805160a05160c051611bf062000437600039600081816102bb015281816106a80152610fcd01526000818161017d015281816106820152610f4901526000818161010a0152818161057d015281816108410152610a570152611bf06000f3fe6080604052600436106100f35760003560e01c8063973142971161008a578063c452165e11610059578063c452165e146102dd578063c868efaa146102f5578063d2cc7a7014610315578063f2fde38b1461032a57600080fd5b80639731429714610236578063ad0aee251461027f578063b6171f7314610292578063b8c9091a146102a957600080fd5b806355db3e9e116100c657806355db3e9e146101cd5780635eb99514146101e3578063715018a6146102035780638da5cb5b1461021857600080fd5b80631a7f5bec146100f85780632b0d8f181461014957806341d3014d1461016b5780634511243e146101ad575b600080fd5b34801561010457600080fd5b5061012c7f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020015b60405180910390f35b34801561015557600080fd5b50610169610164366004611667565b61034a565b005b34801561017757600080fd5b5061019f7f000000000000000000000000000000000000000000000000000000000000000081565b604051908152602001610140565b3480156101b957600080fd5b506101696101c8366004611667565b61044c565b3480156101d957600080fd5b5061019f60045481565b3480156101ef57600080fd5b506101696101fe36600461168b565b610549565b34801561020f57600080fd5b5061016961055d565b34801561022457600080fd5b506002546001600160a01b031661012c565b34801561024257600080fd5b5061026f610251366004611667565b6001600160a01b031660009081526020819052604090205460ff1690565b6040519015158152602001610140565b61016961028d3660046116a4565b610571565b34801561029e57600080fd5b5061019f620186a081565b3480156102b557600080fd5b5061012c7f000000000000000000000000000000000000000000000000000000000000000081565b3480156102e957600080fd5b5061012c600160981b81565b34801561030157600080fd5b50610169610310366004611743565b610829565b34801561032157600080fd5b5060015461019f565b34801561033657600080fd5b50610169610345366004611667565b6109d5565b610352610a4b565b6001600160a01b0381166103815760405162461bcd60e51b8152600401610378906117bd565b60405180910390fd5b6001600160a01b03811660009081526020819052604090205460ff16156104005760405162461bcd60e51b815260206004820152602d60248201527f54656c65706f727465725570677261646561626c653a2061646472657373206160448201526c1b1c9958591e481c185d5cd959609a1b6064820152608401610378565b6001600160a01b038116600081815260208190526040808220805460ff19166001179055517f933f93e57a222e6330362af8b376d0a8725b6901e9a2fb86d00f169702b28a4c9190a250565b610454610a4b565b6001600160a01b03811661047a5760405162461bcd60e51b8152600401610378906117bd565b6001600160a01b03811660009081526020819052604090205460ff166104f45760405162461bcd60e51b815260206004820152602960248201527f54656c65706f727465725570677261646561626c653a2061646472657373206e6044820152681bdd081c185d5cd95960ba1b6064820152608401610378565b6040516001600160a01b038216907f844e2f3154214672229235858fd029d1dfd543901c6d05931f0bc2480a2d72c390600090a26001600160a01b03166000908152602081905260409020805460ff19169055565b610551610a4b565b61055a81610a53565b50565b610565610bf3565b61056f6000610c4d565b565b610579610c9f565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d820e64f6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156105d9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105fd919061180b565b90506001600160a01b0385166106255760405162461bcd60e51b815260040161037890611828565b60006020850135156106645761064b6106416020870187611667565b8660200135610cf8565b905061066461065d6020870187611667565b8383610e62565b6000826001600160a01b031663624488506040518060c001604052807f000000000000000000000000000000000000000000000000000000000000000081526020017f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03168152602001898036038101906106e691906118b8565b8152602001620186a08152602001888880806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250505090825250604051602091820191610755918d913491016001600160a01b03929092168252602082015260400190565b6040516020818303038152906040528152506040518263ffffffff1660e01b815260040161078391906119a4565b6020604051808303816000875af11580156107a2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107c69190611a22565b905080876001600160a01b0316336001600160a01b03167f2b4e8f08417773e367064a6aea9ca2df303a60876676f70b6c3c5e66b314ca5a3460405161080e91815260200190565b60405180910390a45050506108236001600355565b50505050565b60015460405163260f846760e11b81523360048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690634c1f08ce90602401602060405180830381865afa158015610890573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108b49190611a22565b101561091b5760405162461bcd60e51b815260206004820152603060248201527f54656c65706f727465725570677261646561626c653a20696e76616c6964205460448201526f32b632b837b93a32b91039b2b73232b960811b6064820152608401610378565b3360009081526020819052604090205460ff16156109945760405162461bcd60e51b815260206004820152603060248201527f54656c65706f727465725570677261646561626c653a2054656c65706f72746560448201526f1c881859191c995cdcc81c185d5cd95960821b6064820152608401610378565b610823848484848080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250610f4792505050565b6109dd610bf3565b6001600160a01b038116610a425760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610378565b61055a81610c4d565b61056f610bf3565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663c07f47d46040518163ffffffff1660e01b8152600401602060405180830381865afa158015610ab3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ad79190611a22565b60015490915081831115610b475760405162461bcd60e51b815260206004820152603160248201527f54656c65706f727465725570677261646561626c653a20696e76616c6964205460448201527032b632b837b93a32b9103b32b939b4b7b760791b6064820152608401610378565b808311610bbc5760405162461bcd60e51b815260206004820152603f60248201527f54656c65706f727465725570677261646561626c653a206e6f7420677265617460448201527f6572207468616e2063757272656e74206d696e696d756d2076657273696f6e006064820152608401610378565b6001839055604051839082907fa9a7ef57e41f05b4c15480842f5f0c27edfcbb553fed281f7c4068452cc1c02d90600090a3505050565b6002546001600160a01b0316331461056f5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610378565b600280546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600260035403610cf15760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610378565b6002600355565b6040516370a0823160e01b815230600482015260009081906001600160a01b038516906370a0823190602401602060405180830381865afa158015610d41573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d659190611a22565b9050610d7c6001600160a01b038516333086611155565b6040516370a0823160e01b81523060048201526000906001600160a01b038616906370a0823190602401602060405180830381865afa158015610dc3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610de79190611a22565b9050818111610e4d5760405162461bcd60e51b815260206004820152602c60248201527f5361666545524332305472616e7366657246726f6d3a2062616c616e6365206e60448201526b1bdd081a5b98dc99585cd95960a21b6064820152608401610378565b610e578282611a51565b925050505b92915050565b604051636eb1769f60e11b81523060048201526001600160a01b038381166024830152600091839186169063dd62ed3e90604401602060405180830381865afa158015610eb3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ed79190611a22565b610ee19190611a64565b6040516001600160a01b03851660248201526044810182905290915061082390859063095ea7b360e01b906064015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b03199093169290921790915261118d565b7f00000000000000000000000000000000000000000000000000000000000000008314610fcb5760405162461bcd60e51b815260206004820152602c60248201527f4e6174697665546f6b656e536f757263653a20696e76616c696420646573746960448201526b3730ba34b7b71031b430b4b760a11b6064820152608401610378565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316826001600160a01b03161461105b5760405162461bcd60e51b815260206004820152602660248201527f4e6174697665546f6b656e536f757263653a20756e617574686f72697a65642060448201526539b2b73232b960d11b6064820152608401610378565b600080828060200190518101906110729190611a77565b9092509050600082600181111561108b5761108b611b25565b036110bc57600080828060200190518101906110a79190611b3b565b915091506110b58282611264565b505061114e565b60018260018111156110d0576110d0611b25565b036110fc576000818060200190518101906110eb9190611a22565b90506110f68161133d565b5061114e565b60405162461bcd60e51b815260206004820152602160248201527f4e6174697665546f6b656e536f757263653a20696e76616c696420616374696f6044820152603760f91b6064820152608401610378565b5050505050565b6040516001600160a01b03808516602483015283166044820152606481018290526108239085906323b872dd60e01b90608401610f10565b60006111e2826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166113689092919063ffffffff16565b80519091501561125f57808060200190518101906112009190611b69565b61125f5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610378565b505050565b6001600160a01b03821661128a5760405162461bcd60e51b815260040161037890611828565b804710156112ed5760405162461bcd60e51b815260206004820152602a60248201527f4e6174697665546f6b656e536f757263653a20696e73756666696369656e742060448201526918dbdb1b185d195c985b60b21b6064820152608401610378565b604080516001600160a01b0384168152602081018390527f55aaef8fd8c07238c3618a93c8a1627194187d3b0952908e58f2ab0f944fb407910160405180910390a1611339828261137f565b5050565b60045481111561055a576000600454826113579190611a51565b905061136281611498565b50600455565b606061137784846000856114d9565b949350505050565b804710156113cf5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e63650000006044820152606401610378565b6000826001600160a01b03168260405160006040518083038185875af1925050503d806000811461141c576040519150601f19603f3d011682016040523d82523d6000602084013e611421565b606091505b505090508061125f5760405162461bcd60e51b815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d617920686176652072657665727465640000000000006064820152608401610378565b6040518181527f2cd3fd70cd5a5d6d805e90d22741aa1a84590ace7cf01b244719558d266143829060200160405180910390a161055a600160981b8261137f565b60608247101561153a5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b6064820152608401610378565b600080866001600160a01b031685876040516115569190611b8b565b60006040518083038185875af1925050503d8060008114611593576040519150601f19603f3d011682016040523d82523d6000602084013e611598565b606091505b50915091506115a9878383876115b4565b979650505050505050565b6060831561162357825160000361161c576001600160a01b0385163b61161c5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610378565b5081611377565b61137783838151156116385781518083602001fd5b8060405162461bcd60e51b81526004016103789190611ba7565b6001600160a01b038116811461055a57600080fd5b60006020828403121561167957600080fd5b813561168481611652565b9392505050565b60006020828403121561169d57600080fd5b5035919050565b60008060008084860360808112156116bb57600080fd5b85356116c681611652565b94506040601f19820112156116da57600080fd5b50602085019250606085013567ffffffffffffffff808211156116fc57600080fd5b818701915087601f83011261171057600080fd5b81358181111561171f57600080fd5b8860208260051b850101111561173457600080fd5b95989497505060200194505050565b6000806000806060858703121561175957600080fd5b84359350602085013561176b81611652565b9250604085013567ffffffffffffffff8082111561178857600080fd5b818701915087601f83011261179c57600080fd5b8135818111156117ab57600080fd5b88602082850101111561173457600080fd5b6020808252602e908201527f54656c65706f727465725570677261646561626c653a207a65726f2054656c6560408201526d706f72746572206164647265737360901b606082015260800190565b60006020828403121561181d57600080fd5b815161168481611652565b60208082526029908201527f4e6174697665546f6b656e536f757263653a207a65726f20726563697069656e60408201526874206164647265737360b81b606082015260800190565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff811182821017156118b0576118b0611871565b604052919050565b6000604082840312156118ca57600080fd5b6040516040810181811067ffffffffffffffff821117156118ed576118ed611871565b60405282356118fb81611652565b81526020928301359281019290925250919050565b600081518084526020808501945080840160005b838110156119495781516001600160a01b031687529582019590820190600101611924565b509495945050505050565b60005b8381101561196f578181015183820152602001611957565b50506000910152565b60008151808452611990816020860160208601611954565b601f01601f19169290920160200192915050565b60208152815160208201526000602083015160018060a01b03808216604085015260408501519150808251166060850152506020810151608084015250606083015160a0830152608083015160e060c0840152611a05610100840182611910565b905060a0840151601f198483030160e0850152610e578282611978565b600060208284031215611a3457600080fd5b5051919050565b634e487b7160e01b600052601160045260246000fd5b81810381811115610e5c57610e5c611a3b565b80820180821115610e5c57610e5c611a3b565b60008060408385031215611a8a57600080fd5b825160028110611a9957600080fd5b602084015190925067ffffffffffffffff80821115611ab757600080fd5b818501915085601f830112611acb57600080fd5b815181811115611add57611add611871565b611af0601f8201601f1916602001611887565b9150808252866020828501011115611b0757600080fd5b611b18816020840160208601611954565b5080925050509250929050565b634e487b7160e01b600052602160045260246000fd5b60008060408385031215611b4e57600080fd5b8251611b5981611652565b6020939093015192949293505050565b600060208284031215611b7b57600080fd5b8151801515811461168457600080fd5b60008251611b9d818460208701611954565b9190910192915050565b602081526000611684602083018461197856fea26469706673582212200081473b80bf9943477af1a418ce19e5fd5ec8e2948badcb9904b579c585a81364736f6c634300081200334e6174697665546f6b656e536f757263653a207a65726f2064657374696e6174", + Bin: "0x60e06040523480156200001157600080fd5b50604051620020473803806200204783398101604081905262000034916200037b565b82806001600160a01b038116620000b85760405162461bcd60e51b815260206004820152603760248201527f54656c65706f727465725570677261646561626c653a207a65726f2074656c6560448201527f706f72746572207265676973747279206164647265737300000000000000000060648201526084015b60405180910390fd5b6001600160a01b03811660808190526040805163301fd1f560e21b8152905163c07f47d4916004808201926020929091908290030181865afa15801562000103573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620001299190620003bc565b6001555062000138336200030c565b50600160035581620001965760405162461bcd60e51b81526020600482015260316024820152600080516020620020278339815191526044820152701a5bdb88189b1bd8dad8da185a5b881251607a1b6064820152608401620000af565b7302000000000000000000000000000000000000056001600160a01b0316634213cf786040518163ffffffff1660e01b8152600401602060405180830381865afa158015620001e9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200020f9190620003bc565b8203620002855760405162461bcd60e51b815260206004820152603560248201527f4e6174697665546f6b656e536f757263653a2063616e6e6f742062726964676560448201527f20776974682073616d6520626c6f636b636861696e00000000000000000000006064820152608401620000af565b60a08290526001600160a01b038116620002f75760405162461bcd60e51b815260206004820152603460248201526000805160206200202783398151915260448201527f696f6e20636f6e747261637420616464726573730000000000000000000000006064820152608401620000af565b6001600160a01b031660c05250620003d69050565b600280546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b80516001600160a01b03811681146200037657600080fd5b919050565b6000806000606084860312156200039157600080fd5b6200039c846200035e565b925060208401519150620003b3604085016200035e565b90509250925092565b600060208284031215620003cf57600080fd5b5051919050565b60805160a05160c051611bf062000437600039600081816102bb015281816106a80152610fcd01526000818161017d015281816106820152610f4901526000818161010a0152818161057d015281816108410152610a570152611bf06000f3fe6080604052600436106100f35760003560e01c8063973142971161008a578063c452165e11610059578063c452165e146102dd578063c868efaa146102f5578063d2cc7a7014610315578063f2fde38b1461032a57600080fd5b80639731429714610236578063ad0aee251461027f578063b6171f7314610292578063b8c9091a146102a957600080fd5b806355db3e9e116100c657806355db3e9e146101cd5780635eb99514146101e3578063715018a6146102035780638da5cb5b1461021857600080fd5b80631a7f5bec146100f85780632b0d8f181461014957806341d3014d1461016b5780634511243e146101ad575b600080fd5b34801561010457600080fd5b5061012c7f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020015b60405180910390f35b34801561015557600080fd5b50610169610164366004611667565b61034a565b005b34801561017757600080fd5b5061019f7f000000000000000000000000000000000000000000000000000000000000000081565b604051908152602001610140565b3480156101b957600080fd5b506101696101c8366004611667565b61044c565b3480156101d957600080fd5b5061019f60045481565b3480156101ef57600080fd5b506101696101fe36600461168b565b610549565b34801561020f57600080fd5b5061016961055d565b34801561022457600080fd5b506002546001600160a01b031661012c565b34801561024257600080fd5b5061026f610251366004611667565b6001600160a01b031660009081526020819052604090205460ff1690565b6040519015158152602001610140565b61016961028d3660046116a4565b610571565b34801561029e57600080fd5b5061019f620186a081565b3480156102b557600080fd5b5061012c7f000000000000000000000000000000000000000000000000000000000000000081565b3480156102e957600080fd5b5061012c600160981b81565b34801561030157600080fd5b50610169610310366004611743565b610829565b34801561032157600080fd5b5060015461019f565b34801561033657600080fd5b50610169610345366004611667565b6109d5565b610352610a4b565b6001600160a01b0381166103815760405162461bcd60e51b8152600401610378906117bd565b60405180910390fd5b6001600160a01b03811660009081526020819052604090205460ff16156104005760405162461bcd60e51b815260206004820152602d60248201527f54656c65706f727465725570677261646561626c653a2061646472657373206160448201526c1b1c9958591e481c185d5cd959609a1b6064820152608401610378565b6001600160a01b038116600081815260208190526040808220805460ff19166001179055517f933f93e57a222e6330362af8b376d0a8725b6901e9a2fb86d00f169702b28a4c9190a250565b610454610a4b565b6001600160a01b03811661047a5760405162461bcd60e51b8152600401610378906117bd565b6001600160a01b03811660009081526020819052604090205460ff166104f45760405162461bcd60e51b815260206004820152602960248201527f54656c65706f727465725570677261646561626c653a2061646472657373206e6044820152681bdd081c185d5cd95960ba1b6064820152608401610378565b6040516001600160a01b038216907f844e2f3154214672229235858fd029d1dfd543901c6d05931f0bc2480a2d72c390600090a26001600160a01b03166000908152602081905260409020805460ff19169055565b610551610a4b565b61055a81610a53565b50565b610565610bf3565b61056f6000610c4d565b565b610579610c9f565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d820e64f6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156105d9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105fd919061180b565b90506001600160a01b0385166106255760405162461bcd60e51b815260040161037890611828565b60006020850135156106645761064b6106416020870187611667565b8660200135610cf8565b905061066461065d6020870187611667565b8383610e62565b6000826001600160a01b031663624488506040518060c001604052807f000000000000000000000000000000000000000000000000000000000000000081526020017f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03168152602001898036038101906106e691906118b8565b8152602001620186a08152602001888880806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250505090825250604051602091820191610755918d913491016001600160a01b03929092168252602082015260400190565b6040516020818303038152906040528152506040518263ffffffff1660e01b815260040161078391906119a4565b6020604051808303816000875af11580156107a2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107c69190611a22565b905080876001600160a01b0316336001600160a01b03167f2b4e8f08417773e367064a6aea9ca2df303a60876676f70b6c3c5e66b314ca5a3460405161080e91815260200190565b60405180910390a45050506108236001600355565b50505050565b60015460405163260f846760e11b81523360048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690634c1f08ce90602401602060405180830381865afa158015610890573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108b49190611a22565b101561091b5760405162461bcd60e51b815260206004820152603060248201527f54656c65706f727465725570677261646561626c653a20696e76616c6964205460448201526f32b632b837b93a32b91039b2b73232b960811b6064820152608401610378565b3360009081526020819052604090205460ff16156109945760405162461bcd60e51b815260206004820152603060248201527f54656c65706f727465725570677261646561626c653a2054656c65706f72746560448201526f1c881859191c995cdcc81c185d5cd95960821b6064820152608401610378565b610823848484848080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250610f4792505050565b6109dd610bf3565b6001600160a01b038116610a425760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610378565b61055a81610c4d565b61056f610bf3565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663c07f47d46040518163ffffffff1660e01b8152600401602060405180830381865afa158015610ab3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ad79190611a22565b60015490915081831115610b475760405162461bcd60e51b815260206004820152603160248201527f54656c65706f727465725570677261646561626c653a20696e76616c6964205460448201527032b632b837b93a32b9103b32b939b4b7b760791b6064820152608401610378565b808311610bbc5760405162461bcd60e51b815260206004820152603f60248201527f54656c65706f727465725570677261646561626c653a206e6f7420677265617460448201527f6572207468616e2063757272656e74206d696e696d756d2076657273696f6e006064820152608401610378565b6001839055604051839082907fa9a7ef57e41f05b4c15480842f5f0c27edfcbb553fed281f7c4068452cc1c02d90600090a3505050565b6002546001600160a01b0316331461056f5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610378565b600280546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600260035403610cf15760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610378565b6002600355565b6040516370a0823160e01b815230600482015260009081906001600160a01b038516906370a0823190602401602060405180830381865afa158015610d41573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d659190611a22565b9050610d7c6001600160a01b038516333086611155565b6040516370a0823160e01b81523060048201526000906001600160a01b038616906370a0823190602401602060405180830381865afa158015610dc3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610de79190611a22565b9050818111610e4d5760405162461bcd60e51b815260206004820152602c60248201527f5361666545524332305472616e7366657246726f6d3a2062616c616e6365206e60448201526b1bdd081a5b98dc99585cd95960a21b6064820152608401610378565b610e578282611a51565b925050505b92915050565b604051636eb1769f60e11b81523060048201526001600160a01b038381166024830152600091839186169063dd62ed3e90604401602060405180830381865afa158015610eb3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ed79190611a22565b610ee19190611a64565b6040516001600160a01b03851660248201526044810182905290915061082390859063095ea7b360e01b906064015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b03199093169290921790915261118d565b7f00000000000000000000000000000000000000000000000000000000000000008314610fcb5760405162461bcd60e51b815260206004820152602c60248201527f4e6174697665546f6b656e536f757263653a20696e76616c696420646573746960448201526b3730ba34b7b71031b430b4b760a11b6064820152608401610378565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316826001600160a01b03161461105b5760405162461bcd60e51b815260206004820152602660248201527f4e6174697665546f6b656e536f757263653a20756e617574686f72697a65642060448201526539b2b73232b960d11b6064820152608401610378565b600080828060200190518101906110729190611a77565b9092509050600082600181111561108b5761108b611b25565b036110bc57600080828060200190518101906110a79190611b3b565b915091506110b58282611264565b505061114e565b60018260018111156110d0576110d0611b25565b036110fc576000818060200190518101906110eb9190611a22565b90506110f68161133d565b5061114e565b60405162461bcd60e51b815260206004820152602160248201527f4e6174697665546f6b656e536f757263653a20696e76616c696420616374696f6044820152603760f91b6064820152608401610378565b5050505050565b6040516001600160a01b03808516602483015283166044820152606481018290526108239085906323b872dd60e01b90608401610f10565b60006111e2826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166113689092919063ffffffff16565b80519091501561125f57808060200190518101906112009190611b69565b61125f5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610378565b505050565b6001600160a01b03821661128a5760405162461bcd60e51b815260040161037890611828565b804710156112ed5760405162461bcd60e51b815260206004820152602a60248201527f4e6174697665546f6b656e536f757263653a20696e73756666696369656e742060448201526918dbdb1b185d195c985b60b21b6064820152608401610378565b604080516001600160a01b0384168152602081018390527f55aaef8fd8c07238c3618a93c8a1627194187d3b0952908e58f2ab0f944fb407910160405180910390a1611339828261137f565b5050565b60045481111561055a576000600454826113579190611a51565b905061136281611498565b50600455565b606061137784846000856114d9565b949350505050565b804710156113cf5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e63650000006044820152606401610378565b6000826001600160a01b03168260405160006040518083038185875af1925050503d806000811461141c576040519150601f19603f3d011682016040523d82523d6000602084013e611421565b606091505b505090508061125f5760405162461bcd60e51b815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d617920686176652072657665727465640000000000006064820152608401610378565b6040518181527f2cd3fd70cd5a5d6d805e90d22741aa1a84590ace7cf01b244719558d266143829060200160405180910390a161055a600160981b8261137f565b60608247101561153a5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b6064820152608401610378565b600080866001600160a01b031685876040516115569190611b8b565b60006040518083038185875af1925050503d8060008114611593576040519150601f19603f3d011682016040523d82523d6000602084013e611598565b606091505b50915091506115a9878383876115b4565b979650505050505050565b6060831561162357825160000361161c576001600160a01b0385163b61161c5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610378565b5081611377565b61137783838151156116385781518083602001fd5b8060405162461bcd60e51b81526004016103789190611ba7565b6001600160a01b038116811461055a57600080fd5b60006020828403121561167957600080fd5b813561168481611652565b9392505050565b60006020828403121561169d57600080fd5b5035919050565b60008060008084860360808112156116bb57600080fd5b85356116c681611652565b94506040601f19820112156116da57600080fd5b50602085019250606085013567ffffffffffffffff808211156116fc57600080fd5b818701915087601f83011261171057600080fd5b81358181111561171f57600080fd5b8860208260051b850101111561173457600080fd5b95989497505060200194505050565b6000806000806060858703121561175957600080fd5b84359350602085013561176b81611652565b9250604085013567ffffffffffffffff8082111561178857600080fd5b818701915087601f83011261179c57600080fd5b8135818111156117ab57600080fd5b88602082850101111561173457600080fd5b6020808252602e908201527f54656c65706f727465725570677261646561626c653a207a65726f2054656c6560408201526d706f72746572206164647265737360901b606082015260800190565b60006020828403121561181d57600080fd5b815161168481611652565b60208082526029908201527f4e6174697665546f6b656e536f757263653a207a65726f20726563697069656e60408201526874206164647265737360b81b606082015260800190565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff811182821017156118b0576118b0611871565b604052919050565b6000604082840312156118ca57600080fd5b6040516040810181811067ffffffffffffffff821117156118ed576118ed611871565b60405282356118fb81611652565b81526020928301359281019290925250919050565b600081518084526020808501945080840160005b838110156119495781516001600160a01b031687529582019590820190600101611924565b509495945050505050565b60005b8381101561196f578181015183820152602001611957565b50506000910152565b60008151808452611990816020860160208601611954565b601f01601f19169290920160200192915050565b60208152815160208201526000602083015160018060a01b03808216604085015260408501519150808251166060850152506020810151608084015250606083015160a0830152608083015160e060c0840152611a05610100840182611910565b905060a0840151601f198483030160e0850152610e578282611978565b600060208284031215611a3457600080fd5b5051919050565b634e487b7160e01b600052601160045260246000fd5b81810381811115610e5c57610e5c611a3b565b80820180821115610e5c57610e5c611a3b565b60008060408385031215611a8a57600080fd5b825160028110611a9957600080fd5b602084015190925067ffffffffffffffff80821115611ab757600080fd5b818501915085601f830112611acb57600080fd5b815181811115611add57611add611871565b611af0601f8201601f1916602001611887565b9150808252866020828501011115611b0757600080fd5b611b18816020840160208601611954565b5080925050509250929050565b634e487b7160e01b600052602160045260246000fd5b60008060408385031215611b4e57600080fd5b8251611b5981611652565b6020939093015192949293505050565b600060208284031215611b7b57600080fd5b8151801515811461168457600080fd5b60008251611b9d818460208701611954565b9190910192915050565b602081526000611684602083018461197856fea2646970667358221220099925bff687b5aa64a1739bc5237b4e6b30e2e53f29c7a3b02b51ae5f11a16964736f6c634300081200334e6174697665546f6b656e536f757263653a207a65726f2064657374696e6174", } // NativeTokenSourceABI is the input ABI used to generate the binding from. From 46d9ed6bd6e3b6a787f2c0abc770be2c30afc02f Mon Sep 17 00:00:00 2001 From: Geoff Stuart Date: Fri, 15 Dec 2023 16:42:32 -0500 Subject: [PATCH 09/12] Add revert cause to test --- .../tests/ERC20TokenSourceTests.t.sol | 17 +++++++++++++++++ .../tests/NativeTokenDestinationTests.t.sol | 8 +++++++- .../tests/NativeTokenSourceTests.t.sol | 8 +++++++- 3 files changed, 31 insertions(+), 2 deletions(-) diff --git a/contracts/src/CrossChainApplications/NativeTokenBridge/tests/ERC20TokenSourceTests.t.sol b/contracts/src/CrossChainApplications/NativeTokenBridge/tests/ERC20TokenSourceTests.t.sol index 39a8592f8..c3d9718bd 100644 --- a/contracts/src/CrossChainApplications/NativeTokenBridge/tests/ERC20TokenSourceTests.t.sol +++ b/contracts/src/CrossChainApplications/NativeTokenBridge/tests/ERC20TokenSourceTests.t.sol @@ -236,6 +236,17 @@ contract ERC20TokenSourceTest is Test { ); } + function testInvalidTeleporterAddress() public { + vm.expectRevert("TeleporterUpgradeable: invalid Teleporter sender"); + + vm.prank(address(0x123)); + erc20TokenSource.receiveTeleporterMessage( + _DEFAULT_OTHER_CHAIN_ID, + _DEFAULT_OTHER_BRIDGE_ADDRESS, + abi.encode(_DEFAULT_RECIPIENT, _DEFAULT_TRANSFER_AMOUNT) + ); + } + function testZeroERC20ContractAddress() public { vm.expectRevert(_formatERC20TokenSourceErrorMessage("zero ERC20 contract address")); @@ -323,6 +334,12 @@ contract ERC20TokenSourceTest is Test { abi.encode(MOCK_TELEPORTER_MESSENGER_ADDRESS) ); + vm.mockCall( + MOCK_TELEPORTER_REGISTRY_ADDRESS, + abi.encodeWithSelector(TeleporterRegistry.getVersionFromAddress.selector), + abi.encode(0) + ); + vm.mockCall( MOCK_TELEPORTER_REGISTRY_ADDRESS, abi.encodeWithSelector(TeleporterRegistry.getLatestTeleporter.selector), diff --git a/contracts/src/CrossChainApplications/NativeTokenBridge/tests/NativeTokenDestinationTests.t.sol b/contracts/src/CrossChainApplications/NativeTokenBridge/tests/NativeTokenDestinationTests.t.sol index d4756a386..d4ec995d6 100644 --- a/contracts/src/CrossChainApplications/NativeTokenBridge/tests/NativeTokenDestinationTests.t.sol +++ b/contracts/src/CrossChainApplications/NativeTokenBridge/tests/NativeTokenDestinationTests.t.sol @@ -284,7 +284,7 @@ contract NativeTokenDestinationTest is Test { } function testInvalidTeleporterAddress() public { - vm.expectRevert(); + vm.expectRevert("TeleporterUpgradeable: invalid Teleporter sender"); vm.prank(address(0x123)); nativeTokenDestination.receiveTeleporterMessage( @@ -383,6 +383,12 @@ contract NativeTokenDestinationTest is Test { abi.encode(MOCK_TELEPORTER_MESSENGER_ADDRESS) ); + vm.mockCall( + MOCK_TELEPORTER_REGISTRY_ADDRESS, + abi.encodeWithSelector(TeleporterRegistry.getVersionFromAddress.selector), + abi.encode(0) + ); + vm.mockCall( MOCK_TELEPORTER_REGISTRY_ADDRESS, abi.encodeWithSelector(TeleporterRegistry.getLatestTeleporter.selector), diff --git a/contracts/src/CrossChainApplications/NativeTokenBridge/tests/NativeTokenSourceTests.t.sol b/contracts/src/CrossChainApplications/NativeTokenBridge/tests/NativeTokenSourceTests.t.sol index 2d2c651a8..63196e7b9 100644 --- a/contracts/src/CrossChainApplications/NativeTokenBridge/tests/NativeTokenSourceTests.t.sol +++ b/contracts/src/CrossChainApplications/NativeTokenBridge/tests/NativeTokenSourceTests.t.sol @@ -228,7 +228,7 @@ contract NativeTokenSourceTest is Test { } function testInvalidTeleporterAddress() public { - vm.expectRevert(); + vm.expectRevert("TeleporterUpgradeable: invalid Teleporter sender"); vm.prank(address(0x123)); nativeTokenSource.receiveTeleporterMessage( @@ -324,6 +324,12 @@ contract NativeTokenSourceTest is Test { abi.encode(1) ); + vm.mockCall( + MOCK_TELEPORTER_REGISTRY_ADDRESS, + abi.encodeWithSelector(TeleporterRegistry.getVersionFromAddress.selector), + abi.encode(0) + ); + vm.mockCall( MOCK_TELEPORTER_REGISTRY_ADDRESS, abi.encodeWithSelector(TeleporterRegistry.getAddressFromVersion.selector, (1)), From d49853083464dd3e9426c5267914a514de288261 Mon Sep 17 00:00:00 2001 From: Geoff Stuart Date: Wed, 20 Dec 2023 09:45:49 -0500 Subject: [PATCH 10/12] Review fixes --- .../NativeTokenBridge/ERC20TokenSource.sol | 4 ++-- .../NativeTokenBridge/NativeTokenDestination.sol | 4 ++-- .../NativeTokenBridge/NativeTokenSource.sol | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/contracts/src/CrossChainApplications/NativeTokenBridge/ERC20TokenSource.sol b/contracts/src/CrossChainApplications/NativeTokenBridge/ERC20TokenSource.sol index 5ba1b8209..d217bf6bc 100644 --- a/contracts/src/CrossChainApplications/NativeTokenBridge/ERC20TokenSource.sol +++ b/contracts/src/CrossChainApplications/NativeTokenBridge/ERC20TokenSource.sol @@ -75,7 +75,7 @@ contract ERC20TokenSource is uint256 feeAmount, address[] calldata allowedRelayerAddresses ) external nonReentrant { - ITeleporterMessenger teleporterMessenger = teleporterRegistry.getLatestTeleporter(); + ITeleporterMessenger teleporterMessenger = _getTeleporterMessenger(); // The recipient cannot be the zero address. require(recipient != address(0), "ERC20TokenSource: zero recipient address"); @@ -118,7 +118,7 @@ contract ERC20TokenSource is } /** - * @dev See {ITeleporterReceiver-receiveTeleporterMessage}. + * @dev See {TeleporterUpgradeable-receiveTeleporterMessage}. * * Receives a Teleporter message and routes to the appropriate internal function call. */ diff --git a/contracts/src/CrossChainApplications/NativeTokenBridge/NativeTokenDestination.sol b/contracts/src/CrossChainApplications/NativeTokenBridge/NativeTokenDestination.sol index 3d584ef6d..c0f36b9be 100644 --- a/contracts/src/CrossChainApplications/NativeTokenBridge/NativeTokenDestination.sol +++ b/contracts/src/CrossChainApplications/NativeTokenBridge/NativeTokenDestination.sol @@ -140,7 +140,7 @@ contract NativeTokenDestination is TeleporterFeeInfo calldata feeInfo, address[] calldata allowedRelayerAddresses ) external { - ITeleporterMessenger teleporterMessenger = teleporterRegistry.getLatestTeleporter(); + ITeleporterMessenger teleporterMessenger = _getTeleporterMessenger(); uint256 totalBurnedTxFees = address(BURNED_TX_FEES_ADDRESS).balance; uint256 messageID = teleporterMessenger.sendCrossChainMessage( @@ -179,7 +179,7 @@ contract NativeTokenDestination is } /** - * @dev See {ITeleporterReceiver-receiveTeleporterMessage}. + * @dev See {TeleporterUpgradeable-receiveTeleporterMessage}. * * Receives a Teleporter message. */ diff --git a/contracts/src/CrossChainApplications/NativeTokenBridge/NativeTokenSource.sol b/contracts/src/CrossChainApplications/NativeTokenBridge/NativeTokenSource.sol index 74e3d0ffb..35b06d674 100644 --- a/contracts/src/CrossChainApplications/NativeTokenBridge/NativeTokenSource.sol +++ b/contracts/src/CrossChainApplications/NativeTokenBridge/NativeTokenSource.sol @@ -69,7 +69,7 @@ contract NativeTokenSource is TeleporterFeeInfo calldata feeInfo, address[] calldata allowedRelayerAddresses ) external payable nonReentrant { - ITeleporterMessenger teleporterMessenger = teleporterRegistry.getLatestTeleporter(); + ITeleporterMessenger teleporterMessenger = _getTeleporterMessenger(); // The recipient cannot be the zero address. require(recipient != address(0), "NativeTokenSource: zero recipient address"); @@ -107,7 +107,7 @@ contract NativeTokenSource is } /** - * @dev See {ITeleporterReceiver-receiveTeleporterMessage}. + * @dev See {TeleporterUpgradeable-receiveTeleporterMessage}. * * Receives a Teleporter message and routes to the appropriate internal function call. */ From edf47be2c2ebcdc2260d9913f09aabc1e0f84b51 Mon Sep 17 00:00:00 2001 From: Geoff Stuart Date: Wed, 20 Dec 2023 09:53:33 -0500 Subject: [PATCH 11/12] Bindings --- .../NativeTokenBridge/ERC20TokenSource/ERC20TokenSource.go | 2 +- .../NativeTokenDestination/NativeTokenDestination.go | 2 +- .../NativeTokenBridge/NativeTokenSource/NativeTokenSource.go | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/abi-bindings/go/CrossChainApplications/NativeTokenBridge/ERC20TokenSource/ERC20TokenSource.go b/abi-bindings/go/CrossChainApplications/NativeTokenBridge/ERC20TokenSource/ERC20TokenSource.go index 087415768..7bc3ef8e1 100644 --- a/abi-bindings/go/CrossChainApplications/NativeTokenBridge/ERC20TokenSource/ERC20TokenSource.go +++ b/abi-bindings/go/CrossChainApplications/NativeTokenBridge/ERC20TokenSource/ERC20TokenSource.go @@ -32,7 +32,7 @@ var ( // ERC20TokenSourceMetaData contains all meta data concerning the ERC20TokenSource contract. var ERC20TokenSourceMetaData = &bind.MetaData{ ABI: "[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"teleporterRegistryAddress\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"destinationBlockchainID_\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"nativeTokenDestinationAddress_\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"erc20ContractAddress_\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"BurnTokens\",\"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\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"teleporterMessageID\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"TransferToDestination\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"UnlockTokens\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"BURNED_TX_FEES_ADDRESS\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"MINT_NATIVE_TOKENS_REQUIRED_GAS\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"destinationBlockchainID\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"destinationBurnedTotal\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"erc20ContractAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"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\":\"nativeTokenDestinationAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"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\":\"originBlockchainID\",\"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\":[],\"name\":\"teleporterRegistry\",\"outputs\":[{\"internalType\":\"contractTeleporterRegistry\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"totalAmount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"feeAmount\",\"type\":\"uint256\"},{\"internalType\":\"address[]\",\"name\":\"allowedRelayerAddresses\",\"type\":\"address[]\"}],\"name\":\"transferToDestination\",\"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: "0x6101006040523480156200001257600080fd5b5060405162001fb438038062001fb48339810160408190526200003591620003f0565b83806001600160a01b038116620000b95760405162461bcd60e51b815260206004820152603760248201527f54656c65706f727465725570677261646561626c653a207a65726f2074656c6560448201527f706f72746572207265676973747279206164647265737300000000000000000060648201526084015b60405180910390fd5b6001600160a01b03811660808190526040805163301fd1f560e21b8152905163c07f47d4916004808201926020929091908290030181865afa15801562000104573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200012a919062000444565b60015550620001393362000381565b50600160035582620001965760405162461bcd60e51b8152602060048201526030602482015260008051602062001f9483398151915260448201526f1bdb88189b1bd8dad8da185a5b88125160821b6064820152608401620000b0565b7302000000000000000000000000000000000000056001600160a01b0316634213cf786040518163ffffffff1660e01b8152600401602060405180830381865afa158015620001e9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200020f919062000444565b8303620002855760405162461bcd60e51b815260206004820152603460248201527f4552433230546f6b656e536f757263653a2063616e6e6f74206272696467652060448201527f776974682073616d6520626c6f636b636861696e0000000000000000000000006064820152608401620000b0565b60a08390526001600160a01b038216620002f75760405162461bcd60e51b8152602060048201526033602482015260008051602062001f9483398151915260448201527f6f6e20636f6e74726163742061646472657373000000000000000000000000006064820152608401620000b0565b6001600160a01b0380831660c05281166200036b5760405162461bcd60e51b815260206004820152602d60248201527f4552433230546f6b656e536f757263653a207a65726f20455243323020636f6e60448201526c7472616374206164647265737360981b6064820152608401620000b0565b6001600160a01b031660e052506200045e915050565b600280546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b80516001600160a01b0381168114620003eb57600080fd5b919050565b600080600080608085870312156200040757600080fd5b6200041285620003d3565b9350602085015192506200042960408601620003d3565b91506200043960608601620003d3565b905092959194509250565b6000602082840312156200045757600080fd5b5051919050565b60805160a05160c05160e051611aa8620004ec60003960008181610291015281816105a801528181610640015281816106f2015281816112fb01526113cf015260008181610244015281816106b8015261100901526000818161016e015281816106920152610f86015260008181610115015281816104f9015281816108780152610a940152611aa86000f3fe608060405234801561001057600080fd5b506004361061010b5760003560e01c80638da5cb5b116100a2578063c452165e11610071578063c452165e14610266578063c868efaa14610271578063d2cc7a7014610284578063e486df151461028c578063f2fde38b146102b357600080fd5b80638da5cb5b146101e857806397314297146101f9578063b6171f7314610235578063b8c9091a1461023f57600080fd5b806355db3e9e116100de57806355db3e9e146101b15780635eb99514146101ba578063715018a6146101cd57806387a2edba146101d557600080fd5b80631a7f5bec146101105780632b0d8f181461015457806341d3014d146101695780634511243e1461019e575b600080fd5b6101377f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020015b60405180910390f35b610167610162366004611587565b6102c6565b005b6101907f000000000000000000000000000000000000000000000000000000000000000081565b60405190815260200161014b565b6101676101ac366004611587565b6103c8565b61019060045481565b6101676101c83660046115ab565b6104c5565b6101676104d9565b6101676101e33660046115c4565b6104ed565b6002546001600160a01b0316610137565b610225610207366004611587565b6001600160a01b031660009081526020819052604090205460ff1690565b604051901515815260200161014b565b610190620186a081565b6101377f000000000000000000000000000000000000000000000000000000000000000081565b610137600160981b81565b61016761027f36600461165d565b610860565b600154610190565b6101377f000000000000000000000000000000000000000000000000000000000000000081565b6101676102c1366004611587565b610a12565b6102ce610a88565b6001600160a01b0381166102fd5760405162461bcd60e51b81526004016102f4906116e6565b60405180910390fd5b6001600160a01b03811660009081526020819052604090205460ff161561037c5760405162461bcd60e51b815260206004820152602d60248201527f54656c65706f727465725570677261646561626c653a2061646472657373206160448201526c1b1c9958591e481c185d5cd959609a1b60648201526084016102f4565b6001600160a01b038116600081815260208190526040808220805460ff19166001179055517f933f93e57a222e6330362af8b376d0a8725b6901e9a2fb86d00f169702b28a4c9190a250565b6103d0610a88565b6001600160a01b0381166103f65760405162461bcd60e51b81526004016102f4906116e6565b6001600160a01b03811660009081526020819052604090205460ff166104705760405162461bcd60e51b815260206004820152602960248201527f54656c65706f727465725570677261646561626c653a2061646472657373206e6044820152681bdd081c185d5cd95960ba1b60648201526084016102f4565b6040516001600160a01b038216907f844e2f3154214672229235858fd029d1dfd543901c6d05931f0bc2480a2d72c390600090a26001600160a01b03166000908152602081905260409020805460ff19169055565b6104cd610a88565b6104d681610a90565b50565b6104e1610c30565b6104eb6000610c8a565b565b6104f5610cdc565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d820e64f6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610555573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105799190611734565b90506001600160a01b0386166105a15760405162461bcd60e51b81526004016102f490611751565b60006105cd7f000000000000000000000000000000000000000000000000000000000000000087610d35565b90508481116106355760405162461bcd60e51b815260206004820152602e60248201527f4552433230546f6b656e536f757263653a20696e73756666696369656e74206160448201526d191a9d5cdd195908185b5bdd5b9d60921b60648201526084016102f4565b8415610666576106667f00000000000000000000000000000000000000000000000000000000000000008387610e9f565b600061067286836117af565b90506000836001600160a01b031663624488506040518060c001604052807f000000000000000000000000000000000000000000000000000000000000000081526020017f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316815260200160405180604001604052807f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031681526020018c8152508152602001620186a08152602001898980806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250505090825250604080516001600160a01b038f166020808301919091529181018890529101906060016040516020818303038152906040528152506040518263ffffffff1660e01b81526004016107b89190611856565b6020604051808303816000875af11580156107d7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107fb91906118d4565b905080896001600160a01b0316336001600160a01b03167f2b4e8f08417773e367064a6aea9ca2df303a60876676f70b6c3c5e66b314ca5a8560405161084391815260200190565b60405180910390a4505050506108596001600355565b5050505050565b60015460405163260f846760e11b81523360048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690634c1f08ce90602401602060405180830381865afa1580156108c7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108eb91906118d4565b10156109525760405162461bcd60e51b815260206004820152603060248201527f54656c65706f727465725570677261646561626c653a20696e76616c6964205460448201526f32b632b837b93a32b91039b2b73232b960811b60648201526084016102f4565b3360009081526020819052604090205460ff16156109cb5760405162461bcd60e51b815260206004820152603060248201527f54656c65706f727465725570677261646561626c653a2054656c65706f72746560448201526f1c881859191c995cdcc81c185d5cd95960821b60648201526084016102f4565b610a0c848484848080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250610f8492505050565b50505050565b610a1a610c30565b6001600160a01b038116610a7f5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016102f4565b6104d681610c8a565b6104eb610c30565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663c07f47d46040518163ffffffff1660e01b8152600401602060405180830381865afa158015610af0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b1491906118d4565b60015490915081831115610b845760405162461bcd60e51b815260206004820152603160248201527f54656c65706f727465725570677261646561626c653a20696e76616c6964205460448201527032b632b837b93a32b9103b32b939b4b7b760791b60648201526084016102f4565b808311610bf95760405162461bcd60e51b815260206004820152603f60248201527f54656c65706f727465725570677261646561626c653a206e6f7420677265617460448201527f6572207468616e2063757272656e74206d696e696d756d2076657273696f6e0060648201526084016102f4565b6001839055604051839082907fa9a7ef57e41f05b4c15480842f5f0c27edfcbb553fed281f7c4068452cc1c02d90600090a3505050565b6002546001600160a01b031633146104eb5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016102f4565b600280546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600260035403610d2e5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016102f4565b6002600355565b6040516370a0823160e01b815230600482015260009081906001600160a01b038516906370a0823190602401602060405180830381865afa158015610d7e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610da291906118d4565b9050610db96001600160a01b03851633308661117f565b6040516370a0823160e01b81523060048201526000906001600160a01b038616906370a0823190602401602060405180830381865afa158015610e00573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e2491906118d4565b9050818111610e8a5760405162461bcd60e51b815260206004820152602c60248201527f5361666545524332305472616e7366657246726f6d3a2062616c616e6365206e60448201526b1bdd081a5b98dc99585cd95960a21b60648201526084016102f4565b610e9482826117af565b925050505b92915050565b604051636eb1769f60e11b81523060048201526001600160a01b038381166024830152600091839186169063dd62ed3e90604401602060405180830381865afa158015610ef0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f1491906118d4565b610f1e91906118ed565b6040516001600160a01b038516602482015260448101829052909150610a0c90859063095ea7b360e01b906064015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b0319909316929092179091526111b7565b7f000000000000000000000000000000000000000000000000000000000000000083146110075760405162461bcd60e51b815260206004820152602b60248201527f4552433230546f6b656e536f757263653a20696e76616c69642064657374696e60448201526a30ba34b7b71031b430b4b760a91b60648201526084016102f4565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316826001600160a01b0316146110965760405162461bcd60e51b815260206004820152602560248201527f4552433230546f6b656e536f757263653a20756e617574686f72697a6564207360448201526432b73232b960d91b60648201526084016102f4565b600080828060200190518101906110ad9190611916565b909250905060008260018111156110c6576110c66119dd565b036110f757600080828060200190518101906110e291906119f3565b915091506110f0828261128e565b5050610859565b600182600181111561110b5761110b6119dd565b036111375760008180602001905181019061112691906118d4565b905061113181611325565b50610859565b60405162461bcd60e51b815260206004820181905260248201527f4552433230546f6b656e536f757263653a20696e76616c696420616374696f6e60448201526064016102f4565b6040516001600160a01b0380851660248301528316604482015260648101829052610a0c9085906323b872dd60e01b90608401610f4d565b600061120c826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166113509092919063ffffffff16565b805190915015611289578080602001905181019061122a9190611a21565b6112895760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b60648201526084016102f4565b505050565b6001600160a01b0382166112b45760405162461bcd60e51b81526004016102f490611751565b604080516001600160a01b0384168152602081018390527f55aaef8fd8c07238c3618a93c8a1627194187d3b0952908e58f2ab0f944fb407910160405180910390a16113217f00000000000000000000000000000000000000000000000000000000000000008383611367565b5050565b6004548111156104d65760006004548261133f91906117af565b905061134a81611397565b50600455565b606061135f84846000856113f9565b949350505050565b6040516001600160a01b03831660248201526044810182905261128990849063a9059cbb60e01b90606401610f4d565b6040518181527f2cd3fd70cd5a5d6d805e90d22741aa1a84590ace7cf01b244719558d266143829060200160405180910390a16104d67f0000000000000000000000000000000000000000000000000000000000000000600160981b83611367565b60608247101561145a5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b60648201526084016102f4565b600080866001600160a01b031685876040516114769190611a43565b60006040518083038185875af1925050503d80600081146114b3576040519150601f19603f3d011682016040523d82523d6000602084013e6114b8565b606091505b50915091506114c9878383876114d4565b979650505050505050565b6060831561154357825160000361153c576001600160a01b0385163b61153c5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016102f4565b508161135f565b61135f83838151156115585781518083602001fd5b8060405162461bcd60e51b81526004016102f49190611a5f565b6001600160a01b03811681146104d657600080fd5b60006020828403121561159957600080fd5b81356115a481611572565b9392505050565b6000602082840312156115bd57600080fd5b5035919050565b6000806000806000608086880312156115dc57600080fd5b85356115e781611572565b94506020860135935060408601359250606086013567ffffffffffffffff8082111561161257600080fd5b818801915088601f83011261162657600080fd5b81358181111561163557600080fd5b8960208260051b850101111561164a57600080fd5b9699959850939650602001949392505050565b6000806000806060858703121561167357600080fd5b84359350602085013561168581611572565b9250604085013567ffffffffffffffff808211156116a257600080fd5b818701915087601f8301126116b657600080fd5b8135818111156116c557600080fd5b8860208285010111156116d757600080fd5b95989497505060200194505050565b6020808252602e908201527f54656c65706f727465725570677261646561626c653a207a65726f2054656c6560408201526d706f72746572206164647265737360901b606082015260800190565b60006020828403121561174657600080fd5b81516115a481611572565b60208082526028908201527f4552433230546f6b656e536f757263653a207a65726f20726563697069656e74604082015267206164647265737360c01b606082015260800190565b634e487b7160e01b600052601160045260246000fd5b81810381811115610e9957610e99611799565b600081518084526020808501945080840160005b838110156117fb5781516001600160a01b0316875295820195908201906001016117d6565b509495945050505050565b60005b83811015611821578181015183820152602001611809565b50506000910152565b60008151808452611842816020860160208601611806565b601f01601f19169290920160200192915050565b60208152815160208201526000602083015160018060a01b03808216604085015260408501519150808251166060850152506020810151608084015250606083015160a0830152608083015160e060c08401526118b76101008401826117c2565b905060a0840151601f198483030160e0850152610e94828261182a565b6000602082840312156118e657600080fd5b5051919050565b80820180821115610e9957610e99611799565b634e487b7160e01b600052604160045260246000fd5b6000806040838503121561192957600080fd5b82516002811061193857600080fd5b602084015190925067ffffffffffffffff8082111561195657600080fd5b818501915085601f83011261196a57600080fd5b81518181111561197c5761197c611900565b604051601f8201601f19908116603f011681019083821181831017156119a4576119a4611900565b816040528281528860208487010111156119bd57600080fd5b6119ce836020830160208801611806565b80955050505050509250929050565b634e487b7160e01b600052602160045260246000fd5b60008060408385031215611a0657600080fd5b8251611a1181611572565b6020939093015192949293505050565b600060208284031215611a3357600080fd5b815180151581146115a457600080fd5b60008251611a55818460208701611806565b9190910192915050565b6020815260006115a4602083018461182a56fea2646970667358221220c63649f32f739ed261ca17987c50e6b522b7841640d709cf118adc31d461e54264736f6c634300081200334552433230546f6b656e536f757263653a207a65726f2064657374696e617469", + Bin: "0x6101006040523480156200001257600080fd5b506040516200200a3803806200200a8339810160408190526200003591620003f0565b83806001600160a01b038116620000b95760405162461bcd60e51b815260206004820152603760248201527f54656c65706f727465725570677261646561626c653a207a65726f2074656c6560448201527f706f72746572207265676973747279206164647265737300000000000000000060648201526084015b60405180910390fd5b6001600160a01b03811660808190526040805163301fd1f560e21b8152905163c07f47d4916004808201926020929091908290030181865afa15801562000104573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200012a919062000444565b60015550620001393362000381565b50600160035582620001965760405162461bcd60e51b8152602060048201526030602482015260008051602062001fea83398151915260448201526f1bdb88189b1bd8dad8da185a5b88125160821b6064820152608401620000b0565b7302000000000000000000000000000000000000056001600160a01b0316634213cf786040518163ffffffff1660e01b8152600401602060405180830381865afa158015620001e9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200020f919062000444565b8303620002855760405162461bcd60e51b815260206004820152603460248201527f4552433230546f6b656e536f757263653a2063616e6e6f74206272696467652060448201527f776974682073616d6520626c6f636b636861696e0000000000000000000000006064820152608401620000b0565b60a08390526001600160a01b038216620002f75760405162461bcd60e51b8152602060048201526033602482015260008051602062001fea83398151915260448201527f6f6e20636f6e74726163742061646472657373000000000000000000000000006064820152608401620000b0565b6001600160a01b0380831660c05281166200036b5760405162461bcd60e51b815260206004820152602d60248201527f4552433230546f6b656e536f757263653a207a65726f20455243323020636f6e60448201526c7472616374206164647265737360981b6064820152608401620000b0565b6001600160a01b031660e052506200045e915050565b600280546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b80516001600160a01b0381168114620003eb57600080fd5b919050565b600080600080608085870312156200040757600080fd5b6200041285620003d3565b9350602085015192506200042960408601620003d3565b91506200043960608601620003d3565b905092959194509250565b6000602082840312156200045757600080fd5b5051919050565b60805160a05160c05160e051611afe620004ec60003960008181610278015281816104ef015281816105870152818161063901528181611351015261142501526000818161022b015281816105ff015261105f01526000818161016e015281816105d90152610fdc015260008181610115015281816107dd015281816109ef0152610c950152611afe6000f3fe608060405234801561001057600080fd5b506004361061010b5760003560e01c80638da5cb5b116100a2578063c452165e11610071578063c452165e1461024d578063c868efaa14610258578063d2cc7a701461026b578063e486df1514610273578063f2fde38b1461029a57600080fd5b80638da5cb5b146101e857806397314297146101f9578063b6171f731461021c578063b8c9091a1461022657600080fd5b806355db3e9e116100de57806355db3e9e146101b15780635eb99514146101ba578063715018a6146101cd57806387a2edba146101d557600080fd5b80631a7f5bec146101105780632b0d8f181461015457806341d3014d146101695780634511243e1461019e575b600080fd5b6101377f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020015b60405180910390f35b6101676101623660046115dd565b6102ad565b005b6101907f000000000000000000000000000000000000000000000000000000000000000081565b60405190815260200161014b565b6101676101ac3660046115dd565b61039c565b61019060045481565b6101676101c8366004611601565b610486565b61016761049a565b6101676101e336600461161a565b6104ae565b6002546001600160a01b0316610137565b61020c6102073660046115dd565b6107a7565b604051901515815260200161014b565b610190620186a081565b6101377f000000000000000000000000000000000000000000000000000000000000000081565b610137600160981b81565b6101676102663660046116b3565b6107c5565b600154610190565b6101377f000000000000000000000000000000000000000000000000000000000000000081565b6101676102a83660046115dd565b61096d565b6102b56109e3565b6001600160a01b0381166102e45760405162461bcd60e51b81526004016102db9061173c565b60405180910390fd5b6102ed816107a7565b156103505760405162461bcd60e51b815260206004820152602d60248201527f54656c65706f727465725570677261646561626c653a2061646472657373206160448201526c1b1c9958591e481c185d5cd959609a1b60648201526084016102db565b6001600160a01b038116600081815260208190526040808220805460ff19166001179055517f933f93e57a222e6330362af8b376d0a8725b6901e9a2fb86d00f169702b28a4c9190a250565b6103a46109e3565b6001600160a01b0381166103ca5760405162461bcd60e51b81526004016102db9061173c565b6103d3816107a7565b6104315760405162461bcd60e51b815260206004820152602960248201527f54656c65706f727465725570677261646561626c653a2061646472657373206e6044820152681bdd081c185d5cd95960ba1b60648201526084016102db565b6040516001600160a01b038216907f844e2f3154214672229235858fd029d1dfd543901c6d05931f0bc2480a2d72c390600090a26001600160a01b03166000908152602081905260409020805460ff19169055565b61048e6109e3565b610497816109eb565b50565b6104a2610b8b565b6104ac6000610be5565b565b6104b6610c37565b60006104c0610c90565b90506001600160a01b0386166104e85760405162461bcd60e51b81526004016102db9061178a565b60006105147f000000000000000000000000000000000000000000000000000000000000000087610d8b565b905084811161057c5760405162461bcd60e51b815260206004820152602e60248201527f4552433230546f6b656e536f757263653a20696e73756666696369656e74206160448201526d191a9d5cdd195908185b5bdd5b9d60921b60648201526084016102db565b84156105ad576105ad7f00000000000000000000000000000000000000000000000000000000000000008387610ef5565b60006105b986836117e8565b90506000836001600160a01b031663624488506040518060c001604052807f000000000000000000000000000000000000000000000000000000000000000081526020017f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316815260200160405180604001604052807f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031681526020018c8152508152602001620186a08152602001898980806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250505090825250604080516001600160a01b038f166020808301919091529181018890529101906060016040516020818303038152906040528152506040518263ffffffff1660e01b81526004016106ff919061188f565b6020604051808303816000875af115801561071e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610742919061190d565b905080896001600160a01b0316336001600160a01b03167f2b4e8f08417773e367064a6aea9ca2df303a60876676f70b6c3c5e66b314ca5a8560405161078a91815260200190565b60405180910390a4505050506107a06001600355565b5050505050565b6001600160a01b031660009081526020819052604090205460ff1690565b60015460405163260f846760e11b81523360048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690634c1f08ce90602401602060405180830381865afa15801561082c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610850919061190d565b10156108b75760405162461bcd60e51b815260206004820152603060248201527f54656c65706f727465725570677261646561626c653a20696e76616c6964205460448201526f32b632b837b93a32b91039b2b73232b960811b60648201526084016102db565b6108c0336107a7565b156109265760405162461bcd60e51b815260206004820152603060248201527f54656c65706f727465725570677261646561626c653a2054656c65706f72746560448201526f1c881859191c995cdcc81c185d5cd95960821b60648201526084016102db565b610967848484848080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250610fda92505050565b50505050565b610975610b8b565b6001600160a01b0381166109da5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016102db565b61049781610be5565b6104ac610b8b565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663c07f47d46040518163ffffffff1660e01b8152600401602060405180830381865afa158015610a4b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a6f919061190d565b60015490915081831115610adf5760405162461bcd60e51b815260206004820152603160248201527f54656c65706f727465725570677261646561626c653a20696e76616c6964205460448201527032b632b837b93a32b9103b32b939b4b7b760791b60648201526084016102db565b808311610b545760405162461bcd60e51b815260206004820152603f60248201527f54656c65706f727465725570677261646561626c653a206e6f7420677265617460448201527f6572207468616e2063757272656e74206d696e696d756d2076657273696f6e0060648201526084016102db565b6001839055604051839082907fa9a7ef57e41f05b4c15480842f5f0c27edfcbb553fed281f7c4068452cc1c02d90600090a3505050565b6002546001600160a01b031633146104ac5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016102db565b600280546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600260035403610c895760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016102db565b6002600355565b6000807f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d820e64f6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610cf1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d159190611926565b9050610d20816107a7565b15610d865760405162461bcd60e51b815260206004820152603060248201527f54656c65706f727465725570677261646561626c653a2054656c65706f72746560448201526f1c881cd95b991a5b99c81c185d5cd95960821b60648201526084016102db565b919050565b6040516370a0823160e01b815230600482015260009081906001600160a01b038516906370a0823190602401602060405180830381865afa158015610dd4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610df8919061190d565b9050610e0f6001600160a01b0385163330866111d5565b6040516370a0823160e01b81523060048201526000906001600160a01b038616906370a0823190602401602060405180830381865afa158015610e56573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e7a919061190d565b9050818111610ee05760405162461bcd60e51b815260206004820152602c60248201527f5361666545524332305472616e7366657246726f6d3a2062616c616e6365206e60448201526b1bdd081a5b98dc99585cd95960a21b60648201526084016102db565b610eea82826117e8565b925050505b92915050565b604051636eb1769f60e11b81523060048201526001600160a01b038381166024830152600091839186169063dd62ed3e90604401602060405180830381865afa158015610f46573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f6a919061190d565b610f749190611943565b6040516001600160a01b03851660248201526044810182905290915061096790859063095ea7b360e01b906064015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b03199093169290921790915261120d565b7f0000000000000000000000000000000000000000000000000000000000000000831461105d5760405162461bcd60e51b815260206004820152602b60248201527f4552433230546f6b656e536f757263653a20696e76616c69642064657374696e60448201526a30ba34b7b71031b430b4b760a91b60648201526084016102db565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316826001600160a01b0316146110ec5760405162461bcd60e51b815260206004820152602560248201527f4552433230546f6b656e536f757263653a20756e617574686f72697a6564207360448201526432b73232b960d91b60648201526084016102db565b60008082806020019051810190611103919061196c565b9092509050600082600181111561111c5761111c611a33565b0361114d57600080828060200190518101906111389190611a49565b9150915061114682826112e4565b50506107a0565b600182600181111561116157611161611a33565b0361118d5760008180602001905181019061117c919061190d565b90506111878161137b565b506107a0565b60405162461bcd60e51b815260206004820181905260248201527f4552433230546f6b656e536f757263653a20696e76616c696420616374696f6e60448201526064016102db565b6040516001600160a01b03808516602483015283166044820152606481018290526109679085906323b872dd60e01b90608401610fa3565b6000611262826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166113a69092919063ffffffff16565b8051909150156112df57808060200190518101906112809190611a77565b6112df5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b60648201526084016102db565b505050565b6001600160a01b03821661130a5760405162461bcd60e51b81526004016102db9061178a565b604080516001600160a01b0384168152602081018390527f55aaef8fd8c07238c3618a93c8a1627194187d3b0952908e58f2ab0f944fb407910160405180910390a16113777f000000000000000000000000000000000000000000000000000000000000000083836113bd565b5050565b6004548111156104975760006004548261139591906117e8565b90506113a0816113ed565b50600455565b60606113b5848460008561144f565b949350505050565b6040516001600160a01b0383166024820152604481018290526112df90849063a9059cbb60e01b90606401610fa3565b6040518181527f2cd3fd70cd5a5d6d805e90d22741aa1a84590ace7cf01b244719558d266143829060200160405180910390a16104977f0000000000000000000000000000000000000000000000000000000000000000600160981b836113bd565b6060824710156114b05760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b60648201526084016102db565b600080866001600160a01b031685876040516114cc9190611a99565b60006040518083038185875af1925050503d8060008114611509576040519150601f19603f3d011682016040523d82523d6000602084013e61150e565b606091505b509150915061151f8783838761152a565b979650505050505050565b60608315611599578251600003611592576001600160a01b0385163b6115925760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016102db565b50816113b5565b6113b583838151156115ae5781518083602001fd5b8060405162461bcd60e51b81526004016102db9190611ab5565b6001600160a01b038116811461049757600080fd5b6000602082840312156115ef57600080fd5b81356115fa816115c8565b9392505050565b60006020828403121561161357600080fd5b5035919050565b60008060008060006080868803121561163257600080fd5b853561163d816115c8565b94506020860135935060408601359250606086013567ffffffffffffffff8082111561166857600080fd5b818801915088601f83011261167c57600080fd5b81358181111561168b57600080fd5b8960208260051b85010111156116a057600080fd5b9699959850939650602001949392505050565b600080600080606085870312156116c957600080fd5b8435935060208501356116db816115c8565b9250604085013567ffffffffffffffff808211156116f857600080fd5b818701915087601f83011261170c57600080fd5b81358181111561171b57600080fd5b88602082850101111561172d57600080fd5b95989497505060200194505050565b6020808252602e908201527f54656c65706f727465725570677261646561626c653a207a65726f2054656c6560408201526d706f72746572206164647265737360901b606082015260800190565b60208082526028908201527f4552433230546f6b656e536f757263653a207a65726f20726563697069656e74604082015267206164647265737360c01b606082015260800190565b634e487b7160e01b600052601160045260246000fd5b81810381811115610eef57610eef6117d2565b600081518084526020808501945080840160005b838110156118345781516001600160a01b03168752958201959082019060010161180f565b509495945050505050565b60005b8381101561185a578181015183820152602001611842565b50506000910152565b6000815180845261187b81602086016020860161183f565b601f01601f19169290920160200192915050565b60208152815160208201526000602083015160018060a01b03808216604085015260408501519150808251166060850152506020810151608084015250606083015160a0830152608083015160e060c08401526118f06101008401826117fb565b905060a0840151601f198483030160e0850152610eea8282611863565b60006020828403121561191f57600080fd5b5051919050565b60006020828403121561193857600080fd5b81516115fa816115c8565b80820180821115610eef57610eef6117d2565b634e487b7160e01b600052604160045260246000fd5b6000806040838503121561197f57600080fd5b82516002811061198e57600080fd5b602084015190925067ffffffffffffffff808211156119ac57600080fd5b818501915085601f8301126119c057600080fd5b8151818111156119d2576119d2611956565b604051601f8201601f19908116603f011681019083821181831017156119fa576119fa611956565b81604052828152886020848701011115611a1357600080fd5b611a2483602083016020880161183f565b80955050505050509250929050565b634e487b7160e01b600052602160045260246000fd5b60008060408385031215611a5c57600080fd5b8251611a67816115c8565b6020939093015192949293505050565b600060208284031215611a8957600080fd5b815180151581146115fa57600080fd5b60008251611aab81846020870161183f565b9190910192915050565b6020815260006115fa602083018461186356fea26469706673582212208b2ee6b5f288ef46d93d19f77e5670672b703e7f30ec14e15c6cef480a5ab85264736f6c634300081200334552433230546f6b656e536f757263653a207a65726f2064657374696e617469", } // ERC20TokenSourceABI is the input ABI used to generate the binding from. diff --git a/abi-bindings/go/CrossChainApplications/NativeTokenBridge/NativeTokenDestination/NativeTokenDestination.go b/abi-bindings/go/CrossChainApplications/NativeTokenBridge/NativeTokenDestination/NativeTokenDestination.go index 2af027474..815af9cdd 100644 --- a/abi-bindings/go/CrossChainApplications/NativeTokenBridge/NativeTokenDestination/NativeTokenDestination.go +++ b/abi-bindings/go/CrossChainApplications/NativeTokenBridge/NativeTokenDestination/NativeTokenDestination.go @@ -38,7 +38,7 @@ type TeleporterFeeInfo struct { // NativeTokenDestinationMetaData contains all meta data concerning the NativeTokenDestination contract. var NativeTokenDestinationMetaData = &bind.MetaData{ ABI: "[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"teleporterRegistryAddress\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"sourceBlockchainID_\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"nativeTokenSourceAddress_\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"initialReserveImbalance_\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"remaining\",\"type\":\"uint256\"}],\"name\":\"CollateralAdded\",\"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\":\"recipient\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"NativeTokensMinted\",\"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\":\"uint256\",\"name\":\"teleporterMessageID\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"burnAddressBalance\",\"type\":\"uint256\"}],\"name\":\"ReportTotalBurnedTxFees\",\"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\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"teleporterMessageID\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"TransferToSource\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"BURNED_TX_FEES_ADDRESS\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"BURN_FOR_TRANSFER_ADDRESS\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"REPORT_BURNED_TOKENS_REQUIRED_GAS\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"TRANSFER_NATIVE_TOKENS_REQUIRED_GAS\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"currentReserveImbalance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getMinTeleporterVersion\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"initialReserveImbalance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"isCollateralized\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"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\":\"nativeTokenSourceAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"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\":\"originBlockchainID\",\"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\":\"address\",\"name\":\"feeTokenAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"internalType\":\"structTeleporterFeeInfo\",\"name\":\"feeInfo\",\"type\":\"tuple\"},{\"internalType\":\"address[]\",\"name\":\"allowedRelayerAddresses\",\"type\":\"address[]\"}],\"name\":\"reportTotalBurnedTxFees\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sourceBlockchainID\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"teleporterRegistry\",\"outputs\":[{\"internalType\":\"contractTeleporterRegistry\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalMinted\",\"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\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"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\":\"transferToSource\",\"outputs\":[],\"stateMutability\":\"payable\",\"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: "0x61012060405273020000000000000000000000000000000000000160a0523480156200002a57600080fd5b506040516200252c3803806200252c8339810160408190526200004d9162000418565b83806001600160a01b038116620000d15760405162461bcd60e51b815260206004820152603760248201527f54656c65706f727465725570677261646561626c653a207a65726f2074656c6560448201527f706f72746572207265676973747279206164647265737300000000000000000060648201526084015b60405180910390fd5b6001600160a01b03811660808190526040805163301fd1f560e21b8152905163c07f47d4916004808201926020929091908290030181865afa1580156200011c573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000142919062000461565b600155506200015133620003a9565b50600160035582620001af5760405162461bcd60e51b815260206004820152603160248201526000805160206200250c8339815191526044820152701c98d948189b1bd8dad8da185a5b881251607a1b6064820152608401620000c8565b7302000000000000000000000000000000000000056001600160a01b0316634213cf786040518163ffffffff1660e01b8152600401602060405180830381865afa15801562000202573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000228919062000461565b83036200029e5760405162461bcd60e51b815260206004820152603a60248201527f4e6174697665546f6b656e44657374696e6174696f6e3a2063616e6e6f74206260448201527f726964676520776974682073616d6520626c6f636b636861696e0000000000006064820152608401620000c8565b60c08390526001600160a01b038216620003105760405162461bcd60e51b815260206004820152603460248201526000805160206200250c83398151915260448201527f72636520636f6e747261637420616464726573730000000000000000000000006064820152608401620000c8565b6001600160a01b03821660e0526000819003620003965760405162461bcd60e51b815260206004820152603660248201527f4e6174697665546f6b656e44657374696e6174696f6e3a207a65726f20696e6960448201527f7469616c207265736572766520696d62616c616e6365000000000000000000006064820152608401620000c8565b610100819052600455506200047b915050565b600280546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b80516001600160a01b03811681146200041357600080fd5b919050565b600080600080608085870312156200042f57600080fd5b6200043a85620003fb565b9350602085015192506200045160408601620003fb565b6060959095015193969295505050565b6000602082840312156200047457600080fd5b5051919050565b60805160a05160c05160e05161010051611fff6200050d6000396000818161031401526104620152600081816102980152818161068001528181610abf015261151f0152600081816101e00152818161065a01528181610a99015261149b01526000611798015260008181610194015281816105a70152818161091601528181610c750152610e8b0152611fff6000f3fe60806040526004361061013f5760003560e01c806375846562116100b6578063ab2852301161006f578063ab285230146103be578063c452165e146103d5578063c868efaa146103ed578063d2cc7a701461040d578063d3095126146103be578063f2fde38b1461042257600080fd5b806375846562146102ef5780638ac7dd20146103025780638da5cb5b146103365780639731429714610354578063a2309ff81461038d578063a2a95017146103a357600080fd5b80633a94fe51116101085780633a94fe51146102245780634511243e1461024457806349e3284e146102645780635d93f9af146102865780635eb99514146102ba578063715018a6146102da57600080fd5b8062d872ae1461014457806318160ddd1461016d5780631a7f5bec1461018257806329b7b3fd146101ce5780632b0d8f1814610202575b600080fd5b34801561015057600080fd5b5061015a60045481565b6040519081526020015b60405180910390f35b34801561017957600080fd5b5061015a610442565b34801561018e57600080fd5b506101b67f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b039091168152602001610164565b3480156101da57600080fd5b5061015a7f000000000000000000000000000000000000000000000000000000000000000081565b34801561020e57600080fd5b5061022261021d366004611aab565b6104a1565b005b34801561023057600080fd5b5061022261023f366004611b33565b6105a3565b34801561025057600080fd5b5061022261025f366004611aab565b6107e5565b34801561027057600080fd5b50600454155b6040519015158152602001610164565b34801561029257600080fd5b506101b67f000000000000000000000000000000000000000000000000000000000000000081565b3480156102c657600080fd5b506102226102d5366004611b87565b6108e2565b3480156102e657600080fd5b506102226108f6565b6102226102fd366004611ba0565b61090a565b34801561030e57600080fd5b5061015a7f000000000000000000000000000000000000000000000000000000000000000081565b34801561034257600080fd5b506002546001600160a01b03166101b6565b34801561036057600080fd5b5061027661036f366004611aab565b6001600160a01b031660009081526020819052604090205460ff1690565b34801561039957600080fd5b5061015a60055481565b3480156103af57600080fd5b506101b66001600160981b0181565b3480156103ca57600080fd5b5061015a620186a081565b3480156103e157600080fd5b506101b6600160981b81565b3480156103f957600080fd5b50610222610408366004611c04565b610c5d565b34801561041957600080fd5b5060015461015a565b34801561042e57600080fd5b5061022261043d366004611aab565b610e09565b60008061045c6001600160981b0131600160981b31611ca3565b905060007f000000000000000000000000000000000000000000000000000000000000000060055461048e9190611ca3565b905061049a8282611cb6565b9250505090565b6104a9610e7f565b6001600160a01b0381166104d85760405162461bcd60e51b81526004016104cf90611cc9565b60405180910390fd5b6001600160a01b03811660009081526020819052604090205460ff16156105575760405162461bcd60e51b815260206004820152602d60248201527f54656c65706f727465725570677261646561626c653a2061646472657373206160448201526c1b1c9958591e481c185d5cd959609a1b60648201526084016104cf565b6001600160a01b038116600081815260208190526040808220805460ff19166001179055517f933f93e57a222e6330362af8b376d0a8725b6901e9a2fb86d00f169702b28a4c9190a250565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d820e64f6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610603573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106279190611d17565b90506000600160981b6001600160a01b03163190506000826001600160a01b031663624488506040518060c001604052807f000000000000000000000000000000000000000000000000000000000000000081526020017f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03168152602001898036038101906106be9190611d34565b8152602001620186a081526020018888808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152505050908252506040805160208082018990528251808303820181528284019093529092019161073091600191606001611dea565b6040516020818303038152906040528152506040518263ffffffff1660e01b815260040161075e9190611e65565b6020604051808303816000875af115801561077d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107a19190611ee3565b9050807f2550fa6041684d40e635e29e93dde9017d70c25b46aa88393317b5182ed6ae7c836040516107d591815260200190565b60405180910390a2505050505050565b6107ed610e7f565b6001600160a01b0381166108135760405162461bcd60e51b81526004016104cf90611cc9565b6001600160a01b03811660009081526020819052604090205460ff1661088d5760405162461bcd60e51b815260206004820152602960248201527f54656c65706f727465725570677261646561626c653a2061646472657373206e6044820152681bdd081c185d5cd95960ba1b60648201526084016104cf565b6040516001600160a01b038216907f844e2f3154214672229235858fd029d1dfd543901c6d05931f0bc2480a2d72c390600090a26001600160a01b03166000908152602081905260409020805460ff19169055565b6108ea610e7f565b6108f381610e87565b50565b6108fe611027565b6109086000611081565b565b6109126110d3565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d820e64f6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610972573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109969190611d17565b90506001600160a01b0385166109be5760405162461bcd60e51b81526004016104cf90611efc565b60045415610a2b5760405162461bcd60e51b815260206004820152603460248201527f4e6174697665546f6b656e44657374696e6174696f6e3a20636f6e7472616374604482015273081d5b99195c98dbdb1b185d195c985b1a5e995960621b60648201526084016104cf565b6000602085013515610a6a57610a51610a476020870187611aab565b866020013561112c565b9050610a6a610a636020870187611aab565b8383611296565b610a7b6001600160981b013461137b565b6000826001600160a01b031663624488506040518060c001604052807f000000000000000000000000000000000000000000000000000000000000000081526020017f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316815260200189803603810190610afd9190611d34565b8152602001620186a0815260200188888080602002602001604051908101604052809392919081815260200183836020028082843760009201829052509385525050604051602093840193610b6b92508e913491016001600160a01b03929092168252602082015260400190565b60408051601f1981840301815290829052610b899291602001611dea565b6040516020818303038152906040528152506040518263ffffffff1660e01b8152600401610bb79190611e65565b6020604051808303816000875af1158015610bd6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610bfa9190611ee3565b905080876001600160a01b0316336001600160a01b03167f0322cbb1d3c23f6dbf1deddb3b4ef3ce0f93ae6eec7b44e4f395804104466d1434604051610c4291815260200190565b60405180910390a4505050610c576001600355565b50505050565b60015460405163260f846760e11b81523360048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690634c1f08ce90602401602060405180830381865afa158015610cc4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ce89190611ee3565b1015610d4f5760405162461bcd60e51b815260206004820152603060248201527f54656c65706f727465725570677261646561626c653a20696e76616c6964205460448201526f32b632b837b93a32b91039b2b73232b960811b60648201526084016104cf565b3360009081526020819052604090205460ff1615610dc85760405162461bcd60e51b815260206004820152603060248201527f54656c65706f727465725570677261646561626c653a2054656c65706f72746560448201526f1c881859191c995cdcc81c185d5cd95960821b60648201526084016104cf565b610c57848484848080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061149992505050565b610e11611027565b6001600160a01b038116610e765760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016104cf565b6108f381611081565b610908611027565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663c07f47d46040518163ffffffff1660e01b8152600401602060405180830381865afa158015610ee7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f0b9190611ee3565b60015490915081831115610f7b5760405162461bcd60e51b815260206004820152603160248201527f54656c65706f727465725570677261646561626c653a20696e76616c6964205460448201527032b632b837b93a32b9103b32b939b4b7b760791b60648201526084016104cf565b808311610ff05760405162461bcd60e51b815260206004820152603f60248201527f54656c65706f727465725570677261646561626c653a206e6f7420677265617460448201527f6572207468616e2063757272656e74206d696e696d756d2076657273696f6e0060648201526084016104cf565b6001839055604051839082907fa9a7ef57e41f05b4c15480842f5f0c27edfcbb553fed281f7c4068452cc1c02d90600090a3505050565b6002546001600160a01b031633146109085760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016104cf565b600280546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6002600354036111255760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016104cf565b6002600355565b6040516370a0823160e01b815230600482015260009081906001600160a01b038516906370a0823190602401602060405180830381865afa158015611175573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111999190611ee3565b90506111b06001600160a01b0385163330866117fc565b6040516370a0823160e01b81523060048201526000906001600160a01b038616906370a0823190602401602060405180830381865afa1580156111f7573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061121b9190611ee3565b90508181116112815760405162461bcd60e51b815260206004820152602c60248201527f5361666545524332305472616e7366657246726f6d3a2062616c616e6365206e60448201526b1bdd081a5b98dc99585cd95960a21b60648201526084016104cf565b61128b8282611cb6565b925050505b92915050565b604051636eb1769f60e11b81523060048201526001600160a01b038381166024830152600091839186169063dd62ed3e90604401602060405180830381865afa1580156112e7573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061130b9190611ee3565b6113159190611ca3565b6040516001600160a01b038516602482015260448101829052909150610c5790859063095ea7b360e01b906064015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152611834565b804710156113cb5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e636500000060448201526064016104cf565b6000826001600160a01b03168260405160006040518083038185875af1925050503d8060008114611418576040519150601f19603f3d011682016040523d82523d6000602084013e61141d565b606091505b50509050806114945760405162461bcd60e51b815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d6179206861766520726576657274656400000000000060648201526084016104cf565b505050565b7f0000000000000000000000000000000000000000000000000000000000000000831461151d5760405162461bcd60e51b815260206004820152602c60248201527f4e6174697665546f6b656e44657374696e6174696f6e3a20696e76616c69642060448201526b39b7bab931b29031b430b4b760a11b60648201526084016104cf565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316826001600160a01b0316146115b25760405162461bcd60e51b815260206004820152602b60248201527f4e6174697665546f6b656e44657374696e6174696f6e3a20756e617574686f7260448201526a34bd32b21039b2b73232b960a91b60648201526084016104cf565b600080828060200190518101906115c99190611f4a565b90925090506001600160a01b0382166115f45760405162461bcd60e51b81526004016104cf90611efc565b806000036116585760405162461bcd60e51b815260206004820152602b60248201527f4e6174697665546f6b656e44657374696e6174696f6e3a207a65726f2074726160448201526a6e736665722076616c756560a81b60648201526084016104cf565b60045481901561171d576004548211156116c15760045460408051918252600060208301527f244160b15e69cc411f041d94ae7fab6f6bba85dade8403216c05ff4b920d5449910160405180910390a16004546116b59083611cb6565b6000600455905061171d565b81600460008282546116d39190611cb6565b90915550506004546040805184815260208101929092527f244160b15e69cc411f041d94ae7fab6f6bba85dade8403216c05ff4b920d5449910160405180910390a1505050505050565b806005600082825461172f9190611ca3565b90915550506040518181526001600160a01b038416907fd949ea0e9d5db53492d77f28fd5467fb2f6c4f5b88e3350e3c36729b76e99cf29060200160405180910390a26040516327ad555d60e11b81526001600160a01b038481166004830152602482018390527f00000000000000000000000000000000000000000000000000000000000000001690634f5aaaba90604401600060405180830381600087803b1580156117dc57600080fd5b505af11580156117f0573d6000803e3d6000fd5b50505050505050505050565b6040516001600160a01b0380851660248301528316604482015260648101829052610c579085906323b872dd60e01b90608401611344565b6000611889826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166119069092919063ffffffff16565b80519091501561149457808060200190518101906118a79190611f78565b6114945760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b60648201526084016104cf565b6060611915848460008561191d565b949350505050565b60608247101561197e5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b60648201526084016104cf565b600080866001600160a01b0316858760405161199a9190611f9a565b60006040518083038185875af1925050503d80600081146119d7576040519150601f19603f3d011682016040523d82523d6000602084013e6119dc565b606091505b50915091506119ed878383876119f8565b979650505050505050565b60608315611a67578251600003611a60576001600160a01b0385163b611a605760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016104cf565b5081611915565b6119158383815115611a7c5781518083602001fd5b8060405162461bcd60e51b81526004016104cf9190611fb6565b6001600160a01b03811681146108f357600080fd5b600060208284031215611abd57600080fd5b8135611ac881611a96565b9392505050565b600060408284031215611ae157600080fd5b50919050565b60008083601f840112611af957600080fd5b50813567ffffffffffffffff811115611b1157600080fd5b6020830191508360208260051b8501011115611b2c57600080fd5b9250929050565b600080600060608486031215611b4857600080fd5b611b528585611acf565b9250604084013567ffffffffffffffff811115611b6e57600080fd5b611b7a86828701611ae7565b9497909650939450505050565b600060208284031215611b9957600080fd5b5035919050565b60008060008060808587031215611bb657600080fd5b8435611bc181611a96565b9350611bd08660208701611acf565b9250606085013567ffffffffffffffff811115611bec57600080fd5b611bf887828801611ae7565b95989497509550505050565b60008060008060608587031215611c1a57600080fd5b843593506020850135611c2c81611a96565b9250604085013567ffffffffffffffff80821115611c4957600080fd5b818701915087601f830112611c5d57600080fd5b813581811115611c6c57600080fd5b886020828501011115611c7e57600080fd5b95989497505060200194505050565b634e487b7160e01b600052601160045260246000fd5b8082018082111561129057611290611c8d565b8181038181111561129057611290611c8d565b6020808252602e908201527f54656c65706f727465725570677261646561626c653a207a65726f2054656c6560408201526d706f72746572206164647265737360901b606082015260800190565b600060208284031215611d2957600080fd5b8151611ac881611a96565b600060408284031215611d4657600080fd5b6040516040810181811067ffffffffffffffff82111715611d7757634e487b7160e01b600052604160045260246000fd5b6040528235611d8581611a96565b81526020928301359281019290925250919050565b60005b83811015611db5578181015183820152602001611d9d565b50506000910152565b60008151808452611dd6816020860160208601611d9a565b601f01601f19169290920160200192915050565b600060028410611e0a57634e487b7160e01b600052602160045260246000fd5b838252604060208301526119156040830184611dbe565b600081518084526020808501945080840160005b83811015611e5a5781516001600160a01b031687529582019590820190600101611e35565b509495945050505050565b60208152815160208201526000602083015160018060a01b03808216604085015260408501519150808251166060850152506020810151608084015250606083015160a0830152608083015160e060c0840152611ec6610100840182611e21565b905060a0840151601f198483030160e085015261128b8282611dbe565b600060208284031215611ef557600080fd5b5051919050565b6020808252602e908201527f4e6174697665546f6b656e44657374696e6174696f6e3a207a65726f2072656360408201526d697069656e74206164647265737360901b606082015260800190565b60008060408385031215611f5d57600080fd5b8251611f6881611a96565b6020939093015192949293505050565b600060208284031215611f8a57600080fd5b81518015158114611ac857600080fd5b60008251611fac818460208701611d9a565b9190910192915050565b602081526000611ac86020830184611dbe56fea26469706673582212206363644d435f0f9cde875245c1a5dc0e494cdad51948071be70f083554f405df64736f6c634300081200334e6174697665546f6b656e44657374696e6174696f6e3a207a65726f20736f75", + Bin: "0x61012060405273020000000000000000000000000000000000000160a0523480156200002a57600080fd5b5060405162002582380380620025828339810160408190526200004d9162000418565b83806001600160a01b038116620000d15760405162461bcd60e51b815260206004820152603760248201527f54656c65706f727465725570677261646561626c653a207a65726f2074656c6560448201527f706f72746572207265676973747279206164647265737300000000000000000060648201526084015b60405180910390fd5b6001600160a01b03811660808190526040805163301fd1f560e21b8152905163c07f47d4916004808201926020929091908290030181865afa1580156200011c573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000142919062000461565b600155506200015133620003a9565b50600160035582620001af5760405162461bcd60e51b81526020600482015260316024820152600080516020620025628339815191526044820152701c98d948189b1bd8dad8da185a5b881251607a1b6064820152608401620000c8565b7302000000000000000000000000000000000000056001600160a01b0316634213cf786040518163ffffffff1660e01b8152600401602060405180830381865afa15801562000202573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000228919062000461565b83036200029e5760405162461bcd60e51b815260206004820152603a60248201527f4e6174697665546f6b656e44657374696e6174696f6e3a2063616e6e6f74206260448201527f726964676520776974682073616d6520626c6f636b636861696e0000000000006064820152608401620000c8565b60c08390526001600160a01b038216620003105760405162461bcd60e51b815260206004820152603460248201526000805160206200256283398151915260448201527f72636520636f6e747261637420616464726573730000000000000000000000006064820152608401620000c8565b6001600160a01b03821660e0526000819003620003965760405162461bcd60e51b815260206004820152603660248201527f4e6174697665546f6b656e44657374696e6174696f6e3a207a65726f20696e6960448201527f7469616c207265736572766520696d62616c616e6365000000000000000000006064820152608401620000c8565b610100819052600455506200047b915050565b600280546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b80516001600160a01b03811681146200041357600080fd5b919050565b600080600080608085870312156200042f57600080fd5b6200043a85620003fb565b9350602085015192506200045160408601620003fb565b6060959095015193969295505050565b6000602082840312156200047457600080fd5b5051919050565b60805160a05160c05160e051610100516120556200050d600039600081816103140152610449015260008181610298015281816105da01528181610a0601526115750152600081816101e0015281816105b4015281816109e001526114f1015260006117ee0152600081816101940152818161085d01528181610bda01528181610de70152610ee101526120556000f3fe60806040526004361061013f5760003560e01c806375846562116100b6578063ab2852301161006f578063ab285230146103a5578063c452165e146103bc578063c868efaa146103d4578063d2cc7a70146103f4578063d3095126146103a5578063f2fde38b1461040957600080fd5b806375846562146102ef5780638ac7dd20146103025780638da5cb5b146103365780639731429714610354578063a2309ff814610374578063a2a950171461038a57600080fd5b80633a94fe51116101085780633a94fe51146102245780634511243e1461024457806349e3284e146102645780635d93f9af146102865780635eb99514146102ba578063715018a6146102da57600080fd5b8062d872ae1461014457806318160ddd1461016d5780631a7f5bec1461018257806329b7b3fd146101ce5780632b0d8f1814610202575b600080fd5b34801561015057600080fd5b5061015a60045481565b6040519081526020015b60405180910390f35b34801561017957600080fd5b5061015a610429565b34801561018e57600080fd5b506101b67f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b039091168152602001610164565b3480156101da57600080fd5b5061015a7f000000000000000000000000000000000000000000000000000000000000000081565b34801561020e57600080fd5b5061022261021d366004611b01565b610488565b005b34801561023057600080fd5b5061022261023f366004611b89565b610577565b34801561025057600080fd5b5061022261025f366004611b01565b61073f565b34801561027057600080fd5b50600454155b6040519015158152602001610164565b34801561029257600080fd5b506101b67f000000000000000000000000000000000000000000000000000000000000000081565b3480156102c657600080fd5b506102226102d5366004611bdd565b610829565b3480156102e657600080fd5b5061022261083d565b6102226102fd366004611bf6565b610851565b34801561030e57600080fd5b5061015a7f000000000000000000000000000000000000000000000000000000000000000081565b34801561034257600080fd5b506002546001600160a01b03166101b6565b34801561036057600080fd5b5061027661036f366004611b01565b610ba4565b34801561038057600080fd5b5061015a60055481565b34801561039657600080fd5b506101b66001600160981b0181565b3480156103b157600080fd5b5061015a620186a081565b3480156103c857600080fd5b506101b6600160981b81565b3480156103e057600080fd5b506102226103ef366004611c5a565b610bc2565b34801561040057600080fd5b5060015461015a565b34801561041557600080fd5b50610222610424366004611b01565b610d64565b6000806104436001600160981b0131600160981b31611cf9565b905060007f00000000000000000000000000000000000000000000000000000000000000006005546104759190611cf9565b90506104818282611d0c565b9250505090565b610490610dda565b6001600160a01b0381166104bf5760405162461bcd60e51b81526004016104b690611d1f565b60405180910390fd5b6104c881610ba4565b1561052b5760405162461bcd60e51b815260206004820152602d60248201527f54656c65706f727465725570677261646561626c653a2061646472657373206160448201526c1b1c9958591e481c185d5cd959609a1b60648201526084016104b6565b6001600160a01b038116600081815260208190526040808220805460ff19166001179055517f933f93e57a222e6330362af8b376d0a8725b6901e9a2fb86d00f169702b28a4c9190a250565b6000610581610de2565b90506000600160981b6001600160a01b03163190506000826001600160a01b031663624488506040518060c001604052807f000000000000000000000000000000000000000000000000000000000000000081526020017f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03168152602001898036038101906106189190611d6d565b8152602001620186a081526020018888808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152505050908252506040805160208082018990528251808303820181528284019093529092019161068a91600191606001611e23565b6040516020818303038152906040528152506040518263ffffffff1660e01b81526004016106b89190611e9e565b6020604051808303816000875af11580156106d7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106fb9190611f1c565b9050807f2550fa6041684d40e635e29e93dde9017d70c25b46aa88393317b5182ed6ae7c8360405161072f91815260200190565b60405180910390a2505050505050565b610747610dda565b6001600160a01b03811661076d5760405162461bcd60e51b81526004016104b690611d1f565b61077681610ba4565b6107d45760405162461bcd60e51b815260206004820152602960248201527f54656c65706f727465725570677261646561626c653a2061646472657373206e6044820152681bdd081c185d5cd95960ba1b60648201526084016104b6565b6040516001600160a01b038216907f844e2f3154214672229235858fd029d1dfd543901c6d05931f0bc2480a2d72c390600090a26001600160a01b03166000908152602081905260409020805460ff19169055565b610831610dda565b61083a81610edd565b50565b61084561107d565b61084f60006110d7565b565b610859611129565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d820e64f6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156108b9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108dd9190611f35565b90506001600160a01b0385166109055760405162461bcd60e51b81526004016104b690611f52565b600454156109725760405162461bcd60e51b815260206004820152603460248201527f4e6174697665546f6b656e44657374696e6174696f6e3a20636f6e7472616374604482015273081d5b99195c98dbdb1b185d195c985b1a5e995960621b60648201526084016104b6565b60006020850135156109b15761099861098e6020870187611b01565b8660200135611182565b90506109b16109aa6020870187611b01565b83836112ec565b6109c26001600160981b01346113d1565b6000826001600160a01b031663624488506040518060c001604052807f000000000000000000000000000000000000000000000000000000000000000081526020017f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316815260200189803603810190610a449190611d6d565b8152602001620186a0815260200188888080602002602001604051908101604052809392919081815260200183836020028082843760009201829052509385525050604051602093840193610ab292508e913491016001600160a01b03929092168252602082015260400190565b60408051601f1981840301815290829052610ad09291602001611e23565b6040516020818303038152906040528152506040518263ffffffff1660e01b8152600401610afe9190611e9e565b6020604051808303816000875af1158015610b1d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b419190611f1c565b905080876001600160a01b0316336001600160a01b03167f0322cbb1d3c23f6dbf1deddb3b4ef3ce0f93ae6eec7b44e4f395804104466d1434604051610b8991815260200190565b60405180910390a4505050610b9e6001600355565b50505050565b6001600160a01b031660009081526020819052604090205460ff1690565b60015460405163260f846760e11b81523360048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690634c1f08ce90602401602060405180830381865afa158015610c29573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c4d9190611f1c565b1015610cb45760405162461bcd60e51b815260206004820152603060248201527f54656c65706f727465725570677261646561626c653a20696e76616c6964205460448201526f32b632b837b93a32b91039b2b73232b960811b60648201526084016104b6565b610cbd33610ba4565b15610d235760405162461bcd60e51b815260206004820152603060248201527f54656c65706f727465725570677261646561626c653a2054656c65706f72746560448201526f1c881859191c995cdcc81c185d5cd95960821b60648201526084016104b6565b610b9e848484848080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506114ef92505050565b610d6c61107d565b6001600160a01b038116610dd15760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016104b6565b61083a816110d7565b61084f61107d565b6000807f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d820e64f6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610e43573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e679190611f35565b9050610e7281610ba4565b15610ed85760405162461bcd60e51b815260206004820152603060248201527f54656c65706f727465725570677261646561626c653a2054656c65706f72746560448201526f1c881cd95b991a5b99c81c185d5cd95960821b60648201526084016104b6565b919050565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663c07f47d46040518163ffffffff1660e01b8152600401602060405180830381865afa158015610f3d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f619190611f1c565b60015490915081831115610fd15760405162461bcd60e51b815260206004820152603160248201527f54656c65706f727465725570677261646561626c653a20696e76616c6964205460448201527032b632b837b93a32b9103b32b939b4b7b760791b60648201526084016104b6565b8083116110465760405162461bcd60e51b815260206004820152603f60248201527f54656c65706f727465725570677261646561626c653a206e6f7420677265617460448201527f6572207468616e2063757272656e74206d696e696d756d2076657273696f6e0060648201526084016104b6565b6001839055604051839082907fa9a7ef57e41f05b4c15480842f5f0c27edfcbb553fed281f7c4068452cc1c02d90600090a3505050565b6002546001600160a01b0316331461084f5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016104b6565b600280546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b60026003540361117b5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016104b6565b6002600355565b6040516370a0823160e01b815230600482015260009081906001600160a01b038516906370a0823190602401602060405180830381865afa1580156111cb573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111ef9190611f1c565b90506112066001600160a01b038516333086611852565b6040516370a0823160e01b81523060048201526000906001600160a01b038616906370a0823190602401602060405180830381865afa15801561124d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112719190611f1c565b90508181116112d75760405162461bcd60e51b815260206004820152602c60248201527f5361666545524332305472616e7366657246726f6d3a2062616c616e6365206e60448201526b1bdd081a5b98dc99585cd95960a21b60648201526084016104b6565b6112e18282611d0c565b925050505b92915050565b604051636eb1769f60e11b81523060048201526001600160a01b038381166024830152600091839186169063dd62ed3e90604401602060405180830381865afa15801561133d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113619190611f1c565b61136b9190611cf9565b6040516001600160a01b038516602482015260448101829052909150610b9e90859063095ea7b360e01b906064015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b03199093169290921790915261188a565b804710156114215760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e636500000060448201526064016104b6565b6000826001600160a01b03168260405160006040518083038185875af1925050503d806000811461146e576040519150601f19603f3d011682016040523d82523d6000602084013e611473565b606091505b50509050806114ea5760405162461bcd60e51b815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d6179206861766520726576657274656400000000000060648201526084016104b6565b505050565b7f000000000000000000000000000000000000000000000000000000000000000083146115735760405162461bcd60e51b815260206004820152602c60248201527f4e6174697665546f6b656e44657374696e6174696f6e3a20696e76616c69642060448201526b39b7bab931b29031b430b4b760a11b60648201526084016104b6565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316826001600160a01b0316146116085760405162461bcd60e51b815260206004820152602b60248201527f4e6174697665546f6b656e44657374696e6174696f6e3a20756e617574686f7260448201526a34bd32b21039b2b73232b960a91b60648201526084016104b6565b6000808280602001905181019061161f9190611fa0565b90925090506001600160a01b03821661164a5760405162461bcd60e51b81526004016104b690611f52565b806000036116ae5760405162461bcd60e51b815260206004820152602b60248201527f4e6174697665546f6b656e44657374696e6174696f6e3a207a65726f2074726160448201526a6e736665722076616c756560a81b60648201526084016104b6565b600454819015611773576004548211156117175760045460408051918252600060208301527f244160b15e69cc411f041d94ae7fab6f6bba85dade8403216c05ff4b920d5449910160405180910390a160045461170b9083611d0c565b60006004559050611773565b81600460008282546117299190611d0c565b90915550506004546040805184815260208101929092527f244160b15e69cc411f041d94ae7fab6f6bba85dade8403216c05ff4b920d5449910160405180910390a1505050505050565b80600560008282546117859190611cf9565b90915550506040518181526001600160a01b038416907fd949ea0e9d5db53492d77f28fd5467fb2f6c4f5b88e3350e3c36729b76e99cf29060200160405180910390a26040516327ad555d60e11b81526001600160a01b038481166004830152602482018390527f00000000000000000000000000000000000000000000000000000000000000001690634f5aaaba90604401600060405180830381600087803b15801561183257600080fd5b505af1158015611846573d6000803e3d6000fd5b50505050505050505050565b6040516001600160a01b0380851660248301528316604482015260648101829052610b9e9085906323b872dd60e01b9060840161139a565b60006118df826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b031661195c9092919063ffffffff16565b8051909150156114ea57808060200190518101906118fd9190611fce565b6114ea5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b60648201526084016104b6565b606061196b8484600085611973565b949350505050565b6060824710156119d45760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b60648201526084016104b6565b600080866001600160a01b031685876040516119f09190611ff0565b60006040518083038185875af1925050503d8060008114611a2d576040519150601f19603f3d011682016040523d82523d6000602084013e611a32565b606091505b5091509150611a4387838387611a4e565b979650505050505050565b60608315611abd578251600003611ab6576001600160a01b0385163b611ab65760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016104b6565b508161196b565b61196b8383815115611ad25781518083602001fd5b8060405162461bcd60e51b81526004016104b6919061200c565b6001600160a01b038116811461083a57600080fd5b600060208284031215611b1357600080fd5b8135611b1e81611aec565b9392505050565b600060408284031215611b3757600080fd5b50919050565b60008083601f840112611b4f57600080fd5b50813567ffffffffffffffff811115611b6757600080fd5b6020830191508360208260051b8501011115611b8257600080fd5b9250929050565b600080600060608486031215611b9e57600080fd5b611ba88585611b25565b9250604084013567ffffffffffffffff811115611bc457600080fd5b611bd086828701611b3d565b9497909650939450505050565b600060208284031215611bef57600080fd5b5035919050565b60008060008060808587031215611c0c57600080fd5b8435611c1781611aec565b9350611c268660208701611b25565b9250606085013567ffffffffffffffff811115611c4257600080fd5b611c4e87828801611b3d565b95989497509550505050565b60008060008060608587031215611c7057600080fd5b843593506020850135611c8281611aec565b9250604085013567ffffffffffffffff80821115611c9f57600080fd5b818701915087601f830112611cb357600080fd5b813581811115611cc257600080fd5b886020828501011115611cd457600080fd5b95989497505060200194505050565b634e487b7160e01b600052601160045260246000fd5b808201808211156112e6576112e6611ce3565b818103818111156112e6576112e6611ce3565b6020808252602e908201527f54656c65706f727465725570677261646561626c653a207a65726f2054656c6560408201526d706f72746572206164647265737360901b606082015260800190565b600060408284031215611d7f57600080fd5b6040516040810181811067ffffffffffffffff82111715611db057634e487b7160e01b600052604160045260246000fd5b6040528235611dbe81611aec565b81526020928301359281019290925250919050565b60005b83811015611dee578181015183820152602001611dd6565b50506000910152565b60008151808452611e0f816020860160208601611dd3565b601f01601f19169290920160200192915050565b600060028410611e4357634e487b7160e01b600052602160045260246000fd5b8382526040602083015261196b6040830184611df7565b600081518084526020808501945080840160005b83811015611e935781516001600160a01b031687529582019590820190600101611e6e565b509495945050505050565b60208152815160208201526000602083015160018060a01b03808216604085015260408501519150808251166060850152506020810151608084015250606083015160a0830152608083015160e060c0840152611eff610100840182611e5a565b905060a0840151601f198483030160e08501526112e18282611df7565b600060208284031215611f2e57600080fd5b5051919050565b600060208284031215611f4757600080fd5b8151611b1e81611aec565b6020808252602e908201527f4e6174697665546f6b656e44657374696e6174696f6e3a207a65726f2072656360408201526d697069656e74206164647265737360901b606082015260800190565b60008060408385031215611fb357600080fd5b8251611fbe81611aec565b6020939093015192949293505050565b600060208284031215611fe057600080fd5b81518015158114611b1e57600080fd5b60008251612002818460208701611dd3565b9190910192915050565b602081526000611b1e6020830184611df756fea264697066735822122012bd96c601b965d45f477b274faa34478c05d9c097fa665c7598bbb2776ae2a764736f6c634300081200334e6174697665546f6b656e44657374696e6174696f6e3a207a65726f20736f75", } // NativeTokenDestinationABI is the input ABI used to generate the binding from. diff --git a/abi-bindings/go/CrossChainApplications/NativeTokenBridge/NativeTokenSource/NativeTokenSource.go b/abi-bindings/go/CrossChainApplications/NativeTokenBridge/NativeTokenSource/NativeTokenSource.go index 8e04ec410..7188fe1ce 100644 --- a/abi-bindings/go/CrossChainApplications/NativeTokenBridge/NativeTokenSource/NativeTokenSource.go +++ b/abi-bindings/go/CrossChainApplications/NativeTokenBridge/NativeTokenSource/NativeTokenSource.go @@ -38,7 +38,7 @@ type TeleporterFeeInfo struct { // NativeTokenSourceMetaData contains all meta data concerning the NativeTokenSource contract. var NativeTokenSourceMetaData = &bind.MetaData{ ABI: "[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"teleporterRegistryAddress\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"destinationBlockchainID_\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"nativeTokenDestinationAddress_\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"BurnTokens\",\"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\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"teleporterMessageID\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"TransferToDestination\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"UnlockTokens\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"BURNED_TX_FEES_ADDRESS\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"MINT_NATIVE_TOKENS_REQUIRED_GAS\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"destinationBlockchainID\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"destinationBurnedTotal\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"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\":\"nativeTokenDestinationAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"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\":\"originBlockchainID\",\"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\":[],\"name\":\"teleporterRegistry\",\"outputs\":[{\"internalType\":\"contractTeleporterRegistry\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"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\":\"transferToDestination\",\"outputs\":[],\"stateMutability\":\"payable\",\"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: "0x60e06040523480156200001157600080fd5b50604051620020473803806200204783398101604081905262000034916200037b565b82806001600160a01b038116620000b85760405162461bcd60e51b815260206004820152603760248201527f54656c65706f727465725570677261646561626c653a207a65726f2074656c6560448201527f706f72746572207265676973747279206164647265737300000000000000000060648201526084015b60405180910390fd5b6001600160a01b03811660808190526040805163301fd1f560e21b8152905163c07f47d4916004808201926020929091908290030181865afa15801562000103573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620001299190620003bc565b6001555062000138336200030c565b50600160035581620001965760405162461bcd60e51b81526020600482015260316024820152600080516020620020278339815191526044820152701a5bdb88189b1bd8dad8da185a5b881251607a1b6064820152608401620000af565b7302000000000000000000000000000000000000056001600160a01b0316634213cf786040518163ffffffff1660e01b8152600401602060405180830381865afa158015620001e9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200020f9190620003bc565b8203620002855760405162461bcd60e51b815260206004820152603560248201527f4e6174697665546f6b656e536f757263653a2063616e6e6f742062726964676560448201527f20776974682073616d6520626c6f636b636861696e00000000000000000000006064820152608401620000af565b60a08290526001600160a01b038116620002f75760405162461bcd60e51b815260206004820152603460248201526000805160206200202783398151915260448201527f696f6e20636f6e747261637420616464726573730000000000000000000000006064820152608401620000af565b6001600160a01b031660c05250620003d69050565b600280546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b80516001600160a01b03811681146200037657600080fd5b919050565b6000806000606084860312156200039157600080fd5b6200039c846200035e565b925060208401519150620003b3604085016200035e565b90509250925092565b600060208284031215620003cf57600080fd5b5051919050565b60805160a05160c051611bf062000437600039600081816102bb015281816106a80152610fcd01526000818161017d015281816106820152610f4901526000818161010a0152818161057d015281816108410152610a570152611bf06000f3fe6080604052600436106100f35760003560e01c8063973142971161008a578063c452165e11610059578063c452165e146102dd578063c868efaa146102f5578063d2cc7a7014610315578063f2fde38b1461032a57600080fd5b80639731429714610236578063ad0aee251461027f578063b6171f7314610292578063b8c9091a146102a957600080fd5b806355db3e9e116100c657806355db3e9e146101cd5780635eb99514146101e3578063715018a6146102035780638da5cb5b1461021857600080fd5b80631a7f5bec146100f85780632b0d8f181461014957806341d3014d1461016b5780634511243e146101ad575b600080fd5b34801561010457600080fd5b5061012c7f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020015b60405180910390f35b34801561015557600080fd5b50610169610164366004611667565b61034a565b005b34801561017757600080fd5b5061019f7f000000000000000000000000000000000000000000000000000000000000000081565b604051908152602001610140565b3480156101b957600080fd5b506101696101c8366004611667565b61044c565b3480156101d957600080fd5b5061019f60045481565b3480156101ef57600080fd5b506101696101fe36600461168b565b610549565b34801561020f57600080fd5b5061016961055d565b34801561022457600080fd5b506002546001600160a01b031661012c565b34801561024257600080fd5b5061026f610251366004611667565b6001600160a01b031660009081526020819052604090205460ff1690565b6040519015158152602001610140565b61016961028d3660046116a4565b610571565b34801561029e57600080fd5b5061019f620186a081565b3480156102b557600080fd5b5061012c7f000000000000000000000000000000000000000000000000000000000000000081565b3480156102e957600080fd5b5061012c600160981b81565b34801561030157600080fd5b50610169610310366004611743565b610829565b34801561032157600080fd5b5060015461019f565b34801561033657600080fd5b50610169610345366004611667565b6109d5565b610352610a4b565b6001600160a01b0381166103815760405162461bcd60e51b8152600401610378906117bd565b60405180910390fd5b6001600160a01b03811660009081526020819052604090205460ff16156104005760405162461bcd60e51b815260206004820152602d60248201527f54656c65706f727465725570677261646561626c653a2061646472657373206160448201526c1b1c9958591e481c185d5cd959609a1b6064820152608401610378565b6001600160a01b038116600081815260208190526040808220805460ff19166001179055517f933f93e57a222e6330362af8b376d0a8725b6901e9a2fb86d00f169702b28a4c9190a250565b610454610a4b565b6001600160a01b03811661047a5760405162461bcd60e51b8152600401610378906117bd565b6001600160a01b03811660009081526020819052604090205460ff166104f45760405162461bcd60e51b815260206004820152602960248201527f54656c65706f727465725570677261646561626c653a2061646472657373206e6044820152681bdd081c185d5cd95960ba1b6064820152608401610378565b6040516001600160a01b038216907f844e2f3154214672229235858fd029d1dfd543901c6d05931f0bc2480a2d72c390600090a26001600160a01b03166000908152602081905260409020805460ff19169055565b610551610a4b565b61055a81610a53565b50565b610565610bf3565b61056f6000610c4d565b565b610579610c9f565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d820e64f6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156105d9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105fd919061180b565b90506001600160a01b0385166106255760405162461bcd60e51b815260040161037890611828565b60006020850135156106645761064b6106416020870187611667565b8660200135610cf8565b905061066461065d6020870187611667565b8383610e62565b6000826001600160a01b031663624488506040518060c001604052807f000000000000000000000000000000000000000000000000000000000000000081526020017f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03168152602001898036038101906106e691906118b8565b8152602001620186a08152602001888880806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250505090825250604051602091820191610755918d913491016001600160a01b03929092168252602082015260400190565b6040516020818303038152906040528152506040518263ffffffff1660e01b815260040161078391906119a4565b6020604051808303816000875af11580156107a2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107c69190611a22565b905080876001600160a01b0316336001600160a01b03167f2b4e8f08417773e367064a6aea9ca2df303a60876676f70b6c3c5e66b314ca5a3460405161080e91815260200190565b60405180910390a45050506108236001600355565b50505050565b60015460405163260f846760e11b81523360048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690634c1f08ce90602401602060405180830381865afa158015610890573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108b49190611a22565b101561091b5760405162461bcd60e51b815260206004820152603060248201527f54656c65706f727465725570677261646561626c653a20696e76616c6964205460448201526f32b632b837b93a32b91039b2b73232b960811b6064820152608401610378565b3360009081526020819052604090205460ff16156109945760405162461bcd60e51b815260206004820152603060248201527f54656c65706f727465725570677261646561626c653a2054656c65706f72746560448201526f1c881859191c995cdcc81c185d5cd95960821b6064820152608401610378565b610823848484848080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250610f4792505050565b6109dd610bf3565b6001600160a01b038116610a425760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610378565b61055a81610c4d565b61056f610bf3565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663c07f47d46040518163ffffffff1660e01b8152600401602060405180830381865afa158015610ab3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ad79190611a22565b60015490915081831115610b475760405162461bcd60e51b815260206004820152603160248201527f54656c65706f727465725570677261646561626c653a20696e76616c6964205460448201527032b632b837b93a32b9103b32b939b4b7b760791b6064820152608401610378565b808311610bbc5760405162461bcd60e51b815260206004820152603f60248201527f54656c65706f727465725570677261646561626c653a206e6f7420677265617460448201527f6572207468616e2063757272656e74206d696e696d756d2076657273696f6e006064820152608401610378565b6001839055604051839082907fa9a7ef57e41f05b4c15480842f5f0c27edfcbb553fed281f7c4068452cc1c02d90600090a3505050565b6002546001600160a01b0316331461056f5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610378565b600280546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600260035403610cf15760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610378565b6002600355565b6040516370a0823160e01b815230600482015260009081906001600160a01b038516906370a0823190602401602060405180830381865afa158015610d41573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d659190611a22565b9050610d7c6001600160a01b038516333086611155565b6040516370a0823160e01b81523060048201526000906001600160a01b038616906370a0823190602401602060405180830381865afa158015610dc3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610de79190611a22565b9050818111610e4d5760405162461bcd60e51b815260206004820152602c60248201527f5361666545524332305472616e7366657246726f6d3a2062616c616e6365206e60448201526b1bdd081a5b98dc99585cd95960a21b6064820152608401610378565b610e578282611a51565b925050505b92915050565b604051636eb1769f60e11b81523060048201526001600160a01b038381166024830152600091839186169063dd62ed3e90604401602060405180830381865afa158015610eb3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ed79190611a22565b610ee19190611a64565b6040516001600160a01b03851660248201526044810182905290915061082390859063095ea7b360e01b906064015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b03199093169290921790915261118d565b7f00000000000000000000000000000000000000000000000000000000000000008314610fcb5760405162461bcd60e51b815260206004820152602c60248201527f4e6174697665546f6b656e536f757263653a20696e76616c696420646573746960448201526b3730ba34b7b71031b430b4b760a11b6064820152608401610378565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316826001600160a01b03161461105b5760405162461bcd60e51b815260206004820152602660248201527f4e6174697665546f6b656e536f757263653a20756e617574686f72697a65642060448201526539b2b73232b960d11b6064820152608401610378565b600080828060200190518101906110729190611a77565b9092509050600082600181111561108b5761108b611b25565b036110bc57600080828060200190518101906110a79190611b3b565b915091506110b58282611264565b505061114e565b60018260018111156110d0576110d0611b25565b036110fc576000818060200190518101906110eb9190611a22565b90506110f68161133d565b5061114e565b60405162461bcd60e51b815260206004820152602160248201527f4e6174697665546f6b656e536f757263653a20696e76616c696420616374696f6044820152603760f91b6064820152608401610378565b5050505050565b6040516001600160a01b03808516602483015283166044820152606481018290526108239085906323b872dd60e01b90608401610f10565b60006111e2826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166113689092919063ffffffff16565b80519091501561125f57808060200190518101906112009190611b69565b61125f5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610378565b505050565b6001600160a01b03821661128a5760405162461bcd60e51b815260040161037890611828565b804710156112ed5760405162461bcd60e51b815260206004820152602a60248201527f4e6174697665546f6b656e536f757263653a20696e73756666696369656e742060448201526918dbdb1b185d195c985b60b21b6064820152608401610378565b604080516001600160a01b0384168152602081018390527f55aaef8fd8c07238c3618a93c8a1627194187d3b0952908e58f2ab0f944fb407910160405180910390a1611339828261137f565b5050565b60045481111561055a576000600454826113579190611a51565b905061136281611498565b50600455565b606061137784846000856114d9565b949350505050565b804710156113cf5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e63650000006044820152606401610378565b6000826001600160a01b03168260405160006040518083038185875af1925050503d806000811461141c576040519150601f19603f3d011682016040523d82523d6000602084013e611421565b606091505b505090508061125f5760405162461bcd60e51b815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d617920686176652072657665727465640000000000006064820152608401610378565b6040518181527f2cd3fd70cd5a5d6d805e90d22741aa1a84590ace7cf01b244719558d266143829060200160405180910390a161055a600160981b8261137f565b60608247101561153a5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b6064820152608401610378565b600080866001600160a01b031685876040516115569190611b8b565b60006040518083038185875af1925050503d8060008114611593576040519150601f19603f3d011682016040523d82523d6000602084013e611598565b606091505b50915091506115a9878383876115b4565b979650505050505050565b6060831561162357825160000361161c576001600160a01b0385163b61161c5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610378565b5081611377565b61137783838151156116385781518083602001fd5b8060405162461bcd60e51b81526004016103789190611ba7565b6001600160a01b038116811461055a57600080fd5b60006020828403121561167957600080fd5b813561168481611652565b9392505050565b60006020828403121561169d57600080fd5b5035919050565b60008060008084860360808112156116bb57600080fd5b85356116c681611652565b94506040601f19820112156116da57600080fd5b50602085019250606085013567ffffffffffffffff808211156116fc57600080fd5b818701915087601f83011261171057600080fd5b81358181111561171f57600080fd5b8860208260051b850101111561173457600080fd5b95989497505060200194505050565b6000806000806060858703121561175957600080fd5b84359350602085013561176b81611652565b9250604085013567ffffffffffffffff8082111561178857600080fd5b818701915087601f83011261179c57600080fd5b8135818111156117ab57600080fd5b88602082850101111561173457600080fd5b6020808252602e908201527f54656c65706f727465725570677261646561626c653a207a65726f2054656c6560408201526d706f72746572206164647265737360901b606082015260800190565b60006020828403121561181d57600080fd5b815161168481611652565b60208082526029908201527f4e6174697665546f6b656e536f757263653a207a65726f20726563697069656e60408201526874206164647265737360b81b606082015260800190565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff811182821017156118b0576118b0611871565b604052919050565b6000604082840312156118ca57600080fd5b6040516040810181811067ffffffffffffffff821117156118ed576118ed611871565b60405282356118fb81611652565b81526020928301359281019290925250919050565b600081518084526020808501945080840160005b838110156119495781516001600160a01b031687529582019590820190600101611924565b509495945050505050565b60005b8381101561196f578181015183820152602001611957565b50506000910152565b60008151808452611990816020860160208601611954565b601f01601f19169290920160200192915050565b60208152815160208201526000602083015160018060a01b03808216604085015260408501519150808251166060850152506020810151608084015250606083015160a0830152608083015160e060c0840152611a05610100840182611910565b905060a0840151601f198483030160e0850152610e578282611978565b600060208284031215611a3457600080fd5b5051919050565b634e487b7160e01b600052601160045260246000fd5b81810381811115610e5c57610e5c611a3b565b80820180821115610e5c57610e5c611a3b565b60008060408385031215611a8a57600080fd5b825160028110611a9957600080fd5b602084015190925067ffffffffffffffff80821115611ab757600080fd5b818501915085601f830112611acb57600080fd5b815181811115611add57611add611871565b611af0601f8201601f1916602001611887565b9150808252866020828501011115611b0757600080fd5b611b18816020840160208601611954565b5080925050509250929050565b634e487b7160e01b600052602160045260246000fd5b60008060408385031215611b4e57600080fd5b8251611b5981611652565b6020939093015192949293505050565b600060208284031215611b7b57600080fd5b8151801515811461168457600080fd5b60008251611b9d818460208701611954565b9190910192915050565b602081526000611684602083018461197856fea2646970667358221220099925bff687b5aa64a1739bc5237b4e6b30e2e53f29c7a3b02b51ae5f11a16964736f6c634300081200334e6174697665546f6b656e536f757263653a207a65726f2064657374696e6174", + Bin: "0x60e06040523480156200001157600080fd5b506040516200209d3803806200209d83398101604081905262000034916200037b565b82806001600160a01b038116620000b85760405162461bcd60e51b815260206004820152603760248201527f54656c65706f727465725570677261646561626c653a207a65726f2074656c6560448201527f706f72746572207265676973747279206164647265737300000000000000000060648201526084015b60405180910390fd5b6001600160a01b03811660808190526040805163301fd1f560e21b8152905163c07f47d4916004808201926020929091908290030181865afa15801562000103573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620001299190620003bc565b6001555062000138336200030c565b50600160035581620001965760405162461bcd60e51b815260206004820152603160248201526000805160206200207d8339815191526044820152701a5bdb88189b1bd8dad8da185a5b881251607a1b6064820152608401620000af565b7302000000000000000000000000000000000000056001600160a01b0316634213cf786040518163ffffffff1660e01b8152600401602060405180830381865afa158015620001e9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200020f9190620003bc565b8203620002855760405162461bcd60e51b815260206004820152603560248201527f4e6174697665546f6b656e536f757263653a2063616e6e6f742062726964676560448201527f20776974682073616d6520626c6f636b636861696e00000000000000000000006064820152608401620000af565b60a08290526001600160a01b038116620002f75760405162461bcd60e51b815260206004820152603460248201526000805160206200207d83398151915260448201527f696f6e20636f6e747261637420616464726573730000000000000000000000006064820152608401620000af565b6001600160a01b031660c05250620003d69050565b600280546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b80516001600160a01b03811681146200037657600080fd5b919050565b6000806000606084860312156200039157600080fd5b6200039c846200035e565b925060208401519150620003b3604085016200035e565b90509250925092565b600060208284031215620003cf57600080fd5b5051919050565b60805160a05160c051611c4662000437600039600081816102a20152818161060d015261102301526000818161017d015281816105e70152610f9f01526000818161010a015281816107a6015281816109b20152610c580152611c466000f3fe6080604052600436106100f35760003560e01c8063973142971161008a578063c452165e11610059578063c452165e146102c4578063c868efaa146102dc578063d2cc7a70146102fc578063f2fde38b1461031157600080fd5b80639731429714610236578063ad0aee2514610266578063b6171f7314610279578063b8c9091a1461029057600080fd5b806355db3e9e116100c657806355db3e9e146101cd5780635eb99514146101e3578063715018a6146102035780638da5cb5b1461021857600080fd5b80631a7f5bec146100f85780632b0d8f181461014957806341d3014d1461016b5780634511243e146101ad575b600080fd5b34801561010457600080fd5b5061012c7f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020015b60405180910390f35b34801561015557600080fd5b506101696101643660046116bd565b610331565b005b34801561017757600080fd5b5061019f7f000000000000000000000000000000000000000000000000000000000000000081565b604051908152602001610140565b3480156101b957600080fd5b506101696101c83660046116bd565b610420565b3480156101d957600080fd5b5061019f60045481565b3480156101ef57600080fd5b506101696101fe3660046116e1565b61050a565b34801561020f57600080fd5b5061016961051e565b34801561022457600080fd5b506002546001600160a01b031661012c565b34801561024257600080fd5b506102566102513660046116bd565b610532565b6040519015158152602001610140565b6101696102743660046116fa565b610550565b34801561028557600080fd5b5061019f620186a081565b34801561029c57600080fd5b5061012c7f000000000000000000000000000000000000000000000000000000000000000081565b3480156102d057600080fd5b5061012c600160981b81565b3480156102e857600080fd5b506101696102f7366004611799565b61078e565b34801561030857600080fd5b5060015461019f565b34801561031d57600080fd5b5061016961032c3660046116bd565b610930565b6103396109a6565b6001600160a01b0381166103685760405162461bcd60e51b815260040161035f90611813565b60405180910390fd5b61037181610532565b156103d45760405162461bcd60e51b815260206004820152602d60248201527f54656c65706f727465725570677261646561626c653a2061646472657373206160448201526c1b1c9958591e481c185d5cd959609a1b606482015260840161035f565b6001600160a01b038116600081815260208190526040808220805460ff19166001179055517f933f93e57a222e6330362af8b376d0a8725b6901e9a2fb86d00f169702b28a4c9190a250565b6104286109a6565b6001600160a01b03811661044e5760405162461bcd60e51b815260040161035f90611813565b61045781610532565b6104b55760405162461bcd60e51b815260206004820152602960248201527f54656c65706f727465725570677261646561626c653a2061646472657373206e6044820152681bdd081c185d5cd95960ba1b606482015260840161035f565b6040516001600160a01b038216907f844e2f3154214672229235858fd029d1dfd543901c6d05931f0bc2480a2d72c390600090a26001600160a01b03166000908152602081905260409020805460ff19169055565b6105126109a6565b61051b816109ae565b50565b610526610b4e565b6105306000610ba8565b565b6001600160a01b031660009081526020819052604090205460ff1690565b610558610bfa565b6000610562610c53565b90506001600160a01b03851661058a5760405162461bcd60e51b815260040161035f90611861565b60006020850135156105c9576105b06105a660208701876116bd565b8660200135610d4e565b90506105c96105c260208701876116bd565b8383610eb8565b6000826001600160a01b031663624488506040518060c001604052807f000000000000000000000000000000000000000000000000000000000000000081526020017f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031681526020018980360381019061064b91906118f1565b8152602001620186a081526020018888808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152505050908252506040516020918201916106ba918d913491016001600160a01b03929092168252602082015260400190565b6040516020818303038152906040528152506040518263ffffffff1660e01b81526004016106e891906119dd565b6020604051808303816000875af1158015610707573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061072b9190611a5b565b905080876001600160a01b0316336001600160a01b03167f2b4e8f08417773e367064a6aea9ca2df303a60876676f70b6c3c5e66b314ca5a3460405161077391815260200190565b60405180910390a45050506107886001600355565b50505050565b60015460405163260f846760e11b81523360048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690634c1f08ce90602401602060405180830381865afa1580156107f5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108199190611a5b565b10156108805760405162461bcd60e51b815260206004820152603060248201527f54656c65706f727465725570677261646561626c653a20696e76616c6964205460448201526f32b632b837b93a32b91039b2b73232b960811b606482015260840161035f565b61088933610532565b156108ef5760405162461bcd60e51b815260206004820152603060248201527f54656c65706f727465725570677261646561626c653a2054656c65706f72746560448201526f1c881859191c995cdcc81c185d5cd95960821b606482015260840161035f565b610788848484848080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250610f9d92505050565b610938610b4e565b6001600160a01b03811661099d5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161035f565b61051b81610ba8565b610530610b4e565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663c07f47d46040518163ffffffff1660e01b8152600401602060405180830381865afa158015610a0e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a329190611a5b565b60015490915081831115610aa25760405162461bcd60e51b815260206004820152603160248201527f54656c65706f727465725570677261646561626c653a20696e76616c6964205460448201527032b632b837b93a32b9103b32b939b4b7b760791b606482015260840161035f565b808311610b175760405162461bcd60e51b815260206004820152603f60248201527f54656c65706f727465725570677261646561626c653a206e6f7420677265617460448201527f6572207468616e2063757272656e74206d696e696d756d2076657273696f6e00606482015260840161035f565b6001839055604051839082907fa9a7ef57e41f05b4c15480842f5f0c27edfcbb553fed281f7c4068452cc1c02d90600090a3505050565b6002546001600160a01b031633146105305760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161035f565b600280546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600260035403610c4c5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015260640161035f565b6002600355565b6000807f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d820e64f6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610cb4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610cd89190611a74565b9050610ce381610532565b15610d495760405162461bcd60e51b815260206004820152603060248201527f54656c65706f727465725570677261646561626c653a2054656c65706f72746560448201526f1c881cd95b991a5b99c81c185d5cd95960821b606482015260840161035f565b919050565b6040516370a0823160e01b815230600482015260009081906001600160a01b038516906370a0823190602401602060405180830381865afa158015610d97573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610dbb9190611a5b565b9050610dd26001600160a01b0385163330866111ab565b6040516370a0823160e01b81523060048201526000906001600160a01b038616906370a0823190602401602060405180830381865afa158015610e19573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e3d9190611a5b565b9050818111610ea35760405162461bcd60e51b815260206004820152602c60248201527f5361666545524332305472616e7366657246726f6d3a2062616c616e6365206e60448201526b1bdd081a5b98dc99585cd95960a21b606482015260840161035f565b610ead8282611aa7565b925050505b92915050565b604051636eb1769f60e11b81523060048201526001600160a01b038381166024830152600091839186169063dd62ed3e90604401602060405180830381865afa158015610f09573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f2d9190611a5b565b610f379190611aba565b6040516001600160a01b03851660248201526044810182905290915061078890859063095ea7b360e01b906064015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b0319909316929092179091526111e3565b7f000000000000000000000000000000000000000000000000000000000000000083146110215760405162461bcd60e51b815260206004820152602c60248201527f4e6174697665546f6b656e536f757263653a20696e76616c696420646573746960448201526b3730ba34b7b71031b430b4b760a11b606482015260840161035f565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316826001600160a01b0316146110b15760405162461bcd60e51b815260206004820152602660248201527f4e6174697665546f6b656e536f757263653a20756e617574686f72697a65642060448201526539b2b73232b960d11b606482015260840161035f565b600080828060200190518101906110c89190611acd565b909250905060008260018111156110e1576110e1611b7b565b0361111257600080828060200190518101906110fd9190611b91565b9150915061110b82826112ba565b50506111a4565b600182600181111561112657611126611b7b565b03611152576000818060200190518101906111419190611a5b565b905061114c81611393565b506111a4565b60405162461bcd60e51b815260206004820152602160248201527f4e6174697665546f6b656e536f757263653a20696e76616c696420616374696f6044820152603760f91b606482015260840161035f565b5050505050565b6040516001600160a01b03808516602483015283166044820152606481018290526107889085906323b872dd60e01b90608401610f66565b6000611238826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166113be9092919063ffffffff16565b8051909150156112b557808060200190518101906112569190611bbf565b6112b55760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b606482015260840161035f565b505050565b6001600160a01b0382166112e05760405162461bcd60e51b815260040161035f90611861565b804710156113435760405162461bcd60e51b815260206004820152602a60248201527f4e6174697665546f6b656e536f757263653a20696e73756666696369656e742060448201526918dbdb1b185d195c985b60b21b606482015260840161035f565b604080516001600160a01b0384168152602081018390527f55aaef8fd8c07238c3618a93c8a1627194187d3b0952908e58f2ab0f944fb407910160405180910390a161138f82826113d5565b5050565b60045481111561051b576000600454826113ad9190611aa7565b90506113b8816114ee565b50600455565b60606113cd848460008561152f565b949350505050565b804710156114255760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e6365000000604482015260640161035f565b6000826001600160a01b03168260405160006040518083038185875af1925050503d8060008114611472576040519150601f19603f3d011682016040523d82523d6000602084013e611477565b606091505b50509050806112b55760405162461bcd60e51b815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d61792068617665207265766572746564000000000000606482015260840161035f565b6040518181527f2cd3fd70cd5a5d6d805e90d22741aa1a84590ace7cf01b244719558d266143829060200160405180910390a161051b600160981b826113d5565b6060824710156115905760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b606482015260840161035f565b600080866001600160a01b031685876040516115ac9190611be1565b60006040518083038185875af1925050503d80600081146115e9576040519150601f19603f3d011682016040523d82523d6000602084013e6115ee565b606091505b50915091506115ff8783838761160a565b979650505050505050565b60608315611679578251600003611672576001600160a01b0385163b6116725760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015260640161035f565b50816113cd565b6113cd838381511561168e5781518083602001fd5b8060405162461bcd60e51b815260040161035f9190611bfd565b6001600160a01b038116811461051b57600080fd5b6000602082840312156116cf57600080fd5b81356116da816116a8565b9392505050565b6000602082840312156116f357600080fd5b5035919050565b600080600080848603608081121561171157600080fd5b853561171c816116a8565b94506040601f198201121561173057600080fd5b50602085019250606085013567ffffffffffffffff8082111561175257600080fd5b818701915087601f83011261176657600080fd5b81358181111561177557600080fd5b8860208260051b850101111561178a57600080fd5b95989497505060200194505050565b600080600080606085870312156117af57600080fd5b8435935060208501356117c1816116a8565b9250604085013567ffffffffffffffff808211156117de57600080fd5b818701915087601f8301126117f257600080fd5b81358181111561180157600080fd5b88602082850101111561178a57600080fd5b6020808252602e908201527f54656c65706f727465725570677261646561626c653a207a65726f2054656c6560408201526d706f72746572206164647265737360901b606082015260800190565b60208082526029908201527f4e6174697665546f6b656e536f757263653a207a65726f20726563697069656e60408201526874206164647265737360b81b606082015260800190565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff811182821017156118e9576118e96118aa565b604052919050565b60006040828403121561190357600080fd5b6040516040810181811067ffffffffffffffff82111715611926576119266118aa565b6040528235611934816116a8565b81526020928301359281019290925250919050565b600081518084526020808501945080840160005b838110156119825781516001600160a01b03168752958201959082019060010161195d565b509495945050505050565b60005b838110156119a8578181015183820152602001611990565b50506000910152565b600081518084526119c981602086016020860161198d565b601f01601f19169290920160200192915050565b60208152815160208201526000602083015160018060a01b03808216604085015260408501519150808251166060850152506020810151608084015250606083015160a0830152608083015160e060c0840152611a3e610100840182611949565b905060a0840151601f198483030160e0850152610ead82826119b1565b600060208284031215611a6d57600080fd5b5051919050565b600060208284031215611a8657600080fd5b81516116da816116a8565b634e487b7160e01b600052601160045260246000fd5b81810381811115610eb257610eb2611a91565b80820180821115610eb257610eb2611a91565b60008060408385031215611ae057600080fd5b825160028110611aef57600080fd5b602084015190925067ffffffffffffffff80821115611b0d57600080fd5b818501915085601f830112611b2157600080fd5b815181811115611b3357611b336118aa565b611b46601f8201601f19166020016118c0565b9150808252866020828501011115611b5d57600080fd5b611b6e81602084016020860161198d565b5080925050509250929050565b634e487b7160e01b600052602160045260246000fd5b60008060408385031215611ba457600080fd5b8251611baf816116a8565b6020939093015192949293505050565b600060208284031215611bd157600080fd5b815180151581146116da57600080fd5b60008251611bf381846020870161198d565b9190910192915050565b6020815260006116da60208301846119b156fea26469706673582212208fb5e554641e7d9f4882d33a9e5e022436eacaa95e0f0939680c54a0e560887064736f6c634300081200334e6174697665546f6b656e536f757263653a207a65726f2064657374696e6174", } // NativeTokenSourceABI is the input ABI used to generate the binding from. From fefa0010d8682f74f51ed62b0cbef2dda7c42653 Mon Sep 17 00:00:00 2001 From: Geoff Stuart Date: Wed, 27 Dec 2023 09:32:01 -0500 Subject: [PATCH 12/12] Check error message --- .../NativeTokenBridge/tests/ERC20TokenSourceTests.t.sol | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contracts/src/CrossChainApplications/examples/NativeTokenBridge/tests/ERC20TokenSourceTests.t.sol b/contracts/src/CrossChainApplications/examples/NativeTokenBridge/tests/ERC20TokenSourceTests.t.sol index e08be2968..4fb32c22e 100644 --- a/contracts/src/CrossChainApplications/examples/NativeTokenBridge/tests/ERC20TokenSourceTests.t.sol +++ b/contracts/src/CrossChainApplications/examples/NativeTokenBridge/tests/ERC20TokenSourceTests.t.sol @@ -259,7 +259,7 @@ contract ERC20TokenSourceTest is Test { } function testInvalidDestinationBlockchain() public { - vm.expectRevert(); + vm.expectRevert(_formatERC20TokenSourceErrorMessage("invalid destination chain")); vm.prank(MOCK_TELEPORTER_MESSENGER_ADDRESS); erc20TokenSource.receiveTeleporterMessage(