{"file_path":"src/EmergencyUpgradeBoard.sol","creation_status":"success","source_code":"// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.24;\n\nimport {EIP712} from \"@openzeppelin/contracts/utils/cryptography/EIP712.sol\";\nimport {SignatureChecker} from \"@openzeppelin/contracts/utils/cryptography/SignatureChecker.sol\";\nimport {IProtocolUpgradeHandler} from \"./interfaces/IProtocolUpgradeHandler.sol\";\n\n/// @title Emergency Upgrade Board\n/// @author Matter Labs\n/// @custom:security-contact security@matterlabs.dev\ncontract EmergencyUpgradeBoard is EIP712 {\n    using SignatureChecker for address;\n\n    /// @notice Address of the contract, which manages protocol upgrades.\n    IProtocolUpgradeHandler public immutable PROTOCOL_UPGRADE_HANDLER;\n\n    /// @notice The address of the Security Council.\n    address public immutable SECURITY_COUNCIL;\n\n    /// @notice The address of the guardians.\n    address public immutable GUARDIANS;\n\n    /// @notice The address of the ZK Foundation multisig.\n    address public immutable ZK_FOUNDATION_SAFE;\n\n    /// @dev EIP-712 TypeHash for the emergency protocol upgrade execution approved by the guardians.\n    bytes32 internal constant EXECUTE_EMERGENCY_UPGRADE_GUARDIANS_TYPEHASH =\n        keccak256(\"ExecuteEmergencyUpgradeGuardians(bytes32 id)\");\n\n    /// @dev EIP-712 TypeHash for the emergency protocol upgrade execution approved by the Security Council.\n    bytes32 internal constant EXECUTE_EMERGENCY_UPGRADE_SECURITY_COUNCIL_TYPEHASH =\n        keccak256(\"ExecuteEmergencyUpgradeSecurityCouncil(bytes32 id)\");\n\n    /// @dev EIP-712 TypeHash for the emergency protocol upgrade execution approved by the ZK Foundation.\n    bytes32 internal constant EXECUTE_EMERGENCY_UPGRADE_ZK_FOUNDATION_TYPEHASH =\n        keccak256(\"ExecuteEmergencyUpgradeZKFoundation(bytes32 id)\");\n\n    /// @dev Initializes the Emergency Upgrade Board contract with setup for EIP-712.\n    /// @param _protocolUpgradeHandler The address of the protocol upgrade handler contract, responsible for executing the upgrades.\n    /// @param _securityCouncil The address of the Security Council multisig.\n    /// @param _guardians The address of the Guardians multisig.\n    /// @param _zkFoundation The address of the ZK Foundation Safe multisig.\n    constructor(\n        IProtocolUpgradeHandler _protocolUpgradeHandler,\n        address _securityCouncil,\n        address _guardians,\n        address _zkFoundation\n    ) EIP712(\"EmergencyUpgradeBoard\", \"1\") {\n        PROTOCOL_UPGRADE_HANDLER = _protocolUpgradeHandler;\n        SECURITY_COUNCIL = _securityCouncil;\n        GUARDIANS = _guardians;\n        ZK_FOUNDATION_SAFE = _zkFoundation;\n    }\n\n    /// @notice Executes an emergency protocol upgrade approved by the Security Council, Guardians and ZK Foundation.\n    /// @param _calls Array of `Call` structures specifying the calls to be made in the upgrade.\n    /// @param _salt A bytes32 value used for creating unique upgrade proposal hashes.\n    /// @param _guardiansSignatures Encoded signers & signatures from the guardians multisig, required to authorize the emergency upgrade.\n    /// @param _securityCouncilSignatures Encoded signers & signatures from the Security Council multisig, required to authorize the emergency upgrade.\n    /// @param _zkFoundationSignatures Signatures from the ZK Foundation multisig, required to authorize the emergency upgrade.\n    function executeEmergencyUpgrade(\n        IProtocolUpgradeHandler.Call[] calldata _calls,\n        bytes32 _salt,\n        bytes calldata _guardiansSignatures,\n        bytes calldata _securityCouncilSignatures,\n        bytes calldata _zkFoundationSignatures\n    ) external {\n        IProtocolUpgradeHandler.UpgradeProposal memory upgradeProposal =\n            IProtocolUpgradeHandler.UpgradeProposal({calls: _calls, salt: _salt, executor: address(this)});\n        bytes32 id = keccak256(abi.encode(upgradeProposal));\n\n        bytes32 guardiansDigest =\n            _hashTypedDataV4(keccak256(abi.encode(EXECUTE_EMERGENCY_UPGRADE_GUARDIANS_TYPEHASH, id)));\n        require(\n            GUARDIANS.isValidERC1271SignatureNow(guardiansDigest, _guardiansSignatures), \"Invalid guardians signatures\"\n        );\n\n        bytes32 securityCouncilDigest =\n            _hashTypedDataV4(keccak256(abi.encode(EXECUTE_EMERGENCY_UPGRADE_SECURITY_COUNCIL_TYPEHASH, id)));\n        require(\n            SECURITY_COUNCIL.isValidERC1271SignatureNow(securityCouncilDigest, _securityCouncilSignatures),\n            \"Invalid Security Council signatures\"\n        );\n\n        bytes32 zkFoundationDigest =\n            _hashTypedDataV4(keccak256(abi.encode(EXECUTE_EMERGENCY_UPGRADE_ZK_FOUNDATION_TYPEHASH, id)));\n        require(\n            ZK_FOUNDATION_SAFE.isValidSignatureNow(zkFoundationDigest, _zkFoundationSignatures),\n            \"Invalid ZK Foundation signatures\"\n        );\n\n        PROTOCOL_UPGRADE_HANDLER.executeEmergencyUpgrade(upgradeProposal);\n    }\n}\n","deployed_bytecode":"0x608060405234801561000f575f80fd5b5060043610610060575f3560e01c806336086417146100645780633f6b9ddb1461008257806384b0196e146100a0578063b4c77c3b146100c4578063c03fd44b146100e2578063c2646db4146100fe575b5f80fd5b61006c61011c565b6040516100799190610d61565b60405180910390f35b61008a610140565b6040516100979190610d61565b60405180910390f35b6100a8610164565b6040516100bb9796959493929190610f25565b60405180910390f35b6100cc610209565b6040516100d99190611002565b60405180910390f35b6100fc60048036038101906100f7919061110c565b61022d565b005b610106610690565b6040516101139190610d61565b60405180910390f35b7f00000000000000000000000059195219d1176e42f8e607e9ac114926d47f903581565b7f000000000000000000000000600da620ab29f41abc6596a15981e14ce58c86b881565b5f6060805f805f60606101756106b4565b61017d6106ee565b46305f801b5f67ffffffffffffffff81111561019c5761019b611202565b5b6040519080825280602002602001820160405280156101ca5781602001602082028036833780820191505090505b507f0f00000000000000000000000000000000000000000000000000000000000000959493929190965096509650965096509650965090919293949596565b7f000000000000000000000000e30dca3047b37dc7d88849de4a4dc07937ad5ab381565b5f60405180606001604052808b8b9061024691906114b4565b81526020013073ffffffffffffffffffffffffffffffffffffffff1681526020018981525090505f8160405160200161027f919061168d565b6040516020818303038152906040528051906020012090505f6102e97fca13e65539327d441ed2bdec279e457a1af26eb3e4dbe09fcd7a8633662af7e2836040516020016102ce9291906116ad565b60405160208183030381529060405280519060200120610729565b9050610379818a8a8080601f0160208091040260200160405190810160405280939291908181526020018383808284375f81840152601f19601f820116905080830192505050505050507f000000000000000000000000600da620ab29f41abc6596a15981e14ce58c86b873ffffffffffffffffffffffffffffffffffffffff166107429092919063ffffffff16565b6103b8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016103af9061171e565b60405180910390fd5b5f61040a7fca6492c171331a4293d71e9e45f05ca3db6aaf73acc6e0cde07a1bdc2a119cdc846040516020016103ef9291906116ad565b60405160208183030381529060405280519060200120610729565b905061049a8189898080601f0160208091040260200160405190810160405280939291908181526020018383808284375f81840152601f19601f820116905080830192505050505050507f00000000000000000000000059195219d1176e42f8e607e9ac114926d47f903573ffffffffffffffffffffffffffffffffffffffff166107429092919063ffffffff16565b6104d9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016104d0906117ac565b60405180910390fd5b5f61052b7fbc65a4e7edaf75c145d74b7c4e65a168cf6bce5e78f11e27fcd63ed0c62afacf856040516020016105109291906116ad565b60405160208183030381529060405280519060200120610729565b90506105bb8188888080601f0160208091040260200160405190810160405280939291908181526020018383808284375f81840152601f19601f820116905080830192505050505050507f000000000000000000000000bc1653bd3829dfec575afc3816d4899cd103b51c73ffffffffffffffffffffffffffffffffffffffff166108619092919063ffffffff16565b6105fa576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105f190611814565b60405180910390fd5b7f000000000000000000000000e30dca3047b37dc7d88849de4a4dc07937ad5ab373ffffffffffffffffffffffffffffffffffffffff16634523da36866040518263ffffffff1660e01b8152600401610653919061168d565b5f604051808303815f87803b15801561066a575f80fd5b505af115801561067c573d5f803e3d5ffd5b505050505050505050505050505050505050565b7f000000000000000000000000bc1653bd3829dfec575afc3816d4899cd103b51c81565b60606106e95f7f456d657267656e637955706772616465426f61726400000000000000000000156108ee90919063ffffffff16565b905090565b606061072460017f31000000000000000000000000000000000000000000000000000000000000016108ee90919063ffffffff16565b905090565b5f61073b61073561099b565b83610a51565b9050919050565b5f805f8573ffffffffffffffffffffffffffffffffffffffff16858560405160240161076f92919061187a565b604051602081830303815290604052631626ba7e60e01b6020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050506040516107c191906118e2565b5f60405180830381855afa9150503d805f81146107f9576040519150601f19603f3d011682016040523d82523d5f602084013e6107fe565b606091505b509150915081801561081257506020815110155b80156108565750631626ba7e60e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191681806020019051810190610854919061190c565b145b925050509392505050565b5f805f61086e8585610a91565b50915091505f600381111561088657610885611937565b5b81600381111561089957610898611937565b5b1480156108d157508573ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16145b806108e357506108e2868686610742565b5b925050509392505050565b606060ff5f1b831461090a5761090383610ae6565b9050610995565b81805461091690611991565b80601f016020809104026020016040519081016040528092919081815260200182805461094290611991565b801561098d5780601f106109645761010080835404028352916020019161098d565b820191905f5260205f20905b81548152906001019060200180831161097057829003601f168201915b505050505090505b92915050565b5f7f000000000000000000000000f73a7dcfa68e52030ec39e41a23dca51f3aaa11173ffffffffffffffffffffffffffffffffffffffff163073ffffffffffffffffffffffffffffffffffffffff16148015610a1657507f000000000000000000000000000000000000000000000000000000000000000146145b15610a43577f46afb7a55d0e7d68d856a9538782cae89bdd761fc5da2d725e7d82f0b418e9989050610a4e565b610a4b610b58565b90505b90565b5f6040517f190100000000000000000000000000000000000000000000000000000000000081528360028201528260228201526042812091505092915050565b5f805f6041845103610ad1575f805f602087015192506040870151915060608701515f1a9050610ac388828585610bed565b955095509550505050610adf565b5f600285515f1b9250925092505b9250925092565b60605f610af283610cd4565b90505f602067ffffffffffffffff811115610b1057610b0f611202565b5b6040519080825280601f01601f191660200182016040528015610b425781602001600182028036833780820191505090505b5090508181528360208201528092505050919050565b5f7f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f7f09e7b74238054110bafcefc73054144d67fe22a2ed5c1eedf64ff5ea802611fd7fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc64630604051602001610bd29594939291906119c1565b60405160208183030381529060405280519060200120905090565b5f805f7f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0845f1c1115610c29575f600385925092509250610cca565b5f6001888888886040515f8152602001604052604051610c4c9493929190611a2d565b6020604051602081039080840390855afa158015610c6c573d5f803e3d5ffd5b5050506020604051035190505f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603610cbd575f60015f801b93509350935050610cca565b805f805f1b935093509350505b9450945094915050565b5f8060ff835f1c169050601f811115610d19576040517fb3512b0c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80915050919050565b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f610d4b82610d22565b9050919050565b610d5b81610d41565b82525050565b5f602082019050610d745f830184610d52565b92915050565b5f7fff0000000000000000000000000000000000000000000000000000000000000082169050919050565b610dae81610d7a565b82525050565b5f81519050919050565b5f82825260208201905092915050565b5f5b83811015610deb578082015181840152602081019050610dd0565b5f8484015250505050565b5f601f19601f8301169050919050565b5f610e1082610db4565b610e1a8185610dbe565b9350610e2a818560208601610dce565b610e3381610df6565b840191505092915050565b5f819050919050565b610e5081610e3e565b82525050565b5f819050919050565b610e6881610e56565b82525050565b5f81519050919050565b5f82825260208201905092915050565b5f819050602082019050919050565b610ea081610e3e565b82525050565b5f610eb18383610e97565b60208301905092915050565b5f602082019050919050565b5f610ed382610e6e565b610edd8185610e78565b9350610ee883610e88565b805f5b83811015610f18578151610eff8882610ea6565b9750610f0a83610ebd565b925050600181019050610eeb565b5085935050505092915050565b5f60e082019050610f385f83018a610da5565b8181036020830152610f4a8189610e06565b90508181036040830152610f5e8188610e06565b9050610f6d6060830187610e47565b610f7a6080830186610d52565b610f8760a0830185610e5f565b81810360c0830152610f998184610ec9565b905098975050505050505050565b5f819050919050565b5f610fca610fc5610fc084610d22565b610fa7565b610d22565b9050919050565b5f610fdb82610fb0565b9050919050565b5f610fec82610fd1565b9050919050565b610ffc81610fe2565b82525050565b5f6020820190506110155f830184610ff3565b92915050565b5f604051905090565b5f80fd5b5f80fd5b5f80fd5b5f80fd5b5f80fd5b5f8083601f84011261104d5761104c61102c565b5b8235905067ffffffffffffffff81111561106a57611069611030565b5b60208301915083602082028301111561108657611085611034565b5b9250929050565b61109681610e56565b81146110a0575f80fd5b50565b5f813590506110b18161108d565b92915050565b5f8083601f8401126110cc576110cb61102c565b5b8235905067ffffffffffffffff8111156110e9576110e8611030565b5b60208301915083600182028301111561110557611104611034565b5b9250929050565b5f805f805f805f805f60a08a8c03121561112957611128611024565b5b5f8a013567ffffffffffffffff81111561114657611145611028565b5b6111528c828d01611038565b995099505060206111658c828d016110a3565b97505060408a013567ffffffffffffffff81111561118657611185611028565b5b6111928c828d016110b7565b965096505060608a013567ffffffffffffffff8111156111b5576111b4611028565b5b6111c18c828d016110b7565b945094505060808a013567ffffffffffffffff8111156111e4576111e3611028565b5b6111f08c828d016110b7565b92509250509295985092959850929598565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b61123882610df6565b810181811067ffffffffffffffff8211171561125757611256611202565b5b80604052505050565b5f61126961101b565b9050611275828261122f565b919050565b5f67ffffffffffffffff82111561129457611293611202565b5b602082029050602081019050919050565b5f80fd5b5f80fd5b6112b681610d41565b81146112c0575f80fd5b50565b5f813590506112d1816112ad565b92915050565b6112e081610e3e565b81146112ea575f80fd5b50565b5f813590506112fb816112d7565b92915050565b5f80fd5b5f67ffffffffffffffff82111561131f5761131e611202565b5b61132882610df6565b9050602081019050919050565b828183375f83830152505050565b5f61135561135084611305565b611260565b90508281526020810184848401111561137157611370611301565b5b61137c848285611335565b509392505050565b5f82601f8301126113985761139761102c565b5b81356113a8848260208601611343565b91505092915050565b5f606082840312156113c6576113c56112a5565b5b6113d06060611260565b90505f6113df848285016112c3565b5f8301525060206113f2848285016112ed565b602083015250604082013567ffffffffffffffff811115611416576114156112a9565b5b61142284828501611384565b60408301525092915050565b5f61144061143b8461127a565b611260565b9050808382526020820190506020840283018581111561146357611462611034565b5b835b818110156114aa57803567ffffffffffffffff8111156114885761148761102c565b5b80860161149589826113b1565b85526020850194505050602081019050611465565b5050509392505050565b5f6114c036848461142e565b905092915050565b5f81519050919050565b5f82825260208201905092915050565b5f819050602082019050919050565b6114fa81610d41565b82525050565b5f81519050919050565b5f82825260208201905092915050565b5f61152482611500565b61152e818561150a565b935061153e818560208601610dce565b61154781610df6565b840191505092915050565b5f606083015f8301516115675f8601826114f1565b50602083015161157a6020860182610e97565b5060408301518482036040860152611592828261151a565b9150508091505092915050565b5f6115aa8383611552565b905092915050565b5f602082019050919050565b5f6115c8826114c8565b6115d281856114d2565b9350836020820285016115e4856114e2565b805f5b8581101561161f5784840389528151611600858261159f565b945061160b836115b2565b925060208a019950506001810190506115e7565b50829750879550505050505092915050565b61163a81610e56565b82525050565b5f606083015f8301518482035f86015261165a82826115be565b915050602083015161166f60208601826114f1565b5060408301516116826040860182611631565b508091505092915050565b5f6020820190508181035f8301526116a58184611640565b905092915050565b5f6040820190506116c05f830185610e5f565b6116cd6020830184610e5f565b9392505050565b7f496e76616c696420677561726469616e73207369676e617475726573000000005f82015250565b5f611708601c83610dbe565b9150611713826116d4565b602082019050919050565b5f6020820190508181035f830152611735816116fc565b9050919050565b7f496e76616c696420536563757269747920436f756e63696c207369676e6174755f8201527f7265730000000000000000000000000000000000000000000000000000000000602082015250565b5f611796602383610dbe565b91506117a18261173c565b604082019050919050565b5f6020820190508181035f8301526117c38161178a565b9050919050565b7f496e76616c6964205a4b20466f756e646174696f6e207369676e6174757265735f82015250565b5f6117fe602083610dbe565b9150611809826117ca565b602082019050919050565b5f6020820190508181035f83015261182b816117f2565b9050919050565b5f82825260208201905092915050565b5f61184c82611500565b6118568185611832565b9350611866818560208601610dce565b61186f81610df6565b840191505092915050565b5f60408201905061188d5f830185610e5f565b818103602083015261189f8184611842565b90509392505050565b5f81905092915050565b5f6118bc82611500565b6118c681856118a8565b93506118d6818560208601610dce565b80840191505092915050565b5f6118ed82846118b2565b915081905092915050565b5f815190506119068161108d565b92915050565b5f6020828403121561192157611920611024565b5b5f61192e848285016118f8565b91505092915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602160045260245ffd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b5f60028204905060018216806119a857607f821691505b6020821081036119bb576119ba611964565b5b50919050565b5f60a0820190506119d45f830188610e5f565b6119e16020830187610e5f565b6119ee6040830186610e5f565b6119fb6060830185610e47565b611a086080830184610d52565b9695505050505050565b5f60ff82169050919050565b611a2781611a12565b82525050565b5f608082019050611a405f830187610e5f565b611a4d6020830186611a1e565b611a5a6040830185610e5f565b611a676060830184610e5f565b9594505050505056fea2646970667358221220b8594e686de1c247b6b9d444f66f86a7283cd0e57ee251d25078ced22c86ea3064736f6c63430008180033","optimization_enabled":false,"verified_twin_address_hash":null,"is_verified":true,"compiler_settings":{"evmVersion":"cancun","libraries":{},"metadata":{"appendCBOR":true,"bytecodeHash":"ipfs","useLiteralContent":false},"optimizer":{"enabled":false,"runs":200},"outputSelection":{"*":{"":["*"],"*":["*"]}},"remappings":["@openzeppelin/contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/contracts/","@openzeppelin/contracts/=lib/openzeppelin-contracts/contracts/","ds-test/=lib/openzeppelin-contracts/lib/forge-std/lib/ds-test/src/","erc4626-tests/=lib/openzeppelin-contracts/lib/erc4626-tests/","forge-std/=lib/forge-std/src/","openzeppelin-contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/","openzeppelin-contracts/=lib/openzeppelin-contracts/"],"viaIR":false},"optimization_runs":null,"sourcify_repo_url":null,"decoded_constructor_args":[["0xE30Dca3047B37dc7d88849dE4A4Dc07937ad5Ab3",{"internalType":"contract IProtocolUpgradeHandler","name":"_protocolUpgradeHandler","type":"address"}],["0x59195219d1176E42f8e607e9AC114926D47f9035",{"internalType":"address","name":"_securityCouncil","type":"address"}],["0x600dA620Ab29F41ABC6596a15981e14cE58c86b8",{"internalType":"address","name":"_guardians","type":"address"}],["0xbC1653bd3829dfEc575AfC3816D4899cd103B51c",{"internalType":"address","name":"_zkFoundation","type":"address"}]],"compiler_version":"v0.8.24+commit.e11b9ed9","is_verified_via_verifier_alliance":false,"verified_at":"2026-06-27T08:30:56.543665Z","implementations":[],"proxy_type":null,"external_libraries":[],"creation_bytecode":"0x6101e060405234801562000011575f80fd5b50604051620024cf380380620024cf8339818101604052810190620000379190620003fb565b6040518060400160405280601581526020017f456d657267656e637955706772616465426f61726400000000000000000000008152506040518060400160405280600181526020017f3100000000000000000000000000000000000000000000000000000000000000815250620000b85f836200023060201b90919060201c565b6101208181525050620000d66001826200023060201b90919060201c565b6101408181525050818051906020012060e08181525050808051906020012061010081815250504660a08181525050620001156200028560201b60201c565b608081815250503073ffffffffffffffffffffffffffffffffffffffff1660c08173ffffffffffffffffffffffffffffffffffffffff168152505050508373ffffffffffffffffffffffffffffffffffffffff166101608173ffffffffffffffffffffffffffffffffffffffff16815250508273ffffffffffffffffffffffffffffffffffffffff166101808173ffffffffffffffffffffffffffffffffffffffff16815250508173ffffffffffffffffffffffffffffffffffffffff166101a08173ffffffffffffffffffffffffffffffffffffffff16815250508073ffffffffffffffffffffffffffffffffffffffff166101c08173ffffffffffffffffffffffffffffffffffffffff16815250505050505062000993565b5f60208351101562000255576200024d83620002e160201b60201c565b90506200027f565b8262000267836200034b60201b60201c565b5f019081620002779190620006ce565b5060ff5f1b90505b92915050565b5f7f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f60e051610100514630604051602001620002c6959493929190620007ee565b60405160208183030381529060405280519060200120905090565b5f80829050601f815111156200033057826040517f305a27a9000000000000000000000000000000000000000000000000000000008152600401620003279190620008d3565b60405180910390fd5b8051816200033e9062000924565b5f1c175f1b915050919050565b5f819050919050565b5f80fd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f620003838262000358565b9050919050565b5f620003968262000377565b9050919050565b620003a8816200038a565b8114620003b3575f80fd5b50565b5f81519050620003c6816200039d565b92915050565b620003d78162000377565b8114620003e2575f80fd5b50565b5f81519050620003f581620003cc565b92915050565b5f805f806080858703121562000416576200041562000354565b5b5f6200042587828801620003b6565b94505060206200043887828801620003e5565b93505060406200044b87828801620003e5565b92505060606200045e87828801620003e5565b91505092959194509250565b5f81519050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b5f6002820490506001821680620004e657607f821691505b602082108103620004fc57620004fb620004a1565b5b50919050565b5f819050815f5260205f209050919050565b5f6020601f8301049050919050565b5f82821b905092915050565b5f60088302620005607fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8262000523565b6200056c868362000523565b95508019841693508086168417925050509392505050565b5f819050919050565b5f819050919050565b5f620005b6620005b0620005aa8462000584565b6200058d565b62000584565b9050919050565b5f819050919050565b620005d18362000596565b620005e9620005e082620005bd565b8484546200052f565b825550505050565b5f90565b620005ff620005f1565b6200060c818484620005c6565b505050565b5b818110156200063357620006275f82620005f5565b60018101905062000612565b5050565b601f82111562000682576200064c8162000502565b620006578462000514565b8101602085101562000667578190505b6200067f620006768562000514565b83018262000611565b50505b505050565b5f82821c905092915050565b5f620006a45f198460080262000687565b1980831691505092915050565b5f620006be838362000693565b9150826002028217905092915050565b620006d9826200046a565b67ffffffffffffffff811115620006f557620006f462000474565b5b620007018254620004ce565b6200070e82828562000637565b5f60209050601f83116001811462000744575f84156200072f578287015190505b6200073b8582620006b1565b865550620007aa565b601f198416620007548662000502565b5f5b828110156200077d5784890151825560018201915060208501945060208101905062000756565b868310156200079d578489015162000799601f89168262000693565b8355505b6001600288020188555050505b505050505050565b5f819050919050565b620007c681620007b2565b82525050565b620007d78162000584565b82525050565b620007e88162000377565b82525050565b5f60a082019050620008035f830188620007bb565b620008126020830187620007bb565b620008216040830186620007bb565b620008306060830185620007cc565b6200083f6080830184620007dd565b9695505050505050565b5f82825260208201905092915050565b5f5b83811015620008785780820151818401526020810190506200085b565b5f8484015250505050565b5f601f19601f8301169050919050565b5f6200089f826200046a565b620008ab818562000849565b9350620008bd81856020860162000859565b620008c88162000883565b840191505092915050565b5f6020820190508181035f830152620008ed818462000893565b905092915050565b5f81519050919050565b5f819050602082019050919050565b5f6200091b8251620007b2565b80915050919050565b5f6200093082620008f5565b826200093c84620008ff565b905062000949816200090e565b925060208210156200098c57620009877fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8360200360080262000523565b831692505b5050919050565b60805160a05160c05160e05161010051610120516101405161016051610180516101a0516101c051611aa662000a295f395f8181610577015261069201525f8181610142015261033501525f818161011e015261045601525f818161020b01526105fc01525f6106f701525f6106bc01525f610b9d01525f610b7c01525f61099e01525f6109f401525f610a1d0152611aa65ff3fe608060405234801561000f575f80fd5b5060043610610060575f3560e01c806336086417146100645780633f6b9ddb1461008257806384b0196e146100a0578063b4c77c3b146100c4578063c03fd44b146100e2578063c2646db4146100fe575b5f80fd5b61006c61011c565b6040516100799190610d61565b60405180910390f35b61008a610140565b6040516100979190610d61565b60405180910390f35b6100a8610164565b6040516100bb9796959493929190610f25565b60405180910390f35b6100cc610209565b6040516100d99190611002565b60405180910390f35b6100fc60048036038101906100f7919061110c565b61022d565b005b610106610690565b6040516101139190610d61565b60405180910390f35b7f000000000000000000000000000000000000000000000000000000000000000081565b7f000000000000000000000000000000000000000000000000000000000000000081565b5f6060805f805f60606101756106b4565b61017d6106ee565b46305f801b5f67ffffffffffffffff81111561019c5761019b611202565b5b6040519080825280602002602001820160405280156101ca5781602001602082028036833780820191505090505b507f0f00000000000000000000000000000000000000000000000000000000000000959493929190965096509650965096509650965090919293949596565b7f000000000000000000000000000000000000000000000000000000000000000081565b5f60405180606001604052808b8b9061024691906114b4565b81526020013073ffffffffffffffffffffffffffffffffffffffff1681526020018981525090505f8160405160200161027f919061168d565b6040516020818303038152906040528051906020012090505f6102e97fca13e65539327d441ed2bdec279e457a1af26eb3e4dbe09fcd7a8633662af7e2836040516020016102ce9291906116ad565b60405160208183030381529060405280519060200120610729565b9050610379818a8a8080601f0160208091040260200160405190810160405280939291908181526020018383808284375f81840152601f19601f820116905080830192505050505050507f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166107429092919063ffffffff16565b6103b8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016103af9061171e565b60405180910390fd5b5f61040a7fca6492c171331a4293d71e9e45f05ca3db6aaf73acc6e0cde07a1bdc2a119cdc846040516020016103ef9291906116ad565b60405160208183030381529060405280519060200120610729565b905061049a8189898080601f0160208091040260200160405190810160405280939291908181526020018383808284375f81840152601f19601f820116905080830192505050505050507f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166107429092919063ffffffff16565b6104d9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016104d0906117ac565b60405180910390fd5b5f61052b7fbc65a4e7edaf75c145d74b7c4e65a168cf6bce5e78f11e27fcd63ed0c62afacf856040516020016105109291906116ad565b60405160208183030381529060405280519060200120610729565b90506105bb8188888080601f0160208091040260200160405190810160405280939291908181526020018383808284375f81840152601f19601f820116905080830192505050505050507f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166108619092919063ffffffff16565b6105fa576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105f190611814565b60405180910390fd5b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16634523da36866040518263ffffffff1660e01b8152600401610653919061168d565b5f604051808303815f87803b15801561066a575f80fd5b505af115801561067c573d5f803e3d5ffd5b505050505050505050505050505050505050565b7f000000000000000000000000000000000000000000000000000000000000000081565b60606106e95f7f00000000000000000000000000000000000000000000000000000000000000006108ee90919063ffffffff16565b905090565b606061072460017f00000000000000000000000000000000000000000000000000000000000000006108ee90919063ffffffff16565b905090565b5f61073b61073561099b565b83610a51565b9050919050565b5f805f8573ffffffffffffffffffffffffffffffffffffffff16858560405160240161076f92919061187a565b604051602081830303815290604052631626ba7e60e01b6020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050506040516107c191906118e2565b5f60405180830381855afa9150503d805f81146107f9576040519150601f19603f3d011682016040523d82523d5f602084013e6107fe565b606091505b509150915081801561081257506020815110155b80156108565750631626ba7e60e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191681806020019051810190610854919061190c565b145b925050509392505050565b5f805f61086e8585610a91565b50915091505f600381111561088657610885611937565b5b81600381111561089957610898611937565b5b1480156108d157508573ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16145b806108e357506108e2868686610742565b5b925050509392505050565b606060ff5f1b831461090a5761090383610ae6565b9050610995565b81805461091690611991565b80601f016020809104026020016040519081016040528092919081815260200182805461094290611991565b801561098d5780601f106109645761010080835404028352916020019161098d565b820191905f5260205f20905b81548152906001019060200180831161097057829003601f168201915b505050505090505b92915050565b5f7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163073ffffffffffffffffffffffffffffffffffffffff16148015610a1657507f000000000000000000000000000000000000000000000000000000000000000046145b15610a43577f00000000000000000000000000000000000000000000000000000000000000009050610a4e565b610a4b610b58565b90505b90565b5f6040517f190100000000000000000000000000000000000000000000000000000000000081528360028201528260228201526042812091505092915050565b5f805f6041845103610ad1575f805f602087015192506040870151915060608701515f1a9050610ac388828585610bed565b955095509550505050610adf565b5f600285515f1b9250925092505b9250925092565b60605f610af283610cd4565b90505f602067ffffffffffffffff811115610b1057610b0f611202565b5b6040519080825280601f01601f191660200182016040528015610b425781602001600182028036833780820191505090505b5090508181528360208201528092505050919050565b5f7f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f7f00000000000000000000000000000000000000000000000000000000000000007f00000000000000000000000000000000000000000000000000000000000000004630604051602001610bd29594939291906119c1565b60405160208183030381529060405280519060200120905090565b5f805f7f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0845f1c1115610c29575f600385925092509250610cca565b5f6001888888886040515f8152602001604052604051610c4c9493929190611a2d565b6020604051602081039080840390855afa158015610c6c573d5f803e3d5ffd5b5050506020604051035190505f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603610cbd575f60015f801b93509350935050610cca565b805f805f1b935093509350505b9450945094915050565b5f8060ff835f1c169050601f811115610d19576040517fb3512b0c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80915050919050565b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f610d4b82610d22565b9050919050565b610d5b81610d41565b82525050565b5f602082019050610d745f830184610d52565b92915050565b5f7fff0000000000000000000000000000000000000000000000000000000000000082169050919050565b610dae81610d7a565b82525050565b5f81519050919050565b5f82825260208201905092915050565b5f5b83811015610deb578082015181840152602081019050610dd0565b5f8484015250505050565b5f601f19601f8301169050919050565b5f610e1082610db4565b610e1a8185610dbe565b9350610e2a818560208601610dce565b610e3381610df6565b840191505092915050565b5f819050919050565b610e5081610e3e565b82525050565b5f819050919050565b610e6881610e56565b82525050565b5f81519050919050565b5f82825260208201905092915050565b5f819050602082019050919050565b610ea081610e3e565b82525050565b5f610eb18383610e97565b60208301905092915050565b5f602082019050919050565b5f610ed382610e6e565b610edd8185610e78565b9350610ee883610e88565b805f5b83811015610f18578151610eff8882610ea6565b9750610f0a83610ebd565b925050600181019050610eeb565b5085935050505092915050565b5f60e082019050610f385f83018a610da5565b8181036020830152610f4a8189610e06565b90508181036040830152610f5e8188610e06565b9050610f6d6060830187610e47565b610f7a6080830186610d52565b610f8760a0830185610e5f565b81810360c0830152610f998184610ec9565b905098975050505050505050565b5f819050919050565b5f610fca610fc5610fc084610d22565b610fa7565b610d22565b9050919050565b5f610fdb82610fb0565b9050919050565b5f610fec82610fd1565b9050919050565b610ffc81610fe2565b82525050565b5f6020820190506110155f830184610ff3565b92915050565b5f604051905090565b5f80fd5b5f80fd5b5f80fd5b5f80fd5b5f80fd5b5f8083601f84011261104d5761104c61102c565b5b8235905067ffffffffffffffff81111561106a57611069611030565b5b60208301915083602082028301111561108657611085611034565b5b9250929050565b61109681610e56565b81146110a0575f80fd5b50565b5f813590506110b18161108d565b92915050565b5f8083601f8401126110cc576110cb61102c565b5b8235905067ffffffffffffffff8111156110e9576110e8611030565b5b60208301915083600182028301111561110557611104611034565b5b9250929050565b5f805f805f805f805f60a08a8c03121561112957611128611024565b5b5f8a013567ffffffffffffffff81111561114657611145611028565b5b6111528c828d01611038565b995099505060206111658c828d016110a3565b97505060408a013567ffffffffffffffff81111561118657611185611028565b5b6111928c828d016110b7565b965096505060608a013567ffffffffffffffff8111156111b5576111b4611028565b5b6111c18c828d016110b7565b945094505060808a013567ffffffffffffffff8111156111e4576111e3611028565b5b6111f08c828d016110b7565b92509250509295985092959850929598565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b61123882610df6565b810181811067ffffffffffffffff8211171561125757611256611202565b5b80604052505050565b5f61126961101b565b9050611275828261122f565b919050565b5f67ffffffffffffffff82111561129457611293611202565b5b602082029050602081019050919050565b5f80fd5b5f80fd5b6112b681610d41565b81146112c0575f80fd5b50565b5f813590506112d1816112ad565b92915050565b6112e081610e3e565b81146112ea575f80fd5b50565b5f813590506112fb816112d7565b92915050565b5f80fd5b5f67ffffffffffffffff82111561131f5761131e611202565b5b61132882610df6565b9050602081019050919050565b828183375f83830152505050565b5f61135561135084611305565b611260565b90508281526020810184848401111561137157611370611301565b5b61137c848285611335565b509392505050565b5f82601f8301126113985761139761102c565b5b81356113a8848260208601611343565b91505092915050565b5f606082840312156113c6576113c56112a5565b5b6113d06060611260565b90505f6113df848285016112c3565b5f8301525060206113f2848285016112ed565b602083015250604082013567ffffffffffffffff811115611416576114156112a9565b5b61142284828501611384565b60408301525092915050565b5f61144061143b8461127a565b611260565b9050808382526020820190506020840283018581111561146357611462611034565b5b835b818110156114aa57803567ffffffffffffffff8111156114885761148761102c565b5b80860161149589826113b1565b85526020850194505050602081019050611465565b5050509392505050565b5f6114c036848461142e565b905092915050565b5f81519050919050565b5f82825260208201905092915050565b5f819050602082019050919050565b6114fa81610d41565b82525050565b5f81519050919050565b5f82825260208201905092915050565b5f61152482611500565b61152e818561150a565b935061153e818560208601610dce565b61154781610df6565b840191505092915050565b5f606083015f8301516115675f8601826114f1565b50602083015161157a6020860182610e97565b5060408301518482036040860152611592828261151a565b9150508091505092915050565b5f6115aa8383611552565b905092915050565b5f602082019050919050565b5f6115c8826114c8565b6115d281856114d2565b9350836020820285016115e4856114e2565b805f5b8581101561161f5784840389528151611600858261159f565b945061160b836115b2565b925060208a019950506001810190506115e7565b50829750879550505050505092915050565b61163a81610e56565b82525050565b5f606083015f8301518482035f86015261165a82826115be565b915050602083015161166f60208601826114f1565b5060408301516116826040860182611631565b508091505092915050565b5f6020820190508181035f8301526116a58184611640565b905092915050565b5f6040820190506116c05f830185610e5f565b6116cd6020830184610e5f565b9392505050565b7f496e76616c696420677561726469616e73207369676e617475726573000000005f82015250565b5f611708601c83610dbe565b9150611713826116d4565b602082019050919050565b5f6020820190508181035f830152611735816116fc565b9050919050565b7f496e76616c696420536563757269747920436f756e63696c207369676e6174755f8201527f7265730000000000000000000000000000000000000000000000000000000000602082015250565b5f611796602383610dbe565b91506117a18261173c565b604082019050919050565b5f6020820190508181035f8301526117c38161178a565b9050919050565b7f496e76616c6964205a4b20466f756e646174696f6e207369676e6174757265735f82015250565b5f6117fe602083610dbe565b9150611809826117ca565b602082019050919050565b5f6020820190508181035f83015261182b816117f2565b9050919050565b5f82825260208201905092915050565b5f61184c82611500565b6118568185611832565b9350611866818560208601610dce565b61186f81610df6565b840191505092915050565b5f60408201905061188d5f830185610e5f565b818103602083015261189f8184611842565b90509392505050565b5f81905092915050565b5f6118bc82611500565b6118c681856118a8565b93506118d6818560208601610dce565b80840191505092915050565b5f6118ed82846118b2565b915081905092915050565b5f815190506119068161108d565b92915050565b5f6020828403121561192157611920611024565b5b5f61192e848285016118f8565b91505092915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602160045260245ffd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b5f60028204905060018216806119a857607f821691505b6020821081036119bb576119ba611964565b5b50919050565b5f60a0820190506119d45f830188610e5f565b6119e16020830187610e5f565b6119ee6040830186610e5f565b6119fb6060830185610e47565b611a086080830184610d52565b9695505050505050565b5f60ff82169050919050565b611a2781611a12565b82525050565b5f608082019050611a405f830187610e5f565b611a4d6020830186611a1e565b611a5a6040830185610e5f565b611a676060830184610e5f565b9594505050505056fea2646970667358221220b8594e686de1c247b6b9d444f66f86a7283cd0e57ee251d25078ced22c86ea3064736f6c63430008180033000000000000000000000000e30dca3047b37dc7d88849de4a4dc07937ad5ab300000000000000000000000059195219d1176e42f8e607e9ac114926d47f9035000000000000000000000000600da620ab29f41abc6596a15981e14ce58c86b8000000000000000000000000bc1653bd3829dfec575afc3816d4899cd103b51c","name":"EmergencyUpgradeBoard","is_blueprint":false,"license_type":"none","is_fully_verified":true,"is_verified_via_eth_bytecode_db":false,"language":"solidity","evm_version":"cancun","can_be_visualized_via_sol2uml":true,"is_verified_via_sourcify":false,"additional_sources":[{"file_path":"lib/openzeppelin-contracts/contracts/interfaces/IERC1271.sol","source_code":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC1271.sol)\n\npragma solidity ^0.8.20;\n\n/**\n * @dev Interface of the ERC1271 standard signature validation method for\n * contracts as defined in https://eips.ethereum.org/EIPS/eip-1271[ERC-1271].\n */\ninterface IERC1271 {\n    /**\n     * @dev Should return whether the signature provided is valid for the provided data\n     * @param hash      Hash of the data to be signed\n     * @param signature Signature byte array associated with _data\n     */\n    function isValidSignature(bytes32 hash, bytes memory signature) external view returns (bytes4 magicValue);\n}\n"},{"file_path":"lib/openzeppelin-contracts/contracts/interfaces/IERC5267.sol","source_code":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC5267.sol)\n\npragma solidity ^0.8.20;\n\ninterface IERC5267 {\n    /**\n     * @dev MAY be emitted to signal that the domain could have changed.\n     */\n    event EIP712DomainChanged();\n\n    /**\n     * @dev returns the fields and values that describe the domain separator used by this contract for EIP-712\n     * signature.\n     */\n    function eip712Domain()\n        external\n        view\n        returns (\n            bytes1 fields,\n            string memory name,\n            string memory version,\n            uint256 chainId,\n            address verifyingContract,\n            bytes32 salt,\n            uint256[] memory extensions\n        );\n}\n"},{"file_path":"lib/openzeppelin-contracts/contracts/utils/ShortStrings.sol","source_code":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/ShortStrings.sol)\n\npragma solidity ^0.8.20;\n\nimport {StorageSlot} from \"./StorageSlot.sol\";\n\n// | string  | 0xAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA   |\n// | length  | 0x                                                              BB |\ntype ShortString is bytes32;\n\n/**\n * @dev This library provides functions to convert short memory strings\n * into a `ShortString` type that can be used as an immutable variable.\n *\n * Strings of arbitrary length can be optimized using this library if\n * they are short enough (up to 31 bytes) by packing them with their\n * length (1 byte) in a single EVM word (32 bytes). Additionally, a\n * fallback mechanism can be used for every other case.\n *\n * Usage example:\n *\n * ```solidity\n * contract Named {\n *     using ShortStrings for *;\n *\n *     ShortString private immutable _name;\n *     string private _nameFallback;\n *\n *     constructor(string memory contractName) {\n *         _name = contractName.toShortStringWithFallback(_nameFallback);\n *     }\n *\n *     function name() external view returns (string memory) {\n *         return _name.toStringWithFallback(_nameFallback);\n *     }\n * }\n * ```\n */\nlibrary ShortStrings {\n    // Used as an identifier for strings longer than 31 bytes.\n    bytes32 private constant FALLBACK_SENTINEL = 0x00000000000000000000000000000000000000000000000000000000000000FF;\n\n    error StringTooLong(string str);\n    error InvalidShortString();\n\n    /**\n     * @dev Encode a string of at most 31 chars into a `ShortString`.\n     *\n     * This will trigger a `StringTooLong` error is the input string is too long.\n     */\n    function toShortString(string memory str) internal pure returns (ShortString) {\n        bytes memory bstr = bytes(str);\n        if (bstr.length > 31) {\n            revert StringTooLong(str);\n        }\n        return ShortString.wrap(bytes32(uint256(bytes32(bstr)) | bstr.length));\n    }\n\n    /**\n     * @dev Decode a `ShortString` back to a \"normal\" string.\n     */\n    function toString(ShortString sstr) internal pure returns (string memory) {\n        uint256 len = byteLength(sstr);\n        // using `new string(len)` would work locally but is not memory safe.\n        string memory str = new string(32);\n        /// @solidity memory-safe-assembly\n        assembly {\n            mstore(str, len)\n            mstore(add(str, 0x20), sstr)\n        }\n        return str;\n    }\n\n    /**\n     * @dev Return the length of a `ShortString`.\n     */\n    function byteLength(ShortString sstr) internal pure returns (uint256) {\n        uint256 result = uint256(ShortString.unwrap(sstr)) & 0xFF;\n        if (result > 31) {\n            revert InvalidShortString();\n        }\n        return result;\n    }\n\n    /**\n     * @dev Encode a string into a `ShortString`, or write it to storage if it is too long.\n     */\n    function toShortStringWithFallback(string memory value, string storage store) internal returns (ShortString) {\n        if (bytes(value).length < 32) {\n            return toShortString(value);\n        } else {\n            StorageSlot.getStringSlot(store).value = value;\n            return ShortString.wrap(FALLBACK_SENTINEL);\n        }\n    }\n\n    /**\n     * @dev Decode a string that was encoded to `ShortString` or written to storage using {setWithFallback}.\n     */\n    function toStringWithFallback(ShortString value, string storage store) internal pure returns (string memory) {\n        if (ShortString.unwrap(value) != FALLBACK_SENTINEL) {\n            return toString(value);\n        } else {\n            return store;\n        }\n    }\n\n    /**\n     * @dev Return the length of a string that was encoded to `ShortString` or written to storage using\n     * {setWithFallback}.\n     *\n     * WARNING: This will return the \"byte length\" of the string. This may not reflect the actual length in terms of\n     * actual characters as the UTF-8 encoding of a single character can span over multiple bytes.\n     */\n    function byteLengthWithFallback(ShortString value, string storage store) internal view returns (uint256) {\n        if (ShortString.unwrap(value) != FALLBACK_SENTINEL) {\n            return byteLength(value);\n        } else {\n            return bytes(store).length;\n        }\n    }\n}\n"},{"file_path":"lib/openzeppelin-contracts/contracts/utils/StorageSlot.sol","source_code":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/StorageSlot.sol)\n// This file was procedurally generated from scripts/generate/templates/StorageSlot.js.\n\npragma solidity ^0.8.20;\n\n/**\n * @dev Library for reading and writing primitive types to specific storage slots.\n *\n * Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts.\n * This library helps with reading and writing to such slots without the need for inline assembly.\n *\n * The functions in this library return Slot structs that contain a `value` member that can be used to read or write.\n *\n * Example usage to set ERC1967 implementation slot:\n * ```solidity\n * contract ERC1967 {\n *     bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\n *\n *     function _getImplementation() internal view returns (address) {\n *         return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\n *     }\n *\n *     function _setImplementation(address newImplementation) internal {\n *         require(newImplementation.code.length > 0);\n *         StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\n *     }\n * }\n * ```\n */\nlibrary StorageSlot {\n    struct AddressSlot {\n        address value;\n    }\n\n    struct BooleanSlot {\n        bool value;\n    }\n\n    struct Bytes32Slot {\n        bytes32 value;\n    }\n\n    struct Uint256Slot {\n        uint256 value;\n    }\n\n    struct StringSlot {\n        string value;\n    }\n\n    struct BytesSlot {\n        bytes value;\n    }\n\n    /**\n     * @dev Returns an `AddressSlot` with member `value` located at `slot`.\n     */\n    function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) {\n        /// @solidity memory-safe-assembly\n        assembly {\n            r.slot := slot\n        }\n    }\n\n    /**\n     * @dev Returns an `BooleanSlot` with member `value` located at `slot`.\n     */\n    function getBooleanSlot(bytes32 slot) internal pure returns (BooleanSlot storage r) {\n        /// @solidity memory-safe-assembly\n        assembly {\n            r.slot := slot\n        }\n    }\n\n    /**\n     * @dev Returns an `Bytes32Slot` with member `value` located at `slot`.\n     */\n    function getBytes32Slot(bytes32 slot) internal pure returns (Bytes32Slot storage r) {\n        /// @solidity memory-safe-assembly\n        assembly {\n            r.slot := slot\n        }\n    }\n\n    /**\n     * @dev Returns an `Uint256Slot` with member `value` located at `slot`.\n     */\n    function getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) {\n        /// @solidity memory-safe-assembly\n        assembly {\n            r.slot := slot\n        }\n    }\n\n    /**\n     * @dev Returns an `StringSlot` with member `value` located at `slot`.\n     */\n    function getStringSlot(bytes32 slot) internal pure returns (StringSlot storage r) {\n        /// @solidity memory-safe-assembly\n        assembly {\n            r.slot := slot\n        }\n    }\n\n    /**\n     * @dev Returns an `StringSlot` representation of the string storage pointer `store`.\n     */\n    function getStringSlot(string storage store) internal pure returns (StringSlot storage r) {\n        /// @solidity memory-safe-assembly\n        assembly {\n            r.slot := store.slot\n        }\n    }\n\n    /**\n     * @dev Returns an `BytesSlot` with member `value` located at `slot`.\n     */\n    function getBytesSlot(bytes32 slot) internal pure returns (BytesSlot storage r) {\n        /// @solidity memory-safe-assembly\n        assembly {\n            r.slot := slot\n        }\n    }\n\n    /**\n     * @dev Returns an `BytesSlot` representation of the bytes storage pointer `store`.\n     */\n    function getBytesSlot(bytes storage store) internal pure returns (BytesSlot storage r) {\n        /// @solidity memory-safe-assembly\n        assembly {\n            r.slot := store.slot\n        }\n    }\n}\n"},{"file_path":"lib/openzeppelin-contracts/contracts/utils/Strings.sol","source_code":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/Strings.sol)\n\npragma solidity ^0.8.20;\n\nimport {Math} from \"./math/Math.sol\";\nimport {SignedMath} from \"./math/SignedMath.sol\";\n\n/**\n * @dev String operations.\n */\nlibrary Strings {\n    bytes16 private constant HEX_DIGITS = \"0123456789abcdef\";\n    uint8 private constant ADDRESS_LENGTH = 20;\n\n    /**\n     * @dev The `value` string doesn't fit in the specified `length`.\n     */\n    error StringsInsufficientHexLength(uint256 value, uint256 length);\n\n    /**\n     * @dev Converts a `uint256` to its ASCII `string` decimal representation.\n     */\n    function toString(uint256 value) internal pure returns (string memory) {\n        unchecked {\n            uint256 length = Math.log10(value) + 1;\n            string memory buffer = new string(length);\n            uint256 ptr;\n            /// @solidity memory-safe-assembly\n            assembly {\n                ptr := add(buffer, add(32, length))\n            }\n            while (true) {\n                ptr--;\n                /// @solidity memory-safe-assembly\n                assembly {\n                    mstore8(ptr, byte(mod(value, 10), HEX_DIGITS))\n                }\n                value /= 10;\n                if (value == 0) break;\n            }\n            return buffer;\n        }\n    }\n\n    /**\n     * @dev Converts a `int256` to its ASCII `string` decimal representation.\n     */\n    function toStringSigned(int256 value) internal pure returns (string memory) {\n        return string.concat(value < 0 ? \"-\" : \"\", toString(SignedMath.abs(value)));\n    }\n\n    /**\n     * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.\n     */\n    function toHexString(uint256 value) internal pure returns (string memory) {\n        unchecked {\n            return toHexString(value, Math.log256(value) + 1);\n        }\n    }\n\n    /**\n     * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.\n     */\n    function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {\n        uint256 localValue = value;\n        bytes memory buffer = new bytes(2 * length + 2);\n        buffer[0] = \"0\";\n        buffer[1] = \"x\";\n        for (uint256 i = 2 * length + 1; i > 1; --i) {\n            buffer[i] = HEX_DIGITS[localValue & 0xf];\n            localValue >>= 4;\n        }\n        if (localValue != 0) {\n            revert StringsInsufficientHexLength(value, length);\n        }\n        return string(buffer);\n    }\n\n    /**\n     * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal\n     * representation.\n     */\n    function toHexString(address addr) internal pure returns (string memory) {\n        return toHexString(uint256(uint160(addr)), ADDRESS_LENGTH);\n    }\n\n    /**\n     * @dev Returns true if the two strings are equal.\n     */\n    function equal(string memory a, string memory b) internal pure returns (bool) {\n        return bytes(a).length == bytes(b).length && keccak256(bytes(a)) == keccak256(bytes(b));\n    }\n}\n"},{"file_path":"lib/openzeppelin-contracts/contracts/utils/cryptography/ECDSA.sol","source_code":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/cryptography/ECDSA.sol)\n\npragma solidity ^0.8.20;\n\n/**\n * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations.\n *\n * These functions can be used to verify that a message was signed by the holder\n * of the private keys of a given address.\n */\nlibrary ECDSA {\n    enum RecoverError {\n        NoError,\n        InvalidSignature,\n        InvalidSignatureLength,\n        InvalidSignatureS\n    }\n\n    /**\n     * @dev The signature derives the `address(0)`.\n     */\n    error ECDSAInvalidSignature();\n\n    /**\n     * @dev The signature has an invalid length.\n     */\n    error ECDSAInvalidSignatureLength(uint256 length);\n\n    /**\n     * @dev The signature has an S value that is in the upper half order.\n     */\n    error ECDSAInvalidSignatureS(bytes32 s);\n\n    /**\n     * @dev Returns the address that signed a hashed message (`hash`) with `signature` or an error. This will not\n     * return address(0) without also returning an error description. Errors are documented using an enum (error type)\n     * and a bytes32 providing additional information about the error.\n     *\n     * If no error is returned, then the address can be used for verification purposes.\n     *\n     * The `ecrecover` EVM precompile allows for malleable (non-unique) signatures:\n     * this function rejects them by requiring the `s` value to be in the lower\n     * half order, and the `v` value to be either 27 or 28.\n     *\n     * IMPORTANT: `hash` _must_ be the result of a hash operation for the\n     * verification to be secure: it is possible to craft signatures that\n     * recover to arbitrary addresses for non-hashed data. A safe way to ensure\n     * this is by receiving a hash of the original message (which may otherwise\n     * be too long), and then calling {MessageHashUtils-toEthSignedMessageHash} on it.\n     *\n     * Documentation for signature generation:\n     * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js]\n     * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers]\n     */\n    function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError, bytes32) {\n        if (signature.length == 65) {\n            bytes32 r;\n            bytes32 s;\n            uint8 v;\n            // ecrecover takes the signature parameters, and the only way to get them\n            // currently is to use assembly.\n            /// @solidity memory-safe-assembly\n            assembly {\n                r := mload(add(signature, 0x20))\n                s := mload(add(signature, 0x40))\n                v := byte(0, mload(add(signature, 0x60)))\n            }\n            return tryRecover(hash, v, r, s);\n        } else {\n            return (address(0), RecoverError.InvalidSignatureLength, bytes32(signature.length));\n        }\n    }\n\n    /**\n     * @dev Returns the address that signed a hashed message (`hash`) with\n     * `signature`. This address can then be used for verification purposes.\n     *\n     * The `ecrecover` EVM precompile allows for malleable (non-unique) signatures:\n     * this function rejects them by requiring the `s` value to be in the lower\n     * half order, and the `v` value to be either 27 or 28.\n     *\n     * IMPORTANT: `hash` _must_ be the result of a hash operation for the\n     * verification to be secure: it is possible to craft signatures that\n     * recover to arbitrary addresses for non-hashed data. A safe way to ensure\n     * this is by receiving a hash of the original message (which may otherwise\n     * be too long), and then calling {MessageHashUtils-toEthSignedMessageHash} on it.\n     */\n    function recover(bytes32 hash, bytes memory signature) internal pure returns (address) {\n        (address recovered, RecoverError error, bytes32 errorArg) = tryRecover(hash, signature);\n        _throwError(error, errorArg);\n        return recovered;\n    }\n\n    /**\n     * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately.\n     *\n     * See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures]\n     */\n    function tryRecover(bytes32 hash, bytes32 r, bytes32 vs) internal pure returns (address, RecoverError, bytes32) {\n        unchecked {\n            bytes32 s = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff);\n            // We do not check for an overflow here since the shift operation results in 0 or 1.\n            uint8 v = uint8((uint256(vs) >> 255) + 27);\n            return tryRecover(hash, v, r, s);\n        }\n    }\n\n    /**\n     * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately.\n     */\n    function recover(bytes32 hash, bytes32 r, bytes32 vs) internal pure returns (address) {\n        (address recovered, RecoverError error, bytes32 errorArg) = tryRecover(hash, r, vs);\n        _throwError(error, errorArg);\n        return recovered;\n    }\n\n    /**\n     * @dev Overload of {ECDSA-tryRecover} that receives the `v`,\n     * `r` and `s` signature fields separately.\n     */\n    function tryRecover(\n        bytes32 hash,\n        uint8 v,\n        bytes32 r,\n        bytes32 s\n    ) internal pure returns (address, RecoverError, bytes32) {\n        // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature\n        // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines\n        // the valid range for s in (301): 0 < s < secp256k1n ÷ 2 + 1, and for v in (302): v ∈ {27, 28}. Most\n        // signatures from current libraries generate a unique signature with an s-value in the lower half order.\n        //\n        // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value\n        // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or\n        // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept\n        // these malleable signatures as well.\n        if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {\n            return (address(0), RecoverError.InvalidSignatureS, s);\n        }\n\n        // If the signature is valid (and not malleable), return the signer address\n        address signer = ecrecover(hash, v, r, s);\n        if (signer == address(0)) {\n            return (address(0), RecoverError.InvalidSignature, bytes32(0));\n        }\n\n        return (signer, RecoverError.NoError, bytes32(0));\n    }\n\n    /**\n     * @dev Overload of {ECDSA-recover} that receives the `v`,\n     * `r` and `s` signature fields separately.\n     */\n    function recover(bytes32 hash, uint8 v, bytes32 r, bytes32 s) internal pure returns (address) {\n        (address recovered, RecoverError error, bytes32 errorArg) = tryRecover(hash, v, r, s);\n        _throwError(error, errorArg);\n        return recovered;\n    }\n\n    /**\n     * @dev Optionally reverts with the corresponding custom error according to the `error` argument provided.\n     */\n    function _throwError(RecoverError error, bytes32 errorArg) private pure {\n        if (error == RecoverError.NoError) {\n            return; // no error: do nothing\n        } else if (error == RecoverError.InvalidSignature) {\n            revert ECDSAInvalidSignature();\n        } else if (error == RecoverError.InvalidSignatureLength) {\n            revert ECDSAInvalidSignatureLength(uint256(errorArg));\n        } else if (error == RecoverError.InvalidSignatureS) {\n            revert ECDSAInvalidSignatureS(errorArg);\n        }\n    }\n}\n"},{"file_path":"lib/openzeppelin-contracts/contracts/utils/cryptography/EIP712.sol","source_code":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/cryptography/EIP712.sol)\n\npragma solidity ^0.8.20;\n\nimport {MessageHashUtils} from \"./MessageHashUtils.sol\";\nimport {ShortStrings, ShortString} from \"../ShortStrings.sol\";\nimport {IERC5267} from \"../../interfaces/IERC5267.sol\";\n\n/**\n * @dev https://eips.ethereum.org/EIPS/eip-712[EIP 712] is a standard for hashing and signing of typed structured data.\n *\n * The encoding scheme specified in the EIP requires a domain separator and a hash of the typed structured data, whose\n * encoding is very generic and therefore its implementation in Solidity is not feasible, thus this contract\n * does not implement the encoding itself. Protocols need to implement the type-specific encoding they need in order to\n * produce the hash of their typed data using a combination of `abi.encode` and `keccak256`.\n *\n * This contract implements the EIP 712 domain separator ({_domainSeparatorV4}) that is used as part of the encoding\n * scheme, and the final step of the encoding to obtain the message digest that is then signed via ECDSA\n * ({_hashTypedDataV4}).\n *\n * The implementation of the domain separator was designed to be as efficient as possible while still properly updating\n * the chain id to protect against replay attacks on an eventual fork of the chain.\n *\n * NOTE: This contract implements the version of the encoding known as \"v4\", as implemented by the JSON RPC method\n * https://docs.metamask.io/guide/signing-data.html[`eth_signTypedDataV4` in MetaMask].\n *\n * NOTE: In the upgradeable version of this contract, the cached values will correspond to the address, and the domain\n * separator of the implementation contract. This will cause the {_domainSeparatorV4} function to always rebuild the\n * separator from the immutable values, which is cheaper than accessing a cached version in cold storage.\n *\n * @custom:oz-upgrades-unsafe-allow state-variable-immutable\n */\nabstract contract EIP712 is IERC5267 {\n    using ShortStrings for *;\n\n    bytes32 private constant TYPE_HASH =\n        keccak256(\"EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)\");\n\n    // Cache the domain separator as an immutable value, but also store the chain id that it corresponds to, in order to\n    // invalidate the cached domain separator if the chain id changes.\n    bytes32 private immutable _cachedDomainSeparator;\n    uint256 private immutable _cachedChainId;\n    address private immutable _cachedThis;\n\n    bytes32 private immutable _hashedName;\n    bytes32 private immutable _hashedVersion;\n\n    ShortString private immutable _name;\n    ShortString private immutable _version;\n    string private _nameFallback;\n    string private _versionFallback;\n\n    /**\n     * @dev Initializes the domain separator and parameter caches.\n     *\n     * The meaning of `name` and `version` is specified in\n     * https://eips.ethereum.org/EIPS/eip-712#definition-of-domainseparator[EIP 712]:\n     *\n     * - `name`: the user readable name of the signing domain, i.e. the name of the DApp or the protocol.\n     * - `version`: the current major version of the signing domain.\n     *\n     * NOTE: These parameters cannot be changed except through a xref:learn::upgrading-smart-contracts.adoc[smart\n     * contract upgrade].\n     */\n    constructor(string memory name, string memory version) {\n        _name = name.toShortStringWithFallback(_nameFallback);\n        _version = version.toShortStringWithFallback(_versionFallback);\n        _hashedName = keccak256(bytes(name));\n        _hashedVersion = keccak256(bytes(version));\n\n        _cachedChainId = block.chainid;\n        _cachedDomainSeparator = _buildDomainSeparator();\n        _cachedThis = address(this);\n    }\n\n    /**\n     * @dev Returns the domain separator for the current chain.\n     */\n    function _domainSeparatorV4() internal view returns (bytes32) {\n        if (address(this) == _cachedThis && block.chainid == _cachedChainId) {\n            return _cachedDomainSeparator;\n        } else {\n            return _buildDomainSeparator();\n        }\n    }\n\n    function _buildDomainSeparator() private view returns (bytes32) {\n        return keccak256(abi.encode(TYPE_HASH, _hashedName, _hashedVersion, block.chainid, address(this)));\n    }\n\n    /**\n     * @dev Given an already https://eips.ethereum.org/EIPS/eip-712#definition-of-hashstruct[hashed struct], this\n     * function returns the hash of the fully encoded EIP712 message for this domain.\n     *\n     * This hash can be used together with {ECDSA-recover} to obtain the signer of a message. For example:\n     *\n     * ```solidity\n     * bytes32 digest = _hashTypedDataV4(keccak256(abi.encode(\n     *     keccak256(\"Mail(address to,string contents)\"),\n     *     mailTo,\n     *     keccak256(bytes(mailContents))\n     * )));\n     * address signer = ECDSA.recover(digest, signature);\n     * ```\n     */\n    function _hashTypedDataV4(bytes32 structHash) internal view virtual returns (bytes32) {\n        return MessageHashUtils.toTypedDataHash(_domainSeparatorV4(), structHash);\n    }\n\n    /**\n     * @dev See {IERC-5267}.\n     */\n    function eip712Domain()\n        public\n        view\n        virtual\n        returns (\n            bytes1 fields,\n            string memory name,\n            string memory version,\n            uint256 chainId,\n            address verifyingContract,\n            bytes32 salt,\n            uint256[] memory extensions\n        )\n    {\n        return (\n            hex\"0f\", // 01111\n            _EIP712Name(),\n            _EIP712Version(),\n            block.chainid,\n            address(this),\n            bytes32(0),\n            new uint256[](0)\n        );\n    }\n\n    /**\n     * @dev The name parameter for the EIP712 domain.\n     *\n     * NOTE: By default this function reads _name which is an immutable value.\n     * It only reads from storage if necessary (in case the value is too large to fit in a ShortString).\n     */\n    // solhint-disable-next-line func-name-mixedcase\n    function _EIP712Name() internal view returns (string memory) {\n        return _name.toStringWithFallback(_nameFallback);\n    }\n\n    /**\n     * @dev The version parameter for the EIP712 domain.\n     *\n     * NOTE: By default this function reads _version which is an immutable value.\n     * It only reads from storage if necessary (in case the value is too large to fit in a ShortString).\n     */\n    // solhint-disable-next-line func-name-mixedcase\n    function _EIP712Version() internal view returns (string memory) {\n        return _version.toStringWithFallback(_versionFallback);\n    }\n}\n"},{"file_path":"lib/openzeppelin-contracts/contracts/utils/cryptography/MessageHashUtils.sol","source_code":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/cryptography/MessageHashUtils.sol)\n\npragma solidity ^0.8.20;\n\nimport {Strings} from \"../Strings.sol\";\n\n/**\n * @dev Signature message hash utilities for producing digests to be consumed by {ECDSA} recovery or signing.\n *\n * The library provides methods for generating a hash of a message that conforms to the\n * https://eips.ethereum.org/EIPS/eip-191[EIP 191] and https://eips.ethereum.org/EIPS/eip-712[EIP 712]\n * specifications.\n */\nlibrary MessageHashUtils {\n    /**\n     * @dev Returns the keccak256 digest of an EIP-191 signed data with version\n     * `0x45` (`personal_sign` messages).\n     *\n     * The digest is calculated by prefixing a bytes32 `messageHash` with\n     * `\"\\x19Ethereum Signed Message:\\n32\"` and hashing the result. It corresponds with the\n     * hash signed when using the https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] JSON-RPC method.\n     *\n     * NOTE: The `messageHash` parameter is intended to be the result of hashing a raw message with\n     * keccak256, although any bytes32 value can be safely used because the final digest will\n     * be re-hashed.\n     *\n     * See {ECDSA-recover}.\n     */\n    function toEthSignedMessageHash(bytes32 messageHash) internal pure returns (bytes32 digest) {\n        /// @solidity memory-safe-assembly\n        assembly {\n            mstore(0x00, \"\\x19Ethereum Signed Message:\\n32\") // 32 is the bytes-length of messageHash\n            mstore(0x1c, messageHash) // 0x1c (28) is the length of the prefix\n            digest := keccak256(0x00, 0x3c) // 0x3c is the length of the prefix (0x1c) + messageHash (0x20)\n        }\n    }\n\n    /**\n     * @dev Returns the keccak256 digest of an EIP-191 signed data with version\n     * `0x45` (`personal_sign` messages).\n     *\n     * The digest is calculated by prefixing an arbitrary `message` with\n     * `\"\\x19Ethereum Signed Message:\\n\" + len(message)` and hashing the result. It corresponds with the\n     * hash signed when using the https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] JSON-RPC method.\n     *\n     * See {ECDSA-recover}.\n     */\n    function toEthSignedMessageHash(bytes memory message) internal pure returns (bytes32) {\n        return\n            keccak256(bytes.concat(\"\\x19Ethereum Signed Message:\\n\", bytes(Strings.toString(message.length)), message));\n    }\n\n    /**\n     * @dev Returns the keccak256 digest of an EIP-191 signed data with version\n     * `0x00` (data with intended validator).\n     *\n     * The digest is calculated by prefixing an arbitrary `data` with `\"\\x19\\x00\"` and the intended\n     * `validator` address. Then hashing the result.\n     *\n     * See {ECDSA-recover}.\n     */\n    function toDataWithIntendedValidatorHash(address validator, bytes memory data) internal pure returns (bytes32) {\n        return keccak256(abi.encodePacked(hex\"19_00\", validator, data));\n    }\n\n    /**\n     * @dev Returns the keccak256 digest of an EIP-712 typed data (EIP-191 version `0x01`).\n     *\n     * The digest is calculated from a `domainSeparator` and a `structHash`, by prefixing them with\n     * `\\x19\\x01` and hashing the result. It corresponds to the hash signed by the\n     * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`] JSON-RPC method as part of EIP-712.\n     *\n     * See {ECDSA-recover}.\n     */\n    function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32 digest) {\n        /// @solidity memory-safe-assembly\n        assembly {\n            let ptr := mload(0x40)\n            mstore(ptr, hex\"19_01\")\n            mstore(add(ptr, 0x02), domainSeparator)\n            mstore(add(ptr, 0x22), structHash)\n            digest := keccak256(ptr, 0x42)\n        }\n    }\n}\n"},{"file_path":"lib/openzeppelin-contracts/contracts/utils/cryptography/SignatureChecker.sol","source_code":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/cryptography/SignatureChecker.sol)\n\npragma solidity ^0.8.20;\n\nimport {ECDSA} from \"./ECDSA.sol\";\nimport {IERC1271} from \"../../interfaces/IERC1271.sol\";\n\n/**\n * @dev Signature verification helper that can be used instead of `ECDSA.recover` to seamlessly support both ECDSA\n * signatures from externally owned accounts (EOAs) as well as ERC1271 signatures from smart contract wallets like\n * Argent and Safe Wallet (previously Gnosis Safe).\n */\nlibrary SignatureChecker {\n    /**\n     * @dev Checks if a signature is valid for a given signer and data hash. If the signer is a smart contract, the\n     * signature is validated against that smart contract using ERC1271, otherwise it's validated using `ECDSA.recover`.\n     *\n     * NOTE: Unlike ECDSA signatures, contract signatures are revocable, and the outcome of this function can thus\n     * change through time. It could return true at block N and false at block N+1 (or the opposite).\n     */\n    function isValidSignatureNow(address signer, bytes32 hash, bytes memory signature) internal view returns (bool) {\n        (address recovered, ECDSA.RecoverError error, ) = ECDSA.tryRecover(hash, signature);\n        return\n            (error == ECDSA.RecoverError.NoError && recovered == signer) ||\n            isValidERC1271SignatureNow(signer, hash, signature);\n    }\n\n    /**\n     * @dev Checks if a signature is valid for a given signer and data hash. The signature is validated\n     * against the signer smart contract using ERC1271.\n     *\n     * NOTE: Unlike ECDSA signatures, contract signatures are revocable, and the outcome of this function can thus\n     * change through time. It could return true at block N and false at block N+1 (or the opposite).\n     */\n    function isValidERC1271SignatureNow(\n        address signer,\n        bytes32 hash,\n        bytes memory signature\n    ) internal view returns (bool) {\n        (bool success, bytes memory result) = signer.staticcall(\n            abi.encodeCall(IERC1271.isValidSignature, (hash, signature))\n        );\n        return (success &&\n            result.length >= 32 &&\n            abi.decode(result, (bytes32)) == bytes32(IERC1271.isValidSignature.selector));\n    }\n}\n"},{"file_path":"lib/openzeppelin-contracts/contracts/utils/math/Math.sol","source_code":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/math/Math.sol)\n\npragma solidity ^0.8.20;\n\n/**\n * @dev Standard math utilities missing in the Solidity language.\n */\nlibrary Math {\n    /**\n     * @dev Muldiv operation overflow.\n     */\n    error MathOverflowedMulDiv();\n\n    enum Rounding {\n        Floor, // Toward negative infinity\n        Ceil, // Toward positive infinity\n        Trunc, // Toward zero\n        Expand // Away from zero\n    }\n\n    /**\n     * @dev Returns the addition of two unsigned integers, with an overflow flag.\n     */\n    function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {\n        unchecked {\n            uint256 c = a + b;\n            if (c < a) return (false, 0);\n            return (true, c);\n        }\n    }\n\n    /**\n     * @dev Returns the subtraction of two unsigned integers, with an overflow flag.\n     */\n    function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {\n        unchecked {\n            if (b > a) return (false, 0);\n            return (true, a - b);\n        }\n    }\n\n    /**\n     * @dev Returns the multiplication of two unsigned integers, with an overflow flag.\n     */\n    function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {\n        unchecked {\n            // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\n            // benefit is lost if 'b' is also tested.\n            // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522\n            if (a == 0) return (true, 0);\n            uint256 c = a * b;\n            if (c / a != b) return (false, 0);\n            return (true, c);\n        }\n    }\n\n    /**\n     * @dev Returns the division of two unsigned integers, with a division by zero flag.\n     */\n    function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {\n        unchecked {\n            if (b == 0) return (false, 0);\n            return (true, a / b);\n        }\n    }\n\n    /**\n     * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.\n     */\n    function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {\n        unchecked {\n            if (b == 0) return (false, 0);\n            return (true, a % b);\n        }\n    }\n\n    /**\n     * @dev Returns the largest of two numbers.\n     */\n    function max(uint256 a, uint256 b) internal pure returns (uint256) {\n        return a > b ? a : b;\n    }\n\n    /**\n     * @dev Returns the smallest of two numbers.\n     */\n    function min(uint256 a, uint256 b) internal pure returns (uint256) {\n        return a < b ? a : b;\n    }\n\n    /**\n     * @dev Returns the average of two numbers. The result is rounded towards\n     * zero.\n     */\n    function average(uint256 a, uint256 b) internal pure returns (uint256) {\n        // (a + b) / 2 can overflow.\n        return (a & b) + (a ^ b) / 2;\n    }\n\n    /**\n     * @dev Returns the ceiling of the division of two numbers.\n     *\n     * This differs from standard division with `/` in that it rounds towards infinity instead\n     * of rounding towards zero.\n     */\n    function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {\n        if (b == 0) {\n            // Guarantee the same behavior as in a regular Solidity division.\n            return a / b;\n        }\n\n        // (a + b - 1) / b can overflow on addition, so we distribute.\n        return a == 0 ? 0 : (a - 1) / b + 1;\n    }\n\n    /**\n     * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or\n     * denominator == 0.\n     * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv) with further edits by\n     * Uniswap Labs also under MIT license.\n     */\n    function mulDiv(uint256 x, uint256 y, uint256 denominator) internal pure returns (uint256 result) {\n        unchecked {\n            // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use\n            // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256\n            // variables such that product = prod1 * 2^256 + prod0.\n            uint256 prod0 = x * y; // Least significant 256 bits of the product\n            uint256 prod1; // Most significant 256 bits of the product\n            assembly {\n                let mm := mulmod(x, y, not(0))\n                prod1 := sub(sub(mm, prod0), lt(mm, prod0))\n            }\n\n            // Handle non-overflow cases, 256 by 256 division.\n            if (prod1 == 0) {\n                // Solidity will revert if denominator == 0, unlike the div opcode on its own.\n                // The surrounding unchecked block does not change this fact.\n                // See https://docs.soliditylang.org/en/latest/control-structures.html#checked-or-unchecked-arithmetic.\n                return prod0 / denominator;\n            }\n\n            // Make sure the result is less than 2^256. Also prevents denominator == 0.\n            if (denominator <= prod1) {\n                revert MathOverflowedMulDiv();\n            }\n\n            ///////////////////////////////////////////////\n            // 512 by 256 division.\n            ///////////////////////////////////////////////\n\n            // Make division exact by subtracting the remainder from [prod1 prod0].\n            uint256 remainder;\n            assembly {\n                // Compute remainder using mulmod.\n                remainder := mulmod(x, y, denominator)\n\n                // Subtract 256 bit number from 512 bit number.\n                prod1 := sub(prod1, gt(remainder, prod0))\n                prod0 := sub(prod0, remainder)\n            }\n\n            // Factor powers of two out of denominator and compute largest power of two divisor of denominator.\n            // Always >= 1. See https://cs.stackexchange.com/q/138556/92363.\n\n            uint256 twos = denominator & (0 - denominator);\n            assembly {\n                // Divide denominator by twos.\n                denominator := div(denominator, twos)\n\n                // Divide [prod1 prod0] by twos.\n                prod0 := div(prod0, twos)\n\n                // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one.\n                twos := add(div(sub(0, twos), twos), 1)\n            }\n\n            // Shift in bits from prod1 into prod0.\n            prod0 |= prod1 * twos;\n\n            // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such\n            // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for\n            // four bits. That is, denominator * inv = 1 mod 2^4.\n            uint256 inverse = (3 * denominator) ^ 2;\n\n            // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also\n            // works in modular arithmetic, doubling the correct bits in each step.\n            inverse *= 2 - denominator * inverse; // inverse mod 2^8\n            inverse *= 2 - denominator * inverse; // inverse mod 2^16\n            inverse *= 2 - denominator * inverse; // inverse mod 2^32\n            inverse *= 2 - denominator * inverse; // inverse mod 2^64\n            inverse *= 2 - denominator * inverse; // inverse mod 2^128\n            inverse *= 2 - denominator * inverse; // inverse mod 2^256\n\n            // Because the division is now exact we can divide by multiplying with the modular inverse of denominator.\n            // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is\n            // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1\n            // is no longer required.\n            result = prod0 * inverse;\n            return result;\n        }\n    }\n\n    /**\n     * @notice Calculates x * y / denominator with full precision, following the selected rounding direction.\n     */\n    function mulDiv(uint256 x, uint256 y, uint256 denominator, Rounding rounding) internal pure returns (uint256) {\n        uint256 result = mulDiv(x, y, denominator);\n        if (unsignedRoundsUp(rounding) && mulmod(x, y, denominator) > 0) {\n            result += 1;\n        }\n        return result;\n    }\n\n    /**\n     * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded\n     * towards zero.\n     *\n     * Inspired by Henry S. Warren, Jr.'s \"Hacker's Delight\" (Chapter 11).\n     */\n    function sqrt(uint256 a) internal pure returns (uint256) {\n        if (a == 0) {\n            return 0;\n        }\n\n        // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target.\n        //\n        // We know that the \"msb\" (most significant bit) of our target number `a` is a power of 2 such that we have\n        // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`.\n        //\n        // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)`\n        // → `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))`\n        // → `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)`\n        //\n        // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit.\n        uint256 result = 1 << (log2(a) >> 1);\n\n        // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128,\n        // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at\n        // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision\n        // into the expected uint128 result.\n        unchecked {\n            result = (result + a / result) >> 1;\n            result = (result + a / result) >> 1;\n            result = (result + a / result) >> 1;\n            result = (result + a / result) >> 1;\n            result = (result + a / result) >> 1;\n            result = (result + a / result) >> 1;\n            result = (result + a / result) >> 1;\n            return min(result, a / result);\n        }\n    }\n\n    /**\n     * @notice Calculates sqrt(a), following the selected rounding direction.\n     */\n    function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) {\n        unchecked {\n            uint256 result = sqrt(a);\n            return result + (unsignedRoundsUp(rounding) && result * result < a ? 1 : 0);\n        }\n    }\n\n    /**\n     * @dev Return the log in base 2 of a positive value rounded towards zero.\n     * Returns 0 if given 0.\n     */\n    function log2(uint256 value) internal pure returns (uint256) {\n        uint256 result = 0;\n        unchecked {\n            if (value >> 128 > 0) {\n                value >>= 128;\n                result += 128;\n            }\n            if (value >> 64 > 0) {\n                value >>= 64;\n                result += 64;\n            }\n            if (value >> 32 > 0) {\n                value >>= 32;\n                result += 32;\n            }\n            if (value >> 16 > 0) {\n                value >>= 16;\n                result += 16;\n            }\n            if (value >> 8 > 0) {\n                value >>= 8;\n                result += 8;\n            }\n            if (value >> 4 > 0) {\n                value >>= 4;\n                result += 4;\n            }\n            if (value >> 2 > 0) {\n                value >>= 2;\n                result += 2;\n            }\n            if (value >> 1 > 0) {\n                result += 1;\n            }\n        }\n        return result;\n    }\n\n    /**\n     * @dev Return the log in base 2, following the selected rounding direction, of a positive value.\n     * Returns 0 if given 0.\n     */\n    function log2(uint256 value, Rounding rounding) internal pure returns (uint256) {\n        unchecked {\n            uint256 result = log2(value);\n            return result + (unsignedRoundsUp(rounding) && 1 << result < value ? 1 : 0);\n        }\n    }\n\n    /**\n     * @dev Return the log in base 10 of a positive value rounded towards zero.\n     * Returns 0 if given 0.\n     */\n    function log10(uint256 value) internal pure returns (uint256) {\n        uint256 result = 0;\n        unchecked {\n            if (value >= 10 ** 64) {\n                value /= 10 ** 64;\n                result += 64;\n            }\n            if (value >= 10 ** 32) {\n                value /= 10 ** 32;\n                result += 32;\n            }\n            if (value >= 10 ** 16) {\n                value /= 10 ** 16;\n                result += 16;\n            }\n            if (value >= 10 ** 8) {\n                value /= 10 ** 8;\n                result += 8;\n            }\n            if (value >= 10 ** 4) {\n                value /= 10 ** 4;\n                result += 4;\n            }\n            if (value >= 10 ** 2) {\n                value /= 10 ** 2;\n                result += 2;\n            }\n            if (value >= 10 ** 1) {\n                result += 1;\n            }\n        }\n        return result;\n    }\n\n    /**\n     * @dev Return the log in base 10, following the selected rounding direction, of a positive value.\n     * Returns 0 if given 0.\n     */\n    function log10(uint256 value, Rounding rounding) internal pure returns (uint256) {\n        unchecked {\n            uint256 result = log10(value);\n            return result + (unsignedRoundsUp(rounding) && 10 ** result < value ? 1 : 0);\n        }\n    }\n\n    /**\n     * @dev Return the log in base 256 of a positive value rounded towards zero.\n     * Returns 0 if given 0.\n     *\n     * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string.\n     */\n    function log256(uint256 value) internal pure returns (uint256) {\n        uint256 result = 0;\n        unchecked {\n            if (value >> 128 > 0) {\n                value >>= 128;\n                result += 16;\n            }\n            if (value >> 64 > 0) {\n                value >>= 64;\n                result += 8;\n            }\n            if (value >> 32 > 0) {\n                value >>= 32;\n                result += 4;\n            }\n            if (value >> 16 > 0) {\n                value >>= 16;\n                result += 2;\n            }\n            if (value >> 8 > 0) {\n                result += 1;\n            }\n        }\n        return result;\n    }\n\n    /**\n     * @dev Return the log in base 256, following the selected rounding direction, of a positive value.\n     * Returns 0 if given 0.\n     */\n    function log256(uint256 value, Rounding rounding) internal pure returns (uint256) {\n        unchecked {\n            uint256 result = log256(value);\n            return result + (unsignedRoundsUp(rounding) && 1 << (result << 3) < value ? 1 : 0);\n        }\n    }\n\n    /**\n     * @dev Returns whether a provided rounding mode is considered rounding up for unsigned integers.\n     */\n    function unsignedRoundsUp(Rounding rounding) internal pure returns (bool) {\n        return uint8(rounding) % 2 == 1;\n    }\n}\n"},{"file_path":"lib/openzeppelin-contracts/contracts/utils/math/SignedMath.sol","source_code":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/math/SignedMath.sol)\n\npragma solidity ^0.8.20;\n\n/**\n * @dev Standard signed math utilities missing in the Solidity language.\n */\nlibrary SignedMath {\n    /**\n     * @dev Returns the largest of two signed numbers.\n     */\n    function max(int256 a, int256 b) internal pure returns (int256) {\n        return a > b ? a : b;\n    }\n\n    /**\n     * @dev Returns the smallest of two signed numbers.\n     */\n    function min(int256 a, int256 b) internal pure returns (int256) {\n        return a < b ? a : b;\n    }\n\n    /**\n     * @dev Returns the average of two signed numbers without overflow.\n     * The result is rounded towards zero.\n     */\n    function average(int256 a, int256 b) internal pure returns (int256) {\n        // Formula from the book \"Hacker's Delight\"\n        int256 x = (a & b) + ((a ^ b) >> 1);\n        return x + (int256(uint256(x) >> 255) & (a ^ b));\n    }\n\n    /**\n     * @dev Returns the absolute unsigned value of a signed value.\n     */\n    function abs(int256 n) internal pure returns (uint256) {\n        unchecked {\n            // must be unchecked in order to support `n = type(int256).min`\n            return uint256(n >= 0 ? n : -n);\n        }\n    }\n}\n"},{"file_path":"src/interfaces/IProtocolUpgradeHandler.sol","source_code":"// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.24;\n\n/// @author Matter Labs\n/// @custom:security-contact security@matterlabs.dev\ninterface IProtocolUpgradeHandler {\n    /// @dev This enumeration includes the following states:\n    /// @param None Default state, indicating the upgrade has not been set.\n    /// @param LegalVetoPeriod The upgrade passed L2 voting process but it is waiting for the legal veto period.\n    /// @param Waiting The upgrade passed Legal Veto period but it is waiting for the approval from guardians or Security Council.\n    /// @param ExecutionPending The upgrade proposal is waiting for the delay period before being ready for execution.\n    /// @param Ready The upgrade proposal is ready to be executed.\n    /// @param Expired The upgrade proposal was expired.\n    /// @param Done The upgrade has been successfully executed.\n    enum UpgradeState {\n        None,\n        LegalVetoPeriod,\n        Waiting,\n        ExecutionPending,\n        Ready,\n        Expired,\n        Done\n    }\n\n    /// @dev Represents the status of an upgrade process, including the creation timestamp and actions made by guardians and Security Council.\n    /// @param creationTimestamp The timestamp (in seconds) when the upgrade state was created.\n    /// @param securityCouncilApprovalTimestamp The timestamp (in seconds) when Security Council approved the upgrade.\n    /// @param guardiansApproval Indicates whether the upgrade has been approved by the guardians.\n    /// @param guardiansExtendedLegalVeto Indicates whether guardians extended the legal veto period.\n    /// @param executed Indicates whether the proposal is executed or not.\n    struct UpgradeStatus {\n        uint48 creationTimestamp;\n        uint48 securityCouncilApprovalTimestamp;\n        bool guardiansApproval;\n        bool guardiansExtendedLegalVeto;\n        bool executed;\n    }\n\n    /// @dev Represents a call to be made during an upgrade.\n    /// @param target The address to which the call will be made.\n    /// @param value The amount of Ether (in wei) to be sent along with the call.\n    /// @param data The calldata to be executed on the `target` address.\n    struct Call {\n        address target;\n        uint256 value;\n        bytes data;\n    }\n\n    /// @dev Defines the structure of an upgrade that is executed by Protocol Upgrade Handler.\n    /// @param executor The L1 address that is authorized to perform the upgrade execution (if address(0) then anyone).\n    /// @param calls An array of `Call` structs, each representing a call to be made during the upgrade execution.\n    /// @param salt A bytes32 value used for creating unique upgrade proposal hashes.\n    struct UpgradeProposal {\n        Call[] calls;\n        address executor;\n        bytes32 salt;\n    }\n\n    /// @dev This enumeration includes the following states:\n    /// @param None Default state, indicating the freeze has not been happening in this upgrade cycle.\n    /// @param Soft The protocol is/was frozen for the short time.\n    /// @param Hard The protocol is/was frozen for the long time.\n    /// @param AfterSoftFreeze The protocol was soft frozen, it can be hard frozen in this upgrade cycle.\n    /// @param AfterHardFreeze The protocol was hard frozen, but now it can't be frozen until the upgrade.\n    enum FreezeStatus {\n        None,\n        Soft,\n        Hard,\n        AfterSoftFreeze,\n        AfterHardFreeze\n    }\n\n    function startUpgrade(\n        uint256 _l2BatchNumber,\n        uint256 _l2MessageIndex,\n        uint16 _l2TxNumberInBatch,\n        bytes32[] calldata _proof,\n        UpgradeProposal calldata _proposal\n    ) external;\n\n    function extendLegalVeto(bytes32 _id) external;\n\n    function approveUpgradeSecurityCouncil(bytes32 _id) external;\n\n    function approveUpgradeGuardians(bytes32 _id) external;\n\n    function execute(UpgradeProposal calldata _proposal) external payable;\n\n    function executeEmergencyUpgrade(UpgradeProposal calldata _proposal) external payable;\n\n    function softFreeze() external;\n\n    function hardFreeze() external;\n\n    function reinforceFreeze() external;\n\n    function unfreeze() external;\n\n    function reinforceFreezeOneChain(uint256 _chainId) external;\n\n    function reinforceUnfreeze() external;\n\n    function reinforceUnfreezeOneChain(uint256 _chainId) external;\n\n    function upgradeState(bytes32 _id) external view returns (UpgradeState);\n\n    function updateSecurityCouncil(address _newSecurityCouncil) external;\n\n    function updateGuardians(address _newGuardians) external;\n\n    function updateEmergencyUpgradeBoard(address _newEmergencyUpgradeBoard) external;\n\n    /// @notice Emitted when the security council address is changed.\n    event ChangeSecurityCouncil(address indexed _securityCouncilBefore, address indexed _securityCouncilAfter);\n\n    /// @notice Emitted when the guardians address is changed.\n    event ChangeGuardians(address indexed _guardiansBefore, address indexed _guardiansAfter);\n\n    /// @notice Emitted when the emergency upgrade board address is changed.\n    event ChangeEmergencyUpgradeBoard(\n        address indexed _emergencyUpgradeBoardBefore, address indexed _emergencyUpgradeBoardAfter\n    );\n\n    /// @notice Emitted when upgrade process on L1 is started.\n    event UpgradeStarted(bytes32 indexed _id, UpgradeProposal _proposal);\n\n    /// @notice Emitted when the legal veto period is extended.\n    event UpgradeLegalVetoExtended(bytes32 indexed _id);\n\n    /// @notice Emitted when Security Council approved the upgrade.\n    event UpgradeApprovedBySecurityCouncil(bytes32 indexed _id);\n\n    /// @notice Emitted when Guardians approved the upgrade.\n    event UpgradeApprovedByGuardians(bytes32 indexed _id);\n\n    /// @notice Emitted when the upgrade is executed.\n    event UpgradeExecuted(bytes32 indexed _id);\n\n    /// @notice Emitted when the emergency upgrade is executed.\n    event EmergencyUpgradeExecuted(bytes32 indexed _id);\n\n    /// @notice Emitted when the protocol became soft frozen.\n    event SoftFreeze(uint256 _protocolFrozenUntil);\n\n    /// @notice Emitted when the protocol became hard frozen.\n    event HardFreeze(uint256 _protocolFrozenUntil);\n\n    /// @notice Emitted when someone makes an attempt to freeze the protocol when it is frozen already.\n    event ReinforceFreeze();\n\n    /// @notice Emitted when the protocol became active after the soft/hard freeze.\n    event Unfreeze();\n\n    /// @notice Emitted when someone makes an attempt to freeze the specific chain when the protocol is frozen already.\n    event ReinforceFreezeOneChain(uint256 _chainId);\n\n    /// @notice Emitted when someone makes an attempt to unfreeze the protocol when it is unfrozen already.\n    event ReinforceUnfreeze();\n\n    /// @notice Emitted when someone makes an attempt to unfreeze the specific chain when the protocol is unfrozen already.\n    event ReinforceUnfreezeOneChain(uint256 _chainId);\n}\n"}],"certified":false,"conflicting_implementations":null,"abi":[{"inputs":[{"internalType":"contract IProtocolUpgradeHandler","name":"_protocolUpgradeHandler","type":"address"},{"internalType":"address","name":"_securityCouncil","type":"address"},{"internalType":"address","name":"_guardians","type":"address"},{"internalType":"address","name":"_zkFoundation","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"InvalidShortString","type":"error"},{"inputs":[{"internalType":"string","name":"str","type":"string"}],"name":"StringTooLong","type":"error"},{"anonymous":false,"inputs":[],"name":"EIP712DomainChanged","type":"event"},{"inputs":[],"name":"GUARDIANS","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"PROTOCOL_UPGRADE_HANDLER","outputs":[{"internalType":"contract IProtocolUpgradeHandler","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"SECURITY_COUNCIL","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"ZK_FOUNDATION_SAFE","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"eip712Domain","outputs":[{"internalType":"bytes1","name":"fields","type":"bytes1"},{"internalType":"string","name":"name","type":"string"},{"internalType":"string","name":"version","type":"string"},{"internalType":"uint256","name":"chainId","type":"uint256"},{"internalType":"address","name":"verifyingContract","type":"address"},{"internalType":"bytes32","name":"salt","type":"bytes32"},{"internalType":"uint256[]","name":"extensions","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"components":[{"internalType":"address","name":"target","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"internalType":"struct IProtocolUpgradeHandler.Call[]","name":"_calls","type":"tuple[]"},{"internalType":"bytes32","name":"_salt","type":"bytes32"},{"internalType":"bytes","name":"_guardiansSignatures","type":"bytes"},{"internalType":"bytes","name":"_securityCouncilSignatures","type":"bytes"},{"internalType":"bytes","name":"_zkFoundationSignatures","type":"bytes"}],"name":"executeEmergencyUpgrade","outputs":[],"stateMutability":"nonpayable","type":"function"}],"is_changed_bytecode":false,"is_partially_verified":false,"constructor_args":"0x000000000000000000000000e30dca3047b37dc7d88849de4a4dc07937ad5ab300000000000000000000000059195219d1176e42f8e607e9ac114926d47f9035000000000000000000000000600da620ab29f41abc6596a15981e14ce58c86b8000000000000000000000000bc1653bd3829dfec575afc3816d4899cd103b51c"}