diff --git a/contracts/config/networks.json b/contracts/config/networks.json index fed73165ec..1dc4b0a18f 100644 --- a/contracts/config/networks.json +++ b/contracts/config/networks.json @@ -9,7 +9,7 @@ "4bfe14725e685901c062ccd4e220c61cf9c189897b6c78bd18d7f51291b2b8f1" ] }, - "localObscuro": { + "localDebugNetworkFull": { "chainId": 443, "url": "http://127.0.0.1:11180/v1/", "useGateway": true, @@ -30,7 +30,7 @@ "4bfe14725e685901c062ccd4e220c61cf9c189897b6c78bd18d7f51291b2b8f8" ] }, - "testObscuro": { + "localDebugNetwork": { "chainId": 443, "url": "http://127.0.0.1:11180/v1/", "useGateway": true, @@ -132,7 +132,7 @@ "layer1" : "localTestnetGeth" }, "deploy": [ - "deployment_scripts/testing" + "deployment_scripts/testing/004_upgrade_uups.ts" ], "accounts": [ "8dfb8083da6275ae3e4f41e3e8a8c19d028d32c9247e24530933782f2a05035b", diff --git a/contracts/deployment_scripts/testing/003_simple_withdrawal.ts b/contracts/deployment_scripts/testing/003_simple_withdrawal.ts index 7166e9e6ed..9b246958e0 100644 --- a/contracts/deployment_scripts/testing/003_simple_withdrawal.ts +++ b/contracts/deployment_scripts/testing/003_simple_withdrawal.ts @@ -54,6 +54,7 @@ async function waitForRootPublished(management, msg, proof, root, provider: Ethe const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { + return; const l2Network = hre; const {deployer} = await hre.getNamedAccounts(); diff --git a/contracts/deployment_scripts/testing/004_upgrade_uups.ts b/contracts/deployment_scripts/testing/004_upgrade_uups.ts new file mode 100644 index 0000000000..a93b6d1231 --- /dev/null +++ b/contracts/deployment_scripts/testing/004_upgrade_uups.ts @@ -0,0 +1,25 @@ +import {HardhatRuntimeEnvironment} from 'hardhat/types'; +import {DeployFunction} from 'hardhat-deploy/types'; + +const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { + const UUPSTestV1 = await hre.ethers.getContractFactory("UUPSTestV1"); + const uupsTestv1 = await hre.upgrades.deployProxy(UUPSTestV1, [], { + initializer: 'initialize', + kind: 'uups', + txOverrides: { + } + }) + + await uupsTestv1.waitForDeployment(); + const address = await uupsTestv1.getAddress() + console.log("Proxy deployed at", address); + + const UUPSTestV2 = await hre.ethers.getContractFactory("UUPSTestV2"); + const uuupsTestV2 = await hre.upgrades.upgradeProxy(address, UUPSTestV2); + console.log("UUPS Test V2 deployed to:", await uuupsTestV2.getAddress()); + +}; + + +export default func; +func.tags = ['GasDebug']; diff --git a/contracts/generated/ManagementContract/ManagementContract.go b/contracts/generated/ManagementContract/ManagementContract.go index 77be41ff81..abebf82f21 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\":\"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: "0x608060405234801561001057600080fd5b5061001a3361001f565b610090565b7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c19930080546001600160a01b031981166001600160a01b03848116918217845560405192169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3505050565b614d2680620000a06000396000f3fe60806040523480156200001157600080fd5b5060043610620002005760003560e01c8063728109961162000119578063a1a227fa11620000af578063db5d91b1116200007a578063db5d91b114620004f9578063e34fbfc81462000528578063e874eb20146200053d578063f2fde38b146200055157600080fd5b8063a1a227fa1462000497578063a4ab2faa14620004ba578063a52f433c14620004d1578063d4fab88714620004e257600080fd5b80638415482611620000f057806384154826146200040357806387059edb14620004295780638da5cb5b146200044057806398077e86146200047157600080fd5b80637281099614620003c85780638129fc1c14620003d25780638236a7ba14620003dc57600080fd5b8063440c953b116200019b57806368e10383116200016657806368e1038314620003775780636a30d26c146200038e5780636b9707d614620003a7578063715018a614620003be57600080fd5b8063440c953b14620003185780634766573814620003225780635371a2161462000339578063568699c8146200035057600080fd5b80632c77c81f11620001dc5780632c77c81f14620002575780632f0cb9e3146200026e5780633e60a22f14620002a357806343348b2f14620002e957600080fd5b80620ddd27146200020557806303e72e481462000227578063073b6ef31462000240575b600080fd5b6200020f600e5481565b6040516200021e919062001b70565b60405180910390f35b6200023e6200023836600462001cc6565b62000568565b005b6200023e6200025136600462001e61565b6200067b565b6200023e6200026836600462001f82565b62000899565b620002946200027f36600462002035565b600c6020526000908152604090205460ff1681565b6040516200021e919062002063565b620002da620002b436600462002073565b80516020818301810180516003825292820191909301209152546001600160a01b031681565b6040516200021e9190620020bf565b62000294620002fa366004620020cf565b6001600160a01b031660009081526020819052604090205460ff1690565b6200020f60055481565b6200023e62000333366004620020cf565b620009b1565b6200023e6200034a3660046200215c565b62000a58565b620003676200036136600462002035565b62000c0e565b6040516200021e9291906200226c565b6200023e6200038836600462002290565b62000c67565b6200039862000d01565b6040516200021e9190620023b1565b6200023e620003b8366004620020cf565b62000de4565b6200023e62000e7b565b6200023e62000e93565b6200023e62000f1e565b620003f3620003ed36600462002035565b62001108565b6040516200021e929190620023c4565b620002946200041436600462002035565b600d6020526000908152604090205460ff1681565b620003f36200043a36600462002035565b620011f8565b7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300546001600160a01b0316620002da565b620004886200048236600462002035565b62001272565b6040516200021e9190620023d4565b600a54620004ab906001600160a01b031681565b6040516200021e919062002431565b62000294620004cb36600462002441565b62001327565b600454610100900460ff1662000294565b6200023e620004f336600462002498565b620013b9565b620002946200050a366004620020cf565b6001600160a01b031660009081526001602052604090205460ff1690565b6200023e6200053936600462002556565b5050565b600b54620004ab906001600160a01b031681565b6200023e62000562366004620020cf565b620014a2565b6200057262001500565b60006001600160a01b03166003836040516200058f9190620025c9565b908152604051908190036020019020546001600160a01b031603620005ee57600280546001810182556000919091527f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace01620005ec8382620026b9565b505b80600383604051620006019190620025c9565b90815260405190819003602001812080546001600160a01b039390931673ffffffffffffffffffffffffffffffffffffffff19909316929092179091557f17b2f9f5748931099ffee882b5b64f4a560b5c55da9b4f4e396dae3bb9f98cb5906200066f908490849062002786565b60405180910390a15050565b6000828152600860205260409020548114620006b45760405162461bcd60e51b8152600401620006ab90620027dd565b60405180910390fd5b60006200072689898989604051602001620006d394939291906200284d565b6040516020818303038152906040528051906020012086868080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506200157892505050565b6001600160a01b03811660009081526020819052604090205490915060ff16620007645760405162461bcd60e51b8152600401620006ab90620028cc565b600e8990556000805b87518110156200087457600b5488516001600160a01b039091169063b6aed0cb908a9084908110620007a357620007a3620028de565b6020026020010151620007b690620028ff565b426040518363ffffffff1660e01b8152600401620007d692919062002939565b600060405180830381600087803b158015620007f157600080fd5b505af115801562000806573d6000803e3d6000fd5b5050505081888281518110620008205762000820620028de565b60200260200101516200083390620028ff565b6040516020016200084692919062002939565b60405160208183030381529060405280519060200120915080806200086b906200296e565b9150506200076d565b506000908152600d60205260409020805460ff19166001179055505050505050505050565b6000620008eb8535620008b060208801886200298a565b8080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506200157892505050565b6001600160a01b03811660009081526020819052604090205490915060ff16620009295760405162461bcd60e51b8152600401620006ab90620028cc565b6001600160a01b03811660009081526001602052604090205460ff16620009645760405162461bcd60e51b8152600401620006ab9062002a18565b6200096f85620015a8565b6040517fd6555bff8670bd3008dc064c30bb56d6ac7cb14ae801e36146fe4e7c6a504a5890620009a29087359062001b70565b60405180910390a15050505050565b620009bb62001500565b6001600160a01b03811660009081526020819052604090205460ff16620009f65760405162461bcd60e51b8152600401620006ab90620028cc565b6001600160a01b038116600090815260016020819052604091829020805460ff19169091179055517ffe64c7181f0fc60e300dc02cca368cdfa94d7ca45902de3b9a9d80070e7609369062000a4d908390620020bf565b60405180910390a150565b600b546040517fb201246f0000000000000000000000000000000000000000000000000000000081526001600160a01b039091169063b201246f9062000aa990879087908790879060040162002b63565b60006040518083038186803b15801562000ac257600080fd5b505afa15801562000ad7573d6000803e3d6000fd5b5050505060008460405160200162000af0919062002ba2565b60408051601f1981840301815291815281516020928301206000818152600c90935291205490915060ff161562000b3b5760405162461bcd60e51b8152600401620006ab9062002be5565b6001600c60008760405160200162000b54919062002ba2565b60408051808303601f190181529181528151602092830120835282820193909352908201600020805460ff191693151593909317909255600a546001600160a01b0316916399a3ad219162000baf91908901908901620020cf565b87604001356040518363ffffffff1660e01b815260040162000bd392919062002bf7565b600060405180830381600087803b15801562000bee57600080fd5b505af115801562000c03573d6000803e3d6000fd5b505050505050505050565b60408051606080820183526000808352602083019190915291810182905260008062000c3a85620011f8565b915091508162000c505760009590945092505050565b600094855260086020526040909420549492505050565b60045460ff161562000c8d5760405162461bcd60e51b8152600401620006ab9062002c61565b60048054600160ff1991821681179092556001600160a01b0387166000908152602081815260408083208054851686179055908490529081902080549092169092179055517ffe64c7181f0fc60e300dc02cca368cdfa94d7ca45902de3b9a9d80070e76093690620009a2908790620020bf565b60606002805480602002602001604051908101604052809291908181526020016000905b8282101562000ddb57838290600052602060002001805462000d4790620025eb565b80601f016020809104026020016040519081016040528092919081815260200182805462000d7590620025eb565b801562000dc65780601f1062000d9a5761010080835404028352916020019162000dc6565b820191906000526020600020905b81548152906001019060200180831162000da857829003601f168201915b50505050508152602001906001019062000d25565b50505050905090565b62000dee62001500565b6001600160a01b03811660009081526001602052604090205460ff1662000e295760405162461bcd60e51b8152600401620006ab9062002a18565b6001600160a01b03811660009081526001602052604090819020805460ff19169055517f0f279980343c7ca542fde9fa5396555068efb5cd560d9cf9c191aa2911079b479062000a4d908390620020bf565b62000e8562001500565b62000e91600062001655565b565b62000e9d62001500565b600a546040517f36d2da900000000000000000000000000000000000000000000000000000000081526001600160a01b03909116906336d2da909062000ee8903390600401620020bf565b600060405180830381600087803b15801562000f0357600080fd5b505af115801562000f18573d6000803e3d6000fd5b50505050565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00805468010000000000000000810460ff16159067ffffffffffffffff1660008115801562000f6a5750825b905060008267ffffffffffffffff16600114801562000f885750303b155b90508115801562000f97575080155b1562000fcf576040517ff92ee8a900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b845467ffffffffffffffff1916600117855583156200100457845468ff00000000000000001916680100000000000000001785555b6200100f33620016d3565b60006005556001600955604051620010279062001b5a565b604051809103906000f08015801562001044573d6000803e3d6000fd5b50600b80546001600160a01b039290921673ffffffffffffffffffffffffffffffffffffffff199283168117909155600a805490921681179091556040517fbd726cf82ac9c3260b1495107182e336e0654b25c10915648c0cc15b2bb72cbf91620010af91620020bf565b60405180910390a183156200110157845468ff0000000000000000191685556040517fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d290620009a29060019062002c91565b5050505050565b6040805160608082018352600080835260208084018390528385018290528582526006815284822085519384019095528454835260018501805492958694939092840191906200115890620025eb565b80601f01602080910402602001604051908101604052809291908181526020018280546200118690620025eb565b8015620011d75780601f10620011ab57610100808354040283529160200191620011d7565b820191906000526020600020905b815481529060010190602001808311620011b957829003601f168201915b50505091835250506002919091015460209091015280519094149492505050565b604080516060808201835260008083526020830191909152918101829052600083815260076020526040812054908190036200125d57505060408051606081018252600080825282516020818101855282825283015291810182905290939092509050565b620012688162001108565b9250925050915091565b600281815481106200128357600080fd5b906000526020600020016000915090508054620012a090620025eb565b80601f0160208091040260200160405190810160405280929190818152602001828054620012ce90620025eb565b80156200131f5780601f10620012f3576101008083540402835291602001916200131f565b820191906000526020600020905b8154815290600101906020018083116200130157829003601f168201915b505050505081565b600080805b8351811015620013a057818482815181106200134c576200134c620028de565b60200260200101516200135f90620028ff565b6040516020016200137292919062002939565b604051602081830303815290604052805190602001209150808062001397906200296e565b9150506200132c565b506000908152600d602052604090205460ff1692915050565b6001600160a01b03851660009081526020819052604090205460ff1680620013f55760405162461bcd60e51b8152600401620006ab9062002cfa565b8115620014775760006200142e878786604051602001620014199392919062002d3b565b604051602081830303815290604052620016e8565b905060006200143e828762001578565b9050876001600160a01b0316816001600160a01b031614620014745760405162461bcd60e51b8152600401620006ab9062002dbe565b50505b5050506001600160a01b039091166000908152602081905260409020805460ff191660011790555050565b620014ac62001500565b6001600160a01b038116620014f25760006040517f1e4fbdf7000000000000000000000000000000000000000000000000000000008152600401620006ab9190620020bf565b620014fd8162001655565b50565b33620015337f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300546001600160a01b031690565b6001600160a01b03161462000e9157336040517f118cdaa7000000000000000000000000000000000000000000000000000000008152600401620006ab9190620020bf565b6000806000806200158a868662001727565b9250925092506200159c828262001778565b50909150505b92915050565b803560009081526006602052604090208190620015c6828262002f61565b50506009546000908152600760205260409020813590819055620015ec60014362002f6d565b406040516020016200160092919062002939565b60408051601f19818403018152918152815160209283012060098054600090815260089094529183205580549162001638836200296e565b919050555060055481604001351115620014fd5760400135600555565b7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300805473ffffffffffffffffffffffffffffffffffffffff1981166001600160a01b03848116918217845560405192169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3505050565b620016dd6200188e565b620014fd81620018f6565b6000620016f6825162001900565b826040516020016200170a92919062002f83565b604051602081830303815290604052805190602001209050919050565b60008060008351604103620017655760208401516040850151606086015160001a6200175688828585620019a8565b95509550955050505062001771565b50508151600091506002905b9250925092565b60008260038111156200178f576200178f62002fc3565b0362001799575050565b6001826003811115620017b057620017b062002fc3565b03620017e8576040517ff645eedf00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6002826003811115620017ff57620017ff62002fc3565b036200183b576040517ffce698f7000000000000000000000000000000000000000000000000000000008152620006ab90829060040162001b70565b600382600381111562001852576200185262002fc3565b036200053957806040517fd78bce0c000000000000000000000000000000000000000000000000000000008152600401620006ab919062001b70565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a005468010000000000000000900460ff1662000e91576040517fd7e6bcf800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b620014ac6200188e565b606060006200190f8362001a71565b600101905060008167ffffffffffffffff81111562001932576200193262001b80565b6040519080825280601f01601f1916602001820160405280156200195d576020820181803683370190505b5090508181016020015b600019017f3031323334353637383961626364656600000000000000000000000000000000600a86061a8153600a850494508462001967575b509392505050565b600080807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0841115620019e5575060009150600390508262001a67565b60006001888888886040516000815260200160405260405162001a0c949392919062002fe3565b6020604051602081039080840390855afa15801562001a2f573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b03811662001a5d5750600092506001915082905062001a67565b9250600091508190505b9450945094915050565b6000807a184f03e93ff9f4daa797ed6e38ed64bf6a1f010000000000000000831062001abb577a184f03e93ff9f4daa797ed6e38ed64bf6a1f010000000000000000830492506040015b6d04ee2d6d415b85acef8100000000831062001ae8576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc10000831062001b0757662386f26fc10000830492506010015b6305f5e100831062001b20576305f5e100830492506008015b612710831062001b3557612710830492506004015b6064831062001b48576064830492506002015b600a8310620015a25760010192915050565b611cd0806200302183390190565b805b82525050565b60208101620015a2828462001b68565b634e487b7160e01b600052604160045260246000fd5b601f19601f830116810181811067ffffffffffffffff8211171562001bbf5762001bbf62001b80565b6040525050565b600062001bd260405190565b905062001be0828262001b96565b919050565b600067ffffffffffffffff82111562001c025762001c0262001b80565b601f19601f83011660200192915050565b82818337506000910152565b600062001c3662001c308462001be5565b62001bc6565b90508281526020810184848401111562001c535762001c53600080fd5b620019a084828562001c13565b600082601f83011262001c765762001c76600080fd5b813562001c8884826020860162001c1f565b949350505050565b60006001600160a01b038216620015a2565b62001cad8162001c90565b8114620014fd57600080fd5b8035620015a28162001ca2565b6000806040838503121562001cde5762001cde600080fd5b823567ffffffffffffffff81111562001cfa5762001cfa600080fd5b62001d088582860162001c60565b925050602062001d1b8582860162001cb9565b9150509250929050565b8062001cad565b8035620015a28162001d25565b600067ffffffffffffffff82111562001d565762001d5662001b80565b5060209081020190565b600062001d7162001c308462001d39565b8381529050602080820190840283018581111562001d925762001d92600080fd5b835b8181101562001dd757803567ffffffffffffffff81111562001db95762001db9600080fd5b850162001dc7888262001c60565b8452506020928301920162001d94565b5050509392505050565b600082601f83011262001df75762001df7600080fd5b813562001c8884826020860162001d60565b60008083601f84011262001e205762001e20600080fd5b50813567ffffffffffffffff81111562001e3d5762001e3d600080fd5b60208301915083600182028301111562001e5a5762001e5a600080fd5b9250929050565b60008060008060008060008060e0898b03121562001e825762001e82600080fd5b600062001e908b8b62001d2c565b985050602062001ea38b828c0162001d2c565b975050604062001eb68b828c0162001d2c565b965050606089013567ffffffffffffffff81111562001ed85762001ed8600080fd5b62001ee68b828c0162001de1565b955050608089013567ffffffffffffffff81111562001f085762001f08600080fd5b62001f168b828c0162001e09565b945094505060a062001f2b8b828c0162001d2c565b92505060c062001f3e8b828c0162001d2c565b9150509295985092959890939650565b60006060828403121562001f655762001f65600080fd5b50919050565b60006020828403121562001f655762001f65600080fd5b6000806000806060858703121562001f9d5762001f9d600080fd5b843567ffffffffffffffff81111562001fb95762001fb9600080fd5b62001fc78782880162001f4e565b945050602085013567ffffffffffffffff81111562001fe95762001fe9600080fd5b62001ff78782880162001e09565b9350935050604085013567ffffffffffffffff8111156200201b576200201b600080fd5b620020298782880162001f6b565b91505092959194509250565b6000602082840312156200204c576200204c600080fd5b600062001c88848462001d2c565b80151562001b6a565b60208101620015a282846200205a565b6000602082840312156200208a576200208a600080fd5b813567ffffffffffffffff811115620020a657620020a6600080fd5b62001c888482850162001c60565b62001b6a8162001c90565b60208101620015a28284620020b4565b600060208284031215620020e657620020e6600080fd5b600062001c88848462001cb9565b60006080828403121562001f655762001f65600080fd5b60008083601f840112620021225762002122600080fd5b50813567ffffffffffffffff8111156200213f576200213f600080fd5b60208301915083602082028301111562001e5a5762001e5a600080fd5b60008060008060c08587031215620021775762002177600080fd5b6000620021858787620020f4565b945050608085013567ffffffffffffffff811115620021a757620021a7600080fd5b620021b5878288016200210b565b935093505060a0620020298782880162001d2c565b60005b83811015620021e7578181015183820152602001620021cd565b50506000910152565b6000620021fb825190565b80845260208401935062002214818560208601620021ca565b601f01601f19169290920192915050565b805160009060608401906200223b858262001b68565b5060208301518482036020860152620022558282620021f0565b9150506040830151620019a0604086018262001b68565b604081016200227c828562001b68565b818103602083015262001c88818462002225565b600080600080600060608688031215620022ad57620022ad600080fd5b6000620022bb888862001cb9565b955050602086013567ffffffffffffffff811115620022dd57620022dd600080fd5b620022eb8882890162001e09565b9450945050604086013567ffffffffffffffff8111156200230f576200230f600080fd5b6200231d8882890162001e09565b92509250509295509295909350565b60006200233a8383620021f0565b9392505050565b60200190565b600062002352825190565b808452602084019350836020820285016200236d8560200190565b60005b84811015620023a557838303885281516200238c84826200232c565b9350506020820160209890980197915060010162002370565b50909695505050505050565b602080825281016200233a818462002347565b604081016200227c82856200205a565b602080825281016200233a8184620021f0565b6000620015a26001600160a01b03831662002400565b90565b6001600160a01b031690565b6000620015a282620023e7565b6000620015a2826200240c565b62001b6a8162002419565b60208101620015a2828462002426565b600060208284031215620024585762002458600080fd5b813567ffffffffffffffff811115620024745762002474600080fd5b62001c888482850162001de1565b80151562001cad565b8035620015a28162002482565b600080600080600060a08688031215620024b557620024b5600080fd5b6000620024c3888862001cb9565b9550506020620024d68882890162001cb9565b945050604086013567ffffffffffffffff811115620024f857620024f8600080fd5b620025068882890162001c60565b935050606086013567ffffffffffffffff811115620025285762002528600080fd5b620025368882890162001c60565b925050608062002549888289016200248b565b9150509295509295909350565b600080602083850312156200256e576200256e600080fd5b823567ffffffffffffffff8111156200258a576200258a600080fd5b620025988582860162001e09565b92509250509250929050565b6000620025af825190565b620025bf818560208601620021ca565b9290920192915050565b620015a28183620025a4565b634e487b7160e01b600052602260045260246000fd5b6002810460018216806200260057607f821691505b60208210810362001f655762001f65620025d5565b6000620015a2620023fd8381565b6200262e8362002615565b815460001960089490940293841b1916921b91909117905550565b60006200265881848462002623565b505050565b8181101562000539576200267360008262002649565b6001016200265d565b601f82111562002658576000818152602090206020601f85010481016020851015620026a55750805b620011016020601f8601048301826200265d565b815167ffffffffffffffff811115620026d657620026d662001b80565b620026e28254620025eb565b620026ef8282856200267c565b506020601f8211600181146200272757600083156200270e5750848201515b600019600885021c198116600285021785555062001101565b600084815260208120601f198516915b8281101562002759578785015182556020948501946001909201910162002737565b5084821015620027775783870151600019601f87166008021c191681555b50505050600202600101905550565b60408082528101620027998185620021f0565b90506200233a6020830184620020b4565b600e8152602081017f496e76616c696420666f726b49440000000000000000000000000000000000008152905062002341565b60208082528101620015a281620027aa565b6000620027fa825190565b80845260208401935083602082028501620028158560200190565b60005b84811015620023a557838303885281516200283484826200232c565b9350506020820160209890980197915060010162002818565b608081016200285d828762001b68565b6200286c602083018662001b68565b6200287b604083018562001b68565b81810360608301526200288f8184620027ef565b9695505050505050565b60168152602081017f656e636c6176654944206e6f74206174746573746564000000000000000000008152905062002341565b60208082528101620015a28162002899565b634e487b7160e01b600052603260045260246000fd5b6000620015a2825190565b60006200290a825190565b602083016200291981620028f4565b925050602081101562001f65576000196020919091036008021b16919050565b6040810162002949828562001b68565b6200233a602083018462001b68565b634e487b7160e01b600052601160045260246000fd5b60006001820162002983576200298362002958565b5060010190565b6000808335601e1936859003018112620029a757620029a7600080fd5b8301915050803567ffffffffffffffff811115620029c857620029c8600080fd5b60208201915060018102360382131562001e5a5762001e5a600080fd5b60198152602081017f656e636c6176654944206e6f7420612073657175656e636572000000000000008152905062002341565b60208082528101620015a281620029e5565b506000620015a2602083018362001cb9565b506000620015a2602083018362001d2c565b67ffffffffffffffff811662001cad565b8035620015a28162002a4e565b506000620015a2602083018362002a5f565b67ffffffffffffffff811662001b6a565b62002a9b818062002a2a565b62002aa78382620020b4565b5062002ab7602082018262002a2a565b62002ac66020840182620020b4565b5062002ad6604082018262002a3c565b62002ae5604084018262001b68565b5062002af5606082018262002a6c565b62002658606084018262002a7e565b82818337505050565b81835260208301925060007f07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff83111562002b4a5762002b4a600080fd5b60208302925062002b5d83858462002b04565b50500190565b60c0810162002b73828762002a8f565b818103608083015262002b8881858762002b0d565b905062002b9960a083018462001b68565b95945050505050565b60808101620015a2828462002a8f565b60188152602081017f7769746864726177616c20616c7265616479207370656e7400000000000000008152905062002341565b60208082528101620015a28162002bb2565b60408101620029498285620020b4565b60228152602081017f6e6574776f726b2073656372657420616c726561647920696e697469616c697a81527f6564000000000000000000000000000000000000000000000000000000000000602082015290505b60400190565b60208082528101620015a28162002c07565b600067ffffffffffffffff8216620015a2565b62001b6a8162002c73565b60208101620015a2828462002c86565b60238152602081017f726573706f6e64696e67206174746573746572206973206e6f7420617474657381527f74656400000000000000000000000000000000000000000000000000000000006020820152905062002c5b565b60208082528101620015a28162002ca1565b6000620015a28260601b90565b6000620015a28262002d0c565b62001b6a62002d358262001c90565b62002d19565b62002d47818562002d26565b60140162002d56818462002d26565b60140162001c888183620025a4565b602c8152602081017f63616c63756c61746564206164647265737320616e642061747465737465724981527f4420646f6e74206d6174636800000000000000000000000000000000000000006020820152905062002c5b565b60208082528101620015a28162002d65565b60008135620015a28162001d25565b600081620015a2565b62002df38262002ddf565b62002e02620023fd8262002ddf565b8255505050565b8267ffffffffffffffff81111562002e255762002e2562001b80565b62002e318254620025eb565b62002e3e8282856200267c565b506000601f82116001811462002e76576000831562002e5d5750848201355b600019600885021c198116600285021785555062002ed3565b600084815260209020601f19841690835b8281101562002ea9578785013582556020948501946001909201910162002e87565b508482101562002ec757600019601f86166008021c19848801351681555b50506001600284020184555b505050505050565b6200265883838362002e09565b62002ef38262002615565b8062002e02565b80828062002f088162002dd0565b905062002f16818462002de8565b505050600181016020830162002f2d81856200298a565b915062002f3c82828562002edb565b50505060028101604083018062002f538262002dd0565b905062001101818462002ee8565b62000539828262002efa565b81810381811115620015a257620015a262002958565b7f19457468657265756d205369676e6564204d6573736167653a0a0000000000008152601a0162002fb58184620025a4565b90506200233a8183620025a4565b634e487b7160e01b600052602160045260246000fd5b60ff811662001b6a565b6080810162002ff3828762001b68565b62003002602083018662002fd9565b62003011604083018562001b68565b62002b99606083018462001b6856fe60806040523480156200001157600080fd5b50338062000040576000604051631e4fbdf760e01b8152600401620000379190620000c6565b60405180910390fd5b6200004b8162000052565b50620000d6565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60006001600160a01b0382165b92915050565b620000c081620000a2565b82525050565b60208101620000af8284620000b5565b611bea80620000e66000396000f3fe6080604052600436106100e15760003560e01c80639730886d1161007f578063b201246f11610059578063b201246f146102d4578063b6aed0cb146102f4578063e138a8d214610314578063f2fde38b1461033457610155565b80639730886d1461026757806399a3ad2114610287578063b1454caa146102a757610155565b8063346633fb116100bb578063346633fb146101f957806336d2da901461020c578063715018a61461022c5780638da5cb5b1461024157610155565b80630fcfbd11146101765780630fe9188e146101ac57806333a88c72146101cc57610155565b36610155576040517f346633fb000000000000000000000000000000000000000000000000000000008152309063346633fb9034906101269033908390600401610b86565b6000604051808303818588803b15801561013f57600080fd5b505af1158015610153573d6000803e3d6000fd5b005b60405162461bcd60e51b815260040161016d90610bd5565b60405180910390fd5b34801561018257600080fd5b50610196610191366004610c00565b610354565b6040516101a39190610c3b565b60405180910390f35b3480156101b857600080fd5b506101536101c7366004610c61565b6103b4565b3480156101d857600080fd5b506101ec6101e7366004610c00565b6103fa565b6040516101a39190610c8a565b610153610207366004610cac565b61044d565b34801561021857600080fd5b50610153610227366004610ce9565b6104d7565b34801561023857600080fd5b50610153610556565b34801561024d57600080fd5b506000546001600160a01b03166040516101a39190610d0a565b34801561027357600080fd5b50610153610282366004610d18565b61056a565b34801561029357600080fd5b506101536102a2366004610cac565b610666565b3480156102b357600080fd5b506102c76102c2366004610dd1565b6106e6565b6040516101a39190610e65565b3480156102e057600080fd5b506101536102ef366004610ed3565b61073f565b34801561030057600080fd5b5061015361030f366004610f43565b610840565b34801561032057600080fd5b5061015361032f366004610f65565b610886565b34801561034057600080fd5b5061015361034f366004610ce9565b610965565b600080826040516020016103689190611182565b60408051601f19818403018152918152815160209283012060008181526001909352912054909150806103ad5760405162461bcd60e51b815260040161016d906111d1565b9392505050565b6103bc6109bc565b60008181526004602052604081205490036103e95760405162461bcd60e51b815260040161016d90611213565b600090815260046020526040812055565b6000808260405160200161040e9190611182565b60408051601f1981840301815291815281516020928301206000818152600190935291205490915080158015906104455750428111155b949350505050565b60003411801561045c57508034145b6104785760405162461bcd60e51b815260040161016d9061127b565b600061048333610a02565b9050826001600160a01b0316336001600160a01b03167f50c536ac33a920f00755865b831d17bf4cff0b2e0345f65b16d52bfc004068b634846040516104ca92919061128b565b60405180910390a3505050565b6104df6109bc565b6000816001600160a01b03164760405160006040518083038185875af1925050503d806000811461052c576040519150601f19603f3d011682016040523d82523d6000602084013e610531565b606091505b50509050806105525760405162461bcd60e51b815260040161016d906112d8565b5050565b61055e6109bc565b6105686000610a60565b565b6105726109bc565b600061057e82426112fe565b90506000836040516020016105939190611182565b60408051601f19818403018152918152815160209283012060008181526001909352912054909150156105d85760405162461bcd60e51b815260040161016d90611369565b60008181526001602090815260408220849055600291906105fb90870187610ce9565b6001600160a01b0316815260208101919091526040016000908120906106276080870160608801611379565b63ffffffff1681526020808201929092526040016000908120805460018101825590825291902085916004020161065e82826117e0565b505050505050565b61066e6109bc565b6000826001600160a01b03168260405160006040518083038185875af1925050503d80600081146106bb576040519150601f19603f3d011682016040523d82523d6000602084013e6106c0565b606091505b50509050806106e15760405162461bcd60e51b815260040161016d906112d8565b505050565b60006106f133610a02565b90507fb93c37389233beb85a3a726c3f15c2d15533ee74cb602f20f490dfffef7759373382888888888860405161072e97969594939291906117ea565b60405180910390a195945050505050565b600081815260046020526040812054900361076c5760405162461bcd60e51b815260040161016d906118a5565b60008181526004602052604090205442101561079a5760405162461bcd60e51b815260040161016d906118f1565b6000846040516020016107ad9190611976565b604051602081830303815290604052805190602001206040516020016107d391906119b6565b60405160208183030381529060405280519060200120905061081d8484848460405160200161080291906119d5565b60405160208183030381529060405280519060200120610ac8565b6108395760405162461bcd60e51b815260040161016d90611a3f565b5050505050565b6108486109bc565b600082815260046020526040902054156108745760405162461bcd60e51b815260040161016d90611aa7565b60009182526004602052604090912055565b60008181526004602052604081205490036108b35760405162461bcd60e51b815260040161016d906118a5565b6000818152600460205260409020544210156108e15760405162461bcd60e51b815260040161016d906118f1565b6000846040516020016108f49190611182565b6040516020818303038152906040528051906020012060405160200161091a9190611ae9565b6040516020818303038152906040528051906020012090506109498484848460405160200161080291906119d5565b6108395760405162461bcd60e51b815260040161016d90611b51565b61096d6109bc565b6001600160a01b0381166109b05760006040517f1e4fbdf700000000000000000000000000000000000000000000000000000000815260040161016d9190610d0a565b6109b981610a60565b50565b6000546001600160a01b0316331461056857336040517f118cdaa700000000000000000000000000000000000000000000000000000000815260040161016d9190610d0a565b6001600160a01b0381166000908152600360205260408120805467ffffffffffffffff169160019190610a358385611b61565b92506101000a81548167ffffffffffffffff021916908367ffffffffffffffff160217905550919050565b600080546001600160a01b038381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b600082610ad6868685610ae0565b1495945050505050565b600081815b84811015610b2357610b0f82878784818110610b0357610b03611b85565b90506020020135610b2c565b915080610b1b81611b9b565b915050610ae5565b50949350505050565b6000818310610b48576000828152602084905260409020610b57565b60008381526020839052604090205b90505b92915050565b60006001600160a01b038216610b5a565b610b7a81610b60565b82525050565b80610b7a565b60408101610b948285610b71565b6103ad6020830184610b80565b600b8152602081017f756e737570706f72746564000000000000000000000000000000000000000000815290505b60200190565b60208082528101610b5a81610ba1565b600060c08284031215610bfa57610bfa600080fd5b50919050565b600060208284031215610c1557610c15600080fd5b813567ffffffffffffffff811115610c2f57610c2f600080fd5b61044584828501610be5565b60208101610b5a8284610b80565b805b81146109b957600080fd5b8035610b5a81610c49565b600060208284031215610c7657610c76600080fd5b60006104458484610c56565b801515610b7a565b60208101610b5a8284610c82565b610c4b81610b60565b8035610b5a81610c98565b60008060408385031215610cc257610cc2600080fd5b6000610cce8585610ca1565b9250506020610cdf85828601610c56565b9150509250929050565b600060208284031215610cfe57610cfe600080fd5b60006104458484610ca1565b60208101610b5a8284610b71565b60008060408385031215610d2e57610d2e600080fd5b823567ffffffffffffffff811115610d4857610d48600080fd5b610cce85828601610be5565b63ffffffff8116610c4b565b8035610b5a81610d54565b60008083601f840112610d8057610d80600080fd5b50813567ffffffffffffffff811115610d9b57610d9b600080fd5b602083019150836001820283011115610db657610db6600080fd5b9250929050565b60ff8116610c4b565b8035610b5a81610dbd565b600080600080600060808688031215610dec57610dec600080fd5b6000610df88888610d60565b9550506020610e0988828901610d60565b945050604086013567ffffffffffffffff811115610e2957610e29600080fd5b610e3588828901610d6b565b93509350506060610e4888828901610dc6565b9150509295509295909350565b67ffffffffffffffff8116610b7a565b60208101610b5a8284610e55565b600060808284031215610bfa57610bfa600080fd5b60008083601f840112610e9d57610e9d600080fd5b50813567ffffffffffffffff811115610eb857610eb8600080fd5b602083019150836020820283011115610db657610db6600080fd5b60008060008060c08587031215610eec57610eec600080fd5b6000610ef88787610e73565b945050608085013567ffffffffffffffff811115610f1857610f18600080fd5b610f2487828801610e88565b935093505060a0610f3787828801610c56565b91505092959194509250565b60008060408385031215610f5957610f59600080fd5b6000610cce8585610c56565b60008060008060608587031215610f7e57610f7e600080fd5b843567ffffffffffffffff811115610f9857610f98600080fd5b610fa487828801610be5565b945050602085013567ffffffffffffffff811115610fc457610fc4600080fd5b610fd087828801610e88565b93509350506040610f3787828801610c56565b506000610b5a6020830183610ca1565b67ffffffffffffffff8116610c4b565b8035610b5a81610ff3565b506000610b5a6020830183611003565b506000610b5a6020830183610d60565b63ffffffff8116610b7a565b6000808335601e193685900301811261105557611055600080fd5b830160208101925035905067ffffffffffffffff81111561107857611078600080fd5b36819003821315610db657610db6600080fd5b82818337506000910152565b8183526020830192506110ab82848361108b565b50601f01601f19160190565b506000610b5a6020830183610dc6565b60ff8116610b7a565b600060c083016110e08380610fe3565b6110ea8582610b71565b506110f8602084018461100e565b6111056020860182610e55565b50611113604084018461101e565b611120604086018261102e565b5061112e606084018461101e565b61113b606086018261102e565b50611149608084018461103a565b858303608087015261115c838284611097565b9250505061116d60a08401846110b7565b61117a60a08601826110c7565b509392505050565b60208082528101610b5781846110d0565b60218152602081017f54686973206d65737361676520776173206e65766572207375626d69747465648152601760f91b602082015290505b60400190565b60208082528101610b5a81611193565b601a8152602081017f537461746520726f6f7420646f6573206e6f742065786973742e00000000000081529050610bcf565b60208082528101610b5a816111e1565b60308152602081017f417474656d7074696e6720746f2073656e642076616c756520776974686f757481527f2070726f766964696e6720457468657200000000000000000000000000000000602082015290506111cb565b60208082528101610b5a81611223565b604081016112998285610b80565b6103ad6020830184610e55565b60148152602081017f6661696c65642073656e64696e672076616c756500000000000000000000000081529050610bcf565b60208082528101610b5a816112a6565b634e487b7160e01b600052601160045260246000fd5b80820180821115610b5a57610b5a6112e8565b60218152602081017f4d657373616765207375626d6974746564206d6f7265207468616e206f6e636581527f2100000000000000000000000000000000000000000000000000000000000000602082015290506111cb565b60208082528101610b5a81611311565b60006020828403121561138e5761138e600080fd5b60006104458484610d60565b60008135610b5a81610c98565b60006001600160a01b03835b81169019929092169190911792915050565b6000610b5a6001600160a01b0383166113dc565b90565b6001600160a01b031690565b6000610b5a826113c5565b6000610b5a826113e8565b611407826113f3565b6114128183546113a7565b8255505050565b60008135610b5a81610ff3565b60007bffffffffffffffff00000000000000000000000000000000000000006113b38460a01b90565b600067ffffffffffffffff8216610b5a565b61146a8261144f565b611412818354611426565b60008135610b5a81610d54565b60007fffffffff000000000000000000000000000000000000000000000000000000006113b38460e01b90565b600063ffffffff8216610b5a565b6114c6826114af565b611412818354611482565b600063ffffffff836113b3565b6114e7826114af565b6114128183546114d1565b6000808335601e193685900301811261150d5761150d600080fd5b8301915050803567ffffffffffffffff81111561152c5761152c600080fd5b602082019150600181023603821315610db657610db6600080fd5b634e487b7160e01b600052604160045260246000fd5b634e487b7160e01b600052602260045260246000fd5b60028104600182168061158757607f821691505b602082108103610bfa57610bfa61155d565b6000610b5a6113d98381565b6115ae83611599565b815460001960089490940293841b1916921b91909117905550565b60006106e18184846115a5565b81811015610552576115e96000826115c9565b6001016115d6565b601f8211156106e1576000818152602090206020601f850104810160208510156116185750805b6108396020601f8601048301826115d6565b8267ffffffffffffffff81111561164357611643611547565b61164d8254611573565b6116588282856115f1565b506000601f82116001811461168d57600083156116755750848201355b600019600885021c198116600285021785555061065e565b600084815260209020601f19841690835b828110156116be578785013582556020948501946001909201910161169e565b50848210156116db57600019601f86166008021c19848801351681555b5050505060020260010190555050565b6106e183838361162a565b60008135610b5a81610dbd565b600060ff836113b3565b600060ff8216610b5a565b6117218261170d565b611412818354611703565b8082806117388161139a565b905061174481846113fe565b5050602083018061175482611419565b90506117608184611461565b5050604083018061177082611475565b905061177c81846114bd565b50505060018101606083018061179182611475565b905061179d81846114de565b50505060028101608083016117b281856114f2565b91506117bf8282856116eb565b5050506003810160a08301806117d4826116f6565b90506108398184611718565b610552828261172c565b60c081016117f8828a610b71565b6118056020830189610e55565b611812604083018861102e565b61181f606083018761102e565b8181036080830152611832818587611097565b905061184160a08301846110c7565b98975050505050505050565b602a8152602081017f526f6f74206973206e6f74207075626c6973686564206f6e2074686973206d6581527f7373616765206275732e00000000000000000000000000000000000000000000602082015290506111cb565b60208082528101610b5a8161184d565b60218152602081017f526f6f74206973206e6f7420636f6e736964657265642066696e616c207965748152601760f91b602082015290506111cb565b60208082528101610b5a816118b5565b506000610b5a6020830183610c56565b61191b8180610fe3565b6119258382610b71565b506119336020820182610fe3565b6119406020840182610b71565b5061194e6040820182611901565b61195b6040840182610b80565b50611969606082018261100e565b6106e16060840182610e55565b60808101610b5a8284611911565b60018152602081017f760000000000000000000000000000000000000000000000000000000000000081529050610bcf565b604080825281016119c681611984565b9050610b5a6020830184610b80565b6119df8183610b80565b602001919050565b60338152602081017f496e76616c696420696e636c7573696f6e2070726f6f6620666f722076616c7581527f65207472616e73666572206d6573736167652e00000000000000000000000000602082015290506111cb565b60208082528101610b5a816119e7565b60258152602081017f526f6f7420616c726561647920616464656420746f20746865206d657373616781527f6520627573000000000000000000000000000000000000000000000000000000602082015290506111cb565b60208082528101610b5a81611a4f565b60018152602081017f6d0000000000000000000000000000000000000000000000000000000000000081529050610bcf565b604080825281016119c681611ab7565b60308152602081017f496e76616c696420696e636c7573696f6e2070726f6f6620666f722063726f7381527f7320636861696e206d6573736167652e00000000000000000000000000000000602082015290506111cb565b60208082528101610b5a81611af9565b67ffffffffffffffff918216919081169082820190811115610b5a57610b5a6112e8565b634e487b7160e01b600052603260045260246000fd5b600060018201611bad57611bad6112e8565b506001019056fea2646970667358221220c8293ff525ddcfd01a52b0bf26c4071757f9277603389aebc8011c7267aa4e7064736f6c63430008140033a26469706673582212206b17a368e4239a29edb4a68cfa5b61f21f9cf204c6920f230bc657c463a0b7de64736f6c63430008140033", + 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\":\"\",\"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: "0x608060405234801561001057600080fd5b5061001a3361001f565b610090565b7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c19930080546001600160a01b031981166001600160a01b03848116918217845560405192169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3505050565b614d2680620000a06000396000f3fe60806040523480156200001157600080fd5b5060043610620002005760003560e01c8063728109961162000119578063a1a227fa11620000af578063db5d91b1116200007a578063db5d91b114620004f9578063e34fbfc81462000528578063e874eb20146200053d578063f2fde38b146200055157600080fd5b8063a1a227fa1462000497578063a4ab2faa14620004ba578063a52f433c14620004d1578063d4fab88714620004e257600080fd5b80638415482611620000f057806384154826146200040357806387059edb14620004295780638da5cb5b146200044057806398077e86146200047157600080fd5b80637281099614620003c85780638129fc1c14620003d25780638236a7ba14620003dc57600080fd5b8063440c953b116200019b57806368e10383116200016657806368e1038314620003775780636a30d26c146200038e5780636b9707d614620003a7578063715018a614620003be57600080fd5b8063440c953b14620003185780634766573814620003225780635371a2161462000339578063568699c8146200035057600080fd5b80632c77c81f11620001dc5780632c77c81f14620002575780632f0cb9e3146200026e5780633e60a22f14620002a357806343348b2f14620002e957600080fd5b80620ddd27146200020557806303e72e481462000227578063073b6ef31462000240575b600080fd5b6200020f600e5481565b6040516200021e919062001b70565b60405180910390f35b6200023e6200023836600462001cc6565b62000568565b005b6200023e6200025136600462001e61565b6200067b565b6200023e6200026836600462001f82565b62000899565b620002946200027f36600462002035565b600c6020526000908152604090205460ff1681565b6040516200021e919062002063565b620002da620002b436600462002073565b80516020818301810180516003825292820191909301209152546001600160a01b031681565b6040516200021e9190620020bf565b62000294620002fa366004620020cf565b6001600160a01b031660009081526020819052604090205460ff1690565b6200020f60055481565b6200023e62000333366004620020cf565b620009b1565b6200023e6200034a3660046200215c565b62000a58565b620003676200036136600462002035565b62000c0e565b6040516200021e9291906200226c565b6200023e6200038836600462002290565b62000c67565b6200039862000d01565b6040516200021e9190620023b1565b6200023e620003b8366004620020cf565b62000de4565b6200023e62000e7b565b6200023e62000e93565b6200023e62000f1e565b620003f3620003ed36600462002035565b62001108565b6040516200021e929190620023c4565b620002946200041436600462002035565b600d6020526000908152604090205460ff1681565b620003f36200043a36600462002035565b620011f8565b7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300546001600160a01b0316620002da565b620004886200048236600462002035565b62001272565b6040516200021e9190620023d4565b600a54620004ab906001600160a01b031681565b6040516200021e919062002431565b62000294620004cb36600462002441565b62001327565b600454610100900460ff1662000294565b6200023e620004f336600462002498565b620013b9565b620002946200050a366004620020cf565b6001600160a01b031660009081526001602052604090205460ff1690565b6200023e6200053936600462002556565b5050565b600b54620004ab906001600160a01b031681565b6200023e62000562366004620020cf565b620014a2565b6200057262001500565b60006001600160a01b03166003836040516200058f9190620025c9565b908152604051908190036020019020546001600160a01b031603620005ee57600280546001810182556000919091527f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace01620005ec8382620026b9565b505b80600383604051620006019190620025c9565b90815260405190819003602001812080546001600160a01b039390931673ffffffffffffffffffffffffffffffffffffffff19909316929092179091557f17b2f9f5748931099ffee882b5b64f4a560b5c55da9b4f4e396dae3bb9f98cb5906200066f908490849062002786565b60405180910390a15050565b6000828152600860205260409020548114620006b45760405162461bcd60e51b8152600401620006ab90620027dd565b60405180910390fd5b60006200072689898989604051602001620006d394939291906200284d565b6040516020818303038152906040528051906020012086868080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506200157892505050565b6001600160a01b03811660009081526020819052604090205490915060ff16620007645760405162461bcd60e51b8152600401620006ab90620028cc565b600e8990556000805b87518110156200087457600b5488516001600160a01b039091169063b6aed0cb908a9084908110620007a357620007a3620028de565b6020026020010151620007b690620028ff565b426040518363ffffffff1660e01b8152600401620007d692919062002939565b600060405180830381600087803b158015620007f157600080fd5b505af115801562000806573d6000803e3d6000fd5b5050505081888281518110620008205762000820620028de565b60200260200101516200083390620028ff565b6040516020016200084692919062002939565b60405160208183030381529060405280519060200120915080806200086b906200296e565b9150506200076d565b506000908152600d60205260409020805460ff19166001179055505050505050505050565b6000620008eb8535620008b060208801886200298a565b8080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506200157892505050565b6001600160a01b03811660009081526020819052604090205490915060ff16620009295760405162461bcd60e51b8152600401620006ab90620028cc565b6001600160a01b03811660009081526001602052604090205460ff16620009645760405162461bcd60e51b8152600401620006ab9062002a18565b6200096f85620015a8565b6040517fd6555bff8670bd3008dc064c30bb56d6ac7cb14ae801e36146fe4e7c6a504a5890620009a29087359062001b70565b60405180910390a15050505050565b620009bb62001500565b6001600160a01b03811660009081526020819052604090205460ff16620009f65760405162461bcd60e51b8152600401620006ab90620028cc565b6001600160a01b038116600090815260016020819052604091829020805460ff19169091179055517ffe64c7181f0fc60e300dc02cca368cdfa94d7ca45902de3b9a9d80070e7609369062000a4d908390620020bf565b60405180910390a150565b600b546040517fb201246f0000000000000000000000000000000000000000000000000000000081526001600160a01b039091169063b201246f9062000aa990879087908790879060040162002b63565b60006040518083038186803b15801562000ac257600080fd5b505afa15801562000ad7573d6000803e3d6000fd5b5050505060008460405160200162000af0919062002ba2565b60408051601f1981840301815291815281516020928301206000818152600c90935291205490915060ff161562000b3b5760405162461bcd60e51b8152600401620006ab9062002be5565b6001600c60008760405160200162000b54919062002ba2565b60408051808303601f190181529181528151602092830120835282820193909352908201600020805460ff191693151593909317909255600a546001600160a01b0316916399a3ad219162000baf91908901908901620020cf565b87604001356040518363ffffffff1660e01b815260040162000bd392919062002bf7565b600060405180830381600087803b15801562000bee57600080fd5b505af115801562000c03573d6000803e3d6000fd5b505050505050505050565b60408051606080820183526000808352602083019190915291810182905260008062000c3a85620011f8565b915091508162000c505760009590945092505050565b600094855260086020526040909420549492505050565b60045460ff161562000c8d5760405162461bcd60e51b8152600401620006ab9062002c61565b60048054600160ff1991821681179092556001600160a01b0387166000908152602081815260408083208054851686179055908490529081902080549092169092179055517ffe64c7181f0fc60e300dc02cca368cdfa94d7ca45902de3b9a9d80070e76093690620009a2908790620020bf565b60606002805480602002602001604051908101604052809291908181526020016000905b8282101562000ddb57838290600052602060002001805462000d4790620025eb565b80601f016020809104026020016040519081016040528092919081815260200182805462000d7590620025eb565b801562000dc65780601f1062000d9a5761010080835404028352916020019162000dc6565b820191906000526020600020905b81548152906001019060200180831162000da857829003601f168201915b50505050508152602001906001019062000d25565b50505050905090565b62000dee62001500565b6001600160a01b03811660009081526001602052604090205460ff1662000e295760405162461bcd60e51b8152600401620006ab9062002a18565b6001600160a01b03811660009081526001602052604090819020805460ff19169055517f0f279980343c7ca542fde9fa5396555068efb5cd560d9cf9c191aa2911079b479062000a4d908390620020bf565b62000e8562001500565b62000e91600062001655565b565b62000e9d62001500565b600a546040517f36d2da900000000000000000000000000000000000000000000000000000000081526001600160a01b03909116906336d2da909062000ee8903390600401620020bf565b600060405180830381600087803b15801562000f0357600080fd5b505af115801562000f18573d6000803e3d6000fd5b50505050565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00805468010000000000000000810460ff16159067ffffffffffffffff1660008115801562000f6a5750825b905060008267ffffffffffffffff16600114801562000f885750303b155b90508115801562000f97575080155b1562000fcf576040517ff92ee8a900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b845467ffffffffffffffff1916600117855583156200100457845468ff00000000000000001916680100000000000000001785555b6200100f33620016d3565b60006005556001600955604051620010279062001b5a565b604051809103906000f08015801562001044573d6000803e3d6000fd5b50600b80546001600160a01b039290921673ffffffffffffffffffffffffffffffffffffffff199283168117909155600a805490921681179091556040517fbd726cf82ac9c3260b1495107182e336e0654b25c10915648c0cc15b2bb72cbf91620010af91620020bf565b60405180910390a183156200110157845468ff0000000000000000191685556040517fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d290620009a29060019062002c91565b5050505050565b6040805160608082018352600080835260208084018390528385018290528582526006815284822085519384019095528454835260018501805492958694939092840191906200115890620025eb565b80601f01602080910402602001604051908101604052809291908181526020018280546200118690620025eb565b8015620011d75780601f10620011ab57610100808354040283529160200191620011d7565b820191906000526020600020905b815481529060010190602001808311620011b957829003601f168201915b50505091835250506002919091015460209091015280519094149492505050565b604080516060808201835260008083526020830191909152918101829052600083815260076020526040812054908190036200125d57505060408051606081018252600080825282516020818101855282825283015291810182905290939092509050565b620012688162001108565b9250925050915091565b600281815481106200128357600080fd5b906000526020600020016000915090508054620012a090620025eb565b80601f0160208091040260200160405190810160405280929190818152602001828054620012ce90620025eb565b80156200131f5780601f10620012f3576101008083540402835291602001916200131f565b820191906000526020600020905b8154815290600101906020018083116200130157829003601f168201915b505050505081565b600080805b8351811015620013a057818482815181106200134c576200134c620028de565b60200260200101516200135f90620028ff565b6040516020016200137292919062002939565b604051602081830303815290604052805190602001209150808062001397906200296e565b9150506200132c565b506000908152600d602052604090205460ff1692915050565b6001600160a01b03851660009081526020819052604090205460ff1680620013f55760405162461bcd60e51b8152600401620006ab9062002cfa565b8115620014775760006200142e878786604051602001620014199392919062002d3b565b604051602081830303815290604052620016e8565b905060006200143e828762001578565b9050876001600160a01b0316816001600160a01b031614620014745760405162461bcd60e51b8152600401620006ab9062002dbe565b50505b5050506001600160a01b039091166000908152602081905260409020805460ff191660011790555050565b620014ac62001500565b6001600160a01b038116620014f25760006040517f1e4fbdf7000000000000000000000000000000000000000000000000000000008152600401620006ab9190620020bf565b620014fd8162001655565b50565b33620015337f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300546001600160a01b031690565b6001600160a01b03161462000e9157336040517f118cdaa7000000000000000000000000000000000000000000000000000000008152600401620006ab9190620020bf565b6000806000806200158a868662001727565b9250925092506200159c828262001778565b50909150505b92915050565b803560009081526006602052604090208190620015c6828262002f61565b50506009546000908152600760205260409020813590819055620015ec60014362002f6d565b406040516020016200160092919062002939565b60408051601f19818403018152918152815160209283012060098054600090815260089094529183205580549162001638836200296e565b919050555060055481604001351115620014fd5760400135600555565b7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300805473ffffffffffffffffffffffffffffffffffffffff1981166001600160a01b03848116918217845560405192169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3505050565b620016dd6200188e565b620014fd81620018f6565b6000620016f6825162001900565b826040516020016200170a92919062002f83565b604051602081830303815290604052805190602001209050919050565b60008060008351604103620017655760208401516040850151606086015160001a6200175688828585620019a8565b95509550955050505062001771565b50508151600091506002905b9250925092565b60008260038111156200178f576200178f62002fc3565b0362001799575050565b6001826003811115620017b057620017b062002fc3565b03620017e8576040517ff645eedf00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6002826003811115620017ff57620017ff62002fc3565b036200183b576040517ffce698f7000000000000000000000000000000000000000000000000000000008152620006ab90829060040162001b70565b600382600381111562001852576200185262002fc3565b036200053957806040517fd78bce0c000000000000000000000000000000000000000000000000000000008152600401620006ab919062001b70565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a005468010000000000000000900460ff1662000e91576040517fd7e6bcf800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b620014ac6200188e565b606060006200190f8362001a71565b600101905060008167ffffffffffffffff81111562001932576200193262001b80565b6040519080825280601f01601f1916602001820160405280156200195d576020820181803683370190505b5090508181016020015b600019017f3031323334353637383961626364656600000000000000000000000000000000600a86061a8153600a850494508462001967575b509392505050565b600080807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0841115620019e5575060009150600390508262001a67565b60006001888888886040516000815260200160405260405162001a0c949392919062002fe3565b6020604051602081039080840390855afa15801562001a2f573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b03811662001a5d5750600092506001915082905062001a67565b9250600091508190505b9450945094915050565b6000807a184f03e93ff9f4daa797ed6e38ed64bf6a1f010000000000000000831062001abb577a184f03e93ff9f4daa797ed6e38ed64bf6a1f010000000000000000830492506040015b6d04ee2d6d415b85acef8100000000831062001ae8576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc10000831062001b0757662386f26fc10000830492506010015b6305f5e100831062001b20576305f5e100830492506008015b612710831062001b3557612710830492506004015b6064831062001b48576064830492506002015b600a8310620015a25760010192915050565b611cd0806200302183390190565b805b82525050565b60208101620015a2828462001b68565b634e487b7160e01b600052604160045260246000fd5b601f19601f830116810181811067ffffffffffffffff8211171562001bbf5762001bbf62001b80565b6040525050565b600062001bd260405190565b905062001be0828262001b96565b919050565b600067ffffffffffffffff82111562001c025762001c0262001b80565b601f19601f83011660200192915050565b82818337506000910152565b600062001c3662001c308462001be5565b62001bc6565b90508281526020810184848401111562001c535762001c53600080fd5b620019a084828562001c13565b600082601f83011262001c765762001c76600080fd5b813562001c8884826020860162001c1f565b949350505050565b60006001600160a01b038216620015a2565b62001cad8162001c90565b8114620014fd57600080fd5b8035620015a28162001ca2565b6000806040838503121562001cde5762001cde600080fd5b823567ffffffffffffffff81111562001cfa5762001cfa600080fd5b62001d088582860162001c60565b925050602062001d1b8582860162001cb9565b9150509250929050565b8062001cad565b8035620015a28162001d25565b600067ffffffffffffffff82111562001d565762001d5662001b80565b5060209081020190565b600062001d7162001c308462001d39565b8381529050602080820190840283018581111562001d925762001d92600080fd5b835b8181101562001dd757803567ffffffffffffffff81111562001db95762001db9600080fd5b850162001dc7888262001c60565b8452506020928301920162001d94565b5050509392505050565b600082601f83011262001df75762001df7600080fd5b813562001c8884826020860162001d60565b60008083601f84011262001e205762001e20600080fd5b50813567ffffffffffffffff81111562001e3d5762001e3d600080fd5b60208301915083600182028301111562001e5a5762001e5a600080fd5b9250929050565b60008060008060008060008060e0898b03121562001e825762001e82600080fd5b600062001e908b8b62001d2c565b985050602062001ea38b828c0162001d2c565b975050604062001eb68b828c0162001d2c565b965050606089013567ffffffffffffffff81111562001ed85762001ed8600080fd5b62001ee68b828c0162001de1565b955050608089013567ffffffffffffffff81111562001f085762001f08600080fd5b62001f168b828c0162001e09565b945094505060a062001f2b8b828c0162001d2c565b92505060c062001f3e8b828c0162001d2c565b9150509295985092959890939650565b60006060828403121562001f655762001f65600080fd5b50919050565b60006020828403121562001f655762001f65600080fd5b6000806000806060858703121562001f9d5762001f9d600080fd5b843567ffffffffffffffff81111562001fb95762001fb9600080fd5b62001fc78782880162001f4e565b945050602085013567ffffffffffffffff81111562001fe95762001fe9600080fd5b62001ff78782880162001e09565b9350935050604085013567ffffffffffffffff8111156200201b576200201b600080fd5b620020298782880162001f6b565b91505092959194509250565b6000602082840312156200204c576200204c600080fd5b600062001c88848462001d2c565b80151562001b6a565b60208101620015a282846200205a565b6000602082840312156200208a576200208a600080fd5b813567ffffffffffffffff811115620020a657620020a6600080fd5b62001c888482850162001c60565b62001b6a8162001c90565b60208101620015a28284620020b4565b600060208284031215620020e657620020e6600080fd5b600062001c88848462001cb9565b60006080828403121562001f655762001f65600080fd5b60008083601f840112620021225762002122600080fd5b50813567ffffffffffffffff8111156200213f576200213f600080fd5b60208301915083602082028301111562001e5a5762001e5a600080fd5b60008060008060c08587031215620021775762002177600080fd5b6000620021858787620020f4565b945050608085013567ffffffffffffffff811115620021a757620021a7600080fd5b620021b5878288016200210b565b935093505060a0620020298782880162001d2c565b60005b83811015620021e7578181015183820152602001620021cd565b50506000910152565b6000620021fb825190565b80845260208401935062002214818560208601620021ca565b601f01601f19169290920192915050565b805160009060608401906200223b858262001b68565b5060208301518482036020860152620022558282620021f0565b9150506040830151620019a0604086018262001b68565b604081016200227c828562001b68565b818103602083015262001c88818462002225565b600080600080600060608688031215620022ad57620022ad600080fd5b6000620022bb888862001cb9565b955050602086013567ffffffffffffffff811115620022dd57620022dd600080fd5b620022eb8882890162001e09565b9450945050604086013567ffffffffffffffff8111156200230f576200230f600080fd5b6200231d8882890162001e09565b92509250509295509295909350565b60006200233a8383620021f0565b9392505050565b60200190565b600062002352825190565b808452602084019350836020820285016200236d8560200190565b60005b84811015620023a557838303885281516200238c84826200232c565b9350506020820160209890980197915060010162002370565b50909695505050505050565b602080825281016200233a818462002347565b604081016200227c82856200205a565b602080825281016200233a8184620021f0565b6000620015a26001600160a01b03831662002400565b90565b6001600160a01b031690565b6000620015a282620023e7565b6000620015a2826200240c565b62001b6a8162002419565b60208101620015a2828462002426565b600060208284031215620024585762002458600080fd5b813567ffffffffffffffff811115620024745762002474600080fd5b62001c888482850162001de1565b80151562001cad565b8035620015a28162002482565b600080600080600060a08688031215620024b557620024b5600080fd5b6000620024c3888862001cb9565b9550506020620024d68882890162001cb9565b945050604086013567ffffffffffffffff811115620024f857620024f8600080fd5b620025068882890162001c60565b935050606086013567ffffffffffffffff811115620025285762002528600080fd5b620025368882890162001c60565b925050608062002549888289016200248b565b9150509295509295909350565b600080602083850312156200256e576200256e600080fd5b823567ffffffffffffffff8111156200258a576200258a600080fd5b620025988582860162001e09565b92509250509250929050565b6000620025af825190565b620025bf818560208601620021ca565b9290920192915050565b620015a28183620025a4565b634e487b7160e01b600052602260045260246000fd5b6002810460018216806200260057607f821691505b60208210810362001f655762001f65620025d5565b6000620015a2620023fd8381565b6200262e8362002615565b815460001960089490940293841b1916921b91909117905550565b60006200265881848462002623565b505050565b8181101562000539576200267360008262002649565b6001016200265d565b601f82111562002658576000818152602090206020601f85010481016020851015620026a55750805b620011016020601f8601048301826200265d565b815167ffffffffffffffff811115620026d657620026d662001b80565b620026e28254620025eb565b620026ef8282856200267c565b506020601f8211600181146200272757600083156200270e5750848201515b600019600885021c198116600285021785555062001101565b600084815260208120601f198516915b8281101562002759578785015182556020948501946001909201910162002737565b5084821015620027775783870151600019601f87166008021c191681555b50505050600202600101905550565b60408082528101620027998185620021f0565b90506200233a6020830184620020b4565b600e8152602081017f496e76616c696420666f726b49440000000000000000000000000000000000008152905062002341565b60208082528101620015a281620027aa565b6000620027fa825190565b80845260208401935083602082028501620028158560200190565b60005b84811015620023a557838303885281516200283484826200232c565b9350506020820160209890980197915060010162002818565b608081016200285d828762001b68565b6200286c602083018662001b68565b6200287b604083018562001b68565b81810360608301526200288f8184620027ef565b9695505050505050565b60168152602081017f656e636c6176654944206e6f74206174746573746564000000000000000000008152905062002341565b60208082528101620015a28162002899565b634e487b7160e01b600052603260045260246000fd5b6000620015a2825190565b60006200290a825190565b602083016200291981620028f4565b925050602081101562001f65576000196020919091036008021b16919050565b6040810162002949828562001b68565b6200233a602083018462001b68565b634e487b7160e01b600052601160045260246000fd5b60006001820162002983576200298362002958565b5060010190565b6000808335601e1936859003018112620029a757620029a7600080fd5b8301915050803567ffffffffffffffff811115620029c857620029c8600080fd5b60208201915060018102360382131562001e5a5762001e5a600080fd5b60198152602081017f656e636c6176654944206e6f7420612073657175656e636572000000000000008152905062002341565b60208082528101620015a281620029e5565b506000620015a2602083018362001cb9565b506000620015a2602083018362001d2c565b67ffffffffffffffff811662001cad565b8035620015a28162002a4e565b506000620015a2602083018362002a5f565b67ffffffffffffffff811662001b6a565b62002a9b818062002a2a565b62002aa78382620020b4565b5062002ab7602082018262002a2a565b62002ac66020840182620020b4565b5062002ad6604082018262002a3c565b62002ae5604084018262001b68565b5062002af5606082018262002a6c565b62002658606084018262002a7e565b82818337505050565b81835260208301925060007f07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff83111562002b4a5762002b4a600080fd5b60208302925062002b5d83858462002b04565b50500190565b60c0810162002b73828762002a8f565b818103608083015262002b8881858762002b0d565b905062002b9960a083018462001b68565b95945050505050565b60808101620015a2828462002a8f565b60188152602081017f7769746864726177616c20616c7265616479207370656e7400000000000000008152905062002341565b60208082528101620015a28162002bb2565b60408101620029498285620020b4565b60228152602081017f6e6574776f726b2073656372657420616c726561647920696e697469616c697a81527f6564000000000000000000000000000000000000000000000000000000000000602082015290505b60400190565b60208082528101620015a28162002c07565b600067ffffffffffffffff8216620015a2565b62001b6a8162002c73565b60208101620015a2828462002c86565b60238152602081017f726573706f6e64696e67206174746573746572206973206e6f7420617474657381527f74656400000000000000000000000000000000000000000000000000000000006020820152905062002c5b565b60208082528101620015a28162002ca1565b6000620015a28260601b90565b6000620015a28262002d0c565b62001b6a62002d358262001c90565b62002d19565b62002d47818562002d26565b60140162002d56818462002d26565b60140162001c888183620025a4565b602c8152602081017f63616c63756c61746564206164647265737320616e642061747465737465724981527f4420646f6e74206d6174636800000000000000000000000000000000000000006020820152905062002c5b565b60208082528101620015a28162002d65565b60008135620015a28162001d25565b600081620015a2565b62002df38262002ddf565b62002e02620023fd8262002ddf565b8255505050565b8267ffffffffffffffff81111562002e255762002e2562001b80565b62002e318254620025eb565b62002e3e8282856200267c565b506000601f82116001811462002e76576000831562002e5d5750848201355b600019600885021c198116600285021785555062002ed3565b600084815260209020601f19841690835b8281101562002ea9578785013582556020948501946001909201910162002e87565b508482101562002ec757600019601f86166008021c19848801351681555b50506001600284020184555b505050505050565b6200265883838362002e09565b62002ef38262002615565b8062002e02565b80828062002f088162002dd0565b905062002f16818462002de8565b505050600181016020830162002f2d81856200298a565b915062002f3c82828562002edb565b50505060028101604083018062002f538262002dd0565b905062001101818462002ee8565b62000539828262002efa565b81810381811115620015a257620015a262002958565b7f19457468657265756d205369676e6564204d6573736167653a0a0000000000008152601a0162002fb58184620025a4565b90506200233a8183620025a4565b634e487b7160e01b600052602160045260246000fd5b60ff811662001b6a565b6080810162002ff3828762001b68565b62003002602083018662002fd9565b62003011604083018562001b68565b62002b99606083018462001b6856fe60806040523480156200001157600080fd5b50338062000040576000604051631e4fbdf760e01b8152600401620000379190620000c6565b60405180910390fd5b6200004b8162000052565b50620000d6565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60006001600160a01b0382165b92915050565b620000c081620000a2565b82525050565b60208101620000af8284620000b5565b611bea80620000e66000396000f3fe6080604052600436106100e15760003560e01c80639730886d1161007f578063b201246f11610059578063b201246f146102d4578063b6aed0cb146102f4578063e138a8d214610314578063f2fde38b1461033457610155565b80639730886d1461026757806399a3ad2114610287578063b1454caa146102a757610155565b8063346633fb116100bb578063346633fb146101f957806336d2da901461020c578063715018a61461022c5780638da5cb5b1461024157610155565b80630fcfbd11146101765780630fe9188e146101ac57806333a88c72146101cc57610155565b36610155576040517f346633fb000000000000000000000000000000000000000000000000000000008152309063346633fb9034906101269033908390600401610b86565b6000604051808303818588803b15801561013f57600080fd5b505af1158015610153573d6000803e3d6000fd5b005b60405162461bcd60e51b815260040161016d90610bd5565b60405180910390fd5b34801561018257600080fd5b50610196610191366004610c00565b610354565b6040516101a39190610c3b565b60405180910390f35b3480156101b857600080fd5b506101536101c7366004610c61565b6103b4565b3480156101d857600080fd5b506101ec6101e7366004610c00565b6103fa565b6040516101a39190610c8a565b610153610207366004610cac565b61044d565b34801561021857600080fd5b50610153610227366004610ce9565b6104d7565b34801561023857600080fd5b50610153610556565b34801561024d57600080fd5b506000546001600160a01b03166040516101a39190610d0a565b34801561027357600080fd5b50610153610282366004610d18565b61056a565b34801561029357600080fd5b506101536102a2366004610cac565b610666565b3480156102b357600080fd5b506102c76102c2366004610dd1565b6106e6565b6040516101a39190610e65565b3480156102e057600080fd5b506101536102ef366004610ed3565b61073f565b34801561030057600080fd5b5061015361030f366004610f43565b610840565b34801561032057600080fd5b5061015361032f366004610f65565b610886565b34801561034057600080fd5b5061015361034f366004610ce9565b610965565b600080826040516020016103689190611182565b60408051601f19818403018152918152815160209283012060008181526001909352912054909150806103ad5760405162461bcd60e51b815260040161016d906111d1565b9392505050565b6103bc6109bc565b60008181526004602052604081205490036103e95760405162461bcd60e51b815260040161016d90611213565b600090815260046020526040812055565b6000808260405160200161040e9190611182565b60408051601f1981840301815291815281516020928301206000818152600190935291205490915080158015906104455750428111155b949350505050565b60003411801561045c57508034145b6104785760405162461bcd60e51b815260040161016d9061127b565b600061048333610a02565b9050826001600160a01b0316336001600160a01b03167f50c536ac33a920f00755865b831d17bf4cff0b2e0345f65b16d52bfc004068b634846040516104ca92919061128b565b60405180910390a3505050565b6104df6109bc565b6000816001600160a01b03164760405160006040518083038185875af1925050503d806000811461052c576040519150601f19603f3d011682016040523d82523d6000602084013e610531565b606091505b50509050806105525760405162461bcd60e51b815260040161016d906112d8565b5050565b61055e6109bc565b6105686000610a60565b565b6105726109bc565b600061057e82426112fe565b90506000836040516020016105939190611182565b60408051601f19818403018152918152815160209283012060008181526001909352912054909150156105d85760405162461bcd60e51b815260040161016d90611369565b60008181526001602090815260408220849055600291906105fb90870187610ce9565b6001600160a01b0316815260208101919091526040016000908120906106276080870160608801611379565b63ffffffff1681526020808201929092526040016000908120805460018101825590825291902085916004020161065e82826117e0565b505050505050565b61066e6109bc565b6000826001600160a01b03168260405160006040518083038185875af1925050503d80600081146106bb576040519150601f19603f3d011682016040523d82523d6000602084013e6106c0565b606091505b50509050806106e15760405162461bcd60e51b815260040161016d906112d8565b505050565b60006106f133610a02565b90507fb93c37389233beb85a3a726c3f15c2d15533ee74cb602f20f490dfffef7759373382888888888860405161072e97969594939291906117ea565b60405180910390a195945050505050565b600081815260046020526040812054900361076c5760405162461bcd60e51b815260040161016d906118a5565b60008181526004602052604090205442101561079a5760405162461bcd60e51b815260040161016d906118f1565b6000846040516020016107ad9190611976565b604051602081830303815290604052805190602001206040516020016107d391906119b6565b60405160208183030381529060405280519060200120905061081d8484848460405160200161080291906119d5565b60405160208183030381529060405280519060200120610ac8565b6108395760405162461bcd60e51b815260040161016d90611a3f565b5050505050565b6108486109bc565b600082815260046020526040902054156108745760405162461bcd60e51b815260040161016d90611aa7565b60009182526004602052604090912055565b60008181526004602052604081205490036108b35760405162461bcd60e51b815260040161016d906118a5565b6000818152600460205260409020544210156108e15760405162461bcd60e51b815260040161016d906118f1565b6000846040516020016108f49190611182565b6040516020818303038152906040528051906020012060405160200161091a9190611ae9565b6040516020818303038152906040528051906020012090506109498484848460405160200161080291906119d5565b6108395760405162461bcd60e51b815260040161016d90611b51565b61096d6109bc565b6001600160a01b0381166109b05760006040517f1e4fbdf700000000000000000000000000000000000000000000000000000000815260040161016d9190610d0a565b6109b981610a60565b50565b6000546001600160a01b0316331461056857336040517f118cdaa700000000000000000000000000000000000000000000000000000000815260040161016d9190610d0a565b6001600160a01b0381166000908152600360205260408120805467ffffffffffffffff169160019190610a358385611b61565b92506101000a81548167ffffffffffffffff021916908367ffffffffffffffff160217905550919050565b600080546001600160a01b038381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b600082610ad6868685610ae0565b1495945050505050565b600081815b84811015610b2357610b0f82878784818110610b0357610b03611b85565b90506020020135610b2c565b915080610b1b81611b9b565b915050610ae5565b50949350505050565b6000818310610b48576000828152602084905260409020610b57565b60008381526020839052604090205b90505b92915050565b60006001600160a01b038216610b5a565b610b7a81610b60565b82525050565b80610b7a565b60408101610b948285610b71565b6103ad6020830184610b80565b600b8152602081017f756e737570706f72746564000000000000000000000000000000000000000000815290505b60200190565b60208082528101610b5a81610ba1565b600060c08284031215610bfa57610bfa600080fd5b50919050565b600060208284031215610c1557610c15600080fd5b813567ffffffffffffffff811115610c2f57610c2f600080fd5b61044584828501610be5565b60208101610b5a8284610b80565b805b81146109b957600080fd5b8035610b5a81610c49565b600060208284031215610c7657610c76600080fd5b60006104458484610c56565b801515610b7a565b60208101610b5a8284610c82565b610c4b81610b60565b8035610b5a81610c98565b60008060408385031215610cc257610cc2600080fd5b6000610cce8585610ca1565b9250506020610cdf85828601610c56565b9150509250929050565b600060208284031215610cfe57610cfe600080fd5b60006104458484610ca1565b60208101610b5a8284610b71565b60008060408385031215610d2e57610d2e600080fd5b823567ffffffffffffffff811115610d4857610d48600080fd5b610cce85828601610be5565b63ffffffff8116610c4b565b8035610b5a81610d54565b60008083601f840112610d8057610d80600080fd5b50813567ffffffffffffffff811115610d9b57610d9b600080fd5b602083019150836001820283011115610db657610db6600080fd5b9250929050565b60ff8116610c4b565b8035610b5a81610dbd565b600080600080600060808688031215610dec57610dec600080fd5b6000610df88888610d60565b9550506020610e0988828901610d60565b945050604086013567ffffffffffffffff811115610e2957610e29600080fd5b610e3588828901610d6b565b93509350506060610e4888828901610dc6565b9150509295509295909350565b67ffffffffffffffff8116610b7a565b60208101610b5a8284610e55565b600060808284031215610bfa57610bfa600080fd5b60008083601f840112610e9d57610e9d600080fd5b50813567ffffffffffffffff811115610eb857610eb8600080fd5b602083019150836020820283011115610db657610db6600080fd5b60008060008060c08587031215610eec57610eec600080fd5b6000610ef88787610e73565b945050608085013567ffffffffffffffff811115610f1857610f18600080fd5b610f2487828801610e88565b935093505060a0610f3787828801610c56565b91505092959194509250565b60008060408385031215610f5957610f59600080fd5b6000610cce8585610c56565b60008060008060608587031215610f7e57610f7e600080fd5b843567ffffffffffffffff811115610f9857610f98600080fd5b610fa487828801610be5565b945050602085013567ffffffffffffffff811115610fc457610fc4600080fd5b610fd087828801610e88565b93509350506040610f3787828801610c56565b506000610b5a6020830183610ca1565b67ffffffffffffffff8116610c4b565b8035610b5a81610ff3565b506000610b5a6020830183611003565b506000610b5a6020830183610d60565b63ffffffff8116610b7a565b6000808335601e193685900301811261105557611055600080fd5b830160208101925035905067ffffffffffffffff81111561107857611078600080fd5b36819003821315610db657610db6600080fd5b82818337506000910152565b8183526020830192506110ab82848361108b565b50601f01601f19160190565b506000610b5a6020830183610dc6565b60ff8116610b7a565b600060c083016110e08380610fe3565b6110ea8582610b71565b506110f8602084018461100e565b6111056020860182610e55565b50611113604084018461101e565b611120604086018261102e565b5061112e606084018461101e565b61113b606086018261102e565b50611149608084018461103a565b858303608087015261115c838284611097565b9250505061116d60a08401846110b7565b61117a60a08601826110c7565b509392505050565b60208082528101610b5781846110d0565b60218152602081017f54686973206d65737361676520776173206e65766572207375626d69747465648152601760f91b602082015290505b60400190565b60208082528101610b5a81611193565b601a8152602081017f537461746520726f6f7420646f6573206e6f742065786973742e00000000000081529050610bcf565b60208082528101610b5a816111e1565b60308152602081017f417474656d7074696e6720746f2073656e642076616c756520776974686f757481527f2070726f766964696e6720457468657200000000000000000000000000000000602082015290506111cb565b60208082528101610b5a81611223565b604081016112998285610b80565b6103ad6020830184610e55565b60148152602081017f6661696c65642073656e64696e672076616c756500000000000000000000000081529050610bcf565b60208082528101610b5a816112a6565b634e487b7160e01b600052601160045260246000fd5b80820180821115610b5a57610b5a6112e8565b60218152602081017f4d657373616765207375626d6974746564206d6f7265207468616e206f6e636581527f2100000000000000000000000000000000000000000000000000000000000000602082015290506111cb565b60208082528101610b5a81611311565b60006020828403121561138e5761138e600080fd5b60006104458484610d60565b60008135610b5a81610c98565b60006001600160a01b03835b81169019929092169190911792915050565b6000610b5a6001600160a01b0383166113dc565b90565b6001600160a01b031690565b6000610b5a826113c5565b6000610b5a826113e8565b611407826113f3565b6114128183546113a7565b8255505050565b60008135610b5a81610ff3565b60007bffffffffffffffff00000000000000000000000000000000000000006113b38460a01b90565b600067ffffffffffffffff8216610b5a565b61146a8261144f565b611412818354611426565b60008135610b5a81610d54565b60007fffffffff000000000000000000000000000000000000000000000000000000006113b38460e01b90565b600063ffffffff8216610b5a565b6114c6826114af565b611412818354611482565b600063ffffffff836113b3565b6114e7826114af565b6114128183546114d1565b6000808335601e193685900301811261150d5761150d600080fd5b8301915050803567ffffffffffffffff81111561152c5761152c600080fd5b602082019150600181023603821315610db657610db6600080fd5b634e487b7160e01b600052604160045260246000fd5b634e487b7160e01b600052602260045260246000fd5b60028104600182168061158757607f821691505b602082108103610bfa57610bfa61155d565b6000610b5a6113d98381565b6115ae83611599565b815460001960089490940293841b1916921b91909117905550565b60006106e18184846115a5565b81811015610552576115e96000826115c9565b6001016115d6565b601f8211156106e1576000818152602090206020601f850104810160208510156116185750805b6108396020601f8601048301826115d6565b8267ffffffffffffffff81111561164357611643611547565b61164d8254611573565b6116588282856115f1565b506000601f82116001811461168d57600083156116755750848201355b600019600885021c198116600285021785555061065e565b600084815260209020601f19841690835b828110156116be578785013582556020948501946001909201910161169e565b50848210156116db57600019601f86166008021c19848801351681555b5050505060020260010190555050565b6106e183838361162a565b60008135610b5a81610dbd565b600060ff836113b3565b600060ff8216610b5a565b6117218261170d565b611412818354611703565b8082806117388161139a565b905061174481846113fe565b5050602083018061175482611419565b90506117608184611461565b5050604083018061177082611475565b905061177c81846114bd565b50505060018101606083018061179182611475565b905061179d81846114de565b50505060028101608083016117b281856114f2565b91506117bf8282856116eb565b5050506003810160a08301806117d4826116f6565b90506108398184611718565b610552828261172c565b60c081016117f8828a610b71565b6118056020830189610e55565b611812604083018861102e565b61181f606083018761102e565b8181036080830152611832818587611097565b905061184160a08301846110c7565b98975050505050505050565b602a8152602081017f526f6f74206973206e6f74207075626c6973686564206f6e2074686973206d6581527f7373616765206275732e00000000000000000000000000000000000000000000602082015290506111cb565b60208082528101610b5a8161184d565b60218152602081017f526f6f74206973206e6f7420636f6e736964657265642066696e616c207965748152601760f91b602082015290506111cb565b60208082528101610b5a816118b5565b506000610b5a6020830183610c56565b61191b8180610fe3565b6119258382610b71565b506119336020820182610fe3565b6119406020840182610b71565b5061194e6040820182611901565b61195b6040840182610b80565b50611969606082018261100e565b6106e16060840182610e55565b60808101610b5a8284611911565b60018152602081017f760000000000000000000000000000000000000000000000000000000000000081529050610bcf565b604080825281016119c681611984565b9050610b5a6020830184610b80565b6119df8183610b80565b602001919050565b60338152602081017f496e76616c696420696e636c7573696f6e2070726f6f6620666f722076616c7581527f65207472616e73666572206d6573736167652e00000000000000000000000000602082015290506111cb565b60208082528101610b5a816119e7565b60258152602081017f526f6f7420616c726561647920616464656420746f20746865206d657373616781527f6520627573000000000000000000000000000000000000000000000000000000602082015290506111cb565b60208082528101610b5a81611a4f565b60018152602081017f6d0000000000000000000000000000000000000000000000000000000000000081529050610bcf565b604080825281016119c681611ab7565b60308152602081017f496e76616c696420696e636c7573696f6e2070726f6f6620666f722063726f7381527f7320636861696e206d6573736167652e00000000000000000000000000000000602082015290506111cb565b60208082528101610b5a81611af9565b67ffffffffffffffff918216919081169082820190811115610b5a57610b5a6112e8565b634e487b7160e01b600052603260045260246000fd5b600060018201611bad57611bad6112e8565b506001019056fea2646970667358221220c8293ff525ddcfd01a52b0bf26c4071757f9277603389aebc8011c7267aa4e7064736f6c63430008140033a264697066735822122011d7432176db9c4637155154518ff9a59112fc2971fde23f53c0c4a863533c1964736f6c63430008140033", } // ManagementContractABI is the input ABI used to generate the binding from. @@ -827,23 +827,23 @@ func (_ManagementContract *ManagementContractTransactorSession) GrantSequencerEn // InitializeNetworkSecret is a paid mutator transaction binding the contract method 0x68e10383. // -// Solidity: function InitializeNetworkSecret(address _enclaveID, bytes _initSecret, string _genesisAttestation) returns() -func (_ManagementContract *ManagementContractTransactor) InitializeNetworkSecret(opts *bind.TransactOpts, _enclaveID common.Address, _initSecret []byte, _genesisAttestation string) (*types.Transaction, error) { - return _ManagementContract.contract.Transact(opts, "InitializeNetworkSecret", _enclaveID, _initSecret, _genesisAttestation) +// Solidity: function InitializeNetworkSecret(address _enclaveID, bytes , string _genesisAttestation) returns() +func (_ManagementContract *ManagementContractTransactor) InitializeNetworkSecret(opts *bind.TransactOpts, _enclaveID common.Address, arg1 []byte, _genesisAttestation string) (*types.Transaction, error) { + return _ManagementContract.contract.Transact(opts, "InitializeNetworkSecret", _enclaveID, arg1, _genesisAttestation) } // InitializeNetworkSecret is a paid mutator transaction binding the contract method 0x68e10383. // -// Solidity: function InitializeNetworkSecret(address _enclaveID, bytes _initSecret, string _genesisAttestation) returns() -func (_ManagementContract *ManagementContractSession) InitializeNetworkSecret(_enclaveID common.Address, _initSecret []byte, _genesisAttestation string) (*types.Transaction, error) { - return _ManagementContract.Contract.InitializeNetworkSecret(&_ManagementContract.TransactOpts, _enclaveID, _initSecret, _genesisAttestation) +// Solidity: function InitializeNetworkSecret(address _enclaveID, bytes , string _genesisAttestation) returns() +func (_ManagementContract *ManagementContractSession) InitializeNetworkSecret(_enclaveID common.Address, arg1 []byte, _genesisAttestation string) (*types.Transaction, error) { + return _ManagementContract.Contract.InitializeNetworkSecret(&_ManagementContract.TransactOpts, _enclaveID, arg1, _genesisAttestation) } // InitializeNetworkSecret is a paid mutator transaction binding the contract method 0x68e10383. // -// Solidity: function InitializeNetworkSecret(address _enclaveID, bytes _initSecret, string _genesisAttestation) returns() -func (_ManagementContract *ManagementContractTransactorSession) InitializeNetworkSecret(_enclaveID common.Address, _initSecret []byte, _genesisAttestation string) (*types.Transaction, error) { - return _ManagementContract.Contract.InitializeNetworkSecret(&_ManagementContract.TransactOpts, _enclaveID, _initSecret, _genesisAttestation) +// Solidity: function InitializeNetworkSecret(address _enclaveID, bytes , string _genesisAttestation) returns() +func (_ManagementContract *ManagementContractTransactorSession) InitializeNetworkSecret(_enclaveID common.Address, arg1 []byte, _genesisAttestation string) (*types.Transaction, error) { + return _ManagementContract.Contract.InitializeNetworkSecret(&_ManagementContract.TransactOpts, _enclaveID, arg1, _genesisAttestation) } // RequestNetworkSecret is a paid mutator transaction binding the contract method 0xe34fbfc8. diff --git a/contracts/hardhat.config.ts b/contracts/hardhat.config.ts index 88e5541882..4d6f0bbf42 100644 --- a/contracts/hardhat.config.ts +++ b/contracts/hardhat.config.ts @@ -1,6 +1,7 @@ import 'ten-hardhat-plugin'; import { HardhatUserConfig, task } from "hardhat/config"; import "@nomicfoundation/hardhat-toolbox"; +import '@openzeppelin/hardhat-upgrades'; import "hardhat-abi-exporter"; import "@solidstate/hardhat-bytecode-exporter"; @@ -59,7 +60,7 @@ const config: HardhatUserConfig = { // For help configuring - https://www.npmjs.com/package/hardhat-ignore-warnings warnings : { '*' : { - default: 'error' + default: 'warn' }, 'src/testing/**/*': { default: 'off' diff --git a/contracts/package.json b/contracts/package.json index 11faaa9eeb..94faf39fe8 100644 --- a/contracts/package.json +++ b/contracts/package.json @@ -11,7 +11,7 @@ "license": "ISC", "devDependencies": { "@nomicfoundation/hardhat-toolbox": "^4.0.0", - "@openzeppelin/hardhat-upgrades": "^3.0.0", + "@openzeppelin/hardhat-upgrades": "^3.5.0", "@solidstate/hardhat-bytecode-exporter": "^1.1.1", "hardhat": "~2.19.3", "hardhat-abi-exporter": "^2.10.1", @@ -25,11 +25,11 @@ "@openzeppelin/contracts-upgradeable": "^5.0.1", "@openzeppelin/merkle-tree": "^1.0.7", "ethers": "^6.6.0", - "hardhat-ignore-warnings": "^0.2.6", + "hardhat-ignore-warnings": "^0.2.11", "ten-hardhat-plugin": "^0.0.9" }, "peerDependencies": { - "@nomicfoundation/hardhat-verify" : "2.0.8", - "@nomicfoundation/hardhat-ethers":"3.0.5" + "@nomicfoundation/hardhat-ethers": "3.0.5", + "@nomicfoundation/hardhat-verify": "2.0.8" } -} \ No newline at end of file +} diff --git a/contracts/src/management/ManagementContract.sol b/contracts/src/management/ManagementContract.sol index 0c7a7df677..8848f30834 100644 --- a/contracts/src/management/ManagementContract.sol +++ b/contracts/src/management/ManagementContract.sol @@ -149,7 +149,7 @@ contract ManagementContract is Initializable, OwnableUpgradeable { } } - // solc-ignore-next-line unused-param + //solc-ignore-next-line unused-param function AddRollup(Structs.MetaRollup calldata r, string calldata _rollupData, Structs.HeaderCrossChainData calldata) public { address enclaveID = ECDSA.recover(r.Hash, r.Signature); // revert if the EnclaveID is not attested @@ -162,8 +162,8 @@ contract ManagementContract is Initializable, OwnableUpgradeable { } // InitializeNetworkSecret kickstarts the network secret, can only be called once - // solc-ignore-next-line unused-param - function InitializeNetworkSecret(address _enclaveID, bytes calldata _initSecret, string calldata _genesisAttestation) public { + //solc-ignore-next-line unused-param + function InitializeNetworkSecret(address _enclaveID, bytes calldata, string calldata _genesisAttestation) public { require(!networkSecretInitialized, "network secret already initialized"); // network can no longer be initialized diff --git a/contracts/src/testing/UUPSTest.sol b/contracts/src/testing/UUPSTest.sol new file mode 100644 index 0000000000..dbef31038f --- /dev/null +++ b/contracts/src/testing/UUPSTest.sol @@ -0,0 +1,43 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.0; + +import "@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol"; +import "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol"; +import "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol"; + +contract UUPSTestV1 is Initializable, UUPSUpgradeable, OwnableUpgradeable { + string public message; + + function initialize() public initializer { + __Ownable_init(msg.sender); + message = "This is version 1"; + } + + function _authorizeUpgrade(address newImplementation) internal override onlyOwner {} + + function setMessage(string memory newMessage) public { + message = newMessage; + } + + function getVersion() public pure returns (uint256) { + return 1; + } +} + +contract UUPSTestV2 is Initializable, UUPSUpgradeable, OwnableUpgradeable { + string public message; + + function initialize() public reinitializer(2) { + message = "This is version 2"; + } + + function _authorizeUpgrade(address newImplementation) internal override onlyOwner {} + + function setMessage(string memory newMessage) public { + message = newMessage; + } + + function getVersion() public pure returns (uint256) { + return 2; + } +} \ No newline at end of file diff --git a/go/enclave/rpc/EstimateGas.go b/go/enclave/rpc/EstimateGas.go index b2197332be..f8597f1308 100644 --- a/go/enclave/rpc/EstimateGas.go +++ b/go/enclave/rpc/EstimateGas.go @@ -199,6 +199,16 @@ func (rpc *EncryptionManager) doEstimateGas(ctx context.Context, args *gethapi.T } cap = hi //nolint: revive + isFailedAtMax, _, err := rpc.isGasEnough(ctx, args, hi, blkNumber) + //TODO: Workaround for the weird conensus nil statement down, which gets interwined with evm errors. + // Here if there is a consensus error - we'd bail. If the tx fails at max gas - we'd bail (probably bad) + if err != nil { + return 0, gethcommon.Big0, err + } + if isFailedAtMax { + return 0, gethcommon.Big0, fmt.Errorf("gas required exceeds allowance (%d)", cap) + } + // Execute the binary search and hone in on an isGasEnough gas limit for lo+1 < hi { mid := (hi + lo) / 2 @@ -208,13 +218,18 @@ func (rpc *EncryptionManager) doEstimateGas(ctx context.Context, args *gethapi.T // range here is skewed to favor the low side. mid = lo * 2 } - failed, _, err := rpc.isGasEnough(ctx, args, mid, blkNumber) + failed, _, _ := rpc.isGasEnough(ctx, args, mid, blkNumber) + // TODO @siliev: The following statement is bullshit. I dont know why its here. + // We might have masked our internal workings, or mixed up with how geth works. + // Either way transaction reverted is counted as a consensus error, rather than + // EVM failure. + // If the error is not nil(consensus error), it means the provided message // call or transaction will never be accepted no matter how much gas it is // assigned. Return the error directly, don't struggle any more. - if err != nil { + /*if err != nil && isFailedAtMax { return 0, gethcommon.Big0, err - } + }*/ if failed { lo = mid } else {