From 3a7864eba1190aab1157561b901b045c90ba68fb Mon Sep 17 00:00:00 2001 From: StefanIliev545 Date: Mon, 31 Jul 2023 14:49:18 +0300 Subject: [PATCH 01/47] Added a new message topic for auto relaying. --- .../generated/EthereumBridge/EthereumBridge.go | 2 +- .../generated/ObscuroBridge/ObscuroBridge.go | 2 +- contracts/src/bridge/IBridge.sol | 6 ++++++ contracts/src/bridge/L1/ObscuroBridge.sol | 15 +++++++-------- go/common/types.go | 2 +- go/enclave/crosschain/message_bus_manager.go | 4 ++++ 6 files changed, 20 insertions(+), 11 deletions(-) diff --git a/contracts/generated/EthereumBridge/EthereumBridge.go b/contracts/generated/EthereumBridge/EthereumBridge.go index 6b03fe7aa5..3b0c45108d 100644 --- a/contracts/generated/EthereumBridge/EthereumBridge.go +++ b/contracts/generated/EthereumBridge/EthereumBridge.go @@ -32,7 +32,7 @@ var ( // 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: "0x60806040526001805463ffffffff60a01b191690553480156200002157600080fd5b5060405162002b7f38038062002b7f83398101604081905262000044916200012c565b600080546001600160a01b0319166001600160a01b038416908117909155604080516350d113fd60e11b8152905184929163a1a227fa916004808301926020929190829003018186803b1580156200009b57600080fd5b505afa158015620000b0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620000d6919062000164565b600180546001600160a01b039283166001600160a01b031991821617909155600580549490921693169290921790915550620001899050565b80516001600160a01b03811681146200012757600080fd5b919050565b600080604083850312156200014057600080fd5b6200014b836200010f565b91506200015b602084016200010f565b90509250929050565b6000602082840312156200017757600080fd5b62000182826200010f565b9392505050565b6129e680620001996000396000f3fe6080604052600436106200008a5760003560e01c80639813c7b211620000555780639813c7b214620002065780639e405b711462000256578063a381c8e21462000290578063d5c6b50414620002b55762000103565b80628d48e3146200014c5780631888d71214620001a3578063458ffd6314620001bc57806383bece4d14620001e15762000103565b36620001035760405162461bcd60e51b815260206004820152602360248201527f436f6e747261637420646f6573206e6f7420737570706f72742072656365697660448201527f652829000000000000000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b60405162461bcd60e51b815260206004820152601d60248201527f66616c6c6261636b2829206d6574686f6420756e737570706f727465640000006044820152606401620000fa565b3480156200015957600080fd5b50620001866200016b36600462000c75565b6004602052600090815260409020546001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b620001ba620001b436600462000c75565b620002ef565b005b348015620001c957600080fd5b50620001ba620001db36600462000ce8565b620004a0565b348015620001ee57600080fd5b50620001ba6200020036600462000d74565b620006be565b3480156200021357600080fd5b50620002456200022536600462000c75565b6001600160a01b0390811660009081526002602052604090205416151590565b60405190151581526020016200019a565b3480156200026357600080fd5b50620001866200027536600462000c75565b6003602052600090815260409020546001600160a01b031681565b3480156200029d57600080fd5b50620001ba620002af36600462000d74565b62000901565b348015620002c257600080fd5b5062000186620002d436600462000c75565b6002602052600090815260409020546001600160a01b031681565b60003411620003415760405162461bcd60e51b815260206004820152600d60248201527f4e6f7468696e672073656e742e000000000000000000000000000000000000006044820152606401620000fa565b6000805260026020527fac33ff75c19e70fe83507db0d683fd3465c996598dc972688b7ace676c89077b546001600160a01b0316620003c35760405162461bcd60e51b815260206004820152601560248201527f4e6f206d617070696e6720666f7220746f6b656e2e00000000000000000000006044820152606401620000fa565b600080805260036020527f3617319a054d772f909f7c479a2cebe5066e836a939412e32403c99029b92eff546040516001600160a01b03918216602482015234604482015290831660648201526383bece4d60e01b9060840160408051601f198184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff00000000000000000000000000000000000000000000000000000000909316929092179091526005549091506200049c906001600160a01b03168260005b60008062000a90565b5050565b6005546000546001600160a01b0391821691163314620005295760405162461bcd60e51b815260206004820152603060248201527f436f6e74726163742063616c6c6572206973206e6f742074686520726567697360448201527f7465726564206d657373656e67657221000000000000000000000000000000006064820152608401620000fa565b806001600160a01b03166200053d62000bbe565b6001600160a01b031614620005bb5760405162461bcd60e51b815260206004820152603160248201527f43726f737320636861696e206d65737361676520636f6d696e672066726f6d2060448201527f696e636f72726563742073656e646572210000000000000000000000000000006064820152608401620000fa565b600085858585604051620005cf9062000c4e565b620005de949392919062000de4565b604051809103906000f080158015620005fb573d6000803e3d6000fd5b506001600160a01b03808216600081815260026020908152604080832080547fffffffffffffffffffffffff00000000000000000000000000000000000000009081168617909155600383528184208054968f169682168717905594835260049091529081902080549093169091179091555190915081907f30c05779f384e0ae9d43bbf7ec4417f28bdc53d02a35551b6eb270a9c4c71dca90620006ac908a9084908b908b908b908b9062000e1a565b60405180910390a15050505050505050565b6005546000546001600160a01b0391821691163314620007475760405162461bcd60e51b815260206004820152603060248201527f436f6e74726163742063616c6c6572206973206e6f742074686520726567697360448201527f7465726564206d657373656e67657221000000000000000000000000000000006064820152608401620000fa565b806001600160a01b03166200075b62000bbe565b6001600160a01b031614620007d95760405162461bcd60e51b815260206004820152603160248201527f43726f737320636861696e206d65737361676520636f6d696e672066726f6d2060448201527f696e636f72726563742073656e646572210000000000000000000000000000006064820152608401620000fa565b6001600160a01b038085166000908152600460209081526040808320548416808452600290925290912054909116806200087c5760405162461bcd60e51b815260206004820152602b60248201527f526563656976696e672061737365747320666f7220756e6b6e6f776e2077726160448201527f7070656420746f6b656e210000000000000000000000000000000000000000006064820152608401620000fa565b6040517f979005ad0000000000000000000000000000000000000000000000000000000081526001600160a01b0385811660048301526024820187905282169063979005ad90604401600060405180830381600087803b158015620008e057600080fd5b505af1158015620008f5573d6000803e3d6000fd5b50505050505050505050565b6001600160a01b03808416600090815260026020526040902054166200096a5760405162461bcd60e51b815260206004820152601560248201527f4e6f206d617070696e6720666f7220746f6b656e2e00000000000000000000006044820152606401620000fa565b6001600160a01b03838116600090815260026020526040908190205490517f1dd319cb000000000000000000000000000000000000000000000000000000008152336004820152602481018590529116908190631dd319cb90604401600060405180830381600087803b158015620009e157600080fd5b505af1158015620009f6573d6000803e3d6000fd5b505050506001600160a01b03848116600090815260036020908152604080832054815190851660248201526044810188905286851660648083019190915282518083039091018152608490910190915290810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff166383bece4d60e01b179052600554909262000a8992911690839062000493565b5050505050565b60006040518060600160405280876001600160a01b031681526020018681526020018481525060405160200162000ac8919062000ebb565b60408051808303601f19018152919052600180549192506001600160a01b0382169163b1454caa917401000000000000000000000000000000000000000090910463ffffffff1690601462000b1d8362000f02565b91906101000a81548163ffffffff021916908363ffffffff1602179055508684866040518563ffffffff1660e01b815260040162000b5f949392919062000f4e565b602060405180830381600087803b15801562000b7a57600080fd5b505af115801562000b8f573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000bb5919062000f8d565b50505050505050565b60008060009054906101000a90046001600160a01b03166001600160a01b03166363012de56040518163ffffffff1660e01b815260040160206040518083038186803b15801562000c0e57600080fd5b505afa15801562000c23573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000c49919062000fb9565b905090565b6119d78062000fda83390190565b6001600160a01b038116811462000c7257600080fd5b50565b60006020828403121562000c8857600080fd5b813562000c958162000c5c565b9392505050565b60008083601f84011262000caf57600080fd5b50813567ffffffffffffffff81111562000cc857600080fd5b60208301915083602082850101111562000ce157600080fd5b9250929050565b60008060008060006060868803121562000d0157600080fd5b853562000d0e8162000c5c565b9450602086013567ffffffffffffffff8082111562000d2c57600080fd5b62000d3a89838a0162000c9c565b9096509450604088013591508082111562000d5457600080fd5b5062000d638882890162000c9c565b969995985093965092949392505050565b60008060006060848603121562000d8a57600080fd5b833562000d978162000c5c565b925060208401359150604084013562000db08162000c5c565b809150509250925092565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b60408152600062000dfa60408301868862000dbb565b828103602084015262000e0f81858762000dbb565b979650505050505050565b60006001600160a01b0380891683528088166020840152506080604083015262000e4960808301868862000dbb565b828103606084015262000e5e81858762000dbb565b9998505050505050505050565b6000815180845260005b8181101562000e935760208185018101518683018201520162000e75565b8181111562000ea6576000602083870101525b50601f01601f19169290920160200192915050565b602081526001600160a01b038251166020820152600060208301516060604084015262000eec608084018262000e6b565b9050604084015160608401528091505092915050565b600063ffffffff8083168181141562000f44577f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6001019392505050565b600063ffffffff80871683528086166020840152506080604083015262000f79608083018562000e6b565b905060ff8316606083015295945050505050565b60006020828403121562000fa057600080fd5b815167ffffffffffffffff8116811462000c9557600080fd5b60006020828403121562000fcc57600080fd5b815162000c958162000c5c56fe6080604052600580546001600160a01b03191673deb34a740eca1ec42c8b8204cbec0ba34fdd27f31790553480156200003757600080fd5b50604051620019d7380380620019d78339810160408190526200005a91620002e3565b8181818181600390805190602001906200007692919062000170565b5080516200008c90600490602084019062000170565b5050505050620000c37fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c2177533620000cb60201b60201c565b50506200038a565b60008281526007602090815260408083206001600160a01b038516845290915290205460ff166200016c5760008281526007602090815260408083206001600160a01b03851684529091529020805460ff191660011790556200012b3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45b5050565b8280546200017e906200034d565b90600052602060002090601f016020900481019282620001a25760008555620001ed565b82601f10620001bd57805160ff1916838001178555620001ed565b82800160010185558215620001ed579182015b82811115620001ed578251825591602001919060010190620001d0565b50620001fb929150620001ff565b5090565b5b80821115620001fb576000815560010162000200565b634e487b7160e01b600052604160045260246000fd5b600082601f8301126200023e57600080fd5b81516001600160401b03808211156200025b576200025b62000216565b604051601f8301601f19908116603f0116810190828211818310171562000286576200028662000216565b81604052838152602092508683858801011115620002a357600080fd5b600091505b83821015620002c75785820183015181830184015290820190620002a8565b83821115620002d95760008385830101525b9695505050505050565b60008060408385031215620002f757600080fd5b82516001600160401b03808211156200030f57600080fd5b6200031d868387016200022c565b935060208501519150808211156200033457600080fd5b5062000343858286016200022c565b9150509250929050565b600181811c908216806200036257607f821691505b602082108114156200038457634e487b7160e01b600052602260045260246000fd5b50919050565b61163d806200039a6000396000f3fe608060405234801561001057600080fd5b50600436106101775760003560e01c806339509351116100d8578063979005ad1161008c578063a9059cbb11610066578063a9059cbb1461031a578063d547741f1461032d578063dd62ed3e1461034057600080fd5b8063979005ad146102ec578063a217fddf146102ff578063a457c2d71461030757600080fd5b806375b238fc116100bd57806375b238fc1461028457806391d14854146102ab57806395d89b41146102e457600080fd5b8063395093511461025e57806370a082311461027157600080fd5b806323b872dd1161012f5780632f2ff15d116101145780632f2ff15d14610229578063313ce5671461023c57806336568abe1461024b57600080fd5b806323b872dd146101f3578063248a9ca31461020657600080fd5b8063095ea7b311610160578063095ea7b3146101b957806318160ddd146101cc5780631dd319cb146101de57600080fd5b806301ffc9a71461017c57806306fdde03146101a4575b600080fd5b61018f61018a3660046112f7565b610353565b60405190151581526020015b60405180910390f35b6101ac6103ec565b60405161019b9190611365565b61018f6101c73660046113b4565b61047e565b6002545b60405190815260200161019b565b6101f16101ec3660046113b4565b610496565b005b61018f6102013660046113de565b61052d565b6101d061021436600461141a565b60009081526007602052604090206001015490565b6101f1610237366004611433565b610551565b6040516012815260200161019b565b6101f1610259366004611433565b610577565b61018f61026c3660046113b4565b610603565b6101d061027f36600461145f565b610642565b6101d07fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c2177581565b61018f6102b9366004611433565b60009182526007602090815260408084206001600160a01b0393909316845291905290205460ff1690565b6101ac6106ea565b6101f16102fa3660046113b4565b6106f9565b6101d0600081565b61018f6103153660046113b4565b61072e565b61018f6103283660046113b4565b6107d8565b6101f161033b366004611433565b6107e6565b6101d061034e36600461147a565b61080c565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f7965db0b0000000000000000000000000000000000000000000000000000000014806103e657507f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316145b92915050565b6060600380546103fb906114a4565b80601f0160208091040260200160405190810160405280929190818152602001828054610427906114a4565b80156104745780601f1061044957610100808354040283529160200191610474565b820191906000526020600020905b81548152906001019060200180831161045757829003601f168201915b5050505050905090565b60003361048c81858561091d565b5060019392505050565b7fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c217756104c18133610a75565b816104cb84610642565b101561051e5760405162461bcd60e51b815260206004820152601560248201527f496e73756666696369656e742062616c616e63652e000000000000000000000060448201526064015b60405180910390fd5b6105288383610af5565b505050565b60003361053b858285610c7a565b610546858585610cf4565b506001949350505050565b60008281526007602052604090206001015461056d8133610a75565b6105288383610f0b565b6001600160a01b03811633146105f55760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201527f20726f6c657320666f722073656c6600000000000000000000000000000000006064820152608401610515565b6105ff8282610fad565b5050565b3360008181526001602090815260408083206001600160a01b038716845290915281205490919061048c908290869061063d9087906114f5565b61091d565b6000326001600160a01b0383161415610673576001600160a01b0382166000908152602081905260409020546103e6565b336001600160a01b03831614156106a2576001600160a01b0382166000908152602081905260409020546103e6565b60405162461bcd60e51b815260206004820152601f60248201527f4e6f7420616c6c6f77656420746f2072656164207468652062616c616e6365006044820152606401610515565b6060600480546103fb906114a4565b7fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c217756107248133610a75565b6105288383611030565b3360008181526001602090815260408083206001600160a01b0387168452909152812054909190838110156107cb5760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f7760448201527f207a65726f0000000000000000000000000000000000000000000000000000006064820152608401610515565b610546828686840361091d565b60003361048c818585610cf4565b6000828152600760205260409020600101546108028133610a75565b6105288383610fad565b6000326001600160a01b038416148061082d5750326001600160a01b038316145b15610860576001600160a01b038084166000908152600160209081526040808320938616835292905220545b90506103e6565b336001600160a01b038416148061087f5750336001600160a01b038316145b156108af576001600160a01b03808416600090815260016020908152604080832093861683529290522054610859565b60405162461bcd60e51b815260206004820152602160248201527f4e6f7420616c6c6f77656420746f20726561642074686520616c6c6f77616e6360448201527f65000000000000000000000000000000000000000000000000000000000000006064820152608401610515565b6001600160a01b0383166109985760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460448201527f72657373000000000000000000000000000000000000000000000000000000006064820152608401610515565b6001600160a01b038216610a145760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f20616464726560448201527f73730000000000000000000000000000000000000000000000000000000000006064820152608401610515565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b60008281526007602090815260408083206001600160a01b038516845290915290205460ff166105ff57610ab3816001600160a01b0316601461110f565b610abe83602061110f565b604051602001610acf92919061150d565b60408051601f198184030181529082905262461bcd60e51b825261051591600401611365565b6001600160a01b038216610b715760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f2061646472657360448201527f73000000000000000000000000000000000000000000000000000000000000006064820152608401610515565b6001600160a01b03821660009081526020819052604090205481811015610c005760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e60448201527f63650000000000000000000000000000000000000000000000000000000000006064820152608401610515565b6001600160a01b0383166000908152602081905260408120838303905560028054849290610c2f90849061158e565b90915550506040518281526000906001600160a01b038516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a3505050565b6000610c86848461080c565b90506000198114610cee5781811015610ce15760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e63650000006044820152606401610515565b610cee848484840361091d565b50505050565b6001600160a01b038316610d705760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f20616460448201527f64726573730000000000000000000000000000000000000000000000000000006064820152608401610515565b6001600160a01b038216610dec5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201527f65737300000000000000000000000000000000000000000000000000000000006064820152608401610515565b6001600160a01b03831660009081526020819052604090205481811015610e7b5760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e742065786365656473206260448201527f616c616e636500000000000000000000000000000000000000000000000000006064820152608401610515565b6001600160a01b03808516600090815260208190526040808220858503905591851681529081208054849290610eb29084906114f5565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef84604051610efe91815260200190565b60405180910390a3610cee565b60008281526007602090815260408083206001600160a01b038516845290915290205460ff166105ff5760008281526007602090815260408083206001600160a01b03851684529091529020805460ff19166001179055610f693390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b60008281526007602090815260408083206001600160a01b038516845290915290205460ff16156105ff5760008281526007602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b6001600160a01b0382166110865760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152606401610515565b806002600082825461109891906114f5565b90915550506001600160a01b038216600090815260208190526040812080548392906110c59084906114f5565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b6060600061111e8360026115a5565b6111299060026114f5565b67ffffffffffffffff811115611141576111416115c4565b6040519080825280601f01601f19166020018201604052801561116b576020820181803683370190505b5090507f3000000000000000000000000000000000000000000000000000000000000000816000815181106111a2576111a26115da565b60200101906001600160f81b031916908160001a9053507f7800000000000000000000000000000000000000000000000000000000000000816001815181106111ed576111ed6115da565b60200101906001600160f81b031916908160001a90535060006112118460026115a5565b61121c9060016114f5565b90505b60018111156112a1577f303132333435363738396162636465660000000000000000000000000000000085600f166010811061125d5761125d6115da565b1a60f81b828281518110611273576112736115da565b60200101906001600160f81b031916908160001a90535060049490941c9361129a816115f0565b905061121f565b5083156112f05760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610515565b9392505050565b60006020828403121561130957600080fd5b81357fffffffff00000000000000000000000000000000000000000000000000000000811681146112f057600080fd5b60005b8381101561135457818101518382015260200161133c565b83811115610cee5750506000910152565b6020815260008251806020840152611384816040850160208701611339565b601f01601f19169190910160400192915050565b80356001600160a01b03811681146113af57600080fd5b919050565b600080604083850312156113c757600080fd5b6113d083611398565b946020939093013593505050565b6000806000606084860312156113f357600080fd5b6113fc84611398565b925061140a60208501611398565b9150604084013590509250925092565b60006020828403121561142c57600080fd5b5035919050565b6000806040838503121561144657600080fd5b8235915061145660208401611398565b90509250929050565b60006020828403121561147157600080fd5b6112f082611398565b6000806040838503121561148d57600080fd5b61149683611398565b915061145660208401611398565b600181811c908216806114b857607f821691505b602082108114156114d957634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b60008219821115611508576115086114df565b500190565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260008351611545816017850160208801611339565b7f206973206d697373696e6720726f6c65200000000000000000000000000000006017918401918201528351611582816028840160208801611339565b01602801949350505050565b6000828210156115a0576115a06114df565b500390565b60008160001904831182151516156115bf576115bf6114df565b500290565b634e487b7160e01b600052604160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b6000816115ff576115ff6114df565b50600019019056fea26469706673582212203d4cd3ed17d72b2f94aa2bf3da11f2d447bbf1eab55024ccf72a1f938cbe214064736f6c63430008090033a26469706673582212202fe10727c126a1b1c4a8866a019847d8014f97068730fe77aae15ae1bbedce0064736f6c63430008090033", + Bin: "0x60806040526001805463ffffffff60a01b191690553480156200002157600080fd5b5060405162002b4e38038062002b4e83398101604081905262000044916200012c565b600080546001600160a01b0319166001600160a01b038416908117909155604080516350d113fd60e11b8152905184929163a1a227fa916004808301926020929190829003018186803b1580156200009b57600080fd5b505afa158015620000b0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620000d6919062000164565b600180546001600160a01b039283166001600160a01b031991821617909155600580549490921693169290921790915550620001899050565b80516001600160a01b03811681146200012757600080fd5b919050565b600080604083850312156200014057600080fd5b6200014b836200010f565b91506200015b602084016200010f565b90509250929050565b6000602082840312156200017757600080fd5b62000182826200010f565b9392505050565b6129b580620001996000396000f3fe6080604052600436106200008a5760003560e01c80639813c7b211620000555780639813c7b214620002065780639e405b711462000256578063a381c8e21462000290578063d5c6b50414620002b55762000103565b80628d48e3146200014c5780631888d71214620001a3578063458ffd6314620001bc57806383bece4d14620001e15762000103565b36620001035760405162461bcd60e51b815260206004820152602360248201527f436f6e747261637420646f6573206e6f7420737570706f72742072656365697660448201527f652829000000000000000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b60405162461bcd60e51b815260206004820152601d60248201527f66616c6c6261636b2829206d6574686f6420756e737570706f727465640000006044820152606401620000fa565b3480156200015957600080fd5b50620001866200016b36600462000c44565b6004602052600090815260409020546001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b620001ba620001b436600462000c44565b620002ef565b005b348015620001c957600080fd5b50620001ba620001db36600462000cb7565b62000470565b348015620001ee57600080fd5b50620001ba6200020036600462000d43565b6200068e565b3480156200021357600080fd5b50620002456200022536600462000c44565b6001600160a01b0390811660009081526002602052604090205416151590565b60405190151581526020016200019a565b3480156200026357600080fd5b50620001866200027536600462000c44565b6003602052600090815260409020546001600160a01b031681565b3480156200029d57600080fd5b50620001ba620002af36600462000d43565b620008d1565b348015620002c257600080fd5b5062000186620002d436600462000c44565b6002602052600090815260409020546001600160a01b031681565b60003411620003415760405162461bcd60e51b815260206004820152600d60248201527f4e6f7468696e672073656e742e000000000000000000000000000000000000006044820152606401620000fa565b6000805260026020527fac33ff75c19e70fe83507db0d683fd3465c996598dc972688b7ace676c89077b546001600160a01b0316620003c35760405162461bcd60e51b815260206004820152601560248201527f4e6f206d617070696e6720666f7220746f6b656e2e00000000000000000000006044820152606401620000fa565b60008052600360209081527f3617319a054d772f909f7c479a2cebe5066e836a939412e32403c99029b92eff54604080516001600160a01b03928316602482015234604482015284831660648083019190915282518083039091018152608490910190915291820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff166383bece4d60e01b1790526005546200046c91168260015b60008062000a5f565b5050565b6005546000546001600160a01b0391821691163314620004f95760405162461bcd60e51b815260206004820152603060248201527f436f6e74726163742063616c6c6572206973206e6f742074686520726567697360448201527f7465726564206d657373656e67657221000000000000000000000000000000006064820152608401620000fa565b806001600160a01b03166200050d62000b8d565b6001600160a01b0316146200058b5760405162461bcd60e51b815260206004820152603160248201527f43726f737320636861696e206d65737361676520636f6d696e672066726f6d2060448201527f696e636f72726563742073656e646572210000000000000000000000000000006064820152608401620000fa565b6000858585856040516200059f9062000c1d565b620005ae949392919062000db3565b604051809103906000f080158015620005cb573d6000803e3d6000fd5b506001600160a01b03808216600081815260026020908152604080832080547fffffffffffffffffffffffff00000000000000000000000000000000000000009081168617909155600383528184208054968f169682168717905594835260049091529081902080549093169091179091555190915081907f30c05779f384e0ae9d43bbf7ec4417f28bdc53d02a35551b6eb270a9c4c71dca906200067c908a9084908b908b908b908b9062000de9565b60405180910390a15050505050505050565b6005546000546001600160a01b0391821691163314620007175760405162461bcd60e51b815260206004820152603060248201527f436f6e74726163742063616c6c6572206973206e6f742074686520726567697360448201527f7465726564206d657373656e67657221000000000000000000000000000000006064820152608401620000fa565b806001600160a01b03166200072b62000b8d565b6001600160a01b031614620007a95760405162461bcd60e51b815260206004820152603160248201527f43726f737320636861696e206d65737361676520636f6d696e672066726f6d2060448201527f696e636f72726563742073656e646572210000000000000000000000000000006064820152608401620000fa565b6001600160a01b038085166000908152600460209081526040808320548416808452600290925290912054909116806200084c5760405162461bcd60e51b815260206004820152602b60248201527f526563656976696e672061737365747320666f7220756e6b6e6f776e2077726160448201527f7070656420746f6b656e210000000000000000000000000000000000000000006064820152608401620000fa565b6040517f979005ad0000000000000000000000000000000000000000000000000000000081526001600160a01b0385811660048301526024820187905282169063979005ad90604401600060405180830381600087803b158015620008b057600080fd5b505af1158015620008c5573d6000803e3d6000fd5b50505050505050505050565b6001600160a01b03808416600090815260026020526040902054166200093a5760405162461bcd60e51b815260206004820152601560248201527f4e6f206d617070696e6720666f7220746f6b656e2e00000000000000000000006044820152606401620000fa565b6001600160a01b03838116600090815260026020526040908190205490517f1dd319cb000000000000000000000000000000000000000000000000000000008152336004820152602481018590529116908190631dd319cb90604401600060405180830381600087803b158015620009b157600080fd5b505af1158015620009c6573d6000803e3d6000fd5b505050506001600160a01b03848116600090815260036020908152604091829020548251908416602482015260448101879052858416606480830191909152835180830390910181526084909101909252810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff166383bece4d60e01b179052600554909162000a58911682600162000463565b5050505050565b60006040518060600160405280876001600160a01b031681526020018681526020018481525060405160200162000a97919062000e8a565b60408051808303601f19018152919052600180549192506001600160a01b0382169163b1454caa917401000000000000000000000000000000000000000090910463ffffffff1690601462000aec8362000ed1565b91906101000a81548163ffffffff021916908363ffffffff1602179055508684866040518563ffffffff1660e01b815260040162000b2e949392919062000f1d565b602060405180830381600087803b15801562000b4957600080fd5b505af115801562000b5e573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000b84919062000f5c565b50505050505050565b60008060009054906101000a90046001600160a01b03166001600160a01b03166363012de56040518163ffffffff1660e01b815260040160206040518083038186803b15801562000bdd57600080fd5b505afa15801562000bf2573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000c18919062000f88565b905090565b6119d78062000fa983390190565b6001600160a01b038116811462000c4157600080fd5b50565b60006020828403121562000c5757600080fd5b813562000c648162000c2b565b9392505050565b60008083601f84011262000c7e57600080fd5b50813567ffffffffffffffff81111562000c9757600080fd5b60208301915083602082850101111562000cb057600080fd5b9250929050565b60008060008060006060868803121562000cd057600080fd5b853562000cdd8162000c2b565b9450602086013567ffffffffffffffff8082111562000cfb57600080fd5b62000d0989838a0162000c6b565b9096509450604088013591508082111562000d2357600080fd5b5062000d328882890162000c6b565b969995985093965092949392505050565b60008060006060848603121562000d5957600080fd5b833562000d668162000c2b565b925060208401359150604084013562000d7f8162000c2b565b809150509250925092565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b60408152600062000dc960408301868862000d8a565b828103602084015262000dde81858762000d8a565b979650505050505050565b60006001600160a01b0380891683528088166020840152506080604083015262000e1860808301868862000d8a565b828103606084015262000e2d81858762000d8a565b9998505050505050505050565b6000815180845260005b8181101562000e625760208185018101518683018201520162000e44565b8181111562000e75576000602083870101525b50601f01601f19169290920160200192915050565b602081526001600160a01b038251166020820152600060208301516060604084015262000ebb608084018262000e3a565b9050604084015160608401528091505092915050565b600063ffffffff8083168181141562000f13577f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6001019392505050565b600063ffffffff80871683528086166020840152506080604083015262000f48608083018562000e3a565b905060ff8316606083015295945050505050565b60006020828403121562000f6f57600080fd5b815167ffffffffffffffff8116811462000c6457600080fd5b60006020828403121562000f9b57600080fd5b815162000c648162000c2b56fe6080604052600580546001600160a01b03191673deb34a740eca1ec42c8b8204cbec0ba34fdd27f31790553480156200003757600080fd5b50604051620019d7380380620019d78339810160408190526200005a91620002e3565b8181818181600390805190602001906200007692919062000170565b5080516200008c90600490602084019062000170565b5050505050620000c37fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c2177533620000cb60201b60201c565b50506200038a565b60008281526007602090815260408083206001600160a01b038516845290915290205460ff166200016c5760008281526007602090815260408083206001600160a01b03851684529091529020805460ff191660011790556200012b3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45b5050565b8280546200017e906200034d565b90600052602060002090601f016020900481019282620001a25760008555620001ed565b82601f10620001bd57805160ff1916838001178555620001ed565b82800160010185558215620001ed579182015b82811115620001ed578251825591602001919060010190620001d0565b50620001fb929150620001ff565b5090565b5b80821115620001fb576000815560010162000200565b634e487b7160e01b600052604160045260246000fd5b600082601f8301126200023e57600080fd5b81516001600160401b03808211156200025b576200025b62000216565b604051601f8301601f19908116603f0116810190828211818310171562000286576200028662000216565b81604052838152602092508683858801011115620002a357600080fd5b600091505b83821015620002c75785820183015181830184015290820190620002a8565b83821115620002d95760008385830101525b9695505050505050565b60008060408385031215620002f757600080fd5b82516001600160401b03808211156200030f57600080fd5b6200031d868387016200022c565b935060208501519150808211156200033457600080fd5b5062000343858286016200022c565b9150509250929050565b600181811c908216806200036257607f821691505b602082108114156200038457634e487b7160e01b600052602260045260246000fd5b50919050565b61163d806200039a6000396000f3fe608060405234801561001057600080fd5b50600436106101775760003560e01c806339509351116100d8578063979005ad1161008c578063a9059cbb11610066578063a9059cbb1461031a578063d547741f1461032d578063dd62ed3e1461034057600080fd5b8063979005ad146102ec578063a217fddf146102ff578063a457c2d71461030757600080fd5b806375b238fc116100bd57806375b238fc1461028457806391d14854146102ab57806395d89b41146102e457600080fd5b8063395093511461025e57806370a082311461027157600080fd5b806323b872dd1161012f5780632f2ff15d116101145780632f2ff15d14610229578063313ce5671461023c57806336568abe1461024b57600080fd5b806323b872dd146101f3578063248a9ca31461020657600080fd5b8063095ea7b311610160578063095ea7b3146101b957806318160ddd146101cc5780631dd319cb146101de57600080fd5b806301ffc9a71461017c57806306fdde03146101a4575b600080fd5b61018f61018a3660046112f7565b610353565b60405190151581526020015b60405180910390f35b6101ac6103ec565b60405161019b9190611365565b61018f6101c73660046113b4565b61047e565b6002545b60405190815260200161019b565b6101f16101ec3660046113b4565b610496565b005b61018f6102013660046113de565b61052d565b6101d061021436600461141a565b60009081526007602052604090206001015490565b6101f1610237366004611433565b610551565b6040516012815260200161019b565b6101f1610259366004611433565b610577565b61018f61026c3660046113b4565b610603565b6101d061027f36600461145f565b610642565b6101d07fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c2177581565b61018f6102b9366004611433565b60009182526007602090815260408084206001600160a01b0393909316845291905290205460ff1690565b6101ac6106ea565b6101f16102fa3660046113b4565b6106f9565b6101d0600081565b61018f6103153660046113b4565b61072e565b61018f6103283660046113b4565b6107d8565b6101f161033b366004611433565b6107e6565b6101d061034e36600461147a565b61080c565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f7965db0b0000000000000000000000000000000000000000000000000000000014806103e657507f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316145b92915050565b6060600380546103fb906114a4565b80601f0160208091040260200160405190810160405280929190818152602001828054610427906114a4565b80156104745780601f1061044957610100808354040283529160200191610474565b820191906000526020600020905b81548152906001019060200180831161045757829003601f168201915b5050505050905090565b60003361048c81858561091d565b5060019392505050565b7fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c217756104c18133610a75565b816104cb84610642565b101561051e5760405162461bcd60e51b815260206004820152601560248201527f496e73756666696369656e742062616c616e63652e000000000000000000000060448201526064015b60405180910390fd5b6105288383610af5565b505050565b60003361053b858285610c7a565b610546858585610cf4565b506001949350505050565b60008281526007602052604090206001015461056d8133610a75565b6105288383610f0b565b6001600160a01b03811633146105f55760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201527f20726f6c657320666f722073656c6600000000000000000000000000000000006064820152608401610515565b6105ff8282610fad565b5050565b3360008181526001602090815260408083206001600160a01b038716845290915281205490919061048c908290869061063d9087906114f5565b61091d565b6000326001600160a01b0383161415610673576001600160a01b0382166000908152602081905260409020546103e6565b336001600160a01b03831614156106a2576001600160a01b0382166000908152602081905260409020546103e6565b60405162461bcd60e51b815260206004820152601f60248201527f4e6f7420616c6c6f77656420746f2072656164207468652062616c616e6365006044820152606401610515565b6060600480546103fb906114a4565b7fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c217756107248133610a75565b6105288383611030565b3360008181526001602090815260408083206001600160a01b0387168452909152812054909190838110156107cb5760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f7760448201527f207a65726f0000000000000000000000000000000000000000000000000000006064820152608401610515565b610546828686840361091d565b60003361048c818585610cf4565b6000828152600760205260409020600101546108028133610a75565b6105288383610fad565b6000326001600160a01b038416148061082d5750326001600160a01b038316145b15610860576001600160a01b038084166000908152600160209081526040808320938616835292905220545b90506103e6565b336001600160a01b038416148061087f5750336001600160a01b038316145b156108af576001600160a01b03808416600090815260016020908152604080832093861683529290522054610859565b60405162461bcd60e51b815260206004820152602160248201527f4e6f7420616c6c6f77656420746f20726561642074686520616c6c6f77616e6360448201527f65000000000000000000000000000000000000000000000000000000000000006064820152608401610515565b6001600160a01b0383166109985760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460448201527f72657373000000000000000000000000000000000000000000000000000000006064820152608401610515565b6001600160a01b038216610a145760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f20616464726560448201527f73730000000000000000000000000000000000000000000000000000000000006064820152608401610515565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b60008281526007602090815260408083206001600160a01b038516845290915290205460ff166105ff57610ab3816001600160a01b0316601461110f565b610abe83602061110f565b604051602001610acf92919061150d565b60408051601f198184030181529082905262461bcd60e51b825261051591600401611365565b6001600160a01b038216610b715760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f2061646472657360448201527f73000000000000000000000000000000000000000000000000000000000000006064820152608401610515565b6001600160a01b03821660009081526020819052604090205481811015610c005760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e60448201527f63650000000000000000000000000000000000000000000000000000000000006064820152608401610515565b6001600160a01b0383166000908152602081905260408120838303905560028054849290610c2f90849061158e565b90915550506040518281526000906001600160a01b038516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a3505050565b6000610c86848461080c565b90506000198114610cee5781811015610ce15760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e63650000006044820152606401610515565b610cee848484840361091d565b50505050565b6001600160a01b038316610d705760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f20616460448201527f64726573730000000000000000000000000000000000000000000000000000006064820152608401610515565b6001600160a01b038216610dec5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201527f65737300000000000000000000000000000000000000000000000000000000006064820152608401610515565b6001600160a01b03831660009081526020819052604090205481811015610e7b5760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e742065786365656473206260448201527f616c616e636500000000000000000000000000000000000000000000000000006064820152608401610515565b6001600160a01b03808516600090815260208190526040808220858503905591851681529081208054849290610eb29084906114f5565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef84604051610efe91815260200190565b60405180910390a3610cee565b60008281526007602090815260408083206001600160a01b038516845290915290205460ff166105ff5760008281526007602090815260408083206001600160a01b03851684529091529020805460ff19166001179055610f693390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b60008281526007602090815260408083206001600160a01b038516845290915290205460ff16156105ff5760008281526007602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b6001600160a01b0382166110865760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152606401610515565b806002600082825461109891906114f5565b90915550506001600160a01b038216600090815260208190526040812080548392906110c59084906114f5565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b6060600061111e8360026115a5565b6111299060026114f5565b67ffffffffffffffff811115611141576111416115c4565b6040519080825280601f01601f19166020018201604052801561116b576020820181803683370190505b5090507f3000000000000000000000000000000000000000000000000000000000000000816000815181106111a2576111a26115da565b60200101906001600160f81b031916908160001a9053507f7800000000000000000000000000000000000000000000000000000000000000816001815181106111ed576111ed6115da565b60200101906001600160f81b031916908160001a90535060006112118460026115a5565b61121c9060016114f5565b90505b60018111156112a1577f303132333435363738396162636465660000000000000000000000000000000085600f166010811061125d5761125d6115da565b1a60f81b828281518110611273576112736115da565b60200101906001600160f81b031916908160001a90535060049490941c9361129a816115f0565b905061121f565b5083156112f05760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610515565b9392505050565b60006020828403121561130957600080fd5b81357fffffffff00000000000000000000000000000000000000000000000000000000811681146112f057600080fd5b60005b8381101561135457818101518382015260200161133c565b83811115610cee5750506000910152565b6020815260008251806020840152611384816040850160208701611339565b601f01601f19169190910160400192915050565b80356001600160a01b03811681146113af57600080fd5b919050565b600080604083850312156113c757600080fd5b6113d083611398565b946020939093013593505050565b6000806000606084860312156113f357600080fd5b6113fc84611398565b925061140a60208501611398565b9150604084013590509250925092565b60006020828403121561142c57600080fd5b5035919050565b6000806040838503121561144657600080fd5b8235915061145660208401611398565b90509250929050565b60006020828403121561147157600080fd5b6112f082611398565b6000806040838503121561148d57600080fd5b61149683611398565b915061145660208401611398565b600181811c908216806114b857607f821691505b602082108114156114d957634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b60008219821115611508576115086114df565b500190565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260008351611545816017850160208801611339565b7f206973206d697373696e6720726f6c65200000000000000000000000000000006017918401918201528351611582816028840160208801611339565b01602801949350505050565b6000828210156115a0576115a06114df565b500390565b60008160001904831182151516156115bf576115bf6114df565b500290565b634e487b7160e01b600052604160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b6000816115ff576115ff6114df565b50600019019056fea26469706673582212203d4cd3ed17d72b2f94aa2bf3da11f2d447bbf1eab55024ccf72a1f938cbe214064736f6c63430008090033a2646970667358221220911a0e3d80e16ddbabe265ef67bfd98bd994d6e64ffb761fe54fd0713814c6b264736f6c63430008090033", } // EthereumBridgeABI is the input ABI used to generate the binding from. diff --git a/contracts/generated/ObscuroBridge/ObscuroBridge.go b/contracts/generated/ObscuroBridge/ObscuroBridge.go index 7976c056b0..9a5aa18975 100644 --- a/contracts/generated/ObscuroBridge/ObscuroBridge.go +++ b/contracts/generated/ObscuroBridge/ObscuroBridge.go @@ -32,7 +32,7 @@ var ( // 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: "0x60806040526001805463ffffffff60a01b191690553480156200002157600080fd5b5060405162001bb338038062001bb38339810160408190526200004491620001fc565b600080546001600160a01b0319166001600160a01b038316908117909155604080516350d113fd60e11b8152905183929163a1a227fa916004808301926020929190829003018186803b1580156200009b57600080fd5b505afa158015620000b0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620000d69190620001fc565b600180546001600160a01b0319166001600160a01b039290921691909117905550620001237fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c217753362000157565b620001507fd2fb17ceaa388942529b17e0006ffc4d559f040dd4f2157b8070f17ad2110578600062000157565b506200022e565b60008281526002602090815260408083206001600160a01b038516845290915290205460ff16620001f85760008281526002602090815260408083206001600160a01b03851684529091529020805460ff19166001179055620001b73390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45b5050565b6000602082840312156200020f57600080fd5b81516001600160a01b03811681146200022757600080fd5b9392505050565b611975806200023e6000396000f3fe60806040526004361061010e5760003560e01c80635fa7b584116100a557806393b3744211610074578063a381c8e211610059578063a381c8e21461033e578063d547741f1461035e578063e4c3ebc71461037e57600080fd5b806393b3744214610309578063a217fddf1461032957600080fd5b80635fa7b5841461024f57806375b238fc1461026f57806383bece4d146102a357806391d14854146102c357600080fd5b80632f2ff15d116100e15780632f2ff15d146101bb57806336568abe146101db578063498d82ab146101fb5780635d8729701461021b57600080fd5b806301ffc9a71461011357806316ce8149146101485780631888d7121461016a578063248a9ca31461017d575b600080fd5b34801561011f57600080fd5b5061013361012e366004611477565b6103b2565b60405190151581526020015b60405180910390f35b34801561015457600080fd5b506101686101633660046114b9565b61041b565b005b6101686101783660046114b9565b610481565b34801561018957600080fd5b506101ad6101983660046114d6565b60009081526002602052604090206001015490565b60405190815260200161013f565b3480156101c757600080fd5b506101686101d63660046114ef565b610543565b3480156101e757600080fd5b506101686101f63660046114ef565b61056e565b34801561020757600080fd5b50610168610216366004611568565b6105f6565b34801561022757600080fd5b506101ad7f9f225881f6e7ac8a885b63aa2269cbce78dd6a669864ccd2cd2517a8e709d73a81565b34801561025b57600080fd5b5061016861026a3660046114b9565b6106c4565b34801561027b57600080fd5b506101ad7fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c2177581565b3480156102af57600080fd5b506101686102be3660046115eb565b610719565b3480156102cf57600080fd5b506101336102de3660046114ef565b60009182526002602090815260408084206001600160a01b0393909316845291905290205460ff1690565b34801561031557600080fd5b506101686103243660046114b9565b61093c565b34801561033557600080fd5b506101ad600081565b34801561034a57600080fd5b506101686103593660046115eb565b610991565b34801561036a57600080fd5b506101686103793660046114ef565b610b25565b34801561038a57600080fd5b506101ad7fd2fb17ceaa388942529b17e0006ffc4d559f040dd4f2157b8070f17ad211057881565b60006001600160e01b031982167f7965db0b00000000000000000000000000000000000000000000000000000000148061041557507f01ffc9a7000000000000000000000000000000000000000000000000000000006001600160e01b03198316145b92915050565b7fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c217756104468133610b4b565b50600380547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0392909216919091179055565b600034116104d65760405162461bcd60e51b815260206004820152600f60248201527f456d707479207472616e736665722e000000000000000000000000000000000060448201526064015b60405180910390fd5b604080516000602482018190523460448301526001600160a01b038481166064808501919091528451808503909101815260849093019093526020820180516001600160e01b03166383bece4d60e01b179052600354919261053f92169083905b600080610bcb565b5050565b60008281526002602052604090206001015461055f8133610b4b565b6105698383610ce6565b505050565b6001600160a01b03811633146105ec5760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201527f20726f6c657320666f722073656c66000000000000000000000000000000000060648201526084016104cd565b61053f8282610d88565b7fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c217756106218133610b4b565b61064b7f9f225881f6e7ac8a885b63aa2269cbce78dd6a669864ccd2cd2517a8e709d73a87610ce6565b600063458ffd6360e01b878787878760405160240161066e959493929190611656565b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b0319909316929092179091526003549091506106bb906001600160a01b0316826001610537565b50505050505050565b7fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c217756106ef8133610b4b565b61053f7f9f225881f6e7ac8a885b63aa2269cbce78dd6a669864ccd2cd2517a8e709d73a83610d88565b6003546000546001600160a01b03918216911633146107a05760405162461bcd60e51b815260206004820152603060248201527f436f6e74726163742063616c6c6572206973206e6f742074686520726567697360448201527f7465726564206d657373656e676572210000000000000000000000000000000060648201526084016104cd565b806001600160a01b03166107b2610e0b565b6001600160a01b03161461082e5760405162461bcd60e51b815260206004820152603160248201527f43726f737320636861696e206d65737361676520636f6d696e672066726f6d2060448201527f696e636f72726563742073656e6465722100000000000000000000000000000060648201526084016104cd565b6001600160a01b03841660009081527f32ef73018533fa188e9e42b313c0a4048c6052342b662fb7510c0d1abcea3413602052604090205460ff161561087e57610879848484610e97565b610936565b6001600160a01b03841660009081527f13ad2d85210d477fe1a6e25654c8250308cf29b050a4bf0b039d70467486712c602052604090205460ff16156108c8576108798383610ea2565b60405162461bcd60e51b815260206004820152602560248201527f417474656d7074696e6720746f20776974686472617720756e6b6e6f776e206160448201527f737365742e00000000000000000000000000000000000000000000000000000060648201526084016104cd565b50505050565b7fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c217756109678133610b4b565b61053f7fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c2177583610ce6565b600082116109e15760405162461bcd60e51b815260206004820152601a60248201527f417474656d7074696e6720656d707479207472616e736665722e00000000000060448201526064016104cd565b6001600160a01b03831660009081527f32ef73018533fa188e9e42b313c0a4048c6052342b662fb7510c0d1abcea3413602052604090205460ff16610ab45760405162461bcd60e51b815260206004820152604e60248201527f54686973206164647265737320686173206e6f74206265656e20676976656e2060448201527f61207479706520616e64206973207468757320636f6e73696465726564206e6f60648201527f742077686974656c69737465642e000000000000000000000000000000000000608482015260a4016104cd565b610ac083333085610f45565b604080516001600160a01b038581166024830152604482018590528381166064808401919091528351808403909101815260849092019092526020810180516001600160e01b03166383bece4d60e01b17905260035490916109369116826000610537565b600082815260026020526040902060010154610b418133610b4b565b6105698383610d88565b60008281526002602090815260408083206001600160a01b038516845290915290205460ff1661053f57610b89816001600160a01b03166014610fc9565b610b94836020610fc9565b604051602001610ba59291906116c4565b60408051601f198184030181529082905262461bcd60e51b82526104cd91600401611771565b60006040518060600160405280876001600160a01b0316815260200186815260200184815250604051602001610c019190611784565b60408051808303601f19018152919052600180549192506001600160a01b0382169163b1454caa917401000000000000000000000000000000000000000090910463ffffffff16906014610c54836117df565b91906101000a81548163ffffffff021916908363ffffffff1602179055508684866040518563ffffffff1660e01b8152600401610c949493929190611803565b602060405180830381600087803b158015610cae57600080fd5b505af1158015610cc2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106bb9190611840565b60008281526002602090815260408083206001600160a01b038516845290915290205460ff1661053f5760008281526002602090815260408083206001600160a01b03851684529091529020805460ff19166001179055610d443390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b60008281526002602090815260408083206001600160a01b038516845290915290205460ff161561053f5760008281526002602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b60008060009054906101000a90046001600160a01b03166001600160a01b03166363012de56040518163ffffffff1660e01b815260040160206040518083038186803b158015610e5a57600080fd5b505afa158015610e6e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e92919061186a565b905090565b6105698382846111b1565b6000816001600160a01b03168360405160006040518083038185875af1925050503d8060008114610eef576040519150601f19603f3d011682016040523d82523d6000602084013e610ef4565b606091505b50509050806105695760405162461bcd60e51b815260206004820152601460248201527f4661696c656420746f2073656e6420457468657200000000000000000000000060448201526064016104cd565b6040516001600160a01b03808516602483015283166044820152606481018290526109369085907f23b872dd00000000000000000000000000000000000000000000000000000000906084015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b0319909316929092179091526111fa565b60606000610fd8836002611887565b610fe39060026118a6565b67ffffffffffffffff811115610ffb57610ffb6118be565b6040519080825280601f01601f191660200182016040528015611025576020820181803683370190505b5090507f30000000000000000000000000000000000000000000000000000000000000008160008151811061105c5761105c6118d4565b60200101906001600160f81b031916908160001a9053507f7800000000000000000000000000000000000000000000000000000000000000816001815181106110a7576110a76118d4565b60200101906001600160f81b031916908160001a90535060006110cb846002611887565b6110d69060016118a6565b90505b600181111561115b577f303132333435363738396162636465660000000000000000000000000000000085600f1660108110611117576111176118d4565b1a60f81b82828151811061112d5761112d6118d4565b60200101906001600160f81b031916908160001a90535060049490941c93611154816118ea565b90506110d9565b5083156111aa5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e7460448201526064016104cd565b9392505050565b6040516001600160a01b0383166024820152604481018290526105699084907fa9059cbb0000000000000000000000000000000000000000000000000000000090606401610f92565b600061124f826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166112df9092919063ffffffff16565b805190915015610569578080602001905181019061126d9190611901565b6105695760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f7420737563636565640000000000000000000000000000000000000000000060648201526084016104cd565b60606112ee84846000856112f6565b949350505050565b60608247101561136e5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c000000000000000000000000000000000000000000000000000060648201526084016104cd565b6001600160a01b0385163b6113c55760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016104cd565b600080866001600160a01b031685876040516113e19190611923565b60006040518083038185875af1925050503d806000811461141e576040519150601f19603f3d011682016040523d82523d6000602084013e611423565b606091505b509150915061143382828661143e565b979650505050505050565b6060831561144d5750816111aa565b82511561145d5782518084602001fd5b8160405162461bcd60e51b81526004016104cd9190611771565b60006020828403121561148957600080fd5b81356001600160e01b0319811681146111aa57600080fd5b6001600160a01b03811681146114b657600080fd5b50565b6000602082840312156114cb57600080fd5b81356111aa816114a1565b6000602082840312156114e857600080fd5b5035919050565b6000806040838503121561150257600080fd5b823591506020830135611514816114a1565b809150509250929050565b60008083601f84011261153157600080fd5b50813567ffffffffffffffff81111561154957600080fd5b60208301915083602082850101111561156157600080fd5b9250929050565b60008060008060006060868803121561158057600080fd5b853561158b816114a1565b9450602086013567ffffffffffffffff808211156115a857600080fd5b6115b489838a0161151f565b909650945060408801359150808211156115cd57600080fd5b506115da8882890161151f565b969995985093965092949392505050565b60008060006060848603121561160057600080fd5b833561160b816114a1565b9250602084013591506040840135611622816114a1565b809150509250925092565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b6001600160a01b038616815260606020820152600061167960608301868861162d565b828103604084015261168c81858761162d565b98975050505050505050565b60005b838110156116b357818101518382015260200161169b565b838111156109365750506000910152565b7f416363657373436f6e74726f6c3a206163636f756e74200000000000000000008152600083516116fc816017850160208801611698565b7f206973206d697373696e6720726f6c65200000000000000000000000000000006017918401918201528351611739816028840160208801611698565b01602801949350505050565b6000815180845261175d816020860160208601611698565b601f01601f19169290920160200192915050565b6020815260006111aa6020830184611745565b602081526001600160a01b03825116602082015260006020830151606060408401526117b36080840182611745565b9050604084015160608401528091505092915050565b634e487b7160e01b600052601160045260246000fd5b600063ffffffff808316818114156117f9576117f96117c9565b6001019392505050565b600063ffffffff80871683528086166020840152506080604083015261182c6080830185611745565b905060ff8316606083015295945050505050565b60006020828403121561185257600080fd5b815167ffffffffffffffff811681146111aa57600080fd5b60006020828403121561187c57600080fd5b81516111aa816114a1565b60008160001904831182151516156118a1576118a16117c9565b500290565b600082198211156118b9576118b96117c9565b500190565b634e487b7160e01b600052604160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b6000816118f9576118f96117c9565b506000190190565b60006020828403121561191357600080fd5b815180151581146111aa57600080fd5b60008251611935818460208701611698565b919091019291505056fea2646970667358221220db09595d8f197db3ddd74dca401a535afe66fc3eb46b53e2d55e8c732bd0083664736f6c63430008090033", + Bin: "0x60806040526001805463ffffffff60a01b191690553480156200002157600080fd5b5060405162001bbb38038062001bbb8339810160408190526200004491620001fc565b600080546001600160a01b0319166001600160a01b038316908117909155604080516350d113fd60e11b8152905183929163a1a227fa916004808301926020929190829003018186803b1580156200009b57600080fd5b505afa158015620000b0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620000d69190620001fc565b600180546001600160a01b0319166001600160a01b039290921691909117905550620001237fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c217753362000157565b620001507fd2fb17ceaa388942529b17e0006ffc4d559f040dd4f2157b8070f17ad2110578600062000157565b506200022e565b60008281526002602090815260408083206001600160a01b038516845290915290205460ff16620001f85760008281526002602090815260408083206001600160a01b03851684529091529020805460ff19166001179055620001b73390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45b5050565b6000602082840312156200020f57600080fd5b81516001600160a01b03811681146200022757600080fd5b9392505050565b61197d806200023e6000396000f3fe60806040526004361061010e5760003560e01c80635fa7b584116100a557806393b3744211610074578063a381c8e211610059578063a381c8e21461033e578063d547741f1461035e578063e4c3ebc71461037e57600080fd5b806393b3744214610309578063a217fddf1461032957600080fd5b80635fa7b5841461024f57806375b238fc1461026f57806383bece4d146102a357806391d14854146102c357600080fd5b80632f2ff15d116100e15780632f2ff15d146101bb57806336568abe146101db578063498d82ab146101fb5780635d8729701461021b57600080fd5b806301ffc9a71461011357806316ce8149146101485780631888d7121461016a578063248a9ca31461017d575b600080fd5b34801561011f57600080fd5b5061013361012e36600461147f565b6103b2565b60405190151581526020015b60405180910390f35b34801561015457600080fd5b506101686101633660046114c1565b61041b565b005b6101686101783660046114c1565b610481565b34801561018957600080fd5b506101ad6101983660046114de565b60009081526002602052604090206001015490565b60405190815260200161013f565b3480156101c757600080fd5b506101686101d63660046114f7565b610532565b3480156101e757600080fd5b506101686101f63660046114f7565b61055d565b34801561020757600080fd5b50610168610216366004611570565b6105e5565b34801561022757600080fd5b506101ad7f9f225881f6e7ac8a885b63aa2269cbce78dd6a669864ccd2cd2517a8e709d73a81565b34801561025b57600080fd5b5061016861026a3660046114c1565b6106b3565b34801561027b57600080fd5b506101ad7fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c2177581565b3480156102af57600080fd5b506101686102be3660046115f3565b610708565b3480156102cf57600080fd5b506101336102de3660046114f7565b60009182526002602090815260408084206001600160a01b0393909316845291905290205460ff1690565b34801561031557600080fd5b506101686103243660046114c1565b61092b565b34801561033557600080fd5b506101ad600081565b34801561034a57600080fd5b506101686103593660046115f3565b610980565b34801561036a57600080fd5b506101686103793660046114f7565b610b2d565b34801561038a57600080fd5b506101ad7fd2fb17ceaa388942529b17e0006ffc4d559f040dd4f2157b8070f17ad211057881565b60006001600160e01b031982167f7965db0b00000000000000000000000000000000000000000000000000000000148061041557507f01ffc9a7000000000000000000000000000000000000000000000000000000006001600160e01b03198316145b92915050565b7fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c217756104468133610b53565b50600380547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0392909216919091179055565b600034116104d65760405162461bcd60e51b815260206004820152600f60248201527f456d707479207472616e736665722e000000000000000000000000000000000060448201526064015b60405180910390fd5b604080518082018252348082526001600160a01b03848116602093840190815284519384019290925290518116828401528251808303840181526060909201909252600354909161052e91168260005b600080610bd3565b5050565b60008281526002602052604090206001015461054e8133610b53565b6105588383610cee565b505050565b6001600160a01b03811633146105db5760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201527f20726f6c657320666f722073656c66000000000000000000000000000000000060648201526084016104cd565b61052e8282610d90565b7fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c217756106108133610b53565b61063a7f9f225881f6e7ac8a885b63aa2269cbce78dd6a669864ccd2cd2517a8e709d73a87610cee565b600063458ffd6360e01b878787878760405160240161065d95949392919061165e565b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b0319909316929092179091526003549091506106aa906001600160a01b0316826002610526565b50505050505050565b7fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c217756106de8133610b53565b61052e7f9f225881f6e7ac8a885b63aa2269cbce78dd6a669864ccd2cd2517a8e709d73a83610d90565b6003546000546001600160a01b039182169116331461078f5760405162461bcd60e51b815260206004820152603060248201527f436f6e74726163742063616c6c6572206973206e6f742074686520726567697360448201527f7465726564206d657373656e676572210000000000000000000000000000000060648201526084016104cd565b806001600160a01b03166107a1610e13565b6001600160a01b03161461081d5760405162461bcd60e51b815260206004820152603160248201527f43726f737320636861696e206d65737361676520636f6d696e672066726f6d2060448201527f696e636f72726563742073656e6465722100000000000000000000000000000060648201526084016104cd565b6001600160a01b03841660009081527f32ef73018533fa188e9e42b313c0a4048c6052342b662fb7510c0d1abcea3413602052604090205460ff161561086d57610868848484610e9f565b610925565b6001600160a01b03841660009081527f13ad2d85210d477fe1a6e25654c8250308cf29b050a4bf0b039d70467486712c602052604090205460ff16156108b7576108688383610eaa565b60405162461bcd60e51b815260206004820152602560248201527f417474656d7074696e6720746f20776974686472617720756e6b6e6f776e206160448201527f737365742e00000000000000000000000000000000000000000000000000000060648201526084016104cd565b50505050565b7fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c217756109568133610b53565b61052e7fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c2177583610cee565b600082116109d05760405162461bcd60e51b815260206004820152601a60248201527f417474656d7074696e6720656d707479207472616e736665722e00000000000060448201526064016104cd565b6001600160a01b03831660009081527f32ef73018533fa188e9e42b313c0a4048c6052342b662fb7510c0d1abcea3413602052604090205460ff16610aa35760405162461bcd60e51b815260206004820152604e60248201527f54686973206164647265737320686173206e6f74206265656e20676976656e2060448201527f61207479706520616e64206973207468757320636f6e73696465726564206e6f60648201527f742077686974656c69737465642e000000000000000000000000000000000000608482015260a4016104cd565b610aaf83333085610f4d565b604080516001600160a01b038581166024830152604482018590528381166064808401919091528351808403909101815260849092019092526020810180516001600160e01b03167f83bece4d0000000000000000000000000000000000000000000000000000000017905260035490916109259116826001610526565b600082815260026020526040902060010154610b498133610b53565b6105588383610d90565b60008281526002602090815260408083206001600160a01b038516845290915290205460ff1661052e57610b91816001600160a01b03166014610fd1565b610b9c836020610fd1565b604051602001610bad9291906116cc565b60408051601f198184030181529082905262461bcd60e51b82526104cd91600401611779565b60006040518060600160405280876001600160a01b0316815260200186815260200184815250604051602001610c09919061178c565b60408051808303601f19018152919052600180549192506001600160a01b0382169163b1454caa917401000000000000000000000000000000000000000090910463ffffffff16906014610c5c836117e7565b91906101000a81548163ffffffff021916908363ffffffff1602179055508684866040518563ffffffff1660e01b8152600401610c9c949392919061180b565b602060405180830381600087803b158015610cb657600080fd5b505af1158015610cca573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106aa9190611848565b60008281526002602090815260408083206001600160a01b038516845290915290205460ff1661052e5760008281526002602090815260408083206001600160a01b03851684529091529020805460ff19166001179055610d4c3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b60008281526002602090815260408083206001600160a01b038516845290915290205460ff161561052e5760008281526002602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b60008060009054906101000a90046001600160a01b03166001600160a01b03166363012de56040518163ffffffff1660e01b815260040160206040518083038186803b158015610e6257600080fd5b505afa158015610e76573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e9a9190611872565b905090565b6105588382846111b9565b6000816001600160a01b03168360405160006040518083038185875af1925050503d8060008114610ef7576040519150601f19603f3d011682016040523d82523d6000602084013e610efc565b606091505b50509050806105585760405162461bcd60e51b815260206004820152601460248201527f4661696c656420746f2073656e6420457468657200000000000000000000000060448201526064016104cd565b6040516001600160a01b03808516602483015283166044820152606481018290526109259085907f23b872dd00000000000000000000000000000000000000000000000000000000906084015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152611202565b60606000610fe083600261188f565b610feb9060026118ae565b67ffffffffffffffff811115611003576110036118c6565b6040519080825280601f01601f19166020018201604052801561102d576020820181803683370190505b5090507f300000000000000000000000000000000000000000000000000000000000000081600081518110611064576110646118dc565b60200101906001600160f81b031916908160001a9053507f7800000000000000000000000000000000000000000000000000000000000000816001815181106110af576110af6118dc565b60200101906001600160f81b031916908160001a90535060006110d384600261188f565b6110de9060016118ae565b90505b6001811115611163577f303132333435363738396162636465660000000000000000000000000000000085600f166010811061111f5761111f6118dc565b1a60f81b828281518110611135576111356118dc565b60200101906001600160f81b031916908160001a90535060049490941c9361115c816118f2565b90506110e1565b5083156111b25760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e7460448201526064016104cd565b9392505050565b6040516001600160a01b0383166024820152604481018290526105589084907fa9059cbb0000000000000000000000000000000000000000000000000000000090606401610f9a565b6000611257826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166112e79092919063ffffffff16565b80519091501561055857808060200190518101906112759190611909565b6105585760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f7420737563636565640000000000000000000000000000000000000000000060648201526084016104cd565b60606112f684846000856112fe565b949350505050565b6060824710156113765760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c000000000000000000000000000000000000000000000000000060648201526084016104cd565b6001600160a01b0385163b6113cd5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016104cd565b600080866001600160a01b031685876040516113e9919061192b565b60006040518083038185875af1925050503d8060008114611426576040519150601f19603f3d011682016040523d82523d6000602084013e61142b565b606091505b509150915061143b828286611446565b979650505050505050565b606083156114555750816111b2565b8251156114655782518084602001fd5b8160405162461bcd60e51b81526004016104cd9190611779565b60006020828403121561149157600080fd5b81356001600160e01b0319811681146111b257600080fd5b6001600160a01b03811681146114be57600080fd5b50565b6000602082840312156114d357600080fd5b81356111b2816114a9565b6000602082840312156114f057600080fd5b5035919050565b6000806040838503121561150a57600080fd5b82359150602083013561151c816114a9565b809150509250929050565b60008083601f84011261153957600080fd5b50813567ffffffffffffffff81111561155157600080fd5b60208301915083602082850101111561156957600080fd5b9250929050565b60008060008060006060868803121561158857600080fd5b8535611593816114a9565b9450602086013567ffffffffffffffff808211156115b057600080fd5b6115bc89838a01611527565b909650945060408801359150808211156115d557600080fd5b506115e288828901611527565b969995985093965092949392505050565b60008060006060848603121561160857600080fd5b8335611613816114a9565b925060208401359150604084013561162a816114a9565b809150509250925092565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b6001600160a01b0386168152606060208201526000611681606083018688611635565b8281036040840152611694818587611635565b98975050505050505050565b60005b838110156116bb5781810151838201526020016116a3565b838111156109255750506000910152565b7f416363657373436f6e74726f6c3a206163636f756e74200000000000000000008152600083516117048160178501602088016116a0565b7f206973206d697373696e6720726f6c652000000000000000000000000000000060179184019182015283516117418160288401602088016116a0565b01602801949350505050565b600081518084526117658160208601602086016116a0565b601f01601f19169290920160200192915050565b6020815260006111b2602083018461174d565b602081526001600160a01b03825116602082015260006020830151606060408401526117bb608084018261174d565b9050604084015160608401528091505092915050565b634e487b7160e01b600052601160045260246000fd5b600063ffffffff80831681811415611801576118016117d1565b6001019392505050565b600063ffffffff808716835280861660208401525060806040830152611834608083018561174d565b905060ff8316606083015295945050505050565b60006020828403121561185a57600080fd5b815167ffffffffffffffff811681146111b257600080fd5b60006020828403121561188457600080fd5b81516111b2816114a9565b60008160001904831182151516156118a9576118a96117d1565b500290565b600082198211156118c1576118c16117d1565b500190565b634e487b7160e01b600052604160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b600081611901576119016117d1565b506000190190565b60006020828403121561191b57600080fd5b815180151581146111b257600080fd5b6000825161193d8184602087016116a0565b919091019291505056fea2646970667358221220fdbb5488c128c72ba7838c18fc377f9773d6e3d2b900fc1d5548ffdbed85ce0164736f6c63430008090033", } // ObscuroBridgeABI is the input ABI used to generate the binding from. diff --git a/contracts/src/bridge/IBridge.sol b/contracts/src/bridge/IBridge.sol index 411e01d077..55ebe73b0c 100644 --- a/contracts/src/bridge/IBridge.sol +++ b/contracts/src/bridge/IBridge.sol @@ -6,6 +6,7 @@ pragma solidity >=0.7.0 <0.9.0; // Calling functions on it will result in assets being bridged over to the other layer automatically. interface IBridge { enum Topics { + VALUE, TRANSFER, MANAGEMENT } @@ -35,4 +36,9 @@ interface IBridge { uint256 amount, address receiver ) external; + + struct ValueTransfer { + uint256 amount; + address recipient; + } } diff --git a/contracts/src/bridge/L1/ObscuroBridge.sol b/contracts/src/bridge/L1/ObscuroBridge.sol index 9ebb931190..fe42611204 100644 --- a/contracts/src/bridge/L1/ObscuroBridge.sol +++ b/contracts/src/bridge/L1/ObscuroBridge.sol @@ -69,16 +69,15 @@ contract ObscuroBridge is remoteBridgeAddress = bridge; } + // This cross chain message is specialized and will result in automatic increase + // of balance on the other side. + // NOTE: If sent to a contract, there will be no fallback function executed. + // Instead after the contract receives it, one can relay the cross chain message to + // verify ETH deposit. function sendNative(address receiver) external payable override { require(msg.value > 0, "Empty transfer."); - - bytes memory data = abi.encodeWithSelector( - IBridge.receiveAssets.selector, - address(0x0), - msg.value, - receiver - ); - queueMessage(remoteBridgeAddress, data, uint32(Topics.TRANSFER), 0, 0); + bytes memory data = abi.encode(ValueTransfer(msg.value, receiver)); + queueMessage(remoteBridgeAddress, data, uint32(Topics.VALUE), 0, 0); } function sendERC20( diff --git a/go/common/types.go b/go/common/types.go index 2e8cc9c644..defb16e724 100644 --- a/go/common/types.go +++ b/go/common/types.go @@ -45,7 +45,7 @@ type ( L2Receipt = types.Receipt L2Receipts = types.Receipts - CrossChainMessage = MessageBus.StructsCrossChainMessage + CrossChainMessage MessageBus.StructsCrossChainMessage CrossChainMessages = []CrossChainMessage EncryptedTx []byte // A single transaction, encoded as a JSON list of transaction binary hexes and encrypted using the enclave's public key EncryptedTransactions []byte // A blob of encrypted transactions, as they're stored in the rollup, with the nonce prepended. diff --git a/go/enclave/crosschain/message_bus_manager.go b/go/enclave/crosschain/message_bus_manager.go index 33524fee06..d6eeff434b 100644 --- a/go/enclave/crosschain/message_bus_manager.go +++ b/go/enclave/crosschain/message_bus_manager.go @@ -163,6 +163,10 @@ func (m *MessageBusManager) RetrieveInboundMessages(fromBlock *common.L1Block, t return messages } +func (m *MessageBusManager) ShouldAutoRelayMessage(message common.CrossChainMessage) bool { + return message.Sender == *m.GetBusAddress() +} + // CreateSyntheticTransactions - generates transactions that the enclave should execute internally for the messages. func (m *MessageBusManager) CreateSyntheticTransactions(messages common.CrossChainMessages, rollupState *state.StateDB) common.L2Transactions { // Get current nonce for this stateDB. From c1d96184c2a1f4b54c1d7df4174b01381c57ab0a Mon Sep 17 00:00:00 2001 From: StefanIliev545 Date: Mon, 31 Jul 2023 21:13:43 +0300 Subject: [PATCH 02/47] WIP. --- .../CrossChainMessenger.go | 2 +- .../EthereumBridge/EthereumBridge.go | 2 +- .../ManagementContract/ManagementContract.go | 2 +- contracts/generated/MessageBus/MessageBus.go | 182 +++++++++++++++++- contracts/generated/ObsERC20/ObsERC20.go | 2 +- .../generated/ObscuroBridge/ObscuroBridge.go | 2 +- .../generated/WrappedERC20/WrappedERC20.go | 2 +- contracts/src/messaging/IMessageBus.sol | 12 ++ contracts/src/messaging/MessageBus.sol | 8 + go/common/types.go | 2 +- go/enclave/components/batch_producer.go | 6 + .../crosschain/block_message_extractor.go | 18 +- go/enclave/crosschain/interfaces.go | 4 + 13 files changed, 227 insertions(+), 17 deletions(-) diff --git a/contracts/generated/CrossChainMessenger/CrossChainMessenger.go b/contracts/generated/CrossChainMessenger/CrossChainMessenger.go index eff438fe82..1494d6dfb5 100644 --- a/contracts/generated/CrossChainMessenger/CrossChainMessenger.go +++ b/contracts/generated/CrossChainMessenger/CrossChainMessenger.go @@ -42,7 +42,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: "0x6080604052600180546001600160a01b031916905534801561002057600080fd5b506040516109ad3803806109ad83398101604081905261003f91610064565b600080546001600160a01b0319166001600160a01b0392909216919091179055610094565b60006020828403121561007657600080fd5b81516001600160a01b038116811461008d57600080fd5b9392505050565b61090a806100a36000396000f3fe608060405234801561001057600080fd5b506004361061004c5760003560e01c80635b76f28b1461005157806363012de51461007a5780639b7cf1ee146100a5578063a1a227fa146100ba575b600080fd5b61006461005f366004610425565b6100cb565b6040516100719190610504565b60405180910390f35b60015461008d906001600160a01b031681565b6040516001600160a01b039091168152602001610071565b6100b86100b336600461051e565b61014b565b005b6000546001600160a01b031661008d565b60606040518060600160405280856001600160a01b0316815260200184848080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920182905250938552505050602091820152604051610133929101610559565b60405160208183030381529060405290509392505050565b6101548161027d565b610161602082018261059e565b6001805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0392909216919091179055600061019d60808301836105b9565b8101906101aa9190610690565b905060008082600001516001600160a01b03165a84602001516040516101d09190610764565b60006040518083038160008787f1925050503d806000811461020e576040519150601f19603f3d011682016040523d82523d6000602084013e610213565b606091505b50915091508161025a57806040517fa5fa8d2b0000000000000000000000000000000000000000000000000000000081526004016102519190610504565b60405180910390fd5b50506001805473ffffffffffffffffffffffffffffffffffffffff191690555050565b6000546040517f33a88c720000000000000000000000000000000000000000000000000000000081526001600160a01b03909116906333a88c72906102c69084906004016107ce565b60206040518083038186803b1580156102de57600080fd5b505afa1580156102f2573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061031691906108b2565b6103625760405162461bcd60e51b815260206004820152601f60248201527f4d657373616765206e6f7420666f756e64206f722066696e616c697a65642e006044820152606401610251565b60008160405160200161037591906107ce565b60408051601f1981840301815291815281516020928301206000818152600290935291205490915060ff16156103ed5760405162461bcd60e51b815260206004820152601960248201527f4d65737361676520616c726561647920636f6e73756d65642e000000000000006044820152606401610251565b6000908152600260205260409020805460ff1916600117905550565b80356001600160a01b038116811461042057600080fd5b919050565b60008060006040848603121561043a57600080fd5b61044384610409565b9250602084013567ffffffffffffffff8082111561046057600080fd5b818601915086601f83011261047457600080fd5b81358181111561048357600080fd5b87602082850101111561049557600080fd5b6020830194508093505050509250925092565b60005b838110156104c35781810151838201526020016104ab565b838111156104d2576000848401525b50505050565b600081518084526104f08160208601602086016104a8565b601f01601f19169290920160200192915050565b60208152600061051760208301846104d8565b9392505050565b60006020828403121561053057600080fd5b813567ffffffffffffffff81111561054757600080fd5b820160c0818503121561051757600080fd5b602081526001600160a01b038251166020820152600060208301516060604084015261058860808401826104d8565b9050604084015160608401528091505092915050565b6000602082840312156105b057600080fd5b61051782610409565b6000808335601e198436030181126105d057600080fd5b83018035915067ffffffffffffffff8211156105eb57600080fd5b60200191503681900382131561060057600080fd5b9250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6040516060810167ffffffffffffffff8111828210171561065957610659610607565b60405290565b604051601f8201601f1916810167ffffffffffffffff8111828210171561068857610688610607565b604052919050565b600060208083850312156106a357600080fd5b823567ffffffffffffffff808211156106bb57600080fd5b90840190606082870312156106cf57600080fd5b6106d7610636565b6106e083610409565b815283830135828111156106f357600080fd5b8301601f8101881361070457600080fd5b80358381111561071657610716610607565b610728601f8201601f1916870161065f565b9350808452888682840101111561073e57600080fd5b808683018786013760009084018601525092830152604090810135908201529392505050565b600082516107768184602087016104a8565b9190910192915050565b803563ffffffff8116811461042057600080fd5b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b803560ff8116811461042057600080fd5b602081526001600160a01b036107e383610409565b1660208201526000602083013567ffffffffffffffff80821680831461080857600080fd5b8060408601525061081b60408601610780565b915063ffffffff80831660608601528061083760608801610780565b1660808601525060808501359150601e1985360301821261085757600080fd5b9084019081358181111561086a57600080fd5b80360386131561087957600080fd5b60c060a086015261089160e086018260208601610794565b925050506108a160a085016107bd565b60ff811660c0850152509392505050565b6000602082840312156108c457600080fd5b8151801515811461051757600080fdfea264697066735822122071fa1493675e54327867ea735dcb5aade210e1ddfbd9c82187a8baab562a574064736f6c63430008090033", + Bin: "0x6080604052600180546001600160a01b031916905534801561002057600080fd5b506040516109ad3803806109ad83398101604081905261003f91610064565b600080546001600160a01b0319166001600160a01b0392909216919091179055610094565b60006020828403121561007657600080fd5b81516001600160a01b038116811461008d57600080fd5b9392505050565b61090a806100a36000396000f3fe608060405234801561001057600080fd5b506004361061004c5760003560e01c80635b76f28b1461005157806363012de51461007a5780639b7cf1ee146100a5578063a1a227fa146100ba575b600080fd5b61006461005f366004610425565b6100cb565b6040516100719190610504565b60405180910390f35b60015461008d906001600160a01b031681565b6040516001600160a01b039091168152602001610071565b6100b86100b336600461051e565b61014b565b005b6000546001600160a01b031661008d565b60606040518060600160405280856001600160a01b0316815260200184848080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920182905250938552505050602091820152604051610133929101610559565b60405160208183030381529060405290509392505050565b6101548161027d565b610161602082018261059e565b6001805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0392909216919091179055600061019d60808301836105b9565b8101906101aa9190610690565b905060008082600001516001600160a01b03165a84602001516040516101d09190610764565b60006040518083038160008787f1925050503d806000811461020e576040519150601f19603f3d011682016040523d82523d6000602084013e610213565b606091505b50915091508161025a57806040517fa5fa8d2b0000000000000000000000000000000000000000000000000000000081526004016102519190610504565b60405180910390fd5b50506001805473ffffffffffffffffffffffffffffffffffffffff191690555050565b6000546040517f33a88c720000000000000000000000000000000000000000000000000000000081526001600160a01b03909116906333a88c72906102c69084906004016107ce565b60206040518083038186803b1580156102de57600080fd5b505afa1580156102f2573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061031691906108b2565b6103625760405162461bcd60e51b815260206004820152601f60248201527f4d657373616765206e6f7420666f756e64206f722066696e616c697a65642e006044820152606401610251565b60008160405160200161037591906107ce565b60408051601f1981840301815291815281516020928301206000818152600290935291205490915060ff16156103ed5760405162461bcd60e51b815260206004820152601960248201527f4d65737361676520616c726561647920636f6e73756d65642e000000000000006044820152606401610251565b6000908152600260205260409020805460ff1916600117905550565b80356001600160a01b038116811461042057600080fd5b919050565b60008060006040848603121561043a57600080fd5b61044384610409565b9250602084013567ffffffffffffffff8082111561046057600080fd5b818601915086601f83011261047457600080fd5b81358181111561048357600080fd5b87602082850101111561049557600080fd5b6020830194508093505050509250925092565b60005b838110156104c35781810151838201526020016104ab565b838111156104d2576000848401525b50505050565b600081518084526104f08160208601602086016104a8565b601f01601f19169290920160200192915050565b60208152600061051760208301846104d8565b9392505050565b60006020828403121561053057600080fd5b813567ffffffffffffffff81111561054757600080fd5b820160c0818503121561051757600080fd5b602081526001600160a01b038251166020820152600060208301516060604084015261058860808401826104d8565b9050604084015160608401528091505092915050565b6000602082840312156105b057600080fd5b61051782610409565b6000808335601e198436030181126105d057600080fd5b83018035915067ffffffffffffffff8211156105eb57600080fd5b60200191503681900382131561060057600080fd5b9250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6040516060810167ffffffffffffffff8111828210171561065957610659610607565b60405290565b604051601f8201601f1916810167ffffffffffffffff8111828210171561068857610688610607565b604052919050565b600060208083850312156106a357600080fd5b823567ffffffffffffffff808211156106bb57600080fd5b90840190606082870312156106cf57600080fd5b6106d7610636565b6106e083610409565b815283830135828111156106f357600080fd5b8301601f8101881361070457600080fd5b80358381111561071657610716610607565b610728601f8201601f1916870161065f565b9350808452888682840101111561073e57600080fd5b808683018786013760009084018601525092830152604090810135908201529392505050565b600082516107768184602087016104a8565b9190910192915050565b803563ffffffff8116811461042057600080fd5b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b803560ff8116811461042057600080fd5b602081526001600160a01b036107e383610409565b1660208201526000602083013567ffffffffffffffff80821680831461080857600080fd5b8060408601525061081b60408601610780565b915063ffffffff80831660608601528061083760608801610780565b1660808601525060808501359150601e1985360301821261085757600080fd5b9084019081358181111561086a57600080fd5b80360386131561087957600080fd5b60c060a086015261089160e086018260208601610794565b925050506108a160a085016107bd565b60ff811660c0850152509392505050565b6000602082840312156108c457600080fd5b8151801515811461051757600080fdfea2646970667358221220c9ab79b00191cbe70b9ec39f79657b9568562f2bedac8e782c7b13c3110a58a564736f6c63430008090033", } // CrossChainMessengerABI is the input ABI used to generate the binding from. diff --git a/contracts/generated/EthereumBridge/EthereumBridge.go b/contracts/generated/EthereumBridge/EthereumBridge.go index 3b0c45108d..de066bcee3 100644 --- a/contracts/generated/EthereumBridge/EthereumBridge.go +++ b/contracts/generated/EthereumBridge/EthereumBridge.go @@ -32,7 +32,7 @@ var ( // 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: "0x60806040526001805463ffffffff60a01b191690553480156200002157600080fd5b5060405162002b4e38038062002b4e83398101604081905262000044916200012c565b600080546001600160a01b0319166001600160a01b038416908117909155604080516350d113fd60e11b8152905184929163a1a227fa916004808301926020929190829003018186803b1580156200009b57600080fd5b505afa158015620000b0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620000d6919062000164565b600180546001600160a01b039283166001600160a01b031991821617909155600580549490921693169290921790915550620001899050565b80516001600160a01b03811681146200012757600080fd5b919050565b600080604083850312156200014057600080fd5b6200014b836200010f565b91506200015b602084016200010f565b90509250929050565b6000602082840312156200017757600080fd5b62000182826200010f565b9392505050565b6129b580620001996000396000f3fe6080604052600436106200008a5760003560e01c80639813c7b211620000555780639813c7b214620002065780639e405b711462000256578063a381c8e21462000290578063d5c6b50414620002b55762000103565b80628d48e3146200014c5780631888d71214620001a3578063458ffd6314620001bc57806383bece4d14620001e15762000103565b36620001035760405162461bcd60e51b815260206004820152602360248201527f436f6e747261637420646f6573206e6f7420737570706f72742072656365697660448201527f652829000000000000000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b60405162461bcd60e51b815260206004820152601d60248201527f66616c6c6261636b2829206d6574686f6420756e737570706f727465640000006044820152606401620000fa565b3480156200015957600080fd5b50620001866200016b36600462000c44565b6004602052600090815260409020546001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b620001ba620001b436600462000c44565b620002ef565b005b348015620001c957600080fd5b50620001ba620001db36600462000cb7565b62000470565b348015620001ee57600080fd5b50620001ba6200020036600462000d43565b6200068e565b3480156200021357600080fd5b50620002456200022536600462000c44565b6001600160a01b0390811660009081526002602052604090205416151590565b60405190151581526020016200019a565b3480156200026357600080fd5b50620001866200027536600462000c44565b6003602052600090815260409020546001600160a01b031681565b3480156200029d57600080fd5b50620001ba620002af36600462000d43565b620008d1565b348015620002c257600080fd5b5062000186620002d436600462000c44565b6002602052600090815260409020546001600160a01b031681565b60003411620003415760405162461bcd60e51b815260206004820152600d60248201527f4e6f7468696e672073656e742e000000000000000000000000000000000000006044820152606401620000fa565b6000805260026020527fac33ff75c19e70fe83507db0d683fd3465c996598dc972688b7ace676c89077b546001600160a01b0316620003c35760405162461bcd60e51b815260206004820152601560248201527f4e6f206d617070696e6720666f7220746f6b656e2e00000000000000000000006044820152606401620000fa565b60008052600360209081527f3617319a054d772f909f7c479a2cebe5066e836a939412e32403c99029b92eff54604080516001600160a01b03928316602482015234604482015284831660648083019190915282518083039091018152608490910190915291820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff166383bece4d60e01b1790526005546200046c91168260015b60008062000a5f565b5050565b6005546000546001600160a01b0391821691163314620004f95760405162461bcd60e51b815260206004820152603060248201527f436f6e74726163742063616c6c6572206973206e6f742074686520726567697360448201527f7465726564206d657373656e67657221000000000000000000000000000000006064820152608401620000fa565b806001600160a01b03166200050d62000b8d565b6001600160a01b0316146200058b5760405162461bcd60e51b815260206004820152603160248201527f43726f737320636861696e206d65737361676520636f6d696e672066726f6d2060448201527f696e636f72726563742073656e646572210000000000000000000000000000006064820152608401620000fa565b6000858585856040516200059f9062000c1d565b620005ae949392919062000db3565b604051809103906000f080158015620005cb573d6000803e3d6000fd5b506001600160a01b03808216600081815260026020908152604080832080547fffffffffffffffffffffffff00000000000000000000000000000000000000009081168617909155600383528184208054968f169682168717905594835260049091529081902080549093169091179091555190915081907f30c05779f384e0ae9d43bbf7ec4417f28bdc53d02a35551b6eb270a9c4c71dca906200067c908a9084908b908b908b908b9062000de9565b60405180910390a15050505050505050565b6005546000546001600160a01b0391821691163314620007175760405162461bcd60e51b815260206004820152603060248201527f436f6e74726163742063616c6c6572206973206e6f742074686520726567697360448201527f7465726564206d657373656e67657221000000000000000000000000000000006064820152608401620000fa565b806001600160a01b03166200072b62000b8d565b6001600160a01b031614620007a95760405162461bcd60e51b815260206004820152603160248201527f43726f737320636861696e206d65737361676520636f6d696e672066726f6d2060448201527f696e636f72726563742073656e646572210000000000000000000000000000006064820152608401620000fa565b6001600160a01b038085166000908152600460209081526040808320548416808452600290925290912054909116806200084c5760405162461bcd60e51b815260206004820152602b60248201527f526563656976696e672061737365747320666f7220756e6b6e6f776e2077726160448201527f7070656420746f6b656e210000000000000000000000000000000000000000006064820152608401620000fa565b6040517f979005ad0000000000000000000000000000000000000000000000000000000081526001600160a01b0385811660048301526024820187905282169063979005ad90604401600060405180830381600087803b158015620008b057600080fd5b505af1158015620008c5573d6000803e3d6000fd5b50505050505050505050565b6001600160a01b03808416600090815260026020526040902054166200093a5760405162461bcd60e51b815260206004820152601560248201527f4e6f206d617070696e6720666f7220746f6b656e2e00000000000000000000006044820152606401620000fa565b6001600160a01b03838116600090815260026020526040908190205490517f1dd319cb000000000000000000000000000000000000000000000000000000008152336004820152602481018590529116908190631dd319cb90604401600060405180830381600087803b158015620009b157600080fd5b505af1158015620009c6573d6000803e3d6000fd5b505050506001600160a01b03848116600090815260036020908152604091829020548251908416602482015260448101879052858416606480830191909152835180830390910181526084909101909252810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff166383bece4d60e01b179052600554909162000a58911682600162000463565b5050505050565b60006040518060600160405280876001600160a01b031681526020018681526020018481525060405160200162000a97919062000e8a565b60408051808303601f19018152919052600180549192506001600160a01b0382169163b1454caa917401000000000000000000000000000000000000000090910463ffffffff1690601462000aec8362000ed1565b91906101000a81548163ffffffff021916908363ffffffff1602179055508684866040518563ffffffff1660e01b815260040162000b2e949392919062000f1d565b602060405180830381600087803b15801562000b4957600080fd5b505af115801562000b5e573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000b84919062000f5c565b50505050505050565b60008060009054906101000a90046001600160a01b03166001600160a01b03166363012de56040518163ffffffff1660e01b815260040160206040518083038186803b15801562000bdd57600080fd5b505afa15801562000bf2573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000c18919062000f88565b905090565b6119d78062000fa983390190565b6001600160a01b038116811462000c4157600080fd5b50565b60006020828403121562000c5757600080fd5b813562000c648162000c2b565b9392505050565b60008083601f84011262000c7e57600080fd5b50813567ffffffffffffffff81111562000c9757600080fd5b60208301915083602082850101111562000cb057600080fd5b9250929050565b60008060008060006060868803121562000cd057600080fd5b853562000cdd8162000c2b565b9450602086013567ffffffffffffffff8082111562000cfb57600080fd5b62000d0989838a0162000c6b565b9096509450604088013591508082111562000d2357600080fd5b5062000d328882890162000c6b565b969995985093965092949392505050565b60008060006060848603121562000d5957600080fd5b833562000d668162000c2b565b925060208401359150604084013562000d7f8162000c2b565b809150509250925092565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b60408152600062000dc960408301868862000d8a565b828103602084015262000dde81858762000d8a565b979650505050505050565b60006001600160a01b0380891683528088166020840152506080604083015262000e1860808301868862000d8a565b828103606084015262000e2d81858762000d8a565b9998505050505050505050565b6000815180845260005b8181101562000e625760208185018101518683018201520162000e44565b8181111562000e75576000602083870101525b50601f01601f19169290920160200192915050565b602081526001600160a01b038251166020820152600060208301516060604084015262000ebb608084018262000e3a565b9050604084015160608401528091505092915050565b600063ffffffff8083168181141562000f13577f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6001019392505050565b600063ffffffff80871683528086166020840152506080604083015262000f48608083018562000e3a565b905060ff8316606083015295945050505050565b60006020828403121562000f6f57600080fd5b815167ffffffffffffffff8116811462000c6457600080fd5b60006020828403121562000f9b57600080fd5b815162000c648162000c2b56fe6080604052600580546001600160a01b03191673deb34a740eca1ec42c8b8204cbec0ba34fdd27f31790553480156200003757600080fd5b50604051620019d7380380620019d78339810160408190526200005a91620002e3565b8181818181600390805190602001906200007692919062000170565b5080516200008c90600490602084019062000170565b5050505050620000c37fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c2177533620000cb60201b60201c565b50506200038a565b60008281526007602090815260408083206001600160a01b038516845290915290205460ff166200016c5760008281526007602090815260408083206001600160a01b03851684529091529020805460ff191660011790556200012b3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45b5050565b8280546200017e906200034d565b90600052602060002090601f016020900481019282620001a25760008555620001ed565b82601f10620001bd57805160ff1916838001178555620001ed565b82800160010185558215620001ed579182015b82811115620001ed578251825591602001919060010190620001d0565b50620001fb929150620001ff565b5090565b5b80821115620001fb576000815560010162000200565b634e487b7160e01b600052604160045260246000fd5b600082601f8301126200023e57600080fd5b81516001600160401b03808211156200025b576200025b62000216565b604051601f8301601f19908116603f0116810190828211818310171562000286576200028662000216565b81604052838152602092508683858801011115620002a357600080fd5b600091505b83821015620002c75785820183015181830184015290820190620002a8565b83821115620002d95760008385830101525b9695505050505050565b60008060408385031215620002f757600080fd5b82516001600160401b03808211156200030f57600080fd5b6200031d868387016200022c565b935060208501519150808211156200033457600080fd5b5062000343858286016200022c565b9150509250929050565b600181811c908216806200036257607f821691505b602082108114156200038457634e487b7160e01b600052602260045260246000fd5b50919050565b61163d806200039a6000396000f3fe608060405234801561001057600080fd5b50600436106101775760003560e01c806339509351116100d8578063979005ad1161008c578063a9059cbb11610066578063a9059cbb1461031a578063d547741f1461032d578063dd62ed3e1461034057600080fd5b8063979005ad146102ec578063a217fddf146102ff578063a457c2d71461030757600080fd5b806375b238fc116100bd57806375b238fc1461028457806391d14854146102ab57806395d89b41146102e457600080fd5b8063395093511461025e57806370a082311461027157600080fd5b806323b872dd1161012f5780632f2ff15d116101145780632f2ff15d14610229578063313ce5671461023c57806336568abe1461024b57600080fd5b806323b872dd146101f3578063248a9ca31461020657600080fd5b8063095ea7b311610160578063095ea7b3146101b957806318160ddd146101cc5780631dd319cb146101de57600080fd5b806301ffc9a71461017c57806306fdde03146101a4575b600080fd5b61018f61018a3660046112f7565b610353565b60405190151581526020015b60405180910390f35b6101ac6103ec565b60405161019b9190611365565b61018f6101c73660046113b4565b61047e565b6002545b60405190815260200161019b565b6101f16101ec3660046113b4565b610496565b005b61018f6102013660046113de565b61052d565b6101d061021436600461141a565b60009081526007602052604090206001015490565b6101f1610237366004611433565b610551565b6040516012815260200161019b565b6101f1610259366004611433565b610577565b61018f61026c3660046113b4565b610603565b6101d061027f36600461145f565b610642565b6101d07fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c2177581565b61018f6102b9366004611433565b60009182526007602090815260408084206001600160a01b0393909316845291905290205460ff1690565b6101ac6106ea565b6101f16102fa3660046113b4565b6106f9565b6101d0600081565b61018f6103153660046113b4565b61072e565b61018f6103283660046113b4565b6107d8565b6101f161033b366004611433565b6107e6565b6101d061034e36600461147a565b61080c565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f7965db0b0000000000000000000000000000000000000000000000000000000014806103e657507f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316145b92915050565b6060600380546103fb906114a4565b80601f0160208091040260200160405190810160405280929190818152602001828054610427906114a4565b80156104745780601f1061044957610100808354040283529160200191610474565b820191906000526020600020905b81548152906001019060200180831161045757829003601f168201915b5050505050905090565b60003361048c81858561091d565b5060019392505050565b7fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c217756104c18133610a75565b816104cb84610642565b101561051e5760405162461bcd60e51b815260206004820152601560248201527f496e73756666696369656e742062616c616e63652e000000000000000000000060448201526064015b60405180910390fd5b6105288383610af5565b505050565b60003361053b858285610c7a565b610546858585610cf4565b506001949350505050565b60008281526007602052604090206001015461056d8133610a75565b6105288383610f0b565b6001600160a01b03811633146105f55760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201527f20726f6c657320666f722073656c6600000000000000000000000000000000006064820152608401610515565b6105ff8282610fad565b5050565b3360008181526001602090815260408083206001600160a01b038716845290915281205490919061048c908290869061063d9087906114f5565b61091d565b6000326001600160a01b0383161415610673576001600160a01b0382166000908152602081905260409020546103e6565b336001600160a01b03831614156106a2576001600160a01b0382166000908152602081905260409020546103e6565b60405162461bcd60e51b815260206004820152601f60248201527f4e6f7420616c6c6f77656420746f2072656164207468652062616c616e6365006044820152606401610515565b6060600480546103fb906114a4565b7fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c217756107248133610a75565b6105288383611030565b3360008181526001602090815260408083206001600160a01b0387168452909152812054909190838110156107cb5760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f7760448201527f207a65726f0000000000000000000000000000000000000000000000000000006064820152608401610515565b610546828686840361091d565b60003361048c818585610cf4565b6000828152600760205260409020600101546108028133610a75565b6105288383610fad565b6000326001600160a01b038416148061082d5750326001600160a01b038316145b15610860576001600160a01b038084166000908152600160209081526040808320938616835292905220545b90506103e6565b336001600160a01b038416148061087f5750336001600160a01b038316145b156108af576001600160a01b03808416600090815260016020908152604080832093861683529290522054610859565b60405162461bcd60e51b815260206004820152602160248201527f4e6f7420616c6c6f77656420746f20726561642074686520616c6c6f77616e6360448201527f65000000000000000000000000000000000000000000000000000000000000006064820152608401610515565b6001600160a01b0383166109985760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460448201527f72657373000000000000000000000000000000000000000000000000000000006064820152608401610515565b6001600160a01b038216610a145760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f20616464726560448201527f73730000000000000000000000000000000000000000000000000000000000006064820152608401610515565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b60008281526007602090815260408083206001600160a01b038516845290915290205460ff166105ff57610ab3816001600160a01b0316601461110f565b610abe83602061110f565b604051602001610acf92919061150d565b60408051601f198184030181529082905262461bcd60e51b825261051591600401611365565b6001600160a01b038216610b715760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f2061646472657360448201527f73000000000000000000000000000000000000000000000000000000000000006064820152608401610515565b6001600160a01b03821660009081526020819052604090205481811015610c005760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e60448201527f63650000000000000000000000000000000000000000000000000000000000006064820152608401610515565b6001600160a01b0383166000908152602081905260408120838303905560028054849290610c2f90849061158e565b90915550506040518281526000906001600160a01b038516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a3505050565b6000610c86848461080c565b90506000198114610cee5781811015610ce15760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e63650000006044820152606401610515565b610cee848484840361091d565b50505050565b6001600160a01b038316610d705760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f20616460448201527f64726573730000000000000000000000000000000000000000000000000000006064820152608401610515565b6001600160a01b038216610dec5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201527f65737300000000000000000000000000000000000000000000000000000000006064820152608401610515565b6001600160a01b03831660009081526020819052604090205481811015610e7b5760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e742065786365656473206260448201527f616c616e636500000000000000000000000000000000000000000000000000006064820152608401610515565b6001600160a01b03808516600090815260208190526040808220858503905591851681529081208054849290610eb29084906114f5565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef84604051610efe91815260200190565b60405180910390a3610cee565b60008281526007602090815260408083206001600160a01b038516845290915290205460ff166105ff5760008281526007602090815260408083206001600160a01b03851684529091529020805460ff19166001179055610f693390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b60008281526007602090815260408083206001600160a01b038516845290915290205460ff16156105ff5760008281526007602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b6001600160a01b0382166110865760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152606401610515565b806002600082825461109891906114f5565b90915550506001600160a01b038216600090815260208190526040812080548392906110c59084906114f5565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b6060600061111e8360026115a5565b6111299060026114f5565b67ffffffffffffffff811115611141576111416115c4565b6040519080825280601f01601f19166020018201604052801561116b576020820181803683370190505b5090507f3000000000000000000000000000000000000000000000000000000000000000816000815181106111a2576111a26115da565b60200101906001600160f81b031916908160001a9053507f7800000000000000000000000000000000000000000000000000000000000000816001815181106111ed576111ed6115da565b60200101906001600160f81b031916908160001a90535060006112118460026115a5565b61121c9060016114f5565b90505b60018111156112a1577f303132333435363738396162636465660000000000000000000000000000000085600f166010811061125d5761125d6115da565b1a60f81b828281518110611273576112736115da565b60200101906001600160f81b031916908160001a90535060049490941c9361129a816115f0565b905061121f565b5083156112f05760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610515565b9392505050565b60006020828403121561130957600080fd5b81357fffffffff00000000000000000000000000000000000000000000000000000000811681146112f057600080fd5b60005b8381101561135457818101518382015260200161133c565b83811115610cee5750506000910152565b6020815260008251806020840152611384816040850160208701611339565b601f01601f19169190910160400192915050565b80356001600160a01b03811681146113af57600080fd5b919050565b600080604083850312156113c757600080fd5b6113d083611398565b946020939093013593505050565b6000806000606084860312156113f357600080fd5b6113fc84611398565b925061140a60208501611398565b9150604084013590509250925092565b60006020828403121561142c57600080fd5b5035919050565b6000806040838503121561144657600080fd5b8235915061145660208401611398565b90509250929050565b60006020828403121561147157600080fd5b6112f082611398565b6000806040838503121561148d57600080fd5b61149683611398565b915061145660208401611398565b600181811c908216806114b857607f821691505b602082108114156114d957634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b60008219821115611508576115086114df565b500190565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260008351611545816017850160208801611339565b7f206973206d697373696e6720726f6c65200000000000000000000000000000006017918401918201528351611582816028840160208801611339565b01602801949350505050565b6000828210156115a0576115a06114df565b500390565b60008160001904831182151516156115bf576115bf6114df565b500290565b634e487b7160e01b600052604160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b6000816115ff576115ff6114df565b50600019019056fea26469706673582212203d4cd3ed17d72b2f94aa2bf3da11f2d447bbf1eab55024ccf72a1f938cbe214064736f6c63430008090033a2646970667358221220911a0e3d80e16ddbabe265ef67bfd98bd994d6e64ffb761fe54fd0713814c6b264736f6c63430008090033", + Bin: "0x60806040526001805463ffffffff60a01b191690553480156200002157600080fd5b5060405162002b4e38038062002b4e83398101604081905262000044916200012c565b600080546001600160a01b0319166001600160a01b038416908117909155604080516350d113fd60e11b8152905184929163a1a227fa916004808301926020929190829003018186803b1580156200009b57600080fd5b505afa158015620000b0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620000d6919062000164565b600180546001600160a01b039283166001600160a01b031991821617909155600580549490921693169290921790915550620001899050565b80516001600160a01b03811681146200012757600080fd5b919050565b600080604083850312156200014057600080fd5b6200014b836200010f565b91506200015b602084016200010f565b90509250929050565b6000602082840312156200017757600080fd5b62000182826200010f565b9392505050565b6129b580620001996000396000f3fe6080604052600436106200008a5760003560e01c80639813c7b211620000555780639813c7b214620002065780639e405b711462000256578063a381c8e21462000290578063d5c6b50414620002b55762000103565b80628d48e3146200014c5780631888d71214620001a3578063458ffd6314620001bc57806383bece4d14620001e15762000103565b36620001035760405162461bcd60e51b815260206004820152602360248201527f436f6e747261637420646f6573206e6f7420737570706f72742072656365697660448201527f652829000000000000000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b60405162461bcd60e51b815260206004820152601d60248201527f66616c6c6261636b2829206d6574686f6420756e737570706f727465640000006044820152606401620000fa565b3480156200015957600080fd5b50620001866200016b36600462000c44565b6004602052600090815260409020546001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b620001ba620001b436600462000c44565b620002ef565b005b348015620001c957600080fd5b50620001ba620001db36600462000cb7565b62000470565b348015620001ee57600080fd5b50620001ba6200020036600462000d43565b6200068e565b3480156200021357600080fd5b50620002456200022536600462000c44565b6001600160a01b0390811660009081526002602052604090205416151590565b60405190151581526020016200019a565b3480156200026357600080fd5b50620001866200027536600462000c44565b6003602052600090815260409020546001600160a01b031681565b3480156200029d57600080fd5b50620001ba620002af36600462000d43565b620008d1565b348015620002c257600080fd5b5062000186620002d436600462000c44565b6002602052600090815260409020546001600160a01b031681565b60003411620003415760405162461bcd60e51b815260206004820152600d60248201527f4e6f7468696e672073656e742e000000000000000000000000000000000000006044820152606401620000fa565b6000805260026020527fac33ff75c19e70fe83507db0d683fd3465c996598dc972688b7ace676c89077b546001600160a01b0316620003c35760405162461bcd60e51b815260206004820152601560248201527f4e6f206d617070696e6720666f7220746f6b656e2e00000000000000000000006044820152606401620000fa565b60008052600360209081527f3617319a054d772f909f7c479a2cebe5066e836a939412e32403c99029b92eff54604080516001600160a01b03928316602482015234604482015284831660648083019190915282518083039091018152608490910190915291820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff166383bece4d60e01b1790526005546200046c91168260015b60008062000a5f565b5050565b6005546000546001600160a01b0391821691163314620004f95760405162461bcd60e51b815260206004820152603060248201527f436f6e74726163742063616c6c6572206973206e6f742074686520726567697360448201527f7465726564206d657373656e67657221000000000000000000000000000000006064820152608401620000fa565b806001600160a01b03166200050d62000b8d565b6001600160a01b0316146200058b5760405162461bcd60e51b815260206004820152603160248201527f43726f737320636861696e206d65737361676520636f6d696e672066726f6d2060448201527f696e636f72726563742073656e646572210000000000000000000000000000006064820152608401620000fa565b6000858585856040516200059f9062000c1d565b620005ae949392919062000db3565b604051809103906000f080158015620005cb573d6000803e3d6000fd5b506001600160a01b03808216600081815260026020908152604080832080547fffffffffffffffffffffffff00000000000000000000000000000000000000009081168617909155600383528184208054968f169682168717905594835260049091529081902080549093169091179091555190915081907f30c05779f384e0ae9d43bbf7ec4417f28bdc53d02a35551b6eb270a9c4c71dca906200067c908a9084908b908b908b908b9062000de9565b60405180910390a15050505050505050565b6005546000546001600160a01b0391821691163314620007175760405162461bcd60e51b815260206004820152603060248201527f436f6e74726163742063616c6c6572206973206e6f742074686520726567697360448201527f7465726564206d657373656e67657221000000000000000000000000000000006064820152608401620000fa565b806001600160a01b03166200072b62000b8d565b6001600160a01b031614620007a95760405162461bcd60e51b815260206004820152603160248201527f43726f737320636861696e206d65737361676520636f6d696e672066726f6d2060448201527f696e636f72726563742073656e646572210000000000000000000000000000006064820152608401620000fa565b6001600160a01b038085166000908152600460209081526040808320548416808452600290925290912054909116806200084c5760405162461bcd60e51b815260206004820152602b60248201527f526563656976696e672061737365747320666f7220756e6b6e6f776e2077726160448201527f7070656420746f6b656e210000000000000000000000000000000000000000006064820152608401620000fa565b6040517f979005ad0000000000000000000000000000000000000000000000000000000081526001600160a01b0385811660048301526024820187905282169063979005ad90604401600060405180830381600087803b158015620008b057600080fd5b505af1158015620008c5573d6000803e3d6000fd5b50505050505050505050565b6001600160a01b03808416600090815260026020526040902054166200093a5760405162461bcd60e51b815260206004820152601560248201527f4e6f206d617070696e6720666f7220746f6b656e2e00000000000000000000006044820152606401620000fa565b6001600160a01b03838116600090815260026020526040908190205490517f1dd319cb000000000000000000000000000000000000000000000000000000008152336004820152602481018590529116908190631dd319cb90604401600060405180830381600087803b158015620009b157600080fd5b505af1158015620009c6573d6000803e3d6000fd5b505050506001600160a01b03848116600090815260036020908152604091829020548251908416602482015260448101879052858416606480830191909152835180830390910181526084909101909252810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff166383bece4d60e01b179052600554909162000a58911682600162000463565b5050505050565b60006040518060600160405280876001600160a01b031681526020018681526020018481525060405160200162000a97919062000e8a565b60408051808303601f19018152919052600180549192506001600160a01b0382169163b1454caa917401000000000000000000000000000000000000000090910463ffffffff1690601462000aec8362000ed1565b91906101000a81548163ffffffff021916908363ffffffff1602179055508684866040518563ffffffff1660e01b815260040162000b2e949392919062000f1d565b602060405180830381600087803b15801562000b4957600080fd5b505af115801562000b5e573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000b84919062000f5c565b50505050505050565b60008060009054906101000a90046001600160a01b03166001600160a01b03166363012de56040518163ffffffff1660e01b815260040160206040518083038186803b15801562000bdd57600080fd5b505afa15801562000bf2573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000c18919062000f88565b905090565b6119d78062000fa983390190565b6001600160a01b038116811462000c4157600080fd5b50565b60006020828403121562000c5757600080fd5b813562000c648162000c2b565b9392505050565b60008083601f84011262000c7e57600080fd5b50813567ffffffffffffffff81111562000c9757600080fd5b60208301915083602082850101111562000cb057600080fd5b9250929050565b60008060008060006060868803121562000cd057600080fd5b853562000cdd8162000c2b565b9450602086013567ffffffffffffffff8082111562000cfb57600080fd5b62000d0989838a0162000c6b565b9096509450604088013591508082111562000d2357600080fd5b5062000d328882890162000c6b565b969995985093965092949392505050565b60008060006060848603121562000d5957600080fd5b833562000d668162000c2b565b925060208401359150604084013562000d7f8162000c2b565b809150509250925092565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b60408152600062000dc960408301868862000d8a565b828103602084015262000dde81858762000d8a565b979650505050505050565b60006001600160a01b0380891683528088166020840152506080604083015262000e1860808301868862000d8a565b828103606084015262000e2d81858762000d8a565b9998505050505050505050565b6000815180845260005b8181101562000e625760208185018101518683018201520162000e44565b8181111562000e75576000602083870101525b50601f01601f19169290920160200192915050565b602081526001600160a01b038251166020820152600060208301516060604084015262000ebb608084018262000e3a565b9050604084015160608401528091505092915050565b600063ffffffff8083168181141562000f13577f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6001019392505050565b600063ffffffff80871683528086166020840152506080604083015262000f48608083018562000e3a565b905060ff8316606083015295945050505050565b60006020828403121562000f6f57600080fd5b815167ffffffffffffffff8116811462000c6457600080fd5b60006020828403121562000f9b57600080fd5b815162000c648162000c2b56fe6080604052600580546001600160a01b03191673deb34a740eca1ec42c8b8204cbec0ba34fdd27f31790553480156200003757600080fd5b50604051620019d7380380620019d78339810160408190526200005a91620002e3565b8181818181600390805190602001906200007692919062000170565b5080516200008c90600490602084019062000170565b5050505050620000c37fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c2177533620000cb60201b60201c565b50506200038a565b60008281526007602090815260408083206001600160a01b038516845290915290205460ff166200016c5760008281526007602090815260408083206001600160a01b03851684529091529020805460ff191660011790556200012b3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45b5050565b8280546200017e906200034d565b90600052602060002090601f016020900481019282620001a25760008555620001ed565b82601f10620001bd57805160ff1916838001178555620001ed565b82800160010185558215620001ed579182015b82811115620001ed578251825591602001919060010190620001d0565b50620001fb929150620001ff565b5090565b5b80821115620001fb576000815560010162000200565b634e487b7160e01b600052604160045260246000fd5b600082601f8301126200023e57600080fd5b81516001600160401b03808211156200025b576200025b62000216565b604051601f8301601f19908116603f0116810190828211818310171562000286576200028662000216565b81604052838152602092508683858801011115620002a357600080fd5b600091505b83821015620002c75785820183015181830184015290820190620002a8565b83821115620002d95760008385830101525b9695505050505050565b60008060408385031215620002f757600080fd5b82516001600160401b03808211156200030f57600080fd5b6200031d868387016200022c565b935060208501519150808211156200033457600080fd5b5062000343858286016200022c565b9150509250929050565b600181811c908216806200036257607f821691505b602082108114156200038457634e487b7160e01b600052602260045260246000fd5b50919050565b61163d806200039a6000396000f3fe608060405234801561001057600080fd5b50600436106101775760003560e01c806339509351116100d8578063979005ad1161008c578063a9059cbb11610066578063a9059cbb1461031a578063d547741f1461032d578063dd62ed3e1461034057600080fd5b8063979005ad146102ec578063a217fddf146102ff578063a457c2d71461030757600080fd5b806375b238fc116100bd57806375b238fc1461028457806391d14854146102ab57806395d89b41146102e457600080fd5b8063395093511461025e57806370a082311461027157600080fd5b806323b872dd1161012f5780632f2ff15d116101145780632f2ff15d14610229578063313ce5671461023c57806336568abe1461024b57600080fd5b806323b872dd146101f3578063248a9ca31461020657600080fd5b8063095ea7b311610160578063095ea7b3146101b957806318160ddd146101cc5780631dd319cb146101de57600080fd5b806301ffc9a71461017c57806306fdde03146101a4575b600080fd5b61018f61018a3660046112f7565b610353565b60405190151581526020015b60405180910390f35b6101ac6103ec565b60405161019b9190611365565b61018f6101c73660046113b4565b61047e565b6002545b60405190815260200161019b565b6101f16101ec3660046113b4565b610496565b005b61018f6102013660046113de565b61052d565b6101d061021436600461141a565b60009081526007602052604090206001015490565b6101f1610237366004611433565b610551565b6040516012815260200161019b565b6101f1610259366004611433565b610577565b61018f61026c3660046113b4565b610603565b6101d061027f36600461145f565b610642565b6101d07fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c2177581565b61018f6102b9366004611433565b60009182526007602090815260408084206001600160a01b0393909316845291905290205460ff1690565b6101ac6106ea565b6101f16102fa3660046113b4565b6106f9565b6101d0600081565b61018f6103153660046113b4565b61072e565b61018f6103283660046113b4565b6107d8565b6101f161033b366004611433565b6107e6565b6101d061034e36600461147a565b61080c565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f7965db0b0000000000000000000000000000000000000000000000000000000014806103e657507f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316145b92915050565b6060600380546103fb906114a4565b80601f0160208091040260200160405190810160405280929190818152602001828054610427906114a4565b80156104745780601f1061044957610100808354040283529160200191610474565b820191906000526020600020905b81548152906001019060200180831161045757829003601f168201915b5050505050905090565b60003361048c81858561091d565b5060019392505050565b7fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c217756104c18133610a75565b816104cb84610642565b101561051e5760405162461bcd60e51b815260206004820152601560248201527f496e73756666696369656e742062616c616e63652e000000000000000000000060448201526064015b60405180910390fd5b6105288383610af5565b505050565b60003361053b858285610c7a565b610546858585610cf4565b506001949350505050565b60008281526007602052604090206001015461056d8133610a75565b6105288383610f0b565b6001600160a01b03811633146105f55760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201527f20726f6c657320666f722073656c6600000000000000000000000000000000006064820152608401610515565b6105ff8282610fad565b5050565b3360008181526001602090815260408083206001600160a01b038716845290915281205490919061048c908290869061063d9087906114f5565b61091d565b6000326001600160a01b0383161415610673576001600160a01b0382166000908152602081905260409020546103e6565b336001600160a01b03831614156106a2576001600160a01b0382166000908152602081905260409020546103e6565b60405162461bcd60e51b815260206004820152601f60248201527f4e6f7420616c6c6f77656420746f2072656164207468652062616c616e6365006044820152606401610515565b6060600480546103fb906114a4565b7fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c217756107248133610a75565b6105288383611030565b3360008181526001602090815260408083206001600160a01b0387168452909152812054909190838110156107cb5760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f7760448201527f207a65726f0000000000000000000000000000000000000000000000000000006064820152608401610515565b610546828686840361091d565b60003361048c818585610cf4565b6000828152600760205260409020600101546108028133610a75565b6105288383610fad565b6000326001600160a01b038416148061082d5750326001600160a01b038316145b15610860576001600160a01b038084166000908152600160209081526040808320938616835292905220545b90506103e6565b336001600160a01b038416148061087f5750336001600160a01b038316145b156108af576001600160a01b03808416600090815260016020908152604080832093861683529290522054610859565b60405162461bcd60e51b815260206004820152602160248201527f4e6f7420616c6c6f77656420746f20726561642074686520616c6c6f77616e6360448201527f65000000000000000000000000000000000000000000000000000000000000006064820152608401610515565b6001600160a01b0383166109985760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460448201527f72657373000000000000000000000000000000000000000000000000000000006064820152608401610515565b6001600160a01b038216610a145760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f20616464726560448201527f73730000000000000000000000000000000000000000000000000000000000006064820152608401610515565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b60008281526007602090815260408083206001600160a01b038516845290915290205460ff166105ff57610ab3816001600160a01b0316601461110f565b610abe83602061110f565b604051602001610acf92919061150d565b60408051601f198184030181529082905262461bcd60e51b825261051591600401611365565b6001600160a01b038216610b715760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f2061646472657360448201527f73000000000000000000000000000000000000000000000000000000000000006064820152608401610515565b6001600160a01b03821660009081526020819052604090205481811015610c005760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e60448201527f63650000000000000000000000000000000000000000000000000000000000006064820152608401610515565b6001600160a01b0383166000908152602081905260408120838303905560028054849290610c2f90849061158e565b90915550506040518281526000906001600160a01b038516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a3505050565b6000610c86848461080c565b90506000198114610cee5781811015610ce15760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e63650000006044820152606401610515565b610cee848484840361091d565b50505050565b6001600160a01b038316610d705760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f20616460448201527f64726573730000000000000000000000000000000000000000000000000000006064820152608401610515565b6001600160a01b038216610dec5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201527f65737300000000000000000000000000000000000000000000000000000000006064820152608401610515565b6001600160a01b03831660009081526020819052604090205481811015610e7b5760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e742065786365656473206260448201527f616c616e636500000000000000000000000000000000000000000000000000006064820152608401610515565b6001600160a01b03808516600090815260208190526040808220858503905591851681529081208054849290610eb29084906114f5565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef84604051610efe91815260200190565b60405180910390a3610cee565b60008281526007602090815260408083206001600160a01b038516845290915290205460ff166105ff5760008281526007602090815260408083206001600160a01b03851684529091529020805460ff19166001179055610f693390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b60008281526007602090815260408083206001600160a01b038516845290915290205460ff16156105ff5760008281526007602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b6001600160a01b0382166110865760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152606401610515565b806002600082825461109891906114f5565b90915550506001600160a01b038216600090815260208190526040812080548392906110c59084906114f5565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b6060600061111e8360026115a5565b6111299060026114f5565b67ffffffffffffffff811115611141576111416115c4565b6040519080825280601f01601f19166020018201604052801561116b576020820181803683370190505b5090507f3000000000000000000000000000000000000000000000000000000000000000816000815181106111a2576111a26115da565b60200101906001600160f81b031916908160001a9053507f7800000000000000000000000000000000000000000000000000000000000000816001815181106111ed576111ed6115da565b60200101906001600160f81b031916908160001a90535060006112118460026115a5565b61121c9060016114f5565b90505b60018111156112a1577f303132333435363738396162636465660000000000000000000000000000000085600f166010811061125d5761125d6115da565b1a60f81b828281518110611273576112736115da565b60200101906001600160f81b031916908160001a90535060049490941c9361129a816115f0565b905061121f565b5083156112f05760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610515565b9392505050565b60006020828403121561130957600080fd5b81357fffffffff00000000000000000000000000000000000000000000000000000000811681146112f057600080fd5b60005b8381101561135457818101518382015260200161133c565b83811115610cee5750506000910152565b6020815260008251806020840152611384816040850160208701611339565b601f01601f19169190910160400192915050565b80356001600160a01b03811681146113af57600080fd5b919050565b600080604083850312156113c757600080fd5b6113d083611398565b946020939093013593505050565b6000806000606084860312156113f357600080fd5b6113fc84611398565b925061140a60208501611398565b9150604084013590509250925092565b60006020828403121561142c57600080fd5b5035919050565b6000806040838503121561144657600080fd5b8235915061145660208401611398565b90509250929050565b60006020828403121561147157600080fd5b6112f082611398565b6000806040838503121561148d57600080fd5b61149683611398565b915061145660208401611398565b600181811c908216806114b857607f821691505b602082108114156114d957634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b60008219821115611508576115086114df565b500190565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260008351611545816017850160208801611339565b7f206973206d697373696e6720726f6c65200000000000000000000000000000006017918401918201528351611582816028840160208801611339565b01602801949350505050565b6000828210156115a0576115a06114df565b500390565b60008160001904831182151516156115bf576115bf6114df565b500290565b634e487b7160e01b600052604160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b6000816115ff576115ff6114df565b50600019019056fea264697066735822122051d4d151f1e4f06c4f1a712938b6e043da4348eaab5479425f2ff11cd6f5c67c64736f6c63430008090033a2646970667358221220c1b2e72d51abe060c331c1fa74c0988678f1f1e196af53702707985c1e0d33c064736f6c63430008090033", } // EthereumBridgeABI is the input ABI used to generate the binding from. diff --git a/contracts/generated/ManagementContract/ManagementContract.go b/contracts/generated/ManagementContract/ManagementContract.go index 3b49ff914c..e27932bc60 100644 --- a/contracts/generated/ManagementContract/ManagementContract.go +++ b/contracts/generated/ManagementContract/ManagementContract.go @@ -57,7 +57,7 @@ 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\":\"bytes32\",\"name\":\"L1Block\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"LastSequenceNumber\",\"type\":\"uint256\"}],\"internalType\":\"structStructs.MetaRollup\",\"name\":\"r\",\"type\":\"tuple\"},{\"internalType\":\"string\",\"name\":\"_rollupData\",\"type\":\"string\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"blockNumber\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"blockHash\",\"type\":\"bytes32\"},{\"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\":\"bytes32\",\"name\":\"L1Block\",\"type\":\"bytes32\"},{\"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: "0x6080604052600060045534801561001557600080fd5b5060405161002290610096565b604051809103906000f08015801561003e573d6000803e3d6000fd5b50600680546001600160a01b0319166001600160a01b039290921691821790556040519081527fbd726cf82ac9c3260b1495107182e336e0654b25c10915648c0cc15b2bb72cbf9060200160405180910390a16100a3565b610e91806115d583390190565b611523806100b26000396000f3fe608060405234801561001057600080fd5b50600436106100be5760003560e01c80638236a7ba11610076578063a52f433c1161005b578063a52f433c14610248578063bbd79e1514610258578063e34fbfc81461026b57600080fd5b80638236a7ba1461015c578063a1a227fa1461021d57600080fd5b806343348b2f116100a757806343348b2f146100f6578063440c953b1461013257806359a900711461014957600080fd5b806302bf9317146100c3578063324ff866146100d8575b600080fd5b6100d66100d1366004610d45565b61027e565b005b6100e0610318565b6040516100ed9190610df8565b60405180910390f35b610122610104366004610e87565b6001600160a01b031660009081526001602052604090205460ff1690565b60405190151581526020016100ed565b61013b60045481565b6040519081526020016100ed565b6100d6610157366004610f4e565b6103f1565b6101de61016a366004610ff5565b604080516080810182526000808252602082018190529181018290526060810182905250506000818152600560209081526040918290208251608081018452815480825260018301546001600160a01b03169382019390935260028201549381019390935260030154606083015290911491565b60408051921515835281516020808501919091528201516001600160a01b0316838201528101516060808401919091520151608082015260a0016100ed565b600654610230906001600160a01b031681565b6040516001600160a01b0390911681526020016100ed565b600354610100900460ff16610122565b6100d661026636600461100e565b610479565b6100d66102793660046110d4565b6105dc565b600160006102926040870160208801610e87565b6001600160a01b0316815260208101919091526040016000205460ff166103005760405162461bcd60e51b815260206004820152601760248201527f61676772656761746f72206e6f7420617474657374656400000000000000000060448201526064015b60405180910390fd5b610309846105fb565b61031281610633565b50505050565b60606002805480602002602001604051908101604052809291908181526020016000905b828210156103e857838290600052602060002001805461035b90611116565b80601f016020809104026020016040519081016040528092919081815260200182805461038790611116565b80156103d45780601f106103a9576101008083540402835291602001916103d4565b820191906000526020600020905b8154815290600101906020018083116103b757829003601f168201915b50505050508152602001906001019061033c565b50505050905090565b60035460ff161561040157600080fd5b60038054600160ff1991821681179092556001600160a01b03881660009081526020838152604082208054909316841790925560028054938401815590528451610470927f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace0191860190610bf6565b50505050505050565b6001600160a01b03861660009081526001602052604090205460ff168061049f57600080fd5b811561056f5760006104d5888886886040516020016104c19493929190611151565b6040516020818303038152906040526106f3565b905060006104e3828861072e565b9050886001600160a01b0316816001600160a01b03161461056c5760405162461bcd60e51b815260206004820152602c60248201527f63616c63756c61746564206164647265737320616e642061747465737465724960448201527f4420646f6e74206d61746368000000000000000000000000000000000000000060648201526084016102f7565b50505b6001600160a01b03861660009081526001602081815260408320805460ff19168317905560028054928301815590925284516105d2927f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace90920191860190610bf6565b5050505050505050565b3360009081526020819052604090206105f6908383610c7a565b505050565b80356000908152600560205260409020819061061782826111ad565b5050600454606082013511156106305760608101356004555b50565b6000610642604083018361120e565b9050905060005b818110156105f6576006546001600160a01b0316639730886d61066f604086018661120e565b8481811061067f5761067f611258565b9050602002810190610691919061126e565b60016040518363ffffffff1660e01b81526004016106b0929190611327565b600060405180830381600087803b1580156106ca57600080fd5b505af11580156106de573d6000803e3d6000fd5b50505050806106ec906113f4565b9050610649565b60006106ff8251610752565b8260405160200161071192919061140f565b604051602081830303815290604052805190602001209050919050565b600080600061073d858561088c565b9150915061074a816108fc565b509392505050565b60608161079257505060408051808201909152600181527f3000000000000000000000000000000000000000000000000000000000000000602082015290565b8160005b81156107bc57806107a6816113f4565b91506107b59050600a83611480565b9150610796565b60008167ffffffffffffffff8111156107d7576107d7610eab565b6040519080825280601f01601f191660200182016040528015610801576020820181803683370190505b5090505b841561088457610816600183611494565b9150610823600a866114ab565b61082e9060306114bf565b60f81b81838151811061084357610843611258565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535061087d600a86611480565b9450610805565b949350505050565b6000808251604114156108c35760208301516040840151606085015160001a6108b787828585610ab7565b945094505050506108f5565b8251604014156108ed57602083015160408401516108e2868383610ba4565b9350935050506108f5565b506000905060025b9250929050565b6000816004811115610910576109106114d7565b14156109195750565b600181600481111561092d5761092d6114d7565b141561097b5760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e6174757265000000000000000060448201526064016102f7565b600281600481111561098f5761098f6114d7565b14156109dd5760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e6774680060448201526064016102f7565b60038160048111156109f1576109f16114d7565b1415610a4a5760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b60648201526084016102f7565b6004816004811115610a5e57610a5e6114d7565b14156106305760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c604482015261756560f01b60648201526084016102f7565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0831115610aee5750600090506003610b9b565b8460ff16601b14158015610b0657508460ff16601c14155b15610b175750600090506004610b9b565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015610b6b573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116610b9457600060019250925050610b9b565b9150600090505b94509492505050565b6000807f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff831681610bda60ff86901c601b6114bf565b9050610be887828885610ab7565b935093505050935093915050565b828054610c0290611116565b90600052602060002090601f016020900481019282610c245760008555610c6a565b82601f10610c3d57805160ff1916838001178555610c6a565b82800160010185558215610c6a579182015b82811115610c6a578251825591602001919060010190610c4f565b50610c76929150610cee565b5090565b828054610c8690611116565b90600052602060002090601f016020900481019282610ca85760008555610c6a565b82601f10610cc15782800160ff19823516178555610c6a565b82800160010185558215610c6a579182015b82811115610c6a578235825591602001919060010190610cd3565b5b80821115610c765760008155600101610cef565b60008083601f840112610d1557600080fd5b50813567ffffffffffffffff811115610d2d57600080fd5b6020830191508360208285010111156108f557600080fd5b60008060008084860360c0811215610d5c57600080fd5b6080811215610d6a57600080fd5b50849350608085013567ffffffffffffffff80821115610d8957600080fd5b610d9588838901610d03565b909550935060a0870135915080821115610dae57600080fd5b50850160608188031215610dc157600080fd5b939692955090935050565b60005b83811015610de7578181015183820152602001610dcf565b838111156103125750506000910152565b6000602080830181845280855180835260408601915060408160051b870101925083870160005b82811015610e6557878503603f1901845281518051808752610e46818989018a8501610dcc565b601f01601f191695909501860194509285019290850190600101610e1f565b5092979650505050505050565b6001600160a01b038116811461063057600080fd5b600060208284031215610e9957600080fd5b8135610ea481610e72565b9392505050565b634e487b7160e01b600052604160045260246000fd5b600082601f830112610ed257600080fd5b813567ffffffffffffffff80821115610eed57610eed610eab565b604051601f8301601f19908116603f01168101908282118183101715610f1557610f15610eab565b81604052838152866020858801011115610f2e57600080fd5b836020870160208301376000602085830101528094505050505092915050565b60008060008060008060808789031215610f6757600080fd5b8635610f7281610e72565b9550602087013567ffffffffffffffff80821115610f8f57600080fd5b610f9b8a838b01610d03565b90975095506040890135915080821115610fb457600080fd5b610fc08a838b01610ec1565b94506060890135915080821115610fd657600080fd5b50610fe389828a01610d03565b979a9699509497509295939492505050565b60006020828403121561100757600080fd5b5035919050565b60008060008060008060c0878903121561102757600080fd5b863561103281610e72565b9550602087013561104281610e72565b9450604087013567ffffffffffffffff8082111561105f57600080fd5b61106b8a838b01610ec1565b9550606089013591508082111561108157600080fd5b61108d8a838b01610ec1565b945060808901359150808211156110a357600080fd5b506110b089828a01610ec1565b92505060a087013580151581146110c657600080fd5b809150509295509295509295565b600080602083850312156110e757600080fd5b823567ffffffffffffffff8111156110fe57600080fd5b61110a85828601610d03565b90969095509350505050565b600181811c9082168061112a57607f821691505b6020821081141561114b57634e487b7160e01b600052602260045260246000fd5b50919050565b60006bffffffffffffffffffffffff19808760601b168352808660601b166014840152508351611188816028850160208801610dcc565b83519083019061119f816028840160208801610dcc565b016028019695505050505050565b813581556001810160208301356111c381610e72565b6001600160a01b0381167fffffffffffffffffffffffff0000000000000000000000000000000000000000835416178255505060408201356002820155606082013560038201555050565b6000808335601e1984360301811261122557600080fd5b83018035915067ffffffffffffffff82111561124057600080fd5b6020019150600581901b36038213156108f557600080fd5b634e487b7160e01b600052603260045260246000fd5b6000823560be1983360301811261128457600080fd5b9190910192915050565b803563ffffffff811681146112a257600080fd5b919050565b6000808335601e198436030181126112be57600080fd5b830160208101925035905067ffffffffffffffff8111156112de57600080fd5b8036038313156108f557600080fd5b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b803560ff811681146112a257600080fd5b604081526000833561133881610e72565b6001600160a01b03166040830152602084013567ffffffffffffffff811680821461136257600080fd5b6060840152506113746040850161128e565b63ffffffff16608083015261138b6060850161128e565b63ffffffff1660a08301526113a360808501856112a7565b60c0808501526113b8610100850182846112ed565b9150506113c760a08601611316565b60ff1660e084015260209092019290925292915050565b634e487b7160e01b600052601160045260246000fd5b6000600019821415611408576114086113de565b5060010190565b7f19457468657265756d205369676e6564204d6573736167653a0a00000000000081526000835161144781601a850160208801610dcc565b83519083019061145e81601a840160208801610dcc565b01601a01949350505050565b634e487b7160e01b600052601260045260246000fd5b60008261148f5761148f61146a565b500490565b6000828210156114a6576114a66113de565b500390565b6000826114ba576114ba61146a565b500690565b600082198211156114d2576114d26113de565b500190565b634e487b7160e01b600052602160045260246000fdfea2646970667358221220ab8ac0fa6222958367a9e3f95f61a4bf1ae1c4af86bd4b10a9c675a689423f3464736f6c63430008090033608060405234801561001057600080fd5b5061001a3361001f565b61006f565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b610e138061007e6000396000f3fe6080604052600436106100745760003560e01c80638da5cb5b1161004e5780638da5cb5b146101ae5780639730886d146101d6578063b1454caa146101f6578063f2fde38b1461022f576100ec565b80630fcfbd111461013457806333a88c7214610167578063715018a614610197576100ec565b366100ec5760405162461bcd60e51b815260206004820152602c60248201527f74686520576f726d686f6c6520636f6e747261637420646f6573206e6f74206160448201527f636365707420617373657473000000000000000000000000000000000000000060648201526084015b60405180910390fd5b60405162461bcd60e51b815260206004820152600b60248201527f756e737570706f7274656400000000000000000000000000000000000000000060448201526064016100e3565b34801561014057600080fd5b5061015461014f366004610770565b61024f565b6040519081526020015b60405180910390f35b34801561017357600080fd5b50610187610182366004610770565b610305565b604051901515815260200161015e565b3480156101a357600080fd5b506101ac610358565b005b3480156101ba57600080fd5b506000546040516001600160a01b03909116815260200161015e565b3480156101e257600080fd5b506101ac6101f13660046107a5565b6103be565b34801561020257600080fd5b5061021661021136600461081b565b610562565b60405167ffffffffffffffff909116815260200161015e565b34801561023b57600080fd5b506101ac61024a3660046108dd565b6105bb565b600080826040516020016102639190610939565b60408051601f19818403018152918152815160209283012060008181526001909352912054909150806102fe5760405162461bcd60e51b815260206004820152602160248201527f54686973206d65737361676520776173206e65766572207375626d697474656460448201527f2e0000000000000000000000000000000000000000000000000000000000000060648201526084016100e3565b9392505050565b600080826040516020016103199190610939565b60408051601f1981840301815291815281516020928301206000818152600190935291205490915080158015906103505750428111155b949350505050565b6000546001600160a01b031633146103b25760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016100e3565b6103bc600061069d565b565b6000546001600160a01b031633146104185760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016100e3565b60006104248242610a39565b90506000836040516020016104399190610939565b60408051601f19818403018152918152815160209283012060008181526001909352912054909150156104d45760405162461bcd60e51b815260206004820152602160248201527f4d657373616765207375626d6974746564206d6f7265207468616e206f6e636560448201527f210000000000000000000000000000000000000000000000000000000000000060648201526084016100e3565b60008181526001602090815260408220849055600291906104f7908701876108dd565b6001600160a01b0316815260208101919091526040016000908120906105236080870160608801610a51565b63ffffffff1681526020808201929092526040016000908120805460018101825590825291902085916004020161055a8282610c33565b505050505050565b600061056d336106fa565b90507fb93c37389233beb85a3a726c3f15c2d15533ee74cb602f20f490dfffef775937338288888888886040516105aa9796959493929190610d51565b60405180910390a195945050505050565b6000546001600160a01b031633146106155760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016100e3565b6001600160a01b0381166106915760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f646472657373000000000000000000000000000000000000000000000000000060648201526084016100e3565b61069a8161069d565b50565b600080546001600160a01b0383811673ffffffffffffffffffffffffffffffffffffffff19831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6001600160a01b0381166000908152600360205260408120805467ffffffffffffffff16916001919061072d8385610db1565b92506101000a81548167ffffffffffffffff021916908367ffffffffffffffff160217905550919050565b600060c0828403121561076a57600080fd5b50919050565b60006020828403121561078257600080fd5b813567ffffffffffffffff81111561079957600080fd5b61035084828501610758565b600080604083850312156107b857600080fd5b823567ffffffffffffffff8111156107cf57600080fd5b6107db85828601610758565b95602094909401359450505050565b63ffffffff8116811461069a57600080fd5b60ff8116811461069a57600080fd5b8035610816816107fc565b919050565b60008060008060006080868803121561083357600080fd5b853561083e816107ea565b9450602086013561084e816107ea565b9350604086013567ffffffffffffffff8082111561086b57600080fd5b818801915088601f83011261087f57600080fd5b81358181111561088e57600080fd5b8960208285010111156108a057600080fd5b60208301955080945050505060608601356108ba816107fc565b809150509295509295909350565b6001600160a01b038116811461069a57600080fd5b6000602082840312156108ef57600080fd5b81356102fe816108c8565b67ffffffffffffffff8116811461069a57600080fd5b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b602081526000823561094a816108c8565b6001600160a01b0381166020840152506020830135610968816108fa565b67ffffffffffffffff808216604085015260408501359150610989826107ea565b63ffffffff8083166060860152606086013592506109a6836107ea565b80831660808601525060808501359150601e198536030182126109c857600080fd5b908401908135818111156109db57600080fd5b8036038613156109ea57600080fd5b60c060a0860152610a0260e086018260208601610910565b92505050610a1260a0850161080b565b60ff811660c0850152509392505050565b634e487b7160e01b600052601160045260246000fd5b60008219821115610a4c57610a4c610a23565b500190565b600060208284031215610a6357600080fd5b81356102fe816107ea565b60008135610a7b816107ea565b92915050565b6000808335601e19843603018112610a9857600080fd5b83018035915067ffffffffffffffff821115610ab357600080fd5b602001915036819003821315610ac857600080fd5b9250929050565b634e487b7160e01b600052604160045260246000fd5b600181811c90821680610af957607f821691505b6020821081141561076a57634e487b7160e01b600052602260045260246000fd5b601f821115610b6057600081815260208120601f850160051c81016020861015610b415750805b601f850160051c820191505b8181101561055a57828155600101610b4d565b505050565b67ffffffffffffffff831115610b7d57610b7d610acf565b610b9183610b8b8354610ae5565b83610b1a565b6000601f841160018114610bc55760008515610bad5750838201355b600019600387901b1c1916600186901b178355610c1f565b600083815260209020601f19861690835b82811015610bf65786850135825560209485019460019092019101610bd6565b5086821015610c135760001960f88860031b161c19848701351681555b505060018560011b0183555b5050505050565b60008135610a7b816107fc565b8135610c3e816108c8565b6001600160a01b038116905081548173ffffffffffffffffffffffffffffffffffffffff1982161783556020840135610c76816108fa565b7bffffffffffffffff00000000000000000000000000000000000000008160a01b1690507fffffffff0000000000000000000000000000000000000000000000000000000081848285161717855560408601359250610cd4836107ea565b921760e09190911b909116178155610d0c610cf160608401610a6e565b6001830163ffffffff821663ffffffff198254161781555050565b610d196080830183610a81565b610d27818360028601610b65565b5050610d4d610d3860a08401610c26565b6003830160ff821660ff198254161781555050565b5050565b6001600160a01b038816815267ffffffffffffffff87166020820152600063ffffffff808816604084015280871660608401525060c06080830152610d9a60c083018587610910565b905060ff831660a083015298975050505050505050565b600067ffffffffffffffff808316818516808303821115610dd457610dd4610a23565b0194935050505056fea2646970667358221220e790a069b7a49368e0f1c281855881b133f1eac9bbac989876cb3bc659282fbe64736f6c63430008090033", + Bin: "0x6080604052600060045534801561001557600080fd5b5060405161002290610096565b604051809103906000f08015801561003e573d6000803e3d6000fd5b50600680546001600160a01b0319166001600160a01b039290921691821790556040519081527fbd726cf82ac9c3260b1495107182e336e0654b25c10915648c0cc15b2bb72cbf9060200160405180910390a16100a3565b6110ac806115d583390190565b611523806100b26000396000f3fe608060405234801561001057600080fd5b50600436106100be5760003560e01c80638236a7ba11610076578063a52f433c1161005b578063a52f433c14610248578063bbd79e1514610258578063e34fbfc81461026b57600080fd5b80638236a7ba1461015c578063a1a227fa1461021d57600080fd5b806343348b2f116100a757806343348b2f146100f6578063440c953b1461013257806359a900711461014957600080fd5b806302bf9317146100c3578063324ff866146100d8575b600080fd5b6100d66100d1366004610d45565b61027e565b005b6100e0610318565b6040516100ed9190610df8565b60405180910390f35b610122610104366004610e87565b6001600160a01b031660009081526001602052604090205460ff1690565b60405190151581526020016100ed565b61013b60045481565b6040519081526020016100ed565b6100d6610157366004610f4e565b6103f1565b6101de61016a366004610ff5565b604080516080810182526000808252602082018190529181018290526060810182905250506000818152600560209081526040918290208251608081018452815480825260018301546001600160a01b03169382019390935260028201549381019390935260030154606083015290911491565b60408051921515835281516020808501919091528201516001600160a01b0316838201528101516060808401919091520151608082015260a0016100ed565b600654610230906001600160a01b031681565b6040516001600160a01b0390911681526020016100ed565b600354610100900460ff16610122565b6100d661026636600461100e565b610479565b6100d66102793660046110d4565b6105dc565b600160006102926040870160208801610e87565b6001600160a01b0316815260208101919091526040016000205460ff166103005760405162461bcd60e51b815260206004820152601760248201527f61676772656761746f72206e6f7420617474657374656400000000000000000060448201526064015b60405180910390fd5b610309846105fb565b61031281610633565b50505050565b60606002805480602002602001604051908101604052809291908181526020016000905b828210156103e857838290600052602060002001805461035b90611116565b80601f016020809104026020016040519081016040528092919081815260200182805461038790611116565b80156103d45780601f106103a9576101008083540402835291602001916103d4565b820191906000526020600020905b8154815290600101906020018083116103b757829003601f168201915b50505050508152602001906001019061033c565b50505050905090565b60035460ff161561040157600080fd5b60038054600160ff1991821681179092556001600160a01b03881660009081526020838152604082208054909316841790925560028054938401815590528451610470927f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace0191860190610bf6565b50505050505050565b6001600160a01b03861660009081526001602052604090205460ff168061049f57600080fd5b811561056f5760006104d5888886886040516020016104c19493929190611151565b6040516020818303038152906040526106f3565b905060006104e3828861072e565b9050886001600160a01b0316816001600160a01b03161461056c5760405162461bcd60e51b815260206004820152602c60248201527f63616c63756c61746564206164647265737320616e642061747465737465724960448201527f4420646f6e74206d61746368000000000000000000000000000000000000000060648201526084016102f7565b50505b6001600160a01b03861660009081526001602081815260408320805460ff19168317905560028054928301815590925284516105d2927f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace90920191860190610bf6565b5050505050505050565b3360009081526020819052604090206105f6908383610c7a565b505050565b80356000908152600560205260409020819061061782826111ad565b5050600454606082013511156106305760608101356004555b50565b6000610642604083018361120e565b9050905060005b818110156105f6576006546001600160a01b0316639730886d61066f604086018661120e565b8481811061067f5761067f611258565b9050602002810190610691919061126e565b60016040518363ffffffff1660e01b81526004016106b0929190611327565b600060405180830381600087803b1580156106ca57600080fd5b505af11580156106de573d6000803e3d6000fd5b50505050806106ec906113f4565b9050610649565b60006106ff8251610752565b8260405160200161071192919061140f565b604051602081830303815290604052805190602001209050919050565b600080600061073d858561088c565b9150915061074a816108fc565b509392505050565b60608161079257505060408051808201909152600181527f3000000000000000000000000000000000000000000000000000000000000000602082015290565b8160005b81156107bc57806107a6816113f4565b91506107b59050600a83611480565b9150610796565b60008167ffffffffffffffff8111156107d7576107d7610eab565b6040519080825280601f01601f191660200182016040528015610801576020820181803683370190505b5090505b841561088457610816600183611494565b9150610823600a866114ab565b61082e9060306114bf565b60f81b81838151811061084357610843611258565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535061087d600a86611480565b9450610805565b949350505050565b6000808251604114156108c35760208301516040840151606085015160001a6108b787828585610ab7565b945094505050506108f5565b8251604014156108ed57602083015160408401516108e2868383610ba4565b9350935050506108f5565b506000905060025b9250929050565b6000816004811115610910576109106114d7565b14156109195750565b600181600481111561092d5761092d6114d7565b141561097b5760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e6174757265000000000000000060448201526064016102f7565b600281600481111561098f5761098f6114d7565b14156109dd5760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e6774680060448201526064016102f7565b60038160048111156109f1576109f16114d7565b1415610a4a5760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b60648201526084016102f7565b6004816004811115610a5e57610a5e6114d7565b14156106305760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c604482015261756560f01b60648201526084016102f7565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0831115610aee5750600090506003610b9b565b8460ff16601b14158015610b0657508460ff16601c14155b15610b175750600090506004610b9b565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015610b6b573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116610b9457600060019250925050610b9b565b9150600090505b94509492505050565b6000807f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff831681610bda60ff86901c601b6114bf565b9050610be887828885610ab7565b935093505050935093915050565b828054610c0290611116565b90600052602060002090601f016020900481019282610c245760008555610c6a565b82601f10610c3d57805160ff1916838001178555610c6a565b82800160010185558215610c6a579182015b82811115610c6a578251825591602001919060010190610c4f565b50610c76929150610cee565b5090565b828054610c8690611116565b90600052602060002090601f016020900481019282610ca85760008555610c6a565b82601f10610cc15782800160ff19823516178555610c6a565b82800160010185558215610c6a579182015b82811115610c6a578235825591602001919060010190610cd3565b5b80821115610c765760008155600101610cef565b60008083601f840112610d1557600080fd5b50813567ffffffffffffffff811115610d2d57600080fd5b6020830191508360208285010111156108f557600080fd5b60008060008084860360c0811215610d5c57600080fd5b6080811215610d6a57600080fd5b50849350608085013567ffffffffffffffff80821115610d8957600080fd5b610d9588838901610d03565b909550935060a0870135915080821115610dae57600080fd5b50850160608188031215610dc157600080fd5b939692955090935050565b60005b83811015610de7578181015183820152602001610dcf565b838111156103125750506000910152565b6000602080830181845280855180835260408601915060408160051b870101925083870160005b82811015610e6557878503603f1901845281518051808752610e46818989018a8501610dcc565b601f01601f191695909501860194509285019290850190600101610e1f565b5092979650505050505050565b6001600160a01b038116811461063057600080fd5b600060208284031215610e9957600080fd5b8135610ea481610e72565b9392505050565b634e487b7160e01b600052604160045260246000fd5b600082601f830112610ed257600080fd5b813567ffffffffffffffff80821115610eed57610eed610eab565b604051601f8301601f19908116603f01168101908282118183101715610f1557610f15610eab565b81604052838152866020858801011115610f2e57600080fd5b836020870160208301376000602085830101528094505050505092915050565b60008060008060008060808789031215610f6757600080fd5b8635610f7281610e72565b9550602087013567ffffffffffffffff80821115610f8f57600080fd5b610f9b8a838b01610d03565b90975095506040890135915080821115610fb457600080fd5b610fc08a838b01610ec1565b94506060890135915080821115610fd657600080fd5b50610fe389828a01610d03565b979a9699509497509295939492505050565b60006020828403121561100757600080fd5b5035919050565b60008060008060008060c0878903121561102757600080fd5b863561103281610e72565b9550602087013561104281610e72565b9450604087013567ffffffffffffffff8082111561105f57600080fd5b61106b8a838b01610ec1565b9550606089013591508082111561108157600080fd5b61108d8a838b01610ec1565b945060808901359150808211156110a357600080fd5b506110b089828a01610ec1565b92505060a087013580151581146110c657600080fd5b809150509295509295509295565b600080602083850312156110e757600080fd5b823567ffffffffffffffff8111156110fe57600080fd5b61110a85828601610d03565b90969095509350505050565b600181811c9082168061112a57607f821691505b6020821081141561114b57634e487b7160e01b600052602260045260246000fd5b50919050565b60006bffffffffffffffffffffffff19808760601b168352808660601b166014840152508351611188816028850160208801610dcc565b83519083019061119f816028840160208801610dcc565b016028019695505050505050565b813581556001810160208301356111c381610e72565b6001600160a01b0381167fffffffffffffffffffffffff0000000000000000000000000000000000000000835416178255505060408201356002820155606082013560038201555050565b6000808335601e1984360301811261122557600080fd5b83018035915067ffffffffffffffff82111561124057600080fd5b6020019150600581901b36038213156108f557600080fd5b634e487b7160e01b600052603260045260246000fd5b6000823560be1983360301811261128457600080fd5b9190910192915050565b803563ffffffff811681146112a257600080fd5b919050565b6000808335601e198436030181126112be57600080fd5b830160208101925035905067ffffffffffffffff8111156112de57600080fd5b8036038313156108f557600080fd5b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b803560ff811681146112a257600080fd5b604081526000833561133881610e72565b6001600160a01b03166040830152602084013567ffffffffffffffff811680821461136257600080fd5b6060840152506113746040850161128e565b63ffffffff16608083015261138b6060850161128e565b63ffffffff1660a08301526113a360808501856112a7565b60c0808501526113b8610100850182846112ed565b9150506113c760a08601611316565b60ff1660e084015260209092019290925292915050565b634e487b7160e01b600052601160045260246000fd5b6000600019821415611408576114086113de565b5060010190565b7f19457468657265756d205369676e6564204d6573736167653a0a00000000000081526000835161144781601a850160208801610dcc565b83519083019061145e81601a840160208801610dcc565b01601a01949350505050565b634e487b7160e01b600052601260045260246000fd5b60008261148f5761148f61146a565b500490565b6000828210156114a6576114a66113de565b500390565b6000826114ba576114ba61146a565b500690565b600082198211156114d2576114d26113de565b500190565b634e487b7160e01b600052602160045260246000fdfea26469706673582212209552f1cfdba89f8fec237f3018fb1776a00c99b31c6f92d24ceb921760a7e36764736f6c63430008090033608060405234801561001057600080fd5b5061001a3361001f565b61006f565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b61102e8061007e6000396000f3fe60806040526004361061009a5760003560e01c8063715018a6116100695780639730886d1161004e5780639730886d1461022f578063b1454caa1461024f578063f2fde38b1461028857610112565b8063715018a6146101f25780638da5cb5b1461020757610112565b80630fcfbd111461015a5780631f5491391461018d57806324a084df146101af57806333a88c72146101c257610112565b366101125760405162461bcd60e51b815260206004820152602c60248201527f74686520576f726d686f6c6520636f6e747261637420646f6573206e6f74206160448201527f636365707420617373657473000000000000000000000000000000000000000060648201526084015b60405180910390fd5b60405162461bcd60e51b815260206004820152600b60248201527f756e737570706f727465640000000000000000000000000000000000000000006044820152606401610109565b34801561016657600080fd5b5061017a61017536600461094e565b6102a8565b6040519081526020015b60405180910390f35b34801561019957600080fd5b506101ad6101a8366004610998565b61035e565b005b6101ad6101bd366004610998565b610420565b3480156101ce57600080fd5b506101e26101dd36600461094e565b6104e3565b6040519015158152602001610184565b3480156101fe57600080fd5b506101ad610536565b34801561021357600080fd5b506000546040516001600160a01b039091168152602001610184565b34801561023b57600080fd5b506101ad61024a3660046109c4565b61059c565b34801561025b57600080fd5b5061026f61026a366004610a3a565b610740565b60405167ffffffffffffffff9091168152602001610184565b34801561029457600080fd5b506101ad6102a3366004610ae7565b610799565b600080826040516020016102bc9190610b43565b60408051601f19818403018152918152815160209283012060008181526001909352912054909150806103575760405162461bcd60e51b815260206004820152602160248201527f54686973206d65737361676520776173206e65766572207375626d697474656460448201527f2e000000000000000000000000000000000000000000000000000000000000006064820152608401610109565b9392505050565b6000546001600160a01b031633146103b85760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610109565b6000826001600160a01b03168260405160006040518083038185875af1925050503d8060008114610405576040519150601f19603f3d011682016040523d82523d6000602084013e61040a565b606091505b505090508061041b5761041b610c2d565b505050565b600034116104965760405162461bcd60e51b815260206004820152603060248201527f417474656d7074696e6720746f2073656e642076616c756520776974686f757460448201527f2070726f766964696e67204574686572000000000000000000000000000000006064820152608401610109565b604080513381526001600160a01b03841660208201529081018290527ff1365f826a788d6c1a955db0eed5ba8642674219c4771f8c65918617511a15609060600160405180910390a15050565b600080826040516020016104f79190610b43565b60408051601f19818403018152918152815160209283012060008181526001909352912054909150801580159061052e5750428111155b949350505050565b6000546001600160a01b031633146105905760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610109565b61059a600061087b565b565b6000546001600160a01b031633146105f65760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610109565b60006106028242610c59565b90506000836040516020016106179190610b43565b60408051601f19818403018152918152815160209283012060008181526001909352912054909150156106b25760405162461bcd60e51b815260206004820152602160248201527f4d657373616765207375626d6974746564206d6f7265207468616e206f6e636560448201527f21000000000000000000000000000000000000000000000000000000000000006064820152608401610109565b60008181526001602090815260408220849055600291906106d590870187610ae7565b6001600160a01b0316815260208101919091526040016000908120906107016080870160608801610c71565b63ffffffff168152602080820192909252604001600090812080546001810182559082529190208591600402016107388282610e4e565b505050505050565b600061074b336108d8565b90507fb93c37389233beb85a3a726c3f15c2d15533ee74cb602f20f490dfffef775937338288888888886040516107889796959493929190610f6c565b60405180910390a195945050505050565b6000546001600160a01b031633146107f35760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610109565b6001600160a01b03811661086f5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610109565b6108788161087b565b50565b600080546001600160a01b0383811673ffffffffffffffffffffffffffffffffffffffff19831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6001600160a01b0381166000908152600360205260408120805467ffffffffffffffff16916001919061090b8385610fcc565b92506101000a81548167ffffffffffffffff021916908367ffffffffffffffff160217905550919050565b600060c0828403121561094857600080fd5b50919050565b60006020828403121561096057600080fd5b813567ffffffffffffffff81111561097757600080fd5b61052e84828501610936565b6001600160a01b038116811461087857600080fd5b600080604083850312156109ab57600080fd5b82356109b681610983565b946020939093013593505050565b600080604083850312156109d757600080fd5b823567ffffffffffffffff8111156109ee57600080fd5b6109fa85828601610936565b95602094909401359450505050565b63ffffffff8116811461087857600080fd5b60ff8116811461087857600080fd5b8035610a3581610a1b565b919050565b600080600080600060808688031215610a5257600080fd5b8535610a5d81610a09565b94506020860135610a6d81610a09565b9350604086013567ffffffffffffffff80821115610a8a57600080fd5b818801915088601f830112610a9e57600080fd5b813581811115610aad57600080fd5b896020828501011115610abf57600080fd5b6020830195508094505050506060860135610ad981610a1b565b809150509295509295909350565b600060208284031215610af957600080fd5b813561035781610983565b67ffffffffffffffff8116811461087857600080fd5b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b6020815260008235610b5481610983565b6001600160a01b0381166020840152506020830135610b7281610b04565b67ffffffffffffffff808216604085015260408501359150610b9382610a09565b63ffffffff808316606086015260608601359250610bb083610a09565b80831660808601525060808501359150601e19853603018212610bd257600080fd5b90840190813581811115610be557600080fd5b803603861315610bf457600080fd5b60c060a0860152610c0c60e086018260208601610b1a565b92505050610c1c60a08501610a2a565b60ff811660c0850152509392505050565b634e487b7160e01b600052600160045260246000fd5b634e487b7160e01b600052601160045260246000fd5b60008219821115610c6c57610c6c610c43565b500190565b600060208284031215610c8357600080fd5b813561035781610a09565b60008135610c9b81610a09565b92915050565b6000808335601e19843603018112610cb857600080fd5b83018035915067ffffffffffffffff821115610cd357600080fd5b602001915036819003821315610ce857600080fd5b9250929050565b634e487b7160e01b600052604160045260246000fd5b600181811c90821680610d1957607f821691505b6020821081141561094857634e487b7160e01b600052602260045260246000fd5b601f82111561041b57600081815260208120601f850160051c81016020861015610d615750805b601f850160051c820191505b8181101561073857828155600101610d6d565b67ffffffffffffffff831115610d9857610d98610cef565b610dac83610da68354610d05565b83610d3a565b6000601f841160018114610de05760008515610dc85750838201355b600019600387901b1c1916600186901b178355610e3a565b600083815260209020601f19861690835b82811015610e115786850135825560209485019460019092019101610df1565b5086821015610e2e5760001960f88860031b161c19848701351681555b505060018560011b0183555b5050505050565b60008135610c9b81610a1b565b8135610e5981610983565b6001600160a01b038116905081548173ffffffffffffffffffffffffffffffffffffffff1982161783556020840135610e9181610b04565b7bffffffffffffffff00000000000000000000000000000000000000008160a01b1690507fffffffff0000000000000000000000000000000000000000000000000000000081848285161717855560408601359250610eef83610a09565b921760e09190911b909116178155610f27610f0c60608401610c8e565b6001830163ffffffff821663ffffffff198254161781555050565b610f346080830183610ca1565b610f42818360028601610d80565b5050610f68610f5360a08401610e41565b6003830160ff821660ff198254161781555050565b5050565b6001600160a01b038816815267ffffffffffffffff87166020820152600063ffffffff808816604084015280871660608401525060c06080830152610fb560c083018587610b1a565b905060ff831660a083015298975050505050505050565b600067ffffffffffffffff808316818516808303821115610fef57610fef610c43565b0194935050505056fea2646970667358221220db9085898705ac4b6f63e7d49c8fd3db14d606656b9bd451ec0bef92555d558b64736f6c63430008090033", } // ManagementContractABI is the input ABI used to generate the binding from. diff --git a/contracts/generated/MessageBus/MessageBus.go b/contracts/generated/MessageBus/MessageBus.go index 9df9300e66..a7d1a93461 100644 --- a/contracts/generated/MessageBus/MessageBus.go +++ b/contracts/generated/MessageBus/MessageBus.go @@ -41,8 +41,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\"},{\"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\":[],\"name\":\"renounceOwnership\",\"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\"},{\"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: "0x608060405234801561001057600080fd5b5061001a3361001f565b61006f565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b610e138061007e6000396000f3fe6080604052600436106100745760003560e01c80638da5cb5b1161004e5780638da5cb5b146101ae5780639730886d146101d6578063b1454caa146101f6578063f2fde38b1461022f576100ec565b80630fcfbd111461013457806333a88c7214610167578063715018a614610197576100ec565b366100ec5760405162461bcd60e51b815260206004820152602c60248201527f74686520576f726d686f6c6520636f6e747261637420646f6573206e6f74206160448201527f636365707420617373657473000000000000000000000000000000000000000060648201526084015b60405180910390fd5b60405162461bcd60e51b815260206004820152600b60248201527f756e737570706f7274656400000000000000000000000000000000000000000060448201526064016100e3565b34801561014057600080fd5b5061015461014f366004610770565b61024f565b6040519081526020015b60405180910390f35b34801561017357600080fd5b50610187610182366004610770565b610305565b604051901515815260200161015e565b3480156101a357600080fd5b506101ac610358565b005b3480156101ba57600080fd5b506000546040516001600160a01b03909116815260200161015e565b3480156101e257600080fd5b506101ac6101f13660046107a5565b6103be565b34801561020257600080fd5b5061021661021136600461081b565b610562565b60405167ffffffffffffffff909116815260200161015e565b34801561023b57600080fd5b506101ac61024a3660046108dd565b6105bb565b600080826040516020016102639190610939565b60408051601f19818403018152918152815160209283012060008181526001909352912054909150806102fe5760405162461bcd60e51b815260206004820152602160248201527f54686973206d65737361676520776173206e65766572207375626d697474656460448201527f2e0000000000000000000000000000000000000000000000000000000000000060648201526084016100e3565b9392505050565b600080826040516020016103199190610939565b60408051601f1981840301815291815281516020928301206000818152600190935291205490915080158015906103505750428111155b949350505050565b6000546001600160a01b031633146103b25760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016100e3565b6103bc600061069d565b565b6000546001600160a01b031633146104185760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016100e3565b60006104248242610a39565b90506000836040516020016104399190610939565b60408051601f19818403018152918152815160209283012060008181526001909352912054909150156104d45760405162461bcd60e51b815260206004820152602160248201527f4d657373616765207375626d6974746564206d6f7265207468616e206f6e636560448201527f210000000000000000000000000000000000000000000000000000000000000060648201526084016100e3565b60008181526001602090815260408220849055600291906104f7908701876108dd565b6001600160a01b0316815260208101919091526040016000908120906105236080870160608801610a51565b63ffffffff1681526020808201929092526040016000908120805460018101825590825291902085916004020161055a8282610c33565b505050505050565b600061056d336106fa565b90507fb93c37389233beb85a3a726c3f15c2d15533ee74cb602f20f490dfffef775937338288888888886040516105aa9796959493929190610d51565b60405180910390a195945050505050565b6000546001600160a01b031633146106155760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016100e3565b6001600160a01b0381166106915760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f646472657373000000000000000000000000000000000000000000000000000060648201526084016100e3565b61069a8161069d565b50565b600080546001600160a01b0383811673ffffffffffffffffffffffffffffffffffffffff19831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6001600160a01b0381166000908152600360205260408120805467ffffffffffffffff16916001919061072d8385610db1565b92506101000a81548167ffffffffffffffff021916908367ffffffffffffffff160217905550919050565b600060c0828403121561076a57600080fd5b50919050565b60006020828403121561078257600080fd5b813567ffffffffffffffff81111561079957600080fd5b61035084828501610758565b600080604083850312156107b857600080fd5b823567ffffffffffffffff8111156107cf57600080fd5b6107db85828601610758565b95602094909401359450505050565b63ffffffff8116811461069a57600080fd5b60ff8116811461069a57600080fd5b8035610816816107fc565b919050565b60008060008060006080868803121561083357600080fd5b853561083e816107ea565b9450602086013561084e816107ea565b9350604086013567ffffffffffffffff8082111561086b57600080fd5b818801915088601f83011261087f57600080fd5b81358181111561088e57600080fd5b8960208285010111156108a057600080fd5b60208301955080945050505060608601356108ba816107fc565b809150509295509295909350565b6001600160a01b038116811461069a57600080fd5b6000602082840312156108ef57600080fd5b81356102fe816108c8565b67ffffffffffffffff8116811461069a57600080fd5b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b602081526000823561094a816108c8565b6001600160a01b0381166020840152506020830135610968816108fa565b67ffffffffffffffff808216604085015260408501359150610989826107ea565b63ffffffff8083166060860152606086013592506109a6836107ea565b80831660808601525060808501359150601e198536030182126109c857600080fd5b908401908135818111156109db57600080fd5b8036038613156109ea57600080fd5b60c060a0860152610a0260e086018260208601610910565b92505050610a1260a0850161080b565b60ff811660c0850152509392505050565b634e487b7160e01b600052601160045260246000fd5b60008219821115610a4c57610a4c610a23565b500190565b600060208284031215610a6357600080fd5b81356102fe816107ea565b60008135610a7b816107ea565b92915050565b6000808335601e19843603018112610a9857600080fd5b83018035915067ffffffffffffffff821115610ab357600080fd5b602001915036819003821315610ac857600080fd5b9250929050565b634e487b7160e01b600052604160045260246000fd5b600181811c90821680610af957607f821691505b6020821081141561076a57634e487b7160e01b600052602260045260246000fd5b601f821115610b6057600081815260208120601f850160051c81016020861015610b415750805b601f850160051c820191505b8181101561055a57828155600101610b4d565b505050565b67ffffffffffffffff831115610b7d57610b7d610acf565b610b9183610b8b8354610ae5565b83610b1a565b6000601f841160018114610bc55760008515610bad5750838201355b600019600387901b1c1916600186901b178355610c1f565b600083815260209020601f19861690835b82811015610bf65786850135825560209485019460019092019101610bd6565b5086821015610c135760001960f88860031b161c19848701351681555b505060018560011b0183555b5050505050565b60008135610a7b816107fc565b8135610c3e816108c8565b6001600160a01b038116905081548173ffffffffffffffffffffffffffffffffffffffff1982161783556020840135610c76816108fa565b7bffffffffffffffff00000000000000000000000000000000000000008160a01b1690507fffffffff0000000000000000000000000000000000000000000000000000000081848285161717855560408601359250610cd4836107ea565b921760e09190911b909116178155610d0c610cf160608401610a6e565b6001830163ffffffff821663ffffffff198254161781555050565b610d196080830183610a81565b610d27818360028601610b65565b5050610d4d610d3860a08401610c26565b6003830160ff821660ff198254161781555050565b5050565b6001600160a01b038816815267ffffffffffffffff87166020820152600063ffffffff808816604084015280871660608401525060c06080830152610d9a60c083018587610910565b905060ff831660a083015298975050505050505050565b600067ffffffffffffffff808316818516808303821115610dd457610dd4610a23565b0194935050505056fea2646970667358221220e790a069b7a49368e0f1c281855881b133f1eac9bbac989876cb3bc659282fbe64736f6c63430008090033", + 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\":\"receiveValue\",\"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\":\"sendValue\",\"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: "0x608060405234801561001057600080fd5b5061001a3361001f565b61006f565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b61102e8061007e6000396000f3fe60806040526004361061009a5760003560e01c8063715018a6116100695780639730886d1161004e5780639730886d1461022f578063b1454caa1461024f578063f2fde38b1461028857610112565b8063715018a6146101f25780638da5cb5b1461020757610112565b80630fcfbd111461015a5780631f5491391461018d57806324a084df146101af57806333a88c72146101c257610112565b366101125760405162461bcd60e51b815260206004820152602c60248201527f74686520576f726d686f6c6520636f6e747261637420646f6573206e6f74206160448201527f636365707420617373657473000000000000000000000000000000000000000060648201526084015b60405180910390fd5b60405162461bcd60e51b815260206004820152600b60248201527f756e737570706f727465640000000000000000000000000000000000000000006044820152606401610109565b34801561016657600080fd5b5061017a61017536600461094e565b6102a8565b6040519081526020015b60405180910390f35b34801561019957600080fd5b506101ad6101a8366004610998565b61035e565b005b6101ad6101bd366004610998565b610420565b3480156101ce57600080fd5b506101e26101dd36600461094e565b6104e3565b6040519015158152602001610184565b3480156101fe57600080fd5b506101ad610536565b34801561021357600080fd5b506000546040516001600160a01b039091168152602001610184565b34801561023b57600080fd5b506101ad61024a3660046109c4565b61059c565b34801561025b57600080fd5b5061026f61026a366004610a3a565b610740565b60405167ffffffffffffffff9091168152602001610184565b34801561029457600080fd5b506101ad6102a3366004610ae7565b610799565b600080826040516020016102bc9190610b43565b60408051601f19818403018152918152815160209283012060008181526001909352912054909150806103575760405162461bcd60e51b815260206004820152602160248201527f54686973206d65737361676520776173206e65766572207375626d697474656460448201527f2e000000000000000000000000000000000000000000000000000000000000006064820152608401610109565b9392505050565b6000546001600160a01b031633146103b85760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610109565b6000826001600160a01b03168260405160006040518083038185875af1925050503d8060008114610405576040519150601f19603f3d011682016040523d82523d6000602084013e61040a565b606091505b505090508061041b5761041b610c2d565b505050565b600034116104965760405162461bcd60e51b815260206004820152603060248201527f417474656d7074696e6720746f2073656e642076616c756520776974686f757460448201527f2070726f766964696e67204574686572000000000000000000000000000000006064820152608401610109565b604080513381526001600160a01b03841660208201529081018290527ff1365f826a788d6c1a955db0eed5ba8642674219c4771f8c65918617511a15609060600160405180910390a15050565b600080826040516020016104f79190610b43565b60408051601f19818403018152918152815160209283012060008181526001909352912054909150801580159061052e5750428111155b949350505050565b6000546001600160a01b031633146105905760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610109565b61059a600061087b565b565b6000546001600160a01b031633146105f65760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610109565b60006106028242610c59565b90506000836040516020016106179190610b43565b60408051601f19818403018152918152815160209283012060008181526001909352912054909150156106b25760405162461bcd60e51b815260206004820152602160248201527f4d657373616765207375626d6974746564206d6f7265207468616e206f6e636560448201527f21000000000000000000000000000000000000000000000000000000000000006064820152608401610109565b60008181526001602090815260408220849055600291906106d590870187610ae7565b6001600160a01b0316815260208101919091526040016000908120906107016080870160608801610c71565b63ffffffff168152602080820192909252604001600090812080546001810182559082529190208591600402016107388282610e4e565b505050505050565b600061074b336108d8565b90507fb93c37389233beb85a3a726c3f15c2d15533ee74cb602f20f490dfffef775937338288888888886040516107889796959493929190610f6c565b60405180910390a195945050505050565b6000546001600160a01b031633146107f35760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610109565b6001600160a01b03811661086f5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610109565b6108788161087b565b50565b600080546001600160a01b0383811673ffffffffffffffffffffffffffffffffffffffff19831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6001600160a01b0381166000908152600360205260408120805467ffffffffffffffff16916001919061090b8385610fcc565b92506101000a81548167ffffffffffffffff021916908367ffffffffffffffff160217905550919050565b600060c0828403121561094857600080fd5b50919050565b60006020828403121561096057600080fd5b813567ffffffffffffffff81111561097757600080fd5b61052e84828501610936565b6001600160a01b038116811461087857600080fd5b600080604083850312156109ab57600080fd5b82356109b681610983565b946020939093013593505050565b600080604083850312156109d757600080fd5b823567ffffffffffffffff8111156109ee57600080fd5b6109fa85828601610936565b95602094909401359450505050565b63ffffffff8116811461087857600080fd5b60ff8116811461087857600080fd5b8035610a3581610a1b565b919050565b600080600080600060808688031215610a5257600080fd5b8535610a5d81610a09565b94506020860135610a6d81610a09565b9350604086013567ffffffffffffffff80821115610a8a57600080fd5b818801915088601f830112610a9e57600080fd5b813581811115610aad57600080fd5b896020828501011115610abf57600080fd5b6020830195508094505050506060860135610ad981610a1b565b809150509295509295909350565b600060208284031215610af957600080fd5b813561035781610983565b67ffffffffffffffff8116811461087857600080fd5b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b6020815260008235610b5481610983565b6001600160a01b0381166020840152506020830135610b7281610b04565b67ffffffffffffffff808216604085015260408501359150610b9382610a09565b63ffffffff808316606086015260608601359250610bb083610a09565b80831660808601525060808501359150601e19853603018212610bd257600080fd5b90840190813581811115610be557600080fd5b803603861315610bf457600080fd5b60c060a0860152610c0c60e086018260208601610b1a565b92505050610c1c60a08501610a2a565b60ff811660c0850152509392505050565b634e487b7160e01b600052600160045260246000fd5b634e487b7160e01b600052601160045260246000fd5b60008219821115610c6c57610c6c610c43565b500190565b600060208284031215610c8357600080fd5b813561035781610a09565b60008135610c9b81610a09565b92915050565b6000808335601e19843603018112610cb857600080fd5b83018035915067ffffffffffffffff821115610cd357600080fd5b602001915036819003821315610ce857600080fd5b9250929050565b634e487b7160e01b600052604160045260246000fd5b600181811c90821680610d1957607f821691505b6020821081141561094857634e487b7160e01b600052602260045260246000fd5b601f82111561041b57600081815260208120601f850160051c81016020861015610d615750805b601f850160051c820191505b8181101561073857828155600101610d6d565b67ffffffffffffffff831115610d9857610d98610cef565b610dac83610da68354610d05565b83610d3a565b6000601f841160018114610de05760008515610dc85750838201355b600019600387901b1c1916600186901b178355610e3a565b600083815260209020601f19861690835b82811015610e115786850135825560209485019460019092019101610df1565b5086821015610e2e5760001960f88860031b161c19848701351681555b505060018560011b0183555b5050505050565b60008135610c9b81610a1b565b8135610e5981610983565b6001600160a01b038116905081548173ffffffffffffffffffffffffffffffffffffffff1982161783556020840135610e9181610b04565b7bffffffffffffffff00000000000000000000000000000000000000008160a01b1690507fffffffff0000000000000000000000000000000000000000000000000000000081848285161717855560408601359250610eef83610a09565b921760e09190911b909116178155610f27610f0c60608401610c8e565b6001830163ffffffff821663ffffffff198254161781555050565b610f346080830183610ca1565b610f42818360028601610d80565b5050610f68610f5360a08401610e41565b6003830160ff821660ff198254161781555050565b5050565b6001600160a01b038816815267ffffffffffffffff87166020820152600063ffffffff808816604084015280871660608401525060c06080830152610fb560c083018587610b1a565b905060ff831660a083015298975050505050505050565b600067ffffffffffffffff808316818516808303821115610fef57610fef610c43565b0194935050505056fea2646970667358221220db9085898705ac4b6f63e7d49c8fd3db14d606656b9bd451ec0bef92555d558b64736f6c63430008090033", } // MessageBusABI is the input ABI used to generate the binding from. @@ -326,6 +326,27 @@ func (_MessageBus *MessageBusTransactorSession) PublishMessage(nonce uint32, top return _MessageBus.Contract.PublishMessage(&_MessageBus.TransactOpts, nonce, topic, payload, consistencyLevel) } +// ReceiveValue is a paid mutator transaction binding the contract method 0x1f549139. +// +// Solidity: function receiveValue(address receiver, uint256 amount) returns() +func (_MessageBus *MessageBusTransactor) ReceiveValue(opts *bind.TransactOpts, receiver common.Address, amount *big.Int) (*types.Transaction, error) { + return _MessageBus.contract.Transact(opts, "receiveValue", receiver, amount) +} + +// ReceiveValue is a paid mutator transaction binding the contract method 0x1f549139. +// +// Solidity: function receiveValue(address receiver, uint256 amount) returns() +func (_MessageBus *MessageBusSession) ReceiveValue(receiver common.Address, amount *big.Int) (*types.Transaction, error) { + return _MessageBus.Contract.ReceiveValue(&_MessageBus.TransactOpts, receiver, amount) +} + +// ReceiveValue is a paid mutator transaction binding the contract method 0x1f549139. +// +// Solidity: function receiveValue(address receiver, uint256 amount) returns() +func (_MessageBus *MessageBusTransactorSession) ReceiveValue(receiver common.Address, amount *big.Int) (*types.Transaction, error) { + return _MessageBus.Contract.ReceiveValue(&_MessageBus.TransactOpts, receiver, amount) +} + // RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. // // Solidity: function renounceOwnership() returns() @@ -347,6 +368,27 @@ func (_MessageBus *MessageBusTransactorSession) RenounceOwnership() (*types.Tran return _MessageBus.Contract.RenounceOwnership(&_MessageBus.TransactOpts) } +// SendValue is a paid mutator transaction binding the contract method 0x24a084df. +// +// Solidity: function sendValue(address receiver, uint256 amount) payable returns() +func (_MessageBus *MessageBusTransactor) SendValue(opts *bind.TransactOpts, receiver common.Address, amount *big.Int) (*types.Transaction, error) { + return _MessageBus.contract.Transact(opts, "sendValue", receiver, amount) +} + +// SendValue is a paid mutator transaction binding the contract method 0x24a084df. +// +// Solidity: function sendValue(address receiver, uint256 amount) payable returns() +func (_MessageBus *MessageBusSession) SendValue(receiver common.Address, amount *big.Int) (*types.Transaction, error) { + return _MessageBus.Contract.SendValue(&_MessageBus.TransactOpts, receiver, amount) +} + +// SendValue is a paid mutator transaction binding the contract method 0x24a084df. +// +// Solidity: function sendValue(address receiver, uint256 amount) payable returns() +func (_MessageBus *MessageBusTransactorSession) SendValue(receiver common.Address, amount *big.Int) (*types.Transaction, error) { + return _MessageBus.Contract.SendValue(&_MessageBus.TransactOpts, receiver, amount) +} + // StoreCrossChainMessage is a paid mutator transaction binding the contract method 0x9730886d. // // Solidity: function storeCrossChainMessage((address,uint64,uint32,uint32,bytes,uint8) crossChainMessage, uint256 finalAfterTimestamp) returns() @@ -722,3 +764,139 @@ func (_MessageBus *MessageBusFilterer) ParseOwnershipTransferred(log types.Log) event.Raw = log return event, nil } + +// MessageBusValueTransferIterator is returned from FilterValueTransfer and is used to iterate over the raw logs and unpacked data for ValueTransfer events raised by the MessageBus contract. +type MessageBusValueTransferIterator struct { + Event *MessageBusValueTransfer // 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 *MessageBusValueTransferIterator) 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(MessageBusValueTransfer) + 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(MessageBusValueTransfer) + 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 *MessageBusValueTransferIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *MessageBusValueTransferIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// MessageBusValueTransfer represents a ValueTransfer event raised by the MessageBus contract. +type MessageBusValueTransfer struct { + Sender common.Address + Receiver common.Address + Amount *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterValueTransfer is a free log retrieval operation binding the contract event 0xf1365f826a788d6c1a955db0eed5ba8642674219c4771f8c65918617511a1560. +// +// Solidity: event ValueTransfer(address sender, address receiver, uint256 amount) +func (_MessageBus *MessageBusFilterer) FilterValueTransfer(opts *bind.FilterOpts) (*MessageBusValueTransferIterator, error) { + + logs, sub, err := _MessageBus.contract.FilterLogs(opts, "ValueTransfer") + if err != nil { + return nil, err + } + return &MessageBusValueTransferIterator{contract: _MessageBus.contract, event: "ValueTransfer", logs: logs, sub: sub}, nil +} + +// WatchValueTransfer is a free log subscription operation binding the contract event 0xf1365f826a788d6c1a955db0eed5ba8642674219c4771f8c65918617511a1560. +// +// Solidity: event ValueTransfer(address sender, address receiver, uint256 amount) +func (_MessageBus *MessageBusFilterer) WatchValueTransfer(opts *bind.WatchOpts, sink chan<- *MessageBusValueTransfer) (event.Subscription, error) { + + logs, sub, err := _MessageBus.contract.WatchLogs(opts, "ValueTransfer") + 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(MessageBusValueTransfer) + if err := _MessageBus.contract.UnpackLog(event, "ValueTransfer", 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 +} + +// ParseValueTransfer is a log parse operation binding the contract event 0xf1365f826a788d6c1a955db0eed5ba8642674219c4771f8c65918617511a1560. +// +// Solidity: event ValueTransfer(address sender, address receiver, uint256 amount) +func (_MessageBus *MessageBusFilterer) ParseValueTransfer(log types.Log) (*MessageBusValueTransfer, error) { + event := new(MessageBusValueTransfer) + if err := _MessageBus.contract.UnpackLog(event, "ValueTransfer", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} diff --git a/contracts/generated/ObsERC20/ObsERC20.go b/contracts/generated/ObsERC20/ObsERC20.go index ceeb461384..49f4d7ce91 100644 --- a/contracts/generated/ObsERC20/ObsERC20.go +++ b/contracts/generated/ObsERC20/ObsERC20.go @@ -32,7 +32,7 @@ var ( // 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: "0x6080604052600580546001600160a01b03191673deb34a740eca1ec42c8b8204cbec0ba34fdd27f31790553480156200003757600080fd5b5060405162000da838038062000da88339810160408190526200005a9162000207565b8151829082906200007390600390602085019062000094565b5080516200008990600490602084019062000094565b5050505050620002ae565b828054620000a29062000271565b90600052602060002090601f016020900481019282620000c6576000855562000111565b82601f10620000e157805160ff191683800117855562000111565b8280016001018555821562000111579182015b8281111562000111578251825591602001919060010190620000f4565b506200011f92915062000123565b5090565b5b808211156200011f576000815560010162000124565b634e487b7160e01b600052604160045260246000fd5b600082601f8301126200016257600080fd5b81516001600160401b03808211156200017f576200017f6200013a565b604051601f8301601f19908116603f01168101908282118183101715620001aa57620001aa6200013a565b81604052838152602092508683858801011115620001c757600080fd5b600091505b83821015620001eb5785820183015181830184015290820190620001cc565b83821115620001fd5760008385830101525b9695505050505050565b600080604083850312156200021b57600080fd5b82516001600160401b03808211156200023357600080fd5b620002418683870162000150565b935060208501519150808211156200025857600080fd5b50620002678582860162000150565b9150509250929050565b600181811c908216806200028657607f821691505b60208210811415620002a857634e487b7160e01b600052602260045260246000fd5b50919050565b610aea80620002be6000396000f3fe608060405234801561001057600080fd5b50600436106100c95760003560e01c80633950935111610081578063a457c2d71161005b578063a457c2d714610171578063a9059cbb14610184578063dd62ed3e1461019757600080fd5b8063395093511461014357806370a082311461015657806395d89b411461016957600080fd5b806318160ddd116100b257806318160ddd1461010f57806323b872dd14610121578063313ce5671461013457600080fd5b806306fdde03146100ce578063095ea7b3146100ec575b600080fd5b6100d66101aa565b6040516100e39190610927565b60405180910390f35b6100ff6100fa366004610998565b61023c565b60405190151581526020016100e3565b6002545b6040519081526020016100e3565b6100ff61012f3660046109c2565b610256565b604051601281526020016100e3565b6100ff610151366004610998565b61027a565b6101136101643660046109fe565b6102b9565b6100d6610366565b6100ff61017f366004610998565b610375565b6100ff610192366004610998565b61041f565b6101136101a5366004610a20565b61042d565b6060600380546101b990610a53565b80601f01602080910402602001604051908101604052809291908181526020018280546101e590610a53565b80156102325780601f1061020757610100808354040283529160200191610232565b820191906000526020600020905b81548152906001019060200180831161021557829003601f168201915b5050505050905090565b60003361024a81858561053e565b60019150505b92915050565b600033610264858285610696565b61026f858585610710565b506001949350505050565b3360008181526001602090815260408083206001600160a01b038716845290915281205490919061024a90829086906102b4908790610a8e565b61053e565b6000326001600160a01b03831614156102ea576001600160a01b038216600090815260208190526040902054610250565b336001600160a01b0383161415610319576001600160a01b038216600090815260208190526040902054610250565b60405162461bcd60e51b815260206004820152601f60248201527f4e6f7420616c6c6f77656420746f2072656164207468652062616c616e63650060448201526064015b60405180910390fd5b6060600480546101b990610a53565b3360008181526001602090815260408083206001600160a01b0387168452909152812054909190838110156104125760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f7760448201527f207a65726f000000000000000000000000000000000000000000000000000000606482015260840161035d565b61026f828686840361053e565b60003361024a818585610710565b6000326001600160a01b038416148061044e5750326001600160a01b038316145b15610481576001600160a01b038084166000908152600160209081526040808320938616835292905220545b9050610250565b336001600160a01b03841614806104a05750336001600160a01b038316145b156104d0576001600160a01b0380841660009081526001602090815260408083209386168352929052205461047a565b60405162461bcd60e51b815260206004820152602160248201527f4e6f7420616c6c6f77656420746f20726561642074686520616c6c6f77616e6360448201527f6500000000000000000000000000000000000000000000000000000000000000606482015260840161035d565b6001600160a01b0383166105b95760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460448201527f7265737300000000000000000000000000000000000000000000000000000000606482015260840161035d565b6001600160a01b0382166106355760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f20616464726560448201527f7373000000000000000000000000000000000000000000000000000000000000606482015260840161035d565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b60006106a2848461042d565b9050600019811461070a57818110156106fd5760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e6365000000604482015260640161035d565b61070a848484840361053e565b50505050565b6001600160a01b03831661078c5760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f20616460448201527f6472657373000000000000000000000000000000000000000000000000000000606482015260840161035d565b6001600160a01b0382166108085760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201527f6573730000000000000000000000000000000000000000000000000000000000606482015260840161035d565b6001600160a01b038316600090815260208190526040902054818110156108975760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e742065786365656473206260448201527f616c616e63650000000000000000000000000000000000000000000000000000606482015260840161035d565b6001600160a01b038085166000908152602081905260408082208585039055918516815290812080548492906108ce908490610a8e565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405161091a91815260200190565b60405180910390a361070a565b600060208083528351808285015260005b8181101561095457858101830151858201604001528201610938565b81811115610966576000604083870101525b50601f01601f1916929092016040019392505050565b80356001600160a01b038116811461099357600080fd5b919050565b600080604083850312156109ab57600080fd5b6109b48361097c565b946020939093013593505050565b6000806000606084860312156109d757600080fd5b6109e08461097c565b92506109ee6020850161097c565b9150604084013590509250925092565b600060208284031215610a1057600080fd5b610a198261097c565b9392505050565b60008060408385031215610a3357600080fd5b610a3c8361097c565b9150610a4a6020840161097c565b90509250929050565b600181811c90821680610a6757607f821691505b60208210811415610a8857634e487b7160e01b600052602260045260246000fd5b50919050565b60008219821115610aaf57634e487b7160e01b600052601160045260246000fd5b50019056fea264697066735822122067ce0e5cfaecc7b81a06d0323f4293a9025d590255a84fde406570e5e6d996af64736f6c63430008090033", + Bin: "0x6080604052600580546001600160a01b03191673deb34a740eca1ec42c8b8204cbec0ba34fdd27f31790553480156200003757600080fd5b5060405162000da838038062000da88339810160408190526200005a9162000207565b8151829082906200007390600390602085019062000094565b5080516200008990600490602084019062000094565b5050505050620002ae565b828054620000a29062000271565b90600052602060002090601f016020900481019282620000c6576000855562000111565b82601f10620000e157805160ff191683800117855562000111565b8280016001018555821562000111579182015b8281111562000111578251825591602001919060010190620000f4565b506200011f92915062000123565b5090565b5b808211156200011f576000815560010162000124565b634e487b7160e01b600052604160045260246000fd5b600082601f8301126200016257600080fd5b81516001600160401b03808211156200017f576200017f6200013a565b604051601f8301601f19908116603f01168101908282118183101715620001aa57620001aa6200013a565b81604052838152602092508683858801011115620001c757600080fd5b600091505b83821015620001eb5785820183015181830184015290820190620001cc565b83821115620001fd5760008385830101525b9695505050505050565b600080604083850312156200021b57600080fd5b82516001600160401b03808211156200023357600080fd5b620002418683870162000150565b935060208501519150808211156200025857600080fd5b50620002678582860162000150565b9150509250929050565b600181811c908216806200028657607f821691505b60208210811415620002a857634e487b7160e01b600052602260045260246000fd5b50919050565b610aea80620002be6000396000f3fe608060405234801561001057600080fd5b50600436106100c95760003560e01c80633950935111610081578063a457c2d71161005b578063a457c2d714610171578063a9059cbb14610184578063dd62ed3e1461019757600080fd5b8063395093511461014357806370a082311461015657806395d89b411461016957600080fd5b806318160ddd116100b257806318160ddd1461010f57806323b872dd14610121578063313ce5671461013457600080fd5b806306fdde03146100ce578063095ea7b3146100ec575b600080fd5b6100d66101aa565b6040516100e39190610927565b60405180910390f35b6100ff6100fa366004610998565b61023c565b60405190151581526020016100e3565b6002545b6040519081526020016100e3565b6100ff61012f3660046109c2565b610256565b604051601281526020016100e3565b6100ff610151366004610998565b61027a565b6101136101643660046109fe565b6102b9565b6100d6610366565b6100ff61017f366004610998565b610375565b6100ff610192366004610998565b61041f565b6101136101a5366004610a20565b61042d565b6060600380546101b990610a53565b80601f01602080910402602001604051908101604052809291908181526020018280546101e590610a53565b80156102325780601f1061020757610100808354040283529160200191610232565b820191906000526020600020905b81548152906001019060200180831161021557829003601f168201915b5050505050905090565b60003361024a81858561053e565b60019150505b92915050565b600033610264858285610696565b61026f858585610710565b506001949350505050565b3360008181526001602090815260408083206001600160a01b038716845290915281205490919061024a90829086906102b4908790610a8e565b61053e565b6000326001600160a01b03831614156102ea576001600160a01b038216600090815260208190526040902054610250565b336001600160a01b0383161415610319576001600160a01b038216600090815260208190526040902054610250565b60405162461bcd60e51b815260206004820152601f60248201527f4e6f7420616c6c6f77656420746f2072656164207468652062616c616e63650060448201526064015b60405180910390fd5b6060600480546101b990610a53565b3360008181526001602090815260408083206001600160a01b0387168452909152812054909190838110156104125760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f7760448201527f207a65726f000000000000000000000000000000000000000000000000000000606482015260840161035d565b61026f828686840361053e565b60003361024a818585610710565b6000326001600160a01b038416148061044e5750326001600160a01b038316145b15610481576001600160a01b038084166000908152600160209081526040808320938616835292905220545b9050610250565b336001600160a01b03841614806104a05750336001600160a01b038316145b156104d0576001600160a01b0380841660009081526001602090815260408083209386168352929052205461047a565b60405162461bcd60e51b815260206004820152602160248201527f4e6f7420616c6c6f77656420746f20726561642074686520616c6c6f77616e6360448201527f6500000000000000000000000000000000000000000000000000000000000000606482015260840161035d565b6001600160a01b0383166105b95760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460448201527f7265737300000000000000000000000000000000000000000000000000000000606482015260840161035d565b6001600160a01b0382166106355760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f20616464726560448201527f7373000000000000000000000000000000000000000000000000000000000000606482015260840161035d565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b60006106a2848461042d565b9050600019811461070a57818110156106fd5760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e6365000000604482015260640161035d565b61070a848484840361053e565b50505050565b6001600160a01b03831661078c5760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f20616460448201527f6472657373000000000000000000000000000000000000000000000000000000606482015260840161035d565b6001600160a01b0382166108085760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201527f6573730000000000000000000000000000000000000000000000000000000000606482015260840161035d565b6001600160a01b038316600090815260208190526040902054818110156108975760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e742065786365656473206260448201527f616c616e63650000000000000000000000000000000000000000000000000000606482015260840161035d565b6001600160a01b038085166000908152602081905260408082208585039055918516815290812080548492906108ce908490610a8e565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405161091a91815260200190565b60405180910390a361070a565b600060208083528351808285015260005b8181101561095457858101830151858201604001528201610938565b81811115610966576000604083870101525b50601f01601f1916929092016040019392505050565b80356001600160a01b038116811461099357600080fd5b919050565b600080604083850312156109ab57600080fd5b6109b48361097c565b946020939093013593505050565b6000806000606084860312156109d757600080fd5b6109e08461097c565b92506109ee6020850161097c565b9150604084013590509250925092565b600060208284031215610a1057600080fd5b610a198261097c565b9392505050565b60008060408385031215610a3357600080fd5b610a3c8361097c565b9150610a4a6020840161097c565b90509250929050565b600181811c90821680610a6757607f821691505b60208210811415610a8857634e487b7160e01b600052602260045260246000fd5b50919050565b60008219821115610aaf57634e487b7160e01b600052601160045260246000fd5b50019056fea264697066735822122016c67bba2bf0938aa37db7585ae1e5dbcca1f5543c8d87a1ec70d2b6da7fd77864736f6c63430008090033", } // ObsERC20ABI is the input ABI used to generate the binding from. diff --git a/contracts/generated/ObscuroBridge/ObscuroBridge.go b/contracts/generated/ObscuroBridge/ObscuroBridge.go index 9a5aa18975..d2576684b1 100644 --- a/contracts/generated/ObscuroBridge/ObscuroBridge.go +++ b/contracts/generated/ObscuroBridge/ObscuroBridge.go @@ -32,7 +32,7 @@ var ( // 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: "0x60806040526001805463ffffffff60a01b191690553480156200002157600080fd5b5060405162001bbb38038062001bbb8339810160408190526200004491620001fc565b600080546001600160a01b0319166001600160a01b038316908117909155604080516350d113fd60e11b8152905183929163a1a227fa916004808301926020929190829003018186803b1580156200009b57600080fd5b505afa158015620000b0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620000d69190620001fc565b600180546001600160a01b0319166001600160a01b039290921691909117905550620001237fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c217753362000157565b620001507fd2fb17ceaa388942529b17e0006ffc4d559f040dd4f2157b8070f17ad2110578600062000157565b506200022e565b60008281526002602090815260408083206001600160a01b038516845290915290205460ff16620001f85760008281526002602090815260408083206001600160a01b03851684529091529020805460ff19166001179055620001b73390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45b5050565b6000602082840312156200020f57600080fd5b81516001600160a01b03811681146200022757600080fd5b9392505050565b61197d806200023e6000396000f3fe60806040526004361061010e5760003560e01c80635fa7b584116100a557806393b3744211610074578063a381c8e211610059578063a381c8e21461033e578063d547741f1461035e578063e4c3ebc71461037e57600080fd5b806393b3744214610309578063a217fddf1461032957600080fd5b80635fa7b5841461024f57806375b238fc1461026f57806383bece4d146102a357806391d14854146102c357600080fd5b80632f2ff15d116100e15780632f2ff15d146101bb57806336568abe146101db578063498d82ab146101fb5780635d8729701461021b57600080fd5b806301ffc9a71461011357806316ce8149146101485780631888d7121461016a578063248a9ca31461017d575b600080fd5b34801561011f57600080fd5b5061013361012e36600461147f565b6103b2565b60405190151581526020015b60405180910390f35b34801561015457600080fd5b506101686101633660046114c1565b61041b565b005b6101686101783660046114c1565b610481565b34801561018957600080fd5b506101ad6101983660046114de565b60009081526002602052604090206001015490565b60405190815260200161013f565b3480156101c757600080fd5b506101686101d63660046114f7565b610532565b3480156101e757600080fd5b506101686101f63660046114f7565b61055d565b34801561020757600080fd5b50610168610216366004611570565b6105e5565b34801561022757600080fd5b506101ad7f9f225881f6e7ac8a885b63aa2269cbce78dd6a669864ccd2cd2517a8e709d73a81565b34801561025b57600080fd5b5061016861026a3660046114c1565b6106b3565b34801561027b57600080fd5b506101ad7fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c2177581565b3480156102af57600080fd5b506101686102be3660046115f3565b610708565b3480156102cf57600080fd5b506101336102de3660046114f7565b60009182526002602090815260408084206001600160a01b0393909316845291905290205460ff1690565b34801561031557600080fd5b506101686103243660046114c1565b61092b565b34801561033557600080fd5b506101ad600081565b34801561034a57600080fd5b506101686103593660046115f3565b610980565b34801561036a57600080fd5b506101686103793660046114f7565b610b2d565b34801561038a57600080fd5b506101ad7fd2fb17ceaa388942529b17e0006ffc4d559f040dd4f2157b8070f17ad211057881565b60006001600160e01b031982167f7965db0b00000000000000000000000000000000000000000000000000000000148061041557507f01ffc9a7000000000000000000000000000000000000000000000000000000006001600160e01b03198316145b92915050565b7fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c217756104468133610b53565b50600380547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0392909216919091179055565b600034116104d65760405162461bcd60e51b815260206004820152600f60248201527f456d707479207472616e736665722e000000000000000000000000000000000060448201526064015b60405180910390fd5b604080518082018252348082526001600160a01b03848116602093840190815284519384019290925290518116828401528251808303840181526060909201909252600354909161052e91168260005b600080610bd3565b5050565b60008281526002602052604090206001015461054e8133610b53565b6105588383610cee565b505050565b6001600160a01b03811633146105db5760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201527f20726f6c657320666f722073656c66000000000000000000000000000000000060648201526084016104cd565b61052e8282610d90565b7fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c217756106108133610b53565b61063a7f9f225881f6e7ac8a885b63aa2269cbce78dd6a669864ccd2cd2517a8e709d73a87610cee565b600063458ffd6360e01b878787878760405160240161065d95949392919061165e565b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b0319909316929092179091526003549091506106aa906001600160a01b0316826002610526565b50505050505050565b7fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c217756106de8133610b53565b61052e7f9f225881f6e7ac8a885b63aa2269cbce78dd6a669864ccd2cd2517a8e709d73a83610d90565b6003546000546001600160a01b039182169116331461078f5760405162461bcd60e51b815260206004820152603060248201527f436f6e74726163742063616c6c6572206973206e6f742074686520726567697360448201527f7465726564206d657373656e676572210000000000000000000000000000000060648201526084016104cd565b806001600160a01b03166107a1610e13565b6001600160a01b03161461081d5760405162461bcd60e51b815260206004820152603160248201527f43726f737320636861696e206d65737361676520636f6d696e672066726f6d2060448201527f696e636f72726563742073656e6465722100000000000000000000000000000060648201526084016104cd565b6001600160a01b03841660009081527f32ef73018533fa188e9e42b313c0a4048c6052342b662fb7510c0d1abcea3413602052604090205460ff161561086d57610868848484610e9f565b610925565b6001600160a01b03841660009081527f13ad2d85210d477fe1a6e25654c8250308cf29b050a4bf0b039d70467486712c602052604090205460ff16156108b7576108688383610eaa565b60405162461bcd60e51b815260206004820152602560248201527f417474656d7074696e6720746f20776974686472617720756e6b6e6f776e206160448201527f737365742e00000000000000000000000000000000000000000000000000000060648201526084016104cd565b50505050565b7fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c217756109568133610b53565b61052e7fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c2177583610cee565b600082116109d05760405162461bcd60e51b815260206004820152601a60248201527f417474656d7074696e6720656d707479207472616e736665722e00000000000060448201526064016104cd565b6001600160a01b03831660009081527f32ef73018533fa188e9e42b313c0a4048c6052342b662fb7510c0d1abcea3413602052604090205460ff16610aa35760405162461bcd60e51b815260206004820152604e60248201527f54686973206164647265737320686173206e6f74206265656e20676976656e2060448201527f61207479706520616e64206973207468757320636f6e73696465726564206e6f60648201527f742077686974656c69737465642e000000000000000000000000000000000000608482015260a4016104cd565b610aaf83333085610f4d565b604080516001600160a01b038581166024830152604482018590528381166064808401919091528351808403909101815260849092019092526020810180516001600160e01b03167f83bece4d0000000000000000000000000000000000000000000000000000000017905260035490916109259116826001610526565b600082815260026020526040902060010154610b498133610b53565b6105588383610d90565b60008281526002602090815260408083206001600160a01b038516845290915290205460ff1661052e57610b91816001600160a01b03166014610fd1565b610b9c836020610fd1565b604051602001610bad9291906116cc565b60408051601f198184030181529082905262461bcd60e51b82526104cd91600401611779565b60006040518060600160405280876001600160a01b0316815260200186815260200184815250604051602001610c09919061178c565b60408051808303601f19018152919052600180549192506001600160a01b0382169163b1454caa917401000000000000000000000000000000000000000090910463ffffffff16906014610c5c836117e7565b91906101000a81548163ffffffff021916908363ffffffff1602179055508684866040518563ffffffff1660e01b8152600401610c9c949392919061180b565b602060405180830381600087803b158015610cb657600080fd5b505af1158015610cca573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106aa9190611848565b60008281526002602090815260408083206001600160a01b038516845290915290205460ff1661052e5760008281526002602090815260408083206001600160a01b03851684529091529020805460ff19166001179055610d4c3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b60008281526002602090815260408083206001600160a01b038516845290915290205460ff161561052e5760008281526002602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b60008060009054906101000a90046001600160a01b03166001600160a01b03166363012de56040518163ffffffff1660e01b815260040160206040518083038186803b158015610e6257600080fd5b505afa158015610e76573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e9a9190611872565b905090565b6105588382846111b9565b6000816001600160a01b03168360405160006040518083038185875af1925050503d8060008114610ef7576040519150601f19603f3d011682016040523d82523d6000602084013e610efc565b606091505b50509050806105585760405162461bcd60e51b815260206004820152601460248201527f4661696c656420746f2073656e6420457468657200000000000000000000000060448201526064016104cd565b6040516001600160a01b03808516602483015283166044820152606481018290526109259085907f23b872dd00000000000000000000000000000000000000000000000000000000906084015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152611202565b60606000610fe083600261188f565b610feb9060026118ae565b67ffffffffffffffff811115611003576110036118c6565b6040519080825280601f01601f19166020018201604052801561102d576020820181803683370190505b5090507f300000000000000000000000000000000000000000000000000000000000000081600081518110611064576110646118dc565b60200101906001600160f81b031916908160001a9053507f7800000000000000000000000000000000000000000000000000000000000000816001815181106110af576110af6118dc565b60200101906001600160f81b031916908160001a90535060006110d384600261188f565b6110de9060016118ae565b90505b6001811115611163577f303132333435363738396162636465660000000000000000000000000000000085600f166010811061111f5761111f6118dc565b1a60f81b828281518110611135576111356118dc565b60200101906001600160f81b031916908160001a90535060049490941c9361115c816118f2565b90506110e1565b5083156111b25760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e7460448201526064016104cd565b9392505050565b6040516001600160a01b0383166024820152604481018290526105589084907fa9059cbb0000000000000000000000000000000000000000000000000000000090606401610f9a565b6000611257826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166112e79092919063ffffffff16565b80519091501561055857808060200190518101906112759190611909565b6105585760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f7420737563636565640000000000000000000000000000000000000000000060648201526084016104cd565b60606112f684846000856112fe565b949350505050565b6060824710156113765760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c000000000000000000000000000000000000000000000000000060648201526084016104cd565b6001600160a01b0385163b6113cd5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016104cd565b600080866001600160a01b031685876040516113e9919061192b565b60006040518083038185875af1925050503d8060008114611426576040519150601f19603f3d011682016040523d82523d6000602084013e61142b565b606091505b509150915061143b828286611446565b979650505050505050565b606083156114555750816111b2565b8251156114655782518084602001fd5b8160405162461bcd60e51b81526004016104cd9190611779565b60006020828403121561149157600080fd5b81356001600160e01b0319811681146111b257600080fd5b6001600160a01b03811681146114be57600080fd5b50565b6000602082840312156114d357600080fd5b81356111b2816114a9565b6000602082840312156114f057600080fd5b5035919050565b6000806040838503121561150a57600080fd5b82359150602083013561151c816114a9565b809150509250929050565b60008083601f84011261153957600080fd5b50813567ffffffffffffffff81111561155157600080fd5b60208301915083602082850101111561156957600080fd5b9250929050565b60008060008060006060868803121561158857600080fd5b8535611593816114a9565b9450602086013567ffffffffffffffff808211156115b057600080fd5b6115bc89838a01611527565b909650945060408801359150808211156115d557600080fd5b506115e288828901611527565b969995985093965092949392505050565b60008060006060848603121561160857600080fd5b8335611613816114a9565b925060208401359150604084013561162a816114a9565b809150509250925092565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b6001600160a01b0386168152606060208201526000611681606083018688611635565b8281036040840152611694818587611635565b98975050505050505050565b60005b838110156116bb5781810151838201526020016116a3565b838111156109255750506000910152565b7f416363657373436f6e74726f6c3a206163636f756e74200000000000000000008152600083516117048160178501602088016116a0565b7f206973206d697373696e6720726f6c652000000000000000000000000000000060179184019182015283516117418160288401602088016116a0565b01602801949350505050565b600081518084526117658160208601602086016116a0565b601f01601f19169290920160200192915050565b6020815260006111b2602083018461174d565b602081526001600160a01b03825116602082015260006020830151606060408401526117bb608084018261174d565b9050604084015160608401528091505092915050565b634e487b7160e01b600052601160045260246000fd5b600063ffffffff80831681811415611801576118016117d1565b6001019392505050565b600063ffffffff808716835280861660208401525060806040830152611834608083018561174d565b905060ff8316606083015295945050505050565b60006020828403121561185a57600080fd5b815167ffffffffffffffff811681146111b257600080fd5b60006020828403121561188457600080fd5b81516111b2816114a9565b60008160001904831182151516156118a9576118a96117d1565b500290565b600082198211156118c1576118c16117d1565b500190565b634e487b7160e01b600052604160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b600081611901576119016117d1565b506000190190565b60006020828403121561191b57600080fd5b815180151581146111b257600080fd5b6000825161193d8184602087016116a0565b919091019291505056fea2646970667358221220fdbb5488c128c72ba7838c18fc377f9773d6e3d2b900fc1d5548ffdbed85ce0164736f6c63430008090033", + Bin: "0x60806040526001805463ffffffff60a01b191690553480156200002157600080fd5b5060405162001bbb38038062001bbb8339810160408190526200004491620001fc565b600080546001600160a01b0319166001600160a01b038316908117909155604080516350d113fd60e11b8152905183929163a1a227fa916004808301926020929190829003018186803b1580156200009b57600080fd5b505afa158015620000b0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620000d69190620001fc565b600180546001600160a01b0319166001600160a01b039290921691909117905550620001237fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c217753362000157565b620001507fd2fb17ceaa388942529b17e0006ffc4d559f040dd4f2157b8070f17ad2110578600062000157565b506200022e565b60008281526002602090815260408083206001600160a01b038516845290915290205460ff16620001f85760008281526002602090815260408083206001600160a01b03851684529091529020805460ff19166001179055620001b73390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45b5050565b6000602082840312156200020f57600080fd5b81516001600160a01b03811681146200022757600080fd5b9392505050565b61197d806200023e6000396000f3fe60806040526004361061010e5760003560e01c80635fa7b584116100a557806393b3744211610074578063a381c8e211610059578063a381c8e21461033e578063d547741f1461035e578063e4c3ebc71461037e57600080fd5b806393b3744214610309578063a217fddf1461032957600080fd5b80635fa7b5841461024f57806375b238fc1461026f57806383bece4d146102a357806391d14854146102c357600080fd5b80632f2ff15d116100e15780632f2ff15d146101bb57806336568abe146101db578063498d82ab146101fb5780635d8729701461021b57600080fd5b806301ffc9a71461011357806316ce8149146101485780631888d7121461016a578063248a9ca31461017d575b600080fd5b34801561011f57600080fd5b5061013361012e36600461147f565b6103b2565b60405190151581526020015b60405180910390f35b34801561015457600080fd5b506101686101633660046114c1565b61041b565b005b6101686101783660046114c1565b610481565b34801561018957600080fd5b506101ad6101983660046114de565b60009081526002602052604090206001015490565b60405190815260200161013f565b3480156101c757600080fd5b506101686101d63660046114f7565b610532565b3480156101e757600080fd5b506101686101f63660046114f7565b61055d565b34801561020757600080fd5b50610168610216366004611570565b6105e5565b34801561022757600080fd5b506101ad7f9f225881f6e7ac8a885b63aa2269cbce78dd6a669864ccd2cd2517a8e709d73a81565b34801561025b57600080fd5b5061016861026a3660046114c1565b6106b3565b34801561027b57600080fd5b506101ad7fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c2177581565b3480156102af57600080fd5b506101686102be3660046115f3565b610708565b3480156102cf57600080fd5b506101336102de3660046114f7565b60009182526002602090815260408084206001600160a01b0393909316845291905290205460ff1690565b34801561031557600080fd5b506101686103243660046114c1565b61092b565b34801561033557600080fd5b506101ad600081565b34801561034a57600080fd5b506101686103593660046115f3565b610980565b34801561036a57600080fd5b506101686103793660046114f7565b610b2d565b34801561038a57600080fd5b506101ad7fd2fb17ceaa388942529b17e0006ffc4d559f040dd4f2157b8070f17ad211057881565b60006001600160e01b031982167f7965db0b00000000000000000000000000000000000000000000000000000000148061041557507f01ffc9a7000000000000000000000000000000000000000000000000000000006001600160e01b03198316145b92915050565b7fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c217756104468133610b53565b50600380547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0392909216919091179055565b600034116104d65760405162461bcd60e51b815260206004820152600f60248201527f456d707479207472616e736665722e000000000000000000000000000000000060448201526064015b60405180910390fd5b604080518082018252348082526001600160a01b03848116602093840190815284519384019290925290518116828401528251808303840181526060909201909252600354909161052e91168260005b600080610bd3565b5050565b60008281526002602052604090206001015461054e8133610b53565b6105588383610cee565b505050565b6001600160a01b03811633146105db5760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201527f20726f6c657320666f722073656c66000000000000000000000000000000000060648201526084016104cd565b61052e8282610d90565b7fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c217756106108133610b53565b61063a7f9f225881f6e7ac8a885b63aa2269cbce78dd6a669864ccd2cd2517a8e709d73a87610cee565b600063458ffd6360e01b878787878760405160240161065d95949392919061165e565b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b0319909316929092179091526003549091506106aa906001600160a01b0316826002610526565b50505050505050565b7fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c217756106de8133610b53565b61052e7f9f225881f6e7ac8a885b63aa2269cbce78dd6a669864ccd2cd2517a8e709d73a83610d90565b6003546000546001600160a01b039182169116331461078f5760405162461bcd60e51b815260206004820152603060248201527f436f6e74726163742063616c6c6572206973206e6f742074686520726567697360448201527f7465726564206d657373656e676572210000000000000000000000000000000060648201526084016104cd565b806001600160a01b03166107a1610e13565b6001600160a01b03161461081d5760405162461bcd60e51b815260206004820152603160248201527f43726f737320636861696e206d65737361676520636f6d696e672066726f6d2060448201527f696e636f72726563742073656e6465722100000000000000000000000000000060648201526084016104cd565b6001600160a01b03841660009081527f32ef73018533fa188e9e42b313c0a4048c6052342b662fb7510c0d1abcea3413602052604090205460ff161561086d57610868848484610e9f565b610925565b6001600160a01b03841660009081527f13ad2d85210d477fe1a6e25654c8250308cf29b050a4bf0b039d70467486712c602052604090205460ff16156108b7576108688383610eaa565b60405162461bcd60e51b815260206004820152602560248201527f417474656d7074696e6720746f20776974686472617720756e6b6e6f776e206160448201527f737365742e00000000000000000000000000000000000000000000000000000060648201526084016104cd565b50505050565b7fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c217756109568133610b53565b61052e7fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c2177583610cee565b600082116109d05760405162461bcd60e51b815260206004820152601a60248201527f417474656d7074696e6720656d707479207472616e736665722e00000000000060448201526064016104cd565b6001600160a01b03831660009081527f32ef73018533fa188e9e42b313c0a4048c6052342b662fb7510c0d1abcea3413602052604090205460ff16610aa35760405162461bcd60e51b815260206004820152604e60248201527f54686973206164647265737320686173206e6f74206265656e20676976656e2060448201527f61207479706520616e64206973207468757320636f6e73696465726564206e6f60648201527f742077686974656c69737465642e000000000000000000000000000000000000608482015260a4016104cd565b610aaf83333085610f4d565b604080516001600160a01b038581166024830152604482018590528381166064808401919091528351808403909101815260849092019092526020810180516001600160e01b03167f83bece4d0000000000000000000000000000000000000000000000000000000017905260035490916109259116826001610526565b600082815260026020526040902060010154610b498133610b53565b6105588383610d90565b60008281526002602090815260408083206001600160a01b038516845290915290205460ff1661052e57610b91816001600160a01b03166014610fd1565b610b9c836020610fd1565b604051602001610bad9291906116cc565b60408051601f198184030181529082905262461bcd60e51b82526104cd91600401611779565b60006040518060600160405280876001600160a01b0316815260200186815260200184815250604051602001610c09919061178c565b60408051808303601f19018152919052600180549192506001600160a01b0382169163b1454caa917401000000000000000000000000000000000000000090910463ffffffff16906014610c5c836117e7565b91906101000a81548163ffffffff021916908363ffffffff1602179055508684866040518563ffffffff1660e01b8152600401610c9c949392919061180b565b602060405180830381600087803b158015610cb657600080fd5b505af1158015610cca573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106aa9190611848565b60008281526002602090815260408083206001600160a01b038516845290915290205460ff1661052e5760008281526002602090815260408083206001600160a01b03851684529091529020805460ff19166001179055610d4c3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b60008281526002602090815260408083206001600160a01b038516845290915290205460ff161561052e5760008281526002602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b60008060009054906101000a90046001600160a01b03166001600160a01b03166363012de56040518163ffffffff1660e01b815260040160206040518083038186803b158015610e6257600080fd5b505afa158015610e76573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e9a9190611872565b905090565b6105588382846111b9565b6000816001600160a01b03168360405160006040518083038185875af1925050503d8060008114610ef7576040519150601f19603f3d011682016040523d82523d6000602084013e610efc565b606091505b50509050806105585760405162461bcd60e51b815260206004820152601460248201527f4661696c656420746f2073656e6420457468657200000000000000000000000060448201526064016104cd565b6040516001600160a01b03808516602483015283166044820152606481018290526109259085907f23b872dd00000000000000000000000000000000000000000000000000000000906084015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152611202565b60606000610fe083600261188f565b610feb9060026118ae565b67ffffffffffffffff811115611003576110036118c6565b6040519080825280601f01601f19166020018201604052801561102d576020820181803683370190505b5090507f300000000000000000000000000000000000000000000000000000000000000081600081518110611064576110646118dc565b60200101906001600160f81b031916908160001a9053507f7800000000000000000000000000000000000000000000000000000000000000816001815181106110af576110af6118dc565b60200101906001600160f81b031916908160001a90535060006110d384600261188f565b6110de9060016118ae565b90505b6001811115611163577f303132333435363738396162636465660000000000000000000000000000000085600f166010811061111f5761111f6118dc565b1a60f81b828281518110611135576111356118dc565b60200101906001600160f81b031916908160001a90535060049490941c9361115c816118f2565b90506110e1565b5083156111b25760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e7460448201526064016104cd565b9392505050565b6040516001600160a01b0383166024820152604481018290526105589084907fa9059cbb0000000000000000000000000000000000000000000000000000000090606401610f9a565b6000611257826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166112e79092919063ffffffff16565b80519091501561055857808060200190518101906112759190611909565b6105585760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f7420737563636565640000000000000000000000000000000000000000000060648201526084016104cd565b60606112f684846000856112fe565b949350505050565b6060824710156113765760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c000000000000000000000000000000000000000000000000000060648201526084016104cd565b6001600160a01b0385163b6113cd5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016104cd565b600080866001600160a01b031685876040516113e9919061192b565b60006040518083038185875af1925050503d8060008114611426576040519150601f19603f3d011682016040523d82523d6000602084013e61142b565b606091505b509150915061143b828286611446565b979650505050505050565b606083156114555750816111b2565b8251156114655782518084602001fd5b8160405162461bcd60e51b81526004016104cd9190611779565b60006020828403121561149157600080fd5b81356001600160e01b0319811681146111b257600080fd5b6001600160a01b03811681146114be57600080fd5b50565b6000602082840312156114d357600080fd5b81356111b2816114a9565b6000602082840312156114f057600080fd5b5035919050565b6000806040838503121561150a57600080fd5b82359150602083013561151c816114a9565b809150509250929050565b60008083601f84011261153957600080fd5b50813567ffffffffffffffff81111561155157600080fd5b60208301915083602082850101111561156957600080fd5b9250929050565b60008060008060006060868803121561158857600080fd5b8535611593816114a9565b9450602086013567ffffffffffffffff808211156115b057600080fd5b6115bc89838a01611527565b909650945060408801359150808211156115d557600080fd5b506115e288828901611527565b969995985093965092949392505050565b60008060006060848603121561160857600080fd5b8335611613816114a9565b925060208401359150604084013561162a816114a9565b809150509250925092565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b6001600160a01b0386168152606060208201526000611681606083018688611635565b8281036040840152611694818587611635565b98975050505050505050565b60005b838110156116bb5781810151838201526020016116a3565b838111156109255750506000910152565b7f416363657373436f6e74726f6c3a206163636f756e74200000000000000000008152600083516117048160178501602088016116a0565b7f206973206d697373696e6720726f6c652000000000000000000000000000000060179184019182015283516117418160288401602088016116a0565b01602801949350505050565b600081518084526117658160208601602086016116a0565b601f01601f19169290920160200192915050565b6020815260006111b2602083018461174d565b602081526001600160a01b03825116602082015260006020830151606060408401526117bb608084018261174d565b9050604084015160608401528091505092915050565b634e487b7160e01b600052601160045260246000fd5b600063ffffffff80831681811415611801576118016117d1565b6001019392505050565b600063ffffffff808716835280861660208401525060806040830152611834608083018561174d565b905060ff8316606083015295945050505050565b60006020828403121561185a57600080fd5b815167ffffffffffffffff811681146111b257600080fd5b60006020828403121561188457600080fd5b81516111b2816114a9565b60008160001904831182151516156118a9576118a96117d1565b500290565b600082198211156118c1576118c16117d1565b500190565b634e487b7160e01b600052604160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b600081611901576119016117d1565b506000190190565b60006020828403121561191b57600080fd5b815180151581146111b257600080fd5b6000825161193d8184602087016116a0565b919091019291505056fea2646970667358221220519ff8f34202b5c162e1f65b3da902137fc038957a2647d8b23853505847c0de64736f6c63430008090033", } // ObscuroBridgeABI is the input ABI used to generate the binding from. diff --git a/contracts/generated/WrappedERC20/WrappedERC20.go b/contracts/generated/WrappedERC20/WrappedERC20.go index 347b1c03f1..60755f57e7 100644 --- a/contracts/generated/WrappedERC20/WrappedERC20.go +++ b/contracts/generated/WrappedERC20/WrappedERC20.go @@ -32,7 +32,7 @@ var ( // 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: "0x6080604052600580546001600160a01b03191673deb34a740eca1ec42c8b8204cbec0ba34fdd27f31790553480156200003757600080fd5b50604051620019d7380380620019d78339810160408190526200005a91620002e3565b8181818181600390805190602001906200007692919062000170565b5080516200008c90600490602084019062000170565b5050505050620000c37fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c2177533620000cb60201b60201c565b50506200038a565b60008281526007602090815260408083206001600160a01b038516845290915290205460ff166200016c5760008281526007602090815260408083206001600160a01b03851684529091529020805460ff191660011790556200012b3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45b5050565b8280546200017e906200034d565b90600052602060002090601f016020900481019282620001a25760008555620001ed565b82601f10620001bd57805160ff1916838001178555620001ed565b82800160010185558215620001ed579182015b82811115620001ed578251825591602001919060010190620001d0565b50620001fb929150620001ff565b5090565b5b80821115620001fb576000815560010162000200565b634e487b7160e01b600052604160045260246000fd5b600082601f8301126200023e57600080fd5b81516001600160401b03808211156200025b576200025b62000216565b604051601f8301601f19908116603f0116810190828211818310171562000286576200028662000216565b81604052838152602092508683858801011115620002a357600080fd5b600091505b83821015620002c75785820183015181830184015290820190620002a8565b83821115620002d95760008385830101525b9695505050505050565b60008060408385031215620002f757600080fd5b82516001600160401b03808211156200030f57600080fd5b6200031d868387016200022c565b935060208501519150808211156200033457600080fd5b5062000343858286016200022c565b9150509250929050565b600181811c908216806200036257607f821691505b602082108114156200038457634e487b7160e01b600052602260045260246000fd5b50919050565b61163d806200039a6000396000f3fe608060405234801561001057600080fd5b50600436106101775760003560e01c806339509351116100d8578063979005ad1161008c578063a9059cbb11610066578063a9059cbb1461031a578063d547741f1461032d578063dd62ed3e1461034057600080fd5b8063979005ad146102ec578063a217fddf146102ff578063a457c2d71461030757600080fd5b806375b238fc116100bd57806375b238fc1461028457806391d14854146102ab57806395d89b41146102e457600080fd5b8063395093511461025e57806370a082311461027157600080fd5b806323b872dd1161012f5780632f2ff15d116101145780632f2ff15d14610229578063313ce5671461023c57806336568abe1461024b57600080fd5b806323b872dd146101f3578063248a9ca31461020657600080fd5b8063095ea7b311610160578063095ea7b3146101b957806318160ddd146101cc5780631dd319cb146101de57600080fd5b806301ffc9a71461017c57806306fdde03146101a4575b600080fd5b61018f61018a3660046112f7565b610353565b60405190151581526020015b60405180910390f35b6101ac6103ec565b60405161019b9190611365565b61018f6101c73660046113b4565b61047e565b6002545b60405190815260200161019b565b6101f16101ec3660046113b4565b610496565b005b61018f6102013660046113de565b61052d565b6101d061021436600461141a565b60009081526007602052604090206001015490565b6101f1610237366004611433565b610551565b6040516012815260200161019b565b6101f1610259366004611433565b610577565b61018f61026c3660046113b4565b610603565b6101d061027f36600461145f565b610642565b6101d07fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c2177581565b61018f6102b9366004611433565b60009182526007602090815260408084206001600160a01b0393909316845291905290205460ff1690565b6101ac6106ea565b6101f16102fa3660046113b4565b6106f9565b6101d0600081565b61018f6103153660046113b4565b61072e565b61018f6103283660046113b4565b6107d8565b6101f161033b366004611433565b6107e6565b6101d061034e36600461147a565b61080c565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f7965db0b0000000000000000000000000000000000000000000000000000000014806103e657507f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316145b92915050565b6060600380546103fb906114a4565b80601f0160208091040260200160405190810160405280929190818152602001828054610427906114a4565b80156104745780601f1061044957610100808354040283529160200191610474565b820191906000526020600020905b81548152906001019060200180831161045757829003601f168201915b5050505050905090565b60003361048c81858561091d565b5060019392505050565b7fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c217756104c18133610a75565b816104cb84610642565b101561051e5760405162461bcd60e51b815260206004820152601560248201527f496e73756666696369656e742062616c616e63652e000000000000000000000060448201526064015b60405180910390fd5b6105288383610af5565b505050565b60003361053b858285610c7a565b610546858585610cf4565b506001949350505050565b60008281526007602052604090206001015461056d8133610a75565b6105288383610f0b565b6001600160a01b03811633146105f55760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201527f20726f6c657320666f722073656c6600000000000000000000000000000000006064820152608401610515565b6105ff8282610fad565b5050565b3360008181526001602090815260408083206001600160a01b038716845290915281205490919061048c908290869061063d9087906114f5565b61091d565b6000326001600160a01b0383161415610673576001600160a01b0382166000908152602081905260409020546103e6565b336001600160a01b03831614156106a2576001600160a01b0382166000908152602081905260409020546103e6565b60405162461bcd60e51b815260206004820152601f60248201527f4e6f7420616c6c6f77656420746f2072656164207468652062616c616e6365006044820152606401610515565b6060600480546103fb906114a4565b7fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c217756107248133610a75565b6105288383611030565b3360008181526001602090815260408083206001600160a01b0387168452909152812054909190838110156107cb5760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f7760448201527f207a65726f0000000000000000000000000000000000000000000000000000006064820152608401610515565b610546828686840361091d565b60003361048c818585610cf4565b6000828152600760205260409020600101546108028133610a75565b6105288383610fad565b6000326001600160a01b038416148061082d5750326001600160a01b038316145b15610860576001600160a01b038084166000908152600160209081526040808320938616835292905220545b90506103e6565b336001600160a01b038416148061087f5750336001600160a01b038316145b156108af576001600160a01b03808416600090815260016020908152604080832093861683529290522054610859565b60405162461bcd60e51b815260206004820152602160248201527f4e6f7420616c6c6f77656420746f20726561642074686520616c6c6f77616e6360448201527f65000000000000000000000000000000000000000000000000000000000000006064820152608401610515565b6001600160a01b0383166109985760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460448201527f72657373000000000000000000000000000000000000000000000000000000006064820152608401610515565b6001600160a01b038216610a145760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f20616464726560448201527f73730000000000000000000000000000000000000000000000000000000000006064820152608401610515565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b60008281526007602090815260408083206001600160a01b038516845290915290205460ff166105ff57610ab3816001600160a01b0316601461110f565b610abe83602061110f565b604051602001610acf92919061150d565b60408051601f198184030181529082905262461bcd60e51b825261051591600401611365565b6001600160a01b038216610b715760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f2061646472657360448201527f73000000000000000000000000000000000000000000000000000000000000006064820152608401610515565b6001600160a01b03821660009081526020819052604090205481811015610c005760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e60448201527f63650000000000000000000000000000000000000000000000000000000000006064820152608401610515565b6001600160a01b0383166000908152602081905260408120838303905560028054849290610c2f90849061158e565b90915550506040518281526000906001600160a01b038516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a3505050565b6000610c86848461080c565b90506000198114610cee5781811015610ce15760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e63650000006044820152606401610515565b610cee848484840361091d565b50505050565b6001600160a01b038316610d705760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f20616460448201527f64726573730000000000000000000000000000000000000000000000000000006064820152608401610515565b6001600160a01b038216610dec5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201527f65737300000000000000000000000000000000000000000000000000000000006064820152608401610515565b6001600160a01b03831660009081526020819052604090205481811015610e7b5760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e742065786365656473206260448201527f616c616e636500000000000000000000000000000000000000000000000000006064820152608401610515565b6001600160a01b03808516600090815260208190526040808220858503905591851681529081208054849290610eb29084906114f5565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef84604051610efe91815260200190565b60405180910390a3610cee565b60008281526007602090815260408083206001600160a01b038516845290915290205460ff166105ff5760008281526007602090815260408083206001600160a01b03851684529091529020805460ff19166001179055610f693390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b60008281526007602090815260408083206001600160a01b038516845290915290205460ff16156105ff5760008281526007602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b6001600160a01b0382166110865760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152606401610515565b806002600082825461109891906114f5565b90915550506001600160a01b038216600090815260208190526040812080548392906110c59084906114f5565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b6060600061111e8360026115a5565b6111299060026114f5565b67ffffffffffffffff811115611141576111416115c4565b6040519080825280601f01601f19166020018201604052801561116b576020820181803683370190505b5090507f3000000000000000000000000000000000000000000000000000000000000000816000815181106111a2576111a26115da565b60200101906001600160f81b031916908160001a9053507f7800000000000000000000000000000000000000000000000000000000000000816001815181106111ed576111ed6115da565b60200101906001600160f81b031916908160001a90535060006112118460026115a5565b61121c9060016114f5565b90505b60018111156112a1577f303132333435363738396162636465660000000000000000000000000000000085600f166010811061125d5761125d6115da565b1a60f81b828281518110611273576112736115da565b60200101906001600160f81b031916908160001a90535060049490941c9361129a816115f0565b905061121f565b5083156112f05760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610515565b9392505050565b60006020828403121561130957600080fd5b81357fffffffff00000000000000000000000000000000000000000000000000000000811681146112f057600080fd5b60005b8381101561135457818101518382015260200161133c565b83811115610cee5750506000910152565b6020815260008251806020840152611384816040850160208701611339565b601f01601f19169190910160400192915050565b80356001600160a01b03811681146113af57600080fd5b919050565b600080604083850312156113c757600080fd5b6113d083611398565b946020939093013593505050565b6000806000606084860312156113f357600080fd5b6113fc84611398565b925061140a60208501611398565b9150604084013590509250925092565b60006020828403121561142c57600080fd5b5035919050565b6000806040838503121561144657600080fd5b8235915061145660208401611398565b90509250929050565b60006020828403121561147157600080fd5b6112f082611398565b6000806040838503121561148d57600080fd5b61149683611398565b915061145660208401611398565b600181811c908216806114b857607f821691505b602082108114156114d957634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b60008219821115611508576115086114df565b500190565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260008351611545816017850160208801611339565b7f206973206d697373696e6720726f6c65200000000000000000000000000000006017918401918201528351611582816028840160208801611339565b01602801949350505050565b6000828210156115a0576115a06114df565b500390565b60008160001904831182151516156115bf576115bf6114df565b500290565b634e487b7160e01b600052604160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b6000816115ff576115ff6114df565b50600019019056fea26469706673582212203d4cd3ed17d72b2f94aa2bf3da11f2d447bbf1eab55024ccf72a1f938cbe214064736f6c63430008090033", + Bin: "0x6080604052600580546001600160a01b03191673deb34a740eca1ec42c8b8204cbec0ba34fdd27f31790553480156200003757600080fd5b50604051620019d7380380620019d78339810160408190526200005a91620002e3565b8181818181600390805190602001906200007692919062000170565b5080516200008c90600490602084019062000170565b5050505050620000c37fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c2177533620000cb60201b60201c565b50506200038a565b60008281526007602090815260408083206001600160a01b038516845290915290205460ff166200016c5760008281526007602090815260408083206001600160a01b03851684529091529020805460ff191660011790556200012b3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45b5050565b8280546200017e906200034d565b90600052602060002090601f016020900481019282620001a25760008555620001ed565b82601f10620001bd57805160ff1916838001178555620001ed565b82800160010185558215620001ed579182015b82811115620001ed578251825591602001919060010190620001d0565b50620001fb929150620001ff565b5090565b5b80821115620001fb576000815560010162000200565b634e487b7160e01b600052604160045260246000fd5b600082601f8301126200023e57600080fd5b81516001600160401b03808211156200025b576200025b62000216565b604051601f8301601f19908116603f0116810190828211818310171562000286576200028662000216565b81604052838152602092508683858801011115620002a357600080fd5b600091505b83821015620002c75785820183015181830184015290820190620002a8565b83821115620002d95760008385830101525b9695505050505050565b60008060408385031215620002f757600080fd5b82516001600160401b03808211156200030f57600080fd5b6200031d868387016200022c565b935060208501519150808211156200033457600080fd5b5062000343858286016200022c565b9150509250929050565b600181811c908216806200036257607f821691505b602082108114156200038457634e487b7160e01b600052602260045260246000fd5b50919050565b61163d806200039a6000396000f3fe608060405234801561001057600080fd5b50600436106101775760003560e01c806339509351116100d8578063979005ad1161008c578063a9059cbb11610066578063a9059cbb1461031a578063d547741f1461032d578063dd62ed3e1461034057600080fd5b8063979005ad146102ec578063a217fddf146102ff578063a457c2d71461030757600080fd5b806375b238fc116100bd57806375b238fc1461028457806391d14854146102ab57806395d89b41146102e457600080fd5b8063395093511461025e57806370a082311461027157600080fd5b806323b872dd1161012f5780632f2ff15d116101145780632f2ff15d14610229578063313ce5671461023c57806336568abe1461024b57600080fd5b806323b872dd146101f3578063248a9ca31461020657600080fd5b8063095ea7b311610160578063095ea7b3146101b957806318160ddd146101cc5780631dd319cb146101de57600080fd5b806301ffc9a71461017c57806306fdde03146101a4575b600080fd5b61018f61018a3660046112f7565b610353565b60405190151581526020015b60405180910390f35b6101ac6103ec565b60405161019b9190611365565b61018f6101c73660046113b4565b61047e565b6002545b60405190815260200161019b565b6101f16101ec3660046113b4565b610496565b005b61018f6102013660046113de565b61052d565b6101d061021436600461141a565b60009081526007602052604090206001015490565b6101f1610237366004611433565b610551565b6040516012815260200161019b565b6101f1610259366004611433565b610577565b61018f61026c3660046113b4565b610603565b6101d061027f36600461145f565b610642565b6101d07fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c2177581565b61018f6102b9366004611433565b60009182526007602090815260408084206001600160a01b0393909316845291905290205460ff1690565b6101ac6106ea565b6101f16102fa3660046113b4565b6106f9565b6101d0600081565b61018f6103153660046113b4565b61072e565b61018f6103283660046113b4565b6107d8565b6101f161033b366004611433565b6107e6565b6101d061034e36600461147a565b61080c565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f7965db0b0000000000000000000000000000000000000000000000000000000014806103e657507f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316145b92915050565b6060600380546103fb906114a4565b80601f0160208091040260200160405190810160405280929190818152602001828054610427906114a4565b80156104745780601f1061044957610100808354040283529160200191610474565b820191906000526020600020905b81548152906001019060200180831161045757829003601f168201915b5050505050905090565b60003361048c81858561091d565b5060019392505050565b7fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c217756104c18133610a75565b816104cb84610642565b101561051e5760405162461bcd60e51b815260206004820152601560248201527f496e73756666696369656e742062616c616e63652e000000000000000000000060448201526064015b60405180910390fd5b6105288383610af5565b505050565b60003361053b858285610c7a565b610546858585610cf4565b506001949350505050565b60008281526007602052604090206001015461056d8133610a75565b6105288383610f0b565b6001600160a01b03811633146105f55760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201527f20726f6c657320666f722073656c6600000000000000000000000000000000006064820152608401610515565b6105ff8282610fad565b5050565b3360008181526001602090815260408083206001600160a01b038716845290915281205490919061048c908290869061063d9087906114f5565b61091d565b6000326001600160a01b0383161415610673576001600160a01b0382166000908152602081905260409020546103e6565b336001600160a01b03831614156106a2576001600160a01b0382166000908152602081905260409020546103e6565b60405162461bcd60e51b815260206004820152601f60248201527f4e6f7420616c6c6f77656420746f2072656164207468652062616c616e6365006044820152606401610515565b6060600480546103fb906114a4565b7fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c217756107248133610a75565b6105288383611030565b3360008181526001602090815260408083206001600160a01b0387168452909152812054909190838110156107cb5760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f7760448201527f207a65726f0000000000000000000000000000000000000000000000000000006064820152608401610515565b610546828686840361091d565b60003361048c818585610cf4565b6000828152600760205260409020600101546108028133610a75565b6105288383610fad565b6000326001600160a01b038416148061082d5750326001600160a01b038316145b15610860576001600160a01b038084166000908152600160209081526040808320938616835292905220545b90506103e6565b336001600160a01b038416148061087f5750336001600160a01b038316145b156108af576001600160a01b03808416600090815260016020908152604080832093861683529290522054610859565b60405162461bcd60e51b815260206004820152602160248201527f4e6f7420616c6c6f77656420746f20726561642074686520616c6c6f77616e6360448201527f65000000000000000000000000000000000000000000000000000000000000006064820152608401610515565b6001600160a01b0383166109985760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460448201527f72657373000000000000000000000000000000000000000000000000000000006064820152608401610515565b6001600160a01b038216610a145760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f20616464726560448201527f73730000000000000000000000000000000000000000000000000000000000006064820152608401610515565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b60008281526007602090815260408083206001600160a01b038516845290915290205460ff166105ff57610ab3816001600160a01b0316601461110f565b610abe83602061110f565b604051602001610acf92919061150d565b60408051601f198184030181529082905262461bcd60e51b825261051591600401611365565b6001600160a01b038216610b715760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f2061646472657360448201527f73000000000000000000000000000000000000000000000000000000000000006064820152608401610515565b6001600160a01b03821660009081526020819052604090205481811015610c005760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e60448201527f63650000000000000000000000000000000000000000000000000000000000006064820152608401610515565b6001600160a01b0383166000908152602081905260408120838303905560028054849290610c2f90849061158e565b90915550506040518281526000906001600160a01b038516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a3505050565b6000610c86848461080c565b90506000198114610cee5781811015610ce15760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e63650000006044820152606401610515565b610cee848484840361091d565b50505050565b6001600160a01b038316610d705760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f20616460448201527f64726573730000000000000000000000000000000000000000000000000000006064820152608401610515565b6001600160a01b038216610dec5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201527f65737300000000000000000000000000000000000000000000000000000000006064820152608401610515565b6001600160a01b03831660009081526020819052604090205481811015610e7b5760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e742065786365656473206260448201527f616c616e636500000000000000000000000000000000000000000000000000006064820152608401610515565b6001600160a01b03808516600090815260208190526040808220858503905591851681529081208054849290610eb29084906114f5565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef84604051610efe91815260200190565b60405180910390a3610cee565b60008281526007602090815260408083206001600160a01b038516845290915290205460ff166105ff5760008281526007602090815260408083206001600160a01b03851684529091529020805460ff19166001179055610f693390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b60008281526007602090815260408083206001600160a01b038516845290915290205460ff16156105ff5760008281526007602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b6001600160a01b0382166110865760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152606401610515565b806002600082825461109891906114f5565b90915550506001600160a01b038216600090815260208190526040812080548392906110c59084906114f5565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b6060600061111e8360026115a5565b6111299060026114f5565b67ffffffffffffffff811115611141576111416115c4565b6040519080825280601f01601f19166020018201604052801561116b576020820181803683370190505b5090507f3000000000000000000000000000000000000000000000000000000000000000816000815181106111a2576111a26115da565b60200101906001600160f81b031916908160001a9053507f7800000000000000000000000000000000000000000000000000000000000000816001815181106111ed576111ed6115da565b60200101906001600160f81b031916908160001a90535060006112118460026115a5565b61121c9060016114f5565b90505b60018111156112a1577f303132333435363738396162636465660000000000000000000000000000000085600f166010811061125d5761125d6115da565b1a60f81b828281518110611273576112736115da565b60200101906001600160f81b031916908160001a90535060049490941c9361129a816115f0565b905061121f565b5083156112f05760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610515565b9392505050565b60006020828403121561130957600080fd5b81357fffffffff00000000000000000000000000000000000000000000000000000000811681146112f057600080fd5b60005b8381101561135457818101518382015260200161133c565b83811115610cee5750506000910152565b6020815260008251806020840152611384816040850160208701611339565b601f01601f19169190910160400192915050565b80356001600160a01b03811681146113af57600080fd5b919050565b600080604083850312156113c757600080fd5b6113d083611398565b946020939093013593505050565b6000806000606084860312156113f357600080fd5b6113fc84611398565b925061140a60208501611398565b9150604084013590509250925092565b60006020828403121561142c57600080fd5b5035919050565b6000806040838503121561144657600080fd5b8235915061145660208401611398565b90509250929050565b60006020828403121561147157600080fd5b6112f082611398565b6000806040838503121561148d57600080fd5b61149683611398565b915061145660208401611398565b600181811c908216806114b857607f821691505b602082108114156114d957634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b60008219821115611508576115086114df565b500190565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260008351611545816017850160208801611339565b7f206973206d697373696e6720726f6c65200000000000000000000000000000006017918401918201528351611582816028840160208801611339565b01602801949350505050565b6000828210156115a0576115a06114df565b500390565b60008160001904831182151516156115bf576115bf6114df565b500290565b634e487b7160e01b600052604160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b6000816115ff576115ff6114df565b50600019019056fea264697066735822122051d4d151f1e4f06c4f1a712938b6e043da4348eaab5479425f2ff11cd6f5c67c64736f6c63430008090033", } // WrappedERC20ABI is the input ABI used to generate the binding from. diff --git a/contracts/src/messaging/IMessageBus.sol b/contracts/src/messaging/IMessageBus.sol index 8d7fb20f8c..1e36701bdb 100644 --- a/contracts/src/messaging/IMessageBus.sol +++ b/contracts/src/messaging/IMessageBus.sol @@ -20,6 +20,13 @@ interface IMessageBus { uint8 consistencyLevel ); + event ValueTransfer + ( + address sender, + address receiver, + uint256 amount + ); + // This method is called from contracts to publish messages to the other linked message bus. // nonce - This is provided and serves as deduplication nonce. It can also be used to group a batch of messages together. // topic - This is the topic for which the payload is published. @@ -35,6 +42,11 @@ interface IMessageBus { uint8 consistencyLevel ) external returns (uint64 sequence); + function sendValue( + address receiver, + uint256 amount + ) external payable; + // This function verifies that a cross chain message provided by the caller has indeed been submitted from the other network // and returns true only if the challenge period for the message has passed. function verifyMessageFinalized(Structs.CrossChainMessage calldata crossChainMessage) external view returns (bool); diff --git a/contracts/src/messaging/MessageBus.sol b/contracts/src/messaging/MessageBus.sol index a70ad00264..0f6d49bd92 100644 --- a/contracts/src/messaging/MessageBus.sol +++ b/contracts/src/messaging/MessageBus.sol @@ -30,6 +30,14 @@ contract MessageBus is IMessageBus, Ownable { addressSequences[sender] += 1; } + function sendValue( + address receiver, + uint256 amount + ) external payable { + require(msg.value > 0 && msg.value == amount, "Attempting to send value without providing Ether"); + emit ValueTransfer(msg.sender, receiver, msg.value); + } + // This method is called from contracts to publish messages to the other linked message bus. // nonce - This is provided and serves as deduplication nonce. It can also be used to group a batch of messages together. // topic - This is the topic for which the payload is published. diff --git a/go/common/types.go b/go/common/types.go index defb16e724..2e8cc9c644 100644 --- a/go/common/types.go +++ b/go/common/types.go @@ -45,7 +45,7 @@ type ( L2Receipt = types.Receipt L2Receipts = types.Receipts - CrossChainMessage MessageBus.StructsCrossChainMessage + CrossChainMessage = MessageBus.StructsCrossChainMessage CrossChainMessages = []CrossChainMessage EncryptedTx []byte // A single transaction, encoded as a JSON list of transaction binary hexes and encrypted using the enclave's public key EncryptedTransactions []byte // A blob of encrypted transactions, as they're stored in the rollup, with the nonce prepended. diff --git a/go/enclave/components/batch_producer.go b/go/enclave/components/batch_producer.go index 5bd1f6bbfa..a6946e5b21 100644 --- a/go/enclave/components/batch_producer.go +++ b/go/enclave/components/batch_producer.go @@ -90,6 +90,12 @@ func (bp *batchProducerImpl) ComputeBatch(context *BatchExecutionContext) (*Comp if context.SequencerNo.Int64() > 1 { messages = bp.crossChainProcessors.Local.RetrieveInboundMessages(parentBlock, block, stateDB) } + for _, message := range messages { + if message.Sender == gethcommon.BigToAddress(gethcommon.Big0) { + + } + } + crossChainTransactions := bp.crossChainProcessors.Local.CreateSyntheticTransactions(messages, stateDB) successfulTxs, txReceipts, err := bp.processTransactions(batch, 0, context.Transactions, stateDB, context.ChainConfig) diff --git a/go/enclave/crosschain/block_message_extractor.go b/go/enclave/crosschain/block_message_extractor.go index 7fd909d188..a2f72628c3 100644 --- a/go/enclave/crosschain/block_message_extractor.go +++ b/go/enclave/crosschain/block_message_extractor.go @@ -13,10 +13,9 @@ import ( ) type blockMessageExtractor struct { - busAddress *common.L1Address - l2MessageBus *common.L2Address // todo (@stefan) - remove this - storage storage.Storage - logger gethlog.Logger + busAddress *common.L1Address + storage storage.Storage + logger gethlog.Logger } func NewBlockMessageExtractor( @@ -26,13 +25,16 @@ func NewBlockMessageExtractor( logger gethlog.Logger, ) BlockMessageExtractor { return &blockMessageExtractor{ - busAddress: busAddress, - l2MessageBus: l2BusAddress, - storage: storage, - logger: logger.New(log.CmpKey, log.CrossChainCmp), + busAddress: busAddress, + storage: storage, + logger: logger.New(log.CmpKey, log.CrossChainCmp), } } +func (m *blockMessageExtractor) IsAutoRelayedMessage(message common.CrossChainMessage) bool { + return false +} + func (m *blockMessageExtractor) Enabled() bool { return m.GetBusAddress().Hash().Big().Cmp(gethcommon.Big0) != 0 } diff --git a/go/enclave/crosschain/interfaces.go b/go/enclave/crosschain/interfaces.go index c3b0c6ee18..4e4681011c 100644 --- a/go/enclave/crosschain/interfaces.go +++ b/go/enclave/crosschain/interfaces.go @@ -22,6 +22,10 @@ type BlockMessageExtractor interface { // Enabled - Returns true if there is a configured message bus, otherwise it is considered disabled Enabled() bool + + // IsAutoRelayedMessage - Returns if the message has been authorized for automatic relaying. This is mainly for + // gas mechanics deposits. + IsAutoRelayedMessage(message common.CrossChainMessage) bool } type Manager interface { From 69aa549d392ecd10dfd8b058296811736c88233c Mon Sep 17 00:00:00 2001 From: StefanIliev545 Date: Mon, 14 Aug 2023 15:18:47 +0200 Subject: [PATCH 03/47] some stuff. --- .../CrossChainMessenger.go | 2 +- .../EthereumBridge/EthereumBridge.go | 2 +- .../ManagementContract/ManagementContract.go | 2 +- contracts/generated/MessageBus/MessageBus.go | 52 +++++++++---------- contracts/generated/ObsERC20/ObsERC20.go | 2 +- .../generated/ObscuroBridge/ObscuroBridge.go | 2 +- .../generated/WrappedERC20/WrappedERC20.go | 2 +- contracts/src/messaging/IMessageBus.sol | 7 ++- contracts/src/messaging/MessageBus.sol | 10 +++- go/common/types.go | 2 + .../crosschain/block_message_extractor.go | 51 +++++++++++++++++- go/enclave/crosschain/common.go | 25 +++++++-- go/enclave/crosschain/message_bus_manager.go | 6 +++ go/enclave/storage/enclavedb/block.go | 12 ++--- go/enclave/storage/init/sqlite/001_init.sql | 3 +- go/enclave/storage/interfaces.go | 3 ++ go/enclave/storage/storage.go | 16 +++++- 17 files changed, 151 insertions(+), 48 deletions(-) diff --git a/contracts/generated/CrossChainMessenger/CrossChainMessenger.go b/contracts/generated/CrossChainMessenger/CrossChainMessenger.go index 1494d6dfb5..0af3876ecd 100644 --- a/contracts/generated/CrossChainMessenger/CrossChainMessenger.go +++ b/contracts/generated/CrossChainMessenger/CrossChainMessenger.go @@ -42,7 +42,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: "0x6080604052600180546001600160a01b031916905534801561002057600080fd5b506040516109ad3803806109ad83398101604081905261003f91610064565b600080546001600160a01b0319166001600160a01b0392909216919091179055610094565b60006020828403121561007657600080fd5b81516001600160a01b038116811461008d57600080fd5b9392505050565b61090a806100a36000396000f3fe608060405234801561001057600080fd5b506004361061004c5760003560e01c80635b76f28b1461005157806363012de51461007a5780639b7cf1ee146100a5578063a1a227fa146100ba575b600080fd5b61006461005f366004610425565b6100cb565b6040516100719190610504565b60405180910390f35b60015461008d906001600160a01b031681565b6040516001600160a01b039091168152602001610071565b6100b86100b336600461051e565b61014b565b005b6000546001600160a01b031661008d565b60606040518060600160405280856001600160a01b0316815260200184848080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920182905250938552505050602091820152604051610133929101610559565b60405160208183030381529060405290509392505050565b6101548161027d565b610161602082018261059e565b6001805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0392909216919091179055600061019d60808301836105b9565b8101906101aa9190610690565b905060008082600001516001600160a01b03165a84602001516040516101d09190610764565b60006040518083038160008787f1925050503d806000811461020e576040519150601f19603f3d011682016040523d82523d6000602084013e610213565b606091505b50915091508161025a57806040517fa5fa8d2b0000000000000000000000000000000000000000000000000000000081526004016102519190610504565b60405180910390fd5b50506001805473ffffffffffffffffffffffffffffffffffffffff191690555050565b6000546040517f33a88c720000000000000000000000000000000000000000000000000000000081526001600160a01b03909116906333a88c72906102c69084906004016107ce565b60206040518083038186803b1580156102de57600080fd5b505afa1580156102f2573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061031691906108b2565b6103625760405162461bcd60e51b815260206004820152601f60248201527f4d657373616765206e6f7420666f756e64206f722066696e616c697a65642e006044820152606401610251565b60008160405160200161037591906107ce565b60408051601f1981840301815291815281516020928301206000818152600290935291205490915060ff16156103ed5760405162461bcd60e51b815260206004820152601960248201527f4d65737361676520616c726561647920636f6e73756d65642e000000000000006044820152606401610251565b6000908152600260205260409020805460ff1916600117905550565b80356001600160a01b038116811461042057600080fd5b919050565b60008060006040848603121561043a57600080fd5b61044384610409565b9250602084013567ffffffffffffffff8082111561046057600080fd5b818601915086601f83011261047457600080fd5b81358181111561048357600080fd5b87602082850101111561049557600080fd5b6020830194508093505050509250925092565b60005b838110156104c35781810151838201526020016104ab565b838111156104d2576000848401525b50505050565b600081518084526104f08160208601602086016104a8565b601f01601f19169290920160200192915050565b60208152600061051760208301846104d8565b9392505050565b60006020828403121561053057600080fd5b813567ffffffffffffffff81111561054757600080fd5b820160c0818503121561051757600080fd5b602081526001600160a01b038251166020820152600060208301516060604084015261058860808401826104d8565b9050604084015160608401528091505092915050565b6000602082840312156105b057600080fd5b61051782610409565b6000808335601e198436030181126105d057600080fd5b83018035915067ffffffffffffffff8211156105eb57600080fd5b60200191503681900382131561060057600080fd5b9250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6040516060810167ffffffffffffffff8111828210171561065957610659610607565b60405290565b604051601f8201601f1916810167ffffffffffffffff8111828210171561068857610688610607565b604052919050565b600060208083850312156106a357600080fd5b823567ffffffffffffffff808211156106bb57600080fd5b90840190606082870312156106cf57600080fd5b6106d7610636565b6106e083610409565b815283830135828111156106f357600080fd5b8301601f8101881361070457600080fd5b80358381111561071657610716610607565b610728601f8201601f1916870161065f565b9350808452888682840101111561073e57600080fd5b808683018786013760009084018601525092830152604090810135908201529392505050565b600082516107768184602087016104a8565b9190910192915050565b803563ffffffff8116811461042057600080fd5b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b803560ff8116811461042057600080fd5b602081526001600160a01b036107e383610409565b1660208201526000602083013567ffffffffffffffff80821680831461080857600080fd5b8060408601525061081b60408601610780565b915063ffffffff80831660608601528061083760608801610780565b1660808601525060808501359150601e1985360301821261085757600080fd5b9084019081358181111561086a57600080fd5b80360386131561087957600080fd5b60c060a086015261089160e086018260208601610794565b925050506108a160a085016107bd565b60ff811660c0850152509392505050565b6000602082840312156108c457600080fd5b8151801515811461051757600080fdfea2646970667358221220c9ab79b00191cbe70b9ec39f79657b9568562f2bedac8e782c7b13c3110a58a564736f6c63430008090033", + Bin: "0x6080604052600180546001600160a01b031916905534801561002057600080fd5b506040516109ad3803806109ad83398101604081905261003f91610064565b600080546001600160a01b0319166001600160a01b0392909216919091179055610094565b60006020828403121561007657600080fd5b81516001600160a01b038116811461008d57600080fd5b9392505050565b61090a806100a36000396000f3fe608060405234801561001057600080fd5b506004361061004c5760003560e01c80635b76f28b1461005157806363012de51461007a5780639b7cf1ee146100a5578063a1a227fa146100ba575b600080fd5b61006461005f366004610425565b6100cb565b6040516100719190610504565b60405180910390f35b60015461008d906001600160a01b031681565b6040516001600160a01b039091168152602001610071565b6100b86100b336600461051e565b61014b565b005b6000546001600160a01b031661008d565b60606040518060600160405280856001600160a01b0316815260200184848080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920182905250938552505050602091820152604051610133929101610559565b60405160208183030381529060405290509392505050565b6101548161027d565b610161602082018261059e565b6001805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0392909216919091179055600061019d60808301836105b9565b8101906101aa9190610690565b905060008082600001516001600160a01b03165a84602001516040516101d09190610764565b60006040518083038160008787f1925050503d806000811461020e576040519150601f19603f3d011682016040523d82523d6000602084013e610213565b606091505b50915091508161025a57806040517fa5fa8d2b0000000000000000000000000000000000000000000000000000000081526004016102519190610504565b60405180910390fd5b50506001805473ffffffffffffffffffffffffffffffffffffffff191690555050565b6000546040517f33a88c720000000000000000000000000000000000000000000000000000000081526001600160a01b03909116906333a88c72906102c69084906004016107ce565b60206040518083038186803b1580156102de57600080fd5b505afa1580156102f2573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061031691906108b2565b6103625760405162461bcd60e51b815260206004820152601f60248201527f4d657373616765206e6f7420666f756e64206f722066696e616c697a65642e006044820152606401610251565b60008160405160200161037591906107ce565b60408051601f1981840301815291815281516020928301206000818152600290935291205490915060ff16156103ed5760405162461bcd60e51b815260206004820152601960248201527f4d65737361676520616c726561647920636f6e73756d65642e000000000000006044820152606401610251565b6000908152600260205260409020805460ff1916600117905550565b80356001600160a01b038116811461042057600080fd5b919050565b60008060006040848603121561043a57600080fd5b61044384610409565b9250602084013567ffffffffffffffff8082111561046057600080fd5b818601915086601f83011261047457600080fd5b81358181111561048357600080fd5b87602082850101111561049557600080fd5b6020830194508093505050509250925092565b60005b838110156104c35781810151838201526020016104ab565b838111156104d2576000848401525b50505050565b600081518084526104f08160208601602086016104a8565b601f01601f19169290920160200192915050565b60208152600061051760208301846104d8565b9392505050565b60006020828403121561053057600080fd5b813567ffffffffffffffff81111561054757600080fd5b820160c0818503121561051757600080fd5b602081526001600160a01b038251166020820152600060208301516060604084015261058860808401826104d8565b9050604084015160608401528091505092915050565b6000602082840312156105b057600080fd5b61051782610409565b6000808335601e198436030181126105d057600080fd5b83018035915067ffffffffffffffff8211156105eb57600080fd5b60200191503681900382131561060057600080fd5b9250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6040516060810167ffffffffffffffff8111828210171561065957610659610607565b60405290565b604051601f8201601f1916810167ffffffffffffffff8111828210171561068857610688610607565b604052919050565b600060208083850312156106a357600080fd5b823567ffffffffffffffff808211156106bb57600080fd5b90840190606082870312156106cf57600080fd5b6106d7610636565b6106e083610409565b815283830135828111156106f357600080fd5b8301601f8101881361070457600080fd5b80358381111561071657610716610607565b610728601f8201601f1916870161065f565b9350808452888682840101111561073e57600080fd5b808683018786013760009084018601525092830152604090810135908201529392505050565b600082516107768184602087016104a8565b9190910192915050565b803563ffffffff8116811461042057600080fd5b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b803560ff8116811461042057600080fd5b602081526001600160a01b036107e383610409565b1660208201526000602083013567ffffffffffffffff80821680831461080857600080fd5b8060408601525061081b60408601610780565b915063ffffffff80831660608601528061083760608801610780565b1660808601525060808501359150601e1985360301821261085757600080fd5b9084019081358181111561086a57600080fd5b80360386131561087957600080fd5b60c060a086015261089160e086018260208601610794565b925050506108a160a085016107bd565b60ff811660c0850152509392505050565b6000602082840312156108c457600080fd5b8151801515811461051757600080fdfea26469706673582212200acc607690386a002676eb2cb59eb38fb8dded8b683c5c2b9237a9f2c7ae948b64736f6c63430008090033", } // CrossChainMessengerABI is the input ABI used to generate the binding from. diff --git a/contracts/generated/EthereumBridge/EthereumBridge.go b/contracts/generated/EthereumBridge/EthereumBridge.go index de066bcee3..4bfca4b222 100644 --- a/contracts/generated/EthereumBridge/EthereumBridge.go +++ b/contracts/generated/EthereumBridge/EthereumBridge.go @@ -32,7 +32,7 @@ var ( // 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: "0x60806040526001805463ffffffff60a01b191690553480156200002157600080fd5b5060405162002b4e38038062002b4e83398101604081905262000044916200012c565b600080546001600160a01b0319166001600160a01b038416908117909155604080516350d113fd60e11b8152905184929163a1a227fa916004808301926020929190829003018186803b1580156200009b57600080fd5b505afa158015620000b0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620000d6919062000164565b600180546001600160a01b039283166001600160a01b031991821617909155600580549490921693169290921790915550620001899050565b80516001600160a01b03811681146200012757600080fd5b919050565b600080604083850312156200014057600080fd5b6200014b836200010f565b91506200015b602084016200010f565b90509250929050565b6000602082840312156200017757600080fd5b62000182826200010f565b9392505050565b6129b580620001996000396000f3fe6080604052600436106200008a5760003560e01c80639813c7b211620000555780639813c7b214620002065780639e405b711462000256578063a381c8e21462000290578063d5c6b50414620002b55762000103565b80628d48e3146200014c5780631888d71214620001a3578063458ffd6314620001bc57806383bece4d14620001e15762000103565b36620001035760405162461bcd60e51b815260206004820152602360248201527f436f6e747261637420646f6573206e6f7420737570706f72742072656365697660448201527f652829000000000000000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b60405162461bcd60e51b815260206004820152601d60248201527f66616c6c6261636b2829206d6574686f6420756e737570706f727465640000006044820152606401620000fa565b3480156200015957600080fd5b50620001866200016b36600462000c44565b6004602052600090815260409020546001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b620001ba620001b436600462000c44565b620002ef565b005b348015620001c957600080fd5b50620001ba620001db36600462000cb7565b62000470565b348015620001ee57600080fd5b50620001ba6200020036600462000d43565b6200068e565b3480156200021357600080fd5b50620002456200022536600462000c44565b6001600160a01b0390811660009081526002602052604090205416151590565b60405190151581526020016200019a565b3480156200026357600080fd5b50620001866200027536600462000c44565b6003602052600090815260409020546001600160a01b031681565b3480156200029d57600080fd5b50620001ba620002af36600462000d43565b620008d1565b348015620002c257600080fd5b5062000186620002d436600462000c44565b6002602052600090815260409020546001600160a01b031681565b60003411620003415760405162461bcd60e51b815260206004820152600d60248201527f4e6f7468696e672073656e742e000000000000000000000000000000000000006044820152606401620000fa565b6000805260026020527fac33ff75c19e70fe83507db0d683fd3465c996598dc972688b7ace676c89077b546001600160a01b0316620003c35760405162461bcd60e51b815260206004820152601560248201527f4e6f206d617070696e6720666f7220746f6b656e2e00000000000000000000006044820152606401620000fa565b60008052600360209081527f3617319a054d772f909f7c479a2cebe5066e836a939412e32403c99029b92eff54604080516001600160a01b03928316602482015234604482015284831660648083019190915282518083039091018152608490910190915291820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff166383bece4d60e01b1790526005546200046c91168260015b60008062000a5f565b5050565b6005546000546001600160a01b0391821691163314620004f95760405162461bcd60e51b815260206004820152603060248201527f436f6e74726163742063616c6c6572206973206e6f742074686520726567697360448201527f7465726564206d657373656e67657221000000000000000000000000000000006064820152608401620000fa565b806001600160a01b03166200050d62000b8d565b6001600160a01b0316146200058b5760405162461bcd60e51b815260206004820152603160248201527f43726f737320636861696e206d65737361676520636f6d696e672066726f6d2060448201527f696e636f72726563742073656e646572210000000000000000000000000000006064820152608401620000fa565b6000858585856040516200059f9062000c1d565b620005ae949392919062000db3565b604051809103906000f080158015620005cb573d6000803e3d6000fd5b506001600160a01b03808216600081815260026020908152604080832080547fffffffffffffffffffffffff00000000000000000000000000000000000000009081168617909155600383528184208054968f169682168717905594835260049091529081902080549093169091179091555190915081907f30c05779f384e0ae9d43bbf7ec4417f28bdc53d02a35551b6eb270a9c4c71dca906200067c908a9084908b908b908b908b9062000de9565b60405180910390a15050505050505050565b6005546000546001600160a01b0391821691163314620007175760405162461bcd60e51b815260206004820152603060248201527f436f6e74726163742063616c6c6572206973206e6f742074686520726567697360448201527f7465726564206d657373656e67657221000000000000000000000000000000006064820152608401620000fa565b806001600160a01b03166200072b62000b8d565b6001600160a01b031614620007a95760405162461bcd60e51b815260206004820152603160248201527f43726f737320636861696e206d65737361676520636f6d696e672066726f6d2060448201527f696e636f72726563742073656e646572210000000000000000000000000000006064820152608401620000fa565b6001600160a01b038085166000908152600460209081526040808320548416808452600290925290912054909116806200084c5760405162461bcd60e51b815260206004820152602b60248201527f526563656976696e672061737365747320666f7220756e6b6e6f776e2077726160448201527f7070656420746f6b656e210000000000000000000000000000000000000000006064820152608401620000fa565b6040517f979005ad0000000000000000000000000000000000000000000000000000000081526001600160a01b0385811660048301526024820187905282169063979005ad90604401600060405180830381600087803b158015620008b057600080fd5b505af1158015620008c5573d6000803e3d6000fd5b50505050505050505050565b6001600160a01b03808416600090815260026020526040902054166200093a5760405162461bcd60e51b815260206004820152601560248201527f4e6f206d617070696e6720666f7220746f6b656e2e00000000000000000000006044820152606401620000fa565b6001600160a01b03838116600090815260026020526040908190205490517f1dd319cb000000000000000000000000000000000000000000000000000000008152336004820152602481018590529116908190631dd319cb90604401600060405180830381600087803b158015620009b157600080fd5b505af1158015620009c6573d6000803e3d6000fd5b505050506001600160a01b03848116600090815260036020908152604091829020548251908416602482015260448101879052858416606480830191909152835180830390910181526084909101909252810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff166383bece4d60e01b179052600554909162000a58911682600162000463565b5050505050565b60006040518060600160405280876001600160a01b031681526020018681526020018481525060405160200162000a97919062000e8a565b60408051808303601f19018152919052600180549192506001600160a01b0382169163b1454caa917401000000000000000000000000000000000000000090910463ffffffff1690601462000aec8362000ed1565b91906101000a81548163ffffffff021916908363ffffffff1602179055508684866040518563ffffffff1660e01b815260040162000b2e949392919062000f1d565b602060405180830381600087803b15801562000b4957600080fd5b505af115801562000b5e573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000b84919062000f5c565b50505050505050565b60008060009054906101000a90046001600160a01b03166001600160a01b03166363012de56040518163ffffffff1660e01b815260040160206040518083038186803b15801562000bdd57600080fd5b505afa15801562000bf2573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000c18919062000f88565b905090565b6119d78062000fa983390190565b6001600160a01b038116811462000c4157600080fd5b50565b60006020828403121562000c5757600080fd5b813562000c648162000c2b565b9392505050565b60008083601f84011262000c7e57600080fd5b50813567ffffffffffffffff81111562000c9757600080fd5b60208301915083602082850101111562000cb057600080fd5b9250929050565b60008060008060006060868803121562000cd057600080fd5b853562000cdd8162000c2b565b9450602086013567ffffffffffffffff8082111562000cfb57600080fd5b62000d0989838a0162000c6b565b9096509450604088013591508082111562000d2357600080fd5b5062000d328882890162000c6b565b969995985093965092949392505050565b60008060006060848603121562000d5957600080fd5b833562000d668162000c2b565b925060208401359150604084013562000d7f8162000c2b565b809150509250925092565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b60408152600062000dc960408301868862000d8a565b828103602084015262000dde81858762000d8a565b979650505050505050565b60006001600160a01b0380891683528088166020840152506080604083015262000e1860808301868862000d8a565b828103606084015262000e2d81858762000d8a565b9998505050505050505050565b6000815180845260005b8181101562000e625760208185018101518683018201520162000e44565b8181111562000e75576000602083870101525b50601f01601f19169290920160200192915050565b602081526001600160a01b038251166020820152600060208301516060604084015262000ebb608084018262000e3a565b9050604084015160608401528091505092915050565b600063ffffffff8083168181141562000f13577f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6001019392505050565b600063ffffffff80871683528086166020840152506080604083015262000f48608083018562000e3a565b905060ff8316606083015295945050505050565b60006020828403121562000f6f57600080fd5b815167ffffffffffffffff8116811462000c6457600080fd5b60006020828403121562000f9b57600080fd5b815162000c648162000c2b56fe6080604052600580546001600160a01b03191673deb34a740eca1ec42c8b8204cbec0ba34fdd27f31790553480156200003757600080fd5b50604051620019d7380380620019d78339810160408190526200005a91620002e3565b8181818181600390805190602001906200007692919062000170565b5080516200008c90600490602084019062000170565b5050505050620000c37fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c2177533620000cb60201b60201c565b50506200038a565b60008281526007602090815260408083206001600160a01b038516845290915290205460ff166200016c5760008281526007602090815260408083206001600160a01b03851684529091529020805460ff191660011790556200012b3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45b5050565b8280546200017e906200034d565b90600052602060002090601f016020900481019282620001a25760008555620001ed565b82601f10620001bd57805160ff1916838001178555620001ed565b82800160010185558215620001ed579182015b82811115620001ed578251825591602001919060010190620001d0565b50620001fb929150620001ff565b5090565b5b80821115620001fb576000815560010162000200565b634e487b7160e01b600052604160045260246000fd5b600082601f8301126200023e57600080fd5b81516001600160401b03808211156200025b576200025b62000216565b604051601f8301601f19908116603f0116810190828211818310171562000286576200028662000216565b81604052838152602092508683858801011115620002a357600080fd5b600091505b83821015620002c75785820183015181830184015290820190620002a8565b83821115620002d95760008385830101525b9695505050505050565b60008060408385031215620002f757600080fd5b82516001600160401b03808211156200030f57600080fd5b6200031d868387016200022c565b935060208501519150808211156200033457600080fd5b5062000343858286016200022c565b9150509250929050565b600181811c908216806200036257607f821691505b602082108114156200038457634e487b7160e01b600052602260045260246000fd5b50919050565b61163d806200039a6000396000f3fe608060405234801561001057600080fd5b50600436106101775760003560e01c806339509351116100d8578063979005ad1161008c578063a9059cbb11610066578063a9059cbb1461031a578063d547741f1461032d578063dd62ed3e1461034057600080fd5b8063979005ad146102ec578063a217fddf146102ff578063a457c2d71461030757600080fd5b806375b238fc116100bd57806375b238fc1461028457806391d14854146102ab57806395d89b41146102e457600080fd5b8063395093511461025e57806370a082311461027157600080fd5b806323b872dd1161012f5780632f2ff15d116101145780632f2ff15d14610229578063313ce5671461023c57806336568abe1461024b57600080fd5b806323b872dd146101f3578063248a9ca31461020657600080fd5b8063095ea7b311610160578063095ea7b3146101b957806318160ddd146101cc5780631dd319cb146101de57600080fd5b806301ffc9a71461017c57806306fdde03146101a4575b600080fd5b61018f61018a3660046112f7565b610353565b60405190151581526020015b60405180910390f35b6101ac6103ec565b60405161019b9190611365565b61018f6101c73660046113b4565b61047e565b6002545b60405190815260200161019b565b6101f16101ec3660046113b4565b610496565b005b61018f6102013660046113de565b61052d565b6101d061021436600461141a565b60009081526007602052604090206001015490565b6101f1610237366004611433565b610551565b6040516012815260200161019b565b6101f1610259366004611433565b610577565b61018f61026c3660046113b4565b610603565b6101d061027f36600461145f565b610642565b6101d07fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c2177581565b61018f6102b9366004611433565b60009182526007602090815260408084206001600160a01b0393909316845291905290205460ff1690565b6101ac6106ea565b6101f16102fa3660046113b4565b6106f9565b6101d0600081565b61018f6103153660046113b4565b61072e565b61018f6103283660046113b4565b6107d8565b6101f161033b366004611433565b6107e6565b6101d061034e36600461147a565b61080c565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f7965db0b0000000000000000000000000000000000000000000000000000000014806103e657507f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316145b92915050565b6060600380546103fb906114a4565b80601f0160208091040260200160405190810160405280929190818152602001828054610427906114a4565b80156104745780601f1061044957610100808354040283529160200191610474565b820191906000526020600020905b81548152906001019060200180831161045757829003601f168201915b5050505050905090565b60003361048c81858561091d565b5060019392505050565b7fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c217756104c18133610a75565b816104cb84610642565b101561051e5760405162461bcd60e51b815260206004820152601560248201527f496e73756666696369656e742062616c616e63652e000000000000000000000060448201526064015b60405180910390fd5b6105288383610af5565b505050565b60003361053b858285610c7a565b610546858585610cf4565b506001949350505050565b60008281526007602052604090206001015461056d8133610a75565b6105288383610f0b565b6001600160a01b03811633146105f55760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201527f20726f6c657320666f722073656c6600000000000000000000000000000000006064820152608401610515565b6105ff8282610fad565b5050565b3360008181526001602090815260408083206001600160a01b038716845290915281205490919061048c908290869061063d9087906114f5565b61091d565b6000326001600160a01b0383161415610673576001600160a01b0382166000908152602081905260409020546103e6565b336001600160a01b03831614156106a2576001600160a01b0382166000908152602081905260409020546103e6565b60405162461bcd60e51b815260206004820152601f60248201527f4e6f7420616c6c6f77656420746f2072656164207468652062616c616e6365006044820152606401610515565b6060600480546103fb906114a4565b7fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c217756107248133610a75565b6105288383611030565b3360008181526001602090815260408083206001600160a01b0387168452909152812054909190838110156107cb5760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f7760448201527f207a65726f0000000000000000000000000000000000000000000000000000006064820152608401610515565b610546828686840361091d565b60003361048c818585610cf4565b6000828152600760205260409020600101546108028133610a75565b6105288383610fad565b6000326001600160a01b038416148061082d5750326001600160a01b038316145b15610860576001600160a01b038084166000908152600160209081526040808320938616835292905220545b90506103e6565b336001600160a01b038416148061087f5750336001600160a01b038316145b156108af576001600160a01b03808416600090815260016020908152604080832093861683529290522054610859565b60405162461bcd60e51b815260206004820152602160248201527f4e6f7420616c6c6f77656420746f20726561642074686520616c6c6f77616e6360448201527f65000000000000000000000000000000000000000000000000000000000000006064820152608401610515565b6001600160a01b0383166109985760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460448201527f72657373000000000000000000000000000000000000000000000000000000006064820152608401610515565b6001600160a01b038216610a145760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f20616464726560448201527f73730000000000000000000000000000000000000000000000000000000000006064820152608401610515565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b60008281526007602090815260408083206001600160a01b038516845290915290205460ff166105ff57610ab3816001600160a01b0316601461110f565b610abe83602061110f565b604051602001610acf92919061150d565b60408051601f198184030181529082905262461bcd60e51b825261051591600401611365565b6001600160a01b038216610b715760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f2061646472657360448201527f73000000000000000000000000000000000000000000000000000000000000006064820152608401610515565b6001600160a01b03821660009081526020819052604090205481811015610c005760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e60448201527f63650000000000000000000000000000000000000000000000000000000000006064820152608401610515565b6001600160a01b0383166000908152602081905260408120838303905560028054849290610c2f90849061158e565b90915550506040518281526000906001600160a01b038516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a3505050565b6000610c86848461080c565b90506000198114610cee5781811015610ce15760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e63650000006044820152606401610515565b610cee848484840361091d565b50505050565b6001600160a01b038316610d705760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f20616460448201527f64726573730000000000000000000000000000000000000000000000000000006064820152608401610515565b6001600160a01b038216610dec5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201527f65737300000000000000000000000000000000000000000000000000000000006064820152608401610515565b6001600160a01b03831660009081526020819052604090205481811015610e7b5760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e742065786365656473206260448201527f616c616e636500000000000000000000000000000000000000000000000000006064820152608401610515565b6001600160a01b03808516600090815260208190526040808220858503905591851681529081208054849290610eb29084906114f5565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef84604051610efe91815260200190565b60405180910390a3610cee565b60008281526007602090815260408083206001600160a01b038516845290915290205460ff166105ff5760008281526007602090815260408083206001600160a01b03851684529091529020805460ff19166001179055610f693390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b60008281526007602090815260408083206001600160a01b038516845290915290205460ff16156105ff5760008281526007602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b6001600160a01b0382166110865760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152606401610515565b806002600082825461109891906114f5565b90915550506001600160a01b038216600090815260208190526040812080548392906110c59084906114f5565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b6060600061111e8360026115a5565b6111299060026114f5565b67ffffffffffffffff811115611141576111416115c4565b6040519080825280601f01601f19166020018201604052801561116b576020820181803683370190505b5090507f3000000000000000000000000000000000000000000000000000000000000000816000815181106111a2576111a26115da565b60200101906001600160f81b031916908160001a9053507f7800000000000000000000000000000000000000000000000000000000000000816001815181106111ed576111ed6115da565b60200101906001600160f81b031916908160001a90535060006112118460026115a5565b61121c9060016114f5565b90505b60018111156112a1577f303132333435363738396162636465660000000000000000000000000000000085600f166010811061125d5761125d6115da565b1a60f81b828281518110611273576112736115da565b60200101906001600160f81b031916908160001a90535060049490941c9361129a816115f0565b905061121f565b5083156112f05760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610515565b9392505050565b60006020828403121561130957600080fd5b81357fffffffff00000000000000000000000000000000000000000000000000000000811681146112f057600080fd5b60005b8381101561135457818101518382015260200161133c565b83811115610cee5750506000910152565b6020815260008251806020840152611384816040850160208701611339565b601f01601f19169190910160400192915050565b80356001600160a01b03811681146113af57600080fd5b919050565b600080604083850312156113c757600080fd5b6113d083611398565b946020939093013593505050565b6000806000606084860312156113f357600080fd5b6113fc84611398565b925061140a60208501611398565b9150604084013590509250925092565b60006020828403121561142c57600080fd5b5035919050565b6000806040838503121561144657600080fd5b8235915061145660208401611398565b90509250929050565b60006020828403121561147157600080fd5b6112f082611398565b6000806040838503121561148d57600080fd5b61149683611398565b915061145660208401611398565b600181811c908216806114b857607f821691505b602082108114156114d957634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b60008219821115611508576115086114df565b500190565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260008351611545816017850160208801611339565b7f206973206d697373696e6720726f6c65200000000000000000000000000000006017918401918201528351611582816028840160208801611339565b01602801949350505050565b6000828210156115a0576115a06114df565b500390565b60008160001904831182151516156115bf576115bf6114df565b500290565b634e487b7160e01b600052604160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b6000816115ff576115ff6114df565b50600019019056fea264697066735822122051d4d151f1e4f06c4f1a712938b6e043da4348eaab5479425f2ff11cd6f5c67c64736f6c63430008090033a2646970667358221220c1b2e72d51abe060c331c1fa74c0988678f1f1e196af53702707985c1e0d33c064736f6c63430008090033", + Bin: "0x60806040526001805463ffffffff60a01b191690553480156200002157600080fd5b5060405162002b4e38038062002b4e83398101604081905262000044916200012c565b600080546001600160a01b0319166001600160a01b038416908117909155604080516350d113fd60e11b8152905184929163a1a227fa916004808301926020929190829003018186803b1580156200009b57600080fd5b505afa158015620000b0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620000d6919062000164565b600180546001600160a01b039283166001600160a01b031991821617909155600580549490921693169290921790915550620001899050565b80516001600160a01b03811681146200012757600080fd5b919050565b600080604083850312156200014057600080fd5b6200014b836200010f565b91506200015b602084016200010f565b90509250929050565b6000602082840312156200017757600080fd5b62000182826200010f565b9392505050565b6129b580620001996000396000f3fe6080604052600436106200008a5760003560e01c80639813c7b211620000555780639813c7b214620002065780639e405b711462000256578063a381c8e21462000290578063d5c6b50414620002b55762000103565b80628d48e3146200014c5780631888d71214620001a3578063458ffd6314620001bc57806383bece4d14620001e15762000103565b36620001035760405162461bcd60e51b815260206004820152602360248201527f436f6e747261637420646f6573206e6f7420737570706f72742072656365697660448201527f652829000000000000000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b60405162461bcd60e51b815260206004820152601d60248201527f66616c6c6261636b2829206d6574686f6420756e737570706f727465640000006044820152606401620000fa565b3480156200015957600080fd5b50620001866200016b36600462000c44565b6004602052600090815260409020546001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b620001ba620001b436600462000c44565b620002ef565b005b348015620001c957600080fd5b50620001ba620001db36600462000cb7565b62000470565b348015620001ee57600080fd5b50620001ba6200020036600462000d43565b6200068e565b3480156200021357600080fd5b50620002456200022536600462000c44565b6001600160a01b0390811660009081526002602052604090205416151590565b60405190151581526020016200019a565b3480156200026357600080fd5b50620001866200027536600462000c44565b6003602052600090815260409020546001600160a01b031681565b3480156200029d57600080fd5b50620001ba620002af36600462000d43565b620008d1565b348015620002c257600080fd5b5062000186620002d436600462000c44565b6002602052600090815260409020546001600160a01b031681565b60003411620003415760405162461bcd60e51b815260206004820152600d60248201527f4e6f7468696e672073656e742e000000000000000000000000000000000000006044820152606401620000fa565b6000805260026020527fac33ff75c19e70fe83507db0d683fd3465c996598dc972688b7ace676c89077b546001600160a01b0316620003c35760405162461bcd60e51b815260206004820152601560248201527f4e6f206d617070696e6720666f7220746f6b656e2e00000000000000000000006044820152606401620000fa565b60008052600360209081527f3617319a054d772f909f7c479a2cebe5066e836a939412e32403c99029b92eff54604080516001600160a01b03928316602482015234604482015284831660648083019190915282518083039091018152608490910190915291820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff166383bece4d60e01b1790526005546200046c91168260015b60008062000a5f565b5050565b6005546000546001600160a01b0391821691163314620004f95760405162461bcd60e51b815260206004820152603060248201527f436f6e74726163742063616c6c6572206973206e6f742074686520726567697360448201527f7465726564206d657373656e67657221000000000000000000000000000000006064820152608401620000fa565b806001600160a01b03166200050d62000b8d565b6001600160a01b0316146200058b5760405162461bcd60e51b815260206004820152603160248201527f43726f737320636861696e206d65737361676520636f6d696e672066726f6d2060448201527f696e636f72726563742073656e646572210000000000000000000000000000006064820152608401620000fa565b6000858585856040516200059f9062000c1d565b620005ae949392919062000db3565b604051809103906000f080158015620005cb573d6000803e3d6000fd5b506001600160a01b03808216600081815260026020908152604080832080547fffffffffffffffffffffffff00000000000000000000000000000000000000009081168617909155600383528184208054968f169682168717905594835260049091529081902080549093169091179091555190915081907f30c05779f384e0ae9d43bbf7ec4417f28bdc53d02a35551b6eb270a9c4c71dca906200067c908a9084908b908b908b908b9062000de9565b60405180910390a15050505050505050565b6005546000546001600160a01b0391821691163314620007175760405162461bcd60e51b815260206004820152603060248201527f436f6e74726163742063616c6c6572206973206e6f742074686520726567697360448201527f7465726564206d657373656e67657221000000000000000000000000000000006064820152608401620000fa565b806001600160a01b03166200072b62000b8d565b6001600160a01b031614620007a95760405162461bcd60e51b815260206004820152603160248201527f43726f737320636861696e206d65737361676520636f6d696e672066726f6d2060448201527f696e636f72726563742073656e646572210000000000000000000000000000006064820152608401620000fa565b6001600160a01b038085166000908152600460209081526040808320548416808452600290925290912054909116806200084c5760405162461bcd60e51b815260206004820152602b60248201527f526563656976696e672061737365747320666f7220756e6b6e6f776e2077726160448201527f7070656420746f6b656e210000000000000000000000000000000000000000006064820152608401620000fa565b6040517f979005ad0000000000000000000000000000000000000000000000000000000081526001600160a01b0385811660048301526024820187905282169063979005ad90604401600060405180830381600087803b158015620008b057600080fd5b505af1158015620008c5573d6000803e3d6000fd5b50505050505050505050565b6001600160a01b03808416600090815260026020526040902054166200093a5760405162461bcd60e51b815260206004820152601560248201527f4e6f206d617070696e6720666f7220746f6b656e2e00000000000000000000006044820152606401620000fa565b6001600160a01b03838116600090815260026020526040908190205490517f1dd319cb000000000000000000000000000000000000000000000000000000008152336004820152602481018590529116908190631dd319cb90604401600060405180830381600087803b158015620009b157600080fd5b505af1158015620009c6573d6000803e3d6000fd5b505050506001600160a01b03848116600090815260036020908152604091829020548251908416602482015260448101879052858416606480830191909152835180830390910181526084909101909252810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff166383bece4d60e01b179052600554909162000a58911682600162000463565b5050505050565b60006040518060600160405280876001600160a01b031681526020018681526020018481525060405160200162000a97919062000e8a565b60408051808303601f19018152919052600180549192506001600160a01b0382169163b1454caa917401000000000000000000000000000000000000000090910463ffffffff1690601462000aec8362000ed1565b91906101000a81548163ffffffff021916908363ffffffff1602179055508684866040518563ffffffff1660e01b815260040162000b2e949392919062000f1d565b602060405180830381600087803b15801562000b4957600080fd5b505af115801562000b5e573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000b84919062000f5c565b50505050505050565b60008060009054906101000a90046001600160a01b03166001600160a01b03166363012de56040518163ffffffff1660e01b815260040160206040518083038186803b15801562000bdd57600080fd5b505afa15801562000bf2573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000c18919062000f88565b905090565b6119d78062000fa983390190565b6001600160a01b038116811462000c4157600080fd5b50565b60006020828403121562000c5757600080fd5b813562000c648162000c2b565b9392505050565b60008083601f84011262000c7e57600080fd5b50813567ffffffffffffffff81111562000c9757600080fd5b60208301915083602082850101111562000cb057600080fd5b9250929050565b60008060008060006060868803121562000cd057600080fd5b853562000cdd8162000c2b565b9450602086013567ffffffffffffffff8082111562000cfb57600080fd5b62000d0989838a0162000c6b565b9096509450604088013591508082111562000d2357600080fd5b5062000d328882890162000c6b565b969995985093965092949392505050565b60008060006060848603121562000d5957600080fd5b833562000d668162000c2b565b925060208401359150604084013562000d7f8162000c2b565b809150509250925092565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b60408152600062000dc960408301868862000d8a565b828103602084015262000dde81858762000d8a565b979650505050505050565b60006001600160a01b0380891683528088166020840152506080604083015262000e1860808301868862000d8a565b828103606084015262000e2d81858762000d8a565b9998505050505050505050565b6000815180845260005b8181101562000e625760208185018101518683018201520162000e44565b8181111562000e75576000602083870101525b50601f01601f19169290920160200192915050565b602081526001600160a01b038251166020820152600060208301516060604084015262000ebb608084018262000e3a565b9050604084015160608401528091505092915050565b600063ffffffff8083168181141562000f13577f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6001019392505050565b600063ffffffff80871683528086166020840152506080604083015262000f48608083018562000e3a565b905060ff8316606083015295945050505050565b60006020828403121562000f6f57600080fd5b815167ffffffffffffffff8116811462000c6457600080fd5b60006020828403121562000f9b57600080fd5b815162000c648162000c2b56fe6080604052600580546001600160a01b03191673deb34a740eca1ec42c8b8204cbec0ba34fdd27f31790553480156200003757600080fd5b50604051620019d7380380620019d78339810160408190526200005a91620002e3565b8181818181600390805190602001906200007692919062000170565b5080516200008c90600490602084019062000170565b5050505050620000c37fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c2177533620000cb60201b60201c565b50506200038a565b60008281526007602090815260408083206001600160a01b038516845290915290205460ff166200016c5760008281526007602090815260408083206001600160a01b03851684529091529020805460ff191660011790556200012b3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45b5050565b8280546200017e906200034d565b90600052602060002090601f016020900481019282620001a25760008555620001ed565b82601f10620001bd57805160ff1916838001178555620001ed565b82800160010185558215620001ed579182015b82811115620001ed578251825591602001919060010190620001d0565b50620001fb929150620001ff565b5090565b5b80821115620001fb576000815560010162000200565b634e487b7160e01b600052604160045260246000fd5b600082601f8301126200023e57600080fd5b81516001600160401b03808211156200025b576200025b62000216565b604051601f8301601f19908116603f0116810190828211818310171562000286576200028662000216565b81604052838152602092508683858801011115620002a357600080fd5b600091505b83821015620002c75785820183015181830184015290820190620002a8565b83821115620002d95760008385830101525b9695505050505050565b60008060408385031215620002f757600080fd5b82516001600160401b03808211156200030f57600080fd5b6200031d868387016200022c565b935060208501519150808211156200033457600080fd5b5062000343858286016200022c565b9150509250929050565b600181811c908216806200036257607f821691505b602082108114156200038457634e487b7160e01b600052602260045260246000fd5b50919050565b61163d806200039a6000396000f3fe608060405234801561001057600080fd5b50600436106101775760003560e01c806339509351116100d8578063979005ad1161008c578063a9059cbb11610066578063a9059cbb1461031a578063d547741f1461032d578063dd62ed3e1461034057600080fd5b8063979005ad146102ec578063a217fddf146102ff578063a457c2d71461030757600080fd5b806375b238fc116100bd57806375b238fc1461028457806391d14854146102ab57806395d89b41146102e457600080fd5b8063395093511461025e57806370a082311461027157600080fd5b806323b872dd1161012f5780632f2ff15d116101145780632f2ff15d14610229578063313ce5671461023c57806336568abe1461024b57600080fd5b806323b872dd146101f3578063248a9ca31461020657600080fd5b8063095ea7b311610160578063095ea7b3146101b957806318160ddd146101cc5780631dd319cb146101de57600080fd5b806301ffc9a71461017c57806306fdde03146101a4575b600080fd5b61018f61018a3660046112f7565b610353565b60405190151581526020015b60405180910390f35b6101ac6103ec565b60405161019b9190611365565b61018f6101c73660046113b4565b61047e565b6002545b60405190815260200161019b565b6101f16101ec3660046113b4565b610496565b005b61018f6102013660046113de565b61052d565b6101d061021436600461141a565b60009081526007602052604090206001015490565b6101f1610237366004611433565b610551565b6040516012815260200161019b565b6101f1610259366004611433565b610577565b61018f61026c3660046113b4565b610603565b6101d061027f36600461145f565b610642565b6101d07fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c2177581565b61018f6102b9366004611433565b60009182526007602090815260408084206001600160a01b0393909316845291905290205460ff1690565b6101ac6106ea565b6101f16102fa3660046113b4565b6106f9565b6101d0600081565b61018f6103153660046113b4565b61072e565b61018f6103283660046113b4565b6107d8565b6101f161033b366004611433565b6107e6565b6101d061034e36600461147a565b61080c565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f7965db0b0000000000000000000000000000000000000000000000000000000014806103e657507f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316145b92915050565b6060600380546103fb906114a4565b80601f0160208091040260200160405190810160405280929190818152602001828054610427906114a4565b80156104745780601f1061044957610100808354040283529160200191610474565b820191906000526020600020905b81548152906001019060200180831161045757829003601f168201915b5050505050905090565b60003361048c81858561091d565b5060019392505050565b7fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c217756104c18133610a75565b816104cb84610642565b101561051e5760405162461bcd60e51b815260206004820152601560248201527f496e73756666696369656e742062616c616e63652e000000000000000000000060448201526064015b60405180910390fd5b6105288383610af5565b505050565b60003361053b858285610c7a565b610546858585610cf4565b506001949350505050565b60008281526007602052604090206001015461056d8133610a75565b6105288383610f0b565b6001600160a01b03811633146105f55760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201527f20726f6c657320666f722073656c6600000000000000000000000000000000006064820152608401610515565b6105ff8282610fad565b5050565b3360008181526001602090815260408083206001600160a01b038716845290915281205490919061048c908290869061063d9087906114f5565b61091d565b6000326001600160a01b0383161415610673576001600160a01b0382166000908152602081905260409020546103e6565b336001600160a01b03831614156106a2576001600160a01b0382166000908152602081905260409020546103e6565b60405162461bcd60e51b815260206004820152601f60248201527f4e6f7420616c6c6f77656420746f2072656164207468652062616c616e6365006044820152606401610515565b6060600480546103fb906114a4565b7fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c217756107248133610a75565b6105288383611030565b3360008181526001602090815260408083206001600160a01b0387168452909152812054909190838110156107cb5760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f7760448201527f207a65726f0000000000000000000000000000000000000000000000000000006064820152608401610515565b610546828686840361091d565b60003361048c818585610cf4565b6000828152600760205260409020600101546108028133610a75565b6105288383610fad565b6000326001600160a01b038416148061082d5750326001600160a01b038316145b15610860576001600160a01b038084166000908152600160209081526040808320938616835292905220545b90506103e6565b336001600160a01b038416148061087f5750336001600160a01b038316145b156108af576001600160a01b03808416600090815260016020908152604080832093861683529290522054610859565b60405162461bcd60e51b815260206004820152602160248201527f4e6f7420616c6c6f77656420746f20726561642074686520616c6c6f77616e6360448201527f65000000000000000000000000000000000000000000000000000000000000006064820152608401610515565b6001600160a01b0383166109985760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460448201527f72657373000000000000000000000000000000000000000000000000000000006064820152608401610515565b6001600160a01b038216610a145760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f20616464726560448201527f73730000000000000000000000000000000000000000000000000000000000006064820152608401610515565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b60008281526007602090815260408083206001600160a01b038516845290915290205460ff166105ff57610ab3816001600160a01b0316601461110f565b610abe83602061110f565b604051602001610acf92919061150d565b60408051601f198184030181529082905262461bcd60e51b825261051591600401611365565b6001600160a01b038216610b715760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f2061646472657360448201527f73000000000000000000000000000000000000000000000000000000000000006064820152608401610515565b6001600160a01b03821660009081526020819052604090205481811015610c005760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e60448201527f63650000000000000000000000000000000000000000000000000000000000006064820152608401610515565b6001600160a01b0383166000908152602081905260408120838303905560028054849290610c2f90849061158e565b90915550506040518281526000906001600160a01b038516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a3505050565b6000610c86848461080c565b90506000198114610cee5781811015610ce15760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e63650000006044820152606401610515565b610cee848484840361091d565b50505050565b6001600160a01b038316610d705760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f20616460448201527f64726573730000000000000000000000000000000000000000000000000000006064820152608401610515565b6001600160a01b038216610dec5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201527f65737300000000000000000000000000000000000000000000000000000000006064820152608401610515565b6001600160a01b03831660009081526020819052604090205481811015610e7b5760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e742065786365656473206260448201527f616c616e636500000000000000000000000000000000000000000000000000006064820152608401610515565b6001600160a01b03808516600090815260208190526040808220858503905591851681529081208054849290610eb29084906114f5565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef84604051610efe91815260200190565b60405180910390a3610cee565b60008281526007602090815260408083206001600160a01b038516845290915290205460ff166105ff5760008281526007602090815260408083206001600160a01b03851684529091529020805460ff19166001179055610f693390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b60008281526007602090815260408083206001600160a01b038516845290915290205460ff16156105ff5760008281526007602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b6001600160a01b0382166110865760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152606401610515565b806002600082825461109891906114f5565b90915550506001600160a01b038216600090815260208190526040812080548392906110c59084906114f5565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b6060600061111e8360026115a5565b6111299060026114f5565b67ffffffffffffffff811115611141576111416115c4565b6040519080825280601f01601f19166020018201604052801561116b576020820181803683370190505b5090507f3000000000000000000000000000000000000000000000000000000000000000816000815181106111a2576111a26115da565b60200101906001600160f81b031916908160001a9053507f7800000000000000000000000000000000000000000000000000000000000000816001815181106111ed576111ed6115da565b60200101906001600160f81b031916908160001a90535060006112118460026115a5565b61121c9060016114f5565b90505b60018111156112a1577f303132333435363738396162636465660000000000000000000000000000000085600f166010811061125d5761125d6115da565b1a60f81b828281518110611273576112736115da565b60200101906001600160f81b031916908160001a90535060049490941c9361129a816115f0565b905061121f565b5083156112f05760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610515565b9392505050565b60006020828403121561130957600080fd5b81357fffffffff00000000000000000000000000000000000000000000000000000000811681146112f057600080fd5b60005b8381101561135457818101518382015260200161133c565b83811115610cee5750506000910152565b6020815260008251806020840152611384816040850160208701611339565b601f01601f19169190910160400192915050565b80356001600160a01b03811681146113af57600080fd5b919050565b600080604083850312156113c757600080fd5b6113d083611398565b946020939093013593505050565b6000806000606084860312156113f357600080fd5b6113fc84611398565b925061140a60208501611398565b9150604084013590509250925092565b60006020828403121561142c57600080fd5b5035919050565b6000806040838503121561144657600080fd5b8235915061145660208401611398565b90509250929050565b60006020828403121561147157600080fd5b6112f082611398565b6000806040838503121561148d57600080fd5b61149683611398565b915061145660208401611398565b600181811c908216806114b857607f821691505b602082108114156114d957634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b60008219821115611508576115086114df565b500190565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260008351611545816017850160208801611339565b7f206973206d697373696e6720726f6c65200000000000000000000000000000006017918401918201528351611582816028840160208801611339565b01602801949350505050565b6000828210156115a0576115a06114df565b500390565b60008160001904831182151516156115bf576115bf6114df565b500290565b634e487b7160e01b600052604160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b6000816115ff576115ff6114df565b50600019019056fea2646970667358221220848f35fdc28f22577d7d393858f44350cbde245dc770487cf991c8a21210b53864736f6c63430008090033a2646970667358221220848986171953b0142ae4cd0b9a4013c5fb9167735aa5ef2bffbae5f3d57b166e64736f6c63430008090033", } // EthereumBridgeABI is the input ABI used to generate the binding from. diff --git a/contracts/generated/ManagementContract/ManagementContract.go b/contracts/generated/ManagementContract/ManagementContract.go index e27932bc60..e7db482bf2 100644 --- a/contracts/generated/ManagementContract/ManagementContract.go +++ b/contracts/generated/ManagementContract/ManagementContract.go @@ -57,7 +57,7 @@ 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\":\"bytes32\",\"name\":\"L1Block\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"LastSequenceNumber\",\"type\":\"uint256\"}],\"internalType\":\"structStructs.MetaRollup\",\"name\":\"r\",\"type\":\"tuple\"},{\"internalType\":\"string\",\"name\":\"_rollupData\",\"type\":\"string\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"blockNumber\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"blockHash\",\"type\":\"bytes32\"},{\"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\":\"bytes32\",\"name\":\"L1Block\",\"type\":\"bytes32\"},{\"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: "0x6080604052600060045534801561001557600080fd5b5060405161002290610096565b604051809103906000f08015801561003e573d6000803e3d6000fd5b50600680546001600160a01b0319166001600160a01b039290921691821790556040519081527fbd726cf82ac9c3260b1495107182e336e0654b25c10915648c0cc15b2bb72cbf9060200160405180910390a16100a3565b6110ac806115d583390190565b611523806100b26000396000f3fe608060405234801561001057600080fd5b50600436106100be5760003560e01c80638236a7ba11610076578063a52f433c1161005b578063a52f433c14610248578063bbd79e1514610258578063e34fbfc81461026b57600080fd5b80638236a7ba1461015c578063a1a227fa1461021d57600080fd5b806343348b2f116100a757806343348b2f146100f6578063440c953b1461013257806359a900711461014957600080fd5b806302bf9317146100c3578063324ff866146100d8575b600080fd5b6100d66100d1366004610d45565b61027e565b005b6100e0610318565b6040516100ed9190610df8565b60405180910390f35b610122610104366004610e87565b6001600160a01b031660009081526001602052604090205460ff1690565b60405190151581526020016100ed565b61013b60045481565b6040519081526020016100ed565b6100d6610157366004610f4e565b6103f1565b6101de61016a366004610ff5565b604080516080810182526000808252602082018190529181018290526060810182905250506000818152600560209081526040918290208251608081018452815480825260018301546001600160a01b03169382019390935260028201549381019390935260030154606083015290911491565b60408051921515835281516020808501919091528201516001600160a01b0316838201528101516060808401919091520151608082015260a0016100ed565b600654610230906001600160a01b031681565b6040516001600160a01b0390911681526020016100ed565b600354610100900460ff16610122565b6100d661026636600461100e565b610479565b6100d66102793660046110d4565b6105dc565b600160006102926040870160208801610e87565b6001600160a01b0316815260208101919091526040016000205460ff166103005760405162461bcd60e51b815260206004820152601760248201527f61676772656761746f72206e6f7420617474657374656400000000000000000060448201526064015b60405180910390fd5b610309846105fb565b61031281610633565b50505050565b60606002805480602002602001604051908101604052809291908181526020016000905b828210156103e857838290600052602060002001805461035b90611116565b80601f016020809104026020016040519081016040528092919081815260200182805461038790611116565b80156103d45780601f106103a9576101008083540402835291602001916103d4565b820191906000526020600020905b8154815290600101906020018083116103b757829003601f168201915b50505050508152602001906001019061033c565b50505050905090565b60035460ff161561040157600080fd5b60038054600160ff1991821681179092556001600160a01b03881660009081526020838152604082208054909316841790925560028054938401815590528451610470927f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace0191860190610bf6565b50505050505050565b6001600160a01b03861660009081526001602052604090205460ff168061049f57600080fd5b811561056f5760006104d5888886886040516020016104c19493929190611151565b6040516020818303038152906040526106f3565b905060006104e3828861072e565b9050886001600160a01b0316816001600160a01b03161461056c5760405162461bcd60e51b815260206004820152602c60248201527f63616c63756c61746564206164647265737320616e642061747465737465724960448201527f4420646f6e74206d61746368000000000000000000000000000000000000000060648201526084016102f7565b50505b6001600160a01b03861660009081526001602081815260408320805460ff19168317905560028054928301815590925284516105d2927f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace90920191860190610bf6565b5050505050505050565b3360009081526020819052604090206105f6908383610c7a565b505050565b80356000908152600560205260409020819061061782826111ad565b5050600454606082013511156106305760608101356004555b50565b6000610642604083018361120e565b9050905060005b818110156105f6576006546001600160a01b0316639730886d61066f604086018661120e565b8481811061067f5761067f611258565b9050602002810190610691919061126e565b60016040518363ffffffff1660e01b81526004016106b0929190611327565b600060405180830381600087803b1580156106ca57600080fd5b505af11580156106de573d6000803e3d6000fd5b50505050806106ec906113f4565b9050610649565b60006106ff8251610752565b8260405160200161071192919061140f565b604051602081830303815290604052805190602001209050919050565b600080600061073d858561088c565b9150915061074a816108fc565b509392505050565b60608161079257505060408051808201909152600181527f3000000000000000000000000000000000000000000000000000000000000000602082015290565b8160005b81156107bc57806107a6816113f4565b91506107b59050600a83611480565b9150610796565b60008167ffffffffffffffff8111156107d7576107d7610eab565b6040519080825280601f01601f191660200182016040528015610801576020820181803683370190505b5090505b841561088457610816600183611494565b9150610823600a866114ab565b61082e9060306114bf565b60f81b81838151811061084357610843611258565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535061087d600a86611480565b9450610805565b949350505050565b6000808251604114156108c35760208301516040840151606085015160001a6108b787828585610ab7565b945094505050506108f5565b8251604014156108ed57602083015160408401516108e2868383610ba4565b9350935050506108f5565b506000905060025b9250929050565b6000816004811115610910576109106114d7565b14156109195750565b600181600481111561092d5761092d6114d7565b141561097b5760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e6174757265000000000000000060448201526064016102f7565b600281600481111561098f5761098f6114d7565b14156109dd5760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e6774680060448201526064016102f7565b60038160048111156109f1576109f16114d7565b1415610a4a5760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b60648201526084016102f7565b6004816004811115610a5e57610a5e6114d7565b14156106305760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c604482015261756560f01b60648201526084016102f7565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0831115610aee5750600090506003610b9b565b8460ff16601b14158015610b0657508460ff16601c14155b15610b175750600090506004610b9b565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015610b6b573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116610b9457600060019250925050610b9b565b9150600090505b94509492505050565b6000807f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff831681610bda60ff86901c601b6114bf565b9050610be887828885610ab7565b935093505050935093915050565b828054610c0290611116565b90600052602060002090601f016020900481019282610c245760008555610c6a565b82601f10610c3d57805160ff1916838001178555610c6a565b82800160010185558215610c6a579182015b82811115610c6a578251825591602001919060010190610c4f565b50610c76929150610cee565b5090565b828054610c8690611116565b90600052602060002090601f016020900481019282610ca85760008555610c6a565b82601f10610cc15782800160ff19823516178555610c6a565b82800160010185558215610c6a579182015b82811115610c6a578235825591602001919060010190610cd3565b5b80821115610c765760008155600101610cef565b60008083601f840112610d1557600080fd5b50813567ffffffffffffffff811115610d2d57600080fd5b6020830191508360208285010111156108f557600080fd5b60008060008084860360c0811215610d5c57600080fd5b6080811215610d6a57600080fd5b50849350608085013567ffffffffffffffff80821115610d8957600080fd5b610d9588838901610d03565b909550935060a0870135915080821115610dae57600080fd5b50850160608188031215610dc157600080fd5b939692955090935050565b60005b83811015610de7578181015183820152602001610dcf565b838111156103125750506000910152565b6000602080830181845280855180835260408601915060408160051b870101925083870160005b82811015610e6557878503603f1901845281518051808752610e46818989018a8501610dcc565b601f01601f191695909501860194509285019290850190600101610e1f565b5092979650505050505050565b6001600160a01b038116811461063057600080fd5b600060208284031215610e9957600080fd5b8135610ea481610e72565b9392505050565b634e487b7160e01b600052604160045260246000fd5b600082601f830112610ed257600080fd5b813567ffffffffffffffff80821115610eed57610eed610eab565b604051601f8301601f19908116603f01168101908282118183101715610f1557610f15610eab565b81604052838152866020858801011115610f2e57600080fd5b836020870160208301376000602085830101528094505050505092915050565b60008060008060008060808789031215610f6757600080fd5b8635610f7281610e72565b9550602087013567ffffffffffffffff80821115610f8f57600080fd5b610f9b8a838b01610d03565b90975095506040890135915080821115610fb457600080fd5b610fc08a838b01610ec1565b94506060890135915080821115610fd657600080fd5b50610fe389828a01610d03565b979a9699509497509295939492505050565b60006020828403121561100757600080fd5b5035919050565b60008060008060008060c0878903121561102757600080fd5b863561103281610e72565b9550602087013561104281610e72565b9450604087013567ffffffffffffffff8082111561105f57600080fd5b61106b8a838b01610ec1565b9550606089013591508082111561108157600080fd5b61108d8a838b01610ec1565b945060808901359150808211156110a357600080fd5b506110b089828a01610ec1565b92505060a087013580151581146110c657600080fd5b809150509295509295509295565b600080602083850312156110e757600080fd5b823567ffffffffffffffff8111156110fe57600080fd5b61110a85828601610d03565b90969095509350505050565b600181811c9082168061112a57607f821691505b6020821081141561114b57634e487b7160e01b600052602260045260246000fd5b50919050565b60006bffffffffffffffffffffffff19808760601b168352808660601b166014840152508351611188816028850160208801610dcc565b83519083019061119f816028840160208801610dcc565b016028019695505050505050565b813581556001810160208301356111c381610e72565b6001600160a01b0381167fffffffffffffffffffffffff0000000000000000000000000000000000000000835416178255505060408201356002820155606082013560038201555050565b6000808335601e1984360301811261122557600080fd5b83018035915067ffffffffffffffff82111561124057600080fd5b6020019150600581901b36038213156108f557600080fd5b634e487b7160e01b600052603260045260246000fd5b6000823560be1983360301811261128457600080fd5b9190910192915050565b803563ffffffff811681146112a257600080fd5b919050565b6000808335601e198436030181126112be57600080fd5b830160208101925035905067ffffffffffffffff8111156112de57600080fd5b8036038313156108f557600080fd5b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b803560ff811681146112a257600080fd5b604081526000833561133881610e72565b6001600160a01b03166040830152602084013567ffffffffffffffff811680821461136257600080fd5b6060840152506113746040850161128e565b63ffffffff16608083015261138b6060850161128e565b63ffffffff1660a08301526113a360808501856112a7565b60c0808501526113b8610100850182846112ed565b9150506113c760a08601611316565b60ff1660e084015260209092019290925292915050565b634e487b7160e01b600052601160045260246000fd5b6000600019821415611408576114086113de565b5060010190565b7f19457468657265756d205369676e6564204d6573736167653a0a00000000000081526000835161144781601a850160208801610dcc565b83519083019061145e81601a840160208801610dcc565b01601a01949350505050565b634e487b7160e01b600052601260045260246000fd5b60008261148f5761148f61146a565b500490565b6000828210156114a6576114a66113de565b500390565b6000826114ba576114ba61146a565b500690565b600082198211156114d2576114d26113de565b500190565b634e487b7160e01b600052602160045260246000fdfea26469706673582212209552f1cfdba89f8fec237f3018fb1776a00c99b31c6f92d24ceb921760a7e36764736f6c63430008090033608060405234801561001057600080fd5b5061001a3361001f565b61006f565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b61102e8061007e6000396000f3fe60806040526004361061009a5760003560e01c8063715018a6116100695780639730886d1161004e5780639730886d1461022f578063b1454caa1461024f578063f2fde38b1461028857610112565b8063715018a6146101f25780638da5cb5b1461020757610112565b80630fcfbd111461015a5780631f5491391461018d57806324a084df146101af57806333a88c72146101c257610112565b366101125760405162461bcd60e51b815260206004820152602c60248201527f74686520576f726d686f6c6520636f6e747261637420646f6573206e6f74206160448201527f636365707420617373657473000000000000000000000000000000000000000060648201526084015b60405180910390fd5b60405162461bcd60e51b815260206004820152600b60248201527f756e737570706f727465640000000000000000000000000000000000000000006044820152606401610109565b34801561016657600080fd5b5061017a61017536600461094e565b6102a8565b6040519081526020015b60405180910390f35b34801561019957600080fd5b506101ad6101a8366004610998565b61035e565b005b6101ad6101bd366004610998565b610420565b3480156101ce57600080fd5b506101e26101dd36600461094e565b6104e3565b6040519015158152602001610184565b3480156101fe57600080fd5b506101ad610536565b34801561021357600080fd5b506000546040516001600160a01b039091168152602001610184565b34801561023b57600080fd5b506101ad61024a3660046109c4565b61059c565b34801561025b57600080fd5b5061026f61026a366004610a3a565b610740565b60405167ffffffffffffffff9091168152602001610184565b34801561029457600080fd5b506101ad6102a3366004610ae7565b610799565b600080826040516020016102bc9190610b43565b60408051601f19818403018152918152815160209283012060008181526001909352912054909150806103575760405162461bcd60e51b815260206004820152602160248201527f54686973206d65737361676520776173206e65766572207375626d697474656460448201527f2e000000000000000000000000000000000000000000000000000000000000006064820152608401610109565b9392505050565b6000546001600160a01b031633146103b85760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610109565b6000826001600160a01b03168260405160006040518083038185875af1925050503d8060008114610405576040519150601f19603f3d011682016040523d82523d6000602084013e61040a565b606091505b505090508061041b5761041b610c2d565b505050565b600034116104965760405162461bcd60e51b815260206004820152603060248201527f417474656d7074696e6720746f2073656e642076616c756520776974686f757460448201527f2070726f766964696e67204574686572000000000000000000000000000000006064820152608401610109565b604080513381526001600160a01b03841660208201529081018290527ff1365f826a788d6c1a955db0eed5ba8642674219c4771f8c65918617511a15609060600160405180910390a15050565b600080826040516020016104f79190610b43565b60408051601f19818403018152918152815160209283012060008181526001909352912054909150801580159061052e5750428111155b949350505050565b6000546001600160a01b031633146105905760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610109565b61059a600061087b565b565b6000546001600160a01b031633146105f65760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610109565b60006106028242610c59565b90506000836040516020016106179190610b43565b60408051601f19818403018152918152815160209283012060008181526001909352912054909150156106b25760405162461bcd60e51b815260206004820152602160248201527f4d657373616765207375626d6974746564206d6f7265207468616e206f6e636560448201527f21000000000000000000000000000000000000000000000000000000000000006064820152608401610109565b60008181526001602090815260408220849055600291906106d590870187610ae7565b6001600160a01b0316815260208101919091526040016000908120906107016080870160608801610c71565b63ffffffff168152602080820192909252604001600090812080546001810182559082529190208591600402016107388282610e4e565b505050505050565b600061074b336108d8565b90507fb93c37389233beb85a3a726c3f15c2d15533ee74cb602f20f490dfffef775937338288888888886040516107889796959493929190610f6c565b60405180910390a195945050505050565b6000546001600160a01b031633146107f35760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610109565b6001600160a01b03811661086f5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610109565b6108788161087b565b50565b600080546001600160a01b0383811673ffffffffffffffffffffffffffffffffffffffff19831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6001600160a01b0381166000908152600360205260408120805467ffffffffffffffff16916001919061090b8385610fcc565b92506101000a81548167ffffffffffffffff021916908367ffffffffffffffff160217905550919050565b600060c0828403121561094857600080fd5b50919050565b60006020828403121561096057600080fd5b813567ffffffffffffffff81111561097757600080fd5b61052e84828501610936565b6001600160a01b038116811461087857600080fd5b600080604083850312156109ab57600080fd5b82356109b681610983565b946020939093013593505050565b600080604083850312156109d757600080fd5b823567ffffffffffffffff8111156109ee57600080fd5b6109fa85828601610936565b95602094909401359450505050565b63ffffffff8116811461087857600080fd5b60ff8116811461087857600080fd5b8035610a3581610a1b565b919050565b600080600080600060808688031215610a5257600080fd5b8535610a5d81610a09565b94506020860135610a6d81610a09565b9350604086013567ffffffffffffffff80821115610a8a57600080fd5b818801915088601f830112610a9e57600080fd5b813581811115610aad57600080fd5b896020828501011115610abf57600080fd5b6020830195508094505050506060860135610ad981610a1b565b809150509295509295909350565b600060208284031215610af957600080fd5b813561035781610983565b67ffffffffffffffff8116811461087857600080fd5b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b6020815260008235610b5481610983565b6001600160a01b0381166020840152506020830135610b7281610b04565b67ffffffffffffffff808216604085015260408501359150610b9382610a09565b63ffffffff808316606086015260608601359250610bb083610a09565b80831660808601525060808501359150601e19853603018212610bd257600080fd5b90840190813581811115610be557600080fd5b803603861315610bf457600080fd5b60c060a0860152610c0c60e086018260208601610b1a565b92505050610c1c60a08501610a2a565b60ff811660c0850152509392505050565b634e487b7160e01b600052600160045260246000fd5b634e487b7160e01b600052601160045260246000fd5b60008219821115610c6c57610c6c610c43565b500190565b600060208284031215610c8357600080fd5b813561035781610a09565b60008135610c9b81610a09565b92915050565b6000808335601e19843603018112610cb857600080fd5b83018035915067ffffffffffffffff821115610cd357600080fd5b602001915036819003821315610ce857600080fd5b9250929050565b634e487b7160e01b600052604160045260246000fd5b600181811c90821680610d1957607f821691505b6020821081141561094857634e487b7160e01b600052602260045260246000fd5b601f82111561041b57600081815260208120601f850160051c81016020861015610d615750805b601f850160051c820191505b8181101561073857828155600101610d6d565b67ffffffffffffffff831115610d9857610d98610cef565b610dac83610da68354610d05565b83610d3a565b6000601f841160018114610de05760008515610dc85750838201355b600019600387901b1c1916600186901b178355610e3a565b600083815260209020601f19861690835b82811015610e115786850135825560209485019460019092019101610df1565b5086821015610e2e5760001960f88860031b161c19848701351681555b505060018560011b0183555b5050505050565b60008135610c9b81610a1b565b8135610e5981610983565b6001600160a01b038116905081548173ffffffffffffffffffffffffffffffffffffffff1982161783556020840135610e9181610b04565b7bffffffffffffffff00000000000000000000000000000000000000008160a01b1690507fffffffff0000000000000000000000000000000000000000000000000000000081848285161717855560408601359250610eef83610a09565b921760e09190911b909116178155610f27610f0c60608401610c8e565b6001830163ffffffff821663ffffffff198254161781555050565b610f346080830183610ca1565b610f42818360028601610d80565b5050610f68610f5360a08401610e41565b6003830160ff821660ff198254161781555050565b5050565b6001600160a01b038816815267ffffffffffffffff87166020820152600063ffffffff808816604084015280871660608401525060c06080830152610fb560c083018587610b1a565b905060ff831660a083015298975050505050505050565b600067ffffffffffffffff808316818516808303821115610fef57610fef610c43565b0194935050505056fea2646970667358221220db9085898705ac4b6f63e7d49c8fd3db14d606656b9bd451ec0bef92555d558b64736f6c63430008090033", + Bin: "0x6080604052600060045534801561001557600080fd5b5060405161002290610096565b604051809103906000f08015801561003e573d6000803e3d6000fd5b50600680546001600160a01b0319166001600160a01b039290921691821790556040519081527fbd726cf82ac9c3260b1495107182e336e0654b25c10915648c0cc15b2bb72cbf9060200160405180910390a16100a3565b6110df806115d583390190565b611523806100b26000396000f3fe608060405234801561001057600080fd5b50600436106100be5760003560e01c80638236a7ba11610076578063a52f433c1161005b578063a52f433c14610248578063bbd79e1514610258578063e34fbfc81461026b57600080fd5b80638236a7ba1461015c578063a1a227fa1461021d57600080fd5b806343348b2f116100a757806343348b2f146100f6578063440c953b1461013257806359a900711461014957600080fd5b806302bf9317146100c3578063324ff866146100d8575b600080fd5b6100d66100d1366004610d45565b61027e565b005b6100e0610318565b6040516100ed9190610df8565b60405180910390f35b610122610104366004610e87565b6001600160a01b031660009081526001602052604090205460ff1690565b60405190151581526020016100ed565b61013b60045481565b6040519081526020016100ed565b6100d6610157366004610f4e565b6103f1565b6101de61016a366004610ff5565b604080516080810182526000808252602082018190529181018290526060810182905250506000818152600560209081526040918290208251608081018452815480825260018301546001600160a01b03169382019390935260028201549381019390935260030154606083015290911491565b60408051921515835281516020808501919091528201516001600160a01b0316838201528101516060808401919091520151608082015260a0016100ed565b600654610230906001600160a01b031681565b6040516001600160a01b0390911681526020016100ed565b600354610100900460ff16610122565b6100d661026636600461100e565b610479565b6100d66102793660046110d4565b6105dc565b600160006102926040870160208801610e87565b6001600160a01b0316815260208101919091526040016000205460ff166103005760405162461bcd60e51b815260206004820152601760248201527f61676772656761746f72206e6f7420617474657374656400000000000000000060448201526064015b60405180910390fd5b610309846105fb565b61031281610633565b50505050565b60606002805480602002602001604051908101604052809291908181526020016000905b828210156103e857838290600052602060002001805461035b90611116565b80601f016020809104026020016040519081016040528092919081815260200182805461038790611116565b80156103d45780601f106103a9576101008083540402835291602001916103d4565b820191906000526020600020905b8154815290600101906020018083116103b757829003601f168201915b50505050508152602001906001019061033c565b50505050905090565b60035460ff161561040157600080fd5b60038054600160ff1991821681179092556001600160a01b03881660009081526020838152604082208054909316841790925560028054938401815590528451610470927f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace0191860190610bf6565b50505050505050565b6001600160a01b03861660009081526001602052604090205460ff168061049f57600080fd5b811561056f5760006104d5888886886040516020016104c19493929190611151565b6040516020818303038152906040526106f3565b905060006104e3828861072e565b9050886001600160a01b0316816001600160a01b03161461056c5760405162461bcd60e51b815260206004820152602c60248201527f63616c63756c61746564206164647265737320616e642061747465737465724960448201527f4420646f6e74206d61746368000000000000000000000000000000000000000060648201526084016102f7565b50505b6001600160a01b03861660009081526001602081815260408320805460ff19168317905560028054928301815590925284516105d2927f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace90920191860190610bf6565b5050505050505050565b3360009081526020819052604090206105f6908383610c7a565b505050565b80356000908152600560205260409020819061061782826111ad565b5050600454606082013511156106305760608101356004555b50565b6000610642604083018361120e565b9050905060005b818110156105f6576006546001600160a01b0316639730886d61066f604086018661120e565b8481811061067f5761067f611258565b9050602002810190610691919061126e565b60016040518363ffffffff1660e01b81526004016106b0929190611327565b600060405180830381600087803b1580156106ca57600080fd5b505af11580156106de573d6000803e3d6000fd5b50505050806106ec906113f4565b9050610649565b60006106ff8251610752565b8260405160200161071192919061140f565b604051602081830303815290604052805190602001209050919050565b600080600061073d858561088c565b9150915061074a816108fc565b509392505050565b60608161079257505060408051808201909152600181527f3000000000000000000000000000000000000000000000000000000000000000602082015290565b8160005b81156107bc57806107a6816113f4565b91506107b59050600a83611480565b9150610796565b60008167ffffffffffffffff8111156107d7576107d7610eab565b6040519080825280601f01601f191660200182016040528015610801576020820181803683370190505b5090505b841561088457610816600183611494565b9150610823600a866114ab565b61082e9060306114bf565b60f81b81838151811061084357610843611258565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535061087d600a86611480565b9450610805565b949350505050565b6000808251604114156108c35760208301516040840151606085015160001a6108b787828585610ab7565b945094505050506108f5565b8251604014156108ed57602083015160408401516108e2868383610ba4565b9350935050506108f5565b506000905060025b9250929050565b6000816004811115610910576109106114d7565b14156109195750565b600181600481111561092d5761092d6114d7565b141561097b5760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e6174757265000000000000000060448201526064016102f7565b600281600481111561098f5761098f6114d7565b14156109dd5760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e6774680060448201526064016102f7565b60038160048111156109f1576109f16114d7565b1415610a4a5760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b60648201526084016102f7565b6004816004811115610a5e57610a5e6114d7565b14156106305760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c604482015261756560f01b60648201526084016102f7565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0831115610aee5750600090506003610b9b565b8460ff16601b14158015610b0657508460ff16601c14155b15610b175750600090506004610b9b565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015610b6b573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116610b9457600060019250925050610b9b565b9150600090505b94509492505050565b6000807f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff831681610bda60ff86901c601b6114bf565b9050610be887828885610ab7565b935093505050935093915050565b828054610c0290611116565b90600052602060002090601f016020900481019282610c245760008555610c6a565b82601f10610c3d57805160ff1916838001178555610c6a565b82800160010185558215610c6a579182015b82811115610c6a578251825591602001919060010190610c4f565b50610c76929150610cee565b5090565b828054610c8690611116565b90600052602060002090601f016020900481019282610ca85760008555610c6a565b82601f10610cc15782800160ff19823516178555610c6a565b82800160010185558215610c6a579182015b82811115610c6a578235825591602001919060010190610cd3565b5b80821115610c765760008155600101610cef565b60008083601f840112610d1557600080fd5b50813567ffffffffffffffff811115610d2d57600080fd5b6020830191508360208285010111156108f557600080fd5b60008060008084860360c0811215610d5c57600080fd5b6080811215610d6a57600080fd5b50849350608085013567ffffffffffffffff80821115610d8957600080fd5b610d9588838901610d03565b909550935060a0870135915080821115610dae57600080fd5b50850160608188031215610dc157600080fd5b939692955090935050565b60005b83811015610de7578181015183820152602001610dcf565b838111156103125750506000910152565b6000602080830181845280855180835260408601915060408160051b870101925083870160005b82811015610e6557878503603f1901845281518051808752610e46818989018a8501610dcc565b601f01601f191695909501860194509285019290850190600101610e1f565b5092979650505050505050565b6001600160a01b038116811461063057600080fd5b600060208284031215610e9957600080fd5b8135610ea481610e72565b9392505050565b634e487b7160e01b600052604160045260246000fd5b600082601f830112610ed257600080fd5b813567ffffffffffffffff80821115610eed57610eed610eab565b604051601f8301601f19908116603f01168101908282118183101715610f1557610f15610eab565b81604052838152866020858801011115610f2e57600080fd5b836020870160208301376000602085830101528094505050505092915050565b60008060008060008060808789031215610f6757600080fd5b8635610f7281610e72565b9550602087013567ffffffffffffffff80821115610f8f57600080fd5b610f9b8a838b01610d03565b90975095506040890135915080821115610fb457600080fd5b610fc08a838b01610ec1565b94506060890135915080821115610fd657600080fd5b50610fe389828a01610d03565b979a9699509497509295939492505050565b60006020828403121561100757600080fd5b5035919050565b60008060008060008060c0878903121561102757600080fd5b863561103281610e72565b9550602087013561104281610e72565b9450604087013567ffffffffffffffff8082111561105f57600080fd5b61106b8a838b01610ec1565b9550606089013591508082111561108157600080fd5b61108d8a838b01610ec1565b945060808901359150808211156110a357600080fd5b506110b089828a01610ec1565b92505060a087013580151581146110c657600080fd5b809150509295509295509295565b600080602083850312156110e757600080fd5b823567ffffffffffffffff8111156110fe57600080fd5b61110a85828601610d03565b90969095509350505050565b600181811c9082168061112a57607f821691505b6020821081141561114b57634e487b7160e01b600052602260045260246000fd5b50919050565b60006bffffffffffffffffffffffff19808760601b168352808660601b166014840152508351611188816028850160208801610dcc565b83519083019061119f816028840160208801610dcc565b016028019695505050505050565b813581556001810160208301356111c381610e72565b6001600160a01b0381167fffffffffffffffffffffffff0000000000000000000000000000000000000000835416178255505060408201356002820155606082013560038201555050565b6000808335601e1984360301811261122557600080fd5b83018035915067ffffffffffffffff82111561124057600080fd5b6020019150600581901b36038213156108f557600080fd5b634e487b7160e01b600052603260045260246000fd5b6000823560be1983360301811261128457600080fd5b9190910192915050565b803563ffffffff811681146112a257600080fd5b919050565b6000808335601e198436030181126112be57600080fd5b830160208101925035905067ffffffffffffffff8111156112de57600080fd5b8036038313156108f557600080fd5b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b803560ff811681146112a257600080fd5b604081526000833561133881610e72565b6001600160a01b03166040830152602084013567ffffffffffffffff811680821461136257600080fd5b6060840152506113746040850161128e565b63ffffffff16608083015261138b6060850161128e565b63ffffffff1660a08301526113a360808501856112a7565b60c0808501526113b8610100850182846112ed565b9150506113c760a08601611316565b60ff1660e084015260209092019290925292915050565b634e487b7160e01b600052601160045260246000fd5b6000600019821415611408576114086113de565b5060010190565b7f19457468657265756d205369676e6564204d6573736167653a0a00000000000081526000835161144781601a850160208801610dcc565b83519083019061145e81601a840160208801610dcc565b01601a01949350505050565b634e487b7160e01b600052601260045260246000fd5b60008261148f5761148f61146a565b500490565b6000828210156114a6576114a66113de565b500390565b6000826114ba576114ba61146a565b500690565b600082198211156114d2576114d26113de565b500190565b634e487b7160e01b600052602160045260246000fdfea2646970667358221220c07624c7daf40d90874282c40a93dc09dec28072444addd673ebe4f7b875e2e664736f6c63430008090033608060405234801561001057600080fd5b5061001a3361001f565b61006f565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6110618061007e6000396000f3fe60806040526004361061009a5760003560e01c80638da5cb5b1161006957806399a3ad211161004e57806399a3ad211461022f578063b1454caa1461024f578063f2fde38b1461028857610112565b80638da5cb5b146101e75780639730886d1461020f57610112565b80630fcfbd111461015a57806333a88c721461018d578063346633fb146101bd578063715018a6146101d257610112565b366101125760405162461bcd60e51b815260206004820152602c60248201527f74686520576f726d686f6c6520636f6e747261637420646f6573206e6f74206160448201527f636365707420617373657473000000000000000000000000000000000000000060648201526084015b60405180910390fd5b60405162461bcd60e51b815260206004820152600b60248201527f756e737570706f727465640000000000000000000000000000000000000000006044820152606401610109565b34801561016657600080fd5b5061017a610175366004610997565b6102a8565b6040519081526020015b60405180910390f35b34801561019957600080fd5b506101ad6101a8366004610997565b61035e565b6040519015158152602001610184565b6101d06101cb3660046109e1565b6103b1565b005b3480156101de57600080fd5b506101d061047d565b3480156101f357600080fd5b506000546040516001600160a01b039091168152602001610184565b34801561021b57600080fd5b506101d061022a366004610a0d565b6104e3565b34801561023b57600080fd5b506101d061024a3660046109e1565b610687565b34801561025b57600080fd5b5061026f61026a366004610a83565b610789565b60405167ffffffffffffffff9091168152602001610184565b34801561029457600080fd5b506101d06102a3366004610b30565b6107e2565b600080826040516020016102bc9190610b8c565b60408051601f19818403018152918152815160209283012060008181526001909352912054909150806103575760405162461bcd60e51b815260206004820152602160248201527f54686973206d65737361676520776173206e65766572207375626d697474656460448201527f2e000000000000000000000000000000000000000000000000000000000000006064820152608401610109565b9392505050565b600080826040516020016103729190610b8c565b60408051601f1981840301815291815281516020928301206000818152600190935291205490915080158015906103a95750428111155b949350505050565b6000341180156103c057508034145b6104325760405162461bcd60e51b815260206004820152603060248201527f417474656d7074696e6720746f2073656e642076616c756520776974686f757460448201527f2070726f766964696e67204574686572000000000000000000000000000000006064820152608401610109565b604080513381526001600160a01b0384166020820152348183015290517ff1365f826a788d6c1a955db0eed5ba8642674219c4771f8c65918617511a15609181900360600190a15050565b6000546001600160a01b031633146104d75760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610109565b6104e160006108c4565b565b6000546001600160a01b0316331461053d5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610109565b60006105498242610c8c565b905060008360405160200161055e9190610b8c565b60408051601f19818403018152918152815160209283012060008181526001909352912054909150156105f95760405162461bcd60e51b815260206004820152602160248201527f4d657373616765207375626d6974746564206d6f7265207468616e206f6e636560448201527f21000000000000000000000000000000000000000000000000000000000000006064820152608401610109565b600081815260016020908152604082208490556002919061061c90870187610b30565b6001600160a01b0316815260208101919091526040016000908120906106486080870160608801610ca4565b63ffffffff1681526020808201929092526040016000908120805460018101825590825291902085916004020161067f8282610e81565b505050505050565b6000546001600160a01b031633146106e15760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610109565b6000826001600160a01b03168260405160006040518083038185875af1925050503d806000811461072e576040519150601f19603f3d011682016040523d82523d6000602084013e610733565b606091505b50509050806107845760405162461bcd60e51b815260206004820152601460248201527f6661696c65642073656e64696e672076616c75650000000000000000000000006044820152606401610109565b505050565b600061079433610921565b90507fb93c37389233beb85a3a726c3f15c2d15533ee74cb602f20f490dfffef775937338288888888886040516107d19796959493929190610f9f565b60405180910390a195945050505050565b6000546001600160a01b0316331461083c5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610109565b6001600160a01b0381166108b85760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610109565b6108c1816108c4565b50565b600080546001600160a01b0383811673ffffffffffffffffffffffffffffffffffffffff19831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6001600160a01b0381166000908152600360205260408120805467ffffffffffffffff1691600191906109548385610fff565b92506101000a81548167ffffffffffffffff021916908367ffffffffffffffff160217905550919050565b600060c0828403121561099157600080fd5b50919050565b6000602082840312156109a957600080fd5b813567ffffffffffffffff8111156109c057600080fd5b6103a98482850161097f565b6001600160a01b03811681146108c157600080fd5b600080604083850312156109f457600080fd5b82356109ff816109cc565b946020939093013593505050565b60008060408385031215610a2057600080fd5b823567ffffffffffffffff811115610a3757600080fd5b610a438582860161097f565b95602094909401359450505050565b63ffffffff811681146108c157600080fd5b60ff811681146108c157600080fd5b8035610a7e81610a64565b919050565b600080600080600060808688031215610a9b57600080fd5b8535610aa681610a52565b94506020860135610ab681610a52565b9350604086013567ffffffffffffffff80821115610ad357600080fd5b818801915088601f830112610ae757600080fd5b813581811115610af657600080fd5b896020828501011115610b0857600080fd5b6020830195508094505050506060860135610b2281610a64565b809150509295509295909350565b600060208284031215610b4257600080fd5b8135610357816109cc565b67ffffffffffffffff811681146108c157600080fd5b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b6020815260008235610b9d816109cc565b6001600160a01b0381166020840152506020830135610bbb81610b4d565b67ffffffffffffffff808216604085015260408501359150610bdc82610a52565b63ffffffff808316606086015260608601359250610bf983610a52565b80831660808601525060808501359150601e19853603018212610c1b57600080fd5b90840190813581811115610c2e57600080fd5b803603861315610c3d57600080fd5b60c060a0860152610c5560e086018260208601610b63565b92505050610c6560a08501610a73565b60ff811660c0850152509392505050565b634e487b7160e01b600052601160045260246000fd5b60008219821115610c9f57610c9f610c76565b500190565b600060208284031215610cb657600080fd5b813561035781610a52565b60008135610cce81610a52565b92915050565b6000808335601e19843603018112610ceb57600080fd5b83018035915067ffffffffffffffff821115610d0657600080fd5b602001915036819003821315610d1b57600080fd5b9250929050565b634e487b7160e01b600052604160045260246000fd5b600181811c90821680610d4c57607f821691505b6020821081141561099157634e487b7160e01b600052602260045260246000fd5b601f82111561078457600081815260208120601f850160051c81016020861015610d945750805b601f850160051c820191505b8181101561067f57828155600101610da0565b67ffffffffffffffff831115610dcb57610dcb610d22565b610ddf83610dd98354610d38565b83610d6d565b6000601f841160018114610e135760008515610dfb5750838201355b600019600387901b1c1916600186901b178355610e6d565b600083815260209020601f19861690835b82811015610e445786850135825560209485019460019092019101610e24565b5086821015610e615760001960f88860031b161c19848701351681555b505060018560011b0183555b5050505050565b60008135610cce81610a64565b8135610e8c816109cc565b6001600160a01b038116905081548173ffffffffffffffffffffffffffffffffffffffff1982161783556020840135610ec481610b4d565b7bffffffffffffffff00000000000000000000000000000000000000008160a01b1690507fffffffff0000000000000000000000000000000000000000000000000000000081848285161717855560408601359250610f2283610a52565b921760e09190911b909116178155610f5a610f3f60608401610cc1565b6001830163ffffffff821663ffffffff198254161781555050565b610f676080830183610cd4565b610f75818360028601610db3565b5050610f9b610f8660a08401610e74565b6003830160ff821660ff198254161781555050565b5050565b6001600160a01b038816815267ffffffffffffffff87166020820152600063ffffffff808816604084015280871660608401525060c06080830152610fe860c083018587610b63565b905060ff831660a083015298975050505050505050565b600067ffffffffffffffff80831681851680830382111561102257611022610c76565b0194935050505056fea264697066735822122063109a6cdc9bbd5b431dfdf74254f19660b33a9cf39810db7a8fd6169622f75364736f6c63430008090033", } // ManagementContractABI is the input ABI used to generate the binding from. diff --git a/contracts/generated/MessageBus/MessageBus.go b/contracts/generated/MessageBus/MessageBus.go index a7d1a93461..3e21d47a4e 100644 --- a/contracts/generated/MessageBus/MessageBus.go +++ b/contracts/generated/MessageBus/MessageBus.go @@ -41,8 +41,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\":\"receiveValue\",\"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\":\"sendValue\",\"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: "0x608060405234801561001057600080fd5b5061001a3361001f565b61006f565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b61102e8061007e6000396000f3fe60806040526004361061009a5760003560e01c8063715018a6116100695780639730886d1161004e5780639730886d1461022f578063b1454caa1461024f578063f2fde38b1461028857610112565b8063715018a6146101f25780638da5cb5b1461020757610112565b80630fcfbd111461015a5780631f5491391461018d57806324a084df146101af57806333a88c72146101c257610112565b366101125760405162461bcd60e51b815260206004820152602c60248201527f74686520576f726d686f6c6520636f6e747261637420646f6573206e6f74206160448201527f636365707420617373657473000000000000000000000000000000000000000060648201526084015b60405180910390fd5b60405162461bcd60e51b815260206004820152600b60248201527f756e737570706f727465640000000000000000000000000000000000000000006044820152606401610109565b34801561016657600080fd5b5061017a61017536600461094e565b6102a8565b6040519081526020015b60405180910390f35b34801561019957600080fd5b506101ad6101a8366004610998565b61035e565b005b6101ad6101bd366004610998565b610420565b3480156101ce57600080fd5b506101e26101dd36600461094e565b6104e3565b6040519015158152602001610184565b3480156101fe57600080fd5b506101ad610536565b34801561021357600080fd5b506000546040516001600160a01b039091168152602001610184565b34801561023b57600080fd5b506101ad61024a3660046109c4565b61059c565b34801561025b57600080fd5b5061026f61026a366004610a3a565b610740565b60405167ffffffffffffffff9091168152602001610184565b34801561029457600080fd5b506101ad6102a3366004610ae7565b610799565b600080826040516020016102bc9190610b43565b60408051601f19818403018152918152815160209283012060008181526001909352912054909150806103575760405162461bcd60e51b815260206004820152602160248201527f54686973206d65737361676520776173206e65766572207375626d697474656460448201527f2e000000000000000000000000000000000000000000000000000000000000006064820152608401610109565b9392505050565b6000546001600160a01b031633146103b85760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610109565b6000826001600160a01b03168260405160006040518083038185875af1925050503d8060008114610405576040519150601f19603f3d011682016040523d82523d6000602084013e61040a565b606091505b505090508061041b5761041b610c2d565b505050565b600034116104965760405162461bcd60e51b815260206004820152603060248201527f417474656d7074696e6720746f2073656e642076616c756520776974686f757460448201527f2070726f766964696e67204574686572000000000000000000000000000000006064820152608401610109565b604080513381526001600160a01b03841660208201529081018290527ff1365f826a788d6c1a955db0eed5ba8642674219c4771f8c65918617511a15609060600160405180910390a15050565b600080826040516020016104f79190610b43565b60408051601f19818403018152918152815160209283012060008181526001909352912054909150801580159061052e5750428111155b949350505050565b6000546001600160a01b031633146105905760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610109565b61059a600061087b565b565b6000546001600160a01b031633146105f65760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610109565b60006106028242610c59565b90506000836040516020016106179190610b43565b60408051601f19818403018152918152815160209283012060008181526001909352912054909150156106b25760405162461bcd60e51b815260206004820152602160248201527f4d657373616765207375626d6974746564206d6f7265207468616e206f6e636560448201527f21000000000000000000000000000000000000000000000000000000000000006064820152608401610109565b60008181526001602090815260408220849055600291906106d590870187610ae7565b6001600160a01b0316815260208101919091526040016000908120906107016080870160608801610c71565b63ffffffff168152602080820192909252604001600090812080546001810182559082529190208591600402016107388282610e4e565b505050505050565b600061074b336108d8565b90507fb93c37389233beb85a3a726c3f15c2d15533ee74cb602f20f490dfffef775937338288888888886040516107889796959493929190610f6c565b60405180910390a195945050505050565b6000546001600160a01b031633146107f35760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610109565b6001600160a01b03811661086f5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610109565b6108788161087b565b50565b600080546001600160a01b0383811673ffffffffffffffffffffffffffffffffffffffff19831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6001600160a01b0381166000908152600360205260408120805467ffffffffffffffff16916001919061090b8385610fcc565b92506101000a81548167ffffffffffffffff021916908367ffffffffffffffff160217905550919050565b600060c0828403121561094857600080fd5b50919050565b60006020828403121561096057600080fd5b813567ffffffffffffffff81111561097757600080fd5b61052e84828501610936565b6001600160a01b038116811461087857600080fd5b600080604083850312156109ab57600080fd5b82356109b681610983565b946020939093013593505050565b600080604083850312156109d757600080fd5b823567ffffffffffffffff8111156109ee57600080fd5b6109fa85828601610936565b95602094909401359450505050565b63ffffffff8116811461087857600080fd5b60ff8116811461087857600080fd5b8035610a3581610a1b565b919050565b600080600080600060808688031215610a5257600080fd5b8535610a5d81610a09565b94506020860135610a6d81610a09565b9350604086013567ffffffffffffffff80821115610a8a57600080fd5b818801915088601f830112610a9e57600080fd5b813581811115610aad57600080fd5b896020828501011115610abf57600080fd5b6020830195508094505050506060860135610ad981610a1b565b809150509295509295909350565b600060208284031215610af957600080fd5b813561035781610983565b67ffffffffffffffff8116811461087857600080fd5b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b6020815260008235610b5481610983565b6001600160a01b0381166020840152506020830135610b7281610b04565b67ffffffffffffffff808216604085015260408501359150610b9382610a09565b63ffffffff808316606086015260608601359250610bb083610a09565b80831660808601525060808501359150601e19853603018212610bd257600080fd5b90840190813581811115610be557600080fd5b803603861315610bf457600080fd5b60c060a0860152610c0c60e086018260208601610b1a565b92505050610c1c60a08501610a2a565b60ff811660c0850152509392505050565b634e487b7160e01b600052600160045260246000fd5b634e487b7160e01b600052601160045260246000fd5b60008219821115610c6c57610c6c610c43565b500190565b600060208284031215610c8357600080fd5b813561035781610a09565b60008135610c9b81610a09565b92915050565b6000808335601e19843603018112610cb857600080fd5b83018035915067ffffffffffffffff821115610cd357600080fd5b602001915036819003821315610ce857600080fd5b9250929050565b634e487b7160e01b600052604160045260246000fd5b600181811c90821680610d1957607f821691505b6020821081141561094857634e487b7160e01b600052602260045260246000fd5b601f82111561041b57600081815260208120601f850160051c81016020861015610d615750805b601f850160051c820191505b8181101561073857828155600101610d6d565b67ffffffffffffffff831115610d9857610d98610cef565b610dac83610da68354610d05565b83610d3a565b6000601f841160018114610de05760008515610dc85750838201355b600019600387901b1c1916600186901b178355610e3a565b600083815260209020601f19861690835b82811015610e115786850135825560209485019460019092019101610df1565b5086821015610e2e5760001960f88860031b161c19848701351681555b505060018560011b0183555b5050505050565b60008135610c9b81610a1b565b8135610e5981610983565b6001600160a01b038116905081548173ffffffffffffffffffffffffffffffffffffffff1982161783556020840135610e9181610b04565b7bffffffffffffffff00000000000000000000000000000000000000008160a01b1690507fffffffff0000000000000000000000000000000000000000000000000000000081848285161717855560408601359250610eef83610a09565b921760e09190911b909116178155610f27610f0c60608401610c8e565b6001830163ffffffff821663ffffffff198254161781555050565b610f346080830183610ca1565b610f42818360028601610d80565b5050610f68610f5360a08401610e41565b6003830160ff821660ff198254161781555050565b5050565b6001600160a01b038816815267ffffffffffffffff87166020820152600063ffffffff808816604084015280871660608401525060c06080830152610fb560c083018587610b1a565b905060ff831660a083015298975050505050505050565b600067ffffffffffffffff808316818516808303821115610fef57610fef610c43565b0194935050505056fea2646970667358221220db9085898705ac4b6f63e7d49c8fd3db14d606656b9bd451ec0bef92555d558b64736f6c63430008090033", + 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", } // MessageBusABI is the input ABI used to generate the binding from. @@ -326,25 +326,25 @@ func (_MessageBus *MessageBusTransactorSession) PublishMessage(nonce uint32, top return _MessageBus.Contract.PublishMessage(&_MessageBus.TransactOpts, nonce, topic, payload, consistencyLevel) } -// ReceiveValue is a paid mutator transaction binding the contract method 0x1f549139. +// ReceiveValueFromL2 is a paid mutator transaction binding the contract method 0x99a3ad21. // -// Solidity: function receiveValue(address receiver, uint256 amount) returns() -func (_MessageBus *MessageBusTransactor) ReceiveValue(opts *bind.TransactOpts, receiver common.Address, amount *big.Int) (*types.Transaction, error) { - return _MessageBus.contract.Transact(opts, "receiveValue", receiver, amount) +// Solidity: function receiveValueFromL2(address receiver, uint256 amount) returns() +func (_MessageBus *MessageBusTransactor) ReceiveValueFromL2(opts *bind.TransactOpts, receiver common.Address, amount *big.Int) (*types.Transaction, error) { + return _MessageBus.contract.Transact(opts, "receiveValueFromL2", receiver, amount) } -// ReceiveValue is a paid mutator transaction binding the contract method 0x1f549139. +// ReceiveValueFromL2 is a paid mutator transaction binding the contract method 0x99a3ad21. // -// Solidity: function receiveValue(address receiver, uint256 amount) returns() -func (_MessageBus *MessageBusSession) ReceiveValue(receiver common.Address, amount *big.Int) (*types.Transaction, error) { - return _MessageBus.Contract.ReceiveValue(&_MessageBus.TransactOpts, receiver, amount) +// Solidity: function receiveValueFromL2(address receiver, uint256 amount) returns() +func (_MessageBus *MessageBusSession) ReceiveValueFromL2(receiver common.Address, amount *big.Int) (*types.Transaction, error) { + return _MessageBus.Contract.ReceiveValueFromL2(&_MessageBus.TransactOpts, receiver, amount) } -// ReceiveValue is a paid mutator transaction binding the contract method 0x1f549139. +// ReceiveValueFromL2 is a paid mutator transaction binding the contract method 0x99a3ad21. // -// Solidity: function receiveValue(address receiver, uint256 amount) returns() -func (_MessageBus *MessageBusTransactorSession) ReceiveValue(receiver common.Address, amount *big.Int) (*types.Transaction, error) { - return _MessageBus.Contract.ReceiveValue(&_MessageBus.TransactOpts, receiver, amount) +// Solidity: function receiveValueFromL2(address receiver, uint256 amount) returns() +func (_MessageBus *MessageBusTransactorSession) ReceiveValueFromL2(receiver common.Address, amount *big.Int) (*types.Transaction, error) { + return _MessageBus.Contract.ReceiveValueFromL2(&_MessageBus.TransactOpts, receiver, amount) } // RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. @@ -368,25 +368,25 @@ func (_MessageBus *MessageBusTransactorSession) RenounceOwnership() (*types.Tran return _MessageBus.Contract.RenounceOwnership(&_MessageBus.TransactOpts) } -// SendValue is a paid mutator transaction binding the contract method 0x24a084df. +// SendValueToL2 is a paid mutator transaction binding the contract method 0x346633fb. // -// Solidity: function sendValue(address receiver, uint256 amount) payable returns() -func (_MessageBus *MessageBusTransactor) SendValue(opts *bind.TransactOpts, receiver common.Address, amount *big.Int) (*types.Transaction, error) { - return _MessageBus.contract.Transact(opts, "sendValue", receiver, amount) +// Solidity: function sendValueToL2(address receiver, uint256 amount) payable returns() +func (_MessageBus *MessageBusTransactor) SendValueToL2(opts *bind.TransactOpts, receiver common.Address, amount *big.Int) (*types.Transaction, error) { + return _MessageBus.contract.Transact(opts, "sendValueToL2", receiver, amount) } -// SendValue is a paid mutator transaction binding the contract method 0x24a084df. +// SendValueToL2 is a paid mutator transaction binding the contract method 0x346633fb. // -// Solidity: function sendValue(address receiver, uint256 amount) payable returns() -func (_MessageBus *MessageBusSession) SendValue(receiver common.Address, amount *big.Int) (*types.Transaction, error) { - return _MessageBus.Contract.SendValue(&_MessageBus.TransactOpts, receiver, amount) +// Solidity: function sendValueToL2(address receiver, uint256 amount) payable returns() +func (_MessageBus *MessageBusSession) SendValueToL2(receiver common.Address, amount *big.Int) (*types.Transaction, error) { + return _MessageBus.Contract.SendValueToL2(&_MessageBus.TransactOpts, receiver, amount) } -// SendValue is a paid mutator transaction binding the contract method 0x24a084df. +// SendValueToL2 is a paid mutator transaction binding the contract method 0x346633fb. // -// Solidity: function sendValue(address receiver, uint256 amount) payable returns() -func (_MessageBus *MessageBusTransactorSession) SendValue(receiver common.Address, amount *big.Int) (*types.Transaction, error) { - return _MessageBus.Contract.SendValue(&_MessageBus.TransactOpts, receiver, amount) +// Solidity: function sendValueToL2(address receiver, uint256 amount) payable returns() +func (_MessageBus *MessageBusTransactorSession) SendValueToL2(receiver common.Address, amount *big.Int) (*types.Transaction, error) { + return _MessageBus.Contract.SendValueToL2(&_MessageBus.TransactOpts, receiver, amount) } // StoreCrossChainMessage is a paid mutator transaction binding the contract method 0x9730886d. diff --git a/contracts/generated/ObsERC20/ObsERC20.go b/contracts/generated/ObsERC20/ObsERC20.go index 49f4d7ce91..c12d5386a5 100644 --- a/contracts/generated/ObsERC20/ObsERC20.go +++ b/contracts/generated/ObsERC20/ObsERC20.go @@ -32,7 +32,7 @@ var ( // 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: "0x6080604052600580546001600160a01b03191673deb34a740eca1ec42c8b8204cbec0ba34fdd27f31790553480156200003757600080fd5b5060405162000da838038062000da88339810160408190526200005a9162000207565b8151829082906200007390600390602085019062000094565b5080516200008990600490602084019062000094565b5050505050620002ae565b828054620000a29062000271565b90600052602060002090601f016020900481019282620000c6576000855562000111565b82601f10620000e157805160ff191683800117855562000111565b8280016001018555821562000111579182015b8281111562000111578251825591602001919060010190620000f4565b506200011f92915062000123565b5090565b5b808211156200011f576000815560010162000124565b634e487b7160e01b600052604160045260246000fd5b600082601f8301126200016257600080fd5b81516001600160401b03808211156200017f576200017f6200013a565b604051601f8301601f19908116603f01168101908282118183101715620001aa57620001aa6200013a565b81604052838152602092508683858801011115620001c757600080fd5b600091505b83821015620001eb5785820183015181830184015290820190620001cc565b83821115620001fd5760008385830101525b9695505050505050565b600080604083850312156200021b57600080fd5b82516001600160401b03808211156200023357600080fd5b620002418683870162000150565b935060208501519150808211156200025857600080fd5b50620002678582860162000150565b9150509250929050565b600181811c908216806200028657607f821691505b60208210811415620002a857634e487b7160e01b600052602260045260246000fd5b50919050565b610aea80620002be6000396000f3fe608060405234801561001057600080fd5b50600436106100c95760003560e01c80633950935111610081578063a457c2d71161005b578063a457c2d714610171578063a9059cbb14610184578063dd62ed3e1461019757600080fd5b8063395093511461014357806370a082311461015657806395d89b411461016957600080fd5b806318160ddd116100b257806318160ddd1461010f57806323b872dd14610121578063313ce5671461013457600080fd5b806306fdde03146100ce578063095ea7b3146100ec575b600080fd5b6100d66101aa565b6040516100e39190610927565b60405180910390f35b6100ff6100fa366004610998565b61023c565b60405190151581526020016100e3565b6002545b6040519081526020016100e3565b6100ff61012f3660046109c2565b610256565b604051601281526020016100e3565b6100ff610151366004610998565b61027a565b6101136101643660046109fe565b6102b9565b6100d6610366565b6100ff61017f366004610998565b610375565b6100ff610192366004610998565b61041f565b6101136101a5366004610a20565b61042d565b6060600380546101b990610a53565b80601f01602080910402602001604051908101604052809291908181526020018280546101e590610a53565b80156102325780601f1061020757610100808354040283529160200191610232565b820191906000526020600020905b81548152906001019060200180831161021557829003601f168201915b5050505050905090565b60003361024a81858561053e565b60019150505b92915050565b600033610264858285610696565b61026f858585610710565b506001949350505050565b3360008181526001602090815260408083206001600160a01b038716845290915281205490919061024a90829086906102b4908790610a8e565b61053e565b6000326001600160a01b03831614156102ea576001600160a01b038216600090815260208190526040902054610250565b336001600160a01b0383161415610319576001600160a01b038216600090815260208190526040902054610250565b60405162461bcd60e51b815260206004820152601f60248201527f4e6f7420616c6c6f77656420746f2072656164207468652062616c616e63650060448201526064015b60405180910390fd5b6060600480546101b990610a53565b3360008181526001602090815260408083206001600160a01b0387168452909152812054909190838110156104125760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f7760448201527f207a65726f000000000000000000000000000000000000000000000000000000606482015260840161035d565b61026f828686840361053e565b60003361024a818585610710565b6000326001600160a01b038416148061044e5750326001600160a01b038316145b15610481576001600160a01b038084166000908152600160209081526040808320938616835292905220545b9050610250565b336001600160a01b03841614806104a05750336001600160a01b038316145b156104d0576001600160a01b0380841660009081526001602090815260408083209386168352929052205461047a565b60405162461bcd60e51b815260206004820152602160248201527f4e6f7420616c6c6f77656420746f20726561642074686520616c6c6f77616e6360448201527f6500000000000000000000000000000000000000000000000000000000000000606482015260840161035d565b6001600160a01b0383166105b95760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460448201527f7265737300000000000000000000000000000000000000000000000000000000606482015260840161035d565b6001600160a01b0382166106355760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f20616464726560448201527f7373000000000000000000000000000000000000000000000000000000000000606482015260840161035d565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b60006106a2848461042d565b9050600019811461070a57818110156106fd5760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e6365000000604482015260640161035d565b61070a848484840361053e565b50505050565b6001600160a01b03831661078c5760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f20616460448201527f6472657373000000000000000000000000000000000000000000000000000000606482015260840161035d565b6001600160a01b0382166108085760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201527f6573730000000000000000000000000000000000000000000000000000000000606482015260840161035d565b6001600160a01b038316600090815260208190526040902054818110156108975760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e742065786365656473206260448201527f616c616e63650000000000000000000000000000000000000000000000000000606482015260840161035d565b6001600160a01b038085166000908152602081905260408082208585039055918516815290812080548492906108ce908490610a8e565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405161091a91815260200190565b60405180910390a361070a565b600060208083528351808285015260005b8181101561095457858101830151858201604001528201610938565b81811115610966576000604083870101525b50601f01601f1916929092016040019392505050565b80356001600160a01b038116811461099357600080fd5b919050565b600080604083850312156109ab57600080fd5b6109b48361097c565b946020939093013593505050565b6000806000606084860312156109d757600080fd5b6109e08461097c565b92506109ee6020850161097c565b9150604084013590509250925092565b600060208284031215610a1057600080fd5b610a198261097c565b9392505050565b60008060408385031215610a3357600080fd5b610a3c8361097c565b9150610a4a6020840161097c565b90509250929050565b600181811c90821680610a6757607f821691505b60208210811415610a8857634e487b7160e01b600052602260045260246000fd5b50919050565b60008219821115610aaf57634e487b7160e01b600052601160045260246000fd5b50019056fea264697066735822122016c67bba2bf0938aa37db7585ae1e5dbcca1f5543c8d87a1ec70d2b6da7fd77864736f6c63430008090033", + Bin: "0x6080604052600580546001600160a01b03191673deb34a740eca1ec42c8b8204cbec0ba34fdd27f31790553480156200003757600080fd5b5060405162000da838038062000da88339810160408190526200005a9162000207565b8151829082906200007390600390602085019062000094565b5080516200008990600490602084019062000094565b5050505050620002ae565b828054620000a29062000271565b90600052602060002090601f016020900481019282620000c6576000855562000111565b82601f10620000e157805160ff191683800117855562000111565b8280016001018555821562000111579182015b8281111562000111578251825591602001919060010190620000f4565b506200011f92915062000123565b5090565b5b808211156200011f576000815560010162000124565b634e487b7160e01b600052604160045260246000fd5b600082601f8301126200016257600080fd5b81516001600160401b03808211156200017f576200017f6200013a565b604051601f8301601f19908116603f01168101908282118183101715620001aa57620001aa6200013a565b81604052838152602092508683858801011115620001c757600080fd5b600091505b83821015620001eb5785820183015181830184015290820190620001cc565b83821115620001fd5760008385830101525b9695505050505050565b600080604083850312156200021b57600080fd5b82516001600160401b03808211156200023357600080fd5b620002418683870162000150565b935060208501519150808211156200025857600080fd5b50620002678582860162000150565b9150509250929050565b600181811c908216806200028657607f821691505b60208210811415620002a857634e487b7160e01b600052602260045260246000fd5b50919050565b610aea80620002be6000396000f3fe608060405234801561001057600080fd5b50600436106100c95760003560e01c80633950935111610081578063a457c2d71161005b578063a457c2d714610171578063a9059cbb14610184578063dd62ed3e1461019757600080fd5b8063395093511461014357806370a082311461015657806395d89b411461016957600080fd5b806318160ddd116100b257806318160ddd1461010f57806323b872dd14610121578063313ce5671461013457600080fd5b806306fdde03146100ce578063095ea7b3146100ec575b600080fd5b6100d66101aa565b6040516100e39190610927565b60405180910390f35b6100ff6100fa366004610998565b61023c565b60405190151581526020016100e3565b6002545b6040519081526020016100e3565b6100ff61012f3660046109c2565b610256565b604051601281526020016100e3565b6100ff610151366004610998565b61027a565b6101136101643660046109fe565b6102b9565b6100d6610366565b6100ff61017f366004610998565b610375565b6100ff610192366004610998565b61041f565b6101136101a5366004610a20565b61042d565b6060600380546101b990610a53565b80601f01602080910402602001604051908101604052809291908181526020018280546101e590610a53565b80156102325780601f1061020757610100808354040283529160200191610232565b820191906000526020600020905b81548152906001019060200180831161021557829003601f168201915b5050505050905090565b60003361024a81858561053e565b60019150505b92915050565b600033610264858285610696565b61026f858585610710565b506001949350505050565b3360008181526001602090815260408083206001600160a01b038716845290915281205490919061024a90829086906102b4908790610a8e565b61053e565b6000326001600160a01b03831614156102ea576001600160a01b038216600090815260208190526040902054610250565b336001600160a01b0383161415610319576001600160a01b038216600090815260208190526040902054610250565b60405162461bcd60e51b815260206004820152601f60248201527f4e6f7420616c6c6f77656420746f2072656164207468652062616c616e63650060448201526064015b60405180910390fd5b6060600480546101b990610a53565b3360008181526001602090815260408083206001600160a01b0387168452909152812054909190838110156104125760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f7760448201527f207a65726f000000000000000000000000000000000000000000000000000000606482015260840161035d565b61026f828686840361053e565b60003361024a818585610710565b6000326001600160a01b038416148061044e5750326001600160a01b038316145b15610481576001600160a01b038084166000908152600160209081526040808320938616835292905220545b9050610250565b336001600160a01b03841614806104a05750336001600160a01b038316145b156104d0576001600160a01b0380841660009081526001602090815260408083209386168352929052205461047a565b60405162461bcd60e51b815260206004820152602160248201527f4e6f7420616c6c6f77656420746f20726561642074686520616c6c6f77616e6360448201527f6500000000000000000000000000000000000000000000000000000000000000606482015260840161035d565b6001600160a01b0383166105b95760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460448201527f7265737300000000000000000000000000000000000000000000000000000000606482015260840161035d565b6001600160a01b0382166106355760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f20616464726560448201527f7373000000000000000000000000000000000000000000000000000000000000606482015260840161035d565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b60006106a2848461042d565b9050600019811461070a57818110156106fd5760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e6365000000604482015260640161035d565b61070a848484840361053e565b50505050565b6001600160a01b03831661078c5760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f20616460448201527f6472657373000000000000000000000000000000000000000000000000000000606482015260840161035d565b6001600160a01b0382166108085760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201527f6573730000000000000000000000000000000000000000000000000000000000606482015260840161035d565b6001600160a01b038316600090815260208190526040902054818110156108975760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e742065786365656473206260448201527f616c616e63650000000000000000000000000000000000000000000000000000606482015260840161035d565b6001600160a01b038085166000908152602081905260408082208585039055918516815290812080548492906108ce908490610a8e565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405161091a91815260200190565b60405180910390a361070a565b600060208083528351808285015260005b8181101561095457858101830151858201604001528201610938565b81811115610966576000604083870101525b50601f01601f1916929092016040019392505050565b80356001600160a01b038116811461099357600080fd5b919050565b600080604083850312156109ab57600080fd5b6109b48361097c565b946020939093013593505050565b6000806000606084860312156109d757600080fd5b6109e08461097c565b92506109ee6020850161097c565b9150604084013590509250925092565b600060208284031215610a1057600080fd5b610a198261097c565b9392505050565b60008060408385031215610a3357600080fd5b610a3c8361097c565b9150610a4a6020840161097c565b90509250929050565b600181811c90821680610a6757607f821691505b60208210811415610a8857634e487b7160e01b600052602260045260246000fd5b50919050565b60008219821115610aaf57634e487b7160e01b600052601160045260246000fd5b50019056fea2646970667358221220f6355dc25e10a7a88f5076ae4378073f41fca54f570f8ebea7ef5d68bcd1d47b64736f6c63430008090033", } // ObsERC20ABI is the input ABI used to generate the binding from. diff --git a/contracts/generated/ObscuroBridge/ObscuroBridge.go b/contracts/generated/ObscuroBridge/ObscuroBridge.go index d2576684b1..aeddc7319f 100644 --- a/contracts/generated/ObscuroBridge/ObscuroBridge.go +++ b/contracts/generated/ObscuroBridge/ObscuroBridge.go @@ -32,7 +32,7 @@ var ( // 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: "0x60806040526001805463ffffffff60a01b191690553480156200002157600080fd5b5060405162001bbb38038062001bbb8339810160408190526200004491620001fc565b600080546001600160a01b0319166001600160a01b038316908117909155604080516350d113fd60e11b8152905183929163a1a227fa916004808301926020929190829003018186803b1580156200009b57600080fd5b505afa158015620000b0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620000d69190620001fc565b600180546001600160a01b0319166001600160a01b039290921691909117905550620001237fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c217753362000157565b620001507fd2fb17ceaa388942529b17e0006ffc4d559f040dd4f2157b8070f17ad2110578600062000157565b506200022e565b60008281526002602090815260408083206001600160a01b038516845290915290205460ff16620001f85760008281526002602090815260408083206001600160a01b03851684529091529020805460ff19166001179055620001b73390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45b5050565b6000602082840312156200020f57600080fd5b81516001600160a01b03811681146200022757600080fd5b9392505050565b61197d806200023e6000396000f3fe60806040526004361061010e5760003560e01c80635fa7b584116100a557806393b3744211610074578063a381c8e211610059578063a381c8e21461033e578063d547741f1461035e578063e4c3ebc71461037e57600080fd5b806393b3744214610309578063a217fddf1461032957600080fd5b80635fa7b5841461024f57806375b238fc1461026f57806383bece4d146102a357806391d14854146102c357600080fd5b80632f2ff15d116100e15780632f2ff15d146101bb57806336568abe146101db578063498d82ab146101fb5780635d8729701461021b57600080fd5b806301ffc9a71461011357806316ce8149146101485780631888d7121461016a578063248a9ca31461017d575b600080fd5b34801561011f57600080fd5b5061013361012e36600461147f565b6103b2565b60405190151581526020015b60405180910390f35b34801561015457600080fd5b506101686101633660046114c1565b61041b565b005b6101686101783660046114c1565b610481565b34801561018957600080fd5b506101ad6101983660046114de565b60009081526002602052604090206001015490565b60405190815260200161013f565b3480156101c757600080fd5b506101686101d63660046114f7565b610532565b3480156101e757600080fd5b506101686101f63660046114f7565b61055d565b34801561020757600080fd5b50610168610216366004611570565b6105e5565b34801561022757600080fd5b506101ad7f9f225881f6e7ac8a885b63aa2269cbce78dd6a669864ccd2cd2517a8e709d73a81565b34801561025b57600080fd5b5061016861026a3660046114c1565b6106b3565b34801561027b57600080fd5b506101ad7fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c2177581565b3480156102af57600080fd5b506101686102be3660046115f3565b610708565b3480156102cf57600080fd5b506101336102de3660046114f7565b60009182526002602090815260408084206001600160a01b0393909316845291905290205460ff1690565b34801561031557600080fd5b506101686103243660046114c1565b61092b565b34801561033557600080fd5b506101ad600081565b34801561034a57600080fd5b506101686103593660046115f3565b610980565b34801561036a57600080fd5b506101686103793660046114f7565b610b2d565b34801561038a57600080fd5b506101ad7fd2fb17ceaa388942529b17e0006ffc4d559f040dd4f2157b8070f17ad211057881565b60006001600160e01b031982167f7965db0b00000000000000000000000000000000000000000000000000000000148061041557507f01ffc9a7000000000000000000000000000000000000000000000000000000006001600160e01b03198316145b92915050565b7fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c217756104468133610b53565b50600380547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0392909216919091179055565b600034116104d65760405162461bcd60e51b815260206004820152600f60248201527f456d707479207472616e736665722e000000000000000000000000000000000060448201526064015b60405180910390fd5b604080518082018252348082526001600160a01b03848116602093840190815284519384019290925290518116828401528251808303840181526060909201909252600354909161052e91168260005b600080610bd3565b5050565b60008281526002602052604090206001015461054e8133610b53565b6105588383610cee565b505050565b6001600160a01b03811633146105db5760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201527f20726f6c657320666f722073656c66000000000000000000000000000000000060648201526084016104cd565b61052e8282610d90565b7fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c217756106108133610b53565b61063a7f9f225881f6e7ac8a885b63aa2269cbce78dd6a669864ccd2cd2517a8e709d73a87610cee565b600063458ffd6360e01b878787878760405160240161065d95949392919061165e565b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b0319909316929092179091526003549091506106aa906001600160a01b0316826002610526565b50505050505050565b7fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c217756106de8133610b53565b61052e7f9f225881f6e7ac8a885b63aa2269cbce78dd6a669864ccd2cd2517a8e709d73a83610d90565b6003546000546001600160a01b039182169116331461078f5760405162461bcd60e51b815260206004820152603060248201527f436f6e74726163742063616c6c6572206973206e6f742074686520726567697360448201527f7465726564206d657373656e676572210000000000000000000000000000000060648201526084016104cd565b806001600160a01b03166107a1610e13565b6001600160a01b03161461081d5760405162461bcd60e51b815260206004820152603160248201527f43726f737320636861696e206d65737361676520636f6d696e672066726f6d2060448201527f696e636f72726563742073656e6465722100000000000000000000000000000060648201526084016104cd565b6001600160a01b03841660009081527f32ef73018533fa188e9e42b313c0a4048c6052342b662fb7510c0d1abcea3413602052604090205460ff161561086d57610868848484610e9f565b610925565b6001600160a01b03841660009081527f13ad2d85210d477fe1a6e25654c8250308cf29b050a4bf0b039d70467486712c602052604090205460ff16156108b7576108688383610eaa565b60405162461bcd60e51b815260206004820152602560248201527f417474656d7074696e6720746f20776974686472617720756e6b6e6f776e206160448201527f737365742e00000000000000000000000000000000000000000000000000000060648201526084016104cd565b50505050565b7fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c217756109568133610b53565b61052e7fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c2177583610cee565b600082116109d05760405162461bcd60e51b815260206004820152601a60248201527f417474656d7074696e6720656d707479207472616e736665722e00000000000060448201526064016104cd565b6001600160a01b03831660009081527f32ef73018533fa188e9e42b313c0a4048c6052342b662fb7510c0d1abcea3413602052604090205460ff16610aa35760405162461bcd60e51b815260206004820152604e60248201527f54686973206164647265737320686173206e6f74206265656e20676976656e2060448201527f61207479706520616e64206973207468757320636f6e73696465726564206e6f60648201527f742077686974656c69737465642e000000000000000000000000000000000000608482015260a4016104cd565b610aaf83333085610f4d565b604080516001600160a01b038581166024830152604482018590528381166064808401919091528351808403909101815260849092019092526020810180516001600160e01b03167f83bece4d0000000000000000000000000000000000000000000000000000000017905260035490916109259116826001610526565b600082815260026020526040902060010154610b498133610b53565b6105588383610d90565b60008281526002602090815260408083206001600160a01b038516845290915290205460ff1661052e57610b91816001600160a01b03166014610fd1565b610b9c836020610fd1565b604051602001610bad9291906116cc565b60408051601f198184030181529082905262461bcd60e51b82526104cd91600401611779565b60006040518060600160405280876001600160a01b0316815260200186815260200184815250604051602001610c09919061178c565b60408051808303601f19018152919052600180549192506001600160a01b0382169163b1454caa917401000000000000000000000000000000000000000090910463ffffffff16906014610c5c836117e7565b91906101000a81548163ffffffff021916908363ffffffff1602179055508684866040518563ffffffff1660e01b8152600401610c9c949392919061180b565b602060405180830381600087803b158015610cb657600080fd5b505af1158015610cca573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106aa9190611848565b60008281526002602090815260408083206001600160a01b038516845290915290205460ff1661052e5760008281526002602090815260408083206001600160a01b03851684529091529020805460ff19166001179055610d4c3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b60008281526002602090815260408083206001600160a01b038516845290915290205460ff161561052e5760008281526002602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b60008060009054906101000a90046001600160a01b03166001600160a01b03166363012de56040518163ffffffff1660e01b815260040160206040518083038186803b158015610e6257600080fd5b505afa158015610e76573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e9a9190611872565b905090565b6105588382846111b9565b6000816001600160a01b03168360405160006040518083038185875af1925050503d8060008114610ef7576040519150601f19603f3d011682016040523d82523d6000602084013e610efc565b606091505b50509050806105585760405162461bcd60e51b815260206004820152601460248201527f4661696c656420746f2073656e6420457468657200000000000000000000000060448201526064016104cd565b6040516001600160a01b03808516602483015283166044820152606481018290526109259085907f23b872dd00000000000000000000000000000000000000000000000000000000906084015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152611202565b60606000610fe083600261188f565b610feb9060026118ae565b67ffffffffffffffff811115611003576110036118c6565b6040519080825280601f01601f19166020018201604052801561102d576020820181803683370190505b5090507f300000000000000000000000000000000000000000000000000000000000000081600081518110611064576110646118dc565b60200101906001600160f81b031916908160001a9053507f7800000000000000000000000000000000000000000000000000000000000000816001815181106110af576110af6118dc565b60200101906001600160f81b031916908160001a90535060006110d384600261188f565b6110de9060016118ae565b90505b6001811115611163577f303132333435363738396162636465660000000000000000000000000000000085600f166010811061111f5761111f6118dc565b1a60f81b828281518110611135576111356118dc565b60200101906001600160f81b031916908160001a90535060049490941c9361115c816118f2565b90506110e1565b5083156111b25760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e7460448201526064016104cd565b9392505050565b6040516001600160a01b0383166024820152604481018290526105589084907fa9059cbb0000000000000000000000000000000000000000000000000000000090606401610f9a565b6000611257826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166112e79092919063ffffffff16565b80519091501561055857808060200190518101906112759190611909565b6105585760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f7420737563636565640000000000000000000000000000000000000000000060648201526084016104cd565b60606112f684846000856112fe565b949350505050565b6060824710156113765760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c000000000000000000000000000000000000000000000000000060648201526084016104cd565b6001600160a01b0385163b6113cd5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016104cd565b600080866001600160a01b031685876040516113e9919061192b565b60006040518083038185875af1925050503d8060008114611426576040519150601f19603f3d011682016040523d82523d6000602084013e61142b565b606091505b509150915061143b828286611446565b979650505050505050565b606083156114555750816111b2565b8251156114655782518084602001fd5b8160405162461bcd60e51b81526004016104cd9190611779565b60006020828403121561149157600080fd5b81356001600160e01b0319811681146111b257600080fd5b6001600160a01b03811681146114be57600080fd5b50565b6000602082840312156114d357600080fd5b81356111b2816114a9565b6000602082840312156114f057600080fd5b5035919050565b6000806040838503121561150a57600080fd5b82359150602083013561151c816114a9565b809150509250929050565b60008083601f84011261153957600080fd5b50813567ffffffffffffffff81111561155157600080fd5b60208301915083602082850101111561156957600080fd5b9250929050565b60008060008060006060868803121561158857600080fd5b8535611593816114a9565b9450602086013567ffffffffffffffff808211156115b057600080fd5b6115bc89838a01611527565b909650945060408801359150808211156115d557600080fd5b506115e288828901611527565b969995985093965092949392505050565b60008060006060848603121561160857600080fd5b8335611613816114a9565b925060208401359150604084013561162a816114a9565b809150509250925092565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b6001600160a01b0386168152606060208201526000611681606083018688611635565b8281036040840152611694818587611635565b98975050505050505050565b60005b838110156116bb5781810151838201526020016116a3565b838111156109255750506000910152565b7f416363657373436f6e74726f6c3a206163636f756e74200000000000000000008152600083516117048160178501602088016116a0565b7f206973206d697373696e6720726f6c652000000000000000000000000000000060179184019182015283516117418160288401602088016116a0565b01602801949350505050565b600081518084526117658160208601602086016116a0565b601f01601f19169290920160200192915050565b6020815260006111b2602083018461174d565b602081526001600160a01b03825116602082015260006020830151606060408401526117bb608084018261174d565b9050604084015160608401528091505092915050565b634e487b7160e01b600052601160045260246000fd5b600063ffffffff80831681811415611801576118016117d1565b6001019392505050565b600063ffffffff808716835280861660208401525060806040830152611834608083018561174d565b905060ff8316606083015295945050505050565b60006020828403121561185a57600080fd5b815167ffffffffffffffff811681146111b257600080fd5b60006020828403121561188457600080fd5b81516111b2816114a9565b60008160001904831182151516156118a9576118a96117d1565b500290565b600082198211156118c1576118c16117d1565b500190565b634e487b7160e01b600052604160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b600081611901576119016117d1565b506000190190565b60006020828403121561191b57600080fd5b815180151581146111b257600080fd5b6000825161193d8184602087016116a0565b919091019291505056fea2646970667358221220519ff8f34202b5c162e1f65b3da902137fc038957a2647d8b23853505847c0de64736f6c63430008090033", + Bin: "0x60806040526001805463ffffffff60a01b191690553480156200002157600080fd5b5060405162001bbb38038062001bbb8339810160408190526200004491620001fc565b600080546001600160a01b0319166001600160a01b038316908117909155604080516350d113fd60e11b8152905183929163a1a227fa916004808301926020929190829003018186803b1580156200009b57600080fd5b505afa158015620000b0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620000d69190620001fc565b600180546001600160a01b0319166001600160a01b039290921691909117905550620001237fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c217753362000157565b620001507fd2fb17ceaa388942529b17e0006ffc4d559f040dd4f2157b8070f17ad2110578600062000157565b506200022e565b60008281526002602090815260408083206001600160a01b038516845290915290205460ff16620001f85760008281526002602090815260408083206001600160a01b03851684529091529020805460ff19166001179055620001b73390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45b5050565b6000602082840312156200020f57600080fd5b81516001600160a01b03811681146200022757600080fd5b9392505050565b61197d806200023e6000396000f3fe60806040526004361061010e5760003560e01c80635fa7b584116100a557806393b3744211610074578063a381c8e211610059578063a381c8e21461033e578063d547741f1461035e578063e4c3ebc71461037e57600080fd5b806393b3744214610309578063a217fddf1461032957600080fd5b80635fa7b5841461024f57806375b238fc1461026f57806383bece4d146102a357806391d14854146102c357600080fd5b80632f2ff15d116100e15780632f2ff15d146101bb57806336568abe146101db578063498d82ab146101fb5780635d8729701461021b57600080fd5b806301ffc9a71461011357806316ce8149146101485780631888d7121461016a578063248a9ca31461017d575b600080fd5b34801561011f57600080fd5b5061013361012e36600461147f565b6103b2565b60405190151581526020015b60405180910390f35b34801561015457600080fd5b506101686101633660046114c1565b61041b565b005b6101686101783660046114c1565b610481565b34801561018957600080fd5b506101ad6101983660046114de565b60009081526002602052604090206001015490565b60405190815260200161013f565b3480156101c757600080fd5b506101686101d63660046114f7565b610532565b3480156101e757600080fd5b506101686101f63660046114f7565b61055d565b34801561020757600080fd5b50610168610216366004611570565b6105e5565b34801561022757600080fd5b506101ad7f9f225881f6e7ac8a885b63aa2269cbce78dd6a669864ccd2cd2517a8e709d73a81565b34801561025b57600080fd5b5061016861026a3660046114c1565b6106b3565b34801561027b57600080fd5b506101ad7fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c2177581565b3480156102af57600080fd5b506101686102be3660046115f3565b610708565b3480156102cf57600080fd5b506101336102de3660046114f7565b60009182526002602090815260408084206001600160a01b0393909316845291905290205460ff1690565b34801561031557600080fd5b506101686103243660046114c1565b61092b565b34801561033557600080fd5b506101ad600081565b34801561034a57600080fd5b506101686103593660046115f3565b610980565b34801561036a57600080fd5b506101686103793660046114f7565b610b2d565b34801561038a57600080fd5b506101ad7fd2fb17ceaa388942529b17e0006ffc4d559f040dd4f2157b8070f17ad211057881565b60006001600160e01b031982167f7965db0b00000000000000000000000000000000000000000000000000000000148061041557507f01ffc9a7000000000000000000000000000000000000000000000000000000006001600160e01b03198316145b92915050565b7fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c217756104468133610b53565b50600380547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0392909216919091179055565b600034116104d65760405162461bcd60e51b815260206004820152600f60248201527f456d707479207472616e736665722e000000000000000000000000000000000060448201526064015b60405180910390fd5b604080518082018252348082526001600160a01b03848116602093840190815284519384019290925290518116828401528251808303840181526060909201909252600354909161052e91168260005b600080610bd3565b5050565b60008281526002602052604090206001015461054e8133610b53565b6105588383610cee565b505050565b6001600160a01b03811633146105db5760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201527f20726f6c657320666f722073656c66000000000000000000000000000000000060648201526084016104cd565b61052e8282610d90565b7fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c217756106108133610b53565b61063a7f9f225881f6e7ac8a885b63aa2269cbce78dd6a669864ccd2cd2517a8e709d73a87610cee565b600063458ffd6360e01b878787878760405160240161065d95949392919061165e565b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b0319909316929092179091526003549091506106aa906001600160a01b0316826002610526565b50505050505050565b7fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c217756106de8133610b53565b61052e7f9f225881f6e7ac8a885b63aa2269cbce78dd6a669864ccd2cd2517a8e709d73a83610d90565b6003546000546001600160a01b039182169116331461078f5760405162461bcd60e51b815260206004820152603060248201527f436f6e74726163742063616c6c6572206973206e6f742074686520726567697360448201527f7465726564206d657373656e676572210000000000000000000000000000000060648201526084016104cd565b806001600160a01b03166107a1610e13565b6001600160a01b03161461081d5760405162461bcd60e51b815260206004820152603160248201527f43726f737320636861696e206d65737361676520636f6d696e672066726f6d2060448201527f696e636f72726563742073656e6465722100000000000000000000000000000060648201526084016104cd565b6001600160a01b03841660009081527f32ef73018533fa188e9e42b313c0a4048c6052342b662fb7510c0d1abcea3413602052604090205460ff161561086d57610868848484610e9f565b610925565b6001600160a01b03841660009081527f13ad2d85210d477fe1a6e25654c8250308cf29b050a4bf0b039d70467486712c602052604090205460ff16156108b7576108688383610eaa565b60405162461bcd60e51b815260206004820152602560248201527f417474656d7074696e6720746f20776974686472617720756e6b6e6f776e206160448201527f737365742e00000000000000000000000000000000000000000000000000000060648201526084016104cd565b50505050565b7fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c217756109568133610b53565b61052e7fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c2177583610cee565b600082116109d05760405162461bcd60e51b815260206004820152601a60248201527f417474656d7074696e6720656d707479207472616e736665722e00000000000060448201526064016104cd565b6001600160a01b03831660009081527f32ef73018533fa188e9e42b313c0a4048c6052342b662fb7510c0d1abcea3413602052604090205460ff16610aa35760405162461bcd60e51b815260206004820152604e60248201527f54686973206164647265737320686173206e6f74206265656e20676976656e2060448201527f61207479706520616e64206973207468757320636f6e73696465726564206e6f60648201527f742077686974656c69737465642e000000000000000000000000000000000000608482015260a4016104cd565b610aaf83333085610f4d565b604080516001600160a01b038581166024830152604482018590528381166064808401919091528351808403909101815260849092019092526020810180516001600160e01b03167f83bece4d0000000000000000000000000000000000000000000000000000000017905260035490916109259116826001610526565b600082815260026020526040902060010154610b498133610b53565b6105588383610d90565b60008281526002602090815260408083206001600160a01b038516845290915290205460ff1661052e57610b91816001600160a01b03166014610fd1565b610b9c836020610fd1565b604051602001610bad9291906116cc565b60408051601f198184030181529082905262461bcd60e51b82526104cd91600401611779565b60006040518060600160405280876001600160a01b0316815260200186815260200184815250604051602001610c09919061178c565b60408051808303601f19018152919052600180549192506001600160a01b0382169163b1454caa917401000000000000000000000000000000000000000090910463ffffffff16906014610c5c836117e7565b91906101000a81548163ffffffff021916908363ffffffff1602179055508684866040518563ffffffff1660e01b8152600401610c9c949392919061180b565b602060405180830381600087803b158015610cb657600080fd5b505af1158015610cca573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106aa9190611848565b60008281526002602090815260408083206001600160a01b038516845290915290205460ff1661052e5760008281526002602090815260408083206001600160a01b03851684529091529020805460ff19166001179055610d4c3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b60008281526002602090815260408083206001600160a01b038516845290915290205460ff161561052e5760008281526002602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b60008060009054906101000a90046001600160a01b03166001600160a01b03166363012de56040518163ffffffff1660e01b815260040160206040518083038186803b158015610e6257600080fd5b505afa158015610e76573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e9a9190611872565b905090565b6105588382846111b9565b6000816001600160a01b03168360405160006040518083038185875af1925050503d8060008114610ef7576040519150601f19603f3d011682016040523d82523d6000602084013e610efc565b606091505b50509050806105585760405162461bcd60e51b815260206004820152601460248201527f4661696c656420746f2073656e6420457468657200000000000000000000000060448201526064016104cd565b6040516001600160a01b03808516602483015283166044820152606481018290526109259085907f23b872dd00000000000000000000000000000000000000000000000000000000906084015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152611202565b60606000610fe083600261188f565b610feb9060026118ae565b67ffffffffffffffff811115611003576110036118c6565b6040519080825280601f01601f19166020018201604052801561102d576020820181803683370190505b5090507f300000000000000000000000000000000000000000000000000000000000000081600081518110611064576110646118dc565b60200101906001600160f81b031916908160001a9053507f7800000000000000000000000000000000000000000000000000000000000000816001815181106110af576110af6118dc565b60200101906001600160f81b031916908160001a90535060006110d384600261188f565b6110de9060016118ae565b90505b6001811115611163577f303132333435363738396162636465660000000000000000000000000000000085600f166010811061111f5761111f6118dc565b1a60f81b828281518110611135576111356118dc565b60200101906001600160f81b031916908160001a90535060049490941c9361115c816118f2565b90506110e1565b5083156111b25760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e7460448201526064016104cd565b9392505050565b6040516001600160a01b0383166024820152604481018290526105589084907fa9059cbb0000000000000000000000000000000000000000000000000000000090606401610f9a565b6000611257826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166112e79092919063ffffffff16565b80519091501561055857808060200190518101906112759190611909565b6105585760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f7420737563636565640000000000000000000000000000000000000000000060648201526084016104cd565b60606112f684846000856112fe565b949350505050565b6060824710156113765760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c000000000000000000000000000000000000000000000000000060648201526084016104cd565b6001600160a01b0385163b6113cd5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016104cd565b600080866001600160a01b031685876040516113e9919061192b565b60006040518083038185875af1925050503d8060008114611426576040519150601f19603f3d011682016040523d82523d6000602084013e61142b565b606091505b509150915061143b828286611446565b979650505050505050565b606083156114555750816111b2565b8251156114655782518084602001fd5b8160405162461bcd60e51b81526004016104cd9190611779565b60006020828403121561149157600080fd5b81356001600160e01b0319811681146111b257600080fd5b6001600160a01b03811681146114be57600080fd5b50565b6000602082840312156114d357600080fd5b81356111b2816114a9565b6000602082840312156114f057600080fd5b5035919050565b6000806040838503121561150a57600080fd5b82359150602083013561151c816114a9565b809150509250929050565b60008083601f84011261153957600080fd5b50813567ffffffffffffffff81111561155157600080fd5b60208301915083602082850101111561156957600080fd5b9250929050565b60008060008060006060868803121561158857600080fd5b8535611593816114a9565b9450602086013567ffffffffffffffff808211156115b057600080fd5b6115bc89838a01611527565b909650945060408801359150808211156115d557600080fd5b506115e288828901611527565b969995985093965092949392505050565b60008060006060848603121561160857600080fd5b8335611613816114a9565b925060208401359150604084013561162a816114a9565b809150509250925092565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b6001600160a01b0386168152606060208201526000611681606083018688611635565b8281036040840152611694818587611635565b98975050505050505050565b60005b838110156116bb5781810151838201526020016116a3565b838111156109255750506000910152565b7f416363657373436f6e74726f6c3a206163636f756e74200000000000000000008152600083516117048160178501602088016116a0565b7f206973206d697373696e6720726f6c652000000000000000000000000000000060179184019182015283516117418160288401602088016116a0565b01602801949350505050565b600081518084526117658160208601602086016116a0565b601f01601f19169290920160200192915050565b6020815260006111b2602083018461174d565b602081526001600160a01b03825116602082015260006020830151606060408401526117bb608084018261174d565b9050604084015160608401528091505092915050565b634e487b7160e01b600052601160045260246000fd5b600063ffffffff80831681811415611801576118016117d1565b6001019392505050565b600063ffffffff808716835280861660208401525060806040830152611834608083018561174d565b905060ff8316606083015295945050505050565b60006020828403121561185a57600080fd5b815167ffffffffffffffff811681146111b257600080fd5b60006020828403121561188457600080fd5b81516111b2816114a9565b60008160001904831182151516156118a9576118a96117d1565b500290565b600082198211156118c1576118c16117d1565b500190565b634e487b7160e01b600052604160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b600081611901576119016117d1565b506000190190565b60006020828403121561191b57600080fd5b815180151581146111b257600080fd5b6000825161193d8184602087016116a0565b919091019291505056fea26469706673582212203584da4763506dfe3dec62086ac8216bfc4a5f976712ff605ecde2651c5accf664736f6c63430008090033", } // ObscuroBridgeABI is the input ABI used to generate the binding from. diff --git a/contracts/generated/WrappedERC20/WrappedERC20.go b/contracts/generated/WrappedERC20/WrappedERC20.go index 60755f57e7..658dbb7682 100644 --- a/contracts/generated/WrappedERC20/WrappedERC20.go +++ b/contracts/generated/WrappedERC20/WrappedERC20.go @@ -32,7 +32,7 @@ var ( // 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: "0x6080604052600580546001600160a01b03191673deb34a740eca1ec42c8b8204cbec0ba34fdd27f31790553480156200003757600080fd5b50604051620019d7380380620019d78339810160408190526200005a91620002e3565b8181818181600390805190602001906200007692919062000170565b5080516200008c90600490602084019062000170565b5050505050620000c37fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c2177533620000cb60201b60201c565b50506200038a565b60008281526007602090815260408083206001600160a01b038516845290915290205460ff166200016c5760008281526007602090815260408083206001600160a01b03851684529091529020805460ff191660011790556200012b3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45b5050565b8280546200017e906200034d565b90600052602060002090601f016020900481019282620001a25760008555620001ed565b82601f10620001bd57805160ff1916838001178555620001ed565b82800160010185558215620001ed579182015b82811115620001ed578251825591602001919060010190620001d0565b50620001fb929150620001ff565b5090565b5b80821115620001fb576000815560010162000200565b634e487b7160e01b600052604160045260246000fd5b600082601f8301126200023e57600080fd5b81516001600160401b03808211156200025b576200025b62000216565b604051601f8301601f19908116603f0116810190828211818310171562000286576200028662000216565b81604052838152602092508683858801011115620002a357600080fd5b600091505b83821015620002c75785820183015181830184015290820190620002a8565b83821115620002d95760008385830101525b9695505050505050565b60008060408385031215620002f757600080fd5b82516001600160401b03808211156200030f57600080fd5b6200031d868387016200022c565b935060208501519150808211156200033457600080fd5b5062000343858286016200022c565b9150509250929050565b600181811c908216806200036257607f821691505b602082108114156200038457634e487b7160e01b600052602260045260246000fd5b50919050565b61163d806200039a6000396000f3fe608060405234801561001057600080fd5b50600436106101775760003560e01c806339509351116100d8578063979005ad1161008c578063a9059cbb11610066578063a9059cbb1461031a578063d547741f1461032d578063dd62ed3e1461034057600080fd5b8063979005ad146102ec578063a217fddf146102ff578063a457c2d71461030757600080fd5b806375b238fc116100bd57806375b238fc1461028457806391d14854146102ab57806395d89b41146102e457600080fd5b8063395093511461025e57806370a082311461027157600080fd5b806323b872dd1161012f5780632f2ff15d116101145780632f2ff15d14610229578063313ce5671461023c57806336568abe1461024b57600080fd5b806323b872dd146101f3578063248a9ca31461020657600080fd5b8063095ea7b311610160578063095ea7b3146101b957806318160ddd146101cc5780631dd319cb146101de57600080fd5b806301ffc9a71461017c57806306fdde03146101a4575b600080fd5b61018f61018a3660046112f7565b610353565b60405190151581526020015b60405180910390f35b6101ac6103ec565b60405161019b9190611365565b61018f6101c73660046113b4565b61047e565b6002545b60405190815260200161019b565b6101f16101ec3660046113b4565b610496565b005b61018f6102013660046113de565b61052d565b6101d061021436600461141a565b60009081526007602052604090206001015490565b6101f1610237366004611433565b610551565b6040516012815260200161019b565b6101f1610259366004611433565b610577565b61018f61026c3660046113b4565b610603565b6101d061027f36600461145f565b610642565b6101d07fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c2177581565b61018f6102b9366004611433565b60009182526007602090815260408084206001600160a01b0393909316845291905290205460ff1690565b6101ac6106ea565b6101f16102fa3660046113b4565b6106f9565b6101d0600081565b61018f6103153660046113b4565b61072e565b61018f6103283660046113b4565b6107d8565b6101f161033b366004611433565b6107e6565b6101d061034e36600461147a565b61080c565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f7965db0b0000000000000000000000000000000000000000000000000000000014806103e657507f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316145b92915050565b6060600380546103fb906114a4565b80601f0160208091040260200160405190810160405280929190818152602001828054610427906114a4565b80156104745780601f1061044957610100808354040283529160200191610474565b820191906000526020600020905b81548152906001019060200180831161045757829003601f168201915b5050505050905090565b60003361048c81858561091d565b5060019392505050565b7fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c217756104c18133610a75565b816104cb84610642565b101561051e5760405162461bcd60e51b815260206004820152601560248201527f496e73756666696369656e742062616c616e63652e000000000000000000000060448201526064015b60405180910390fd5b6105288383610af5565b505050565b60003361053b858285610c7a565b610546858585610cf4565b506001949350505050565b60008281526007602052604090206001015461056d8133610a75565b6105288383610f0b565b6001600160a01b03811633146105f55760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201527f20726f6c657320666f722073656c6600000000000000000000000000000000006064820152608401610515565b6105ff8282610fad565b5050565b3360008181526001602090815260408083206001600160a01b038716845290915281205490919061048c908290869061063d9087906114f5565b61091d565b6000326001600160a01b0383161415610673576001600160a01b0382166000908152602081905260409020546103e6565b336001600160a01b03831614156106a2576001600160a01b0382166000908152602081905260409020546103e6565b60405162461bcd60e51b815260206004820152601f60248201527f4e6f7420616c6c6f77656420746f2072656164207468652062616c616e6365006044820152606401610515565b6060600480546103fb906114a4565b7fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c217756107248133610a75565b6105288383611030565b3360008181526001602090815260408083206001600160a01b0387168452909152812054909190838110156107cb5760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f7760448201527f207a65726f0000000000000000000000000000000000000000000000000000006064820152608401610515565b610546828686840361091d565b60003361048c818585610cf4565b6000828152600760205260409020600101546108028133610a75565b6105288383610fad565b6000326001600160a01b038416148061082d5750326001600160a01b038316145b15610860576001600160a01b038084166000908152600160209081526040808320938616835292905220545b90506103e6565b336001600160a01b038416148061087f5750336001600160a01b038316145b156108af576001600160a01b03808416600090815260016020908152604080832093861683529290522054610859565b60405162461bcd60e51b815260206004820152602160248201527f4e6f7420616c6c6f77656420746f20726561642074686520616c6c6f77616e6360448201527f65000000000000000000000000000000000000000000000000000000000000006064820152608401610515565b6001600160a01b0383166109985760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460448201527f72657373000000000000000000000000000000000000000000000000000000006064820152608401610515565b6001600160a01b038216610a145760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f20616464726560448201527f73730000000000000000000000000000000000000000000000000000000000006064820152608401610515565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b60008281526007602090815260408083206001600160a01b038516845290915290205460ff166105ff57610ab3816001600160a01b0316601461110f565b610abe83602061110f565b604051602001610acf92919061150d565b60408051601f198184030181529082905262461bcd60e51b825261051591600401611365565b6001600160a01b038216610b715760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f2061646472657360448201527f73000000000000000000000000000000000000000000000000000000000000006064820152608401610515565b6001600160a01b03821660009081526020819052604090205481811015610c005760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e60448201527f63650000000000000000000000000000000000000000000000000000000000006064820152608401610515565b6001600160a01b0383166000908152602081905260408120838303905560028054849290610c2f90849061158e565b90915550506040518281526000906001600160a01b038516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a3505050565b6000610c86848461080c565b90506000198114610cee5781811015610ce15760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e63650000006044820152606401610515565b610cee848484840361091d565b50505050565b6001600160a01b038316610d705760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f20616460448201527f64726573730000000000000000000000000000000000000000000000000000006064820152608401610515565b6001600160a01b038216610dec5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201527f65737300000000000000000000000000000000000000000000000000000000006064820152608401610515565b6001600160a01b03831660009081526020819052604090205481811015610e7b5760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e742065786365656473206260448201527f616c616e636500000000000000000000000000000000000000000000000000006064820152608401610515565b6001600160a01b03808516600090815260208190526040808220858503905591851681529081208054849290610eb29084906114f5565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef84604051610efe91815260200190565b60405180910390a3610cee565b60008281526007602090815260408083206001600160a01b038516845290915290205460ff166105ff5760008281526007602090815260408083206001600160a01b03851684529091529020805460ff19166001179055610f693390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b60008281526007602090815260408083206001600160a01b038516845290915290205460ff16156105ff5760008281526007602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b6001600160a01b0382166110865760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152606401610515565b806002600082825461109891906114f5565b90915550506001600160a01b038216600090815260208190526040812080548392906110c59084906114f5565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b6060600061111e8360026115a5565b6111299060026114f5565b67ffffffffffffffff811115611141576111416115c4565b6040519080825280601f01601f19166020018201604052801561116b576020820181803683370190505b5090507f3000000000000000000000000000000000000000000000000000000000000000816000815181106111a2576111a26115da565b60200101906001600160f81b031916908160001a9053507f7800000000000000000000000000000000000000000000000000000000000000816001815181106111ed576111ed6115da565b60200101906001600160f81b031916908160001a90535060006112118460026115a5565b61121c9060016114f5565b90505b60018111156112a1577f303132333435363738396162636465660000000000000000000000000000000085600f166010811061125d5761125d6115da565b1a60f81b828281518110611273576112736115da565b60200101906001600160f81b031916908160001a90535060049490941c9361129a816115f0565b905061121f565b5083156112f05760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610515565b9392505050565b60006020828403121561130957600080fd5b81357fffffffff00000000000000000000000000000000000000000000000000000000811681146112f057600080fd5b60005b8381101561135457818101518382015260200161133c565b83811115610cee5750506000910152565b6020815260008251806020840152611384816040850160208701611339565b601f01601f19169190910160400192915050565b80356001600160a01b03811681146113af57600080fd5b919050565b600080604083850312156113c757600080fd5b6113d083611398565b946020939093013593505050565b6000806000606084860312156113f357600080fd5b6113fc84611398565b925061140a60208501611398565b9150604084013590509250925092565b60006020828403121561142c57600080fd5b5035919050565b6000806040838503121561144657600080fd5b8235915061145660208401611398565b90509250929050565b60006020828403121561147157600080fd5b6112f082611398565b6000806040838503121561148d57600080fd5b61149683611398565b915061145660208401611398565b600181811c908216806114b857607f821691505b602082108114156114d957634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b60008219821115611508576115086114df565b500190565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260008351611545816017850160208801611339565b7f206973206d697373696e6720726f6c65200000000000000000000000000000006017918401918201528351611582816028840160208801611339565b01602801949350505050565b6000828210156115a0576115a06114df565b500390565b60008160001904831182151516156115bf576115bf6114df565b500290565b634e487b7160e01b600052604160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b6000816115ff576115ff6114df565b50600019019056fea264697066735822122051d4d151f1e4f06c4f1a712938b6e043da4348eaab5479425f2ff11cd6f5c67c64736f6c63430008090033", + Bin: "0x6080604052600580546001600160a01b03191673deb34a740eca1ec42c8b8204cbec0ba34fdd27f31790553480156200003757600080fd5b50604051620019d7380380620019d78339810160408190526200005a91620002e3565b8181818181600390805190602001906200007692919062000170565b5080516200008c90600490602084019062000170565b5050505050620000c37fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c2177533620000cb60201b60201c565b50506200038a565b60008281526007602090815260408083206001600160a01b038516845290915290205460ff166200016c5760008281526007602090815260408083206001600160a01b03851684529091529020805460ff191660011790556200012b3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45b5050565b8280546200017e906200034d565b90600052602060002090601f016020900481019282620001a25760008555620001ed565b82601f10620001bd57805160ff1916838001178555620001ed565b82800160010185558215620001ed579182015b82811115620001ed578251825591602001919060010190620001d0565b50620001fb929150620001ff565b5090565b5b80821115620001fb576000815560010162000200565b634e487b7160e01b600052604160045260246000fd5b600082601f8301126200023e57600080fd5b81516001600160401b03808211156200025b576200025b62000216565b604051601f8301601f19908116603f0116810190828211818310171562000286576200028662000216565b81604052838152602092508683858801011115620002a357600080fd5b600091505b83821015620002c75785820183015181830184015290820190620002a8565b83821115620002d95760008385830101525b9695505050505050565b60008060408385031215620002f757600080fd5b82516001600160401b03808211156200030f57600080fd5b6200031d868387016200022c565b935060208501519150808211156200033457600080fd5b5062000343858286016200022c565b9150509250929050565b600181811c908216806200036257607f821691505b602082108114156200038457634e487b7160e01b600052602260045260246000fd5b50919050565b61163d806200039a6000396000f3fe608060405234801561001057600080fd5b50600436106101775760003560e01c806339509351116100d8578063979005ad1161008c578063a9059cbb11610066578063a9059cbb1461031a578063d547741f1461032d578063dd62ed3e1461034057600080fd5b8063979005ad146102ec578063a217fddf146102ff578063a457c2d71461030757600080fd5b806375b238fc116100bd57806375b238fc1461028457806391d14854146102ab57806395d89b41146102e457600080fd5b8063395093511461025e57806370a082311461027157600080fd5b806323b872dd1161012f5780632f2ff15d116101145780632f2ff15d14610229578063313ce5671461023c57806336568abe1461024b57600080fd5b806323b872dd146101f3578063248a9ca31461020657600080fd5b8063095ea7b311610160578063095ea7b3146101b957806318160ddd146101cc5780631dd319cb146101de57600080fd5b806301ffc9a71461017c57806306fdde03146101a4575b600080fd5b61018f61018a3660046112f7565b610353565b60405190151581526020015b60405180910390f35b6101ac6103ec565b60405161019b9190611365565b61018f6101c73660046113b4565b61047e565b6002545b60405190815260200161019b565b6101f16101ec3660046113b4565b610496565b005b61018f6102013660046113de565b61052d565b6101d061021436600461141a565b60009081526007602052604090206001015490565b6101f1610237366004611433565b610551565b6040516012815260200161019b565b6101f1610259366004611433565b610577565b61018f61026c3660046113b4565b610603565b6101d061027f36600461145f565b610642565b6101d07fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c2177581565b61018f6102b9366004611433565b60009182526007602090815260408084206001600160a01b0393909316845291905290205460ff1690565b6101ac6106ea565b6101f16102fa3660046113b4565b6106f9565b6101d0600081565b61018f6103153660046113b4565b61072e565b61018f6103283660046113b4565b6107d8565b6101f161033b366004611433565b6107e6565b6101d061034e36600461147a565b61080c565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f7965db0b0000000000000000000000000000000000000000000000000000000014806103e657507f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316145b92915050565b6060600380546103fb906114a4565b80601f0160208091040260200160405190810160405280929190818152602001828054610427906114a4565b80156104745780601f1061044957610100808354040283529160200191610474565b820191906000526020600020905b81548152906001019060200180831161045757829003601f168201915b5050505050905090565b60003361048c81858561091d565b5060019392505050565b7fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c217756104c18133610a75565b816104cb84610642565b101561051e5760405162461bcd60e51b815260206004820152601560248201527f496e73756666696369656e742062616c616e63652e000000000000000000000060448201526064015b60405180910390fd5b6105288383610af5565b505050565b60003361053b858285610c7a565b610546858585610cf4565b506001949350505050565b60008281526007602052604090206001015461056d8133610a75565b6105288383610f0b565b6001600160a01b03811633146105f55760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201527f20726f6c657320666f722073656c6600000000000000000000000000000000006064820152608401610515565b6105ff8282610fad565b5050565b3360008181526001602090815260408083206001600160a01b038716845290915281205490919061048c908290869061063d9087906114f5565b61091d565b6000326001600160a01b0383161415610673576001600160a01b0382166000908152602081905260409020546103e6565b336001600160a01b03831614156106a2576001600160a01b0382166000908152602081905260409020546103e6565b60405162461bcd60e51b815260206004820152601f60248201527f4e6f7420616c6c6f77656420746f2072656164207468652062616c616e6365006044820152606401610515565b6060600480546103fb906114a4565b7fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c217756107248133610a75565b6105288383611030565b3360008181526001602090815260408083206001600160a01b0387168452909152812054909190838110156107cb5760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f7760448201527f207a65726f0000000000000000000000000000000000000000000000000000006064820152608401610515565b610546828686840361091d565b60003361048c818585610cf4565b6000828152600760205260409020600101546108028133610a75565b6105288383610fad565b6000326001600160a01b038416148061082d5750326001600160a01b038316145b15610860576001600160a01b038084166000908152600160209081526040808320938616835292905220545b90506103e6565b336001600160a01b038416148061087f5750336001600160a01b038316145b156108af576001600160a01b03808416600090815260016020908152604080832093861683529290522054610859565b60405162461bcd60e51b815260206004820152602160248201527f4e6f7420616c6c6f77656420746f20726561642074686520616c6c6f77616e6360448201527f65000000000000000000000000000000000000000000000000000000000000006064820152608401610515565b6001600160a01b0383166109985760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460448201527f72657373000000000000000000000000000000000000000000000000000000006064820152608401610515565b6001600160a01b038216610a145760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f20616464726560448201527f73730000000000000000000000000000000000000000000000000000000000006064820152608401610515565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b60008281526007602090815260408083206001600160a01b038516845290915290205460ff166105ff57610ab3816001600160a01b0316601461110f565b610abe83602061110f565b604051602001610acf92919061150d565b60408051601f198184030181529082905262461bcd60e51b825261051591600401611365565b6001600160a01b038216610b715760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f2061646472657360448201527f73000000000000000000000000000000000000000000000000000000000000006064820152608401610515565b6001600160a01b03821660009081526020819052604090205481811015610c005760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e60448201527f63650000000000000000000000000000000000000000000000000000000000006064820152608401610515565b6001600160a01b0383166000908152602081905260408120838303905560028054849290610c2f90849061158e565b90915550506040518281526000906001600160a01b038516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a3505050565b6000610c86848461080c565b90506000198114610cee5781811015610ce15760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e63650000006044820152606401610515565b610cee848484840361091d565b50505050565b6001600160a01b038316610d705760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f20616460448201527f64726573730000000000000000000000000000000000000000000000000000006064820152608401610515565b6001600160a01b038216610dec5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201527f65737300000000000000000000000000000000000000000000000000000000006064820152608401610515565b6001600160a01b03831660009081526020819052604090205481811015610e7b5760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e742065786365656473206260448201527f616c616e636500000000000000000000000000000000000000000000000000006064820152608401610515565b6001600160a01b03808516600090815260208190526040808220858503905591851681529081208054849290610eb29084906114f5565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef84604051610efe91815260200190565b60405180910390a3610cee565b60008281526007602090815260408083206001600160a01b038516845290915290205460ff166105ff5760008281526007602090815260408083206001600160a01b03851684529091529020805460ff19166001179055610f693390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b60008281526007602090815260408083206001600160a01b038516845290915290205460ff16156105ff5760008281526007602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b6001600160a01b0382166110865760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152606401610515565b806002600082825461109891906114f5565b90915550506001600160a01b038216600090815260208190526040812080548392906110c59084906114f5565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b6060600061111e8360026115a5565b6111299060026114f5565b67ffffffffffffffff811115611141576111416115c4565b6040519080825280601f01601f19166020018201604052801561116b576020820181803683370190505b5090507f3000000000000000000000000000000000000000000000000000000000000000816000815181106111a2576111a26115da565b60200101906001600160f81b031916908160001a9053507f7800000000000000000000000000000000000000000000000000000000000000816001815181106111ed576111ed6115da565b60200101906001600160f81b031916908160001a90535060006112118460026115a5565b61121c9060016114f5565b90505b60018111156112a1577f303132333435363738396162636465660000000000000000000000000000000085600f166010811061125d5761125d6115da565b1a60f81b828281518110611273576112736115da565b60200101906001600160f81b031916908160001a90535060049490941c9361129a816115f0565b905061121f565b5083156112f05760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610515565b9392505050565b60006020828403121561130957600080fd5b81357fffffffff00000000000000000000000000000000000000000000000000000000811681146112f057600080fd5b60005b8381101561135457818101518382015260200161133c565b83811115610cee5750506000910152565b6020815260008251806020840152611384816040850160208701611339565b601f01601f19169190910160400192915050565b80356001600160a01b03811681146113af57600080fd5b919050565b600080604083850312156113c757600080fd5b6113d083611398565b946020939093013593505050565b6000806000606084860312156113f357600080fd5b6113fc84611398565b925061140a60208501611398565b9150604084013590509250925092565b60006020828403121561142c57600080fd5b5035919050565b6000806040838503121561144657600080fd5b8235915061145660208401611398565b90509250929050565b60006020828403121561147157600080fd5b6112f082611398565b6000806040838503121561148d57600080fd5b61149683611398565b915061145660208401611398565b600181811c908216806114b857607f821691505b602082108114156114d957634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b60008219821115611508576115086114df565b500190565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260008351611545816017850160208801611339565b7f206973206d697373696e6720726f6c65200000000000000000000000000000006017918401918201528351611582816028840160208801611339565b01602801949350505050565b6000828210156115a0576115a06114df565b500390565b60008160001904831182151516156115bf576115bf6114df565b500290565b634e487b7160e01b600052604160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b6000816115ff576115ff6114df565b50600019019056fea2646970667358221220848f35fdc28f22577d7d393858f44350cbde245dc770487cf991c8a21210b53864736f6c63430008090033", } // WrappedERC20ABI is the input ABI used to generate the binding from. diff --git a/contracts/src/messaging/IMessageBus.sol b/contracts/src/messaging/IMessageBus.sol index 1e36701bdb..c307c33fc5 100644 --- a/contracts/src/messaging/IMessageBus.sol +++ b/contracts/src/messaging/IMessageBus.sol @@ -42,11 +42,16 @@ interface IMessageBus { uint8 consistencyLevel ) external returns (uint64 sequence); - function sendValue( + function sendValueToL2( address receiver, uint256 amount ) external payable; + function receiveValueFromL2( + address receiver, + uint256 amount + ) external; + // This function verifies that a cross chain message provided by the caller has indeed been submitted from the other network // and returns true only if the challenge period for the message has passed. function verifyMessageFinalized(Structs.CrossChainMessage calldata crossChainMessage) external view returns (bool); diff --git a/contracts/src/messaging/MessageBus.sol b/contracts/src/messaging/MessageBus.sol index 0f6d49bd92..e19fb2219a 100644 --- a/contracts/src/messaging/MessageBus.sol +++ b/contracts/src/messaging/MessageBus.sol @@ -30,7 +30,7 @@ contract MessageBus is IMessageBus, Ownable { addressSequences[sender] += 1; } - function sendValue( + function sendValueToL2( address receiver, uint256 amount ) external payable { @@ -38,6 +38,14 @@ contract MessageBus is IMessageBus, Ownable { emit ValueTransfer(msg.sender, receiver, msg.value); } + function receiveValueFromL2( + address receiver, + uint256 amount + ) external onlyOwner { + (bool ok, ) = receiver.call{value: amount}(""); + require(ok, "failed sending value"); + } + // This method is called from contracts to publish messages to the other linked message bus. // nonce - This is provided and serves as deduplication nonce. It can also be used to group a batch of messages together. // topic - This is the topic for which the payload is published. diff --git a/go/common/types.go b/go/common/types.go index 2e8cc9c644..c8f4efc16f 100644 --- a/go/common/types.go +++ b/go/common/types.go @@ -47,6 +47,8 @@ type ( CrossChainMessage = MessageBus.StructsCrossChainMessage CrossChainMessages = []CrossChainMessage + ValueTransferEvent = MessageBus.MessageBusValueTransfer + ValueTransferEvents = []ValueTransferEvent EncryptedTx []byte // A single transaction, encoded as a JSON list of transaction binary hexes and encrypted using the enclave's public key EncryptedTransactions []byte // A blob of encrypted transactions, as they're stored in the rollup, with the nonce prepended. diff --git a/go/enclave/crosschain/block_message_extractor.go b/go/enclave/crosschain/block_message_extractor.go index a2f72628c3..a2ba597894 100644 --- a/go/enclave/crosschain/block_message_extractor.go +++ b/go/enclave/crosschain/block_message_extractor.go @@ -39,6 +39,34 @@ func (m *blockMessageExtractor) Enabled() bool { return m.GetBusAddress().Hash().Big().Cmp(gethcommon.Big0) != 0 } +func (m *blockMessageExtractor) StoreCrossChainValueTransfers(block *common.L1Block, receipts common.L1Receipts) error { + defer m.logger.Info("Block value transfer messages processed", log.BlockHashKey, block.Hash(), log.DurationKey, measure.NewStopwatch()) + + areReceiptsValid := common.VerifyReceiptHash(block, receipts) + + if !areReceiptsValid && m.Enabled() { + m.logger.Error("Invalid receipts submitted", log.BlockHashKey, block.Hash()) + return fmt.Errorf("receipts do not match the receipt root for the block") + } + + if len(receipts) == 0 { + return nil + } + + transfers, err := m.getValueTransferMessages(block, receipts) + if err != nil { + m.logger.Error("Error encountered while getting inbound value transfers from block", log.BlockHashKey, block.Hash(), log.ErrKey, err) + return err + } + + hasTransfers := len(transfers) > 0 + if !hasTransfers { + return nil + } + + return nil +} + // StoreCrossChainMessages - extracts the cross chain messages for the corresponding block from the receipts. // The messages will be stored in DB storage for later usage. // block - the L1 block for which events are extracted. @@ -54,8 +82,6 @@ func (m *blockMessageExtractor) StoreCrossChainMessages(block *common.L1Block, r } if len(receipts) == 0 { - // todo (@stefan) - error if block receipts root does not match receipts hash - // else nil return nil } @@ -107,3 +133,24 @@ func (m *blockMessageExtractor) getCrossChainMessages(block *common.L1Block, rec return messages, nil } + +func (m *blockMessageExtractor) getValueTransferMessages(block *common.L1Block, receipts common.L1Receipts) (common.ValueTransferEvents, error) { + if len(receipts) == 0 { + return make(common.ValueTransferEvents, 0), nil + } + + // Retrieves the relevant logs from the message bus. + logs, err := filterLogsFromReceipts(receipts, m.GetBusAddress(), &ValueTransferEventID) + if err != nil { + m.logger.Error("Error encountered when filtering receipt logs.", log.ErrKey, err) + return make(common.ValueTransferEvents, 0), err + } + + transfers, err := convertLogsToValueTransfers(logs, ValueTransferEventName, MessageBusABI) + if err != nil { + m.logger.Error("Error encountered when converting value transfer receipt logs.", log.ErrKey, err) + return make(common.ValueTransferEvents, 0), err + } + + return transfers, nil +} diff --git a/go/enclave/crosschain/common.go b/go/enclave/crosschain/common.go index 810dcad480..f25235066a 100644 --- a/go/enclave/crosschain/common.go +++ b/go/enclave/crosschain/common.go @@ -16,9 +16,11 @@ import ( ) var ( - MessageBusABI, _ = abi.JSON(strings.NewReader(MessageBus.MessageBusMetaData.ABI)) - CrossChainEventName = "LogMessagePublished" - CrossChainEventID = MessageBusABI.Events[CrossChainEventName].ID + MessageBusABI, _ = abi.JSON(strings.NewReader(MessageBus.MessageBusMetaData.ABI)) + CrossChainEventName = "LogMessagePublished" + CrossChainEventID = MessageBusABI.Events[CrossChainEventName].ID + ValueTransferEventName = "ValueTransfer" + ValueTransferEventID = MessageBusABI.Events["ValueTransfer"].ID ) func lazilyLogReceiptChecksum(msg string, receipts types.Receipts, logger gethlog.Logger) { @@ -146,3 +148,20 @@ func createCrossChainMessage(event MessageBus.MessageBusLogMessagePublished) Mes Payload: event.Payload, } } + +// convertLogsToMessages - converts the logs of the event to messages. The logs should be filtered, otherwise fails. +func convertLogsToValueTransfers(logs []types.Log, eventName string, messageBusABI abi.ABI) (common.ValueTransferEvents, error) { + messages := make(common.ValueTransferEvents, 0) + + for _, log := range logs { + var event MessageBus.MessageBusValueTransfer + err := messageBusABI.UnpackIntoInterface(&event, eventName, log.Data) + if err != nil { + return nil, err + } + + messages = append(messages, event) + } + + return messages, nil +} diff --git a/go/enclave/crosschain/message_bus_manager.go b/go/enclave/crosschain/message_bus_manager.go index d6eeff434b..70e7fae286 100644 --- a/go/enclave/crosschain/message_bus_manager.go +++ b/go/enclave/crosschain/message_bus_manager.go @@ -140,11 +140,17 @@ func (m *MessageBusManager) RetrieveInboundMessages(fromBlock *common.L1Block, t } m.logger.Trace(fmt.Sprintf("Looking for cross chain messages at block %s", b.Hash().Hex())) + messagesForBlock, err := m.storage.GetL1Messages(b.Hash()) if err != nil { m.logger.Crit("Reading the key for the block failed with uncommon reason.", log.ErrKey, err) } + _, err = m.storage.GetL1Transfers(b.Hash()) + if err != nil { + m.logger.Crit("Unable to get L1 transfers for block that should be there.", log.ErrKey, err) + } + messages = append(messages, messagesForBlock...) // Ordering here might work in POBI, but might be weird for fast finality // No deposits before genesis. diff --git a/go/enclave/storage/enclavedb/block.go b/go/enclave/storage/enclavedb/block.go index f22069c4e8..9c6620de64 100644 --- a/go/enclave/storage/enclavedb/block.go +++ b/go/enclave/storage/enclavedb/block.go @@ -17,8 +17,8 @@ const ( blockInsert = "insert into block values (?,?,?,?,?)" selectBlockHeader = "select header from block" - l1msgInsert = "insert into l1_msg (message, block) values " - l1msgValue = "(?,?)" + l1msgInsert = "insert into l1_msg (message, block, is_transfer) values " + l1msgValue = "(?,?,?)" selectL1Msg = "select message from l1_msg " rollupInsert = "insert into rollup values (?,?,?,?)" @@ -87,7 +87,7 @@ func FetchHeadBlock(db *sql.DB) (*types.Block, error) { return fetchBlock(db, "where is_canonical and height=(select max(b.height) from block b where is_canonical)") } -func WriteL1Messages(db *sql.DB, blockHash common.L1BlockHash, messages common.CrossChainMessages) error { +func WriteL1Messages[T any](db *sql.DB, blockHash common.L1BlockHash, messages []T, isValueTransfer bool) error { insert := l1msgInsert + strings.Repeat(l1msgValue+",", len(messages)) insert = insert[0 : len(insert)-1] // remove trailing comma @@ -108,8 +108,8 @@ func WriteL1Messages(db *sql.DB, blockHash common.L1BlockHash, messages common.C return nil } -func FetchL1Messages(db *sql.DB, blockHash common.L1BlockHash) (common.CrossChainMessages, error) { - var result common.CrossChainMessages +func FetchL1Messages[T any](db *sql.DB, blockHash common.L1BlockHash) ([]T, error) { + var result []T query := selectL1Msg + " where block = ?" rows, err := db.Query(query, blockHash.Bytes()) if err != nil { @@ -126,7 +126,7 @@ func FetchL1Messages(db *sql.DB, blockHash common.L1BlockHash) (common.CrossChai if err != nil { return nil, err } - ccm := new(common.CrossChainMessage) + ccm := new(T) if err := rlp.Decode(bytes.NewReader(msg), ccm); err != nil { return nil, fmt.Errorf("could not decode cross chain message. Cause: %w", err) } diff --git a/go/enclave/storage/init/sqlite/001_init.sql b/go/enclave/storage/init/sqlite/001_init.sql index b040868a08..0b50d577c5 100644 --- a/go/enclave/storage/init/sqlite/001_init.sql +++ b/go/enclave/storage/init/sqlite/001_init.sql @@ -35,7 +35,8 @@ create table if not exists l1_msg ( id INTEGER PRIMARY KEY AUTOINCREMENT, message varbinary(1024), - block binary(32) REFERENCES block + block binary(32) REFERENCES block, + is_transfer boolean ); create table if not exists rollup diff --git a/go/enclave/storage/interfaces.go b/go/enclave/storage/interfaces.go index 20dcbbbd0c..21b24b6203 100644 --- a/go/enclave/storage/interfaces.go +++ b/go/enclave/storage/interfaces.go @@ -93,6 +93,9 @@ type AttestationStorage interface { type CrossChainMessagesStorage interface { StoreL1Messages(blockHash common.L1BlockHash, messages common.CrossChainMessages) error GetL1Messages(blockHash common.L1BlockHash) (common.CrossChainMessages, error) + + StoreValueTransfers(blockHash common.L1BlockHash, transfers common.ValueTransferEvents) error + GetL1Transfers(blockHash common.L1BlockHash) (common.ValueTransferEvents, error) } type EnclaveKeyStorage interface { diff --git a/go/enclave/storage/storage.go b/go/enclave/storage/storage.go index 0c9d798dc5..5bb3fe2f9f 100644 --- a/go/enclave/storage/storage.go +++ b/go/enclave/storage/storage.go @@ -320,12 +320,24 @@ func (s *storageImpl) storeReceipts(batch *core.Batch, receipts []*types.Receipt return nil } +func (s *storageImpl) StoreValueTransfers(blockHash common.L1BlockHash, transfers common.ValueTransferEvents) error { + return enclavedb.WriteL1Messages(s.db.GetSQLDB(), blockHash, transfers, true) +} + func (s *storageImpl) StoreL1Messages(blockHash common.L1BlockHash, messages common.CrossChainMessages) error { - return enclavedb.WriteL1Messages(s.db.GetSQLDB(), blockHash, messages) + return enclavedb.WriteL1Messages(s.db.GetSQLDB(), blockHash, messages, false) } func (s *storageImpl) GetL1Messages(blockHash common.L1BlockHash) (common.CrossChainMessages, error) { - return enclavedb.FetchL1Messages(s.db.GetSQLDB(), blockHash) + return enclavedb.FetchL1Messages[common.CrossChainMessage](s.db.GetSQLDB(), blockHash) +} + +func (s *storageImpl) GetL1Transfers(blockHash common.L1BlockHash) (common.ValueTransferEvents, error) { + return enclavedb.FetchL1Messages[common.ValueTransferEvent](s.db.GetSQLDB(), blockHash) +} + +func (s *storageImpl) GetValueTransfers(blockHash common.L1BlockHash) (common.ValueTransferEvents, error) { + return enclavedb.FetchL1Messages[common.ValueTransferEvent](s.db.GetSQLDB(), blockHash) } const enclaveKeyKey = "ek" From 7e9c9ea92f9a7e24fa4baeba17a8cb81fa0b1b45 Mon Sep 17 00:00:00 2001 From: StefanIliev545 Date: Mon, 14 Aug 2023 19:17:10 +0200 Subject: [PATCH 04/47] Working deposits and transfers tree. --- go/common/headers.go | 2 + go/common/rpc/converters.go | 2 + go/common/rpc/generated/enclave.pb.go | 402 +++++++++--------- go/common/rpc/generated/enclave.proto | 1 + go/common/rpc/generated/enclave_grpc.pb.go | 152 ++++--- go/common/types.go | 12 +- go/enclave/components/batch_producer.go | 29 +- go/enclave/components/block_processor.go | 5 + .../crosschain/block_message_extractor.go | 7 + go/enclave/crosschain/common.go | 6 +- go/enclave/crosschain/interfaces.go | 8 +- go/enclave/crosschain/message_bus_manager.go | 32 +- go/enclave/genesis/testnet_genesis.go | 6 + go/enclave/storage/enclavedb/block.go | 7 +- go/enclave/storage/storage.go | 8 +- go/host/rpc/clientapi/client_api_eth.go | 1 + go/wallet/wallet.go | 5 + .../simulation/network/obscuro_node_utils.go | 6 +- integration/simulation/output_stats.go | 4 +- integration/simulation/params/wallet_utils.go | 23 +- .../simulation/transaction_injector.go | 51 +++ .../transaction_injector_tracker.go | 19 + integration/simulation/validate_chain.go | 26 ++ 23 files changed, 520 insertions(+), 294 deletions(-) diff --git a/go/common/headers.go b/go/common/headers.go index bcde8d3381..e142c8586c 100644 --- a/go/common/headers.go +++ b/go/common/headers.go @@ -38,6 +38,8 @@ type BatchHeader struct { R, S *big.Int // signature values CrossChainMessages []MessageBus.StructsCrossChainMessage `json:"crossChainMessages"` + TransfersTree common.Hash `json:"transfersTree"` + // The block hash of the latest block that has been scanned for cross chain messages. LatestInboundCrossChainHash common.Hash `json:"inboundCrossChainHash"` diff --git a/go/common/rpc/converters.go b/go/common/rpc/converters.go index 2253eb0219..1e9e40118f 100644 --- a/go/common/rpc/converters.go +++ b/go/common/rpc/converters.go @@ -144,6 +144,7 @@ func ToBatchHeaderMsg(header *common.BatchHeader) *generated.BatchHeaderMsg { GasUsed: header.GasUsed, Time: header.Time, BaseFee: baseFee, + TransferTree: header.TransfersTree.Bytes(), CrossChainMessages: ToCrossChainMsgs(header.CrossChainMessages), LatestInboundCrossChainHash: header.LatestInboundCrossChainHash.Bytes(), } @@ -196,6 +197,7 @@ func FromBatchHeaderMsg(header *generated.BatchHeaderMsg) *common.BatchHeader { GasLimit: header.GasLimit, GasUsed: header.GasUsed, Time: header.Time, + TransfersTree: gethcommon.BytesToHash(header.TransferTree), BaseFee: big.NewInt(int64(header.BaseFee)), CrossChainMessages: FromCrossChainMsgs(header.CrossChainMessages), LatestInboundCrossChainHash: gethcommon.BytesToHash(header.LatestInboundCrossChainHash), diff --git a/go/common/rpc/generated/enclave.pb.go b/go/common/rpc/generated/enclave.pb.go index 39ea864652..e9b6a40ddd 100644 --- a/go/common/rpc/generated/enclave.pb.go +++ b/go/common/rpc/generated/enclave.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.28.0 -// protoc v3.21.9 +// protoc-gen-go v1.31.0 +// protoc v4.23.4 // source: enclave.proto package generated @@ -2880,8 +2880,8 @@ type BlockSubmissionResponseMsg struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - ProducedSecretResponses []*SecretResponseMsg `protobuf:"bytes,3,rep,name=producedSecretResponses,proto3" json:"producedSecretResponses,omitempty"` - Error *BlockSubmissionErrorMsg `protobuf:"bytes,5,opt,name=error,proto3" json:"error,omitempty"` // todo (@matt) - remove this BlockSubmissionError field once we are using the Status() to update host view of enclave state + ProducedSecretResponses []*SecretResponseMsg `protobuf:"bytes,1,rep,name=producedSecretResponses,proto3" json:"producedSecretResponses,omitempty"` + Error *BlockSubmissionErrorMsg `protobuf:"bytes,2,opt,name=error,proto3" json:"error,omitempty"` // todo (@matt) - remove this BlockSubmissionError field once we are using the Status() to update host view of enclave state } func (x *BlockSubmissionResponseMsg) Reset() { @@ -3149,6 +3149,7 @@ type BatchHeaderMsg struct { LatestInboundCrossChainHash []byte `protobuf:"bytes,15,opt,name=LatestInboundCrossChainHash,proto3" json:"LatestInboundCrossChainHash,omitempty"` CrossChainMessages []*CrossChainMsg `protobuf:"bytes,16,rep,name=CrossChainMessages,proto3" json:"CrossChainMessages,omitempty"` SequencerOrderNo uint64 `protobuf:"varint,17,opt,name=SequencerOrderNo,proto3" json:"SequencerOrderNo,omitempty"` + TransferTree []byte `protobuf:"bytes,18,opt,name=TransferTree,proto3" json:"TransferTree,omitempty"` } func (x *BatchHeaderMsg) Reset() { @@ -3302,6 +3303,13 @@ func (x *BatchHeaderMsg) GetSequencerOrderNo() uint64 { return 0 } +func (x *BatchHeaderMsg) GetTransferTree() []byte { + if x != nil { + return x.TransferTree + } + return nil +} + type ExtRollupMsg struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -3933,12 +3941,12 @@ var file_enclave_proto_rawDesc = []byte{ 0xae, 0x01, 0x0a, 0x1a, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x4d, 0x73, 0x67, 0x12, 0x56, 0x0a, 0x17, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x65, 0x64, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x4d, 0x73, 0x67, 0x52, 0x17, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x65, 0x64, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x73, 0x12, 0x38, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, - 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, + 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x4d, 0x73, 0x67, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x22, 0x47, 0x0a, 0x17, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x73, 0x73, @@ -3961,7 +3969,7 @@ var file_enclave_proto_rawDesc = []byte{ 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x1a, 0x0a, 0x08, 0x74, 0x78, 0x48, 0x61, 0x73, 0x68, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x08, 0x74, 0x78, 0x48, 0x61, 0x73, 0x68, 0x65, 0x73, 0x12, 0x10, 0x0a, 0x03, 0x74, 0x78, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, - 0x52, 0x03, 0x74, 0x78, 0x73, 0x22, 0xc0, 0x04, 0x0a, 0x0e, 0x42, 0x61, 0x74, 0x63, 0x68, 0x48, + 0x52, 0x03, 0x74, 0x78, 0x73, 0x22, 0xe4, 0x04, 0x0a, 0x0e, 0x42, 0x61, 0x74, 0x63, 0x68, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x4d, 0x73, 0x67, 0x12, 0x1e, 0x0a, 0x0a, 0x50, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x48, 0x61, 0x73, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0a, 0x50, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x48, 0x61, 0x73, 0x68, 0x12, 0x14, 0x0a, 0x05, 0x50, 0x72, 0x6f, 0x6f, @@ -3997,196 +4005,198 @@ var file_enclave_proto_rawDesc = []byte{ 0x68, 0x61, 0x69, 0x6e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x12, 0x2a, 0x0a, 0x10, 0x53, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x72, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x4e, 0x6f, 0x18, 0x11, 0x20, 0x01, 0x28, 0x04, 0x52, 0x10, 0x53, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, - 0x72, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x4e, 0x6f, 0x22, 0x8c, 0x01, 0x0a, 0x0c, 0x45, 0x78, 0x74, - 0x52, 0x6f, 0x6c, 0x6c, 0x75, 0x70, 0x4d, 0x73, 0x67, 0x12, 0x32, 0x0a, 0x06, 0x68, 0x65, 0x61, - 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x65, 0x6e, 0x65, - 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x52, 0x6f, 0x6c, 0x6c, 0x75, 0x70, 0x48, 0x65, 0x61, 0x64, - 0x65, 0x72, 0x4d, 0x73, 0x67, 0x52, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x24, 0x0a, - 0x0d, 0x62, 0x61, 0x74, 0x63, 0x68, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x73, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0d, 0x62, 0x61, 0x74, 0x63, 0x68, 0x50, 0x61, 0x79, 0x6c, 0x6f, - 0x61, 0x64, 0x73, 0x12, 0x22, 0x0a, 0x0c, 0x62, 0x61, 0x74, 0x63, 0x68, 0x48, 0x65, 0x61, 0x64, - 0x65, 0x72, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0c, 0x62, 0x61, 0x74, 0x63, 0x68, - 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x22, 0xbf, 0x02, 0x0a, 0x0f, 0x52, 0x6f, 0x6c, 0x6c, - 0x75, 0x70, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x4d, 0x73, 0x67, 0x12, 0x1e, 0x0a, 0x0a, 0x50, - 0x61, 0x72, 0x65, 0x6e, 0x74, 0x48, 0x61, 0x73, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, - 0x0a, 0x50, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x48, 0x61, 0x73, 0x68, 0x12, 0x14, 0x0a, 0x05, 0x50, - 0x72, 0x6f, 0x6f, 0x66, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x50, 0x72, 0x6f, 0x6f, - 0x66, 0x12, 0x20, 0x0a, 0x0b, 0x50, 0x72, 0x6f, 0x6f, 0x66, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, 0x50, 0x72, 0x6f, 0x6f, 0x66, 0x4e, 0x75, 0x6d, - 0x62, 0x65, 0x72, 0x12, 0x16, 0x0a, 0x06, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x04, 0x20, - 0x01, 0x28, 0x04, 0x52, 0x06, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x54, - 0x69, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x04, 0x52, 0x04, 0x54, 0x69, 0x6d, 0x65, 0x12, - 0x1a, 0x0a, 0x08, 0x43, 0x6f, 0x69, 0x6e, 0x62, 0x61, 0x73, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, - 0x0c, 0x52, 0x08, 0x43, 0x6f, 0x69, 0x6e, 0x62, 0x61, 0x73, 0x65, 0x12, 0x48, 0x0a, 0x12, 0x43, - 0x72, 0x6f, 0x73, 0x73, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, - 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, - 0x74, 0x65, 0x64, 0x2e, 0x43, 0x72, 0x6f, 0x73, 0x73, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x4d, 0x73, - 0x67, 0x52, 0x12, 0x43, 0x72, 0x6f, 0x73, 0x73, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x4d, 0x65, 0x73, - 0x73, 0x61, 0x67, 0x65, 0x73, 0x12, 0x0c, 0x0a, 0x01, 0x52, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0c, - 0x52, 0x01, 0x52, 0x12, 0x0c, 0x0a, 0x01, 0x53, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x01, - 0x53, 0x12, 0x26, 0x0a, 0x0e, 0x4c, 0x61, 0x73, 0x74, 0x42, 0x61, 0x74, 0x63, 0x68, 0x53, 0x65, - 0x71, 0x4e, 0x6f, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0e, 0x4c, 0x61, 0x73, 0x74, 0x42, - 0x61, 0x74, 0x63, 0x68, 0x53, 0x65, 0x71, 0x4e, 0x6f, 0x22, 0xa9, 0x01, 0x0a, 0x11, 0x53, 0x65, - 0x63, 0x72, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x4d, 0x73, 0x67, 0x12, - 0x16, 0x0a, 0x06, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, - 0x06, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x12, 0x20, 0x0a, 0x0b, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x65, 0x72, 0x49, 0x44, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0b, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x65, 0x72, 0x49, 0x44, 0x12, 0x20, 0x0a, 0x0b, 0x48, 0x6f, 0x73, - 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, - 0x48, 0x6f, 0x73, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x38, 0x0a, 0x0b, 0x73, - 0x79, 0x73, 0x74, 0x65, 0x6d, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x16, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x53, 0x79, 0x73, - 0x74, 0x65, 0x6d, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x0b, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, - 0x45, 0x72, 0x72, 0x6f, 0x72, 0x22, 0x61, 0x0a, 0x0d, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, - 0x77, 0x61, 0x6c, 0x4d, 0x73, 0x67, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x1c, - 0x0a, 0x09, 0x72, 0x65, 0x63, 0x69, 0x70, 0x69, 0x65, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x0c, 0x52, 0x09, 0x72, 0x65, 0x63, 0x69, 0x70, 0x69, 0x65, 0x6e, 0x74, 0x12, 0x1a, 0x0a, 0x08, - 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x08, - 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x32, 0xcd, 0x11, 0x0a, 0x0c, 0x45, 0x6e, 0x63, - 0x6c, 0x61, 0x76, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x3f, 0x0a, 0x06, 0x53, 0x74, 0x61, - 0x74, 0x75, 0x73, 0x12, 0x18, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, - 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, - 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x4e, 0x0a, 0x0b, 0x41, 0x74, - 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1d, 0x2e, 0x67, 0x65, 0x6e, 0x65, - 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, - 0x61, 0x74, 0x65, 0x64, 0x2e, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x57, 0x0a, 0x0e, 0x47, 0x65, - 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x12, 0x20, 0x2e, 0x67, - 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, - 0x65, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, - 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x47, 0x65, 0x6e, 0x65, 0x72, - 0x61, 0x74, 0x65, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0x00, 0x12, 0x4e, 0x0a, 0x0b, 0x49, 0x6e, 0x69, 0x74, 0x45, 0x6e, 0x63, 0x6c, 0x61, - 0x76, 0x65, 0x12, 0x1d, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x49, - 0x6e, 0x69, 0x74, 0x45, 0x6e, 0x63, 0x6c, 0x61, 0x76, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x1e, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x49, 0x6e, - 0x69, 0x74, 0x45, 0x6e, 0x63, 0x6c, 0x61, 0x76, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0x00, 0x12, 0x50, 0x0a, 0x0d, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x4c, 0x31, 0x42, - 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x1d, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, - 0x2e, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, - 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x45, 0x0a, 0x08, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x54, - 0x78, 0x12, 0x1a, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x53, 0x75, - 0x62, 0x6d, 0x69, 0x74, 0x54, 0x78, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, - 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, - 0x54, 0x78, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x4e, 0x0a, 0x0b, - 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x42, 0x61, 0x74, 0x63, 0x68, 0x12, 0x1d, 0x2e, 0x67, 0x65, - 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x42, 0x61, - 0x74, 0x63, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x67, 0x65, 0x6e, - 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x42, 0x61, 0x74, - 0x63, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x42, 0x0a, 0x07, - 0x4f, 0x62, 0x73, 0x43, 0x61, 0x6c, 0x6c, 0x12, 0x19, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, - 0x74, 0x65, 0x64, 0x2e, 0x4f, 0x62, 0x73, 0x43, 0x61, 0x6c, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x4f, - 0x62, 0x73, 0x43, 0x61, 0x6c, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, - 0x12, 0x66, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, - 0x6f, 0x6e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x25, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, - 0x74, 0x65, 0x64, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, - 0x6f, 0x6e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, - 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x72, - 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x39, 0x0a, 0x04, 0x53, 0x74, 0x6f, 0x70, - 0x12, 0x16, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x53, 0x74, 0x6f, - 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, - 0x61, 0x74, 0x65, 0x64, 0x2e, 0x53, 0x74, 0x6f, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0x00, 0x12, 0x57, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, - 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x20, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, - 0x64, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, - 0x74, 0x65, 0x64, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, - 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x6c, 0x0a, 0x15, - 0x47, 0x65, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, - 0x63, 0x65, 0x69, 0x70, 0x74, 0x12, 0x27, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, - 0x64, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, - 0x52, 0x65, 0x63, 0x65, 0x69, 0x70, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x28, - 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x72, - 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x63, 0x65, 0x69, 0x70, 0x74, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x4b, 0x0a, 0x0a, 0x47, 0x65, - 0x74, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x1c, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, - 0x61, 0x74, 0x65, 0x64, 0x2e, 0x47, 0x65, 0x74, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, - 0x65, 0x64, 0x2e, 0x47, 0x65, 0x74, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x42, 0x0a, 0x07, 0x47, 0x65, 0x74, 0x43, 0x6f, - 0x64, 0x65, 0x12, 0x19, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x47, - 0x65, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, - 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x64, - 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x48, 0x0a, 0x09, 0x53, - 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x12, 0x1b, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, - 0x61, 0x74, 0x65, 0x64, 0x2e, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, - 0x64, 0x2e, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x4e, 0x0a, 0x0b, 0x55, 0x6e, 0x73, 0x75, 0x62, 0x73, 0x63, - 0x72, 0x69, 0x62, 0x65, 0x12, 0x1d, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, - 0x2e, 0x55, 0x6e, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, - 0x55, 0x6e, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x4e, 0x0a, 0x0b, 0x45, 0x73, 0x74, 0x69, 0x6d, 0x61, 0x74, - 0x65, 0x47, 0x61, 0x73, 0x12, 0x1d, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, - 0x2e, 0x45, 0x73, 0x74, 0x69, 0x6d, 0x61, 0x74, 0x65, 0x47, 0x61, 0x73, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, - 0x45, 0x73, 0x74, 0x69, 0x6d, 0x61, 0x74, 0x65, 0x47, 0x61, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x42, 0x0a, 0x07, 0x47, 0x65, 0x74, 0x4c, 0x6f, 0x67, 0x73, - 0x12, 0x19, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x47, 0x65, 0x74, - 0x4c, 0x6f, 0x67, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x67, 0x65, - 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x47, 0x65, 0x74, 0x4c, 0x6f, 0x67, 0x73, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x45, 0x0a, 0x0b, 0x48, 0x65, 0x61, - 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x12, 0x14, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, - 0x61, 0x74, 0x65, 0x64, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x41, 0x72, 0x67, 0x73, 0x1a, 0x1e, - 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x48, 0x65, 0x61, 0x6c, 0x74, - 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, - 0x12, 0x45, 0x0a, 0x08, 0x47, 0x65, 0x74, 0x42, 0x61, 0x74, 0x63, 0x68, 0x12, 0x1a, 0x2e, 0x67, + 0x72, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x4e, 0x6f, 0x12, 0x22, 0x0a, 0x0c, 0x54, 0x72, 0x61, 0x6e, + 0x73, 0x66, 0x65, 0x72, 0x54, 0x72, 0x65, 0x65, 0x18, 0x12, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0c, + 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x54, 0x72, 0x65, 0x65, 0x22, 0x8c, 0x01, 0x0a, + 0x0c, 0x45, 0x78, 0x74, 0x52, 0x6f, 0x6c, 0x6c, 0x75, 0x70, 0x4d, 0x73, 0x67, 0x12, 0x32, 0x0a, + 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, + 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x52, 0x6f, 0x6c, 0x6c, 0x75, 0x70, + 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x4d, 0x73, 0x67, 0x52, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, + 0x72, 0x12, 0x24, 0x0a, 0x0d, 0x62, 0x61, 0x74, 0x63, 0x68, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, + 0x64, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0d, 0x62, 0x61, 0x74, 0x63, 0x68, 0x50, + 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x73, 0x12, 0x22, 0x0a, 0x0c, 0x62, 0x61, 0x74, 0x63, 0x68, + 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0c, 0x62, + 0x61, 0x74, 0x63, 0x68, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x22, 0xbf, 0x02, 0x0a, 0x0f, + 0x52, 0x6f, 0x6c, 0x6c, 0x75, 0x70, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x4d, 0x73, 0x67, 0x12, + 0x1e, 0x0a, 0x0a, 0x50, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x48, 0x61, 0x73, 0x68, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0c, 0x52, 0x0a, 0x50, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x48, 0x61, 0x73, 0x68, 0x12, + 0x14, 0x0a, 0x05, 0x50, 0x72, 0x6f, 0x6f, 0x66, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, + 0x50, 0x72, 0x6f, 0x6f, 0x66, 0x12, 0x20, 0x0a, 0x0b, 0x50, 0x72, 0x6f, 0x6f, 0x66, 0x4e, 0x75, + 0x6d, 0x62, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, 0x50, 0x72, 0x6f, 0x6f, + 0x66, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x16, 0x0a, 0x06, 0x4e, 0x75, 0x6d, 0x62, 0x65, + 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x06, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, + 0x12, 0x0a, 0x04, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x04, 0x52, 0x04, 0x54, + 0x69, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x43, 0x6f, 0x69, 0x6e, 0x62, 0x61, 0x73, 0x65, 0x18, + 0x06, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x08, 0x43, 0x6f, 0x69, 0x6e, 0x62, 0x61, 0x73, 0x65, 0x12, + 0x48, 0x0a, 0x12, 0x43, 0x72, 0x6f, 0x73, 0x73, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x4d, 0x65, 0x73, + 0x73, 0x61, 0x67, 0x65, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x67, 0x65, + 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x43, 0x72, 0x6f, 0x73, 0x73, 0x43, 0x68, 0x61, + 0x69, 0x6e, 0x4d, 0x73, 0x67, 0x52, 0x12, 0x43, 0x72, 0x6f, 0x73, 0x73, 0x43, 0x68, 0x61, 0x69, + 0x6e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x12, 0x0c, 0x0a, 0x01, 0x52, 0x18, 0x08, + 0x20, 0x01, 0x28, 0x0c, 0x52, 0x01, 0x52, 0x12, 0x0c, 0x0a, 0x01, 0x53, 0x18, 0x09, 0x20, 0x01, + 0x28, 0x0c, 0x52, 0x01, 0x53, 0x12, 0x26, 0x0a, 0x0e, 0x4c, 0x61, 0x73, 0x74, 0x42, 0x61, 0x74, + 0x63, 0x68, 0x53, 0x65, 0x71, 0x4e, 0x6f, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0e, 0x4c, + 0x61, 0x73, 0x74, 0x42, 0x61, 0x74, 0x63, 0x68, 0x53, 0x65, 0x71, 0x4e, 0x6f, 0x22, 0xa9, 0x01, + 0x0a, 0x11, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x4d, 0x73, 0x67, 0x12, 0x16, 0x0a, 0x06, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0c, 0x52, 0x06, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x12, 0x20, 0x0a, 0x0b, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x65, 0x72, 0x49, 0x44, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, + 0x52, 0x0b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x65, 0x72, 0x49, 0x44, 0x12, 0x20, 0x0a, + 0x0b, 0x48, 0x6f, 0x73, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0b, 0x48, 0x6f, 0x73, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, + 0x38, 0x0a, 0x0b, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, + 0x2e, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x0b, 0x73, 0x79, + 0x73, 0x74, 0x65, 0x6d, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x22, 0x61, 0x0a, 0x0d, 0x57, 0x69, 0x74, + 0x68, 0x64, 0x72, 0x61, 0x77, 0x61, 0x6c, 0x4d, 0x73, 0x67, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x6d, + 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, + 0x6e, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x72, 0x65, 0x63, 0x69, 0x70, 0x69, 0x65, 0x6e, 0x74, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x72, 0x65, 0x63, 0x69, 0x70, 0x69, 0x65, 0x6e, 0x74, + 0x12, 0x1a, 0x0a, 0x08, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x0c, 0x52, 0x08, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x32, 0xcd, 0x11, 0x0a, + 0x0c, 0x45, 0x6e, 0x63, 0x6c, 0x61, 0x76, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x3f, 0x0a, + 0x06, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x18, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, + 0x74, 0x65, 0x64, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x19, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x53, 0x74, + 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x4e, + 0x0a, 0x0b, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1d, 0x2e, + 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x67, + 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x57, + 0x0a, 0x0e, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, + 0x12, 0x20, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x47, 0x65, 0x6e, + 0x65, 0x72, 0x61, 0x74, 0x65, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x47, + 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x4e, 0x0a, 0x0b, 0x49, 0x6e, 0x69, 0x74, 0x45, + 0x6e, 0x63, 0x6c, 0x61, 0x76, 0x65, 0x12, 0x1d, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, + 0x65, 0x64, 0x2e, 0x49, 0x6e, 0x69, 0x74, 0x45, 0x6e, 0x63, 0x6c, 0x61, 0x76, 0x65, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, + 0x64, 0x2e, 0x49, 0x6e, 0x69, 0x74, 0x45, 0x6e, 0x63, 0x6c, 0x61, 0x76, 0x65, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x50, 0x0a, 0x0d, 0x53, 0x75, 0x62, 0x6d, 0x69, + 0x74, 0x4c, 0x31, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x1d, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, + 0x61, 0x74, 0x65, 0x64, 0x2e, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, + 0x74, 0x65, 0x64, 0x2e, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x45, 0x0a, 0x08, 0x53, 0x75, 0x62, + 0x6d, 0x69, 0x74, 0x54, 0x78, 0x12, 0x1a, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, + 0x64, 0x2e, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x54, 0x78, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x1b, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x53, 0x75, + 0x62, 0x6d, 0x69, 0x74, 0x54, 0x78, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, + 0x12, 0x4e, 0x0a, 0x0b, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x42, 0x61, 0x74, 0x63, 0x68, 0x12, + 0x1d, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x53, 0x75, 0x62, 0x6d, + 0x69, 0x74, 0x42, 0x61, 0x74, 0x63, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, + 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x53, 0x75, 0x62, 0x6d, 0x69, + 0x74, 0x42, 0x61, 0x74, 0x63, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, + 0x12, 0x42, 0x0a, 0x07, 0x4f, 0x62, 0x73, 0x43, 0x61, 0x6c, 0x6c, 0x12, 0x19, 0x2e, 0x67, 0x65, + 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x4f, 0x62, 0x73, 0x43, 0x61, 0x6c, 0x6c, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, + 0x65, 0x64, 0x2e, 0x4f, 0x62, 0x73, 0x43, 0x61, 0x6c, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x00, 0x12, 0x66, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, + 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x25, 0x2e, 0x67, 0x65, + 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, + 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x47, + 0x65, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x75, + 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x39, 0x0a, 0x04, + 0x53, 0x74, 0x6f, 0x70, 0x12, 0x16, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, + 0x2e, 0x53, 0x74, 0x6f, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x67, + 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x53, 0x74, 0x6f, 0x70, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x57, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x54, 0x72, + 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x20, 0x2e, 0x67, 0x65, 0x6e, 0x65, + 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x67, 0x65, + 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, + 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, + 0x12, 0x6c, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x52, 0x65, 0x63, 0x65, 0x69, 0x70, 0x74, 0x12, 0x27, 0x2e, 0x67, 0x65, 0x6e, 0x65, + 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x63, 0x65, 0x69, 0x70, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x47, + 0x65, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x63, + 0x65, 0x69, 0x70, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x4b, + 0x0a, 0x0a, 0x47, 0x65, 0x74, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x1c, 0x2e, 0x67, + 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x47, 0x65, 0x74, 0x42, 0x61, 0x6c, 0x61, + 0x6e, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x67, 0x65, 0x6e, + 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x47, 0x65, 0x74, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, + 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x42, 0x0a, 0x07, 0x47, + 0x65, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x19, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, + 0x65, 0x64, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x1a, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x47, 0x65, + 0x74, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, + 0x48, 0x0a, 0x09, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x12, 0x1b, 0x2e, 0x67, + 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, + 0x62, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x67, 0x65, 0x6e, 0x65, + 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x4e, 0x0a, 0x0b, 0x55, 0x6e, 0x73, + 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x12, 0x1d, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, + 0x61, 0x74, 0x65, 0x64, 0x2e, 0x55, 0x6e, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, + 0x74, 0x65, 0x64, 0x2e, 0x55, 0x6e, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x4e, 0x0a, 0x0b, 0x45, 0x73, 0x74, + 0x69, 0x6d, 0x61, 0x74, 0x65, 0x47, 0x61, 0x73, 0x12, 0x1d, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, + 0x61, 0x74, 0x65, 0x64, 0x2e, 0x45, 0x73, 0x74, 0x69, 0x6d, 0x61, 0x74, 0x65, 0x47, 0x61, 0x73, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, + 0x74, 0x65, 0x64, 0x2e, 0x45, 0x73, 0x74, 0x69, 0x6d, 0x61, 0x74, 0x65, 0x47, 0x61, 0x73, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x42, 0x0a, 0x07, 0x47, 0x65, 0x74, + 0x4c, 0x6f, 0x67, 0x73, 0x12, 0x19, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, + 0x2e, 0x47, 0x65, 0x74, 0x4c, 0x6f, 0x67, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x1a, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x47, 0x65, 0x74, 0x4c, + 0x6f, 0x67, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x45, 0x0a, + 0x0b, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x12, 0x14, 0x2e, 0x67, + 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x41, 0x72, + 0x67, 0x73, 0x1a, 0x1e, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x48, + 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x00, 0x12, 0x45, 0x0a, 0x08, 0x47, 0x65, 0x74, 0x42, 0x61, 0x74, 0x63, 0x68, + 0x12, 0x1a, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x47, 0x65, 0x74, + 0x42, 0x61, 0x74, 0x63, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x47, 0x65, 0x74, 0x42, 0x61, 0x74, 0x63, - 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, - 0x61, 0x74, 0x65, 0x64, 0x2e, 0x47, 0x65, 0x74, 0x42, 0x61, 0x74, 0x63, 0x68, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x53, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x42, 0x61, - 0x74, 0x63, 0x68, 0x42, 0x79, 0x53, 0x65, 0x71, 0x4e, 0x6f, 0x12, 0x21, 0x2e, 0x67, 0x65, 0x6e, - 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x47, 0x65, 0x74, 0x42, 0x61, 0x74, 0x63, 0x68, 0x42, - 0x79, 0x53, 0x65, 0x71, 0x4e, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, - 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x47, 0x65, 0x74, 0x42, 0x61, 0x74, - 0x63, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x4e, 0x0a, 0x0b, - 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x42, 0x61, 0x74, 0x63, 0x68, 0x12, 0x1d, 0x2e, 0x67, 0x65, - 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x42, 0x61, - 0x74, 0x63, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x67, 0x65, 0x6e, - 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x42, 0x61, 0x74, - 0x63, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x51, 0x0a, 0x0c, - 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x6f, 0x6c, 0x6c, 0x75, 0x70, 0x12, 0x1e, 0x2e, 0x67, - 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, - 0x6f, 0x6c, 0x6c, 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x67, - 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, - 0x6f, 0x6c, 0x6c, 0x75, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, - 0x6c, 0x0a, 0x15, 0x44, 0x65, 0x62, 0x75, 0x67, 0x54, 0x72, 0x61, 0x63, 0x65, 0x54, 0x72, 0x61, - 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x27, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, - 0x61, 0x74, 0x65, 0x64, 0x2e, 0x44, 0x65, 0x62, 0x75, 0x67, 0x54, 0x72, 0x61, 0x63, 0x65, 0x54, - 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x28, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x44, 0x65, - 0x62, 0x75, 0x67, 0x54, 0x72, 0x61, 0x63, 0x65, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, - 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x5a, 0x0a, - 0x0f, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x4c, 0x32, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x73, - 0x12, 0x21, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x53, 0x74, 0x72, - 0x65, 0x61, 0x6d, 0x4c, 0x32, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, - 0x45, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x64, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x30, 0x01, 0x12, 0x6f, 0x0a, 0x16, 0x44, 0x65, 0x62, - 0x75, 0x67, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x4c, 0x6f, 0x67, 0x52, 0x65, 0x6c, 0x65, 0x76, 0x61, - 0x6e, 0x63, 0x79, 0x12, 0x28, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, - 0x44, 0x65, 0x62, 0x75, 0x67, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x4c, 0x6f, 0x67, 0x52, 0x65, 0x6c, - 0x65, 0x76, 0x61, 0x6e, 0x63, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, - 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x44, 0x65, 0x62, 0x75, 0x67, 0x45, - 0x76, 0x65, 0x6e, 0x74, 0x4c, 0x6f, 0x67, 0x52, 0x65, 0x6c, 0x65, 0x76, 0x61, 0x6e, 0x63, 0x79, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x6c, 0x0a, 0x15, 0x47, 0x65, - 0x74, 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x43, 0x6f, - 0x75, 0x6e, 0x74, 0x12, 0x27, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, - 0x47, 0x65, 0x74, 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, - 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x67, - 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x6f, 0x74, 0x61, - 0x6c, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0x17, 0x5a, 0x15, 0x65, 0x6e, 0x63, 0x6c, - 0x61, 0x76, 0x65, 0x2f, 0x72, 0x70, 0x63, 0x2f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, - 0x64, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x53, 0x0a, 0x0f, 0x47, + 0x65, 0x74, 0x42, 0x61, 0x74, 0x63, 0x68, 0x42, 0x79, 0x53, 0x65, 0x71, 0x4e, 0x6f, 0x12, 0x21, + 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x47, 0x65, 0x74, 0x42, 0x61, + 0x74, 0x63, 0x68, 0x42, 0x79, 0x53, 0x65, 0x71, 0x4e, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x1b, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x47, 0x65, + 0x74, 0x42, 0x61, 0x74, 0x63, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, + 0x12, 0x4e, 0x0a, 0x0b, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x42, 0x61, 0x74, 0x63, 0x68, 0x12, + 0x1d, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x43, 0x72, 0x65, 0x61, + 0x74, 0x65, 0x42, 0x61, 0x74, 0x63, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, + 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, + 0x65, 0x42, 0x61, 0x74, 0x63, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, + 0x12, 0x51, 0x0a, 0x0c, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x6f, 0x6c, 0x6c, 0x75, 0x70, + 0x12, 0x1e, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x43, 0x72, 0x65, + 0x61, 0x74, 0x65, 0x52, 0x6f, 0x6c, 0x6c, 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x1f, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x43, 0x72, 0x65, + 0x61, 0x74, 0x65, 0x52, 0x6f, 0x6c, 0x6c, 0x75, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0x00, 0x12, 0x6c, 0x0a, 0x15, 0x44, 0x65, 0x62, 0x75, 0x67, 0x54, 0x72, 0x61, 0x63, + 0x65, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x27, 0x2e, 0x67, + 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x44, 0x65, 0x62, 0x75, 0x67, 0x54, 0x72, + 0x61, 0x63, 0x65, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, + 0x64, 0x2e, 0x44, 0x65, 0x62, 0x75, 0x67, 0x54, 0x72, 0x61, 0x63, 0x65, 0x54, 0x72, 0x61, 0x6e, + 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x00, 0x12, 0x5a, 0x0a, 0x0f, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x4c, 0x32, 0x55, 0x70, 0x64, + 0x61, 0x74, 0x65, 0x73, 0x12, 0x21, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, + 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x4c, 0x32, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x73, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, + 0x74, 0x65, 0x64, 0x2e, 0x45, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x64, 0x55, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x30, 0x01, 0x12, 0x6f, 0x0a, + 0x16, 0x44, 0x65, 0x62, 0x75, 0x67, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x4c, 0x6f, 0x67, 0x52, 0x65, + 0x6c, 0x65, 0x76, 0x61, 0x6e, 0x63, 0x79, 0x12, 0x28, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, + 0x74, 0x65, 0x64, 0x2e, 0x44, 0x65, 0x62, 0x75, 0x67, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x4c, 0x6f, + 0x67, 0x52, 0x65, 0x6c, 0x65, 0x76, 0x61, 0x6e, 0x63, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x29, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x44, 0x65, + 0x62, 0x75, 0x67, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x4c, 0x6f, 0x67, 0x52, 0x65, 0x6c, 0x65, 0x76, + 0x61, 0x6e, 0x63, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x6c, + 0x0a, 0x15, 0x47, 0x65, 0x74, 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x61, + 0x63, 0x74, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x27, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, + 0x74, 0x65, 0x64, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x43, 0x6f, 0x6e, 0x74, + 0x72, 0x61, 0x63, 0x74, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x28, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x47, 0x65, 0x74, + 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x43, 0x6f, 0x75, + 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0x17, 0x5a, 0x15, + 0x65, 0x6e, 0x63, 0x6c, 0x61, 0x76, 0x65, 0x2f, 0x72, 0x70, 0x63, 0x2f, 0x67, 0x65, 0x6e, 0x65, + 0x72, 0x61, 0x74, 0x65, 0x64, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/go/common/rpc/generated/enclave.proto b/go/common/rpc/generated/enclave.proto index c37076c384..ccc4d9ba18 100644 --- a/go/common/rpc/generated/enclave.proto +++ b/go/common/rpc/generated/enclave.proto @@ -358,6 +358,7 @@ message BatchHeaderMsg { bytes LatestInboundCrossChainHash = 15; repeated CrossChainMsg CrossChainMessages = 16; uint64 SequencerOrderNo = 17; + bytes TransferTree = 18; } message ExtRollupMsg { diff --git a/go/common/rpc/generated/enclave_grpc.pb.go b/go/common/rpc/generated/enclave_grpc.pb.go index ccc7333c5b..c0a97bef64 100644 --- a/go/common/rpc/generated/enclave_grpc.pb.go +++ b/go/common/rpc/generated/enclave_grpc.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: -// - protoc-gen-go-grpc v1.2.0 -// - protoc v3.21.9 +// - protoc-gen-go-grpc v1.3.0 +// - protoc v4.23.4 // source: enclave.proto package generated @@ -18,6 +18,36 @@ import ( // Requires gRPC-Go v1.32.0 or later. const _ = grpc.SupportPackageIsVersion7 +const ( + EnclaveProto_Status_FullMethodName = "/generated.EnclaveProto/Status" + EnclaveProto_Attestation_FullMethodName = "/generated.EnclaveProto/Attestation" + EnclaveProto_GenerateSecret_FullMethodName = "/generated.EnclaveProto/GenerateSecret" + EnclaveProto_InitEnclave_FullMethodName = "/generated.EnclaveProto/InitEnclave" + EnclaveProto_SubmitL1Block_FullMethodName = "/generated.EnclaveProto/SubmitL1Block" + EnclaveProto_SubmitTx_FullMethodName = "/generated.EnclaveProto/SubmitTx" + EnclaveProto_SubmitBatch_FullMethodName = "/generated.EnclaveProto/SubmitBatch" + EnclaveProto_ObsCall_FullMethodName = "/generated.EnclaveProto/ObsCall" + EnclaveProto_GetTransactionCount_FullMethodName = "/generated.EnclaveProto/GetTransactionCount" + EnclaveProto_Stop_FullMethodName = "/generated.EnclaveProto/Stop" + EnclaveProto_GetTransaction_FullMethodName = "/generated.EnclaveProto/GetTransaction" + EnclaveProto_GetTransactionReceipt_FullMethodName = "/generated.EnclaveProto/GetTransactionReceipt" + EnclaveProto_GetBalance_FullMethodName = "/generated.EnclaveProto/GetBalance" + EnclaveProto_GetCode_FullMethodName = "/generated.EnclaveProto/GetCode" + EnclaveProto_Subscribe_FullMethodName = "/generated.EnclaveProto/Subscribe" + EnclaveProto_Unsubscribe_FullMethodName = "/generated.EnclaveProto/Unsubscribe" + EnclaveProto_EstimateGas_FullMethodName = "/generated.EnclaveProto/EstimateGas" + EnclaveProto_GetLogs_FullMethodName = "/generated.EnclaveProto/GetLogs" + EnclaveProto_HealthCheck_FullMethodName = "/generated.EnclaveProto/HealthCheck" + EnclaveProto_GetBatch_FullMethodName = "/generated.EnclaveProto/GetBatch" + EnclaveProto_GetBatchBySeqNo_FullMethodName = "/generated.EnclaveProto/GetBatchBySeqNo" + EnclaveProto_CreateBatch_FullMethodName = "/generated.EnclaveProto/CreateBatch" + EnclaveProto_CreateRollup_FullMethodName = "/generated.EnclaveProto/CreateRollup" + EnclaveProto_DebugTraceTransaction_FullMethodName = "/generated.EnclaveProto/DebugTraceTransaction" + EnclaveProto_StreamL2Updates_FullMethodName = "/generated.EnclaveProto/StreamL2Updates" + EnclaveProto_DebugEventLogRelevancy_FullMethodName = "/generated.EnclaveProto/DebugEventLogRelevancy" + EnclaveProto_GetTotalContractCount_FullMethodName = "/generated.EnclaveProto/GetTotalContractCount" +) + // EnclaveProtoClient is the client API for EnclaveProto service. // // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. @@ -31,8 +61,10 @@ type EnclaveProtoClient interface { // Init - initialise an enclave with a seed received by another enclave InitEnclave(ctx context.Context, in *InitEnclaveRequest, opts ...grpc.CallOption) (*InitEnclaveResponse, error) // SubmitL1Block - Used for the host to submit blocks to the enclave, these may be: - // a. historic block - if the enclave is behind and in the process of catching up with the L1 state - // b. the latest block published by the L1, to which the enclave should respond with a rollup + // + // a. historic block - if the enclave is behind and in the process of catching up with the L1 state + // b. the latest block published by the L1, to which the enclave should respond with a rollup + // // It is the responsibility of the host to gossip the returned rollup // For good functioning the caller should always submit blocks ordered by height // submitting a block before receiving ancestors of it, will result in it being ignored @@ -87,7 +119,7 @@ func NewEnclaveProtoClient(cc grpc.ClientConnInterface) EnclaveProtoClient { func (c *enclaveProtoClient) Status(ctx context.Context, in *StatusRequest, opts ...grpc.CallOption) (*StatusResponse, error) { out := new(StatusResponse) - err := c.cc.Invoke(ctx, "/generated.EnclaveProto/Status", in, out, opts...) + err := c.cc.Invoke(ctx, EnclaveProto_Status_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -96,7 +128,7 @@ func (c *enclaveProtoClient) Status(ctx context.Context, in *StatusRequest, opts func (c *enclaveProtoClient) Attestation(ctx context.Context, in *AttestationRequest, opts ...grpc.CallOption) (*AttestationResponse, error) { out := new(AttestationResponse) - err := c.cc.Invoke(ctx, "/generated.EnclaveProto/Attestation", in, out, opts...) + err := c.cc.Invoke(ctx, EnclaveProto_Attestation_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -105,7 +137,7 @@ func (c *enclaveProtoClient) Attestation(ctx context.Context, in *AttestationReq func (c *enclaveProtoClient) GenerateSecret(ctx context.Context, in *GenerateSecretRequest, opts ...grpc.CallOption) (*GenerateSecretResponse, error) { out := new(GenerateSecretResponse) - err := c.cc.Invoke(ctx, "/generated.EnclaveProto/GenerateSecret", in, out, opts...) + err := c.cc.Invoke(ctx, EnclaveProto_GenerateSecret_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -114,7 +146,7 @@ func (c *enclaveProtoClient) GenerateSecret(ctx context.Context, in *GenerateSec func (c *enclaveProtoClient) InitEnclave(ctx context.Context, in *InitEnclaveRequest, opts ...grpc.CallOption) (*InitEnclaveResponse, error) { out := new(InitEnclaveResponse) - err := c.cc.Invoke(ctx, "/generated.EnclaveProto/InitEnclave", in, out, opts...) + err := c.cc.Invoke(ctx, EnclaveProto_InitEnclave_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -123,7 +155,7 @@ func (c *enclaveProtoClient) InitEnclave(ctx context.Context, in *InitEnclaveReq func (c *enclaveProtoClient) SubmitL1Block(ctx context.Context, in *SubmitBlockRequest, opts ...grpc.CallOption) (*SubmitBlockResponse, error) { out := new(SubmitBlockResponse) - err := c.cc.Invoke(ctx, "/generated.EnclaveProto/SubmitL1Block", in, out, opts...) + err := c.cc.Invoke(ctx, EnclaveProto_SubmitL1Block_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -132,7 +164,7 @@ func (c *enclaveProtoClient) SubmitL1Block(ctx context.Context, in *SubmitBlockR func (c *enclaveProtoClient) SubmitTx(ctx context.Context, in *SubmitTxRequest, opts ...grpc.CallOption) (*SubmitTxResponse, error) { out := new(SubmitTxResponse) - err := c.cc.Invoke(ctx, "/generated.EnclaveProto/SubmitTx", in, out, opts...) + err := c.cc.Invoke(ctx, EnclaveProto_SubmitTx_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -141,7 +173,7 @@ func (c *enclaveProtoClient) SubmitTx(ctx context.Context, in *SubmitTxRequest, func (c *enclaveProtoClient) SubmitBatch(ctx context.Context, in *SubmitBatchRequest, opts ...grpc.CallOption) (*SubmitBatchResponse, error) { out := new(SubmitBatchResponse) - err := c.cc.Invoke(ctx, "/generated.EnclaveProto/SubmitBatch", in, out, opts...) + err := c.cc.Invoke(ctx, EnclaveProto_SubmitBatch_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -150,7 +182,7 @@ func (c *enclaveProtoClient) SubmitBatch(ctx context.Context, in *SubmitBatchReq func (c *enclaveProtoClient) ObsCall(ctx context.Context, in *ObsCallRequest, opts ...grpc.CallOption) (*ObsCallResponse, error) { out := new(ObsCallResponse) - err := c.cc.Invoke(ctx, "/generated.EnclaveProto/ObsCall", in, out, opts...) + err := c.cc.Invoke(ctx, EnclaveProto_ObsCall_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -159,7 +191,7 @@ func (c *enclaveProtoClient) ObsCall(ctx context.Context, in *ObsCallRequest, op func (c *enclaveProtoClient) GetTransactionCount(ctx context.Context, in *GetTransactionCountRequest, opts ...grpc.CallOption) (*GetTransactionCountResponse, error) { out := new(GetTransactionCountResponse) - err := c.cc.Invoke(ctx, "/generated.EnclaveProto/GetTransactionCount", in, out, opts...) + err := c.cc.Invoke(ctx, EnclaveProto_GetTransactionCount_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -168,7 +200,7 @@ func (c *enclaveProtoClient) GetTransactionCount(ctx context.Context, in *GetTra func (c *enclaveProtoClient) Stop(ctx context.Context, in *StopRequest, opts ...grpc.CallOption) (*StopResponse, error) { out := new(StopResponse) - err := c.cc.Invoke(ctx, "/generated.EnclaveProto/Stop", in, out, opts...) + err := c.cc.Invoke(ctx, EnclaveProto_Stop_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -177,7 +209,7 @@ func (c *enclaveProtoClient) Stop(ctx context.Context, in *StopRequest, opts ... func (c *enclaveProtoClient) GetTransaction(ctx context.Context, in *GetTransactionRequest, opts ...grpc.CallOption) (*GetTransactionResponse, error) { out := new(GetTransactionResponse) - err := c.cc.Invoke(ctx, "/generated.EnclaveProto/GetTransaction", in, out, opts...) + err := c.cc.Invoke(ctx, EnclaveProto_GetTransaction_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -186,7 +218,7 @@ func (c *enclaveProtoClient) GetTransaction(ctx context.Context, in *GetTransact func (c *enclaveProtoClient) GetTransactionReceipt(ctx context.Context, in *GetTransactionReceiptRequest, opts ...grpc.CallOption) (*GetTransactionReceiptResponse, error) { out := new(GetTransactionReceiptResponse) - err := c.cc.Invoke(ctx, "/generated.EnclaveProto/GetTransactionReceipt", in, out, opts...) + err := c.cc.Invoke(ctx, EnclaveProto_GetTransactionReceipt_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -195,7 +227,7 @@ func (c *enclaveProtoClient) GetTransactionReceipt(ctx context.Context, in *GetT func (c *enclaveProtoClient) GetBalance(ctx context.Context, in *GetBalanceRequest, opts ...grpc.CallOption) (*GetBalanceResponse, error) { out := new(GetBalanceResponse) - err := c.cc.Invoke(ctx, "/generated.EnclaveProto/GetBalance", in, out, opts...) + err := c.cc.Invoke(ctx, EnclaveProto_GetBalance_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -204,7 +236,7 @@ func (c *enclaveProtoClient) GetBalance(ctx context.Context, in *GetBalanceReque func (c *enclaveProtoClient) GetCode(ctx context.Context, in *GetCodeRequest, opts ...grpc.CallOption) (*GetCodeResponse, error) { out := new(GetCodeResponse) - err := c.cc.Invoke(ctx, "/generated.EnclaveProto/GetCode", in, out, opts...) + err := c.cc.Invoke(ctx, EnclaveProto_GetCode_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -213,7 +245,7 @@ func (c *enclaveProtoClient) GetCode(ctx context.Context, in *GetCodeRequest, op func (c *enclaveProtoClient) Subscribe(ctx context.Context, in *SubscribeRequest, opts ...grpc.CallOption) (*SubscribeResponse, error) { out := new(SubscribeResponse) - err := c.cc.Invoke(ctx, "/generated.EnclaveProto/Subscribe", in, out, opts...) + err := c.cc.Invoke(ctx, EnclaveProto_Subscribe_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -222,7 +254,7 @@ func (c *enclaveProtoClient) Subscribe(ctx context.Context, in *SubscribeRequest func (c *enclaveProtoClient) Unsubscribe(ctx context.Context, in *UnsubscribeRequest, opts ...grpc.CallOption) (*UnsubscribeResponse, error) { out := new(UnsubscribeResponse) - err := c.cc.Invoke(ctx, "/generated.EnclaveProto/Unsubscribe", in, out, opts...) + err := c.cc.Invoke(ctx, EnclaveProto_Unsubscribe_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -231,7 +263,7 @@ func (c *enclaveProtoClient) Unsubscribe(ctx context.Context, in *UnsubscribeReq func (c *enclaveProtoClient) EstimateGas(ctx context.Context, in *EstimateGasRequest, opts ...grpc.CallOption) (*EstimateGasResponse, error) { out := new(EstimateGasResponse) - err := c.cc.Invoke(ctx, "/generated.EnclaveProto/EstimateGas", in, out, opts...) + err := c.cc.Invoke(ctx, EnclaveProto_EstimateGas_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -240,7 +272,7 @@ func (c *enclaveProtoClient) EstimateGas(ctx context.Context, in *EstimateGasReq func (c *enclaveProtoClient) GetLogs(ctx context.Context, in *GetLogsRequest, opts ...grpc.CallOption) (*GetLogsResponse, error) { out := new(GetLogsResponse) - err := c.cc.Invoke(ctx, "/generated.EnclaveProto/GetLogs", in, out, opts...) + err := c.cc.Invoke(ctx, EnclaveProto_GetLogs_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -249,7 +281,7 @@ func (c *enclaveProtoClient) GetLogs(ctx context.Context, in *GetLogsRequest, op func (c *enclaveProtoClient) HealthCheck(ctx context.Context, in *EmptyArgs, opts ...grpc.CallOption) (*HealthCheckResponse, error) { out := new(HealthCheckResponse) - err := c.cc.Invoke(ctx, "/generated.EnclaveProto/HealthCheck", in, out, opts...) + err := c.cc.Invoke(ctx, EnclaveProto_HealthCheck_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -258,7 +290,7 @@ func (c *enclaveProtoClient) HealthCheck(ctx context.Context, in *EmptyArgs, opt func (c *enclaveProtoClient) GetBatch(ctx context.Context, in *GetBatchRequest, opts ...grpc.CallOption) (*GetBatchResponse, error) { out := new(GetBatchResponse) - err := c.cc.Invoke(ctx, "/generated.EnclaveProto/GetBatch", in, out, opts...) + err := c.cc.Invoke(ctx, EnclaveProto_GetBatch_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -267,7 +299,7 @@ func (c *enclaveProtoClient) GetBatch(ctx context.Context, in *GetBatchRequest, func (c *enclaveProtoClient) GetBatchBySeqNo(ctx context.Context, in *GetBatchBySeqNoRequest, opts ...grpc.CallOption) (*GetBatchResponse, error) { out := new(GetBatchResponse) - err := c.cc.Invoke(ctx, "/generated.EnclaveProto/GetBatchBySeqNo", in, out, opts...) + err := c.cc.Invoke(ctx, EnclaveProto_GetBatchBySeqNo_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -276,7 +308,7 @@ func (c *enclaveProtoClient) GetBatchBySeqNo(ctx context.Context, in *GetBatchBy func (c *enclaveProtoClient) CreateBatch(ctx context.Context, in *CreateBatchRequest, opts ...grpc.CallOption) (*CreateBatchResponse, error) { out := new(CreateBatchResponse) - err := c.cc.Invoke(ctx, "/generated.EnclaveProto/CreateBatch", in, out, opts...) + err := c.cc.Invoke(ctx, EnclaveProto_CreateBatch_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -285,7 +317,7 @@ func (c *enclaveProtoClient) CreateBatch(ctx context.Context, in *CreateBatchReq func (c *enclaveProtoClient) CreateRollup(ctx context.Context, in *CreateRollupRequest, opts ...grpc.CallOption) (*CreateRollupResponse, error) { out := new(CreateRollupResponse) - err := c.cc.Invoke(ctx, "/generated.EnclaveProto/CreateRollup", in, out, opts...) + err := c.cc.Invoke(ctx, EnclaveProto_CreateRollup_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -294,7 +326,7 @@ func (c *enclaveProtoClient) CreateRollup(ctx context.Context, in *CreateRollupR func (c *enclaveProtoClient) DebugTraceTransaction(ctx context.Context, in *DebugTraceTransactionRequest, opts ...grpc.CallOption) (*DebugTraceTransactionResponse, error) { out := new(DebugTraceTransactionResponse) - err := c.cc.Invoke(ctx, "/generated.EnclaveProto/DebugTraceTransaction", in, out, opts...) + err := c.cc.Invoke(ctx, EnclaveProto_DebugTraceTransaction_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -302,7 +334,7 @@ func (c *enclaveProtoClient) DebugTraceTransaction(ctx context.Context, in *Debu } func (c *enclaveProtoClient) StreamL2Updates(ctx context.Context, in *StreamL2UpdatesRequest, opts ...grpc.CallOption) (EnclaveProto_StreamL2UpdatesClient, error) { - stream, err := c.cc.NewStream(ctx, &EnclaveProto_ServiceDesc.Streams[0], "/generated.EnclaveProto/StreamL2Updates", opts...) + stream, err := c.cc.NewStream(ctx, &EnclaveProto_ServiceDesc.Streams[0], EnclaveProto_StreamL2Updates_FullMethodName, opts...) if err != nil { return nil, err } @@ -335,7 +367,7 @@ func (x *enclaveProtoStreamL2UpdatesClient) Recv() (*EncodedUpdateResponse, erro func (c *enclaveProtoClient) DebugEventLogRelevancy(ctx context.Context, in *DebugEventLogRelevancyRequest, opts ...grpc.CallOption) (*DebugEventLogRelevancyResponse, error) { out := new(DebugEventLogRelevancyResponse) - err := c.cc.Invoke(ctx, "/generated.EnclaveProto/DebugEventLogRelevancy", in, out, opts...) + err := c.cc.Invoke(ctx, EnclaveProto_DebugEventLogRelevancy_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -344,7 +376,7 @@ func (c *enclaveProtoClient) DebugEventLogRelevancy(ctx context.Context, in *Deb func (c *enclaveProtoClient) GetTotalContractCount(ctx context.Context, in *GetTotalContractCountRequest, opts ...grpc.CallOption) (*GetTotalContractCountResponse, error) { out := new(GetTotalContractCountResponse) - err := c.cc.Invoke(ctx, "/generated.EnclaveProto/GetTotalContractCount", in, out, opts...) + err := c.cc.Invoke(ctx, EnclaveProto_GetTotalContractCount_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -364,8 +396,10 @@ type EnclaveProtoServer interface { // Init - initialise an enclave with a seed received by another enclave InitEnclave(context.Context, *InitEnclaveRequest) (*InitEnclaveResponse, error) // SubmitL1Block - Used for the host to submit blocks to the enclave, these may be: - // a. historic block - if the enclave is behind and in the process of catching up with the L1 state - // b. the latest block published by the L1, to which the enclave should respond with a rollup + // + // a. historic block - if the enclave is behind and in the process of catching up with the L1 state + // b. the latest block published by the L1, to which the enclave should respond with a rollup + // // It is the responsibility of the host to gossip the returned rollup // For good functioning the caller should always submit blocks ordered by height // submitting a block before receiving ancestors of it, will result in it being ignored @@ -519,7 +553,7 @@ func _EnclaveProto_Status_Handler(srv interface{}, ctx context.Context, dec func } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/generated.EnclaveProto/Status", + FullMethod: EnclaveProto_Status_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(EnclaveProtoServer).Status(ctx, req.(*StatusRequest)) @@ -537,7 +571,7 @@ func _EnclaveProto_Attestation_Handler(srv interface{}, ctx context.Context, dec } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/generated.EnclaveProto/Attestation", + FullMethod: EnclaveProto_Attestation_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(EnclaveProtoServer).Attestation(ctx, req.(*AttestationRequest)) @@ -555,7 +589,7 @@ func _EnclaveProto_GenerateSecret_Handler(srv interface{}, ctx context.Context, } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/generated.EnclaveProto/GenerateSecret", + FullMethod: EnclaveProto_GenerateSecret_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(EnclaveProtoServer).GenerateSecret(ctx, req.(*GenerateSecretRequest)) @@ -573,7 +607,7 @@ func _EnclaveProto_InitEnclave_Handler(srv interface{}, ctx context.Context, dec } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/generated.EnclaveProto/InitEnclave", + FullMethod: EnclaveProto_InitEnclave_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(EnclaveProtoServer).InitEnclave(ctx, req.(*InitEnclaveRequest)) @@ -591,7 +625,7 @@ func _EnclaveProto_SubmitL1Block_Handler(srv interface{}, ctx context.Context, d } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/generated.EnclaveProto/SubmitL1Block", + FullMethod: EnclaveProto_SubmitL1Block_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(EnclaveProtoServer).SubmitL1Block(ctx, req.(*SubmitBlockRequest)) @@ -609,7 +643,7 @@ func _EnclaveProto_SubmitTx_Handler(srv interface{}, ctx context.Context, dec fu } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/generated.EnclaveProto/SubmitTx", + FullMethod: EnclaveProto_SubmitTx_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(EnclaveProtoServer).SubmitTx(ctx, req.(*SubmitTxRequest)) @@ -627,7 +661,7 @@ func _EnclaveProto_SubmitBatch_Handler(srv interface{}, ctx context.Context, dec } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/generated.EnclaveProto/SubmitBatch", + FullMethod: EnclaveProto_SubmitBatch_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(EnclaveProtoServer).SubmitBatch(ctx, req.(*SubmitBatchRequest)) @@ -645,7 +679,7 @@ func _EnclaveProto_ObsCall_Handler(srv interface{}, ctx context.Context, dec fun } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/generated.EnclaveProto/ObsCall", + FullMethod: EnclaveProto_ObsCall_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(EnclaveProtoServer).ObsCall(ctx, req.(*ObsCallRequest)) @@ -663,7 +697,7 @@ func _EnclaveProto_GetTransactionCount_Handler(srv interface{}, ctx context.Cont } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/generated.EnclaveProto/GetTransactionCount", + FullMethod: EnclaveProto_GetTransactionCount_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(EnclaveProtoServer).GetTransactionCount(ctx, req.(*GetTransactionCountRequest)) @@ -681,7 +715,7 @@ func _EnclaveProto_Stop_Handler(srv interface{}, ctx context.Context, dec func(i } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/generated.EnclaveProto/Stop", + FullMethod: EnclaveProto_Stop_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(EnclaveProtoServer).Stop(ctx, req.(*StopRequest)) @@ -699,7 +733,7 @@ func _EnclaveProto_GetTransaction_Handler(srv interface{}, ctx context.Context, } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/generated.EnclaveProto/GetTransaction", + FullMethod: EnclaveProto_GetTransaction_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(EnclaveProtoServer).GetTransaction(ctx, req.(*GetTransactionRequest)) @@ -717,7 +751,7 @@ func _EnclaveProto_GetTransactionReceipt_Handler(srv interface{}, ctx context.Co } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/generated.EnclaveProto/GetTransactionReceipt", + FullMethod: EnclaveProto_GetTransactionReceipt_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(EnclaveProtoServer).GetTransactionReceipt(ctx, req.(*GetTransactionReceiptRequest)) @@ -735,7 +769,7 @@ func _EnclaveProto_GetBalance_Handler(srv interface{}, ctx context.Context, dec } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/generated.EnclaveProto/GetBalance", + FullMethod: EnclaveProto_GetBalance_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(EnclaveProtoServer).GetBalance(ctx, req.(*GetBalanceRequest)) @@ -753,7 +787,7 @@ func _EnclaveProto_GetCode_Handler(srv interface{}, ctx context.Context, dec fun } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/generated.EnclaveProto/GetCode", + FullMethod: EnclaveProto_GetCode_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(EnclaveProtoServer).GetCode(ctx, req.(*GetCodeRequest)) @@ -771,7 +805,7 @@ func _EnclaveProto_Subscribe_Handler(srv interface{}, ctx context.Context, dec f } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/generated.EnclaveProto/Subscribe", + FullMethod: EnclaveProto_Subscribe_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(EnclaveProtoServer).Subscribe(ctx, req.(*SubscribeRequest)) @@ -789,7 +823,7 @@ func _EnclaveProto_Unsubscribe_Handler(srv interface{}, ctx context.Context, dec } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/generated.EnclaveProto/Unsubscribe", + FullMethod: EnclaveProto_Unsubscribe_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(EnclaveProtoServer).Unsubscribe(ctx, req.(*UnsubscribeRequest)) @@ -807,7 +841,7 @@ func _EnclaveProto_EstimateGas_Handler(srv interface{}, ctx context.Context, dec } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/generated.EnclaveProto/EstimateGas", + FullMethod: EnclaveProto_EstimateGas_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(EnclaveProtoServer).EstimateGas(ctx, req.(*EstimateGasRequest)) @@ -825,7 +859,7 @@ func _EnclaveProto_GetLogs_Handler(srv interface{}, ctx context.Context, dec fun } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/generated.EnclaveProto/GetLogs", + FullMethod: EnclaveProto_GetLogs_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(EnclaveProtoServer).GetLogs(ctx, req.(*GetLogsRequest)) @@ -843,7 +877,7 @@ func _EnclaveProto_HealthCheck_Handler(srv interface{}, ctx context.Context, dec } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/generated.EnclaveProto/HealthCheck", + FullMethod: EnclaveProto_HealthCheck_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(EnclaveProtoServer).HealthCheck(ctx, req.(*EmptyArgs)) @@ -861,7 +895,7 @@ func _EnclaveProto_GetBatch_Handler(srv interface{}, ctx context.Context, dec fu } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/generated.EnclaveProto/GetBatch", + FullMethod: EnclaveProto_GetBatch_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(EnclaveProtoServer).GetBatch(ctx, req.(*GetBatchRequest)) @@ -879,7 +913,7 @@ func _EnclaveProto_GetBatchBySeqNo_Handler(srv interface{}, ctx context.Context, } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/generated.EnclaveProto/GetBatchBySeqNo", + FullMethod: EnclaveProto_GetBatchBySeqNo_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(EnclaveProtoServer).GetBatchBySeqNo(ctx, req.(*GetBatchBySeqNoRequest)) @@ -897,7 +931,7 @@ func _EnclaveProto_CreateBatch_Handler(srv interface{}, ctx context.Context, dec } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/generated.EnclaveProto/CreateBatch", + FullMethod: EnclaveProto_CreateBatch_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(EnclaveProtoServer).CreateBatch(ctx, req.(*CreateBatchRequest)) @@ -915,7 +949,7 @@ func _EnclaveProto_CreateRollup_Handler(srv interface{}, ctx context.Context, de } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/generated.EnclaveProto/CreateRollup", + FullMethod: EnclaveProto_CreateRollup_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(EnclaveProtoServer).CreateRollup(ctx, req.(*CreateRollupRequest)) @@ -933,7 +967,7 @@ func _EnclaveProto_DebugTraceTransaction_Handler(srv interface{}, ctx context.Co } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/generated.EnclaveProto/DebugTraceTransaction", + FullMethod: EnclaveProto_DebugTraceTransaction_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(EnclaveProtoServer).DebugTraceTransaction(ctx, req.(*DebugTraceTransactionRequest)) @@ -972,7 +1006,7 @@ func _EnclaveProto_DebugEventLogRelevancy_Handler(srv interface{}, ctx context.C } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/generated.EnclaveProto/DebugEventLogRelevancy", + FullMethod: EnclaveProto_DebugEventLogRelevancy_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(EnclaveProtoServer).DebugEventLogRelevancy(ctx, req.(*DebugEventLogRelevancyRequest)) @@ -990,7 +1024,7 @@ func _EnclaveProto_GetTotalContractCount_Handler(srv interface{}, ctx context.Co } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/generated.EnclaveProto/GetTotalContractCount", + FullMethod: EnclaveProto_GetTotalContractCount_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(EnclaveProtoServer).GetTotalContractCount(ctx, req.(*GetTotalContractCountRequest)) diff --git a/go/common/types.go b/go/common/types.go index c8f4efc16f..5a35de3c29 100644 --- a/go/common/types.go +++ b/go/common/types.go @@ -3,8 +3,10 @@ package common import ( "bytes" "fmt" + "math/big" "github.com/ethereum/go-ethereum/common" + gethcommon "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/rpc" "github.com/ethereum/go-ethereum/trie" @@ -45,9 +47,13 @@ type ( L2Receipt = types.Receipt L2Receipts = types.Receipts - CrossChainMessage = MessageBus.StructsCrossChainMessage - CrossChainMessages = []CrossChainMessage - ValueTransferEvent = MessageBus.MessageBusValueTransfer + CrossChainMessage = MessageBus.StructsCrossChainMessage + CrossChainMessages = []CrossChainMessage + ValueTransferEvent struct { + Sender gethcommon.Address + Receiver gethcommon.Address + Amount *big.Int + } ValueTransferEvents = []ValueTransferEvent EncryptedTx []byte // A single transaction, encoded as a JSON list of transaction binary hexes and encrypted using the enclave's public key EncryptedTransactions []byte // A blob of encrypted transactions, as they're stored in the rollup, with the nonce prepended. diff --git a/go/enclave/components/batch_producer.go b/go/enclave/components/batch_producer.go index a6946e5b21..79eb23333f 100644 --- a/go/enclave/components/batch_producer.go +++ b/go/enclave/components/batch_producer.go @@ -11,6 +11,7 @@ import ( "github.com/obscuronet/go-obscuro/go/enclave/storage" gethcommon "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/rlp" "github.com/ethereum/go-ethereum/core/state" "github.com/ethereum/go-ethereum/core/types" @@ -87,16 +88,13 @@ func (bp *batchProducerImpl) ComputeBatch(context *BatchExecutionContext) (*Comp } var messages common.CrossChainMessages + var transfers common.ValueTransferEvents if context.SequencerNo.Int64() > 1 { - messages = bp.crossChainProcessors.Local.RetrieveInboundMessages(parentBlock, block, stateDB) - } - for _, message := range messages { - if message.Sender == gethcommon.BigToAddress(gethcommon.Big0) { - - } + messages, transfers = bp.crossChainProcessors.Local.RetrieveInboundMessages(parentBlock, block, stateDB) } crossChainTransactions := bp.crossChainProcessors.Local.CreateSyntheticTransactions(messages, stateDB) + bp.crossChainProcessors.Local.ExecuteValueTransfers(transfers, stateDB) successfulTxs, txReceipts, err := bp.processTransactions(batch, 0, context.Transactions, stateDB, context.ChainConfig) if err != nil { @@ -177,6 +175,16 @@ func (bp *batchProducerImpl) CreateGenesisState(blkHash common.L1BlockHash, time return genesisBatch, deployTx, nil } +type ValueTransfers common.ValueTransferEvents + +func (vt ValueTransfers) EncodeIndex(i int, w *bytes.Buffer) { + transfer := vt[i] + rlp.Encode(w, transfer) +} +func (vt ValueTransfers) Len() int { + return len(vt) +} + func (bp *batchProducerImpl) populateOutboundCrossChainData(batch *core.Batch, block *types.Block, receipts types.Receipts) error { crossChainMessages, err := bp.crossChainProcessors.Local.ExtractOutboundMessages(receipts) if err != nil { @@ -184,7 +192,16 @@ func (bp *batchProducerImpl) populateOutboundCrossChainData(batch *core.Batch, b return fmt.Errorf("could not extract cross chain messages. Cause: %w", err) } + valueTransferMessages, err := bp.crossChainProcessors.Local.ExtractOutboundTransfers(receipts) + if err != nil { + bp.logger.Error("Extracting messages L2->L1 failed", log.ErrKey, err, log.CmpKey, log.CrossChainCmp) + return fmt.Errorf("could not extract cross chain messages. Cause: %w", err) + } + + transfersHash := types.DeriveSha(ValueTransfers(valueTransferMessages), &trie.StackTrie{}) + batch.Header.CrossChainMessages = crossChainMessages + batch.Header.TransfersTree = transfersHash bp.logger.Trace(fmt.Sprintf("Added %d cross chain messages to batch.", len(batch.Header.CrossChainMessages)), log.CmpKey, log.CrossChainCmp) diff --git a/go/enclave/components/block_processor.go b/go/enclave/components/block_processor.go index a0ef76c241..0c65bba2cd 100644 --- a/go/enclave/components/block_processor.go +++ b/go/enclave/components/block_processor.go @@ -44,6 +44,11 @@ func (bp *l1BlockProcessor) Process(br *common.BlockAndReceipts) (*BlockIngestio if err != nil { return nil, errors.New("failed to process cross chain messages") } + + err = bp.crossChainProcessors.Remote.StoreCrossChainValueTransfers(br.Block, *br.Receipts) + if err != nil { + return nil, fmt.Errorf("failed to process cross chain transfers. Cause: %w", err) + } } return ingestion, nil diff --git a/go/enclave/crosschain/block_message_extractor.go b/go/enclave/crosschain/block_message_extractor.go index a2ba597894..3cfaf67b4b 100644 --- a/go/enclave/crosschain/block_message_extractor.go +++ b/go/enclave/crosschain/block_message_extractor.go @@ -64,6 +64,13 @@ func (m *blockMessageExtractor) StoreCrossChainValueTransfers(block *common.L1Bl return nil } + m.logger.Trace(fmt.Sprintf("Storing %d value transfers for block", len(transfers)), log.BlockHashKey, block.Hash()) + err = m.storage.StoreValueTransfers(block.Hash(), transfers) + if err != nil { + m.logger.Crit("Unable to store the transfers", log.ErrKey, err) + return err + } + return nil } diff --git a/go/enclave/crosschain/common.go b/go/enclave/crosschain/common.go index f25235066a..fc0f0772ee 100644 --- a/go/enclave/crosschain/common.go +++ b/go/enclave/crosschain/common.go @@ -160,7 +160,11 @@ func convertLogsToValueTransfers(logs []types.Log, eventName string, messageBusA return nil, err } - messages = append(messages, event) + messages = append(messages, common.ValueTransferEvent{ + Sender: event.Sender, + Receiver: event.Receiver, + Amount: event.Amount, + }) } return messages, nil diff --git a/go/enclave/crosschain/interfaces.go b/go/enclave/crosschain/interfaces.go index 4e4681011c..9d9cf455dd 100644 --- a/go/enclave/crosschain/interfaces.go +++ b/go/enclave/crosschain/interfaces.go @@ -17,6 +17,8 @@ type BlockMessageExtractor interface { // StoreCrossChainMessages - Verifies receipts belong to block and saves the relevant cross chain messages from the receipts StoreCrossChainMessages(block *common.L1Block, receipts common.L1Receipts) error + StoreCrossChainValueTransfers(block *common.L1Block, receipts common.L1Receipts) error + // GetBusAddress - Returns the L1 message bus address. GetBusAddress() *common.L1Address @@ -48,7 +50,11 @@ type Manager interface { // ExtractOutboundMessages - Finds relevant logs in the receipts and converts them to cross chain messages. ExtractOutboundMessages(receipts common.L2Receipts) (common.CrossChainMessages, error) + ExtractOutboundTransfers(receipts common.L2Receipts) (common.ValueTransferEvents, error) + CreateSyntheticTransactions(messages common.CrossChainMessages, rollupState *state.StateDB) common.L2Transactions - RetrieveInboundMessages(fromBlock *common.L1Block, toBlock *common.L1Block, rollupState *state.StateDB) common.CrossChainMessages + ExecuteValueTransfers(transfers common.ValueTransferEvents, rollupState *state.StateDB) error + + RetrieveInboundMessages(fromBlock *common.L1Block, toBlock *common.L1Block, rollupState *state.StateDB) (common.CrossChainMessages, common.ValueTransferEvents) } diff --git a/go/enclave/crosschain/message_bus_manager.go b/go/enclave/crosschain/message_bus_manager.go index 70e7fae286..e543441335 100644 --- a/go/enclave/crosschain/message_bus_manager.go +++ b/go/enclave/crosschain/message_bus_manager.go @@ -120,12 +120,30 @@ func (m *MessageBusManager) ExtractOutboundMessages(receipts common.L2Receipts) return messages, nil } +// ExtractLocalMessages - Finds relevant logs in the receipts and converts them to cross chain messages. +func (m *MessageBusManager) ExtractOutboundTransfers(receipts common.L2Receipts) (common.ValueTransferEvents, error) { + logs, err := filterLogsFromReceipts(receipts, m.messageBusAddress, &ValueTransferEventID) + if err != nil { + m.logger.Error("Error extracting logs from L2 message bus!", log.ErrKey, err) + return make(common.ValueTransferEvents, 0), err + } + + transfers, err := convertLogsToValueTransfers(logs, ValueTransferEventName, MessageBusABI) + if err != nil { + m.logger.Error("Error converting transfers from L2 message bus!", log.ErrKey, err) + return make(common.ValueTransferEvents, 0), err + } + + return transfers, nil +} + // RetrieveInboundMessages - Retrieves the cross chain messages between two blocks. // todo (@stefan) - fix ordering of messages, currently it is irrelevant. // todo (@stefan) - do not extract messages below their consistency level. Irrelevant security wise. // todo (@stefan) - surface errors -func (m *MessageBusManager) RetrieveInboundMessages(fromBlock *common.L1Block, toBlock *common.L1Block, _ *state.StateDB) common.CrossChainMessages { +func (m *MessageBusManager) RetrieveInboundMessages(fromBlock *common.L1Block, toBlock *common.L1Block, _ *state.StateDB) (common.CrossChainMessages, common.ValueTransferEvents) { messages := make(common.CrossChainMessages, 0) + transfers := make(common.ValueTransferEvents, 0) from := fromBlock.Hash() height := fromBlock.NumberU64() @@ -146,12 +164,13 @@ func (m *MessageBusManager) RetrieveInboundMessages(fromBlock *common.L1Block, t m.logger.Crit("Reading the key for the block failed with uncommon reason.", log.ErrKey, err) } - _, err = m.storage.GetL1Transfers(b.Hash()) + transfersForBlock, err := m.storage.GetL1Transfers(b.Hash()) if err != nil { m.logger.Crit("Unable to get L1 transfers for block that should be there.", log.ErrKey, err) } messages = append(messages, messagesForBlock...) // Ordering here might work in POBI, but might be weird for fast finality + transfers = append(transfers, transfersForBlock...) // No deposits before genesis. if b.NumberU64() < height { @@ -166,13 +185,20 @@ func (m *MessageBusManager) RetrieveInboundMessages(fromBlock *common.L1Block, t m.logger.Trace(fmt.Sprintf("Extracted deposit logs %d ->%d: %d.", fromBlock.NumberU64(), toBlock.NumberU64(), len(messages))) - return messages + return messages, transfers } func (m *MessageBusManager) ShouldAutoRelayMessage(message common.CrossChainMessage) bool { return message.Sender == *m.GetBusAddress() } +func (m *MessageBusManager) ExecuteValueTransfers(transfers common.ValueTransferEvents, rollupState *state.StateDB) error { + for _, transfer := range transfers { + rollupState.AddBalance(transfer.Receiver, transfer.Amount) + } + return nil +} + // CreateSyntheticTransactions - generates transactions that the enclave should execute internally for the messages. func (m *MessageBusManager) CreateSyntheticTransactions(messages common.CrossChainMessages, rollupState *state.StateDB) common.L2Transactions { // Get current nonce for this stateDB. diff --git a/go/enclave/genesis/testnet_genesis.go b/go/enclave/genesis/testnet_genesis.go index 02f6e61289..f034b7008a 100644 --- a/go/enclave/genesis/testnet_genesis.go +++ b/go/enclave/genesis/testnet_genesis.go @@ -5,9 +5,11 @@ import ( "math/big" gethcommon "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/crypto" ) const TestnetPrefundedPK = "8dfb8083da6275ae3e4f41e3e8a8c19d028d32c9247e24530933782f2a05035b" // The genesis main account private key. +var GasBridgingKeys, _ = crypto.GenerateKey() //todo - make static var TestnetGenesis = Genesis{ Accounts: []Account{ @@ -24,6 +26,10 @@ var TestnetGenesis = Genesis{ Address: gethcommon.HexToAddress("0xDEe530E22045939e6f6a0A593F829e35A140D3F1"), Amount: parseHugeNumber("7500000000000000000000000000000"), }, + { // Address for value transfer testing + Address: crypto.PubkeyToAddress(GasBridgingKeys.PublicKey), + Amount: parseHugeNumber("7500000000000000000000000000000"), + }, }, } diff --git a/go/enclave/storage/enclavedb/block.go b/go/enclave/storage/enclavedb/block.go index 9c6620de64..e73357549a 100644 --- a/go/enclave/storage/enclavedb/block.go +++ b/go/enclave/storage/enclavedb/block.go @@ -100,6 +100,7 @@ func WriteL1Messages[T any](db *sql.DB, blockHash common.L1BlockHash, messages [ } args = append(args, data) args = append(args, blockHash.Bytes()) + args = append(args, isValueTransfer) } if len(messages) > 0 { _, err := db.Exec(insert, args...) @@ -108,10 +109,10 @@ func WriteL1Messages[T any](db *sql.DB, blockHash common.L1BlockHash, messages [ return nil } -func FetchL1Messages[T any](db *sql.DB, blockHash common.L1BlockHash) ([]T, error) { +func FetchL1Messages[T any](db *sql.DB, blockHash common.L1BlockHash, isTransfer bool) ([]T, error) { var result []T - query := selectL1Msg + " where block = ?" - rows, err := db.Query(query, blockHash.Bytes()) + query := selectL1Msg + " where block = ? and is_transfer = ?" + rows, err := db.Query(query, blockHash.Bytes(), isTransfer) if err != nil { if errors.Is(err, sql.ErrNoRows) { // make sure the error is converted to obscuro-wide not found error diff --git a/go/enclave/storage/storage.go b/go/enclave/storage/storage.go index 5bb3fe2f9f..2904b35e5b 100644 --- a/go/enclave/storage/storage.go +++ b/go/enclave/storage/storage.go @@ -329,15 +329,11 @@ func (s *storageImpl) StoreL1Messages(blockHash common.L1BlockHash, messages com } func (s *storageImpl) GetL1Messages(blockHash common.L1BlockHash) (common.CrossChainMessages, error) { - return enclavedb.FetchL1Messages[common.CrossChainMessage](s.db.GetSQLDB(), blockHash) + return enclavedb.FetchL1Messages[common.CrossChainMessage](s.db.GetSQLDB(), blockHash, false) } func (s *storageImpl) GetL1Transfers(blockHash common.L1BlockHash) (common.ValueTransferEvents, error) { - return enclavedb.FetchL1Messages[common.ValueTransferEvent](s.db.GetSQLDB(), blockHash) -} - -func (s *storageImpl) GetValueTransfers(blockHash common.L1BlockHash) (common.ValueTransferEvents, error) { - return enclavedb.FetchL1Messages[common.ValueTransferEvent](s.db.GetSQLDB(), blockHash) + return enclavedb.FetchL1Messages[common.ValueTransferEvent](s.db.GetSQLDB(), blockHash, true) } const enclaveKeyKey = "ek" diff --git a/go/host/rpc/clientapi/client_api_eth.go b/go/host/rpc/clientapi/client_api_eth.go index 04a714776c..10c78ae2b7 100644 --- a/go/host/rpc/clientapi/client_api_eth.go +++ b/go/host/rpc/clientapi/client_api_eth.go @@ -204,6 +204,7 @@ func headerToMap(header *common.BatchHeader) map[string]interface{} { // The custom Obscuro fields. "l1Proof": header.L1Proof, + "transfersTree": header.TransfersTree, "crossChainMessages": header.CrossChainMessages, "inboundCrossChainHash": header.LatestInboundCrossChainHash, "inboundCrossChainHeight": header.LatestInboundCrossChainHeight, diff --git a/go/wallet/wallet.go b/go/wallet/wallet.go index 63d78a8073..1b69552655 100644 --- a/go/wallet/wallet.go +++ b/go/wallet/wallet.go @@ -27,6 +27,7 @@ type Wallet interface { // GetNonceAndIncrement atomically increments the nonce by one and returns the previous value GetNonceAndIncrement() uint64 GetNonce() uint64 + ChainID() *big.Int // PrivateKey returns the wallets private key PrivateKey() *ecdsa.PrivateKey @@ -75,6 +76,10 @@ func (m *inMemoryWallet) Address() common.Address { return m.pubKeyAddr } +func (m *inMemoryWallet) ChainID() *big.Int { + return big.NewInt(0).Set(m.chainID) +} + func (m *inMemoryWallet) GetNonceAndIncrement() uint64 { return atomic.AddUint64(&m.nonce, 1) - 1 } diff --git a/integration/simulation/network/obscuro_node_utils.go b/integration/simulation/network/obscuro_node_utils.go index c575e7bc4a..fdc372da87 100644 --- a/integration/simulation/network/obscuro_node_utils.go +++ b/integration/simulation/network/obscuro_node_utils.go @@ -79,16 +79,16 @@ func createAuthClientsPerWallet(clients []rpc.Client, wallets *params.SimWallets walletClients := make(map[string][]*obsclient.AuthObsClient) // loop through all the L2 wallets we're using and round-robin allocate them the rpc clients we have for each host for _, w := range append(wallets.SimObsWallets, wallets.L2FaucetWallet) { - walletClients[w.Address().String()] = createAuthClients(clients, w) + walletClients[w.Address().String()] = CreateAuthClients(clients, w) } for _, t := range wallets.Tokens { w := t.L2Owner - walletClients[w.Address().String()] = createAuthClients(clients, w) + walletClients[w.Address().String()] = CreateAuthClients(clients, w) } return walletClients } -func createAuthClients(clients []rpc.Client, wal wallet.Wallet) []*obsclient.AuthObsClient { +func CreateAuthClients(clients []rpc.Client, wal wallet.Wallet) []*obsclient.AuthObsClient { authClients := make([]*obsclient.AuthObsClient, len(clients)) for i, client := range clients { vk, err := viewingkey.GenerateViewingKeyForWallet(wal) diff --git a/integration/simulation/output_stats.go b/integration/simulation/output_stats.go index 0fdaf81cfb..e97a54d106 100644 --- a/integration/simulation/output_stats.go +++ b/integration/simulation/output_stats.go @@ -133,7 +133,8 @@ func (o *OutputStats) String() string { "totalWithdrawnAmount: %d\n"+ "rollupWithMoreRecentProof: %d\n"+ "nrTransferTransactions: %d\n"+ - "nrBlockParsedERC20Deposits: %d\n", + "nrBlockParsedERC20Deposits: %d\n"+ + "gasBridgeCount: %d\n", o.simulation.Stats.NrMiners, o.l1Height, o.l2Height, @@ -151,5 +152,6 @@ func (o *OutputStats) String() string { o.simulation.Stats.RollupWithMoreRecentProofCount, o.simulation.Stats.NrTransferTransactions, o.canonicalERC20DepositCount, + len(o.simulation.TxInjector.TxTracker.GasBridgeTransactions), ) } diff --git a/integration/simulation/params/wallet_utils.go b/integration/simulation/params/wallet_utils.go index 550445b536..3d5e01c2c5 100644 --- a/integration/simulation/params/wallet_utils.go +++ b/integration/simulation/params/wallet_utils.go @@ -36,6 +36,8 @@ type SimWallets struct { SimEthWallets []wallet.Wallet // the wallets of the simulated users on the Ethereum side SimObsWallets []wallet.Wallet // and their equivalents on the obscuro side (with a different chainId) + GasBridgeWallet wallet.Wallet + L2FaucetWallet wallet.Wallet // the wallet of the L2 faucet Tokens map[testcommon.ERC20]*SimToken // The supported tokens } @@ -66,6 +68,8 @@ func NewSimWallets(nrSimWallets int, nNodes int, ethereumChainID int64, obscuroC } l2FaucetWallet := wallet.NewInMemoryWalletFromPK(big.NewInt(obscuroChainID), l2FaucetPrivKey, testlog.Logger()) + gasWallet := wallet.NewInMemoryWalletFromPK(big.NewInt(ethereumChainID), genesis.GasBridgingKeys, testlog.Logger()) + // create the L1 addresses of the two tokens, and connect them to the hardcoded addresses from the enclave hoc := SimToken{ Name: testcommon.HOC, @@ -81,11 +85,12 @@ func NewSimWallets(nrSimWallets int, nNodes int, ethereumChainID int64, obscuroC } return &SimWallets{ - MCOwnerWallet: mcOwnerWallet, - NodeWallets: nodeWallets, - SimEthWallets: simEthWallets, - SimObsWallets: simObsWallets, - L2FaucetWallet: l2FaucetWallet, + MCOwnerWallet: mcOwnerWallet, + NodeWallets: nodeWallets, + SimEthWallets: simEthWallets, + SimObsWallets: simObsWallets, + L2FaucetWallet: l2FaucetWallet, + GasBridgeWallet: gasWallet, Tokens: map[testcommon.ERC20]*SimToken{ testcommon.HOC: &hoc, testcommon.POC: &poc, @@ -98,16 +103,10 @@ func (w *SimWallets) AllEthWallets() []wallet.Wallet { for _, token := range w.Tokens { ethWallets = append(ethWallets, token.L1Owner) } + ethWallets = append(ethWallets, w.GasBridgeWallet) return append(append(append(w.NodeWallets, w.SimEthWallets...), w.MCOwnerWallet), ethWallets...) } -func (w *SimWallets) AllEthAddresses() []*common.Address { - addresses := make([]*common.Address, 0) - addresses = append(addresses, w.Tokens[testcommon.HOC].L1ContractAddress) - addresses = append(addresses, w.Tokens[testcommon.POC].L1ContractAddress) - return addresses -} - func (w *SimWallets) AllObsWallets() []wallet.Wallet { obsWallets := make([]wallet.Wallet, 0) for _, token := range w.Tokens { diff --git a/integration/simulation/transaction_injector.go b/integration/simulation/transaction_injector.go index 997fed48ce..b1d6193363 100644 --- a/integration/simulation/transaction_injector.go +++ b/integration/simulation/transaction_injector.go @@ -8,9 +8,12 @@ import ( "sync/atomic" "time" + "github.com/ethereum/go-ethereum/accounts/abi/bind" "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/crypto" "github.com/ethereum/go-ethereum/crypto/ecies" + "github.com/obscuronet/go-obscuro/contracts/generated/ManagementContract" + "github.com/obscuronet/go-obscuro/contracts/generated/MessageBus" "github.com/obscuronet/go-obscuro/go/common" "github.com/obscuronet/go-obscuro/go/common/log" "github.com/obscuronet/go-obscuro/go/ethadapter/erc20contractlib" @@ -18,6 +21,7 @@ import ( "github.com/obscuronet/go-obscuro/go/wallet" "github.com/obscuronet/go-obscuro/integration" "github.com/obscuronet/go-obscuro/integration/common/testlog" + "github.com/obscuronet/go-obscuro/integration/datagenerator" "github.com/obscuronet/go-obscuro/integration/simulation/network" "github.com/obscuronet/go-obscuro/integration/simulation/params" "golang.org/x/sync/errgroup" @@ -124,6 +128,11 @@ func (ti *TransactionInjector) Start() { return nil }) + wg.Go(func() error { + ti.bridgeRandomGasTransfers() + return nil + }) + wg.Go(func() error { ti.issueRandomTransfers() return nil @@ -224,6 +233,48 @@ func (ti *TransactionInjector) issueRandomTransfers() { } } +func (ti *TransactionInjector) bridgeRandomGasTransfers() { + gasWallet := ti.wallets.GasBridgeWallet + + ethClient := ti.rpcHandles.RndEthClient() + + mgmtCtr, err := ManagementContract.NewManagementContract(*ti.mgmtContractAddr, ethClient.EthClient()) + if err != nil { + panic(err) + } + busAddr, err := mgmtCtr.MessageBus(&bind.CallOpts{}) + if err != nil { + panic(err) + } + + for txCounter := 0; ti.shouldKeepIssuing(txCounter); txCounter++ { + ethClient = ti.rpcHandles.RndEthClient() + + busCtr, err := MessageBus.NewMessageBus(busAddr, ethClient.EthClient()) + if err != nil { + panic(err) + } + + opts, err := bind.NewKeyedTransactorWithChainID(gasWallet.PrivateKey(), gasWallet.ChainID()) + if err != nil { + panic(err) + } + + receiverWallet := datagenerator.RandomWallet(ti.rndObsWallet().ChainID().Int64()) + amount := big.NewInt(0).SetUint64(testcommon.RndBtw(500, 100_000)) + opts.Value = big.NewInt(0).Set(amount) + + tx, err := busCtr.SendValueToL2(opts, receiverWallet.Address(), amount) + if err != nil { + panic(err) + } + + go ti.TxTracker.trackGasBridgingTx(tx, receiverWallet) + + sleepRndBtw(ti.avgBlockDuration/3, ti.avgBlockDuration) + } +} + // issueRandomDeposits creates and issues a number of transactions proportional to the simulation time, such that they can be processed func (ti *TransactionInjector) issueRandomDeposits() { // todo (@stefan) - this implementation transfers from the hoc and poc owner contracts diff --git a/integration/simulation/transaction_injector_tracker.go b/integration/simulation/transaction_injector_tracker.go index f5d1beba8c..70eafdcfc1 100644 --- a/integration/simulation/transaction_injector_tracker.go +++ b/integration/simulation/transaction_injector_tracker.go @@ -3,18 +3,27 @@ package simulation import ( "sync" + "github.com/ethereum/go-ethereum/core/types" "github.com/obscuronet/go-obscuro/go/ethadapter" + "github.com/obscuronet/go-obscuro/go/wallet" "github.com/obscuronet/go-obscuro/go/common" ) type txInjectorTracker struct { + gasTransactionsLock sync.RWMutex l1TransactionsLock sync.RWMutex L1Transactions []ethadapter.L1Transaction l2TransactionsLock sync.RWMutex TransferL2Transactions []*common.L2Tx NativeValueTransferL2Transactions []*common.L2Tx WithdrawalL2Transactions []*common.L2Tx + GasBridgeTransactions []GasBridgingRecord +} + +type GasBridgingRecord struct { + L1BridgeTx *types.Transaction + ReceiverWallet wallet.Wallet } func newCounter() *txInjectorTracker { @@ -24,9 +33,19 @@ func newCounter() *txInjectorTracker { l2TransactionsLock: sync.RWMutex{}, TransferL2Transactions: []*common.L2Tx{}, WithdrawalL2Transactions: []*common.L2Tx{}, + GasBridgeTransactions: []GasBridgingRecord{}, } } +func (m *txInjectorTracker) trackGasBridgingTx(tx *types.Transaction, receiverWallet wallet.Wallet) { + m.gasTransactionsLock.Lock() + defer m.gasTransactionsLock.Unlock() + m.GasBridgeTransactions = append(m.GasBridgeTransactions, GasBridgingRecord{ + L1BridgeTx: tx, + ReceiverWallet: receiverWallet, + }) +} + // trackL1Tx adds an L1Tx to the internal list func (m *txInjectorTracker) trackL1Tx(tx ethadapter.L1Transaction) { m.l1TransactionsLock.Lock() diff --git a/integration/simulation/validate_chain.go b/integration/simulation/validate_chain.go index f25d144835..54a3d14e60 100644 --- a/integration/simulation/validate_chain.go +++ b/integration/simulation/validate_chain.go @@ -10,6 +10,7 @@ import ( "testing" "github.com/ethereum/go-ethereum/rlp" + "github.com/obscuronet/go-obscuro/contracts/generated/MessageBus" "github.com/obscuronet/go-obscuro/go/common/compression" testcommon "github.com/obscuronet/go-obscuro/integration/common" @@ -368,6 +369,31 @@ func checkBlockchainOfObscuroNode(t *testing.T, rpcHandles *network.RPCHandles, } } + mbusABI, _ := abi.JSON(strings.NewReader(MessageBus.MessageBusMetaData.ABI)) + gasBridgeRecords := s.TxInjector.TxTracker.GasBridgeTransactions + for _, record := range gasBridgeRecords { + inputs, err := mbusABI.Methods["sendValueToL2"].Inputs.Unpack(record.L1BridgeTx.Data()[4:]) + if err != nil { + panic(err) + } + + receiver := inputs[0].(gethcommon.Address) + amount := inputs[1].(*big.Int) + + if receiver != record.ReceiverWallet.Address() { + panic("Test setup is broken. Receiver in tx should match recorded wallet.") + } + obsClients := network.CreateAuthClients(s.RPCHandles.RPCClients, record.ReceiverWallet) + balance, err := obsClients[nodeIdx].BalanceAt(context.Background(), nil) + if err != nil { + panic(fmt.Errorf("failed getting balance for bridge transfer receiver. Cause: %w", err)) + } + + if balance.Cmp(amount) != 0 { + t.Errorf("Node %d: Balance doesnt match the bridged amount. Have: %d, Want: %d", nodeIdx, balance, amount) + } + } + notFoundTransfers, notFoundWithdrawals, notFoundNativeTransfers := FindNotIncludedL2Txs(s.ctx, nodeIdx, rpcHandles, s.TxInjector) if notFoundTransfers > 0 { t.Errorf("Node %d: %d out of %d Transfer Txs not found in the enclave", From 2de38113a42f2dab90dfd92d66a9215dcb1859f8 Mon Sep 17 00:00:00 2001 From: StefanIliev545 Date: Fri, 18 Aug 2023 11:24:44 +0200 Subject: [PATCH 05/47] Adding missing files. --- go/enclave/components/batch_producer.go | 1 - go/enclave/enclave.go | 4 +- go/enclave/gas/gas.go | 54 +++++++++++++++++++++++++ 3 files changed, 56 insertions(+), 3 deletions(-) create mode 100644 go/enclave/gas/gas.go diff --git a/go/enclave/components/batch_producer.go b/go/enclave/components/batch_producer.go index 79eb23333f..4f719f7365 100644 --- a/go/enclave/components/batch_producer.go +++ b/go/enclave/components/batch_producer.go @@ -112,7 +112,6 @@ func (bp *batchProducerImpl) ComputeBatch(context *BatchExecutionContext) (*Comp // we need to copy the batch to reset the internal hash cache copyBatch := *batch - copyBatch.Header.Root = stateDB.IntermediateRoot(false) copyBatch.Transactions = successfulTxs if err = bp.populateOutboundCrossChainData(©Batch, block, txReceipts); err != nil { diff --git a/go/enclave/enclave.go b/go/enclave/enclave.go index fee4d3cb9a..daa249abcb 100644 --- a/go/enclave/enclave.go +++ b/go/enclave/enclave.go @@ -1069,7 +1069,7 @@ func (e *enclaveImpl) EstimateGas(encryptedParams common.EncryptedParamsEstimate return responses.AsEncryptedError(err, vkHandler), nil } - gasEstimate, err := e.DoEstimateGas(callMsg, blockNumber, e.GlobalGasCap) + executionGasEstimate, err := e.DoEstimateGas(callMsg, blockNumber, e.GlobalGasCap) if err != nil { err = fmt.Errorf("unable to estimate transaction - %w", err) @@ -1086,7 +1086,7 @@ func (e *enclaveImpl) EstimateGas(encryptedParams common.EncryptedParamsEstimate return responses.AsEncryptedError(err, vkHandler), nil } - return responses.AsEncryptedResponse(&gasEstimate, vkHandler), nil + return responses.AsEncryptedResponse(&executionGasEstimate, vkHandler), nil } func (e *enclaveImpl) GetLogs(encryptedParams common.EncryptedParamsGetLogs) (*responses.Logs, common.SystemError) { //nolint diff --git a/go/enclave/gas/gas.go b/go/enclave/gas/gas.go new file mode 100644 index 0000000000..eb160fd9a4 --- /dev/null +++ b/go/enclave/gas/gas.go @@ -0,0 +1,54 @@ +package gas + +import ( + "math/big" + + gethcore "github.com/ethereum/go-ethereum/core" + "github.com/ethereum/go-ethereum/core/types" + "github.com/ethereum/go-ethereum/params" + "github.com/ethereum/go-ethereum/rlp" +) + +type ObscuroGasPool struct { + gp gethcore.GasPool +} + +func NewObscuroGasPool(gp *gethcore.GasPool) *ObscuroGasPool { + return &ObscuroGasPool{ + gp: gethcore.GasPool(gp.Gas()), + } +} + +func (gp *ObscuroGasPool) ForTransaction(tx *types.Transaction) (*gethcore.GasPool, error) { + encodedTx, err := rlp.EncodeToBytes(*tx) + if err != nil { + return nil, err + } + + l1Gas := CalculateL1GasUsed(encodedTx, big.NewInt(0)) + + gPool := gethcore.GasPool(l1Gas.Uint64()) + return &gPool, nil +} + +func CalculateL1GasUsed(data []byte, overhead *big.Int) *big.Int { + zeroes, ones := zeroesAndOnes(data) + zeroesGas := zeroes * params.TxDataZeroGas + onesGas := (ones + 68) * params.TxDataNonZeroGasEIP2028 + l1Gas := new(big.Int).SetUint64(zeroesGas + onesGas) + return new(big.Int).Add(l1Gas, overhead) +} + +// zeroesAndOnes counts the number of 0 bytes and non 0 bytes in a byte slice +func zeroesAndOnes(data []byte) (uint64, uint64) { + var zeroes uint64 + var ones uint64 + for _, byt := range data { + if byt == 0 { + zeroes++ + } else { + ones++ + } + } + return zeroes, ones +} From 0ef58e29bce7326fd13241f239851d1984014b8d Mon Sep 17 00:00:00 2001 From: StefanIliev545 Date: Sat, 19 Aug 2023 00:56:59 +0200 Subject: [PATCH 06/47] Progress dump. --- go/enclave/components/batch_producer.go | 47 +++++++++++++++++++++++- go/enclave/components/block_processor.go | 8 +++- go/enclave/enclave.go | 6 ++- go/enclave/gas/oracle.go | 37 +++++++++++++++++++ 4 files changed, 94 insertions(+), 4 deletions(-) create mode 100644 go/enclave/gas/oracle.go diff --git a/go/enclave/components/batch_producer.go b/go/enclave/components/batch_producer.go index 4f719f7365..b22b30d0bc 100644 --- a/go/enclave/components/batch_producer.go +++ b/go/enclave/components/batch_producer.go @@ -8,6 +8,7 @@ import ( "sort" "sync" + "github.com/obscuronet/go-obscuro/go/enclave/gas" "github.com/obscuronet/go-obscuro/go/enclave/storage" gethcommon "github.com/ethereum/go-ethereum/common" @@ -35,20 +36,61 @@ type batchProducerImpl struct { crossChainProcessors *crosschain.Processors genesis *genesis.Genesis logger gethlog.Logger + gasOracle gas.Oracle // stateDBMutex - used to protect calls to stateDB.Commit as it is not safe for async access. stateDBMutex sync.Mutex } -func NewBatchProducer(storage storage.Storage, cc *crosschain.Processors, genesis *genesis.Genesis, logger gethlog.Logger) BatchProducer { +func NewBatchProducer( + storage storage.Storage, + cc *crosschain.Processors, + genesis *genesis.Genesis, + gasOracle gas.Oracle, + logger gethlog.Logger, +) BatchProducer { return &batchProducerImpl{ storage: storage, crossChainProcessors: cc, genesis: genesis, logger: logger, + gasOracle: gasOracle, stateDBMutex: sync.Mutex{}, } } +func (bp *batchProducerImpl) payL1Fees(stateDB *state.StateDB, context *BatchExecutionContext) (common.L2Transactions, error) { + return context.Transactions, nil + + transactions := make(common.L2Transactions, 0) + + for _, tx := range context.Transactions { + sender, err := core.GetAuthenticatedSender(context.ChainConfig.ChainID.Int64(), tx) + if err != nil { + bp.logger.Warn("Unable to extract sender for tx", log.TxKey, tx.Hash()) + continue + } + accBalance := stateDB.GetBalance(*sender) + cost, err := bp.gasOracle.GetGasCostForTx(tx) + if err != nil { + bp.logger.Warn("Unable to get gas cost for tx", log.TxKey, tx.Hash(), log.ErrKey, err) + continue + } + + isFreeTransaction := tx.GasFeeCap().Cmp(gethcommon.Big0) == 0 + isFreeTransaction = isFreeTransaction && tx.GasPrice().Cmp(gethcommon.Big0) == 0 + + if !isFreeTransaction { + if accBalance.Cmp(cost) != -1 { + // bp.logger.Info("insufficient account balance for tx", log.TxKey, tx.Hash(), "addr", sender.Hex()) + stateDB.SubBalance(*sender, cost) + stateDB.AddBalance(context.Creator, cost) + } + } + transactions = append(transactions, tx) + } + return transactions, nil +} + func (bp *batchProducerImpl) ComputeBatch(context *BatchExecutionContext) (*ComputedBatch, error) { defer bp.logger.Info("Batch context processed", log.DurationKey, measure.NewStopwatch()) @@ -96,6 +138,8 @@ func (bp *batchProducerImpl) ComputeBatch(context *BatchExecutionContext) (*Comp crossChainTransactions := bp.crossChainProcessors.Local.CreateSyntheticTransactions(messages, stateDB) bp.crossChainProcessors.Local.ExecuteValueTransfers(transfers, stateDB) + // transactionsToProcess, _ := bp.payL1Fees(stateDB, context) + successfulTxs, txReceipts, err := bp.processTransactions(batch, 0, context.Transactions, stateDB, context.ChainConfig) if err != nil { return nil, fmt.Errorf("could not process transactions. Cause: %w", err) @@ -157,6 +201,7 @@ func (bp *batchProducerImpl) CreateGenesisState(blkHash common.L1BlockHash, time Number: big.NewInt(int64(0)), SequencerOrderNo: big.NewInt(int64(0)), ReceiptHash: types.EmptyRootHash, + TransfersTree: types.EmptyRootHash, Time: timeNow, }, Transactions: []*common.L2Tx{}, diff --git a/go/enclave/components/block_processor.go b/go/enclave/components/block_processor.go index 0c65bba2cd..eb6a1445b2 100644 --- a/go/enclave/components/block_processor.go +++ b/go/enclave/components/block_processor.go @@ -4,6 +4,7 @@ import ( "errors" "fmt" + "github.com/obscuronet/go-obscuro/go/enclave/gas" "github.com/obscuronet/go-obscuro/go/enclave/storage" gethcommon "github.com/ethereum/go-ethereum/common" @@ -18,14 +19,16 @@ import ( type l1BlockProcessor struct { storage storage.Storage + gasOracle gas.Oracle logger gethlog.Logger crossChainProcessors *crosschain.Processors } -func NewBlockProcessor(storage storage.Storage, cc *crosschain.Processors, logger gethlog.Logger) L1BlockProcessor { +func NewBlockProcessor(storage storage.Storage, cc *crosschain.Processors, gasOracle gas.Oracle, logger gethlog.Logger) L1BlockProcessor { return &l1BlockProcessor{ storage: storage, logger: logger, + gasOracle: gasOracle, crossChainProcessors: cc, } } @@ -51,6 +54,9 @@ func (bp *l1BlockProcessor) Process(br *common.BlockAndReceipts) (*BlockIngestio } } + //todo @siliev - not sure if this is the best way to update the price, will pick up random stale blocks from forks? + bp.gasOracle.ProcessL1Block(br.Block) + return ingestion, nil } diff --git a/go/enclave/enclave.go b/go/enclave/enclave.go index daa249abcb..2660f41ab5 100644 --- a/go/enclave/enclave.go +++ b/go/enclave/enclave.go @@ -11,6 +11,7 @@ import ( "sync" "time" + "github.com/obscuronet/go-obscuro/go/enclave/gas" "github.com/obscuronet/go-obscuro/go/enclave/storage" "github.com/obscuronet/go-obscuro/go/enclave/vkhandler" @@ -193,8 +194,9 @@ func NewEnclave( subscriptionManager := events.NewSubscriptionManager(&rpcEncryptionManager, storage, logger) - blockProcessor := components.NewBlockProcessor(storage, crossChainProcessors, logger) - producer := components.NewBatchProducer(storage, crossChainProcessors, genesis, logger) + gasOracle := gas.NewGasOracle() + blockProcessor := components.NewBlockProcessor(storage, crossChainProcessors, gasOracle, logger) + producer := components.NewBatchProducer(storage, crossChainProcessors, genesis, gasOracle, logger) sigVerifier, err := components.NewSignatureValidator(config.SequencerID, storage) registry := components.NewBatchRegistry(storage, producer, sigVerifier, &chainConfig, logger) rProducer := components.NewRollupProducer(config.SequencerID, dataEncryptionService, config.ObscuroChainID, config.L1ChainID, storage, registry, blockProcessor, logger) diff --git a/go/enclave/gas/oracle.go b/go/enclave/gas/oracle.go new file mode 100644 index 0000000000..00500a3ba4 --- /dev/null +++ b/go/enclave/gas/oracle.go @@ -0,0 +1,37 @@ +package gas + +import ( + "math/big" + + "github.com/ethereum/go-ethereum/core/types" + "github.com/ethereum/go-ethereum/rlp" +) + +type Oracle interface { + ProcessL1Block(block *types.Block) + GetGasCostForTx(tx *types.Transaction) (*big.Int, error) +} + +type oracle struct { + baseFee *big.Int +} + +func NewGasOracle() Oracle { + return &oracle{ + baseFee: big.NewInt(0), + } +} + +func (o *oracle) ProcessL1Block(block *types.Block) { + o.baseFee = block.BaseFee() +} + +func (o *oracle) GetGasCostForTx(tx *types.Transaction) (*big.Int, error) { + encodedTx, err := rlp.EncodeToBytes(tx) + if err != nil { + return nil, err + } + + l1Gas := CalculateL1GasUsed(encodedTx, big.NewInt(0)) + return big.NewInt(0).Mul(l1Gas, o.baseFee), nil +} From ecc84bf1a5d0908faea27a4fde7cb534b9747420 Mon Sep 17 00:00:00 2001 From: StefanIliev545 Date: Sat, 19 Aug 2023 01:21:36 +0200 Subject: [PATCH 07/47] removed TransferTree. --- go/common/headers.go | 1 - go/common/rpc/converters.go | 4 ++-- go/enclave/components/batch_executor.go | 12 ++++++------ 3 files changed, 8 insertions(+), 9 deletions(-) diff --git a/go/common/headers.go b/go/common/headers.go index 090efc6cde..3f8ecc600c 100644 --- a/go/common/headers.go +++ b/go/common/headers.go @@ -40,7 +40,6 @@ type BatchHeader struct { CrossChainMessages []MessageBus.StructsCrossChainMessage `json:"crossChainMessages"` LatestInboundCrossChainHash common.Hash `json:"inboundCrossChainHash"` // The block hash of the latest block that has been scanned for cross chain messages. LatestInboundCrossChainHeight *big.Int `json:"inboundCrossChainHeight"` // The block height of the latest block that has been scanned for cross chain messages. - TransfersTree common.Hash `json:"transfersTree"` } // MarshalJSON custom marshals the BatchHeader into a json diff --git a/go/common/rpc/converters.go b/go/common/rpc/converters.go index 1e9e40118f..a0039e5e45 100644 --- a/go/common/rpc/converters.go +++ b/go/common/rpc/converters.go @@ -9,6 +9,7 @@ import ( "github.com/obscuronet/go-obscuro/go/common/rpc/generated" gethcommon "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/core/types" ) // Functions to convert classes that need to be sent between the host and the enclave to and from their equivalent @@ -144,7 +145,7 @@ func ToBatchHeaderMsg(header *common.BatchHeader) *generated.BatchHeaderMsg { GasUsed: header.GasUsed, Time: header.Time, BaseFee: baseFee, - TransferTree: header.TransfersTree.Bytes(), + TransferTree: types.EmptyRootHash.Bytes(), CrossChainMessages: ToCrossChainMsgs(header.CrossChainMessages), LatestInboundCrossChainHash: header.LatestInboundCrossChainHash.Bytes(), } @@ -197,7 +198,6 @@ func FromBatchHeaderMsg(header *generated.BatchHeaderMsg) *common.BatchHeader { GasLimit: header.GasLimit, GasUsed: header.GasUsed, Time: header.Time, - TransfersTree: gethcommon.BytesToHash(header.TransferTree), BaseFee: big.NewInt(int64(header.BaseFee)), CrossChainMessages: FromCrossChainMsgs(header.CrossChainMessages), LatestInboundCrossChainHash: gethcommon.BytesToHash(header.LatestInboundCrossChainHash), diff --git a/go/enclave/components/batch_executor.go b/go/enclave/components/batch_executor.go index 7a2ea3778c..f9f634151f 100644 --- a/go/enclave/components/batch_executor.go +++ b/go/enclave/components/batch_executor.go @@ -81,11 +81,12 @@ func (bp *batchExecutor) payL1Fees(stateDB *state.StateDB, context *BatchExecuti isFreeTransaction = isFreeTransaction && tx.GasPrice().Cmp(gethcommon.Big0) == 0 if !isFreeTransaction { - if accBalance.Cmp(cost) != -1 { - // bp.logger.Info("insufficient account balance for tx", log.TxKey, tx.Hash(), "addr", sender.Hex()) - stateDB.SubBalance(*sender, cost) - stateDB.AddBalance(context.Creator, cost) + if accBalance.Cmp(cost) == -1 { + bp.logger.Info("insufficient account balance for tx", log.TxKey, tx.Hash(), "addr", sender.Hex()) + continue } + stateDB.SubBalance(*sender, cost) + stateDB.AddBalance(context.Creator, cost) } transactions = append(transactions, tx) } @@ -239,7 +240,6 @@ func (executor *batchExecutor) CreateGenesisState(blkHash common.L1BlockHash, ti Number: big.NewInt(int64(0)), SequencerOrderNo: big.NewInt(int64(common.L2GenesisSeqNo)), // genesis batch has seq number 1 ReceiptHash: types.EmptyRootHash, - TransfersTree: types.EmptyRootHash, Time: timeNow, }, Transactions: []*common.L2Tx{}, @@ -273,7 +273,7 @@ func (executor *batchExecutor) populateOutboundCrossChainData(batch *core.Batch, transfersHash := types.DeriveSha(ValueTransfers(valueTransferMessages), &trie.StackTrie{}) */ batch.Header.CrossChainMessages = crossChainMessages - batch.Header.TransfersTree = types.EmptyRootHash + //batch.Header.TransfersTree = types.EmptyRootHash executor.logger.Trace(fmt.Sprintf("Added %d cross chain messages to batch.", len(batch.Header.CrossChainMessages)), log.CmpKey, log.CrossChainCmp) From c85dba12062f44ea9187d2cfec204954c9dd22c4 Mon Sep 17 00:00:00 2001 From: StefanIliev545 Date: Sat, 19 Aug 2023 01:55:15 +0200 Subject: [PATCH 08/47] Removed transfer tree from proto. --- go/common/rpc/converters.go | 2 - go/common/rpc/generated/enclave.pb.go | 419 +++++++++++++------------- go/common/rpc/generated/enclave.proto | 1 - 3 files changed, 204 insertions(+), 218 deletions(-) diff --git a/go/common/rpc/converters.go b/go/common/rpc/converters.go index a0039e5e45..2253eb0219 100644 --- a/go/common/rpc/converters.go +++ b/go/common/rpc/converters.go @@ -9,7 +9,6 @@ import ( "github.com/obscuronet/go-obscuro/go/common/rpc/generated" gethcommon "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/core/types" ) // Functions to convert classes that need to be sent between the host and the enclave to and from their equivalent @@ -145,7 +144,6 @@ func ToBatchHeaderMsg(header *common.BatchHeader) *generated.BatchHeaderMsg { GasUsed: header.GasUsed, Time: header.Time, BaseFee: baseFee, - TransferTree: types.EmptyRootHash.Bytes(), CrossChainMessages: ToCrossChainMsgs(header.CrossChainMessages), LatestInboundCrossChainHash: header.LatestInboundCrossChainHash.Bytes(), } diff --git a/go/common/rpc/generated/enclave.pb.go b/go/common/rpc/generated/enclave.pb.go index f5d333ca23..275d818995 100644 --- a/go/common/rpc/generated/enclave.pb.go +++ b/go/common/rpc/generated/enclave.pb.go @@ -3408,7 +3408,6 @@ type BatchHeaderMsg struct { LatestInboundCrossChainHeight []byte `protobuf:"bytes,15,opt,name=LatestInboundCrossChainHeight,proto3" json:"LatestInboundCrossChainHeight,omitempty"` LatestInboundCrossChainHash []byte `protobuf:"bytes,16,opt,name=LatestInboundCrossChainHash,proto3" json:"LatestInboundCrossChainHash,omitempty"` CrossChainMessages []*CrossChainMsg `protobuf:"bytes,17,rep,name=CrossChainMessages,proto3" json:"CrossChainMessages,omitempty"` - TransferTree []byte `protobuf:"bytes,18,opt,name=TransferTree,proto3" json:"TransferTree,omitempty"` } func (x *BatchHeaderMsg) Reset() { @@ -3562,13 +3561,6 @@ func (x *BatchHeaderMsg) GetCrossChainMessages() []*CrossChainMsg { return nil } -func (x *BatchHeaderMsg) GetTransferTree() []byte { - if x != nil { - return x.TransferTree - } - return nil -} - type ExtRollupMsg struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -4260,7 +4252,7 @@ var file_enclave_proto_rawDesc = []byte{ 0x72, 0x4d, 0x73, 0x67, 0x52, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x1a, 0x0a, 0x08, 0x74, 0x78, 0x48, 0x61, 0x73, 0x68, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x08, 0x74, 0x78, 0x48, 0x61, 0x73, 0x68, 0x65, 0x73, 0x12, 0x10, 0x0a, 0x03, 0x74, 0x78, 0x73, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x03, 0x74, 0x78, 0x73, 0x22, 0xe4, 0x04, 0x0a, 0x0e, 0x42, + 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x03, 0x74, 0x78, 0x73, 0x22, 0xc0, 0x04, 0x0a, 0x0e, 0x42, 0x61, 0x74, 0x63, 0x68, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x4d, 0x73, 0x67, 0x12, 0x1e, 0x0a, 0x0a, 0x50, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x48, 0x61, 0x73, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0a, 0x50, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x48, 0x61, 0x73, 0x68, 0x12, 0x14, 0x0a, @@ -4296,213 +4288,210 @@ var file_enclave_proto_rawDesc = []byte{ 0x6e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x18, 0x11, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x43, 0x72, 0x6f, 0x73, 0x73, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x4d, 0x73, 0x67, 0x52, 0x12, 0x43, 0x72, 0x6f, 0x73, 0x73, - 0x43, 0x68, 0x61, 0x69, 0x6e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x12, 0x22, 0x0a, - 0x0c, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x54, 0x72, 0x65, 0x65, 0x18, 0x12, 0x20, - 0x01, 0x28, 0x0c, 0x52, 0x0c, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x54, 0x72, 0x65, - 0x65, 0x22, 0x8c, 0x01, 0x0a, 0x0c, 0x45, 0x78, 0x74, 0x52, 0x6f, 0x6c, 0x6c, 0x75, 0x70, 0x4d, - 0x73, 0x67, 0x12, 0x32, 0x0a, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x52, - 0x6f, 0x6c, 0x6c, 0x75, 0x70, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x4d, 0x73, 0x67, 0x52, 0x06, - 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x24, 0x0a, 0x0d, 0x62, 0x61, 0x74, 0x63, 0x68, 0x50, - 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0d, 0x62, - 0x61, 0x74, 0x63, 0x68, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x73, 0x12, 0x22, 0x0a, 0x0c, - 0x62, 0x61, 0x74, 0x63, 0x68, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x0c, 0x52, 0x0c, 0x62, 0x61, 0x74, 0x63, 0x68, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, - 0x22, 0xbf, 0x02, 0x0a, 0x0f, 0x52, 0x6f, 0x6c, 0x6c, 0x75, 0x70, 0x48, 0x65, 0x61, 0x64, 0x65, - 0x72, 0x4d, 0x73, 0x67, 0x12, 0x1e, 0x0a, 0x0a, 0x50, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x48, 0x61, - 0x73, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0a, 0x50, 0x61, 0x72, 0x65, 0x6e, 0x74, - 0x48, 0x61, 0x73, 0x68, 0x12, 0x14, 0x0a, 0x05, 0x50, 0x72, 0x6f, 0x6f, 0x66, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x0c, 0x52, 0x05, 0x50, 0x72, 0x6f, 0x6f, 0x66, 0x12, 0x20, 0x0a, 0x0b, 0x50, 0x72, - 0x6f, 0x6f, 0x66, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, - 0x0b, 0x50, 0x72, 0x6f, 0x6f, 0x66, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x16, 0x0a, 0x06, - 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x06, 0x4e, 0x75, - 0x6d, 0x62, 0x65, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, - 0x28, 0x04, 0x52, 0x04, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x43, 0x6f, 0x69, 0x6e, - 0x62, 0x61, 0x73, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x08, 0x43, 0x6f, 0x69, 0x6e, - 0x62, 0x61, 0x73, 0x65, 0x12, 0x48, 0x0a, 0x12, 0x43, 0x72, 0x6f, 0x73, 0x73, 0x43, 0x68, 0x61, - 0x69, 0x6e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x18, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x43, 0x72, 0x6f, - 0x73, 0x73, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x4d, 0x73, 0x67, 0x52, 0x12, 0x43, 0x72, 0x6f, 0x73, - 0x73, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x12, 0x0c, - 0x0a, 0x01, 0x52, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x01, 0x52, 0x12, 0x0c, 0x0a, 0x01, - 0x53, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x01, 0x53, 0x12, 0x26, 0x0a, 0x0e, 0x4c, 0x61, - 0x73, 0x74, 0x42, 0x61, 0x74, 0x63, 0x68, 0x53, 0x65, 0x71, 0x4e, 0x6f, 0x18, 0x0a, 0x20, 0x01, - 0x28, 0x04, 0x52, 0x0e, 0x4c, 0x61, 0x73, 0x74, 0x42, 0x61, 0x74, 0x63, 0x68, 0x53, 0x65, 0x71, - 0x4e, 0x6f, 0x22, 0xa9, 0x01, 0x0a, 0x11, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x4d, 0x73, 0x67, 0x12, 0x16, 0x0a, 0x06, 0x53, 0x65, 0x63, 0x72, - 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, - 0x12, 0x20, 0x0a, 0x0b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x65, 0x72, 0x49, 0x44, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x65, 0x72, - 0x49, 0x44, 0x12, 0x20, 0x0a, 0x0b, 0x48, 0x6f, 0x73, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, - 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x48, 0x6f, 0x73, 0x74, 0x41, 0x64, 0x64, - 0x72, 0x65, 0x73, 0x73, 0x12, 0x38, 0x0a, 0x0b, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x45, 0x72, - 0x72, 0x6f, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x67, 0x65, 0x6e, 0x65, - 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x45, 0x72, 0x72, 0x6f, - 0x72, 0x52, 0x0b, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x22, 0x61, - 0x0a, 0x0d, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x61, 0x6c, 0x4d, 0x73, 0x67, 0x12, - 0x16, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, - 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x72, 0x65, 0x63, 0x69, 0x70, - 0x69, 0x65, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x72, 0x65, 0x63, 0x69, - 0x70, 0x69, 0x65, 0x6e, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, - 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x08, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, - 0x74, 0x32, 0xaf, 0x13, 0x0a, 0x0c, 0x45, 0x6e, 0x63, 0x6c, 0x61, 0x76, 0x65, 0x50, 0x72, 0x6f, - 0x74, 0x6f, 0x12, 0x3f, 0x0a, 0x06, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x18, 0x2e, 0x67, - 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, - 0x65, 0x64, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0x00, 0x12, 0x4e, 0x0a, 0x0b, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x12, 0x1d, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x41, - 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x1e, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x41, 0x74, - 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0x00, 0x12, 0x57, 0x0a, 0x0e, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x53, - 0x65, 0x63, 0x72, 0x65, 0x74, 0x12, 0x20, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, - 0x64, 0x2e, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, - 0x74, 0x65, 0x64, 0x2e, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x53, 0x65, 0x63, 0x72, - 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x4e, 0x0a, 0x0b, - 0x49, 0x6e, 0x69, 0x74, 0x45, 0x6e, 0x63, 0x6c, 0x61, 0x76, 0x65, 0x12, 0x1d, 0x2e, 0x67, 0x65, - 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x49, 0x6e, 0x69, 0x74, 0x45, 0x6e, 0x63, 0x6c, - 0x61, 0x76, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x67, 0x65, 0x6e, - 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x49, 0x6e, 0x69, 0x74, 0x45, 0x6e, 0x63, 0x6c, 0x61, - 0x76, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x50, 0x0a, 0x0d, - 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x4c, 0x31, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x1d, 0x2e, - 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, - 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x67, - 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x42, - 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x45, - 0x0a, 0x08, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x54, 0x78, 0x12, 0x1a, 0x2e, 0x67, 0x65, 0x6e, - 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x54, 0x78, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, - 0x65, 0x64, 0x2e, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x54, 0x78, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x4e, 0x0a, 0x0b, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x42, - 0x61, 0x74, 0x63, 0x68, 0x12, 0x1d, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, - 0x2e, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x42, 0x61, 0x74, 0x63, 0x68, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, - 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x42, 0x61, 0x74, 0x63, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x42, 0x0a, 0x07, 0x4f, 0x62, 0x73, 0x43, 0x61, 0x6c, 0x6c, - 0x12, 0x19, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x4f, 0x62, 0x73, - 0x43, 0x61, 0x6c, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x67, 0x65, - 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x4f, 0x62, 0x73, 0x43, 0x61, 0x6c, 0x6c, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x66, 0x0a, 0x13, 0x47, 0x65, 0x74, - 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x75, 0x6e, 0x74, - 0x12, 0x25, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x47, 0x65, 0x74, - 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x75, 0x6e, 0x74, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, - 0x74, 0x65, 0x64, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, - 0x6f, 0x6e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0x00, 0x12, 0x39, 0x0a, 0x04, 0x53, 0x74, 0x6f, 0x70, 0x12, 0x16, 0x2e, 0x67, 0x65, 0x6e, 0x65, - 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x53, 0x74, 0x6f, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x17, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x53, 0x74, - 0x6f, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x57, 0x0a, 0x0e, - 0x47, 0x65, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x20, - 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x72, - 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x21, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x47, 0x65, 0x74, - 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x6c, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x54, 0x72, 0x61, 0x6e, - 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x63, 0x65, 0x69, 0x70, 0x74, 0x12, 0x27, - 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x72, - 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x63, 0x65, 0x69, 0x70, 0x74, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, - 0x74, 0x65, 0x64, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, - 0x6f, 0x6e, 0x52, 0x65, 0x63, 0x65, 0x69, 0x70, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0x00, 0x12, 0x4b, 0x0a, 0x0a, 0x47, 0x65, 0x74, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, - 0x65, 0x12, 0x1c, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x47, 0x65, - 0x74, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x1d, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x47, 0x65, 0x74, 0x42, - 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, - 0x12, 0x42, 0x0a, 0x07, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x19, 0x2e, 0x67, 0x65, - 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, - 0x65, 0x64, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x22, 0x00, 0x12, 0x48, 0x0a, 0x09, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, - 0x65, 0x12, 0x1b, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x53, 0x75, - 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, - 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x53, 0x75, 0x62, 0x73, 0x63, - 0x72, 0x69, 0x62, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x4e, - 0x0a, 0x0b, 0x55, 0x6e, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x12, 0x1d, 0x2e, - 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x55, 0x6e, 0x73, 0x75, 0x62, 0x73, - 0x63, 0x72, 0x69, 0x62, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x67, - 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x55, 0x6e, 0x73, 0x75, 0x62, 0x73, 0x63, - 0x72, 0x69, 0x62, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x4e, - 0x0a, 0x0b, 0x45, 0x73, 0x74, 0x69, 0x6d, 0x61, 0x74, 0x65, 0x47, 0x61, 0x73, 0x12, 0x1d, 0x2e, - 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x45, 0x73, 0x74, 0x69, 0x6d, 0x61, - 0x74, 0x65, 0x47, 0x61, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x67, - 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x45, 0x73, 0x74, 0x69, 0x6d, 0x61, 0x74, - 0x65, 0x47, 0x61, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x42, - 0x0a, 0x07, 0x47, 0x65, 0x74, 0x4c, 0x6f, 0x67, 0x73, 0x12, 0x19, 0x2e, 0x67, 0x65, 0x6e, 0x65, - 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x47, 0x65, 0x74, 0x4c, 0x6f, 0x67, 0x73, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, - 0x2e, 0x47, 0x65, 0x74, 0x4c, 0x6f, 0x67, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x22, 0x00, 0x12, 0x45, 0x0a, 0x0b, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, - 0x6b, 0x12, 0x14, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x45, 0x6d, - 0x70, 0x74, 0x79, 0x41, 0x72, 0x67, 0x73, 0x1a, 0x1e, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, - 0x74, 0x65, 0x64, 0x2e, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x45, 0x0a, 0x08, 0x47, 0x65, 0x74, - 0x42, 0x61, 0x74, 0x63, 0x68, 0x12, 0x1a, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, - 0x64, 0x2e, 0x47, 0x65, 0x74, 0x42, 0x61, 0x74, 0x63, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x1b, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x47, 0x65, - 0x74, 0x42, 0x61, 0x74, 0x63, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, - 0x12, 0x53, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x42, 0x61, 0x74, 0x63, 0x68, 0x42, 0x79, 0x53, 0x65, - 0x71, 0x4e, 0x6f, 0x12, 0x21, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, - 0x47, 0x65, 0x74, 0x42, 0x61, 0x74, 0x63, 0x68, 0x42, 0x79, 0x53, 0x65, 0x71, 0x4e, 0x6f, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, - 0x65, 0x64, 0x2e, 0x47, 0x65, 0x74, 0x42, 0x61, 0x74, 0x63, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x4e, 0x0a, 0x0b, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x42, - 0x61, 0x74, 0x63, 0x68, 0x12, 0x1d, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, - 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x42, 0x61, 0x74, 0x63, 0x68, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, - 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x42, 0x61, 0x74, 0x63, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x51, 0x0a, 0x0c, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, - 0x6f, 0x6c, 0x6c, 0x75, 0x70, 0x12, 0x1e, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, - 0x64, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x6f, 0x6c, 0x6c, 0x75, 0x70, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, - 0x64, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x6f, 0x6c, 0x6c, 0x75, 0x70, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x6c, 0x0a, 0x15, 0x44, 0x65, 0x62, 0x75, - 0x67, 0x54, 0x72, 0x61, 0x63, 0x65, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, - 0x6e, 0x12, 0x27, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x44, 0x65, - 0x62, 0x75, 0x67, 0x54, 0x72, 0x61, 0x63, 0x65, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, - 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x67, 0x65, 0x6e, - 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x44, 0x65, 0x62, 0x75, 0x67, 0x54, 0x72, 0x61, 0x63, - 0x65, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x5a, 0x0a, 0x0f, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, - 0x4c, 0x32, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x73, 0x12, 0x21, 0x2e, 0x67, 0x65, 0x6e, 0x65, - 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x4c, 0x32, 0x55, 0x70, - 0x64, 0x61, 0x74, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x67, - 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x45, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x64, - 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, - 0x30, 0x01, 0x12, 0x6f, 0x0a, 0x16, 0x44, 0x65, 0x62, 0x75, 0x67, 0x45, 0x76, 0x65, 0x6e, 0x74, - 0x4c, 0x6f, 0x67, 0x52, 0x65, 0x6c, 0x65, 0x76, 0x61, 0x6e, 0x63, 0x79, 0x12, 0x28, 0x2e, 0x67, - 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x44, 0x65, 0x62, 0x75, 0x67, 0x45, 0x76, - 0x65, 0x6e, 0x74, 0x4c, 0x6f, 0x67, 0x52, 0x65, 0x6c, 0x65, 0x76, 0x61, 0x6e, 0x63, 0x79, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, - 0x65, 0x64, 0x2e, 0x44, 0x65, 0x62, 0x75, 0x67, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x4c, 0x6f, 0x67, - 0x52, 0x65, 0x6c, 0x65, 0x76, 0x61, 0x6e, 0x63, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0x00, 0x12, 0x6c, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x43, - 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x27, 0x2e, 0x67, - 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x6f, 0x74, 0x61, - 0x6c, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, - 0x64, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x61, - 0x63, 0x74, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0x00, 0x12, 0x69, 0x0a, 0x14, 0x47, 0x65, 0x74, 0x52, 0x65, 0x63, 0x65, 0x69, 0x70, 0x74, 0x73, - 0x42, 0x79, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x26, 0x2e, 0x67, 0x65, 0x6e, 0x65, - 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x65, 0x63, 0x65, 0x69, 0x70, 0x74, - 0x73, 0x42, 0x79, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x27, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x47, 0x65, - 0x74, 0x52, 0x65, 0x63, 0x65, 0x69, 0x70, 0x74, 0x73, 0x42, 0x79, 0x41, 0x64, 0x64, 0x72, 0x65, - 0x73, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x75, 0x0a, 0x18, - 0x47, 0x65, 0x74, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, - 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x61, 0x74, 0x61, 0x12, 0x2a, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, - 0x61, 0x74, 0x65, 0x64, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x54, 0x72, - 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x61, 0x74, 0x61, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2b, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, + 0x43, 0x68, 0x61, 0x69, 0x6e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x22, 0x8c, 0x01, + 0x0a, 0x0c, 0x45, 0x78, 0x74, 0x52, 0x6f, 0x6c, 0x6c, 0x75, 0x70, 0x4d, 0x73, 0x67, 0x12, 0x32, + 0x0a, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, + 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x52, 0x6f, 0x6c, 0x6c, 0x75, + 0x70, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x4d, 0x73, 0x67, 0x52, 0x06, 0x68, 0x65, 0x61, 0x64, + 0x65, 0x72, 0x12, 0x24, 0x0a, 0x0d, 0x62, 0x61, 0x74, 0x63, 0x68, 0x50, 0x61, 0x79, 0x6c, 0x6f, + 0x61, 0x64, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0d, 0x62, 0x61, 0x74, 0x63, 0x68, + 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x73, 0x12, 0x22, 0x0a, 0x0c, 0x62, 0x61, 0x74, 0x63, + 0x68, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0c, + 0x62, 0x61, 0x74, 0x63, 0x68, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x22, 0xbf, 0x02, 0x0a, + 0x0f, 0x52, 0x6f, 0x6c, 0x6c, 0x75, 0x70, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x4d, 0x73, 0x67, + 0x12, 0x1e, 0x0a, 0x0a, 0x50, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x48, 0x61, 0x73, 0x68, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0a, 0x50, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x48, 0x61, 0x73, 0x68, + 0x12, 0x14, 0x0a, 0x05, 0x50, 0x72, 0x6f, 0x6f, 0x66, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, + 0x05, 0x50, 0x72, 0x6f, 0x6f, 0x66, 0x12, 0x20, 0x0a, 0x0b, 0x50, 0x72, 0x6f, 0x6f, 0x66, 0x4e, + 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, 0x50, 0x72, 0x6f, + 0x6f, 0x66, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x16, 0x0a, 0x06, 0x4e, 0x75, 0x6d, 0x62, + 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x06, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, + 0x12, 0x12, 0x0a, 0x04, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x04, 0x52, 0x04, + 0x54, 0x69, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x43, 0x6f, 0x69, 0x6e, 0x62, 0x61, 0x73, 0x65, + 0x18, 0x06, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x08, 0x43, 0x6f, 0x69, 0x6e, 0x62, 0x61, 0x73, 0x65, + 0x12, 0x48, 0x0a, 0x12, 0x43, 0x72, 0x6f, 0x73, 0x73, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x4d, 0x65, + 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x67, + 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x43, 0x72, 0x6f, 0x73, 0x73, 0x43, 0x68, + 0x61, 0x69, 0x6e, 0x4d, 0x73, 0x67, 0x52, 0x12, 0x43, 0x72, 0x6f, 0x73, 0x73, 0x43, 0x68, 0x61, + 0x69, 0x6e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x12, 0x0c, 0x0a, 0x01, 0x52, 0x18, + 0x08, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x01, 0x52, 0x12, 0x0c, 0x0a, 0x01, 0x53, 0x18, 0x09, 0x20, + 0x01, 0x28, 0x0c, 0x52, 0x01, 0x53, 0x12, 0x26, 0x0a, 0x0e, 0x4c, 0x61, 0x73, 0x74, 0x42, 0x61, + 0x74, 0x63, 0x68, 0x53, 0x65, 0x71, 0x4e, 0x6f, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0e, + 0x4c, 0x61, 0x73, 0x74, 0x42, 0x61, 0x74, 0x63, 0x68, 0x53, 0x65, 0x71, 0x4e, 0x6f, 0x22, 0xa9, + 0x01, 0x0a, 0x11, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x4d, 0x73, 0x67, 0x12, 0x16, 0x0a, 0x06, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x12, 0x20, 0x0a, 0x0b, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x65, 0x72, 0x49, 0x44, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0c, 0x52, 0x0b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x65, 0x72, 0x49, 0x44, 0x12, 0x20, + 0x0a, 0x0b, 0x48, 0x6f, 0x73, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0b, 0x48, 0x6f, 0x73, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, + 0x12, 0x38, 0x0a, 0x0b, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, + 0x64, 0x2e, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x0b, 0x73, + 0x79, 0x73, 0x74, 0x65, 0x6d, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x22, 0x61, 0x0a, 0x0d, 0x57, 0x69, + 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x61, 0x6c, 0x4d, 0x73, 0x67, 0x12, 0x16, 0x0a, 0x06, 0x61, + 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x61, 0x6d, 0x6f, + 0x75, 0x6e, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x72, 0x65, 0x63, 0x69, 0x70, 0x69, 0x65, 0x6e, 0x74, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x72, 0x65, 0x63, 0x69, 0x70, 0x69, 0x65, 0x6e, + 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x0c, 0x52, 0x08, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x32, 0xaf, 0x13, + 0x0a, 0x0c, 0x45, 0x6e, 0x63, 0x6c, 0x61, 0x76, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x3f, + 0x0a, 0x06, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x18, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, + 0x61, 0x74, 0x65, 0x64, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x53, + 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, + 0x4e, 0x0a, 0x0b, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1d, + 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x41, 0x74, 0x74, 0x65, 0x73, + 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, + 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, + 0x57, 0x0a, 0x0e, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x53, 0x65, 0x63, 0x72, 0x65, + 0x74, 0x12, 0x20, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x47, 0x65, + 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, + 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x4e, 0x0a, 0x0b, 0x49, 0x6e, 0x69, 0x74, + 0x45, 0x6e, 0x63, 0x6c, 0x61, 0x76, 0x65, 0x12, 0x1d, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, + 0x74, 0x65, 0x64, 0x2e, 0x49, 0x6e, 0x69, 0x74, 0x45, 0x6e, 0x63, 0x6c, 0x61, 0x76, 0x65, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, + 0x65, 0x64, 0x2e, 0x49, 0x6e, 0x69, 0x74, 0x45, 0x6e, 0x63, 0x6c, 0x61, 0x76, 0x65, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x50, 0x0a, 0x0d, 0x53, 0x75, 0x62, 0x6d, + 0x69, 0x74, 0x4c, 0x31, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x1d, 0x2e, 0x67, 0x65, 0x6e, 0x65, + 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x42, 0x6c, 0x6f, 0x63, + 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, + 0x61, 0x74, 0x65, 0x64, 0x2e, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x45, 0x0a, 0x08, 0x53, 0x75, + 0x62, 0x6d, 0x69, 0x74, 0x54, 0x78, 0x12, 0x1a, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, + 0x65, 0x64, 0x2e, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x54, 0x78, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x53, + 0x75, 0x62, 0x6d, 0x69, 0x74, 0x54, 0x78, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x00, 0x12, 0x4e, 0x0a, 0x0b, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x42, 0x61, 0x74, 0x63, 0x68, + 0x12, 0x1d, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x53, 0x75, 0x62, + 0x6d, 0x69, 0x74, 0x42, 0x61, 0x74, 0x63, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x1e, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x53, 0x75, 0x62, 0x6d, + 0x69, 0x74, 0x42, 0x61, 0x74, 0x63, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x00, 0x12, 0x42, 0x0a, 0x07, 0x4f, 0x62, 0x73, 0x43, 0x61, 0x6c, 0x6c, 0x12, 0x19, 0x2e, 0x67, + 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x4f, 0x62, 0x73, 0x43, 0x61, 0x6c, 0x6c, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, + 0x74, 0x65, 0x64, 0x2e, 0x4f, 0x62, 0x73, 0x43, 0x61, 0x6c, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x66, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x54, 0x72, 0x61, 0x6e, + 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x25, 0x2e, 0x67, + 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x72, 0x61, 0x6e, + 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, + 0x47, 0x65, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, + 0x75, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x39, 0x0a, + 0x04, 0x53, 0x74, 0x6f, 0x70, 0x12, 0x16, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, + 0x64, 0x2e, 0x53, 0x74, 0x6f, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, + 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x53, 0x74, 0x6f, 0x70, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x57, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x54, + 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x20, 0x2e, 0x67, 0x65, 0x6e, + 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x67, + 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x72, 0x61, 0x6e, + 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x00, 0x12, 0x6c, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x63, 0x65, 0x69, 0x70, 0x74, 0x12, 0x27, 0x2e, 0x67, 0x65, 0x6e, + 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x63, 0x65, 0x69, 0x70, 0x74, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, + 0x47, 0x65, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, + 0x63, 0x65, 0x69, 0x70, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, + 0x4b, 0x0a, 0x0a, 0x47, 0x65, 0x74, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x1c, 0x2e, + 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x47, 0x65, 0x74, 0x42, 0x61, 0x6c, + 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x67, 0x65, + 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x47, 0x65, 0x74, 0x42, 0x61, 0x6c, 0x61, 0x6e, + 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x42, 0x0a, 0x07, + 0x47, 0x65, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x19, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, + 0x74, 0x65, 0x64, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x47, + 0x65, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, + 0x12, 0x48, 0x0a, 0x09, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x12, 0x1b, 0x2e, + 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, + 0x69, 0x62, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x67, 0x65, 0x6e, + 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x4e, 0x0a, 0x0b, 0x55, 0x6e, + 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x12, 0x1d, 0x2e, 0x67, 0x65, 0x6e, 0x65, + 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x55, 0x6e, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, + 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, + 0x61, 0x74, 0x65, 0x64, 0x2e, 0x55, 0x6e, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x4e, 0x0a, 0x0b, 0x45, 0x73, + 0x74, 0x69, 0x6d, 0x61, 0x74, 0x65, 0x47, 0x61, 0x73, 0x12, 0x1d, 0x2e, 0x67, 0x65, 0x6e, 0x65, + 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x45, 0x73, 0x74, 0x69, 0x6d, 0x61, 0x74, 0x65, 0x47, 0x61, + 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, + 0x61, 0x74, 0x65, 0x64, 0x2e, 0x45, 0x73, 0x74, 0x69, 0x6d, 0x61, 0x74, 0x65, 0x47, 0x61, 0x73, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x42, 0x0a, 0x07, 0x47, 0x65, + 0x74, 0x4c, 0x6f, 0x67, 0x73, 0x12, 0x19, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, + 0x64, 0x2e, 0x47, 0x65, 0x74, 0x4c, 0x6f, 0x67, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x1a, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x47, 0x65, 0x74, + 0x4c, 0x6f, 0x67, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x45, + 0x0a, 0x0b, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x12, 0x14, 0x2e, + 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x41, + 0x72, 0x67, 0x73, 0x1a, 0x1e, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, + 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x45, 0x0a, 0x08, 0x47, 0x65, 0x74, 0x42, 0x61, 0x74, 0x63, + 0x68, 0x12, 0x1a, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x47, 0x65, + 0x74, 0x42, 0x61, 0x74, 0x63, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, + 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x47, 0x65, 0x74, 0x42, 0x61, 0x74, + 0x63, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x53, 0x0a, 0x0f, + 0x47, 0x65, 0x74, 0x42, 0x61, 0x74, 0x63, 0x68, 0x42, 0x79, 0x53, 0x65, 0x71, 0x4e, 0x6f, 0x12, + 0x21, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x47, 0x65, 0x74, 0x42, + 0x61, 0x74, 0x63, 0x68, 0x42, 0x79, 0x53, 0x65, 0x71, 0x4e, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x47, + 0x65, 0x74, 0x42, 0x61, 0x74, 0x63, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x00, 0x12, 0x4e, 0x0a, 0x0b, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x42, 0x61, 0x74, 0x63, 0x68, + 0x12, 0x1d, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x43, 0x72, 0x65, + 0x61, 0x74, 0x65, 0x42, 0x61, 0x74, 0x63, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x1e, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x43, 0x72, 0x65, 0x61, + 0x74, 0x65, 0x42, 0x61, 0x74, 0x63, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x00, 0x12, 0x51, 0x0a, 0x0c, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x6f, 0x6c, 0x6c, 0x75, + 0x70, 0x12, 0x1e, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x43, 0x72, + 0x65, 0x61, 0x74, 0x65, 0x52, 0x6f, 0x6c, 0x6c, 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x1f, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x43, 0x72, + 0x65, 0x61, 0x74, 0x65, 0x52, 0x6f, 0x6c, 0x6c, 0x75, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x00, 0x12, 0x6c, 0x0a, 0x15, 0x44, 0x65, 0x62, 0x75, 0x67, 0x54, 0x72, 0x61, + 0x63, 0x65, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x27, 0x2e, + 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x44, 0x65, 0x62, 0x75, 0x67, 0x54, + 0x72, 0x61, 0x63, 0x65, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, + 0x65, 0x64, 0x2e, 0x44, 0x65, 0x62, 0x75, 0x67, 0x54, 0x72, 0x61, 0x63, 0x65, 0x54, 0x72, 0x61, + 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x00, 0x12, 0x5a, 0x0a, 0x0f, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x4c, 0x32, 0x55, 0x70, + 0x64, 0x61, 0x74, 0x65, 0x73, 0x12, 0x21, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, + 0x64, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x4c, 0x32, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, + 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, + 0x61, 0x74, 0x65, 0x64, 0x2e, 0x45, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x64, 0x55, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x30, 0x01, 0x12, 0x6f, + 0x0a, 0x16, 0x44, 0x65, 0x62, 0x75, 0x67, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x4c, 0x6f, 0x67, 0x52, + 0x65, 0x6c, 0x65, 0x76, 0x61, 0x6e, 0x63, 0x79, 0x12, 0x28, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, + 0x61, 0x74, 0x65, 0x64, 0x2e, 0x44, 0x65, 0x62, 0x75, 0x67, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x4c, + 0x6f, 0x67, 0x52, 0x65, 0x6c, 0x65, 0x76, 0x61, 0x6e, 0x63, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x44, + 0x65, 0x62, 0x75, 0x67, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x4c, 0x6f, 0x67, 0x52, 0x65, 0x6c, 0x65, + 0x76, 0x61, 0x6e, 0x63, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, + 0x6c, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x43, 0x6f, 0x6e, 0x74, 0x72, + 0x61, 0x63, 0x74, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x27, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, + 0x61, 0x74, 0x65, 0x64, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x43, 0x6f, 0x6e, + 0x74, 0x72, 0x61, 0x63, 0x74, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x28, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x47, 0x65, + 0x74, 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x43, 0x6f, + 0x75, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x69, 0x0a, + 0x14, 0x47, 0x65, 0x74, 0x52, 0x65, 0x63, 0x65, 0x69, 0x70, 0x74, 0x73, 0x42, 0x79, 0x41, 0x64, + 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x26, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, + 0x64, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x65, 0x63, 0x65, 0x69, 0x70, 0x74, 0x73, 0x42, 0x79, 0x41, + 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, + 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x65, 0x63, + 0x65, 0x69, 0x70, 0x74, 0x73, 0x42, 0x79, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x75, 0x0a, 0x18, 0x47, 0x65, 0x74, 0x50, + 0x75, 0x62, 0x6c, 0x69, 0x63, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x44, 0x61, 0x74, 0x61, 0x12, 0x2a, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, - 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x61, 0x74, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0x00, 0x42, 0x17, 0x5a, 0x15, 0x65, 0x6e, 0x63, 0x6c, 0x61, 0x76, 0x65, 0x2f, 0x72, - 0x70, 0x63, 0x2f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x62, 0x06, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x33, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x61, 0x74, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x2b, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x47, 0x65, 0x74, + 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x44, 0x61, 0x74, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, + 0x17, 0x5a, 0x15, 0x65, 0x6e, 0x63, 0x6c, 0x61, 0x76, 0x65, 0x2f, 0x72, 0x70, 0x63, 0x2f, 0x67, + 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/go/common/rpc/generated/enclave.proto b/go/common/rpc/generated/enclave.proto index bf15657ba6..6ec88bab49 100644 --- a/go/common/rpc/generated/enclave.proto +++ b/go/common/rpc/generated/enclave.proto @@ -386,7 +386,6 @@ message BatchHeaderMsg { bytes LatestInboundCrossChainHeight = 15; bytes LatestInboundCrossChainHash = 16; repeated CrossChainMsg CrossChainMessages = 17; - bytes TransferTree = 18; } message ExtRollupMsg { From e3d063e5d05b275e4e5fb7becc6a941d4fe645ec Mon Sep 17 00:00:00 2001 From: StefanIliev545 Date: Sat, 19 Aug 2023 02:00:30 +0200 Subject: [PATCH 09/47] Revert "Removed transfer tree from proto." This reverts commit c85dba12062f44ea9187d2cfec204954c9dd22c4. --- go/common/rpc/converters.go | 2 + go/common/rpc/generated/enclave.pb.go | 419 +++++++++++++------------- go/common/rpc/generated/enclave.proto | 1 + 3 files changed, 218 insertions(+), 204 deletions(-) diff --git a/go/common/rpc/converters.go b/go/common/rpc/converters.go index 2253eb0219..a0039e5e45 100644 --- a/go/common/rpc/converters.go +++ b/go/common/rpc/converters.go @@ -9,6 +9,7 @@ import ( "github.com/obscuronet/go-obscuro/go/common/rpc/generated" gethcommon "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/core/types" ) // Functions to convert classes that need to be sent between the host and the enclave to and from their equivalent @@ -144,6 +145,7 @@ func ToBatchHeaderMsg(header *common.BatchHeader) *generated.BatchHeaderMsg { GasUsed: header.GasUsed, Time: header.Time, BaseFee: baseFee, + TransferTree: types.EmptyRootHash.Bytes(), CrossChainMessages: ToCrossChainMsgs(header.CrossChainMessages), LatestInboundCrossChainHash: header.LatestInboundCrossChainHash.Bytes(), } diff --git a/go/common/rpc/generated/enclave.pb.go b/go/common/rpc/generated/enclave.pb.go index 275d818995..f5d333ca23 100644 --- a/go/common/rpc/generated/enclave.pb.go +++ b/go/common/rpc/generated/enclave.pb.go @@ -3408,6 +3408,7 @@ type BatchHeaderMsg struct { LatestInboundCrossChainHeight []byte `protobuf:"bytes,15,opt,name=LatestInboundCrossChainHeight,proto3" json:"LatestInboundCrossChainHeight,omitempty"` LatestInboundCrossChainHash []byte `protobuf:"bytes,16,opt,name=LatestInboundCrossChainHash,proto3" json:"LatestInboundCrossChainHash,omitempty"` CrossChainMessages []*CrossChainMsg `protobuf:"bytes,17,rep,name=CrossChainMessages,proto3" json:"CrossChainMessages,omitempty"` + TransferTree []byte `protobuf:"bytes,18,opt,name=TransferTree,proto3" json:"TransferTree,omitempty"` } func (x *BatchHeaderMsg) Reset() { @@ -3561,6 +3562,13 @@ func (x *BatchHeaderMsg) GetCrossChainMessages() []*CrossChainMsg { return nil } +func (x *BatchHeaderMsg) GetTransferTree() []byte { + if x != nil { + return x.TransferTree + } + return nil +} + type ExtRollupMsg struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -4252,7 +4260,7 @@ var file_enclave_proto_rawDesc = []byte{ 0x72, 0x4d, 0x73, 0x67, 0x52, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x1a, 0x0a, 0x08, 0x74, 0x78, 0x48, 0x61, 0x73, 0x68, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x08, 0x74, 0x78, 0x48, 0x61, 0x73, 0x68, 0x65, 0x73, 0x12, 0x10, 0x0a, 0x03, 0x74, 0x78, 0x73, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x03, 0x74, 0x78, 0x73, 0x22, 0xc0, 0x04, 0x0a, 0x0e, 0x42, + 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x03, 0x74, 0x78, 0x73, 0x22, 0xe4, 0x04, 0x0a, 0x0e, 0x42, 0x61, 0x74, 0x63, 0x68, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x4d, 0x73, 0x67, 0x12, 0x1e, 0x0a, 0x0a, 0x50, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x48, 0x61, 0x73, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0a, 0x50, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x48, 0x61, 0x73, 0x68, 0x12, 0x14, 0x0a, @@ -4288,210 +4296,213 @@ var file_enclave_proto_rawDesc = []byte{ 0x6e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x18, 0x11, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x43, 0x72, 0x6f, 0x73, 0x73, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x4d, 0x73, 0x67, 0x52, 0x12, 0x43, 0x72, 0x6f, 0x73, 0x73, - 0x43, 0x68, 0x61, 0x69, 0x6e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x22, 0x8c, 0x01, - 0x0a, 0x0c, 0x45, 0x78, 0x74, 0x52, 0x6f, 0x6c, 0x6c, 0x75, 0x70, 0x4d, 0x73, 0x67, 0x12, 0x32, - 0x0a, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, - 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x52, 0x6f, 0x6c, 0x6c, 0x75, - 0x70, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x4d, 0x73, 0x67, 0x52, 0x06, 0x68, 0x65, 0x61, 0x64, - 0x65, 0x72, 0x12, 0x24, 0x0a, 0x0d, 0x62, 0x61, 0x74, 0x63, 0x68, 0x50, 0x61, 0x79, 0x6c, 0x6f, - 0x61, 0x64, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0d, 0x62, 0x61, 0x74, 0x63, 0x68, - 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x73, 0x12, 0x22, 0x0a, 0x0c, 0x62, 0x61, 0x74, 0x63, - 0x68, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0c, - 0x62, 0x61, 0x74, 0x63, 0x68, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x22, 0xbf, 0x02, 0x0a, - 0x0f, 0x52, 0x6f, 0x6c, 0x6c, 0x75, 0x70, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x4d, 0x73, 0x67, - 0x12, 0x1e, 0x0a, 0x0a, 0x50, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x48, 0x61, 0x73, 0x68, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0a, 0x50, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x48, 0x61, 0x73, 0x68, - 0x12, 0x14, 0x0a, 0x05, 0x50, 0x72, 0x6f, 0x6f, 0x66, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, - 0x05, 0x50, 0x72, 0x6f, 0x6f, 0x66, 0x12, 0x20, 0x0a, 0x0b, 0x50, 0x72, 0x6f, 0x6f, 0x66, 0x4e, - 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, 0x50, 0x72, 0x6f, - 0x6f, 0x66, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x16, 0x0a, 0x06, 0x4e, 0x75, 0x6d, 0x62, - 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x06, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, - 0x12, 0x12, 0x0a, 0x04, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x04, 0x52, 0x04, - 0x54, 0x69, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x43, 0x6f, 0x69, 0x6e, 0x62, 0x61, 0x73, 0x65, - 0x18, 0x06, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x08, 0x43, 0x6f, 0x69, 0x6e, 0x62, 0x61, 0x73, 0x65, - 0x12, 0x48, 0x0a, 0x12, 0x43, 0x72, 0x6f, 0x73, 0x73, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x4d, 0x65, - 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x67, - 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x43, 0x72, 0x6f, 0x73, 0x73, 0x43, 0x68, - 0x61, 0x69, 0x6e, 0x4d, 0x73, 0x67, 0x52, 0x12, 0x43, 0x72, 0x6f, 0x73, 0x73, 0x43, 0x68, 0x61, - 0x69, 0x6e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x12, 0x0c, 0x0a, 0x01, 0x52, 0x18, - 0x08, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x01, 0x52, 0x12, 0x0c, 0x0a, 0x01, 0x53, 0x18, 0x09, 0x20, - 0x01, 0x28, 0x0c, 0x52, 0x01, 0x53, 0x12, 0x26, 0x0a, 0x0e, 0x4c, 0x61, 0x73, 0x74, 0x42, 0x61, - 0x74, 0x63, 0x68, 0x53, 0x65, 0x71, 0x4e, 0x6f, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0e, - 0x4c, 0x61, 0x73, 0x74, 0x42, 0x61, 0x74, 0x63, 0x68, 0x53, 0x65, 0x71, 0x4e, 0x6f, 0x22, 0xa9, - 0x01, 0x0a, 0x11, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x4d, 0x73, 0x67, 0x12, 0x16, 0x0a, 0x06, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x12, 0x20, 0x0a, 0x0b, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x65, 0x72, 0x49, 0x44, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x0c, 0x52, 0x0b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x65, 0x72, 0x49, 0x44, 0x12, 0x20, - 0x0a, 0x0b, 0x48, 0x6f, 0x73, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x0b, 0x48, 0x6f, 0x73, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, - 0x12, 0x38, 0x0a, 0x0b, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x18, - 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, - 0x64, 0x2e, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x0b, 0x73, - 0x79, 0x73, 0x74, 0x65, 0x6d, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x22, 0x61, 0x0a, 0x0d, 0x57, 0x69, - 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x61, 0x6c, 0x4d, 0x73, 0x67, 0x12, 0x16, 0x0a, 0x06, 0x61, - 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x61, 0x6d, 0x6f, - 0x75, 0x6e, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x72, 0x65, 0x63, 0x69, 0x70, 0x69, 0x65, 0x6e, 0x74, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x72, 0x65, 0x63, 0x69, 0x70, 0x69, 0x65, 0x6e, - 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x0c, 0x52, 0x08, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x32, 0xaf, 0x13, - 0x0a, 0x0c, 0x45, 0x6e, 0x63, 0x6c, 0x61, 0x76, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x3f, - 0x0a, 0x06, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x18, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, - 0x61, 0x74, 0x65, 0x64, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x53, - 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, - 0x4e, 0x0a, 0x0b, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1d, - 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x41, 0x74, 0x74, 0x65, 0x73, - 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, - 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, - 0x57, 0x0a, 0x0e, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x53, 0x65, 0x63, 0x72, 0x65, - 0x74, 0x12, 0x20, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x47, 0x65, - 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, - 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x4e, 0x0a, 0x0b, 0x49, 0x6e, 0x69, 0x74, - 0x45, 0x6e, 0x63, 0x6c, 0x61, 0x76, 0x65, 0x12, 0x1d, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, - 0x74, 0x65, 0x64, 0x2e, 0x49, 0x6e, 0x69, 0x74, 0x45, 0x6e, 0x63, 0x6c, 0x61, 0x76, 0x65, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, - 0x65, 0x64, 0x2e, 0x49, 0x6e, 0x69, 0x74, 0x45, 0x6e, 0x63, 0x6c, 0x61, 0x76, 0x65, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x50, 0x0a, 0x0d, 0x53, 0x75, 0x62, 0x6d, - 0x69, 0x74, 0x4c, 0x31, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x1d, 0x2e, 0x67, 0x65, 0x6e, 0x65, - 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x42, 0x6c, 0x6f, 0x63, - 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, - 0x61, 0x74, 0x65, 0x64, 0x2e, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x45, 0x0a, 0x08, 0x53, 0x75, - 0x62, 0x6d, 0x69, 0x74, 0x54, 0x78, 0x12, 0x1a, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, - 0x65, 0x64, 0x2e, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x54, 0x78, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x53, - 0x75, 0x62, 0x6d, 0x69, 0x74, 0x54, 0x78, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0x00, 0x12, 0x4e, 0x0a, 0x0b, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x42, 0x61, 0x74, 0x63, 0x68, - 0x12, 0x1d, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x53, 0x75, 0x62, - 0x6d, 0x69, 0x74, 0x42, 0x61, 0x74, 0x63, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x1e, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x53, 0x75, 0x62, 0x6d, - 0x69, 0x74, 0x42, 0x61, 0x74, 0x63, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0x00, 0x12, 0x42, 0x0a, 0x07, 0x4f, 0x62, 0x73, 0x43, 0x61, 0x6c, 0x6c, 0x12, 0x19, 0x2e, 0x67, - 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x4f, 0x62, 0x73, 0x43, 0x61, 0x6c, 0x6c, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, - 0x74, 0x65, 0x64, 0x2e, 0x4f, 0x62, 0x73, 0x43, 0x61, 0x6c, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x66, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x54, 0x72, 0x61, 0x6e, - 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x25, 0x2e, 0x67, - 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x72, 0x61, 0x6e, - 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, - 0x47, 0x65, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, - 0x75, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x39, 0x0a, - 0x04, 0x53, 0x74, 0x6f, 0x70, 0x12, 0x16, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, - 0x64, 0x2e, 0x53, 0x74, 0x6f, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, - 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x53, 0x74, 0x6f, 0x70, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x57, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x54, - 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x20, 0x2e, 0x67, 0x65, 0x6e, - 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, - 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x67, - 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x72, 0x61, 0x6e, - 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0x00, 0x12, 0x6c, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, - 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x63, 0x65, 0x69, 0x70, 0x74, 0x12, 0x27, 0x2e, 0x67, 0x65, 0x6e, - 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, - 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x63, 0x65, 0x69, 0x70, 0x74, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, - 0x47, 0x65, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, - 0x63, 0x65, 0x69, 0x70, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, - 0x4b, 0x0a, 0x0a, 0x47, 0x65, 0x74, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x1c, 0x2e, - 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x47, 0x65, 0x74, 0x42, 0x61, 0x6c, - 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x67, 0x65, - 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x47, 0x65, 0x74, 0x42, 0x61, 0x6c, 0x61, 0x6e, - 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x42, 0x0a, 0x07, - 0x47, 0x65, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x19, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, - 0x74, 0x65, 0x64, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x47, - 0x65, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, - 0x12, 0x48, 0x0a, 0x09, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x12, 0x1b, 0x2e, - 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, - 0x69, 0x62, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x67, 0x65, 0x6e, - 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x4e, 0x0a, 0x0b, 0x55, 0x6e, - 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x12, 0x1d, 0x2e, 0x67, 0x65, 0x6e, 0x65, - 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x55, 0x6e, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, - 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, - 0x61, 0x74, 0x65, 0x64, 0x2e, 0x55, 0x6e, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x4e, 0x0a, 0x0b, 0x45, 0x73, - 0x74, 0x69, 0x6d, 0x61, 0x74, 0x65, 0x47, 0x61, 0x73, 0x12, 0x1d, 0x2e, 0x67, 0x65, 0x6e, 0x65, - 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x45, 0x73, 0x74, 0x69, 0x6d, 0x61, 0x74, 0x65, 0x47, 0x61, - 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, - 0x61, 0x74, 0x65, 0x64, 0x2e, 0x45, 0x73, 0x74, 0x69, 0x6d, 0x61, 0x74, 0x65, 0x47, 0x61, 0x73, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x42, 0x0a, 0x07, 0x47, 0x65, - 0x74, 0x4c, 0x6f, 0x67, 0x73, 0x12, 0x19, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, - 0x64, 0x2e, 0x47, 0x65, 0x74, 0x4c, 0x6f, 0x67, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x1a, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x47, 0x65, 0x74, - 0x4c, 0x6f, 0x67, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x45, - 0x0a, 0x0b, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x12, 0x14, 0x2e, - 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x41, - 0x72, 0x67, 0x73, 0x1a, 0x1e, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, - 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x45, 0x0a, 0x08, 0x47, 0x65, 0x74, 0x42, 0x61, 0x74, 0x63, - 0x68, 0x12, 0x1a, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x47, 0x65, - 0x74, 0x42, 0x61, 0x74, 0x63, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, - 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x47, 0x65, 0x74, 0x42, 0x61, 0x74, - 0x63, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x53, 0x0a, 0x0f, - 0x47, 0x65, 0x74, 0x42, 0x61, 0x74, 0x63, 0x68, 0x42, 0x79, 0x53, 0x65, 0x71, 0x4e, 0x6f, 0x12, - 0x21, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x47, 0x65, 0x74, 0x42, - 0x61, 0x74, 0x63, 0x68, 0x42, 0x79, 0x53, 0x65, 0x71, 0x4e, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x47, - 0x65, 0x74, 0x42, 0x61, 0x74, 0x63, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0x00, 0x12, 0x4e, 0x0a, 0x0b, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x42, 0x61, 0x74, 0x63, 0x68, - 0x12, 0x1d, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x43, 0x72, 0x65, - 0x61, 0x74, 0x65, 0x42, 0x61, 0x74, 0x63, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x1e, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x43, 0x72, 0x65, 0x61, - 0x74, 0x65, 0x42, 0x61, 0x74, 0x63, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0x00, 0x12, 0x51, 0x0a, 0x0c, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x6f, 0x6c, 0x6c, 0x75, - 0x70, 0x12, 0x1e, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x43, 0x72, - 0x65, 0x61, 0x74, 0x65, 0x52, 0x6f, 0x6c, 0x6c, 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x1f, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x43, 0x72, - 0x65, 0x61, 0x74, 0x65, 0x52, 0x6f, 0x6c, 0x6c, 0x75, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x22, 0x00, 0x12, 0x6c, 0x0a, 0x15, 0x44, 0x65, 0x62, 0x75, 0x67, 0x54, 0x72, 0x61, - 0x63, 0x65, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x27, 0x2e, - 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x44, 0x65, 0x62, 0x75, 0x67, 0x54, - 0x72, 0x61, 0x63, 0x65, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, - 0x65, 0x64, 0x2e, 0x44, 0x65, 0x62, 0x75, 0x67, 0x54, 0x72, 0x61, 0x63, 0x65, 0x54, 0x72, 0x61, - 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x22, 0x00, 0x12, 0x5a, 0x0a, 0x0f, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x4c, 0x32, 0x55, 0x70, - 0x64, 0x61, 0x74, 0x65, 0x73, 0x12, 0x21, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, - 0x64, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x4c, 0x32, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, - 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, - 0x61, 0x74, 0x65, 0x64, 0x2e, 0x45, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x64, 0x55, 0x70, 0x64, 0x61, - 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x30, 0x01, 0x12, 0x6f, - 0x0a, 0x16, 0x44, 0x65, 0x62, 0x75, 0x67, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x4c, 0x6f, 0x67, 0x52, - 0x65, 0x6c, 0x65, 0x76, 0x61, 0x6e, 0x63, 0x79, 0x12, 0x28, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, - 0x61, 0x74, 0x65, 0x64, 0x2e, 0x44, 0x65, 0x62, 0x75, 0x67, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x4c, - 0x6f, 0x67, 0x52, 0x65, 0x6c, 0x65, 0x76, 0x61, 0x6e, 0x63, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x44, - 0x65, 0x62, 0x75, 0x67, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x4c, 0x6f, 0x67, 0x52, 0x65, 0x6c, 0x65, - 0x76, 0x61, 0x6e, 0x63, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, - 0x6c, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x43, 0x6f, 0x6e, 0x74, 0x72, - 0x61, 0x63, 0x74, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x27, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, - 0x61, 0x74, 0x65, 0x64, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x43, 0x6f, 0x6e, - 0x74, 0x72, 0x61, 0x63, 0x74, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x28, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x47, 0x65, - 0x74, 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x43, 0x6f, - 0x75, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x69, 0x0a, - 0x14, 0x47, 0x65, 0x74, 0x52, 0x65, 0x63, 0x65, 0x69, 0x70, 0x74, 0x73, 0x42, 0x79, 0x41, 0x64, - 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x26, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, - 0x64, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x65, 0x63, 0x65, 0x69, 0x70, 0x74, 0x73, 0x42, 0x79, 0x41, - 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, - 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x65, 0x63, - 0x65, 0x69, 0x70, 0x74, 0x73, 0x42, 0x79, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x75, 0x0a, 0x18, 0x47, 0x65, 0x74, 0x50, - 0x75, 0x62, 0x6c, 0x69, 0x63, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, - 0x44, 0x61, 0x74, 0x61, 0x12, 0x2a, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, + 0x43, 0x68, 0x61, 0x69, 0x6e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x12, 0x22, 0x0a, + 0x0c, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x54, 0x72, 0x65, 0x65, 0x18, 0x12, 0x20, + 0x01, 0x28, 0x0c, 0x52, 0x0c, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x54, 0x72, 0x65, + 0x65, 0x22, 0x8c, 0x01, 0x0a, 0x0c, 0x45, 0x78, 0x74, 0x52, 0x6f, 0x6c, 0x6c, 0x75, 0x70, 0x4d, + 0x73, 0x67, 0x12, 0x32, 0x0a, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x52, + 0x6f, 0x6c, 0x6c, 0x75, 0x70, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x4d, 0x73, 0x67, 0x52, 0x06, + 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x24, 0x0a, 0x0d, 0x62, 0x61, 0x74, 0x63, 0x68, 0x50, + 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0d, 0x62, + 0x61, 0x74, 0x63, 0x68, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x73, 0x12, 0x22, 0x0a, 0x0c, + 0x62, 0x61, 0x74, 0x63, 0x68, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x0c, 0x52, 0x0c, 0x62, 0x61, 0x74, 0x63, 0x68, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, + 0x22, 0xbf, 0x02, 0x0a, 0x0f, 0x52, 0x6f, 0x6c, 0x6c, 0x75, 0x70, 0x48, 0x65, 0x61, 0x64, 0x65, + 0x72, 0x4d, 0x73, 0x67, 0x12, 0x1e, 0x0a, 0x0a, 0x50, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x48, 0x61, + 0x73, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0a, 0x50, 0x61, 0x72, 0x65, 0x6e, 0x74, + 0x48, 0x61, 0x73, 0x68, 0x12, 0x14, 0x0a, 0x05, 0x50, 0x72, 0x6f, 0x6f, 0x66, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0c, 0x52, 0x05, 0x50, 0x72, 0x6f, 0x6f, 0x66, 0x12, 0x20, 0x0a, 0x0b, 0x50, 0x72, + 0x6f, 0x6f, 0x66, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, + 0x0b, 0x50, 0x72, 0x6f, 0x6f, 0x66, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x16, 0x0a, 0x06, + 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x06, 0x4e, 0x75, + 0x6d, 0x62, 0x65, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, + 0x28, 0x04, 0x52, 0x04, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x43, 0x6f, 0x69, 0x6e, + 0x62, 0x61, 0x73, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x08, 0x43, 0x6f, 0x69, 0x6e, + 0x62, 0x61, 0x73, 0x65, 0x12, 0x48, 0x0a, 0x12, 0x43, 0x72, 0x6f, 0x73, 0x73, 0x43, 0x68, 0x61, + 0x69, 0x6e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x18, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x43, 0x72, 0x6f, + 0x73, 0x73, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x4d, 0x73, 0x67, 0x52, 0x12, 0x43, 0x72, 0x6f, 0x73, + 0x73, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x12, 0x0c, + 0x0a, 0x01, 0x52, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x01, 0x52, 0x12, 0x0c, 0x0a, 0x01, + 0x53, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x01, 0x53, 0x12, 0x26, 0x0a, 0x0e, 0x4c, 0x61, + 0x73, 0x74, 0x42, 0x61, 0x74, 0x63, 0x68, 0x53, 0x65, 0x71, 0x4e, 0x6f, 0x18, 0x0a, 0x20, 0x01, + 0x28, 0x04, 0x52, 0x0e, 0x4c, 0x61, 0x73, 0x74, 0x42, 0x61, 0x74, 0x63, 0x68, 0x53, 0x65, 0x71, + 0x4e, 0x6f, 0x22, 0xa9, 0x01, 0x0a, 0x11, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x4d, 0x73, 0x67, 0x12, 0x16, 0x0a, 0x06, 0x53, 0x65, 0x63, 0x72, + 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, + 0x12, 0x20, 0x0a, 0x0b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x65, 0x72, 0x49, 0x44, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x65, 0x72, + 0x49, 0x44, 0x12, 0x20, 0x0a, 0x0b, 0x48, 0x6f, 0x73, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, + 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x48, 0x6f, 0x73, 0x74, 0x41, 0x64, 0x64, + 0x72, 0x65, 0x73, 0x73, 0x12, 0x38, 0x0a, 0x0b, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x45, 0x72, + 0x72, 0x6f, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x67, 0x65, 0x6e, 0x65, + 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x45, 0x72, 0x72, 0x6f, + 0x72, 0x52, 0x0b, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x22, 0x61, + 0x0a, 0x0d, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x61, 0x6c, 0x4d, 0x73, 0x67, 0x12, + 0x16, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, + 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x72, 0x65, 0x63, 0x69, 0x70, + 0x69, 0x65, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x72, 0x65, 0x63, 0x69, + 0x70, 0x69, 0x65, 0x6e, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, + 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x08, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, + 0x74, 0x32, 0xaf, 0x13, 0x0a, 0x0c, 0x45, 0x6e, 0x63, 0x6c, 0x61, 0x76, 0x65, 0x50, 0x72, 0x6f, + 0x74, 0x6f, 0x12, 0x3f, 0x0a, 0x06, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x18, 0x2e, 0x67, + 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, + 0x65, 0x64, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0x00, 0x12, 0x4e, 0x0a, 0x0b, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x12, 0x1d, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x41, + 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x1e, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x41, 0x74, + 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0x00, 0x12, 0x57, 0x0a, 0x0e, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x53, + 0x65, 0x63, 0x72, 0x65, 0x74, 0x12, 0x20, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, + 0x64, 0x2e, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, + 0x74, 0x65, 0x64, 0x2e, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x53, 0x65, 0x63, 0x72, + 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x4e, 0x0a, 0x0b, + 0x49, 0x6e, 0x69, 0x74, 0x45, 0x6e, 0x63, 0x6c, 0x61, 0x76, 0x65, 0x12, 0x1d, 0x2e, 0x67, 0x65, + 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x49, 0x6e, 0x69, 0x74, 0x45, 0x6e, 0x63, 0x6c, + 0x61, 0x76, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x67, 0x65, 0x6e, + 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x49, 0x6e, 0x69, 0x74, 0x45, 0x6e, 0x63, 0x6c, 0x61, + 0x76, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x50, 0x0a, 0x0d, + 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x4c, 0x31, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x1d, 0x2e, + 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, + 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x67, + 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x42, + 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x45, + 0x0a, 0x08, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x54, 0x78, 0x12, 0x1a, 0x2e, 0x67, 0x65, 0x6e, + 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x54, 0x78, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, + 0x65, 0x64, 0x2e, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x54, 0x78, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x4e, 0x0a, 0x0b, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x42, + 0x61, 0x74, 0x63, 0x68, 0x12, 0x1d, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, + 0x2e, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x42, 0x61, 0x74, 0x63, 0x68, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, + 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x42, 0x61, 0x74, 0x63, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x42, 0x0a, 0x07, 0x4f, 0x62, 0x73, 0x43, 0x61, 0x6c, 0x6c, + 0x12, 0x19, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x4f, 0x62, 0x73, + 0x43, 0x61, 0x6c, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x67, 0x65, + 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x4f, 0x62, 0x73, 0x43, 0x61, 0x6c, 0x6c, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x66, 0x0a, 0x13, 0x47, 0x65, 0x74, + 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x75, 0x6e, 0x74, + 0x12, 0x25, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x47, 0x65, 0x74, + 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x75, 0x6e, 0x74, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, + 0x74, 0x65, 0x64, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x00, 0x12, 0x39, 0x0a, 0x04, 0x53, 0x74, 0x6f, 0x70, 0x12, 0x16, 0x2e, 0x67, 0x65, 0x6e, 0x65, + 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x53, 0x74, 0x6f, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x17, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x53, 0x74, + 0x6f, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x57, 0x0a, 0x0e, + 0x47, 0x65, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x20, + 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x72, + 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x21, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x47, 0x65, 0x74, + 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x6c, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x54, 0x72, 0x61, 0x6e, + 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x63, 0x65, 0x69, 0x70, 0x74, 0x12, 0x27, + 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x72, + 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x63, 0x65, 0x69, 0x70, 0x74, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, + 0x74, 0x65, 0x64, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x52, 0x65, 0x63, 0x65, 0x69, 0x70, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0x00, 0x12, 0x4b, 0x0a, 0x0a, 0x47, 0x65, 0x74, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, + 0x65, 0x12, 0x1c, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x47, 0x65, + 0x74, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x1d, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x47, 0x65, 0x74, 0x42, + 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, + 0x12, 0x42, 0x0a, 0x07, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x19, 0x2e, 0x67, 0x65, + 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, + 0x65, 0x64, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x00, 0x12, 0x48, 0x0a, 0x09, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, + 0x65, 0x12, 0x1b, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x53, 0x75, + 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, + 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x53, 0x75, 0x62, 0x73, 0x63, + 0x72, 0x69, 0x62, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x4e, + 0x0a, 0x0b, 0x55, 0x6e, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x12, 0x1d, 0x2e, + 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x55, 0x6e, 0x73, 0x75, 0x62, 0x73, + 0x63, 0x72, 0x69, 0x62, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x67, + 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x55, 0x6e, 0x73, 0x75, 0x62, 0x73, 0x63, + 0x72, 0x69, 0x62, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x4e, + 0x0a, 0x0b, 0x45, 0x73, 0x74, 0x69, 0x6d, 0x61, 0x74, 0x65, 0x47, 0x61, 0x73, 0x12, 0x1d, 0x2e, + 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x45, 0x73, 0x74, 0x69, 0x6d, 0x61, + 0x74, 0x65, 0x47, 0x61, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x67, + 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x45, 0x73, 0x74, 0x69, 0x6d, 0x61, 0x74, + 0x65, 0x47, 0x61, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x42, + 0x0a, 0x07, 0x47, 0x65, 0x74, 0x4c, 0x6f, 0x67, 0x73, 0x12, 0x19, 0x2e, 0x67, 0x65, 0x6e, 0x65, + 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x47, 0x65, 0x74, 0x4c, 0x6f, 0x67, 0x73, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, + 0x2e, 0x47, 0x65, 0x74, 0x4c, 0x6f, 0x67, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x00, 0x12, 0x45, 0x0a, 0x0b, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, + 0x6b, 0x12, 0x14, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x45, 0x6d, + 0x70, 0x74, 0x79, 0x41, 0x72, 0x67, 0x73, 0x1a, 0x1e, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, + 0x74, 0x65, 0x64, 0x2e, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x45, 0x0a, 0x08, 0x47, 0x65, 0x74, + 0x42, 0x61, 0x74, 0x63, 0x68, 0x12, 0x1a, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, + 0x64, 0x2e, 0x47, 0x65, 0x74, 0x42, 0x61, 0x74, 0x63, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x1b, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x47, 0x65, + 0x74, 0x42, 0x61, 0x74, 0x63, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, + 0x12, 0x53, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x42, 0x61, 0x74, 0x63, 0x68, 0x42, 0x79, 0x53, 0x65, + 0x71, 0x4e, 0x6f, 0x12, 0x21, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, + 0x47, 0x65, 0x74, 0x42, 0x61, 0x74, 0x63, 0x68, 0x42, 0x79, 0x53, 0x65, 0x71, 0x4e, 0x6f, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, + 0x65, 0x64, 0x2e, 0x47, 0x65, 0x74, 0x42, 0x61, 0x74, 0x63, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x4e, 0x0a, 0x0b, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x42, + 0x61, 0x74, 0x63, 0x68, 0x12, 0x1d, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, + 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x42, 0x61, 0x74, 0x63, 0x68, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, + 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x42, 0x61, 0x74, 0x63, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x51, 0x0a, 0x0c, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, + 0x6f, 0x6c, 0x6c, 0x75, 0x70, 0x12, 0x1e, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, + 0x64, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x6f, 0x6c, 0x6c, 0x75, 0x70, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, + 0x64, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x6f, 0x6c, 0x6c, 0x75, 0x70, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x6c, 0x0a, 0x15, 0x44, 0x65, 0x62, 0x75, + 0x67, 0x54, 0x72, 0x61, 0x63, 0x65, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x12, 0x27, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x44, 0x65, + 0x62, 0x75, 0x67, 0x54, 0x72, 0x61, 0x63, 0x65, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x67, 0x65, 0x6e, + 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x44, 0x65, 0x62, 0x75, 0x67, 0x54, 0x72, 0x61, 0x63, + 0x65, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x5a, 0x0a, 0x0f, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, + 0x4c, 0x32, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x73, 0x12, 0x21, 0x2e, 0x67, 0x65, 0x6e, 0x65, + 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x4c, 0x32, 0x55, 0x70, + 0x64, 0x61, 0x74, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x67, + 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x45, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x64, + 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, + 0x30, 0x01, 0x12, 0x6f, 0x0a, 0x16, 0x44, 0x65, 0x62, 0x75, 0x67, 0x45, 0x76, 0x65, 0x6e, 0x74, + 0x4c, 0x6f, 0x67, 0x52, 0x65, 0x6c, 0x65, 0x76, 0x61, 0x6e, 0x63, 0x79, 0x12, 0x28, 0x2e, 0x67, + 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x44, 0x65, 0x62, 0x75, 0x67, 0x45, 0x76, + 0x65, 0x6e, 0x74, 0x4c, 0x6f, 0x67, 0x52, 0x65, 0x6c, 0x65, 0x76, 0x61, 0x6e, 0x63, 0x79, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, + 0x65, 0x64, 0x2e, 0x44, 0x65, 0x62, 0x75, 0x67, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x4c, 0x6f, 0x67, + 0x52, 0x65, 0x6c, 0x65, 0x76, 0x61, 0x6e, 0x63, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0x00, 0x12, 0x6c, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x43, + 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x27, 0x2e, 0x67, + 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x6f, 0x74, 0x61, + 0x6c, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, + 0x64, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x61, + 0x63, 0x74, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x00, 0x12, 0x69, 0x0a, 0x14, 0x47, 0x65, 0x74, 0x52, 0x65, 0x63, 0x65, 0x69, 0x70, 0x74, 0x73, + 0x42, 0x79, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x26, 0x2e, 0x67, 0x65, 0x6e, 0x65, + 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x65, 0x63, 0x65, 0x69, 0x70, 0x74, + 0x73, 0x42, 0x79, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x27, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x47, 0x65, + 0x74, 0x52, 0x65, 0x63, 0x65, 0x69, 0x70, 0x74, 0x73, 0x42, 0x79, 0x41, 0x64, 0x64, 0x72, 0x65, + 0x73, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x75, 0x0a, 0x18, + 0x47, 0x65, 0x74, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x61, 0x74, 0x61, 0x12, 0x2a, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, + 0x61, 0x74, 0x65, 0x64, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x54, 0x72, + 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x61, 0x74, 0x61, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2b, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, - 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x61, 0x74, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x2b, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x47, 0x65, 0x74, - 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, - 0x6e, 0x44, 0x61, 0x74, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, - 0x17, 0x5a, 0x15, 0x65, 0x6e, 0x63, 0x6c, 0x61, 0x76, 0x65, 0x2f, 0x72, 0x70, 0x63, 0x2f, 0x67, - 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x61, 0x74, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0x00, 0x42, 0x17, 0x5a, 0x15, 0x65, 0x6e, 0x63, 0x6c, 0x61, 0x76, 0x65, 0x2f, 0x72, + 0x70, 0x63, 0x2f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x62, 0x06, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/go/common/rpc/generated/enclave.proto b/go/common/rpc/generated/enclave.proto index 6ec88bab49..bf15657ba6 100644 --- a/go/common/rpc/generated/enclave.proto +++ b/go/common/rpc/generated/enclave.proto @@ -386,6 +386,7 @@ message BatchHeaderMsg { bytes LatestInboundCrossChainHeight = 15; bytes LatestInboundCrossChainHash = 16; repeated CrossChainMsg CrossChainMessages = 17; + bytes TransferTree = 18; } message ExtRollupMsg { From 09ccd222c824a533e3c3afce2987e579a7e9f052 Mon Sep 17 00:00:00 2001 From: StefanIliev545 Date: Sat, 19 Aug 2023 02:01:02 +0200 Subject: [PATCH 10/47] Revert "removed TransferTree." This reverts commit ecc84bf1a5d0908faea27a4fde7cb534b9747420. --- go/common/headers.go | 1 + go/common/rpc/converters.go | 4 ++-- go/enclave/components/batch_executor.go | 12 ++++++------ 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/go/common/headers.go b/go/common/headers.go index 3f8ecc600c..090efc6cde 100644 --- a/go/common/headers.go +++ b/go/common/headers.go @@ -40,6 +40,7 @@ type BatchHeader struct { CrossChainMessages []MessageBus.StructsCrossChainMessage `json:"crossChainMessages"` LatestInboundCrossChainHash common.Hash `json:"inboundCrossChainHash"` // The block hash of the latest block that has been scanned for cross chain messages. LatestInboundCrossChainHeight *big.Int `json:"inboundCrossChainHeight"` // The block height of the latest block that has been scanned for cross chain messages. + TransfersTree common.Hash `json:"transfersTree"` } // MarshalJSON custom marshals the BatchHeader into a json diff --git a/go/common/rpc/converters.go b/go/common/rpc/converters.go index a0039e5e45..1e9e40118f 100644 --- a/go/common/rpc/converters.go +++ b/go/common/rpc/converters.go @@ -9,7 +9,6 @@ import ( "github.com/obscuronet/go-obscuro/go/common/rpc/generated" gethcommon "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/core/types" ) // Functions to convert classes that need to be sent between the host and the enclave to and from their equivalent @@ -145,7 +144,7 @@ func ToBatchHeaderMsg(header *common.BatchHeader) *generated.BatchHeaderMsg { GasUsed: header.GasUsed, Time: header.Time, BaseFee: baseFee, - TransferTree: types.EmptyRootHash.Bytes(), + TransferTree: header.TransfersTree.Bytes(), CrossChainMessages: ToCrossChainMsgs(header.CrossChainMessages), LatestInboundCrossChainHash: header.LatestInboundCrossChainHash.Bytes(), } @@ -198,6 +197,7 @@ func FromBatchHeaderMsg(header *generated.BatchHeaderMsg) *common.BatchHeader { GasLimit: header.GasLimit, GasUsed: header.GasUsed, Time: header.Time, + TransfersTree: gethcommon.BytesToHash(header.TransferTree), BaseFee: big.NewInt(int64(header.BaseFee)), CrossChainMessages: FromCrossChainMsgs(header.CrossChainMessages), LatestInboundCrossChainHash: gethcommon.BytesToHash(header.LatestInboundCrossChainHash), diff --git a/go/enclave/components/batch_executor.go b/go/enclave/components/batch_executor.go index f9f634151f..7a2ea3778c 100644 --- a/go/enclave/components/batch_executor.go +++ b/go/enclave/components/batch_executor.go @@ -81,12 +81,11 @@ func (bp *batchExecutor) payL1Fees(stateDB *state.StateDB, context *BatchExecuti isFreeTransaction = isFreeTransaction && tx.GasPrice().Cmp(gethcommon.Big0) == 0 if !isFreeTransaction { - if accBalance.Cmp(cost) == -1 { - bp.logger.Info("insufficient account balance for tx", log.TxKey, tx.Hash(), "addr", sender.Hex()) - continue + if accBalance.Cmp(cost) != -1 { + // bp.logger.Info("insufficient account balance for tx", log.TxKey, tx.Hash(), "addr", sender.Hex()) + stateDB.SubBalance(*sender, cost) + stateDB.AddBalance(context.Creator, cost) } - stateDB.SubBalance(*sender, cost) - stateDB.AddBalance(context.Creator, cost) } transactions = append(transactions, tx) } @@ -240,6 +239,7 @@ func (executor *batchExecutor) CreateGenesisState(blkHash common.L1BlockHash, ti Number: big.NewInt(int64(0)), SequencerOrderNo: big.NewInt(int64(common.L2GenesisSeqNo)), // genesis batch has seq number 1 ReceiptHash: types.EmptyRootHash, + TransfersTree: types.EmptyRootHash, Time: timeNow, }, Transactions: []*common.L2Tx{}, @@ -273,7 +273,7 @@ func (executor *batchExecutor) populateOutboundCrossChainData(batch *core.Batch, transfersHash := types.DeriveSha(ValueTransfers(valueTransferMessages), &trie.StackTrie{}) */ batch.Header.CrossChainMessages = crossChainMessages - //batch.Header.TransfersTree = types.EmptyRootHash + batch.Header.TransfersTree = types.EmptyRootHash executor.logger.Trace(fmt.Sprintf("Added %d cross chain messages to batch.", len(batch.Header.CrossChainMessages)), log.CmpKey, log.CrossChainCmp) From d987dd5ab27f1f08784dcc3cef68bb40223fa9eb Mon Sep 17 00:00:00 2001 From: StefanIliev545 Date: Sat, 19 Aug 2023 02:02:16 +0200 Subject: [PATCH 11/47] Adding back removed line. --- go/enclave/components/batch_executor.go | 1 + 1 file changed, 1 insertion(+) diff --git a/go/enclave/components/batch_executor.go b/go/enclave/components/batch_executor.go index 7a2ea3778c..4f70005cc9 100644 --- a/go/enclave/components/batch_executor.go +++ b/go/enclave/components/batch_executor.go @@ -157,6 +157,7 @@ func (executor *batchExecutor) ComputeBatch(context *BatchExecutionContext) (*Co // we need to copy the batch to reset the internal hash cache copyBatch := *batch + copyBatch.Header.Root = stateDB.IntermediateRoot(false) copyBatch.Transactions = successfulTxs copyBatch.ResetHash() From ec0d4da0e831ddc7bcce7bc871c34e9902b65627 Mon Sep 17 00:00:00 2001 From: StefanIliev545 Date: Sat, 19 Aug 2023 02:18:24 +0200 Subject: [PATCH 12/47] Working state. Gas not payed due to creator differences. --- go/enclave/components/batch_executor.go | 13 ++++++------- go/enclave/gas/oracle.go | 7 +++++-- integration/simulation/simulation_tester.go | 1 + integration/simulation/transaction_injector.go | 16 ++++++++++++---- 4 files changed, 24 insertions(+), 13 deletions(-) diff --git a/go/enclave/components/batch_executor.go b/go/enclave/components/batch_executor.go index 4f70005cc9..b15f092750 100644 --- a/go/enclave/components/batch_executor.go +++ b/go/enclave/components/batch_executor.go @@ -60,8 +60,6 @@ func NewBatchExecutor( } func (bp *batchExecutor) payL1Fees(stateDB *state.StateDB, context *BatchExecutionContext) (common.L2Transactions, error) { - return context.Transactions, nil - transactions := make(common.L2Transactions, 0) for _, tx := range context.Transactions { @@ -81,11 +79,12 @@ func (bp *batchExecutor) payL1Fees(stateDB *state.StateDB, context *BatchExecuti isFreeTransaction = isFreeTransaction && tx.GasPrice().Cmp(gethcommon.Big0) == 0 if !isFreeTransaction { - if accBalance.Cmp(cost) != -1 { - // bp.logger.Info("insufficient account balance for tx", log.TxKey, tx.Hash(), "addr", sender.Hex()) - stateDB.SubBalance(*sender, cost) - stateDB.AddBalance(context.Creator, cost) + if accBalance.Cmp(cost) == -1 { + bp.logger.Info("insufficient account balance for tx", log.TxKey, tx.Hash(), "addr", sender.Hex()) + continue } + stateDB.SubBalance(*sender, cost) + stateDB.AddBalance(context.Creator, cost) } transactions = append(transactions, tx) } @@ -139,7 +138,7 @@ func (executor *batchExecutor) ComputeBatch(context *BatchExecutionContext) (*Co crossChainTransactions := executor.crossChainProcessors.Local.CreateSyntheticTransactions(messages, stateDB) executor.crossChainProcessors.Local.ExecuteValueTransfers(transfers, stateDB) - // transactionsToProcess, _ := bp.payL1Fees(stateDB, context) + // transactionsToProcess, _ := executor.payL1Fees(stateDB, context) successfulTxs, txReceipts, err := executor.processTransactions(batch, 0, context.Transactions, stateDB, context.ChainConfig) if err != nil { diff --git a/go/enclave/gas/oracle.go b/go/enclave/gas/oracle.go index 00500a3ba4..1fbab2e3b4 100644 --- a/go/enclave/gas/oracle.go +++ b/go/enclave/gas/oracle.go @@ -18,12 +18,15 @@ type oracle struct { func NewGasOracle() Oracle { return &oracle{ - baseFee: big.NewInt(0), + baseFee: big.NewInt(1), } } func (o *oracle) ProcessL1Block(block *types.Block) { - o.baseFee = block.BaseFee() + blockBaseFee := block.BaseFee() + if blockBaseFee != nil { + o.baseFee = blockBaseFee + } } func (o *oracle) GetGasCostForTx(tx *types.Transaction) (*big.Int, error) { diff --git a/integration/simulation/simulation_tester.go b/integration/simulation/simulation_tester.go index 6421ab8453..7179e24477 100644 --- a/integration/simulation/simulation_tester.go +++ b/integration/simulation/simulation_tester.go @@ -51,6 +51,7 @@ func testSimulation(t *testing.T, netw network.Network, params *params.SimParams params.MgmtContractLib, params.ERC20ContractLib, 0, + params, ) simulation := Simulation{ diff --git a/integration/simulation/transaction_injector.go b/integration/simulation/transaction_injector.go index ddcb67e91d..cb9a074b7b 100644 --- a/integration/simulation/transaction_injector.go +++ b/integration/simulation/transaction_injector.go @@ -72,6 +72,8 @@ type TransactionInjector struct { // context for the transaction injector so in-flight requests can be cancelled gracefully ctx context.Context + params *params.SimParams + logger gethlog.Logger } @@ -85,6 +87,7 @@ func NewTransactionInjector( mgmtContractLib mgmtcontractlib.MgmtContractLib, erc20ContractLib erc20contractlib.ERC20ContractLib, txsToIssue int, + params *params.SimParams, ) *TransactionInjector { interrupt := int32(0) @@ -108,6 +111,7 @@ func NewTransactionInjector( TxTracker: newCounter(), enclavePublicKey: enclavePublicKeyEcies, txsToIssue: txsToIssue, + params: params, ctx: context.Background(), // for now we create a new context here, should allow it to be passed in logger: testlog.Logger().New(log.CmpKey, log.TxInjectCmp), } @@ -128,10 +132,14 @@ func (ti *TransactionInjector) Start() { return nil }) - wg.Go(func() error { - ti.bridgeRandomGasTransfers() - return nil - }) + // in mem sim does not support the contract libraries required + // to do complex bridge transactions + if !ti.params.IsInMem { + wg.Go(func() error { + ti.bridgeRandomGasTransfers() + return nil + }) + } wg.Go(func() error { ti.issueRandomTransfers() From 9b3a3b791de482ecf453c991e9d58e5cde4b62da Mon Sep 17 00:00:00 2001 From: StefanIliev545 Date: Mon, 28 Aug 2023 23:41:31 +0300 Subject: [PATCH 13/47] Working version. --- go/common/gethencoding/geth_encoding.go | 11 +- go/common/headers.go | 27 +- go/common/rpc/converters.go | 2 + go/common/rpc/generated/enclave.pb.go | 417 ++++++++++++------------ go/common/rpc/generated/enclave.proto | 1 + go/config/enclave_config.go | 5 + go/enclave/components/batch_executor.go | 43 ++- go/enclave/components/interfaces.go | 1 + go/enclave/container/cli.go | 4 + go/enclave/core/batch.go | 10 +- go/enclave/enclave.go | 6 +- go/enclave/nodetype/sequencer.go | 9 +- go/enclave/nodetype/validator.go | 5 +- 13 files changed, 297 insertions(+), 244 deletions(-) diff --git a/go/common/gethencoding/geth_encoding.go b/go/common/gethencoding/geth_encoding.go index 97ec4c0389..80f0d03e57 100644 --- a/go/common/gethencoding/geth_encoding.go +++ b/go/common/gethencoding/geth_encoding.go @@ -219,6 +219,11 @@ func CreateEthHeaderForBatch(h *common.BatchHeader, secret []byte) (*types.Heade // deterministically calculate private randomness that will be exposed to the evm randomness := crypto.CalculateRootBatchEntropy(secret, h.Number) + baseFee := big.NewInt(0) + if h.BaseFee != nil { + baseFee = baseFee.Set(h.BaseFee) + } + return &types.Header{ ParentHash: h.ParentHash, Root: h.Root, @@ -226,9 +231,9 @@ func CreateEthHeaderForBatch(h *common.BatchHeader, secret []byte) (*types.Heade ReceiptHash: h.ReceiptHash, Difficulty: big.NewInt(0), Number: h.Number, - GasLimit: 1_000_000_000, // todo (@stefan) - gas - GasUsed: 0, // todo (@stefan) - gas - BaseFee: gethcommon.Big0, // todo (@stefan) - gas + GasLimit: 1_000_000_000, + GasUsed: 0, + BaseFee: baseFee, Time: h.Time, MixDigest: randomness, Nonce: types.BlockNonce{}, diff --git a/go/common/headers.go b/go/common/headers.go index 090efc6cde..bd1f9d09dc 100644 --- a/go/common/headers.go +++ b/go/common/headers.go @@ -22,17 +22,18 @@ var hasherPool = sync.Pool{ // BatchHeader is a public / plaintext struct that holds common properties of batches. // Making changes to this struct will require GRPC + GRPC Converters regen type BatchHeader struct { - ParentHash L2BatchHash `json:"parentHash"` - Root StateRoot `json:"stateRoot"` - TxHash common.Hash `json:"transactionsRoot"` - ReceiptHash common.Hash `json:"receiptsRoot"` - Number *big.Int `json:"number"` // height of the batch - SequencerOrderNo *big.Int `json:"sequencerOrderNo"` // multiple batches can be created with the same height in case of L1 reorgs. The sequencer is responsible for including all of them in the rollups. - GasLimit uint64 `json:"gasLimit"` - GasUsed uint64 `json:"gasUsed"` - Time uint64 `json:"timestamp"` - Extra []byte `json:"extraData"` - BaseFee *big.Int `json:"baseFee"` + ParentHash L2BatchHash `json:"parentHash"` + Root StateRoot `json:"stateRoot"` + TxHash common.Hash `json:"transactionsRoot"` + ReceiptHash common.Hash `json:"receiptsRoot"` + Number *big.Int `json:"number"` // height of the batch + SequencerOrderNo *big.Int `json:"sequencerOrderNo"` // multiple batches can be created with the same height in case of L1 reorgs. The sequencer is responsible for including all of them in the rollups. + GasLimit uint64 `json:"gasLimit"` + GasUsed uint64 `json:"gasUsed"` + Time uint64 `json:"timestamp"` + Extra []byte `json:"extraData"` + BaseFee *big.Int `json:"baseFee"` + Coinbase common.Address `json:"coinbase"` // The custom Obscuro fields. L1Proof L1BlockHash `json:"l1Proof"` // the L1 block used by the enclave to generate the current batch @@ -61,11 +62,11 @@ func (b *BatchHeader) MarshalJSON() ([]byte, error) { (*Alias)(b), b.Hash(), nil, + &b.Coinbase, nil, nil, nil, - nil, - nil, + b.BaseFee, }) } diff --git a/go/common/rpc/converters.go b/go/common/rpc/converters.go index 1e9e40118f..8e54c42ffb 100644 --- a/go/common/rpc/converters.go +++ b/go/common/rpc/converters.go @@ -145,6 +145,7 @@ func ToBatchHeaderMsg(header *common.BatchHeader) *generated.BatchHeaderMsg { Time: header.Time, BaseFee: baseFee, TransferTree: header.TransfersTree.Bytes(), + Coinbase: header.Coinbase.Bytes(), CrossChainMessages: ToCrossChainMsgs(header.CrossChainMessages), LatestInboundCrossChainHash: header.LatestInboundCrossChainHash.Bytes(), } @@ -199,6 +200,7 @@ func FromBatchHeaderMsg(header *generated.BatchHeaderMsg) *common.BatchHeader { Time: header.Time, TransfersTree: gethcommon.BytesToHash(header.TransferTree), BaseFee: big.NewInt(int64(header.BaseFee)), + Coinbase: gethcommon.BytesToAddress(header.Coinbase), CrossChainMessages: FromCrossChainMsgs(header.CrossChainMessages), LatestInboundCrossChainHash: gethcommon.BytesToHash(header.LatestInboundCrossChainHash), LatestInboundCrossChainHeight: big.NewInt(0).SetBytes(header.LatestInboundCrossChainHeight), diff --git a/go/common/rpc/generated/enclave.pb.go b/go/common/rpc/generated/enclave.pb.go index f5d333ca23..9bc1570503 100644 --- a/go/common/rpc/generated/enclave.pb.go +++ b/go/common/rpc/generated/enclave.pb.go @@ -3409,6 +3409,7 @@ type BatchHeaderMsg struct { LatestInboundCrossChainHash []byte `protobuf:"bytes,16,opt,name=LatestInboundCrossChainHash,proto3" json:"LatestInboundCrossChainHash,omitempty"` CrossChainMessages []*CrossChainMsg `protobuf:"bytes,17,rep,name=CrossChainMessages,proto3" json:"CrossChainMessages,omitempty"` TransferTree []byte `protobuf:"bytes,18,opt,name=TransferTree,proto3" json:"TransferTree,omitempty"` + Coinbase []byte `protobuf:"bytes,19,opt,name=Coinbase,proto3" json:"Coinbase,omitempty"` } func (x *BatchHeaderMsg) Reset() { @@ -3569,6 +3570,13 @@ func (x *BatchHeaderMsg) GetTransferTree() []byte { return nil } +func (x *BatchHeaderMsg) GetCoinbase() []byte { + if x != nil { + return x.Coinbase + } + return nil +} + type ExtRollupMsg struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -4260,7 +4268,7 @@ var file_enclave_proto_rawDesc = []byte{ 0x72, 0x4d, 0x73, 0x67, 0x52, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x1a, 0x0a, 0x08, 0x74, 0x78, 0x48, 0x61, 0x73, 0x68, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x08, 0x74, 0x78, 0x48, 0x61, 0x73, 0x68, 0x65, 0x73, 0x12, 0x10, 0x0a, 0x03, 0x74, 0x78, 0x73, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x03, 0x74, 0x78, 0x73, 0x22, 0xe4, 0x04, 0x0a, 0x0e, 0x42, + 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x03, 0x74, 0x78, 0x73, 0x22, 0x80, 0x05, 0x0a, 0x0e, 0x42, 0x61, 0x74, 0x63, 0x68, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x4d, 0x73, 0x67, 0x12, 0x1e, 0x0a, 0x0a, 0x50, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x48, 0x61, 0x73, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0a, 0x50, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x48, 0x61, 0x73, 0x68, 0x12, 0x14, 0x0a, @@ -4299,210 +4307,211 @@ var file_enclave_proto_rawDesc = []byte{ 0x43, 0x68, 0x61, 0x69, 0x6e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x12, 0x22, 0x0a, 0x0c, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x54, 0x72, 0x65, 0x65, 0x18, 0x12, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0c, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x54, 0x72, 0x65, - 0x65, 0x22, 0x8c, 0x01, 0x0a, 0x0c, 0x45, 0x78, 0x74, 0x52, 0x6f, 0x6c, 0x6c, 0x75, 0x70, 0x4d, - 0x73, 0x67, 0x12, 0x32, 0x0a, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x52, - 0x6f, 0x6c, 0x6c, 0x75, 0x70, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x4d, 0x73, 0x67, 0x52, 0x06, - 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x24, 0x0a, 0x0d, 0x62, 0x61, 0x74, 0x63, 0x68, 0x50, - 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0d, 0x62, - 0x61, 0x74, 0x63, 0x68, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x73, 0x12, 0x22, 0x0a, 0x0c, - 0x62, 0x61, 0x74, 0x63, 0x68, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x0c, 0x52, 0x0c, 0x62, 0x61, 0x74, 0x63, 0x68, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, - 0x22, 0xbf, 0x02, 0x0a, 0x0f, 0x52, 0x6f, 0x6c, 0x6c, 0x75, 0x70, 0x48, 0x65, 0x61, 0x64, 0x65, - 0x72, 0x4d, 0x73, 0x67, 0x12, 0x1e, 0x0a, 0x0a, 0x50, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x48, 0x61, - 0x73, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0a, 0x50, 0x61, 0x72, 0x65, 0x6e, 0x74, - 0x48, 0x61, 0x73, 0x68, 0x12, 0x14, 0x0a, 0x05, 0x50, 0x72, 0x6f, 0x6f, 0x66, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x0c, 0x52, 0x05, 0x50, 0x72, 0x6f, 0x6f, 0x66, 0x12, 0x20, 0x0a, 0x0b, 0x50, 0x72, - 0x6f, 0x6f, 0x66, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, - 0x0b, 0x50, 0x72, 0x6f, 0x6f, 0x66, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x16, 0x0a, 0x06, - 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x06, 0x4e, 0x75, - 0x6d, 0x62, 0x65, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, - 0x28, 0x04, 0x52, 0x04, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x43, 0x6f, 0x69, 0x6e, - 0x62, 0x61, 0x73, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x08, 0x43, 0x6f, 0x69, 0x6e, - 0x62, 0x61, 0x73, 0x65, 0x12, 0x48, 0x0a, 0x12, 0x43, 0x72, 0x6f, 0x73, 0x73, 0x43, 0x68, 0x61, - 0x69, 0x6e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x18, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x43, 0x72, 0x6f, - 0x73, 0x73, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x4d, 0x73, 0x67, 0x52, 0x12, 0x43, 0x72, 0x6f, 0x73, - 0x73, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x12, 0x0c, - 0x0a, 0x01, 0x52, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x01, 0x52, 0x12, 0x0c, 0x0a, 0x01, - 0x53, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x01, 0x53, 0x12, 0x26, 0x0a, 0x0e, 0x4c, 0x61, - 0x73, 0x74, 0x42, 0x61, 0x74, 0x63, 0x68, 0x53, 0x65, 0x71, 0x4e, 0x6f, 0x18, 0x0a, 0x20, 0x01, - 0x28, 0x04, 0x52, 0x0e, 0x4c, 0x61, 0x73, 0x74, 0x42, 0x61, 0x74, 0x63, 0x68, 0x53, 0x65, 0x71, - 0x4e, 0x6f, 0x22, 0xa9, 0x01, 0x0a, 0x11, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x4d, 0x73, 0x67, 0x12, 0x16, 0x0a, 0x06, 0x53, 0x65, 0x63, 0x72, - 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, - 0x12, 0x20, 0x0a, 0x0b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x65, 0x72, 0x49, 0x44, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x65, 0x72, - 0x49, 0x44, 0x12, 0x20, 0x0a, 0x0b, 0x48, 0x6f, 0x73, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, - 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x48, 0x6f, 0x73, 0x74, 0x41, 0x64, 0x64, - 0x72, 0x65, 0x73, 0x73, 0x12, 0x38, 0x0a, 0x0b, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x45, 0x72, - 0x72, 0x6f, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x67, 0x65, 0x6e, 0x65, - 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x45, 0x72, 0x72, 0x6f, - 0x72, 0x52, 0x0b, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x22, 0x61, - 0x0a, 0x0d, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x61, 0x6c, 0x4d, 0x73, 0x67, 0x12, - 0x16, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, - 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x72, 0x65, 0x63, 0x69, 0x70, - 0x69, 0x65, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x72, 0x65, 0x63, 0x69, - 0x70, 0x69, 0x65, 0x6e, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, - 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x08, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, - 0x74, 0x32, 0xaf, 0x13, 0x0a, 0x0c, 0x45, 0x6e, 0x63, 0x6c, 0x61, 0x76, 0x65, 0x50, 0x72, 0x6f, - 0x74, 0x6f, 0x12, 0x3f, 0x0a, 0x06, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x18, 0x2e, 0x67, - 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, - 0x65, 0x64, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0x00, 0x12, 0x4e, 0x0a, 0x0b, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x12, 0x1d, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x41, - 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x1e, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x41, 0x74, - 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0x00, 0x12, 0x57, 0x0a, 0x0e, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x53, - 0x65, 0x63, 0x72, 0x65, 0x74, 0x12, 0x20, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, - 0x64, 0x2e, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, - 0x74, 0x65, 0x64, 0x2e, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x53, 0x65, 0x63, 0x72, - 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x4e, 0x0a, 0x0b, - 0x49, 0x6e, 0x69, 0x74, 0x45, 0x6e, 0x63, 0x6c, 0x61, 0x76, 0x65, 0x12, 0x1d, 0x2e, 0x67, 0x65, - 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x49, 0x6e, 0x69, 0x74, 0x45, 0x6e, 0x63, 0x6c, - 0x61, 0x76, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x67, 0x65, 0x6e, - 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x49, 0x6e, 0x69, 0x74, 0x45, 0x6e, 0x63, 0x6c, 0x61, - 0x76, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x50, 0x0a, 0x0d, - 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x4c, 0x31, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x1d, 0x2e, - 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, - 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x67, - 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x42, - 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x45, - 0x0a, 0x08, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x54, 0x78, 0x12, 0x1a, 0x2e, 0x67, 0x65, 0x6e, - 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x54, 0x78, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, - 0x65, 0x64, 0x2e, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x54, 0x78, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x4e, 0x0a, 0x0b, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x42, - 0x61, 0x74, 0x63, 0x68, 0x12, 0x1d, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, - 0x2e, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x42, 0x61, 0x74, 0x63, 0x68, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, - 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x42, 0x61, 0x74, 0x63, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x42, 0x0a, 0x07, 0x4f, 0x62, 0x73, 0x43, 0x61, 0x6c, 0x6c, - 0x12, 0x19, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x4f, 0x62, 0x73, - 0x43, 0x61, 0x6c, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x67, 0x65, - 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x4f, 0x62, 0x73, 0x43, 0x61, 0x6c, 0x6c, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x66, 0x0a, 0x13, 0x47, 0x65, 0x74, - 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x75, 0x6e, 0x74, - 0x12, 0x25, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x47, 0x65, 0x74, - 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x75, 0x6e, 0x74, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, - 0x74, 0x65, 0x64, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, - 0x6f, 0x6e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0x00, 0x12, 0x39, 0x0a, 0x04, 0x53, 0x74, 0x6f, 0x70, 0x12, 0x16, 0x2e, 0x67, 0x65, 0x6e, 0x65, - 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x53, 0x74, 0x6f, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x17, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x53, 0x74, - 0x6f, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x57, 0x0a, 0x0e, - 0x47, 0x65, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x20, - 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x72, - 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x21, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x47, 0x65, 0x74, - 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x6c, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x54, 0x72, 0x61, 0x6e, - 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x63, 0x65, 0x69, 0x70, 0x74, 0x12, 0x27, - 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x72, - 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x63, 0x65, 0x69, 0x70, 0x74, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, - 0x74, 0x65, 0x64, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, - 0x6f, 0x6e, 0x52, 0x65, 0x63, 0x65, 0x69, 0x70, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0x00, 0x12, 0x4b, 0x0a, 0x0a, 0x47, 0x65, 0x74, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, - 0x65, 0x12, 0x1c, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x47, 0x65, - 0x74, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x1d, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x47, 0x65, 0x74, 0x42, - 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, - 0x12, 0x42, 0x0a, 0x07, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x19, 0x2e, 0x67, 0x65, - 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, - 0x65, 0x64, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x22, 0x00, 0x12, 0x48, 0x0a, 0x09, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, - 0x65, 0x12, 0x1b, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x53, 0x75, - 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, - 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x53, 0x75, 0x62, 0x73, 0x63, - 0x72, 0x69, 0x62, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x4e, - 0x0a, 0x0b, 0x55, 0x6e, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x12, 0x1d, 0x2e, - 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x55, 0x6e, 0x73, 0x75, 0x62, 0x73, - 0x63, 0x72, 0x69, 0x62, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x67, - 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x55, 0x6e, 0x73, 0x75, 0x62, 0x73, 0x63, - 0x72, 0x69, 0x62, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x4e, - 0x0a, 0x0b, 0x45, 0x73, 0x74, 0x69, 0x6d, 0x61, 0x74, 0x65, 0x47, 0x61, 0x73, 0x12, 0x1d, 0x2e, - 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x45, 0x73, 0x74, 0x69, 0x6d, 0x61, - 0x74, 0x65, 0x47, 0x61, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x67, - 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x45, 0x73, 0x74, 0x69, 0x6d, 0x61, 0x74, - 0x65, 0x47, 0x61, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x42, - 0x0a, 0x07, 0x47, 0x65, 0x74, 0x4c, 0x6f, 0x67, 0x73, 0x12, 0x19, 0x2e, 0x67, 0x65, 0x6e, 0x65, - 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x47, 0x65, 0x74, 0x4c, 0x6f, 0x67, 0x73, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, - 0x2e, 0x47, 0x65, 0x74, 0x4c, 0x6f, 0x67, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x22, 0x00, 0x12, 0x45, 0x0a, 0x0b, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, - 0x6b, 0x12, 0x14, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x45, 0x6d, - 0x70, 0x74, 0x79, 0x41, 0x72, 0x67, 0x73, 0x1a, 0x1e, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, - 0x74, 0x65, 0x64, 0x2e, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x45, 0x0a, 0x08, 0x47, 0x65, 0x74, - 0x42, 0x61, 0x74, 0x63, 0x68, 0x12, 0x1a, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, - 0x64, 0x2e, 0x47, 0x65, 0x74, 0x42, 0x61, 0x74, 0x63, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x1b, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x47, 0x65, - 0x74, 0x42, 0x61, 0x74, 0x63, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, - 0x12, 0x53, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x42, 0x61, 0x74, 0x63, 0x68, 0x42, 0x79, 0x53, 0x65, - 0x71, 0x4e, 0x6f, 0x12, 0x21, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, - 0x47, 0x65, 0x74, 0x42, 0x61, 0x74, 0x63, 0x68, 0x42, 0x79, 0x53, 0x65, 0x71, 0x4e, 0x6f, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, - 0x65, 0x64, 0x2e, 0x47, 0x65, 0x74, 0x42, 0x61, 0x74, 0x63, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x4e, 0x0a, 0x0b, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x42, - 0x61, 0x74, 0x63, 0x68, 0x12, 0x1d, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, - 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x42, 0x61, 0x74, 0x63, 0x68, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, - 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x42, 0x61, 0x74, 0x63, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x51, 0x0a, 0x0c, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, - 0x6f, 0x6c, 0x6c, 0x75, 0x70, 0x12, 0x1e, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, - 0x64, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x6f, 0x6c, 0x6c, 0x75, 0x70, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, - 0x64, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x6f, 0x6c, 0x6c, 0x75, 0x70, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x6c, 0x0a, 0x15, 0x44, 0x65, 0x62, 0x75, - 0x67, 0x54, 0x72, 0x61, 0x63, 0x65, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, - 0x6e, 0x12, 0x27, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x44, 0x65, - 0x62, 0x75, 0x67, 0x54, 0x72, 0x61, 0x63, 0x65, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, - 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x67, 0x65, 0x6e, - 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x44, 0x65, 0x62, 0x75, 0x67, 0x54, 0x72, 0x61, 0x63, - 0x65, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x5a, 0x0a, 0x0f, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, - 0x4c, 0x32, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x73, 0x12, 0x21, 0x2e, 0x67, 0x65, 0x6e, 0x65, - 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x4c, 0x32, 0x55, 0x70, - 0x64, 0x61, 0x74, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x67, - 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x45, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x64, - 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, - 0x30, 0x01, 0x12, 0x6f, 0x0a, 0x16, 0x44, 0x65, 0x62, 0x75, 0x67, 0x45, 0x76, 0x65, 0x6e, 0x74, - 0x4c, 0x6f, 0x67, 0x52, 0x65, 0x6c, 0x65, 0x76, 0x61, 0x6e, 0x63, 0x79, 0x12, 0x28, 0x2e, 0x67, - 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x44, 0x65, 0x62, 0x75, 0x67, 0x45, 0x76, - 0x65, 0x6e, 0x74, 0x4c, 0x6f, 0x67, 0x52, 0x65, 0x6c, 0x65, 0x76, 0x61, 0x6e, 0x63, 0x79, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, - 0x65, 0x64, 0x2e, 0x44, 0x65, 0x62, 0x75, 0x67, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x4c, 0x6f, 0x67, - 0x52, 0x65, 0x6c, 0x65, 0x76, 0x61, 0x6e, 0x63, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0x00, 0x12, 0x6c, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x43, - 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x27, 0x2e, 0x67, - 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x6f, 0x74, 0x61, - 0x6c, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, - 0x64, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x61, - 0x63, 0x74, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0x00, 0x12, 0x69, 0x0a, 0x14, 0x47, 0x65, 0x74, 0x52, 0x65, 0x63, 0x65, 0x69, 0x70, 0x74, 0x73, - 0x42, 0x79, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x26, 0x2e, 0x67, 0x65, 0x6e, 0x65, - 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x65, 0x63, 0x65, 0x69, 0x70, 0x74, - 0x73, 0x42, 0x79, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x27, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x47, 0x65, - 0x74, 0x52, 0x65, 0x63, 0x65, 0x69, 0x70, 0x74, 0x73, 0x42, 0x79, 0x41, 0x64, 0x64, 0x72, 0x65, - 0x73, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x75, 0x0a, 0x18, - 0x47, 0x65, 0x74, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, - 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x61, 0x74, 0x61, 0x12, 0x2a, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, - 0x61, 0x74, 0x65, 0x64, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x54, 0x72, - 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x61, 0x74, 0x61, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2b, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, + 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x43, 0x6f, 0x69, 0x6e, 0x62, 0x61, 0x73, 0x65, 0x18, 0x13, 0x20, + 0x01, 0x28, 0x0c, 0x52, 0x08, 0x43, 0x6f, 0x69, 0x6e, 0x62, 0x61, 0x73, 0x65, 0x22, 0x8c, 0x01, + 0x0a, 0x0c, 0x45, 0x78, 0x74, 0x52, 0x6f, 0x6c, 0x6c, 0x75, 0x70, 0x4d, 0x73, 0x67, 0x12, 0x32, + 0x0a, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, + 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x52, 0x6f, 0x6c, 0x6c, 0x75, + 0x70, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x4d, 0x73, 0x67, 0x52, 0x06, 0x68, 0x65, 0x61, 0x64, + 0x65, 0x72, 0x12, 0x24, 0x0a, 0x0d, 0x62, 0x61, 0x74, 0x63, 0x68, 0x50, 0x61, 0x79, 0x6c, 0x6f, + 0x61, 0x64, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0d, 0x62, 0x61, 0x74, 0x63, 0x68, + 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x73, 0x12, 0x22, 0x0a, 0x0c, 0x62, 0x61, 0x74, 0x63, + 0x68, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0c, + 0x62, 0x61, 0x74, 0x63, 0x68, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x22, 0xbf, 0x02, 0x0a, + 0x0f, 0x52, 0x6f, 0x6c, 0x6c, 0x75, 0x70, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x4d, 0x73, 0x67, + 0x12, 0x1e, 0x0a, 0x0a, 0x50, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x48, 0x61, 0x73, 0x68, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0a, 0x50, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x48, 0x61, 0x73, 0x68, + 0x12, 0x14, 0x0a, 0x05, 0x50, 0x72, 0x6f, 0x6f, 0x66, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, + 0x05, 0x50, 0x72, 0x6f, 0x6f, 0x66, 0x12, 0x20, 0x0a, 0x0b, 0x50, 0x72, 0x6f, 0x6f, 0x66, 0x4e, + 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, 0x50, 0x72, 0x6f, + 0x6f, 0x66, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x16, 0x0a, 0x06, 0x4e, 0x75, 0x6d, 0x62, + 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x06, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, + 0x12, 0x12, 0x0a, 0x04, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x04, 0x52, 0x04, + 0x54, 0x69, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x43, 0x6f, 0x69, 0x6e, 0x62, 0x61, 0x73, 0x65, + 0x18, 0x06, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x08, 0x43, 0x6f, 0x69, 0x6e, 0x62, 0x61, 0x73, 0x65, + 0x12, 0x48, 0x0a, 0x12, 0x43, 0x72, 0x6f, 0x73, 0x73, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x4d, 0x65, + 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x67, + 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x43, 0x72, 0x6f, 0x73, 0x73, 0x43, 0x68, + 0x61, 0x69, 0x6e, 0x4d, 0x73, 0x67, 0x52, 0x12, 0x43, 0x72, 0x6f, 0x73, 0x73, 0x43, 0x68, 0x61, + 0x69, 0x6e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x12, 0x0c, 0x0a, 0x01, 0x52, 0x18, + 0x08, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x01, 0x52, 0x12, 0x0c, 0x0a, 0x01, 0x53, 0x18, 0x09, 0x20, + 0x01, 0x28, 0x0c, 0x52, 0x01, 0x53, 0x12, 0x26, 0x0a, 0x0e, 0x4c, 0x61, 0x73, 0x74, 0x42, 0x61, + 0x74, 0x63, 0x68, 0x53, 0x65, 0x71, 0x4e, 0x6f, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0e, + 0x4c, 0x61, 0x73, 0x74, 0x42, 0x61, 0x74, 0x63, 0x68, 0x53, 0x65, 0x71, 0x4e, 0x6f, 0x22, 0xa9, + 0x01, 0x0a, 0x11, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x4d, 0x73, 0x67, 0x12, 0x16, 0x0a, 0x06, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x12, 0x20, 0x0a, 0x0b, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x65, 0x72, 0x49, 0x44, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0c, 0x52, 0x0b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x65, 0x72, 0x49, 0x44, 0x12, 0x20, + 0x0a, 0x0b, 0x48, 0x6f, 0x73, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0b, 0x48, 0x6f, 0x73, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, + 0x12, 0x38, 0x0a, 0x0b, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, + 0x64, 0x2e, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x0b, 0x73, + 0x79, 0x73, 0x74, 0x65, 0x6d, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x22, 0x61, 0x0a, 0x0d, 0x57, 0x69, + 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x61, 0x6c, 0x4d, 0x73, 0x67, 0x12, 0x16, 0x0a, 0x06, 0x61, + 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x61, 0x6d, 0x6f, + 0x75, 0x6e, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x72, 0x65, 0x63, 0x69, 0x70, 0x69, 0x65, 0x6e, 0x74, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x72, 0x65, 0x63, 0x69, 0x70, 0x69, 0x65, 0x6e, + 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x0c, 0x52, 0x08, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x32, 0xaf, 0x13, + 0x0a, 0x0c, 0x45, 0x6e, 0x63, 0x6c, 0x61, 0x76, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x3f, + 0x0a, 0x06, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x18, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, + 0x61, 0x74, 0x65, 0x64, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x53, + 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, + 0x4e, 0x0a, 0x0b, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1d, + 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x41, 0x74, 0x74, 0x65, 0x73, + 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, + 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, + 0x57, 0x0a, 0x0e, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x53, 0x65, 0x63, 0x72, 0x65, + 0x74, 0x12, 0x20, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x47, 0x65, + 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, + 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x4e, 0x0a, 0x0b, 0x49, 0x6e, 0x69, 0x74, + 0x45, 0x6e, 0x63, 0x6c, 0x61, 0x76, 0x65, 0x12, 0x1d, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, + 0x74, 0x65, 0x64, 0x2e, 0x49, 0x6e, 0x69, 0x74, 0x45, 0x6e, 0x63, 0x6c, 0x61, 0x76, 0x65, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, + 0x65, 0x64, 0x2e, 0x49, 0x6e, 0x69, 0x74, 0x45, 0x6e, 0x63, 0x6c, 0x61, 0x76, 0x65, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x50, 0x0a, 0x0d, 0x53, 0x75, 0x62, 0x6d, + 0x69, 0x74, 0x4c, 0x31, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x1d, 0x2e, 0x67, 0x65, 0x6e, 0x65, + 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x42, 0x6c, 0x6f, 0x63, + 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, + 0x61, 0x74, 0x65, 0x64, 0x2e, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x45, 0x0a, 0x08, 0x53, 0x75, + 0x62, 0x6d, 0x69, 0x74, 0x54, 0x78, 0x12, 0x1a, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, + 0x65, 0x64, 0x2e, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x54, 0x78, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x53, + 0x75, 0x62, 0x6d, 0x69, 0x74, 0x54, 0x78, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x00, 0x12, 0x4e, 0x0a, 0x0b, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x42, 0x61, 0x74, 0x63, 0x68, + 0x12, 0x1d, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x53, 0x75, 0x62, + 0x6d, 0x69, 0x74, 0x42, 0x61, 0x74, 0x63, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x1e, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x53, 0x75, 0x62, 0x6d, + 0x69, 0x74, 0x42, 0x61, 0x74, 0x63, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x00, 0x12, 0x42, 0x0a, 0x07, 0x4f, 0x62, 0x73, 0x43, 0x61, 0x6c, 0x6c, 0x12, 0x19, 0x2e, 0x67, + 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x4f, 0x62, 0x73, 0x43, 0x61, 0x6c, 0x6c, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, + 0x74, 0x65, 0x64, 0x2e, 0x4f, 0x62, 0x73, 0x43, 0x61, 0x6c, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x66, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x54, 0x72, 0x61, 0x6e, + 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x25, 0x2e, 0x67, + 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x72, 0x61, 0x6e, + 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, + 0x47, 0x65, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, + 0x75, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x39, 0x0a, + 0x04, 0x53, 0x74, 0x6f, 0x70, 0x12, 0x16, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, + 0x64, 0x2e, 0x53, 0x74, 0x6f, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, + 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x53, 0x74, 0x6f, 0x70, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x57, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x54, + 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x20, 0x2e, 0x67, 0x65, 0x6e, + 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x67, + 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x72, 0x61, 0x6e, + 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x00, 0x12, 0x6c, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x63, 0x65, 0x69, 0x70, 0x74, 0x12, 0x27, 0x2e, 0x67, 0x65, 0x6e, + 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x63, 0x65, 0x69, 0x70, 0x74, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, + 0x47, 0x65, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, + 0x63, 0x65, 0x69, 0x70, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, + 0x4b, 0x0a, 0x0a, 0x47, 0x65, 0x74, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x1c, 0x2e, + 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x47, 0x65, 0x74, 0x42, 0x61, 0x6c, + 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x67, 0x65, + 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x47, 0x65, 0x74, 0x42, 0x61, 0x6c, 0x61, 0x6e, + 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x42, 0x0a, 0x07, + 0x47, 0x65, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x19, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, + 0x74, 0x65, 0x64, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x47, + 0x65, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, + 0x12, 0x48, 0x0a, 0x09, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x12, 0x1b, 0x2e, + 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, + 0x69, 0x62, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x67, 0x65, 0x6e, + 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x4e, 0x0a, 0x0b, 0x55, 0x6e, + 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x12, 0x1d, 0x2e, 0x67, 0x65, 0x6e, 0x65, + 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x55, 0x6e, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, + 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, + 0x61, 0x74, 0x65, 0x64, 0x2e, 0x55, 0x6e, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x4e, 0x0a, 0x0b, 0x45, 0x73, + 0x74, 0x69, 0x6d, 0x61, 0x74, 0x65, 0x47, 0x61, 0x73, 0x12, 0x1d, 0x2e, 0x67, 0x65, 0x6e, 0x65, + 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x45, 0x73, 0x74, 0x69, 0x6d, 0x61, 0x74, 0x65, 0x47, 0x61, + 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, + 0x61, 0x74, 0x65, 0x64, 0x2e, 0x45, 0x73, 0x74, 0x69, 0x6d, 0x61, 0x74, 0x65, 0x47, 0x61, 0x73, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x42, 0x0a, 0x07, 0x47, 0x65, + 0x74, 0x4c, 0x6f, 0x67, 0x73, 0x12, 0x19, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, + 0x64, 0x2e, 0x47, 0x65, 0x74, 0x4c, 0x6f, 0x67, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x1a, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x47, 0x65, 0x74, + 0x4c, 0x6f, 0x67, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x45, + 0x0a, 0x0b, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x12, 0x14, 0x2e, + 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x41, + 0x72, 0x67, 0x73, 0x1a, 0x1e, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, + 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x45, 0x0a, 0x08, 0x47, 0x65, 0x74, 0x42, 0x61, 0x74, 0x63, + 0x68, 0x12, 0x1a, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x47, 0x65, + 0x74, 0x42, 0x61, 0x74, 0x63, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, + 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x47, 0x65, 0x74, 0x42, 0x61, 0x74, + 0x63, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x53, 0x0a, 0x0f, + 0x47, 0x65, 0x74, 0x42, 0x61, 0x74, 0x63, 0x68, 0x42, 0x79, 0x53, 0x65, 0x71, 0x4e, 0x6f, 0x12, + 0x21, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x47, 0x65, 0x74, 0x42, + 0x61, 0x74, 0x63, 0x68, 0x42, 0x79, 0x53, 0x65, 0x71, 0x4e, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x47, + 0x65, 0x74, 0x42, 0x61, 0x74, 0x63, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x00, 0x12, 0x4e, 0x0a, 0x0b, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x42, 0x61, 0x74, 0x63, 0x68, + 0x12, 0x1d, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x43, 0x72, 0x65, + 0x61, 0x74, 0x65, 0x42, 0x61, 0x74, 0x63, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x1e, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x43, 0x72, 0x65, 0x61, + 0x74, 0x65, 0x42, 0x61, 0x74, 0x63, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x00, 0x12, 0x51, 0x0a, 0x0c, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x6f, 0x6c, 0x6c, 0x75, + 0x70, 0x12, 0x1e, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x43, 0x72, + 0x65, 0x61, 0x74, 0x65, 0x52, 0x6f, 0x6c, 0x6c, 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x1f, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x43, 0x72, + 0x65, 0x61, 0x74, 0x65, 0x52, 0x6f, 0x6c, 0x6c, 0x75, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x00, 0x12, 0x6c, 0x0a, 0x15, 0x44, 0x65, 0x62, 0x75, 0x67, 0x54, 0x72, 0x61, + 0x63, 0x65, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x27, 0x2e, + 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x44, 0x65, 0x62, 0x75, 0x67, 0x54, + 0x72, 0x61, 0x63, 0x65, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, + 0x65, 0x64, 0x2e, 0x44, 0x65, 0x62, 0x75, 0x67, 0x54, 0x72, 0x61, 0x63, 0x65, 0x54, 0x72, 0x61, + 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x00, 0x12, 0x5a, 0x0a, 0x0f, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x4c, 0x32, 0x55, 0x70, + 0x64, 0x61, 0x74, 0x65, 0x73, 0x12, 0x21, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, + 0x64, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x4c, 0x32, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, + 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, + 0x61, 0x74, 0x65, 0x64, 0x2e, 0x45, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x64, 0x55, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x30, 0x01, 0x12, 0x6f, + 0x0a, 0x16, 0x44, 0x65, 0x62, 0x75, 0x67, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x4c, 0x6f, 0x67, 0x52, + 0x65, 0x6c, 0x65, 0x76, 0x61, 0x6e, 0x63, 0x79, 0x12, 0x28, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, + 0x61, 0x74, 0x65, 0x64, 0x2e, 0x44, 0x65, 0x62, 0x75, 0x67, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x4c, + 0x6f, 0x67, 0x52, 0x65, 0x6c, 0x65, 0x76, 0x61, 0x6e, 0x63, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x44, + 0x65, 0x62, 0x75, 0x67, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x4c, 0x6f, 0x67, 0x52, 0x65, 0x6c, 0x65, + 0x76, 0x61, 0x6e, 0x63, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, + 0x6c, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x43, 0x6f, 0x6e, 0x74, 0x72, + 0x61, 0x63, 0x74, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x27, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, + 0x61, 0x74, 0x65, 0x64, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x43, 0x6f, 0x6e, + 0x74, 0x72, 0x61, 0x63, 0x74, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x28, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x47, 0x65, + 0x74, 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x43, 0x6f, + 0x75, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x69, 0x0a, + 0x14, 0x47, 0x65, 0x74, 0x52, 0x65, 0x63, 0x65, 0x69, 0x70, 0x74, 0x73, 0x42, 0x79, 0x41, 0x64, + 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x26, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, + 0x64, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x65, 0x63, 0x65, 0x69, 0x70, 0x74, 0x73, 0x42, 0x79, 0x41, + 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, + 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x65, 0x63, + 0x65, 0x69, 0x70, 0x74, 0x73, 0x42, 0x79, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x75, 0x0a, 0x18, 0x47, 0x65, 0x74, 0x50, + 0x75, 0x62, 0x6c, 0x69, 0x63, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x44, 0x61, 0x74, 0x61, 0x12, 0x2a, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, - 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x61, 0x74, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0x00, 0x42, 0x17, 0x5a, 0x15, 0x65, 0x6e, 0x63, 0x6c, 0x61, 0x76, 0x65, 0x2f, 0x72, - 0x70, 0x63, 0x2f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x62, 0x06, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x33, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x61, 0x74, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x2b, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x47, 0x65, 0x74, + 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x44, 0x61, 0x74, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, + 0x17, 0x5a, 0x15, 0x65, 0x6e, 0x63, 0x6c, 0x61, 0x76, 0x65, 0x2f, 0x72, 0x70, 0x63, 0x2f, 0x67, + 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/go/common/rpc/generated/enclave.proto b/go/common/rpc/generated/enclave.proto index bf15657ba6..5b34654229 100644 --- a/go/common/rpc/generated/enclave.proto +++ b/go/common/rpc/generated/enclave.proto @@ -387,6 +387,7 @@ message BatchHeaderMsg { bytes LatestInboundCrossChainHash = 16; repeated CrossChainMsg CrossChainMessages = 17; bytes TransferTree = 18; + bytes Coinbase = 19; } message ExtRollupMsg { diff --git a/go/config/enclave_config.go b/go/config/enclave_config.go index 9b201bfcfa..d2b497e612 100644 --- a/go/config/enclave_config.go +++ b/go/config/enclave_config.go @@ -63,6 +63,9 @@ type EnclaveConfig struct { // a protocol limit, but a miner imposed limit and it might be hard to find someone // to include a transaction if it goes above it MaxRollupSize uint64 + + GasPaymentAddress gethcommon.Address + BaseFee *big.Int } // DefaultEnclaveConfig returns an EnclaveConfig with default values. @@ -90,5 +93,7 @@ func DefaultEnclaveConfig() *EnclaveConfig { DebugNamespaceEnabled: false, MaxBatchSize: 1024 * 25, MaxRollupSize: 1024 * 64, + GasPaymentAddress: gethcommon.BigToAddress(gethcommon.Big2), + BaseFee: gethcommon.Big0, } } diff --git a/go/enclave/components/batch_executor.go b/go/enclave/components/batch_executor.go index b15f092750..976dd657f2 100644 --- a/go/enclave/components/batch_executor.go +++ b/go/enclave/components/batch_executor.go @@ -1,6 +1,7 @@ package components import ( + "bytes" "errors" "fmt" "math/big" @@ -11,6 +12,7 @@ import ( "github.com/obscuronet/go-obscuro/go/enclave/storage" gethcommon "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/rlp" "github.com/ethereum/go-ethereum/core/state" "github.com/ethereum/go-ethereum/core/types" @@ -122,7 +124,7 @@ func (executor *batchExecutor) ComputeBatch(context *BatchExecutionContext) (*Co } // Create a new batch based on the fromBlock of inclusion of the previous, including all new transactions - batch := core.DeterministicEmptyBatch(parent.Header, block, context.AtTime, context.SequencerNo) + batch := core.DeterministicEmptyBatch(parent.Header, block, context.AtTime, context.SequencerNo, context.BaseFee, context.Creator) stateDB, err := executor.storage.CreateStateDB(batch.Header.ParentHash) if err != nil { @@ -138,9 +140,9 @@ func (executor *batchExecutor) ComputeBatch(context *BatchExecutionContext) (*Co crossChainTransactions := executor.crossChainProcessors.Local.CreateSyntheticTransactions(messages, stateDB) executor.crossChainProcessors.Local.ExecuteValueTransfers(transfers, stateDB) - // transactionsToProcess, _ := executor.payL1Fees(stateDB, context) + transactionsToProcess, _ := executor.payL1Fees(stateDB, context) - successfulTxs, txReceipts, err := executor.processTransactions(batch, 0, context.Transactions, stateDB, context.ChainConfig) + successfulTxs, txReceipts, err := executor.processTransactions(batch, 0, transactionsToProcess, stateDB, context.ChainConfig) if err != nil { return nil, fmt.Errorf("could not process transactions. Cause: %w", err) } @@ -158,6 +160,7 @@ func (executor *batchExecutor) ComputeBatch(context *BatchExecutionContext) (*Co copyBatch := *batch copyBatch.Header.Root = stateDB.IntermediateRoot(false) copyBatch.Transactions = successfulTxs + copyBatch.Header.BaseFee = big.NewInt(0).Set(batch.Header.BaseFee) copyBatch.ResetHash() if err = executor.populateOutboundCrossChainData(©Batch, block, txReceipts); err != nil { @@ -182,7 +185,7 @@ func (executor *batchExecutor) ComputeBatch(context *BatchExecutionContext) (*Co defer executor.stateDBMutex.Unlock() h, err := stateDB.Commit(deleteEmptyObjects) if err != nil { - return gethcommon.Hash{}, err + return gethcommon.Hash{}, fmt.Errorf("commit failure for batch %d. Cause: %w", batch.SeqNo(), err) } trieDB := executor.storage.TrieDB() err = trieDB.Commit(h, true, nil) @@ -206,6 +209,8 @@ func (executor *batchExecutor) ExecuteBatch(batch *core.Batch) (types.Receipts, AtTime: batch.Header.Time, ChainConfig: executor.chainConfig, SequencerNo: batch.Header.SequencerOrderNo, + Creator: batch.Header.Coinbase, + BaseFee: batch.Header.BaseFee, }) if err != nil { return nil, fmt.Errorf("failed computing batch %s. Cause: %w", batch.Hash(), err) @@ -224,6 +229,16 @@ func (executor *batchExecutor) ExecuteBatch(batch *core.Batch) (types.Receipts, return cb.Receipts, nil } +type ValueTransfers []common.ValueTransferEvent + +func (vt ValueTransfers) Len() int { + return len(vt) +} +func (vt ValueTransfers) EncodeIndex(index int, w *bytes.Buffer) { + transfer := vt[index] + rlp.Encode(w, transfer) +} + func (executor *batchExecutor) CreateGenesisState(blkHash common.L1BlockHash, timeNow uint64) (*core.Batch, *types.Transaction, error) { preFundGenesisState, err := executor.genesis.GetGenesisRoot(executor.storage) if err != nil { @@ -241,6 +256,8 @@ func (executor *batchExecutor) CreateGenesisState(blkHash common.L1BlockHash, ti ReceiptHash: types.EmptyRootHash, TransfersTree: types.EmptyRootHash, Time: timeNow, + Coinbase: gethcommon.BigToAddress(gethcommon.Big0), + BaseFee: big.NewInt(0), }, Transactions: []*common.L2Tx{}, } @@ -263,17 +280,17 @@ func (executor *batchExecutor) populateOutboundCrossChainData(batch *core.Batch, executor.logger.Error("Failed extracting L2->L1 messages", log.ErrKey, err, log.CmpKey, log.CrossChainCmp) return fmt.Errorf("could not extract cross chain messages. Cause: %w", err) } - /* - valueTransferMessages, err := executor.crossChainProcessors.Local.ExtractOutboundTransfers(receipts) - if err != nil { - executor.logger.Error("Extracting messages L2->L1 failed", log.ErrKey, err, log.CmpKey, log.CrossChainCmp) - return fmt.Errorf("could not extract cross chain messages. Cause: %w", err) - } - transfersHash := types.DeriveSha(ValueTransfers(valueTransferMessages), &trie.StackTrie{}) - */ + valueTransferMessages, err := executor.crossChainProcessors.Local.ExtractOutboundTransfers(receipts) + if err != nil { + executor.logger.Error("Extracting messages L2->L1 failed", log.ErrKey, err, log.CmpKey, log.CrossChainCmp) + return fmt.Errorf("could not extract cross chain messages. Cause: %w", err) + } + + transfersHash := types.DeriveSha(ValueTransfers(valueTransferMessages), &trie.StackTrie{}) + batch.Header.CrossChainMessages = crossChainMessages - batch.Header.TransfersTree = types.EmptyRootHash + batch.Header.TransfersTree = transfersHash executor.logger.Trace(fmt.Sprintf("Added %d cross chain messages to batch.", len(batch.Header.CrossChainMessages)), log.CmpKey, log.CrossChainCmp) diff --git a/go/enclave/components/interfaces.go b/go/enclave/components/interfaces.go index f6a8b7a14d..fe0c55c144 100644 --- a/go/enclave/components/interfaces.go +++ b/go/enclave/components/interfaces.go @@ -48,6 +48,7 @@ type BatchExecutionContext struct { Creator gethcommon.Address ChainConfig *params.ChainConfig SequencerNo *big.Int + BaseFee *big.Int } // ComputedBatch - a structure representing the result of a batch diff --git a/go/enclave/container/cli.go b/go/enclave/container/cli.go index 748c56af68..8d83fbd522 100644 --- a/go/enclave/container/cli.go +++ b/go/enclave/container/cli.go @@ -69,6 +69,8 @@ func ParseConfig() (*config.EnclaveConfig, error) { debugNamespaceEnabled := flag.Bool(debugNamespaceEnabledName, cfg.DebugNamespaceEnabled, flagUsageMap[debugNamespaceEnabledName]) maxBatchSize := flag.Uint64(maxBatchSizeName, cfg.MaxBatchSize, flagUsageMap[maxBatchSizeName]) maxRollupSize := flag.Uint64(maxRollupSizeName, cfg.MaxRollupSize, flagUsageMap[maxRollupSizeName]) + baseFee := flag.Uint64("l2BaseFee", cfg.BaseFee.Uint64(), "") + coinbaseAddress := flag.String("l2Coinbase", cfg.GasPaymentAddress.Hex(), "") flag.Parse() @@ -103,6 +105,8 @@ func ParseConfig() (*config.EnclaveConfig, error) { cfg.DebugNamespaceEnabled = *debugNamespaceEnabled cfg.MaxBatchSize = *maxBatchSize cfg.MaxRollupSize = *maxRollupSize + cfg.BaseFee = big.NewInt(0).SetUint64(*baseFee) + cfg.GasPaymentAddress = gethcommon.HexToAddress(*coinbaseAddress) return cfg, nil } diff --git a/go/enclave/core/batch.go b/go/enclave/core/batch.go index b01390f732..545b94bb23 100644 --- a/go/enclave/core/batch.go +++ b/go/enclave/core/batch.go @@ -24,9 +24,9 @@ type Batch struct { // Hash returns the keccak256 hash of b's header. // The hash is computed on the first call and cached thereafter. func (b *Batch) Hash() common.L2BatchHash { - if hash := b.hash.Load(); hash != nil { + /* if hash := b.hash.Load(); hash != nil { return hash.(common.L2BatchHash) - } + }*/ v := b.Header.Hash() b.hash.Store(v) return v @@ -98,6 +98,8 @@ func DeterministicEmptyBatch( block *types.Block, time uint64, sequencerNo *big.Int, + baseFee *big.Int, + coinbase gethcommon.Address, ) *Batch { h := common.BatchHeader{ ParentHash: parent.Hash(), @@ -105,7 +107,9 @@ func DeterministicEmptyBatch( Number: big.NewInt(0).Add(parent.Number, big.NewInt(1)), SequencerOrderNo: sequencerNo, // todo (#1548) - Consider how this time should align with the time of the L1 block used as proof. - Time: time, + Time: time, + BaseFee: baseFee, + Coinbase: coinbase, } b := Batch{ Header: &h, diff --git a/go/enclave/enclave.go b/go/enclave/enclave.go index d74d81423b..1f16bb6f54 100644 --- a/go/enclave/enclave.go +++ b/go/enclave/enclave.go @@ -227,8 +227,10 @@ func NewEnclave( dataEncryptionService, dataCompressionService, nodetype.SequencerSettings{ - MaxBatchSize: config.MaxBatchSize, - MaxRollupSize: config.MaxRollupSize, + MaxBatchSize: config.MaxBatchSize, + MaxRollupSize: config.MaxRollupSize, + GasPaymentAddress: config.GasPaymentAddress, + BaseFee: config.BaseFee, }, ) } else { diff --git a/go/enclave/nodetype/sequencer.go b/go/enclave/nodetype/sequencer.go index 28afa2957b..13ac676bd9 100644 --- a/go/enclave/nodetype/sequencer.go +++ b/go/enclave/nodetype/sequencer.go @@ -31,8 +31,10 @@ import ( ) type SequencerSettings struct { - MaxBatchSize uint64 - MaxRollupSize uint64 + MaxBatchSize uint64 + MaxRollupSize uint64 + GasPaymentAddress gethcommon.Address + BaseFee *big.Int } type sequencer struct { @@ -185,7 +187,8 @@ func (s *sequencer) produceBatch(sequencerNo *big.Int, l1Hash common.L1BlockHash ParentPtr: headBatch, Transactions: transactions, AtTime: batchTime, - Creator: s.hostID, + Creator: s.settings.GasPaymentAddress, + BaseFee: s.settings.BaseFee, ChainConfig: s.chainConfig, SequencerNo: sequencerNo, }) diff --git a/go/enclave/nodetype/validator.go b/go/enclave/nodetype/validator.go index 77cd4dfc48..d61a39fb78 100644 --- a/go/enclave/nodetype/validator.go +++ b/go/enclave/nodetype/validator.go @@ -68,9 +68,8 @@ func (val *obsValidator) OnL1Fork(_ *common.ChainFork) error { return nil } -func (val *obsValidator) VerifySequencerSignature(*core.Batch) error { - // todo - return nil +func (val *obsValidator) VerifySequencerSignature(b *core.Batch) error { + return val.sigValidator.CheckSequencerSignature(b.Hash(), b.Header.R, b.Header.S) } func (val *obsValidator) ExecuteStoredBatches() error { From 56718690d31cf5b46b273e937976d813a883d78c Mon Sep 17 00:00:00 2001 From: StefanIliev545 Date: Tue, 29 Aug 2023 18:48:10 +0300 Subject: [PATCH 14/47] Testing for gas mechanics in the sim tests. --- go/common/gethencoding/geth_encoding.go | 8 ++--- go/config/enclave_config.go | 3 +- go/enclave/components/batch_executor.go | 2 +- go/node/config.go | 11 +++++++ integration/simulation/network/socket.go | 1 + integration/simulation/params/wallet_utils.go | 7 ++++- integration/simulation/utils.go | 3 ++ integration/simulation/validate_chain.go | 31 +++++++++++++++++-- 8 files changed, 54 insertions(+), 12 deletions(-) diff --git a/go/common/gethencoding/geth_encoding.go b/go/common/gethencoding/geth_encoding.go index 80f0d03e57..ba9f81036d 100644 --- a/go/common/gethencoding/geth_encoding.go +++ b/go/common/gethencoding/geth_encoding.go @@ -219,11 +219,6 @@ func CreateEthHeaderForBatch(h *common.BatchHeader, secret []byte) (*types.Heade // deterministically calculate private randomness that will be exposed to the evm randomness := crypto.CalculateRootBatchEntropy(secret, h.Number) - baseFee := big.NewInt(0) - if h.BaseFee != nil { - baseFee = baseFee.Set(h.BaseFee) - } - return &types.Header{ ParentHash: h.ParentHash, Root: h.Root, @@ -233,7 +228,8 @@ func CreateEthHeaderForBatch(h *common.BatchHeader, secret []byte) (*types.Heade Number: h.Number, GasLimit: 1_000_000_000, GasUsed: 0, - BaseFee: baseFee, + BaseFee: new(big.Int).SetUint64(0), + Coinbase: h.Coinbase, Time: h.Time, MixDigest: randomness, Nonce: types.BlockNonce{}, diff --git a/go/config/enclave_config.go b/go/config/enclave_config.go index d2b497e612..636fc5b312 100644 --- a/go/config/enclave_config.go +++ b/go/config/enclave_config.go @@ -6,6 +6,7 @@ import ( "github.com/obscuronet/go-obscuro/go/common" gethcommon "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/params" "github.com/obscuronet/go-obscuro/go/common/log" gethlog "github.com/ethereum/go-ethereum/log" @@ -94,6 +95,6 @@ func DefaultEnclaveConfig() *EnclaveConfig { MaxBatchSize: 1024 * 25, MaxRollupSize: 1024 * 64, GasPaymentAddress: gethcommon.BigToAddress(gethcommon.Big2), - BaseFee: gethcommon.Big0, + BaseFee: new(big.Int).SetUint64(params.InitialBaseFee), } } diff --git a/go/enclave/components/batch_executor.go b/go/enclave/components/batch_executor.go index 976dd657f2..e84c72d27c 100644 --- a/go/enclave/components/batch_executor.go +++ b/go/enclave/components/batch_executor.go @@ -257,7 +257,7 @@ func (executor *batchExecutor) CreateGenesisState(blkHash common.L1BlockHash, ti TransfersTree: types.EmptyRootHash, Time: timeNow, Coinbase: gethcommon.BigToAddress(gethcommon.Big0), - BaseFee: big.NewInt(0), + BaseFee: new(big.Int).SetUint64(params.InitialBaseFee), }, Transactions: []*common.L2Tx{}, } diff --git a/go/node/config.go b/go/node/config.go index 5ba5861cf6..7731e5c9b8 100644 --- a/go/node/config.go +++ b/go/node/config.go @@ -45,6 +45,7 @@ type Config struct { hostInMemDB bool debugNamespaceEnabled bool profilerEnabled bool + coinbaseAddress string } func NewNodeConfig(opts ...Option) *Config { @@ -72,6 +73,10 @@ func (c *Config) ToEnclaveConfig() *config.EnclaveConfig { cfg.LogPath = testlog.LogFile() cfg.Address = fmt.Sprintf("%s:%d", _localhost, c.enclaveWSPort) + if c.nodeType == "sequencer" && c.coinbaseAddress != "" { + cfg.GasPaymentAddress = gethcommon.HexToAddress(c.coinbaseAddress) + } + return cfg } @@ -109,6 +114,12 @@ func (c *Config) UpdateNodeConfig(opts ...Option) *Config { return c } +func WithCoinbase(s string) Option { + return func(c *Config) { + c.coinbaseAddress = s + } +} + func WithNodeName(s string) Option { return func(c *Config) { c.nodeName = s diff --git a/integration/simulation/network/socket.go b/integration/simulation/network/socket.go index f6f8aebea4..84805a85cd 100644 --- a/integration/simulation/network/socket.go +++ b/integration/simulation/network/socket.go @@ -91,6 +91,7 @@ func (n *networkOfSocketNodes) Create(simParams *params.SimParams, _ *stats.Stat node.WithNodeType(nodeTypeStr), node.WithL1Host("127.0.0.1"), node.WithL1WSPort(simParams.StartPort+100), + node.WithCoinbase(simParams.Wallets.L2FeesWallet.Address().Hex()), ), ) diff --git a/integration/simulation/params/wallet_utils.go b/integration/simulation/params/wallet_utils.go index 3d5e01c2c5..27e69aaad6 100644 --- a/integration/simulation/params/wallet_utils.go +++ b/integration/simulation/params/wallet_utils.go @@ -38,7 +38,8 @@ type SimWallets struct { GasBridgeWallet wallet.Wallet - L2FaucetWallet wallet.Wallet // the wallet of the L2 faucet + L2FaucetWallet wallet.Wallet // the wallet of the L2 faucet + L2FeesWallet wallet.Wallet Tokens map[testcommon.ERC20]*SimToken // The supported tokens } @@ -70,6 +71,9 @@ func NewSimWallets(nrSimWallets int, nNodes int, ethereumChainID int64, obscuroC gasWallet := wallet.NewInMemoryWalletFromPK(big.NewInt(ethereumChainID), genesis.GasBridgingKeys, testlog.Logger()) + sequencerGasKeys, _ := crypto.GenerateKey() + sequencerFeeWallet := wallet.NewInMemoryWalletFromPK(big.NewInt(obscuroChainID), sequencerGasKeys, testlog.Logger()) + // create the L1 addresses of the two tokens, and connect them to the hardcoded addresses from the enclave hoc := SimToken{ Name: testcommon.HOC, @@ -90,6 +94,7 @@ func NewSimWallets(nrSimWallets int, nNodes int, ethereumChainID int64, obscuroC SimEthWallets: simEthWallets, SimObsWallets: simObsWallets, L2FaucetWallet: l2FaucetWallet, + L2FeesWallet: sequencerFeeWallet, GasBridgeWallet: gasWallet, Tokens: map[testcommon.ERC20]*SimToken{ testcommon.HOC: &hoc, diff --git a/integration/simulation/utils.go b/integration/simulation/utils.go index c55437a137..00b99daf3e 100644 --- a/integration/simulation/utils.go +++ b/integration/simulation/utils.go @@ -14,6 +14,7 @@ import ( testcommon "github.com/obscuronet/go-obscuro/integration/common" gethcommon "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/crypto" "github.com/ethereum/go-ethereum/log" "github.com/obscuronet/go-obscuro/go/common" "github.com/obscuronet/go-obscuro/go/ethadapter/erc20contractlib" @@ -23,6 +24,8 @@ const ( testLogs = "../.build/simulations/" ) +var SequencerGasKeys, _ = crypto.GenerateKey() + func setupSimTestLog(simType string) { testlog.Setup(&testlog.Cfg{ LogDir: testLogs, diff --git a/integration/simulation/validate_chain.go b/integration/simulation/validate_chain.go index be759c2af9..a9264a775f 100644 --- a/integration/simulation/validate_chain.go +++ b/integration/simulation/validate_chain.go @@ -137,9 +137,32 @@ func checkBlockchainOfEthereumNode(t *testing.T, node ethadapter.EthClient, minH t.Errorf("Node %d: There were only %d blocks mined. Expected at least: %d.", nodeIdx, height, minHeight) } - deposits, rollups, _, blockCount, _ := ExtractDataFromEthereumChain(ethereummock.MockGenesisBlock, head, node, s, nodeIdx) + deposits, rollups, _, blockCount, _, rollupReceipts := ExtractDataFromEthereumChain(ethereummock.MockGenesisBlock, head, node, s, nodeIdx) s.Stats.TotalL1Blocks = uint64(blockCount) + costOfRollups := big.NewInt(0) + for _, receipt := range rollupReceipts { + block, err := node.EthClient().BlockByHash(context.Background(), receipt.BlockHash) + if err != nil { + panic(err) + } + + txCost := big.NewInt(0).Mul(block.BaseFee(), big.NewInt(0).SetUint64(receipt.GasUsed)) + costOfRollups.Add(costOfRollups, txCost) + } + + l2FeesWallet := s.Params.Wallets.L2FeesWallet + obsClients := network.CreateAuthClients(s.RPCHandles.RPCClients, l2FeesWallet) + feeBalance, err := obsClients[nodeIdx].BalanceAt(context.Background(), nil) + if err != nil { + panic(fmt.Errorf("failed getting balance for bridge transfer receiver. Cause: %w", err)) + } + + // if balance of collected fees is less than cost of published rollups fail + if feeBalance.Cmp(costOfRollups) == -1 { + t.Errorf("Node %d: Sequencer has collected insufficient fees. Has: %d, needs: %d", nodeIdx, feeBalance, costOfRollups) + } + if len(findHashDups(deposits)) > 0 { dups := findHashDups(deposits) t.Errorf("Node %d: Found Deposit duplicates: %v", nodeIdx, dups) @@ -277,9 +300,10 @@ func ExtractDataFromEthereumChain( node ethadapter.EthClient, s *Simulation, nodeIdx int, -) ([]gethcommon.Hash, []*common.ExtRollup, *big.Int, int, uint64) { +) ([]gethcommon.Hash, []*common.ExtRollup, *big.Int, int, uint64, types.Receipts) { deposits := make([]gethcommon.Hash, 0) rollups := make([]*common.ExtRollup, 0) + rollupReceipts := make(types.Receipts, 0) totalDeposited := big.NewInt(0) blockchain := node.BlocksBetween(startBlock, endBlock) @@ -312,6 +336,7 @@ func ExtractDataFromEthereumChain( testlog.Logger().Crit("could not decode rollup. ", log.ErrKey, err) } rollups = append(rollups, r) + rollupReceipts = append(rollupReceipts, receipt) if node.IsBlockAncestor(block, r.Header.L1Proof) { // only count the rollup if it is published in the right branch // todo (@tudor) - once logic is added to the l1 - this can be made into a check @@ -320,7 +345,7 @@ func ExtractDataFromEthereumChain( } } } - return deposits, rollups, totalDeposited, len(blockchain), successfulDeposits + return deposits, rollups, totalDeposited, len(blockchain), successfulDeposits, rollupReceipts } func checkBlockchainOfObscuroNode(t *testing.T, rpcHandles *network.RPCHandles, minObscuroHeight uint64, maxEthereumHeight uint64, s *Simulation, wg *sync.WaitGroup, heights []uint64, nodeIdx int) { From 1c6e29f93f7846db490e6abfffbef1270fe9c720 Mon Sep 17 00:00:00 2001 From: StefanIliev545 Date: Tue, 5 Sep 2023 12:02:39 +0100 Subject: [PATCH 15/47] Fix for tests. --- go/enclave/container/cli.go | 2 ++ go/enclave/enclave_test.go | 2 +- go/enclave/genesis/testnet_genesis.go | 4 ---- integration/networktest/userwallet/userwallet.go | 4 ++++ 4 files changed, 7 insertions(+), 5 deletions(-) diff --git a/go/enclave/container/cli.go b/go/enclave/container/cli.go index 8d83fbd522..b7ca776283 100644 --- a/go/enclave/container/cli.go +++ b/go/enclave/container/cli.go @@ -38,6 +38,8 @@ type EnclaveConfigToml struct { DebugNamespaceEnabled bool MaxBatchSize uint64 MaxRollupSize uint64 + GasPaymentAddress string + BaseFee uint64 } // ParseConfig returns a config.EnclaveConfig based on either the file identified by the `config` flag, or the flags diff --git a/go/enclave/enclave_test.go b/go/enclave/enclave_test.go index 32be420499..80f35c205a 100644 --- a/go/enclave/enclave_test.go +++ b/go/enclave/enclave_test.go @@ -38,7 +38,7 @@ const _testEnclavePublicKeyHex = "034d3b7e63a8bcd532ee3d1d6ecad9d67fca7821981a04 // _successfulRollupGasPrice can be deterministically calculated when evaluating the management smart contract. // It should change only when there are changes to the smart contract or if the gas estimation algorithm is modified. // Other changes would mean something is broken. -const _successfulRollupGasPrice = 319208 +const _successfulRollupGasPrice = 338088 var _enclavePubKey *ecies.PublicKey diff --git a/go/enclave/genesis/testnet_genesis.go b/go/enclave/genesis/testnet_genesis.go index f034b7008a..4f85cd0cc6 100644 --- a/go/enclave/genesis/testnet_genesis.go +++ b/go/enclave/genesis/testnet_genesis.go @@ -26,10 +26,6 @@ var TestnetGenesis = Genesis{ Address: gethcommon.HexToAddress("0xDEe530E22045939e6f6a0A593F829e35A140D3F1"), Amount: parseHugeNumber("7500000000000000000000000000000"), }, - { // Address for value transfer testing - Address: crypto.PubkeyToAddress(GasBridgingKeys.PublicKey), - Amount: parseHugeNumber("7500000000000000000000000000000"), - }, }, } diff --git a/integration/networktest/userwallet/userwallet.go b/integration/networktest/userwallet/userwallet.go index 6fa1213243..5608dba66d 100644 --- a/integration/networktest/userwallet/userwallet.go +++ b/integration/networktest/userwallet/userwallet.go @@ -81,6 +81,10 @@ func NewUserWallet(pk *ecdsa.PrivateKey, rpcEndpoint string, logger gethlog.Logg return wal } +func (s *UserWallet) ChainID() *big.Int { + return big.NewInt(integration.ObscuroChainID) +} + func (s *UserWallet) SendFunds(ctx context.Context, addr gethcommon.Address, value *big.Int) (*gethcommon.Hash, error) { err := s.EnsureClientSetup(ctx) if err != nil { From 44abb3c640169f1b0143210fca5fd475624e3963 Mon Sep 17 00:00:00 2001 From: StefanIliev545 Date: Tue, 5 Sep 2023 12:12:33 +0100 Subject: [PATCH 16/47] Fixed linter issues. --- go/common/types.go | 5 ++--- go/enclave/components/batch_executor.go | 18 ++++++++++-------- go/enclave/crosschain/interfaces.go | 2 +- go/enclave/crosschain/message_bus_manager.go | 3 +-- 4 files changed, 14 insertions(+), 14 deletions(-) diff --git a/go/common/types.go b/go/common/types.go index 59a197aba4..6f928d34de 100644 --- a/go/common/types.go +++ b/go/common/types.go @@ -6,7 +6,6 @@ import ( "math/big" "github.com/ethereum/go-ethereum/common" - gethcommon "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/rpc" "github.com/ethereum/go-ethereum/trie" @@ -50,8 +49,8 @@ type ( CrossChainMessage = MessageBus.StructsCrossChainMessage CrossChainMessages = []CrossChainMessage ValueTransferEvent struct { - Sender gethcommon.Address - Receiver gethcommon.Address + Sender common.Address + Receiver common.Address Amount *big.Int } ValueTransferEvents = []ValueTransferEvent diff --git a/go/enclave/components/batch_executor.go b/go/enclave/components/batch_executor.go index 6aef5371c4..3bd32bb989 100644 --- a/go/enclave/components/batch_executor.go +++ b/go/enclave/components/batch_executor.go @@ -61,19 +61,19 @@ func NewBatchExecutor( } } -func (bp *batchExecutor) payL1Fees(stateDB *state.StateDB, context *BatchExecutionContext) (common.L2Transactions, error) { +func (executor *batchExecutor) payL1Fees(stateDB *state.StateDB, context *BatchExecutionContext) common.L2Transactions { transactions := make(common.L2Transactions, 0) for _, tx := range context.Transactions { sender, err := core.GetAuthenticatedSender(context.ChainConfig.ChainID.Int64(), tx) if err != nil { - bp.logger.Warn("Unable to extract sender for tx", log.TxKey, tx.Hash()) + executor.logger.Warn("Unable to extract sender for tx", log.TxKey, tx.Hash()) continue } accBalance := stateDB.GetBalance(*sender) - cost, err := bp.gasOracle.GetGasCostForTx(tx) + cost, err := executor.gasOracle.GetGasCostForTx(tx) if err != nil { - bp.logger.Warn("Unable to get gas cost for tx", log.TxKey, tx.Hash(), log.ErrKey, err) + executor.logger.Warn("Unable to get gas cost for tx", log.TxKey, tx.Hash(), log.ErrKey, err) continue } @@ -82,7 +82,7 @@ func (bp *batchExecutor) payL1Fees(stateDB *state.StateDB, context *BatchExecuti if !isFreeTransaction { if accBalance.Cmp(cost) == -1 { - bp.logger.Info("insufficient account balance for tx", log.TxKey, tx.Hash(), "addr", sender.Hex()) + executor.logger.Info("insufficient account balance for tx", log.TxKey, tx.Hash(), "addr", sender.Hex()) continue } stateDB.SubBalance(*sender, cost) @@ -90,7 +90,7 @@ func (bp *batchExecutor) payL1Fees(stateDB *state.StateDB, context *BatchExecuti } transactions = append(transactions, tx) } - return transactions, nil + return transactions } func (executor *batchExecutor) ComputeBatch(context *BatchExecutionContext) (*ComputedBatch, error) { @@ -140,7 +140,7 @@ func (executor *batchExecutor) ComputeBatch(context *BatchExecutionContext) (*Co crossChainTransactions := executor.crossChainProcessors.Local.CreateSyntheticTransactions(messages, stateDB) executor.crossChainProcessors.Local.ExecuteValueTransfers(transfers, stateDB) - transactionsToProcess, _ := executor.payL1Fees(stateDB, context) + transactionsToProcess := executor.payL1Fees(stateDB, context) successfulTxs, txReceipts, err := executor.processTransactions(batch, 0, transactionsToProcess, stateDB, context.ChainConfig) if err != nil { @@ -236,7 +236,9 @@ func (vt ValueTransfers) Len() int { } func (vt ValueTransfers) EncodeIndex(index int, w *bytes.Buffer) { transfer := vt[index] - rlp.Encode(w, transfer) + if err := rlp.Encode(w, transfer); err != nil { + panic(err) + } } func (executor *batchExecutor) CreateGenesisState(blkHash common.L1BlockHash, timeNow uint64) (*core.Batch, *types.Transaction, error) { diff --git a/go/enclave/crosschain/interfaces.go b/go/enclave/crosschain/interfaces.go index 1da3f7f43b..7b1793a9eb 100644 --- a/go/enclave/crosschain/interfaces.go +++ b/go/enclave/crosschain/interfaces.go @@ -53,7 +53,7 @@ type Manager interface { CreateSyntheticTransactions(messages common.CrossChainMessages, rollupState *state.StateDB) common.L2Transactions - ExecuteValueTransfers(transfers common.ValueTransferEvents, rollupState *state.StateDB) error + ExecuteValueTransfers(transfers common.ValueTransferEvents, rollupState *state.StateDB) RetrieveInboundMessages(fromBlock *common.L1Block, toBlock *common.L1Block, rollupState *state.StateDB) (common.CrossChainMessages, common.ValueTransferEvents) } diff --git a/go/enclave/crosschain/message_bus_manager.go b/go/enclave/crosschain/message_bus_manager.go index d2c1d4e704..36f019800c 100644 --- a/go/enclave/crosschain/message_bus_manager.go +++ b/go/enclave/crosschain/message_bus_manager.go @@ -192,11 +192,10 @@ func (m *MessageBusManager) ShouldAutoRelayMessage(message common.CrossChainMess return message.Sender == *m.GetBusAddress() } -func (m *MessageBusManager) ExecuteValueTransfers(transfers common.ValueTransferEvents, rollupState *state.StateDB) error { +func (m *MessageBusManager) ExecuteValueTransfers(transfers common.ValueTransferEvents, rollupState *state.StateDB) { for _, transfer := range transfers { rollupState.AddBalance(transfer.Receiver, transfer.Amount) } - return nil } // CreateSyntheticTransactions - generates transactions that the enclave should execute internally for the messages. From 24075296fe3414a94bcda2195693ef7e19d3a6dd Mon Sep 17 00:00:00 2001 From: StefanIliev545 Date: Tue, 5 Sep 2023 12:13:59 +0100 Subject: [PATCH 17/47] Ran gofumpt. --- go/enclave/components/batch_executor.go | 1 + go/enclave/components/block_processor.go | 2 +- go/enclave/genesis/testnet_genesis.go | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/go/enclave/components/batch_executor.go b/go/enclave/components/batch_executor.go index 3bd32bb989..f2c6e69b3e 100644 --- a/go/enclave/components/batch_executor.go +++ b/go/enclave/components/batch_executor.go @@ -234,6 +234,7 @@ type ValueTransfers []common.ValueTransferEvent func (vt ValueTransfers) Len() int { return len(vt) } + func (vt ValueTransfers) EncodeIndex(index int, w *bytes.Buffer) { transfer := vt[index] if err := rlp.Encode(w, transfer); err != nil { diff --git a/go/enclave/components/block_processor.go b/go/enclave/components/block_processor.go index e67df6b5c7..5631ee28aa 100644 --- a/go/enclave/components/block_processor.go +++ b/go/enclave/components/block_processor.go @@ -54,7 +54,7 @@ func (bp *l1BlockProcessor) Process(br *common.BlockAndReceipts) (*BlockIngestio } } - //todo @siliev - not sure if this is the best way to update the price, will pick up random stale blocks from forks? + // todo @siliev - not sure if this is the best way to update the price, will pick up random stale blocks from forks? bp.gasOracle.ProcessL1Block(br.Block) return ingestion, nil diff --git a/go/enclave/genesis/testnet_genesis.go b/go/enclave/genesis/testnet_genesis.go index 4f85cd0cc6..f4062331a1 100644 --- a/go/enclave/genesis/testnet_genesis.go +++ b/go/enclave/genesis/testnet_genesis.go @@ -9,7 +9,7 @@ import ( ) const TestnetPrefundedPK = "8dfb8083da6275ae3e4f41e3e8a8c19d028d32c9247e24530933782f2a05035b" // The genesis main account private key. -var GasBridgingKeys, _ = crypto.GenerateKey() //todo - make static +var GasBridgingKeys, _ = crypto.GenerateKey() // todo - make static var TestnetGenesis = Genesis{ Accounts: []Account{ From 7b4ddd704343c848ce22117c234a371d3227aa09 Mon Sep 17 00:00:00 2001 From: StefanIliev545 Date: Tue, 5 Sep 2023 12:15:41 +0100 Subject: [PATCH 18/47] Fixed more linter issues. --- go/enclave/crosschain/block_message_extractor.go | 9 ++------- go/enclave/crosschain/interfaces.go | 4 ---- go/enclave/crosschain/processors.go | 2 +- 3 files changed, 3 insertions(+), 12 deletions(-) diff --git a/go/enclave/crosschain/block_message_extractor.go b/go/enclave/crosschain/block_message_extractor.go index 4cf42bf70c..184859abdf 100644 --- a/go/enclave/crosschain/block_message_extractor.go +++ b/go/enclave/crosschain/block_message_extractor.go @@ -20,7 +20,6 @@ type blockMessageExtractor struct { func NewBlockMessageExtractor( busAddress *common.L1Address, - l2BusAddress *common.L2Address, storage storage.Storage, logger gethlog.Logger, ) BlockMessageExtractor { @@ -31,10 +30,6 @@ func NewBlockMessageExtractor( } } -func (m *blockMessageExtractor) IsAutoRelayedMessage(message common.CrossChainMessage) bool { - return false -} - func (m *blockMessageExtractor) Enabled() bool { return m.GetBusAddress().Hash().Big().Cmp(gethcommon.Big0) != 0 } @@ -53,7 +48,7 @@ func (m *blockMessageExtractor) StoreCrossChainValueTransfers(block *common.L1Bl return nil } - transfers, err := m.getValueTransferMessages(block, receipts) + transfers, err := m.getValueTransferMessages(receipts) if err != nil { m.logger.Error("Error encountered while getting inbound value transfers from block", log.BlockHashKey, block.Hash(), log.ErrKey, err) return err @@ -141,7 +136,7 @@ func (m *blockMessageExtractor) getCrossChainMessages(block *common.L1Block, rec return messages, nil } -func (m *blockMessageExtractor) getValueTransferMessages(block *common.L1Block, receipts common.L1Receipts) (common.ValueTransferEvents, error) { +func (m *blockMessageExtractor) getValueTransferMessages(receipts common.L1Receipts) (common.ValueTransferEvents, error) { if len(receipts) == 0 { return make(common.ValueTransferEvents, 0), nil } diff --git a/go/enclave/crosschain/interfaces.go b/go/enclave/crosschain/interfaces.go index 7b1793a9eb..3500448c3a 100644 --- a/go/enclave/crosschain/interfaces.go +++ b/go/enclave/crosschain/interfaces.go @@ -23,10 +23,6 @@ type BlockMessageExtractor interface { // Enabled - Returns true if there is a configured message bus, otherwise it is considered disabled Enabled() bool - - // IsAutoRelayedMessage - Returns if the message has been authorized for automatic relaying. This is mainly for - // gas mechanics deposits. - IsAutoRelayedMessage(message common.CrossChainMessage) bool } type Manager interface { diff --git a/go/enclave/crosschain/processors.go b/go/enclave/crosschain/processors.go index 331c356213..259a604f4b 100644 --- a/go/enclave/crosschain/processors.go +++ b/go/enclave/crosschain/processors.go @@ -24,7 +24,7 @@ func New( ) *Processors { processors := Processors{} processors.Local = NewObscuroMessageBusManager(storage, chainID, logger) - processors.Remote = NewBlockMessageExtractor(l1BusAddress, processors.Local.GetBusAddress(), storage, logger) + processors.Remote = NewBlockMessageExtractor(l1BusAddress, storage, logger) return &processors } From b03d1c6ce22dac7e3cf6fbb6ff6e67a1008e3570 Mon Sep 17 00:00:00 2001 From: StefanIliev545 Date: Tue, 5 Sep 2023 12:20:42 +0100 Subject: [PATCH 19/47] Linter fix. --- integration/simulation/validate_chain.go | 52 +++++++++++++----------- 1 file changed, 28 insertions(+), 24 deletions(-) diff --git a/integration/simulation/validate_chain.go b/integration/simulation/validate_chain.go index a670727ba8..508fbabec5 100644 --- a/integration/simulation/validate_chain.go +++ b/integration/simulation/validate_chain.go @@ -349,6 +349,33 @@ func ExtractDataFromEthereumChain( return deposits, rollups, totalDeposited, len(blockchain), successfulDeposits, rollupReceipts } +func verifyGasBridgeTransactions(t *testing.T, s *Simulation, nodeIdx int) { + mbusABI, _ := abi.JSON(strings.NewReader(MessageBus.MessageBusMetaData.ABI)) + gasBridgeRecords := s.TxInjector.TxTracker.GasBridgeTransactions + for _, record := range gasBridgeRecords { + inputs, err := mbusABI.Methods["sendValueToL2"].Inputs.Unpack(record.L1BridgeTx.Data()[4:]) + if err != nil { + panic(err) + } + + receiver := inputs[0].(gethcommon.Address) + amount := inputs[1].(*big.Int) + + if receiver != record.ReceiverWallet.Address() { + panic("Test setup is broken. Receiver in tx should match recorded wallet.") + } + obsClients := network.CreateAuthClients(s.RPCHandles.RPCClients, record.ReceiverWallet) + balance, err := obsClients[nodeIdx].BalanceAt(context.Background(), nil) + if err != nil { + panic(fmt.Errorf("failed getting balance for bridge transfer receiver. Cause: %w", err)) + } + + if balance.Cmp(amount) != 0 { + t.Errorf("Node %d: Balance doesnt match the bridged amount. Have: %d, Want: %d", nodeIdx, balance, amount) + } + } +} + func checkBlockchainOfObscuroNode(t *testing.T, rpcHandles *network.RPCHandles, minObscuroHeight uint64, maxEthereumHeight uint64, s *Simulation, wg *sync.WaitGroup, heights []uint64, nodeIdx int) { defer wg.Done() obscuroClient := rpcHandles.ObscuroClients[nodeIdx] @@ -398,30 +425,7 @@ func checkBlockchainOfObscuroNode(t *testing.T, rpcHandles *network.RPCHandles, } } - mbusABI, _ := abi.JSON(strings.NewReader(MessageBus.MessageBusMetaData.ABI)) - gasBridgeRecords := s.TxInjector.TxTracker.GasBridgeTransactions - for _, record := range gasBridgeRecords { - inputs, err := mbusABI.Methods["sendValueToL2"].Inputs.Unpack(record.L1BridgeTx.Data()[4:]) - if err != nil { - panic(err) - } - - receiver := inputs[0].(gethcommon.Address) - amount := inputs[1].(*big.Int) - - if receiver != record.ReceiverWallet.Address() { - panic("Test setup is broken. Receiver in tx should match recorded wallet.") - } - obsClients := network.CreateAuthClients(s.RPCHandles.RPCClients, record.ReceiverWallet) - balance, err := obsClients[nodeIdx].BalanceAt(context.Background(), nil) - if err != nil { - panic(fmt.Errorf("failed getting balance for bridge transfer receiver. Cause: %w", err)) - } - - if balance.Cmp(amount) != 0 { - t.Errorf("Node %d: Balance doesnt match the bridged amount. Have: %d, Want: %d", nodeIdx, balance, amount) - } - } + verifyGasBridgeTransactions(t, s, nodeIdx) notFoundTransfers, notFoundWithdrawals, notFoundNativeTransfers := FindNotIncludedL2Txs(s.ctx, nodeIdx, rpcHandles, s.TxInjector) if notFoundTransfers > 0 { From 8f61db7c8cca159c03ccad7e6ccdd6bee1b5f99e Mon Sep 17 00:00:00 2001 From: StefanIliev545 Date: Tue, 5 Sep 2023 12:30:03 +0100 Subject: [PATCH 20/47] Fixed in mem test. --- go/enclave/components/batch_executor.go | 1 - integration/simulation/validate_chain.go | 38 +++++++++++++----------- 2 files changed, 20 insertions(+), 19 deletions(-) diff --git a/go/enclave/components/batch_executor.go b/go/enclave/components/batch_executor.go index f2c6e69b3e..e3c4a93e0b 100644 --- a/go/enclave/components/batch_executor.go +++ b/go/enclave/components/batch_executor.go @@ -160,7 +160,6 @@ func (executor *batchExecutor) ComputeBatch(context *BatchExecutionContext) (*Co copyBatch := *batch copyBatch.Header.Root = stateDB.IntermediateRoot(false) copyBatch.Transactions = successfulTxs - copyBatch.Header.BaseFee = big.NewInt(0).Set(batch.Header.BaseFee) copyBatch.ResetHash() if err = executor.populateOutboundCrossChainData(©Batch, block, txReceipts); err != nil { diff --git a/integration/simulation/validate_chain.go b/integration/simulation/validate_chain.go index 508fbabec5..1c598ae79b 100644 --- a/integration/simulation/validate_chain.go +++ b/integration/simulation/validate_chain.go @@ -140,27 +140,29 @@ func checkBlockchainOfEthereumNode(t *testing.T, node ethadapter.EthClient, minH deposits, rollups, _, blockCount, _, rollupReceipts := ExtractDataFromEthereumChain(ethereummock.MockGenesisBlock, head, node, s, nodeIdx) s.Stats.TotalL1Blocks = uint64(blockCount) - costOfRollups := big.NewInt(0) - for _, receipt := range rollupReceipts { - block, err := node.EthClient().BlockByHash(context.Background(), receipt.BlockHash) - if err != nil { - panic(err) - } + if !s.Params.IsInMem { + costOfRollups := big.NewInt(0) + for _, receipt := range rollupReceipts { + block, err := node.EthClient().BlockByHash(context.Background(), receipt.BlockHash) + if err != nil { + panic(err) + } - txCost := big.NewInt(0).Mul(block.BaseFee(), big.NewInt(0).SetUint64(receipt.GasUsed)) - costOfRollups.Add(costOfRollups, txCost) - } + txCost := big.NewInt(0).Mul(block.BaseFee(), big.NewInt(0).SetUint64(receipt.GasUsed)) + costOfRollups.Add(costOfRollups, txCost) + } - l2FeesWallet := s.Params.Wallets.L2FeesWallet - obsClients := network.CreateAuthClients(s.RPCHandles.RPCClients, l2FeesWallet) - feeBalance, err := obsClients[nodeIdx].BalanceAt(context.Background(), nil) - if err != nil { - panic(fmt.Errorf("failed getting balance for bridge transfer receiver. Cause: %w", err)) - } + l2FeesWallet := s.Params.Wallets.L2FeesWallet + obsClients := network.CreateAuthClients(s.RPCHandles.RPCClients, l2FeesWallet) + feeBalance, err := obsClients[nodeIdx].BalanceAt(context.Background(), nil) + if err != nil { + panic(fmt.Errorf("failed getting balance for bridge transfer receiver. Cause: %w", err)) + } - // if balance of collected fees is less than cost of published rollups fail - if feeBalance.Cmp(costOfRollups) == -1 { - t.Errorf("Node %d: Sequencer has collected insufficient fees. Has: %d, needs: %d", nodeIdx, feeBalance, costOfRollups) + // if balance of collected fees is less than cost of published rollups fail + if feeBalance.Cmp(costOfRollups) == -1 { + t.Errorf("Node %d: Sequencer has collected insufficient fees. Has: %d, needs: %d", nodeIdx, feeBalance, costOfRollups) + } } if len(findHashDups(deposits)) > 0 { From f04b1753aaef854b0a5d3579a02740435d1ddb90 Mon Sep 17 00:00:00 2001 From: StefanIliev545 Date: Tue, 5 Sep 2023 14:03:33 +0100 Subject: [PATCH 21/47] Fixed race condition for gas price oracle. --- go/common/gethencoding/geth_encoding.go | 2 +- go/enclave/components/batch_executor.go | 7 +++++-- go/enclave/gas/oracle.go | 6 +++--- go/host/rpc/clientapi/client_api_eth.go | 2 +- 4 files changed, 10 insertions(+), 7 deletions(-) diff --git a/go/common/gethencoding/geth_encoding.go b/go/common/gethencoding/geth_encoding.go index 75b9add7a4..345797f4d6 100644 --- a/go/common/gethencoding/geth_encoding.go +++ b/go/common/gethencoding/geth_encoding.go @@ -239,7 +239,7 @@ func CreateEthHeaderForBatch(h *common.BatchHeader, secret []byte) (*types.Heade Number: h.Number, GasLimit: 1_000_000_000, GasUsed: 0, - BaseFee: new(big.Int).SetUint64(0), + BaseFee: big.NewInt(0).SetUint64(0), Coinbase: h.Coinbase, Time: h.Time, MixDigest: randomness, diff --git a/go/enclave/components/batch_executor.go b/go/enclave/components/batch_executor.go index e3c4a93e0b..4e76e2819a 100644 --- a/go/enclave/components/batch_executor.go +++ b/go/enclave/components/batch_executor.go @@ -64,6 +64,8 @@ func NewBatchExecutor( func (executor *batchExecutor) payL1Fees(stateDB *state.StateDB, context *BatchExecutionContext) common.L2Transactions { transactions := make(common.L2Transactions, 0) + block, _ := executor.storage.FetchBlock(context.BlockPtr) + for _, tx := range context.Transactions { sender, err := core.GetAuthenticatedSender(context.ChainConfig.ChainID.Int64(), tx) if err != nil { @@ -71,7 +73,8 @@ func (executor *batchExecutor) payL1Fees(stateDB *state.StateDB, context *BatchE continue } accBalance := stateDB.GetBalance(*sender) - cost, err := executor.gasOracle.GetGasCostForTx(tx) + + cost, err := executor.gasOracle.GetGasCostForTx(tx, block) if err != nil { executor.logger.Warn("Unable to get gas cost for tx", log.TxKey, tx.Hash(), log.ErrKey, err) continue @@ -217,7 +220,7 @@ func (executor *batchExecutor) ExecuteBatch(batch *core.Batch) (types.Receipts, if cb.Batch.Hash() != batch.Hash() { // todo @stefan - generate a validator challenge here and return it - executor.logger.Error(fmt.Sprintf("Error validating batch. Calculated: %+v\n Incoming: %+v\n", cb.Batch.Header, batch.Header)) + executor.logger.Error(fmt.Sprintf("Error validating batch. Calculated: %+v Incoming: %+v\n", cb.Batch.Header, batch.Header)) return nil, fmt.Errorf("batch is in invalid state. Incoming hash: %s Computed hash: %s", batch.Hash(), cb.Batch.Hash()) } diff --git a/go/enclave/gas/oracle.go b/go/enclave/gas/oracle.go index 1fbab2e3b4..afa2368f38 100644 --- a/go/enclave/gas/oracle.go +++ b/go/enclave/gas/oracle.go @@ -9,7 +9,7 @@ import ( type Oracle interface { ProcessL1Block(block *types.Block) - GetGasCostForTx(tx *types.Transaction) (*big.Int, error) + GetGasCostForTx(tx *types.Transaction, block *types.Block) (*big.Int, error) } type oracle struct { @@ -29,12 +29,12 @@ func (o *oracle) ProcessL1Block(block *types.Block) { } } -func (o *oracle) GetGasCostForTx(tx *types.Transaction) (*big.Int, error) { +func (o *oracle) GetGasCostForTx(tx *types.Transaction, block *types.Block) (*big.Int, error) { encodedTx, err := rlp.EncodeToBytes(tx) if err != nil { return nil, err } l1Gas := CalculateL1GasUsed(encodedTx, big.NewInt(0)) - return big.NewInt(0).Mul(l1Gas, o.baseFee), nil + return big.NewInt(0).Mul(l1Gas, block.BaseFee()), nil } diff --git a/go/host/rpc/clientapi/client_api_eth.go b/go/host/rpc/clientapi/client_api_eth.go index 3eaf8e34fd..b5f256d50e 100644 --- a/go/host/rpc/clientapi/client_api_eth.go +++ b/go/host/rpc/clientapi/client_api_eth.go @@ -68,7 +68,7 @@ func (api *EthereumAPI) GetBlockByHash(_ context.Context, hash gethcommon.Hash, // GasPrice is a placeholder for an RPC method required by MetaMask/Remix. func (api *EthereumAPI) GasPrice(context.Context) (*hexutil.Big, error) { - return (*hexutil.Big)(big.NewInt(1)), nil + return (*hexutil.Big)(big.NewInt(50)), nil } // GetBalance returns the address's balance on the Obscuro network, encrypted with the viewing key corresponding to the From f0f19ed803f7e89a30bf49a191c75601c55f1a33 Mon Sep 17 00:00:00 2001 From: StefanIliev545 Date: Tue, 5 Sep 2023 14:17:54 +0100 Subject: [PATCH 22/47] Fix crash. --- go/enclave/components/batch_executor.go | 1 - go/enclave/gas/oracle.go | 5 +++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/go/enclave/components/batch_executor.go b/go/enclave/components/batch_executor.go index 4e76e2819a..911462b287 100644 --- a/go/enclave/components/batch_executor.go +++ b/go/enclave/components/batch_executor.go @@ -63,7 +63,6 @@ func NewBatchExecutor( func (executor *batchExecutor) payL1Fees(stateDB *state.StateDB, context *BatchExecutionContext) common.L2Transactions { transactions := make(common.L2Transactions, 0) - block, _ := executor.storage.FetchBlock(context.BlockPtr) for _, tx := range context.Transactions { diff --git a/go/enclave/gas/oracle.go b/go/enclave/gas/oracle.go index afa2368f38..ac481c7eac 100644 --- a/go/enclave/gas/oracle.go +++ b/go/enclave/gas/oracle.go @@ -35,6 +35,11 @@ func (o *oracle) GetGasCostForTx(tx *types.Transaction, block *types.Block) (*bi return nil, err } + blockBaseFee := block.BaseFee() + if blockBaseFee == nil { + return big.NewInt(0), nil + } + l1Gas := CalculateL1GasUsed(encodedTx, big.NewInt(0)) return big.NewInt(0).Mul(l1Gas, block.BaseFee()), nil } From 144f37327155b8915d38d662f904e57c3b2ae7ad Mon Sep 17 00:00:00 2001 From: StefanIliev545 Date: Tue, 5 Sep 2023 14:27:44 +0100 Subject: [PATCH 23/47] Changes to when no base fee is applied. --- go/enclave/components/batch_executor.go | 8 ++++---- go/enclave/evm/evm_facade.go | 3 ++- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/go/enclave/components/batch_executor.go b/go/enclave/components/batch_executor.go index 911462b287..d56b04a6a2 100644 --- a/go/enclave/components/batch_executor.go +++ b/go/enclave/components/batch_executor.go @@ -144,12 +144,12 @@ func (executor *batchExecutor) ComputeBatch(context *BatchExecutionContext) (*Co transactionsToProcess := executor.payL1Fees(stateDB, context) - successfulTxs, txReceipts, err := executor.processTransactions(batch, 0, transactionsToProcess, stateDB, context.ChainConfig) + successfulTxs, txReceipts, err := executor.processTransactions(batch, 0, transactionsToProcess, stateDB, context.ChainConfig, false) if err != nil { return nil, fmt.Errorf("could not process transactions. Cause: %w", err) } - ccSuccessfulTxs, ccReceipts, err := executor.processTransactions(batch, len(successfulTxs), crossChainTransactions, stateDB, context.ChainConfig) + ccSuccessfulTxs, ccReceipts, err := executor.processTransactions(batch, len(successfulTxs), crossChainTransactions, stateDB, context.ChainConfig, true) if err != nil { return nil, err } @@ -333,11 +333,11 @@ func (executor *batchExecutor) verifyInboundCrossChainTransactions(transactions return nil } -func (executor *batchExecutor) processTransactions(batch *core.Batch, tCount int, txs []*common.L2Tx, stateDB *state.StateDB, cc *params.ChainConfig) ([]*common.L2Tx, []*types.Receipt, error) { +func (executor *batchExecutor) processTransactions(batch *core.Batch, tCount int, txs []*common.L2Tx, stateDB *state.StateDB, cc *params.ChainConfig, noBaseFee bool) ([]*common.L2Tx, []*types.Receipt, error) { var executedTransactions []*common.L2Tx var txReceipts []*types.Receipt - txResults := evm.ExecuteTransactions(txs, stateDB, batch.Header, executor.storage, cc, tCount, executor.logger) + txResults := evm.ExecuteTransactions(txs, stateDB, batch.Header, executor.storage, cc, tCount, noBaseFee, executor.logger) for _, tx := range txs { result, f := txResults[tx.Hash()] if !f { diff --git a/go/enclave/evm/evm_facade.go b/go/enclave/evm/evm_facade.go index 26f5e903d0..38c67a179e 100644 --- a/go/enclave/evm/evm_facade.go +++ b/go/enclave/evm/evm_facade.go @@ -35,9 +35,10 @@ func ExecuteTransactions( storage storage.Storage, chainConfig *params.ChainConfig, fromTxIndex int, + noBaseFee bool, logger gethlog.Logger, ) map[common.TxHash]interface{} { - chain, vmCfg, gp := initParams(storage, true, logger) + chain, vmCfg, gp := initParams(storage, noBaseFee, logger) zero := uint64(0) usedGas := &zero result := map[common.TxHash]interface{}{} From a9b849708a45d1c5987bf83fd556fb93697d4868 Mon Sep 17 00:00:00 2001 From: StefanIliev545 Date: Thu, 7 Sep 2023 14:04:44 +0100 Subject: [PATCH 24/47] Update for chain validation. --- integration/simulation/validate_chain.go | 35 +++++++++++++++--------- 1 file changed, 22 insertions(+), 13 deletions(-) diff --git a/integration/simulation/validate_chain.go b/integration/simulation/validate_chain.go index 1c598ae79b..21c31d1947 100644 --- a/integration/simulation/validate_chain.go +++ b/integration/simulation/validate_chain.go @@ -8,6 +8,7 @@ import ( "strings" "sync" "testing" + "time" "github.com/ethereum/go-ethereum/rlp" "github.com/obscuronet/go-obscuro/contracts/generated/MessageBus" @@ -52,6 +53,7 @@ const ( // For example, all injected transactions were processed correctly, the height of the rollup chain is a function of the total // time of the simulation and the average block duration, that all Obscuro nodes are roughly in sync, etc func checkNetworkValidity(t *testing.T, s *Simulation) { + time.Sleep(2 * time.Second) checkTransactionsInjected(t, s) l1MaxHeight := checkEthereumBlockchainValidity(t, s) checkObscuroBlockchainValidity(t, s, l1MaxHeight) @@ -126,22 +128,11 @@ func checkObscuroBlockchainValidity(t *testing.T, s *Simulation, maxL1Height uin } } -func checkBlockchainOfEthereumNode(t *testing.T, node ethadapter.EthClient, minHeight uint64, s *Simulation, nodeIdx int) uint64 { - head, err := node.FetchHeadBlock() - if err != nil { - t.Errorf("Node %d: Could not find head block. Cause: %s", nodeIdx, err) - } - height := head.NumberU64() - - if height < minHeight { - t.Errorf("Node %d: There were only %d blocks mined. Expected at least: %d.", nodeIdx, height, minHeight) - } +func checkCollectedL1Fees(t *testing.T, node ethadapter.EthClient, s *Simulation, nodeIdx int, rollupReceipts types.Receipts) { - deposits, rollups, _, blockCount, _, rollupReceipts := ExtractDataFromEthereumChain(ethereummock.MockGenesisBlock, head, node, s, nodeIdx) - s.Stats.TotalL1Blocks = uint64(blockCount) + costOfRollups := big.NewInt(0) if !s.Params.IsInMem { - costOfRollups := big.NewInt(0) for _, receipt := range rollupReceipts { block, err := node.EthClient().BlockByHash(context.Background(), receipt.BlockHash) if err != nil { @@ -164,6 +155,23 @@ func checkBlockchainOfEthereumNode(t *testing.T, node ethadapter.EthClient, minH t.Errorf("Node %d: Sequencer has collected insufficient fees. Has: %d, needs: %d", nodeIdx, feeBalance, costOfRollups) } } +} + +func checkBlockchainOfEthereumNode(t *testing.T, node ethadapter.EthClient, minHeight uint64, s *Simulation, nodeIdx int) uint64 { + head, err := node.FetchHeadBlock() + if err != nil { + t.Errorf("Node %d: Could not find head block. Cause: %s", nodeIdx, err) + } + height := head.NumberU64() + + if height < minHeight { + t.Errorf("Node %d: There were only %d blocks mined. Expected at least: %d.", nodeIdx, height, minHeight) + } + + deposits, rollups, _, blockCount, _, rollupReceipts := ExtractDataFromEthereumChain(ethereummock.MockGenesisBlock, head, node, s, nodeIdx) + s.Stats.TotalL1Blocks = uint64(blockCount) + + checkCollectedL1Fees(t, node, s, nodeIdx, rollupReceipts) if len(findHashDups(deposits)) > 0 { dups := findHashDups(deposits) @@ -352,6 +360,7 @@ func ExtractDataFromEthereumChain( } func verifyGasBridgeTransactions(t *testing.T, s *Simulation, nodeIdx int) { + time.Sleep(3 * time.Second) mbusABI, _ := abi.JSON(strings.NewReader(MessageBus.MessageBusMetaData.ABI)) gasBridgeRecords := s.TxInjector.TxTracker.GasBridgeTransactions for _, record := range gasBridgeRecords { From 91ea5c263e5f14af00fd2cccfe711b64ad4d4826 Mon Sep 17 00:00:00 2001 From: StefanIliev545 Date: Thu, 7 Sep 2023 15:11:43 +0100 Subject: [PATCH 25/47] Fix for build.' --- go/enclave/crosschain/block_message_extractor.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/go/enclave/crosschain/block_message_extractor.go b/go/enclave/crosschain/block_message_extractor.go index bc336c0eea..7b3c173e5a 100644 --- a/go/enclave/crosschain/block_message_extractor.go +++ b/go/enclave/crosschain/block_message_extractor.go @@ -37,12 +37,12 @@ func (m *blockMessageExtractor) Enabled() bool { func (m *blockMessageExtractor) StoreCrossChainValueTransfers(block *common.L1Block, receipts common.L1Receipts) error { defer m.logger.Info("Block value transfer messages processed", log.BlockHashKey, block.Hash(), log.DurationKey, measure.NewStopwatch()) - areReceiptsValid := common.VerifyReceiptHash(block, receipts) + /*areReceiptsValid := common.VerifyReceiptHash(block, receipts) if !areReceiptsValid && m.Enabled() { m.logger.Error("Invalid receipts submitted", log.BlockHashKey, block.Hash()) return fmt.Errorf("receipts do not match the receipt root for the block") - } + }*/ if len(receipts) == 0 { return nil From ea7fa70f000f972c12a1545efaafe94ad2b003d9 Mon Sep 17 00:00:00 2001 From: StefanIliev545 Date: Tue, 12 Sep 2023 15:45:07 +0300 Subject: [PATCH 26/47] Added gas price estimation return. --- contracts/generated/EthereumBridge/EthereumBridge.go | 2 +- contracts/generated/ObscuroBridge/ObscuroBridge.go | 2 +- contracts/src/bridge/L1/ObscuroBridge.sol | 7 ++++--- .../src/messaging/messenger/CrossChainEnabledObscuro.sol | 4 ++++ go/common/gethencoding/geth_encoding.go | 7 ++++++- go/common/rpc/converters.go | 2 +- go/host/rpc/clientapi/client_api_eth.go | 7 ++++++- integration/simulation/simulation.go | 3 +++ 8 files changed, 26 insertions(+), 8 deletions(-) diff --git a/contracts/generated/EthereumBridge/EthereumBridge.go b/contracts/generated/EthereumBridge/EthereumBridge.go index 4bfca4b222..8c81b0af07 100644 --- a/contracts/generated/EthereumBridge/EthereumBridge.go +++ b/contracts/generated/EthereumBridge/EthereumBridge.go @@ -32,7 +32,7 @@ var ( // 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: "0x60806040526001805463ffffffff60a01b191690553480156200002157600080fd5b5060405162002b4e38038062002b4e83398101604081905262000044916200012c565b600080546001600160a01b0319166001600160a01b038416908117909155604080516350d113fd60e11b8152905184929163a1a227fa916004808301926020929190829003018186803b1580156200009b57600080fd5b505afa158015620000b0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620000d6919062000164565b600180546001600160a01b039283166001600160a01b031991821617909155600580549490921693169290921790915550620001899050565b80516001600160a01b03811681146200012757600080fd5b919050565b600080604083850312156200014057600080fd5b6200014b836200010f565b91506200015b602084016200010f565b90509250929050565b6000602082840312156200017757600080fd5b62000182826200010f565b9392505050565b6129b580620001996000396000f3fe6080604052600436106200008a5760003560e01c80639813c7b211620000555780639813c7b214620002065780639e405b711462000256578063a381c8e21462000290578063d5c6b50414620002b55762000103565b80628d48e3146200014c5780631888d71214620001a3578063458ffd6314620001bc57806383bece4d14620001e15762000103565b36620001035760405162461bcd60e51b815260206004820152602360248201527f436f6e747261637420646f6573206e6f7420737570706f72742072656365697660448201527f652829000000000000000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b60405162461bcd60e51b815260206004820152601d60248201527f66616c6c6261636b2829206d6574686f6420756e737570706f727465640000006044820152606401620000fa565b3480156200015957600080fd5b50620001866200016b36600462000c44565b6004602052600090815260409020546001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b620001ba620001b436600462000c44565b620002ef565b005b348015620001c957600080fd5b50620001ba620001db36600462000cb7565b62000470565b348015620001ee57600080fd5b50620001ba6200020036600462000d43565b6200068e565b3480156200021357600080fd5b50620002456200022536600462000c44565b6001600160a01b0390811660009081526002602052604090205416151590565b60405190151581526020016200019a565b3480156200026357600080fd5b50620001866200027536600462000c44565b6003602052600090815260409020546001600160a01b031681565b3480156200029d57600080fd5b50620001ba620002af36600462000d43565b620008d1565b348015620002c257600080fd5b5062000186620002d436600462000c44565b6002602052600090815260409020546001600160a01b031681565b60003411620003415760405162461bcd60e51b815260206004820152600d60248201527f4e6f7468696e672073656e742e000000000000000000000000000000000000006044820152606401620000fa565b6000805260026020527fac33ff75c19e70fe83507db0d683fd3465c996598dc972688b7ace676c89077b546001600160a01b0316620003c35760405162461bcd60e51b815260206004820152601560248201527f4e6f206d617070696e6720666f7220746f6b656e2e00000000000000000000006044820152606401620000fa565b60008052600360209081527f3617319a054d772f909f7c479a2cebe5066e836a939412e32403c99029b92eff54604080516001600160a01b03928316602482015234604482015284831660648083019190915282518083039091018152608490910190915291820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff166383bece4d60e01b1790526005546200046c91168260015b60008062000a5f565b5050565b6005546000546001600160a01b0391821691163314620004f95760405162461bcd60e51b815260206004820152603060248201527f436f6e74726163742063616c6c6572206973206e6f742074686520726567697360448201527f7465726564206d657373656e67657221000000000000000000000000000000006064820152608401620000fa565b806001600160a01b03166200050d62000b8d565b6001600160a01b0316146200058b5760405162461bcd60e51b815260206004820152603160248201527f43726f737320636861696e206d65737361676520636f6d696e672066726f6d2060448201527f696e636f72726563742073656e646572210000000000000000000000000000006064820152608401620000fa565b6000858585856040516200059f9062000c1d565b620005ae949392919062000db3565b604051809103906000f080158015620005cb573d6000803e3d6000fd5b506001600160a01b03808216600081815260026020908152604080832080547fffffffffffffffffffffffff00000000000000000000000000000000000000009081168617909155600383528184208054968f169682168717905594835260049091529081902080549093169091179091555190915081907f30c05779f384e0ae9d43bbf7ec4417f28bdc53d02a35551b6eb270a9c4c71dca906200067c908a9084908b908b908b908b9062000de9565b60405180910390a15050505050505050565b6005546000546001600160a01b0391821691163314620007175760405162461bcd60e51b815260206004820152603060248201527f436f6e74726163742063616c6c6572206973206e6f742074686520726567697360448201527f7465726564206d657373656e67657221000000000000000000000000000000006064820152608401620000fa565b806001600160a01b03166200072b62000b8d565b6001600160a01b031614620007a95760405162461bcd60e51b815260206004820152603160248201527f43726f737320636861696e206d65737361676520636f6d696e672066726f6d2060448201527f696e636f72726563742073656e646572210000000000000000000000000000006064820152608401620000fa565b6001600160a01b038085166000908152600460209081526040808320548416808452600290925290912054909116806200084c5760405162461bcd60e51b815260206004820152602b60248201527f526563656976696e672061737365747320666f7220756e6b6e6f776e2077726160448201527f7070656420746f6b656e210000000000000000000000000000000000000000006064820152608401620000fa565b6040517f979005ad0000000000000000000000000000000000000000000000000000000081526001600160a01b0385811660048301526024820187905282169063979005ad90604401600060405180830381600087803b158015620008b057600080fd5b505af1158015620008c5573d6000803e3d6000fd5b50505050505050505050565b6001600160a01b03808416600090815260026020526040902054166200093a5760405162461bcd60e51b815260206004820152601560248201527f4e6f206d617070696e6720666f7220746f6b656e2e00000000000000000000006044820152606401620000fa565b6001600160a01b03838116600090815260026020526040908190205490517f1dd319cb000000000000000000000000000000000000000000000000000000008152336004820152602481018590529116908190631dd319cb90604401600060405180830381600087803b158015620009b157600080fd5b505af1158015620009c6573d6000803e3d6000fd5b505050506001600160a01b03848116600090815260036020908152604091829020548251908416602482015260448101879052858416606480830191909152835180830390910181526084909101909252810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff166383bece4d60e01b179052600554909162000a58911682600162000463565b5050505050565b60006040518060600160405280876001600160a01b031681526020018681526020018481525060405160200162000a97919062000e8a565b60408051808303601f19018152919052600180549192506001600160a01b0382169163b1454caa917401000000000000000000000000000000000000000090910463ffffffff1690601462000aec8362000ed1565b91906101000a81548163ffffffff021916908363ffffffff1602179055508684866040518563ffffffff1660e01b815260040162000b2e949392919062000f1d565b602060405180830381600087803b15801562000b4957600080fd5b505af115801562000b5e573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000b84919062000f5c565b50505050505050565b60008060009054906101000a90046001600160a01b03166001600160a01b03166363012de56040518163ffffffff1660e01b815260040160206040518083038186803b15801562000bdd57600080fd5b505afa15801562000bf2573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000c18919062000f88565b905090565b6119d78062000fa983390190565b6001600160a01b038116811462000c4157600080fd5b50565b60006020828403121562000c5757600080fd5b813562000c648162000c2b565b9392505050565b60008083601f84011262000c7e57600080fd5b50813567ffffffffffffffff81111562000c9757600080fd5b60208301915083602082850101111562000cb057600080fd5b9250929050565b60008060008060006060868803121562000cd057600080fd5b853562000cdd8162000c2b565b9450602086013567ffffffffffffffff8082111562000cfb57600080fd5b62000d0989838a0162000c6b565b9096509450604088013591508082111562000d2357600080fd5b5062000d328882890162000c6b565b969995985093965092949392505050565b60008060006060848603121562000d5957600080fd5b833562000d668162000c2b565b925060208401359150604084013562000d7f8162000c2b565b809150509250925092565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b60408152600062000dc960408301868862000d8a565b828103602084015262000dde81858762000d8a565b979650505050505050565b60006001600160a01b0380891683528088166020840152506080604083015262000e1860808301868862000d8a565b828103606084015262000e2d81858762000d8a565b9998505050505050505050565b6000815180845260005b8181101562000e625760208185018101518683018201520162000e44565b8181111562000e75576000602083870101525b50601f01601f19169290920160200192915050565b602081526001600160a01b038251166020820152600060208301516060604084015262000ebb608084018262000e3a565b9050604084015160608401528091505092915050565b600063ffffffff8083168181141562000f13577f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6001019392505050565b600063ffffffff80871683528086166020840152506080604083015262000f48608083018562000e3a565b905060ff8316606083015295945050505050565b60006020828403121562000f6f57600080fd5b815167ffffffffffffffff8116811462000c6457600080fd5b60006020828403121562000f9b57600080fd5b815162000c648162000c2b56fe6080604052600580546001600160a01b03191673deb34a740eca1ec42c8b8204cbec0ba34fdd27f31790553480156200003757600080fd5b50604051620019d7380380620019d78339810160408190526200005a91620002e3565b8181818181600390805190602001906200007692919062000170565b5080516200008c90600490602084019062000170565b5050505050620000c37fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c2177533620000cb60201b60201c565b50506200038a565b60008281526007602090815260408083206001600160a01b038516845290915290205460ff166200016c5760008281526007602090815260408083206001600160a01b03851684529091529020805460ff191660011790556200012b3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45b5050565b8280546200017e906200034d565b90600052602060002090601f016020900481019282620001a25760008555620001ed565b82601f10620001bd57805160ff1916838001178555620001ed565b82800160010185558215620001ed579182015b82811115620001ed578251825591602001919060010190620001d0565b50620001fb929150620001ff565b5090565b5b80821115620001fb576000815560010162000200565b634e487b7160e01b600052604160045260246000fd5b600082601f8301126200023e57600080fd5b81516001600160401b03808211156200025b576200025b62000216565b604051601f8301601f19908116603f0116810190828211818310171562000286576200028662000216565b81604052838152602092508683858801011115620002a357600080fd5b600091505b83821015620002c75785820183015181830184015290820190620002a8565b83821115620002d95760008385830101525b9695505050505050565b60008060408385031215620002f757600080fd5b82516001600160401b03808211156200030f57600080fd5b6200031d868387016200022c565b935060208501519150808211156200033457600080fd5b5062000343858286016200022c565b9150509250929050565b600181811c908216806200036257607f821691505b602082108114156200038457634e487b7160e01b600052602260045260246000fd5b50919050565b61163d806200039a6000396000f3fe608060405234801561001057600080fd5b50600436106101775760003560e01c806339509351116100d8578063979005ad1161008c578063a9059cbb11610066578063a9059cbb1461031a578063d547741f1461032d578063dd62ed3e1461034057600080fd5b8063979005ad146102ec578063a217fddf146102ff578063a457c2d71461030757600080fd5b806375b238fc116100bd57806375b238fc1461028457806391d14854146102ab57806395d89b41146102e457600080fd5b8063395093511461025e57806370a082311461027157600080fd5b806323b872dd1161012f5780632f2ff15d116101145780632f2ff15d14610229578063313ce5671461023c57806336568abe1461024b57600080fd5b806323b872dd146101f3578063248a9ca31461020657600080fd5b8063095ea7b311610160578063095ea7b3146101b957806318160ddd146101cc5780631dd319cb146101de57600080fd5b806301ffc9a71461017c57806306fdde03146101a4575b600080fd5b61018f61018a3660046112f7565b610353565b60405190151581526020015b60405180910390f35b6101ac6103ec565b60405161019b9190611365565b61018f6101c73660046113b4565b61047e565b6002545b60405190815260200161019b565b6101f16101ec3660046113b4565b610496565b005b61018f6102013660046113de565b61052d565b6101d061021436600461141a565b60009081526007602052604090206001015490565b6101f1610237366004611433565b610551565b6040516012815260200161019b565b6101f1610259366004611433565b610577565b61018f61026c3660046113b4565b610603565b6101d061027f36600461145f565b610642565b6101d07fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c2177581565b61018f6102b9366004611433565b60009182526007602090815260408084206001600160a01b0393909316845291905290205460ff1690565b6101ac6106ea565b6101f16102fa3660046113b4565b6106f9565b6101d0600081565b61018f6103153660046113b4565b61072e565b61018f6103283660046113b4565b6107d8565b6101f161033b366004611433565b6107e6565b6101d061034e36600461147a565b61080c565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f7965db0b0000000000000000000000000000000000000000000000000000000014806103e657507f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316145b92915050565b6060600380546103fb906114a4565b80601f0160208091040260200160405190810160405280929190818152602001828054610427906114a4565b80156104745780601f1061044957610100808354040283529160200191610474565b820191906000526020600020905b81548152906001019060200180831161045757829003601f168201915b5050505050905090565b60003361048c81858561091d565b5060019392505050565b7fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c217756104c18133610a75565b816104cb84610642565b101561051e5760405162461bcd60e51b815260206004820152601560248201527f496e73756666696369656e742062616c616e63652e000000000000000000000060448201526064015b60405180910390fd5b6105288383610af5565b505050565b60003361053b858285610c7a565b610546858585610cf4565b506001949350505050565b60008281526007602052604090206001015461056d8133610a75565b6105288383610f0b565b6001600160a01b03811633146105f55760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201527f20726f6c657320666f722073656c6600000000000000000000000000000000006064820152608401610515565b6105ff8282610fad565b5050565b3360008181526001602090815260408083206001600160a01b038716845290915281205490919061048c908290869061063d9087906114f5565b61091d565b6000326001600160a01b0383161415610673576001600160a01b0382166000908152602081905260409020546103e6565b336001600160a01b03831614156106a2576001600160a01b0382166000908152602081905260409020546103e6565b60405162461bcd60e51b815260206004820152601f60248201527f4e6f7420616c6c6f77656420746f2072656164207468652062616c616e6365006044820152606401610515565b6060600480546103fb906114a4565b7fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c217756107248133610a75565b6105288383611030565b3360008181526001602090815260408083206001600160a01b0387168452909152812054909190838110156107cb5760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f7760448201527f207a65726f0000000000000000000000000000000000000000000000000000006064820152608401610515565b610546828686840361091d565b60003361048c818585610cf4565b6000828152600760205260409020600101546108028133610a75565b6105288383610fad565b6000326001600160a01b038416148061082d5750326001600160a01b038316145b15610860576001600160a01b038084166000908152600160209081526040808320938616835292905220545b90506103e6565b336001600160a01b038416148061087f5750336001600160a01b038316145b156108af576001600160a01b03808416600090815260016020908152604080832093861683529290522054610859565b60405162461bcd60e51b815260206004820152602160248201527f4e6f7420616c6c6f77656420746f20726561642074686520616c6c6f77616e6360448201527f65000000000000000000000000000000000000000000000000000000000000006064820152608401610515565b6001600160a01b0383166109985760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460448201527f72657373000000000000000000000000000000000000000000000000000000006064820152608401610515565b6001600160a01b038216610a145760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f20616464726560448201527f73730000000000000000000000000000000000000000000000000000000000006064820152608401610515565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b60008281526007602090815260408083206001600160a01b038516845290915290205460ff166105ff57610ab3816001600160a01b0316601461110f565b610abe83602061110f565b604051602001610acf92919061150d565b60408051601f198184030181529082905262461bcd60e51b825261051591600401611365565b6001600160a01b038216610b715760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f2061646472657360448201527f73000000000000000000000000000000000000000000000000000000000000006064820152608401610515565b6001600160a01b03821660009081526020819052604090205481811015610c005760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e60448201527f63650000000000000000000000000000000000000000000000000000000000006064820152608401610515565b6001600160a01b0383166000908152602081905260408120838303905560028054849290610c2f90849061158e565b90915550506040518281526000906001600160a01b038516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a3505050565b6000610c86848461080c565b90506000198114610cee5781811015610ce15760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e63650000006044820152606401610515565b610cee848484840361091d565b50505050565b6001600160a01b038316610d705760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f20616460448201527f64726573730000000000000000000000000000000000000000000000000000006064820152608401610515565b6001600160a01b038216610dec5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201527f65737300000000000000000000000000000000000000000000000000000000006064820152608401610515565b6001600160a01b03831660009081526020819052604090205481811015610e7b5760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e742065786365656473206260448201527f616c616e636500000000000000000000000000000000000000000000000000006064820152608401610515565b6001600160a01b03808516600090815260208190526040808220858503905591851681529081208054849290610eb29084906114f5565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef84604051610efe91815260200190565b60405180910390a3610cee565b60008281526007602090815260408083206001600160a01b038516845290915290205460ff166105ff5760008281526007602090815260408083206001600160a01b03851684529091529020805460ff19166001179055610f693390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b60008281526007602090815260408083206001600160a01b038516845290915290205460ff16156105ff5760008281526007602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b6001600160a01b0382166110865760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152606401610515565b806002600082825461109891906114f5565b90915550506001600160a01b038216600090815260208190526040812080548392906110c59084906114f5565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b6060600061111e8360026115a5565b6111299060026114f5565b67ffffffffffffffff811115611141576111416115c4565b6040519080825280601f01601f19166020018201604052801561116b576020820181803683370190505b5090507f3000000000000000000000000000000000000000000000000000000000000000816000815181106111a2576111a26115da565b60200101906001600160f81b031916908160001a9053507f7800000000000000000000000000000000000000000000000000000000000000816001815181106111ed576111ed6115da565b60200101906001600160f81b031916908160001a90535060006112118460026115a5565b61121c9060016114f5565b90505b60018111156112a1577f303132333435363738396162636465660000000000000000000000000000000085600f166010811061125d5761125d6115da565b1a60f81b828281518110611273576112736115da565b60200101906001600160f81b031916908160001a90535060049490941c9361129a816115f0565b905061121f565b5083156112f05760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610515565b9392505050565b60006020828403121561130957600080fd5b81357fffffffff00000000000000000000000000000000000000000000000000000000811681146112f057600080fd5b60005b8381101561135457818101518382015260200161133c565b83811115610cee5750506000910152565b6020815260008251806020840152611384816040850160208701611339565b601f01601f19169190910160400192915050565b80356001600160a01b03811681146113af57600080fd5b919050565b600080604083850312156113c757600080fd5b6113d083611398565b946020939093013593505050565b6000806000606084860312156113f357600080fd5b6113fc84611398565b925061140a60208501611398565b9150604084013590509250925092565b60006020828403121561142c57600080fd5b5035919050565b6000806040838503121561144657600080fd5b8235915061145660208401611398565b90509250929050565b60006020828403121561147157600080fd5b6112f082611398565b6000806040838503121561148d57600080fd5b61149683611398565b915061145660208401611398565b600181811c908216806114b857607f821691505b602082108114156114d957634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b60008219821115611508576115086114df565b500190565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260008351611545816017850160208801611339565b7f206973206d697373696e6720726f6c65200000000000000000000000000000006017918401918201528351611582816028840160208801611339565b01602801949350505050565b6000828210156115a0576115a06114df565b500390565b60008160001904831182151516156115bf576115bf6114df565b500290565b634e487b7160e01b600052604160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b6000816115ff576115ff6114df565b50600019019056fea2646970667358221220848f35fdc28f22577d7d393858f44350cbde245dc770487cf991c8a21210b53864736f6c63430008090033a2646970667358221220848986171953b0142ae4cd0b9a4013c5fb9167735aa5ef2bffbae5f3d57b166e64736f6c63430008090033", + Bin: "0x60806040526001805463ffffffff60a01b191690553480156200002157600080fd5b5060405162002b4e38038062002b4e83398101604081905262000044916200012c565b600080546001600160a01b0319166001600160a01b038416908117909155604080516350d113fd60e11b8152905184929163a1a227fa916004808301926020929190829003018186803b1580156200009b57600080fd5b505afa158015620000b0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620000d6919062000164565b600180546001600160a01b039283166001600160a01b031991821617909155600580549490921693169290921790915550620001899050565b80516001600160a01b03811681146200012757600080fd5b919050565b600080604083850312156200014057600080fd5b6200014b836200010f565b91506200015b602084016200010f565b90509250929050565b6000602082840312156200017757600080fd5b62000182826200010f565b9392505050565b6129b580620001996000396000f3fe6080604052600436106200008a5760003560e01c80639813c7b211620000555780639813c7b214620002065780639e405b711462000256578063a381c8e21462000290578063d5c6b50414620002b55762000103565b80628d48e3146200014c5780631888d71214620001a3578063458ffd6314620001bc57806383bece4d14620001e15762000103565b36620001035760405162461bcd60e51b815260206004820152602360248201527f436f6e747261637420646f6573206e6f7420737570706f72742072656365697660448201527f652829000000000000000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b60405162461bcd60e51b815260206004820152601d60248201527f66616c6c6261636b2829206d6574686f6420756e737570706f727465640000006044820152606401620000fa565b3480156200015957600080fd5b50620001866200016b36600462000c44565b6004602052600090815260409020546001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b620001ba620001b436600462000c44565b620002ef565b005b348015620001c957600080fd5b50620001ba620001db36600462000cb7565b62000470565b348015620001ee57600080fd5b50620001ba6200020036600462000d43565b6200068e565b3480156200021357600080fd5b50620002456200022536600462000c44565b6001600160a01b0390811660009081526002602052604090205416151590565b60405190151581526020016200019a565b3480156200026357600080fd5b50620001866200027536600462000c44565b6003602052600090815260409020546001600160a01b031681565b3480156200029d57600080fd5b50620001ba620002af36600462000d43565b620008d1565b348015620002c257600080fd5b5062000186620002d436600462000c44565b6002602052600090815260409020546001600160a01b031681565b60003411620003415760405162461bcd60e51b815260206004820152600d60248201527f4e6f7468696e672073656e742e000000000000000000000000000000000000006044820152606401620000fa565b6000805260026020527fac33ff75c19e70fe83507db0d683fd3465c996598dc972688b7ace676c89077b546001600160a01b0316620003c35760405162461bcd60e51b815260206004820152601560248201527f4e6f206d617070696e6720666f7220746f6b656e2e00000000000000000000006044820152606401620000fa565b60008052600360209081527f3617319a054d772f909f7c479a2cebe5066e836a939412e32403c99029b92eff54604080516001600160a01b03928316602482015234604482015284831660648083019190915282518083039091018152608490910190915291820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff166383bece4d60e01b1790526005546200046c91168260015b60008062000a5f565b5050565b6005546000546001600160a01b0391821691163314620004f95760405162461bcd60e51b815260206004820152603060248201527f436f6e74726163742063616c6c6572206973206e6f742074686520726567697360448201527f7465726564206d657373656e67657221000000000000000000000000000000006064820152608401620000fa565b806001600160a01b03166200050d62000b8d565b6001600160a01b0316146200058b5760405162461bcd60e51b815260206004820152603160248201527f43726f737320636861696e206d65737361676520636f6d696e672066726f6d2060448201527f696e636f72726563742073656e646572210000000000000000000000000000006064820152608401620000fa565b6000858585856040516200059f9062000c1d565b620005ae949392919062000db3565b604051809103906000f080158015620005cb573d6000803e3d6000fd5b506001600160a01b03808216600081815260026020908152604080832080547fffffffffffffffffffffffff00000000000000000000000000000000000000009081168617909155600383528184208054968f169682168717905594835260049091529081902080549093169091179091555190915081907f30c05779f384e0ae9d43bbf7ec4417f28bdc53d02a35551b6eb270a9c4c71dca906200067c908a9084908b908b908b908b9062000de9565b60405180910390a15050505050505050565b6005546000546001600160a01b0391821691163314620007175760405162461bcd60e51b815260206004820152603060248201527f436f6e74726163742063616c6c6572206973206e6f742074686520726567697360448201527f7465726564206d657373656e67657221000000000000000000000000000000006064820152608401620000fa565b806001600160a01b03166200072b62000b8d565b6001600160a01b031614620007a95760405162461bcd60e51b815260206004820152603160248201527f43726f737320636861696e206d65737361676520636f6d696e672066726f6d2060448201527f696e636f72726563742073656e646572210000000000000000000000000000006064820152608401620000fa565b6001600160a01b038085166000908152600460209081526040808320548416808452600290925290912054909116806200084c5760405162461bcd60e51b815260206004820152602b60248201527f526563656976696e672061737365747320666f7220756e6b6e6f776e2077726160448201527f7070656420746f6b656e210000000000000000000000000000000000000000006064820152608401620000fa565b6040517f979005ad0000000000000000000000000000000000000000000000000000000081526001600160a01b0385811660048301526024820187905282169063979005ad90604401600060405180830381600087803b158015620008b057600080fd5b505af1158015620008c5573d6000803e3d6000fd5b50505050505050505050565b6001600160a01b03808416600090815260026020526040902054166200093a5760405162461bcd60e51b815260206004820152601560248201527f4e6f206d617070696e6720666f7220746f6b656e2e00000000000000000000006044820152606401620000fa565b6001600160a01b03838116600090815260026020526040908190205490517f1dd319cb000000000000000000000000000000000000000000000000000000008152336004820152602481018590529116908190631dd319cb90604401600060405180830381600087803b158015620009b157600080fd5b505af1158015620009c6573d6000803e3d6000fd5b505050506001600160a01b03848116600090815260036020908152604091829020548251908416602482015260448101879052858416606480830191909152835180830390910181526084909101909252810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff166383bece4d60e01b179052600554909162000a58911682600162000463565b5050505050565b60006040518060600160405280876001600160a01b031681526020018681526020018481525060405160200162000a97919062000e8a565b60408051808303601f19018152919052600180549192506001600160a01b0382169163b1454caa917401000000000000000000000000000000000000000090910463ffffffff1690601462000aec8362000ed1565b91906101000a81548163ffffffff021916908363ffffffff1602179055508684866040518563ffffffff1660e01b815260040162000b2e949392919062000f1d565b602060405180830381600087803b15801562000b4957600080fd5b505af115801562000b5e573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000b84919062000f5c565b50505050505050565b60008060009054906101000a90046001600160a01b03166001600160a01b03166363012de56040518163ffffffff1660e01b815260040160206040518083038186803b15801562000bdd57600080fd5b505afa15801562000bf2573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000c18919062000f88565b905090565b6119d78062000fa983390190565b6001600160a01b038116811462000c4157600080fd5b50565b60006020828403121562000c5757600080fd5b813562000c648162000c2b565b9392505050565b60008083601f84011262000c7e57600080fd5b50813567ffffffffffffffff81111562000c9757600080fd5b60208301915083602082850101111562000cb057600080fd5b9250929050565b60008060008060006060868803121562000cd057600080fd5b853562000cdd8162000c2b565b9450602086013567ffffffffffffffff8082111562000cfb57600080fd5b62000d0989838a0162000c6b565b9096509450604088013591508082111562000d2357600080fd5b5062000d328882890162000c6b565b969995985093965092949392505050565b60008060006060848603121562000d5957600080fd5b833562000d668162000c2b565b925060208401359150604084013562000d7f8162000c2b565b809150509250925092565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b60408152600062000dc960408301868862000d8a565b828103602084015262000dde81858762000d8a565b979650505050505050565b60006001600160a01b0380891683528088166020840152506080604083015262000e1860808301868862000d8a565b828103606084015262000e2d81858762000d8a565b9998505050505050505050565b6000815180845260005b8181101562000e625760208185018101518683018201520162000e44565b8181111562000e75576000602083870101525b50601f01601f19169290920160200192915050565b602081526001600160a01b038251166020820152600060208301516060604084015262000ebb608084018262000e3a565b9050604084015160608401528091505092915050565b600063ffffffff8083168181141562000f13577f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6001019392505050565b600063ffffffff80871683528086166020840152506080604083015262000f48608083018562000e3a565b905060ff8316606083015295945050505050565b60006020828403121562000f6f57600080fd5b815167ffffffffffffffff8116811462000c6457600080fd5b60006020828403121562000f9b57600080fd5b815162000c648162000c2b56fe6080604052600580546001600160a01b03191673deb34a740eca1ec42c8b8204cbec0ba34fdd27f31790553480156200003757600080fd5b50604051620019d7380380620019d78339810160408190526200005a91620002e3565b8181818181600390805190602001906200007692919062000170565b5080516200008c90600490602084019062000170565b5050505050620000c37fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c2177533620000cb60201b60201c565b50506200038a565b60008281526007602090815260408083206001600160a01b038516845290915290205460ff166200016c5760008281526007602090815260408083206001600160a01b03851684529091529020805460ff191660011790556200012b3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45b5050565b8280546200017e906200034d565b90600052602060002090601f016020900481019282620001a25760008555620001ed565b82601f10620001bd57805160ff1916838001178555620001ed565b82800160010185558215620001ed579182015b82811115620001ed578251825591602001919060010190620001d0565b50620001fb929150620001ff565b5090565b5b80821115620001fb576000815560010162000200565b634e487b7160e01b600052604160045260246000fd5b600082601f8301126200023e57600080fd5b81516001600160401b03808211156200025b576200025b62000216565b604051601f8301601f19908116603f0116810190828211818310171562000286576200028662000216565b81604052838152602092508683858801011115620002a357600080fd5b600091505b83821015620002c75785820183015181830184015290820190620002a8565b83821115620002d95760008385830101525b9695505050505050565b60008060408385031215620002f757600080fd5b82516001600160401b03808211156200030f57600080fd5b6200031d868387016200022c565b935060208501519150808211156200033457600080fd5b5062000343858286016200022c565b9150509250929050565b600181811c908216806200036257607f821691505b602082108114156200038457634e487b7160e01b600052602260045260246000fd5b50919050565b61163d806200039a6000396000f3fe608060405234801561001057600080fd5b50600436106101775760003560e01c806339509351116100d8578063979005ad1161008c578063a9059cbb11610066578063a9059cbb1461031a578063d547741f1461032d578063dd62ed3e1461034057600080fd5b8063979005ad146102ec578063a217fddf146102ff578063a457c2d71461030757600080fd5b806375b238fc116100bd57806375b238fc1461028457806391d14854146102ab57806395d89b41146102e457600080fd5b8063395093511461025e57806370a082311461027157600080fd5b806323b872dd1161012f5780632f2ff15d116101145780632f2ff15d14610229578063313ce5671461023c57806336568abe1461024b57600080fd5b806323b872dd146101f3578063248a9ca31461020657600080fd5b8063095ea7b311610160578063095ea7b3146101b957806318160ddd146101cc5780631dd319cb146101de57600080fd5b806301ffc9a71461017c57806306fdde03146101a4575b600080fd5b61018f61018a3660046112f7565b610353565b60405190151581526020015b60405180910390f35b6101ac6103ec565b60405161019b9190611365565b61018f6101c73660046113b4565b61047e565b6002545b60405190815260200161019b565b6101f16101ec3660046113b4565b610496565b005b61018f6102013660046113de565b61052d565b6101d061021436600461141a565b60009081526007602052604090206001015490565b6101f1610237366004611433565b610551565b6040516012815260200161019b565b6101f1610259366004611433565b610577565b61018f61026c3660046113b4565b610603565b6101d061027f36600461145f565b610642565b6101d07fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c2177581565b61018f6102b9366004611433565b60009182526007602090815260408084206001600160a01b0393909316845291905290205460ff1690565b6101ac6106ea565b6101f16102fa3660046113b4565b6106f9565b6101d0600081565b61018f6103153660046113b4565b61072e565b61018f6103283660046113b4565b6107d8565b6101f161033b366004611433565b6107e6565b6101d061034e36600461147a565b61080c565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f7965db0b0000000000000000000000000000000000000000000000000000000014806103e657507f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316145b92915050565b6060600380546103fb906114a4565b80601f0160208091040260200160405190810160405280929190818152602001828054610427906114a4565b80156104745780601f1061044957610100808354040283529160200191610474565b820191906000526020600020905b81548152906001019060200180831161045757829003601f168201915b5050505050905090565b60003361048c81858561091d565b5060019392505050565b7fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c217756104c18133610a75565b816104cb84610642565b101561051e5760405162461bcd60e51b815260206004820152601560248201527f496e73756666696369656e742062616c616e63652e000000000000000000000060448201526064015b60405180910390fd5b6105288383610af5565b505050565b60003361053b858285610c7a565b610546858585610cf4565b506001949350505050565b60008281526007602052604090206001015461056d8133610a75565b6105288383610f0b565b6001600160a01b03811633146105f55760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201527f20726f6c657320666f722073656c6600000000000000000000000000000000006064820152608401610515565b6105ff8282610fad565b5050565b3360008181526001602090815260408083206001600160a01b038716845290915281205490919061048c908290869061063d9087906114f5565b61091d565b6000326001600160a01b0383161415610673576001600160a01b0382166000908152602081905260409020546103e6565b336001600160a01b03831614156106a2576001600160a01b0382166000908152602081905260409020546103e6565b60405162461bcd60e51b815260206004820152601f60248201527f4e6f7420616c6c6f77656420746f2072656164207468652062616c616e6365006044820152606401610515565b6060600480546103fb906114a4565b7fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c217756107248133610a75565b6105288383611030565b3360008181526001602090815260408083206001600160a01b0387168452909152812054909190838110156107cb5760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f7760448201527f207a65726f0000000000000000000000000000000000000000000000000000006064820152608401610515565b610546828686840361091d565b60003361048c818585610cf4565b6000828152600760205260409020600101546108028133610a75565b6105288383610fad565b6000326001600160a01b038416148061082d5750326001600160a01b038316145b15610860576001600160a01b038084166000908152600160209081526040808320938616835292905220545b90506103e6565b336001600160a01b038416148061087f5750336001600160a01b038316145b156108af576001600160a01b03808416600090815260016020908152604080832093861683529290522054610859565b60405162461bcd60e51b815260206004820152602160248201527f4e6f7420616c6c6f77656420746f20726561642074686520616c6c6f77616e6360448201527f65000000000000000000000000000000000000000000000000000000000000006064820152608401610515565b6001600160a01b0383166109985760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460448201527f72657373000000000000000000000000000000000000000000000000000000006064820152608401610515565b6001600160a01b038216610a145760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f20616464726560448201527f73730000000000000000000000000000000000000000000000000000000000006064820152608401610515565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b60008281526007602090815260408083206001600160a01b038516845290915290205460ff166105ff57610ab3816001600160a01b0316601461110f565b610abe83602061110f565b604051602001610acf92919061150d565b60408051601f198184030181529082905262461bcd60e51b825261051591600401611365565b6001600160a01b038216610b715760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f2061646472657360448201527f73000000000000000000000000000000000000000000000000000000000000006064820152608401610515565b6001600160a01b03821660009081526020819052604090205481811015610c005760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e60448201527f63650000000000000000000000000000000000000000000000000000000000006064820152608401610515565b6001600160a01b0383166000908152602081905260408120838303905560028054849290610c2f90849061158e565b90915550506040518281526000906001600160a01b038516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a3505050565b6000610c86848461080c565b90506000198114610cee5781811015610ce15760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e63650000006044820152606401610515565b610cee848484840361091d565b50505050565b6001600160a01b038316610d705760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f20616460448201527f64726573730000000000000000000000000000000000000000000000000000006064820152608401610515565b6001600160a01b038216610dec5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201527f65737300000000000000000000000000000000000000000000000000000000006064820152608401610515565b6001600160a01b03831660009081526020819052604090205481811015610e7b5760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e742065786365656473206260448201527f616c616e636500000000000000000000000000000000000000000000000000006064820152608401610515565b6001600160a01b03808516600090815260208190526040808220858503905591851681529081208054849290610eb29084906114f5565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef84604051610efe91815260200190565b60405180910390a3610cee565b60008281526007602090815260408083206001600160a01b038516845290915290205460ff166105ff5760008281526007602090815260408083206001600160a01b03851684529091529020805460ff19166001179055610f693390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b60008281526007602090815260408083206001600160a01b038516845290915290205460ff16156105ff5760008281526007602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b6001600160a01b0382166110865760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152606401610515565b806002600082825461109891906114f5565b90915550506001600160a01b038216600090815260208190526040812080548392906110c59084906114f5565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b6060600061111e8360026115a5565b6111299060026114f5565b67ffffffffffffffff811115611141576111416115c4565b6040519080825280601f01601f19166020018201604052801561116b576020820181803683370190505b5090507f3000000000000000000000000000000000000000000000000000000000000000816000815181106111a2576111a26115da565b60200101906001600160f81b031916908160001a9053507f7800000000000000000000000000000000000000000000000000000000000000816001815181106111ed576111ed6115da565b60200101906001600160f81b031916908160001a90535060006112118460026115a5565b61121c9060016114f5565b90505b60018111156112a1577f303132333435363738396162636465660000000000000000000000000000000085600f166010811061125d5761125d6115da565b1a60f81b828281518110611273576112736115da565b60200101906001600160f81b031916908160001a90535060049490941c9361129a816115f0565b905061121f565b5083156112f05760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610515565b9392505050565b60006020828403121561130957600080fd5b81357fffffffff00000000000000000000000000000000000000000000000000000000811681146112f057600080fd5b60005b8381101561135457818101518382015260200161133c565b83811115610cee5750506000910152565b6020815260008251806020840152611384816040850160208701611339565b601f01601f19169190910160400192915050565b80356001600160a01b03811681146113af57600080fd5b919050565b600080604083850312156113c757600080fd5b6113d083611398565b946020939093013593505050565b6000806000606084860312156113f357600080fd5b6113fc84611398565b925061140a60208501611398565b9150604084013590509250925092565b60006020828403121561142c57600080fd5b5035919050565b6000806040838503121561144657600080fd5b8235915061145660208401611398565b90509250929050565b60006020828403121561147157600080fd5b6112f082611398565b6000806040838503121561148d57600080fd5b61149683611398565b915061145660208401611398565b600181811c908216806114b857607f821691505b602082108114156114d957634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b60008219821115611508576115086114df565b500190565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260008351611545816017850160208801611339565b7f206973206d697373696e6720726f6c65200000000000000000000000000000006017918401918201528351611582816028840160208801611339565b01602801949350505050565b6000828210156115a0576115a06114df565b500390565b60008160001904831182151516156115bf576115bf6114df565b500290565b634e487b7160e01b600052604160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b6000816115ff576115ff6114df565b50600019019056fea2646970667358221220848f35fdc28f22577d7d393858f44350cbde245dc770487cf991c8a21210b53864736f6c63430008090033a26469706673582212201e625c8f3b854088e022549987d10ee81883533d044c2a35c31109850ff1ad5264736f6c63430008090033", } // EthereumBridgeABI is the input ABI used to generate the binding from. diff --git a/contracts/generated/ObscuroBridge/ObscuroBridge.go b/contracts/generated/ObscuroBridge/ObscuroBridge.go index aeddc7319f..59c5d703f4 100644 --- a/contracts/generated/ObscuroBridge/ObscuroBridge.go +++ b/contracts/generated/ObscuroBridge/ObscuroBridge.go @@ -32,7 +32,7 @@ var ( // 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: "0x60806040526001805463ffffffff60a01b191690553480156200002157600080fd5b5060405162001bbb38038062001bbb8339810160408190526200004491620001fc565b600080546001600160a01b0319166001600160a01b038316908117909155604080516350d113fd60e11b8152905183929163a1a227fa916004808301926020929190829003018186803b1580156200009b57600080fd5b505afa158015620000b0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620000d69190620001fc565b600180546001600160a01b0319166001600160a01b039290921691909117905550620001237fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c217753362000157565b620001507fd2fb17ceaa388942529b17e0006ffc4d559f040dd4f2157b8070f17ad2110578600062000157565b506200022e565b60008281526002602090815260408083206001600160a01b038516845290915290205460ff16620001f85760008281526002602090815260408083206001600160a01b03851684529091529020805460ff19166001179055620001b73390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45b5050565b6000602082840312156200020f57600080fd5b81516001600160a01b03811681146200022757600080fd5b9392505050565b61197d806200023e6000396000f3fe60806040526004361061010e5760003560e01c80635fa7b584116100a557806393b3744211610074578063a381c8e211610059578063a381c8e21461033e578063d547741f1461035e578063e4c3ebc71461037e57600080fd5b806393b3744214610309578063a217fddf1461032957600080fd5b80635fa7b5841461024f57806375b238fc1461026f57806383bece4d146102a357806391d14854146102c357600080fd5b80632f2ff15d116100e15780632f2ff15d146101bb57806336568abe146101db578063498d82ab146101fb5780635d8729701461021b57600080fd5b806301ffc9a71461011357806316ce8149146101485780631888d7121461016a578063248a9ca31461017d575b600080fd5b34801561011f57600080fd5b5061013361012e36600461147f565b6103b2565b60405190151581526020015b60405180910390f35b34801561015457600080fd5b506101686101633660046114c1565b61041b565b005b6101686101783660046114c1565b610481565b34801561018957600080fd5b506101ad6101983660046114de565b60009081526002602052604090206001015490565b60405190815260200161013f565b3480156101c757600080fd5b506101686101d63660046114f7565b610532565b3480156101e757600080fd5b506101686101f63660046114f7565b61055d565b34801561020757600080fd5b50610168610216366004611570565b6105e5565b34801561022757600080fd5b506101ad7f9f225881f6e7ac8a885b63aa2269cbce78dd6a669864ccd2cd2517a8e709d73a81565b34801561025b57600080fd5b5061016861026a3660046114c1565b6106b3565b34801561027b57600080fd5b506101ad7fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c2177581565b3480156102af57600080fd5b506101686102be3660046115f3565b610708565b3480156102cf57600080fd5b506101336102de3660046114f7565b60009182526002602090815260408084206001600160a01b0393909316845291905290205460ff1690565b34801561031557600080fd5b506101686103243660046114c1565b61092b565b34801561033557600080fd5b506101ad600081565b34801561034a57600080fd5b506101686103593660046115f3565b610980565b34801561036a57600080fd5b506101686103793660046114f7565b610b2d565b34801561038a57600080fd5b506101ad7fd2fb17ceaa388942529b17e0006ffc4d559f040dd4f2157b8070f17ad211057881565b60006001600160e01b031982167f7965db0b00000000000000000000000000000000000000000000000000000000148061041557507f01ffc9a7000000000000000000000000000000000000000000000000000000006001600160e01b03198316145b92915050565b7fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c217756104468133610b53565b50600380547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0392909216919091179055565b600034116104d65760405162461bcd60e51b815260206004820152600f60248201527f456d707479207472616e736665722e000000000000000000000000000000000060448201526064015b60405180910390fd5b604080518082018252348082526001600160a01b03848116602093840190815284519384019290925290518116828401528251808303840181526060909201909252600354909161052e91168260005b600080610bd3565b5050565b60008281526002602052604090206001015461054e8133610b53565b6105588383610cee565b505050565b6001600160a01b03811633146105db5760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201527f20726f6c657320666f722073656c66000000000000000000000000000000000060648201526084016104cd565b61052e8282610d90565b7fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c217756106108133610b53565b61063a7f9f225881f6e7ac8a885b63aa2269cbce78dd6a669864ccd2cd2517a8e709d73a87610cee565b600063458ffd6360e01b878787878760405160240161065d95949392919061165e565b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b0319909316929092179091526003549091506106aa906001600160a01b0316826002610526565b50505050505050565b7fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c217756106de8133610b53565b61052e7f9f225881f6e7ac8a885b63aa2269cbce78dd6a669864ccd2cd2517a8e709d73a83610d90565b6003546000546001600160a01b039182169116331461078f5760405162461bcd60e51b815260206004820152603060248201527f436f6e74726163742063616c6c6572206973206e6f742074686520726567697360448201527f7465726564206d657373656e676572210000000000000000000000000000000060648201526084016104cd565b806001600160a01b03166107a1610e13565b6001600160a01b03161461081d5760405162461bcd60e51b815260206004820152603160248201527f43726f737320636861696e206d65737361676520636f6d696e672066726f6d2060448201527f696e636f72726563742073656e6465722100000000000000000000000000000060648201526084016104cd565b6001600160a01b03841660009081527f32ef73018533fa188e9e42b313c0a4048c6052342b662fb7510c0d1abcea3413602052604090205460ff161561086d57610868848484610e9f565b610925565b6001600160a01b03841660009081527f13ad2d85210d477fe1a6e25654c8250308cf29b050a4bf0b039d70467486712c602052604090205460ff16156108b7576108688383610eaa565b60405162461bcd60e51b815260206004820152602560248201527f417474656d7074696e6720746f20776974686472617720756e6b6e6f776e206160448201527f737365742e00000000000000000000000000000000000000000000000000000060648201526084016104cd565b50505050565b7fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c217756109568133610b53565b61052e7fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c2177583610cee565b600082116109d05760405162461bcd60e51b815260206004820152601a60248201527f417474656d7074696e6720656d707479207472616e736665722e00000000000060448201526064016104cd565b6001600160a01b03831660009081527f32ef73018533fa188e9e42b313c0a4048c6052342b662fb7510c0d1abcea3413602052604090205460ff16610aa35760405162461bcd60e51b815260206004820152604e60248201527f54686973206164647265737320686173206e6f74206265656e20676976656e2060448201527f61207479706520616e64206973207468757320636f6e73696465726564206e6f60648201527f742077686974656c69737465642e000000000000000000000000000000000000608482015260a4016104cd565b610aaf83333085610f4d565b604080516001600160a01b038581166024830152604482018590528381166064808401919091528351808403909101815260849092019092526020810180516001600160e01b03167f83bece4d0000000000000000000000000000000000000000000000000000000017905260035490916109259116826001610526565b600082815260026020526040902060010154610b498133610b53565b6105588383610d90565b60008281526002602090815260408083206001600160a01b038516845290915290205460ff1661052e57610b91816001600160a01b03166014610fd1565b610b9c836020610fd1565b604051602001610bad9291906116cc565b60408051601f198184030181529082905262461bcd60e51b82526104cd91600401611779565b60006040518060600160405280876001600160a01b0316815260200186815260200184815250604051602001610c09919061178c565b60408051808303601f19018152919052600180549192506001600160a01b0382169163b1454caa917401000000000000000000000000000000000000000090910463ffffffff16906014610c5c836117e7565b91906101000a81548163ffffffff021916908363ffffffff1602179055508684866040518563ffffffff1660e01b8152600401610c9c949392919061180b565b602060405180830381600087803b158015610cb657600080fd5b505af1158015610cca573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106aa9190611848565b60008281526002602090815260408083206001600160a01b038516845290915290205460ff1661052e5760008281526002602090815260408083206001600160a01b03851684529091529020805460ff19166001179055610d4c3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b60008281526002602090815260408083206001600160a01b038516845290915290205460ff161561052e5760008281526002602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b60008060009054906101000a90046001600160a01b03166001600160a01b03166363012de56040518163ffffffff1660e01b815260040160206040518083038186803b158015610e6257600080fd5b505afa158015610e76573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e9a9190611872565b905090565b6105588382846111b9565b6000816001600160a01b03168360405160006040518083038185875af1925050503d8060008114610ef7576040519150601f19603f3d011682016040523d82523d6000602084013e610efc565b606091505b50509050806105585760405162461bcd60e51b815260206004820152601460248201527f4661696c656420746f2073656e6420457468657200000000000000000000000060448201526064016104cd565b6040516001600160a01b03808516602483015283166044820152606481018290526109259085907f23b872dd00000000000000000000000000000000000000000000000000000000906084015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152611202565b60606000610fe083600261188f565b610feb9060026118ae565b67ffffffffffffffff811115611003576110036118c6565b6040519080825280601f01601f19166020018201604052801561102d576020820181803683370190505b5090507f300000000000000000000000000000000000000000000000000000000000000081600081518110611064576110646118dc565b60200101906001600160f81b031916908160001a9053507f7800000000000000000000000000000000000000000000000000000000000000816001815181106110af576110af6118dc565b60200101906001600160f81b031916908160001a90535060006110d384600261188f565b6110de9060016118ae565b90505b6001811115611163577f303132333435363738396162636465660000000000000000000000000000000085600f166010811061111f5761111f6118dc565b1a60f81b828281518110611135576111356118dc565b60200101906001600160f81b031916908160001a90535060049490941c9361115c816118f2565b90506110e1565b5083156111b25760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e7460448201526064016104cd565b9392505050565b6040516001600160a01b0383166024820152604481018290526105589084907fa9059cbb0000000000000000000000000000000000000000000000000000000090606401610f9a565b6000611257826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166112e79092919063ffffffff16565b80519091501561055857808060200190518101906112759190611909565b6105585760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f7420737563636565640000000000000000000000000000000000000000000060648201526084016104cd565b60606112f684846000856112fe565b949350505050565b6060824710156113765760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c000000000000000000000000000000000000000000000000000060648201526084016104cd565b6001600160a01b0385163b6113cd5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016104cd565b600080866001600160a01b031685876040516113e9919061192b565b60006040518083038185875af1925050503d8060008114611426576040519150601f19603f3d011682016040523d82523d6000602084013e61142b565b606091505b509150915061143b828286611446565b979650505050505050565b606083156114555750816111b2565b8251156114655782518084602001fd5b8160405162461bcd60e51b81526004016104cd9190611779565b60006020828403121561149157600080fd5b81356001600160e01b0319811681146111b257600080fd5b6001600160a01b03811681146114be57600080fd5b50565b6000602082840312156114d357600080fd5b81356111b2816114a9565b6000602082840312156114f057600080fd5b5035919050565b6000806040838503121561150a57600080fd5b82359150602083013561151c816114a9565b809150509250929050565b60008083601f84011261153957600080fd5b50813567ffffffffffffffff81111561155157600080fd5b60208301915083602082850101111561156957600080fd5b9250929050565b60008060008060006060868803121561158857600080fd5b8535611593816114a9565b9450602086013567ffffffffffffffff808211156115b057600080fd5b6115bc89838a01611527565b909650945060408801359150808211156115d557600080fd5b506115e288828901611527565b969995985093965092949392505050565b60008060006060848603121561160857600080fd5b8335611613816114a9565b925060208401359150604084013561162a816114a9565b809150509250925092565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b6001600160a01b0386168152606060208201526000611681606083018688611635565b8281036040840152611694818587611635565b98975050505050505050565b60005b838110156116bb5781810151838201526020016116a3565b838111156109255750506000910152565b7f416363657373436f6e74726f6c3a206163636f756e74200000000000000000008152600083516117048160178501602088016116a0565b7f206973206d697373696e6720726f6c652000000000000000000000000000000060179184019182015283516117418160288401602088016116a0565b01602801949350505050565b600081518084526117658160208601602086016116a0565b601f01601f19169290920160200192915050565b6020815260006111b2602083018461174d565b602081526001600160a01b03825116602082015260006020830151606060408401526117bb608084018261174d565b9050604084015160608401528091505092915050565b634e487b7160e01b600052601160045260246000fd5b600063ffffffff80831681811415611801576118016117d1565b6001019392505050565b600063ffffffff808716835280861660208401525060806040830152611834608083018561174d565b905060ff8316606083015295945050505050565b60006020828403121561185a57600080fd5b815167ffffffffffffffff811681146111b257600080fd5b60006020828403121561188457600080fd5b81516111b2816114a9565b60008160001904831182151516156118a9576118a96117d1565b500290565b600082198211156118c1576118c16117d1565b500190565b634e487b7160e01b600052604160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b600081611901576119016117d1565b506000190190565b60006020828403121561191b57600080fd5b815180151581146111b257600080fd5b6000825161193d8184602087016116a0565b919091019291505056fea26469706673582212203584da4763506dfe3dec62086ac8216bfc4a5f976712ff605ecde2651c5accf664736f6c63430008090033", + Bin: "0x60806040526001805463ffffffff60a01b191690553480156200002157600080fd5b5060405162001c3838038062001c388339810160408190526200004491620001fc565b600080546001600160a01b0319166001600160a01b038316908117909155604080516350d113fd60e11b8152905183929163a1a227fa916004808301926020929190829003018186803b1580156200009b57600080fd5b505afa158015620000b0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620000d69190620001fc565b600180546001600160a01b0319166001600160a01b039290921691909117905550620001237fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c217753362000157565b620001507fd2fb17ceaa388942529b17e0006ffc4d559f040dd4f2157b8070f17ad2110578600062000157565b506200022e565b60008281526002602090815260408083206001600160a01b038516845290915290205460ff16620001f85760008281526002602090815260408083206001600160a01b03851684529091529020805460ff19166001179055620001b73390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45b5050565b6000602082840312156200020f57600080fd5b81516001600160a01b03811681146200022757600080fd5b9392505050565b6119fa806200023e6000396000f3fe60806040526004361061010e5760003560e01c80635fa7b584116100a557806393b3744211610074578063a381c8e211610059578063a381c8e21461033e578063d547741f1461035e578063e4c3ebc71461037e57600080fd5b806393b3744214610309578063a217fddf1461032957600080fd5b80635fa7b5841461024f57806375b238fc1461026f57806383bece4d146102a357806391d14854146102c357600080fd5b80632f2ff15d116100e15780632f2ff15d146101bb57806336568abe146101db578063498d82ab146101fb5780635d8729701461021b57600080fd5b806301ffc9a71461011357806316ce8149146101485780631888d7121461016a578063248a9ca31461017d575b600080fd5b34801561011f57600080fd5b5061013361012e3660046114fc565b6103b2565b60405190151581526020015b60405180910390f35b34801561015457600080fd5b5061016861016336600461153e565b61041b565b005b61016861017836600461153e565b610481565b34801561018957600080fd5b506101ad61019836600461155b565b60009081526002602052604090206001015490565b60405190815260200161013f565b3480156101c757600080fd5b506101686101d6366004611574565b6105ba565b3480156101e757600080fd5b506101686101f6366004611574565b6105e5565b34801561020757600080fd5b506101686102163660046115ed565b610671565b34801561022757600080fd5b506101ad7f9f225881f6e7ac8a885b63aa2269cbce78dd6a669864ccd2cd2517a8e709d73a81565b34801561025b57600080fd5b5061016861026a36600461153e565b610736565b34801561027b57600080fd5b506101ad7fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c2177581565b3480156102af57600080fd5b506101686102be366004611670565b61078b565b3480156102cf57600080fd5b506101336102de366004611574565b60009182526002602090815260408084206001600160a01b0393909316845291905290205460ff1690565b34801561031557600080fd5b5061016861032436600461153e565b6109ad565b34801561033557600080fd5b506101ad600081565b34801561034a57600080fd5b50610168610359366004611670565b610a02565b34801561036a57600080fd5b50610168610379366004611574565b610baf565b34801561038a57600080fd5b506101ad7fd2fb17ceaa388942529b17e0006ffc4d559f040dd4f2157b8070f17ad211057881565b60006001600160e01b031982167f7965db0b00000000000000000000000000000000000000000000000000000000148061041557507f01ffc9a7000000000000000000000000000000000000000000000000000000006001600160e01b03198316145b92915050565b7fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c217756104468133610bd5565b50600380547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0392909216919091179055565b600034116104d65760405162461bcd60e51b815260206004820152600f60248201527f456d707479207472616e736665722e000000000000000000000000000000000060448201526064015b60405180910390fd5b604080518082018252348082526001600160a01b03848116602093840190815284519384019290925290518116828401528251808303840181526060909201909252600354909161052e91168260005b600080610c55565b6001546001600160a01b03166040517f346633fb0000000000000000000000000000000000000000000000000000000081526001600160a01b038481166004830152346024830181905292169163346633fb916044016000604051808303818588803b15801561059d57600080fd5b505af11580156105b1573d6000803e3d6000fd5b50505050505050565b6000828152600260205260409020600101546105d68133610bd5565b6105e08383610d70565b505050565b6001600160a01b03811633146106635760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201527f20726f6c657320666f722073656c66000000000000000000000000000000000060648201526084016104cd565b61066d8282610e12565b5050565b7fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c2177561069c8133610bd5565b6106c67f9f225881f6e7ac8a885b63aa2269cbce78dd6a669864ccd2cd2517a8e709d73a87610d70565b600063458ffd6360e01b87878787876040516024016106e99594939291906116db565b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b0319909316929092179091526003549091506105b1906001600160a01b0316826002610526565b7fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c217756107618133610bd5565b61066d7f9f225881f6e7ac8a885b63aa2269cbce78dd6a669864ccd2cd2517a8e709d73a83610e12565b6003546000546001600160a01b03918216911633146108125760405162461bcd60e51b815260206004820152603060248201527f436f6e74726163742063616c6c6572206973206e6f742074686520726567697360448201527f7465726564206d657373656e676572210000000000000000000000000000000060648201526084016104cd565b806001600160a01b0316610824610e95565b6001600160a01b0316146108a05760405162461bcd60e51b815260206004820152603160248201527f43726f737320636861696e206d65737361676520636f6d696e672066726f6d2060448201527f696e636f72726563742073656e6465722100000000000000000000000000000060648201526084016104cd565b6001600160a01b03841660009081527f32ef73018533fa188e9e42b313c0a4048c6052342b662fb7510c0d1abcea3413602052604090205460ff16156108f0576108eb848484610f21565b6109a7565b6001600160a01b03841660009081527f13ad2d85210d477fe1a6e25654c8250308cf29b050a4bf0b039d70467486712c602052604090205460ff1615610939576108eb82610f2c565b60405162461bcd60e51b815260206004820152602560248201527f417474656d7074696e6720746f20776974686472617720756e6b6e6f776e206160448201527f737365742e00000000000000000000000000000000000000000000000000000060648201526084016104cd565b50505050565b7fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c217756109d88133610bd5565b61066d7fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c2177583610d70565b60008211610a525760405162461bcd60e51b815260206004820152601a60248201527f417474656d7074696e6720656d707479207472616e736665722e00000000000060448201526064016104cd565b6001600160a01b03831660009081527f32ef73018533fa188e9e42b313c0a4048c6052342b662fb7510c0d1abcea3413602052604090205460ff16610b255760405162461bcd60e51b815260206004820152604e60248201527f54686973206164647265737320686173206e6f74206265656e20676976656e2060448201527f61207479706520616e64206973207468757320636f6e73696465726564206e6f60648201527f742077686974656c69737465642e000000000000000000000000000000000000608482015260a4016104cd565b610b3183333085610fca565b604080516001600160a01b038581166024830152604482018590528381166064808401919091528351808403909101815260849092019092526020810180516001600160e01b03167f83bece4d0000000000000000000000000000000000000000000000000000000017905260035490916109a79116826001610526565b600082815260026020526040902060010154610bcb8133610bd5565b6105e08383610e12565b60008281526002602090815260408083206001600160a01b038516845290915290205460ff1661066d57610c13816001600160a01b0316601461104e565b610c1e83602061104e565b604051602001610c2f929190611749565b60408051601f198184030181529082905262461bcd60e51b82526104cd916004016117f6565b60006040518060600160405280876001600160a01b0316815260200186815260200184815250604051602001610c8b9190611809565b60408051808303601f19018152919052600180549192506001600160a01b0382169163b1454caa917401000000000000000000000000000000000000000090910463ffffffff16906014610cde83611864565b91906101000a81548163ffffffff021916908363ffffffff1602179055508684866040518563ffffffff1660e01b8152600401610d1e9493929190611888565b602060405180830381600087803b158015610d3857600080fd5b505af1158015610d4c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105b191906118c5565b60008281526002602090815260408083206001600160a01b038516845290915290205460ff1661066d5760008281526002602090815260408083206001600160a01b03851684529091529020805460ff19166001179055610dce3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b60008281526002602090815260408083206001600160a01b038516845290915290205460ff161561066d5760008281526002602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b60008060009054906101000a90046001600160a01b03166001600160a01b03166363012de56040518163ffffffff1660e01b815260040160206040518083038186803b158015610ee457600080fd5b505afa158015610ef8573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f1c91906118ef565b905090565b6105e0838284611236565b6040516000906001600160a01b038316908281818181865af19150503d8060008114610f74576040519150601f19603f3d011682016040523d82523d6000602084013e610f79565b606091505b505090508061066d5760405162461bcd60e51b815260206004820152601460248201527f4661696c656420746f2073656e6420457468657200000000000000000000000060448201526064016104cd565b6040516001600160a01b03808516602483015283166044820152606481018290526109a79085907f23b872dd00000000000000000000000000000000000000000000000000000000906084015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b03199093169290921790915261127f565b6060600061105d83600261190c565b61106890600261192b565b67ffffffffffffffff81111561108057611080611943565b6040519080825280601f01601f1916602001820160405280156110aa576020820181803683370190505b5090507f3000000000000000000000000000000000000000000000000000000000000000816000815181106110e1576110e1611959565b60200101906001600160f81b031916908160001a9053507f78000000000000000000000000000000000000000000000000000000000000008160018151811061112c5761112c611959565b60200101906001600160f81b031916908160001a905350600061115084600261190c565b61115b90600161192b565b90505b60018111156111e0577f303132333435363738396162636465660000000000000000000000000000000085600f166010811061119c5761119c611959565b1a60f81b8282815181106111b2576111b2611959565b60200101906001600160f81b031916908160001a90535060049490941c936111d98161196f565b905061115e565b50831561122f5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e7460448201526064016104cd565b9392505050565b6040516001600160a01b0383166024820152604481018290526105e09084907fa9059cbb0000000000000000000000000000000000000000000000000000000090606401611017565b60006112d4826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166113649092919063ffffffff16565b8051909150156105e057808060200190518101906112f29190611986565b6105e05760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f7420737563636565640000000000000000000000000000000000000000000060648201526084016104cd565b6060611373848460008561137b565b949350505050565b6060824710156113f35760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c000000000000000000000000000000000000000000000000000060648201526084016104cd565b6001600160a01b0385163b61144a5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016104cd565b600080866001600160a01b0316858760405161146691906119a8565b60006040518083038185875af1925050503d80600081146114a3576040519150601f19603f3d011682016040523d82523d6000602084013e6114a8565b606091505b50915091506114b88282866114c3565b979650505050505050565b606083156114d257508161122f565b8251156114e25782518084602001fd5b8160405162461bcd60e51b81526004016104cd91906117f6565b60006020828403121561150e57600080fd5b81356001600160e01b03198116811461122f57600080fd5b6001600160a01b038116811461153b57600080fd5b50565b60006020828403121561155057600080fd5b813561122f81611526565b60006020828403121561156d57600080fd5b5035919050565b6000806040838503121561158757600080fd5b82359150602083013561159981611526565b809150509250929050565b60008083601f8401126115b657600080fd5b50813567ffffffffffffffff8111156115ce57600080fd5b6020830191508360208285010111156115e657600080fd5b9250929050565b60008060008060006060868803121561160557600080fd5b853561161081611526565b9450602086013567ffffffffffffffff8082111561162d57600080fd5b61163989838a016115a4565b9096509450604088013591508082111561165257600080fd5b5061165f888289016115a4565b969995985093965092949392505050565b60008060006060848603121561168557600080fd5b833561169081611526565b92506020840135915060408401356116a781611526565b809150509250925092565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b6001600160a01b03861681526060602082015260006116fe6060830186886116b2565b82810360408401526117118185876116b2565b98975050505050505050565b60005b83811015611738578181015183820152602001611720565b838111156109a75750506000910152565b7f416363657373436f6e74726f6c3a206163636f756e742000000000000000000081526000835161178181601785016020880161171d565b7f206973206d697373696e6720726f6c652000000000000000000000000000000060179184019182015283516117be81602884016020880161171d565b01602801949350505050565b600081518084526117e281602086016020860161171d565b601f01601f19169290920160200192915050565b60208152600061122f60208301846117ca565b602081526001600160a01b038251166020820152600060208301516060604084015261183860808401826117ca565b9050604084015160608401528091505092915050565b634e487b7160e01b600052601160045260246000fd5b600063ffffffff8083168181141561187e5761187e61184e565b6001019392505050565b600063ffffffff8087168352808616602084015250608060408301526118b160808301856117ca565b905060ff8316606083015295945050505050565b6000602082840312156118d757600080fd5b815167ffffffffffffffff8116811461122f57600080fd5b60006020828403121561190157600080fd5b815161122f81611526565b60008160001904831182151516156119265761192661184e565b500290565b6000821982111561193e5761193e61184e565b500190565b634e487b7160e01b600052604160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b60008161197e5761197e61184e565b506000190190565b60006020828403121561199857600080fd5b8151801515811461122f57600080fd5b600082516119ba81846020870161171d565b919091019291505056fea2646970667358221220473483eca5f4fb64e727cbf61ba9aff9f10660c86df8160cdf0789ba5522b36464736f6c63430008090033", } // ObscuroBridgeABI is the input ABI used to generate the binding from. diff --git a/contracts/src/bridge/L1/ObscuroBridge.sol b/contracts/src/bridge/L1/ObscuroBridge.sol index fe42611204..49714d85d8 100644 --- a/contracts/src/bridge/L1/ObscuroBridge.sol +++ b/contracts/src/bridge/L1/ObscuroBridge.sol @@ -78,6 +78,7 @@ contract ObscuroBridge is require(msg.value > 0, "Empty transfer."); bytes memory data = abi.encode(ValueTransfer(msg.value, receiver)); queueMessage(remoteBridgeAddress, data, uint32(Topics.VALUE), 0, 0); + _messageBus().sendValueToL2{value: msg.value}(receiver, msg.value); } function sendERC20( @@ -116,7 +117,7 @@ contract ObscuroBridge is if (hasRole(ERC20_TOKEN_ROLE, asset)) { _receiveTokens(asset, amount, receiver); } else if (hasRole(NATIVE_TOKEN_ROLE, asset)) { - _receiveNative(amount, receiver); + _receiveNative(receiver); } else { revert("Attempting to withdraw unknown asset."); } @@ -130,8 +131,8 @@ contract ObscuroBridge is SafeERC20.safeTransfer(IERC20(asset), receiver, amount); } - function _receiveNative(uint256 amount, address receiver) private { - (bool sent, ) = receiver.call{value: amount}(""); + function _receiveNative(address receiver) private { + (bool sent, ) = receiver.call(""); require(sent, "Failed to send Ether"); } } diff --git a/contracts/src/messaging/messenger/CrossChainEnabledObscuro.sol b/contracts/src/messaging/messenger/CrossChainEnabledObscuro.sol index 837b45081b..85f486d25a 100644 --- a/contracts/src/messaging/messenger/CrossChainEnabledObscuro.sol +++ b/contracts/src/messaging/messenger/CrossChainEnabledObscuro.sol @@ -22,6 +22,10 @@ abstract contract CrossChainEnabledObscuro { return msg.sender == address(messenger); } + function _messageBus() internal view returns (IMessageBus) { + return messageBus; + } + // Returns the address of the sender of the current cross chain message. // address 0x0 is considered null/no sender. function _crossChainSender() internal view returns (address) { diff --git a/go/common/gethencoding/geth_encoding.go b/go/common/gethencoding/geth_encoding.go index 345797f4d6..6b8b17ea74 100644 --- a/go/common/gethencoding/geth_encoding.go +++ b/go/common/gethencoding/geth_encoding.go @@ -230,6 +230,11 @@ func CreateEthHeaderForBatch(h *common.BatchHeader, secret []byte) (*types.Heade // deterministically calculate private randomness that will be exposed to the evm randomness := crypto.CalculateRootBatchEntropy(secret, h.Number) + /*baseFee := uint64(0) + if h.BaseFee != nil { + baseFee = h.BaseFee.Uint64() + } */ + return &types.Header{ ParentHash: h.ParentHash, Root: h.Root, @@ -239,7 +244,7 @@ func CreateEthHeaderForBatch(h *common.BatchHeader, secret []byte) (*types.Heade Number: h.Number, GasLimit: 1_000_000_000, GasUsed: 0, - BaseFee: big.NewInt(0).SetUint64(0), + BaseFee: big.NewInt(0).SetUint64(1), Coinbase: h.Coinbase, Time: h.Time, MixDigest: randomness, diff --git a/go/common/rpc/converters.go b/go/common/rpc/converters.go index 8e54c42ffb..c988bdc2f9 100644 --- a/go/common/rpc/converters.go +++ b/go/common/rpc/converters.go @@ -199,7 +199,7 @@ func FromBatchHeaderMsg(header *generated.BatchHeaderMsg) *common.BatchHeader { GasUsed: header.GasUsed, Time: header.Time, TransfersTree: gethcommon.BytesToHash(header.TransferTree), - BaseFee: big.NewInt(int64(header.BaseFee)), + BaseFee: big.NewInt(0).SetUint64(header.BaseFee), Coinbase: gethcommon.BytesToAddress(header.Coinbase), CrossChainMessages: FromCrossChainMsgs(header.CrossChainMessages), LatestInboundCrossChainHash: gethcommon.BytesToHash(header.LatestInboundCrossChainHash), diff --git a/go/host/rpc/clientapi/client_api_eth.go b/go/host/rpc/clientapi/client_api_eth.go index b5f256d50e..080f83a62d 100644 --- a/go/host/rpc/clientapi/client_api_eth.go +++ b/go/host/rpc/clientapi/client_api_eth.go @@ -68,7 +68,12 @@ func (api *EthereumAPI) GetBlockByHash(_ context.Context, hash gethcommon.Hash, // GasPrice is a placeholder for an RPC method required by MetaMask/Remix. func (api *EthereumAPI) GasPrice(context.Context) (*hexutil.Big, error) { - return (*hexutil.Big)(big.NewInt(50)), nil + header, err := api.host.DB().GetHeadBatchHeader() + if err != nil { + return nil, err + } + + return (*hexutil.Big)(big.NewInt(0).Set(header.BaseFee)), nil } // GetBalance returns the address's balance on the Obscuro network, encrypted with the viewing key corresponding to the diff --git a/integration/simulation/simulation.go b/integration/simulation/simulation.go index 9146193903..974f7cc19c 100644 --- a/integration/simulation/simulation.go +++ b/integration/simulation/simulation.go @@ -172,6 +172,9 @@ func (s *Simulation) deployObscuroERC20s() { GasFeeCap: gethcommon.Big1, // This field is used to derive the gas price for dynamic fee transactions. Data: contractBytes, } + + s.RPCHandles.ObscuroWalletRndClient(owner).EstimateGasAndGasPrice(&deployContractTx) + signedTx, err := owner.SignTransaction(&deployContractTx) if err != nil { panic(err) From 51b79a0c8c08eaea781666236bb8b2740677a9b7 Mon Sep 17 00:00:00 2001 From: StefanIliev545 Date: Mon, 18 Sep 2023 02:12:43 +0300 Subject: [PATCH 27/47] Seemingly fully working version. --- go/common/gethencoding/geth_encoding.go | 6 +++--- go/common/headers.go | 1 + go/config/enclave_config.go | 3 +-- go/enclave/components/batch_executor.go | 4 ++-- go/enclave/components/interfaces.go | 2 +- go/enclave/components/rollup_compression.go | 9 +++++++-- go/enclave/core/batch.go | 4 ++-- go/enclave/crosschain/message_bus_manager.go | 4 ---- go/enclave/nodetype/sequencer.go | 2 +- go/enclave/nodetype/validator.go | 2 +- integration/simulation/network/network_utils.go | 3 +-- 11 files changed, 20 insertions(+), 20 deletions(-) diff --git a/go/common/gethencoding/geth_encoding.go b/go/common/gethencoding/geth_encoding.go index 2553dc9878..933cde96a5 100644 --- a/go/common/gethencoding/geth_encoding.go +++ b/go/common/gethencoding/geth_encoding.go @@ -230,10 +230,10 @@ func CreateEthHeaderForBatch(h *common.BatchHeader, secret []byte) (*types.Heade // deterministically calculate private randomness that will be exposed to the evm randomness := crypto.CalculateRootBatchEntropy(secret, h.Number) - /*baseFee := uint64(0) + baseFee := uint64(0) if h.BaseFee != nil { baseFee = h.BaseFee.Uint64() - } */ + } return &types.Header{ ParentHash: h.ParentHash, @@ -244,7 +244,7 @@ func CreateEthHeaderForBatch(h *common.BatchHeader, secret []byte) (*types.Heade Number: h.Number, GasLimit: 1_000_000_000, GasUsed: 0, - BaseFee: big.NewInt(0).SetUint64(0), + BaseFee: big.NewInt(0).SetUint64(baseFee), Coinbase: h.Coinbase, Time: h.Time, MixDigest: randomness, diff --git a/go/common/headers.go b/go/common/headers.go index abbd5adc32..9902ee6b61 100644 --- a/go/common/headers.go +++ b/go/common/headers.go @@ -94,6 +94,7 @@ type CalldataRollupHeader struct { FirstCanonParentHash L2BatchHash Coinbase common.Address + BaseFee *big.Int StartTime uint64 BatchTimeDeltas [][]byte // todo - minimize assuming a default of 1 sec and then store only exceptions diff --git a/go/config/enclave_config.go b/go/config/enclave_config.go index 636fc5b312..397587d2a5 100644 --- a/go/config/enclave_config.go +++ b/go/config/enclave_config.go @@ -6,7 +6,6 @@ import ( "github.com/obscuronet/go-obscuro/go/common" gethcommon "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/params" "github.com/obscuronet/go-obscuro/go/common/log" gethlog "github.com/ethereum/go-ethereum/log" @@ -95,6 +94,6 @@ func DefaultEnclaveConfig() *EnclaveConfig { MaxBatchSize: 1024 * 25, MaxRollupSize: 1024 * 64, GasPaymentAddress: gethcommon.BigToAddress(gethcommon.Big2), - BaseFee: new(big.Int).SetUint64(params.InitialBaseFee), + BaseFee: new(big.Int).SetUint64(1), } } diff --git a/go/enclave/components/batch_executor.go b/go/enclave/components/batch_executor.go index c93f014db1..439cf0a13b 100644 --- a/go/enclave/components/batch_executor.go +++ b/go/enclave/components/batch_executor.go @@ -244,7 +244,7 @@ func (vt ValueTransfers) EncodeIndex(index int, w *bytes.Buffer) { } } -func (executor *batchExecutor) CreateGenesisState(blkHash common.L1BlockHash, timeNow uint64, coinbase gethcommon.Address) (*core.Batch, *types.Transaction, error) { +func (executor *batchExecutor) CreateGenesisState(blkHash common.L1BlockHash, timeNow uint64, coinbase gethcommon.Address, baseFee *big.Int) (*core.Batch, *types.Transaction, error) { preFundGenesisState, err := executor.genesis.GetGenesisRoot(executor.storage) if err != nil { return nil, nil, err @@ -262,7 +262,7 @@ func (executor *batchExecutor) CreateGenesisState(blkHash common.L1BlockHash, ti TransfersTree: types.EmptyRootHash, Time: timeNow, Coinbase: coinbase, - BaseFee: new(big.Int).SetUint64(params.InitialBaseFee), + BaseFee: baseFee, }, Transactions: []*common.L2Tx{}, } diff --git a/go/enclave/components/interfaces.go b/go/enclave/components/interfaces.go index 388fa53ddf..23af60a2d9 100644 --- a/go/enclave/components/interfaces.go +++ b/go/enclave/components/interfaces.go @@ -75,7 +75,7 @@ type BatchExecutor interface { // CreateGenesisState - will create and commit the genesis state in the stateDB for the given block hash, // and uint64 timestamp representing the time now. In this genesis state is where one can // find preallocated funds for faucet. TODO - make this an option - CreateGenesisState(common.L1BlockHash, uint64, gethcommon.Address) (*core.Batch, *types.Transaction, error) + CreateGenesisState(common.L1BlockHash, uint64, gethcommon.Address, *big.Int) (*core.Batch, *types.Transaction, error) } type BatchRegistry interface { diff --git a/go/enclave/components/rollup_compression.go b/go/enclave/components/rollup_compression.go index 70df4f6057..e797d93505 100644 --- a/go/enclave/components/rollup_compression.go +++ b/go/enclave/components/rollup_compression.go @@ -81,6 +81,7 @@ type batchFromRollup struct { time uint64 l1Proof common.L1BlockHash coinbase gethcommon.Address + baseFee *big.Int header *common.BatchHeader // for reorgs } @@ -245,6 +246,7 @@ func (rc *RollupCompression) createRollupHeader(batches []*core.Batch) (*common. BatchHashes: batchHashes, BatchHeaders: batchHeaders, Coinbase: batches[0].Header.Coinbase, + BaseFee: batches[0].Header.BaseFee, } return calldataRollupHeader, nil @@ -336,6 +338,7 @@ func (rc *RollupCompression) createIncompleteBatches(calldataRollupHeader *commo l1Proof: block.Hash(), header: fullReorgedHeader, coinbase: calldataRollupHeader.Coinbase, + baseFee: calldataRollupHeader.BaseFee, } rc.logger.Info("Rollup decompressed batch", log.BatchSeqNoKey, currentSeqNo, log.BatchHeightKey, currentHeight, "rollup_idx", currentBatchIdx, "l1_height", block.Number(), "l1_hash", block.Hash()) } @@ -378,7 +381,7 @@ func (rc *RollupCompression) executeAndSaveIncompleteBatches(calldataRollupHeade switch { // handle genesis case incompleteBatch.seqNo.Uint64() == common.L2GenesisSeqNo: - genBatch, _, err := rc.batchExecutor.CreateGenesisState(incompleteBatch.l1Proof, incompleteBatch.time, calldataRollupHeader.Coinbase) + genBatch, _, err := rc.batchExecutor.CreateGenesisState(incompleteBatch.l1Proof, incompleteBatch.time, calldataRollupHeader.Coinbase, calldataRollupHeader.BaseFee) if err != nil { return err } @@ -420,6 +423,7 @@ func (rc *RollupCompression) executeAndSaveIncompleteBatches(calldataRollupHeade incompleteBatch.time, incompleteBatch.seqNo, incompleteBatch.coinbase, + incompleteBatch.baseFee, ) if err != nil { return err @@ -489,6 +493,7 @@ func (rc *RollupCompression) computeBatch( AtTime uint64, SequencerNo *big.Int, Coinbase gethcommon.Address, + BaseFee *big.Int, ) (*ComputedBatch, error) { return rc.batchExecutor.ComputeBatch(&BatchExecutionContext{ BlockPtr: BlockPtr, @@ -498,7 +503,7 @@ func (rc *RollupCompression) computeBatch( Creator: Coinbase, ChainConfig: rc.chainConfig, SequencerNo: SequencerNo, - BaseFee: big.NewInt(params.InitialBaseFee), + BaseFee: big.NewInt(0).Set(BaseFee), }) } diff --git a/go/enclave/core/batch.go b/go/enclave/core/batch.go index 848a690b73..596a4314dd 100644 --- a/go/enclave/core/batch.go +++ b/go/enclave/core/batch.go @@ -24,9 +24,9 @@ type Batch struct { // Hash returns the keccak256 hash of b's header. // The hash is computed on the first call and cached thereafter. func (b *Batch) Hash() common.L2BatchHash { - /* if hash := b.hash.Load(); hash != nil { + if hash := b.hash.Load(); hash != nil { return hash.(common.L2BatchHash) - }*/ + } v := b.Header.Hash() b.hash.Store(v) return v diff --git a/go/enclave/crosschain/message_bus_manager.go b/go/enclave/crosschain/message_bus_manager.go index 36f019800c..533369b7d2 100644 --- a/go/enclave/crosschain/message_bus_manager.go +++ b/go/enclave/crosschain/message_bus_manager.go @@ -188,10 +188,6 @@ func (m *MessageBusManager) RetrieveInboundMessages(fromBlock *common.L1Block, t return messages, transfers } -func (m *MessageBusManager) ShouldAutoRelayMessage(message common.CrossChainMessage) bool { - return message.Sender == *m.GetBusAddress() -} - func (m *MessageBusManager) ExecuteValueTransfers(transfers common.ValueTransferEvents, rollupState *state.StateDB) { for _, transfer := range transfers { rollupState.AddBalance(transfer.Receiver, transfer.Amount) diff --git a/go/enclave/nodetype/sequencer.go b/go/enclave/nodetype/sequencer.go index 9a706fc615..03fc9aef16 100644 --- a/go/enclave/nodetype/sequencer.go +++ b/go/enclave/nodetype/sequencer.go @@ -120,7 +120,7 @@ func (s *sequencer) CreateBatch() error { // won't be committed by the producer. func (s *sequencer) initGenesis(block *common.L1Block) error { s.logger.Info("Initializing genesis state", log.BlockHashKey, block.Hash()) - batch, msgBusTx, err := s.batchProducer.CreateGenesisState(block.Hash(), uint64(time.Now().Unix()), s.settings.GasPaymentAddress) + batch, msgBusTx, err := s.batchProducer.CreateGenesisState(block.Hash(), uint64(time.Now().Unix()), s.settings.GasPaymentAddress, s.settings.BaseFee) if err != nil { return err } diff --git a/go/enclave/nodetype/validator.go b/go/enclave/nodetype/validator.go index 953824f189..a1db5b21e8 100644 --- a/go/enclave/nodetype/validator.go +++ b/go/enclave/nodetype/validator.go @@ -128,7 +128,7 @@ func (val *obsValidator) executionPrerequisites(batch *core.Batch) (bool, error) } func (val *obsValidator) handleGenesis(batch *core.Batch) error { - genBatch, _, err := val.batchExecutor.CreateGenesisState(batch.Header.L1Proof, batch.Header.Time, batch.Header.Coinbase) + genBatch, _, err := val.batchExecutor.CreateGenesisState(batch.Header.L1Proof, batch.Header.Time, batch.Header.Coinbase, batch.Header.BaseFee) if err != nil { return err } diff --git a/integration/simulation/network/network_utils.go b/integration/simulation/network/network_utils.go index d05cf5ca0a..0e1002cb67 100644 --- a/integration/simulation/network/network_utils.go +++ b/integration/simulation/network/network_utils.go @@ -26,7 +26,6 @@ import ( "github.com/obscuronet/go-obscuro/integration/simulation/stats" gethcommon "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/params" hostcommon "github.com/obscuronet/go-obscuro/go/common/host" testcommon "github.com/obscuronet/go-obscuro/integration/common" ) @@ -92,7 +91,7 @@ func createInMemObscuroNode( ManagementContractAddress: *mgtContractAddress, MaxBatchSize: 1024 * 25, MaxRollupSize: 1024 * 64, - BaseFee: big.NewInt(params.InitialBaseFee), + BaseFee: big.NewInt(1), //todo @siliev:: fix test transaction builders so this can be different } enclaveLogger := testlog.Logger().New(log.NodeIDKey, id, log.CmpKey, log.EnclaveCmp) From 803a40d71d0f5e13d810a38fb33f2e5da5c7668f Mon Sep 17 00:00:00 2001 From: StefanIliev545 Date: Mon, 18 Sep 2023 02:32:59 +0300 Subject: [PATCH 28/47] Fixed compilation bug. --- testnet/launcher/docker.go | 1 - 1 file changed, 1 deletion(-) diff --git a/testnet/launcher/docker.go b/testnet/launcher/docker.go index 9be3c97906..80f4ad0390 100644 --- a/testnet/launcher/docker.go +++ b/testnet/launcher/docker.go @@ -61,7 +61,6 @@ func (t *Testnet) Start() error { node.WithInMemoryHostDB(true), node.WithDebugNamespaceEnabled(true), node.WithLogLevel(4), - node.WithCoinbase() ) sequencerNode := node.NewDockerNode(sequencerNodeConfig) From 2eb18e2bcdfa8ac891dfaa5a3f83b395daec8b16 Mon Sep 17 00:00:00 2001 From: StefanIliev545 Date: Mon, 18 Sep 2023 03:06:08 +0300 Subject: [PATCH 29/47] Ran gofumpt. --- go/common/tracers/tracers.go | 2 +- integration/simulation/network/network_utils.go | 2 +- integration/simulation/validate_chain.go | 1 - 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/go/common/tracers/tracers.go b/go/common/tracers/tracers.go index aa723bddad..65bca6fc03 100644 --- a/go/common/tracers/tracers.go +++ b/go/common/tracers/tracers.go @@ -1,7 +1,7 @@ // Package tracers: This file was copied/adapted from geth - go-ethereum/eth/tracers // -//nolint +// nolint package tracers import ( diff --git a/integration/simulation/network/network_utils.go b/integration/simulation/network/network_utils.go index 94af036537..39f72bf1bd 100644 --- a/integration/simulation/network/network_utils.go +++ b/integration/simulation/network/network_utils.go @@ -93,7 +93,7 @@ func createInMemObscuroNode( ManagementContractAddress: *mgtContractAddress, MaxBatchSize: 1024 * 25, MaxRollupSize: 1024 * 64, - BaseFee: big.NewInt(1), //todo @siliev:: fix test transaction builders so this can be different + BaseFee: big.NewInt(1), // todo @siliev:: fix test transaction builders so this can be different } enclaveLogger := testlog.Logger().New(log.NodeIDKey, id, log.CmpKey, log.EnclaveCmp) diff --git a/integration/simulation/validate_chain.go b/integration/simulation/validate_chain.go index 730cfe37a1..8621b341c2 100644 --- a/integration/simulation/validate_chain.go +++ b/integration/simulation/validate_chain.go @@ -128,7 +128,6 @@ func checkObscuroBlockchainValidity(t *testing.T, s *Simulation, maxL1Height uin } func checkCollectedL1Fees(t *testing.T, node ethadapter.EthClient, s *Simulation, nodeIdx int, rollupReceipts types.Receipts) { - costOfRollups := big.NewInt(0) if !s.Params.IsInMem { From 6f75ee816ba678a988ec6bddf3e3f7a0d6acaa81 Mon Sep 17 00:00:00 2001 From: StefanIliev545 Date: Mon, 18 Sep 2023 03:15:09 +0300 Subject: [PATCH 30/47] Fix linter issue.' --- go/common/tracers/tracers.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/go/common/tracers/tracers.go b/go/common/tracers/tracers.go index 65bca6fc03..aa723bddad 100644 --- a/go/common/tracers/tracers.go +++ b/go/common/tracers/tracers.go @@ -1,7 +1,7 @@ // Package tracers: This file was copied/adapted from geth - go-ethereum/eth/tracers // -// nolint +//nolint package tracers import ( From d64203e683963ee837a0fea32a564be1351a666a Mon Sep 17 00:00:00 2001 From: StefanIliev545 Date: Mon, 18 Sep 2023 14:28:47 +0300 Subject: [PATCH 31/47] Resolved PR comments. --- go/common/headers.go | 6 +++--- go/enclave/components/batch_executor.go | 3 +++ go/enclave/components/rollup_compression.go | 22 ++++++++++----------- go/enclave/gas/gas.go | 1 + go/enclave/gas/oracle.go | 6 ++++++ 5 files changed, 24 insertions(+), 14 deletions(-) diff --git a/go/common/headers.go b/go/common/headers.go index 6cb6f6af33..b7f2a6492e 100644 --- a/go/common/headers.go +++ b/go/common/headers.go @@ -42,7 +42,7 @@ type BatchHeader struct { CrossChainMessages []MessageBus.StructsCrossChainMessage `json:"crossChainMessages"` LatestInboundCrossChainHash common.Hash `json:"inboundCrossChainHash"` // The block hash of the latest block that has been scanned for cross chain messages. LatestInboundCrossChainHeight *big.Int `json:"inboundCrossChainHeight"` // The block height of the latest block that has been scanned for cross chain messages. - TransfersTree common.Hash `json:"transfersTree"` + TransfersTree common.Hash `json:"transfersTree"` // This is a merkle tree of all of the outbound value transfers for the MainNet } // MarshalJSON custom marshals the BatchHeader into a json @@ -101,8 +101,8 @@ type CalldataRollupHeader struct { L1HeightDeltas [][]byte // delta of the block height. Stored as a byte array because rlp can't encode negative numbers // these fields are for debugging the compression. Uncomment if there are issues - BatchHashes []L2BatchHash - BatchHeaders []*BatchHeader + //BatchHashes []L2BatchHash + //BatchHeaders []*BatchHeader ReOrgs [][]byte `rlp:"optional"` // sparse list of reorged headers - non null only for reorgs. } diff --git a/go/enclave/components/batch_executor.go b/go/enclave/components/batch_executor.go index 439cf0a13b..700408481b 100644 --- a/go/enclave/components/batch_executor.go +++ b/go/enclave/components/batch_executor.go @@ -61,6 +61,9 @@ func NewBatchExecutor( } } +// payL1Fees - this function modifies the state db according to the transactions contained within the batch context +// in order to substract gas fees from the balance. It returns a list of the transactions that have prepaid for their L1 +// publishing costs. func (executor *batchExecutor) payL1Fees(stateDB *state.StateDB, context *BatchExecutionContext) common.L2Transactions { transactions := make(common.L2Transactions, 0) block, _ := executor.storage.FetchBlock(context.BlockPtr) diff --git a/go/enclave/components/rollup_compression.go b/go/enclave/components/rollup_compression.go index f86ef0e89c..6bc62bffe2 100644 --- a/go/enclave/components/rollup_compression.go +++ b/go/enclave/components/rollup_compression.go @@ -243,10 +243,10 @@ func (rc *RollupCompression) createRollupHeader(batches []*core.Batch) (*common. BatchTimeDeltas: timeDeltasBA, ReOrgs: reorgsBA, L1HeightDeltas: l1DeltasBA, - BatchHashes: batchHashes, - BatchHeaders: batchHeaders, - Coinbase: batches[0].Header.Coinbase, - BaseFee: batches[0].Header.BaseFee, + // BatchHashes: batchHashes, + // BatchHeaders: batchHeaders, + Coinbase: batches[0].Header.Coinbase, + BaseFee: batches[0].Header.BaseFee, } return calldataRollupHeader, nil @@ -367,7 +367,7 @@ func (rc *RollupCompression) executeAndSaveIncompleteBatches(calldataRollupHeade } } - for i, incompleteBatch := range incompleteBatches { + for _, incompleteBatch := range incompleteBatches { // check whether the batch is already stored in the database b, err := rc.storage.FetchBatchBySeqNo(incompleteBatch.seqNo.Uint64()) if err == nil { @@ -386,10 +386,10 @@ func (rc *RollupCompression) executeAndSaveIncompleteBatches(calldataRollupHeade return err } // Sanity check - uncomment when debugging - if genBatch.Hash() != calldataRollupHeader.BatchHashes[i] { + /*if genBatch.Hash() != calldataRollupHeader.BatchHashes[i] { rc.logger.Info(fmt.Sprintf("Good %+v \n Calc %+v", calldataRollupHeader.BatchHeaders[i], genBatch.Header)) rc.logger.Crit("Rollup decompression failure. The check hashes don't match") - } + }*/ err = rc.storage.StoreBatch(genBatch) if err != nil { @@ -429,10 +429,10 @@ func (rc *RollupCompression) executeAndSaveIncompleteBatches(calldataRollupHeade return err } // Sanity check - uncomment when debugging - if computedBatch.Batch.Hash() != calldataRollupHeader.BatchHashes[i] { - rc.logger.Info(fmt.Sprintf("Good %+v\nCalc %+v", calldataRollupHeader.BatchHeaders[i], computedBatch.Batch.Header)) - rc.logger.Crit("Rollup decompression failure. The check hashes don't match") - } + /* if computedBatch.Batch.Hash() != calldataRollupHeader.BatchHashes[i] { + rc.logger.Info(fmt.Sprintf("Good %+v\nCalc %+v", calldataRollupHeader.BatchHeaders[i], computedBatch.Batch.Header)) + rc.logger.Crit("Rollup decompression failure. The check hashes don't match") + }*/ if _, err := computedBatch.Commit(true); err != nil { return fmt.Errorf("cannot commit stateDB for incoming valid batch seq=%d. Cause: %w", incompleteBatch.seqNo, err) diff --git a/go/enclave/gas/gas.go b/go/enclave/gas/gas.go index eb160fd9a4..771e7e3aa0 100644 --- a/go/enclave/gas/gas.go +++ b/go/enclave/gas/gas.go @@ -31,6 +31,7 @@ func (gp *ObscuroGasPool) ForTransaction(tx *types.Transaction) (*gethcore.GasPo return &gPool, nil } +// CalculateL1GasUsed - calculates the gas cost of having a transaction on the l1. func CalculateL1GasUsed(data []byte, overhead *big.Int) *big.Int { zeroes, ones := zeroesAndOnes(data) zeroesGas := zeroes * params.TxDataZeroGas diff --git a/go/enclave/gas/oracle.go b/go/enclave/gas/oracle.go index ac481c7eac..e9fe44bc8c 100644 --- a/go/enclave/gas/oracle.go +++ b/go/enclave/gas/oracle.go @@ -7,6 +7,8 @@ import ( "github.com/ethereum/go-ethereum/rlp" ) +// Oracle - the interface for the future precompiled gas oracle contract +// which will expose necessary l1 information. type Oracle interface { ProcessL1Block(block *types.Block) GetGasCostForTx(tx *types.Transaction, block *types.Block) (*big.Int, error) @@ -22,6 +24,9 @@ func NewGasOracle() Oracle { } } +// ProcessL1Block - should be used to update the gas oracle. Currently does not really +// fit into phase 1 gas mechancis as the information needs to be available per block. +// would be fixed when this becomes a smart contract using the stateDB func (o *oracle) ProcessL1Block(block *types.Block) { blockBaseFee := block.BaseFee() if blockBaseFee != nil { @@ -29,6 +34,7 @@ func (o *oracle) ProcessL1Block(block *types.Block) { } } +// GetGasCostForTx - Returns the expected l1 gas cost for a transaction at a given l1 block. func (o *oracle) GetGasCostForTx(tx *types.Transaction, block *types.Block) (*big.Int, error) { encodedTx, err := rlp.EncodeToBytes(tx) if err != nil { From 97bb9fb792c4e1cc7fb9fd55b6be2d9224b389bf Mon Sep 17 00:00:00 2001 From: StefanIliev545 Date: Mon, 18 Sep 2023 14:38:54 +0300 Subject: [PATCH 32/47] Ran gofumpt. --- go/common/headers.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/go/common/headers.go b/go/common/headers.go index b7f2a6492e..28c13eea68 100644 --- a/go/common/headers.go +++ b/go/common/headers.go @@ -101,8 +101,8 @@ type CalldataRollupHeader struct { L1HeightDeltas [][]byte // delta of the block height. Stored as a byte array because rlp can't encode negative numbers // these fields are for debugging the compression. Uncomment if there are issues - //BatchHashes []L2BatchHash - //BatchHeaders []*BatchHeader + // BatchHashes []L2BatchHash + // BatchHeaders []*BatchHeader ReOrgs [][]byte `rlp:"optional"` // sparse list of reorged headers - non null only for reorgs. } From c2d0c6416d62f01b1d32dc9fd2a3735e617745cc Mon Sep 17 00:00:00 2001 From: StefanIliev545 Date: Mon, 18 Sep 2023 17:00:03 +0300 Subject: [PATCH 33/47] Added gas limit config. --- go/common/gethencoding/geth_encoding.go | 2 +- go/common/headers.go | 1 + go/config/enclave_config.go | 3 +++ go/enclave/components/batch_executor.go | 9 ++++++++- go/enclave/components/interfaces.go | 2 +- go/enclave/components/rollup_compression.go | 11 ++++++++++- go/enclave/core/batch.go | 1 + go/enclave/enclave.go | 1 + go/enclave/nodetype/sequencer.go | 9 ++++++++- go/enclave/nodetype/validator.go | 3 ++- integration/simulation/network/network_utils.go | 1 + 11 files changed, 37 insertions(+), 6 deletions(-) diff --git a/go/common/gethencoding/geth_encoding.go b/go/common/gethencoding/geth_encoding.go index 933cde96a5..9a414a6cfb 100644 --- a/go/common/gethencoding/geth_encoding.go +++ b/go/common/gethencoding/geth_encoding.go @@ -242,7 +242,7 @@ func CreateEthHeaderForBatch(h *common.BatchHeader, secret []byte) (*types.Heade ReceiptHash: h.ReceiptHash, Difficulty: big.NewInt(0), Number: h.Number, - GasLimit: 1_000_000_000, + GasLimit: h.GasLimit, GasUsed: 0, BaseFee: big.NewInt(0).SetUint64(baseFee), Coinbase: h.Coinbase, diff --git a/go/common/headers.go b/go/common/headers.go index 28c13eea68..820cc5adf5 100644 --- a/go/common/headers.go +++ b/go/common/headers.go @@ -94,6 +94,7 @@ type CalldataRollupHeader struct { Coinbase common.Address BaseFee *big.Int + GasLimit uint64 StartTime uint64 BatchTimeDeltas [][]byte // todo - minimize assuming a default of 1 sec and then store only exceptions diff --git a/go/config/enclave_config.go b/go/config/enclave_config.go index 397587d2a5..c34f8438e5 100644 --- a/go/config/enclave_config.go +++ b/go/config/enclave_config.go @@ -6,6 +6,7 @@ import ( "github.com/obscuronet/go-obscuro/go/common" gethcommon "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/params" "github.com/obscuronet/go-obscuro/go/common/log" gethlog "github.com/ethereum/go-ethereum/log" @@ -66,6 +67,7 @@ type EnclaveConfig struct { GasPaymentAddress gethcommon.Address BaseFee *big.Int + GasLimit *big.Int } // DefaultEnclaveConfig returns an EnclaveConfig with default values. @@ -95,5 +97,6 @@ func DefaultEnclaveConfig() *EnclaveConfig { MaxRollupSize: 1024 * 64, GasPaymentAddress: gethcommon.BigToAddress(gethcommon.Big2), BaseFee: new(big.Int).SetUint64(1), + GasLimit: new(big.Int).SetUint64(params.MaxGasLimit), } } diff --git a/go/enclave/components/batch_executor.go b/go/enclave/components/batch_executor.go index 700408481b..d44eac38ee 100644 --- a/go/enclave/components/batch_executor.go +++ b/go/enclave/components/batch_executor.go @@ -247,7 +247,13 @@ func (vt ValueTransfers) EncodeIndex(index int, w *bytes.Buffer) { } } -func (executor *batchExecutor) CreateGenesisState(blkHash common.L1BlockHash, timeNow uint64, coinbase gethcommon.Address, baseFee *big.Int) (*core.Batch, *types.Transaction, error) { +func (executor *batchExecutor) CreateGenesisState( + blkHash common.L1BlockHash, + timeNow uint64, + coinbase gethcommon.Address, + baseFee *big.Int, + gasLimit *big.Int, +) (*core.Batch, *types.Transaction, error) { preFundGenesisState, err := executor.genesis.GetGenesisRoot(executor.storage) if err != nil { return nil, nil, err @@ -266,6 +272,7 @@ func (executor *batchExecutor) CreateGenesisState(blkHash common.L1BlockHash, ti Time: timeNow, Coinbase: coinbase, BaseFee: baseFee, + GasLimit: gasLimit.Uint64(), //todo (@siliev) - does the batch header need uint64? }, Transactions: []*common.L2Tx{}, } diff --git a/go/enclave/components/interfaces.go b/go/enclave/components/interfaces.go index 0daf678b5a..aff1c08da1 100644 --- a/go/enclave/components/interfaces.go +++ b/go/enclave/components/interfaces.go @@ -75,7 +75,7 @@ type BatchExecutor interface { // CreateGenesisState - will create and commit the genesis state in the stateDB for the given block hash, // and uint64 timestamp representing the time now. In this genesis state is where one can // find preallocated funds for faucet. TODO - make this an option - CreateGenesisState(common.L1BlockHash, uint64, gethcommon.Address, *big.Int) (*core.Batch, *types.Transaction, error) + CreateGenesisState(common.L1BlockHash, uint64, gethcommon.Address, *big.Int, *big.Int) (*core.Batch, *types.Transaction, error) } type BatchRegistry interface { diff --git a/go/enclave/components/rollup_compression.go b/go/enclave/components/rollup_compression.go index 6bc62bffe2..382089ac35 100644 --- a/go/enclave/components/rollup_compression.go +++ b/go/enclave/components/rollup_compression.go @@ -82,6 +82,7 @@ type batchFromRollup struct { l1Proof common.L1BlockHash coinbase gethcommon.Address baseFee *big.Int + gasLimit uint64 header *common.BatchHeader // for reorgs } @@ -247,6 +248,7 @@ func (rc *RollupCompression) createRollupHeader(batches []*core.Batch) (*common. // BatchHeaders: batchHeaders, Coinbase: batches[0].Header.Coinbase, BaseFee: batches[0].Header.BaseFee, + GasLimit: batches[0].Header.GasLimit, } return calldataRollupHeader, nil @@ -339,6 +341,7 @@ func (rc *RollupCompression) createIncompleteBatches(calldataRollupHeader *commo header: fullReorgedHeader, coinbase: calldataRollupHeader.Coinbase, baseFee: calldataRollupHeader.BaseFee, + gasLimit: calldataRollupHeader.GasLimit, } rc.logger.Info("Rollup decompressed batch", log.BatchSeqNoKey, currentSeqNo, log.BatchHeightKey, currentHeight, "rollup_idx", currentBatchIdx, "l1_height", block.Number(), "l1_hash", block.Hash()) } @@ -381,7 +384,13 @@ func (rc *RollupCompression) executeAndSaveIncompleteBatches(calldataRollupHeade switch { // handle genesis case incompleteBatch.seqNo.Uint64() == common.L2GenesisSeqNo: - genBatch, _, err := rc.batchExecutor.CreateGenesisState(incompleteBatch.l1Proof, incompleteBatch.time, calldataRollupHeader.Coinbase, calldataRollupHeader.BaseFee) + genBatch, _, err := rc.batchExecutor.CreateGenesisState( + incompleteBatch.l1Proof, + incompleteBatch.time, + calldataRollupHeader.Coinbase, + calldataRollupHeader.BaseFee, + big.NewInt(0).SetUint64(calldataRollupHeader.GasLimit), + ) if err != nil { return err } diff --git a/go/enclave/core/batch.go b/go/enclave/core/batch.go index 596a4314dd..67b4d3db77 100644 --- a/go/enclave/core/batch.go +++ b/go/enclave/core/batch.go @@ -117,6 +117,7 @@ func DeterministicEmptyBatch( Time: time, BaseFee: baseFee, Coinbase: coinbase, + GasLimit: parent.GasLimit, } b := Batch{ Header: &h, diff --git a/go/enclave/enclave.go b/go/enclave/enclave.go index b77b4c539c..6af57cd6ce 100644 --- a/go/enclave/enclave.go +++ b/go/enclave/enclave.go @@ -238,6 +238,7 @@ func NewEnclave( MaxBatchSize: config.MaxBatchSize, MaxRollupSize: config.MaxRollupSize, GasPaymentAddress: config.GasPaymentAddress, + BatchGasLimit: config.GasLimit, BaseFee: config.BaseFee, }, ) diff --git a/go/enclave/nodetype/sequencer.go b/go/enclave/nodetype/sequencer.go index 7219ffab31..2dc7017619 100644 --- a/go/enclave/nodetype/sequencer.go +++ b/go/enclave/nodetype/sequencer.go @@ -36,6 +36,7 @@ type SequencerSettings struct { MaxBatchSize uint64 MaxRollupSize uint64 GasPaymentAddress gethcommon.Address + BatchGasLimit *big.Int BaseFee *big.Int } @@ -122,7 +123,13 @@ func (s *sequencer) CreateBatch() error { // won't be committed by the producer. func (s *sequencer) initGenesis(block *common.L1Block) error { s.logger.Info("Initializing genesis state", log.BlockHashKey, block.Hash()) - batch, msgBusTx, err := s.batchProducer.CreateGenesisState(block.Hash(), uint64(time.Now().Unix()), s.settings.GasPaymentAddress, s.settings.BaseFee) + batch, msgBusTx, err := s.batchProducer.CreateGenesisState( + block.Hash(), + uint64(time.Now().Unix()), + s.settings.GasPaymentAddress, + s.settings.BaseFee, + s.settings.BatchGasLimit, + ) if err != nil { return err } diff --git a/go/enclave/nodetype/validator.go b/go/enclave/nodetype/validator.go index a1db5b21e8..7039abfdf7 100644 --- a/go/enclave/nodetype/validator.go +++ b/go/enclave/nodetype/validator.go @@ -3,6 +3,7 @@ package nodetype import ( "errors" "fmt" + "math/big" "github.com/ethereum/go-ethereum/core/types" @@ -128,7 +129,7 @@ func (val *obsValidator) executionPrerequisites(batch *core.Batch) (bool, error) } func (val *obsValidator) handleGenesis(batch *core.Batch) error { - genBatch, _, err := val.batchExecutor.CreateGenesisState(batch.Header.L1Proof, batch.Header.Time, batch.Header.Coinbase, batch.Header.BaseFee) + genBatch, _, err := val.batchExecutor.CreateGenesisState(batch.Header.L1Proof, batch.Header.Time, batch.Header.Coinbase, batch.Header.BaseFee, big.NewInt(0).SetUint64(batch.Header.GasLimit)) if err != nil { return err } diff --git a/integration/simulation/network/network_utils.go b/integration/simulation/network/network_utils.go index 39f72bf1bd..79954ca992 100644 --- a/integration/simulation/network/network_utils.go +++ b/integration/simulation/network/network_utils.go @@ -94,6 +94,7 @@ func createInMemObscuroNode( MaxBatchSize: 1024 * 25, MaxRollupSize: 1024 * 64, BaseFee: big.NewInt(1), // todo @siliev:: fix test transaction builders so this can be different + GasLimit: big.NewInt(1_000_000), } enclaveLogger := testlog.Logger().New(log.NodeIDKey, id, log.CmpKey, log.EnclaveCmp) From cc82cafb43231a416d0989912f9ba25b29f90b1e Mon Sep 17 00:00:00 2001 From: StefanIliev545 Date: Mon, 18 Sep 2023 20:35:27 +0300 Subject: [PATCH 34/47] Generate abi bindings. --- .../testnet/layer2/001_whitelist_tokens.ts | 23 ++++++++++++++++--- .../EthereumBridge/EthereumBridge.go | 2 +- .../generated/ObscuroBridge/ObscuroBridge.go | 2 +- contracts/src/bridge/IBridge.sol | 4 ++-- 4 files changed, 24 insertions(+), 7 deletions(-) diff --git a/contracts/deployment_scripts/testnet/layer2/001_whitelist_tokens.ts b/contracts/deployment_scripts/testnet/layer2/001_whitelist_tokens.ts index b436fca919..cb467fa644 100644 --- a/contracts/deployment_scripts/testnet/layer2/001_whitelist_tokens.ts +++ b/contracts/deployment_scripts/testnet/layer2/001_whitelist_tokens.ts @@ -90,14 +90,31 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { let messages = getXChainMessages(hocResult); messages = messages.concat(getXChainMessages(pocResult)); + console.log("Attempting to verify cross chain message transfer."); + // Poll message submission await new Promise(async (resolve, fail)=> { setTimeout(fail, 30_000) const messageBusContract = (await hre.ethers.getContractAt('MessageBus', '0x526c84529b2b8c11f57d93d3f5537aca3aecef9b')); - while (await messageBusContract.callStatic.verifyMessageFinalized(messages[1]) != true) { - console.log(`Messages not stored on L2 yet, retrying...`); - await sleep(1_000); + const gasLimit = await messageBusContract.estimateGas.verifyMessageFinalized(messages[1]) + const gasPrice = await l2Network.ethers.provider.getGasPrice() + + try { + while (await messageBusContract.callStatic.verifyMessageFinalized(messages[1], { + from: l2Accounts.deployer, + gasLimit: gasLimit, + gasPrice: gasPrice + }) != true) { + console.log(`Messages not stored on L2 yet, retrying...`); + await sleep(1_000); + } + }catch (err) { + console.log(err) + fail(err) } + + + resolve(true); }); diff --git a/contracts/generated/EthereumBridge/EthereumBridge.go b/contracts/generated/EthereumBridge/EthereumBridge.go index 8c81b0af07..1ba1afaa04 100644 --- a/contracts/generated/EthereumBridge/EthereumBridge.go +++ b/contracts/generated/EthereumBridge/EthereumBridge.go @@ -32,7 +32,7 @@ var ( // 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: "0x60806040526001805463ffffffff60a01b191690553480156200002157600080fd5b5060405162002b4e38038062002b4e83398101604081905262000044916200012c565b600080546001600160a01b0319166001600160a01b038416908117909155604080516350d113fd60e11b8152905184929163a1a227fa916004808301926020929190829003018186803b1580156200009b57600080fd5b505afa158015620000b0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620000d6919062000164565b600180546001600160a01b039283166001600160a01b031991821617909155600580549490921693169290921790915550620001899050565b80516001600160a01b03811681146200012757600080fd5b919050565b600080604083850312156200014057600080fd5b6200014b836200010f565b91506200015b602084016200010f565b90509250929050565b6000602082840312156200017757600080fd5b62000182826200010f565b9392505050565b6129b580620001996000396000f3fe6080604052600436106200008a5760003560e01c80639813c7b211620000555780639813c7b214620002065780639e405b711462000256578063a381c8e21462000290578063d5c6b50414620002b55762000103565b80628d48e3146200014c5780631888d71214620001a3578063458ffd6314620001bc57806383bece4d14620001e15762000103565b36620001035760405162461bcd60e51b815260206004820152602360248201527f436f6e747261637420646f6573206e6f7420737570706f72742072656365697660448201527f652829000000000000000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b60405162461bcd60e51b815260206004820152601d60248201527f66616c6c6261636b2829206d6574686f6420756e737570706f727465640000006044820152606401620000fa565b3480156200015957600080fd5b50620001866200016b36600462000c44565b6004602052600090815260409020546001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b620001ba620001b436600462000c44565b620002ef565b005b348015620001c957600080fd5b50620001ba620001db36600462000cb7565b62000470565b348015620001ee57600080fd5b50620001ba6200020036600462000d43565b6200068e565b3480156200021357600080fd5b50620002456200022536600462000c44565b6001600160a01b0390811660009081526002602052604090205416151590565b60405190151581526020016200019a565b3480156200026357600080fd5b50620001866200027536600462000c44565b6003602052600090815260409020546001600160a01b031681565b3480156200029d57600080fd5b50620001ba620002af36600462000d43565b620008d1565b348015620002c257600080fd5b5062000186620002d436600462000c44565b6002602052600090815260409020546001600160a01b031681565b60003411620003415760405162461bcd60e51b815260206004820152600d60248201527f4e6f7468696e672073656e742e000000000000000000000000000000000000006044820152606401620000fa565b6000805260026020527fac33ff75c19e70fe83507db0d683fd3465c996598dc972688b7ace676c89077b546001600160a01b0316620003c35760405162461bcd60e51b815260206004820152601560248201527f4e6f206d617070696e6720666f7220746f6b656e2e00000000000000000000006044820152606401620000fa565b60008052600360209081527f3617319a054d772f909f7c479a2cebe5066e836a939412e32403c99029b92eff54604080516001600160a01b03928316602482015234604482015284831660648083019190915282518083039091018152608490910190915291820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff166383bece4d60e01b1790526005546200046c91168260015b60008062000a5f565b5050565b6005546000546001600160a01b0391821691163314620004f95760405162461bcd60e51b815260206004820152603060248201527f436f6e74726163742063616c6c6572206973206e6f742074686520726567697360448201527f7465726564206d657373656e67657221000000000000000000000000000000006064820152608401620000fa565b806001600160a01b03166200050d62000b8d565b6001600160a01b0316146200058b5760405162461bcd60e51b815260206004820152603160248201527f43726f737320636861696e206d65737361676520636f6d696e672066726f6d2060448201527f696e636f72726563742073656e646572210000000000000000000000000000006064820152608401620000fa565b6000858585856040516200059f9062000c1d565b620005ae949392919062000db3565b604051809103906000f080158015620005cb573d6000803e3d6000fd5b506001600160a01b03808216600081815260026020908152604080832080547fffffffffffffffffffffffff00000000000000000000000000000000000000009081168617909155600383528184208054968f169682168717905594835260049091529081902080549093169091179091555190915081907f30c05779f384e0ae9d43bbf7ec4417f28bdc53d02a35551b6eb270a9c4c71dca906200067c908a9084908b908b908b908b9062000de9565b60405180910390a15050505050505050565b6005546000546001600160a01b0391821691163314620007175760405162461bcd60e51b815260206004820152603060248201527f436f6e74726163742063616c6c6572206973206e6f742074686520726567697360448201527f7465726564206d657373656e67657221000000000000000000000000000000006064820152608401620000fa565b806001600160a01b03166200072b62000b8d565b6001600160a01b031614620007a95760405162461bcd60e51b815260206004820152603160248201527f43726f737320636861696e206d65737361676520636f6d696e672066726f6d2060448201527f696e636f72726563742073656e646572210000000000000000000000000000006064820152608401620000fa565b6001600160a01b038085166000908152600460209081526040808320548416808452600290925290912054909116806200084c5760405162461bcd60e51b815260206004820152602b60248201527f526563656976696e672061737365747320666f7220756e6b6e6f776e2077726160448201527f7070656420746f6b656e210000000000000000000000000000000000000000006064820152608401620000fa565b6040517f979005ad0000000000000000000000000000000000000000000000000000000081526001600160a01b0385811660048301526024820187905282169063979005ad90604401600060405180830381600087803b158015620008b057600080fd5b505af1158015620008c5573d6000803e3d6000fd5b50505050505050505050565b6001600160a01b03808416600090815260026020526040902054166200093a5760405162461bcd60e51b815260206004820152601560248201527f4e6f206d617070696e6720666f7220746f6b656e2e00000000000000000000006044820152606401620000fa565b6001600160a01b03838116600090815260026020526040908190205490517f1dd319cb000000000000000000000000000000000000000000000000000000008152336004820152602481018590529116908190631dd319cb90604401600060405180830381600087803b158015620009b157600080fd5b505af1158015620009c6573d6000803e3d6000fd5b505050506001600160a01b03848116600090815260036020908152604091829020548251908416602482015260448101879052858416606480830191909152835180830390910181526084909101909252810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff166383bece4d60e01b179052600554909162000a58911682600162000463565b5050505050565b60006040518060600160405280876001600160a01b031681526020018681526020018481525060405160200162000a97919062000e8a565b60408051808303601f19018152919052600180549192506001600160a01b0382169163b1454caa917401000000000000000000000000000000000000000090910463ffffffff1690601462000aec8362000ed1565b91906101000a81548163ffffffff021916908363ffffffff1602179055508684866040518563ffffffff1660e01b815260040162000b2e949392919062000f1d565b602060405180830381600087803b15801562000b4957600080fd5b505af115801562000b5e573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000b84919062000f5c565b50505050505050565b60008060009054906101000a90046001600160a01b03166001600160a01b03166363012de56040518163ffffffff1660e01b815260040160206040518083038186803b15801562000bdd57600080fd5b505afa15801562000bf2573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000c18919062000f88565b905090565b6119d78062000fa983390190565b6001600160a01b038116811462000c4157600080fd5b50565b60006020828403121562000c5757600080fd5b813562000c648162000c2b565b9392505050565b60008083601f84011262000c7e57600080fd5b50813567ffffffffffffffff81111562000c9757600080fd5b60208301915083602082850101111562000cb057600080fd5b9250929050565b60008060008060006060868803121562000cd057600080fd5b853562000cdd8162000c2b565b9450602086013567ffffffffffffffff8082111562000cfb57600080fd5b62000d0989838a0162000c6b565b9096509450604088013591508082111562000d2357600080fd5b5062000d328882890162000c6b565b969995985093965092949392505050565b60008060006060848603121562000d5957600080fd5b833562000d668162000c2b565b925060208401359150604084013562000d7f8162000c2b565b809150509250925092565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b60408152600062000dc960408301868862000d8a565b828103602084015262000dde81858762000d8a565b979650505050505050565b60006001600160a01b0380891683528088166020840152506080604083015262000e1860808301868862000d8a565b828103606084015262000e2d81858762000d8a565b9998505050505050505050565b6000815180845260005b8181101562000e625760208185018101518683018201520162000e44565b8181111562000e75576000602083870101525b50601f01601f19169290920160200192915050565b602081526001600160a01b038251166020820152600060208301516060604084015262000ebb608084018262000e3a565b9050604084015160608401528091505092915050565b600063ffffffff8083168181141562000f13577f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6001019392505050565b600063ffffffff80871683528086166020840152506080604083015262000f48608083018562000e3a565b905060ff8316606083015295945050505050565b60006020828403121562000f6f57600080fd5b815167ffffffffffffffff8116811462000c6457600080fd5b60006020828403121562000f9b57600080fd5b815162000c648162000c2b56fe6080604052600580546001600160a01b03191673deb34a740eca1ec42c8b8204cbec0ba34fdd27f31790553480156200003757600080fd5b50604051620019d7380380620019d78339810160408190526200005a91620002e3565b8181818181600390805190602001906200007692919062000170565b5080516200008c90600490602084019062000170565b5050505050620000c37fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c2177533620000cb60201b60201c565b50506200038a565b60008281526007602090815260408083206001600160a01b038516845290915290205460ff166200016c5760008281526007602090815260408083206001600160a01b03851684529091529020805460ff191660011790556200012b3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45b5050565b8280546200017e906200034d565b90600052602060002090601f016020900481019282620001a25760008555620001ed565b82601f10620001bd57805160ff1916838001178555620001ed565b82800160010185558215620001ed579182015b82811115620001ed578251825591602001919060010190620001d0565b50620001fb929150620001ff565b5090565b5b80821115620001fb576000815560010162000200565b634e487b7160e01b600052604160045260246000fd5b600082601f8301126200023e57600080fd5b81516001600160401b03808211156200025b576200025b62000216565b604051601f8301601f19908116603f0116810190828211818310171562000286576200028662000216565b81604052838152602092508683858801011115620002a357600080fd5b600091505b83821015620002c75785820183015181830184015290820190620002a8565b83821115620002d95760008385830101525b9695505050505050565b60008060408385031215620002f757600080fd5b82516001600160401b03808211156200030f57600080fd5b6200031d868387016200022c565b935060208501519150808211156200033457600080fd5b5062000343858286016200022c565b9150509250929050565b600181811c908216806200036257607f821691505b602082108114156200038457634e487b7160e01b600052602260045260246000fd5b50919050565b61163d806200039a6000396000f3fe608060405234801561001057600080fd5b50600436106101775760003560e01c806339509351116100d8578063979005ad1161008c578063a9059cbb11610066578063a9059cbb1461031a578063d547741f1461032d578063dd62ed3e1461034057600080fd5b8063979005ad146102ec578063a217fddf146102ff578063a457c2d71461030757600080fd5b806375b238fc116100bd57806375b238fc1461028457806391d14854146102ab57806395d89b41146102e457600080fd5b8063395093511461025e57806370a082311461027157600080fd5b806323b872dd1161012f5780632f2ff15d116101145780632f2ff15d14610229578063313ce5671461023c57806336568abe1461024b57600080fd5b806323b872dd146101f3578063248a9ca31461020657600080fd5b8063095ea7b311610160578063095ea7b3146101b957806318160ddd146101cc5780631dd319cb146101de57600080fd5b806301ffc9a71461017c57806306fdde03146101a4575b600080fd5b61018f61018a3660046112f7565b610353565b60405190151581526020015b60405180910390f35b6101ac6103ec565b60405161019b9190611365565b61018f6101c73660046113b4565b61047e565b6002545b60405190815260200161019b565b6101f16101ec3660046113b4565b610496565b005b61018f6102013660046113de565b61052d565b6101d061021436600461141a565b60009081526007602052604090206001015490565b6101f1610237366004611433565b610551565b6040516012815260200161019b565b6101f1610259366004611433565b610577565b61018f61026c3660046113b4565b610603565b6101d061027f36600461145f565b610642565b6101d07fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c2177581565b61018f6102b9366004611433565b60009182526007602090815260408084206001600160a01b0393909316845291905290205460ff1690565b6101ac6106ea565b6101f16102fa3660046113b4565b6106f9565b6101d0600081565b61018f6103153660046113b4565b61072e565b61018f6103283660046113b4565b6107d8565b6101f161033b366004611433565b6107e6565b6101d061034e36600461147a565b61080c565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f7965db0b0000000000000000000000000000000000000000000000000000000014806103e657507f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316145b92915050565b6060600380546103fb906114a4565b80601f0160208091040260200160405190810160405280929190818152602001828054610427906114a4565b80156104745780601f1061044957610100808354040283529160200191610474565b820191906000526020600020905b81548152906001019060200180831161045757829003601f168201915b5050505050905090565b60003361048c81858561091d565b5060019392505050565b7fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c217756104c18133610a75565b816104cb84610642565b101561051e5760405162461bcd60e51b815260206004820152601560248201527f496e73756666696369656e742062616c616e63652e000000000000000000000060448201526064015b60405180910390fd5b6105288383610af5565b505050565b60003361053b858285610c7a565b610546858585610cf4565b506001949350505050565b60008281526007602052604090206001015461056d8133610a75565b6105288383610f0b565b6001600160a01b03811633146105f55760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201527f20726f6c657320666f722073656c6600000000000000000000000000000000006064820152608401610515565b6105ff8282610fad565b5050565b3360008181526001602090815260408083206001600160a01b038716845290915281205490919061048c908290869061063d9087906114f5565b61091d565b6000326001600160a01b0383161415610673576001600160a01b0382166000908152602081905260409020546103e6565b336001600160a01b03831614156106a2576001600160a01b0382166000908152602081905260409020546103e6565b60405162461bcd60e51b815260206004820152601f60248201527f4e6f7420616c6c6f77656420746f2072656164207468652062616c616e6365006044820152606401610515565b6060600480546103fb906114a4565b7fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c217756107248133610a75565b6105288383611030565b3360008181526001602090815260408083206001600160a01b0387168452909152812054909190838110156107cb5760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f7760448201527f207a65726f0000000000000000000000000000000000000000000000000000006064820152608401610515565b610546828686840361091d565b60003361048c818585610cf4565b6000828152600760205260409020600101546108028133610a75565b6105288383610fad565b6000326001600160a01b038416148061082d5750326001600160a01b038316145b15610860576001600160a01b038084166000908152600160209081526040808320938616835292905220545b90506103e6565b336001600160a01b038416148061087f5750336001600160a01b038316145b156108af576001600160a01b03808416600090815260016020908152604080832093861683529290522054610859565b60405162461bcd60e51b815260206004820152602160248201527f4e6f7420616c6c6f77656420746f20726561642074686520616c6c6f77616e6360448201527f65000000000000000000000000000000000000000000000000000000000000006064820152608401610515565b6001600160a01b0383166109985760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460448201527f72657373000000000000000000000000000000000000000000000000000000006064820152608401610515565b6001600160a01b038216610a145760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f20616464726560448201527f73730000000000000000000000000000000000000000000000000000000000006064820152608401610515565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b60008281526007602090815260408083206001600160a01b038516845290915290205460ff166105ff57610ab3816001600160a01b0316601461110f565b610abe83602061110f565b604051602001610acf92919061150d565b60408051601f198184030181529082905262461bcd60e51b825261051591600401611365565b6001600160a01b038216610b715760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f2061646472657360448201527f73000000000000000000000000000000000000000000000000000000000000006064820152608401610515565b6001600160a01b03821660009081526020819052604090205481811015610c005760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e60448201527f63650000000000000000000000000000000000000000000000000000000000006064820152608401610515565b6001600160a01b0383166000908152602081905260408120838303905560028054849290610c2f90849061158e565b90915550506040518281526000906001600160a01b038516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a3505050565b6000610c86848461080c565b90506000198114610cee5781811015610ce15760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e63650000006044820152606401610515565b610cee848484840361091d565b50505050565b6001600160a01b038316610d705760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f20616460448201527f64726573730000000000000000000000000000000000000000000000000000006064820152608401610515565b6001600160a01b038216610dec5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201527f65737300000000000000000000000000000000000000000000000000000000006064820152608401610515565b6001600160a01b03831660009081526020819052604090205481811015610e7b5760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e742065786365656473206260448201527f616c616e636500000000000000000000000000000000000000000000000000006064820152608401610515565b6001600160a01b03808516600090815260208190526040808220858503905591851681529081208054849290610eb29084906114f5565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef84604051610efe91815260200190565b60405180910390a3610cee565b60008281526007602090815260408083206001600160a01b038516845290915290205460ff166105ff5760008281526007602090815260408083206001600160a01b03851684529091529020805460ff19166001179055610f693390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b60008281526007602090815260408083206001600160a01b038516845290915290205460ff16156105ff5760008281526007602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b6001600160a01b0382166110865760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152606401610515565b806002600082825461109891906114f5565b90915550506001600160a01b038216600090815260208190526040812080548392906110c59084906114f5565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b6060600061111e8360026115a5565b6111299060026114f5565b67ffffffffffffffff811115611141576111416115c4565b6040519080825280601f01601f19166020018201604052801561116b576020820181803683370190505b5090507f3000000000000000000000000000000000000000000000000000000000000000816000815181106111a2576111a26115da565b60200101906001600160f81b031916908160001a9053507f7800000000000000000000000000000000000000000000000000000000000000816001815181106111ed576111ed6115da565b60200101906001600160f81b031916908160001a90535060006112118460026115a5565b61121c9060016114f5565b90505b60018111156112a1577f303132333435363738396162636465660000000000000000000000000000000085600f166010811061125d5761125d6115da565b1a60f81b828281518110611273576112736115da565b60200101906001600160f81b031916908160001a90535060049490941c9361129a816115f0565b905061121f565b5083156112f05760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610515565b9392505050565b60006020828403121561130957600080fd5b81357fffffffff00000000000000000000000000000000000000000000000000000000811681146112f057600080fd5b60005b8381101561135457818101518382015260200161133c565b83811115610cee5750506000910152565b6020815260008251806020840152611384816040850160208701611339565b601f01601f19169190910160400192915050565b80356001600160a01b03811681146113af57600080fd5b919050565b600080604083850312156113c757600080fd5b6113d083611398565b946020939093013593505050565b6000806000606084860312156113f357600080fd5b6113fc84611398565b925061140a60208501611398565b9150604084013590509250925092565b60006020828403121561142c57600080fd5b5035919050565b6000806040838503121561144657600080fd5b8235915061145660208401611398565b90509250929050565b60006020828403121561147157600080fd5b6112f082611398565b6000806040838503121561148d57600080fd5b61149683611398565b915061145660208401611398565b600181811c908216806114b857607f821691505b602082108114156114d957634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b60008219821115611508576115086114df565b500190565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260008351611545816017850160208801611339565b7f206973206d697373696e6720726f6c65200000000000000000000000000000006017918401918201528351611582816028840160208801611339565b01602801949350505050565b6000828210156115a0576115a06114df565b500390565b60008160001904831182151516156115bf576115bf6114df565b500290565b634e487b7160e01b600052604160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b6000816115ff576115ff6114df565b50600019019056fea2646970667358221220848f35fdc28f22577d7d393858f44350cbde245dc770487cf991c8a21210b53864736f6c63430008090033a26469706673582212201e625c8f3b854088e022549987d10ee81883533d044c2a35c31109850ff1ad5264736f6c63430008090033", + Bin: "0x60806040526001805463ffffffff60a01b191690553480156200002157600080fd5b5060405162002b7f38038062002b7f83398101604081905262000044916200012c565b600080546001600160a01b0319166001600160a01b038416908117909155604080516350d113fd60e11b8152905184929163a1a227fa916004808301926020929190829003018186803b1580156200009b57600080fd5b505afa158015620000b0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620000d6919062000164565b600180546001600160a01b039283166001600160a01b031991821617909155600580549490921693169290921790915550620001899050565b80516001600160a01b03811681146200012757600080fd5b919050565b600080604083850312156200014057600080fd5b6200014b836200010f565b91506200015b602084016200010f565b90509250929050565b6000602082840312156200017757600080fd5b62000182826200010f565b9392505050565b6129e680620001996000396000f3fe6080604052600436106200008a5760003560e01c80639813c7b211620000555780639813c7b214620002065780639e405b711462000256578063a381c8e21462000290578063d5c6b50414620002b55762000103565b80628d48e3146200014c5780631888d71214620001a3578063458ffd6314620001bc57806383bece4d14620001e15762000103565b36620001035760405162461bcd60e51b815260206004820152602360248201527f436f6e747261637420646f6573206e6f7420737570706f72742072656365697660448201527f652829000000000000000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b60405162461bcd60e51b815260206004820152601d60248201527f66616c6c6261636b2829206d6574686f6420756e737570706f727465640000006044820152606401620000fa565b3480156200015957600080fd5b50620001866200016b36600462000c75565b6004602052600090815260409020546001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b620001ba620001b436600462000c75565b620002ef565b005b348015620001c957600080fd5b50620001ba620001db36600462000ce8565b620004a0565b348015620001ee57600080fd5b50620001ba6200020036600462000d74565b620006be565b3480156200021357600080fd5b50620002456200022536600462000c75565b6001600160a01b0390811660009081526002602052604090205416151590565b60405190151581526020016200019a565b3480156200026357600080fd5b50620001866200027536600462000c75565b6003602052600090815260409020546001600160a01b031681565b3480156200029d57600080fd5b50620001ba620002af36600462000d74565b62000901565b348015620002c257600080fd5b5062000186620002d436600462000c75565b6002602052600090815260409020546001600160a01b031681565b60003411620003415760405162461bcd60e51b815260206004820152600d60248201527f4e6f7468696e672073656e742e000000000000000000000000000000000000006044820152606401620000fa565b6000805260026020527fac33ff75c19e70fe83507db0d683fd3465c996598dc972688b7ace676c89077b546001600160a01b0316620003c35760405162461bcd60e51b815260206004820152601560248201527f4e6f206d617070696e6720666f7220746f6b656e2e00000000000000000000006044820152606401620000fa565b600080805260036020527f3617319a054d772f909f7c479a2cebe5066e836a939412e32403c99029b92eff546040516001600160a01b03918216602482015234604482015290831660648201526383bece4d60e01b9060840160408051601f198184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff00000000000000000000000000000000000000000000000000000000909316929092179091526005549091506200049c906001600160a01b03168260005b60008062000a90565b5050565b6005546000546001600160a01b0391821691163314620005295760405162461bcd60e51b815260206004820152603060248201527f436f6e74726163742063616c6c6572206973206e6f742074686520726567697360448201527f7465726564206d657373656e67657221000000000000000000000000000000006064820152608401620000fa565b806001600160a01b03166200053d62000bbe565b6001600160a01b031614620005bb5760405162461bcd60e51b815260206004820152603160248201527f43726f737320636861696e206d65737361676520636f6d696e672066726f6d2060448201527f696e636f72726563742073656e646572210000000000000000000000000000006064820152608401620000fa565b600085858585604051620005cf9062000c4e565b620005de949392919062000de4565b604051809103906000f080158015620005fb573d6000803e3d6000fd5b506001600160a01b03808216600081815260026020908152604080832080547fffffffffffffffffffffffff00000000000000000000000000000000000000009081168617909155600383528184208054968f169682168717905594835260049091529081902080549093169091179091555190915081907f30c05779f384e0ae9d43bbf7ec4417f28bdc53d02a35551b6eb270a9c4c71dca90620006ac908a9084908b908b908b908b9062000e1a565b60405180910390a15050505050505050565b6005546000546001600160a01b0391821691163314620007475760405162461bcd60e51b815260206004820152603060248201527f436f6e74726163742063616c6c6572206973206e6f742074686520726567697360448201527f7465726564206d657373656e67657221000000000000000000000000000000006064820152608401620000fa565b806001600160a01b03166200075b62000bbe565b6001600160a01b031614620007d95760405162461bcd60e51b815260206004820152603160248201527f43726f737320636861696e206d65737361676520636f6d696e672066726f6d2060448201527f696e636f72726563742073656e646572210000000000000000000000000000006064820152608401620000fa565b6001600160a01b038085166000908152600460209081526040808320548416808452600290925290912054909116806200087c5760405162461bcd60e51b815260206004820152602b60248201527f526563656976696e672061737365747320666f7220756e6b6e6f776e2077726160448201527f7070656420746f6b656e210000000000000000000000000000000000000000006064820152608401620000fa565b6040517f979005ad0000000000000000000000000000000000000000000000000000000081526001600160a01b0385811660048301526024820187905282169063979005ad90604401600060405180830381600087803b158015620008e057600080fd5b505af1158015620008f5573d6000803e3d6000fd5b50505050505050505050565b6001600160a01b03808416600090815260026020526040902054166200096a5760405162461bcd60e51b815260206004820152601560248201527f4e6f206d617070696e6720666f7220746f6b656e2e00000000000000000000006044820152606401620000fa565b6001600160a01b03838116600090815260026020526040908190205490517f1dd319cb000000000000000000000000000000000000000000000000000000008152336004820152602481018590529116908190631dd319cb90604401600060405180830381600087803b158015620009e157600080fd5b505af1158015620009f6573d6000803e3d6000fd5b505050506001600160a01b03848116600090815260036020908152604080832054815190851660248201526044810188905286851660648083019190915282518083039091018152608490910190915290810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff166383bece4d60e01b179052600554909262000a8992911690839062000493565b5050505050565b60006040518060600160405280876001600160a01b031681526020018681526020018481525060405160200162000ac8919062000ebb565b60408051808303601f19018152919052600180549192506001600160a01b0382169163b1454caa917401000000000000000000000000000000000000000090910463ffffffff1690601462000b1d8362000f02565b91906101000a81548163ffffffff021916908363ffffffff1602179055508684866040518563ffffffff1660e01b815260040162000b5f949392919062000f4e565b602060405180830381600087803b15801562000b7a57600080fd5b505af115801562000b8f573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000bb5919062000f8d565b50505050505050565b60008060009054906101000a90046001600160a01b03166001600160a01b03166363012de56040518163ffffffff1660e01b815260040160206040518083038186803b15801562000c0e57600080fd5b505afa15801562000c23573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000c49919062000fb9565b905090565b6119d78062000fda83390190565b6001600160a01b038116811462000c7257600080fd5b50565b60006020828403121562000c8857600080fd5b813562000c958162000c5c565b9392505050565b60008083601f84011262000caf57600080fd5b50813567ffffffffffffffff81111562000cc857600080fd5b60208301915083602082850101111562000ce157600080fd5b9250929050565b60008060008060006060868803121562000d0157600080fd5b853562000d0e8162000c5c565b9450602086013567ffffffffffffffff8082111562000d2c57600080fd5b62000d3a89838a0162000c9c565b9096509450604088013591508082111562000d5457600080fd5b5062000d638882890162000c9c565b969995985093965092949392505050565b60008060006060848603121562000d8a57600080fd5b833562000d978162000c5c565b925060208401359150604084013562000db08162000c5c565b809150509250925092565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b60408152600062000dfa60408301868862000dbb565b828103602084015262000e0f81858762000dbb565b979650505050505050565b60006001600160a01b0380891683528088166020840152506080604083015262000e4960808301868862000dbb565b828103606084015262000e5e81858762000dbb565b9998505050505050505050565b6000815180845260005b8181101562000e935760208185018101518683018201520162000e75565b8181111562000ea6576000602083870101525b50601f01601f19169290920160200192915050565b602081526001600160a01b038251166020820152600060208301516060604084015262000eec608084018262000e6b565b9050604084015160608401528091505092915050565b600063ffffffff8083168181141562000f44577f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6001019392505050565b600063ffffffff80871683528086166020840152506080604083015262000f79608083018562000e6b565b905060ff8316606083015295945050505050565b60006020828403121562000fa057600080fd5b815167ffffffffffffffff8116811462000c9557600080fd5b60006020828403121562000fcc57600080fd5b815162000c958162000c5c56fe6080604052600580546001600160a01b03191673deb34a740eca1ec42c8b8204cbec0ba34fdd27f31790553480156200003757600080fd5b50604051620019d7380380620019d78339810160408190526200005a91620002e3565b8181818181600390805190602001906200007692919062000170565b5080516200008c90600490602084019062000170565b5050505050620000c37fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c2177533620000cb60201b60201c565b50506200038a565b60008281526007602090815260408083206001600160a01b038516845290915290205460ff166200016c5760008281526007602090815260408083206001600160a01b03851684529091529020805460ff191660011790556200012b3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45b5050565b8280546200017e906200034d565b90600052602060002090601f016020900481019282620001a25760008555620001ed565b82601f10620001bd57805160ff1916838001178555620001ed565b82800160010185558215620001ed579182015b82811115620001ed578251825591602001919060010190620001d0565b50620001fb929150620001ff565b5090565b5b80821115620001fb576000815560010162000200565b634e487b7160e01b600052604160045260246000fd5b600082601f8301126200023e57600080fd5b81516001600160401b03808211156200025b576200025b62000216565b604051601f8301601f19908116603f0116810190828211818310171562000286576200028662000216565b81604052838152602092508683858801011115620002a357600080fd5b600091505b83821015620002c75785820183015181830184015290820190620002a8565b83821115620002d95760008385830101525b9695505050505050565b60008060408385031215620002f757600080fd5b82516001600160401b03808211156200030f57600080fd5b6200031d868387016200022c565b935060208501519150808211156200033457600080fd5b5062000343858286016200022c565b9150509250929050565b600181811c908216806200036257607f821691505b602082108114156200038457634e487b7160e01b600052602260045260246000fd5b50919050565b61163d806200039a6000396000f3fe608060405234801561001057600080fd5b50600436106101775760003560e01c806339509351116100d8578063979005ad1161008c578063a9059cbb11610066578063a9059cbb1461031a578063d547741f1461032d578063dd62ed3e1461034057600080fd5b8063979005ad146102ec578063a217fddf146102ff578063a457c2d71461030757600080fd5b806375b238fc116100bd57806375b238fc1461028457806391d14854146102ab57806395d89b41146102e457600080fd5b8063395093511461025e57806370a082311461027157600080fd5b806323b872dd1161012f5780632f2ff15d116101145780632f2ff15d14610229578063313ce5671461023c57806336568abe1461024b57600080fd5b806323b872dd146101f3578063248a9ca31461020657600080fd5b8063095ea7b311610160578063095ea7b3146101b957806318160ddd146101cc5780631dd319cb146101de57600080fd5b806301ffc9a71461017c57806306fdde03146101a4575b600080fd5b61018f61018a3660046112f7565b610353565b60405190151581526020015b60405180910390f35b6101ac6103ec565b60405161019b9190611365565b61018f6101c73660046113b4565b61047e565b6002545b60405190815260200161019b565b6101f16101ec3660046113b4565b610496565b005b61018f6102013660046113de565b61052d565b6101d061021436600461141a565b60009081526007602052604090206001015490565b6101f1610237366004611433565b610551565b6040516012815260200161019b565b6101f1610259366004611433565b610577565b61018f61026c3660046113b4565b610603565b6101d061027f36600461145f565b610642565b6101d07fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c2177581565b61018f6102b9366004611433565b60009182526007602090815260408084206001600160a01b0393909316845291905290205460ff1690565b6101ac6106ea565b6101f16102fa3660046113b4565b6106f9565b6101d0600081565b61018f6103153660046113b4565b61072e565b61018f6103283660046113b4565b6107d8565b6101f161033b366004611433565b6107e6565b6101d061034e36600461147a565b61080c565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f7965db0b0000000000000000000000000000000000000000000000000000000014806103e657507f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316145b92915050565b6060600380546103fb906114a4565b80601f0160208091040260200160405190810160405280929190818152602001828054610427906114a4565b80156104745780601f1061044957610100808354040283529160200191610474565b820191906000526020600020905b81548152906001019060200180831161045757829003601f168201915b5050505050905090565b60003361048c81858561091d565b5060019392505050565b7fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c217756104c18133610a75565b816104cb84610642565b101561051e5760405162461bcd60e51b815260206004820152601560248201527f496e73756666696369656e742062616c616e63652e000000000000000000000060448201526064015b60405180910390fd5b6105288383610af5565b505050565b60003361053b858285610c7a565b610546858585610cf4565b506001949350505050565b60008281526007602052604090206001015461056d8133610a75565b6105288383610f0b565b6001600160a01b03811633146105f55760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201527f20726f6c657320666f722073656c6600000000000000000000000000000000006064820152608401610515565b6105ff8282610fad565b5050565b3360008181526001602090815260408083206001600160a01b038716845290915281205490919061048c908290869061063d9087906114f5565b61091d565b6000326001600160a01b0383161415610673576001600160a01b0382166000908152602081905260409020546103e6565b336001600160a01b03831614156106a2576001600160a01b0382166000908152602081905260409020546103e6565b60405162461bcd60e51b815260206004820152601f60248201527f4e6f7420616c6c6f77656420746f2072656164207468652062616c616e6365006044820152606401610515565b6060600480546103fb906114a4565b7fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c217756107248133610a75565b6105288383611030565b3360008181526001602090815260408083206001600160a01b0387168452909152812054909190838110156107cb5760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f7760448201527f207a65726f0000000000000000000000000000000000000000000000000000006064820152608401610515565b610546828686840361091d565b60003361048c818585610cf4565b6000828152600760205260409020600101546108028133610a75565b6105288383610fad565b6000326001600160a01b038416148061082d5750326001600160a01b038316145b15610860576001600160a01b038084166000908152600160209081526040808320938616835292905220545b90506103e6565b336001600160a01b038416148061087f5750336001600160a01b038316145b156108af576001600160a01b03808416600090815260016020908152604080832093861683529290522054610859565b60405162461bcd60e51b815260206004820152602160248201527f4e6f7420616c6c6f77656420746f20726561642074686520616c6c6f77616e6360448201527f65000000000000000000000000000000000000000000000000000000000000006064820152608401610515565b6001600160a01b0383166109985760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460448201527f72657373000000000000000000000000000000000000000000000000000000006064820152608401610515565b6001600160a01b038216610a145760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f20616464726560448201527f73730000000000000000000000000000000000000000000000000000000000006064820152608401610515565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b60008281526007602090815260408083206001600160a01b038516845290915290205460ff166105ff57610ab3816001600160a01b0316601461110f565b610abe83602061110f565b604051602001610acf92919061150d565b60408051601f198184030181529082905262461bcd60e51b825261051591600401611365565b6001600160a01b038216610b715760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f2061646472657360448201527f73000000000000000000000000000000000000000000000000000000000000006064820152608401610515565b6001600160a01b03821660009081526020819052604090205481811015610c005760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e60448201527f63650000000000000000000000000000000000000000000000000000000000006064820152608401610515565b6001600160a01b0383166000908152602081905260408120838303905560028054849290610c2f90849061158e565b90915550506040518281526000906001600160a01b038516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a3505050565b6000610c86848461080c565b90506000198114610cee5781811015610ce15760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e63650000006044820152606401610515565b610cee848484840361091d565b50505050565b6001600160a01b038316610d705760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f20616460448201527f64726573730000000000000000000000000000000000000000000000000000006064820152608401610515565b6001600160a01b038216610dec5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201527f65737300000000000000000000000000000000000000000000000000000000006064820152608401610515565b6001600160a01b03831660009081526020819052604090205481811015610e7b5760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e742065786365656473206260448201527f616c616e636500000000000000000000000000000000000000000000000000006064820152608401610515565b6001600160a01b03808516600090815260208190526040808220858503905591851681529081208054849290610eb29084906114f5565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef84604051610efe91815260200190565b60405180910390a3610cee565b60008281526007602090815260408083206001600160a01b038516845290915290205460ff166105ff5760008281526007602090815260408083206001600160a01b03851684529091529020805460ff19166001179055610f693390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b60008281526007602090815260408083206001600160a01b038516845290915290205460ff16156105ff5760008281526007602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b6001600160a01b0382166110865760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152606401610515565b806002600082825461109891906114f5565b90915550506001600160a01b038216600090815260208190526040812080548392906110c59084906114f5565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b6060600061111e8360026115a5565b6111299060026114f5565b67ffffffffffffffff811115611141576111416115c4565b6040519080825280601f01601f19166020018201604052801561116b576020820181803683370190505b5090507f3000000000000000000000000000000000000000000000000000000000000000816000815181106111a2576111a26115da565b60200101906001600160f81b031916908160001a9053507f7800000000000000000000000000000000000000000000000000000000000000816001815181106111ed576111ed6115da565b60200101906001600160f81b031916908160001a90535060006112118460026115a5565b61121c9060016114f5565b90505b60018111156112a1577f303132333435363738396162636465660000000000000000000000000000000085600f166010811061125d5761125d6115da565b1a60f81b828281518110611273576112736115da565b60200101906001600160f81b031916908160001a90535060049490941c9361129a816115f0565b905061121f565b5083156112f05760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610515565b9392505050565b60006020828403121561130957600080fd5b81357fffffffff00000000000000000000000000000000000000000000000000000000811681146112f057600080fd5b60005b8381101561135457818101518382015260200161133c565b83811115610cee5750506000910152565b6020815260008251806020840152611384816040850160208701611339565b601f01601f19169190910160400192915050565b80356001600160a01b03811681146113af57600080fd5b919050565b600080604083850312156113c757600080fd5b6113d083611398565b946020939093013593505050565b6000806000606084860312156113f357600080fd5b6113fc84611398565b925061140a60208501611398565b9150604084013590509250925092565b60006020828403121561142c57600080fd5b5035919050565b6000806040838503121561144657600080fd5b8235915061145660208401611398565b90509250929050565b60006020828403121561147157600080fd5b6112f082611398565b6000806040838503121561148d57600080fd5b61149683611398565b915061145660208401611398565b600181811c908216806114b857607f821691505b602082108114156114d957634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b60008219821115611508576115086114df565b500190565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260008351611545816017850160208801611339565b7f206973206d697373696e6720726f6c65200000000000000000000000000000006017918401918201528351611582816028840160208801611339565b01602801949350505050565b6000828210156115a0576115a06114df565b500390565b60008160001904831182151516156115bf576115bf6114df565b500290565b634e487b7160e01b600052604160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b6000816115ff576115ff6114df565b50600019019056fea2646970667358221220848f35fdc28f22577d7d393858f44350cbde245dc770487cf991c8a21210b53864736f6c63430008090033a26469706673582212201cb68080b09cb661012c058defbf9bd2a3be17a1afc6d3912fd82b970de25b5d64736f6c63430008090033", } // EthereumBridgeABI is the input ABI used to generate the binding from. diff --git a/contracts/generated/ObscuroBridge/ObscuroBridge.go b/contracts/generated/ObscuroBridge/ObscuroBridge.go index 59c5d703f4..d292b65a17 100644 --- a/contracts/generated/ObscuroBridge/ObscuroBridge.go +++ b/contracts/generated/ObscuroBridge/ObscuroBridge.go @@ -32,7 +32,7 @@ var ( // 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: "0x60806040526001805463ffffffff60a01b191690553480156200002157600080fd5b5060405162001c3838038062001c388339810160408190526200004491620001fc565b600080546001600160a01b0319166001600160a01b038316908117909155604080516350d113fd60e11b8152905183929163a1a227fa916004808301926020929190829003018186803b1580156200009b57600080fd5b505afa158015620000b0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620000d69190620001fc565b600180546001600160a01b0319166001600160a01b039290921691909117905550620001237fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c217753362000157565b620001507fd2fb17ceaa388942529b17e0006ffc4d559f040dd4f2157b8070f17ad2110578600062000157565b506200022e565b60008281526002602090815260408083206001600160a01b038516845290915290205460ff16620001f85760008281526002602090815260408083206001600160a01b03851684529091529020805460ff19166001179055620001b73390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45b5050565b6000602082840312156200020f57600080fd5b81516001600160a01b03811681146200022757600080fd5b9392505050565b6119fa806200023e6000396000f3fe60806040526004361061010e5760003560e01c80635fa7b584116100a557806393b3744211610074578063a381c8e211610059578063a381c8e21461033e578063d547741f1461035e578063e4c3ebc71461037e57600080fd5b806393b3744214610309578063a217fddf1461032957600080fd5b80635fa7b5841461024f57806375b238fc1461026f57806383bece4d146102a357806391d14854146102c357600080fd5b80632f2ff15d116100e15780632f2ff15d146101bb57806336568abe146101db578063498d82ab146101fb5780635d8729701461021b57600080fd5b806301ffc9a71461011357806316ce8149146101485780631888d7121461016a578063248a9ca31461017d575b600080fd5b34801561011f57600080fd5b5061013361012e3660046114fc565b6103b2565b60405190151581526020015b60405180910390f35b34801561015457600080fd5b5061016861016336600461153e565b61041b565b005b61016861017836600461153e565b610481565b34801561018957600080fd5b506101ad61019836600461155b565b60009081526002602052604090206001015490565b60405190815260200161013f565b3480156101c757600080fd5b506101686101d6366004611574565b6105ba565b3480156101e757600080fd5b506101686101f6366004611574565b6105e5565b34801561020757600080fd5b506101686102163660046115ed565b610671565b34801561022757600080fd5b506101ad7f9f225881f6e7ac8a885b63aa2269cbce78dd6a669864ccd2cd2517a8e709d73a81565b34801561025b57600080fd5b5061016861026a36600461153e565b610736565b34801561027b57600080fd5b506101ad7fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c2177581565b3480156102af57600080fd5b506101686102be366004611670565b61078b565b3480156102cf57600080fd5b506101336102de366004611574565b60009182526002602090815260408084206001600160a01b0393909316845291905290205460ff1690565b34801561031557600080fd5b5061016861032436600461153e565b6109ad565b34801561033557600080fd5b506101ad600081565b34801561034a57600080fd5b50610168610359366004611670565b610a02565b34801561036a57600080fd5b50610168610379366004611574565b610baf565b34801561038a57600080fd5b506101ad7fd2fb17ceaa388942529b17e0006ffc4d559f040dd4f2157b8070f17ad211057881565b60006001600160e01b031982167f7965db0b00000000000000000000000000000000000000000000000000000000148061041557507f01ffc9a7000000000000000000000000000000000000000000000000000000006001600160e01b03198316145b92915050565b7fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c217756104468133610bd5565b50600380547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0392909216919091179055565b600034116104d65760405162461bcd60e51b815260206004820152600f60248201527f456d707479207472616e736665722e000000000000000000000000000000000060448201526064015b60405180910390fd5b604080518082018252348082526001600160a01b03848116602093840190815284519384019290925290518116828401528251808303840181526060909201909252600354909161052e91168260005b600080610c55565b6001546001600160a01b03166040517f346633fb0000000000000000000000000000000000000000000000000000000081526001600160a01b038481166004830152346024830181905292169163346633fb916044016000604051808303818588803b15801561059d57600080fd5b505af11580156105b1573d6000803e3d6000fd5b50505050505050565b6000828152600260205260409020600101546105d68133610bd5565b6105e08383610d70565b505050565b6001600160a01b03811633146106635760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201527f20726f6c657320666f722073656c66000000000000000000000000000000000060648201526084016104cd565b61066d8282610e12565b5050565b7fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c2177561069c8133610bd5565b6106c67f9f225881f6e7ac8a885b63aa2269cbce78dd6a669864ccd2cd2517a8e709d73a87610d70565b600063458ffd6360e01b87878787876040516024016106e99594939291906116db565b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b0319909316929092179091526003549091506105b1906001600160a01b0316826002610526565b7fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c217756107618133610bd5565b61066d7f9f225881f6e7ac8a885b63aa2269cbce78dd6a669864ccd2cd2517a8e709d73a83610e12565b6003546000546001600160a01b03918216911633146108125760405162461bcd60e51b815260206004820152603060248201527f436f6e74726163742063616c6c6572206973206e6f742074686520726567697360448201527f7465726564206d657373656e676572210000000000000000000000000000000060648201526084016104cd565b806001600160a01b0316610824610e95565b6001600160a01b0316146108a05760405162461bcd60e51b815260206004820152603160248201527f43726f737320636861696e206d65737361676520636f6d696e672066726f6d2060448201527f696e636f72726563742073656e6465722100000000000000000000000000000060648201526084016104cd565b6001600160a01b03841660009081527f32ef73018533fa188e9e42b313c0a4048c6052342b662fb7510c0d1abcea3413602052604090205460ff16156108f0576108eb848484610f21565b6109a7565b6001600160a01b03841660009081527f13ad2d85210d477fe1a6e25654c8250308cf29b050a4bf0b039d70467486712c602052604090205460ff1615610939576108eb82610f2c565b60405162461bcd60e51b815260206004820152602560248201527f417474656d7074696e6720746f20776974686472617720756e6b6e6f776e206160448201527f737365742e00000000000000000000000000000000000000000000000000000060648201526084016104cd565b50505050565b7fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c217756109d88133610bd5565b61066d7fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c2177583610d70565b60008211610a525760405162461bcd60e51b815260206004820152601a60248201527f417474656d7074696e6720656d707479207472616e736665722e00000000000060448201526064016104cd565b6001600160a01b03831660009081527f32ef73018533fa188e9e42b313c0a4048c6052342b662fb7510c0d1abcea3413602052604090205460ff16610b255760405162461bcd60e51b815260206004820152604e60248201527f54686973206164647265737320686173206e6f74206265656e20676976656e2060448201527f61207479706520616e64206973207468757320636f6e73696465726564206e6f60648201527f742077686974656c69737465642e000000000000000000000000000000000000608482015260a4016104cd565b610b3183333085610fca565b604080516001600160a01b038581166024830152604482018590528381166064808401919091528351808403909101815260849092019092526020810180516001600160e01b03167f83bece4d0000000000000000000000000000000000000000000000000000000017905260035490916109a79116826001610526565b600082815260026020526040902060010154610bcb8133610bd5565b6105e08383610e12565b60008281526002602090815260408083206001600160a01b038516845290915290205460ff1661066d57610c13816001600160a01b0316601461104e565b610c1e83602061104e565b604051602001610c2f929190611749565b60408051601f198184030181529082905262461bcd60e51b82526104cd916004016117f6565b60006040518060600160405280876001600160a01b0316815260200186815260200184815250604051602001610c8b9190611809565b60408051808303601f19018152919052600180549192506001600160a01b0382169163b1454caa917401000000000000000000000000000000000000000090910463ffffffff16906014610cde83611864565b91906101000a81548163ffffffff021916908363ffffffff1602179055508684866040518563ffffffff1660e01b8152600401610d1e9493929190611888565b602060405180830381600087803b158015610d3857600080fd5b505af1158015610d4c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105b191906118c5565b60008281526002602090815260408083206001600160a01b038516845290915290205460ff1661066d5760008281526002602090815260408083206001600160a01b03851684529091529020805460ff19166001179055610dce3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b60008281526002602090815260408083206001600160a01b038516845290915290205460ff161561066d5760008281526002602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b60008060009054906101000a90046001600160a01b03166001600160a01b03166363012de56040518163ffffffff1660e01b815260040160206040518083038186803b158015610ee457600080fd5b505afa158015610ef8573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f1c91906118ef565b905090565b6105e0838284611236565b6040516000906001600160a01b038316908281818181865af19150503d8060008114610f74576040519150601f19603f3d011682016040523d82523d6000602084013e610f79565b606091505b505090508061066d5760405162461bcd60e51b815260206004820152601460248201527f4661696c656420746f2073656e6420457468657200000000000000000000000060448201526064016104cd565b6040516001600160a01b03808516602483015283166044820152606481018290526109a79085907f23b872dd00000000000000000000000000000000000000000000000000000000906084015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b03199093169290921790915261127f565b6060600061105d83600261190c565b61106890600261192b565b67ffffffffffffffff81111561108057611080611943565b6040519080825280601f01601f1916602001820160405280156110aa576020820181803683370190505b5090507f3000000000000000000000000000000000000000000000000000000000000000816000815181106110e1576110e1611959565b60200101906001600160f81b031916908160001a9053507f78000000000000000000000000000000000000000000000000000000000000008160018151811061112c5761112c611959565b60200101906001600160f81b031916908160001a905350600061115084600261190c565b61115b90600161192b565b90505b60018111156111e0577f303132333435363738396162636465660000000000000000000000000000000085600f166010811061119c5761119c611959565b1a60f81b8282815181106111b2576111b2611959565b60200101906001600160f81b031916908160001a90535060049490941c936111d98161196f565b905061115e565b50831561122f5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e7460448201526064016104cd565b9392505050565b6040516001600160a01b0383166024820152604481018290526105e09084907fa9059cbb0000000000000000000000000000000000000000000000000000000090606401611017565b60006112d4826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166113649092919063ffffffff16565b8051909150156105e057808060200190518101906112f29190611986565b6105e05760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f7420737563636565640000000000000000000000000000000000000000000060648201526084016104cd565b6060611373848460008561137b565b949350505050565b6060824710156113f35760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c000000000000000000000000000000000000000000000000000060648201526084016104cd565b6001600160a01b0385163b61144a5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016104cd565b600080866001600160a01b0316858760405161146691906119a8565b60006040518083038185875af1925050503d80600081146114a3576040519150601f19603f3d011682016040523d82523d6000602084013e6114a8565b606091505b50915091506114b88282866114c3565b979650505050505050565b606083156114d257508161122f565b8251156114e25782518084602001fd5b8160405162461bcd60e51b81526004016104cd91906117f6565b60006020828403121561150e57600080fd5b81356001600160e01b03198116811461122f57600080fd5b6001600160a01b038116811461153b57600080fd5b50565b60006020828403121561155057600080fd5b813561122f81611526565b60006020828403121561156d57600080fd5b5035919050565b6000806040838503121561158757600080fd5b82359150602083013561159981611526565b809150509250929050565b60008083601f8401126115b657600080fd5b50813567ffffffffffffffff8111156115ce57600080fd5b6020830191508360208285010111156115e657600080fd5b9250929050565b60008060008060006060868803121561160557600080fd5b853561161081611526565b9450602086013567ffffffffffffffff8082111561162d57600080fd5b61163989838a016115a4565b9096509450604088013591508082111561165257600080fd5b5061165f888289016115a4565b969995985093965092949392505050565b60008060006060848603121561168557600080fd5b833561169081611526565b92506020840135915060408401356116a781611526565b809150509250925092565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b6001600160a01b03861681526060602082015260006116fe6060830186886116b2565b82810360408401526117118185876116b2565b98975050505050505050565b60005b83811015611738578181015183820152602001611720565b838111156109a75750506000910152565b7f416363657373436f6e74726f6c3a206163636f756e742000000000000000000081526000835161178181601785016020880161171d565b7f206973206d697373696e6720726f6c652000000000000000000000000000000060179184019182015283516117be81602884016020880161171d565b01602801949350505050565b600081518084526117e281602086016020860161171d565b601f01601f19169290920160200192915050565b60208152600061122f60208301846117ca565b602081526001600160a01b038251166020820152600060208301516060604084015261183860808401826117ca565b9050604084015160608401528091505092915050565b634e487b7160e01b600052601160045260246000fd5b600063ffffffff8083168181141561187e5761187e61184e565b6001019392505050565b600063ffffffff8087168352808616602084015250608060408301526118b160808301856117ca565b905060ff8316606083015295945050505050565b6000602082840312156118d757600080fd5b815167ffffffffffffffff8116811461122f57600080fd5b60006020828403121561190157600080fd5b815161122f81611526565b60008160001904831182151516156119265761192661184e565b500290565b6000821982111561193e5761193e61184e565b500190565b634e487b7160e01b600052604160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b60008161197e5761197e61184e565b506000190190565b60006020828403121561199857600080fd5b8151801515811461122f57600080fd5b600082516119ba81846020870161171d565b919091019291505056fea2646970667358221220473483eca5f4fb64e727cbf61ba9aff9f10660c86df8160cdf0789ba5522b36464736f6c63430008090033", + Bin: "0x60806040526001805463ffffffff60a01b191690553480156200002157600080fd5b5060405162001c3838038062001c388339810160408190526200004491620001fc565b600080546001600160a01b0319166001600160a01b038316908117909155604080516350d113fd60e11b8152905183929163a1a227fa916004808301926020929190829003018186803b1580156200009b57600080fd5b505afa158015620000b0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620000d69190620001fc565b600180546001600160a01b0319166001600160a01b039290921691909117905550620001237fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c217753362000157565b620001507fd2fb17ceaa388942529b17e0006ffc4d559f040dd4f2157b8070f17ad2110578600062000157565b506200022e565b60008281526002602090815260408083206001600160a01b038516845290915290205460ff16620001f85760008281526002602090815260408083206001600160a01b03851684529091529020805460ff19166001179055620001b73390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45b5050565b6000602082840312156200020f57600080fd5b81516001600160a01b03811681146200022757600080fd5b9392505050565b6119fa806200023e6000396000f3fe60806040526004361061010e5760003560e01c80635fa7b584116100a557806393b3744211610074578063a381c8e211610059578063a381c8e21461033e578063d547741f1461035e578063e4c3ebc71461037e57600080fd5b806393b3744214610309578063a217fddf1461032957600080fd5b80635fa7b5841461024f57806375b238fc1461026f57806383bece4d146102a357806391d14854146102c357600080fd5b80632f2ff15d116100e15780632f2ff15d146101bb57806336568abe146101db578063498d82ab146101fb5780635d8729701461021b57600080fd5b806301ffc9a71461011357806316ce8149146101485780631888d7121461016a578063248a9ca31461017d575b600080fd5b34801561011f57600080fd5b5061013361012e3660046114fc565b6103b2565b60405190151581526020015b60405180910390f35b34801561015457600080fd5b5061016861016336600461153e565b61041b565b005b61016861017836600461153e565b610481565b34801561018957600080fd5b506101ad61019836600461155b565b60009081526002602052604090206001015490565b60405190815260200161013f565b3480156101c757600080fd5b506101686101d6366004611574565b6105ba565b3480156101e757600080fd5b506101686101f6366004611574565b6105e5565b34801561020757600080fd5b506101686102163660046115ed565b610671565b34801561022757600080fd5b506101ad7f9f225881f6e7ac8a885b63aa2269cbce78dd6a669864ccd2cd2517a8e709d73a81565b34801561025b57600080fd5b5061016861026a36600461153e565b610736565b34801561027b57600080fd5b506101ad7fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c2177581565b3480156102af57600080fd5b506101686102be366004611670565b61078b565b3480156102cf57600080fd5b506101336102de366004611574565b60009182526002602090815260408084206001600160a01b0393909316845291905290205460ff1690565b34801561031557600080fd5b5061016861032436600461153e565b6109ad565b34801561033557600080fd5b506101ad600081565b34801561034a57600080fd5b50610168610359366004611670565b610a02565b34801561036a57600080fd5b50610168610379366004611574565b610baf565b34801561038a57600080fd5b506101ad7fd2fb17ceaa388942529b17e0006ffc4d559f040dd4f2157b8070f17ad211057881565b60006001600160e01b031982167f7965db0b00000000000000000000000000000000000000000000000000000000148061041557507f01ffc9a7000000000000000000000000000000000000000000000000000000006001600160e01b03198316145b92915050565b7fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c217756104468133610bd5565b50600380547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0392909216919091179055565b600034116104d65760405162461bcd60e51b815260206004820152600f60248201527f456d707479207472616e736665722e000000000000000000000000000000000060448201526064015b60405180910390fd5b604080518082018252348082526001600160a01b03848116602093840190815284519384019290925290518116828401528251808303840181526060909201909252600354909161052e91168260025b600080610c55565b6001546001600160a01b03166040517f346633fb0000000000000000000000000000000000000000000000000000000081526001600160a01b038481166004830152346024830181905292169163346633fb916044016000604051808303818588803b15801561059d57600080fd5b505af11580156105b1573d6000803e3d6000fd5b50505050505050565b6000828152600260205260409020600101546105d68133610bd5565b6105e08383610d70565b505050565b6001600160a01b03811633146106635760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201527f20726f6c657320666f722073656c66000000000000000000000000000000000060648201526084016104cd565b61066d8282610e12565b5050565b7fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c2177561069c8133610bd5565b6106c67f9f225881f6e7ac8a885b63aa2269cbce78dd6a669864ccd2cd2517a8e709d73a87610d70565b600063458ffd6360e01b87878787876040516024016106e99594939291906116db565b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b0319909316929092179091526003549091506105b1906001600160a01b0316826001610526565b7fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c217756107618133610bd5565b61066d7f9f225881f6e7ac8a885b63aa2269cbce78dd6a669864ccd2cd2517a8e709d73a83610e12565b6003546000546001600160a01b03918216911633146108125760405162461bcd60e51b815260206004820152603060248201527f436f6e74726163742063616c6c6572206973206e6f742074686520726567697360448201527f7465726564206d657373656e676572210000000000000000000000000000000060648201526084016104cd565b806001600160a01b0316610824610e95565b6001600160a01b0316146108a05760405162461bcd60e51b815260206004820152603160248201527f43726f737320636861696e206d65737361676520636f6d696e672066726f6d2060448201527f696e636f72726563742073656e6465722100000000000000000000000000000060648201526084016104cd565b6001600160a01b03841660009081527f32ef73018533fa188e9e42b313c0a4048c6052342b662fb7510c0d1abcea3413602052604090205460ff16156108f0576108eb848484610f21565b6109a7565b6001600160a01b03841660009081527f13ad2d85210d477fe1a6e25654c8250308cf29b050a4bf0b039d70467486712c602052604090205460ff1615610939576108eb82610f2c565b60405162461bcd60e51b815260206004820152602560248201527f417474656d7074696e6720746f20776974686472617720756e6b6e6f776e206160448201527f737365742e00000000000000000000000000000000000000000000000000000060648201526084016104cd565b50505050565b7fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c217756109d88133610bd5565b61066d7fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c2177583610d70565b60008211610a525760405162461bcd60e51b815260206004820152601a60248201527f417474656d7074696e6720656d707479207472616e736665722e00000000000060448201526064016104cd565b6001600160a01b03831660009081527f32ef73018533fa188e9e42b313c0a4048c6052342b662fb7510c0d1abcea3413602052604090205460ff16610b255760405162461bcd60e51b815260206004820152604e60248201527f54686973206164647265737320686173206e6f74206265656e20676976656e2060448201527f61207479706520616e64206973207468757320636f6e73696465726564206e6f60648201527f742077686974656c69737465642e000000000000000000000000000000000000608482015260a4016104cd565b610b3183333085610fca565b604080516001600160a01b038581166024830152604482018590528381166064808401919091528351808403909101815260849092019092526020810180516001600160e01b03167f83bece4d0000000000000000000000000000000000000000000000000000000017905260035490916109a79116826000610526565b600082815260026020526040902060010154610bcb8133610bd5565b6105e08383610e12565b60008281526002602090815260408083206001600160a01b038516845290915290205460ff1661066d57610c13816001600160a01b0316601461104e565b610c1e83602061104e565b604051602001610c2f929190611749565b60408051601f198184030181529082905262461bcd60e51b82526104cd916004016117f6565b60006040518060600160405280876001600160a01b0316815260200186815260200184815250604051602001610c8b9190611809565b60408051808303601f19018152919052600180549192506001600160a01b0382169163b1454caa917401000000000000000000000000000000000000000090910463ffffffff16906014610cde83611864565b91906101000a81548163ffffffff021916908363ffffffff1602179055508684866040518563ffffffff1660e01b8152600401610d1e9493929190611888565b602060405180830381600087803b158015610d3857600080fd5b505af1158015610d4c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105b191906118c5565b60008281526002602090815260408083206001600160a01b038516845290915290205460ff1661066d5760008281526002602090815260408083206001600160a01b03851684529091529020805460ff19166001179055610dce3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b60008281526002602090815260408083206001600160a01b038516845290915290205460ff161561066d5760008281526002602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b60008060009054906101000a90046001600160a01b03166001600160a01b03166363012de56040518163ffffffff1660e01b815260040160206040518083038186803b158015610ee457600080fd5b505afa158015610ef8573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f1c91906118ef565b905090565b6105e0838284611236565b6040516000906001600160a01b038316908281818181865af19150503d8060008114610f74576040519150601f19603f3d011682016040523d82523d6000602084013e610f79565b606091505b505090508061066d5760405162461bcd60e51b815260206004820152601460248201527f4661696c656420746f2073656e6420457468657200000000000000000000000060448201526064016104cd565b6040516001600160a01b03808516602483015283166044820152606481018290526109a79085907f23b872dd00000000000000000000000000000000000000000000000000000000906084015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b03199093169290921790915261127f565b6060600061105d83600261190c565b61106890600261192b565b67ffffffffffffffff81111561108057611080611943565b6040519080825280601f01601f1916602001820160405280156110aa576020820181803683370190505b5090507f3000000000000000000000000000000000000000000000000000000000000000816000815181106110e1576110e1611959565b60200101906001600160f81b031916908160001a9053507f78000000000000000000000000000000000000000000000000000000000000008160018151811061112c5761112c611959565b60200101906001600160f81b031916908160001a905350600061115084600261190c565b61115b90600161192b565b90505b60018111156111e0577f303132333435363738396162636465660000000000000000000000000000000085600f166010811061119c5761119c611959565b1a60f81b8282815181106111b2576111b2611959565b60200101906001600160f81b031916908160001a90535060049490941c936111d98161196f565b905061115e565b50831561122f5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e7460448201526064016104cd565b9392505050565b6040516001600160a01b0383166024820152604481018290526105e09084907fa9059cbb0000000000000000000000000000000000000000000000000000000090606401611017565b60006112d4826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166113649092919063ffffffff16565b8051909150156105e057808060200190518101906112f29190611986565b6105e05760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f7420737563636565640000000000000000000000000000000000000000000060648201526084016104cd565b6060611373848460008561137b565b949350505050565b6060824710156113f35760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c000000000000000000000000000000000000000000000000000060648201526084016104cd565b6001600160a01b0385163b61144a5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016104cd565b600080866001600160a01b0316858760405161146691906119a8565b60006040518083038185875af1925050503d80600081146114a3576040519150601f19603f3d011682016040523d82523d6000602084013e6114a8565b606091505b50915091506114b88282866114c3565b979650505050505050565b606083156114d257508161122f565b8251156114e25782518084602001fd5b8160405162461bcd60e51b81526004016104cd91906117f6565b60006020828403121561150e57600080fd5b81356001600160e01b03198116811461122f57600080fd5b6001600160a01b038116811461153b57600080fd5b50565b60006020828403121561155057600080fd5b813561122f81611526565b60006020828403121561156d57600080fd5b5035919050565b6000806040838503121561158757600080fd5b82359150602083013561159981611526565b809150509250929050565b60008083601f8401126115b657600080fd5b50813567ffffffffffffffff8111156115ce57600080fd5b6020830191508360208285010111156115e657600080fd5b9250929050565b60008060008060006060868803121561160557600080fd5b853561161081611526565b9450602086013567ffffffffffffffff8082111561162d57600080fd5b61163989838a016115a4565b9096509450604088013591508082111561165257600080fd5b5061165f888289016115a4565b969995985093965092949392505050565b60008060006060848603121561168557600080fd5b833561169081611526565b92506020840135915060408401356116a781611526565b809150509250925092565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b6001600160a01b03861681526060602082015260006116fe6060830186886116b2565b82810360408401526117118185876116b2565b98975050505050505050565b60005b83811015611738578181015183820152602001611720565b838111156109a75750506000910152565b7f416363657373436f6e74726f6c3a206163636f756e742000000000000000000081526000835161178181601785016020880161171d565b7f206973206d697373696e6720726f6c652000000000000000000000000000000060179184019182015283516117be81602884016020880161171d565b01602801949350505050565b600081518084526117e281602086016020860161171d565b601f01601f19169290920160200192915050565b60208152600061122f60208301846117ca565b602081526001600160a01b038251166020820152600060208301516060604084015261183860808401826117ca565b9050604084015160608401528091505092915050565b634e487b7160e01b600052601160045260246000fd5b600063ffffffff8083168181141561187e5761187e61184e565b6001019392505050565b600063ffffffff8087168352808616602084015250608060408301526118b160808301856117ca565b905060ff8316606083015295945050505050565b6000602082840312156118d757600080fd5b815167ffffffffffffffff8116811461122f57600080fd5b60006020828403121561190157600080fd5b815161122f81611526565b60008160001904831182151516156119265761192661184e565b500290565b6000821982111561193e5761193e61184e565b500190565b634e487b7160e01b600052604160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b60008161197e5761197e61184e565b506000190190565b60006020828403121561199857600080fd5b8151801515811461122f57600080fd5b600082516119ba81846020870161171d565b919091019291505056fea26469706673582212206391571edec7bdbf99c2274c97a0cf208d149bda11b9144eb6f7eeff314c453264736f6c63430008090033", } // ObscuroBridgeABI is the input ABI used to generate the binding from. diff --git a/contracts/src/bridge/IBridge.sol b/contracts/src/bridge/IBridge.sol index 55ebe73b0c..ffdd3c0a22 100644 --- a/contracts/src/bridge/IBridge.sol +++ b/contracts/src/bridge/IBridge.sol @@ -6,9 +6,9 @@ pragma solidity >=0.7.0 <0.9.0; // Calling functions on it will result in assets being bridged over to the other layer automatically. interface IBridge { enum Topics { - VALUE, TRANSFER, - MANAGEMENT + MANAGEMENT, + VALUE } // Sends the native currency to the other layer. On Layer 1 the native currency is ETH, while on Layer 2 it is OBX. From 8db2c56e72f3865c4e06692ade74a9ac1a1c3262 Mon Sep 17 00:00:00 2001 From: StefanIliev545 Date: Tue, 19 Sep 2023 01:25:39 +0300 Subject: [PATCH 35/47] Version that deploys. --- .../001_deploy_cross_chain_messenger.ts | 2 +- .../testnet/layer2/001_whitelist_tokens.ts | 10 +++++-- go/config/enclave_config.go | 2 +- go/enclave/enclave.go | 2 ++ go/enclave/evm/evm_facade.go | 8 ++++- go/enclave/l2chain/l2_chain.go | 29 ++++++++----------- go/host/rpc/clientapi/client_api_eth.go | 5 ++++ 7 files changed, 35 insertions(+), 23 deletions(-) diff --git a/contracts/deployment_scripts/messenger/layer2/001_deploy_cross_chain_messenger.ts b/contracts/deployment_scripts/messenger/layer2/001_deploy_cross_chain_messenger.ts index d81fa9ca84..83d59bba51 100644 --- a/contracts/deployment_scripts/messenger/layer2/001_deploy_cross_chain_messenger.ts +++ b/contracts/deployment_scripts/messenger/layer2/001_deploy_cross_chain_messenger.ts @@ -24,7 +24,7 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { // Deploy the L2 Cross chain messenger and use the L2 bus for validation await deployments.deploy('CrossChainMessenger', { - from: deployer, + from: deployer, args: [ busAddress ], log: true, }); diff --git a/contracts/deployment_scripts/testnet/layer2/001_whitelist_tokens.ts b/contracts/deployment_scripts/testnet/layer2/001_whitelist_tokens.ts index cb467fa644..48b6cd3b0e 100644 --- a/contracts/deployment_scripts/testnet/layer2/001_whitelist_tokens.ts +++ b/contracts/deployment_scripts/testnet/layer2/001_whitelist_tokens.ts @@ -96,14 +96,18 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { await new Promise(async (resolve, fail)=> { setTimeout(fail, 30_000) const messageBusContract = (await hre.ethers.getContractAt('MessageBus', '0x526c84529b2b8c11f57d93d3f5537aca3aecef9b')); - const gasLimit = await messageBusContract.estimateGas.verifyMessageFinalized(messages[1]) + var gasLimit = await messageBusContract.estimateGas.verifyMessageFinalized(messages[1], { + from: l2Accounts.deployer, + }) const gasPrice = await l2Network.ethers.provider.getGasPrice() + const modifiedGasLimit = gasLimit.toNumber() + gasLimit.toNumber() + console.log("Gas limit for call: " + modifiedGasLimit.toString()) try { while (await messageBusContract.callStatic.verifyMessageFinalized(messages[1], { from: l2Accounts.deployer, - gasLimit: gasLimit, - gasPrice: gasPrice + maxFeePerGas: gasPrice, + gasLimit: modifiedGasLimit, }) != true) { console.log(`Messages not stored on L2 yet, retrying...`); await sleep(1_000); diff --git a/go/config/enclave_config.go b/go/config/enclave_config.go index c34f8438e5..9ab90cecab 100644 --- a/go/config/enclave_config.go +++ b/go/config/enclave_config.go @@ -96,7 +96,7 @@ func DefaultEnclaveConfig() *EnclaveConfig { MaxBatchSize: 1024 * 25, MaxRollupSize: 1024 * 64, GasPaymentAddress: gethcommon.BigToAddress(gethcommon.Big2), - BaseFee: new(big.Int).SetUint64(1), + BaseFee: new(big.Int).SetUint64(0), GasLimit: new(big.Int).SetUint64(params.MaxGasLimit), } } diff --git a/go/enclave/enclave.go b/go/enclave/enclave.go index 6af57cd6ce..40f830f4dc 100644 --- a/go/enclave/enclave.go +++ b/go/enclave/enclave.go @@ -688,6 +688,8 @@ func (e *enclaveImpl) ObsCall(encryptedParams common.EncryptedParamsCall) (*resp encodedResult = hexutil.Encode(execResult.ReturnData) } + e.logger.Info("Call result success ", "result", encodedResult) + return responses.AsEncryptedResponse(&encodedResult, vkHandler), nil } diff --git a/go/enclave/evm/evm_facade.go b/go/enclave/evm/evm_facade.go index c1b86033d4..8267dd7693 100644 --- a/go/enclave/evm/evm_facade.go +++ b/go/enclave/evm/evm_facade.go @@ -147,7 +147,13 @@ func ExecuteObsCall( chainConfig *params.ChainConfig, logger gethlog.Logger, ) (*gethcore.ExecutionResult, error) { - chain, vmCfg, gp := initParams(storage, true, nil) + var noBaseFee = true + if header.BaseFee != nil && header.BaseFee.Cmp(gethcommon.Big0) != 0 && msg.GasPrice.Cmp(gethcommon.Big0) != 0 { + noBaseFee = false + logger.Info("ObsCall - with base fee ", "to", msg.To.Hex()) + } + + chain, vmCfg, gp := initParams(storage, noBaseFee, nil) ethHeader, err := gethencoding.CreateEthHeaderForBatch(header, secret(storage)) if err != nil { return nil, err diff --git a/go/enclave/l2chain/l2_chain.go b/go/enclave/l2chain/l2_chain.go index 3106612dd5..1dbb2d5f8f 100644 --- a/go/enclave/l2chain/l2_chain.go +++ b/go/enclave/l2chain/l2_chain.go @@ -34,11 +34,7 @@ type obscuroChain struct { logger gethlog.Logger - // Gas usage values - // todo (#627) - use the ethconfig.Config instead - GlobalGasCap uint64 - BaseFee *big.Int - Registry components.BatchRegistry + Registry components.BatchRegistry } func NewChain( @@ -49,13 +45,11 @@ func NewChain( registry components.BatchRegistry, ) ObscuroChain { return &obscuroChain{ - storage: storage, - chainConfig: chainConfig, - logger: logger, - GlobalGasCap: 5_000_000_000, // todo (#627) - make config - BaseFee: gethcommon.Big0, - genesis: genesis, - Registry: registry, + storage: storage, + chainConfig: chainConfig, + logger: logger, + genesis: genesis, + Registry: registry, } } @@ -125,11 +119,6 @@ func (oc *obscuroChain) ObsCall(apiArgs *gethapi.TransactionArgs, blockNumber *g } func (oc *obscuroChain) ObsCallAtBlock(apiArgs *gethapi.TransactionArgs, blockNumber *gethrpc.BlockNumber) (*gethcore.ExecutionResult, error) { - // todo (#627) - review this during gas mechanics implementation - callMsg, err := apiArgs.ToMessage(oc.GlobalGasCap, oc.BaseFee) - if err != nil { - return nil, fmt.Errorf("unable to convert TransactionArgs to Message - %w", err) - } // fetch the chain state at given batch blockState, err := oc.Registry.GetBatchStateAtHeight(blockNumber) @@ -142,6 +131,11 @@ func (oc *obscuroChain) ObsCallAtBlock(apiArgs *gethapi.TransactionArgs, blockNu return nil, fmt.Errorf("unable to fetch head state batch. Cause: %w", err) } + callMsg, err := apiArgs.ToMessage(batch.Header.GasLimit, batch.Header.BaseFee) + if err != nil { + return nil, fmt.Errorf("unable to convert TransactionArgs to Message - %w", err) + } + oc.logger.Trace("Obs_Call: Successful result", "result", gethlog.Lazy{Fn: func() string { return fmt.Sprintf("contractAddress=%s, from=%s, data=%s, batch=%s, state=%s", callMsg.To, @@ -154,6 +148,7 @@ func (oc *obscuroChain) ObsCallAtBlock(apiArgs *gethapi.TransactionArgs, blockNu result, err := evm.ExecuteObsCall(callMsg, blockState, batch.Header, oc.storage, oc.chainConfig, oc.logger) if err != nil { // also return the result as the result can be evaluated on some errors like ErrIntrinsicGas + oc.logger.Info("Call failed with error", log.ErrKey, err) return result, err } diff --git a/go/host/rpc/clientapi/client_api_eth.go b/go/host/rpc/clientapi/client_api_eth.go index 080f83a62d..92c24bfde1 100644 --- a/go/host/rpc/clientapi/client_api_eth.go +++ b/go/host/rpc/clientapi/client_api_eth.go @@ -73,6 +73,10 @@ func (api *EthereumAPI) GasPrice(context.Context) (*hexutil.Big, error) { return nil, err } + if header.BaseFee == nil || header.BaseFee.Cmp(gethcommon.Big0) == 0 { + return (*hexutil.Big)(big.NewInt(1)), nil + } + return (*hexutil.Big)(big.NewInt(0).Set(header.BaseFee)), nil } @@ -183,6 +187,7 @@ func (api *EthereumAPI) GetStorageAt(_ context.Context, encryptedParams common.E // rpc.DecimalOrHex -> []byte func (api *EthereumAPI) FeeHistory(context.Context, []byte, rpc.BlockNumber, []float64) (*FeeHistoryResult, error) { // todo (#1621) - return a non-dummy fee history + return &FeeHistoryResult{ OldestBlock: (*hexutil.Big)(big.NewInt(0)), Reward: [][]*hexutil.Big{}, From 4500885e84b5be513c9e30c294e2388ae3e91781 Mon Sep 17 00:00:00 2001 From: StefanIliev545 Date: Tue, 19 Sep 2023 07:53:55 +0300 Subject: [PATCH 36/47] Working version with baseFee == 1 --- contracts/config/networks.json | 13 ++++--- .../001_deploy_cross_chain_messenger.ts | 3 +- .../001_deploy_cross_chain_messenger.ts | 2 + .../testnet/layer2/001_whitelist_tokens.ts | 11 +----- contracts/tasks/wallet-extension.ts | 6 ++- go/config/enclave_config.go | 2 +- go/enclave/components/batch_executor.go | 37 +++++++++++++------ go/enclave/evm/evm_facade.go | 1 + integration/simulation/devnetwork/node.go | 5 +++ .../simulation/network/network_utils.go | 2 +- 10 files changed, 49 insertions(+), 33 deletions(-) diff --git a/contracts/config/networks.json b/contracts/config/networks.json index b36c0713ec..9a46bc367d 100644 --- a/contracts/config/networks.json +++ b/contracts/config/networks.json @@ -1,6 +1,6 @@ { "localGeth": { - "url": "http://127.0.0.1:8025", + "url": "http://127.0.0.1:37000", "deploy": [ "deployment_scripts/core/layer1/", "deployment_scripts/testnet/layer1/", @@ -13,15 +13,16 @@ }, "localObscuro": { "chainId": 777, - "url": "http://127.0.0.1:3000/v1", - "obscuroEncRpcUrl": "ws://127.0.0.1:81", - "gasPrice": 2000000000, + "url": "http://127.0.0.1:3000/v1/", + "obscuroEncRpcUrl": "ws://127.0.0.1:37901", "companionNetworks" : { "layer1" : "localGeth" }, "deploy": [ - "deployment_scripts/core/layer2/", - "deployment_scripts/bridge/layer2/", + "deployment_scripts/messenger/layer1", + "deployment_scripts/messenger/layer2", + "deployment_scripts/bridge/", + "deployment_scripts/testnet/layer1/", "deployment_scripts/testnet/layer2/" ], "accounts": [ diff --git a/contracts/deployment_scripts/messenger/layer1/001_deploy_cross_chain_messenger.ts b/contracts/deployment_scripts/messenger/layer1/001_deploy_cross_chain_messenger.ts index 2fe8715f19..007df8b18a 100644 --- a/contracts/deployment_scripts/messenger/layer1/001_deploy_cross_chain_messenger.ts +++ b/contracts/deployment_scripts/messenger/layer1/001_deploy_cross_chain_messenger.ts @@ -14,7 +14,8 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { const { deployer } = await hre.companionNetworks.layer1.getNamedAccounts(); // Read the message bus address from the management contract deployment. - const messageBusAddress : string = process.env.MESSAGE_BUS_ADDRESS!! + const messageBusAddress : string = process.env.MESSAGE_BUS_ADDRESS || "0xa1fdA5f6Df55a326f5f4300F3A716317f0f03110" + console.log(`Message Bus address ${messageBusAddress}`); // Setup the cross chain messenger and point it to the message bus from the management contract to be used for validation await deployments.deploy('CrossChainMessenger', { diff --git a/contracts/deployment_scripts/messenger/layer2/001_deploy_cross_chain_messenger.ts b/contracts/deployment_scripts/messenger/layer2/001_deploy_cross_chain_messenger.ts index 83d59bba51..864dfaebd1 100644 --- a/contracts/deployment_scripts/messenger/layer2/001_deploy_cross_chain_messenger.ts +++ b/contracts/deployment_scripts/messenger/layer2/001_deploy_cross_chain_messenger.ts @@ -17,6 +17,8 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { // Get the prefunded L2 deployer account to use for deploying. const {deployer} = await getNamedAccounts(); + console.log(`Deployer acc ${deployer}`); + // TODO: Remove hardcoded L2 message bus address when properly exposed. const busAddress = hre.ethers.utils.getAddress("0x526c84529b2b8c11f57d93d3f5537aca3aecef9b") diff --git a/contracts/deployment_scripts/testnet/layer2/001_whitelist_tokens.ts b/contracts/deployment_scripts/testnet/layer2/001_whitelist_tokens.ts index 48b6cd3b0e..d4e106d847 100644 --- a/contracts/deployment_scripts/testnet/layer2/001_whitelist_tokens.ts +++ b/contracts/deployment_scripts/testnet/layer2/001_whitelist_tokens.ts @@ -96,18 +96,9 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { await new Promise(async (resolve, fail)=> { setTimeout(fail, 30_000) const messageBusContract = (await hre.ethers.getContractAt('MessageBus', '0x526c84529b2b8c11f57d93d3f5537aca3aecef9b')); - var gasLimit = await messageBusContract.estimateGas.verifyMessageFinalized(messages[1], { - from: l2Accounts.deployer, - }) - const gasPrice = await l2Network.ethers.provider.getGasPrice() - const modifiedGasLimit = gasLimit.toNumber() + gasLimit.toNumber() - console.log("Gas limit for call: " + modifiedGasLimit.toString()) - try { while (await messageBusContract.callStatic.verifyMessageFinalized(messages[1], { - from: l2Accounts.deployer, - maxFeePerGas: gasPrice, - gasLimit: modifiedGasLimit, + maxFeePerGas: 2, }) != true) { console.log(`Messages not stored on L2 yet, retrying...`); await sleep(1_000); diff --git a/contracts/tasks/wallet-extension.ts b/contracts/tasks/wallet-extension.ts index e72702262a..82f0b927dc 100644 --- a/contracts/tasks/wallet-extension.ts +++ b/contracts/tasks/wallet-extension.ts @@ -19,9 +19,9 @@ task("obscuro:wallet-extension:start:local") .setAction(async function(args, hre) { const nodeUrl = url.parse(args.rpcUrl) - if (args.withStdOut) { +/* if (args.withStdOut) { console.log(`Node url = ${JSON.stringify(nodeUrl, null, " ")}`); - } + }*/ const walletExtensionPath = path.resolve(hre.config.paths.root, "../tools/walletextension/bin/wallet_extension_linux"); const weProcess = spawn(walletExtensionPath, [ @@ -149,6 +149,7 @@ task("obscuro:wallet-extension:add-key", "Creates a viewing key for a specifiec } }, (response)=>{ if (response.statusCode != 200) { + console.error(response); fail(response.statusCode); return; } @@ -184,6 +185,7 @@ task("obscuro:wallet-extension:add-key", "Creates a viewing key for a specifiec if (response.statusCode == 200) { resolve(response.statusCode); } else { + console.log(response.statusMessage) fail(response.statusCode); } }); diff --git a/go/config/enclave_config.go b/go/config/enclave_config.go index 9ab90cecab..c34f8438e5 100644 --- a/go/config/enclave_config.go +++ b/go/config/enclave_config.go @@ -96,7 +96,7 @@ func DefaultEnclaveConfig() *EnclaveConfig { MaxBatchSize: 1024 * 25, MaxRollupSize: 1024 * 64, GasPaymentAddress: gethcommon.BigToAddress(gethcommon.Big2), - BaseFee: new(big.Int).SetUint64(0), + BaseFee: new(big.Int).SetUint64(1), GasLimit: new(big.Int).SetUint64(params.MaxGasLimit), } } diff --git a/go/enclave/components/batch_executor.go b/go/enclave/components/batch_executor.go index d44eac38ee..ba5c8d94a5 100644 --- a/go/enclave/components/batch_executor.go +++ b/go/enclave/components/batch_executor.go @@ -64,8 +64,9 @@ func NewBatchExecutor( // payL1Fees - this function modifies the state db according to the transactions contained within the batch context // in order to substract gas fees from the balance. It returns a list of the transactions that have prepaid for their L1 // publishing costs. -func (executor *batchExecutor) payL1Fees(stateDB *state.StateDB, context *BatchExecutionContext) common.L2Transactions { +func (executor *batchExecutor) payL1Fees(stateDB *state.StateDB, context *BatchExecutionContext) (common.L2Transactions, common.L2Transactions) { transactions := make(common.L2Transactions, 0) + freeTransactions := make(common.L2Transactions, 0) block, _ := executor.storage.FetchBlock(context.BlockPtr) for _, tx := range context.Transactions { @@ -85,17 +86,20 @@ func (executor *batchExecutor) payL1Fees(stateDB *state.StateDB, context *BatchE isFreeTransaction := tx.GasFeeCap().Cmp(gethcommon.Big0) == 0 isFreeTransaction = isFreeTransaction && tx.GasPrice().Cmp(gethcommon.Big0) == 0 - if !isFreeTransaction { - if accBalance.Cmp(cost) == -1 { - executor.logger.Info("insufficient account balance for tx", log.TxKey, tx.Hash(), "addr", sender.Hex()) - continue - } - stateDB.SubBalance(*sender, cost) - stateDB.AddBalance(context.Creator, cost) + if isFreeTransaction { + freeTransactions = append(freeTransactions, tx) + continue } + if accBalance.Cmp(cost) == -1 { + executor.logger.Info("insufficient account balance for tx", log.TxKey, tx.Hash(), "addr", sender.Hex()) + continue + } + stateDB.SubBalance(*sender, cost) + stateDB.AddBalance(context.Creator, cost) + transactions = append(transactions, tx) } - return transactions + return transactions, freeTransactions } func (executor *batchExecutor) ComputeBatch(context *BatchExecutionContext) (*ComputedBatch, error) { @@ -146,7 +150,9 @@ func (executor *batchExecutor) ComputeBatch(context *BatchExecutionContext) (*Co crossChainTransactions := executor.crossChainProcessors.Local.CreateSyntheticTransactions(messages, stateDB) executor.crossChainProcessors.Local.ExecuteValueTransfers(transfers, stateDB) - transactionsToProcess := executor.payL1Fees(stateDB, context) + transactionsToProcess, freeTransactions := executor.payL1Fees(stateDB, context) + + crossChainTransactions = append(crossChainTransactions, freeTransactions...) successfulTxs, txReceipts, err := executor.processTransactions(batch, 0, transactionsToProcess, stateDB, context.ChainConfig, false) if err != nil { @@ -165,7 +171,7 @@ func (executor *batchExecutor) ComputeBatch(context *BatchExecutionContext) (*Co // we need to copy the batch to reset the internal hash cache copyBatch := *batch copyBatch.Header.Root = stateDB.IntermediateRoot(false) - copyBatch.Transactions = successfulTxs + copyBatch.Transactions = append(successfulTxs, freeTransactions...) copyBatch.ResetHash() if err = executor.populateOutboundCrossChainData(©Batch, block, txReceipts); err != nil { @@ -259,6 +265,11 @@ func (executor *batchExecutor) CreateGenesisState( return nil, nil, err } + var limit uint64 = params.MaxGasLimit + if gasLimit != nil { + limit = gasLimit.Uint64() + } + genesisBatch := &core.Batch{ Header: &common.BatchHeader{ ParentHash: common.L2BatchHash{}, @@ -272,7 +283,7 @@ func (executor *batchExecutor) CreateGenesisState( Time: timeNow, Coinbase: coinbase, BaseFee: baseFee, - GasLimit: gasLimit.Uint64(), //todo (@siliev) - does the batch header need uint64? + GasLimit: limit, //todo (@siliev) - does the batch header need uint64? }, Transactions: []*common.L2Tx{}, } @@ -283,6 +294,8 @@ func (executor *batchExecutor) CreateGenesisState( executor.logger.Crit("Could not create message bus deployment transaction", "Error", err) } + executor.logger.Info("L2 Bus deploy", log.TxKey, deployTx.Hash()) + if err = executor.genesis.CommitGenesisState(executor.storage); err != nil { return nil, nil, fmt.Errorf("could not apply genesis preallocation. Cause: %w", err) } diff --git a/go/enclave/evm/evm_facade.go b/go/enclave/evm/evm_facade.go index 8267dd7693..8d44ab0cb1 100644 --- a/go/enclave/evm/evm_facade.go +++ b/go/enclave/evm/evm_facade.go @@ -186,6 +186,7 @@ func ExecuteObsCall( return result, err } + logger.Info("ObsCall - with result ", "gas", result.UsedGas) return result, nil } diff --git a/integration/simulation/devnetwork/node.go b/integration/simulation/devnetwork/node.go index 7c3322367c..a3baf9a164 100644 --- a/integration/simulation/devnetwork/node.go +++ b/integration/simulation/devnetwork/node.go @@ -157,6 +157,8 @@ func (n *InMemNodeOperator) createEnclaveContainer() *enclavecontainer.EnclaveCo hostPort := n.config.PortStart + integration.DefaultHostP2pOffset + n.operatorIdx hostAddr := fmt.Sprintf("%s:%d", network.Localhost, hostPort) + defaultCfg := config.DefaultEnclaveConfig() + enclaveConfig := &config.EnclaveConfig{ HostID: n.l1Wallet.Address(), SequencerID: n.config.SequencerID, @@ -176,6 +178,9 @@ func (n *InMemNodeOperator) createEnclaveContainer() *enclavecontainer.EnclaveCo DebugNamespaceEnabled: true, MaxBatchSize: 1024 * 25, MaxRollupSize: 1024 * 64, + BaseFee: defaultCfg.BaseFee, // todo @siliev:: fix test transaction builders so this can be different + GasLimit: defaultCfg.GasLimit, + GasPaymentAddress: defaultCfg.GasPaymentAddress, } return enclavecontainer.NewEnclaveContainerWithLogger(enclaveConfig, enclaveLogger) } diff --git a/integration/simulation/network/network_utils.go b/integration/simulation/network/network_utils.go index 79954ca992..b755e26d8c 100644 --- a/integration/simulation/network/network_utils.go +++ b/integration/simulation/network/network_utils.go @@ -94,7 +94,7 @@ func createInMemObscuroNode( MaxBatchSize: 1024 * 25, MaxRollupSize: 1024 * 64, BaseFee: big.NewInt(1), // todo @siliev:: fix test transaction builders so this can be different - GasLimit: big.NewInt(1_000_000), + GasLimit: big.NewInt(1_000_000_000), } enclaveLogger := testlog.Logger().New(log.NodeIDKey, id, log.CmpKey, log.EnclaveCmp) From 401c0cd2dba82642cc179a44a5498285d9eaec98 Mon Sep 17 00:00:00 2001 From: StefanIliev545 Date: Tue, 19 Sep 2023 08:12:01 +0300 Subject: [PATCH 37/47] Adding forgotten file. --- go/enclave/gas/README.md | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 go/enclave/gas/README.md diff --git a/go/enclave/gas/README.md b/go/enclave/gas/README.md new file mode 100644 index 0000000000..4a890f16ff --- /dev/null +++ b/go/enclave/gas/README.md @@ -0,0 +1,2 @@ +The gas package contains the necessary code for estimating and pricing l1 gas. +Currently it's mostly barebone placeholders, but will evolve into precompiled smart contracts and binders for accessing their state in order to fit it in the gas mechanics. \ No newline at end of file From 7b1d6f29fa5837834f9f79a05fe14c24c4ee0841 Mon Sep 17 00:00:00 2001 From: StefanIliev545 Date: Tue, 19 Sep 2023 08:35:04 +0300 Subject: [PATCH 38/47] Fix for toml test. --- go/enclave/container/cli.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/go/enclave/container/cli.go b/go/enclave/container/cli.go index b7ca776283..88928bbe19 100644 --- a/go/enclave/container/cli.go +++ b/go/enclave/container/cli.go @@ -40,6 +40,7 @@ type EnclaveConfigToml struct { MaxRollupSize uint64 GasPaymentAddress string BaseFee uint64 + GasLimit uint64 } // ParseConfig returns a config.EnclaveConfig based on either the file identified by the `config` flag, or the flags @@ -73,6 +74,7 @@ func ParseConfig() (*config.EnclaveConfig, error) { maxRollupSize := flag.Uint64(maxRollupSizeName, cfg.MaxRollupSize, flagUsageMap[maxRollupSizeName]) baseFee := flag.Uint64("l2BaseFee", cfg.BaseFee.Uint64(), "") coinbaseAddress := flag.String("l2Coinbase", cfg.GasPaymentAddress.Hex(), "") + gasLimit := flag.Uint64("l2GasLimit", cfg.GasLimit.Uint64(), "") flag.Parse() @@ -109,6 +111,7 @@ func ParseConfig() (*config.EnclaveConfig, error) { cfg.MaxRollupSize = *maxRollupSize cfg.BaseFee = big.NewInt(0).SetUint64(*baseFee) cfg.GasPaymentAddress = gethcommon.HexToAddress(*coinbaseAddress) + cfg.GasLimit = big.NewInt(0).SetUint64(*gasLimit) return cfg, nil } From 0470513172e7afdd1478b95bac01a8754618d9b6 Mon Sep 17 00:00:00 2001 From: StefanIliev545 Date: Wed, 20 Sep 2023 07:16:44 +0300 Subject: [PATCH 39/47] Fixed immediate batch block bug. --- go/enclave/components/batch_executor.go | 2 +- go/enclave/evm/evm_facade.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/go/enclave/components/batch_executor.go b/go/enclave/components/batch_executor.go index ba5c8d94a5..b262734e44 100644 --- a/go/enclave/components/batch_executor.go +++ b/go/enclave/components/batch_executor.go @@ -171,7 +171,7 @@ func (executor *batchExecutor) ComputeBatch(context *BatchExecutionContext) (*Co // we need to copy the batch to reset the internal hash cache copyBatch := *batch copyBatch.Header.Root = stateDB.IntermediateRoot(false) - copyBatch.Transactions = append(successfulTxs, freeTransactions...) + copyBatch.Transactions = append(transactionsToProcess, freeTransactions...) copyBatch.ResetHash() if err = executor.populateOutboundCrossChainData(©Batch, block, txReceipts); err != nil { diff --git a/go/enclave/evm/evm_facade.go b/go/enclave/evm/evm_facade.go index 8d44ab0cb1..2875154edb 100644 --- a/go/enclave/evm/evm_facade.go +++ b/go/enclave/evm/evm_facade.go @@ -116,7 +116,7 @@ func executeTransaction( header.MixDigest = before if err != nil { s.RevertToSnapshot(snap) - return nil, err + return receipt, err } return receipt, nil From 0bf75d218f2cbbdc6b86946b2c415352e3167394 Mon Sep 17 00:00:00 2001 From: StefanIliev545 Date: Wed, 20 Sep 2023 13:57:33 +0300 Subject: [PATCH 40/47] Added testing contract. --- .../testing/001_gas_testing_deployment.ts | 28 +++++++++++++++++++ contracts/src/testing/GasConsumerBalance.sol | 18 ++++++++++++ 2 files changed, 46 insertions(+) create mode 100644 contracts/deployment_scripts/testing/001_gas_testing_deployment.ts create mode 100644 contracts/src/testing/GasConsumerBalance.sol diff --git a/contracts/deployment_scripts/testing/001_gas_testing_deployment.ts b/contracts/deployment_scripts/testing/001_gas_testing_deployment.ts new file mode 100644 index 0000000000..d577d4b145 --- /dev/null +++ b/contracts/deployment_scripts/testing/001_gas_testing_deployment.ts @@ -0,0 +1,28 @@ +import {HardhatRuntimeEnvironment} from 'hardhat/types'; +import {DeployFunction} from 'hardhat-deploy/types'; +import { Receipt } from 'hardhat-deploy/dist/types'; + + +const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { + const l2Network = hre; + const {deployer} = await hre.getNamedAccounts(); + + const gcb = await l2Network.deployments.deploy("GasConsumerBalance", { + from: deployer, + log: true + }) + + + const gasConsumerBalance = await hre.ethers.getContractAt("GasConsumerBalance", gcb.address) + const gasEstimation = await gasConsumerBalance.estimateGas.get_balance({from: deployer}); + + await hre.deployments.execute("GasConsumerBalance", { + from: deployer, + gasLimit: gasEstimation.div(2), + log: true + }, "get_balance"); +}; + + +export default func; +func.tags = ['GasDebug']; diff --git a/contracts/src/testing/GasConsumerBalance.sol b/contracts/src/testing/GasConsumerBalance.sol new file mode 100644 index 0000000000..3b42c3334e --- /dev/null +++ b/contracts/src/testing/GasConsumerBalance.sol @@ -0,0 +1,18 @@ +// SPDX-License-Identifier: Apache 2 +pragma solidity ^0.8.0; + +contract GasConsumerBalance { + address public owner; + + constructor() { + owner = msg.sender; + } + + // solc-ignore-next-line func-mutability + function get_balance() public { address(this).balance; } + + function destroy() public { + require(msg.sender == owner, "You are not the owner"); + selfdestruct(payable(address(this))); + } +} \ No newline at end of file From 689ed5fa0154e5eac9f2e1de1146b09d2773ccb3 Mon Sep 17 00:00:00 2001 From: StefanIliev545 Date: Wed, 20 Sep 2023 14:31:41 +0300 Subject: [PATCH 41/47] Added default address for gas payments. --- go/config/enclave_config.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/go/config/enclave_config.go b/go/config/enclave_config.go index c34f8438e5..fbc0f6ffea 100644 --- a/go/config/enclave_config.go +++ b/go/config/enclave_config.go @@ -95,7 +95,7 @@ func DefaultEnclaveConfig() *EnclaveConfig { DebugNamespaceEnabled: false, MaxBatchSize: 1024 * 25, MaxRollupSize: 1024 * 64, - GasPaymentAddress: gethcommon.BigToAddress(gethcommon.Big2), + GasPaymentAddress: gethcommon.HexToAddress("0xa714Ae85AA66424766ba4Df364EECc43197051A6"), BaseFee: new(big.Int).SetUint64(1), GasLimit: new(big.Int).SetUint64(params.MaxGasLimit), } From ed876beb6a83df45026f9f7a54e81e49c3581683 Mon Sep 17 00:00:00 2001 From: StefanIliev545 Date: Wed, 20 Sep 2023 17:42:22 +0300 Subject: [PATCH 42/47] Fixes for PR review. --- go/enclave/components/batch_executor.go | 7 ++++++- go/enclave/gas/gas.go | 9 +++++---- go/enclave/gas/oracle.go | 6 +++--- 3 files changed, 14 insertions(+), 8 deletions(-) diff --git a/go/enclave/components/batch_executor.go b/go/enclave/components/batch_executor.go index b262734e44..29dafad719 100644 --- a/go/enclave/components/batch_executor.go +++ b/go/enclave/components/batch_executor.go @@ -77,12 +77,16 @@ func (executor *batchExecutor) payL1Fees(stateDB *state.StateDB, context *BatchE } accBalance := stateDB.GetBalance(*sender) - cost, err := executor.gasOracle.GetGasCostForTx(tx, block) + cost, err := executor.gasOracle.EstimateL1StorageGasCost(tx, block) if err != nil { executor.logger.Warn("Unable to get gas cost for tx", log.TxKey, tx.Hash(), log.ErrKey, err) continue } + // Transactions that are created inside the enclave can have no GasPrice set. + // External transactions are always required to have a gas price set. Thus we filter + // those transactions for separate processing than the normal ones and we run them through the EVM + // with a flag that disables the baseFee logic and wont fail them for having price lower than the base fee. isFreeTransaction := tx.GasFeeCap().Cmp(gethcommon.Big0) == 0 isFreeTransaction = isFreeTransaction && tx.GasPrice().Cmp(gethcommon.Big0) == 0 @@ -96,6 +100,7 @@ func (executor *batchExecutor) payL1Fees(stateDB *state.StateDB, context *BatchE } stateDB.SubBalance(*sender, cost) stateDB.AddBalance(context.Creator, cost) + //todo - add refund logic. transactions = append(transactions, tx) } diff --git a/go/enclave/gas/gas.go b/go/enclave/gas/gas.go index 771e7e3aa0..71cf209f6e 100644 --- a/go/enclave/gas/gas.go +++ b/go/enclave/gas/gas.go @@ -33,10 +33,11 @@ func (gp *ObscuroGasPool) ForTransaction(tx *types.Transaction) (*gethcore.GasPo // CalculateL1GasUsed - calculates the gas cost of having a transaction on the l1. func CalculateL1GasUsed(data []byte, overhead *big.Int) *big.Int { - zeroes, ones := zeroesAndOnes(data) - zeroesGas := zeroes * params.TxDataZeroGas - onesGas := (ones + 68) * params.TxDataNonZeroGasEIP2028 - l1Gas := new(big.Int).SetUint64(zeroesGas + onesGas) + reducedTxSize := uint64(len(data)) + reducedTxSize = (reducedTxSize * 75) / 100 + reducedTxSize = reducedTxSize * params.TxDataNonZeroGasEIP2028 + + l1Gas := new(big.Int).SetUint64(reducedTxSize) return new(big.Int).Add(l1Gas, overhead) } diff --git a/go/enclave/gas/oracle.go b/go/enclave/gas/oracle.go index e9fe44bc8c..ac938ef7ea 100644 --- a/go/enclave/gas/oracle.go +++ b/go/enclave/gas/oracle.go @@ -11,7 +11,7 @@ import ( // which will expose necessary l1 information. type Oracle interface { ProcessL1Block(block *types.Block) - GetGasCostForTx(tx *types.Transaction, block *types.Block) (*big.Int, error) + EstimateL1StorageGasCost(tx *types.Transaction, block *types.Block) (*big.Int, error) } type oracle struct { @@ -34,8 +34,8 @@ func (o *oracle) ProcessL1Block(block *types.Block) { } } -// GetGasCostForTx - Returns the expected l1 gas cost for a transaction at a given l1 block. -func (o *oracle) GetGasCostForTx(tx *types.Transaction, block *types.Block) (*big.Int, error) { +// EstimateL1StorageGasCost - Returns the expected l1 gas cost for a transaction at a given l1 block. +func (o *oracle) EstimateL1StorageGasCost(tx *types.Transaction, block *types.Block) (*big.Int, error) { encodedTx, err := rlp.EncodeToBytes(tx) if err != nil { return nil, err From b9ec9a1a6aefec0e036bfe4f9bea92af413e745c Mon Sep 17 00:00:00 2001 From: StefanIliev545 Date: Wed, 20 Sep 2023 17:46:00 +0300 Subject: [PATCH 43/47] Ran gofumpt. --- go/enclave/components/batch_executor.go | 4 ++-- go/enclave/evm/evm_facade.go | 2 +- go/enclave/l2chain/l2_chain.go | 1 - .../networktest/tests/helpful/spin_up_local_network_test.go | 1 - 4 files changed, 3 insertions(+), 5 deletions(-) diff --git a/go/enclave/components/batch_executor.go b/go/enclave/components/batch_executor.go index 29dafad719..d549eee85b 100644 --- a/go/enclave/components/batch_executor.go +++ b/go/enclave/components/batch_executor.go @@ -100,7 +100,7 @@ func (executor *batchExecutor) payL1Fees(stateDB *state.StateDB, context *BatchE } stateDB.SubBalance(*sender, cost) stateDB.AddBalance(context.Creator, cost) - //todo - add refund logic. + // todo - add refund logic. transactions = append(transactions, tx) } @@ -288,7 +288,7 @@ func (executor *batchExecutor) CreateGenesisState( Time: timeNow, Coinbase: coinbase, BaseFee: baseFee, - GasLimit: limit, //todo (@siliev) - does the batch header need uint64? + GasLimit: limit, // todo (@siliev) - does the batch header need uint64? }, Transactions: []*common.L2Tx{}, } diff --git a/go/enclave/evm/evm_facade.go b/go/enclave/evm/evm_facade.go index 2875154edb..b4e87e975a 100644 --- a/go/enclave/evm/evm_facade.go +++ b/go/enclave/evm/evm_facade.go @@ -147,7 +147,7 @@ func ExecuteObsCall( chainConfig *params.ChainConfig, logger gethlog.Logger, ) (*gethcore.ExecutionResult, error) { - var noBaseFee = true + noBaseFee := true if header.BaseFee != nil && header.BaseFee.Cmp(gethcommon.Big0) != 0 && msg.GasPrice.Cmp(gethcommon.Big0) != 0 { noBaseFee = false logger.Info("ObsCall - with base fee ", "to", msg.To.Hex()) diff --git a/go/enclave/l2chain/l2_chain.go b/go/enclave/l2chain/l2_chain.go index 1dbb2d5f8f..8804a6b449 100644 --- a/go/enclave/l2chain/l2_chain.go +++ b/go/enclave/l2chain/l2_chain.go @@ -119,7 +119,6 @@ func (oc *obscuroChain) ObsCall(apiArgs *gethapi.TransactionArgs, blockNumber *g } func (oc *obscuroChain) ObsCallAtBlock(apiArgs *gethapi.TransactionArgs, blockNumber *gethrpc.BlockNumber) (*gethcore.ExecutionResult, error) { - // fetch the chain state at given batch blockState, err := oc.Registry.GetBatchStateAtHeight(blockNumber) if err != nil { diff --git a/integration/networktest/tests/helpful/spin_up_local_network_test.go b/integration/networktest/tests/helpful/spin_up_local_network_test.go index 7045d08886..77d308723b 100644 --- a/integration/networktest/tests/helpful/spin_up_local_network_test.go +++ b/integration/networktest/tests/helpful/spin_up_local_network_test.go @@ -30,7 +30,6 @@ const ( ) func TestRunLocalNetwork(t *testing.T) { - networktest.TestOnlyRunsInIDE(t) networktest.EnsureTestLogsSetUp("local-geth-network") networkConnector, cleanUp, err := env.LocalDevNetwork().Prepare() if err != nil { From 7ea04bf278d89ced1832da84e4392a3f182ddbc3 Mon Sep 17 00:00:00 2001 From: StefanIliev545 Date: Wed, 20 Sep 2023 21:55:01 +0300 Subject: [PATCH 44/47] Stopped test that shouldn't run in GH. --- .../networktest/tests/helpful/spin_up_local_network_test.go | 1 + 1 file changed, 1 insertion(+) diff --git a/integration/networktest/tests/helpful/spin_up_local_network_test.go b/integration/networktest/tests/helpful/spin_up_local_network_test.go index 77d308723b..7045d08886 100644 --- a/integration/networktest/tests/helpful/spin_up_local_network_test.go +++ b/integration/networktest/tests/helpful/spin_up_local_network_test.go @@ -30,6 +30,7 @@ const ( ) func TestRunLocalNetwork(t *testing.T) { + networktest.TestOnlyRunsInIDE(t) networktest.EnsureTestLogsSetUp("local-geth-network") networkConnector, cleanUp, err := env.LocalDevNetwork().Prepare() if err != nil { From 37923e870493827a6fb95a50d07a4d68358016a8 Mon Sep 17 00:00:00 2001 From: StefanIliev545 Date: Thu, 21 Sep 2023 01:37:35 +0300 Subject: [PATCH 45/47] Modified gas limit. --- go/config/enclave_config.go | 2 +- go/enclave/components/batch_executor.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/go/config/enclave_config.go b/go/config/enclave_config.go index fbc0f6ffea..f53d59b399 100644 --- a/go/config/enclave_config.go +++ b/go/config/enclave_config.go @@ -97,6 +97,6 @@ func DefaultEnclaveConfig() *EnclaveConfig { MaxRollupSize: 1024 * 64, GasPaymentAddress: gethcommon.HexToAddress("0xa714Ae85AA66424766ba4Df364EECc43197051A6"), BaseFee: new(big.Int).SetUint64(1), - GasLimit: new(big.Int).SetUint64(params.MaxGasLimit), + GasLimit: new(big.Int).SetUint64(params.MaxGasLimit / 6), } } diff --git a/go/enclave/components/batch_executor.go b/go/enclave/components/batch_executor.go index d549eee85b..d28c91f178 100644 --- a/go/enclave/components/batch_executor.go +++ b/go/enclave/components/batch_executor.go @@ -270,7 +270,7 @@ func (executor *batchExecutor) CreateGenesisState( return nil, nil, err } - var limit uint64 = params.MaxGasLimit + var limit uint64 = params.MaxGasLimit / 6 if gasLimit != nil { limit = gasLimit.Uint64() } From d8eba3e3361767dd72b1ab7831d589826b1bffab Mon Sep 17 00:00:00 2001 From: StefanIliev545 Date: Thu, 21 Sep 2023 01:45:22 +0300 Subject: [PATCH 46/47] Linter fixes. --- go/enclave/components/batch_executor.go | 4 ++-- go/enclave/gas/gas.go | 14 -------------- go/enclave/gas/oracle.go | 2 +- 3 files changed, 3 insertions(+), 17 deletions(-) diff --git a/go/enclave/components/batch_executor.go b/go/enclave/components/batch_executor.go index d28c91f178..9928bc4c3f 100644 --- a/go/enclave/components/batch_executor.go +++ b/go/enclave/components/batch_executor.go @@ -62,7 +62,7 @@ func NewBatchExecutor( } // payL1Fees - this function modifies the state db according to the transactions contained within the batch context -// in order to substract gas fees from the balance. It returns a list of the transactions that have prepaid for their L1 +// in order to subtract gas fees from the balance. It returns a list of the transactions that have prepaid for their L1 // publishing costs. func (executor *batchExecutor) payL1Fees(stateDB *state.StateDB, context *BatchExecutionContext) (common.L2Transactions, common.L2Transactions) { transactions := make(common.L2Transactions, 0) @@ -270,7 +270,7 @@ func (executor *batchExecutor) CreateGenesisState( return nil, nil, err } - var limit uint64 = params.MaxGasLimit / 6 + var limit = params.MaxGasLimit / 6 if gasLimit != nil { limit = gasLimit.Uint64() } diff --git a/go/enclave/gas/gas.go b/go/enclave/gas/gas.go index 71cf209f6e..d6256eb1e0 100644 --- a/go/enclave/gas/gas.go +++ b/go/enclave/gas/gas.go @@ -40,17 +40,3 @@ func CalculateL1GasUsed(data []byte, overhead *big.Int) *big.Int { l1Gas := new(big.Int).SetUint64(reducedTxSize) return new(big.Int).Add(l1Gas, overhead) } - -// zeroesAndOnes counts the number of 0 bytes and non 0 bytes in a byte slice -func zeroesAndOnes(data []byte) (uint64, uint64) { - var zeroes uint64 - var ones uint64 - for _, byt := range data { - if byt == 0 { - zeroes++ - } else { - ones++ - } - } - return zeroes, ones -} diff --git a/go/enclave/gas/oracle.go b/go/enclave/gas/oracle.go index ac938ef7ea..31ff3ae3fa 100644 --- a/go/enclave/gas/oracle.go +++ b/go/enclave/gas/oracle.go @@ -25,7 +25,7 @@ func NewGasOracle() Oracle { } // ProcessL1Block - should be used to update the gas oracle. Currently does not really -// fit into phase 1 gas mechancis as the information needs to be available per block. +// fit into phase 1 gas mechanics as the information needs to be available per block. // would be fixed when this becomes a smart contract using the stateDB func (o *oracle) ProcessL1Block(block *types.Block) { blockBaseFee := block.BaseFee() From 3d5a445897d8bc20d5e75696de090a9e4656293e Mon Sep 17 00:00:00 2001 From: StefanIliev545 Date: Thu, 21 Sep 2023 02:12:30 +0300 Subject: [PATCH 47/47] Gofumpt. --- go/enclave/components/batch_executor.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/go/enclave/components/batch_executor.go b/go/enclave/components/batch_executor.go index 9928bc4c3f..71bda70edd 100644 --- a/go/enclave/components/batch_executor.go +++ b/go/enclave/components/batch_executor.go @@ -270,7 +270,7 @@ func (executor *batchExecutor) CreateGenesisState( return nil, nil, err } - var limit = params.MaxGasLimit / 6 + limit := params.MaxGasLimit / 6 if gasLimit != nil { limit = gasLimit.Uint64() }