From 7e4955f6fe9e65cb84c1776dd974be2d9bcc0e78 Mon Sep 17 00:00:00 2001 From: Matt Curtis Date: Tue, 26 Sep 2023 17:33:25 +0100 Subject: [PATCH] Add retrieve all funds method to bridge --- .../CrossChainMessenger.go | 7 +- contracts/generated/ERC20/ERC20.go | 5 +- .../EthereumBridge/EthereumBridge.go | 7 +- .../ManagementContract/ManagementContract.go | 256 +++++++++++++++++- contracts/generated/MessageBus/MessageBus.go | 30 +- contracts/generated/ObsERC20/ObsERC20.go | 7 +- .../generated/ObscuroBridge/ObscuroBridge.go | 7 +- .../generated/WrappedERC20/WrappedERC20.go | 7 +- .../src/management/ManagementContract.sol | 8 +- contracts/src/messaging/IMessageBus.sol | 3 + contracts/src/messaging/MessageBus.sol | 7 + contracts/test/bridge-test.ts | 17 ++ 12 files changed, 327 insertions(+), 34 deletions(-) diff --git a/contracts/generated/CrossChainMessenger/CrossChainMessenger.go b/contracts/generated/CrossChainMessenger/CrossChainMessenger.go index 0af3876ecd..98af64fcba 100644 --- a/contracts/generated/CrossChainMessenger/CrossChainMessenger.go +++ b/contracts/generated/CrossChainMessenger/CrossChainMessenger.go @@ -26,7 +26,6 @@ var ( _ = common.Big1 _ = types.BloomLookup _ = event.NewSubscription - _ = abi.ConvertType ) // StructsCrossChainMessage is an auto generated low-level Go binding around an user-defined struct. @@ -42,7 +41,7 @@ type StructsCrossChainMessage struct { // CrossChainMessengerMetaData contains all meta data concerning the CrossChainMessenger contract. var CrossChainMessengerMetaData = &bind.MetaData{ ABI: "[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"messageBusAddr\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"error\",\"type\":\"bytes\"}],\"name\":\"CallFailed\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"crossChainSender\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"target\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"payload\",\"type\":\"bytes\"}],\"name\":\"encodeCall\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"messageBus\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"sequence\",\"type\":\"uint64\"},{\"internalType\":\"uint32\",\"name\":\"nonce\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"topic\",\"type\":\"uint32\"},{\"internalType\":\"bytes\",\"name\":\"payload\",\"type\":\"bytes\"},{\"internalType\":\"uint8\",\"name\":\"consistencyLevel\",\"type\":\"uint8\"}],\"internalType\":\"structStructs.CrossChainMessage\",\"name\":\"message\",\"type\":\"tuple\"}],\"name\":\"relayMessage\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", - Bin: "0x6080604052600180546001600160a01b031916905534801561002057600080fd5b506040516109ad3803806109ad83398101604081905261003f91610064565b600080546001600160a01b0319166001600160a01b0392909216919091179055610094565b60006020828403121561007657600080fd5b81516001600160a01b038116811461008d57600080fd5b9392505050565b61090a806100a36000396000f3fe608060405234801561001057600080fd5b506004361061004c5760003560e01c80635b76f28b1461005157806363012de51461007a5780639b7cf1ee146100a5578063a1a227fa146100ba575b600080fd5b61006461005f366004610425565b6100cb565b6040516100719190610504565b60405180910390f35b60015461008d906001600160a01b031681565b6040516001600160a01b039091168152602001610071565b6100b86100b336600461051e565b61014b565b005b6000546001600160a01b031661008d565b60606040518060600160405280856001600160a01b0316815260200184848080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920182905250938552505050602091820152604051610133929101610559565b60405160208183030381529060405290509392505050565b6101548161027d565b610161602082018261059e565b6001805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0392909216919091179055600061019d60808301836105b9565b8101906101aa9190610690565b905060008082600001516001600160a01b03165a84602001516040516101d09190610764565b60006040518083038160008787f1925050503d806000811461020e576040519150601f19603f3d011682016040523d82523d6000602084013e610213565b606091505b50915091508161025a57806040517fa5fa8d2b0000000000000000000000000000000000000000000000000000000081526004016102519190610504565b60405180910390fd5b50506001805473ffffffffffffffffffffffffffffffffffffffff191690555050565b6000546040517f33a88c720000000000000000000000000000000000000000000000000000000081526001600160a01b03909116906333a88c72906102c69084906004016107ce565b60206040518083038186803b1580156102de57600080fd5b505afa1580156102f2573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061031691906108b2565b6103625760405162461bcd60e51b815260206004820152601f60248201527f4d657373616765206e6f7420666f756e64206f722066696e616c697a65642e006044820152606401610251565b60008160405160200161037591906107ce565b60408051601f1981840301815291815281516020928301206000818152600290935291205490915060ff16156103ed5760405162461bcd60e51b815260206004820152601960248201527f4d65737361676520616c726561647920636f6e73756d65642e000000000000006044820152606401610251565b6000908152600260205260409020805460ff1916600117905550565b80356001600160a01b038116811461042057600080fd5b919050565b60008060006040848603121561043a57600080fd5b61044384610409565b9250602084013567ffffffffffffffff8082111561046057600080fd5b818601915086601f83011261047457600080fd5b81358181111561048357600080fd5b87602082850101111561049557600080fd5b6020830194508093505050509250925092565b60005b838110156104c35781810151838201526020016104ab565b838111156104d2576000848401525b50505050565b600081518084526104f08160208601602086016104a8565b601f01601f19169290920160200192915050565b60208152600061051760208301846104d8565b9392505050565b60006020828403121561053057600080fd5b813567ffffffffffffffff81111561054757600080fd5b820160c0818503121561051757600080fd5b602081526001600160a01b038251166020820152600060208301516060604084015261058860808401826104d8565b9050604084015160608401528091505092915050565b6000602082840312156105b057600080fd5b61051782610409565b6000808335601e198436030181126105d057600080fd5b83018035915067ffffffffffffffff8211156105eb57600080fd5b60200191503681900382131561060057600080fd5b9250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6040516060810167ffffffffffffffff8111828210171561065957610659610607565b60405290565b604051601f8201601f1916810167ffffffffffffffff8111828210171561068857610688610607565b604052919050565b600060208083850312156106a357600080fd5b823567ffffffffffffffff808211156106bb57600080fd5b90840190606082870312156106cf57600080fd5b6106d7610636565b6106e083610409565b815283830135828111156106f357600080fd5b8301601f8101881361070457600080fd5b80358381111561071657610716610607565b610728601f8201601f1916870161065f565b9350808452888682840101111561073e57600080fd5b808683018786013760009084018601525092830152604090810135908201529392505050565b600082516107768184602087016104a8565b9190910192915050565b803563ffffffff8116811461042057600080fd5b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b803560ff8116811461042057600080fd5b602081526001600160a01b036107e383610409565b1660208201526000602083013567ffffffffffffffff80821680831461080857600080fd5b8060408601525061081b60408601610780565b915063ffffffff80831660608601528061083760608801610780565b1660808601525060808501359150601e1985360301821261085757600080fd5b9084019081358181111561086a57600080fd5b80360386131561087957600080fd5b60c060a086015261089160e086018260208601610794565b925050506108a160a085016107bd565b60ff811660c0850152509392505050565b6000602082840312156108c457600080fd5b8151801515811461051757600080fdfea26469706673582212200acc607690386a002676eb2cb59eb38fb8dded8b683c5c2b9237a9f2c7ae948b64736f6c63430008090033", + Bin: "0x6080604052600180546001600160a01b031916905534801561002057600080fd5b506040516109ad3803806109ad83398101604081905261003f91610064565b600080546001600160a01b0319166001600160a01b0392909216919091179055610094565b60006020828403121561007657600080fd5b81516001600160a01b038116811461008d57600080fd5b9392505050565b61090a806100a36000396000f3fe608060405234801561001057600080fd5b506004361061004c5760003560e01c80635b76f28b1461005157806363012de51461007a5780639b7cf1ee146100a5578063a1a227fa146100ba575b600080fd5b61006461005f366004610425565b6100cb565b6040516100719190610504565b60405180910390f35b60015461008d906001600160a01b031681565b6040516001600160a01b039091168152602001610071565b6100b86100b336600461051e565b61014b565b005b6000546001600160a01b031661008d565b60606040518060600160405280856001600160a01b0316815260200184848080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920182905250938552505050602091820152604051610133929101610559565b60405160208183030381529060405290509392505050565b6101548161027d565b610161602082018261059e565b6001805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0392909216919091179055600061019d60808301836105b9565b8101906101aa9190610690565b905060008082600001516001600160a01b03165a84602001516040516101d09190610764565b60006040518083038160008787f1925050503d806000811461020e576040519150601f19603f3d011682016040523d82523d6000602084013e610213565b606091505b50915091508161025a57806040517fa5fa8d2b0000000000000000000000000000000000000000000000000000000081526004016102519190610504565b60405180910390fd5b50506001805473ffffffffffffffffffffffffffffffffffffffff191690555050565b6000546040517f33a88c720000000000000000000000000000000000000000000000000000000081526001600160a01b03909116906333a88c72906102c69084906004016107ce565b60206040518083038186803b1580156102de57600080fd5b505afa1580156102f2573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061031691906108b2565b6103625760405162461bcd60e51b815260206004820152601f60248201527f4d657373616765206e6f7420666f756e64206f722066696e616c697a65642e006044820152606401610251565b60008160405160200161037591906107ce565b60408051601f1981840301815291815281516020928301206000818152600290935291205490915060ff16156103ed5760405162461bcd60e51b815260206004820152601960248201527f4d65737361676520616c726561647920636f6e73756d65642e000000000000006044820152606401610251565b6000908152600260205260409020805460ff1916600117905550565b80356001600160a01b038116811461042057600080fd5b919050565b60008060006040848603121561043a57600080fd5b61044384610409565b9250602084013567ffffffffffffffff8082111561046057600080fd5b818601915086601f83011261047457600080fd5b81358181111561048357600080fd5b87602082850101111561049557600080fd5b6020830194508093505050509250925092565b60005b838110156104c35781810151838201526020016104ab565b838111156104d2576000848401525b50505050565b600081518084526104f08160208601602086016104a8565b601f01601f19169290920160200192915050565b60208152600061051760208301846104d8565b9392505050565b60006020828403121561053057600080fd5b813567ffffffffffffffff81111561054757600080fd5b820160c0818503121561051757600080fd5b602081526001600160a01b038251166020820152600060208301516060604084015261058860808401826104d8565b9050604084015160608401528091505092915050565b6000602082840312156105b057600080fd5b61051782610409565b6000808335601e198436030181126105d057600080fd5b83018035915067ffffffffffffffff8211156105eb57600080fd5b60200191503681900382131561060057600080fd5b9250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6040516060810167ffffffffffffffff8111828210171561065957610659610607565b60405290565b604051601f8201601f1916810167ffffffffffffffff8111828210171561068857610688610607565b604052919050565b600060208083850312156106a357600080fd5b823567ffffffffffffffff808211156106bb57600080fd5b90840190606082870312156106cf57600080fd5b6106d7610636565b6106e083610409565b815283830135828111156106f357600080fd5b8301601f8101881361070457600080fd5b80358381111561071657610716610607565b610728601f8201601f1916870161065f565b9350808452888682840101111561073e57600080fd5b808683018786013760009084018601525092830152604090810135908201529392505050565b600082516107768184602087016104a8565b9190910192915050565b803563ffffffff8116811461042057600080fd5b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b803560ff8116811461042057600080fd5b602081526001600160a01b036107e383610409565b1660208201526000602083013567ffffffffffffffff80821680831461080857600080fd5b8060408601525061081b60408601610780565b915063ffffffff80831660608601528061083760608801610780565b1660808601525060808501359150601e1985360301821261085757600080fd5b9084019081358181111561086a57600080fd5b80360386131561087957600080fd5b60c060a086015261089160e086018260208601610794565b925050506108a160a085016107bd565b60ff811660c0850152509392505050565b6000602082840312156108c457600080fd5b8151801515811461051757600080fdfea26469706673582212202090fa14d405733eeb20c7bd72003a0427e54bafa4f122140f5a19df921d92ea64736f6c63430008090033", } // CrossChainMessengerABI is the input ABI used to generate the binding from. @@ -167,11 +166,11 @@ func NewCrossChainMessengerFilterer(address common.Address, filterer bind.Contra // bindCrossChainMessenger binds a generic wrapper to an already deployed contract. func bindCrossChainMessenger(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { - parsed, err := CrossChainMessengerMetaData.GetAbi() + parsed, err := abi.JSON(strings.NewReader(CrossChainMessengerABI)) if err != nil { return nil, err } - return bind.NewBoundContract(address, *parsed, caller, transactor, filterer), nil + return bind.NewBoundContract(address, parsed, caller, transactor, filterer), nil } // Call invokes the (constant) contract method with params as input values and diff --git a/contracts/generated/ERC20/ERC20.go b/contracts/generated/ERC20/ERC20.go index 095732a19b..d2eb71a272 100644 --- a/contracts/generated/ERC20/ERC20.go +++ b/contracts/generated/ERC20/ERC20.go @@ -26,7 +26,6 @@ var ( _ = common.Big1 _ = types.BloomLookup _ = event.NewSubscription - _ = abi.ConvertType ) // ERC20MetaData contains all meta data concerning the ERC20 contract. @@ -157,11 +156,11 @@ func NewERC20Filterer(address common.Address, filterer bind.ContractFilterer) (* // bindERC20 binds a generic wrapper to an already deployed contract. func bindERC20(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { - parsed, err := ERC20MetaData.GetAbi() + parsed, err := abi.JSON(strings.NewReader(ERC20ABI)) if err != nil { return nil, err } - return bind.NewBoundContract(address, *parsed, caller, transactor, filterer), nil + return bind.NewBoundContract(address, parsed, caller, transactor, filterer), nil } // Call invokes the (constant) contract method with params as input values and diff --git a/contracts/generated/EthereumBridge/EthereumBridge.go b/contracts/generated/EthereumBridge/EthereumBridge.go index 1ba1afaa04..e0e33c065e 100644 --- a/contracts/generated/EthereumBridge/EthereumBridge.go +++ b/contracts/generated/EthereumBridge/EthereumBridge.go @@ -26,13 +26,12 @@ var ( _ = common.Big1 _ = types.BloomLookup _ = event.NewSubscription - _ = abi.ConvertType ) // EthereumBridgeMetaData contains all meta data concerning the EthereumBridge contract. var EthereumBridgeMetaData = &bind.MetaData{ ABI: "[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"messenger\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"remoteBridge\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"remoteAddress\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"localAddress\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"symbol\",\"type\":\"string\"}],\"name\":\"CreatedWrappedToken\",\"type\":\"event\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"wrappedToken\",\"type\":\"address\"}],\"name\":\"hasTokenMapping\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"localToRemoteToken\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"crossChainAddress\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"symbol\",\"type\":\"string\"}],\"name\":\"onCreateTokenCommand\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"asset\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"}],\"name\":\"receiveAssets\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"remoteToLocalToken\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"asset\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"}],\"name\":\"sendERC20\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"}],\"name\":\"sendNative\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"wrappedTokens\",\"outputs\":[{\"internalType\":\"contractWrappedERC20\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}]", - Bin: "0x60806040526001805463ffffffff60a01b191690553480156200002157600080fd5b5060405162002b7f38038062002b7f83398101604081905262000044916200012c565b600080546001600160a01b0319166001600160a01b038416908117909155604080516350d113fd60e11b8152905184929163a1a227fa916004808301926020929190829003018186803b1580156200009b57600080fd5b505afa158015620000b0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620000d6919062000164565b600180546001600160a01b039283166001600160a01b031991821617909155600580549490921693169290921790915550620001899050565b80516001600160a01b03811681146200012757600080fd5b919050565b600080604083850312156200014057600080fd5b6200014b836200010f565b91506200015b602084016200010f565b90509250929050565b6000602082840312156200017757600080fd5b62000182826200010f565b9392505050565b6129e680620001996000396000f3fe6080604052600436106200008a5760003560e01c80639813c7b211620000555780639813c7b214620002065780639e405b711462000256578063a381c8e21462000290578063d5c6b50414620002b55762000103565b80628d48e3146200014c5780631888d71214620001a3578063458ffd6314620001bc57806383bece4d14620001e15762000103565b36620001035760405162461bcd60e51b815260206004820152602360248201527f436f6e747261637420646f6573206e6f7420737570706f72742072656365697660448201527f652829000000000000000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b60405162461bcd60e51b815260206004820152601d60248201527f66616c6c6261636b2829206d6574686f6420756e737570706f727465640000006044820152606401620000fa565b3480156200015957600080fd5b50620001866200016b36600462000c75565b6004602052600090815260409020546001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b620001ba620001b436600462000c75565b620002ef565b005b348015620001c957600080fd5b50620001ba620001db36600462000ce8565b620004a0565b348015620001ee57600080fd5b50620001ba6200020036600462000d74565b620006be565b3480156200021357600080fd5b50620002456200022536600462000c75565b6001600160a01b0390811660009081526002602052604090205416151590565b60405190151581526020016200019a565b3480156200026357600080fd5b50620001866200027536600462000c75565b6003602052600090815260409020546001600160a01b031681565b3480156200029d57600080fd5b50620001ba620002af36600462000d74565b62000901565b348015620002c257600080fd5b5062000186620002d436600462000c75565b6002602052600090815260409020546001600160a01b031681565b60003411620003415760405162461bcd60e51b815260206004820152600d60248201527f4e6f7468696e672073656e742e000000000000000000000000000000000000006044820152606401620000fa565b6000805260026020527fac33ff75c19e70fe83507db0d683fd3465c996598dc972688b7ace676c89077b546001600160a01b0316620003c35760405162461bcd60e51b815260206004820152601560248201527f4e6f206d617070696e6720666f7220746f6b656e2e00000000000000000000006044820152606401620000fa565b600080805260036020527f3617319a054d772f909f7c479a2cebe5066e836a939412e32403c99029b92eff546040516001600160a01b03918216602482015234604482015290831660648201526383bece4d60e01b9060840160408051601f198184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff00000000000000000000000000000000000000000000000000000000909316929092179091526005549091506200049c906001600160a01b03168260005b60008062000a90565b5050565b6005546000546001600160a01b0391821691163314620005295760405162461bcd60e51b815260206004820152603060248201527f436f6e74726163742063616c6c6572206973206e6f742074686520726567697360448201527f7465726564206d657373656e67657221000000000000000000000000000000006064820152608401620000fa565b806001600160a01b03166200053d62000bbe565b6001600160a01b031614620005bb5760405162461bcd60e51b815260206004820152603160248201527f43726f737320636861696e206d65737361676520636f6d696e672066726f6d2060448201527f696e636f72726563742073656e646572210000000000000000000000000000006064820152608401620000fa565b600085858585604051620005cf9062000c4e565b620005de949392919062000de4565b604051809103906000f080158015620005fb573d6000803e3d6000fd5b506001600160a01b03808216600081815260026020908152604080832080547fffffffffffffffffffffffff00000000000000000000000000000000000000009081168617909155600383528184208054968f169682168717905594835260049091529081902080549093169091179091555190915081907f30c05779f384e0ae9d43bbf7ec4417f28bdc53d02a35551b6eb270a9c4c71dca90620006ac908a9084908b908b908b908b9062000e1a565b60405180910390a15050505050505050565b6005546000546001600160a01b0391821691163314620007475760405162461bcd60e51b815260206004820152603060248201527f436f6e74726163742063616c6c6572206973206e6f742074686520726567697360448201527f7465726564206d657373656e67657221000000000000000000000000000000006064820152608401620000fa565b806001600160a01b03166200075b62000bbe565b6001600160a01b031614620007d95760405162461bcd60e51b815260206004820152603160248201527f43726f737320636861696e206d65737361676520636f6d696e672066726f6d2060448201527f696e636f72726563742073656e646572210000000000000000000000000000006064820152608401620000fa565b6001600160a01b038085166000908152600460209081526040808320548416808452600290925290912054909116806200087c5760405162461bcd60e51b815260206004820152602b60248201527f526563656976696e672061737365747320666f7220756e6b6e6f776e2077726160448201527f7070656420746f6b656e210000000000000000000000000000000000000000006064820152608401620000fa565b6040517f979005ad0000000000000000000000000000000000000000000000000000000081526001600160a01b0385811660048301526024820187905282169063979005ad90604401600060405180830381600087803b158015620008e057600080fd5b505af1158015620008f5573d6000803e3d6000fd5b50505050505050505050565b6001600160a01b03808416600090815260026020526040902054166200096a5760405162461bcd60e51b815260206004820152601560248201527f4e6f206d617070696e6720666f7220746f6b656e2e00000000000000000000006044820152606401620000fa565b6001600160a01b03838116600090815260026020526040908190205490517f1dd319cb000000000000000000000000000000000000000000000000000000008152336004820152602481018590529116908190631dd319cb90604401600060405180830381600087803b158015620009e157600080fd5b505af1158015620009f6573d6000803e3d6000fd5b505050506001600160a01b03848116600090815260036020908152604080832054815190851660248201526044810188905286851660648083019190915282518083039091018152608490910190915290810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff166383bece4d60e01b179052600554909262000a8992911690839062000493565b5050505050565b60006040518060600160405280876001600160a01b031681526020018681526020018481525060405160200162000ac8919062000ebb565b60408051808303601f19018152919052600180549192506001600160a01b0382169163b1454caa917401000000000000000000000000000000000000000090910463ffffffff1690601462000b1d8362000f02565b91906101000a81548163ffffffff021916908363ffffffff1602179055508684866040518563ffffffff1660e01b815260040162000b5f949392919062000f4e565b602060405180830381600087803b15801562000b7a57600080fd5b505af115801562000b8f573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000bb5919062000f8d565b50505050505050565b60008060009054906101000a90046001600160a01b03166001600160a01b03166363012de56040518163ffffffff1660e01b815260040160206040518083038186803b15801562000c0e57600080fd5b505afa15801562000c23573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000c49919062000fb9565b905090565b6119d78062000fda83390190565b6001600160a01b038116811462000c7257600080fd5b50565b60006020828403121562000c8857600080fd5b813562000c958162000c5c565b9392505050565b60008083601f84011262000caf57600080fd5b50813567ffffffffffffffff81111562000cc857600080fd5b60208301915083602082850101111562000ce157600080fd5b9250929050565b60008060008060006060868803121562000d0157600080fd5b853562000d0e8162000c5c565b9450602086013567ffffffffffffffff8082111562000d2c57600080fd5b62000d3a89838a0162000c9c565b9096509450604088013591508082111562000d5457600080fd5b5062000d638882890162000c9c565b969995985093965092949392505050565b60008060006060848603121562000d8a57600080fd5b833562000d978162000c5c565b925060208401359150604084013562000db08162000c5c565b809150509250925092565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b60408152600062000dfa60408301868862000dbb565b828103602084015262000e0f81858762000dbb565b979650505050505050565b60006001600160a01b0380891683528088166020840152506080604083015262000e4960808301868862000dbb565b828103606084015262000e5e81858762000dbb565b9998505050505050505050565b6000815180845260005b8181101562000e935760208185018101518683018201520162000e75565b8181111562000ea6576000602083870101525b50601f01601f19169290920160200192915050565b602081526001600160a01b038251166020820152600060208301516060604084015262000eec608084018262000e6b565b9050604084015160608401528091505092915050565b600063ffffffff8083168181141562000f44577f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6001019392505050565b600063ffffffff80871683528086166020840152506080604083015262000f79608083018562000e6b565b905060ff8316606083015295945050505050565b60006020828403121562000fa057600080fd5b815167ffffffffffffffff8116811462000c9557600080fd5b60006020828403121562000fcc57600080fd5b815162000c958162000c5c56fe6080604052600580546001600160a01b03191673deb34a740eca1ec42c8b8204cbec0ba34fdd27f31790553480156200003757600080fd5b50604051620019d7380380620019d78339810160408190526200005a91620002e3565b8181818181600390805190602001906200007692919062000170565b5080516200008c90600490602084019062000170565b5050505050620000c37fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c2177533620000cb60201b60201c565b50506200038a565b60008281526007602090815260408083206001600160a01b038516845290915290205460ff166200016c5760008281526007602090815260408083206001600160a01b03851684529091529020805460ff191660011790556200012b3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45b5050565b8280546200017e906200034d565b90600052602060002090601f016020900481019282620001a25760008555620001ed565b82601f10620001bd57805160ff1916838001178555620001ed565b82800160010185558215620001ed579182015b82811115620001ed578251825591602001919060010190620001d0565b50620001fb929150620001ff565b5090565b5b80821115620001fb576000815560010162000200565b634e487b7160e01b600052604160045260246000fd5b600082601f8301126200023e57600080fd5b81516001600160401b03808211156200025b576200025b62000216565b604051601f8301601f19908116603f0116810190828211818310171562000286576200028662000216565b81604052838152602092508683858801011115620002a357600080fd5b600091505b83821015620002c75785820183015181830184015290820190620002a8565b83821115620002d95760008385830101525b9695505050505050565b60008060408385031215620002f757600080fd5b82516001600160401b03808211156200030f57600080fd5b6200031d868387016200022c565b935060208501519150808211156200033457600080fd5b5062000343858286016200022c565b9150509250929050565b600181811c908216806200036257607f821691505b602082108114156200038457634e487b7160e01b600052602260045260246000fd5b50919050565b61163d806200039a6000396000f3fe608060405234801561001057600080fd5b50600436106101775760003560e01c806339509351116100d8578063979005ad1161008c578063a9059cbb11610066578063a9059cbb1461031a578063d547741f1461032d578063dd62ed3e1461034057600080fd5b8063979005ad146102ec578063a217fddf146102ff578063a457c2d71461030757600080fd5b806375b238fc116100bd57806375b238fc1461028457806391d14854146102ab57806395d89b41146102e457600080fd5b8063395093511461025e57806370a082311461027157600080fd5b806323b872dd1161012f5780632f2ff15d116101145780632f2ff15d14610229578063313ce5671461023c57806336568abe1461024b57600080fd5b806323b872dd146101f3578063248a9ca31461020657600080fd5b8063095ea7b311610160578063095ea7b3146101b957806318160ddd146101cc5780631dd319cb146101de57600080fd5b806301ffc9a71461017c57806306fdde03146101a4575b600080fd5b61018f61018a3660046112f7565b610353565b60405190151581526020015b60405180910390f35b6101ac6103ec565b60405161019b9190611365565b61018f6101c73660046113b4565b61047e565b6002545b60405190815260200161019b565b6101f16101ec3660046113b4565b610496565b005b61018f6102013660046113de565b61052d565b6101d061021436600461141a565b60009081526007602052604090206001015490565b6101f1610237366004611433565b610551565b6040516012815260200161019b565b6101f1610259366004611433565b610577565b61018f61026c3660046113b4565b610603565b6101d061027f36600461145f565b610642565b6101d07fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c2177581565b61018f6102b9366004611433565b60009182526007602090815260408084206001600160a01b0393909316845291905290205460ff1690565b6101ac6106ea565b6101f16102fa3660046113b4565b6106f9565b6101d0600081565b61018f6103153660046113b4565b61072e565b61018f6103283660046113b4565b6107d8565b6101f161033b366004611433565b6107e6565b6101d061034e36600461147a565b61080c565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f7965db0b0000000000000000000000000000000000000000000000000000000014806103e657507f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316145b92915050565b6060600380546103fb906114a4565b80601f0160208091040260200160405190810160405280929190818152602001828054610427906114a4565b80156104745780601f1061044957610100808354040283529160200191610474565b820191906000526020600020905b81548152906001019060200180831161045757829003601f168201915b5050505050905090565b60003361048c81858561091d565b5060019392505050565b7fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c217756104c18133610a75565b816104cb84610642565b101561051e5760405162461bcd60e51b815260206004820152601560248201527f496e73756666696369656e742062616c616e63652e000000000000000000000060448201526064015b60405180910390fd5b6105288383610af5565b505050565b60003361053b858285610c7a565b610546858585610cf4565b506001949350505050565b60008281526007602052604090206001015461056d8133610a75565b6105288383610f0b565b6001600160a01b03811633146105f55760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201527f20726f6c657320666f722073656c6600000000000000000000000000000000006064820152608401610515565b6105ff8282610fad565b5050565b3360008181526001602090815260408083206001600160a01b038716845290915281205490919061048c908290869061063d9087906114f5565b61091d565b6000326001600160a01b0383161415610673576001600160a01b0382166000908152602081905260409020546103e6565b336001600160a01b03831614156106a2576001600160a01b0382166000908152602081905260409020546103e6565b60405162461bcd60e51b815260206004820152601f60248201527f4e6f7420616c6c6f77656420746f2072656164207468652062616c616e6365006044820152606401610515565b6060600480546103fb906114a4565b7fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c217756107248133610a75565b6105288383611030565b3360008181526001602090815260408083206001600160a01b0387168452909152812054909190838110156107cb5760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f7760448201527f207a65726f0000000000000000000000000000000000000000000000000000006064820152608401610515565b610546828686840361091d565b60003361048c818585610cf4565b6000828152600760205260409020600101546108028133610a75565b6105288383610fad565b6000326001600160a01b038416148061082d5750326001600160a01b038316145b15610860576001600160a01b038084166000908152600160209081526040808320938616835292905220545b90506103e6565b336001600160a01b038416148061087f5750336001600160a01b038316145b156108af576001600160a01b03808416600090815260016020908152604080832093861683529290522054610859565b60405162461bcd60e51b815260206004820152602160248201527f4e6f7420616c6c6f77656420746f20726561642074686520616c6c6f77616e6360448201527f65000000000000000000000000000000000000000000000000000000000000006064820152608401610515565b6001600160a01b0383166109985760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460448201527f72657373000000000000000000000000000000000000000000000000000000006064820152608401610515565b6001600160a01b038216610a145760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f20616464726560448201527f73730000000000000000000000000000000000000000000000000000000000006064820152608401610515565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b60008281526007602090815260408083206001600160a01b038516845290915290205460ff166105ff57610ab3816001600160a01b0316601461110f565b610abe83602061110f565b604051602001610acf92919061150d565b60408051601f198184030181529082905262461bcd60e51b825261051591600401611365565b6001600160a01b038216610b715760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f2061646472657360448201527f73000000000000000000000000000000000000000000000000000000000000006064820152608401610515565b6001600160a01b03821660009081526020819052604090205481811015610c005760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e60448201527f63650000000000000000000000000000000000000000000000000000000000006064820152608401610515565b6001600160a01b0383166000908152602081905260408120838303905560028054849290610c2f90849061158e565b90915550506040518281526000906001600160a01b038516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a3505050565b6000610c86848461080c565b90506000198114610cee5781811015610ce15760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e63650000006044820152606401610515565b610cee848484840361091d565b50505050565b6001600160a01b038316610d705760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f20616460448201527f64726573730000000000000000000000000000000000000000000000000000006064820152608401610515565b6001600160a01b038216610dec5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201527f65737300000000000000000000000000000000000000000000000000000000006064820152608401610515565b6001600160a01b03831660009081526020819052604090205481811015610e7b5760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e742065786365656473206260448201527f616c616e636500000000000000000000000000000000000000000000000000006064820152608401610515565b6001600160a01b03808516600090815260208190526040808220858503905591851681529081208054849290610eb29084906114f5565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef84604051610efe91815260200190565b60405180910390a3610cee565b60008281526007602090815260408083206001600160a01b038516845290915290205460ff166105ff5760008281526007602090815260408083206001600160a01b03851684529091529020805460ff19166001179055610f693390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b60008281526007602090815260408083206001600160a01b038516845290915290205460ff16156105ff5760008281526007602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b6001600160a01b0382166110865760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152606401610515565b806002600082825461109891906114f5565b90915550506001600160a01b038216600090815260208190526040812080548392906110c59084906114f5565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b6060600061111e8360026115a5565b6111299060026114f5565b67ffffffffffffffff811115611141576111416115c4565b6040519080825280601f01601f19166020018201604052801561116b576020820181803683370190505b5090507f3000000000000000000000000000000000000000000000000000000000000000816000815181106111a2576111a26115da565b60200101906001600160f81b031916908160001a9053507f7800000000000000000000000000000000000000000000000000000000000000816001815181106111ed576111ed6115da565b60200101906001600160f81b031916908160001a90535060006112118460026115a5565b61121c9060016114f5565b90505b60018111156112a1577f303132333435363738396162636465660000000000000000000000000000000085600f166010811061125d5761125d6115da565b1a60f81b828281518110611273576112736115da565b60200101906001600160f81b031916908160001a90535060049490941c9361129a816115f0565b905061121f565b5083156112f05760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610515565b9392505050565b60006020828403121561130957600080fd5b81357fffffffff00000000000000000000000000000000000000000000000000000000811681146112f057600080fd5b60005b8381101561135457818101518382015260200161133c565b83811115610cee5750506000910152565b6020815260008251806020840152611384816040850160208701611339565b601f01601f19169190910160400192915050565b80356001600160a01b03811681146113af57600080fd5b919050565b600080604083850312156113c757600080fd5b6113d083611398565b946020939093013593505050565b6000806000606084860312156113f357600080fd5b6113fc84611398565b925061140a60208501611398565b9150604084013590509250925092565b60006020828403121561142c57600080fd5b5035919050565b6000806040838503121561144657600080fd5b8235915061145660208401611398565b90509250929050565b60006020828403121561147157600080fd5b6112f082611398565b6000806040838503121561148d57600080fd5b61149683611398565b915061145660208401611398565b600181811c908216806114b857607f821691505b602082108114156114d957634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b60008219821115611508576115086114df565b500190565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260008351611545816017850160208801611339565b7f206973206d697373696e6720726f6c65200000000000000000000000000000006017918401918201528351611582816028840160208801611339565b01602801949350505050565b6000828210156115a0576115a06114df565b500390565b60008160001904831182151516156115bf576115bf6114df565b500290565b634e487b7160e01b600052604160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b6000816115ff576115ff6114df565b50600019019056fea2646970667358221220848f35fdc28f22577d7d393858f44350cbde245dc770487cf991c8a21210b53864736f6c63430008090033a26469706673582212201cb68080b09cb661012c058defbf9bd2a3be17a1afc6d3912fd82b970de25b5d64736f6c63430008090033", + Bin: "0x60806040526001805463ffffffff60a01b191690553480156200002157600080fd5b5060405162002b7f38038062002b7f83398101604081905262000044916200012c565b600080546001600160a01b0319166001600160a01b038416908117909155604080516350d113fd60e11b8152905184929163a1a227fa916004808301926020929190829003018186803b1580156200009b57600080fd5b505afa158015620000b0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620000d6919062000164565b600180546001600160a01b039283166001600160a01b031991821617909155600580549490921693169290921790915550620001899050565b80516001600160a01b03811681146200012757600080fd5b919050565b600080604083850312156200014057600080fd5b6200014b836200010f565b91506200015b602084016200010f565b90509250929050565b6000602082840312156200017757600080fd5b62000182826200010f565b9392505050565b6129e680620001996000396000f3fe6080604052600436106200008a5760003560e01c80639813c7b211620000555780639813c7b214620002065780639e405b711462000256578063a381c8e21462000290578063d5c6b50414620002b55762000103565b80628d48e3146200014c5780631888d71214620001a3578063458ffd6314620001bc57806383bece4d14620001e15762000103565b36620001035760405162461bcd60e51b815260206004820152602360248201527f436f6e747261637420646f6573206e6f7420737570706f72742072656365697660448201527f652829000000000000000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b60405162461bcd60e51b815260206004820152601d60248201527f66616c6c6261636b2829206d6574686f6420756e737570706f727465640000006044820152606401620000fa565b3480156200015957600080fd5b50620001866200016b36600462000c75565b6004602052600090815260409020546001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b620001ba620001b436600462000c75565b620002ef565b005b348015620001c957600080fd5b50620001ba620001db36600462000ce8565b620004a0565b348015620001ee57600080fd5b50620001ba6200020036600462000d74565b620006be565b3480156200021357600080fd5b50620002456200022536600462000c75565b6001600160a01b0390811660009081526002602052604090205416151590565b60405190151581526020016200019a565b3480156200026357600080fd5b50620001866200027536600462000c75565b6003602052600090815260409020546001600160a01b031681565b3480156200029d57600080fd5b50620001ba620002af36600462000d74565b62000901565b348015620002c257600080fd5b5062000186620002d436600462000c75565b6002602052600090815260409020546001600160a01b031681565b60003411620003415760405162461bcd60e51b815260206004820152600d60248201527f4e6f7468696e672073656e742e000000000000000000000000000000000000006044820152606401620000fa565b6000805260026020527fac33ff75c19e70fe83507db0d683fd3465c996598dc972688b7ace676c89077b546001600160a01b0316620003c35760405162461bcd60e51b815260206004820152601560248201527f4e6f206d617070696e6720666f7220746f6b656e2e00000000000000000000006044820152606401620000fa565b600080805260036020527f3617319a054d772f909f7c479a2cebe5066e836a939412e32403c99029b92eff546040516001600160a01b03918216602482015234604482015290831660648201526383bece4d60e01b9060840160408051601f198184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff00000000000000000000000000000000000000000000000000000000909316929092179091526005549091506200049c906001600160a01b03168260005b60008062000a90565b5050565b6005546000546001600160a01b0391821691163314620005295760405162461bcd60e51b815260206004820152603060248201527f436f6e74726163742063616c6c6572206973206e6f742074686520726567697360448201527f7465726564206d657373656e67657221000000000000000000000000000000006064820152608401620000fa565b806001600160a01b03166200053d62000bbe565b6001600160a01b031614620005bb5760405162461bcd60e51b815260206004820152603160248201527f43726f737320636861696e206d65737361676520636f6d696e672066726f6d2060448201527f696e636f72726563742073656e646572210000000000000000000000000000006064820152608401620000fa565b600085858585604051620005cf9062000c4e565b620005de949392919062000de4565b604051809103906000f080158015620005fb573d6000803e3d6000fd5b506001600160a01b03808216600081815260026020908152604080832080547fffffffffffffffffffffffff00000000000000000000000000000000000000009081168617909155600383528184208054968f169682168717905594835260049091529081902080549093169091179091555190915081907f30c05779f384e0ae9d43bbf7ec4417f28bdc53d02a35551b6eb270a9c4c71dca90620006ac908a9084908b908b908b908b9062000e1a565b60405180910390a15050505050505050565b6005546000546001600160a01b0391821691163314620007475760405162461bcd60e51b815260206004820152603060248201527f436f6e74726163742063616c6c6572206973206e6f742074686520726567697360448201527f7465726564206d657373656e67657221000000000000000000000000000000006064820152608401620000fa565b806001600160a01b03166200075b62000bbe565b6001600160a01b031614620007d95760405162461bcd60e51b815260206004820152603160248201527f43726f737320636861696e206d65737361676520636f6d696e672066726f6d2060448201527f696e636f72726563742073656e646572210000000000000000000000000000006064820152608401620000fa565b6001600160a01b038085166000908152600460209081526040808320548416808452600290925290912054909116806200087c5760405162461bcd60e51b815260206004820152602b60248201527f526563656976696e672061737365747320666f7220756e6b6e6f776e2077726160448201527f7070656420746f6b656e210000000000000000000000000000000000000000006064820152608401620000fa565b6040517f979005ad0000000000000000000000000000000000000000000000000000000081526001600160a01b0385811660048301526024820187905282169063979005ad90604401600060405180830381600087803b158015620008e057600080fd5b505af1158015620008f5573d6000803e3d6000fd5b50505050505050505050565b6001600160a01b03808416600090815260026020526040902054166200096a5760405162461bcd60e51b815260206004820152601560248201527f4e6f206d617070696e6720666f7220746f6b656e2e00000000000000000000006044820152606401620000fa565b6001600160a01b03838116600090815260026020526040908190205490517f1dd319cb000000000000000000000000000000000000000000000000000000008152336004820152602481018590529116908190631dd319cb90604401600060405180830381600087803b158015620009e157600080fd5b505af1158015620009f6573d6000803e3d6000fd5b505050506001600160a01b03848116600090815260036020908152604080832054815190851660248201526044810188905286851660648083019190915282518083039091018152608490910190915290810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff166383bece4d60e01b179052600554909262000a8992911690839062000493565b5050505050565b60006040518060600160405280876001600160a01b031681526020018681526020018481525060405160200162000ac8919062000ebb565b60408051808303601f19018152919052600180549192506001600160a01b0382169163b1454caa917401000000000000000000000000000000000000000090910463ffffffff1690601462000b1d8362000f02565b91906101000a81548163ffffffff021916908363ffffffff1602179055508684866040518563ffffffff1660e01b815260040162000b5f949392919062000f4e565b602060405180830381600087803b15801562000b7a57600080fd5b505af115801562000b8f573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000bb5919062000f8d565b50505050505050565b60008060009054906101000a90046001600160a01b03166001600160a01b03166363012de56040518163ffffffff1660e01b815260040160206040518083038186803b15801562000c0e57600080fd5b505afa15801562000c23573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000c49919062000fb9565b905090565b6119d78062000fda83390190565b6001600160a01b038116811462000c7257600080fd5b50565b60006020828403121562000c8857600080fd5b813562000c958162000c5c565b9392505050565b60008083601f84011262000caf57600080fd5b50813567ffffffffffffffff81111562000cc857600080fd5b60208301915083602082850101111562000ce157600080fd5b9250929050565b60008060008060006060868803121562000d0157600080fd5b853562000d0e8162000c5c565b9450602086013567ffffffffffffffff8082111562000d2c57600080fd5b62000d3a89838a0162000c9c565b9096509450604088013591508082111562000d5457600080fd5b5062000d638882890162000c9c565b969995985093965092949392505050565b60008060006060848603121562000d8a57600080fd5b833562000d978162000c5c565b925060208401359150604084013562000db08162000c5c565b809150509250925092565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b60408152600062000dfa60408301868862000dbb565b828103602084015262000e0f81858762000dbb565b979650505050505050565b60006001600160a01b0380891683528088166020840152506080604083015262000e4960808301868862000dbb565b828103606084015262000e5e81858762000dbb565b9998505050505050505050565b6000815180845260005b8181101562000e935760208185018101518683018201520162000e75565b8181111562000ea6576000602083870101525b50601f01601f19169290920160200192915050565b602081526001600160a01b038251166020820152600060208301516060604084015262000eec608084018262000e6b565b9050604084015160608401528091505092915050565b600063ffffffff8083168181141562000f44577f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6001019392505050565b600063ffffffff80871683528086166020840152506080604083015262000f79608083018562000e6b565b905060ff8316606083015295945050505050565b60006020828403121562000fa057600080fd5b815167ffffffffffffffff8116811462000c9557600080fd5b60006020828403121562000fcc57600080fd5b815162000c958162000c5c56fe6080604052600580546001600160a01b03191673deb34a740eca1ec42c8b8204cbec0ba34fdd27f31790553480156200003757600080fd5b50604051620019d7380380620019d78339810160408190526200005a91620002e3565b8181818181600390805190602001906200007692919062000170565b5080516200008c90600490602084019062000170565b5050505050620000c37fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c2177533620000cb60201b60201c565b50506200038a565b60008281526007602090815260408083206001600160a01b038516845290915290205460ff166200016c5760008281526007602090815260408083206001600160a01b03851684529091529020805460ff191660011790556200012b3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45b5050565b8280546200017e906200034d565b90600052602060002090601f016020900481019282620001a25760008555620001ed565b82601f10620001bd57805160ff1916838001178555620001ed565b82800160010185558215620001ed579182015b82811115620001ed578251825591602001919060010190620001d0565b50620001fb929150620001ff565b5090565b5b80821115620001fb576000815560010162000200565b634e487b7160e01b600052604160045260246000fd5b600082601f8301126200023e57600080fd5b81516001600160401b03808211156200025b576200025b62000216565b604051601f8301601f19908116603f0116810190828211818310171562000286576200028662000216565b81604052838152602092508683858801011115620002a357600080fd5b600091505b83821015620002c75785820183015181830184015290820190620002a8565b83821115620002d95760008385830101525b9695505050505050565b60008060408385031215620002f757600080fd5b82516001600160401b03808211156200030f57600080fd5b6200031d868387016200022c565b935060208501519150808211156200033457600080fd5b5062000343858286016200022c565b9150509250929050565b600181811c908216806200036257607f821691505b602082108114156200038457634e487b7160e01b600052602260045260246000fd5b50919050565b61163d806200039a6000396000f3fe608060405234801561001057600080fd5b50600436106101775760003560e01c806339509351116100d8578063979005ad1161008c578063a9059cbb11610066578063a9059cbb1461031a578063d547741f1461032d578063dd62ed3e1461034057600080fd5b8063979005ad146102ec578063a217fddf146102ff578063a457c2d71461030757600080fd5b806375b238fc116100bd57806375b238fc1461028457806391d14854146102ab57806395d89b41146102e457600080fd5b8063395093511461025e57806370a082311461027157600080fd5b806323b872dd1161012f5780632f2ff15d116101145780632f2ff15d14610229578063313ce5671461023c57806336568abe1461024b57600080fd5b806323b872dd146101f3578063248a9ca31461020657600080fd5b8063095ea7b311610160578063095ea7b3146101b957806318160ddd146101cc5780631dd319cb146101de57600080fd5b806301ffc9a71461017c57806306fdde03146101a4575b600080fd5b61018f61018a3660046112f7565b610353565b60405190151581526020015b60405180910390f35b6101ac6103ec565b60405161019b9190611365565b61018f6101c73660046113b4565b61047e565b6002545b60405190815260200161019b565b6101f16101ec3660046113b4565b610496565b005b61018f6102013660046113de565b61052d565b6101d061021436600461141a565b60009081526007602052604090206001015490565b6101f1610237366004611433565b610551565b6040516012815260200161019b565b6101f1610259366004611433565b610577565b61018f61026c3660046113b4565b610603565b6101d061027f36600461145f565b610642565b6101d07fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c2177581565b61018f6102b9366004611433565b60009182526007602090815260408084206001600160a01b0393909316845291905290205460ff1690565b6101ac6106ea565b6101f16102fa3660046113b4565b6106f9565b6101d0600081565b61018f6103153660046113b4565b61072e565b61018f6103283660046113b4565b6107d8565b6101f161033b366004611433565b6107e6565b6101d061034e36600461147a565b61080c565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f7965db0b0000000000000000000000000000000000000000000000000000000014806103e657507f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316145b92915050565b6060600380546103fb906114a4565b80601f0160208091040260200160405190810160405280929190818152602001828054610427906114a4565b80156104745780601f1061044957610100808354040283529160200191610474565b820191906000526020600020905b81548152906001019060200180831161045757829003601f168201915b5050505050905090565b60003361048c81858561091d565b5060019392505050565b7fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c217756104c18133610a75565b816104cb84610642565b101561051e5760405162461bcd60e51b815260206004820152601560248201527f496e73756666696369656e742062616c616e63652e000000000000000000000060448201526064015b60405180910390fd5b6105288383610af5565b505050565b60003361053b858285610c7a565b610546858585610cf4565b506001949350505050565b60008281526007602052604090206001015461056d8133610a75565b6105288383610f0b565b6001600160a01b03811633146105f55760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201527f20726f6c657320666f722073656c6600000000000000000000000000000000006064820152608401610515565b6105ff8282610fad565b5050565b3360008181526001602090815260408083206001600160a01b038716845290915281205490919061048c908290869061063d9087906114f5565b61091d565b6000326001600160a01b0383161415610673576001600160a01b0382166000908152602081905260409020546103e6565b336001600160a01b03831614156106a2576001600160a01b0382166000908152602081905260409020546103e6565b60405162461bcd60e51b815260206004820152601f60248201527f4e6f7420616c6c6f77656420746f2072656164207468652062616c616e6365006044820152606401610515565b6060600480546103fb906114a4565b7fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c217756107248133610a75565b6105288383611030565b3360008181526001602090815260408083206001600160a01b0387168452909152812054909190838110156107cb5760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f7760448201527f207a65726f0000000000000000000000000000000000000000000000000000006064820152608401610515565b610546828686840361091d565b60003361048c818585610cf4565b6000828152600760205260409020600101546108028133610a75565b6105288383610fad565b6000326001600160a01b038416148061082d5750326001600160a01b038316145b15610860576001600160a01b038084166000908152600160209081526040808320938616835292905220545b90506103e6565b336001600160a01b038416148061087f5750336001600160a01b038316145b156108af576001600160a01b03808416600090815260016020908152604080832093861683529290522054610859565b60405162461bcd60e51b815260206004820152602160248201527f4e6f7420616c6c6f77656420746f20726561642074686520616c6c6f77616e6360448201527f65000000000000000000000000000000000000000000000000000000000000006064820152608401610515565b6001600160a01b0383166109985760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460448201527f72657373000000000000000000000000000000000000000000000000000000006064820152608401610515565b6001600160a01b038216610a145760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f20616464726560448201527f73730000000000000000000000000000000000000000000000000000000000006064820152608401610515565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b60008281526007602090815260408083206001600160a01b038516845290915290205460ff166105ff57610ab3816001600160a01b0316601461110f565b610abe83602061110f565b604051602001610acf92919061150d565b60408051601f198184030181529082905262461bcd60e51b825261051591600401611365565b6001600160a01b038216610b715760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f2061646472657360448201527f73000000000000000000000000000000000000000000000000000000000000006064820152608401610515565b6001600160a01b03821660009081526020819052604090205481811015610c005760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e60448201527f63650000000000000000000000000000000000000000000000000000000000006064820152608401610515565b6001600160a01b0383166000908152602081905260408120838303905560028054849290610c2f90849061158e565b90915550506040518281526000906001600160a01b038516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a3505050565b6000610c86848461080c565b90506000198114610cee5781811015610ce15760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e63650000006044820152606401610515565b610cee848484840361091d565b50505050565b6001600160a01b038316610d705760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f20616460448201527f64726573730000000000000000000000000000000000000000000000000000006064820152608401610515565b6001600160a01b038216610dec5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201527f65737300000000000000000000000000000000000000000000000000000000006064820152608401610515565b6001600160a01b03831660009081526020819052604090205481811015610e7b5760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e742065786365656473206260448201527f616c616e636500000000000000000000000000000000000000000000000000006064820152608401610515565b6001600160a01b03808516600090815260208190526040808220858503905591851681529081208054849290610eb29084906114f5565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef84604051610efe91815260200190565b60405180910390a3610cee565b60008281526007602090815260408083206001600160a01b038516845290915290205460ff166105ff5760008281526007602090815260408083206001600160a01b03851684529091529020805460ff19166001179055610f693390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b60008281526007602090815260408083206001600160a01b038516845290915290205460ff16156105ff5760008281526007602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b6001600160a01b0382166110865760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152606401610515565b806002600082825461109891906114f5565b90915550506001600160a01b038216600090815260208190526040812080548392906110c59084906114f5565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b6060600061111e8360026115a5565b6111299060026114f5565b67ffffffffffffffff811115611141576111416115c4565b6040519080825280601f01601f19166020018201604052801561116b576020820181803683370190505b5090507f3000000000000000000000000000000000000000000000000000000000000000816000815181106111a2576111a26115da565b60200101906001600160f81b031916908160001a9053507f7800000000000000000000000000000000000000000000000000000000000000816001815181106111ed576111ed6115da565b60200101906001600160f81b031916908160001a90535060006112118460026115a5565b61121c9060016114f5565b90505b60018111156112a1577f303132333435363738396162636465660000000000000000000000000000000085600f166010811061125d5761125d6115da565b1a60f81b828281518110611273576112736115da565b60200101906001600160f81b031916908160001a90535060049490941c9361129a816115f0565b905061121f565b5083156112f05760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610515565b9392505050565b60006020828403121561130957600080fd5b81357fffffffff00000000000000000000000000000000000000000000000000000000811681146112f057600080fd5b60005b8381101561135457818101518382015260200161133c565b83811115610cee5750506000910152565b6020815260008251806020840152611384816040850160208701611339565b601f01601f19169190910160400192915050565b80356001600160a01b03811681146113af57600080fd5b919050565b600080604083850312156113c757600080fd5b6113d083611398565b946020939093013593505050565b6000806000606084860312156113f357600080fd5b6113fc84611398565b925061140a60208501611398565b9150604084013590509250925092565b60006020828403121561142c57600080fd5b5035919050565b6000806040838503121561144657600080fd5b8235915061145660208401611398565b90509250929050565b60006020828403121561147157600080fd5b6112f082611398565b6000806040838503121561148d57600080fd5b61149683611398565b915061145660208401611398565b600181811c908216806114b857607f821691505b602082108114156114d957634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b60008219821115611508576115086114df565b500190565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260008351611545816017850160208801611339565b7f206973206d697373696e6720726f6c65200000000000000000000000000000006017918401918201528351611582816028840160208801611339565b01602801949350505050565b6000828210156115a0576115a06114df565b500390565b60008160001904831182151516156115bf576115bf6114df565b500290565b634e487b7160e01b600052604160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b6000816115ff576115ff6114df565b50600019019056fea26469706673582212201c0c3a851d2bc9f4f94393362a160e99651c656d627113abd657cce4d7d8770964736f6c63430008090033a2646970667358221220f9825dd91174a15483717354b811471c21735f94eeeab98508c31c1e389d5d7164736f6c63430008090033", } // EthereumBridgeABI is the input ABI used to generate the binding from. @@ -157,11 +156,11 @@ func NewEthereumBridgeFilterer(address common.Address, filterer bind.ContractFil // bindEthereumBridge binds a generic wrapper to an already deployed contract. func bindEthereumBridge(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { - parsed, err := EthereumBridgeMetaData.GetAbi() + parsed, err := abi.JSON(strings.NewReader(EthereumBridgeABI)) if err != nil { return nil, err } - return bind.NewBoundContract(address, *parsed, caller, transactor, filterer), nil + return bind.NewBoundContract(address, parsed, caller, transactor, filterer), nil } // Call invokes the (constant) contract method with params as input values and diff --git a/contracts/generated/ManagementContract/ManagementContract.go b/contracts/generated/ManagementContract/ManagementContract.go index 55ce77e434..2f84e90b45 100644 --- a/contracts/generated/ManagementContract/ManagementContract.go +++ b/contracts/generated/ManagementContract/ManagementContract.go @@ -26,7 +26,6 @@ var ( _ = common.Big1 _ = types.BloomLookup _ = event.NewSubscription - _ = abi.ConvertType ) // StructsCrossChainMessage is an auto generated low-level Go binding around an user-defined struct. @@ -53,8 +52,8 @@ type StructsMetaRollup struct { // ManagementContractMetaData contains all meta data concerning the ManagementContract contract. var ManagementContractMetaData = &bind.MetaData{ - ABI: "[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"messageBusAddress\",\"type\":\"address\"}],\"name\":\"LogManagementContractCreated\",\"type\":\"event\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"Hash\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"AggregatorID\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"LastSequenceNumber\",\"type\":\"uint256\"}],\"internalType\":\"structStructs.MetaRollup\",\"name\":\"r\",\"type\":\"tuple\"},{\"internalType\":\"string\",\"name\":\"_rollupData\",\"type\":\"string\"},{\"components\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"sequence\",\"type\":\"uint64\"},{\"internalType\":\"uint32\",\"name\":\"nonce\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"topic\",\"type\":\"uint32\"},{\"internalType\":\"bytes\",\"name\":\"payload\",\"type\":\"bytes\"},{\"internalType\":\"uint8\",\"name\":\"consistencyLevel\",\"type\":\"uint8\"}],\"internalType\":\"structStructs.CrossChainMessage[]\",\"name\":\"messages\",\"type\":\"tuple[]\"}],\"internalType\":\"structStructs.HeaderCrossChainData\",\"name\":\"crossChainData\",\"type\":\"tuple\"}],\"name\":\"AddRollup\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_addr\",\"type\":\"address\"}],\"name\":\"Attested\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"GetHostAddresses\",\"outputs\":[{\"internalType\":\"string[]\",\"name\":\"\",\"type\":\"string[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"rollupHash\",\"type\":\"bytes32\"}],\"name\":\"GetRollupByHash\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"Hash\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"AggregatorID\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"LastSequenceNumber\",\"type\":\"uint256\"}],\"internalType\":\"structStructs.MetaRollup\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_aggregatorID\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_initSecret\",\"type\":\"bytes\"},{\"internalType\":\"string\",\"name\":\"_hostAddress\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"_genesisAttestation\",\"type\":\"string\"}],\"name\":\"InitializeNetworkSecret\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"IsWithdrawalAvailable\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"requestReport\",\"type\":\"string\"}],\"name\":\"RequestNetworkSecret\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"attesterID\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"requesterID\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"attesterSig\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"responseSecret\",\"type\":\"bytes\"},{\"internalType\":\"string\",\"name\":\"hostAddress\",\"type\":\"string\"},{\"internalType\":\"bool\",\"name\":\"verifyAttester\",\"type\":\"bool\"}],\"name\":\"RespondNetworkSecret\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"lastBatchSeqNo\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"messageBus\",\"outputs\":[{\"internalType\":\"contractIMessageBus\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"}]", - Bin: "0x6080604052600060045534801561001557600080fd5b5060405161002290610096565b604051809103906000f08015801561003e573d6000803e3d6000fd5b50600680546001600160a01b0319166001600160a01b039290921691821790556040519081527fbd726cf82ac9c3260b1495107182e336e0654b25c10915648c0cc15b2bb72cbf9060200160405180910390a16100a3565b6110df8061159f83390190565b6114ed806100b26000396000f3fe608060405234801561001057600080fd5b50600436106100be5760003560e01c80638fa0d05311610076578063a52f433c1161005b578063a52f433c14610222578063bbd79e1514610232578063e34fbfc81461024557600080fd5b80638fa0d053146101e4578063a1a227fa146101f757600080fd5b8063440c953b116100a7578063440c953b1461011d57806359a90071146101345780638236a7ba1461014957600080fd5b8063324ff866146100c357806343348b2f146100e1575b600080fd5b6100cb610258565b6040516100d89190610d03565b60405180910390f35b61010d6100ef366004610d92565b6001600160a01b031660009081526001602052604090205460ff1690565b60405190151581526020016100d8565b61012660045481565b6040519081526020016100d8565b610147610142366004610e9b565b610331565b005b6101b1610157366004610f42565b6040805160608082018352600080835260208084018290529284018190528481526005835283902083519182018452805480835260018201546001600160a01b031693830193909352600201549281019290925290911491565b60408051921515835281516020808501919091528201516001600160a01b031683820152015160608201526080016100d8565b6101476101f2366004610f5b565b6103b9565b60065461020a906001600160a01b031681565b6040516001600160a01b0390911681526020016100d8565b600354610100900460ff1661010d565b610147610240366004610fe2565b610453565b6101476102533660046110a8565b6105b6565b60606002805480602002602001604051908101604052809291908181526020016000905b8282101561032857838290600052602060002001805461029b906110ea565b80601f01602080910402602001604051908101604052809291908181526020018280546102c7906110ea565b80156103145780601f106102e957610100808354040283529160200191610314565b820191906000526020600020905b8154815290600101906020018083116102f757829003601f168201915b50505050508152602001906001019061027c565b50505050905090565b60035460ff161561034157600080fd5b60038054600160ff1991821681179092556001600160a01b038816600090815260208381526040822080549093168417909255600280549384018155905284516103b0927f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace0191860190610bca565b50505050505050565b600160006103cd6040870160208801610d92565b6001600160a01b0316815260208101919091526040016000205460ff1661043b5760405162461bcd60e51b815260206004820152601760248201527f61676772656761746f72206e6f7420617474657374656400000000000000000060448201526064015b60405180910390fd5b610444846105d5565b61044d8161060d565b50505050565b6001600160a01b03861660009081526001602052604090205460ff168061047957600080fd5b81156105495760006104af8888868860405160200161049b9493929190611125565b6040516020818303038152906040526106c7565b905060006104bd8288610702565b9050886001600160a01b0316816001600160a01b0316146105465760405162461bcd60e51b815260206004820152602c60248201527f63616c63756c61746564206164647265737320616e642061747465737465724960448201527f4420646f6e74206d6174636800000000000000000000000000000000000000006064820152608401610432565b50505b6001600160a01b03861660009081526001602081815260408320805460ff19168317905560028054928301815590925284516105ac927f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace90920191860190610bca565b5050505050505050565b3360009081526020819052604090206105d0908383610c4e565b505050565b8035600090815260056020526040902081906105f18282611181565b50506004546040820135111561060a5760408101356004555b50565b600061061982806111d8565b9050905060005b818110156105d0576006546001600160a01b0316639730886d61064385806111d8565b8481811061065357610653611222565b90506020028101906106659190611238565b60016040518363ffffffff1660e01b81526004016106849291906112f1565b600060405180830381600087803b15801561069e57600080fd5b505af11580156106b2573d6000803e3d6000fd5b50505050806106c0906113be565b9050610620565b60006106d38251610726565b826040516020016106e59291906113d9565b604051602081830303815290604052805190602001209050919050565b60008060006107118585610860565b9150915061071e816108d0565b509392505050565b60608161076657505060408051808201909152600181527f3000000000000000000000000000000000000000000000000000000000000000602082015290565b8160005b8115610790578061077a816113be565b91506107899050600a8361144a565b915061076a565b60008167ffffffffffffffff8111156107ab576107ab610df8565b6040519080825280601f01601f1916602001820160405280156107d5576020820181803683370190505b5090505b8415610858576107ea60018361145e565b91506107f7600a86611475565b610802906030611489565b60f81b81838151811061081757610817611222565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350610851600a8661144a565b94506107d9565b949350505050565b6000808251604114156108975760208301516040840151606085015160001a61088b87828585610a8b565b945094505050506108c9565b8251604014156108c157602083015160408401516108b6868383610b78565b9350935050506108c9565b506000905060025b9250929050565b60008160048111156108e4576108e46114a1565b14156108ed5750565b6001816004811115610901576109016114a1565b141561094f5760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e617475726500000000000000006044820152606401610432565b6002816004811115610963576109636114a1565b14156109b15760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606401610432565b60038160048111156109c5576109c56114a1565b1415610a1e5760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b6064820152608401610432565b6004816004811115610a3257610a326114a1565b141561060a5760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c604482015261756560f01b6064820152608401610432565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0831115610ac25750600090506003610b6f565b8460ff16601b14158015610ada57508460ff16601c14155b15610aeb5750600090506004610b6f565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015610b3f573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116610b6857600060019250925050610b6f565b9150600090505b94509492505050565b6000807f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff831681610bae60ff86901c601b611489565b9050610bbc87828885610a8b565b935093505050935093915050565b828054610bd6906110ea565b90600052602060002090601f016020900481019282610bf85760008555610c3e565b82601f10610c1157805160ff1916838001178555610c3e565b82800160010185558215610c3e579182015b82811115610c3e578251825591602001919060010190610c23565b50610c4a929150610cc2565b5090565b828054610c5a906110ea565b90600052602060002090601f016020900481019282610c7c5760008555610c3e565b82601f10610c955782800160ff19823516178555610c3e565b82800160010185558215610c3e579182015b82811115610c3e578235825591602001919060010190610ca7565b5b80821115610c4a5760008155600101610cc3565b60005b83811015610cf2578181015183820152602001610cda565b8381111561044d5750506000910152565b6000602080830181845280855180835260408601915060408160051b870101925083870160005b82811015610d7057878503603f1901845281518051808752610d51818989018a8501610cd7565b601f01601f191695909501860194509285019290850190600101610d2a565b5092979650505050505050565b6001600160a01b038116811461060a57600080fd5b600060208284031215610da457600080fd5b8135610daf81610d7d565b9392505050565b60008083601f840112610dc857600080fd5b50813567ffffffffffffffff811115610de057600080fd5b6020830191508360208285010111156108c957600080fd5b634e487b7160e01b600052604160045260246000fd5b600082601f830112610e1f57600080fd5b813567ffffffffffffffff80821115610e3a57610e3a610df8565b604051601f8301601f19908116603f01168101908282118183101715610e6257610e62610df8565b81604052838152866020858801011115610e7b57600080fd5b836020870160208301376000602085830101528094505050505092915050565b60008060008060008060808789031215610eb457600080fd5b8635610ebf81610d7d565b9550602087013567ffffffffffffffff80821115610edc57600080fd5b610ee88a838b01610db6565b90975095506040890135915080821115610f0157600080fd5b610f0d8a838b01610e0e565b94506060890135915080821115610f2357600080fd5b50610f3089828a01610db6565b979a9699509497509295939492505050565b600060208284031215610f5457600080fd5b5035919050565b60008060008084860360a0811215610f7257600080fd5b6060811215610f8057600080fd5b50849350606085013567ffffffffffffffff80821115610f9f57600080fd5b610fab88838901610db6565b90955093506080870135915080821115610fc457600080fd5b50850160208188031215610fd757600080fd5b939692955090935050565b60008060008060008060c08789031215610ffb57600080fd5b863561100681610d7d565b9550602087013561101681610d7d565b9450604087013567ffffffffffffffff8082111561103357600080fd5b61103f8a838b01610e0e565b9550606089013591508082111561105557600080fd5b6110618a838b01610e0e565b9450608089013591508082111561107757600080fd5b5061108489828a01610e0e565b92505060a0870135801515811461109a57600080fd5b809150509295509295509295565b600080602083850312156110bb57600080fd5b823567ffffffffffffffff8111156110d257600080fd5b6110de85828601610db6565b90969095509350505050565b600181811c908216806110fe57607f821691505b6020821081141561111f57634e487b7160e01b600052602260045260246000fd5b50919050565b60006bffffffffffffffffffffffff19808760601b168352808660601b16601484015250835161115c816028850160208801610cd7565b835190830190611173816028840160208801610cd7565b016028019695505050505050565b8135815560018101602083013561119781610d7d565b6001600160a01b0381167fffffffffffffffffffffffff00000000000000000000000000000000000000008354161782555050604082013560028201555050565b6000808335601e198436030181126111ef57600080fd5b83018035915067ffffffffffffffff82111561120a57600080fd5b6020019150600581901b36038213156108c957600080fd5b634e487b7160e01b600052603260045260246000fd5b6000823560be1983360301811261124e57600080fd5b9190910192915050565b803563ffffffff8116811461126c57600080fd5b919050565b6000808335601e1984360301811261128857600080fd5b830160208101925035905067ffffffffffffffff8111156112a857600080fd5b8036038313156108c957600080fd5b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b803560ff8116811461126c57600080fd5b604081526000833561130281610d7d565b6001600160a01b03166040830152602084013567ffffffffffffffff811680821461132c57600080fd5b60608401525061133e60408501611258565b63ffffffff16608083015261135560608501611258565b63ffffffff1660a083015261136d6080850185611271565b60c080850152611382610100850182846112b7565b91505061139160a086016112e0565b60ff1660e084015260209092019290925292915050565b634e487b7160e01b600052601160045260246000fd5b60006000198214156113d2576113d26113a8565b5060010190565b7f19457468657265756d205369676e6564204d6573736167653a0a00000000000081526000835161141181601a850160208801610cd7565b83519083019061142881601a840160208801610cd7565b01601a01949350505050565b634e487b7160e01b600052601260045260246000fd5b60008261145957611459611434565b500490565b600082821015611470576114706113a8565b500390565b60008261148457611484611434565b500690565b6000821982111561149c5761149c6113a8565b500190565b634e487b7160e01b600052602160045260246000fdfea2646970667358221220ebb5984de7c4f9d730ed0ba5cd008fbe0c4de0db6b9a6bcf972fc7009a467c0764736f6c63430008090033608060405234801561001057600080fd5b5061001a3361001f565b61006f565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6110618061007e6000396000f3fe60806040526004361061009a5760003560e01c80638da5cb5b1161006957806399a3ad211161004e57806399a3ad211461022f578063b1454caa1461024f578063f2fde38b1461028857610112565b80638da5cb5b146101e75780639730886d1461020f57610112565b80630fcfbd111461015a57806333a88c721461018d578063346633fb146101bd578063715018a6146101d257610112565b366101125760405162461bcd60e51b815260206004820152602c60248201527f74686520576f726d686f6c6520636f6e747261637420646f6573206e6f74206160448201527f636365707420617373657473000000000000000000000000000000000000000060648201526084015b60405180910390fd5b60405162461bcd60e51b815260206004820152600b60248201527f756e737570706f727465640000000000000000000000000000000000000000006044820152606401610109565b34801561016657600080fd5b5061017a610175366004610997565b6102a8565b6040519081526020015b60405180910390f35b34801561019957600080fd5b506101ad6101a8366004610997565b61035e565b6040519015158152602001610184565b6101d06101cb3660046109e1565b6103b1565b005b3480156101de57600080fd5b506101d061047d565b3480156101f357600080fd5b506000546040516001600160a01b039091168152602001610184565b34801561021b57600080fd5b506101d061022a366004610a0d565b6104e3565b34801561023b57600080fd5b506101d061024a3660046109e1565b610687565b34801561025b57600080fd5b5061026f61026a366004610a83565b610789565b60405167ffffffffffffffff9091168152602001610184565b34801561029457600080fd5b506101d06102a3366004610b30565b6107e2565b600080826040516020016102bc9190610b8c565b60408051601f19818403018152918152815160209283012060008181526001909352912054909150806103575760405162461bcd60e51b815260206004820152602160248201527f54686973206d65737361676520776173206e65766572207375626d697474656460448201527f2e000000000000000000000000000000000000000000000000000000000000006064820152608401610109565b9392505050565b600080826040516020016103729190610b8c565b60408051601f1981840301815291815281516020928301206000818152600190935291205490915080158015906103a95750428111155b949350505050565b6000341180156103c057508034145b6104325760405162461bcd60e51b815260206004820152603060248201527f417474656d7074696e6720746f2073656e642076616c756520776974686f757460448201527f2070726f766964696e67204574686572000000000000000000000000000000006064820152608401610109565b604080513381526001600160a01b0384166020820152348183015290517ff1365f826a788d6c1a955db0eed5ba8642674219c4771f8c65918617511a15609181900360600190a15050565b6000546001600160a01b031633146104d75760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610109565b6104e160006108c4565b565b6000546001600160a01b0316331461053d5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610109565b60006105498242610c8c565b905060008360405160200161055e9190610b8c565b60408051601f19818403018152918152815160209283012060008181526001909352912054909150156105f95760405162461bcd60e51b815260206004820152602160248201527f4d657373616765207375626d6974746564206d6f7265207468616e206f6e636560448201527f21000000000000000000000000000000000000000000000000000000000000006064820152608401610109565b600081815260016020908152604082208490556002919061061c90870187610b30565b6001600160a01b0316815260208101919091526040016000908120906106486080870160608801610ca4565b63ffffffff1681526020808201929092526040016000908120805460018101825590825291902085916004020161067f8282610e81565b505050505050565b6000546001600160a01b031633146106e15760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610109565b6000826001600160a01b03168260405160006040518083038185875af1925050503d806000811461072e576040519150601f19603f3d011682016040523d82523d6000602084013e610733565b606091505b50509050806107845760405162461bcd60e51b815260206004820152601460248201527f6661696c65642073656e64696e672076616c75650000000000000000000000006044820152606401610109565b505050565b600061079433610921565b90507fb93c37389233beb85a3a726c3f15c2d15533ee74cb602f20f490dfffef775937338288888888886040516107d19796959493929190610f9f565b60405180910390a195945050505050565b6000546001600160a01b0316331461083c5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610109565b6001600160a01b0381166108b85760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610109565b6108c1816108c4565b50565b600080546001600160a01b0383811673ffffffffffffffffffffffffffffffffffffffff19831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6001600160a01b0381166000908152600360205260408120805467ffffffffffffffff1691600191906109548385610fff565b92506101000a81548167ffffffffffffffff021916908367ffffffffffffffff160217905550919050565b600060c0828403121561099157600080fd5b50919050565b6000602082840312156109a957600080fd5b813567ffffffffffffffff8111156109c057600080fd5b6103a98482850161097f565b6001600160a01b03811681146108c157600080fd5b600080604083850312156109f457600080fd5b82356109ff816109cc565b946020939093013593505050565b60008060408385031215610a2057600080fd5b823567ffffffffffffffff811115610a3757600080fd5b610a438582860161097f565b95602094909401359450505050565b63ffffffff811681146108c157600080fd5b60ff811681146108c157600080fd5b8035610a7e81610a64565b919050565b600080600080600060808688031215610a9b57600080fd5b8535610aa681610a52565b94506020860135610ab681610a52565b9350604086013567ffffffffffffffff80821115610ad357600080fd5b818801915088601f830112610ae757600080fd5b813581811115610af657600080fd5b896020828501011115610b0857600080fd5b6020830195508094505050506060860135610b2281610a64565b809150509295509295909350565b600060208284031215610b4257600080fd5b8135610357816109cc565b67ffffffffffffffff811681146108c157600080fd5b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b6020815260008235610b9d816109cc565b6001600160a01b0381166020840152506020830135610bbb81610b4d565b67ffffffffffffffff808216604085015260408501359150610bdc82610a52565b63ffffffff808316606086015260608601359250610bf983610a52565b80831660808601525060808501359150601e19853603018212610c1b57600080fd5b90840190813581811115610c2e57600080fd5b803603861315610c3d57600080fd5b60c060a0860152610c5560e086018260208601610b63565b92505050610c6560a08501610a73565b60ff811660c0850152509392505050565b634e487b7160e01b600052601160045260246000fd5b60008219821115610c9f57610c9f610c76565b500190565b600060208284031215610cb657600080fd5b813561035781610a52565b60008135610cce81610a52565b92915050565b6000808335601e19843603018112610ceb57600080fd5b83018035915067ffffffffffffffff821115610d0657600080fd5b602001915036819003821315610d1b57600080fd5b9250929050565b634e487b7160e01b600052604160045260246000fd5b600181811c90821680610d4c57607f821691505b6020821081141561099157634e487b7160e01b600052602260045260246000fd5b601f82111561078457600081815260208120601f850160051c81016020861015610d945750805b601f850160051c820191505b8181101561067f57828155600101610da0565b67ffffffffffffffff831115610dcb57610dcb610d22565b610ddf83610dd98354610d38565b83610d6d565b6000601f841160018114610e135760008515610dfb5750838201355b600019600387901b1c1916600186901b178355610e6d565b600083815260209020601f19861690835b82811015610e445786850135825560209485019460019092019101610e24565b5086821015610e615760001960f88860031b161c19848701351681555b505060018560011b0183555b5050505050565b60008135610cce81610a64565b8135610e8c816109cc565b6001600160a01b038116905081548173ffffffffffffffffffffffffffffffffffffffff1982161783556020840135610ec481610b4d565b7bffffffffffffffff00000000000000000000000000000000000000008160a01b1690507fffffffff0000000000000000000000000000000000000000000000000000000081848285161717855560408601359250610f2283610a52565b921760e09190911b909116178155610f5a610f3f60608401610cc1565b6001830163ffffffff821663ffffffff198254161781555050565b610f676080830183610cd4565b610f75818360028601610db3565b5050610f9b610f8660a08401610e74565b6003830160ff821660ff198254161781555050565b5050565b6001600160a01b038816815267ffffffffffffffff87166020820152600063ffffffff808816604084015280871660608401525060c06080830152610fe860c083018587610b63565b905060ff831660a083015298975050505050505050565b600067ffffffffffffffff80831681851680830382111561102257611022610c76565b0194935050505056fea264697066735822122063109a6cdc9bbd5b431dfdf74254f19660b33a9cf39810db7a8fd6169622f75364736f6c63430008090033", + ABI: "[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"messageBusAddress\",\"type\":\"address\"}],\"name\":\"LogManagementContractCreated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"Hash\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"AggregatorID\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"LastSequenceNumber\",\"type\":\"uint256\"}],\"internalType\":\"structStructs.MetaRollup\",\"name\":\"r\",\"type\":\"tuple\"},{\"internalType\":\"string\",\"name\":\"_rollupData\",\"type\":\"string\"},{\"components\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"sequence\",\"type\":\"uint64\"},{\"internalType\":\"uint32\",\"name\":\"nonce\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"topic\",\"type\":\"uint32\"},{\"internalType\":\"bytes\",\"name\":\"payload\",\"type\":\"bytes\"},{\"internalType\":\"uint8\",\"name\":\"consistencyLevel\",\"type\":\"uint8\"}],\"internalType\":\"structStructs.CrossChainMessage[]\",\"name\":\"messages\",\"type\":\"tuple[]\"}],\"internalType\":\"structStructs.HeaderCrossChainData\",\"name\":\"crossChainData\",\"type\":\"tuple\"}],\"name\":\"AddRollup\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_addr\",\"type\":\"address\"}],\"name\":\"Attested\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"GetHostAddresses\",\"outputs\":[{\"internalType\":\"string[]\",\"name\":\"\",\"type\":\"string[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"rollupHash\",\"type\":\"bytes32\"}],\"name\":\"GetRollupByHash\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"Hash\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"AggregatorID\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"LastSequenceNumber\",\"type\":\"uint256\"}],\"internalType\":\"structStructs.MetaRollup\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_aggregatorID\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_initSecret\",\"type\":\"bytes\"},{\"internalType\":\"string\",\"name\":\"_hostAddress\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"_genesisAttestation\",\"type\":\"string\"}],\"name\":\"InitializeNetworkSecret\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"IsWithdrawalAvailable\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"requestReport\",\"type\":\"string\"}],\"name\":\"RequestNetworkSecret\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"attesterID\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"requesterID\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"attesterSig\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"responseSecret\",\"type\":\"bytes\"},{\"internalType\":\"string\",\"name\":\"hostAddress\",\"type\":\"string\"},{\"internalType\":\"bool\",\"name\":\"verifyAttester\",\"type\":\"bool\"}],\"name\":\"RespondNetworkSecret\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"RetrieveAllBridgeFunds\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"lastBatchSeqNo\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"messageBus\",\"outputs\":[{\"internalType\":\"contractIMessageBus\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", + Bin: "0x6080604052600060055534801561001557600080fd5b5061001f3361009f565b60405161002b906100ef565b604051809103906000f080158015610047573d6000803e3d6000fd5b50600780546001600160a01b0319166001600160a01b039290921691821790556040519081527fbd726cf82ac9c3260b1495107182e336e0654b25c10915648c0cc15b2bb72cbf9060200160405180910390a16100fc565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b611217806118bb83390190565b6117b08061010b6000396000f3fe608060405234801561001057600080fd5b50600436106100ea5760003560e01c80638da5cb5b1161008c578063a52f433c11610066578063a52f433c1461026b578063bbd79e151461027b578063e34fbfc81461028e578063f2fde38b146102a157600080fd5b80638da5cb5b146102205780638fa0d05314610245578063a1a227fa1461025857600080fd5b806359a90071116100c857806359a9007114610160578063715018a614610175578063728109961461017d5780638236a7ba1461018557600080fd5b8063324ff866146100ef57806343348b2f1461010d578063440c953b14610149575b600080fd5b6100f76102b4565b6040516101049190610fd1565b60405180910390f35b61013961011b366004611060565b6001600160a01b031660009081526002602052604090205460ff1690565b6040519015158152602001610104565b61015260055481565b604051908152602001610104565b61017361016e366004611169565b61038d565b005b610173610417565b610173610482565b6101ed610193366004611210565b6040805160608082018352600080835260208084018290529284018190528481526006835283902083519182018452805480835260018201546001600160a01b031693830193909352600201549281019290925290911491565b60408051921515835281516020808501919091528201516001600160a01b03168382015201516060820152608001610104565b6000546001600160a01b03165b6040516001600160a01b039091168152602001610104565b610173610253366004611229565b610554565b60075461022d906001600160a01b031681565b600454610100900460ff16610139565b6101736102893660046112b0565b6105e3565b61017361029c366004611376565b610748565b6101736102af366004611060565b610767565b60606003805480602002602001604051908101604052809291908181526020016000905b828210156103845783829060005260206000200180546102f7906113b8565b80601f0160208091040260200160405190810160405280929190818152602001828054610323906113b8565b80156103705780601f1061034557610100808354040283529160200191610370565b820191906000526020600020905b81548152906001019060200180831161035357829003601f168201915b5050505050815260200190600101906102d8565b50505050905090565b60045460ff161561039d57600080fd5b60048054600160ff1991821681179092556001600160a01b03881660009081526002602090815260408220805490931684179092556003805493840181559052845161040e927fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b0191860190610e98565b50505050505050565b6000546001600160a01b031633146104765760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064015b60405180910390fd5b6104806000610849565b565b6000546001600160a01b031633146104dc5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161046d565b6007546040517f36d2da900000000000000000000000000000000000000000000000000000000081523360048201526001600160a01b03909116906336d2da9090602401600060405180830381600087803b15801561053a57600080fd5b505af115801561054e573d6000803e3d6000fd5b50505050565b600260006105686040870160208801611060565b6001600160a01b0316815260208101919091526040016000205460ff166105d15760405162461bcd60e51b815260206004820152601760248201527f61676772656761746f72206e6f74206174746573746564000000000000000000604482015260640161046d565b6105da846108a6565b61054e816108db565b6001600160a01b03861660009081526002602052604090205460ff168061060957600080fd5b81156106d957600061063f8888868860405160200161062b94939291906113f3565b604051602081830303815290604052610995565b9050600061064d82886109d0565b9050886001600160a01b0316816001600160a01b0316146106d65760405162461bcd60e51b815260206004820152602c60248201527f63616c63756c61746564206164647265737320616e642061747465737465724960448201527f4420646f6e74206d617463680000000000000000000000000000000000000000606482015260840161046d565b50505b6001600160a01b03861660009081526002602090815260408220805460ff19166001908117909155600380549182018155909252845161073e927fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b0191860190610e98565b5050505050505050565b336000908152600160205260409020610762908383610f1c565b505050565b6000546001600160a01b031633146107c15760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161046d565b6001600160a01b03811661083d5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f6464726573730000000000000000000000000000000000000000000000000000606482015260840161046d565b61084681610849565b50565b600080546001600160a01b0383811673ffffffffffffffffffffffffffffffffffffffff19831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b8035600090815260066020526040902081906108c2828261144f565b5050600554604082013511156108465760400135600555565b60006108e7828061149b565b9050905060005b81811015610762576007546001600160a01b0316639730886d610911858061149b565b84818110610921576109216114e5565b905060200281019061093391906114fb565b60016040518363ffffffff1660e01b81526004016109529291906115b4565b600060405180830381600087803b15801561096c57600080fd5b505af1158015610980573d6000803e3d6000fd5b505050508061098e90611681565b90506108ee565b60006109a182516109f4565b826040516020016109b392919061169c565b604051602081830303815290604052805190602001209050919050565b60008060006109df8585610b2e565b915091506109ec81610b9e565b509392505050565b606081610a3457505060408051808201909152600181527f3000000000000000000000000000000000000000000000000000000000000000602082015290565b8160005b8115610a5e5780610a4881611681565b9150610a579050600a8361170d565b9150610a38565b60008167ffffffffffffffff811115610a7957610a796110c6565b6040519080825280601f01601f191660200182016040528015610aa3576020820181803683370190505b5090505b8415610b2657610ab8600183611721565b9150610ac5600a86611738565b610ad090603061174c565b60f81b818381518110610ae557610ae56114e5565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350610b1f600a8661170d565b9450610aa7565b949350505050565b600080825160411415610b655760208301516040840151606085015160001a610b5987828585610d59565b94509450505050610b97565b825160401415610b8f5760208301516040840151610b84868383610e46565b935093505050610b97565b506000905060025b9250929050565b6000816004811115610bb257610bb2611764565b1415610bbb5750565b6001816004811115610bcf57610bcf611764565b1415610c1d5760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e61747572650000000000000000604482015260640161046d565b6002816004811115610c3157610c31611764565b1415610c7f5760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e67746800604482015260640161046d565b6003816004811115610c9357610c93611764565b1415610cec5760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b606482015260840161046d565b6004816004811115610d0057610d00611764565b14156108465760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c604482015261756560f01b606482015260840161046d565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0831115610d905750600090506003610e3d565b8460ff16601b14158015610da857508460ff16601c14155b15610db95750600090506004610e3d565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015610e0d573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116610e3657600060019250925050610e3d565b9150600090505b94509492505050565b6000807f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff831681610e7c60ff86901c601b61174c565b9050610e8a87828885610d59565b935093505050935093915050565b828054610ea4906113b8565b90600052602060002090601f016020900481019282610ec65760008555610f0c565b82601f10610edf57805160ff1916838001178555610f0c565b82800160010185558215610f0c579182015b82811115610f0c578251825591602001919060010190610ef1565b50610f18929150610f90565b5090565b828054610f28906113b8565b90600052602060002090601f016020900481019282610f4a5760008555610f0c565b82601f10610f635782800160ff19823516178555610f0c565b82800160010185558215610f0c579182015b82811115610f0c578235825591602001919060010190610f75565b5b80821115610f185760008155600101610f91565b60005b83811015610fc0578181015183820152602001610fa8565b8381111561054e5750506000910152565b6000602080830181845280855180835260408601915060408160051b870101925083870160005b8281101561103e57878503603f190184528151805180875261101f818989018a8501610fa5565b601f01601f191695909501860194509285019290850190600101610ff8565b5092979650505050505050565b6001600160a01b038116811461084657600080fd5b60006020828403121561107257600080fd5b813561107d8161104b565b9392505050565b60008083601f84011261109657600080fd5b50813567ffffffffffffffff8111156110ae57600080fd5b602083019150836020828501011115610b9757600080fd5b634e487b7160e01b600052604160045260246000fd5b600082601f8301126110ed57600080fd5b813567ffffffffffffffff80821115611108576111086110c6565b604051601f8301601f19908116603f01168101908282118183101715611130576111306110c6565b8160405283815286602085880101111561114957600080fd5b836020870160208301376000602085830101528094505050505092915050565b6000806000806000806080878903121561118257600080fd5b863561118d8161104b565b9550602087013567ffffffffffffffff808211156111aa57600080fd5b6111b68a838b01611084565b909750955060408901359150808211156111cf57600080fd5b6111db8a838b016110dc565b945060608901359150808211156111f157600080fd5b506111fe89828a01611084565b979a9699509497509295939492505050565b60006020828403121561122257600080fd5b5035919050565b60008060008084860360a081121561124057600080fd5b606081121561124e57600080fd5b50849350606085013567ffffffffffffffff8082111561126d57600080fd5b61127988838901611084565b9095509350608087013591508082111561129257600080fd5b508501602081880312156112a557600080fd5b939692955090935050565b60008060008060008060c087890312156112c957600080fd5b86356112d48161104b565b955060208701356112e48161104b565b9450604087013567ffffffffffffffff8082111561130157600080fd5b61130d8a838b016110dc565b9550606089013591508082111561132357600080fd5b61132f8a838b016110dc565b9450608089013591508082111561134557600080fd5b5061135289828a016110dc565b92505060a0870135801515811461136857600080fd5b809150509295509295509295565b6000806020838503121561138957600080fd5b823567ffffffffffffffff8111156113a057600080fd5b6113ac85828601611084565b90969095509350505050565b600181811c908216806113cc57607f821691505b602082108114156113ed57634e487b7160e01b600052602260045260246000fd5b50919050565b60006bffffffffffffffffffffffff19808760601b168352808660601b16601484015250835161142a816028850160208801610fa5565b835190830190611441816028840160208801610fa5565b016028019695505050505050565b813581556001810160208301356114658161104b565b6001600160a01b03811673ffffffffffffffffffffffffffffffffffffffff198354161782555050604082013560028201555050565b6000808335601e198436030181126114b257600080fd5b83018035915067ffffffffffffffff8211156114cd57600080fd5b6020019150600581901b3603821315610b9757600080fd5b634e487b7160e01b600052603260045260246000fd5b6000823560be1983360301811261151157600080fd5b9190910192915050565b803563ffffffff8116811461152f57600080fd5b919050565b6000808335601e1984360301811261154b57600080fd5b830160208101925035905067ffffffffffffffff81111561156b57600080fd5b803603831315610b9757600080fd5b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b803560ff8116811461152f57600080fd5b60408152600083356115c58161104b565b6001600160a01b03166040830152602084013567ffffffffffffffff81168082146115ef57600080fd5b6060840152506116016040850161151b565b63ffffffff1660808301526116186060850161151b565b63ffffffff1660a08301526116306080850185611534565b60c0808501526116456101008501828461157a565b91505061165460a086016115a3565b60ff1660e084015260209092019290925292915050565b634e487b7160e01b600052601160045260246000fd5b60006000198214156116955761169561166b565b5060010190565b7f19457468657265756d205369676e6564204d6573736167653a0a0000000000008152600083516116d481601a850160208801610fa5565b8351908301906116eb81601a840160208801610fa5565b01601a01949350505050565b634e487b7160e01b600052601260045260246000fd5b60008261171c5761171c6116f7565b500490565b6000828210156117335761173361166b565b500390565b600082611747576117476116f7565b500690565b6000821982111561175f5761175f61166b565b500190565b634e487b7160e01b600052602160045260246000fdfea264697066735822122038a4ddddd39f92112fe4d4d8dc34396f1f905ca3dcae2220a147367f95a8c02064736f6c63430008090033608060405234801561001057600080fd5b5061001a3361001f565b61006f565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6111998061007e6000396000f3fe6080604052600436106100b55760003560e01c80638da5cb5b1161006957806399a3ad211161004e57806399a3ad211461026a578063b1454caa1461028a578063f2fde38b146102c35761012d565b80638da5cb5b146102225780639730886d1461024a5761012d565b8063346633fb1161009a578063346633fb146101d857806336d2da90146101ed578063715018a61461020d5761012d565b80630fcfbd111461017557806333a88c72146101a85761012d565b3661012d5760405162461bcd60e51b815260206004820152602c60248201527f74686520576f726d686f6c6520636f6e747261637420646f6573206e6f74206160448201527f636365707420617373657473000000000000000000000000000000000000000060648201526084015b60405180910390fd5b60405162461bcd60e51b815260206004820152600b60248201527f756e737570706f727465640000000000000000000000000000000000000000006044820152606401610124565b34801561018157600080fd5b50610195610190366004610ad3565b6102e3565b6040519081526020015b60405180910390f35b3480156101b457600080fd5b506101c86101c3366004610ad3565b610399565b604051901515815260200161019f565b6101eb6101e6366004610b1d565b6103ec565b005b3480156101f957600080fd5b506101eb610208366004610b49565b6104b8565b34801561021957600080fd5b506101eb6105b9565b34801561022e57600080fd5b506000546040516001600160a01b03909116815260200161019f565b34801561025657600080fd5b506101eb610265366004610b66565b61061f565b34801561027657600080fd5b506101eb610285366004610b1d565b6107c3565b34801561029657600080fd5b506102aa6102a5366004610bdc565b6108c5565b60405167ffffffffffffffff909116815260200161019f565b3480156102cf57600080fd5b506101eb6102de366004610b49565b61091e565b600080826040516020016102f79190610cc8565b60408051601f19818403018152918152815160209283012060008181526001909352912054909150806103925760405162461bcd60e51b815260206004820152602160248201527f54686973206d65737361676520776173206e65766572207375626d697474656460448201527f2e000000000000000000000000000000000000000000000000000000000000006064820152608401610124565b9392505050565b600080826040516020016103ad9190610cc8565b60408051601f1981840301815291815281516020928301206000818152600190935291205490915080158015906103e45750428111155b949350505050565b6000341180156103fb57508034145b61046d5760405162461bcd60e51b815260206004820152603060248201527f417474656d7074696e6720746f2073656e642076616c756520776974686f757460448201527f2070726f766964696e67204574686572000000000000000000000000000000006064820152608401610124565b604080513381526001600160a01b0384166020820152348183015290517ff1365f826a788d6c1a955db0eed5ba8642674219c4771f8c65918617511a15609181900360600190a15050565b6000546001600160a01b031633146105125760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610124565b6000816001600160a01b03164760405160006040518083038185875af1925050503d806000811461055f576040519150601f19603f3d011682016040523d82523d6000602084013e610564565b606091505b50509050806105b55760405162461bcd60e51b815260206004820152601460248201527f6661696c65642073656e64696e672076616c75650000000000000000000000006044820152606401610124565b5050565b6000546001600160a01b031633146106135760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610124565b61061d6000610a00565b565b6000546001600160a01b031633146106795760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610124565b60006106858242610dc8565b905060008360405160200161069a9190610cc8565b60408051601f19818403018152918152815160209283012060008181526001909352912054909150156107355760405162461bcd60e51b815260206004820152602160248201527f4d657373616765207375626d6974746564206d6f7265207468616e206f6e636560448201527f21000000000000000000000000000000000000000000000000000000000000006064820152608401610124565b600081815260016020908152604082208490556002919061075890870187610b49565b6001600160a01b0316815260208101919091526040016000908120906107846080870160608801610de0565b63ffffffff168152602080820192909252604001600090812080546001810182559082529190208591600402016107bb8282610fbd565b505050505050565b6000546001600160a01b0316331461081d5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610124565b6000826001600160a01b03168260405160006040518083038185875af1925050503d806000811461086a576040519150601f19603f3d011682016040523d82523d6000602084013e61086f565b606091505b50509050806108c05760405162461bcd60e51b815260206004820152601460248201527f6661696c65642073656e64696e672076616c75650000000000000000000000006044820152606401610124565b505050565b60006108d033610a5d565b90507fb93c37389233beb85a3a726c3f15c2d15533ee74cb602f20f490dfffef7759373382888888888860405161090d97969594939291906110d7565b60405180910390a195945050505050565b6000546001600160a01b031633146109785760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610124565b6001600160a01b0381166109f45760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610124565b6109fd81610a00565b50565b600080546001600160a01b0383811673ffffffffffffffffffffffffffffffffffffffff19831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6001600160a01b0381166000908152600360205260408120805467ffffffffffffffff169160019190610a908385611137565b92506101000a81548167ffffffffffffffff021916908367ffffffffffffffff160217905550919050565b600060c08284031215610acd57600080fd5b50919050565b600060208284031215610ae557600080fd5b813567ffffffffffffffff811115610afc57600080fd5b6103e484828501610abb565b6001600160a01b03811681146109fd57600080fd5b60008060408385031215610b3057600080fd5b8235610b3b81610b08565b946020939093013593505050565b600060208284031215610b5b57600080fd5b813561039281610b08565b60008060408385031215610b7957600080fd5b823567ffffffffffffffff811115610b9057600080fd5b610b9c85828601610abb565b95602094909401359450505050565b63ffffffff811681146109fd57600080fd5b60ff811681146109fd57600080fd5b8035610bd781610bbd565b919050565b600080600080600060808688031215610bf457600080fd5b8535610bff81610bab565b94506020860135610c0f81610bab565b9350604086013567ffffffffffffffff80821115610c2c57600080fd5b818801915088601f830112610c4057600080fd5b813581811115610c4f57600080fd5b896020828501011115610c6157600080fd5b6020830195508094505050506060860135610c7b81610bbd565b809150509295509295909350565b67ffffffffffffffff811681146109fd57600080fd5b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b6020815260008235610cd981610b08565b6001600160a01b0381166020840152506020830135610cf781610c89565b67ffffffffffffffff808216604085015260408501359150610d1882610bab565b63ffffffff808316606086015260608601359250610d3583610bab565b80831660808601525060808501359150601e19853603018212610d5757600080fd5b90840190813581811115610d6a57600080fd5b803603861315610d7957600080fd5b60c060a0860152610d9160e086018260208601610c9f565b92505050610da160a08501610bcc565b60ff811660c0850152509392505050565b634e487b7160e01b600052601160045260246000fd5b60008219821115610ddb57610ddb610db2565b500190565b600060208284031215610df257600080fd5b813561039281610bab565b60008135610e0a81610bab565b92915050565b6000808335601e19843603018112610e2757600080fd5b83018035915067ffffffffffffffff821115610e4257600080fd5b602001915036819003821315610e5757600080fd5b9250929050565b634e487b7160e01b600052604160045260246000fd5b600181811c90821680610e8857607f821691505b60208210811415610acd57634e487b7160e01b600052602260045260246000fd5b601f8211156108c057600081815260208120601f850160051c81016020861015610ed05750805b601f850160051c820191505b818110156107bb57828155600101610edc565b67ffffffffffffffff831115610f0757610f07610e5e565b610f1b83610f158354610e74565b83610ea9565b6000601f841160018114610f4f5760008515610f375750838201355b600019600387901b1c1916600186901b178355610fa9565b600083815260209020601f19861690835b82811015610f805786850135825560209485019460019092019101610f60565b5086821015610f9d5760001960f88860031b161c19848701351681555b505060018560011b0183555b5050505050565b60008135610e0a81610bbd565b8135610fc881610b08565b6001600160a01b038116905081548173ffffffffffffffffffffffffffffffffffffffff198216178355602084013561100081610c89565b7bffffffffffffffff00000000000000000000000000000000000000008160a01b1690507fffffffff000000000000000000000000000000000000000000000000000000008184828516171785556040860135925061105e83610bab565b921760e09190911b90911617815561109661107b60608401610dfd565b6001830163ffffffff821663ffffffff198254161781555050565b6110a36080830183610e10565b6110b1818360028601610eef565b50506105b56110c260a08401610fb0565b6003830160ff821660ff198254161781555050565b6001600160a01b038816815267ffffffffffffffff87166020820152600063ffffffff808816604084015280871660608401525060c0608083015261112060c083018587610c9f565b905060ff831660a083015298975050505050505050565b600067ffffffffffffffff80831681851680830382111561115a5761115a610db2565b0194935050505056fea26469706673582212204868f18db57f2e292dc3fdf06859212bc2d7ea36d25fe06123502512a3035fcd64736f6c63430008090033", } // ManagementContractABI is the input ABI used to generate the binding from. @@ -179,11 +178,11 @@ func NewManagementContractFilterer(address common.Address, filterer bind.Contrac // bindManagementContract binds a generic wrapper to an already deployed contract. func bindManagementContract(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { - parsed, err := ManagementContractMetaData.GetAbi() + parsed, err := abi.JSON(strings.NewReader(ManagementContractABI)) if err != nil { return nil, err } - return bind.NewBoundContract(address, *parsed, caller, transactor, filterer), nil + return bind.NewBoundContract(address, parsed, caller, transactor, filterer), nil } // Call invokes the (constant) contract method with params as input values and @@ -411,6 +410,37 @@ func (_ManagementContract *ManagementContractCallerSession) MessageBus() (common return _ManagementContract.Contract.MessageBus(&_ManagementContract.CallOpts) } +// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. +// +// Solidity: function owner() view returns(address) +func (_ManagementContract *ManagementContractCaller) Owner(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _ManagementContract.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 (_ManagementContract *ManagementContractSession) Owner() (common.Address, error) { + return _ManagementContract.Contract.Owner(&_ManagementContract.CallOpts) +} + +// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. +// +// Solidity: function owner() view returns(address) +func (_ManagementContract *ManagementContractCallerSession) Owner() (common.Address, error) { + return _ManagementContract.Contract.Owner(&_ManagementContract.CallOpts) +} + // AddRollup is a paid mutator transaction binding the contract method 0x8fa0d053. // // Solidity: function AddRollup((bytes32,address,uint256) r, string _rollupData, ((address,uint64,uint32,uint32,bytes,uint8)[]) crossChainData) returns() @@ -495,6 +525,69 @@ func (_ManagementContract *ManagementContractTransactorSession) RespondNetworkSe return _ManagementContract.Contract.RespondNetworkSecret(&_ManagementContract.TransactOpts, attesterID, requesterID, attesterSig, responseSecret, hostAddress, verifyAttester) } +// RetrieveAllBridgeFunds is a paid mutator transaction binding the contract method 0x72810996. +// +// Solidity: function RetrieveAllBridgeFunds() returns() +func (_ManagementContract *ManagementContractTransactor) RetrieveAllBridgeFunds(opts *bind.TransactOpts) (*types.Transaction, error) { + return _ManagementContract.contract.Transact(opts, "RetrieveAllBridgeFunds") +} + +// RetrieveAllBridgeFunds is a paid mutator transaction binding the contract method 0x72810996. +// +// Solidity: function RetrieveAllBridgeFunds() returns() +func (_ManagementContract *ManagementContractSession) RetrieveAllBridgeFunds() (*types.Transaction, error) { + return _ManagementContract.Contract.RetrieveAllBridgeFunds(&_ManagementContract.TransactOpts) +} + +// RetrieveAllBridgeFunds is a paid mutator transaction binding the contract method 0x72810996. +// +// Solidity: function RetrieveAllBridgeFunds() returns() +func (_ManagementContract *ManagementContractTransactorSession) RetrieveAllBridgeFunds() (*types.Transaction, error) { + return _ManagementContract.Contract.RetrieveAllBridgeFunds(&_ManagementContract.TransactOpts) +} + +// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. +// +// Solidity: function renounceOwnership() returns() +func (_ManagementContract *ManagementContractTransactor) RenounceOwnership(opts *bind.TransactOpts) (*types.Transaction, error) { + return _ManagementContract.contract.Transact(opts, "renounceOwnership") +} + +// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. +// +// Solidity: function renounceOwnership() returns() +func (_ManagementContract *ManagementContractSession) RenounceOwnership() (*types.Transaction, error) { + return _ManagementContract.Contract.RenounceOwnership(&_ManagementContract.TransactOpts) +} + +// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. +// +// Solidity: function renounceOwnership() returns() +func (_ManagementContract *ManagementContractTransactorSession) RenounceOwnership() (*types.Transaction, error) { + return _ManagementContract.Contract.RenounceOwnership(&_ManagementContract.TransactOpts) +} + +// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// +// Solidity: function transferOwnership(address newOwner) returns() +func (_ManagementContract *ManagementContractTransactor) TransferOwnership(opts *bind.TransactOpts, newOwner common.Address) (*types.Transaction, error) { + return _ManagementContract.contract.Transact(opts, "transferOwnership", newOwner) +} + +// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// +// Solidity: function transferOwnership(address newOwner) returns() +func (_ManagementContract *ManagementContractSession) TransferOwnership(newOwner common.Address) (*types.Transaction, error) { + return _ManagementContract.Contract.TransferOwnership(&_ManagementContract.TransactOpts, newOwner) +} + +// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// +// Solidity: function transferOwnership(address newOwner) returns() +func (_ManagementContract *ManagementContractTransactorSession) TransferOwnership(newOwner common.Address) (*types.Transaction, error) { + return _ManagementContract.Contract.TransferOwnership(&_ManagementContract.TransactOpts, newOwner) +} + // ManagementContractLogManagementContractCreatedIterator is returned from FilterLogManagementContractCreated and is used to iterate over the raw logs and unpacked data for LogManagementContractCreated events raised by the ManagementContract contract. type ManagementContractLogManagementContractCreatedIterator struct { Event *ManagementContractLogManagementContractCreated // Event containing the contract specifics and raw log @@ -628,3 +721,156 @@ func (_ManagementContract *ManagementContractFilterer) ParseLogManagementContrac event.Raw = log return event, nil } + +// ManagementContractOwnershipTransferredIterator is returned from FilterOwnershipTransferred and is used to iterate over the raw logs and unpacked data for OwnershipTransferred events raised by the ManagementContract contract. +type ManagementContractOwnershipTransferredIterator struct { + Event *ManagementContractOwnershipTransferred // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *ManagementContractOwnershipTransferredIterator) 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(ManagementContractOwnershipTransferred) + 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(ManagementContractOwnershipTransferred) + 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 *ManagementContractOwnershipTransferredIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *ManagementContractOwnershipTransferredIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// ManagementContractOwnershipTransferred represents a OwnershipTransferred event raised by the ManagementContract contract. +type ManagementContractOwnershipTransferred 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 (_ManagementContract *ManagementContractFilterer) FilterOwnershipTransferred(opts *bind.FilterOpts, previousOwner []common.Address, newOwner []common.Address) (*ManagementContractOwnershipTransferredIterator, 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 := _ManagementContract.contract.FilterLogs(opts, "OwnershipTransferred", previousOwnerRule, newOwnerRule) + if err != nil { + return nil, err + } + return &ManagementContractOwnershipTransferredIterator{contract: _ManagementContract.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 (_ManagementContract *ManagementContractFilterer) WatchOwnershipTransferred(opts *bind.WatchOpts, sink chan<- *ManagementContractOwnershipTransferred, 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 := _ManagementContract.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(ManagementContractOwnershipTransferred) + if err := _ManagementContract.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 (_ManagementContract *ManagementContractFilterer) ParseOwnershipTransferred(log types.Log) (*ManagementContractOwnershipTransferred, error) { + event := new(ManagementContractOwnershipTransferred) + if err := _ManagementContract.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} diff --git a/contracts/generated/MessageBus/MessageBus.go b/contracts/generated/MessageBus/MessageBus.go index 3e21d47a4e..29fee9ecea 100644 --- a/contracts/generated/MessageBus/MessageBus.go +++ b/contracts/generated/MessageBus/MessageBus.go @@ -26,7 +26,6 @@ var ( _ = common.Big1 _ = types.BloomLookup _ = event.NewSubscription - _ = abi.ConvertType ) // StructsCrossChainMessage is an auto generated low-level Go binding around an user-defined struct. @@ -41,8 +40,8 @@ type StructsCrossChainMessage struct { // MessageBusMetaData contains all meta data concerning the MessageBus contract. var MessageBusMetaData = &bind.MetaData{ - ABI: "[{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"sequence\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"nonce\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"topic\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"payload\",\"type\":\"bytes\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"consistencyLevel\",\"type\":\"uint8\"}],\"name\":\"LogMessagePublished\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"ValueTransfer\",\"type\":\"event\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"inputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"sequence\",\"type\":\"uint64\"},{\"internalType\":\"uint32\",\"name\":\"nonce\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"topic\",\"type\":\"uint32\"},{\"internalType\":\"bytes\",\"name\":\"payload\",\"type\":\"bytes\"},{\"internalType\":\"uint8\",\"name\":\"consistencyLevel\",\"type\":\"uint8\"}],\"internalType\":\"structStructs.CrossChainMessage\",\"name\":\"crossChainMessage\",\"type\":\"tuple\"}],\"name\":\"getMessageTimeOfFinality\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"nonce\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"topic\",\"type\":\"uint32\"},{\"internalType\":\"bytes\",\"name\":\"payload\",\"type\":\"bytes\"},{\"internalType\":\"uint8\",\"name\":\"consistencyLevel\",\"type\":\"uint8\"}],\"name\":\"publishMessage\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"sequence\",\"type\":\"uint64\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"receiveValueFromL2\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"sendValueToL2\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"sequence\",\"type\":\"uint64\"},{\"internalType\":\"uint32\",\"name\":\"nonce\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"topic\",\"type\":\"uint32\"},{\"internalType\":\"bytes\",\"name\":\"payload\",\"type\":\"bytes\"},{\"internalType\":\"uint8\",\"name\":\"consistencyLevel\",\"type\":\"uint8\"}],\"internalType\":\"structStructs.CrossChainMessage\",\"name\":\"crossChainMessage\",\"type\":\"tuple\"},{\"internalType\":\"uint256\",\"name\":\"finalAfterTimestamp\",\"type\":\"uint256\"}],\"name\":\"storeCrossChainMessage\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"sequence\",\"type\":\"uint64\"},{\"internalType\":\"uint32\",\"name\":\"nonce\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"topic\",\"type\":\"uint32\"},{\"internalType\":\"bytes\",\"name\":\"payload\",\"type\":\"bytes\"},{\"internalType\":\"uint8\",\"name\":\"consistencyLevel\",\"type\":\"uint8\"}],\"internalType\":\"structStructs.CrossChainMessage\",\"name\":\"crossChainMessage\",\"type\":\"tuple\"}],\"name\":\"verifyMessageFinalized\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}]", - Bin: "0x608060405234801561001057600080fd5b5061001a3361001f565b61006f565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6110618061007e6000396000f3fe60806040526004361061009a5760003560e01c80638da5cb5b1161006957806399a3ad211161004e57806399a3ad211461022f578063b1454caa1461024f578063f2fde38b1461028857610112565b80638da5cb5b146101e75780639730886d1461020f57610112565b80630fcfbd111461015a57806333a88c721461018d578063346633fb146101bd578063715018a6146101d257610112565b366101125760405162461bcd60e51b815260206004820152602c60248201527f74686520576f726d686f6c6520636f6e747261637420646f6573206e6f74206160448201527f636365707420617373657473000000000000000000000000000000000000000060648201526084015b60405180910390fd5b60405162461bcd60e51b815260206004820152600b60248201527f756e737570706f727465640000000000000000000000000000000000000000006044820152606401610109565b34801561016657600080fd5b5061017a610175366004610997565b6102a8565b6040519081526020015b60405180910390f35b34801561019957600080fd5b506101ad6101a8366004610997565b61035e565b6040519015158152602001610184565b6101d06101cb3660046109e1565b6103b1565b005b3480156101de57600080fd5b506101d061047d565b3480156101f357600080fd5b506000546040516001600160a01b039091168152602001610184565b34801561021b57600080fd5b506101d061022a366004610a0d565b6104e3565b34801561023b57600080fd5b506101d061024a3660046109e1565b610687565b34801561025b57600080fd5b5061026f61026a366004610a83565b610789565b60405167ffffffffffffffff9091168152602001610184565b34801561029457600080fd5b506101d06102a3366004610b30565b6107e2565b600080826040516020016102bc9190610b8c565b60408051601f19818403018152918152815160209283012060008181526001909352912054909150806103575760405162461bcd60e51b815260206004820152602160248201527f54686973206d65737361676520776173206e65766572207375626d697474656460448201527f2e000000000000000000000000000000000000000000000000000000000000006064820152608401610109565b9392505050565b600080826040516020016103729190610b8c565b60408051601f1981840301815291815281516020928301206000818152600190935291205490915080158015906103a95750428111155b949350505050565b6000341180156103c057508034145b6104325760405162461bcd60e51b815260206004820152603060248201527f417474656d7074696e6720746f2073656e642076616c756520776974686f757460448201527f2070726f766964696e67204574686572000000000000000000000000000000006064820152608401610109565b604080513381526001600160a01b0384166020820152348183015290517ff1365f826a788d6c1a955db0eed5ba8642674219c4771f8c65918617511a15609181900360600190a15050565b6000546001600160a01b031633146104d75760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610109565b6104e160006108c4565b565b6000546001600160a01b0316331461053d5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610109565b60006105498242610c8c565b905060008360405160200161055e9190610b8c565b60408051601f19818403018152918152815160209283012060008181526001909352912054909150156105f95760405162461bcd60e51b815260206004820152602160248201527f4d657373616765207375626d6974746564206d6f7265207468616e206f6e636560448201527f21000000000000000000000000000000000000000000000000000000000000006064820152608401610109565b600081815260016020908152604082208490556002919061061c90870187610b30565b6001600160a01b0316815260208101919091526040016000908120906106486080870160608801610ca4565b63ffffffff1681526020808201929092526040016000908120805460018101825590825291902085916004020161067f8282610e81565b505050505050565b6000546001600160a01b031633146106e15760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610109565b6000826001600160a01b03168260405160006040518083038185875af1925050503d806000811461072e576040519150601f19603f3d011682016040523d82523d6000602084013e610733565b606091505b50509050806107845760405162461bcd60e51b815260206004820152601460248201527f6661696c65642073656e64696e672076616c75650000000000000000000000006044820152606401610109565b505050565b600061079433610921565b90507fb93c37389233beb85a3a726c3f15c2d15533ee74cb602f20f490dfffef775937338288888888886040516107d19796959493929190610f9f565b60405180910390a195945050505050565b6000546001600160a01b0316331461083c5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610109565b6001600160a01b0381166108b85760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610109565b6108c1816108c4565b50565b600080546001600160a01b0383811673ffffffffffffffffffffffffffffffffffffffff19831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6001600160a01b0381166000908152600360205260408120805467ffffffffffffffff1691600191906109548385610fff565b92506101000a81548167ffffffffffffffff021916908367ffffffffffffffff160217905550919050565b600060c0828403121561099157600080fd5b50919050565b6000602082840312156109a957600080fd5b813567ffffffffffffffff8111156109c057600080fd5b6103a98482850161097f565b6001600160a01b03811681146108c157600080fd5b600080604083850312156109f457600080fd5b82356109ff816109cc565b946020939093013593505050565b60008060408385031215610a2057600080fd5b823567ffffffffffffffff811115610a3757600080fd5b610a438582860161097f565b95602094909401359450505050565b63ffffffff811681146108c157600080fd5b60ff811681146108c157600080fd5b8035610a7e81610a64565b919050565b600080600080600060808688031215610a9b57600080fd5b8535610aa681610a52565b94506020860135610ab681610a52565b9350604086013567ffffffffffffffff80821115610ad357600080fd5b818801915088601f830112610ae757600080fd5b813581811115610af657600080fd5b896020828501011115610b0857600080fd5b6020830195508094505050506060860135610b2281610a64565b809150509295509295909350565b600060208284031215610b4257600080fd5b8135610357816109cc565b67ffffffffffffffff811681146108c157600080fd5b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b6020815260008235610b9d816109cc565b6001600160a01b0381166020840152506020830135610bbb81610b4d565b67ffffffffffffffff808216604085015260408501359150610bdc82610a52565b63ffffffff808316606086015260608601359250610bf983610a52565b80831660808601525060808501359150601e19853603018212610c1b57600080fd5b90840190813581811115610c2e57600080fd5b803603861315610c3d57600080fd5b60c060a0860152610c5560e086018260208601610b63565b92505050610c6560a08501610a73565b60ff811660c0850152509392505050565b634e487b7160e01b600052601160045260246000fd5b60008219821115610c9f57610c9f610c76565b500190565b600060208284031215610cb657600080fd5b813561035781610a52565b60008135610cce81610a52565b92915050565b6000808335601e19843603018112610ceb57600080fd5b83018035915067ffffffffffffffff821115610d0657600080fd5b602001915036819003821315610d1b57600080fd5b9250929050565b634e487b7160e01b600052604160045260246000fd5b600181811c90821680610d4c57607f821691505b6020821081141561099157634e487b7160e01b600052602260045260246000fd5b601f82111561078457600081815260208120601f850160051c81016020861015610d945750805b601f850160051c820191505b8181101561067f57828155600101610da0565b67ffffffffffffffff831115610dcb57610dcb610d22565b610ddf83610dd98354610d38565b83610d6d565b6000601f841160018114610e135760008515610dfb5750838201355b600019600387901b1c1916600186901b178355610e6d565b600083815260209020601f19861690835b82811015610e445786850135825560209485019460019092019101610e24565b5086821015610e615760001960f88860031b161c19848701351681555b505060018560011b0183555b5050505050565b60008135610cce81610a64565b8135610e8c816109cc565b6001600160a01b038116905081548173ffffffffffffffffffffffffffffffffffffffff1982161783556020840135610ec481610b4d565b7bffffffffffffffff00000000000000000000000000000000000000008160a01b1690507fffffffff0000000000000000000000000000000000000000000000000000000081848285161717855560408601359250610f2283610a52565b921760e09190911b909116178155610f5a610f3f60608401610cc1565b6001830163ffffffff821663ffffffff198254161781555050565b610f676080830183610cd4565b610f75818360028601610db3565b5050610f9b610f8660a08401610e74565b6003830160ff821660ff198254161781555050565b5050565b6001600160a01b038816815267ffffffffffffffff87166020820152600063ffffffff808816604084015280871660608401525060c06080830152610fe860c083018587610b63565b905060ff831660a083015298975050505050505050565b600067ffffffffffffffff80831681851680830382111561102257611022610c76565b0194935050505056fea264697066735822122063109a6cdc9bbd5b431dfdf74254f19660b33a9cf39810db7a8fd6169622f75364736f6c63430008090033", + ABI: "[{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"sequence\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"nonce\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"topic\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"payload\",\"type\":\"bytes\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"consistencyLevel\",\"type\":\"uint8\"}],\"name\":\"LogMessagePublished\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"ValueTransfer\",\"type\":\"event\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"inputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"sequence\",\"type\":\"uint64\"},{\"internalType\":\"uint32\",\"name\":\"nonce\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"topic\",\"type\":\"uint32\"},{\"internalType\":\"bytes\",\"name\":\"payload\",\"type\":\"bytes\"},{\"internalType\":\"uint8\",\"name\":\"consistencyLevel\",\"type\":\"uint8\"}],\"internalType\":\"structStructs.CrossChainMessage\",\"name\":\"crossChainMessage\",\"type\":\"tuple\"}],\"name\":\"getMessageTimeOfFinality\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"nonce\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"topic\",\"type\":\"uint32\"},{\"internalType\":\"bytes\",\"name\":\"payload\",\"type\":\"bytes\"},{\"internalType\":\"uint8\",\"name\":\"consistencyLevel\",\"type\":\"uint8\"}],\"name\":\"publishMessage\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"sequence\",\"type\":\"uint64\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"receiveValueFromL2\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"}],\"name\":\"retrieveAllFunds\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"sendValueToL2\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"sequence\",\"type\":\"uint64\"},{\"internalType\":\"uint32\",\"name\":\"nonce\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"topic\",\"type\":\"uint32\"},{\"internalType\":\"bytes\",\"name\":\"payload\",\"type\":\"bytes\"},{\"internalType\":\"uint8\",\"name\":\"consistencyLevel\",\"type\":\"uint8\"}],\"internalType\":\"structStructs.CrossChainMessage\",\"name\":\"crossChainMessage\",\"type\":\"tuple\"},{\"internalType\":\"uint256\",\"name\":\"finalAfterTimestamp\",\"type\":\"uint256\"}],\"name\":\"storeCrossChainMessage\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"sequence\",\"type\":\"uint64\"},{\"internalType\":\"uint32\",\"name\":\"nonce\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"topic\",\"type\":\"uint32\"},{\"internalType\":\"bytes\",\"name\":\"payload\",\"type\":\"bytes\"},{\"internalType\":\"uint8\",\"name\":\"consistencyLevel\",\"type\":\"uint8\"}],\"internalType\":\"structStructs.CrossChainMessage\",\"name\":\"crossChainMessage\",\"type\":\"tuple\"}],\"name\":\"verifyMessageFinalized\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}]", + Bin: "0x608060405234801561001057600080fd5b5061001a3361001f565b61006f565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6111998061007e6000396000f3fe6080604052600436106100b55760003560e01c80638da5cb5b1161006957806399a3ad211161004e57806399a3ad211461026a578063b1454caa1461028a578063f2fde38b146102c35761012d565b80638da5cb5b146102225780639730886d1461024a5761012d565b8063346633fb1161009a578063346633fb146101d857806336d2da90146101ed578063715018a61461020d5761012d565b80630fcfbd111461017557806333a88c72146101a85761012d565b3661012d5760405162461bcd60e51b815260206004820152602c60248201527f74686520576f726d686f6c6520636f6e747261637420646f6573206e6f74206160448201527f636365707420617373657473000000000000000000000000000000000000000060648201526084015b60405180910390fd5b60405162461bcd60e51b815260206004820152600b60248201527f756e737570706f727465640000000000000000000000000000000000000000006044820152606401610124565b34801561018157600080fd5b50610195610190366004610ad3565b6102e3565b6040519081526020015b60405180910390f35b3480156101b457600080fd5b506101c86101c3366004610ad3565b610399565b604051901515815260200161019f565b6101eb6101e6366004610b1d565b6103ec565b005b3480156101f957600080fd5b506101eb610208366004610b49565b6104b8565b34801561021957600080fd5b506101eb6105b9565b34801561022e57600080fd5b506000546040516001600160a01b03909116815260200161019f565b34801561025657600080fd5b506101eb610265366004610b66565b61061f565b34801561027657600080fd5b506101eb610285366004610b1d565b6107c3565b34801561029657600080fd5b506102aa6102a5366004610bdc565b6108c5565b60405167ffffffffffffffff909116815260200161019f565b3480156102cf57600080fd5b506101eb6102de366004610b49565b61091e565b600080826040516020016102f79190610cc8565b60408051601f19818403018152918152815160209283012060008181526001909352912054909150806103925760405162461bcd60e51b815260206004820152602160248201527f54686973206d65737361676520776173206e65766572207375626d697474656460448201527f2e000000000000000000000000000000000000000000000000000000000000006064820152608401610124565b9392505050565b600080826040516020016103ad9190610cc8565b60408051601f1981840301815291815281516020928301206000818152600190935291205490915080158015906103e45750428111155b949350505050565b6000341180156103fb57508034145b61046d5760405162461bcd60e51b815260206004820152603060248201527f417474656d7074696e6720746f2073656e642076616c756520776974686f757460448201527f2070726f766964696e67204574686572000000000000000000000000000000006064820152608401610124565b604080513381526001600160a01b0384166020820152348183015290517ff1365f826a788d6c1a955db0eed5ba8642674219c4771f8c65918617511a15609181900360600190a15050565b6000546001600160a01b031633146105125760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610124565b6000816001600160a01b03164760405160006040518083038185875af1925050503d806000811461055f576040519150601f19603f3d011682016040523d82523d6000602084013e610564565b606091505b50509050806105b55760405162461bcd60e51b815260206004820152601460248201527f6661696c65642073656e64696e672076616c75650000000000000000000000006044820152606401610124565b5050565b6000546001600160a01b031633146106135760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610124565b61061d6000610a00565b565b6000546001600160a01b031633146106795760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610124565b60006106858242610dc8565b905060008360405160200161069a9190610cc8565b60408051601f19818403018152918152815160209283012060008181526001909352912054909150156107355760405162461bcd60e51b815260206004820152602160248201527f4d657373616765207375626d6974746564206d6f7265207468616e206f6e636560448201527f21000000000000000000000000000000000000000000000000000000000000006064820152608401610124565b600081815260016020908152604082208490556002919061075890870187610b49565b6001600160a01b0316815260208101919091526040016000908120906107846080870160608801610de0565b63ffffffff168152602080820192909252604001600090812080546001810182559082529190208591600402016107bb8282610fbd565b505050505050565b6000546001600160a01b0316331461081d5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610124565b6000826001600160a01b03168260405160006040518083038185875af1925050503d806000811461086a576040519150601f19603f3d011682016040523d82523d6000602084013e61086f565b606091505b50509050806108c05760405162461bcd60e51b815260206004820152601460248201527f6661696c65642073656e64696e672076616c75650000000000000000000000006044820152606401610124565b505050565b60006108d033610a5d565b90507fb93c37389233beb85a3a726c3f15c2d15533ee74cb602f20f490dfffef7759373382888888888860405161090d97969594939291906110d7565b60405180910390a195945050505050565b6000546001600160a01b031633146109785760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610124565b6001600160a01b0381166109f45760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610124565b6109fd81610a00565b50565b600080546001600160a01b0383811673ffffffffffffffffffffffffffffffffffffffff19831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6001600160a01b0381166000908152600360205260408120805467ffffffffffffffff169160019190610a908385611137565b92506101000a81548167ffffffffffffffff021916908367ffffffffffffffff160217905550919050565b600060c08284031215610acd57600080fd5b50919050565b600060208284031215610ae557600080fd5b813567ffffffffffffffff811115610afc57600080fd5b6103e484828501610abb565b6001600160a01b03811681146109fd57600080fd5b60008060408385031215610b3057600080fd5b8235610b3b81610b08565b946020939093013593505050565b600060208284031215610b5b57600080fd5b813561039281610b08565b60008060408385031215610b7957600080fd5b823567ffffffffffffffff811115610b9057600080fd5b610b9c85828601610abb565b95602094909401359450505050565b63ffffffff811681146109fd57600080fd5b60ff811681146109fd57600080fd5b8035610bd781610bbd565b919050565b600080600080600060808688031215610bf457600080fd5b8535610bff81610bab565b94506020860135610c0f81610bab565b9350604086013567ffffffffffffffff80821115610c2c57600080fd5b818801915088601f830112610c4057600080fd5b813581811115610c4f57600080fd5b896020828501011115610c6157600080fd5b6020830195508094505050506060860135610c7b81610bbd565b809150509295509295909350565b67ffffffffffffffff811681146109fd57600080fd5b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b6020815260008235610cd981610b08565b6001600160a01b0381166020840152506020830135610cf781610c89565b67ffffffffffffffff808216604085015260408501359150610d1882610bab565b63ffffffff808316606086015260608601359250610d3583610bab565b80831660808601525060808501359150601e19853603018212610d5757600080fd5b90840190813581811115610d6a57600080fd5b803603861315610d7957600080fd5b60c060a0860152610d9160e086018260208601610c9f565b92505050610da160a08501610bcc565b60ff811660c0850152509392505050565b634e487b7160e01b600052601160045260246000fd5b60008219821115610ddb57610ddb610db2565b500190565b600060208284031215610df257600080fd5b813561039281610bab565b60008135610e0a81610bab565b92915050565b6000808335601e19843603018112610e2757600080fd5b83018035915067ffffffffffffffff821115610e4257600080fd5b602001915036819003821315610e5757600080fd5b9250929050565b634e487b7160e01b600052604160045260246000fd5b600181811c90821680610e8857607f821691505b60208210811415610acd57634e487b7160e01b600052602260045260246000fd5b601f8211156108c057600081815260208120601f850160051c81016020861015610ed05750805b601f850160051c820191505b818110156107bb57828155600101610edc565b67ffffffffffffffff831115610f0757610f07610e5e565b610f1b83610f158354610e74565b83610ea9565b6000601f841160018114610f4f5760008515610f375750838201355b600019600387901b1c1916600186901b178355610fa9565b600083815260209020601f19861690835b82811015610f805786850135825560209485019460019092019101610f60565b5086821015610f9d5760001960f88860031b161c19848701351681555b505060018560011b0183555b5050505050565b60008135610e0a81610bbd565b8135610fc881610b08565b6001600160a01b038116905081548173ffffffffffffffffffffffffffffffffffffffff198216178355602084013561100081610c89565b7bffffffffffffffff00000000000000000000000000000000000000008160a01b1690507fffffffff000000000000000000000000000000000000000000000000000000008184828516171785556040860135925061105e83610bab565b921760e09190911b90911617815561109661107b60608401610dfd565b6001830163ffffffff821663ffffffff198254161781555050565b6110a36080830183610e10565b6110b1818360028601610eef565b50506105b56110c260a08401610fb0565b6003830160ff821660ff198254161781555050565b6001600160a01b038816815267ffffffffffffffff87166020820152600063ffffffff808816604084015280871660608401525060c0608083015261112060c083018587610c9f565b905060ff831660a083015298975050505050505050565b600067ffffffffffffffff80831681851680830382111561115a5761115a610db2565b0194935050505056fea26469706673582212204868f18db57f2e292dc3fdf06859212bc2d7ea36d25fe06123502512a3035fcd64736f6c63430008090033", } // MessageBusABI is the input ABI used to generate the binding from. @@ -167,11 +166,11 @@ func NewMessageBusFilterer(address common.Address, filterer bind.ContractFiltere // bindMessageBus binds a generic wrapper to an already deployed contract. func bindMessageBus(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { - parsed, err := MessageBusMetaData.GetAbi() + parsed, err := abi.JSON(strings.NewReader(MessageBusABI)) if err != nil { return nil, err } - return bind.NewBoundContract(address, *parsed, caller, transactor, filterer), nil + return bind.NewBoundContract(address, parsed, caller, transactor, filterer), nil } // Call invokes the (constant) contract method with params as input values and @@ -368,6 +367,27 @@ func (_MessageBus *MessageBusTransactorSession) RenounceOwnership() (*types.Tran return _MessageBus.Contract.RenounceOwnership(&_MessageBus.TransactOpts) } +// RetrieveAllFunds is a paid mutator transaction binding the contract method 0x36d2da90. +// +// Solidity: function retrieveAllFunds(address receiver) returns() +func (_MessageBus *MessageBusTransactor) RetrieveAllFunds(opts *bind.TransactOpts, receiver common.Address) (*types.Transaction, error) { + return _MessageBus.contract.Transact(opts, "retrieveAllFunds", receiver) +} + +// RetrieveAllFunds is a paid mutator transaction binding the contract method 0x36d2da90. +// +// Solidity: function retrieveAllFunds(address receiver) returns() +func (_MessageBus *MessageBusSession) RetrieveAllFunds(receiver common.Address) (*types.Transaction, error) { + return _MessageBus.Contract.RetrieveAllFunds(&_MessageBus.TransactOpts, receiver) +} + +// RetrieveAllFunds is a paid mutator transaction binding the contract method 0x36d2da90. +// +// Solidity: function retrieveAllFunds(address receiver) returns() +func (_MessageBus *MessageBusTransactorSession) RetrieveAllFunds(receiver common.Address) (*types.Transaction, error) { + return _MessageBus.Contract.RetrieveAllFunds(&_MessageBus.TransactOpts, receiver) +} + // SendValueToL2 is a paid mutator transaction binding the contract method 0x346633fb. // // Solidity: function sendValueToL2(address receiver, uint256 amount) payable returns() diff --git a/contracts/generated/ObsERC20/ObsERC20.go b/contracts/generated/ObsERC20/ObsERC20.go index c12d5386a5..884be63a70 100644 --- a/contracts/generated/ObsERC20/ObsERC20.go +++ b/contracts/generated/ObsERC20/ObsERC20.go @@ -26,13 +26,12 @@ var ( _ = common.Big1 _ = types.BloomLookup _ = event.NewSubscription - _ = abi.ConvertType ) // ObsERC20MetaData contains all meta data concerning the ObsERC20 contract. var ObsERC20MetaData = &bind.MetaData{ ABI: "[{\"inputs\":[{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"symbol\",\"type\":\"string\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"subtractedValue\",\"type\":\"uint256\"}],\"name\":\"decreaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"addedValue\",\"type\":\"uint256\"}],\"name\":\"increaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", - Bin: "0x6080604052600580546001600160a01b03191673deb34a740eca1ec42c8b8204cbec0ba34fdd27f31790553480156200003757600080fd5b5060405162000da838038062000da88339810160408190526200005a9162000207565b8151829082906200007390600390602085019062000094565b5080516200008990600490602084019062000094565b5050505050620002ae565b828054620000a29062000271565b90600052602060002090601f016020900481019282620000c6576000855562000111565b82601f10620000e157805160ff191683800117855562000111565b8280016001018555821562000111579182015b8281111562000111578251825591602001919060010190620000f4565b506200011f92915062000123565b5090565b5b808211156200011f576000815560010162000124565b634e487b7160e01b600052604160045260246000fd5b600082601f8301126200016257600080fd5b81516001600160401b03808211156200017f576200017f6200013a565b604051601f8301601f19908116603f01168101908282118183101715620001aa57620001aa6200013a565b81604052838152602092508683858801011115620001c757600080fd5b600091505b83821015620001eb5785820183015181830184015290820190620001cc565b83821115620001fd5760008385830101525b9695505050505050565b600080604083850312156200021b57600080fd5b82516001600160401b03808211156200023357600080fd5b620002418683870162000150565b935060208501519150808211156200025857600080fd5b50620002678582860162000150565b9150509250929050565b600181811c908216806200028657607f821691505b60208210811415620002a857634e487b7160e01b600052602260045260246000fd5b50919050565b610aea80620002be6000396000f3fe608060405234801561001057600080fd5b50600436106100c95760003560e01c80633950935111610081578063a457c2d71161005b578063a457c2d714610171578063a9059cbb14610184578063dd62ed3e1461019757600080fd5b8063395093511461014357806370a082311461015657806395d89b411461016957600080fd5b806318160ddd116100b257806318160ddd1461010f57806323b872dd14610121578063313ce5671461013457600080fd5b806306fdde03146100ce578063095ea7b3146100ec575b600080fd5b6100d66101aa565b6040516100e39190610927565b60405180910390f35b6100ff6100fa366004610998565b61023c565b60405190151581526020016100e3565b6002545b6040519081526020016100e3565b6100ff61012f3660046109c2565b610256565b604051601281526020016100e3565b6100ff610151366004610998565b61027a565b6101136101643660046109fe565b6102b9565b6100d6610366565b6100ff61017f366004610998565b610375565b6100ff610192366004610998565b61041f565b6101136101a5366004610a20565b61042d565b6060600380546101b990610a53565b80601f01602080910402602001604051908101604052809291908181526020018280546101e590610a53565b80156102325780601f1061020757610100808354040283529160200191610232565b820191906000526020600020905b81548152906001019060200180831161021557829003601f168201915b5050505050905090565b60003361024a81858561053e565b60019150505b92915050565b600033610264858285610696565b61026f858585610710565b506001949350505050565b3360008181526001602090815260408083206001600160a01b038716845290915281205490919061024a90829086906102b4908790610a8e565b61053e565b6000326001600160a01b03831614156102ea576001600160a01b038216600090815260208190526040902054610250565b336001600160a01b0383161415610319576001600160a01b038216600090815260208190526040902054610250565b60405162461bcd60e51b815260206004820152601f60248201527f4e6f7420616c6c6f77656420746f2072656164207468652062616c616e63650060448201526064015b60405180910390fd5b6060600480546101b990610a53565b3360008181526001602090815260408083206001600160a01b0387168452909152812054909190838110156104125760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f7760448201527f207a65726f000000000000000000000000000000000000000000000000000000606482015260840161035d565b61026f828686840361053e565b60003361024a818585610710565b6000326001600160a01b038416148061044e5750326001600160a01b038316145b15610481576001600160a01b038084166000908152600160209081526040808320938616835292905220545b9050610250565b336001600160a01b03841614806104a05750336001600160a01b038316145b156104d0576001600160a01b0380841660009081526001602090815260408083209386168352929052205461047a565b60405162461bcd60e51b815260206004820152602160248201527f4e6f7420616c6c6f77656420746f20726561642074686520616c6c6f77616e6360448201527f6500000000000000000000000000000000000000000000000000000000000000606482015260840161035d565b6001600160a01b0383166105b95760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460448201527f7265737300000000000000000000000000000000000000000000000000000000606482015260840161035d565b6001600160a01b0382166106355760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f20616464726560448201527f7373000000000000000000000000000000000000000000000000000000000000606482015260840161035d565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b60006106a2848461042d565b9050600019811461070a57818110156106fd5760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e6365000000604482015260640161035d565b61070a848484840361053e565b50505050565b6001600160a01b03831661078c5760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f20616460448201527f6472657373000000000000000000000000000000000000000000000000000000606482015260840161035d565b6001600160a01b0382166108085760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201527f6573730000000000000000000000000000000000000000000000000000000000606482015260840161035d565b6001600160a01b038316600090815260208190526040902054818110156108975760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e742065786365656473206260448201527f616c616e63650000000000000000000000000000000000000000000000000000606482015260840161035d565b6001600160a01b038085166000908152602081905260408082208585039055918516815290812080548492906108ce908490610a8e565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405161091a91815260200190565b60405180910390a361070a565b600060208083528351808285015260005b8181101561095457858101830151858201604001528201610938565b81811115610966576000604083870101525b50601f01601f1916929092016040019392505050565b80356001600160a01b038116811461099357600080fd5b919050565b600080604083850312156109ab57600080fd5b6109b48361097c565b946020939093013593505050565b6000806000606084860312156109d757600080fd5b6109e08461097c565b92506109ee6020850161097c565b9150604084013590509250925092565b600060208284031215610a1057600080fd5b610a198261097c565b9392505050565b60008060408385031215610a3357600080fd5b610a3c8361097c565b9150610a4a6020840161097c565b90509250929050565b600181811c90821680610a6757607f821691505b60208210811415610a8857634e487b7160e01b600052602260045260246000fd5b50919050565b60008219821115610aaf57634e487b7160e01b600052601160045260246000fd5b50019056fea2646970667358221220f6355dc25e10a7a88f5076ae4378073f41fca54f570f8ebea7ef5d68bcd1d47b64736f6c63430008090033", + Bin: "0x6080604052600580546001600160a01b03191673deb34a740eca1ec42c8b8204cbec0ba34fdd27f31790553480156200003757600080fd5b5060405162000da838038062000da88339810160408190526200005a9162000207565b8151829082906200007390600390602085019062000094565b5080516200008990600490602084019062000094565b5050505050620002ae565b828054620000a29062000271565b90600052602060002090601f016020900481019282620000c6576000855562000111565b82601f10620000e157805160ff191683800117855562000111565b8280016001018555821562000111579182015b8281111562000111578251825591602001919060010190620000f4565b506200011f92915062000123565b5090565b5b808211156200011f576000815560010162000124565b634e487b7160e01b600052604160045260246000fd5b600082601f8301126200016257600080fd5b81516001600160401b03808211156200017f576200017f6200013a565b604051601f8301601f19908116603f01168101908282118183101715620001aa57620001aa6200013a565b81604052838152602092508683858801011115620001c757600080fd5b600091505b83821015620001eb5785820183015181830184015290820190620001cc565b83821115620001fd5760008385830101525b9695505050505050565b600080604083850312156200021b57600080fd5b82516001600160401b03808211156200023357600080fd5b620002418683870162000150565b935060208501519150808211156200025857600080fd5b50620002678582860162000150565b9150509250929050565b600181811c908216806200028657607f821691505b60208210811415620002a857634e487b7160e01b600052602260045260246000fd5b50919050565b610aea80620002be6000396000f3fe608060405234801561001057600080fd5b50600436106100c95760003560e01c80633950935111610081578063a457c2d71161005b578063a457c2d714610171578063a9059cbb14610184578063dd62ed3e1461019757600080fd5b8063395093511461014357806370a082311461015657806395d89b411461016957600080fd5b806318160ddd116100b257806318160ddd1461010f57806323b872dd14610121578063313ce5671461013457600080fd5b806306fdde03146100ce578063095ea7b3146100ec575b600080fd5b6100d66101aa565b6040516100e39190610927565b60405180910390f35b6100ff6100fa366004610998565b61023c565b60405190151581526020016100e3565b6002545b6040519081526020016100e3565b6100ff61012f3660046109c2565b610256565b604051601281526020016100e3565b6100ff610151366004610998565b61027a565b6101136101643660046109fe565b6102b9565b6100d6610366565b6100ff61017f366004610998565b610375565b6100ff610192366004610998565b61041f565b6101136101a5366004610a20565b61042d565b6060600380546101b990610a53565b80601f01602080910402602001604051908101604052809291908181526020018280546101e590610a53565b80156102325780601f1061020757610100808354040283529160200191610232565b820191906000526020600020905b81548152906001019060200180831161021557829003601f168201915b5050505050905090565b60003361024a81858561053e565b60019150505b92915050565b600033610264858285610696565b61026f858585610710565b506001949350505050565b3360008181526001602090815260408083206001600160a01b038716845290915281205490919061024a90829086906102b4908790610a8e565b61053e565b6000326001600160a01b03831614156102ea576001600160a01b038216600090815260208190526040902054610250565b336001600160a01b0383161415610319576001600160a01b038216600090815260208190526040902054610250565b60405162461bcd60e51b815260206004820152601f60248201527f4e6f7420616c6c6f77656420746f2072656164207468652062616c616e63650060448201526064015b60405180910390fd5b6060600480546101b990610a53565b3360008181526001602090815260408083206001600160a01b0387168452909152812054909190838110156104125760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f7760448201527f207a65726f000000000000000000000000000000000000000000000000000000606482015260840161035d565b61026f828686840361053e565b60003361024a818585610710565b6000326001600160a01b038416148061044e5750326001600160a01b038316145b15610481576001600160a01b038084166000908152600160209081526040808320938616835292905220545b9050610250565b336001600160a01b03841614806104a05750336001600160a01b038316145b156104d0576001600160a01b0380841660009081526001602090815260408083209386168352929052205461047a565b60405162461bcd60e51b815260206004820152602160248201527f4e6f7420616c6c6f77656420746f20726561642074686520616c6c6f77616e6360448201527f6500000000000000000000000000000000000000000000000000000000000000606482015260840161035d565b6001600160a01b0383166105b95760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460448201527f7265737300000000000000000000000000000000000000000000000000000000606482015260840161035d565b6001600160a01b0382166106355760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f20616464726560448201527f7373000000000000000000000000000000000000000000000000000000000000606482015260840161035d565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b60006106a2848461042d565b9050600019811461070a57818110156106fd5760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e6365000000604482015260640161035d565b61070a848484840361053e565b50505050565b6001600160a01b03831661078c5760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f20616460448201527f6472657373000000000000000000000000000000000000000000000000000000606482015260840161035d565b6001600160a01b0382166108085760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201527f6573730000000000000000000000000000000000000000000000000000000000606482015260840161035d565b6001600160a01b038316600090815260208190526040902054818110156108975760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e742065786365656473206260448201527f616c616e63650000000000000000000000000000000000000000000000000000606482015260840161035d565b6001600160a01b038085166000908152602081905260408082208585039055918516815290812080548492906108ce908490610a8e565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405161091a91815260200190565b60405180910390a361070a565b600060208083528351808285015260005b8181101561095457858101830151858201604001528201610938565b81811115610966576000604083870101525b50601f01601f1916929092016040019392505050565b80356001600160a01b038116811461099357600080fd5b919050565b600080604083850312156109ab57600080fd5b6109b48361097c565b946020939093013593505050565b6000806000606084860312156109d757600080fd5b6109e08461097c565b92506109ee6020850161097c565b9150604084013590509250925092565b600060208284031215610a1057600080fd5b610a198261097c565b9392505050565b60008060408385031215610a3357600080fd5b610a3c8361097c565b9150610a4a6020840161097c565b90509250929050565b600181811c90821680610a6757607f821691505b60208210811415610a8857634e487b7160e01b600052602260045260246000fd5b50919050565b60008219821115610aaf57634e487b7160e01b600052601160045260246000fd5b50019056fea2646970667358221220b7e862b33f5871c5f4b68a7ca11e31c10471fae77a607bce0a1253addcb15e0764736f6c63430008090033", } // ObsERC20ABI is the input ABI used to generate the binding from. @@ -157,11 +156,11 @@ func NewObsERC20Filterer(address common.Address, filterer bind.ContractFilterer) // bindObsERC20 binds a generic wrapper to an already deployed contract. func bindObsERC20(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { - parsed, err := ObsERC20MetaData.GetAbi() + parsed, err := abi.JSON(strings.NewReader(ObsERC20ABI)) if err != nil { return nil, err } - return bind.NewBoundContract(address, *parsed, caller, transactor, filterer), nil + return bind.NewBoundContract(address, parsed, caller, transactor, filterer), nil } // Call invokes the (constant) contract method with params as input values and diff --git a/contracts/generated/ObscuroBridge/ObscuroBridge.go b/contracts/generated/ObscuroBridge/ObscuroBridge.go index d292b65a17..5112eccf1a 100644 --- a/contracts/generated/ObscuroBridge/ObscuroBridge.go +++ b/contracts/generated/ObscuroBridge/ObscuroBridge.go @@ -26,13 +26,12 @@ var ( _ = common.Big1 _ = types.BloomLookup _ = event.NewSubscription - _ = abi.ConvertType ) // ObscuroBridgeMetaData contains all meta data concerning the ObscuroBridge contract. var ObscuroBridgeMetaData = &bind.MetaData{ ABI: "[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"messenger\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"previousAdminRole\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"newAdminRole\",\"type\":\"bytes32\"}],\"name\":\"RoleAdminChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"RoleGranted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"RoleRevoked\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"ADMIN_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"DEFAULT_ADMIN_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"ERC20_TOKEN_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"NATIVE_TOKEN_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"}],\"name\":\"getRoleAdmin\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"grantRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"hasRole\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newAdmin\",\"type\":\"address\"}],\"name\":\"promoteToAdmin\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"asset\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"}],\"name\":\"receiveAssets\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"asset\",\"type\":\"address\"}],\"name\":\"removeToken\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"renounceRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"revokeRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"asset\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"}],\"name\":\"sendERC20\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"}],\"name\":\"sendNative\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"bridge\",\"type\":\"address\"}],\"name\":\"setRemoteBridge\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"interfaceId\",\"type\":\"bytes4\"}],\"name\":\"supportsInterface\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"asset\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"symbol\",\"type\":\"string\"}],\"name\":\"whitelistToken\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", - Bin: "0x60806040526001805463ffffffff60a01b191690553480156200002157600080fd5b5060405162001c3838038062001c388339810160408190526200004491620001fc565b600080546001600160a01b0319166001600160a01b038316908117909155604080516350d113fd60e11b8152905183929163a1a227fa916004808301926020929190829003018186803b1580156200009b57600080fd5b505afa158015620000b0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620000d69190620001fc565b600180546001600160a01b0319166001600160a01b039290921691909117905550620001237fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c217753362000157565b620001507fd2fb17ceaa388942529b17e0006ffc4d559f040dd4f2157b8070f17ad2110578600062000157565b506200022e565b60008281526002602090815260408083206001600160a01b038516845290915290205460ff16620001f85760008281526002602090815260408083206001600160a01b03851684529091529020805460ff19166001179055620001b73390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45b5050565b6000602082840312156200020f57600080fd5b81516001600160a01b03811681146200022757600080fd5b9392505050565b6119fa806200023e6000396000f3fe60806040526004361061010e5760003560e01c80635fa7b584116100a557806393b3744211610074578063a381c8e211610059578063a381c8e21461033e578063d547741f1461035e578063e4c3ebc71461037e57600080fd5b806393b3744214610309578063a217fddf1461032957600080fd5b80635fa7b5841461024f57806375b238fc1461026f57806383bece4d146102a357806391d14854146102c357600080fd5b80632f2ff15d116100e15780632f2ff15d146101bb57806336568abe146101db578063498d82ab146101fb5780635d8729701461021b57600080fd5b806301ffc9a71461011357806316ce8149146101485780631888d7121461016a578063248a9ca31461017d575b600080fd5b34801561011f57600080fd5b5061013361012e3660046114fc565b6103b2565b60405190151581526020015b60405180910390f35b34801561015457600080fd5b5061016861016336600461153e565b61041b565b005b61016861017836600461153e565b610481565b34801561018957600080fd5b506101ad61019836600461155b565b60009081526002602052604090206001015490565b60405190815260200161013f565b3480156101c757600080fd5b506101686101d6366004611574565b6105ba565b3480156101e757600080fd5b506101686101f6366004611574565b6105e5565b34801561020757600080fd5b506101686102163660046115ed565b610671565b34801561022757600080fd5b506101ad7f9f225881f6e7ac8a885b63aa2269cbce78dd6a669864ccd2cd2517a8e709d73a81565b34801561025b57600080fd5b5061016861026a36600461153e565b610736565b34801561027b57600080fd5b506101ad7fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c2177581565b3480156102af57600080fd5b506101686102be366004611670565b61078b565b3480156102cf57600080fd5b506101336102de366004611574565b60009182526002602090815260408084206001600160a01b0393909316845291905290205460ff1690565b34801561031557600080fd5b5061016861032436600461153e565b6109ad565b34801561033557600080fd5b506101ad600081565b34801561034a57600080fd5b50610168610359366004611670565b610a02565b34801561036a57600080fd5b50610168610379366004611574565b610baf565b34801561038a57600080fd5b506101ad7fd2fb17ceaa388942529b17e0006ffc4d559f040dd4f2157b8070f17ad211057881565b60006001600160e01b031982167f7965db0b00000000000000000000000000000000000000000000000000000000148061041557507f01ffc9a7000000000000000000000000000000000000000000000000000000006001600160e01b03198316145b92915050565b7fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c217756104468133610bd5565b50600380547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0392909216919091179055565b600034116104d65760405162461bcd60e51b815260206004820152600f60248201527f456d707479207472616e736665722e000000000000000000000000000000000060448201526064015b60405180910390fd5b604080518082018252348082526001600160a01b03848116602093840190815284519384019290925290518116828401528251808303840181526060909201909252600354909161052e91168260025b600080610c55565b6001546001600160a01b03166040517f346633fb0000000000000000000000000000000000000000000000000000000081526001600160a01b038481166004830152346024830181905292169163346633fb916044016000604051808303818588803b15801561059d57600080fd5b505af11580156105b1573d6000803e3d6000fd5b50505050505050565b6000828152600260205260409020600101546105d68133610bd5565b6105e08383610d70565b505050565b6001600160a01b03811633146106635760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201527f20726f6c657320666f722073656c66000000000000000000000000000000000060648201526084016104cd565b61066d8282610e12565b5050565b7fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c2177561069c8133610bd5565b6106c67f9f225881f6e7ac8a885b63aa2269cbce78dd6a669864ccd2cd2517a8e709d73a87610d70565b600063458ffd6360e01b87878787876040516024016106e99594939291906116db565b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b0319909316929092179091526003549091506105b1906001600160a01b0316826001610526565b7fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c217756107618133610bd5565b61066d7f9f225881f6e7ac8a885b63aa2269cbce78dd6a669864ccd2cd2517a8e709d73a83610e12565b6003546000546001600160a01b03918216911633146108125760405162461bcd60e51b815260206004820152603060248201527f436f6e74726163742063616c6c6572206973206e6f742074686520726567697360448201527f7465726564206d657373656e676572210000000000000000000000000000000060648201526084016104cd565b806001600160a01b0316610824610e95565b6001600160a01b0316146108a05760405162461bcd60e51b815260206004820152603160248201527f43726f737320636861696e206d65737361676520636f6d696e672066726f6d2060448201527f696e636f72726563742073656e6465722100000000000000000000000000000060648201526084016104cd565b6001600160a01b03841660009081527f32ef73018533fa188e9e42b313c0a4048c6052342b662fb7510c0d1abcea3413602052604090205460ff16156108f0576108eb848484610f21565b6109a7565b6001600160a01b03841660009081527f13ad2d85210d477fe1a6e25654c8250308cf29b050a4bf0b039d70467486712c602052604090205460ff1615610939576108eb82610f2c565b60405162461bcd60e51b815260206004820152602560248201527f417474656d7074696e6720746f20776974686472617720756e6b6e6f776e206160448201527f737365742e00000000000000000000000000000000000000000000000000000060648201526084016104cd565b50505050565b7fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c217756109d88133610bd5565b61066d7fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c2177583610d70565b60008211610a525760405162461bcd60e51b815260206004820152601a60248201527f417474656d7074696e6720656d707479207472616e736665722e00000000000060448201526064016104cd565b6001600160a01b03831660009081527f32ef73018533fa188e9e42b313c0a4048c6052342b662fb7510c0d1abcea3413602052604090205460ff16610b255760405162461bcd60e51b815260206004820152604e60248201527f54686973206164647265737320686173206e6f74206265656e20676976656e2060448201527f61207479706520616e64206973207468757320636f6e73696465726564206e6f60648201527f742077686974656c69737465642e000000000000000000000000000000000000608482015260a4016104cd565b610b3183333085610fca565b604080516001600160a01b038581166024830152604482018590528381166064808401919091528351808403909101815260849092019092526020810180516001600160e01b03167f83bece4d0000000000000000000000000000000000000000000000000000000017905260035490916109a79116826000610526565b600082815260026020526040902060010154610bcb8133610bd5565b6105e08383610e12565b60008281526002602090815260408083206001600160a01b038516845290915290205460ff1661066d57610c13816001600160a01b0316601461104e565b610c1e83602061104e565b604051602001610c2f929190611749565b60408051601f198184030181529082905262461bcd60e51b82526104cd916004016117f6565b60006040518060600160405280876001600160a01b0316815260200186815260200184815250604051602001610c8b9190611809565b60408051808303601f19018152919052600180549192506001600160a01b0382169163b1454caa917401000000000000000000000000000000000000000090910463ffffffff16906014610cde83611864565b91906101000a81548163ffffffff021916908363ffffffff1602179055508684866040518563ffffffff1660e01b8152600401610d1e9493929190611888565b602060405180830381600087803b158015610d3857600080fd5b505af1158015610d4c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105b191906118c5565b60008281526002602090815260408083206001600160a01b038516845290915290205460ff1661066d5760008281526002602090815260408083206001600160a01b03851684529091529020805460ff19166001179055610dce3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b60008281526002602090815260408083206001600160a01b038516845290915290205460ff161561066d5760008281526002602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b60008060009054906101000a90046001600160a01b03166001600160a01b03166363012de56040518163ffffffff1660e01b815260040160206040518083038186803b158015610ee457600080fd5b505afa158015610ef8573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f1c91906118ef565b905090565b6105e0838284611236565b6040516000906001600160a01b038316908281818181865af19150503d8060008114610f74576040519150601f19603f3d011682016040523d82523d6000602084013e610f79565b606091505b505090508061066d5760405162461bcd60e51b815260206004820152601460248201527f4661696c656420746f2073656e6420457468657200000000000000000000000060448201526064016104cd565b6040516001600160a01b03808516602483015283166044820152606481018290526109a79085907f23b872dd00000000000000000000000000000000000000000000000000000000906084015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b03199093169290921790915261127f565b6060600061105d83600261190c565b61106890600261192b565b67ffffffffffffffff81111561108057611080611943565b6040519080825280601f01601f1916602001820160405280156110aa576020820181803683370190505b5090507f3000000000000000000000000000000000000000000000000000000000000000816000815181106110e1576110e1611959565b60200101906001600160f81b031916908160001a9053507f78000000000000000000000000000000000000000000000000000000000000008160018151811061112c5761112c611959565b60200101906001600160f81b031916908160001a905350600061115084600261190c565b61115b90600161192b565b90505b60018111156111e0577f303132333435363738396162636465660000000000000000000000000000000085600f166010811061119c5761119c611959565b1a60f81b8282815181106111b2576111b2611959565b60200101906001600160f81b031916908160001a90535060049490941c936111d98161196f565b905061115e565b50831561122f5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e7460448201526064016104cd565b9392505050565b6040516001600160a01b0383166024820152604481018290526105e09084907fa9059cbb0000000000000000000000000000000000000000000000000000000090606401611017565b60006112d4826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166113649092919063ffffffff16565b8051909150156105e057808060200190518101906112f29190611986565b6105e05760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f7420737563636565640000000000000000000000000000000000000000000060648201526084016104cd565b6060611373848460008561137b565b949350505050565b6060824710156113f35760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c000000000000000000000000000000000000000000000000000060648201526084016104cd565b6001600160a01b0385163b61144a5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016104cd565b600080866001600160a01b0316858760405161146691906119a8565b60006040518083038185875af1925050503d80600081146114a3576040519150601f19603f3d011682016040523d82523d6000602084013e6114a8565b606091505b50915091506114b88282866114c3565b979650505050505050565b606083156114d257508161122f565b8251156114e25782518084602001fd5b8160405162461bcd60e51b81526004016104cd91906117f6565b60006020828403121561150e57600080fd5b81356001600160e01b03198116811461122f57600080fd5b6001600160a01b038116811461153b57600080fd5b50565b60006020828403121561155057600080fd5b813561122f81611526565b60006020828403121561156d57600080fd5b5035919050565b6000806040838503121561158757600080fd5b82359150602083013561159981611526565b809150509250929050565b60008083601f8401126115b657600080fd5b50813567ffffffffffffffff8111156115ce57600080fd5b6020830191508360208285010111156115e657600080fd5b9250929050565b60008060008060006060868803121561160557600080fd5b853561161081611526565b9450602086013567ffffffffffffffff8082111561162d57600080fd5b61163989838a016115a4565b9096509450604088013591508082111561165257600080fd5b5061165f888289016115a4565b969995985093965092949392505050565b60008060006060848603121561168557600080fd5b833561169081611526565b92506020840135915060408401356116a781611526565b809150509250925092565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b6001600160a01b03861681526060602082015260006116fe6060830186886116b2565b82810360408401526117118185876116b2565b98975050505050505050565b60005b83811015611738578181015183820152602001611720565b838111156109a75750506000910152565b7f416363657373436f6e74726f6c3a206163636f756e742000000000000000000081526000835161178181601785016020880161171d565b7f206973206d697373696e6720726f6c652000000000000000000000000000000060179184019182015283516117be81602884016020880161171d565b01602801949350505050565b600081518084526117e281602086016020860161171d565b601f01601f19169290920160200192915050565b60208152600061122f60208301846117ca565b602081526001600160a01b038251166020820152600060208301516060604084015261183860808401826117ca565b9050604084015160608401528091505092915050565b634e487b7160e01b600052601160045260246000fd5b600063ffffffff8083168181141561187e5761187e61184e565b6001019392505050565b600063ffffffff8087168352808616602084015250608060408301526118b160808301856117ca565b905060ff8316606083015295945050505050565b6000602082840312156118d757600080fd5b815167ffffffffffffffff8116811461122f57600080fd5b60006020828403121561190157600080fd5b815161122f81611526565b60008160001904831182151516156119265761192661184e565b500290565b6000821982111561193e5761193e61184e565b500190565b634e487b7160e01b600052604160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b60008161197e5761197e61184e565b506000190190565b60006020828403121561199857600080fd5b8151801515811461122f57600080fd5b600082516119ba81846020870161171d565b919091019291505056fea26469706673582212206391571edec7bdbf99c2274c97a0cf208d149bda11b9144eb6f7eeff314c453264736f6c63430008090033", + Bin: "0x60806040526001805463ffffffff60a01b191690553480156200002157600080fd5b5060405162001c3838038062001c388339810160408190526200004491620001fc565b600080546001600160a01b0319166001600160a01b038316908117909155604080516350d113fd60e11b8152905183929163a1a227fa916004808301926020929190829003018186803b1580156200009b57600080fd5b505afa158015620000b0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620000d69190620001fc565b600180546001600160a01b0319166001600160a01b039290921691909117905550620001237fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c217753362000157565b620001507fd2fb17ceaa388942529b17e0006ffc4d559f040dd4f2157b8070f17ad2110578600062000157565b506200022e565b60008281526002602090815260408083206001600160a01b038516845290915290205460ff16620001f85760008281526002602090815260408083206001600160a01b03851684529091529020805460ff19166001179055620001b73390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45b5050565b6000602082840312156200020f57600080fd5b81516001600160a01b03811681146200022757600080fd5b9392505050565b6119fa806200023e6000396000f3fe60806040526004361061010e5760003560e01c80635fa7b584116100a557806393b3744211610074578063a381c8e211610059578063a381c8e21461033e578063d547741f1461035e578063e4c3ebc71461037e57600080fd5b806393b3744214610309578063a217fddf1461032957600080fd5b80635fa7b5841461024f57806375b238fc1461026f57806383bece4d146102a357806391d14854146102c357600080fd5b80632f2ff15d116100e15780632f2ff15d146101bb57806336568abe146101db578063498d82ab146101fb5780635d8729701461021b57600080fd5b806301ffc9a71461011357806316ce8149146101485780631888d7121461016a578063248a9ca31461017d575b600080fd5b34801561011f57600080fd5b5061013361012e3660046114fc565b6103b2565b60405190151581526020015b60405180910390f35b34801561015457600080fd5b5061016861016336600461153e565b61041b565b005b61016861017836600461153e565b610481565b34801561018957600080fd5b506101ad61019836600461155b565b60009081526002602052604090206001015490565b60405190815260200161013f565b3480156101c757600080fd5b506101686101d6366004611574565b6105ba565b3480156101e757600080fd5b506101686101f6366004611574565b6105e5565b34801561020757600080fd5b506101686102163660046115ed565b610671565b34801561022757600080fd5b506101ad7f9f225881f6e7ac8a885b63aa2269cbce78dd6a669864ccd2cd2517a8e709d73a81565b34801561025b57600080fd5b5061016861026a36600461153e565b610736565b34801561027b57600080fd5b506101ad7fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c2177581565b3480156102af57600080fd5b506101686102be366004611670565b61078b565b3480156102cf57600080fd5b506101336102de366004611574565b60009182526002602090815260408084206001600160a01b0393909316845291905290205460ff1690565b34801561031557600080fd5b5061016861032436600461153e565b6109ad565b34801561033557600080fd5b506101ad600081565b34801561034a57600080fd5b50610168610359366004611670565b610a02565b34801561036a57600080fd5b50610168610379366004611574565b610baf565b34801561038a57600080fd5b506101ad7fd2fb17ceaa388942529b17e0006ffc4d559f040dd4f2157b8070f17ad211057881565b60006001600160e01b031982167f7965db0b00000000000000000000000000000000000000000000000000000000148061041557507f01ffc9a7000000000000000000000000000000000000000000000000000000006001600160e01b03198316145b92915050565b7fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c217756104468133610bd5565b50600380547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0392909216919091179055565b600034116104d65760405162461bcd60e51b815260206004820152600f60248201527f456d707479207472616e736665722e000000000000000000000000000000000060448201526064015b60405180910390fd5b604080518082018252348082526001600160a01b03848116602093840190815284519384019290925290518116828401528251808303840181526060909201909252600354909161052e91168260025b600080610c55565b6001546001600160a01b03166040517f346633fb0000000000000000000000000000000000000000000000000000000081526001600160a01b038481166004830152346024830181905292169163346633fb916044016000604051808303818588803b15801561059d57600080fd5b505af11580156105b1573d6000803e3d6000fd5b50505050505050565b6000828152600260205260409020600101546105d68133610bd5565b6105e08383610d70565b505050565b6001600160a01b03811633146106635760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201527f20726f6c657320666f722073656c66000000000000000000000000000000000060648201526084016104cd565b61066d8282610e12565b5050565b7fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c2177561069c8133610bd5565b6106c67f9f225881f6e7ac8a885b63aa2269cbce78dd6a669864ccd2cd2517a8e709d73a87610d70565b600063458ffd6360e01b87878787876040516024016106e99594939291906116db565b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b0319909316929092179091526003549091506105b1906001600160a01b0316826001610526565b7fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c217756107618133610bd5565b61066d7f9f225881f6e7ac8a885b63aa2269cbce78dd6a669864ccd2cd2517a8e709d73a83610e12565b6003546000546001600160a01b03918216911633146108125760405162461bcd60e51b815260206004820152603060248201527f436f6e74726163742063616c6c6572206973206e6f742074686520726567697360448201527f7465726564206d657373656e676572210000000000000000000000000000000060648201526084016104cd565b806001600160a01b0316610824610e95565b6001600160a01b0316146108a05760405162461bcd60e51b815260206004820152603160248201527f43726f737320636861696e206d65737361676520636f6d696e672066726f6d2060448201527f696e636f72726563742073656e6465722100000000000000000000000000000060648201526084016104cd565b6001600160a01b03841660009081527f32ef73018533fa188e9e42b313c0a4048c6052342b662fb7510c0d1abcea3413602052604090205460ff16156108f0576108eb848484610f21565b6109a7565b6001600160a01b03841660009081527f13ad2d85210d477fe1a6e25654c8250308cf29b050a4bf0b039d70467486712c602052604090205460ff1615610939576108eb82610f2c565b60405162461bcd60e51b815260206004820152602560248201527f417474656d7074696e6720746f20776974686472617720756e6b6e6f776e206160448201527f737365742e00000000000000000000000000000000000000000000000000000060648201526084016104cd565b50505050565b7fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c217756109d88133610bd5565b61066d7fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c2177583610d70565b60008211610a525760405162461bcd60e51b815260206004820152601a60248201527f417474656d7074696e6720656d707479207472616e736665722e00000000000060448201526064016104cd565b6001600160a01b03831660009081527f32ef73018533fa188e9e42b313c0a4048c6052342b662fb7510c0d1abcea3413602052604090205460ff16610b255760405162461bcd60e51b815260206004820152604e60248201527f54686973206164647265737320686173206e6f74206265656e20676976656e2060448201527f61207479706520616e64206973207468757320636f6e73696465726564206e6f60648201527f742077686974656c69737465642e000000000000000000000000000000000000608482015260a4016104cd565b610b3183333085610fca565b604080516001600160a01b038581166024830152604482018590528381166064808401919091528351808403909101815260849092019092526020810180516001600160e01b03167f83bece4d0000000000000000000000000000000000000000000000000000000017905260035490916109a79116826000610526565b600082815260026020526040902060010154610bcb8133610bd5565b6105e08383610e12565b60008281526002602090815260408083206001600160a01b038516845290915290205460ff1661066d57610c13816001600160a01b0316601461104e565b610c1e83602061104e565b604051602001610c2f929190611749565b60408051601f198184030181529082905262461bcd60e51b82526104cd916004016117f6565b60006040518060600160405280876001600160a01b0316815260200186815260200184815250604051602001610c8b9190611809565b60408051808303601f19018152919052600180549192506001600160a01b0382169163b1454caa917401000000000000000000000000000000000000000090910463ffffffff16906014610cde83611864565b91906101000a81548163ffffffff021916908363ffffffff1602179055508684866040518563ffffffff1660e01b8152600401610d1e9493929190611888565b602060405180830381600087803b158015610d3857600080fd5b505af1158015610d4c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105b191906118c5565b60008281526002602090815260408083206001600160a01b038516845290915290205460ff1661066d5760008281526002602090815260408083206001600160a01b03851684529091529020805460ff19166001179055610dce3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b60008281526002602090815260408083206001600160a01b038516845290915290205460ff161561066d5760008281526002602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b60008060009054906101000a90046001600160a01b03166001600160a01b03166363012de56040518163ffffffff1660e01b815260040160206040518083038186803b158015610ee457600080fd5b505afa158015610ef8573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f1c91906118ef565b905090565b6105e0838284611236565b6040516000906001600160a01b038316908281818181865af19150503d8060008114610f74576040519150601f19603f3d011682016040523d82523d6000602084013e610f79565b606091505b505090508061066d5760405162461bcd60e51b815260206004820152601460248201527f4661696c656420746f2073656e6420457468657200000000000000000000000060448201526064016104cd565b6040516001600160a01b03808516602483015283166044820152606481018290526109a79085907f23b872dd00000000000000000000000000000000000000000000000000000000906084015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b03199093169290921790915261127f565b6060600061105d83600261190c565b61106890600261192b565b67ffffffffffffffff81111561108057611080611943565b6040519080825280601f01601f1916602001820160405280156110aa576020820181803683370190505b5090507f3000000000000000000000000000000000000000000000000000000000000000816000815181106110e1576110e1611959565b60200101906001600160f81b031916908160001a9053507f78000000000000000000000000000000000000000000000000000000000000008160018151811061112c5761112c611959565b60200101906001600160f81b031916908160001a905350600061115084600261190c565b61115b90600161192b565b90505b60018111156111e0577f303132333435363738396162636465660000000000000000000000000000000085600f166010811061119c5761119c611959565b1a60f81b8282815181106111b2576111b2611959565b60200101906001600160f81b031916908160001a90535060049490941c936111d98161196f565b905061115e565b50831561122f5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e7460448201526064016104cd565b9392505050565b6040516001600160a01b0383166024820152604481018290526105e09084907fa9059cbb0000000000000000000000000000000000000000000000000000000090606401611017565b60006112d4826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166113649092919063ffffffff16565b8051909150156105e057808060200190518101906112f29190611986565b6105e05760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f7420737563636565640000000000000000000000000000000000000000000060648201526084016104cd565b6060611373848460008561137b565b949350505050565b6060824710156113f35760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c000000000000000000000000000000000000000000000000000060648201526084016104cd565b6001600160a01b0385163b61144a5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016104cd565b600080866001600160a01b0316858760405161146691906119a8565b60006040518083038185875af1925050503d80600081146114a3576040519150601f19603f3d011682016040523d82523d6000602084013e6114a8565b606091505b50915091506114b88282866114c3565b979650505050505050565b606083156114d257508161122f565b8251156114e25782518084602001fd5b8160405162461bcd60e51b81526004016104cd91906117f6565b60006020828403121561150e57600080fd5b81356001600160e01b03198116811461122f57600080fd5b6001600160a01b038116811461153b57600080fd5b50565b60006020828403121561155057600080fd5b813561122f81611526565b60006020828403121561156d57600080fd5b5035919050565b6000806040838503121561158757600080fd5b82359150602083013561159981611526565b809150509250929050565b60008083601f8401126115b657600080fd5b50813567ffffffffffffffff8111156115ce57600080fd5b6020830191508360208285010111156115e657600080fd5b9250929050565b60008060008060006060868803121561160557600080fd5b853561161081611526565b9450602086013567ffffffffffffffff8082111561162d57600080fd5b61163989838a016115a4565b9096509450604088013591508082111561165257600080fd5b5061165f888289016115a4565b969995985093965092949392505050565b60008060006060848603121561168557600080fd5b833561169081611526565b92506020840135915060408401356116a781611526565b809150509250925092565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b6001600160a01b03861681526060602082015260006116fe6060830186886116b2565b82810360408401526117118185876116b2565b98975050505050505050565b60005b83811015611738578181015183820152602001611720565b838111156109a75750506000910152565b7f416363657373436f6e74726f6c3a206163636f756e742000000000000000000081526000835161178181601785016020880161171d565b7f206973206d697373696e6720726f6c652000000000000000000000000000000060179184019182015283516117be81602884016020880161171d565b01602801949350505050565b600081518084526117e281602086016020860161171d565b601f01601f19169290920160200192915050565b60208152600061122f60208301846117ca565b602081526001600160a01b038251166020820152600060208301516060604084015261183860808401826117ca565b9050604084015160608401528091505092915050565b634e487b7160e01b600052601160045260246000fd5b600063ffffffff8083168181141561187e5761187e61184e565b6001019392505050565b600063ffffffff8087168352808616602084015250608060408301526118b160808301856117ca565b905060ff8316606083015295945050505050565b6000602082840312156118d757600080fd5b815167ffffffffffffffff8116811461122f57600080fd5b60006020828403121561190157600080fd5b815161122f81611526565b60008160001904831182151516156119265761192661184e565b500290565b6000821982111561193e5761193e61184e565b500190565b634e487b7160e01b600052604160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b60008161197e5761197e61184e565b506000190190565b60006020828403121561199857600080fd5b8151801515811461122f57600080fd5b600082516119ba81846020870161171d565b919091019291505056fea2646970667358221220894ec32d6644e213b6ae6c4bce90ec23ae4371dcc2b3b897983b8d8cc7f8a6db64736f6c63430008090033", } // ObscuroBridgeABI is the input ABI used to generate the binding from. @@ -157,11 +156,11 @@ func NewObscuroBridgeFilterer(address common.Address, filterer bind.ContractFilt // bindObscuroBridge binds a generic wrapper to an already deployed contract. func bindObscuroBridge(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { - parsed, err := ObscuroBridgeMetaData.GetAbi() + parsed, err := abi.JSON(strings.NewReader(ObscuroBridgeABI)) if err != nil { return nil, err } - return bind.NewBoundContract(address, *parsed, caller, transactor, filterer), nil + return bind.NewBoundContract(address, parsed, caller, transactor, filterer), nil } // Call invokes the (constant) contract method with params as input values and diff --git a/contracts/generated/WrappedERC20/WrappedERC20.go b/contracts/generated/WrappedERC20/WrappedERC20.go index 658dbb7682..027cddc229 100644 --- a/contracts/generated/WrappedERC20/WrappedERC20.go +++ b/contracts/generated/WrappedERC20/WrappedERC20.go @@ -26,13 +26,12 @@ var ( _ = common.Big1 _ = types.BloomLookup _ = event.NewSubscription - _ = abi.ConvertType ) // WrappedERC20MetaData contains all meta data concerning the WrappedERC20 contract. var WrappedERC20MetaData = &bind.MetaData{ ABI: "[{\"inputs\":[{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"symbol\",\"type\":\"string\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"previousAdminRole\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"newAdminRole\",\"type\":\"bytes32\"}],\"name\":\"RoleAdminChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"RoleGranted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"RoleRevoked\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"ADMIN_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"DEFAULT_ADMIN_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"giver\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"burnFor\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"subtractedValue\",\"type\":\"uint256\"}],\"name\":\"decreaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"}],\"name\":\"getRoleAdmin\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"grantRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"hasRole\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"addedValue\",\"type\":\"uint256\"}],\"name\":\"increaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"issueFor\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"renounceRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"revokeRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"interfaceId\",\"type\":\"bytes4\"}],\"name\":\"supportsInterface\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", - Bin: "0x6080604052600580546001600160a01b03191673deb34a740eca1ec42c8b8204cbec0ba34fdd27f31790553480156200003757600080fd5b50604051620019d7380380620019d78339810160408190526200005a91620002e3565b8181818181600390805190602001906200007692919062000170565b5080516200008c90600490602084019062000170565b5050505050620000c37fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c2177533620000cb60201b60201c565b50506200038a565b60008281526007602090815260408083206001600160a01b038516845290915290205460ff166200016c5760008281526007602090815260408083206001600160a01b03851684529091529020805460ff191660011790556200012b3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45b5050565b8280546200017e906200034d565b90600052602060002090601f016020900481019282620001a25760008555620001ed565b82601f10620001bd57805160ff1916838001178555620001ed565b82800160010185558215620001ed579182015b82811115620001ed578251825591602001919060010190620001d0565b50620001fb929150620001ff565b5090565b5b80821115620001fb576000815560010162000200565b634e487b7160e01b600052604160045260246000fd5b600082601f8301126200023e57600080fd5b81516001600160401b03808211156200025b576200025b62000216565b604051601f8301601f19908116603f0116810190828211818310171562000286576200028662000216565b81604052838152602092508683858801011115620002a357600080fd5b600091505b83821015620002c75785820183015181830184015290820190620002a8565b83821115620002d95760008385830101525b9695505050505050565b60008060408385031215620002f757600080fd5b82516001600160401b03808211156200030f57600080fd5b6200031d868387016200022c565b935060208501519150808211156200033457600080fd5b5062000343858286016200022c565b9150509250929050565b600181811c908216806200036257607f821691505b602082108114156200038457634e487b7160e01b600052602260045260246000fd5b50919050565b61163d806200039a6000396000f3fe608060405234801561001057600080fd5b50600436106101775760003560e01c806339509351116100d8578063979005ad1161008c578063a9059cbb11610066578063a9059cbb1461031a578063d547741f1461032d578063dd62ed3e1461034057600080fd5b8063979005ad146102ec578063a217fddf146102ff578063a457c2d71461030757600080fd5b806375b238fc116100bd57806375b238fc1461028457806391d14854146102ab57806395d89b41146102e457600080fd5b8063395093511461025e57806370a082311461027157600080fd5b806323b872dd1161012f5780632f2ff15d116101145780632f2ff15d14610229578063313ce5671461023c57806336568abe1461024b57600080fd5b806323b872dd146101f3578063248a9ca31461020657600080fd5b8063095ea7b311610160578063095ea7b3146101b957806318160ddd146101cc5780631dd319cb146101de57600080fd5b806301ffc9a71461017c57806306fdde03146101a4575b600080fd5b61018f61018a3660046112f7565b610353565b60405190151581526020015b60405180910390f35b6101ac6103ec565b60405161019b9190611365565b61018f6101c73660046113b4565b61047e565b6002545b60405190815260200161019b565b6101f16101ec3660046113b4565b610496565b005b61018f6102013660046113de565b61052d565b6101d061021436600461141a565b60009081526007602052604090206001015490565b6101f1610237366004611433565b610551565b6040516012815260200161019b565b6101f1610259366004611433565b610577565b61018f61026c3660046113b4565b610603565b6101d061027f36600461145f565b610642565b6101d07fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c2177581565b61018f6102b9366004611433565b60009182526007602090815260408084206001600160a01b0393909316845291905290205460ff1690565b6101ac6106ea565b6101f16102fa3660046113b4565b6106f9565b6101d0600081565b61018f6103153660046113b4565b61072e565b61018f6103283660046113b4565b6107d8565b6101f161033b366004611433565b6107e6565b6101d061034e36600461147a565b61080c565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f7965db0b0000000000000000000000000000000000000000000000000000000014806103e657507f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316145b92915050565b6060600380546103fb906114a4565b80601f0160208091040260200160405190810160405280929190818152602001828054610427906114a4565b80156104745780601f1061044957610100808354040283529160200191610474565b820191906000526020600020905b81548152906001019060200180831161045757829003601f168201915b5050505050905090565b60003361048c81858561091d565b5060019392505050565b7fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c217756104c18133610a75565b816104cb84610642565b101561051e5760405162461bcd60e51b815260206004820152601560248201527f496e73756666696369656e742062616c616e63652e000000000000000000000060448201526064015b60405180910390fd5b6105288383610af5565b505050565b60003361053b858285610c7a565b610546858585610cf4565b506001949350505050565b60008281526007602052604090206001015461056d8133610a75565b6105288383610f0b565b6001600160a01b03811633146105f55760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201527f20726f6c657320666f722073656c6600000000000000000000000000000000006064820152608401610515565b6105ff8282610fad565b5050565b3360008181526001602090815260408083206001600160a01b038716845290915281205490919061048c908290869061063d9087906114f5565b61091d565b6000326001600160a01b0383161415610673576001600160a01b0382166000908152602081905260409020546103e6565b336001600160a01b03831614156106a2576001600160a01b0382166000908152602081905260409020546103e6565b60405162461bcd60e51b815260206004820152601f60248201527f4e6f7420616c6c6f77656420746f2072656164207468652062616c616e6365006044820152606401610515565b6060600480546103fb906114a4565b7fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c217756107248133610a75565b6105288383611030565b3360008181526001602090815260408083206001600160a01b0387168452909152812054909190838110156107cb5760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f7760448201527f207a65726f0000000000000000000000000000000000000000000000000000006064820152608401610515565b610546828686840361091d565b60003361048c818585610cf4565b6000828152600760205260409020600101546108028133610a75565b6105288383610fad565b6000326001600160a01b038416148061082d5750326001600160a01b038316145b15610860576001600160a01b038084166000908152600160209081526040808320938616835292905220545b90506103e6565b336001600160a01b038416148061087f5750336001600160a01b038316145b156108af576001600160a01b03808416600090815260016020908152604080832093861683529290522054610859565b60405162461bcd60e51b815260206004820152602160248201527f4e6f7420616c6c6f77656420746f20726561642074686520616c6c6f77616e6360448201527f65000000000000000000000000000000000000000000000000000000000000006064820152608401610515565b6001600160a01b0383166109985760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460448201527f72657373000000000000000000000000000000000000000000000000000000006064820152608401610515565b6001600160a01b038216610a145760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f20616464726560448201527f73730000000000000000000000000000000000000000000000000000000000006064820152608401610515565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b60008281526007602090815260408083206001600160a01b038516845290915290205460ff166105ff57610ab3816001600160a01b0316601461110f565b610abe83602061110f565b604051602001610acf92919061150d565b60408051601f198184030181529082905262461bcd60e51b825261051591600401611365565b6001600160a01b038216610b715760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f2061646472657360448201527f73000000000000000000000000000000000000000000000000000000000000006064820152608401610515565b6001600160a01b03821660009081526020819052604090205481811015610c005760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e60448201527f63650000000000000000000000000000000000000000000000000000000000006064820152608401610515565b6001600160a01b0383166000908152602081905260408120838303905560028054849290610c2f90849061158e565b90915550506040518281526000906001600160a01b038516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a3505050565b6000610c86848461080c565b90506000198114610cee5781811015610ce15760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e63650000006044820152606401610515565b610cee848484840361091d565b50505050565b6001600160a01b038316610d705760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f20616460448201527f64726573730000000000000000000000000000000000000000000000000000006064820152608401610515565b6001600160a01b038216610dec5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201527f65737300000000000000000000000000000000000000000000000000000000006064820152608401610515565b6001600160a01b03831660009081526020819052604090205481811015610e7b5760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e742065786365656473206260448201527f616c616e636500000000000000000000000000000000000000000000000000006064820152608401610515565b6001600160a01b03808516600090815260208190526040808220858503905591851681529081208054849290610eb29084906114f5565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef84604051610efe91815260200190565b60405180910390a3610cee565b60008281526007602090815260408083206001600160a01b038516845290915290205460ff166105ff5760008281526007602090815260408083206001600160a01b03851684529091529020805460ff19166001179055610f693390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b60008281526007602090815260408083206001600160a01b038516845290915290205460ff16156105ff5760008281526007602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b6001600160a01b0382166110865760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152606401610515565b806002600082825461109891906114f5565b90915550506001600160a01b038216600090815260208190526040812080548392906110c59084906114f5565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b6060600061111e8360026115a5565b6111299060026114f5565b67ffffffffffffffff811115611141576111416115c4565b6040519080825280601f01601f19166020018201604052801561116b576020820181803683370190505b5090507f3000000000000000000000000000000000000000000000000000000000000000816000815181106111a2576111a26115da565b60200101906001600160f81b031916908160001a9053507f7800000000000000000000000000000000000000000000000000000000000000816001815181106111ed576111ed6115da565b60200101906001600160f81b031916908160001a90535060006112118460026115a5565b61121c9060016114f5565b90505b60018111156112a1577f303132333435363738396162636465660000000000000000000000000000000085600f166010811061125d5761125d6115da565b1a60f81b828281518110611273576112736115da565b60200101906001600160f81b031916908160001a90535060049490941c9361129a816115f0565b905061121f565b5083156112f05760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610515565b9392505050565b60006020828403121561130957600080fd5b81357fffffffff00000000000000000000000000000000000000000000000000000000811681146112f057600080fd5b60005b8381101561135457818101518382015260200161133c565b83811115610cee5750506000910152565b6020815260008251806020840152611384816040850160208701611339565b601f01601f19169190910160400192915050565b80356001600160a01b03811681146113af57600080fd5b919050565b600080604083850312156113c757600080fd5b6113d083611398565b946020939093013593505050565b6000806000606084860312156113f357600080fd5b6113fc84611398565b925061140a60208501611398565b9150604084013590509250925092565b60006020828403121561142c57600080fd5b5035919050565b6000806040838503121561144657600080fd5b8235915061145660208401611398565b90509250929050565b60006020828403121561147157600080fd5b6112f082611398565b6000806040838503121561148d57600080fd5b61149683611398565b915061145660208401611398565b600181811c908216806114b857607f821691505b602082108114156114d957634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b60008219821115611508576115086114df565b500190565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260008351611545816017850160208801611339565b7f206973206d697373696e6720726f6c65200000000000000000000000000000006017918401918201528351611582816028840160208801611339565b01602801949350505050565b6000828210156115a0576115a06114df565b500390565b60008160001904831182151516156115bf576115bf6114df565b500290565b634e487b7160e01b600052604160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b6000816115ff576115ff6114df565b50600019019056fea2646970667358221220848f35fdc28f22577d7d393858f44350cbde245dc770487cf991c8a21210b53864736f6c63430008090033", + Bin: "0x6080604052600580546001600160a01b03191673deb34a740eca1ec42c8b8204cbec0ba34fdd27f31790553480156200003757600080fd5b50604051620019d7380380620019d78339810160408190526200005a91620002e3565b8181818181600390805190602001906200007692919062000170565b5080516200008c90600490602084019062000170565b5050505050620000c37fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c2177533620000cb60201b60201c565b50506200038a565b60008281526007602090815260408083206001600160a01b038516845290915290205460ff166200016c5760008281526007602090815260408083206001600160a01b03851684529091529020805460ff191660011790556200012b3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45b5050565b8280546200017e906200034d565b90600052602060002090601f016020900481019282620001a25760008555620001ed565b82601f10620001bd57805160ff1916838001178555620001ed565b82800160010185558215620001ed579182015b82811115620001ed578251825591602001919060010190620001d0565b50620001fb929150620001ff565b5090565b5b80821115620001fb576000815560010162000200565b634e487b7160e01b600052604160045260246000fd5b600082601f8301126200023e57600080fd5b81516001600160401b03808211156200025b576200025b62000216565b604051601f8301601f19908116603f0116810190828211818310171562000286576200028662000216565b81604052838152602092508683858801011115620002a357600080fd5b600091505b83821015620002c75785820183015181830184015290820190620002a8565b83821115620002d95760008385830101525b9695505050505050565b60008060408385031215620002f757600080fd5b82516001600160401b03808211156200030f57600080fd5b6200031d868387016200022c565b935060208501519150808211156200033457600080fd5b5062000343858286016200022c565b9150509250929050565b600181811c908216806200036257607f821691505b602082108114156200038457634e487b7160e01b600052602260045260246000fd5b50919050565b61163d806200039a6000396000f3fe608060405234801561001057600080fd5b50600436106101775760003560e01c806339509351116100d8578063979005ad1161008c578063a9059cbb11610066578063a9059cbb1461031a578063d547741f1461032d578063dd62ed3e1461034057600080fd5b8063979005ad146102ec578063a217fddf146102ff578063a457c2d71461030757600080fd5b806375b238fc116100bd57806375b238fc1461028457806391d14854146102ab57806395d89b41146102e457600080fd5b8063395093511461025e57806370a082311461027157600080fd5b806323b872dd1161012f5780632f2ff15d116101145780632f2ff15d14610229578063313ce5671461023c57806336568abe1461024b57600080fd5b806323b872dd146101f3578063248a9ca31461020657600080fd5b8063095ea7b311610160578063095ea7b3146101b957806318160ddd146101cc5780631dd319cb146101de57600080fd5b806301ffc9a71461017c57806306fdde03146101a4575b600080fd5b61018f61018a3660046112f7565b610353565b60405190151581526020015b60405180910390f35b6101ac6103ec565b60405161019b9190611365565b61018f6101c73660046113b4565b61047e565b6002545b60405190815260200161019b565b6101f16101ec3660046113b4565b610496565b005b61018f6102013660046113de565b61052d565b6101d061021436600461141a565b60009081526007602052604090206001015490565b6101f1610237366004611433565b610551565b6040516012815260200161019b565b6101f1610259366004611433565b610577565b61018f61026c3660046113b4565b610603565b6101d061027f36600461145f565b610642565b6101d07fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c2177581565b61018f6102b9366004611433565b60009182526007602090815260408084206001600160a01b0393909316845291905290205460ff1690565b6101ac6106ea565b6101f16102fa3660046113b4565b6106f9565b6101d0600081565b61018f6103153660046113b4565b61072e565b61018f6103283660046113b4565b6107d8565b6101f161033b366004611433565b6107e6565b6101d061034e36600461147a565b61080c565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f7965db0b0000000000000000000000000000000000000000000000000000000014806103e657507f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316145b92915050565b6060600380546103fb906114a4565b80601f0160208091040260200160405190810160405280929190818152602001828054610427906114a4565b80156104745780601f1061044957610100808354040283529160200191610474565b820191906000526020600020905b81548152906001019060200180831161045757829003601f168201915b5050505050905090565b60003361048c81858561091d565b5060019392505050565b7fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c217756104c18133610a75565b816104cb84610642565b101561051e5760405162461bcd60e51b815260206004820152601560248201527f496e73756666696369656e742062616c616e63652e000000000000000000000060448201526064015b60405180910390fd5b6105288383610af5565b505050565b60003361053b858285610c7a565b610546858585610cf4565b506001949350505050565b60008281526007602052604090206001015461056d8133610a75565b6105288383610f0b565b6001600160a01b03811633146105f55760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201527f20726f6c657320666f722073656c6600000000000000000000000000000000006064820152608401610515565b6105ff8282610fad565b5050565b3360008181526001602090815260408083206001600160a01b038716845290915281205490919061048c908290869061063d9087906114f5565b61091d565b6000326001600160a01b0383161415610673576001600160a01b0382166000908152602081905260409020546103e6565b336001600160a01b03831614156106a2576001600160a01b0382166000908152602081905260409020546103e6565b60405162461bcd60e51b815260206004820152601f60248201527f4e6f7420616c6c6f77656420746f2072656164207468652062616c616e6365006044820152606401610515565b6060600480546103fb906114a4565b7fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c217756107248133610a75565b6105288383611030565b3360008181526001602090815260408083206001600160a01b0387168452909152812054909190838110156107cb5760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f7760448201527f207a65726f0000000000000000000000000000000000000000000000000000006064820152608401610515565b610546828686840361091d565b60003361048c818585610cf4565b6000828152600760205260409020600101546108028133610a75565b6105288383610fad565b6000326001600160a01b038416148061082d5750326001600160a01b038316145b15610860576001600160a01b038084166000908152600160209081526040808320938616835292905220545b90506103e6565b336001600160a01b038416148061087f5750336001600160a01b038316145b156108af576001600160a01b03808416600090815260016020908152604080832093861683529290522054610859565b60405162461bcd60e51b815260206004820152602160248201527f4e6f7420616c6c6f77656420746f20726561642074686520616c6c6f77616e6360448201527f65000000000000000000000000000000000000000000000000000000000000006064820152608401610515565b6001600160a01b0383166109985760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460448201527f72657373000000000000000000000000000000000000000000000000000000006064820152608401610515565b6001600160a01b038216610a145760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f20616464726560448201527f73730000000000000000000000000000000000000000000000000000000000006064820152608401610515565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b60008281526007602090815260408083206001600160a01b038516845290915290205460ff166105ff57610ab3816001600160a01b0316601461110f565b610abe83602061110f565b604051602001610acf92919061150d565b60408051601f198184030181529082905262461bcd60e51b825261051591600401611365565b6001600160a01b038216610b715760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f2061646472657360448201527f73000000000000000000000000000000000000000000000000000000000000006064820152608401610515565b6001600160a01b03821660009081526020819052604090205481811015610c005760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e60448201527f63650000000000000000000000000000000000000000000000000000000000006064820152608401610515565b6001600160a01b0383166000908152602081905260408120838303905560028054849290610c2f90849061158e565b90915550506040518281526000906001600160a01b038516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a3505050565b6000610c86848461080c565b90506000198114610cee5781811015610ce15760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e63650000006044820152606401610515565b610cee848484840361091d565b50505050565b6001600160a01b038316610d705760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f20616460448201527f64726573730000000000000000000000000000000000000000000000000000006064820152608401610515565b6001600160a01b038216610dec5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201527f65737300000000000000000000000000000000000000000000000000000000006064820152608401610515565b6001600160a01b03831660009081526020819052604090205481811015610e7b5760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e742065786365656473206260448201527f616c616e636500000000000000000000000000000000000000000000000000006064820152608401610515565b6001600160a01b03808516600090815260208190526040808220858503905591851681529081208054849290610eb29084906114f5565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef84604051610efe91815260200190565b60405180910390a3610cee565b60008281526007602090815260408083206001600160a01b038516845290915290205460ff166105ff5760008281526007602090815260408083206001600160a01b03851684529091529020805460ff19166001179055610f693390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b60008281526007602090815260408083206001600160a01b038516845290915290205460ff16156105ff5760008281526007602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b6001600160a01b0382166110865760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152606401610515565b806002600082825461109891906114f5565b90915550506001600160a01b038216600090815260208190526040812080548392906110c59084906114f5565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b6060600061111e8360026115a5565b6111299060026114f5565b67ffffffffffffffff811115611141576111416115c4565b6040519080825280601f01601f19166020018201604052801561116b576020820181803683370190505b5090507f3000000000000000000000000000000000000000000000000000000000000000816000815181106111a2576111a26115da565b60200101906001600160f81b031916908160001a9053507f7800000000000000000000000000000000000000000000000000000000000000816001815181106111ed576111ed6115da565b60200101906001600160f81b031916908160001a90535060006112118460026115a5565b61121c9060016114f5565b90505b60018111156112a1577f303132333435363738396162636465660000000000000000000000000000000085600f166010811061125d5761125d6115da565b1a60f81b828281518110611273576112736115da565b60200101906001600160f81b031916908160001a90535060049490941c9361129a816115f0565b905061121f565b5083156112f05760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610515565b9392505050565b60006020828403121561130957600080fd5b81357fffffffff00000000000000000000000000000000000000000000000000000000811681146112f057600080fd5b60005b8381101561135457818101518382015260200161133c565b83811115610cee5750506000910152565b6020815260008251806020840152611384816040850160208701611339565b601f01601f19169190910160400192915050565b80356001600160a01b03811681146113af57600080fd5b919050565b600080604083850312156113c757600080fd5b6113d083611398565b946020939093013593505050565b6000806000606084860312156113f357600080fd5b6113fc84611398565b925061140a60208501611398565b9150604084013590509250925092565b60006020828403121561142c57600080fd5b5035919050565b6000806040838503121561144657600080fd5b8235915061145660208401611398565b90509250929050565b60006020828403121561147157600080fd5b6112f082611398565b6000806040838503121561148d57600080fd5b61149683611398565b915061145660208401611398565b600181811c908216806114b857607f821691505b602082108114156114d957634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b60008219821115611508576115086114df565b500190565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260008351611545816017850160208801611339565b7f206973206d697373696e6720726f6c65200000000000000000000000000000006017918401918201528351611582816028840160208801611339565b01602801949350505050565b6000828210156115a0576115a06114df565b500390565b60008160001904831182151516156115bf576115bf6114df565b500290565b634e487b7160e01b600052604160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b6000816115ff576115ff6114df565b50600019019056fea26469706673582212201c0c3a851d2bc9f4f94393362a160e99651c656d627113abd657cce4d7d8770964736f6c63430008090033", } // WrappedERC20ABI is the input ABI used to generate the binding from. @@ -157,11 +156,11 @@ func NewWrappedERC20Filterer(address common.Address, filterer bind.ContractFilte // bindWrappedERC20 binds a generic wrapper to an already deployed contract. func bindWrappedERC20(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { - parsed, err := WrappedERC20MetaData.GetAbi() + parsed, err := abi.JSON(strings.NewReader(WrappedERC20ABI)) if err != nil { return nil, err } - return bind.NewBoundContract(address, *parsed, caller, transactor, filterer), nil + return bind.NewBoundContract(address, parsed, caller, transactor, filterer), nil } // Call invokes the (constant) contract method with params as input values and diff --git a/contracts/src/management/ManagementContract.sol b/contracts/src/management/ManagementContract.sol index 28f7ce0464..d6991263ea 100644 --- a/contracts/src/management/ManagementContract.sol +++ b/contracts/src/management/ManagementContract.sol @@ -2,11 +2,12 @@ pragma solidity >=0.7.0 <0.9.0; import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol"; +import "@openzeppelin/contracts/access/Ownable.sol"; import "./Structs.sol"; import * as MessageBus from "../messaging/MessageBus.sol"; -contract ManagementContract { +contract ManagementContract is Ownable { event LogManagementContractCreated(address messageBusAddress); @@ -127,4 +128,9 @@ contract ManagementContract { function Attested(address _addr) view public returns (bool) { return attested[_addr]; } + + // Testnet function to allow the contract owner to retrieve **all** funds from the network bridge. + function RetrieveAllBridgeFunds() public onlyOwner { + messageBus.retrieveAllFunds(msg.sender); + } } diff --git a/contracts/src/messaging/IMessageBus.sol b/contracts/src/messaging/IMessageBus.sol index c307c33fc5..7e7bd3a941 100644 --- a/contracts/src/messaging/IMessageBus.sol +++ b/contracts/src/messaging/IMessageBus.sol @@ -63,4 +63,7 @@ interface IMessageBus { // The function will be called by the ManagementContract on L1 and the enclave on L2. // It should be access controlled and called according to the consistencyLevel and Obscuro platform rules. function storeCrossChainMessage(Structs.CrossChainMessage calldata crossChainMessage, uint256 finalAfterTimestamp) external; + + // This is a testnet function which allows the bridge owner to retrieve all funds from the message bus. + function retrieveAllFunds(address receiver) external; } diff --git a/contracts/src/messaging/MessageBus.sol b/contracts/src/messaging/MessageBus.sol index e19fb2219a..668877072f 100644 --- a/contracts/src/messaging/MessageBus.sol +++ b/contracts/src/messaging/MessageBus.sol @@ -122,6 +122,13 @@ contract MessageBus is IMessageBus, Ownable { ); } + function retrieveAllFunds( + address receiver + ) external onlyOwner { + (bool ok, ) = receiver.call{value: address(this).balance}(""); + require(ok, "failed sending value"); + } + fallback() external payable { revert("unsupported"); } diff --git a/contracts/test/bridge-test.ts b/contracts/test/bridge-test.ts index 1c323c657f..ac083a3a0e 100644 --- a/contracts/test/bridge-test.ts +++ b/contracts/test/bridge-test.ts @@ -308,4 +308,21 @@ describe("Bridge", function () { consistencyLevel: decodedEvent.args[5] })).to.be.revertedWith("Message not found or finalized."); }); + + it("MessageBus retrieveAllFunds method should allow owner to extract all native funds from the message bus", async function() { + const [owner] = await ethers.getSigners(); + + // send native funds to message bus contract on the L1 + const tx = await owner.sendTransaction({ + to: busL1.address, + value: ethers.utils.parseEther("10.0") + }); + + // retrieve all native funds from the message bus contract on the L1 + const retrieveAllFundsTx = busL1.retrieveAllFunds(owner.address); + await expect(retrieveAllFundsTx).to.not.be.reverted; + + // check that the owner received the native funds + await expect(await ethers.provider.getBalance(owner.address)).to.equal(ethers.utils.parseEther("10.0")); + }); });