From f1b6be404af4b4550645df95a89a75e7a57f50d8 Mon Sep 17 00:00:00 2001 From: Matt <98158711+BedrockSquirrel@users.noreply.github.com> Date: Tue, 7 May 2024 10:07:09 +0100 Subject: [PATCH] Mgmt contract: events for changes to enclave sequencer status (#1891) --- .../ManagementContract/ManagementContract.go | 272 +++++++++++++++++- .../src/management/ManagementContract.sol | 6 +- 2 files changed, 275 insertions(+), 3 deletions(-) diff --git a/contracts/generated/ManagementContract/ManagementContract.go b/contracts/generated/ManagementContract/ManagementContract.go index ee94ead234..e5cd24c602 100644 --- a/contracts/generated/ManagementContract/ManagementContract.go +++ b/contracts/generated/ManagementContract/ManagementContract.go @@ -53,8 +53,8 @@ type StructsMetaRollup 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\"},{\"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\":\"crossChainData\",\"type\":\"tuple\"}],\"name\":\"AddRollup\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_addr\",\"type\":\"address\"}],\"name\":\"Attested\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"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\":\"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\":\"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\":[],\"name\":\"lastBatchSeqNo\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"messageBus\",\"outputs\":[{\"internalType\":\"contractIMessageBus\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", - Bin: "0x608060405234801561001057600080fd5b5061001a3361001f565b610090565b7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c19930080546001600160a01b031981166001600160a01b03848116918217845560405192169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3505050565b6131bd8061009f6000396000f3fe60806040523480156200001157600080fd5b5060043610620001955760003560e01c80637281099611620000e9578063a1a227fa1162000097578063db5d91b1116200006e578063db5d91b114620003ad578063e34fbfc814620003dc578063f2fde38b14620003f157600080fd5b8063a1a227fa1462000371578063a52f433c1462000385578063d4fab887146200039657600080fd5b80638236a7ba11620000cc5780638236a7ba14620002f35780638da5cb5b146200031a57806398077e86146200034b57600080fd5b80637281099614620002df5780638129fc1c14620002e957600080fd5b80634766573811620001475780636a30d26c116200012a5780636a30d26c14620002a55780636b9707d614620002be578063715018a614620002d557600080fd5b806347665738146200027757806368e10383146200028e57600080fd5b80633e60a22f116200017c5780633e60a22f14620001ca57806343348b2f146200021e578063440c953b146200025e57600080fd5b806303e72e48146200019a5780632c77c81f14620001b3575b600080fd5b620001b1620001ab366004620016d3565b62000408565b005b620001b1620001c436600462001773565b6200051b565b62000201620001db36600462001816565b80516020818301810180516003825292820191909301209152546001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b6200024d6200022f36600462001857565b6001600160a01b031660009081526020819052604090205460ff1690565b604051901515815260200162000215565b6200026860055481565b60405190815260200162000215565b620001b16200028836600462001857565b62000665565b620001b16200029f3660046200187c565b62000700565b620002af620007c4565b6040516200021591906200195a565b620001b1620002cf36600462001857565b620008a7565b620001b16200093c565b620001b162000954565b620001b1620009d8565b6200030a62000304366004620019c0565b62000bab565b60405162000215929190620019da565b7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300546001600160a01b031662000201565b620003626200035c366004620019c0565b62000c9b565b60405162000215919062001a20565b60075462000201906001600160a01b031681565b600454610100900460ff166200024d565b620001b1620003a736600462001a35565b62000d50565b6200024d620003be36600462001857565b6001600160a01b031660009081526001602052604090205460ff1690565b620001b1620003ed36600462001ae0565b5050565b620001b16200040236600462001857565b62000ee3565b6200041262000f40565b60006001600160a01b03166003836040516200042f919062001b26565b908152604051908190036020019020546001600160a01b0316036200048e57600280546001810182556000919091527f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace016200048c838262001bd2565b505b80600383604051620004a1919062001b26565b90815260405190819003602001812080546001600160a01b039390931673ffffffffffffffffffffffffffffffffffffffff19909316929092179091557f17b2f9f5748931099ffee882b5b64f4a560b5c55da9b4f4e396dae3bb9f98cb5906200050f908490849062001c9f565b60405180910390a15050565b60006200056d853562000532602088018862001ccc565b8080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525062000fb792505050565b6001600160a01b03811660009081526020819052604090205490915060ff16620005de5760405162461bcd60e51b815260206004820152601660248201527f656e636c6176654944206e6f742061747465737465640000000000000000000060448201526064015b60405180910390fd5b6001600160a01b03811660009081526001602052604090205460ff16620006485760405162461bcd60e51b815260206004820152601960248201527f656e636c6176654944206e6f7420612073657175656e636572000000000000006044820152606401620005d5565b620006538562000fe5565b6200065e826200101d565b5050505050565b6200066f62000f40565b6001600160a01b03811660009081526020819052604090205460ff16620006d95760405162461bcd60e51b815260206004820152601660248201527f656e636c6176654944206e6f74206174746573746564000000000000000000006044820152606401620005d5565b6001600160a01b03166000908152600160208190526040909120805460ff19169091179055565b60045460ff16156200077b5760405162461bcd60e51b815260206004820152602260248201527f6e6574776f726b2073656372657420616c726561647920696e697469616c697a60448201527f65640000000000000000000000000000000000000000000000000000000000006064820152608401620005d5565b50506004805460ff1990811660019081179092556001600160a01b0390941660009081526020818152604080832080548816851790559083905290208054909416179092555050565b60606002805480602002602001604051908101604052809291908181526020016000905b828210156200089e5783829060005260206000200180546200080a9062001b44565b80601f0160208091040260200160405190810160405280929190818152602001828054620008389062001b44565b8015620008895780601f106200085d5761010080835404028352916020019162000889565b820191906000526020600020905b8154815290600101906020018083116200086b57829003601f168201915b505050505081526020019060010190620007e8565b50505050905090565b620008b162000f40565b6001600160a01b03811660009081526001602052604090205460ff166200091b5760405162461bcd60e51b815260206004820152601960248201527f656e636c6176654944206e6f7420612073657175656e636572000000000000006044820152606401620005d5565b6001600160a01b03166000908152600160205260409020805460ff19169055565b6200094662000f40565b620009526000620010ed565b565b6200095e62000f40565b6007546040517f36d2da900000000000000000000000000000000000000000000000000000000081523360048201526001600160a01b03909116906336d2da9090602401600060405180830381600087803b158015620009bd57600080fd5b505af1158015620009d2573d6000803e3d6000fd5b50505050565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00805468010000000000000000810460ff16159067ffffffffffffffff1660008115801562000a245750825b905060008267ffffffffffffffff16600114801562000a425750303b155b90508115801562000a51575080155b1562000a89576040517ff92ee8a900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b845467ffffffffffffffff19166001178555831562000abe57845468ff00000000000000001916680100000000000000001785555b62000ac9336200116b565b600060055560405162000adc90620015fd565b604051809103906000f08015801562000af9573d6000803e3d6000fd5b506007805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b039290921691821790556040519081527fbd726cf82ac9c3260b1495107182e336e0654b25c10915648c0cc15b2bb72cbf9060200160405180910390a183156200065e57845468ff000000000000000019168555604051600181527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15050505050565b60408051606080820183526000808352602080840183905283850182905285825260068152848220855193840190955284548352600185018054929586949390928401919062000bfb9062001b44565b80601f016020809104026020016040519081016040528092919081815260200182805462000c299062001b44565b801562000c7a5780601f1062000c4e5761010080835404028352916020019162000c7a565b820191906000526020600020905b81548152906001019060200180831162000c5c57829003601f168201915b50505091835250506002919091015460209091015280519094149492505050565b6002818154811062000cac57600080fd5b90600052602060002001600091509050805462000cc99062001b44565b80601f016020809104026020016040519081016040528092919081815260200182805462000cf79062001b44565b801562000d485780601f1062000d1c5761010080835404028352916020019162000d48565b820191906000526020600020905b81548152906001019060200180831162000d2a57829003601f168201915b505050505081565b6001600160a01b03851660009081526020819052604090205460ff168062000de15760405162461bcd60e51b815260206004820152602360248201527f726573706f6e64696e67206174746573746572206973206e6f7420617474657360448201527f74656400000000000000000000000000000000000000000000000000000000006064820152608401620005d5565b811562000eb857600062000e1a87878660405160200162000e059392919062001d16565b60405160208183030381529060405262001180565b9050600062000e2a828762000fb7565b9050876001600160a01b0316816001600160a01b03161462000eb55760405162461bcd60e51b815260206004820152602c60248201527f63616c63756c61746564206164647265737320616e642061747465737465724960448201527f4420646f6e74206d6174636800000000000000000000000000000000000000006064820152608401620005d5565b50505b5050506001600160a01b039091166000908152602081905260409020805460ff191660011790555050565b62000eed62000f40565b6001600160a01b03811662000f32576040517f1e4fbdf700000000000000000000000000000000000000000000000000000000815260006004820152602401620005d5565b62000f3d81620010ed565b50565b3362000f737f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300546001600160a01b031690565b6001600160a01b03161462000952576040517f118cdaa7000000000000000000000000000000000000000000000000000000008152336004820152602401620005d5565b60008060008062000fc98686620011bf565b92509250925062000fdb828262001210565b5090949350505050565b80356000908152600660205260409020819062001003828262001d5e565b50506005546040820135111562000f3d5760400135600555565b60006200102b828062001e6e565b9050905060005b81811015620010e8576007546001600160a01b0316639730886d62001058858062001e6e565b848181106200106b576200106b62001ebb565b90506020028101906200107f919062001ed1565b60016040518363ffffffff1660e01b8152600401620010a092919062001f81565b600060405180830381600087803b158015620010bb57600080fd5b505af1158015620010d0573d6000803e3d6000fd5b5050505080620010e09062002043565b905062001032565b505050565b7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300805473ffffffffffffffffffffffffffffffffffffffff1981166001600160a01b03848116918217845560405192169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3505050565b6200117562001326565b62000f3d816200138e565b60006200118e825162001398565b82604051602001620011a29291906200206b565b604051602081830303815290604052805190602001209050919050565b60008060008351604103620011fd5760208401516040850151606086015160001a620011ee888285856200143f565b95509550955050505062001209565b50508151600091506002905b9250925092565b6000826003811115620012275762001227620020ca565b0362001231575050565b6001826003811115620012485762001248620020ca565b0362001280576040517ff645eedf00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6002826003811115620012975762001297620020ca565b03620012d3576040517ffce698f700000000000000000000000000000000000000000000000000000000815260048101829052602401620005d5565b6003826003811115620012ea57620012ea620020ca565b03620003ed576040517fd78bce0c00000000000000000000000000000000000000000000000000000000815260048101829052602401620005d5565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a005468010000000000000000900460ff1662000952576040517fd7e6bcf800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b62000eed62001326565b60606000620013a78362001513565b600101905060008167ffffffffffffffff811115620013ca57620013ca6200160b565b6040519080825280601f01601f191660200182016040528015620013f5576020820181803683370190505b5090508181016020015b600019017f3031323334353637383961626364656600000000000000000000000000000000600a86061a8153600a8504945084620013ff57509392505050565b600080807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08411156200147c575060009150600390508262001509565b604080516000808252602082018084528a905260ff891692820192909252606081018790526080810186905260019060a0016020604051602081039080840390855afa158015620014d1573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116620014ff5750600092506001915082905062001509565b9250600091508190505b9450945094915050565b6000807a184f03e93ff9f4daa797ed6e38ed64bf6a1f01000000000000000083106200155d577a184f03e93ff9f4daa797ed6e38ed64bf6a1f010000000000000000830492506040015b6d04ee2d6d415b85acef810000000083106200158a576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc100008310620015a957662386f26fc10000830492506010015b6305f5e1008310620015c2576305f5e100830492506008015b6127108310620015d757612710830492506004015b60648310620015ea576064830492506002015b600a8310620015f7576001015b92915050565b6110a780620020e183390190565b634e487b7160e01b600052604160045260246000fd5b600082601f8301126200163357600080fd5b813567ffffffffffffffff808211156200165157620016516200160b565b604051601f8301601f19908116603f011681019082821181831017156200167c576200167c6200160b565b816040528381528660208588010111156200169657600080fd5b836020870160208301376000602085830101528094505050505092915050565b80356001600160a01b0381168114620016ce57600080fd5b919050565b60008060408385031215620016e757600080fd5b823567ffffffffffffffff811115620016ff57600080fd5b6200170d8582860162001621565b9250506200171e60208401620016b6565b90509250929050565b60008083601f8401126200173a57600080fd5b50813567ffffffffffffffff8111156200175357600080fd5b6020830191508360208285010111156200176c57600080fd5b9250929050565b600080600080606085870312156200178a57600080fd5b843567ffffffffffffffff80821115620017a357600080fd5b9086019060608289031215620017b857600080fd5b90945060208601359080821115620017cf57600080fd5b620017dd8883890162001727565b90955093506040870135915080821115620017f757600080fd5b508501602081880312156200180b57600080fd5b939692955090935050565b6000602082840312156200182957600080fd5b813567ffffffffffffffff8111156200184157600080fd5b6200184f8482850162001621565b949350505050565b6000602082840312156200186a57600080fd5b6200187582620016b6565b9392505050565b6000806000806000606086880312156200189557600080fd5b620018a086620016b6565b9450602086013567ffffffffffffffff80821115620018be57600080fd5b620018cc89838a0162001727565b90965094506040880135915080821115620018e657600080fd5b50620018f58882890162001727565b969995985093965092949392505050565b60005b838110156200192357818101518382015260200162001909565b50506000910152565b600081518084526200194681602086016020860162001906565b601f01601f19169290920160200192915050565b6000602080830181845280855180835260408601915060408160051b870101925083870160005b82811015620019b357603f19888603018452620019a08583516200192c565b9450928501929085019060010162001981565b5092979650505050505050565b600060208284031215620019d357600080fd5b5035919050565b821515815260406020820152815160408201526000602083015160608084015262001a0960a08401826200192c565b905060408401516080840152809150509392505050565b6020815260006200187560208301846200192c565b600080600080600060a0868803121562001a4e57600080fd5b62001a5986620016b6565b945062001a6960208701620016b6565b9350604086013567ffffffffffffffff8082111562001a8757600080fd5b62001a9589838a0162001621565b9450606088013591508082111562001aac57600080fd5b5062001abb8882890162001621565b9250506080860135801515811462001ad257600080fd5b809150509295509295909350565b6000806020838503121562001af457600080fd5b823567ffffffffffffffff81111562001b0c57600080fd5b62001b1a8582860162001727565b90969095509350505050565b6000825162001b3a81846020870162001906565b9190910192915050565b600181811c9082168062001b5957607f821691505b60208210810362001b7a57634e487b7160e01b600052602260045260246000fd5b50919050565b601f821115620010e857600081815260208120601f850160051c8101602086101562001ba95750805b601f850160051c820191505b8181101562001bca5782815560010162001bb5565b505050505050565b815167ffffffffffffffff81111562001bef5762001bef6200160b565b62001c078162001c00845462001b44565b8462001b80565b602080601f83116001811462001c3f576000841562001c265750858301515b600019600386901b1c1916600185901b17855562001bca565b600085815260208120601f198616915b8281101562001c705788860151825594840194600190910190840162001c4f565b508582101562001c8f5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b60408152600062001cb460408301856200192c565b90506001600160a01b03831660208301529392505050565b6000808335601e1984360301811262001ce457600080fd5b83018035915067ffffffffffffffff82111562001d0057600080fd5b6020019150368190038213156200176c57600080fd5b60006bffffffffffffffffffffffff19808660601b168352808560601b16601484015250825162001d4f81602885016020870162001906565b91909101602801949350505050565b813581556001808201602080850135601e1986360301811262001d8057600080fd5b8501803567ffffffffffffffff81111562001d9a57600080fd5b803603838301131562001dac57600080fd5b62001dc48162001dbd865462001b44565b8662001b80565b6000601f82116001811462001dfd576000831562001de457508382018501355b600019600385901b1c1916600184901b17865562001e59565b600086815260209020601f19841690835b8281101562001e2f5786850188013582559387019390890190870162001e0e565b508482101562001e4f5760001960f88660031b161c198785880101351681555b50508683881b0186555b50505050505050604082013560028201555050565b6000808335601e1984360301811262001e8657600080fd5b83018035915067ffffffffffffffff82111562001ea257600080fd5b6020019150600581901b36038213156200176c57600080fd5b634e487b7160e01b600052603260045260246000fd5b6000823560be1983360301811262001b3a57600080fd5b803563ffffffff81168114620016ce57600080fd5b6000808335601e1984360301811262001f1557600080fd5b830160208101925035905067ffffffffffffffff81111562001f3657600080fd5b8036038213156200176c57600080fd5b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b803560ff81168114620016ce57600080fd5b604081526001600160a01b0362001f9884620016b6565b1660408201526000602084013567ffffffffffffffff811680821462001fbd57600080fd5b60608401525063ffffffff62001fd66040860162001ee8565b16608083015262001fea6060850162001ee8565b63ffffffff1660a083015262002004608085018562001efd565b60c0808501526200201b6101008501828462001f46565b9150506200202c60a0860162001f6f565b60ff1660e084015260209092019290925292915050565b6000600182016200206457634e487b7160e01b600052601160045260246000fd5b5060010190565b7f19457468657265756d205369676e6564204d6573736167653a0a000000000000815260008351620020a581601a85016020880162001906565b835190830190620020be81601a84016020880162001906565b01601a01949350505050565b634e487b7160e01b600052602160045260246000fdfe608060405234801561001057600080fd5b50338061003757604051631e4fbdf760e01b81526000600482015260240160405180910390fd5b61004081610046565b50610096565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b611002806100a56000396000f3fe6080604052600436106100b55760003560e01c80638da5cb5b1161006957806399a3ad211161004e57806399a3ad2114610269578063b1454caa14610289578063f2fde38b146102c257610129565b80638da5cb5b146102215780639730886d1461024957610129565b8063346633fb1161009a578063346633fb146101d957806336d2da90146101ec578063715018a61461020c57610129565b80630fcfbd111461017657806333a88c72146101a957610129565b36610129576040517f346633fb0000000000000000000000000000000000000000000000000000000081523360048201523460248201819052309163346633fb91906044016000604051808303818588803b15801561011357600080fd5b505af1158015610127573d6000803e3d6000fd5b005b60405162461bcd60e51b815260206004820152600b60248201527f756e737570706f7274656400000000000000000000000000000000000000000060448201526064015b60405180910390fd5b34801561018257600080fd5b50610196610191366004610945565b6102e2565b6040519081526020015b60405180910390f35b3480156101b557600080fd5b506101c96101c4366004610945565b610398565b60405190151581526020016101a0565b6101276101e736600461098f565b6103eb565b3480156101f857600080fd5b506101276102073660046109bb565b6104b7565b34801561021857600080fd5b50610127610566565b34801561022d57600080fd5b506000546040516001600160a01b0390911681526020016101a0565b34801561025557600080fd5b506101276102643660046109d8565b61057a565b34801561027557600080fd5b5061012761028436600461098f565b6106cc565b34801561029557600080fd5b506102a96102a4366004610a4e565b61077c565b60405167ffffffffffffffff90911681526020016101a0565b3480156102ce57600080fd5b506101276102dd3660046109bb565b6107d5565b600080826040516020016102f69190610b3a565b60408051601f19818403018152918152815160209283012060008181526001909352912054909150806103915760405162461bcd60e51b815260206004820152602160248201527f54686973206d65737361676520776173206e65766572207375626d697474656460448201527f2e00000000000000000000000000000000000000000000000000000000000000606482015260840161016d565b9392505050565b600080826040516020016103ac9190610b3a565b60408051601f1981840301815291815281516020928301206000818152600190935291205490915080158015906103e35750428111155b949350505050565b6000341180156103fa57508034145b61046c5760405162461bcd60e51b815260206004820152603060248201527f417474656d7074696e6720746f2073656e642076616c756520776974686f757460448201527f2070726f766964696e6720457468657200000000000000000000000000000000606482015260840161016d565b604080513381526001600160a01b0384166020820152348183015290517ff1365f826a788d6c1a955db0eed5ba8642674219c4771f8c65918617511a15609181900360600190a15050565b6104bf61082c565b6000816001600160a01b03164760405160006040518083038185875af1925050503d806000811461050c576040519150601f19603f3d011682016040523d82523d6000602084013e610511565b606091505b50509050806105625760405162461bcd60e51b815260206004820152601460248201527f6661696c65642073656e64696e672076616c7565000000000000000000000000604482015260640161016d565b5050565b61056e61082c565b6105786000610872565b565b61058261082c565b600061058e8242610c3b565b90506000836040516020016105a39190610b3a565b60408051601f198184030181529181528151602092830120600081815260019093529120549091501561063e5760405162461bcd60e51b815260206004820152602160248201527f4d657373616765207375626d6974746564206d6f7265207468616e206f6e636560448201527f2100000000000000000000000000000000000000000000000000000000000000606482015260840161016d565b6000818152600160209081526040822084905560029190610661908701876109bb565b6001600160a01b03168152602081019190915260400160009081209061068d6080870160608801610c54565b63ffffffff168152602080820192909252604001600090812080546001810182559082529190208591600402016106c48282610e2a565b505050505050565b6106d461082c565b6000826001600160a01b03168260405160006040518083038185875af1925050503d8060008114610721576040519150601f19603f3d011682016040523d82523d6000602084013e610726565b606091505b50509050806107775760405162461bcd60e51b815260206004820152601460248201527f6661696c65642073656e64696e672076616c7565000000000000000000000000604482015260640161016d565b505050565b6000610787336108cf565b90507fb93c37389233beb85a3a726c3f15c2d15533ee74cb602f20f490dfffef775937338288888888886040516107c49796959493929190610f44565b60405180910390a195945050505050565b6107dd61082c565b6001600160a01b038116610820576040517f1e4fbdf70000000000000000000000000000000000000000000000000000000081526000600482015260240161016d565b61082981610872565b50565b6000546001600160a01b03163314610578576040517f118cdaa700000000000000000000000000000000000000000000000000000000815233600482015260240161016d565b600080546001600160a01b0383811673ffffffffffffffffffffffffffffffffffffffff19831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6001600160a01b0381166000908152600360205260408120805467ffffffffffffffff1691600191906109028385610fa4565b92506101000a81548167ffffffffffffffff021916908367ffffffffffffffff160217905550919050565b600060c0828403121561093f57600080fd5b50919050565b60006020828403121561095757600080fd5b813567ffffffffffffffff81111561096e57600080fd5b6103e38482850161092d565b6001600160a01b038116811461082957600080fd5b600080604083850312156109a257600080fd5b82356109ad8161097a565b946020939093013593505050565b6000602082840312156109cd57600080fd5b81356103918161097a565b600080604083850312156109eb57600080fd5b823567ffffffffffffffff811115610a0257600080fd5b610a0e8582860161092d565b95602094909401359450505050565b63ffffffff8116811461082957600080fd5b60ff8116811461082957600080fd5b8035610a4981610a2f565b919050565b600080600080600060808688031215610a6657600080fd5b8535610a7181610a1d565b94506020860135610a8181610a1d565b9350604086013567ffffffffffffffff80821115610a9e57600080fd5b818801915088601f830112610ab257600080fd5b813581811115610ac157600080fd5b896020828501011115610ad357600080fd5b6020830195508094505050506060860135610aed81610a2f565b809150509295509295909350565b67ffffffffffffffff8116811461082957600080fd5b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b6020815260008235610b4b8161097a565b6001600160a01b0381166020840152506020830135610b6981610afb565b67ffffffffffffffff808216604085015260408501359150610b8a82610a1d565b63ffffffff808316606086015260608601359250610ba783610a1d565b80831660808601525060808501359150601e19853603018212610bc957600080fd5b6020918501918201913581811115610be057600080fd5b803603831315610bef57600080fd5b60c060a0860152610c0460e086018285610b11565b92505050610c1460a08501610a3e565b60ff811660c0850152509392505050565b634e487b7160e01b600052601160045260246000fd5b80820180821115610c4e57610c4e610c25565b92915050565b600060208284031215610c6657600080fd5b813561039181610a1d565b60008135610c4e81610a1d565b6000808335601e19843603018112610c9557600080fd5b83018035915067ffffffffffffffff821115610cb057600080fd5b602001915036819003821315610cc557600080fd5b9250929050565b634e487b7160e01b600052604160045260246000fd5b600181811c90821680610cf657607f821691505b60208210810361093f57634e487b7160e01b600052602260045260246000fd5b601f82111561077757600081815260208120601f850160051c81016020861015610d3d5750805b601f850160051c820191505b818110156106c457828155600101610d49565b67ffffffffffffffff831115610d7457610d74610ccc565b610d8883610d828354610ce2565b83610d16565b6000601f841160018114610dbc5760008515610da45750838201355b600019600387901b1c1916600186901b178355610e16565b600083815260209020601f19861690835b82811015610ded5786850135825560209485019460019092019101610dcd565b5086821015610e0a5760001960f88860031b161c19848701351681555b505060018560011b0183555b5050505050565b60008135610c4e81610a2f565b8135610e358161097a565b6001600160a01b038116905081548173ffffffffffffffffffffffffffffffffffffffff1982161783556020840135610e6d81610afb565b7bffffffffffffffff00000000000000000000000000000000000000008160a01b1690507fffffffff0000000000000000000000000000000000000000000000000000000081848285161717855560408601359250610ecb83610a1d565b921760e09190911b909116178155610f03610ee860608401610c71565b6001830163ffffffff821663ffffffff198254161781555050565b610f106080830183610c7e565b610f1e818360028601610d5c565b5050610562610f2f60a08401610e1d565b6003830160ff821660ff198254161781555050565b6001600160a01b038816815267ffffffffffffffff87166020820152600063ffffffff808816604084015280871660608401525060c06080830152610f8d60c083018587610b11565b905060ff831660a083015298975050505050505050565b67ffffffffffffffff818116838216019080821115610fc557610fc5610c25565b509291505056fea264697066735822122055bbe17521778f602b3eab0e1e16144809be200e76e1af574dfaadbe93774a6264736f6c63430008140033a2646970667358221220988c97557f81218d102add918ac3bc9901a051f845bec5d8043436c3f645561a64736f6c63430008140033", + 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\":\"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\":\"crossChainData\",\"type\":\"tuple\"}],\"name\":\"AddRollup\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_addr\",\"type\":\"address\"}],\"name\":\"Attested\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"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\":\"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\":\"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\":[],\"name\":\"lastBatchSeqNo\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"messageBus\",\"outputs\":[{\"internalType\":\"contractIMessageBus\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", + Bin: "0x608060405234801561001057600080fd5b5061001a3361001f565b610090565b7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c19930080546001600160a01b031981166001600160a01b03848116918217845560405192169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3505050565b61324d8061009f6000396000f3fe60806040523480156200001157600080fd5b5060043610620001955760003560e01c80637281099611620000e9578063a1a227fa1162000097578063db5d91b1116200006e578063db5d91b114620003ad578063e34fbfc814620003dc578063f2fde38b14620003f157600080fd5b8063a1a227fa1462000371578063a52f433c1462000385578063d4fab887146200039657600080fd5b80638236a7ba11620000cc5780638236a7ba14620002f35780638da5cb5b146200031a57806398077e86146200034b57600080fd5b80637281099614620002df5780638129fc1c14620002e957600080fd5b80634766573811620001475780636a30d26c116200012a5780636a30d26c14620002a55780636b9707d614620002be578063715018a614620002d557600080fd5b806347665738146200027757806368e10383146200028e57600080fd5b80633e60a22f116200017c5780633e60a22f14620001ca57806343348b2f146200021e578063440c953b146200025e57600080fd5b806303e72e48146200019a5780632c77c81f14620001b3575b600080fd5b620001b1620001ab36600462001763565b62000408565b005b620001b1620001c436600462001803565b6200051b565b62000201620001db366004620018a6565b80516020818301810180516003825292820191909301209152546001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b6200024d6200022f366004620018e7565b6001600160a01b031660009081526020819052604090205460ff1690565b604051901515815260200162000215565b6200026860055481565b60405190815260200162000215565b620001b162000288366004620018e7565b62000665565b620001b16200029f3660046200190c565b62000735565b620002af6200082c565b604051620002159190620019ea565b620001b1620002cf366004620018e7565b6200090f565b620001b1620009d5565b620001b1620009ed565b620001b162000a71565b6200030a6200030436600462001a50565b62000c3b565b6040516200021592919062001a6a565b7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300546001600160a01b031662000201565b620003626200035c36600462001a50565b62000d2b565b60405162000215919062001ab0565b60075462000201906001600160a01b031681565b600454610100900460ff166200024d565b620001b1620003a736600462001ac5565b62000de0565b6200024d620003be366004620018e7565b6001600160a01b031660009081526001602052604090205460ff1690565b620001b1620003ed36600462001b70565b5050565b620001b162000402366004620018e7565b62000f73565b6200041262000fd0565b60006001600160a01b03166003836040516200042f919062001bb6565b908152604051908190036020019020546001600160a01b0316036200048e57600280546001810182556000919091527f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace016200048c838262001c62565b505b80600383604051620004a1919062001bb6565b90815260405190819003602001812080546001600160a01b039390931673ffffffffffffffffffffffffffffffffffffffff19909316929092179091557f17b2f9f5748931099ffee882b5b64f4a560b5c55da9b4f4e396dae3bb9f98cb5906200050f908490849062001d2f565b60405180910390a15050565b60006200056d853562000532602088018862001d5c565b8080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506200104792505050565b6001600160a01b03811660009081526020819052604090205490915060ff16620005de5760405162461bcd60e51b815260206004820152601660248201527f656e636c6176654944206e6f742061747465737465640000000000000000000060448201526064015b60405180910390fd5b6001600160a01b03811660009081526001602052604090205460ff16620006485760405162461bcd60e51b815260206004820152601960248201527f656e636c6176654944206e6f7420612073657175656e636572000000000000006044820152606401620005d5565b620006538562001075565b6200065e82620010ad565b5050505050565b6200066f62000fd0565b6001600160a01b03811660009081526020819052604090205460ff16620006d95760405162461bcd60e51b815260206004820152601660248201527f656e636c6176654944206e6f74206174746573746564000000000000000000006044820152606401620005d5565b6001600160a01b038116600081815260016020818152604092839020805460ff191690921790915590519182527ffe64c7181f0fc60e300dc02cca368cdfa94d7ca45902de3b9a9d80070e76093691015b60405180910390a150565b60045460ff1615620007b05760405162461bcd60e51b815260206004820152602260248201527f6e6574776f726b2073656372657420616c726561647920696e697469616c697a60448201527f65640000000000000000000000000000000000000000000000000000000000006064820152608401620005d5565b60048054600160ff1991821681179092556001600160a01b038716600081815260208181526040808320805486168717905585825291829020805490941690941790925590519081527ffe64c7181f0fc60e300dc02cca368cdfa94d7ca45902de3b9a9d80070e76093691015b60405180910390a15050505050565b60606002805480602002602001604051908101604052809291908181526020016000905b8282101562000906578382906000526020600020018054620008729062001bd4565b80601f0160208091040260200160405190810160405280929190818152602001828054620008a09062001bd4565b8015620008f15780601f10620008c557610100808354040283529160200191620008f1565b820191906000526020600020905b815481529060010190602001808311620008d357829003601f168201915b50505050508152602001906001019062000850565b50505050905090565b6200091962000fd0565b6001600160a01b03811660009081526001602052604090205460ff16620009835760405162461bcd60e51b815260206004820152601960248201527f656e636c6176654944206e6f7420612073657175656e636572000000000000006044820152606401620005d5565b6001600160a01b038116600081815260016020908152604091829020805460ff1916905590519182527f0f279980343c7ca542fde9fa5396555068efb5cd560d9cf9c191aa2911079b4791016200072a565b620009df62000fd0565b620009eb60006200117d565b565b620009f762000fd0565b6007546040517f36d2da900000000000000000000000000000000000000000000000000000000081523360048201526001600160a01b03909116906336d2da9090602401600060405180830381600087803b15801562000a5657600080fd5b505af115801562000a6b573d6000803e3d6000fd5b50505050565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00805468010000000000000000810460ff16159067ffffffffffffffff1660008115801562000abd5750825b905060008267ffffffffffffffff16600114801562000adb5750303b155b90508115801562000aea575080155b1562000b22576040517ff92ee8a900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b845467ffffffffffffffff19166001178555831562000b5757845468ff00000000000000001916680100000000000000001785555b62000b6233620011fb565b600060055560405162000b75906200168d565b604051809103906000f08015801562000b92573d6000803e3d6000fd5b506007805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b039290921691821790556040519081527fbd726cf82ac9c3260b1495107182e336e0654b25c10915648c0cc15b2bb72cbf9060200160405180910390a183156200065e57845468ff000000000000000019168555604051600181527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2906020016200081d565b60408051606080820183526000808352602080840183905283850182905285825260068152848220855193840190955284548352600185018054929586949390928401919062000c8b9062001bd4565b80601f016020809104026020016040519081016040528092919081815260200182805462000cb99062001bd4565b801562000d0a5780601f1062000cde5761010080835404028352916020019162000d0a565b820191906000526020600020905b81548152906001019060200180831162000cec57829003601f168201915b50505091835250506002919091015460209091015280519094149492505050565b6002818154811062000d3c57600080fd5b90600052602060002001600091509050805462000d599062001bd4565b80601f016020809104026020016040519081016040528092919081815260200182805462000d879062001bd4565b801562000dd85780601f1062000dac5761010080835404028352916020019162000dd8565b820191906000526020600020905b81548152906001019060200180831162000dba57829003601f168201915b505050505081565b6001600160a01b03851660009081526020819052604090205460ff168062000e715760405162461bcd60e51b815260206004820152602360248201527f726573706f6e64696e67206174746573746572206973206e6f7420617474657360448201527f74656400000000000000000000000000000000000000000000000000000000006064820152608401620005d5565b811562000f4857600062000eaa87878660405160200162000e959392919062001da6565b60405160208183030381529060405262001210565b9050600062000eba828762001047565b9050876001600160a01b0316816001600160a01b03161462000f455760405162461bcd60e51b815260206004820152602c60248201527f63616c63756c61746564206164647265737320616e642061747465737465724960448201527f4420646f6e74206d6174636800000000000000000000000000000000000000006064820152608401620005d5565b50505b5050506001600160a01b039091166000908152602081905260409020805460ff191660011790555050565b62000f7d62000fd0565b6001600160a01b03811662000fc2576040517f1e4fbdf700000000000000000000000000000000000000000000000000000000815260006004820152602401620005d5565b62000fcd816200117d565b50565b33620010037f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300546001600160a01b031690565b6001600160a01b031614620009eb576040517f118cdaa7000000000000000000000000000000000000000000000000000000008152336004820152602401620005d5565b6000806000806200105986866200124f565b9250925092506200106b8282620012a0565b5090949350505050565b80356000908152600660205260409020819062001093828262001dee565b50506005546040820135111562000fcd5760400135600555565b6000620010bb828062001efe565b9050905060005b8181101562001178576007546001600160a01b0316639730886d620010e8858062001efe565b84818110620010fb57620010fb62001f4b565b90506020028101906200110f919062001f61565b60016040518363ffffffff1660e01b81526004016200113092919062002011565b600060405180830381600087803b1580156200114b57600080fd5b505af115801562001160573d6000803e3d6000fd5b50505050806200117090620020d3565b9050620010c2565b505050565b7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300805473ffffffffffffffffffffffffffffffffffffffff1981166001600160a01b03848116918217845560405192169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3505050565b62001205620013b6565b62000fcd816200141e565b60006200121e825162001428565b8260405160200162001232929190620020fb565b604051602081830303815290604052805190602001209050919050565b600080600083516041036200128d5760208401516040850151606086015160001a6200127e88828585620014cf565b95509550955050505062001299565b50508151600091506002905b9250925092565b6000826003811115620012b757620012b76200215a565b03620012c1575050565b6001826003811115620012d857620012d86200215a565b0362001310576040517ff645eedf00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60028260038111156200132757620013276200215a565b0362001363576040517ffce698f700000000000000000000000000000000000000000000000000000000815260048101829052602401620005d5565b60038260038111156200137a576200137a6200215a565b03620003ed576040517fd78bce0c00000000000000000000000000000000000000000000000000000000815260048101829052602401620005d5565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a005468010000000000000000900460ff16620009eb576040517fd7e6bcf800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b62000f7d620013b6565b606060006200143783620015a3565b600101905060008167ffffffffffffffff8111156200145a576200145a6200169b565b6040519080825280601f01601f19166020018201604052801562001485576020820181803683370190505b5090508181016020015b600019017f3031323334353637383961626364656600000000000000000000000000000000600a86061a8153600a85049450846200148f57509392505050565b600080807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08411156200150c575060009150600390508262001599565b604080516000808252602082018084528a905260ff891692820192909252606081018790526080810186905260019060a0016020604051602081039080840390855afa15801562001561573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b0381166200158f5750600092506001915082905062001599565b9250600091508190505b9450945094915050565b6000807a184f03e93ff9f4daa797ed6e38ed64bf6a1f0100000000000000008310620015ed577a184f03e93ff9f4daa797ed6e38ed64bf6a1f010000000000000000830492506040015b6d04ee2d6d415b85acef810000000083106200161a576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc1000083106200163957662386f26fc10000830492506010015b6305f5e100831062001652576305f5e100830492506008015b61271083106200166757612710830492506004015b606483106200167a576064830492506002015b600a831062001687576001015b92915050565b6110a7806200217183390190565b634e487b7160e01b600052604160045260246000fd5b600082601f830112620016c357600080fd5b813567ffffffffffffffff80821115620016e157620016e16200169b565b604051601f8301601f19908116603f011681019082821181831017156200170c576200170c6200169b565b816040528381528660208588010111156200172657600080fd5b836020870160208301376000602085830101528094505050505092915050565b80356001600160a01b03811681146200175e57600080fd5b919050565b600080604083850312156200177757600080fd5b823567ffffffffffffffff8111156200178f57600080fd5b6200179d85828601620016b1565b925050620017ae6020840162001746565b90509250929050565b60008083601f840112620017ca57600080fd5b50813567ffffffffffffffff811115620017e357600080fd5b602083019150836020828501011115620017fc57600080fd5b9250929050565b600080600080606085870312156200181a57600080fd5b843567ffffffffffffffff808211156200183357600080fd5b90860190606082890312156200184857600080fd5b909450602086013590808211156200185f57600080fd5b6200186d88838901620017b7565b909550935060408701359150808211156200188757600080fd5b508501602081880312156200189b57600080fd5b939692955090935050565b600060208284031215620018b957600080fd5b813567ffffffffffffffff811115620018d157600080fd5b620018df84828501620016b1565b949350505050565b600060208284031215620018fa57600080fd5b620019058262001746565b9392505050565b6000806000806000606086880312156200192557600080fd5b620019308662001746565b9450602086013567ffffffffffffffff808211156200194e57600080fd5b6200195c89838a01620017b7565b909650945060408801359150808211156200197657600080fd5b506200198588828901620017b7565b969995985093965092949392505050565b60005b83811015620019b357818101518382015260200162001999565b50506000910152565b60008151808452620019d681602086016020860162001996565b601f01601f19169290920160200192915050565b6000602080830181845280855180835260408601915060408160051b870101925083870160005b8281101562001a4357603f1988860301845262001a30858351620019bc565b9450928501929085019060010162001a11565b5092979650505050505050565b60006020828403121562001a6357600080fd5b5035919050565b821515815260406020820152815160408201526000602083015160608084015262001a9960a0840182620019bc565b905060408401516080840152809150509392505050565b602081526000620019056020830184620019bc565b600080600080600060a0868803121562001ade57600080fd5b62001ae98662001746565b945062001af96020870162001746565b9350604086013567ffffffffffffffff8082111562001b1757600080fd5b62001b2589838a01620016b1565b9450606088013591508082111562001b3c57600080fd5b5062001b4b88828901620016b1565b9250506080860135801515811462001b6257600080fd5b809150509295509295909350565b6000806020838503121562001b8457600080fd5b823567ffffffffffffffff81111562001b9c57600080fd5b62001baa85828601620017b7565b90969095509350505050565b6000825162001bca81846020870162001996565b9190910192915050565b600181811c9082168062001be957607f821691505b60208210810362001c0a57634e487b7160e01b600052602260045260246000fd5b50919050565b601f8211156200117857600081815260208120601f850160051c8101602086101562001c395750805b601f850160051c820191505b8181101562001c5a5782815560010162001c45565b505050505050565b815167ffffffffffffffff81111562001c7f5762001c7f6200169b565b62001c978162001c90845462001bd4565b8462001c10565b602080601f83116001811462001ccf576000841562001cb65750858301515b600019600386901b1c1916600185901b17855562001c5a565b600085815260208120601f198616915b8281101562001d005788860151825594840194600190910190840162001cdf565b508582101562001d1f5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b60408152600062001d446040830185620019bc565b90506001600160a01b03831660208301529392505050565b6000808335601e1984360301811262001d7457600080fd5b83018035915067ffffffffffffffff82111562001d9057600080fd5b602001915036819003821315620017fc57600080fd5b60006bffffffffffffffffffffffff19808660601b168352808560601b16601484015250825162001ddf81602885016020870162001996565b91909101602801949350505050565b813581556001808201602080850135601e1986360301811262001e1057600080fd5b8501803567ffffffffffffffff81111562001e2a57600080fd5b803603838301131562001e3c57600080fd5b62001e548162001e4d865462001bd4565b8662001c10565b6000601f82116001811462001e8d576000831562001e7457508382018501355b600019600385901b1c1916600184901b17865562001ee9565b600086815260209020601f19841690835b8281101562001ebf5786850188013582559387019390890190870162001e9e565b508482101562001edf5760001960f88660031b161c198785880101351681555b50508683881b0186555b50505050505050604082013560028201555050565b6000808335601e1984360301811262001f1657600080fd5b83018035915067ffffffffffffffff82111562001f3257600080fd5b6020019150600581901b3603821315620017fc57600080fd5b634e487b7160e01b600052603260045260246000fd5b6000823560be1983360301811262001bca57600080fd5b803563ffffffff811681146200175e57600080fd5b6000808335601e1984360301811262001fa557600080fd5b830160208101925035905067ffffffffffffffff81111562001fc657600080fd5b803603821315620017fc57600080fd5b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b803560ff811681146200175e57600080fd5b604081526001600160a01b03620020288462001746565b1660408201526000602084013567ffffffffffffffff81168082146200204d57600080fd5b60608401525063ffffffff620020666040860162001f78565b1660808301526200207a6060850162001f78565b63ffffffff1660a083015262002094608085018562001f8d565b60c080850152620020ab6101008501828462001fd6565b915050620020bc60a0860162001fff565b60ff1660e084015260209092019290925292915050565b600060018201620020f457634e487b7160e01b600052601160045260246000fd5b5060010190565b7f19457468657265756d205369676e6564204d6573736167653a0a0000000000008152600083516200213581601a85016020880162001996565b8351908301906200214e81601a84016020880162001996565b01601a01949350505050565b634e487b7160e01b600052602160045260246000fdfe608060405234801561001057600080fd5b50338061003757604051631e4fbdf760e01b81526000600482015260240160405180910390fd5b61004081610046565b50610096565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b611002806100a56000396000f3fe6080604052600436106100b55760003560e01c80638da5cb5b1161006957806399a3ad211161004e57806399a3ad2114610269578063b1454caa14610289578063f2fde38b146102c257610129565b80638da5cb5b146102215780639730886d1461024957610129565b8063346633fb1161009a578063346633fb146101d957806336d2da90146101ec578063715018a61461020c57610129565b80630fcfbd111461017657806333a88c72146101a957610129565b36610129576040517f346633fb0000000000000000000000000000000000000000000000000000000081523360048201523460248201819052309163346633fb91906044016000604051808303818588803b15801561011357600080fd5b505af1158015610127573d6000803e3d6000fd5b005b60405162461bcd60e51b815260206004820152600b60248201527f756e737570706f7274656400000000000000000000000000000000000000000060448201526064015b60405180910390fd5b34801561018257600080fd5b50610196610191366004610945565b6102e2565b6040519081526020015b60405180910390f35b3480156101b557600080fd5b506101c96101c4366004610945565b610398565b60405190151581526020016101a0565b6101276101e736600461098f565b6103eb565b3480156101f857600080fd5b506101276102073660046109bb565b6104b7565b34801561021857600080fd5b50610127610566565b34801561022d57600080fd5b506000546040516001600160a01b0390911681526020016101a0565b34801561025557600080fd5b506101276102643660046109d8565b61057a565b34801561027557600080fd5b5061012761028436600461098f565b6106cc565b34801561029557600080fd5b506102a96102a4366004610a4e565b61077c565b60405167ffffffffffffffff90911681526020016101a0565b3480156102ce57600080fd5b506101276102dd3660046109bb565b6107d5565b600080826040516020016102f69190610b3a565b60408051601f19818403018152918152815160209283012060008181526001909352912054909150806103915760405162461bcd60e51b815260206004820152602160248201527f54686973206d65737361676520776173206e65766572207375626d697474656460448201527f2e00000000000000000000000000000000000000000000000000000000000000606482015260840161016d565b9392505050565b600080826040516020016103ac9190610b3a565b60408051601f1981840301815291815281516020928301206000818152600190935291205490915080158015906103e35750428111155b949350505050565b6000341180156103fa57508034145b61046c5760405162461bcd60e51b815260206004820152603060248201527f417474656d7074696e6720746f2073656e642076616c756520776974686f757460448201527f2070726f766964696e6720457468657200000000000000000000000000000000606482015260840161016d565b604080513381526001600160a01b0384166020820152348183015290517ff1365f826a788d6c1a955db0eed5ba8642674219c4771f8c65918617511a15609181900360600190a15050565b6104bf61082c565b6000816001600160a01b03164760405160006040518083038185875af1925050503d806000811461050c576040519150601f19603f3d011682016040523d82523d6000602084013e610511565b606091505b50509050806105625760405162461bcd60e51b815260206004820152601460248201527f6661696c65642073656e64696e672076616c7565000000000000000000000000604482015260640161016d565b5050565b61056e61082c565b6105786000610872565b565b61058261082c565b600061058e8242610c3b565b90506000836040516020016105a39190610b3a565b60408051601f198184030181529181528151602092830120600081815260019093529120549091501561063e5760405162461bcd60e51b815260206004820152602160248201527f4d657373616765207375626d6974746564206d6f7265207468616e206f6e636560448201527f2100000000000000000000000000000000000000000000000000000000000000606482015260840161016d565b6000818152600160209081526040822084905560029190610661908701876109bb565b6001600160a01b03168152602081019190915260400160009081209061068d6080870160608801610c54565b63ffffffff168152602080820192909252604001600090812080546001810182559082529190208591600402016106c48282610e2a565b505050505050565b6106d461082c565b6000826001600160a01b03168260405160006040518083038185875af1925050503d8060008114610721576040519150601f19603f3d011682016040523d82523d6000602084013e610726565b606091505b50509050806107775760405162461bcd60e51b815260206004820152601460248201527f6661696c65642073656e64696e672076616c7565000000000000000000000000604482015260640161016d565b505050565b6000610787336108cf565b90507fb93c37389233beb85a3a726c3f15c2d15533ee74cb602f20f490dfffef775937338288888888886040516107c49796959493929190610f44565b60405180910390a195945050505050565b6107dd61082c565b6001600160a01b038116610820576040517f1e4fbdf70000000000000000000000000000000000000000000000000000000081526000600482015260240161016d565b61082981610872565b50565b6000546001600160a01b03163314610578576040517f118cdaa700000000000000000000000000000000000000000000000000000000815233600482015260240161016d565b600080546001600160a01b0383811673ffffffffffffffffffffffffffffffffffffffff19831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6001600160a01b0381166000908152600360205260408120805467ffffffffffffffff1691600191906109028385610fa4565b92506101000a81548167ffffffffffffffff021916908367ffffffffffffffff160217905550919050565b600060c0828403121561093f57600080fd5b50919050565b60006020828403121561095757600080fd5b813567ffffffffffffffff81111561096e57600080fd5b6103e38482850161092d565b6001600160a01b038116811461082957600080fd5b600080604083850312156109a257600080fd5b82356109ad8161097a565b946020939093013593505050565b6000602082840312156109cd57600080fd5b81356103918161097a565b600080604083850312156109eb57600080fd5b823567ffffffffffffffff811115610a0257600080fd5b610a0e8582860161092d565b95602094909401359450505050565b63ffffffff8116811461082957600080fd5b60ff8116811461082957600080fd5b8035610a4981610a2f565b919050565b600080600080600060808688031215610a6657600080fd5b8535610a7181610a1d565b94506020860135610a8181610a1d565b9350604086013567ffffffffffffffff80821115610a9e57600080fd5b818801915088601f830112610ab257600080fd5b813581811115610ac157600080fd5b896020828501011115610ad357600080fd5b6020830195508094505050506060860135610aed81610a2f565b809150509295509295909350565b67ffffffffffffffff8116811461082957600080fd5b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b6020815260008235610b4b8161097a565b6001600160a01b0381166020840152506020830135610b6981610afb565b67ffffffffffffffff808216604085015260408501359150610b8a82610a1d565b63ffffffff808316606086015260608601359250610ba783610a1d565b80831660808601525060808501359150601e19853603018212610bc957600080fd5b6020918501918201913581811115610be057600080fd5b803603831315610bef57600080fd5b60c060a0860152610c0460e086018285610b11565b92505050610c1460a08501610a3e565b60ff811660c0850152509392505050565b634e487b7160e01b600052601160045260246000fd5b80820180821115610c4e57610c4e610c25565b92915050565b600060208284031215610c6657600080fd5b813561039181610a1d565b60008135610c4e81610a1d565b6000808335601e19843603018112610c9557600080fd5b83018035915067ffffffffffffffff821115610cb057600080fd5b602001915036819003821315610cc557600080fd5b9250929050565b634e487b7160e01b600052604160045260246000fd5b600181811c90821680610cf657607f821691505b60208210810361093f57634e487b7160e01b600052602260045260246000fd5b601f82111561077757600081815260208120601f850160051c81016020861015610d3d5750805b601f850160051c820191505b818110156106c457828155600101610d49565b67ffffffffffffffff831115610d7457610d74610ccc565b610d8883610d828354610ce2565b83610d16565b6000601f841160018114610dbc5760008515610da45750838201355b600019600387901b1c1916600186901b178355610e16565b600083815260209020601f19861690835b82811015610ded5786850135825560209485019460019092019101610dcd565b5086821015610e0a5760001960f88860031b161c19848701351681555b505060018560011b0183555b5050505050565b60008135610c4e81610a2f565b8135610e358161097a565b6001600160a01b038116905081548173ffffffffffffffffffffffffffffffffffffffff1982161783556020840135610e6d81610afb565b7bffffffffffffffff00000000000000000000000000000000000000008160a01b1690507fffffffff0000000000000000000000000000000000000000000000000000000081848285161717855560408601359250610ecb83610a1d565b921760e09190911b909116178155610f03610ee860608401610c71565b6001830163ffffffff821663ffffffff198254161781555050565b610f106080830183610c7e565b610f1e818360028601610d5c565b5050610562610f2f60a08401610e1d565b6003830160ff821660ff198254161781555050565b6001600160a01b038816815267ffffffffffffffff87166020820152600063ffffffff808816604084015280871660608401525060c06080830152610f8d60c083018587610b11565b905060ff831660a083015298975050505050505050565b67ffffffffffffffff818116838216019080821115610fc557610fc5610c25565b509291505056fea264697066735822122055bbe17521778f602b3eab0e1e16144809be200e76e1af574dfaadbe93774a6264736f6c63430008140033a2646970667358221220b91e70a097d4f12e0c50d9ddaac491daf1d5adde5e1e04907a2a3abbee0d7ba264736f6c63430008140033", } // ManagementContractABI is the input ABI used to generate the binding from. @@ -1321,3 +1321,271 @@ func (_ManagementContract *ManagementContractFilterer) ParseOwnershipTransferred event.Raw = log return event, nil } + +// ManagementContractSequencerEnclaveGrantedIterator is returned from FilterSequencerEnclaveGranted and is used to iterate over the raw logs and unpacked data for SequencerEnclaveGranted events raised by the ManagementContract contract. +type ManagementContractSequencerEnclaveGrantedIterator struct { + Event *ManagementContractSequencerEnclaveGranted // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *ManagementContractSequencerEnclaveGrantedIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(ManagementContractSequencerEnclaveGranted) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(ManagementContractSequencerEnclaveGranted) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *ManagementContractSequencerEnclaveGrantedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *ManagementContractSequencerEnclaveGrantedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// ManagementContractSequencerEnclaveGranted represents a SequencerEnclaveGranted event raised by the ManagementContract contract. +type ManagementContractSequencerEnclaveGranted struct { + EnclaveID common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterSequencerEnclaveGranted is a free log retrieval operation binding the contract event 0xfe64c7181f0fc60e300dc02cca368cdfa94d7ca45902de3b9a9d80070e760936. +// +// Solidity: event SequencerEnclaveGranted(address enclaveID) +func (_ManagementContract *ManagementContractFilterer) FilterSequencerEnclaveGranted(opts *bind.FilterOpts) (*ManagementContractSequencerEnclaveGrantedIterator, error) { + + logs, sub, err := _ManagementContract.contract.FilterLogs(opts, "SequencerEnclaveGranted") + if err != nil { + return nil, err + } + return &ManagementContractSequencerEnclaveGrantedIterator{contract: _ManagementContract.contract, event: "SequencerEnclaveGranted", logs: logs, sub: sub}, nil +} + +// WatchSequencerEnclaveGranted is a free log subscription operation binding the contract event 0xfe64c7181f0fc60e300dc02cca368cdfa94d7ca45902de3b9a9d80070e760936. +// +// Solidity: event SequencerEnclaveGranted(address enclaveID) +func (_ManagementContract *ManagementContractFilterer) WatchSequencerEnclaveGranted(opts *bind.WatchOpts, sink chan<- *ManagementContractSequencerEnclaveGranted) (event.Subscription, error) { + + logs, sub, err := _ManagementContract.contract.WatchLogs(opts, "SequencerEnclaveGranted") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(ManagementContractSequencerEnclaveGranted) + if err := _ManagementContract.contract.UnpackLog(event, "SequencerEnclaveGranted", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseSequencerEnclaveGranted is a log parse operation binding the contract event 0xfe64c7181f0fc60e300dc02cca368cdfa94d7ca45902de3b9a9d80070e760936. +// +// Solidity: event SequencerEnclaveGranted(address enclaveID) +func (_ManagementContract *ManagementContractFilterer) ParseSequencerEnclaveGranted(log types.Log) (*ManagementContractSequencerEnclaveGranted, error) { + event := new(ManagementContractSequencerEnclaveGranted) + if err := _ManagementContract.contract.UnpackLog(event, "SequencerEnclaveGranted", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// ManagementContractSequencerEnclaveRevokedIterator is returned from FilterSequencerEnclaveRevoked and is used to iterate over the raw logs and unpacked data for SequencerEnclaveRevoked events raised by the ManagementContract contract. +type ManagementContractSequencerEnclaveRevokedIterator struct { + Event *ManagementContractSequencerEnclaveRevoked // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *ManagementContractSequencerEnclaveRevokedIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(ManagementContractSequencerEnclaveRevoked) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(ManagementContractSequencerEnclaveRevoked) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *ManagementContractSequencerEnclaveRevokedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *ManagementContractSequencerEnclaveRevokedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// ManagementContractSequencerEnclaveRevoked represents a SequencerEnclaveRevoked event raised by the ManagementContract contract. +type ManagementContractSequencerEnclaveRevoked struct { + EnclaveID common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterSequencerEnclaveRevoked is a free log retrieval operation binding the contract event 0x0f279980343c7ca542fde9fa5396555068efb5cd560d9cf9c191aa2911079b47. +// +// Solidity: event SequencerEnclaveRevoked(address enclaveID) +func (_ManagementContract *ManagementContractFilterer) FilterSequencerEnclaveRevoked(opts *bind.FilterOpts) (*ManagementContractSequencerEnclaveRevokedIterator, error) { + + logs, sub, err := _ManagementContract.contract.FilterLogs(opts, "SequencerEnclaveRevoked") + if err != nil { + return nil, err + } + return &ManagementContractSequencerEnclaveRevokedIterator{contract: _ManagementContract.contract, event: "SequencerEnclaveRevoked", logs: logs, sub: sub}, nil +} + +// WatchSequencerEnclaveRevoked is a free log subscription operation binding the contract event 0x0f279980343c7ca542fde9fa5396555068efb5cd560d9cf9c191aa2911079b47. +// +// Solidity: event SequencerEnclaveRevoked(address enclaveID) +func (_ManagementContract *ManagementContractFilterer) WatchSequencerEnclaveRevoked(opts *bind.WatchOpts, sink chan<- *ManagementContractSequencerEnclaveRevoked) (event.Subscription, error) { + + logs, sub, err := _ManagementContract.contract.WatchLogs(opts, "SequencerEnclaveRevoked") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(ManagementContractSequencerEnclaveRevoked) + if err := _ManagementContract.contract.UnpackLog(event, "SequencerEnclaveRevoked", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseSequencerEnclaveRevoked is a log parse operation binding the contract event 0x0f279980343c7ca542fde9fa5396555068efb5cd560d9cf9c191aa2911079b47. +// +// Solidity: event SequencerEnclaveRevoked(address enclaveID) +func (_ManagementContract *ManagementContractFilterer) ParseSequencerEnclaveRevoked(log types.Log) (*ManagementContractSequencerEnclaveRevoked, error) { + event := new(ManagementContractSequencerEnclaveRevoked) + if err := _ManagementContract.contract.UnpackLog(event, "SequencerEnclaveRevoked", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} diff --git a/contracts/src/management/ManagementContract.sol b/contracts/src/management/ManagementContract.sol index 24a80e2878..b760283f07 100644 --- a/contracts/src/management/ManagementContract.sol +++ b/contracts/src/management/ManagementContract.sol @@ -20,8 +20,9 @@ contract ManagementContract is Initializable, OwnableUpgradeable { } event LogManagementContractCreated(address messageBusAddress); - // Event to log changes to important contract addresses event ImportantContractAddressUpdated(string key, address newAddress); + event SequencerEnclaveGranted(address enclaveID); + event SequencerEnclaveRevoked(address enclaveID); // mapping of enclaveID to whether it is attested mapping(address => bool) private attested; @@ -105,6 +106,7 @@ contract ManagementContract is Initializable, OwnableUpgradeable { // the enclave that starts the network with this call is implicitly a sequencer so doesn't need adding sequencerEnclave[_enclaveID] = true; + emit SequencerEnclaveGranted(_enclaveID); } // Enclaves can request the Network Secret given an attestation request report @@ -158,12 +160,14 @@ contract ManagementContract is Initializable, OwnableUpgradeable { // require the enclave to be attested already require(attested[_addr], "enclaveID not attested"); sequencerEnclave[_addr] = true; + emit SequencerEnclaveGranted(_addr); } // Function to revoke sequencer status for an enclave - contract owner only function RevokeSequencerEnclave(address _addr) public onlyOwner { // require the enclave to be a sequencer already require(sequencerEnclave[_addr], "enclaveID not a sequencer"); delete sequencerEnclave[_addr]; + emit SequencerEnclaveRevoked(_addr); } // Testnet function to allow the contract owner to retrieve **all** funds from the network bridge.