diff --git a/contracts/generated/ManagementContract/ManagementContract.go b/contracts/generated/ManagementContract/ManagementContract.go index fe793acb7b..c1b9fdc661 100644 --- a/contracts/generated/ManagementContract/ManagementContract.go +++ b/contracts/generated/ManagementContract/ManagementContract.go @@ -61,8 +61,8 @@ type StructsValueTransferMessage struct { // ManagementContractMetaData contains all meta data concerning the ManagementContract contract. var ManagementContractMetaData = &bind.MetaData{ - ABI: "[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"ECDSAInvalidSignature\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"length\",\"type\":\"uint256\"}],\"name\":\"ECDSAInvalidSignatureLength\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"s\",\"type\":\"bytes32\"}],\"name\":\"ECDSAInvalidSignatureS\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidInitialization\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotInitializing\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"OwnableInvalidOwner\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"OwnableUnauthorizedAccount\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"string\",\"name\":\"key\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newAddress\",\"type\":\"address\"}],\"name\":\"ImportantContractAddressUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"version\",\"type\":\"uint64\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"messageBusAddress\",\"type\":\"address\"}],\"name\":\"LogManagementContractCreated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"rollupHash\",\"type\":\"bytes32\"}],\"name\":\"RollupAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"enclaveID\",\"type\":\"address\"}],\"name\":\"SequencerEnclaveGranted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"enclaveID\",\"type\":\"address\"}],\"name\":\"SequencerEnclaveRevoked\",\"type\":\"event\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"Hash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes\",\"name\":\"Signature\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"LastSequenceNumber\",\"type\":\"uint256\"}],\"internalType\":\"structStructs.MetaRollup\",\"name\":\"r\",\"type\":\"tuple\"},{\"internalType\":\"string\",\"name\":\"_rollupData\",\"type\":\"string\"},{\"components\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"sequence\",\"type\":\"uint64\"},{\"internalType\":\"uint32\",\"name\":\"nonce\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"topic\",\"type\":\"uint32\"},{\"internalType\":\"bytes\",\"name\":\"payload\",\"type\":\"bytes\"},{\"internalType\":\"uint8\",\"name\":\"consistencyLevel\",\"type\":\"uint8\"}],\"internalType\":\"structStructs.CrossChainMessage[]\",\"name\":\"messages\",\"type\":\"tuple[]\"}],\"internalType\":\"structStructs.HeaderCrossChainData\",\"name\":\"\",\"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\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"uint64\",\"name\":\"sequence\",\"type\":\"uint64\"}],\"internalType\":\"structStructs.ValueTransferMessage\",\"name\":\"_msg\",\"type\":\"tuple\"},{\"internalType\":\"bytes32[]\",\"name\":\"proof\",\"type\":\"bytes32[]\"},{\"internalType\":\"bytes32\",\"name\":\"root\",\"type\":\"bytes32\"}],\"name\":\"ExtractNativeValue\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"GetImportantContractKeys\",\"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\":\"bytes\",\"name\":\"Signature\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"LastSequenceNumber\",\"type\":\"uint256\"}],\"internalType\":\"structStructs.MetaRollup\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"number\",\"type\":\"uint256\"}],\"name\":\"GetRollupByNumber\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"Hash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes\",\"name\":\"Signature\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"LastSequenceNumber\",\"type\":\"uint256\"}],\"internalType\":\"structStructs.MetaRollup\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"number\",\"type\":\"uint256\"}],\"name\":\"GetUniqueForkID\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"Hash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes\",\"name\":\"Signature\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"LastSequenceNumber\",\"type\":\"uint256\"}],\"internalType\":\"structStructs.MetaRollup\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_addr\",\"type\":\"address\"}],\"name\":\"GrantSequencerEnclave\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_enclaveID\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_initSecret\",\"type\":\"bytes\"},{\"internalType\":\"string\",\"name\":\"_genesisAttestation\",\"type\":\"string\"}],\"name\":\"InitializeNetworkSecret\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_addr\",\"type\":\"address\"}],\"name\":\"IsSequencerEnclave\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"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\":\"bool\",\"name\":\"verifyAttester\",\"type\":\"bool\"}],\"name\":\"RespondNetworkSecret\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"RetrieveAllBridgeFunds\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_addr\",\"type\":\"address\"}],\"name\":\"RevokeSequencerEnclave\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"key\",\"type\":\"string\"},{\"internalType\":\"address\",\"name\":\"newAddress\",\"type\":\"address\"}],\"name\":\"SetImportantContractAddress\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"_lastBatchHash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"blockHash\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"blockNum\",\"type\":\"uint256\"},{\"internalType\":\"bytes[]\",\"name\":\"crossChainHashes\",\"type\":\"bytes[]\"},{\"internalType\":\"bytes\",\"name\":\"signature\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"rollupNumber\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"forkID\",\"type\":\"bytes32\"}],\"name\":\"addCrossChainMessagesRoot\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"name\":\"importantContractAddresses\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"importantContractKeys\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"isWithdrawalSpent\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"lastBatchHash\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"lastBatchSeqNo\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"merkleMessageBus\",\"outputs\":[{\"internalType\":\"contractIMerkleTreeMessageBus\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"messageBus\",\"outputs\":[{\"internalType\":\"contractIMessageBus\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", - Bin: "0x608060405234801561001057600080fd5b5061001a3361001f565b610090565b7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c19930080546001600160a01b031981166001600160a01b03848116918217845560405192169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3505050565b61422180620000a06000396000f3fe60806040523480156200001157600080fd5b5060043610620001e85760003560e01c8063715018a6116200010d578063a1a227fa11620000a3578063db5d91b1116200007a578063db5d91b1146200049c578063e34fbfc814620004cb578063e874eb2014620004e0578063f2fde38b14620004f457600080fd5b8063a1a227fa1462000460578063a52f433c1462000474578063d4fab887146200048557600080fd5b80638236a7ba11620000e45780638236a7ba14620003cb57806387059edb14620003f25780638da5cb5b146200040957806398077e86146200043a57600080fd5b8063715018a614620003ad5780637281099614620003b75780638129fc1c14620003c157600080fd5b8063440c953b1162000183578063568699c8116200015a578063568699c8146200033f57806368e1038314620003665780636a30d26c146200037d5780636b9707d6146200039657600080fd5b8063440c953b14620003075780634766573814620003115780635371a216146200032857600080fd5b80632c77c81f11620001c45780632c77c81f146200023a5780632f0cb9e314620002515780633e60a22f146200028857806343348b2f14620002d857600080fd5b80620ddd2714620001ed57806303e72e48146200020a578063073b6ef31462000223575b600080fd5b620001f7600d5481565b6040519081526020015b60405180910390f35b620002216200021b36600462001d62565b6200050b565b005b620002216200023436600462001e02565b6200061e565b620002216200024b36600462001f36565b62000844565b620002776200026236600462001fd9565b600c6020526000908152604090205460ff1681565b604051901515815260200162000201565b620002bf6200029936600462001ff3565b80516020818301810180516003825292820191909301209152546001600160a01b031681565b6040516001600160a01b03909116815260200162000201565b62000277620002e936600462002034565b6001600160a01b031660009081526020819052604090205460ff1690565b620001f760055481565b620002216200032236600462002034565b620009b4565b620002216200033936600462002059565b62000a84565b620003566200035036600462001fd9565b62000c8d565b604051620002019291906200217c565b620002216200037736600462002197565b62000ce6565b6200038762000dd3565b60405162000201919062002221565b62000221620003a736600462002034565b62000eb6565b6200022162000f7c565b6200022162000f94565b6200022162001018565b620003e2620003dc36600462001fd9565b620011fc565b6040516200020192919062002287565b620003e26200040336600462001fd9565b620012ec565b7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300546001600160a01b0316620002bf565b620004516200044b36600462001fd9565b62001366565b604051620002019190620022a4565b600a54620002bf906001600160a01b031681565b600454610100900460ff1662000277565b6200022162000496366004620022b9565b6200141b565b62000277620004ad36600462002034565b6001600160a01b031660009081526001602052604090205460ff1690565b62000221620004dc36600462002364565b5050565b600b54620002bf906001600160a01b031681565b620002216200050536600462002034565b620015ae565b620005156200160b565b60006001600160a01b0316600383604051620005329190620023aa565b908152604051908190036020019020546001600160a01b0316036200059157600280546001810182556000919091527f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace016200058f838262002457565b505b80600383604051620005a49190620023aa565b90815260405190819003602001812080546001600160a01b039390931673ffffffffffffffffffffffffffffffffffffffff19909316929092179091557f17b2f9f5748931099ffee882b5b64f4a560b5c55da9b4f4e396dae3bb9f98cb59062000612908490849062002524565b60405180910390a15050565b6000828152600860205260409020548114620006815760405162461bcd60e51b815260206004820152600e60248201527f496e76616c696420666f726b494400000000000000000000000000000000000060448201526064015b60405180910390fd5b6000620006f389898989604051602001620006a0949392919062002551565b6040516020818303038152906040528051906020012086868080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506200168292505050565b6001600160a01b03811660009081526020819052604090205490915060ff16620007605760405162461bcd60e51b815260206004820152601660248201527f656e636c6176654944206e6f7420617474657374656400000000000000000000604482015260640162000678565b600d89905560005b86518110156200083857600b5487516001600160a01b039091169063b6aed0cb908990849081106200079e576200079e620025cd565b6020026020010151620007b190620025e3565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e084901b1681526004810191909152426024820152604401600060405180830381600087803b1580156200080957600080fd5b505af11580156200081e573d6000803e3d6000fd5b5050505080806200082f906200261e565b91505062000768565b50505050505050505050565b60006200089685356200085b60208801886200263a565b8080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506200168292505050565b6001600160a01b03811660009081526020819052604090205490915060ff16620009035760405162461bcd60e51b815260206004820152601660248201527f656e636c6176654944206e6f7420617474657374656400000000000000000000604482015260640162000678565b6001600160a01b03811660009081526001602052604090205460ff166200096d5760405162461bcd60e51b815260206004820152601960248201527f656e636c6176654944206e6f7420612073657175656e63657200000000000000604482015260640162000678565b6200097885620016b2565b604051853581527fd6555bff8670bd3008dc064c30bb56d6ac7cb14ae801e36146fe4e7c6a504a58906020015b60405180910390a15050505050565b620009be6200160b565b6001600160a01b03811660009081526020819052604090205460ff1662000a285760405162461bcd60e51b815260206004820152601660248201527f656e636c6176654944206e6f7420617474657374656400000000000000000000604482015260640162000678565b6001600160a01b038116600081815260016020818152604092839020805460ff191690921790915590519182527ffe64c7181f0fc60e300dc02cca368cdfa94d7ca45902de3b9a9d80070e76093691015b60405180910390a150565b600b546040517fb201246f0000000000000000000000000000000000000000000000000000000081526001600160a01b039091169063b201246f9062000ad5908790879087908790600401620026e4565b60006040518083038186803b15801562000aee57600080fd5b505afa15801562000b03573d6000803e3d6000fd5b5050505060008460405160200162000b1c91906200274c565b60408051601f1981840301815291815281516020928301206000818152600c90935291205490915060ff161562000b965760405162461bcd60e51b815260206004820152601860248201527f7769746864726177616c20616c7265616479207370656e740000000000000000604482015260640162000678565b6001600c60008760405160200162000baf91906200274c565b60408051808303601f190181529181528151602092830120835282820193909352908201600020805460ff191693151593909317909255600a546001600160a01b0316916399a3ad219162000c0a9190890190890162002034565b604080517fffffffff0000000000000000000000000000000000000000000000000000000060e085901b1681526001600160a01b0390921660048301528801356024820152604401600060405180830381600087803b15801562000c6d57600080fd5b505af115801562000c82573d6000803e3d6000fd5b505050505050505050565b60408051606080820183526000808352602083019190915291810182905260008062000cb985620012ec565b915091508162000ccf5760009590945092505050565b600094855260086020526040909420549492505050565b60045460ff161562000d615760405162461bcd60e51b815260206004820152602260248201527f6e6574776f726b2073656372657420616c726561647920696e697469616c697a60448201527f6564000000000000000000000000000000000000000000000000000000000000606482015260840162000678565b60048054600160ff1991821681179092556001600160a01b038716600081815260208181526040808320805486168717905585825291829020805490941690941790925590519081527ffe64c7181f0fc60e300dc02cca368cdfa94d7ca45902de3b9a9d80070e7609369101620009a5565b60606002805480602002602001604051908101604052809291908181526020016000905b8282101562000ead57838290600052602060002001805462000e1990620023c8565b80601f016020809104026020016040519081016040528092919081815260200182805462000e4790620023c8565b801562000e985780601f1062000e6c5761010080835404028352916020019162000e98565b820191906000526020600020905b81548152906001019060200180831162000e7a57829003601f168201915b50505050508152602001906001019062000df7565b50505050905090565b62000ec06200160b565b6001600160a01b03811660009081526001602052604090205460ff1662000f2a5760405162461bcd60e51b815260206004820152601960248201527f656e636c6176654944206e6f7420612073657175656e63657200000000000000604482015260640162000678565b6001600160a01b038116600081815260016020908152604091829020805460ff1916905590519182527f0f279980343c7ca542fde9fa5396555068efb5cd560d9cf9c191aa2911079b47910162000a79565b62000f866200160b565b62000f92600062001767565b565b62000f9e6200160b565b600a546040517f36d2da900000000000000000000000000000000000000000000000000000000081523360048201526001600160a01b03909116906336d2da9090602401600060405180830381600087803b15801562000ffd57600080fd5b505af115801562001012573d6000803e3d6000fd5b50505050565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00805468010000000000000000810460ff16159067ffffffffffffffff16600081158015620010645750825b905060008267ffffffffffffffff166001148015620010825750303b155b90508115801562001091575080155b15620010c9576040517ff92ee8a900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b845467ffffffffffffffff191660011785558315620010fe57845468ff00000000000000001916680100000000000000001785555b6200110933620017e5565b60006005556001600955604051620011219062001c76565b604051809103906000f0801580156200113e573d6000803e3d6000fd5b50600b805473ffffffffffffffffffffffffffffffffffffffff199081166001600160a01b0393909316928317909155600a8054909116821790556040519081527fbd726cf82ac9c3260b1495107182e336e0654b25c10915648c0cc15b2bb72cbf9060200160405180910390a18315620011f557845468ff000000000000000019168555604051600181527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d290602001620009a5565b5050505050565b6040805160608082018352600080835260208084018390528385018290528582526006815284822085519384019095528454835260018501805492958694939092840191906200124c90620023c8565b80601f01602080910402602001604051908101604052809291908181526020018280546200127a90620023c8565b8015620012cb5780601f106200129f57610100808354040283529160200191620012cb565b820191906000526020600020905b815481529060010190602001808311620012ad57829003601f168201915b50505091835250506002919091015460209091015280519094149492505050565b604080516060808201835260008083526020830191909152918101829052600083815260076020526040812054908190036200135157505060408051606081018252600080825282516020818101855282825283015291810182905290939092509050565b6200135c81620011fc565b9250925050915091565b600281815481106200137757600080fd5b9060005260206000200160009150905080546200139490620023c8565b80601f0160208091040260200160405190810160405280929190818152602001828054620013c290620023c8565b8015620014135780601f10620013e75761010080835404028352916020019162001413565b820191906000526020600020905b815481529060010190602001808311620013f557829003601f168201915b505050505081565b6001600160a01b03851660009081526020819052604090205460ff1680620014ac5760405162461bcd60e51b815260206004820152602360248201527f726573706f6e64696e67206174746573746572206973206e6f7420617474657360448201527f7465640000000000000000000000000000000000000000000000000000000000606482015260840162000678565b811562001583576000620014e5878786604051602001620014d0939291906200275c565b604051602081830303815290604052620017fa565b90506000620014f5828762001682565b9050876001600160a01b0316816001600160a01b031614620015805760405162461bcd60e51b815260206004820152602c60248201527f63616c63756c61746564206164647265737320616e642061747465737465724960448201527f4420646f6e74206d617463680000000000000000000000000000000000000000606482015260840162000678565b50505b5050506001600160a01b039091166000908152602081905260409020805460ff191660011790555050565b620015b86200160b565b6001600160a01b038116620015fd576040517f1e4fbdf70000000000000000000000000000000000000000000000000000000081526000600482015260240162000678565b620016088162001767565b50565b336200163e7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300546001600160a01b031690565b6001600160a01b03161462000f92576040517f118cdaa700000000000000000000000000000000000000000000000000000000815233600482015260240162000678565b60008060008062001694868662001839565b925092509250620016a682826200188a565b50909150505b92915050565b803560009081526006602052604090208190620016d08282620027a4565b50506009546000908152600760205260409020813590819055620016f6600143620028b4565b4060405160200162001712929190918252602082015260400190565b60408051601f1981840301815291815281516020928301206009805460009081526008909452918320558054916200174a836200261e565b919050555060055481604001351115620016085760400135600555565b7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300805473ffffffffffffffffffffffffffffffffffffffff1981166001600160a01b03848116918217845560405192169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3505050565b620017ef620019a0565b620016088162001a08565b600062001808825162001a12565b826040516020016200181c929190620028ca565b604051602081830303815290604052805190602001209050919050565b60008060008351604103620018775760208401516040850151606086015160001a620018688882858562001ab9565b95509550955050505062001883565b50508151600091506002905b9250925092565b6000826003811115620018a157620018a162002929565b03620018ab575050565b6001826003811115620018c257620018c262002929565b03620018fa576040517ff645eedf00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600282600381111562001911576200191162002929565b036200194d576040517ffce698f70000000000000000000000000000000000000000000000000000000081526004810182905260240162000678565b600382600381111562001964576200196462002929565b03620004dc576040517fd78bce0c0000000000000000000000000000000000000000000000000000000081526004810182905260240162000678565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a005468010000000000000000900460ff1662000f92576040517fd7e6bcf800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b620015b8620019a0565b6060600062001a218362001b8d565b600101905060008167ffffffffffffffff81111562001a445762001a4462001c84565b6040519080825280601f01601f19166020018201604052801562001a6f576020820181803683370190505b5090508181016020015b600019017f3031323334353637383961626364656600000000000000000000000000000000600a86061a8153600a850494508462001a7957509392505050565b600080807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a084111562001af6575060009150600390508262001b83565b604080516000808252602082018084528a905260ff891692820192909252606081018790526080810186905260019060a0016020604051602081039080840390855afa15801562001b4b573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b03811662001b795750600092506001915082905062001b83565b9250600091508190505b9450945094915050565b6000807a184f03e93ff9f4daa797ed6e38ed64bf6a1f010000000000000000831062001bd7577a184f03e93ff9f4daa797ed6e38ed64bf6a1f010000000000000000830492506040015b6d04ee2d6d415b85acef8100000000831062001c04576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc10000831062001c2357662386f26fc10000830492506010015b6305f5e100831062001c3c576305f5e100830492506008015b612710831062001c5157612710830492506004015b6064831062001c64576064830492506002015b600a8310620016ac5760010192915050565b6118ac806200294083390190565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff8111828210171562001cc65762001cc662001c84565b604052919050565b600082601f83011262001ce057600080fd5b813567ffffffffffffffff81111562001cfd5762001cfd62001c84565b62001d12601f8201601f191660200162001c9a565b81815284602083860101111562001d2857600080fd5b816020850160208301376000918101602001919091529392505050565b80356001600160a01b038116811462001d5d57600080fd5b919050565b6000806040838503121562001d7657600080fd5b823567ffffffffffffffff81111562001d8e57600080fd5b62001d9c8582860162001cce565b92505062001dad6020840162001d45565b90509250929050565b60008083601f84011262001dc957600080fd5b50813567ffffffffffffffff81111562001de257600080fd5b60208301915083602082850101111562001dfb57600080fd5b9250929050565b60008060008060008060008060e0898b03121562001e1f57600080fd5b88359750602089013596506040890135955067ffffffffffffffff8060608b0135111562001e4c57600080fd5b60608a01358a018b601f82011262001e6357600080fd5b818135111562001e775762001e7762001c84565b62001e896020823560051b0162001c9a565b81358082526020808301929160051b8401018e101562001ea857600080fd5b602083015b6020843560051b85010181101562001eef57848135111562001ece57600080fd5b62001ee08f6020833587010162001cce565b83526020928301920162001ead565b509750505060808a013581101562001f0657600080fd5b5062001f198a60808b01358b0162001db6565b989b979a5095989497959660a08601359560c00135945092505050565b6000806000806060858703121562001f4d57600080fd5b843567ffffffffffffffff8082111562001f6657600080fd5b908601906060828903121562001f7b57600080fd5b9094506020860135908082111562001f9257600080fd5b62001fa08883890162001db6565b9095509350604087013591508082111562001fba57600080fd5b5085016020818803121562001fce57600080fd5b939692955090935050565b60006020828403121562001fec57600080fd5b5035919050565b6000602082840312156200200657600080fd5b813567ffffffffffffffff8111156200201e57600080fd5b6200202c8482850162001cce565b949350505050565b6000602082840312156200204757600080fd5b620020528262001d45565b9392505050565b60008060008084860360c08112156200207157600080fd5b60808112156200208057600080fd5b50849350608085013567ffffffffffffffff80821115620020a057600080fd5b818701915087601f830112620020b557600080fd5b813581811115620020c557600080fd5b8860208260051b8501011115620020db57600080fd5b95986020929092019750949560a00135945092505050565b60005b8381101562002110578181015183820152602001620020f6565b50506000910152565b6000815180845262002133816020860160208601620020f3565b601f01601f19169290920160200192915050565b80518252600060208201516060602085015262002168606085018262002119565b604093840151949093019390935250919050565b8281526040602082015260006200202c604083018462002147565b600080600080600060608688031215620021b057600080fd5b620021bb8662001d45565b9450602086013567ffffffffffffffff80821115620021d957600080fd5b620021e789838a0162001db6565b909650945060408801359150808211156200220157600080fd5b50620022108882890162001db6565b969995985093965092949392505050565b6000602080830181845280855180835260408601915060408160051b870101925083870160005b828110156200227a57603f198886030184526200226785835162002119565b9450928501929085019060010162002248565b5092979650505050505050565b82151581526040602082015260006200202c604083018462002147565b60208152600062002052602083018462002119565b600080600080600060a08688031215620022d257600080fd5b620022dd8662001d45565b9450620022ed6020870162001d45565b9350604086013567ffffffffffffffff808211156200230b57600080fd5b6200231989838a0162001cce565b945060608801359150808211156200233057600080fd5b506200233f8882890162001cce565b925050608086013580151581146200235657600080fd5b809150509295509295909350565b600080602083850312156200237857600080fd5b823567ffffffffffffffff8111156200239057600080fd5b6200239e8582860162001db6565b90969095509350505050565b60008251620023be818460208701620020f3565b9190910192915050565b600181811c90821680620023dd57607f821691505b602082108103620023fe57634e487b7160e01b600052602260045260246000fd5b50919050565b601f8211156200245257600081815260208120601f850160051c810160208610156200242d5750805b601f850160051c820191505b818110156200244e5782815560010162002439565b5050505b505050565b815167ffffffffffffffff81111562002474576200247462001c84565b6200248c81620024858454620023c8565b8462002404565b602080601f831160018114620024c45760008415620024ab5750858301515b600019600386901b1c1916600185901b1785556200244e565b600085815260208120601f198616915b82811015620024f557888601518255948401946001909101908401620024d4565b5085821015620025145787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b60408152600062002539604083018562002119565b90506001600160a01b03831660208301529392505050565b600060808201868352602086818501528560408501526080606085015281855180845260a08601915060a08160051b870101935082870160005b82811015620025bd57609f19888703018452620025aa86835162002119565b955092840192908401906001016200258b565b50939a9950505050505050505050565b634e487b7160e01b600052603260045260246000fd5b80516020808301519190811015620023fe5760001960209190910360031b1b16919050565b634e487b7160e01b600052601160045260246000fd5b60006001820162002633576200263362002608565b5060010190565b6000808335601e198436030181126200265257600080fd5b83018035915067ffffffffffffffff8211156200266e57600080fd5b60200191503681900382131562001dfb57600080fd5b6001600160a01b0380620026988362001d45565b16835280620026aa6020840162001d45565b1660208401525060408101356040830152606081013567ffffffffffffffff8116808214620026d857600080fd5b80606085015250505050565b620026f0818662002684565b60c060808201528260c082015260007f07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8411156200272d57600080fd5b8360051b808660e085013760a0830193909352500160e0019392505050565b60808101620016ac828462002684565b60006bffffffffffffffffffffffff19808660601b168352808560601b16601484015250825162002795816028850160208701620020f3565b91909101602801949350505050565b813581556001808201602080850135601e19863603018112620027c657600080fd5b8501803567ffffffffffffffff811115620027e057600080fd5b8036038383011315620027f257600080fd5b6200280a81620028038654620023c8565b8662002404565b6000601f8211600181146200284357600083156200282a57508382018501355b600019600385901b1c1916600184901b1786556200289f565b600086815260209020601f19841690835b82811015620028755786850188013582559387019390890190870162002854565b5084821015620028955760001960f88660031b161c198785880101351681555b50508683881b0186555b50505050505050604082013560028201555050565b81810381811115620016ac57620016ac62002608565b7f19457468657265756d205369676e6564204d6573736167653a0a0000000000008152600083516200290481601a850160208801620020f3565b8351908301906200291d81601a840160208801620020f3565b01601a01949350505050565b634e487b7160e01b600052602160045260246000fdfe608060405234801561001057600080fd5b50338061003757604051631e4fbdf760e01b81526000600482015260240160405180910390fd5b61004081610046565b50610096565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b611807806100a56000396000f3fe6080604052600436106100e15760003560e01c80639730886d1161007f578063b201246f11610059578063b201246f1461030e578063b6aed0cb1461032e578063e138a8d21461034e578063f2fde38b1461036e57610155565b80639730886d1461029557806399a3ad21146102b5578063b1454caa146102d557610155565b8063346633fb116100bb578063346633fb1461022557806336d2da9014610238578063715018a6146102585780638da5cb5b1461026d57610155565b80630fcfbd11146101a25780630fe9188e146101d557806333a88c72146101f557610155565b36610155576040517f346633fb0000000000000000000000000000000000000000000000000000000081523360048201523460248201819052309163346633fb91906044016000604051808303818588803b15801561013f57600080fd5b505af1158015610153573d6000803e3d6000fd5b005b60405162461bcd60e51b815260206004820152600b60248201527f756e737570706f7274656400000000000000000000000000000000000000000060448201526064015b60405180910390fd5b3480156101ae57600080fd5b506101c26101bd366004610f80565b61038e565b6040519081526020015b60405180910390f35b3480156101e157600080fd5b506101536101f0366004610fb5565b610428565b34801561020157600080fd5b50610215610210366004610f80565b61049e565b60405190151581526020016101cc565b610153610233366004610fe3565b6104f1565b34801561024457600080fd5b5061015361025336600461100f565b6105d4565b34801561026457600080fd5b50610153610683565b34801561027957600080fd5b506000546040516001600160a01b0390911681526020016101cc565b3480156102a157600080fd5b506101536102b036600461102c565b610697565b3480156102c157600080fd5b506101536102d0366004610fe3565b6107e9565b3480156102e157600080fd5b506102f56102f03660046110a2565b610899565b60405167ffffffffffffffff90911681526020016101cc565b34801561031a57600080fd5b5061015361032936600461119b565b6108fa565b34801561033a57600080fd5b506101536103493660046111fd565b610afc565b34801561035a57600080fd5b5061015361036936600461121f565b610b98565b34801561037a57600080fd5b5061015361038936600461100f565b610d78565b600080826040516020016103a291906112ce565b60408051601f19818403018152918152815160209283012060008181526001909352912054909150806104215760405162461bcd60e51b815260206004820152602160248201527f54686973206d65737361676520776173206e65766572207375626d69747465646044820152601760f91b6064820152608401610199565b9392505050565b610430610dcf565b600081815260046020526040812054900361048d5760405162461bcd60e51b815260206004820152601a60248201527f537461746520726f6f7420646f6573206e6f742065786973742e0000000000006044820152606401610199565b600090815260046020526040812055565b600080826040516020016104b291906112ce565b60408051601f1981840301815291815281516020928301206000818152600190935291205490915080158015906104e95750428111155b949350505050565b60003411801561050057508034145b6105725760405162461bcd60e51b815260206004820152603060248201527f417474656d7074696e6720746f2073656e642076616c756520776974686f757460448201527f2070726f766964696e67204574686572000000000000000000000000000000006064820152608401610199565b600061057d33610e15565b6040805134815267ffffffffffffffff831660208201529192506001600160a01b0385169133917f50c536ac33a920f00755865b831d17bf4cff0b2e0345f65b16d52bfc004068b6910160405180910390a3505050565b6105dc610dcf565b6000816001600160a01b03164760405160006040518083038185875af1925050503d8060008114610629576040519150601f19603f3d011682016040523d82523d6000602084013e61062e565b606091505b505090508061067f5760405162461bcd60e51b815260206004820152601460248201527f6661696c65642073656e64696e672076616c75650000000000000000000000006044820152606401610199565b5050565b61068b610dcf565b6106956000610e73565b565b61069f610dcf565b60006106ab82426113cf565b90506000836040516020016106c091906112ce565b60408051601f198184030181529181528151602092830120600081815260019093529120549091501561075b5760405162461bcd60e51b815260206004820152602160248201527f4d657373616765207375626d6974746564206d6f7265207468616e206f6e636560448201527f21000000000000000000000000000000000000000000000000000000000000006064820152608401610199565b600081815260016020908152604082208490556002919061077e9087018761100f565b6001600160a01b0316815260208101919091526040016000908120906107aa60808701606088016113e2565b63ffffffff168152602080820192909252604001600090812080546001810182559082529190208591600402016107e182826115b0565b505050505050565b6107f1610dcf565b6000826001600160a01b03168260405160006040518083038185875af1925050503d806000811461083e576040519150601f19603f3d011682016040523d82523d6000602084013e610843565b606091505b50509050806108945760405162461bcd60e51b815260206004820152601460248201527f6661696c65642073656e64696e672076616c75650000000000000000000000006044820152606401610199565b505050565b60006108a433610e15565b9050336001600160a01b03167fb93c37389233beb85a3a726c3f15c2d15533ee74cb602f20f490dfffef7759378288888888886040516108e9969594939291906116ca565b60405180910390a295945050505050565b600081815260046020526040812054900361096a5760405162461bcd60e51b815260206004820152602a60248201527f526f6f74206973206e6f74207075626c6973686564206f6e2074686973206d6560448201526939b9b0b3b290313ab99760b11b6064820152608401610199565b6000818152600460205260409020544210156109d25760405162461bcd60e51b815260206004820152602160248201527f526f6f74206973206e6f7420636f6e736964657265642066696e616c207965746044820152601760f91b6064820152608401610199565b6000846040516020016109e5919061171a565b60408051601f198184030181528282528051602091820120908301829052600160608401527f760000000000000000000000000000000000000000000000000000000000000060808401529082015260a001604051602081830303815290604052805190602001209050610a8384848484604051602001610a6891815260200190565b60405160208183030381529060405280519060200120610ed0565b610af55760405162461bcd60e51b815260206004820152603360248201527f496e76616c696420696e636c7573696f6e2070726f6f6620666f722076616c7560448201527f65207472616e73666572206d6573736167652e000000000000000000000000006064820152608401610199565b5050505050565b610b04610dcf565b60008281526004602052604090205415610b865760405162461bcd60e51b815260206004820152602560248201527f526f6f7420616c726561647920616464656420746f20746865206d657373616760448201527f65206275730000000000000000000000000000000000000000000000000000006064820152608401610199565b60009182526004602052604090912055565b6000818152600460205260408120549003610c085760405162461bcd60e51b815260206004820152602a60248201527f526f6f74206973206e6f74207075626c6973686564206f6e2074686973206d6560448201526939b9b0b3b290313ab99760b11b6064820152608401610199565b600081815260046020526040902054421015610c705760405162461bcd60e51b815260206004820152602160248201527f526f6f74206973206e6f7420636f6e736964657265642066696e616c207965746044820152601760f91b6064820152608401610199565b600084604051602001610c8391906112ce565b60408051601f198184030181528282528051602091820120908301829052600160608401527f6d0000000000000000000000000000000000000000000000000000000000000060808401529082015260a001604051602081830303815290604052805190602001209050610d0684848484604051602001610a6891815260200190565b610af55760405162461bcd60e51b815260206004820152603060248201527f496e76616c696420696e636c7573696f6e2070726f6f6620666f722063726f7360448201527f7320636861696e206d6573736167652e000000000000000000000000000000006064820152608401610199565b610d80610dcf565b6001600160a01b038116610dc3576040517f1e4fbdf700000000000000000000000000000000000000000000000000000000815260006004820152602401610199565b610dcc81610e73565b50565b6000546001600160a01b03163314610695576040517f118cdaa7000000000000000000000000000000000000000000000000000000008152336004820152602401610199565b6001600160a01b0381166000908152600360205260408120805467ffffffffffffffff169160019190610e48838561177a565b92506101000a81548167ffffffffffffffff021916908367ffffffffffffffff160217905550919050565b600080546001600160a01b0383811673ffffffffffffffffffffffffffffffffffffffff19831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b600082610ede868685610ee8565b1495945050505050565b600081815b84811015610f2b57610f1782878784818110610f0b57610f0b6117a2565b90506020020135610f34565b915080610f23816117b8565b915050610eed565b50949350505050565b6000818310610f50576000828152602084905260409020610f5f565b60008381526020839052604090205b90505b92915050565b600060c08284031215610f7a57600080fd5b50919050565b600060208284031215610f9257600080fd5b813567ffffffffffffffff811115610fa957600080fd5b6104e984828501610f68565b600060208284031215610fc757600080fd5b5035919050565b6001600160a01b0381168114610dcc57600080fd5b60008060408385031215610ff657600080fd5b823561100181610fce565b946020939093013593505050565b60006020828403121561102157600080fd5b813561042181610fce565b6000806040838503121561103f57600080fd5b823567ffffffffffffffff81111561105657600080fd5b61106285828601610f68565b95602094909401359450505050565b63ffffffff81168114610dcc57600080fd5b60ff81168114610dcc57600080fd5b803561109d81611083565b919050565b6000806000806000608086880312156110ba57600080fd5b85356110c581611071565b945060208601356110d581611071565b9350604086013567ffffffffffffffff808211156110f257600080fd5b818801915088601f83011261110657600080fd5b81358181111561111557600080fd5b89602082850101111561112757600080fd5b602083019550809450505050606086013561114181611083565b809150509295509295909350565b60008083601f84011261116157600080fd5b50813567ffffffffffffffff81111561117957600080fd5b6020830191508360208260051b850101111561119457600080fd5b9250929050565b60008060008084860360c08112156111b257600080fd5b60808112156111c057600080fd5b50849350608085013567ffffffffffffffff8111156111de57600080fd5b6111ea8782880161114f565b9598909750949560a00135949350505050565b6000806040838503121561121057600080fd5b50508035926020909101359150565b6000806000806060858703121561123557600080fd5b843567ffffffffffffffff8082111561124d57600080fd5b61125988838901610f68565b9550602087013591508082111561126f57600080fd5b5061127c8782880161114f565b9598909750949560400135949350505050565b67ffffffffffffffff81168114610dcc57600080fd5b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b60208152600082356112df81610fce565b6001600160a01b03811660208401525060208301356112fd8161128f565b67ffffffffffffffff80821660408501526040850135915061131e82611071565b63ffffffff80831660608601526060860135925061133b83611071565b80831660808601525060808501359150601e1985360301821261135d57600080fd5b602091850191820191358181111561137457600080fd5b80360383131561138357600080fd5b60c060a086015261139860e0860182856112a5565b925050506113a860a08501611092565b60ff811660c0850152509392505050565b634e487b7160e01b600052601160045260246000fd5b80820180821115610f6257610f626113b9565b6000602082840312156113f457600080fd5b813561042181611071565b60008135610f6281611071565b6000808335601e1984360301811261142357600080fd5b83018035915067ffffffffffffffff82111561143e57600080fd5b60200191503681900382131561119457600080fd5b634e487b7160e01b600052604160045260246000fd5b600181811c9082168061147d57607f821691505b602082108103610f7a57634e487b7160e01b600052602260045260246000fd5b601f82111561089457600081815260208120601f850160051c810160208610156114c45750805b601f850160051c820191505b818110156107e1578281556001016114d0565b67ffffffffffffffff8311156114fb576114fb611453565b61150f836115098354611469565b8361149d565b6000601f841160018114611543576000851561152b5750838201355b600019600387901b1c1916600186901b178355610af5565b600083815260209020601f19861690835b828110156115745786850135825560209485019460019092019101611554565b50868210156115915760001960f88860031b161c19848701351681555b505060018560011b0183555050505050565b60008135610f6281611083565b81356115bb81610fce565b6001600160a01b038116905081548173ffffffffffffffffffffffffffffffffffffffff19821617835560208401356115f38161128f565b7bffffffffffffffff00000000000000000000000000000000000000008160a01b1690507fffffffff000000000000000000000000000000000000000000000000000000008184828516171785556040860135925061165183611071565b921760e09190911b90911617815561168961166e606084016113ff565b6001830163ffffffff821663ffffffff198254161781555050565b611696608083018361140c565b6116a48183600286016114e3565b505061067f6116b560a084016115a3565b6003830160ff821660ff198254161781555050565b67ffffffffffffffff87168152600063ffffffff808816602084015280871660408401525060a0606083015261170460a0830185876112a5565b905060ff83166080830152979650505050505050565b60808101823561172981610fce565b6001600160a01b03908116835260208401359061174582610fce565b1660208301526040838101359083015260608301356117638161128f565b67ffffffffffffffff811660608401525092915050565b67ffffffffffffffff81811683821601908082111561179b5761179b6113b9565b5092915050565b634e487b7160e01b600052603260045260246000fd5b6000600182016117ca576117ca6113b9565b506001019056fea2646970667358221220a449a197632e1117b118ced8f7cf97a1ae44b160775ee146e59b50cbc1b8dcaa64736f6c63430008140033a26469706673582212203dcf3d6a1589adcc4c918a116aa5d41ed6d3b53300146bdea7c3dbbe83e2acd764736f6c63430008140033", + ABI: "[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"ECDSAInvalidSignature\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"length\",\"type\":\"uint256\"}],\"name\":\"ECDSAInvalidSignatureLength\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"s\",\"type\":\"bytes32\"}],\"name\":\"ECDSAInvalidSignatureS\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidInitialization\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotInitializing\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"OwnableInvalidOwner\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"OwnableUnauthorizedAccount\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"string\",\"name\":\"key\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newAddress\",\"type\":\"address\"}],\"name\":\"ImportantContractAddressUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"version\",\"type\":\"uint64\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"messageBusAddress\",\"type\":\"address\"}],\"name\":\"LogManagementContractCreated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"rollupHash\",\"type\":\"bytes32\"}],\"name\":\"RollupAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"enclaveID\",\"type\":\"address\"}],\"name\":\"SequencerEnclaveGranted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"enclaveID\",\"type\":\"address\"}],\"name\":\"SequencerEnclaveRevoked\",\"type\":\"event\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"Hash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes\",\"name\":\"Signature\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"LastSequenceNumber\",\"type\":\"uint256\"}],\"internalType\":\"structStructs.MetaRollup\",\"name\":\"r\",\"type\":\"tuple\"},{\"internalType\":\"string\",\"name\":\"_rollupData\",\"type\":\"string\"},{\"components\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"sequence\",\"type\":\"uint64\"},{\"internalType\":\"uint32\",\"name\":\"nonce\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"topic\",\"type\":\"uint32\"},{\"internalType\":\"bytes\",\"name\":\"payload\",\"type\":\"bytes\"},{\"internalType\":\"uint8\",\"name\":\"consistencyLevel\",\"type\":\"uint8\"}],\"internalType\":\"structStructs.CrossChainMessage[]\",\"name\":\"messages\",\"type\":\"tuple[]\"}],\"internalType\":\"structStructs.HeaderCrossChainData\",\"name\":\"\",\"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\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"uint64\",\"name\":\"sequence\",\"type\":\"uint64\"}],\"internalType\":\"structStructs.ValueTransferMessage\",\"name\":\"_msg\",\"type\":\"tuple\"},{\"internalType\":\"bytes32[]\",\"name\":\"proof\",\"type\":\"bytes32[]\"},{\"internalType\":\"bytes32\",\"name\":\"root\",\"type\":\"bytes32\"}],\"name\":\"ExtractNativeValue\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"GetImportantContractKeys\",\"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\":\"bytes\",\"name\":\"Signature\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"LastSequenceNumber\",\"type\":\"uint256\"}],\"internalType\":\"structStructs.MetaRollup\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"number\",\"type\":\"uint256\"}],\"name\":\"GetRollupByNumber\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"Hash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes\",\"name\":\"Signature\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"LastSequenceNumber\",\"type\":\"uint256\"}],\"internalType\":\"structStructs.MetaRollup\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"number\",\"type\":\"uint256\"}],\"name\":\"GetUniqueForkID\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"Hash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes\",\"name\":\"Signature\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"LastSequenceNumber\",\"type\":\"uint256\"}],\"internalType\":\"structStructs.MetaRollup\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_addr\",\"type\":\"address\"}],\"name\":\"GrantSequencerEnclave\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_enclaveID\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_initSecret\",\"type\":\"bytes\"},{\"internalType\":\"string\",\"name\":\"_genesisAttestation\",\"type\":\"string\"}],\"name\":\"InitializeNetworkSecret\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_addr\",\"type\":\"address\"}],\"name\":\"IsSequencerEnclave\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"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\":\"bool\",\"name\":\"verifyAttester\",\"type\":\"bool\"}],\"name\":\"RespondNetworkSecret\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"RetrieveAllBridgeFunds\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_addr\",\"type\":\"address\"}],\"name\":\"RevokeSequencerEnclave\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"key\",\"type\":\"string\"},{\"internalType\":\"address\",\"name\":\"newAddress\",\"type\":\"address\"}],\"name\":\"SetImportantContractAddress\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"_lastBatchHash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"blockHash\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"blockNum\",\"type\":\"uint256\"},{\"internalType\":\"bytes[]\",\"name\":\"crossChainHashes\",\"type\":\"bytes[]\"},{\"internalType\":\"bytes\",\"name\":\"signature\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"rollupNumber\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"forkID\",\"type\":\"bytes32\"}],\"name\":\"addCrossChainMessagesRoot\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"name\":\"importantContractAddresses\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"importantContractKeys\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes[]\",\"name\":\"crossChainHashes\",\"type\":\"bytes[]\"}],\"name\":\"isBundleAvailable\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"isBundleSaved\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"isWithdrawalSpent\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"lastBatchHash\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"lastBatchSeqNo\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"merkleMessageBus\",\"outputs\":[{\"internalType\":\"contractIMerkleTreeMessageBus\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"messageBus\",\"outputs\":[{\"internalType\":\"contractIMessageBus\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", + Bin: "0x608060405234801561001057600080fd5b5061001a3361001f565b610090565b7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c19930080546001600160a01b031981166001600160a01b03848116918217845560405192169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3505050565b6143c180620000a06000396000f3fe60806040523480156200001157600080fd5b5060043610620002005760003560e01c8063728109961162000119578063a1a227fa11620000af578063db5d91b1116200007a578063db5d91b114620004f1578063e34fbfc81462000520578063e874eb201462000535578063f2fde38b146200054957600080fd5b8063a1a227fa146200049e578063a4ab2faa14620004b2578063a52f433c14620004c9578063d4fab88714620004da57600080fd5b80638415482611620000f057806384154826146200040a57806387059edb14620004305780638da5cb5b146200044757806398077e86146200047857600080fd5b80637281099614620003cf5780638129fc1c14620003d95780638236a7ba14620003e357600080fd5b8063440c953b116200019b57806368e10383116200016657806368e10383146200037e5780636a30d26c14620003955780636b9707d614620003ae578063715018a614620003c557600080fd5b8063440c953b146200031f5780634766573814620003295780635371a2161462000340578063568699c8146200035757600080fd5b80632c77c81f11620001dc5780632c77c81f14620002525780632f0cb9e314620002695780633e60a22f14620002a057806343348b2f14620002f057600080fd5b80620ddd27146200020557806303e72e481462000222578063073b6ef3146200023b575b600080fd5b6200020f600e5481565b6040519081526020015b60405180910390f35b620002396200023336600462001eb5565b62000560565b005b620002396200024c36600462002000565b62000673565b62000239620002633660046200209d565b62000906565b6200028f6200027a36600462002140565b600c6020526000908152604090205460ff1681565b604051901515815260200162000219565b620002d7620002b13660046200215a565b80516020818301810180516003825292820191909301209152546001600160a01b031681565b6040516001600160a01b03909116815260200162000219565b6200028f620003013660046200219b565b6001600160a01b031660009081526020819052604090205460ff1690565b6200020f60055481565b620002396200033a3660046200219b565b62000a76565b6200023962000351366004620021c0565b62000b46565b6200036e6200036836600462002140565b62000d4f565b60405162000219929190620022e3565b620002396200038f366004620022fe565b62000da8565b6200039f62000e95565b60405162000219919062002388565b62000239620003bf3660046200219b565b62000f78565b620002396200103e565b6200023962001056565b62000239620010da565b620003fa620003f436600462002140565b620012be565b60405162000219929190620023ee565b6200028f6200041b36600462002140565b600d6020526000908152604090205460ff1681565b620003fa6200044136600462002140565b620013ae565b7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300546001600160a01b0316620002d7565b6200048f6200048936600462002140565b62001428565b6040516200021991906200240b565b600a54620002d7906001600160a01b031681565b6200028f620004c336600462002420565b620014dd565b600454610100900460ff166200028f565b62000239620004eb36600462002459565b6200156e565b6200028f620005023660046200219b565b6001600160a01b031660009081526001602052604090205460ff1690565b620002396200053136600462002504565b5050565b600b54620002d7906001600160a01b031681565b620002396200055a3660046200219b565b62001701565b6200056a6200175e565b60006001600160a01b03166003836040516200058791906200254a565b908152604051908190036020019020546001600160a01b031603620005e657600280546001810182556000919091527f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace01620005e48382620025f7565b505b80600383604051620005f991906200254a565b90815260405190819003602001812080546001600160a01b039390931673ffffffffffffffffffffffffffffffffffffffff19909316929092179091557f17b2f9f5748931099ffee882b5b64f4a560b5c55da9b4f4e396dae3bb9f98cb590620006679084908490620026c4565b60405180910390a15050565b6000828152600860205260409020548114620006d65760405162461bcd60e51b815260206004820152600e60248201527f496e76616c696420666f726b494400000000000000000000000000000000000060448201526064015b60405180910390fd5b60006200074889898989604051602001620006f59493929190620026f1565b6040516020818303038152906040528051906020012086868080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250620017d592505050565b6001600160a01b03811660009081526020819052604090205490915060ff16620007b55760405162461bcd60e51b815260206004820152601660248201527f656e636c6176654944206e6f74206174746573746564000000000000000000006044820152606401620006cd565b600e8990556000805b8751811015620008e157600b5488516001600160a01b039091169063b6aed0cb908a9084908110620007f457620007f46200276d565b6020026020010151620008079062002783565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e084901b1681526004810191909152426024820152604401600060405180830381600087803b1580156200085f57600080fd5b505af115801562000874573d6000803e3d6000fd5b50505050818882815181106200088e576200088e6200276d565b6020026020010151620008a19062002783565b6040805160208101939093528201526060016040516020818303038152906040528051906020012091508080620008d890620027be565b915050620007be565b506000908152600d60205260409020805460ff19166001179055505050505050505050565b60006200095885356200091d6020880188620027da565b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250620017d592505050565b6001600160a01b03811660009081526020819052604090205490915060ff16620009c55760405162461bcd60e51b815260206004820152601660248201527f656e636c6176654944206e6f74206174746573746564000000000000000000006044820152606401620006cd565b6001600160a01b03811660009081526001602052604090205460ff1662000a2f5760405162461bcd60e51b815260206004820152601960248201527f656e636c6176654944206e6f7420612073657175656e636572000000000000006044820152606401620006cd565b62000a3a8562001805565b604051853581527fd6555bff8670bd3008dc064c30bb56d6ac7cb14ae801e36146fe4e7c6a504a58906020015b60405180910390a15050505050565b62000a806200175e565b6001600160a01b03811660009081526020819052604090205460ff1662000aea5760405162461bcd60e51b815260206004820152601660248201527f656e636c6176654944206e6f74206174746573746564000000000000000000006044820152606401620006cd565b6001600160a01b038116600081815260016020818152604092839020805460ff191690921790915590519182527ffe64c7181f0fc60e300dc02cca368cdfa94d7ca45902de3b9a9d80070e76093691015b60405180910390a150565b600b546040517fb201246f0000000000000000000000000000000000000000000000000000000081526001600160a01b039091169063b201246f9062000b9790879087908790879060040162002884565b60006040518083038186803b15801562000bb057600080fd5b505afa15801562000bc5573d6000803e3d6000fd5b5050505060008460405160200162000bde9190620028ec565b60408051601f1981840301815291815281516020928301206000818152600c90935291205490915060ff161562000c585760405162461bcd60e51b815260206004820152601860248201527f7769746864726177616c20616c7265616479207370656e7400000000000000006044820152606401620006cd565b6001600c60008760405160200162000c719190620028ec565b60408051808303601f190181529181528151602092830120835282820193909352908201600020805460ff191693151593909317909255600a546001600160a01b0316916399a3ad219162000ccc919089019089016200219b565b604080517fffffffff0000000000000000000000000000000000000000000000000000000060e085901b1681526001600160a01b0390921660048301528801356024820152604401600060405180830381600087803b15801562000d2f57600080fd5b505af115801562000d44573d6000803e3d6000fd5b505050505050505050565b60408051606080820183526000808352602083019190915291810182905260008062000d7b85620013ae565b915091508162000d915760009590945092505050565b600094855260086020526040909420549492505050565b60045460ff161562000e235760405162461bcd60e51b815260206004820152602260248201527f6e6574776f726b2073656372657420616c726561647920696e697469616c697a60448201527f65640000000000000000000000000000000000000000000000000000000000006064820152608401620006cd565b60048054600160ff1991821681179092556001600160a01b038716600081815260208181526040808320805486168717905585825291829020805490941690941790925590519081527ffe64c7181f0fc60e300dc02cca368cdfa94d7ca45902de3b9a9d80070e760936910162000a67565b60606002805480602002602001604051908101604052809291908181526020016000905b8282101562000f6f57838290600052602060002001805462000edb9062002568565b80601f016020809104026020016040519081016040528092919081815260200182805462000f099062002568565b801562000f5a5780601f1062000f2e5761010080835404028352916020019162000f5a565b820191906000526020600020905b81548152906001019060200180831162000f3c57829003601f168201915b50505050508152602001906001019062000eb9565b50505050905090565b62000f826200175e565b6001600160a01b03811660009081526001602052604090205460ff1662000fec5760405162461bcd60e51b815260206004820152601960248201527f656e636c6176654944206e6f7420612073657175656e636572000000000000006044820152606401620006cd565b6001600160a01b038116600081815260016020908152604091829020805460ff1916905590519182527f0f279980343c7ca542fde9fa5396555068efb5cd560d9cf9c191aa2911079b47910162000b3b565b620010486200175e565b620010546000620018ba565b565b620010606200175e565b600a546040517f36d2da900000000000000000000000000000000000000000000000000000000081523360048201526001600160a01b03909116906336d2da9090602401600060405180830381600087803b158015620010bf57600080fd5b505af1158015620010d4573d6000803e3d6000fd5b50505050565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00805468010000000000000000810460ff16159067ffffffffffffffff16600081158015620011265750825b905060008267ffffffffffffffff166001148015620011445750303b155b90508115801562001153575080155b156200118b576040517ff92ee8a900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b845467ffffffffffffffff191660011785558315620011c057845468ff00000000000000001916680100000000000000001785555b620011cb3362001938565b60006005556001600955604051620011e39062001dc9565b604051809103906000f08015801562001200573d6000803e3d6000fd5b50600b805473ffffffffffffffffffffffffffffffffffffffff199081166001600160a01b0393909316928317909155600a8054909116821790556040519081527fbd726cf82ac9c3260b1495107182e336e0654b25c10915648c0cc15b2bb72cbf9060200160405180910390a18315620012b757845468ff000000000000000019168555604051600181527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200162000a67565b5050505050565b6040805160608082018352600080835260208084018390528385018290528582526006815284822085519384019095528454835260018501805492958694939092840191906200130e9062002568565b80601f01602080910402602001604051908101604052809291908181526020018280546200133c9062002568565b80156200138d5780601f1062001361576101008083540402835291602001916200138d565b820191906000526020600020905b8154815290600101906020018083116200136f57829003601f168201915b50505091835250506002919091015460209091015280519094149492505050565b604080516060808201835260008083526020830191909152918101829052600083815260076020526040812054908190036200141357505060408051606081018252600080825282516020818101855282825283015291810182905290939092509050565b6200141e81620012be565b9250925050915091565b600281815481106200143957600080fd5b906000526020600020016000915090508054620014569062002568565b80601f0160208091040260200160405190810160405280929190818152602001828054620014849062002568565b8015620014d55780601f10620014a957610100808354040283529160200191620014d5565b820191906000526020600020905b815481529060010190602001808311620014b757829003601f168201915b505050505081565b600080805b83518110156200155557818482815181106200150257620015026200276d565b6020026020010151620015159062002783565b60408051602081019390935282015260600160405160208183030381529060405280519060200120915080806200154c90620027be565b915050620014e2565b506000908152600d602052604090205460ff1692915050565b6001600160a01b03851660009081526020819052604090205460ff1680620015ff5760405162461bcd60e51b815260206004820152602360248201527f726573706f6e64696e67206174746573746572206973206e6f7420617474657360448201527f74656400000000000000000000000000000000000000000000000000000000006064820152608401620006cd565b8115620016d6576000620016388787866040516020016200162393929190620028fc565b6040516020818303038152906040526200194d565b90506000620016488287620017d5565b9050876001600160a01b0316816001600160a01b031614620016d35760405162461bcd60e51b815260206004820152602c60248201527f63616c63756c61746564206164647265737320616e642061747465737465724960448201527f4420646f6e74206d6174636800000000000000000000000000000000000000006064820152608401620006cd565b50505b5050506001600160a01b039091166000908152602081905260409020805460ff191660011790555050565b6200170b6200175e565b6001600160a01b03811662001750576040517f1e4fbdf700000000000000000000000000000000000000000000000000000000815260006004820152602401620006cd565b6200175b81620018ba565b50565b33620017917f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300546001600160a01b031690565b6001600160a01b03161462001054576040517f118cdaa7000000000000000000000000000000000000000000000000000000008152336004820152602401620006cd565b600080600080620017e786866200198c565b925092509250620017f98282620019dd565b50909150505b92915050565b80356000908152600660205260409020819062001823828262002944565b505060095460009081526007602052604090208135908190556200184960014362002a54565b4060405160200162001865929190918252602082015260400190565b60408051601f1981840301815291815281516020928301206009805460009081526008909452918320558054916200189d83620027be565b9190505550600554816040013511156200175b5760400135600555565b7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300805473ffffffffffffffffffffffffffffffffffffffff1981166001600160a01b03848116918217845560405192169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3505050565b6200194262001af3565b6200175b8162001b5b565b60006200195b825162001b65565b826040516020016200196f92919062002a6a565b604051602081830303815290604052805190602001209050919050565b60008060008351604103620019ca5760208401516040850151606086015160001a620019bb8882858562001c0c565b955095509550505050620019d6565b50508151600091506002905b9250925092565b6000826003811115620019f457620019f462002ac9565b03620019fe575050565b600182600381111562001a155762001a1562002ac9565b0362001a4d576040517ff645eedf00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600282600381111562001a645762001a6462002ac9565b0362001aa0576040517ffce698f700000000000000000000000000000000000000000000000000000000815260048101829052602401620006cd565b600382600381111562001ab75762001ab762002ac9565b0362000531576040517fd78bce0c00000000000000000000000000000000000000000000000000000000815260048101829052602401620006cd565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a005468010000000000000000900460ff1662001054576040517fd7e6bcf800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6200170b62001af3565b6060600062001b748362001ce0565b600101905060008167ffffffffffffffff81111562001b975762001b9762001dd7565b6040519080825280601f01601f19166020018201604052801562001bc2576020820181803683370190505b5090508181016020015b600019017f3031323334353637383961626364656600000000000000000000000000000000600a86061a8153600a850494508462001bcc57509392505050565b600080807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a084111562001c49575060009150600390508262001cd6565b604080516000808252602082018084528a905260ff891692820192909252606081018790526080810186905260019060a0016020604051602081039080840390855afa15801562001c9e573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b03811662001ccc5750600092506001915082905062001cd6565b9250600091508190505b9450945094915050565b6000807a184f03e93ff9f4daa797ed6e38ed64bf6a1f010000000000000000831062001d2a577a184f03e93ff9f4daa797ed6e38ed64bf6a1f010000000000000000830492506040015b6d04ee2d6d415b85acef8100000000831062001d57576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc10000831062001d7657662386f26fc10000830492506010015b6305f5e100831062001d8f576305f5e100830492506008015b612710831062001da457612710830492506004015b6064831062001db7576064830492506002015b600a8310620017ff5760010192915050565b6118ac8062002ae083390190565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff8111828210171562001e195762001e1962001dd7565b604052919050565b600082601f83011262001e3357600080fd5b813567ffffffffffffffff81111562001e505762001e5062001dd7565b62001e65601f8201601f191660200162001ded565b81815284602083860101111562001e7b57600080fd5b816020850160208301376000918101602001919091529392505050565b80356001600160a01b038116811462001eb057600080fd5b919050565b6000806040838503121562001ec957600080fd5b823567ffffffffffffffff81111562001ee157600080fd5b62001eef8582860162001e21565b92505062001f006020840162001e98565b90509250929050565b600082601f83011262001f1b57600080fd5b8135602067ffffffffffffffff8083111562001f3b5762001f3b62001dd7565b8260051b62001f4c83820162001ded565b938452858101830193838101908886111562001f6757600080fd5b84880192505b8583101562001fa85782358481111562001f875760008081fd5b62001f978a87838c010162001e21565b835250918401919084019062001f6d565b98975050505050505050565b60008083601f84011262001fc757600080fd5b50813567ffffffffffffffff81111562001fe057600080fd5b60208301915083602082850101111562001ff957600080fd5b9250929050565b60008060008060008060008060e0898b0312156200201d57600080fd5b883597506020890135965060408901359550606089013567ffffffffffffffff808211156200204b57600080fd5b620020598c838d0162001f09565b965060808b01359150808211156200207057600080fd5b506200207f8b828c0162001fb4565b999c989b5096999598969760a08701359660c0013595509350505050565b60008060008060608587031215620020b457600080fd5b843567ffffffffffffffff80821115620020cd57600080fd5b9086019060608289031215620020e257600080fd5b90945060208601359080821115620020f957600080fd5b620021078883890162001fb4565b909550935060408701359150808211156200212157600080fd5b508501602081880312156200213557600080fd5b939692955090935050565b6000602082840312156200215357600080fd5b5035919050565b6000602082840312156200216d57600080fd5b813567ffffffffffffffff8111156200218557600080fd5b620021938482850162001e21565b949350505050565b600060208284031215620021ae57600080fd5b620021b98262001e98565b9392505050565b60008060008084860360c0811215620021d857600080fd5b6080811215620021e757600080fd5b50849350608085013567ffffffffffffffff808211156200220757600080fd5b818701915087601f8301126200221c57600080fd5b8135818111156200222c57600080fd5b8860208260051b85010111156200224257600080fd5b95986020929092019750949560a00135945092505050565b60005b83811015620022775781810151838201526020016200225d565b50506000910152565b600081518084526200229a8160208601602086016200225a565b601f01601f19169290920160200192915050565b805182526000602082015160606020850152620022cf606085018262002280565b604093840151949093019390935250919050565b828152604060208201526000620021936040830184620022ae565b6000806000806000606086880312156200231757600080fd5b620023228662001e98565b9450602086013567ffffffffffffffff808211156200234057600080fd5b6200234e89838a0162001fb4565b909650945060408801359150808211156200236857600080fd5b50620023778882890162001fb4565b969995985093965092949392505050565b6000602080830181845280855180835260408601915060408160051b870101925083870160005b82811015620023e157603f19888603018452620023ce85835162002280565b94509285019290850190600101620023af565b5092979650505050505050565b8215158152604060208201526000620021936040830184620022ae565b602081526000620021b9602083018462002280565b6000602082840312156200243357600080fd5b813567ffffffffffffffff8111156200244b57600080fd5b620021938482850162001f09565b600080600080600060a086880312156200247257600080fd5b6200247d8662001e98565b94506200248d6020870162001e98565b9350604086013567ffffffffffffffff80821115620024ab57600080fd5b620024b989838a0162001e21565b94506060880135915080821115620024d057600080fd5b50620024df8882890162001e21565b92505060808601358015158114620024f657600080fd5b809150509295509295909350565b600080602083850312156200251857600080fd5b823567ffffffffffffffff8111156200253057600080fd5b6200253e8582860162001fb4565b90969095509350505050565b600082516200255e8184602087016200225a565b9190910192915050565b600181811c908216806200257d57607f821691505b6020821081036200259e57634e487b7160e01b600052602260045260246000fd5b50919050565b601f821115620025f257600081815260208120601f850160051c81016020861015620025cd5750805b601f850160051c820191505b81811015620025ee57828155600101620025d9565b5050505b505050565b815167ffffffffffffffff81111562002614576200261462001dd7565b6200262c8162002625845462002568565b84620025a4565b602080601f8311600181146200266457600084156200264b5750858301515b600019600386901b1c1916600185901b178555620025ee565b600085815260208120601f198616915b82811015620026955788860151825594840194600190910190840162002674565b5085821015620026b45787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b604081526000620026d9604083018562002280565b90506001600160a01b03831660208301529392505050565b600060808201868352602086818501528560408501526080606085015281855180845260a08601915060a08160051b870101935082870160005b828110156200275d57609f198887030184526200274a86835162002280565b955092840192908401906001016200272b565b50939a9950505050505050505050565b634e487b7160e01b600052603260045260246000fd5b805160208083015191908110156200259e5760001960209190910360031b1b16919050565b634e487b7160e01b600052601160045260246000fd5b600060018201620027d357620027d3620027a8565b5060010190565b6000808335601e19843603018112620027f257600080fd5b83018035915067ffffffffffffffff8211156200280e57600080fd5b60200191503681900382131562001ff957600080fd5b6001600160a01b0380620028388362001e98565b168352806200284a6020840162001e98565b1660208401525060408101356040830152606081013567ffffffffffffffff81168082146200287857600080fd5b80606085015250505050565b62002890818662002824565b60c060808201528260c082015260007f07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff841115620028cd57600080fd5b8360051b808660e085013760a0830193909352500160e0019392505050565b60808101620017ff828462002824565b60006bffffffffffffffffffffffff19808660601b168352808560601b166014840152508251620029358160288501602087016200225a565b91909101602801949350505050565b813581556001808201602080850135601e198636030181126200296657600080fd5b8501803567ffffffffffffffff8111156200298057600080fd5b80360383830113156200299257600080fd5b620029aa81620029a3865462002568565b86620025a4565b6000601f821160018114620029e35760008315620029ca57508382018501355b600019600385901b1c1916600184901b17865562002a3f565b600086815260209020601f19841690835b8281101562002a1557868501880135825593870193908901908701620029f4565b508482101562002a355760001960f88660031b161c198785880101351681555b50508683881b0186555b50505050505050604082013560028201555050565b81810381811115620017ff57620017ff620027a8565b7f19457468657265756d205369676e6564204d6573736167653a0a00000000000081526000835162002aa481601a8501602088016200225a565b83519083019062002abd81601a8401602088016200225a565b01601a01949350505050565b634e487b7160e01b600052602160045260246000fdfe608060405234801561001057600080fd5b50338061003757604051631e4fbdf760e01b81526000600482015260240160405180910390fd5b61004081610046565b50610096565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b611807806100a56000396000f3fe6080604052600436106100e15760003560e01c80639730886d1161007f578063b201246f11610059578063b201246f1461030e578063b6aed0cb1461032e578063e138a8d21461034e578063f2fde38b1461036e57610155565b80639730886d1461029557806399a3ad21146102b5578063b1454caa146102d557610155565b8063346633fb116100bb578063346633fb1461022557806336d2da9014610238578063715018a6146102585780638da5cb5b1461026d57610155565b80630fcfbd11146101a25780630fe9188e146101d557806333a88c72146101f557610155565b36610155576040517f346633fb0000000000000000000000000000000000000000000000000000000081523360048201523460248201819052309163346633fb91906044016000604051808303818588803b15801561013f57600080fd5b505af1158015610153573d6000803e3d6000fd5b005b60405162461bcd60e51b815260206004820152600b60248201527f756e737570706f7274656400000000000000000000000000000000000000000060448201526064015b60405180910390fd5b3480156101ae57600080fd5b506101c26101bd366004610f80565b61038e565b6040519081526020015b60405180910390f35b3480156101e157600080fd5b506101536101f0366004610fb5565b610428565b34801561020157600080fd5b50610215610210366004610f80565b61049e565b60405190151581526020016101cc565b610153610233366004610fe3565b6104f1565b34801561024457600080fd5b5061015361025336600461100f565b6105d4565b34801561026457600080fd5b50610153610683565b34801561027957600080fd5b506000546040516001600160a01b0390911681526020016101cc565b3480156102a157600080fd5b506101536102b036600461102c565b610697565b3480156102c157600080fd5b506101536102d0366004610fe3565b6107e9565b3480156102e157600080fd5b506102f56102f03660046110a2565b610899565b60405167ffffffffffffffff90911681526020016101cc565b34801561031a57600080fd5b5061015361032936600461119b565b6108fa565b34801561033a57600080fd5b506101536103493660046111fd565b610afc565b34801561035a57600080fd5b5061015361036936600461121f565b610b98565b34801561037a57600080fd5b5061015361038936600461100f565b610d78565b600080826040516020016103a291906112ce565b60408051601f19818403018152918152815160209283012060008181526001909352912054909150806104215760405162461bcd60e51b815260206004820152602160248201527f54686973206d65737361676520776173206e65766572207375626d69747465646044820152601760f91b6064820152608401610199565b9392505050565b610430610dcf565b600081815260046020526040812054900361048d5760405162461bcd60e51b815260206004820152601a60248201527f537461746520726f6f7420646f6573206e6f742065786973742e0000000000006044820152606401610199565b600090815260046020526040812055565b600080826040516020016104b291906112ce565b60408051601f1981840301815291815281516020928301206000818152600190935291205490915080158015906104e95750428111155b949350505050565b60003411801561050057508034145b6105725760405162461bcd60e51b815260206004820152603060248201527f417474656d7074696e6720746f2073656e642076616c756520776974686f757460448201527f2070726f766964696e67204574686572000000000000000000000000000000006064820152608401610199565b600061057d33610e15565b6040805134815267ffffffffffffffff831660208201529192506001600160a01b0385169133917f50c536ac33a920f00755865b831d17bf4cff0b2e0345f65b16d52bfc004068b6910160405180910390a3505050565b6105dc610dcf565b6000816001600160a01b03164760405160006040518083038185875af1925050503d8060008114610629576040519150601f19603f3d011682016040523d82523d6000602084013e61062e565b606091505b505090508061067f5760405162461bcd60e51b815260206004820152601460248201527f6661696c65642073656e64696e672076616c75650000000000000000000000006044820152606401610199565b5050565b61068b610dcf565b6106956000610e73565b565b61069f610dcf565b60006106ab82426113cf565b90506000836040516020016106c091906112ce565b60408051601f198184030181529181528151602092830120600081815260019093529120549091501561075b5760405162461bcd60e51b815260206004820152602160248201527f4d657373616765207375626d6974746564206d6f7265207468616e206f6e636560448201527f21000000000000000000000000000000000000000000000000000000000000006064820152608401610199565b600081815260016020908152604082208490556002919061077e9087018761100f565b6001600160a01b0316815260208101919091526040016000908120906107aa60808701606088016113e2565b63ffffffff168152602080820192909252604001600090812080546001810182559082529190208591600402016107e182826115b0565b505050505050565b6107f1610dcf565b6000826001600160a01b03168260405160006040518083038185875af1925050503d806000811461083e576040519150601f19603f3d011682016040523d82523d6000602084013e610843565b606091505b50509050806108945760405162461bcd60e51b815260206004820152601460248201527f6661696c65642073656e64696e672076616c75650000000000000000000000006044820152606401610199565b505050565b60006108a433610e15565b9050336001600160a01b03167fb93c37389233beb85a3a726c3f15c2d15533ee74cb602f20f490dfffef7759378288888888886040516108e9969594939291906116ca565b60405180910390a295945050505050565b600081815260046020526040812054900361096a5760405162461bcd60e51b815260206004820152602a60248201527f526f6f74206973206e6f74207075626c6973686564206f6e2074686973206d6560448201526939b9b0b3b290313ab99760b11b6064820152608401610199565b6000818152600460205260409020544210156109d25760405162461bcd60e51b815260206004820152602160248201527f526f6f74206973206e6f7420636f6e736964657265642066696e616c207965746044820152601760f91b6064820152608401610199565b6000846040516020016109e5919061171a565b60408051601f198184030181528282528051602091820120908301829052600160608401527f760000000000000000000000000000000000000000000000000000000000000060808401529082015260a001604051602081830303815290604052805190602001209050610a8384848484604051602001610a6891815260200190565b60405160208183030381529060405280519060200120610ed0565b610af55760405162461bcd60e51b815260206004820152603360248201527f496e76616c696420696e636c7573696f6e2070726f6f6620666f722076616c7560448201527f65207472616e73666572206d6573736167652e000000000000000000000000006064820152608401610199565b5050505050565b610b04610dcf565b60008281526004602052604090205415610b865760405162461bcd60e51b815260206004820152602560248201527f526f6f7420616c726561647920616464656420746f20746865206d657373616760448201527f65206275730000000000000000000000000000000000000000000000000000006064820152608401610199565b60009182526004602052604090912055565b6000818152600460205260408120549003610c085760405162461bcd60e51b815260206004820152602a60248201527f526f6f74206973206e6f74207075626c6973686564206f6e2074686973206d6560448201526939b9b0b3b290313ab99760b11b6064820152608401610199565b600081815260046020526040902054421015610c705760405162461bcd60e51b815260206004820152602160248201527f526f6f74206973206e6f7420636f6e736964657265642066696e616c207965746044820152601760f91b6064820152608401610199565b600084604051602001610c8391906112ce565b60408051601f198184030181528282528051602091820120908301829052600160608401527f6d0000000000000000000000000000000000000000000000000000000000000060808401529082015260a001604051602081830303815290604052805190602001209050610d0684848484604051602001610a6891815260200190565b610af55760405162461bcd60e51b815260206004820152603060248201527f496e76616c696420696e636c7573696f6e2070726f6f6620666f722063726f7360448201527f7320636861696e206d6573736167652e000000000000000000000000000000006064820152608401610199565b610d80610dcf565b6001600160a01b038116610dc3576040517f1e4fbdf700000000000000000000000000000000000000000000000000000000815260006004820152602401610199565b610dcc81610e73565b50565b6000546001600160a01b03163314610695576040517f118cdaa7000000000000000000000000000000000000000000000000000000008152336004820152602401610199565b6001600160a01b0381166000908152600360205260408120805467ffffffffffffffff169160019190610e48838561177a565b92506101000a81548167ffffffffffffffff021916908367ffffffffffffffff160217905550919050565b600080546001600160a01b0383811673ffffffffffffffffffffffffffffffffffffffff19831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b600082610ede868685610ee8565b1495945050505050565b600081815b84811015610f2b57610f1782878784818110610f0b57610f0b6117a2565b90506020020135610f34565b915080610f23816117b8565b915050610eed565b50949350505050565b6000818310610f50576000828152602084905260409020610f5f565b60008381526020839052604090205b90505b92915050565b600060c08284031215610f7a57600080fd5b50919050565b600060208284031215610f9257600080fd5b813567ffffffffffffffff811115610fa957600080fd5b6104e984828501610f68565b600060208284031215610fc757600080fd5b5035919050565b6001600160a01b0381168114610dcc57600080fd5b60008060408385031215610ff657600080fd5b823561100181610fce565b946020939093013593505050565b60006020828403121561102157600080fd5b813561042181610fce565b6000806040838503121561103f57600080fd5b823567ffffffffffffffff81111561105657600080fd5b61106285828601610f68565b95602094909401359450505050565b63ffffffff81168114610dcc57600080fd5b60ff81168114610dcc57600080fd5b803561109d81611083565b919050565b6000806000806000608086880312156110ba57600080fd5b85356110c581611071565b945060208601356110d581611071565b9350604086013567ffffffffffffffff808211156110f257600080fd5b818801915088601f83011261110657600080fd5b81358181111561111557600080fd5b89602082850101111561112757600080fd5b602083019550809450505050606086013561114181611083565b809150509295509295909350565b60008083601f84011261116157600080fd5b50813567ffffffffffffffff81111561117957600080fd5b6020830191508360208260051b850101111561119457600080fd5b9250929050565b60008060008084860360c08112156111b257600080fd5b60808112156111c057600080fd5b50849350608085013567ffffffffffffffff8111156111de57600080fd5b6111ea8782880161114f565b9598909750949560a00135949350505050565b6000806040838503121561121057600080fd5b50508035926020909101359150565b6000806000806060858703121561123557600080fd5b843567ffffffffffffffff8082111561124d57600080fd5b61125988838901610f68565b9550602087013591508082111561126f57600080fd5b5061127c8782880161114f565b9598909750949560400135949350505050565b67ffffffffffffffff81168114610dcc57600080fd5b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b60208152600082356112df81610fce565b6001600160a01b03811660208401525060208301356112fd8161128f565b67ffffffffffffffff80821660408501526040850135915061131e82611071565b63ffffffff80831660608601526060860135925061133b83611071565b80831660808601525060808501359150601e1985360301821261135d57600080fd5b602091850191820191358181111561137457600080fd5b80360383131561138357600080fd5b60c060a086015261139860e0860182856112a5565b925050506113a860a08501611092565b60ff811660c0850152509392505050565b634e487b7160e01b600052601160045260246000fd5b80820180821115610f6257610f626113b9565b6000602082840312156113f457600080fd5b813561042181611071565b60008135610f6281611071565b6000808335601e1984360301811261142357600080fd5b83018035915067ffffffffffffffff82111561143e57600080fd5b60200191503681900382131561119457600080fd5b634e487b7160e01b600052604160045260246000fd5b600181811c9082168061147d57607f821691505b602082108103610f7a57634e487b7160e01b600052602260045260246000fd5b601f82111561089457600081815260208120601f850160051c810160208610156114c45750805b601f850160051c820191505b818110156107e1578281556001016114d0565b67ffffffffffffffff8311156114fb576114fb611453565b61150f836115098354611469565b8361149d565b6000601f841160018114611543576000851561152b5750838201355b600019600387901b1c1916600186901b178355610af5565b600083815260209020601f19861690835b828110156115745786850135825560209485019460019092019101611554565b50868210156115915760001960f88860031b161c19848701351681555b505060018560011b0183555050505050565b60008135610f6281611083565b81356115bb81610fce565b6001600160a01b038116905081548173ffffffffffffffffffffffffffffffffffffffff19821617835560208401356115f38161128f565b7bffffffffffffffff00000000000000000000000000000000000000008160a01b1690507fffffffff000000000000000000000000000000000000000000000000000000008184828516171785556040860135925061165183611071565b921760e09190911b90911617815561168961166e606084016113ff565b6001830163ffffffff821663ffffffff198254161781555050565b611696608083018361140c565b6116a48183600286016114e3565b505061067f6116b560a084016115a3565b6003830160ff821660ff198254161781555050565b67ffffffffffffffff87168152600063ffffffff808816602084015280871660408401525060a0606083015261170460a0830185876112a5565b905060ff83166080830152979650505050505050565b60808101823561172981610fce565b6001600160a01b03908116835260208401359061174582610fce565b1660208301526040838101359083015260608301356117638161128f565b67ffffffffffffffff811660608401525092915050565b67ffffffffffffffff81811683821601908082111561179b5761179b6113b9565b5092915050565b634e487b7160e01b600052603260045260246000fd5b6000600182016117ca576117ca6113b9565b506001019056fea2646970667358221220a449a197632e1117b118ced8f7cf97a1ae44b160775ee146e59b50cbc1b8dcaa64736f6c63430008140033a26469706673582212202db2c4edc3c70178755866034f9c9976755cd4234b737f234daf445437ad909f64736f6c63430008140033", } // ManagementContractABI is the input ABI used to generate the binding from. @@ -514,6 +514,68 @@ func (_ManagementContract *ManagementContractCallerSession) ImportantContractKey return _ManagementContract.Contract.ImportantContractKeys(&_ManagementContract.CallOpts, arg0) } +// IsBundleAvailable is a free data retrieval call binding the contract method 0xa4ab2faa. +// +// Solidity: function isBundleAvailable(bytes[] crossChainHashes) view returns(bool) +func (_ManagementContract *ManagementContractCaller) IsBundleAvailable(opts *bind.CallOpts, crossChainHashes [][]byte) (bool, error) { + var out []interface{} + err := _ManagementContract.contract.Call(opts, &out, "isBundleAvailable", crossChainHashes) + + if err != nil { + return *new(bool), err + } + + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + + return out0, err + +} + +// IsBundleAvailable is a free data retrieval call binding the contract method 0xa4ab2faa. +// +// Solidity: function isBundleAvailable(bytes[] crossChainHashes) view returns(bool) +func (_ManagementContract *ManagementContractSession) IsBundleAvailable(crossChainHashes [][]byte) (bool, error) { + return _ManagementContract.Contract.IsBundleAvailable(&_ManagementContract.CallOpts, crossChainHashes) +} + +// IsBundleAvailable is a free data retrieval call binding the contract method 0xa4ab2faa. +// +// Solidity: function isBundleAvailable(bytes[] crossChainHashes) view returns(bool) +func (_ManagementContract *ManagementContractCallerSession) IsBundleAvailable(crossChainHashes [][]byte) (bool, error) { + return _ManagementContract.Contract.IsBundleAvailable(&_ManagementContract.CallOpts, crossChainHashes) +} + +// IsBundleSaved is a free data retrieval call binding the contract method 0x84154826. +// +// Solidity: function isBundleSaved(bytes32 ) view returns(bool) +func (_ManagementContract *ManagementContractCaller) IsBundleSaved(opts *bind.CallOpts, arg0 [32]byte) (bool, error) { + var out []interface{} + err := _ManagementContract.contract.Call(opts, &out, "isBundleSaved", arg0) + + if err != nil { + return *new(bool), err + } + + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + + return out0, err + +} + +// IsBundleSaved is a free data retrieval call binding the contract method 0x84154826. +// +// Solidity: function isBundleSaved(bytes32 ) view returns(bool) +func (_ManagementContract *ManagementContractSession) IsBundleSaved(arg0 [32]byte) (bool, error) { + return _ManagementContract.Contract.IsBundleSaved(&_ManagementContract.CallOpts, arg0) +} + +// IsBundleSaved is a free data retrieval call binding the contract method 0x84154826. +// +// Solidity: function isBundleSaved(bytes32 ) view returns(bool) +func (_ManagementContract *ManagementContractCallerSession) IsBundleSaved(arg0 [32]byte) (bool, error) { + return _ManagementContract.Contract.IsBundleSaved(&_ManagementContract.CallOpts, arg0) +} + // IsWithdrawalSpent is a free data retrieval call binding the contract method 0x2f0cb9e3. // // Solidity: function isWithdrawalSpent(bytes32 ) view returns(bool) diff --git a/contracts/src/management/ManagementContract.sol b/contracts/src/management/ManagementContract.sol index f86bb6fe8f..0c7a7df677 100644 --- a/contracts/src/management/ManagementContract.sol +++ b/contracts/src/management/ManagementContract.sol @@ -55,6 +55,7 @@ contract ManagementContract is Initializable, OwnableUpgradeable { MessageBus.IMessageBus public messageBus; MerkleTreeMessageBus.IMerkleTreeMessageBus public merkleMessageBus; mapping(bytes32 =>bool) public isWithdrawalSpent; + mapping(bytes32 =>bool) public isBundleSaved; bytes32 public lastBatchHash; @@ -102,6 +103,16 @@ contract ManagementContract is Initializable, OwnableUpgradeable { } } + function isBundleAvailable(bytes[] memory crossChainHashes) public view returns (bool) { + bytes32 bundleHash = bytes32(0); + + for(uint256 i = 0; i < crossChainHashes.length; i++) { + bundleHash = keccak256(abi.encode(bundleHash, bytes32(crossChainHashes[i]))); + } + + return isBundleSaved[bundleHash]; + } + function addCrossChainMessagesRoot(bytes32 _lastBatchHash, bytes32 blockHash, uint256 blockNum, bytes[] memory crossChainHashes, bytes calldata signature, uint256 rollupNumber, bytes32 forkID) external { /* if (block.number > blockNum + 255) { revert("Block binding too old"); @@ -120,9 +131,14 @@ contract ManagementContract is Initializable, OwnableUpgradeable { lastBatchHash = _lastBatchHash; + bytes32 bundleHash = bytes32(0); + for(uint256 i = 0; i < crossChainHashes.length; i++) { merkleMessageBus.addStateRoot(bytes32(crossChainHashes[i]), block.timestamp); //todo: change the activation time. + bundleHash = keccak256(abi.encode(bundleHash, bytes32(crossChainHashes[i]))); } + + isBundleSaved[bundleHash] = true; } // TODO: ensure challenge period is added on top of block timestamp. diff --git a/go/enclave/nodetype/common.go b/go/enclave/nodetype/common.go index a0c083ac4d..bff4a94447 100644 --- a/go/enclave/nodetype/common.go +++ b/go/enclave/nodetype/common.go @@ -20,7 +20,13 @@ func ExportCrossChainData(ctx context.Context, storage storage.Storage, fromSeqN return nil, errutil.ErrCrossChainBundleNoBatches } - blockHash := canonicalBatches[len(canonicalBatches)-1].L1Proof + //todo - siliev - all those fetches need to be atomic + header, err := storage.FetchHeadBatchHeader(ctx) + if err != nil { + return nil, err + } + + blockHash := header.L1Proof batchHash := canonicalBatches[len(canonicalBatches)-1].Hash() block, err := storage.FetchBlock(ctx, blockHash) diff --git a/go/host/l1/statemachine.go b/go/host/l1/statemachine.go index 84b9f5cc2a..f3ac218eda 100644 --- a/go/host/l1/statemachine.go +++ b/go/host/l1/statemachine.go @@ -125,6 +125,16 @@ func (c *crossChainStateMachine) PublishNextBundle() error { return err } + alreadyPublished, err := c.IsBundleAlreadyPublished(bundle) + if err != nil { + return err + } + + if alreadyPublished { + c.currentRollup++ + return nil + } + err = c.publisher.PublishCrossChainBundle(bundle, big.NewInt(0).SetUint64(data.Number), data.ForkUID) if err != nil { return err @@ -136,6 +146,15 @@ func (c *crossChainStateMachine) PublishNextBundle() error { return nil } +func (c *crossChainStateMachine) IsBundleAlreadyPublished(bundle *common.ExtCrossChainBundle) (bool, error) { + managementContract, err := ManagementContract.NewManagementContract(*c.mgmtContractLib.GetContractAddr(), c.ethClient.EthClient()) + if err != nil { + return false, err + } + + return managementContract.IsBundleAvailable(&bind.CallOpts{}, bundle.CrossChainRootHashes) +} + // Synchronize - checks if there are any new rollups or forks and moves the tracking needle to the latest common ancestor. func (c *crossChainStateMachine) Synchronize() error { forkUID, _, _, err := c.publisher.GetBundleRangeFromManagementContract(big.NewInt(0).SetUint64(c.latestRollup.Number), c.latestRollup.ForkUID)