{"constructor_args":null,"is_partially_verified":false,"is_changed_bytecode":false,"abi":[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"bytes32","name":"operationId","type":"bytes32"}],"name":"AccessManagerAlreadyScheduled","type":"error"},{"inputs":[],"name":"AccessManagerBadConfirmation","type":"error"},{"inputs":[{"internalType":"bytes32","name":"operationId","type":"bytes32"}],"name":"AccessManagerExpired","type":"error"},{"inputs":[{"internalType":"address","name":"initialAdmin","type":"address"}],"name":"AccessManagerInvalidInitialAdmin","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"AccessManagerLockedAccount","type":"error"},{"inputs":[{"internalType":"uint64","name":"roleId","type":"uint64"}],"name":"AccessManagerLockedRole","type":"error"},{"inputs":[{"internalType":"bytes32","name":"operationId","type":"bytes32"}],"name":"AccessManagerNotReady","type":"error"},{"inputs":[{"internalType":"bytes32","name":"operationId","type":"bytes32"}],"name":"AccessManagerNotScheduled","type":"error"},{"inputs":[{"internalType":"address","name":"msgsender","type":"address"},{"internalType":"uint64","name":"roleId","type":"uint64"}],"name":"AccessManagerUnauthorizedAccount","type":"error"},{"inputs":[{"internalType":"address","name":"caller","type":"address"},{"internalType":"address","name":"target","type":"address"},{"internalType":"bytes4","name":"selector","type":"bytes4"}],"name":"AccessManagerUnauthorizedCall","type":"error"},{"inputs":[{"internalType":"address","name":"msgsender","type":"address"},{"internalType":"address","name":"caller","type":"address"},{"internalType":"address","name":"target","type":"address"},{"internalType":"bytes4","name":"selector","type":"bytes4"}],"name":"AccessManagerUnauthorizedCancel","type":"error"},{"inputs":[{"internalType":"address","name":"target","type":"address"}],"name":"AccessManagerUnauthorizedConsume","type":"error"},{"inputs":[{"internalType":"address","name":"target","type":"address"}],"name":"AddressEmptyCode","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"AddressInsufficientBalance","type":"error"},{"inputs":[],"name":"FailedInnerCall","type":"error"},{"inputs":[],"name":"InvalidInitialization","type":"error"},{"inputs":[],"name":"NotInitializing","type":"error"},{"inputs":[{"internalType":"uint8","name":"bits","type":"uint8"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"SafeCastOverflowedUintDowncast","type":"error"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint64","name":"version","type":"uint64"}],"name":"Initialized","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"operationId","type":"bytes32"},{"indexed":true,"internalType":"uint32","name":"nonce","type":"uint32"}],"name":"OperationCanceled","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"operationId","type":"bytes32"},{"indexed":true,"internalType":"uint32","name":"nonce","type":"uint32"}],"name":"OperationExecuted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"operationId","type":"bytes32"},{"indexed":true,"internalType":"uint32","name":"nonce","type":"uint32"},{"indexed":false,"internalType":"uint48","name":"schedule","type":"uint48"},{"indexed":false,"internalType":"address","name":"caller","type":"address"},{"indexed":false,"internalType":"address","name":"target","type":"address"},{"indexed":false,"internalType":"bytes","name":"data","type":"bytes"}],"name":"OperationScheduled","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint64","name":"roleId","type":"uint64"},{"indexed":true,"internalType":"uint64","name":"admin","type":"uint64"}],"name":"RoleAdminChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint64","name":"roleId","type":"uint64"},{"indexed":false,"internalType":"uint32","name":"delay","type":"uint32"},{"indexed":false,"internalType":"uint48","name":"since","type":"uint48"}],"name":"RoleGrantDelayChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint64","name":"roleId","type":"uint64"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"uint32","name":"delay","type":"uint32"},{"indexed":false,"internalType":"uint48","name":"since","type":"uint48"},{"indexed":false,"internalType":"bool","name":"newMember","type":"bool"}],"name":"RoleGranted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint64","name":"roleId","type":"uint64"},{"indexed":true,"internalType":"uint64","name":"guardian","type":"uint64"}],"name":"RoleGuardianChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint64","name":"roleId","type":"uint64"},{"indexed":false,"internalType":"string","name":"label","type":"string"}],"name":"RoleLabel","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint64","name":"roleId","type":"uint64"},{"indexed":true,"internalType":"address","name":"account","type":"address"}],"name":"RoleRevoked","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"target","type":"address"},{"indexed":false,"internalType":"uint32","name":"delay","type":"uint32"},{"indexed":false,"internalType":"uint48","name":"since","type":"uint48"}],"name":"TargetAdminDelayUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"target","type":"address"},{"indexed":false,"internalType":"bool","name":"closed","type":"bool"}],"name":"TargetClosed","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"target","type":"address"},{"indexed":false,"internalType":"bytes4","name":"selector","type":"bytes4"},{"indexed":true,"internalType":"uint64","name":"roleId","type":"uint64"}],"name":"TargetFunctionRoleUpdated","type":"event"},{"inputs":[],"name":"ADMIN_ROLE","outputs":[{"internalType":"uint64","name":"","type":"uint64"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"ADMIN_ROLE_GRANT_TIMELOCK","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"ADMIN_ROLE_TIMELOCK","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"EMERGENCY_RESPONDER_ROLE","outputs":[{"internalType":"uint64","name":"","type":"uint64"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"HIGH_PRIORITY_OPS_ROLE","outputs":[{"internalType":"uint64","name":"","type":"uint64"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"HIGH_PRIORITY_TIMELOCK","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"LOW_PRIORITY_OPS_ROLE","outputs":[{"internalType":"uint64","name":"","type":"uint64"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"LOW_PRIORITY_TIMELOCK","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MEDIUM_PRIORITY_OPS_ROLE","outputs":[{"internalType":"uint64","name":"","type":"uint64"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MEDIUM_PRIORITY_TIMELOCK","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"PUBLIC_ROLE","outputs":[{"internalType":"uint64","name":"","type":"uint64"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"caller","type":"address"},{"internalType":"address","name":"target","type":"address"},{"internalType":"bytes4","name":"selector","type":"bytes4"}],"name":"canCall","outputs":[{"internalType":"bool","name":"immediate","type":"bool"},{"internalType":"uint32","name":"delay","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"caller","type":"address"},{"internalType":"address","name":"target","type":"address"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"cancel","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"caller","type":"address"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"consumeScheduledOp","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"target","type":"address"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"execute","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"expiration","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint64","name":"roleId","type":"uint64"},{"internalType":"address","name":"account","type":"address"}],"name":"getAccess","outputs":[{"internalType":"uint48","name":"since","type":"uint48"},{"internalType":"uint32","name":"currentDelay","type":"uint32"},{"internalType":"uint32","name":"pendingDelay","type":"uint32"},{"internalType":"uint48","name":"effect","type":"uint48"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"id","type":"bytes32"}],"name":"getNonce","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint64","name":"roleId","type":"uint64"}],"name":"getRoleAdmin","outputs":[{"internalType":"uint64","name":"","type":"uint64"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint64","name":"roleId","type":"uint64"}],"name":"getRoleGrantDelay","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint64","name":"roleId","type":"uint64"}],"name":"getRoleGuardian","outputs":[{"internalType":"uint64","name":"","type":"uint64"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"id","type":"bytes32"}],"name":"getSchedule","outputs":[{"internalType":"uint48","name":"","type":"uint48"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"target","type":"address"}],"name":"getTargetAdminDelay","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"target","type":"address"},{"internalType":"bytes4","name":"selector","type":"bytes4"}],"name":"getTargetFunctionRole","outputs":[{"internalType":"uint64","name":"","type":"uint64"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint64","name":"roleId","type":"uint64"},{"internalType":"address","name":"account","type":"address"},{"internalType":"uint32","name":"executionDelay","type":"uint32"}],"name":"grantRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint64","name":"roleId","type":"uint64"},{"internalType":"address","name":"account","type":"address"}],"name":"hasRole","outputs":[{"internalType":"bool","name":"isMember","type":"bool"},{"internalType":"uint32","name":"executionDelay","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"caller","type":"address"},{"internalType":"address","name":"target","type":"address"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"hashOperation","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"admin","type":"address"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"target","type":"address"}],"name":"isTargetClosed","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint64","name":"roleId","type":"uint64"},{"internalType":"string","name":"label","type":"string"}],"name":"labelRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"minSetback","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"bytes[]","name":"data","type":"bytes[]"}],"name":"multicall","outputs":[{"internalType":"bytes[]","name":"results","type":"bytes[]"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint64","name":"roleId","type":"uint64"},{"internalType":"address","name":"callerConfirmation","type":"address"}],"name":"renounceRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint64","name":"roleId","type":"uint64"},{"internalType":"address","name":"account","type":"address"}],"name":"revokeRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"target","type":"address"},{"internalType":"bytes","name":"data","type":"bytes"},{"internalType":"uint48","name":"when","type":"uint48"}],"name":"schedule","outputs":[{"internalType":"bytes32","name":"operationId","type":"bytes32"},{"internalType":"uint32","name":"nonce","type":"uint32"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint64","name":"roleId","type":"uint64"},{"internalType":"uint32","name":"newDelay","type":"uint32"}],"name":"setGrantDelay","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint64","name":"roleId","type":"uint64"},{"internalType":"uint64","name":"admin","type":"uint64"}],"name":"setRoleAdmin","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint64","name":"roleId","type":"uint64"},{"internalType":"uint64","name":"guardian","type":"uint64"}],"name":"setRoleGuardian","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"target","type":"address"},{"internalType":"uint32","name":"newDelay","type":"uint32"}],"name":"setTargetAdminDelay","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"target","type":"address"},{"internalType":"bool","name":"closed","type":"bool"}],"name":"setTargetClosed","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"target","type":"address"},{"internalType":"bytes4[]","name":"selectors","type":"bytes4[]"},{"internalType":"uint64","name":"roleId","type":"uint64"}],"name":"setTargetFunctionRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"target","type":"address"},{"internalType":"address","name":"newAuthority","type":"address"}],"name":"updateAuthority","outputs":[],"stateMutability":"nonpayable","type":"function"}],"conflicting_implementations":null,"certified":false,"additional_sources":[{"file_path":"lib/openzeppelin-contracts-upgradeable/contracts/access/manager/AccessManagerUpgradeable.sol","source_code":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (access/manager/AccessManager.sol)\n\npragma solidity ^0.8.20;\n\nimport {IAccessManager} from \"@openzeppelin/contracts/access/manager/IAccessManager.sol\";\nimport {IAccessManaged} from \"@openzeppelin/contracts/access/manager/IAccessManaged.sol\";\nimport {Address} from \"@openzeppelin/contracts/utils/Address.sol\";\nimport {ContextUpgradeable} from \"../../utils/ContextUpgradeable.sol\";\nimport {MulticallUpgradeable} from \"../../utils/MulticallUpgradeable.sol\";\nimport {Math} from \"@openzeppelin/contracts/utils/math/Math.sol\";\nimport {Time} from \"@openzeppelin/contracts/utils/types/Time.sol\";\nimport {Initializable} from \"../../proxy/utils/Initializable.sol\";\n\n/**\n * @dev AccessManager is a central contract to store the permissions of a system.\n *\n * A smart contract under the control of an AccessManager instance is known as a target, and will inherit from the\n * {AccessManaged} contract, be connected to this contract as its manager and implement the {AccessManaged-restricted}\n * modifier on a set of functions selected to be permissioned. Note that any function without this setup won't be\n * effectively restricted.\n *\n * The restriction rules for such functions are defined in terms of \"roles\" identified by an `uint64` and scoped\n * by target (`address`) and function selectors (`bytes4`). These roles are stored in this contract and can be\n * configured by admins (`ADMIN_ROLE` members) after a delay (see {getTargetAdminDelay}).\n *\n * For each target contract, admins can configure the following without any delay:\n *\n * * The target's {AccessManaged-authority} via {updateAuthority}.\n * * Close or open a target via {setTargetClosed} keeping the permissions intact.\n * * The roles that are allowed (or disallowed) to call a given function (identified by its selector) through {setTargetFunctionRole}.\n *\n * By default every address is member of the `PUBLIC_ROLE` and every target function is restricted to the `ADMIN_ROLE` until configured otherwise.\n * Additionally, each role has the following configuration options restricted to this manager's admins:\n *\n * * A role's admin role via {setRoleAdmin} who can grant or revoke roles.\n * * A role's guardian role via {setRoleGuardian} who's allowed to cancel operations.\n * * A delay in which a role takes effect after being granted through {setGrantDelay}.\n * * A delay of any target's admin action via {setTargetAdminDelay}.\n * * A role label for discoverability purposes with {labelRole}.\n *\n * Any account can be added and removed into any number of these roles by using the {grantRole} and {revokeRole} functions\n * restricted to each role's admin (see {getRoleAdmin}).\n *\n * Since all the permissions of the managed system can be modified by the admins of this instance, it is expected that\n * they will be highly secured (e.g., a multisig or a well-configured DAO).\n *\n * NOTE: This contract implements a form of the {IAuthority} interface, but {canCall} has additional return data so it\n * doesn't inherit `IAuthority`. It is however compatible with the `IAuthority` interface since the first 32 bytes of\n * the return data are a boolean as expected by that interface.\n *\n * NOTE: Systems that implement other access control mechanisms (for example using {Ownable}) can be paired with an\n * {AccessManager} by transferring permissions (ownership in the case of {Ownable}) directly to the {AccessManager}.\n * Users will be able to interact with these contracts through the {execute} function, following the access rules\n * registered in the {AccessManager}. Keep in mind that in that context, the msg.sender seen by restricted functions\n * will be {AccessManager} itself.\n *\n * WARNING: When granting permissions over an {Ownable} or {AccessControl} contract to an {AccessManager}, be very\n * mindful of the danger associated with functions such as {{Ownable-renounceOwnership}} or\n * {{AccessControl-renounceRole}}.\n */\ncontract AccessManagerUpgradeable is Initializable, ContextUpgradeable, MulticallUpgradeable, IAccessManager {\n    using Time for *;\n\n    // Structure that stores the details for a target contract.\n    struct TargetConfig {\n        mapping(bytes4 selector => uint64 roleId) allowedRoles;\n        Time.Delay adminDelay;\n        bool closed;\n    }\n\n    // Structure that stores the details for a role/account pair. This structures fit into a single slot.\n    struct Access {\n        // Timepoint at which the user gets the permission.\n        // If this is either 0 or in the future, then the role permission is not available.\n        uint48 since;\n        // Delay for execution. Only applies to restricted() / execute() calls.\n        Time.Delay delay;\n    }\n\n    // Structure that stores the details of a role.\n    struct Role {\n        // Members of the role.\n        mapping(address user => Access access) members;\n        // Admin who can grant or revoke permissions.\n        uint64 admin;\n        // Guardian who can cancel operations targeting functions that need this role.\n        uint64 guardian;\n        // Delay in which the role takes effect after being granted.\n        Time.Delay grantDelay;\n    }\n\n    // Structure that stores the details for a scheduled operation. This structure fits into a single slot.\n    struct Schedule {\n        // Moment at which the operation can be executed.\n        uint48 timepoint;\n        // Operation nonce to allow third-party contracts to identify the operation.\n        uint32 nonce;\n    }\n\n    uint64 public constant ADMIN_ROLE = type(uint64).min; // 0\n    uint64 public constant PUBLIC_ROLE = type(uint64).max; // 2**64-1\n\n    /// @custom:storage-location erc7201:openzeppelin.storage.AccessManager\n    struct AccessManagerStorage {\n        mapping(address target => TargetConfig mode) _targets;\n        mapping(uint64 roleId => Role) _roles;\n        mapping(bytes32 operationId => Schedule) _schedules;\n\n        // Used to identify operations that are currently being executed via {execute}.\n        // This should be transient storage when supported by the EVM.\n        bytes32 _executionId;\n    }\n\n    // keccak256(abi.encode(uint256(keccak256(\"openzeppelin.storage.AccessManager\")) - 1)) & ~bytes32(uint256(0xff))\n    bytes32 private constant AccessManagerStorageLocation = 0x40c6c8c28789853c7efd823ab20824bbd71718a8a5915e855f6f288c9a26ad00;\n\n    function _getAccessManagerStorage() private pure returns (AccessManagerStorage storage $) {\n        assembly {\n            $.slot := AccessManagerStorageLocation\n        }\n    }\n\n    /**\n     * @dev Check that the caller is authorized to perform the operation, following the restrictions encoded in\n     * {_getAdminRestrictions}.\n     */\n    modifier onlyAuthorized() {\n        _checkAuthorized();\n        _;\n    }\n\n    function __AccessManager_init(address initialAdmin) internal onlyInitializing {\n        __AccessManager_init_unchained(initialAdmin);\n    }\n\n    function __AccessManager_init_unchained(address initialAdmin) internal onlyInitializing {\n        if (initialAdmin == address(0)) {\n            revert AccessManagerInvalidInitialAdmin(address(0));\n        }\n\n        // admin is active immediately and without any execution delay.\n        _grantRole(ADMIN_ROLE, initialAdmin, 0, 0);\n    }\n\n    // =================================================== GETTERS ====================================================\n    /// @inheritdoc IAccessManager\n    function canCall(\n        address caller,\n        address target,\n        bytes4 selector\n    ) public view virtual returns (bool immediate, uint32 delay) {\n        if (isTargetClosed(target)) {\n            return (false, 0);\n        } else if (caller == address(this)) {\n            // Caller is AccessManager, this means the call was sent through {execute} and it already checked\n            // permissions. We verify that the call \"identifier\", which is set during {execute}, is correct.\n            return (_isExecuting(target, selector), 0);\n        } else {\n            uint64 roleId = getTargetFunctionRole(target, selector);\n            (bool isMember, uint32 currentDelay) = hasRole(roleId, caller);\n            return isMember ? (currentDelay == 0, currentDelay) : (false, 0);\n        }\n    }\n\n    /// @inheritdoc IAccessManager\n    function expiration() public view virtual returns (uint32) {\n        return 1 weeks;\n    }\n\n    /// @inheritdoc IAccessManager\n    function minSetback() public view virtual returns (uint32) {\n        return 5 days;\n    }\n\n    /// @inheritdoc IAccessManager\n    function isTargetClosed(address target) public view virtual returns (bool) {\n        AccessManagerStorage storage $ = _getAccessManagerStorage();\n        return $._targets[target].closed;\n    }\n\n    /// @inheritdoc IAccessManager\n    function getTargetFunctionRole(address target, bytes4 selector) public view virtual returns (uint64) {\n        AccessManagerStorage storage $ = _getAccessManagerStorage();\n        return $._targets[target].allowedRoles[selector];\n    }\n\n    /// @inheritdoc IAccessManager\n    function getTargetAdminDelay(address target) public view virtual returns (uint32) {\n        AccessManagerStorage storage $ = _getAccessManagerStorage();\n        return $._targets[target].adminDelay.get();\n    }\n\n    /// @inheritdoc IAccessManager\n    function getRoleAdmin(uint64 roleId) public view virtual returns (uint64) {\n        AccessManagerStorage storage $ = _getAccessManagerStorage();\n        return $._roles[roleId].admin;\n    }\n\n    /// @inheritdoc IAccessManager\n    function getRoleGuardian(uint64 roleId) public view virtual returns (uint64) {\n        AccessManagerStorage storage $ = _getAccessManagerStorage();\n        return $._roles[roleId].guardian;\n    }\n\n    /// @inheritdoc IAccessManager\n    function getRoleGrantDelay(uint64 roleId) public view virtual returns (uint32) {\n        AccessManagerStorage storage $ = _getAccessManagerStorage();\n        return $._roles[roleId].grantDelay.get();\n    }\n\n    /// @inheritdoc IAccessManager\n    function getAccess(\n        uint64 roleId,\n        address account\n    ) public view virtual returns (uint48 since, uint32 currentDelay, uint32 pendingDelay, uint48 effect) {\n        AccessManagerStorage storage $ = _getAccessManagerStorage();\n        Access storage access = $._roles[roleId].members[account];\n\n        since = access.since;\n        (currentDelay, pendingDelay, effect) = access.delay.getFull();\n\n        return (since, currentDelay, pendingDelay, effect);\n    }\n\n    /// @inheritdoc IAccessManager\n    function hasRole(\n        uint64 roleId,\n        address account\n    ) public view virtual returns (bool isMember, uint32 executionDelay) {\n        if (roleId == PUBLIC_ROLE) {\n            return (true, 0);\n        } else {\n            (uint48 hasRoleSince, uint32 currentDelay, , ) = getAccess(roleId, account);\n            return (hasRoleSince != 0 && hasRoleSince <= Time.timestamp(), currentDelay);\n        }\n    }\n\n    // =============================================== ROLE MANAGEMENT ===============================================\n    /// @inheritdoc IAccessManager\n    function labelRole(uint64 roleId, string calldata label) public virtual onlyAuthorized {\n        if (roleId == ADMIN_ROLE || roleId == PUBLIC_ROLE) {\n            revert AccessManagerLockedRole(roleId);\n        }\n        emit RoleLabel(roleId, label);\n    }\n\n    /// @inheritdoc IAccessManager\n    function grantRole(uint64 roleId, address account, uint32 executionDelay) public virtual onlyAuthorized {\n        _grantRole(roleId, account, getRoleGrantDelay(roleId), executionDelay);\n    }\n\n    /// @inheritdoc IAccessManager\n    function revokeRole(uint64 roleId, address account) public virtual onlyAuthorized {\n        _revokeRole(roleId, account);\n    }\n\n    /// @inheritdoc IAccessManager\n    function renounceRole(uint64 roleId, address callerConfirmation) public virtual {\n        if (callerConfirmation != _msgSender()) {\n            revert AccessManagerBadConfirmation();\n        }\n        _revokeRole(roleId, callerConfirmation);\n    }\n\n    /// @inheritdoc IAccessManager\n    function setRoleAdmin(uint64 roleId, uint64 admin) public virtual onlyAuthorized {\n        _setRoleAdmin(roleId, admin);\n    }\n\n    /// @inheritdoc IAccessManager\n    function setRoleGuardian(uint64 roleId, uint64 guardian) public virtual onlyAuthorized {\n        _setRoleGuardian(roleId, guardian);\n    }\n\n    /// @inheritdoc IAccessManager\n    function setGrantDelay(uint64 roleId, uint32 newDelay) public virtual onlyAuthorized {\n        _setGrantDelay(roleId, newDelay);\n    }\n\n    /**\n     * @dev Internal version of {grantRole} without access control. Returns true if the role was newly granted.\n     *\n     * Emits a {RoleGranted} event.\n     */\n    function _grantRole(\n        uint64 roleId,\n        address account,\n        uint32 grantDelay,\n        uint32 executionDelay\n    ) internal virtual returns (bool) {\n        AccessManagerStorage storage $ = _getAccessManagerStorage();\n        if (roleId == PUBLIC_ROLE) {\n            revert AccessManagerLockedRole(roleId);\n        }\n\n        bool newMember = $._roles[roleId].members[account].since == 0;\n        uint48 since;\n\n        if (newMember) {\n            since = Time.timestamp() + grantDelay;\n            $._roles[roleId].members[account] = Access({since: since, delay: executionDelay.toDelay()});\n        } else {\n            // No setback here. Value can be reset by doing revoke + grant, effectively allowing the admin to perform\n            // any change to the execution delay within the duration of the role admin delay.\n            ($._roles[roleId].members[account].delay, since) = $._roles[roleId].members[account].delay.withUpdate(\n                executionDelay,\n                0\n            );\n        }\n\n        emit RoleGranted(roleId, account, executionDelay, since, newMember);\n        return newMember;\n    }\n\n    /**\n     * @dev Internal version of {revokeRole} without access control. This logic is also used by {renounceRole}.\n     * Returns true if the role was previously granted.\n     *\n     * Emits a {RoleRevoked} event if the account had the role.\n     */\n    function _revokeRole(uint64 roleId, address account) internal virtual returns (bool) {\n        AccessManagerStorage storage $ = _getAccessManagerStorage();\n        if (roleId == PUBLIC_ROLE) {\n            revert AccessManagerLockedRole(roleId);\n        }\n\n        if ($._roles[roleId].members[account].since == 0) {\n            return false;\n        }\n\n        delete $._roles[roleId].members[account];\n\n        emit RoleRevoked(roleId, account);\n        return true;\n    }\n\n    /**\n     * @dev Internal version of {setRoleAdmin} without access control.\n     *\n     * Emits a {RoleAdminChanged} event.\n     *\n     * NOTE: Setting the admin role as the `PUBLIC_ROLE` is allowed, but it will effectively allow\n     * anyone to set grant or revoke such role.\n     */\n    function _setRoleAdmin(uint64 roleId, uint64 admin) internal virtual {\n        AccessManagerStorage storage $ = _getAccessManagerStorage();\n        if (roleId == ADMIN_ROLE || roleId == PUBLIC_ROLE) {\n            revert AccessManagerLockedRole(roleId);\n        }\n\n        $._roles[roleId].admin = admin;\n\n        emit RoleAdminChanged(roleId, admin);\n    }\n\n    /**\n     * @dev Internal version of {setRoleGuardian} without access control.\n     *\n     * Emits a {RoleGuardianChanged} event.\n     *\n     * NOTE: Setting the guardian role as the `PUBLIC_ROLE` is allowed, but it will effectively allow\n     * anyone to cancel any scheduled operation for such role.\n     */\n    function _setRoleGuardian(uint64 roleId, uint64 guardian) internal virtual {\n        AccessManagerStorage storage $ = _getAccessManagerStorage();\n        if (roleId == ADMIN_ROLE || roleId == PUBLIC_ROLE) {\n            revert AccessManagerLockedRole(roleId);\n        }\n\n        $._roles[roleId].guardian = guardian;\n\n        emit RoleGuardianChanged(roleId, guardian);\n    }\n\n    /**\n     * @dev Internal version of {setGrantDelay} without access control.\n     *\n     * Emits a {RoleGrantDelayChanged} event.\n     */\n    function _setGrantDelay(uint64 roleId, uint32 newDelay) internal virtual {\n        AccessManagerStorage storage $ = _getAccessManagerStorage();\n        if (roleId == PUBLIC_ROLE) {\n            revert AccessManagerLockedRole(roleId);\n        }\n\n        uint48 effect;\n        ($._roles[roleId].grantDelay, effect) = $._roles[roleId].grantDelay.withUpdate(newDelay, minSetback());\n\n        emit RoleGrantDelayChanged(roleId, newDelay, effect);\n    }\n\n    // ============================================= FUNCTION MANAGEMENT ==============================================\n    /// @inheritdoc IAccessManager\n    function setTargetFunctionRole(\n        address target,\n        bytes4[] calldata selectors,\n        uint64 roleId\n    ) public virtual onlyAuthorized {\n        for (uint256 i = 0; i < selectors.length; ++i) {\n            _setTargetFunctionRole(target, selectors[i], roleId);\n        }\n    }\n\n    /**\n     * @dev Internal version of {setTargetFunctionRole} without access control.\n     *\n     * Emits a {TargetFunctionRoleUpdated} event.\n     */\n    function _setTargetFunctionRole(address target, bytes4 selector, uint64 roleId) internal virtual {\n        AccessManagerStorage storage $ = _getAccessManagerStorage();\n        $._targets[target].allowedRoles[selector] = roleId;\n        emit TargetFunctionRoleUpdated(target, selector, roleId);\n    }\n\n    /// @inheritdoc IAccessManager\n    function setTargetAdminDelay(address target, uint32 newDelay) public virtual onlyAuthorized {\n        _setTargetAdminDelay(target, newDelay);\n    }\n\n    /**\n     * @dev Internal version of {setTargetAdminDelay} without access control.\n     *\n     * Emits a {TargetAdminDelayUpdated} event.\n     */\n    function _setTargetAdminDelay(address target, uint32 newDelay) internal virtual {\n        AccessManagerStorage storage $ = _getAccessManagerStorage();\n        uint48 effect;\n        ($._targets[target].adminDelay, effect) = $._targets[target].adminDelay.withUpdate(newDelay, minSetback());\n\n        emit TargetAdminDelayUpdated(target, newDelay, effect);\n    }\n\n    // =============================================== MODE MANAGEMENT ================================================\n    /// @inheritdoc IAccessManager\n    function setTargetClosed(address target, bool closed) public virtual onlyAuthorized {\n        _setTargetClosed(target, closed);\n    }\n\n    /**\n     * @dev Set the closed flag for a contract. This is an internal setter with no access restrictions.\n     *\n     * Emits a {TargetClosed} event.\n     */\n    function _setTargetClosed(address target, bool closed) internal virtual {\n        AccessManagerStorage storage $ = _getAccessManagerStorage();\n        if (target == address(this)) {\n            revert AccessManagerLockedAccount(target);\n        }\n        $._targets[target].closed = closed;\n        emit TargetClosed(target, closed);\n    }\n\n    // ============================================== DELAYED OPERATIONS ==============================================\n    /// @inheritdoc IAccessManager\n    function getSchedule(bytes32 id) public view virtual returns (uint48) {\n        AccessManagerStorage storage $ = _getAccessManagerStorage();\n        uint48 timepoint = $._schedules[id].timepoint;\n        return _isExpired(timepoint) ? 0 : timepoint;\n    }\n\n    /// @inheritdoc IAccessManager\n    function getNonce(bytes32 id) public view virtual returns (uint32) {\n        AccessManagerStorage storage $ = _getAccessManagerStorage();\n        return $._schedules[id].nonce;\n    }\n\n    /// @inheritdoc IAccessManager\n    function schedule(\n        address target,\n        bytes calldata data,\n        uint48 when\n    ) public virtual returns (bytes32 operationId, uint32 nonce) {\n        AccessManagerStorage storage $ = _getAccessManagerStorage();\n        address caller = _msgSender();\n\n        // Fetch restrictions that apply to the caller on the targeted function\n        (, uint32 setback) = _canCallExtended(caller, target, data);\n\n        uint48 minWhen = Time.timestamp() + setback;\n\n        // if call with delay is not authorized, or if requested timing is too soon\n        if (setback == 0 || (when > 0 && when < minWhen)) {\n            revert AccessManagerUnauthorizedCall(caller, target, _checkSelector(data));\n        }\n\n        // Reuse variable due to stack too deep\n        when = uint48(Math.max(when, minWhen)); // cast is safe: both inputs are uint48\n\n        // If caller is authorised, schedule operation\n        operationId = hashOperation(caller, target, data);\n\n        _checkNotScheduled(operationId);\n\n        unchecked {\n            // It's not feasible to overflow the nonce in less than 1000 years\n            nonce = $._schedules[operationId].nonce + 1;\n        }\n        $._schedules[operationId].timepoint = when;\n        $._schedules[operationId].nonce = nonce;\n        emit OperationScheduled(operationId, nonce, when, caller, target, data);\n\n        // Using named return values because otherwise we get stack too deep\n    }\n\n    /**\n     * @dev Reverts if the operation is currently scheduled and has not expired.\n     * (Note: This function was introduced due to stack too deep errors in schedule.)\n     */\n    function _checkNotScheduled(bytes32 operationId) private view {\n        AccessManagerStorage storage $ = _getAccessManagerStorage();\n        uint48 prevTimepoint = $._schedules[operationId].timepoint;\n        if (prevTimepoint != 0 && !_isExpired(prevTimepoint)) {\n            revert AccessManagerAlreadyScheduled(operationId);\n        }\n    }\n\n    /// @inheritdoc IAccessManager\n    // Reentrancy is not an issue because permissions are checked on msg.sender. Additionally,\n    // _consumeScheduledOp guarantees a scheduled operation is only executed once.\n    // slither-disable-next-line reentrancy-no-eth\n    function execute(address target, bytes calldata data) public payable virtual returns (uint32) {\n        AccessManagerStorage storage $ = _getAccessManagerStorage();\n        address caller = _msgSender();\n\n        // Fetch restrictions that apply to the caller on the targeted function\n        (bool immediate, uint32 setback) = _canCallExtended(caller, target, data);\n\n        // If caller is not authorised, revert\n        if (!immediate && setback == 0) {\n            revert AccessManagerUnauthorizedCall(caller, target, _checkSelector(data));\n        }\n\n        bytes32 operationId = hashOperation(caller, target, data);\n        uint32 nonce;\n\n        // If caller is authorised, check operation was scheduled early enough\n        // Consume an available schedule even if there is no currently enforced delay\n        if (setback != 0 || getSchedule(operationId) != 0) {\n            nonce = _consumeScheduledOp(operationId);\n        }\n\n        // Mark the target and selector as authorised\n        bytes32 executionIdBefore = $._executionId;\n        $._executionId = _hashExecutionId(target, _checkSelector(data));\n\n        // Perform call\n        Address.functionCallWithValue(target, data, msg.value);\n\n        // Reset execute identifier\n        $._executionId = executionIdBefore;\n\n        return nonce;\n    }\n\n    /// @inheritdoc IAccessManager\n    function cancel(address caller, address target, bytes calldata data) public virtual returns (uint32) {\n        AccessManagerStorage storage $ = _getAccessManagerStorage();\n        address msgsender = _msgSender();\n        bytes4 selector = _checkSelector(data);\n\n        bytes32 operationId = hashOperation(caller, target, data);\n        if ($._schedules[operationId].timepoint == 0) {\n            revert AccessManagerNotScheduled(operationId);\n        } else if (caller != msgsender) {\n            // calls can only be canceled by the account that scheduled them, a global admin, or by a guardian of the required role.\n            (bool isAdmin, ) = hasRole(ADMIN_ROLE, msgsender);\n            (bool isGuardian, ) = hasRole(getRoleGuardian(getTargetFunctionRole(target, selector)), msgsender);\n            if (!isAdmin && !isGuardian) {\n                revert AccessManagerUnauthorizedCancel(msgsender, caller, target, selector);\n            }\n        }\n\n        delete $._schedules[operationId].timepoint; // reset the timepoint, keep the nonce\n        uint32 nonce = $._schedules[operationId].nonce;\n        emit OperationCanceled(operationId, nonce);\n\n        return nonce;\n    }\n\n    /// @inheritdoc IAccessManager\n    function consumeScheduledOp(address caller, bytes calldata data) public virtual {\n        address target = _msgSender();\n        if (IAccessManaged(target).isConsumingScheduledOp() != IAccessManaged.isConsumingScheduledOp.selector) {\n            revert AccessManagerUnauthorizedConsume(target);\n        }\n        _consumeScheduledOp(hashOperation(caller, target, data));\n    }\n\n    /**\n     * @dev Internal variant of {consumeScheduledOp} that operates on bytes32 operationId.\n     *\n     * Returns the nonce of the scheduled operation that is consumed.\n     */\n    function _consumeScheduledOp(bytes32 operationId) internal virtual returns (uint32) {\n        AccessManagerStorage storage $ = _getAccessManagerStorage();\n        uint48 timepoint = $._schedules[operationId].timepoint;\n        uint32 nonce = $._schedules[operationId].nonce;\n\n        if (timepoint == 0) {\n            revert AccessManagerNotScheduled(operationId);\n        } else if (timepoint > Time.timestamp()) {\n            revert AccessManagerNotReady(operationId);\n        } else if (_isExpired(timepoint)) {\n            revert AccessManagerExpired(operationId);\n        }\n\n        delete $._schedules[operationId].timepoint; // reset the timepoint, keep the nonce\n        emit OperationExecuted(operationId, nonce);\n\n        return nonce;\n    }\n\n    /// @inheritdoc IAccessManager\n    function hashOperation(address caller, address target, bytes calldata data) public view virtual returns (bytes32) {\n        return keccak256(abi.encode(caller, target, data));\n    }\n\n    // ==================================================== OTHERS ====================================================\n    /// @inheritdoc IAccessManager\n    function updateAuthority(address target, address newAuthority) public virtual onlyAuthorized {\n        IAccessManaged(target).setAuthority(newAuthority);\n    }\n\n    // ================================================= ADMIN LOGIC ==================================================\n    /**\n     * @dev Check if the current call is authorized according to admin logic.\n     */\n    function _checkAuthorized() private {\n        address caller = _msgSender();\n        (bool immediate, uint32 delay) = _canCallSelf(caller, _msgData());\n        if (!immediate) {\n            if (delay == 0) {\n                (, uint64 requiredRole, ) = _getAdminRestrictions(_msgData());\n                revert AccessManagerUnauthorizedAccount(caller, requiredRole);\n            } else {\n                _consumeScheduledOp(hashOperation(caller, address(this), _msgData()));\n            }\n        }\n    }\n\n    /**\n     * @dev Get the admin restrictions of a given function call based on the function and arguments involved.\n     *\n     * Returns:\n     * - bool restricted: does this data match a restricted operation\n     * - uint64: which role is this operation restricted to\n     * - uint32: minimum delay to enforce for that operation (max between operation's delay and admin's execution delay)\n     */\n    function _getAdminRestrictions(\n        bytes calldata data\n    ) private view returns (bool restricted, uint64 roleAdminId, uint32 executionDelay) {\n        if (data.length < 4) {\n            return (false, 0, 0);\n        }\n\n        bytes4 selector = _checkSelector(data);\n\n        // Restricted to ADMIN with no delay beside any execution delay the caller may have\n        if (\n            selector == this.labelRole.selector ||\n            selector == this.setRoleAdmin.selector ||\n            selector == this.setRoleGuardian.selector ||\n            selector == this.setGrantDelay.selector ||\n            selector == this.setTargetAdminDelay.selector\n        ) {\n            return (true, ADMIN_ROLE, 0);\n        }\n\n        // Restricted to ADMIN with the admin delay corresponding to the target\n        if (\n            selector == this.updateAuthority.selector ||\n            selector == this.setTargetClosed.selector ||\n            selector == this.setTargetFunctionRole.selector\n        ) {\n            // First argument is a target.\n            address target = abi.decode(data[0x04:0x24], (address));\n            uint32 delay = getTargetAdminDelay(target);\n            return (true, ADMIN_ROLE, delay);\n        }\n\n        // Restricted to that role's admin with no delay beside any execution delay the caller may have.\n        if (selector == this.grantRole.selector || selector == this.revokeRole.selector) {\n            // First argument is a roleId.\n            uint64 roleId = abi.decode(data[0x04:0x24], (uint64));\n            return (true, getRoleAdmin(roleId), 0);\n        }\n\n        return (false, 0, 0);\n    }\n\n    // =================================================== HELPERS ====================================================\n    /**\n     * @dev An extended version of {canCall} for internal usage that checks {_canCallSelf}\n     * when the target is this contract.\n     *\n     * Returns:\n     * - bool immediate: whether the operation can be executed immediately (with no delay)\n     * - uint32 delay: the execution delay\n     */\n    function _canCallExtended(\n        address caller,\n        address target,\n        bytes calldata data\n    ) private view returns (bool immediate, uint32 delay) {\n        if (target == address(this)) {\n            return _canCallSelf(caller, data);\n        } else {\n            return data.length < 4 ? (false, 0) : canCall(caller, target, _checkSelector(data));\n        }\n    }\n\n    /**\n     * @dev A version of {canCall} that checks for admin restrictions in this contract.\n     */\n    function _canCallSelf(address caller, bytes calldata data) private view returns (bool immediate, uint32 delay) {\n        if (data.length < 4) {\n            return (false, 0);\n        }\n\n        if (caller == address(this)) {\n            // Caller is AccessManager, this means the call was sent through {execute} and it already checked\n            // permissions. We verify that the call \"identifier\", which is set during {execute}, is correct.\n            return (_isExecuting(address(this), _checkSelector(data)), 0);\n        }\n\n        (bool enabled, uint64 roleId, uint32 operationDelay) = _getAdminRestrictions(data);\n        if (!enabled) {\n            return (false, 0);\n        }\n\n        (bool inRole, uint32 executionDelay) = hasRole(roleId, caller);\n        if (!inRole) {\n            return (false, 0);\n        }\n\n        // downcast is safe because both options are uint32\n        delay = uint32(Math.max(operationDelay, executionDelay));\n        return (delay == 0, delay);\n    }\n\n    /**\n     * @dev Returns true if a call with `target` and `selector` is being executed via {executed}.\n     */\n    function _isExecuting(address target, bytes4 selector) private view returns (bool) {\n        AccessManagerStorage storage $ = _getAccessManagerStorage();\n        return $._executionId == _hashExecutionId(target, selector);\n    }\n\n    /**\n     * @dev Returns true if a schedule timepoint is past its expiration deadline.\n     */\n    function _isExpired(uint48 timepoint) private view returns (bool) {\n        return timepoint + expiration() <= Time.timestamp();\n    }\n\n    /**\n     * @dev Extracts the selector from calldata. Panics if data is not at least 4 bytes\n     */\n    function _checkSelector(bytes calldata data) private pure returns (bytes4) {\n        return bytes4(data[0:4]);\n    }\n\n    /**\n     * @dev Hashing function for execute protection\n     */\n    function _hashExecutionId(address target, bytes4 selector) private pure returns (bytes32) {\n        return keccak256(abi.encode(target, selector));\n    }\n}\n"},{"file_path":"lib/openzeppelin-contracts-upgradeable/contracts/proxy/utils/Initializable.sol","source_code":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (proxy/utils/Initializable.sol)\n\npragma solidity ^0.8.20;\n\n/**\n * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed\n * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an\n * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer\n * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.\n *\n * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be\n * reused. This mechanism prevents re-execution of each \"step\" but allows the creation of new initialization steps in\n * case an upgrade adds a module that needs to be initialized.\n *\n * For example:\n *\n * [.hljs-theme-light.nopadding]\n * ```solidity\n * contract MyToken is ERC20Upgradeable {\n *     function initialize() initializer public {\n *         __ERC20_init(\"MyToken\", \"MTK\");\n *     }\n * }\n *\n * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {\n *     function initializeV2() reinitializer(2) public {\n *         __ERC20Permit_init(\"MyToken\");\n *     }\n * }\n * ```\n *\n * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as\n * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}.\n *\n * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure\n * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.\n *\n * [CAUTION]\n * ====\n * Avoid leaving a contract uninitialized.\n *\n * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation\n * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke\n * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:\n *\n * [.hljs-theme-light.nopadding]\n * ```\n * /// @custom:oz-upgrades-unsafe-allow constructor\n * constructor() {\n *     _disableInitializers();\n * }\n * ```\n * ====\n */\nabstract contract Initializable {\n    /**\n     * @dev Storage of the initializable contract.\n     *\n     * It's implemented on a custom ERC-7201 namespace to reduce the risk of storage collisions\n     * when using with upgradeable contracts.\n     *\n     * @custom:storage-location erc7201:openzeppelin.storage.Initializable\n     */\n    struct InitializableStorage {\n        /**\n         * @dev Indicates that the contract has been initialized.\n         */\n        uint64 _initialized;\n        /**\n         * @dev Indicates that the contract is in the process of being initialized.\n         */\n        bool _initializing;\n    }\n\n    // keccak256(abi.encode(uint256(keccak256(\"openzeppelin.storage.Initializable\")) - 1)) & ~bytes32(uint256(0xff))\n    bytes32 private constant INITIALIZABLE_STORAGE = 0xf0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00;\n\n    /**\n     * @dev The contract is already initialized.\n     */\n    error InvalidInitialization();\n\n    /**\n     * @dev The contract is not initializing.\n     */\n    error NotInitializing();\n\n    /**\n     * @dev Triggered when the contract has been initialized or reinitialized.\n     */\n    event Initialized(uint64 version);\n\n    /**\n     * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,\n     * `onlyInitializing` functions can be used to initialize parent contracts.\n     *\n     * Similar to `reinitializer(1)`, except that in the context of a constructor an `initializer` may be invoked any\n     * number of times. This behavior in the constructor can be useful during testing and is not expected to be used in\n     * production.\n     *\n     * Emits an {Initialized} event.\n     */\n    modifier initializer() {\n        // solhint-disable-next-line var-name-mixedcase\n        InitializableStorage storage $ = _getInitializableStorage();\n\n        // Cache values to avoid duplicated sloads\n        bool isTopLevelCall = !$._initializing;\n        uint64 initialized = $._initialized;\n\n        // Allowed calls:\n        // - initialSetup: the contract is not in the initializing state and no previous version was\n        //                 initialized\n        // - construction: the contract is initialized at version 1 (no reininitialization) and the\n        //                 current contract is just being deployed\n        bool initialSetup = initialized == 0 && isTopLevelCall;\n        bool construction = initialized == 1 && address(this).code.length == 0;\n\n        if (!initialSetup && !construction) {\n            revert InvalidInitialization();\n        }\n        $._initialized = 1;\n        if (isTopLevelCall) {\n            $._initializing = true;\n        }\n        _;\n        if (isTopLevelCall) {\n            $._initializing = false;\n            emit Initialized(1);\n        }\n    }\n\n    /**\n     * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the\n     * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be\n     * used to initialize parent contracts.\n     *\n     * A reinitializer may be used after the original initialization step. This is essential to configure modules that\n     * are added through upgrades and that require initialization.\n     *\n     * When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer`\n     * cannot be nested. If one is invoked in the context of another, execution will revert.\n     *\n     * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in\n     * a contract, executing them in the right order is up to the developer or operator.\n     *\n     * WARNING: Setting the version to 2**64 - 1 will prevent any future reinitialization.\n     *\n     * Emits an {Initialized} event.\n     */\n    modifier reinitializer(uint64 version) {\n        // solhint-disable-next-line var-name-mixedcase\n        InitializableStorage storage $ = _getInitializableStorage();\n\n        if ($._initializing || $._initialized >= version) {\n            revert InvalidInitialization();\n        }\n        $._initialized = version;\n        $._initializing = true;\n        _;\n        $._initializing = false;\n        emit Initialized(version);\n    }\n\n    /**\n     * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the\n     * {initializer} and {reinitializer} modifiers, directly or indirectly.\n     */\n    modifier onlyInitializing() {\n        _checkInitializing();\n        _;\n    }\n\n    /**\n     * @dev Reverts if the contract is not in an initializing state. See {onlyInitializing}.\n     */\n    function _checkInitializing() internal view virtual {\n        if (!_isInitializing()) {\n            revert NotInitializing();\n        }\n    }\n\n    /**\n     * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.\n     * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized\n     * to any version. It is recommended to use this to lock implementation contracts that are designed to be called\n     * through proxies.\n     *\n     * Emits an {Initialized} event the first time it is successfully executed.\n     */\n    function _disableInitializers() internal virtual {\n        // solhint-disable-next-line var-name-mixedcase\n        InitializableStorage storage $ = _getInitializableStorage();\n\n        if ($._initializing) {\n            revert InvalidInitialization();\n        }\n        if ($._initialized != type(uint64).max) {\n            $._initialized = type(uint64).max;\n            emit Initialized(type(uint64).max);\n        }\n    }\n\n    /**\n     * @dev Returns the highest version that has been initialized. See {reinitializer}.\n     */\n    function _getInitializedVersion() internal view returns (uint64) {\n        return _getInitializableStorage()._initialized;\n    }\n\n    /**\n     * @dev Returns `true` if the contract is currently initializing. See {onlyInitializing}.\n     */\n    function _isInitializing() internal view returns (bool) {\n        return _getInitializableStorage()._initializing;\n    }\n\n    /**\n     * @dev Returns a pointer to the storage namespace.\n     */\n    // solhint-disable-next-line var-name-mixedcase\n    function _getInitializableStorage() private pure returns (InitializableStorage storage $) {\n        assembly {\n            $.slot := INITIALIZABLE_STORAGE\n        }\n    }\n}\n"},{"file_path":"lib/openzeppelin-contracts-upgradeable/contracts/utils/ContextUpgradeable.sol","source_code":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.1) (utils/Context.sol)\n\npragma solidity ^0.8.20;\nimport {Initializable} from \"../proxy/utils/Initializable.sol\";\n\n/**\n * @dev Provides information about the current execution context, including the\n * sender of the transaction and its data. While these are generally available\n * via msg.sender and msg.data, they should not be accessed in such a direct\n * manner, since when dealing with meta-transactions the account sending and\n * paying for execution may not be the actual sender (as far as an application\n * is concerned).\n *\n * This contract is only required for intermediate, library-like contracts.\n */\nabstract contract ContextUpgradeable is Initializable {\n    function __Context_init() internal onlyInitializing {\n    }\n\n    function __Context_init_unchained() internal onlyInitializing {\n    }\n    function _msgSender() internal view virtual returns (address) {\n        return msg.sender;\n    }\n\n    function _msgData() internal view virtual returns (bytes calldata) {\n        return msg.data;\n    }\n\n    function _contextSuffixLength() internal view virtual returns (uint256) {\n        return 0;\n    }\n}\n"},{"file_path":"lib/openzeppelin-contracts-upgradeable/contracts/utils/MulticallUpgradeable.sol","source_code":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.1) (utils/Multicall.sol)\n\npragma solidity ^0.8.20;\n\nimport {Address} from \"@openzeppelin/contracts/utils/Address.sol\";\nimport {ContextUpgradeable} from \"./ContextUpgradeable.sol\";\nimport {Initializable} from \"../proxy/utils/Initializable.sol\";\n\n/**\n * @dev Provides a function to batch together multiple calls in a single external call.\n *\n * Consider any assumption about calldata validation performed by the sender may be violated if it's not especially\n * careful about sending transactions invoking {multicall}. For example, a relay address that filters function\n * selectors won't filter calls nested within a {multicall} operation.\n *\n * NOTE: Since 5.0.1 and 4.9.4, this contract identifies non-canonical contexts (i.e. `msg.sender` is not {_msgSender}).\n * If a non-canonical context is identified, the following self `delegatecall` appends the last bytes of `msg.data`\n * to the subcall. This makes it safe to use with {ERC2771Context}. Contexts that don't affect the resolution of\n * {_msgSender} are not propagated to subcalls.\n */\nabstract contract MulticallUpgradeable is Initializable, ContextUpgradeable {\n    function __Multicall_init() internal onlyInitializing {\n    }\n\n    function __Multicall_init_unchained() internal onlyInitializing {\n    }\n    /**\n     * @dev Receives and executes a batch of function calls on this contract.\n     * @custom:oz-upgrades-unsafe-allow-reachable delegatecall\n     */\n    function multicall(bytes[] calldata data) external virtual returns (bytes[] memory results) {\n        bytes memory context = msg.sender == _msgSender()\n            ? new bytes(0)\n            : msg.data[msg.data.length - _contextSuffixLength():];\n\n        results = new bytes[](data.length);\n        for (uint256 i = 0; i < data.length; i++) {\n            results[i] = Address.functionDelegateCall(address(this), bytes.concat(data[i], context));\n        }\n        return results;\n    }\n}\n"},{"file_path":"lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/contracts/access/manager/IAccessManaged.sol","source_code":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (access/manager/IAccessManaged.sol)\n\npragma solidity ^0.8.20;\n\ninterface IAccessManaged {\n    /**\n     * @dev Authority that manages this contract was updated.\n     */\n    event AuthorityUpdated(address authority);\n\n    error AccessManagedUnauthorized(address caller);\n    error AccessManagedRequiredDelay(address caller, uint32 delay);\n    error AccessManagedInvalidAuthority(address authority);\n\n    /**\n     * @dev Returns the current authority.\n     */\n    function authority() external view returns (address);\n\n    /**\n     * @dev Transfers control to a new authority. The caller must be the current authority.\n     */\n    function setAuthority(address) external;\n\n    /**\n     * @dev Returns true only in the context of a delayed restricted call, at the moment that the scheduled operation is\n     * being consumed. Prevents denial of service for delayed restricted calls in the case that the contract performs\n     * attacker controlled calls.\n     */\n    function isConsumingScheduledOp() external view returns (bytes4);\n}\n"},{"file_path":"lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/contracts/access/manager/IAccessManager.sol","source_code":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (access/manager/IAccessManager.sol)\n\npragma solidity ^0.8.20;\n\nimport {IAccessManaged} from \"./IAccessManaged.sol\";\nimport {Time} from \"../../utils/types/Time.sol\";\n\ninterface IAccessManager {\n    /**\n     * @dev A delayed operation was scheduled.\n     */\n    event OperationScheduled(\n        bytes32 indexed operationId,\n        uint32 indexed nonce,\n        uint48 schedule,\n        address caller,\n        address target,\n        bytes data\n    );\n\n    /**\n     * @dev A scheduled operation was executed.\n     */\n    event OperationExecuted(bytes32 indexed operationId, uint32 indexed nonce);\n\n    /**\n     * @dev A scheduled operation was canceled.\n     */\n    event OperationCanceled(bytes32 indexed operationId, uint32 indexed nonce);\n\n    /**\n     * @dev Informational labelling for a roleId.\n     */\n    event RoleLabel(uint64 indexed roleId, string label);\n\n    /**\n     * @dev Emitted when `account` is granted `roleId`.\n     *\n     * NOTE: The meaning of the `since` argument depends on the `newMember` argument.\n     * If the role is granted to a new member, the `since` argument indicates when the account becomes a member of the role,\n     * otherwise it indicates the execution delay for this account and roleId is updated.\n     */\n    event RoleGranted(uint64 indexed roleId, address indexed account, uint32 delay, uint48 since, bool newMember);\n\n    /**\n     * @dev Emitted when `account` membership or `roleId` is revoked. Unlike granting, revoking is instantaneous.\n     */\n    event RoleRevoked(uint64 indexed roleId, address indexed account);\n\n    /**\n     * @dev Role acting as admin over a given `roleId` is updated.\n     */\n    event RoleAdminChanged(uint64 indexed roleId, uint64 indexed admin);\n\n    /**\n     * @dev Role acting as guardian over a given `roleId` is updated.\n     */\n    event RoleGuardianChanged(uint64 indexed roleId, uint64 indexed guardian);\n\n    /**\n     * @dev Grant delay for a given `roleId` will be updated to `delay` when `since` is reached.\n     */\n    event RoleGrantDelayChanged(uint64 indexed roleId, uint32 delay, uint48 since);\n\n    /**\n     * @dev Target mode is updated (true = closed, false = open).\n     */\n    event TargetClosed(address indexed target, bool closed);\n\n    /**\n     * @dev Role required to invoke `selector` on `target` is updated to `roleId`.\n     */\n    event TargetFunctionRoleUpdated(address indexed target, bytes4 selector, uint64 indexed roleId);\n\n    /**\n     * @dev Admin delay for a given `target` will be updated to `delay` when `since` is reached.\n     */\n    event TargetAdminDelayUpdated(address indexed target, uint32 delay, uint48 since);\n\n    error AccessManagerAlreadyScheduled(bytes32 operationId);\n    error AccessManagerNotScheduled(bytes32 operationId);\n    error AccessManagerNotReady(bytes32 operationId);\n    error AccessManagerExpired(bytes32 operationId);\n    error AccessManagerLockedAccount(address account);\n    error AccessManagerLockedRole(uint64 roleId);\n    error AccessManagerBadConfirmation();\n    error AccessManagerUnauthorizedAccount(address msgsender, uint64 roleId);\n    error AccessManagerUnauthorizedCall(address caller, address target, bytes4 selector);\n    error AccessManagerUnauthorizedConsume(address target);\n    error AccessManagerUnauthorizedCancel(address msgsender, address caller, address target, bytes4 selector);\n    error AccessManagerInvalidInitialAdmin(address initialAdmin);\n\n    /**\n     * @dev Check if an address (`caller`) is authorised to call a given function on a given contract directly (with\n     * no restriction). Additionally, it returns the delay needed to perform the call indirectly through the {schedule}\n     * & {execute} workflow.\n     *\n     * This function is usually called by the targeted contract to control immediate execution of restricted functions.\n     * Therefore we only return true if the call can be performed without any delay. If the call is subject to a\n     * previously set delay (not zero), then the function should return false and the caller should schedule the operation\n     * for future execution.\n     *\n     * If `immediate` is true, the delay can be disregarded and the operation can be immediately executed, otherwise\n     * the operation can be executed if and only if delay is greater than 0.\n     *\n     * NOTE: The IAuthority interface does not include the `uint32` delay. This is an extension of that interface that\n     * is backward compatible. Some contracts may thus ignore the second return argument. In that case they will fail\n     * to identify the indirect workflow, and will consider calls that require a delay to be forbidden.\n     *\n     * NOTE: This function does not report the permissions of this manager itself. These are defined by the\n     * {_canCallSelf} function instead.\n     */\n    function canCall(\n        address caller,\n        address target,\n        bytes4 selector\n    ) external view returns (bool allowed, uint32 delay);\n\n    /**\n     * @dev Expiration delay for scheduled proposals. Defaults to 1 week.\n     *\n     * IMPORTANT: Avoid overriding the expiration with 0. Otherwise every contract proposal will be expired immediately,\n     * disabling any scheduling usage.\n     */\n    function expiration() external view returns (uint32);\n\n    /**\n     * @dev Minimum setback for all delay updates, with the exception of execution delays. It\n     * can be increased without setback (and reset via {revokeRole} in the case event of an\n     * accidental increase). Defaults to 5 days.\n     */\n    function minSetback() external view returns (uint32);\n\n    /**\n     * @dev Get whether the contract is closed disabling any access. Otherwise role permissions are applied.\n     */\n    function isTargetClosed(address target) external view returns (bool);\n\n    /**\n     * @dev Get the role required to call a function.\n     */\n    function getTargetFunctionRole(address target, bytes4 selector) external view returns (uint64);\n\n    /**\n     * @dev Get the admin delay for a target contract. Changes to contract configuration are subject to this delay.\n     */\n    function getTargetAdminDelay(address target) external view returns (uint32);\n\n    /**\n     * @dev Get the id of the role that acts as an admin for the given role.\n     *\n     * The admin permission is required to grant the role, revoke the role and update the execution delay to execute\n     * an operation that is restricted to this role.\n     */\n    function getRoleAdmin(uint64 roleId) external view returns (uint64);\n\n    /**\n     * @dev Get the role that acts as a guardian for a given role.\n     *\n     * The guardian permission allows canceling operations that have been scheduled under the role.\n     */\n    function getRoleGuardian(uint64 roleId) external view returns (uint64);\n\n    /**\n     * @dev Get the role current grant delay.\n     *\n     * Its value may change at any point without an event emitted following a call to {setGrantDelay}.\n     * Changes to this value, including effect timepoint are notified in advance by the {RoleGrantDelayChanged} event.\n     */\n    function getRoleGrantDelay(uint64 roleId) external view returns (uint32);\n\n    /**\n     * @dev Get the access details for a given account for a given role. These details include the timepoint at which\n     * membership becomes active, and the delay applied to all operation by this user that requires this permission\n     * level.\n     *\n     * Returns:\n     * [0] Timestamp at which the account membership becomes valid. 0 means role is not granted.\n     * [1] Current execution delay for the account.\n     * [2] Pending execution delay for the account.\n     * [3] Timestamp at which the pending execution delay will become active. 0 means no delay update is scheduled.\n     */\n    function getAccess(uint64 roleId, address account) external view returns (uint48, uint32, uint32, uint48);\n\n    /**\n     * @dev Check if a given account currently has the permission level corresponding to a given role. Note that this\n     * permission might be associated with an execution delay. {getAccess} can provide more details.\n     */\n    function hasRole(uint64 roleId, address account) external view returns (bool, uint32);\n\n    /**\n     * @dev Give a label to a role, for improved role discoverability by UIs.\n     *\n     * Requirements:\n     *\n     * - the caller must be a global admin\n     *\n     * Emits a {RoleLabel} event.\n     */\n    function labelRole(uint64 roleId, string calldata label) external;\n\n    /**\n     * @dev Add `account` to `roleId`, or change its execution delay.\n     *\n     * This gives the account the authorization to call any function that is restricted to this role. An optional\n     * execution delay (in seconds) can be set. If that delay is non 0, the user is required to schedule any operation\n     * that is restricted to members of this role. The user will only be able to execute the operation after the delay has\n     * passed, before it has expired. During this period, admin and guardians can cancel the operation (see {cancel}).\n     *\n     * If the account has already been granted this role, the execution delay will be updated. This update is not\n     * immediate and follows the delay rules. For example, if a user currently has a delay of 3 hours, and this is\n     * called to reduce that delay to 1 hour, the new delay will take some time to take effect, enforcing that any\n     * operation executed in the 3 hours that follows this update was indeed scheduled before this update.\n     *\n     * Requirements:\n     *\n     * - the caller must be an admin for the role (see {getRoleAdmin})\n     * - granted role must not be the `PUBLIC_ROLE`\n     *\n     * Emits a {RoleGranted} event.\n     */\n    function grantRole(uint64 roleId, address account, uint32 executionDelay) external;\n\n    /**\n     * @dev Remove an account from a role, with immediate effect. If the account does not have the role, this call has\n     * no effect.\n     *\n     * Requirements:\n     *\n     * - the caller must be an admin for the role (see {getRoleAdmin})\n     * - revoked role must not be the `PUBLIC_ROLE`\n     *\n     * Emits a {RoleRevoked} event if the account had the role.\n     */\n    function revokeRole(uint64 roleId, address account) external;\n\n    /**\n     * @dev Renounce role permissions for the calling account with immediate effect. If the sender is not in\n     * the role this call has no effect.\n     *\n     * Requirements:\n     *\n     * - the caller must be `callerConfirmation`.\n     *\n     * Emits a {RoleRevoked} event if the account had the role.\n     */\n    function renounceRole(uint64 roleId, address callerConfirmation) external;\n\n    /**\n     * @dev Change admin role for a given role.\n     *\n     * Requirements:\n     *\n     * - the caller must be a global admin\n     *\n     * Emits a {RoleAdminChanged} event\n     */\n    function setRoleAdmin(uint64 roleId, uint64 admin) external;\n\n    /**\n     * @dev Change guardian role for a given role.\n     *\n     * Requirements:\n     *\n     * - the caller must be a global admin\n     *\n     * Emits a {RoleGuardianChanged} event\n     */\n    function setRoleGuardian(uint64 roleId, uint64 guardian) external;\n\n    /**\n     * @dev Update the delay for granting a `roleId`.\n     *\n     * Requirements:\n     *\n     * - the caller must be a global admin\n     *\n     * Emits a {RoleGrantDelayChanged} event.\n     */\n    function setGrantDelay(uint64 roleId, uint32 newDelay) external;\n\n    /**\n     * @dev Set the role required to call functions identified by the `selectors` in the `target` contract.\n     *\n     * Requirements:\n     *\n     * - the caller must be a global admin\n     *\n     * Emits a {TargetFunctionRoleUpdated} event per selector.\n     */\n    function setTargetFunctionRole(address target, bytes4[] calldata selectors, uint64 roleId) external;\n\n    /**\n     * @dev Set the delay for changing the configuration of a given target contract.\n     *\n     * Requirements:\n     *\n     * - the caller must be a global admin\n     *\n     * Emits a {TargetAdminDelayUpdated} event.\n     */\n    function setTargetAdminDelay(address target, uint32 newDelay) external;\n\n    /**\n     * @dev Set the closed flag for a contract.\n     *\n     * Requirements:\n     *\n     * - the caller must be a global admin\n     *\n     * Emits a {TargetClosed} event.\n     */\n    function setTargetClosed(address target, bool closed) external;\n\n    /**\n     * @dev Return the timepoint at which a scheduled operation will be ready for execution. This returns 0 if the\n     * operation is not yet scheduled, has expired, was executed, or was canceled.\n     */\n    function getSchedule(bytes32 id) external view returns (uint48);\n\n    /**\n     * @dev Return the nonce for the latest scheduled operation with a given id. Returns 0 if the operation has never\n     * been scheduled.\n     */\n    function getNonce(bytes32 id) external view returns (uint32);\n\n    /**\n     * @dev Schedule a delayed operation for future execution, and return the operation identifier. It is possible to\n     * choose the timestamp at which the operation becomes executable as long as it satisfies the execution delays\n     * required for the caller. The special value zero will automatically set the earliest possible time.\n     *\n     * Returns the `operationId` that was scheduled. Since this value is a hash of the parameters, it can reoccur when\n     * the same parameters are used; if this is relevant, the returned `nonce` can be used to uniquely identify this\n     * scheduled operation from other occurrences of the same `operationId` in invocations of {execute} and {cancel}.\n     *\n     * Emits a {OperationScheduled} event.\n     *\n     * NOTE: It is not possible to concurrently schedule more than one operation with the same `target` and `data`. If\n     * this is necessary, a random byte can be appended to `data` to act as a salt that will be ignored by the target\n     * contract if it is using standard Solidity ABI encoding.\n     */\n    function schedule(address target, bytes calldata data, uint48 when) external returns (bytes32, uint32);\n\n    /**\n     * @dev Execute a function that is delay restricted, provided it was properly scheduled beforehand, or the\n     * execution delay is 0.\n     *\n     * Returns the nonce that identifies the previously scheduled operation that is executed, or 0 if the\n     * operation wasn't previously scheduled (if the caller doesn't have an execution delay).\n     *\n     * Emits an {OperationExecuted} event only if the call was scheduled and delayed.\n     */\n    function execute(address target, bytes calldata data) external payable returns (uint32);\n\n    /**\n     * @dev Cancel a scheduled (delayed) operation. Returns the nonce that identifies the previously scheduled\n     * operation that is cancelled.\n     *\n     * Requirements:\n     *\n     * - the caller must be the proposer, a guardian of the targeted function, or a global admin\n     *\n     * Emits a {OperationCanceled} event.\n     */\n    function cancel(address caller, address target, bytes calldata data) external returns (uint32);\n\n    /**\n     * @dev Consume a scheduled operation targeting the caller. If such an operation exists, mark it as consumed\n     * (emit an {OperationExecuted} event and clean the state). Otherwise, throw an error.\n     *\n     * This is useful for contract that want to enforce that calls targeting them were scheduled on the manager,\n     * with all the verifications that it implies.\n     *\n     * Emit a {OperationExecuted} event.\n     */\n    function consumeScheduledOp(address caller, bytes calldata data) external;\n\n    /**\n     * @dev Hashing function for delayed operations.\n     */\n    function hashOperation(address caller, address target, bytes calldata data) external view returns (bytes32);\n\n    /**\n     * @dev Changes the authority of a target managed by this manager instance.\n     *\n     * Requirements:\n     *\n     * - the caller must be a global admin\n     */\n    function updateAuthority(address target, address newAuthority) external;\n}\n"},{"file_path":"lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/contracts/utils/Address.sol","source_code":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/Address.sol)\n\npragma solidity ^0.8.20;\n\n/**\n * @dev Collection of functions related to the address type\n */\nlibrary Address {\n    /**\n     * @dev The ETH balance of the account is not enough to perform the operation.\n     */\n    error AddressInsufficientBalance(address account);\n\n    /**\n     * @dev There's no code at `target` (it is not a contract).\n     */\n    error AddressEmptyCode(address target);\n\n    /**\n     * @dev A call to an address target failed. The target may have reverted.\n     */\n    error FailedInnerCall();\n\n    /**\n     * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\n     * `recipient`, forwarding all available gas and reverting on errors.\n     *\n     * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\n     * of certain opcodes, possibly making contracts go over the 2300 gas limit\n     * imposed by `transfer`, making them unable to receive funds via\n     * `transfer`. {sendValue} removes this limitation.\n     *\n     * https://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/[Learn more].\n     *\n     * IMPORTANT: because control is transferred to `recipient`, care must be\n     * taken to not create reentrancy vulnerabilities. Consider using\n     * {ReentrancyGuard} or the\n     * https://solidity.readthedocs.io/en/v0.8.20/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\n     */\n    function sendValue(address payable recipient, uint256 amount) internal {\n        if (address(this).balance < amount) {\n            revert AddressInsufficientBalance(address(this));\n        }\n\n        (bool success, ) = recipient.call{value: amount}(\"\");\n        if (!success) {\n            revert FailedInnerCall();\n        }\n    }\n\n    /**\n     * @dev Performs a Solidity function call using a low level `call`. A\n     * plain `call` is an unsafe replacement for a function call: use this\n     * function instead.\n     *\n     * If `target` reverts with a revert reason or custom error, it is bubbled\n     * up by this function (like regular Solidity function calls). However, if\n     * the call reverted with no returned reason, this function reverts with a\n     * {FailedInnerCall} error.\n     *\n     * Returns the raw returned data. To convert to the expected return value,\n     * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\n     *\n     * Requirements:\n     *\n     * - `target` must be a contract.\n     * - calling `target` with `data` must not revert.\n     */\n    function functionCall(address target, bytes memory data) internal returns (bytes memory) {\n        return functionCallWithValue(target, data, 0);\n    }\n\n    /**\n     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n     * but also transferring `value` wei to `target`.\n     *\n     * Requirements:\n     *\n     * - the calling contract must have an ETH balance of at least `value`.\n     * - the called Solidity function must be `payable`.\n     */\n    function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {\n        if (address(this).balance < value) {\n            revert AddressInsufficientBalance(address(this));\n        }\n        (bool success, bytes memory returndata) = target.call{value: value}(data);\n        return verifyCallResultFromTarget(target, success, returndata);\n    }\n\n    /**\n     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n     * but performing a static call.\n     */\n    function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\n        (bool success, bytes memory returndata) = target.staticcall(data);\n        return verifyCallResultFromTarget(target, success, returndata);\n    }\n\n    /**\n     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n     * but performing a delegate call.\n     */\n    function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\n        (bool success, bytes memory returndata) = target.delegatecall(data);\n        return verifyCallResultFromTarget(target, success, returndata);\n    }\n\n    /**\n     * @dev Tool to verify that a low level call to smart-contract was successful, and reverts if the target\n     * was not a contract or bubbling up the revert reason (falling back to {FailedInnerCall}) in case of an\n     * unsuccessful call.\n     */\n    function verifyCallResultFromTarget(\n        address target,\n        bool success,\n        bytes memory returndata\n    ) internal view returns (bytes memory) {\n        if (!success) {\n            _revert(returndata);\n        } else {\n            // only check if target is a contract if the call was successful and the return data is empty\n            // otherwise we already know that it was a contract\n            if (returndata.length == 0 && target.code.length == 0) {\n                revert AddressEmptyCode(target);\n            }\n            return returndata;\n        }\n    }\n\n    /**\n     * @dev Tool to verify that a low level call was successful, and reverts if it wasn't, either by bubbling the\n     * revert reason or with a default {FailedInnerCall} error.\n     */\n    function verifyCallResult(bool success, bytes memory returndata) internal pure returns (bytes memory) {\n        if (!success) {\n            _revert(returndata);\n        } else {\n            return returndata;\n        }\n    }\n\n    /**\n     * @dev Reverts with returndata if present. Otherwise reverts with {FailedInnerCall}.\n     */\n    function _revert(bytes memory returndata) private pure {\n        // Look for revert reason and bubble it up if present\n        if (returndata.length > 0) {\n            // The easiest way to bubble the revert reason is using memory via assembly\n            /// @solidity memory-safe-assembly\n            assembly {\n                let returndata_size := mload(returndata)\n                revert(add(32, returndata), returndata_size)\n            }\n        } else {\n            revert FailedInnerCall();\n        }\n    }\n}\n"},{"file_path":"lib/openzeppelin-contracts-upgradeable/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-upgradeable/lib/openzeppelin-contracts/contracts/utils/math/SafeCast.sol","source_code":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/math/SafeCast.sol)\n// This file was procedurally generated from scripts/generate/templates/SafeCast.js.\n\npragma solidity ^0.8.20;\n\n/**\n * @dev Wrappers over Solidity's uintXX/intXX casting operators with added overflow\n * checks.\n *\n * Downcasting from uint256/int256 in Solidity does not revert on overflow. This can\n * easily result in undesired exploitation or bugs, since developers usually\n * assume that overflows raise errors. `SafeCast` restores this intuition by\n * reverting the transaction when such an operation overflows.\n *\n * Using this library instead of the unchecked operations eliminates an entire\n * class of bugs, so it's recommended to use it always.\n */\nlibrary SafeCast {\n    /**\n     * @dev Value doesn't fit in an uint of `bits` size.\n     */\n    error SafeCastOverflowedUintDowncast(uint8 bits, uint256 value);\n\n    /**\n     * @dev An int value doesn't fit in an uint of `bits` size.\n     */\n    error SafeCastOverflowedIntToUint(int256 value);\n\n    /**\n     * @dev Value doesn't fit in an int of `bits` size.\n     */\n    error SafeCastOverflowedIntDowncast(uint8 bits, int256 value);\n\n    /**\n     * @dev An uint value doesn't fit in an int of `bits` size.\n     */\n    error SafeCastOverflowedUintToInt(uint256 value);\n\n    /**\n     * @dev Returns the downcasted uint248 from uint256, reverting on\n     * overflow (when the input is greater than largest uint248).\n     *\n     * Counterpart to Solidity's `uint248` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 248 bits\n     */\n    function toUint248(uint256 value) internal pure returns (uint248) {\n        if (value > type(uint248).max) {\n            revert SafeCastOverflowedUintDowncast(248, value);\n        }\n        return uint248(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint240 from uint256, reverting on\n     * overflow (when the input is greater than largest uint240).\n     *\n     * Counterpart to Solidity's `uint240` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 240 bits\n     */\n    function toUint240(uint256 value) internal pure returns (uint240) {\n        if (value > type(uint240).max) {\n            revert SafeCastOverflowedUintDowncast(240, value);\n        }\n        return uint240(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint232 from uint256, reverting on\n     * overflow (when the input is greater than largest uint232).\n     *\n     * Counterpart to Solidity's `uint232` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 232 bits\n     */\n    function toUint232(uint256 value) internal pure returns (uint232) {\n        if (value > type(uint232).max) {\n            revert SafeCastOverflowedUintDowncast(232, value);\n        }\n        return uint232(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint224 from uint256, reverting on\n     * overflow (when the input is greater than largest uint224).\n     *\n     * Counterpart to Solidity's `uint224` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 224 bits\n     */\n    function toUint224(uint256 value) internal pure returns (uint224) {\n        if (value > type(uint224).max) {\n            revert SafeCastOverflowedUintDowncast(224, value);\n        }\n        return uint224(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint216 from uint256, reverting on\n     * overflow (when the input is greater than largest uint216).\n     *\n     * Counterpart to Solidity's `uint216` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 216 bits\n     */\n    function toUint216(uint256 value) internal pure returns (uint216) {\n        if (value > type(uint216).max) {\n            revert SafeCastOverflowedUintDowncast(216, value);\n        }\n        return uint216(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint208 from uint256, reverting on\n     * overflow (when the input is greater than largest uint208).\n     *\n     * Counterpart to Solidity's `uint208` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 208 bits\n     */\n    function toUint208(uint256 value) internal pure returns (uint208) {\n        if (value > type(uint208).max) {\n            revert SafeCastOverflowedUintDowncast(208, value);\n        }\n        return uint208(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint200 from uint256, reverting on\n     * overflow (when the input is greater than largest uint200).\n     *\n     * Counterpart to Solidity's `uint200` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 200 bits\n     */\n    function toUint200(uint256 value) internal pure returns (uint200) {\n        if (value > type(uint200).max) {\n            revert SafeCastOverflowedUintDowncast(200, value);\n        }\n        return uint200(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint192 from uint256, reverting on\n     * overflow (when the input is greater than largest uint192).\n     *\n     * Counterpart to Solidity's `uint192` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 192 bits\n     */\n    function toUint192(uint256 value) internal pure returns (uint192) {\n        if (value > type(uint192).max) {\n            revert SafeCastOverflowedUintDowncast(192, value);\n        }\n        return uint192(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint184 from uint256, reverting on\n     * overflow (when the input is greater than largest uint184).\n     *\n     * Counterpart to Solidity's `uint184` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 184 bits\n     */\n    function toUint184(uint256 value) internal pure returns (uint184) {\n        if (value > type(uint184).max) {\n            revert SafeCastOverflowedUintDowncast(184, value);\n        }\n        return uint184(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint176 from uint256, reverting on\n     * overflow (when the input is greater than largest uint176).\n     *\n     * Counterpart to Solidity's `uint176` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 176 bits\n     */\n    function toUint176(uint256 value) internal pure returns (uint176) {\n        if (value > type(uint176).max) {\n            revert SafeCastOverflowedUintDowncast(176, value);\n        }\n        return uint176(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint168 from uint256, reverting on\n     * overflow (when the input is greater than largest uint168).\n     *\n     * Counterpart to Solidity's `uint168` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 168 bits\n     */\n    function toUint168(uint256 value) internal pure returns (uint168) {\n        if (value > type(uint168).max) {\n            revert SafeCastOverflowedUintDowncast(168, value);\n        }\n        return uint168(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint160 from uint256, reverting on\n     * overflow (when the input is greater than largest uint160).\n     *\n     * Counterpart to Solidity's `uint160` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 160 bits\n     */\n    function toUint160(uint256 value) internal pure returns (uint160) {\n        if (value > type(uint160).max) {\n            revert SafeCastOverflowedUintDowncast(160, value);\n        }\n        return uint160(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint152 from uint256, reverting on\n     * overflow (when the input is greater than largest uint152).\n     *\n     * Counterpart to Solidity's `uint152` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 152 bits\n     */\n    function toUint152(uint256 value) internal pure returns (uint152) {\n        if (value > type(uint152).max) {\n            revert SafeCastOverflowedUintDowncast(152, value);\n        }\n        return uint152(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint144 from uint256, reverting on\n     * overflow (when the input is greater than largest uint144).\n     *\n     * Counterpart to Solidity's `uint144` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 144 bits\n     */\n    function toUint144(uint256 value) internal pure returns (uint144) {\n        if (value > type(uint144).max) {\n            revert SafeCastOverflowedUintDowncast(144, value);\n        }\n        return uint144(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint136 from uint256, reverting on\n     * overflow (when the input is greater than largest uint136).\n     *\n     * Counterpart to Solidity's `uint136` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 136 bits\n     */\n    function toUint136(uint256 value) internal pure returns (uint136) {\n        if (value > type(uint136).max) {\n            revert SafeCastOverflowedUintDowncast(136, value);\n        }\n        return uint136(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint128 from uint256, reverting on\n     * overflow (when the input is greater than largest uint128).\n     *\n     * Counterpart to Solidity's `uint128` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 128 bits\n     */\n    function toUint128(uint256 value) internal pure returns (uint128) {\n        if (value > type(uint128).max) {\n            revert SafeCastOverflowedUintDowncast(128, value);\n        }\n        return uint128(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint120 from uint256, reverting on\n     * overflow (when the input is greater than largest uint120).\n     *\n     * Counterpart to Solidity's `uint120` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 120 bits\n     */\n    function toUint120(uint256 value) internal pure returns (uint120) {\n        if (value > type(uint120).max) {\n            revert SafeCastOverflowedUintDowncast(120, value);\n        }\n        return uint120(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint112 from uint256, reverting on\n     * overflow (when the input is greater than largest uint112).\n     *\n     * Counterpart to Solidity's `uint112` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 112 bits\n     */\n    function toUint112(uint256 value) internal pure returns (uint112) {\n        if (value > type(uint112).max) {\n            revert SafeCastOverflowedUintDowncast(112, value);\n        }\n        return uint112(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint104 from uint256, reverting on\n     * overflow (when the input is greater than largest uint104).\n     *\n     * Counterpart to Solidity's `uint104` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 104 bits\n     */\n    function toUint104(uint256 value) internal pure returns (uint104) {\n        if (value > type(uint104).max) {\n            revert SafeCastOverflowedUintDowncast(104, value);\n        }\n        return uint104(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint96 from uint256, reverting on\n     * overflow (when the input is greater than largest uint96).\n     *\n     * Counterpart to Solidity's `uint96` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 96 bits\n     */\n    function toUint96(uint256 value) internal pure returns (uint96) {\n        if (value > type(uint96).max) {\n            revert SafeCastOverflowedUintDowncast(96, value);\n        }\n        return uint96(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint88 from uint256, reverting on\n     * overflow (when the input is greater than largest uint88).\n     *\n     * Counterpart to Solidity's `uint88` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 88 bits\n     */\n    function toUint88(uint256 value) internal pure returns (uint88) {\n        if (value > type(uint88).max) {\n            revert SafeCastOverflowedUintDowncast(88, value);\n        }\n        return uint88(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint80 from uint256, reverting on\n     * overflow (when the input is greater than largest uint80).\n     *\n     * Counterpart to Solidity's `uint80` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 80 bits\n     */\n    function toUint80(uint256 value) internal pure returns (uint80) {\n        if (value > type(uint80).max) {\n            revert SafeCastOverflowedUintDowncast(80, value);\n        }\n        return uint80(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint72 from uint256, reverting on\n     * overflow (when the input is greater than largest uint72).\n     *\n     * Counterpart to Solidity's `uint72` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 72 bits\n     */\n    function toUint72(uint256 value) internal pure returns (uint72) {\n        if (value > type(uint72).max) {\n            revert SafeCastOverflowedUintDowncast(72, value);\n        }\n        return uint72(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint64 from uint256, reverting on\n     * overflow (when the input is greater than largest uint64).\n     *\n     * Counterpart to Solidity's `uint64` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 64 bits\n     */\n    function toUint64(uint256 value) internal pure returns (uint64) {\n        if (value > type(uint64).max) {\n            revert SafeCastOverflowedUintDowncast(64, value);\n        }\n        return uint64(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint56 from uint256, reverting on\n     * overflow (when the input is greater than largest uint56).\n     *\n     * Counterpart to Solidity's `uint56` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 56 bits\n     */\n    function toUint56(uint256 value) internal pure returns (uint56) {\n        if (value > type(uint56).max) {\n            revert SafeCastOverflowedUintDowncast(56, value);\n        }\n        return uint56(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint48 from uint256, reverting on\n     * overflow (when the input is greater than largest uint48).\n     *\n     * Counterpart to Solidity's `uint48` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 48 bits\n     */\n    function toUint48(uint256 value) internal pure returns (uint48) {\n        if (value > type(uint48).max) {\n            revert SafeCastOverflowedUintDowncast(48, value);\n        }\n        return uint48(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint40 from uint256, reverting on\n     * overflow (when the input is greater than largest uint40).\n     *\n     * Counterpart to Solidity's `uint40` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 40 bits\n     */\n    function toUint40(uint256 value) internal pure returns (uint40) {\n        if (value > type(uint40).max) {\n            revert SafeCastOverflowedUintDowncast(40, value);\n        }\n        return uint40(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint32 from uint256, reverting on\n     * overflow (when the input is greater than largest uint32).\n     *\n     * Counterpart to Solidity's `uint32` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 32 bits\n     */\n    function toUint32(uint256 value) internal pure returns (uint32) {\n        if (value > type(uint32).max) {\n            revert SafeCastOverflowedUintDowncast(32, value);\n        }\n        return uint32(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint24 from uint256, reverting on\n     * overflow (when the input is greater than largest uint24).\n     *\n     * Counterpart to Solidity's `uint24` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 24 bits\n     */\n    function toUint24(uint256 value) internal pure returns (uint24) {\n        if (value > type(uint24).max) {\n            revert SafeCastOverflowedUintDowncast(24, value);\n        }\n        return uint24(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint16 from uint256, reverting on\n     * overflow (when the input is greater than largest uint16).\n     *\n     * Counterpart to Solidity's `uint16` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 16 bits\n     */\n    function toUint16(uint256 value) internal pure returns (uint16) {\n        if (value > type(uint16).max) {\n            revert SafeCastOverflowedUintDowncast(16, value);\n        }\n        return uint16(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint8 from uint256, reverting on\n     * overflow (when the input is greater than largest uint8).\n     *\n     * Counterpart to Solidity's `uint8` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 8 bits\n     */\n    function toUint8(uint256 value) internal pure returns (uint8) {\n        if (value > type(uint8).max) {\n            revert SafeCastOverflowedUintDowncast(8, value);\n        }\n        return uint8(value);\n    }\n\n    /**\n     * @dev Converts a signed int256 into an unsigned uint256.\n     *\n     * Requirements:\n     *\n     * - input must be greater than or equal to 0.\n     */\n    function toUint256(int256 value) internal pure returns (uint256) {\n        if (value < 0) {\n            revert SafeCastOverflowedIntToUint(value);\n        }\n        return uint256(value);\n    }\n\n    /**\n     * @dev Returns the downcasted int248 from int256, reverting on\n     * overflow (when the input is less than smallest int248 or\n     * greater than largest int248).\n     *\n     * Counterpart to Solidity's `int248` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 248 bits\n     */\n    function toInt248(int256 value) internal pure returns (int248 downcasted) {\n        downcasted = int248(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(248, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int240 from int256, reverting on\n     * overflow (when the input is less than smallest int240 or\n     * greater than largest int240).\n     *\n     * Counterpart to Solidity's `int240` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 240 bits\n     */\n    function toInt240(int256 value) internal pure returns (int240 downcasted) {\n        downcasted = int240(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(240, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int232 from int256, reverting on\n     * overflow (when the input is less than smallest int232 or\n     * greater than largest int232).\n     *\n     * Counterpart to Solidity's `int232` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 232 bits\n     */\n    function toInt232(int256 value) internal pure returns (int232 downcasted) {\n        downcasted = int232(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(232, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int224 from int256, reverting on\n     * overflow (when the input is less than smallest int224 or\n     * greater than largest int224).\n     *\n     * Counterpart to Solidity's `int224` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 224 bits\n     */\n    function toInt224(int256 value) internal pure returns (int224 downcasted) {\n        downcasted = int224(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(224, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int216 from int256, reverting on\n     * overflow (when the input is less than smallest int216 or\n     * greater than largest int216).\n     *\n     * Counterpart to Solidity's `int216` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 216 bits\n     */\n    function toInt216(int256 value) internal pure returns (int216 downcasted) {\n        downcasted = int216(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(216, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int208 from int256, reverting on\n     * overflow (when the input is less than smallest int208 or\n     * greater than largest int208).\n     *\n     * Counterpart to Solidity's `int208` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 208 bits\n     */\n    function toInt208(int256 value) internal pure returns (int208 downcasted) {\n        downcasted = int208(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(208, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int200 from int256, reverting on\n     * overflow (when the input is less than smallest int200 or\n     * greater than largest int200).\n     *\n     * Counterpart to Solidity's `int200` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 200 bits\n     */\n    function toInt200(int256 value) internal pure returns (int200 downcasted) {\n        downcasted = int200(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(200, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int192 from int256, reverting on\n     * overflow (when the input is less than smallest int192 or\n     * greater than largest int192).\n     *\n     * Counterpart to Solidity's `int192` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 192 bits\n     */\n    function toInt192(int256 value) internal pure returns (int192 downcasted) {\n        downcasted = int192(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(192, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int184 from int256, reverting on\n     * overflow (when the input is less than smallest int184 or\n     * greater than largest int184).\n     *\n     * Counterpart to Solidity's `int184` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 184 bits\n     */\n    function toInt184(int256 value) internal pure returns (int184 downcasted) {\n        downcasted = int184(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(184, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int176 from int256, reverting on\n     * overflow (when the input is less than smallest int176 or\n     * greater than largest int176).\n     *\n     * Counterpart to Solidity's `int176` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 176 bits\n     */\n    function toInt176(int256 value) internal pure returns (int176 downcasted) {\n        downcasted = int176(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(176, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int168 from int256, reverting on\n     * overflow (when the input is less than smallest int168 or\n     * greater than largest int168).\n     *\n     * Counterpart to Solidity's `int168` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 168 bits\n     */\n    function toInt168(int256 value) internal pure returns (int168 downcasted) {\n        downcasted = int168(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(168, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int160 from int256, reverting on\n     * overflow (when the input is less than smallest int160 or\n     * greater than largest int160).\n     *\n     * Counterpart to Solidity's `int160` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 160 bits\n     */\n    function toInt160(int256 value) internal pure returns (int160 downcasted) {\n        downcasted = int160(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(160, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int152 from int256, reverting on\n     * overflow (when the input is less than smallest int152 or\n     * greater than largest int152).\n     *\n     * Counterpart to Solidity's `int152` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 152 bits\n     */\n    function toInt152(int256 value) internal pure returns (int152 downcasted) {\n        downcasted = int152(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(152, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int144 from int256, reverting on\n     * overflow (when the input is less than smallest int144 or\n     * greater than largest int144).\n     *\n     * Counterpart to Solidity's `int144` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 144 bits\n     */\n    function toInt144(int256 value) internal pure returns (int144 downcasted) {\n        downcasted = int144(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(144, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int136 from int256, reverting on\n     * overflow (when the input is less than smallest int136 or\n     * greater than largest int136).\n     *\n     * Counterpart to Solidity's `int136` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 136 bits\n     */\n    function toInt136(int256 value) internal pure returns (int136 downcasted) {\n        downcasted = int136(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(136, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int128 from int256, reverting on\n     * overflow (when the input is less than smallest int128 or\n     * greater than largest int128).\n     *\n     * Counterpart to Solidity's `int128` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 128 bits\n     */\n    function toInt128(int256 value) internal pure returns (int128 downcasted) {\n        downcasted = int128(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(128, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int120 from int256, reverting on\n     * overflow (when the input is less than smallest int120 or\n     * greater than largest int120).\n     *\n     * Counterpart to Solidity's `int120` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 120 bits\n     */\n    function toInt120(int256 value) internal pure returns (int120 downcasted) {\n        downcasted = int120(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(120, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int112 from int256, reverting on\n     * overflow (when the input is less than smallest int112 or\n     * greater than largest int112).\n     *\n     * Counterpart to Solidity's `int112` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 112 bits\n     */\n    function toInt112(int256 value) internal pure returns (int112 downcasted) {\n        downcasted = int112(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(112, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int104 from int256, reverting on\n     * overflow (when the input is less than smallest int104 or\n     * greater than largest int104).\n     *\n     * Counterpart to Solidity's `int104` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 104 bits\n     */\n    function toInt104(int256 value) internal pure returns (int104 downcasted) {\n        downcasted = int104(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(104, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int96 from int256, reverting on\n     * overflow (when the input is less than smallest int96 or\n     * greater than largest int96).\n     *\n     * Counterpart to Solidity's `int96` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 96 bits\n     */\n    function toInt96(int256 value) internal pure returns (int96 downcasted) {\n        downcasted = int96(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(96, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int88 from int256, reverting on\n     * overflow (when the input is less than smallest int88 or\n     * greater than largest int88).\n     *\n     * Counterpart to Solidity's `int88` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 88 bits\n     */\n    function toInt88(int256 value) internal pure returns (int88 downcasted) {\n        downcasted = int88(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(88, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int80 from int256, reverting on\n     * overflow (when the input is less than smallest int80 or\n     * greater than largest int80).\n     *\n     * Counterpart to Solidity's `int80` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 80 bits\n     */\n    function toInt80(int256 value) internal pure returns (int80 downcasted) {\n        downcasted = int80(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(80, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int72 from int256, reverting on\n     * overflow (when the input is less than smallest int72 or\n     * greater than largest int72).\n     *\n     * Counterpart to Solidity's `int72` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 72 bits\n     */\n    function toInt72(int256 value) internal pure returns (int72 downcasted) {\n        downcasted = int72(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(72, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int64 from int256, reverting on\n     * overflow (when the input is less than smallest int64 or\n     * greater than largest int64).\n     *\n     * Counterpart to Solidity's `int64` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 64 bits\n     */\n    function toInt64(int256 value) internal pure returns (int64 downcasted) {\n        downcasted = int64(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(64, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int56 from int256, reverting on\n     * overflow (when the input is less than smallest int56 or\n     * greater than largest int56).\n     *\n     * Counterpart to Solidity's `int56` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 56 bits\n     */\n    function toInt56(int256 value) internal pure returns (int56 downcasted) {\n        downcasted = int56(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(56, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int48 from int256, reverting on\n     * overflow (when the input is less than smallest int48 or\n     * greater than largest int48).\n     *\n     * Counterpart to Solidity's `int48` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 48 bits\n     */\n    function toInt48(int256 value) internal pure returns (int48 downcasted) {\n        downcasted = int48(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(48, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int40 from int256, reverting on\n     * overflow (when the input is less than smallest int40 or\n     * greater than largest int40).\n     *\n     * Counterpart to Solidity's `int40` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 40 bits\n     */\n    function toInt40(int256 value) internal pure returns (int40 downcasted) {\n        downcasted = int40(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(40, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int32 from int256, reverting on\n     * overflow (when the input is less than smallest int32 or\n     * greater than largest int32).\n     *\n     * Counterpart to Solidity's `int32` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 32 bits\n     */\n    function toInt32(int256 value) internal pure returns (int32 downcasted) {\n        downcasted = int32(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(32, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int24 from int256, reverting on\n     * overflow (when the input is less than smallest int24 or\n     * greater than largest int24).\n     *\n     * Counterpart to Solidity's `int24` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 24 bits\n     */\n    function toInt24(int256 value) internal pure returns (int24 downcasted) {\n        downcasted = int24(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(24, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int16 from int256, reverting on\n     * overflow (when the input is less than smallest int16 or\n     * greater than largest int16).\n     *\n     * Counterpart to Solidity's `int16` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 16 bits\n     */\n    function toInt16(int256 value) internal pure returns (int16 downcasted) {\n        downcasted = int16(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(16, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int8 from int256, reverting on\n     * overflow (when the input is less than smallest int8 or\n     * greater than largest int8).\n     *\n     * Counterpart to Solidity's `int8` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 8 bits\n     */\n    function toInt8(int256 value) internal pure returns (int8 downcasted) {\n        downcasted = int8(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(8, value);\n        }\n    }\n\n    /**\n     * @dev Converts an unsigned uint256 into a signed int256.\n     *\n     * Requirements:\n     *\n     * - input must be less than or equal to maxInt256.\n     */\n    function toInt256(uint256 value) internal pure returns (int256) {\n        // Note: Unsafe cast below is okay because `type(int256).max` is guaranteed to be positive\n        if (value > uint256(type(int256).max)) {\n            revert SafeCastOverflowedUintToInt(value);\n        }\n        return int256(value);\n    }\n}\n"},{"file_path":"lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/contracts/utils/types/Time.sol","source_code":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/types/Time.sol)\n\npragma solidity ^0.8.20;\n\nimport {Math} from \"../math/Math.sol\";\nimport {SafeCast} from \"../math/SafeCast.sol\";\n\n/**\n * @dev This library provides helpers for manipulating time-related objects.\n *\n * It uses the following types:\n * - `uint48` for timepoints\n * - `uint32` for durations\n *\n * While the library doesn't provide specific types for timepoints and duration, it does provide:\n * - a `Delay` type to represent duration that can be programmed to change value automatically at a given point\n * - additional helper functions\n */\nlibrary Time {\n    using Time for *;\n\n    /**\n     * @dev Get the block timestamp as a Timepoint.\n     */\n    function timestamp() internal view returns (uint48) {\n        return SafeCast.toUint48(block.timestamp);\n    }\n\n    /**\n     * @dev Get the block number as a Timepoint.\n     */\n    function blockNumber() internal view returns (uint48) {\n        return SafeCast.toUint48(block.number);\n    }\n\n    // ==================================================== Delay =====================================================\n    /**\n     * @dev A `Delay` is a uint32 duration that can be programmed to change value automatically at a given point in the\n     * future. The \"effect\" timepoint describes when the transitions happens from the \"old\" value to the \"new\" value.\n     * This allows updating the delay applied to some operation while keeping some guarantees.\n     *\n     * In particular, the {update} function guarantees that if the delay is reduced, the old delay still applies for\n     * some time. For example if the delay is currently 7 days to do an upgrade, the admin should not be able to set\n     * the delay to 0 and upgrade immediately. If the admin wants to reduce the delay, the old delay (7 days) should\n     * still apply for some time.\n     *\n     *\n     * The `Delay` type is 112 bits long, and packs the following:\n     *\n     * ```\n     *   | [uint48]: effect date (timepoint)\n     *   |           | [uint32]: value before (duration)\n     *   ↓           ↓       ↓ [uint32]: value after (duration)\n     * 0xAAAAAAAAAAAABBBBBBBBCCCCCCCC\n     * ```\n     *\n     * NOTE: The {get} and {withUpdate} functions operate using timestamps. Block number based delays are not currently\n     * supported.\n     */\n    type Delay is uint112;\n\n    /**\n     * @dev Wrap a duration into a Delay to add the one-step \"update in the future\" feature\n     */\n    function toDelay(uint32 duration) internal pure returns (Delay) {\n        return Delay.wrap(duration);\n    }\n\n    /**\n     * @dev Get the value at a given timepoint plus the pending value and effect timepoint if there is a scheduled\n     * change after this timepoint. If the effect timepoint is 0, then the pending value should not be considered.\n     */\n    function _getFullAt(Delay self, uint48 timepoint) private pure returns (uint32, uint32, uint48) {\n        (uint32 valueBefore, uint32 valueAfter, uint48 effect) = self.unpack();\n        return effect <= timepoint ? (valueAfter, 0, 0) : (valueBefore, valueAfter, effect);\n    }\n\n    /**\n     * @dev Get the current value plus the pending value and effect timepoint if there is a scheduled change. If the\n     * effect timepoint is 0, then the pending value should not be considered.\n     */\n    function getFull(Delay self) internal view returns (uint32, uint32, uint48) {\n        return _getFullAt(self, timestamp());\n    }\n\n    /**\n     * @dev Get the current value.\n     */\n    function get(Delay self) internal view returns (uint32) {\n        (uint32 delay, , ) = self.getFull();\n        return delay;\n    }\n\n    /**\n     * @dev Update a Delay object so that it takes a new duration after a timepoint that is automatically computed to\n     * enforce the old delay at the moment of the update. Returns the updated Delay object and the timestamp when the\n     * new delay becomes effective.\n     */\n    function withUpdate(\n        Delay self,\n        uint32 newValue,\n        uint32 minSetback\n    ) internal view returns (Delay updatedDelay, uint48 effect) {\n        uint32 value = self.get();\n        uint32 setback = uint32(Math.max(minSetback, value > newValue ? value - newValue : 0));\n        effect = timestamp() + setback;\n        return (pack(value, newValue, effect), effect);\n    }\n\n    /**\n     * @dev Split a delay into its components: valueBefore, valueAfter and effect (transition timepoint).\n     */\n    function unpack(Delay self) internal pure returns (uint32 valueBefore, uint32 valueAfter, uint48 effect) {\n        uint112 raw = Delay.unwrap(self);\n\n        valueAfter = uint32(raw);\n        valueBefore = uint32(raw >> 32);\n        effect = uint48(raw >> 64);\n\n        return (valueBefore, valueAfter, effect);\n    }\n\n    /**\n     * @dev pack the components into a Delay object.\n     */\n    function pack(uint32 valueBefore, uint32 valueAfter, uint48 effect) internal pure returns (Delay) {\n        return Delay.wrap((uint112(effect) << 64) | (uint112(valueBefore) << 32) | uint112(valueAfter));\n    }\n}\n"}],"is_verified_via_sourcify":false,"can_be_visualized_via_sol2uml":true,"evm_version":"cancun","language":"solidity","is_verified_via_eth_bytecode_db":false,"is_fully_verified":true,"license_type":"none","is_blueprint":false,"name":"QuillAccessManagerUpgradeable","creation_bytecode":"0x6080604052348015600e575f80fd5b5060156019565b60c9565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00805468010000000000000000900460ff161560685760405163f92ee8a960e01b815260040160405180910390fd5b80546001600160401b039081161460c65780546001600160401b0319166001600160401b0390811782556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b50565b612ca9806100d65f395ff3fe608060405260043610610249575f3560e01c806375b238fc11610134578063b7009613116100b3578063d1f856ee11610078578063d1f856ee146106f0578063d22b59891461070f578063d6bb62c61461072e578063ef4fa36a1461074d578063f801a69814610762578063fe0776f51461079b575f80fd5b8063b70096131461064f578063b7d2b1621461068a578063c4d66de8146106a9578063cc1b6c81146106c8578063cf4e0320146106da575f80fd5b806394c7d7ee116100f957806394c7d7ee14610589578063a166aa89146105a8578063a64d95ce146105d7578063abd9bd2a146105f6578063ac9650d814610623575f80fd5b806375b238fc1461051b57806378e53cbd1461052e5780637b13904f146105425780637f52d80414610556578063853551b81461056a575f80fd5b80633078f114116101cb578063451e064611610190578063451e0646146104745780634665096d1461048a5780634c1da1e21461049f57806352962952146104be578063530dd456146104dd5780636d5115bd146104fc575f80fd5b80633078f1141461038d57806330cae187146103e65780633adc277a146104055780633ca7c02a1461043b5780634136a33c14610455575f80fd5b806318ff183c1161021157806318ff183c146103115780631cff79cd1461033057806325c471a01461034357806326fc5d3e146103625780632c0b51d514610378575f80fd5b806305f5cdec1461024d57806308d6122d1461027e5780630b0a93ba1461029f57806312be8727146102be578063167bd395146102f2575b5f80fd5b348015610258575f80fd5b50610261600381565b6040516001600160401b0390911681526020015b60405180910390f35b348015610289575f80fd5b5061029d610298366004612599565b6107ba565b005b3480156102aa575f80fd5b506102616102b93660046125fb565b61080c565b3480156102c9575f80fd5b506102dd6102d83660046125fb565b610843565b60405163ffffffff9091168152602001610275565b3480156102fd575f80fd5b5061029d61030c366004612614565b61088d565b34801561031c575f80fd5b5061029d61032b36600461264f565b6108a3565b6102dd61033e3660046126b8565b610905565b34801561034e575f80fd5b5061029d61035d36600461271b565b610a46565b34801561036d575f80fd5b506102dd6202a30081565b348015610383575f80fd5b506102dd61012c81565b348015610398575f80fd5b506103ac6103a736600461275d565b610a68565b604051610275949392919065ffffffffffff948516815263ffffffff93841660208201529190921660408201529116606082015260800190565b3480156103f1575f80fd5b5061029d610400366004612777565b610adb565b348015610410575f80fd5b5061042461041f3660046127a8565b610aed565b60405165ffffffffffff9091168152602001610275565b348015610446575f80fd5b506102616001600160401b0381565b348015610460575f80fd5b506102dd61046f3660046127a8565b610b2f565b34801561047f575f80fd5b506102dd62278d0081565b348015610495575f80fd5b5062093a806102dd565b3480156104aa575f80fd5b506102dd6104b93660046127bf565b610b5a565b3480156104c9575f80fd5b5061029d6104d8366004612777565b610b94565b3480156104e8575f80fd5b506102616104f73660046125fb565b610ba6565b348015610507575f80fd5b506102616105163660046127ef565b610bd6565b348015610526575f80fd5b506102615f81565b348015610539575f80fd5b50610261600281565b34801561054d575f80fd5b50610261600481565b348015610561575f80fd5b50610261600181565b348015610575575f80fd5b5061029d61058436600461281b565b610c1d565b348015610594575f80fd5b5061029d6105a33660046126b8565b610cb4565b3480156105b3575f80fd5b506105c76105c23660046127bf565b610d5e565b6040519015158152602001610275565b3480156105e2575f80fd5b5061029d6105f1366004612836565b610d95565b348015610601575f80fd5b5061061561061036600461285e565b610da7565b604051908152602001610275565b34801561062e575f80fd5b5061064261063d3660046128be565b610ddf565b60405161027591906128fc565b34801561065a575f80fd5b5061066e610669366004612973565b610ec4565b60408051921515835263ffffffff909116602083015201610275565b348015610695575f80fd5b5061029d6106a436600461275d565b610f45565b3480156106b4575f80fd5b5061029d6106c33660046127bf565b610f5c565b3480156106d3575f80fd5b505f6102dd565b3480156106e5575f80fd5b506102dd62093a8081565b3480156106fb575f80fd5b5061066e61070a36600461275d565b611067565b34801561071a575f80fd5b5061029d6107293660046129bb565b6110e0565b348015610739575f80fd5b506102dd61074836600461285e565b6110f2565b348015610758575f80fd5b506102dd611c2081565b34801561076d575f80fd5b5061078161077c3660046129d7565b611255565b6040805192835263ffffffff909116602083015201610275565b3480156107a6575f80fd5b5061029d6107b536600461275d565b6113f1565b6107c261141a565b5f5b82811015610805576107fd858585848181106107e2576107e2612a44565b90506020020160208101906107f79190612a58565b84611491565b6001016107c4565b5050505050565b5f8061081661151d565b6001600160401b039384165f9081526001918201602052604090200154600160401b900490921692915050565b5f8061084d61151d565b6001600160401b0384165f90815260018281016020526040909120015490915061088690600160801b90046001600160701b0316611541565b9392505050565b61089561141a565b61089f828261155f565b5050565b6108ab61141a565b604051637a9e5e4b60e01b81526001600160a01b038281166004830152831690637a9e5e4b906024015f604051808303815f87803b1580156108eb575f80fd5b505af11580156108fd573d5f803e3d5ffd5b505050505050565b5f8061090f61151d565b9050335f8061092083898989611603565b9150915081158015610936575063ffffffff8116155b156109895782886109478989611654565b6040516381c6f24b60e01b81526001600160a01b0393841660048201529290911660248301526001600160e01b03191660448201526064015b60405180910390fd5b5f610996848a8a8a610da7565b90505f63ffffffff83161515806109bc57506109b182610aed565b65ffffffffffff1615155b156109cd576109ca8261166b565b90505b60038601546109e58b6109e08c8c611654565b61177c565b8760030181905550610a2e8b8b8b8080601f0160208091040260200160405190810160405280939291908181526020018383808284375f920191909152503492506117be915050565b50600390960195909555509293505050509392505050565b610a4e61141a565b610a628383610a5c86610843565b84611857565b50505050565b5f805f805f610a7561151d565b6001600160401b0388165f90815260018201602090815260408083206001600160a01b038b1684529091529020805465ffffffffffff8116975091925090610acc90600160301b90046001600160701b0316611ab1565b979a9199509750945050505050565b610ae361141a565b61089f8282611ad2565b5f80610af761151d565b5f84815260028201602052604090205490915065ffffffffffff16610b1b81611b82565b610b255780610b27565b5f5b949350505050565b5f80610b3961151d565b5f93845260020160205250506040902054600160301b900463ffffffff1690565b5f80610b6461151d565b6001600160a01b0384165f90815260208290526040902060010154909150610886906001600160701b0316611541565b610b9c61141a565b61089f8282611bb0565b5f80610bb061151d565b6001600160401b039384165f908152600191820160205260409020015490921692915050565b5f80610be061151d565b6001600160a01b0385165f908152602091825260408082206001600160e01b03198716835290925220546001600160401b03169150505b92915050565b610c2561141a565b6001600160401b0383161580610c4357506001600160401b03838116145b15610c6c5760405163061c6a4360e21b81526001600160401b0384166004820152602401610980565b826001600160401b03167f1256f5b5ecb89caec12db449738f2fbcd1ba5806cf38f35413f4e5c15bf6a4508383604051610ca7929190612a9b565b60405180910390a2505050565b60408051638fb3603760e01b80825291513392918391638fb36037916004808201926020929091908290030181865afa158015610cf3573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610d179190612aae565b6001600160e01b03191614610d4a57604051630641fee960e31b81526001600160a01b0382166004820152602401610980565b610805610d5985838686610da7565b61166b565b5f80610d6861151d565b6001600160a01b039093165f9081526020939093525050604090206001015460ff600160701b9091041690565b610d9d61141a565b61089f8282611c6e565b5f84848484604051602001610dbf9493929190612ac9565b604051602081830303815290604052805190602001209050949350505050565b604080515f815260208101909152606090826001600160401b03811115610e0857610e08612b30565b604051908082528060200260200182016040528015610e3b57816020015b6060815260200190600190039081610e265790505b5091505f5b83811015610ebc57610e9730868684818110610e5e57610e5e612a44565b9050602002810190610e709190612b44565b85604051602001610e8393929190612b9d565b604051602081830303815290604052611d95565b838281518110610ea957610ea9612a44565b6020908102919091010152600101610e40565b505092915050565b5f80610ecf84610d5e565b15610ede57505f905080610f3d565b306001600160a01b03861603610f0257610ef88484611e07565b5f91509150610f3d565b5f610f0d8585610bd6565b90505f80610f1b8389611067565b9150915081610f2b575f80610f35565b63ffffffff811615815b945094505050505b935093915050565b610f4d61141a565b610f578282611e2b565b505050565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a008054600160401b810460ff1615906001600160401b03165f81158015610fa05750825b90505f826001600160401b03166001148015610fbb5750303b155b905081158015610fc9575080155b15610fe75760405163f92ee8a960e01b815260040160405180910390fd5b845467ffffffffffffffff19166001178555831561101157845460ff60401b1916600160401b1785555b61101a86611f26565b83156108fd57845460ff60401b19168555604051600181527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a1505050505050565b5f8067fffffffffffffffe196001600160401b0385160161108d5750600190505f6110d9565b5f806110998686610a68565b5050915091508165ffffffffffff165f141580156110ce57506110ba611f3a565b65ffffffffffff168265ffffffffffff1611155b935091506110d99050565b9250929050565b6110e861141a565b61089f8282611f49565b5f806110fc61151d565b9050335f61110a8686611654565b90505f61111989898989610da7565b5f81815260028601602052604081205491925065ffffffffffff90911690036111585760405163060a299b60e41b815260048101829052602401610980565b826001600160a01b0316896001600160a01b0316146111f1575f61117c5f85611067565b5090505f6111966111906102b98c87610bd6565b86611067565b509050811580156111a5575080155b156111ee57604051630ff89d4760e21b81526001600160a01b038087166004830152808d1660248301528b1660448201526001600160e01b031985166064820152608401610980565b50505b5f818152600285016020526040808220805465ffffffffffff1916908190559051600160301b90910463ffffffff1691829184917fbd9ac67a6e2f6463b80927326310338bcbb4bdb7936ce1365ea3e01067e7b9f791a39998505050505050505050565b5f805f61126061151d565b9050335f611270828a8a8a611603565b9150505f8163ffffffff16611283611f3a565b61128d9190612bb2565b905063ffffffff821615806112c357505f8765ffffffffffff161180156112c357508065ffffffffffff168765ffffffffffff16105b156112d457828a6109478b8b611654565b6112ee8765ffffffffffff168265ffffffffffff1661200e565b96506112fc838b8b8b610da7565b955061130786612023565b836002015f8781526020019081526020015f205f0160069054906101000a900463ffffffff16600101945086846002015f8881526020019081526020015f205f015f6101000a81548165ffffffffffff021916908365ffffffffffff16021790555084846002015f8881526020019081526020015f205f0160066101000a81548163ffffffff021916908363ffffffff1602179055508463ffffffff16867f82a2da5dee54ea8021c6545b4444620291e07ee83be6dd57edb175062715f3b489868e8e8e6040516113dc959493929190612bd8565b60405180910390a35050505094509492505050565b6001600160a01b0381163314610f4d57604051635f159e6360e01b815260040160405180910390fd5b335f8061142883823661207d565b9150915081610f57578063ffffffff165f03611482575f611449813661212e565b5060405163f07e038f60e01b81526001600160a01b03871660048201526001600160401b03821660248201529092506044019050610980565b610a62610d5984305f36610da7565b5f61149a61151d565b6001600160a01b0385165f818152602083815260408083206001600160e01b0319891680855290835292819020805467ffffffffffffffff19166001600160401b03891690811790915590519283529394507f9ea6790c7dadfd01c9f8b9762b3682607af2c7e79e05a9f9fdf5580dde949151910160405180910390a350505050565b7f40c6c8c28789853c7efd823ab20824bbd71718a8a5915e855f6f288c9a26ad0090565b5f80611555836001600160701b0316611ab1565b5090949350505050565b5f61156861151d565b9050306001600160a01b0384160361159e57604051630b40d17960e31b81526001600160a01b0384166004820152602401610980565b6001600160a01b0383165f81815260208390526040908190206001018054851515600160701b0260ff60701b19909116179055517f90d4e7bb7e5d933792b3562e1741306f8be94837e1348dacef9b6f1df56eb13890610ca790851515815260200190565b5f80306001600160a01b038616036116295761162086858561207d565b9150915061164b565b600483106116455761164086866106698787611654565b611620565b505f9050805b94509492505050565b5f6116626004828486612b09565b61088691612c1d565b5f8061167561151d565b5f84815260028201602052604081205491925065ffffffffffff821691600160301b900463ffffffff16908290036116c35760405163060a299b60e41b815260048101869052602401610980565b6116cb611f3a565b65ffffffffffff168265ffffffffffff1611156116fe57604051630c65b5bd60e11b815260048101869052602401610980565b61170782611b82565b1561172857604051631e2975b960e21b815260048101869052602401610980565b5f858152600284016020526040808220805465ffffffffffff191690555163ffffffff83169187917f76a2a46953689d4861a5d3f6ed883ad7e6af674a21f8e162707159fc9dde614d9190a3949350505050565b604080516001600160a01b03939093166020808501919091526001600160e01b0319929092168382015280518084038201815260609093019052815191012090565b6060814710156117e35760405163cd78605960e01b8152306004820152602401610980565b5f80856001600160a01b031684866040516117fe9190612c4b565b5f6040518083038185875af1925050503d805f8114611838576040519150601f19603f3d011682016040523d82523d5f602084013e61183d565b606091505b509150915061184d8683836122ef565b9695505050505050565b5f8061186161151d565b905067fffffffffffffffe196001600160401b038716016118a05760405163061c6a4360e21b81526001600160401b0387166004820152602401610980565b6001600160401b0386165f90815260018201602090815260408083206001600160a01b038916845290915281205465ffffffffffff1615908115611994578563ffffffff166118ed611f3a565b6118f79190612bb2565b905060405180604001604052808265ffffffffffff1681526020016119258763ffffffff1663ffffffff1690565b6001600160701b039081169091526001600160401b038a165f90815260018601602090815260408083206001600160a01b038d1684528252909120835181549490920151909216600160301b026001600160a01b031990931665ffffffffffff90911617919091179055611a42565b6001600160401b0388165f90815260018401602090815260408083206001600160a01b038b1684529091528120546119df91600160301b9091046001600160701b031690879061234b565b6001600160401b038a165f90815260018601602090815260408083206001600160a01b038d168452909152902080546001600160701b03909316600160301b0273ffffffffffffffffffffffffffff000000000000199093169290921790915590505b6040805163ffffffff8716815265ffffffffffff831660208201528315158183015290516001600160a01b038916916001600160401b038b16917ff98448b987f1428e0e230e1f3c6e2ce15b5693eaf31827fbd0b1ec4b424ae7cf9181900360600190a3509695505050505050565b5f805f611ac584611ac0611f3a565b6123f1565b9250925092509193909250565b5f611adb61151d565b90506001600160401b0383161580611afb57506001600160401b03838116145b15611b245760405163061c6a4360e21b81526001600160401b0384166004820152602401610980565b6001600160401b038381165f81815260018481016020526040808320909101805467ffffffffffffffff19169487169485179055517f1fd6dd7631312dfac2205b52913f99de03b4d7e381d5d27d3dbfe0713e6e63409190a3505050565b5f611b8b611f3a565b65ffffffffffff16611ba062093a8084612bb2565b65ffffffffffff16111592915050565b5f611bb961151d565b90506001600160401b0383161580611bd957506001600160401b03838116145b15611c025760405163061c6a4360e21b81526001600160401b0384166004820152602401610980565b6001600160401b038381165f8181526001848101602052604080832090910180546fffffffffffffffff00000000000000001916600160401b958816958602179055517f7a8059630b897b5de4c08ade69f8b90c3ead1f8596d62d10b6c4d14a0afb4ae29190a3505050565b5f611c7761151d565b905067fffffffffffffffe196001600160401b03841601611cb65760405163061c6a4360e21b81526001600160401b0384166004820152602401610980565b6001600160401b0383165f9081526001828101602052604082200154611ced90600160801b90046001600160701b0316848361234b565b6001600160401b0386165f81815260018087016020526040918290200180546001600160701b03909516600160801b026dffffffffffffffffffffffffffff60801b199095169490941790935591519092507ffeb69018ee8b8fd50ea86348f1267d07673379f72cffdeccec63853ee8ce8b4890611d87908690859063ffffffff92909216825265ffffffffffff16602082015260400190565b60405180910390a250505050565b60605f80846001600160a01b031684604051611db19190612c4b565b5f60405180830381855af49150503d805f8114611de9576040519150601f19603f3d011682016040523d82523d5f602084013e611dee565b606091505b5091509150611dfe8583836122ef565b95945050505050565b5f80611e1161151d565b9050611e1d848461177c565b600390910154149392505050565b5f80611e3561151d565b905067fffffffffffffffe196001600160401b03851601611e745760405163061c6a4360e21b81526001600160401b0385166004820152602401610980565b6001600160401b0384165f90815260018201602090815260408083206001600160a01b038716845290915281205465ffffffffffff169003611eb9575f915050610c17565b6001600160401b0384165f81815260018301602090815260408083206001600160a01b038816808552925280832080546001600160a01b0319169055519092917ff229baa593af28c41b1d16b748cd7688f0c83aaf92d4be41c44005defe84c16691a35060019392505050565b611f2e612443565b611f378161248e565b50565b5f611f44426124cb565b905090565b5f611f5261151d565b90505f611f8583826001600160a01b0387165f908152602086905260409020600101546001600160701b0316919061234b565b6001600160a01b0386165f818152602086815260409182902060010180546dffffffffffffffffffffffffffff19166001600160701b039690961695909517909455805163ffffffff8816815265ffffffffffff841694810194909452919350917fa56b76017453f399ec2327ba00375dbfb1fd070ff854341ad6191e6a2e2de19c9101611d87565b5f81831161201c5781610886565b5090919050565b5f61202c61151d565b5f83815260028201602052604090205490915065ffffffffffff16801580159061205c575061205a81611b82565b155b15610f575760405163813e945960e01b815260048101849052602401610980565b5f80600483101561209257505f905080610f3d565b306001600160a01b038616036120b557610ef8306120b08686611654565b611e07565b5f805f6120c2878761212e565b925092509250826120db575f8094509450505050610f3d565b5f806120e7848b611067565b9150915081612100575f80965096505050505050610f3d565b6121168363ffffffff168263ffffffff1661200e565b63ffffffff8116159b909a5098505050505050505050565b5f8080600484101561214757505f9150819050806122e8565b5f6121528686611654565b90506001600160e01b031981166310a6aa3760e31b148061218357506001600160e01b031981166330cae18760e01b145b8061219e57506001600160e01b0319811663294b14a960e11b145b806121b957506001600160e01b03198116635326cae760e11b145b806121d457506001600160e01b0319811663d22b598960e01b145b156121e95760015f80935093509350506122e8565b6001600160e01b0319811663063fc60f60e21b148061221857506001600160e01b0319811663167bd39560e01b145b8061223357506001600160e01b031981166308d6122d60e01b145b15612272575f61224760246004888a612b09565b81019061225491906127bf565b90505f61226082610b5a565b600196505f955093506122e892505050565b6001600160e01b0319811663012e238d60e51b14806122a157506001600160e01b03198116635be958b160e11b145b156122dd575f6122b560246004888a612b09565b8101906122c291906125fb565b905060016122cf82610ba6565b5f94509450945050506122e8565b5f805f935093509350505b9250925092565b606082612304576122ff82612501565b610886565b815115801561231b57506001600160a01b0384163b155b1561234457604051639996b31560e01b81526001600160a01b0385166004820152602401610980565b5080610886565b5f805f612360866001600160701b0316611541565b90505f61239b8563ffffffff168763ffffffff168463ffffffff1611612386575f612390565b6123908885612c56565b63ffffffff1661200e565b90508063ffffffff166123ac611f3a565b6123b69190612bb2565b925063ffffffff8616602083901b67ffffffff0000000016604085901b6dffffffffffff000000000000000016171793505050935093915050565b5f808069ffffffffffffffffffff602086901c166001600160701b03861665ffffffffffff604088901c811690871681111561242f57828282612433565b815f805b9550955095505050509250925092565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0054600160401b900460ff1661248c57604051631afcd79f60e31b815260040160405180910390fd5b565b612496612443565b6001600160a01b0381166124bf57604051630409d6d160e11b81525f6004820152602401610980565b61089f5f825f80611857565b5f65ffffffffffff8211156124fd576040516306dfcc6560e41b81526030600482015260248101839052604401610980565b5090565b8051156125115780518082602001fd5b604051630a12f52160e11b815260040160405180910390fd5b6001600160a01b0381168114611f37575f80fd5b5f8083601f84011261254e575f80fd5b5081356001600160401b03811115612564575f80fd5b6020830191508360208260051b85010111156110d9575f80fd5b80356001600160401b0381168114612594575f80fd5b919050565b5f805f80606085870312156125ac575f80fd5b84356125b78161252a565b935060208501356001600160401b038111156125d1575f80fd5b6125dd8782880161253e565b90945092506125f090506040860161257e565b905092959194509250565b5f6020828403121561260b575f80fd5b6108868261257e565b5f8060408385031215612625575f80fd5b82356126308161252a565b915060208301358015158114612644575f80fd5b809150509250929050565b5f8060408385031215612660575f80fd5b823561266b8161252a565b915060208301356126448161252a565b5f8083601f84011261268b575f80fd5b5081356001600160401b038111156126a1575f80fd5b6020830191508360208285010111156110d9575f80fd5b5f805f604084860312156126ca575f80fd5b83356126d58161252a565b925060208401356001600160401b038111156126ef575f80fd5b6126fb8682870161267b565b9497909650939450505050565b803563ffffffff81168114612594575f80fd5b5f805f6060848603121561272d575f80fd5b6127368461257e565b925060208401356127468161252a565b915061275460408501612708565b90509250925092565b5f806040838503121561276e575f80fd5b61266b8361257e565b5f8060408385031215612788575f80fd5b6127918361257e565b915061279f6020840161257e565b90509250929050565b5f602082840312156127b8575f80fd5b5035919050565b5f602082840312156127cf575f80fd5b81356108868161252a565b6001600160e01b031981168114611f37575f80fd5b5f8060408385031215612800575f80fd5b823561280b8161252a565b91506020830135612644816127da565b5f805f6040848603121561282d575f80fd5b6126d58461257e565b5f8060408385031215612847575f80fd5b6128508361257e565b915061279f60208401612708565b5f805f8060608587031215612871575f80fd5b843561287c8161252a565b9350602085013561288c8161252a565b925060408501356001600160401b038111156128a6575f80fd5b6128b28782880161267b565b95989497509550505050565b5f80602083850312156128cf575f80fd5b82356001600160401b038111156128e4575f80fd5b6128f08582860161253e565b90969095509350505050565b5f602080830181845280855180835260408601915060408160051b87010192508387015f5b8281101561296657878503603f1901845281518051808752808883018989015e5f878201890152601f01601f1916909501860194509285019290850190600101612921565b5092979650505050505050565b5f805f60608486031215612985575f80fd5b83356129908161252a565b925060208401356129a08161252a565b915060408401356129b0816127da565b809150509250925092565b5f80604083850312156129cc575f80fd5b82356128508161252a565b5f805f80606085870312156129ea575f80fd5b84356129f58161252a565b935060208501356001600160401b03811115612a0f575f80fd5b612a1b8782880161267b565b909450925050604085013565ffffffffffff81168114612a39575f80fd5b939692955090935050565b634e487b7160e01b5f52603260045260245ffd5b5f60208284031215612a68575f80fd5b8135610886816127da565b81835281816020850137505f828201602090810191909152601f909101601f19169091010190565b602081525f610b27602083018486612a73565b5f60208284031215612abe575f80fd5b8151610886816127da565b6001600160a01b038581168252841660208201526060604082018190525f9061184d9083018486612a73565b634e487b7160e01b5f52601160045260245ffd5b5f8085851115612b17575f80fd5b83861115612b23575f80fd5b5050820193919092039150565b634e487b7160e01b5f52604160045260245ffd5b5f808335601e19843603018112612b59575f80fd5b8301803591506001600160401b03821115612b72575f80fd5b6020019150368190038213156110d9575f80fd5b5f81518060208401855e5f93019283525090919050565b828482375f8382015f815261184d8185612b86565b65ffffffffffff818116838216019080821115612bd157612bd1612af5565b5092915050565b65ffffffffffff861681526001600160a01b038581166020830152841660408201526080606082018190525f90612c129083018486612a73565b979650505050505050565b6001600160e01b03198135818116916004851015610ebc5760049490940360031b84901b1690921692915050565b5f6108868284612b86565b63ffffffff828116828216039080821115612bd157612bd1612af556fea2646970667358221220c43ad2149e6d54ef7bd71440700553641feabbdbd60ba28f20b2cce8cb9dbf7b64736f6c63430008190033","external_libraries":[],"proxy_type":null,"implementations":[],"verified_at":"2026-03-15T14:50:08.610059Z","is_verified_via_verifier_alliance":false,"compiler_version":"v0.8.25+commit.b61c2a91","decoded_constructor_args":null,"sourcify_repo_url":null,"optimization_runs":200,"compiler_settings":{"evmVersion":"cancun","libraries":{},"metadata":{"appendCBOR":true,"bytecodeHash":"ipfs","useLiteralContent":false},"optimizer":{"enabled":true,"runs":200},"outputSelection":{"*":{"":["*"],"*":["*"]}},"remappings":["@openzeppelin/contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/contracts/","@openzeppelin/contracts/=lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/contracts/","Solady/=lib/Solady/src/","ds-test/=lib/openzeppelin-foundry-upgrades/lib/solidity-stringutils/lib/ds-test/src/","erc4626-tests/=lib/openzeppelin-contracts-upgradeable/lib/erc4626-tests/","forge-std/=lib/forge-std/src/","openzeppelin-contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/","openzeppelin-contracts/=lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/","openzeppelin-foundry-upgrades/=lib/openzeppelin-foundry-upgrades/src/","safe-smart-account/=lib/safe-smart-account/","solidity-stringutils/=lib/openzeppelin-foundry-upgrades/lib/solidity-stringutils/"],"viaIR":false},"is_verified":true,"verified_twin_address_hash":null,"optimization_enabled":true,"deployed_bytecode":"0x608060405260043610610249575f3560e01c806375b238fc11610134578063b7009613116100b3578063d1f856ee11610078578063d1f856ee146106f0578063d22b59891461070f578063d6bb62c61461072e578063ef4fa36a1461074d578063f801a69814610762578063fe0776f51461079b575f80fd5b8063b70096131461064f578063b7d2b1621461068a578063c4d66de8146106a9578063cc1b6c81146106c8578063cf4e0320146106da575f80fd5b806394c7d7ee116100f957806394c7d7ee14610589578063a166aa89146105a8578063a64d95ce146105d7578063abd9bd2a146105f6578063ac9650d814610623575f80fd5b806375b238fc1461051b57806378e53cbd1461052e5780637b13904f146105425780637f52d80414610556578063853551b81461056a575f80fd5b80633078f114116101cb578063451e064611610190578063451e0646146104745780634665096d1461048a5780634c1da1e21461049f57806352962952146104be578063530dd456146104dd5780636d5115bd146104fc575f80fd5b80633078f1141461038d57806330cae187146103e65780633adc277a146104055780633ca7c02a1461043b5780634136a33c14610455575f80fd5b806318ff183c1161021157806318ff183c146103115780631cff79cd1461033057806325c471a01461034357806326fc5d3e146103625780632c0b51d514610378575f80fd5b806305f5cdec1461024d57806308d6122d1461027e5780630b0a93ba1461029f57806312be8727146102be578063167bd395146102f2575b5f80fd5b348015610258575f80fd5b50610261600381565b6040516001600160401b0390911681526020015b60405180910390f35b348015610289575f80fd5b5061029d610298366004612599565b6107ba565b005b3480156102aa575f80fd5b506102616102b93660046125fb565b61080c565b3480156102c9575f80fd5b506102dd6102d83660046125fb565b610843565b60405163ffffffff9091168152602001610275565b3480156102fd575f80fd5b5061029d61030c366004612614565b61088d565b34801561031c575f80fd5b5061029d61032b36600461264f565b6108a3565b6102dd61033e3660046126b8565b610905565b34801561034e575f80fd5b5061029d61035d36600461271b565b610a46565b34801561036d575f80fd5b506102dd6202a30081565b348015610383575f80fd5b506102dd61012c81565b348015610398575f80fd5b506103ac6103a736600461275d565b610a68565b604051610275949392919065ffffffffffff948516815263ffffffff93841660208201529190921660408201529116606082015260800190565b3480156103f1575f80fd5b5061029d610400366004612777565b610adb565b348015610410575f80fd5b5061042461041f3660046127a8565b610aed565b60405165ffffffffffff9091168152602001610275565b348015610446575f80fd5b506102616001600160401b0381565b348015610460575f80fd5b506102dd61046f3660046127a8565b610b2f565b34801561047f575f80fd5b506102dd62278d0081565b348015610495575f80fd5b5062093a806102dd565b3480156104aa575f80fd5b506102dd6104b93660046127bf565b610b5a565b3480156104c9575f80fd5b5061029d6104d8366004612777565b610b94565b3480156104e8575f80fd5b506102616104f73660046125fb565b610ba6565b348015610507575f80fd5b506102616105163660046127ef565b610bd6565b348015610526575f80fd5b506102615f81565b348015610539575f80fd5b50610261600281565b34801561054d575f80fd5b50610261600481565b348015610561575f80fd5b50610261600181565b348015610575575f80fd5b5061029d61058436600461281b565b610c1d565b348015610594575f80fd5b5061029d6105a33660046126b8565b610cb4565b3480156105b3575f80fd5b506105c76105c23660046127bf565b610d5e565b6040519015158152602001610275565b3480156105e2575f80fd5b5061029d6105f1366004612836565b610d95565b348015610601575f80fd5b5061061561061036600461285e565b610da7565b604051908152602001610275565b34801561062e575f80fd5b5061064261063d3660046128be565b610ddf565b60405161027591906128fc565b34801561065a575f80fd5b5061066e610669366004612973565b610ec4565b60408051921515835263ffffffff909116602083015201610275565b348015610695575f80fd5b5061029d6106a436600461275d565b610f45565b3480156106b4575f80fd5b5061029d6106c33660046127bf565b610f5c565b3480156106d3575f80fd5b505f6102dd565b3480156106e5575f80fd5b506102dd62093a8081565b3480156106fb575f80fd5b5061066e61070a36600461275d565b611067565b34801561071a575f80fd5b5061029d6107293660046129bb565b6110e0565b348015610739575f80fd5b506102dd61074836600461285e565b6110f2565b348015610758575f80fd5b506102dd611c2081565b34801561076d575f80fd5b5061078161077c3660046129d7565b611255565b6040805192835263ffffffff909116602083015201610275565b3480156107a6575f80fd5b5061029d6107b536600461275d565b6113f1565b6107c261141a565b5f5b82811015610805576107fd858585848181106107e2576107e2612a44565b90506020020160208101906107f79190612a58565b84611491565b6001016107c4565b5050505050565b5f8061081661151d565b6001600160401b039384165f9081526001918201602052604090200154600160401b900490921692915050565b5f8061084d61151d565b6001600160401b0384165f90815260018281016020526040909120015490915061088690600160801b90046001600160701b0316611541565b9392505050565b61089561141a565b61089f828261155f565b5050565b6108ab61141a565b604051637a9e5e4b60e01b81526001600160a01b038281166004830152831690637a9e5e4b906024015f604051808303815f87803b1580156108eb575f80fd5b505af11580156108fd573d5f803e3d5ffd5b505050505050565b5f8061090f61151d565b9050335f8061092083898989611603565b9150915081158015610936575063ffffffff8116155b156109895782886109478989611654565b6040516381c6f24b60e01b81526001600160a01b0393841660048201529290911660248301526001600160e01b03191660448201526064015b60405180910390fd5b5f610996848a8a8a610da7565b90505f63ffffffff83161515806109bc57506109b182610aed565b65ffffffffffff1615155b156109cd576109ca8261166b565b90505b60038601546109e58b6109e08c8c611654565b61177c565b8760030181905550610a2e8b8b8b8080601f0160208091040260200160405190810160405280939291908181526020018383808284375f920191909152503492506117be915050565b50600390960195909555509293505050509392505050565b610a4e61141a565b610a628383610a5c86610843565b84611857565b50505050565b5f805f805f610a7561151d565b6001600160401b0388165f90815260018201602090815260408083206001600160a01b038b1684529091529020805465ffffffffffff8116975091925090610acc90600160301b90046001600160701b0316611ab1565b979a9199509750945050505050565b610ae361141a565b61089f8282611ad2565b5f80610af761151d565b5f84815260028201602052604090205490915065ffffffffffff16610b1b81611b82565b610b255780610b27565b5f5b949350505050565b5f80610b3961151d565b5f93845260020160205250506040902054600160301b900463ffffffff1690565b5f80610b6461151d565b6001600160a01b0384165f90815260208290526040902060010154909150610886906001600160701b0316611541565b610b9c61141a565b61089f8282611bb0565b5f80610bb061151d565b6001600160401b039384165f908152600191820160205260409020015490921692915050565b5f80610be061151d565b6001600160a01b0385165f908152602091825260408082206001600160e01b03198716835290925220546001600160401b03169150505b92915050565b610c2561141a565b6001600160401b0383161580610c4357506001600160401b03838116145b15610c6c5760405163061c6a4360e21b81526001600160401b0384166004820152602401610980565b826001600160401b03167f1256f5b5ecb89caec12db449738f2fbcd1ba5806cf38f35413f4e5c15bf6a4508383604051610ca7929190612a9b565b60405180910390a2505050565b60408051638fb3603760e01b80825291513392918391638fb36037916004808201926020929091908290030181865afa158015610cf3573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610d179190612aae565b6001600160e01b03191614610d4a57604051630641fee960e31b81526001600160a01b0382166004820152602401610980565b610805610d5985838686610da7565b61166b565b5f80610d6861151d565b6001600160a01b039093165f9081526020939093525050604090206001015460ff600160701b9091041690565b610d9d61141a565b61089f8282611c6e565b5f84848484604051602001610dbf9493929190612ac9565b604051602081830303815290604052805190602001209050949350505050565b604080515f815260208101909152606090826001600160401b03811115610e0857610e08612b30565b604051908082528060200260200182016040528015610e3b57816020015b6060815260200190600190039081610e265790505b5091505f5b83811015610ebc57610e9730868684818110610e5e57610e5e612a44565b9050602002810190610e709190612b44565b85604051602001610e8393929190612b9d565b604051602081830303815290604052611d95565b838281518110610ea957610ea9612a44565b6020908102919091010152600101610e40565b505092915050565b5f80610ecf84610d5e565b15610ede57505f905080610f3d565b306001600160a01b03861603610f0257610ef88484611e07565b5f91509150610f3d565b5f610f0d8585610bd6565b90505f80610f1b8389611067565b9150915081610f2b575f80610f35565b63ffffffff811615815b945094505050505b935093915050565b610f4d61141a565b610f578282611e2b565b505050565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a008054600160401b810460ff1615906001600160401b03165f81158015610fa05750825b90505f826001600160401b03166001148015610fbb5750303b155b905081158015610fc9575080155b15610fe75760405163f92ee8a960e01b815260040160405180910390fd5b845467ffffffffffffffff19166001178555831561101157845460ff60401b1916600160401b1785555b61101a86611f26565b83156108fd57845460ff60401b19168555604051600181527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a1505050505050565b5f8067fffffffffffffffe196001600160401b0385160161108d5750600190505f6110d9565b5f806110998686610a68565b5050915091508165ffffffffffff165f141580156110ce57506110ba611f3a565b65ffffffffffff168265ffffffffffff1611155b935091506110d99050565b9250929050565b6110e861141a565b61089f8282611f49565b5f806110fc61151d565b9050335f61110a8686611654565b90505f61111989898989610da7565b5f81815260028601602052604081205491925065ffffffffffff90911690036111585760405163060a299b60e41b815260048101829052602401610980565b826001600160a01b0316896001600160a01b0316146111f1575f61117c5f85611067565b5090505f6111966111906102b98c87610bd6565b86611067565b509050811580156111a5575080155b156111ee57604051630ff89d4760e21b81526001600160a01b038087166004830152808d1660248301528b1660448201526001600160e01b031985166064820152608401610980565b50505b5f818152600285016020526040808220805465ffffffffffff1916908190559051600160301b90910463ffffffff1691829184917fbd9ac67a6e2f6463b80927326310338bcbb4bdb7936ce1365ea3e01067e7b9f791a39998505050505050505050565b5f805f61126061151d565b9050335f611270828a8a8a611603565b9150505f8163ffffffff16611283611f3a565b61128d9190612bb2565b905063ffffffff821615806112c357505f8765ffffffffffff161180156112c357508065ffffffffffff168765ffffffffffff16105b156112d457828a6109478b8b611654565b6112ee8765ffffffffffff168265ffffffffffff1661200e565b96506112fc838b8b8b610da7565b955061130786612023565b836002015f8781526020019081526020015f205f0160069054906101000a900463ffffffff16600101945086846002015f8881526020019081526020015f205f015f6101000a81548165ffffffffffff021916908365ffffffffffff16021790555084846002015f8881526020019081526020015f205f0160066101000a81548163ffffffff021916908363ffffffff1602179055508463ffffffff16867f82a2da5dee54ea8021c6545b4444620291e07ee83be6dd57edb175062715f3b489868e8e8e6040516113dc959493929190612bd8565b60405180910390a35050505094509492505050565b6001600160a01b0381163314610f4d57604051635f159e6360e01b815260040160405180910390fd5b335f8061142883823661207d565b9150915081610f57578063ffffffff165f03611482575f611449813661212e565b5060405163f07e038f60e01b81526001600160a01b03871660048201526001600160401b03821660248201529092506044019050610980565b610a62610d5984305f36610da7565b5f61149a61151d565b6001600160a01b0385165f818152602083815260408083206001600160e01b0319891680855290835292819020805467ffffffffffffffff19166001600160401b03891690811790915590519283529394507f9ea6790c7dadfd01c9f8b9762b3682607af2c7e79e05a9f9fdf5580dde949151910160405180910390a350505050565b7f40c6c8c28789853c7efd823ab20824bbd71718a8a5915e855f6f288c9a26ad0090565b5f80611555836001600160701b0316611ab1565b5090949350505050565b5f61156861151d565b9050306001600160a01b0384160361159e57604051630b40d17960e31b81526001600160a01b0384166004820152602401610980565b6001600160a01b0383165f81815260208390526040908190206001018054851515600160701b0260ff60701b19909116179055517f90d4e7bb7e5d933792b3562e1741306f8be94837e1348dacef9b6f1df56eb13890610ca790851515815260200190565b5f80306001600160a01b038616036116295761162086858561207d565b9150915061164b565b600483106116455761164086866106698787611654565b611620565b505f9050805b94509492505050565b5f6116626004828486612b09565b61088691612c1d565b5f8061167561151d565b5f84815260028201602052604081205491925065ffffffffffff821691600160301b900463ffffffff16908290036116c35760405163060a299b60e41b815260048101869052602401610980565b6116cb611f3a565b65ffffffffffff168265ffffffffffff1611156116fe57604051630c65b5bd60e11b815260048101869052602401610980565b61170782611b82565b1561172857604051631e2975b960e21b815260048101869052602401610980565b5f858152600284016020526040808220805465ffffffffffff191690555163ffffffff83169187917f76a2a46953689d4861a5d3f6ed883ad7e6af674a21f8e162707159fc9dde614d9190a3949350505050565b604080516001600160a01b03939093166020808501919091526001600160e01b0319929092168382015280518084038201815260609093019052815191012090565b6060814710156117e35760405163cd78605960e01b8152306004820152602401610980565b5f80856001600160a01b031684866040516117fe9190612c4b565b5f6040518083038185875af1925050503d805f8114611838576040519150601f19603f3d011682016040523d82523d5f602084013e61183d565b606091505b509150915061184d8683836122ef565b9695505050505050565b5f8061186161151d565b905067fffffffffffffffe196001600160401b038716016118a05760405163061c6a4360e21b81526001600160401b0387166004820152602401610980565b6001600160401b0386165f90815260018201602090815260408083206001600160a01b038916845290915281205465ffffffffffff1615908115611994578563ffffffff166118ed611f3a565b6118f79190612bb2565b905060405180604001604052808265ffffffffffff1681526020016119258763ffffffff1663ffffffff1690565b6001600160701b039081169091526001600160401b038a165f90815260018601602090815260408083206001600160a01b038d1684528252909120835181549490920151909216600160301b026001600160a01b031990931665ffffffffffff90911617919091179055611a42565b6001600160401b0388165f90815260018401602090815260408083206001600160a01b038b1684529091528120546119df91600160301b9091046001600160701b031690879061234b565b6001600160401b038a165f90815260018601602090815260408083206001600160a01b038d168452909152902080546001600160701b03909316600160301b0273ffffffffffffffffffffffffffff000000000000199093169290921790915590505b6040805163ffffffff8716815265ffffffffffff831660208201528315158183015290516001600160a01b038916916001600160401b038b16917ff98448b987f1428e0e230e1f3c6e2ce15b5693eaf31827fbd0b1ec4b424ae7cf9181900360600190a3509695505050505050565b5f805f611ac584611ac0611f3a565b6123f1565b9250925092509193909250565b5f611adb61151d565b90506001600160401b0383161580611afb57506001600160401b03838116145b15611b245760405163061c6a4360e21b81526001600160401b0384166004820152602401610980565b6001600160401b038381165f81815260018481016020526040808320909101805467ffffffffffffffff19169487169485179055517f1fd6dd7631312dfac2205b52913f99de03b4d7e381d5d27d3dbfe0713e6e63409190a3505050565b5f611b8b611f3a565b65ffffffffffff16611ba062093a8084612bb2565b65ffffffffffff16111592915050565b5f611bb961151d565b90506001600160401b0383161580611bd957506001600160401b03838116145b15611c025760405163061c6a4360e21b81526001600160401b0384166004820152602401610980565b6001600160401b038381165f8181526001848101602052604080832090910180546fffffffffffffffff00000000000000001916600160401b958816958602179055517f7a8059630b897b5de4c08ade69f8b90c3ead1f8596d62d10b6c4d14a0afb4ae29190a3505050565b5f611c7761151d565b905067fffffffffffffffe196001600160401b03841601611cb65760405163061c6a4360e21b81526001600160401b0384166004820152602401610980565b6001600160401b0383165f9081526001828101602052604082200154611ced90600160801b90046001600160701b0316848361234b565b6001600160401b0386165f81815260018087016020526040918290200180546001600160701b03909516600160801b026dffffffffffffffffffffffffffff60801b199095169490941790935591519092507ffeb69018ee8b8fd50ea86348f1267d07673379f72cffdeccec63853ee8ce8b4890611d87908690859063ffffffff92909216825265ffffffffffff16602082015260400190565b60405180910390a250505050565b60605f80846001600160a01b031684604051611db19190612c4b565b5f60405180830381855af49150503d805f8114611de9576040519150601f19603f3d011682016040523d82523d5f602084013e611dee565b606091505b5091509150611dfe8583836122ef565b95945050505050565b5f80611e1161151d565b9050611e1d848461177c565b600390910154149392505050565b5f80611e3561151d565b905067fffffffffffffffe196001600160401b03851601611e745760405163061c6a4360e21b81526001600160401b0385166004820152602401610980565b6001600160401b0384165f90815260018201602090815260408083206001600160a01b038716845290915281205465ffffffffffff169003611eb9575f915050610c17565b6001600160401b0384165f81815260018301602090815260408083206001600160a01b038816808552925280832080546001600160a01b0319169055519092917ff229baa593af28c41b1d16b748cd7688f0c83aaf92d4be41c44005defe84c16691a35060019392505050565b611f2e612443565b611f378161248e565b50565b5f611f44426124cb565b905090565b5f611f5261151d565b90505f611f8583826001600160a01b0387165f908152602086905260409020600101546001600160701b0316919061234b565b6001600160a01b0386165f818152602086815260409182902060010180546dffffffffffffffffffffffffffff19166001600160701b039690961695909517909455805163ffffffff8816815265ffffffffffff841694810194909452919350917fa56b76017453f399ec2327ba00375dbfb1fd070ff854341ad6191e6a2e2de19c9101611d87565b5f81831161201c5781610886565b5090919050565b5f61202c61151d565b5f83815260028201602052604090205490915065ffffffffffff16801580159061205c575061205a81611b82565b155b15610f575760405163813e945960e01b815260048101849052602401610980565b5f80600483101561209257505f905080610f3d565b306001600160a01b038616036120b557610ef8306120b08686611654565b611e07565b5f805f6120c2878761212e565b925092509250826120db575f8094509450505050610f3d565b5f806120e7848b611067565b9150915081612100575f80965096505050505050610f3d565b6121168363ffffffff168263ffffffff1661200e565b63ffffffff8116159b909a5098505050505050505050565b5f8080600484101561214757505f9150819050806122e8565b5f6121528686611654565b90506001600160e01b031981166310a6aa3760e31b148061218357506001600160e01b031981166330cae18760e01b145b8061219e57506001600160e01b0319811663294b14a960e11b145b806121b957506001600160e01b03198116635326cae760e11b145b806121d457506001600160e01b0319811663d22b598960e01b145b156121e95760015f80935093509350506122e8565b6001600160e01b0319811663063fc60f60e21b148061221857506001600160e01b0319811663167bd39560e01b145b8061223357506001600160e01b031981166308d6122d60e01b145b15612272575f61224760246004888a612b09565b81019061225491906127bf565b90505f61226082610b5a565b600196505f955093506122e892505050565b6001600160e01b0319811663012e238d60e51b14806122a157506001600160e01b03198116635be958b160e11b145b156122dd575f6122b560246004888a612b09565b8101906122c291906125fb565b905060016122cf82610ba6565b5f94509450945050506122e8565b5f805f935093509350505b9250925092565b606082612304576122ff82612501565b610886565b815115801561231b57506001600160a01b0384163b155b1561234457604051639996b31560e01b81526001600160a01b0385166004820152602401610980565b5080610886565b5f805f612360866001600160701b0316611541565b90505f61239b8563ffffffff168763ffffffff168463ffffffff1611612386575f612390565b6123908885612c56565b63ffffffff1661200e565b90508063ffffffff166123ac611f3a565b6123b69190612bb2565b925063ffffffff8616602083901b67ffffffff0000000016604085901b6dffffffffffff000000000000000016171793505050935093915050565b5f808069ffffffffffffffffffff602086901c166001600160701b03861665ffffffffffff604088901c811690871681111561242f57828282612433565b815f805b9550955095505050509250925092565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0054600160401b900460ff1661248c57604051631afcd79f60e31b815260040160405180910390fd5b565b612496612443565b6001600160a01b0381166124bf57604051630409d6d160e11b81525f6004820152602401610980565b61089f5f825f80611857565b5f65ffffffffffff8211156124fd576040516306dfcc6560e41b81526030600482015260248101839052604401610980565b5090565b8051156125115780518082602001fd5b604051630a12f52160e11b815260040160405180910390fd5b6001600160a01b0381168114611f37575f80fd5b5f8083601f84011261254e575f80fd5b5081356001600160401b03811115612564575f80fd5b6020830191508360208260051b85010111156110d9575f80fd5b80356001600160401b0381168114612594575f80fd5b919050565b5f805f80606085870312156125ac575f80fd5b84356125b78161252a565b935060208501356001600160401b038111156125d1575f80fd5b6125dd8782880161253e565b90945092506125f090506040860161257e565b905092959194509250565b5f6020828403121561260b575f80fd5b6108868261257e565b5f8060408385031215612625575f80fd5b82356126308161252a565b915060208301358015158114612644575f80fd5b809150509250929050565b5f8060408385031215612660575f80fd5b823561266b8161252a565b915060208301356126448161252a565b5f8083601f84011261268b575f80fd5b5081356001600160401b038111156126a1575f80fd5b6020830191508360208285010111156110d9575f80fd5b5f805f604084860312156126ca575f80fd5b83356126d58161252a565b925060208401356001600160401b038111156126ef575f80fd5b6126fb8682870161267b565b9497909650939450505050565b803563ffffffff81168114612594575f80fd5b5f805f6060848603121561272d575f80fd5b6127368461257e565b925060208401356127468161252a565b915061275460408501612708565b90509250925092565b5f806040838503121561276e575f80fd5b61266b8361257e565b5f8060408385031215612788575f80fd5b6127918361257e565b915061279f6020840161257e565b90509250929050565b5f602082840312156127b8575f80fd5b5035919050565b5f602082840312156127cf575f80fd5b81356108868161252a565b6001600160e01b031981168114611f37575f80fd5b5f8060408385031215612800575f80fd5b823561280b8161252a565b91506020830135612644816127da565b5f805f6040848603121561282d575f80fd5b6126d58461257e565b5f8060408385031215612847575f80fd5b6128508361257e565b915061279f60208401612708565b5f805f8060608587031215612871575f80fd5b843561287c8161252a565b9350602085013561288c8161252a565b925060408501356001600160401b038111156128a6575f80fd5b6128b28782880161267b565b95989497509550505050565b5f80602083850312156128cf575f80fd5b82356001600160401b038111156128e4575f80fd5b6128f08582860161253e565b90969095509350505050565b5f602080830181845280855180835260408601915060408160051b87010192508387015f5b8281101561296657878503603f1901845281518051808752808883018989015e5f878201890152601f01601f1916909501860194509285019290850190600101612921565b5092979650505050505050565b5f805f60608486031215612985575f80fd5b83356129908161252a565b925060208401356129a08161252a565b915060408401356129b0816127da565b809150509250925092565b5f80604083850312156129cc575f80fd5b82356128508161252a565b5f805f80606085870312156129ea575f80fd5b84356129f58161252a565b935060208501356001600160401b03811115612a0f575f80fd5b612a1b8782880161267b565b909450925050604085013565ffffffffffff81168114612a39575f80fd5b939692955090935050565b634e487b7160e01b5f52603260045260245ffd5b5f60208284031215612a68575f80fd5b8135610886816127da565b81835281816020850137505f828201602090810191909152601f909101601f19169091010190565b602081525f610b27602083018486612a73565b5f60208284031215612abe575f80fd5b8151610886816127da565b6001600160a01b038581168252841660208201526060604082018190525f9061184d9083018486612a73565b634e487b7160e01b5f52601160045260245ffd5b5f8085851115612b17575f80fd5b83861115612b23575f80fd5b5050820193919092039150565b634e487b7160e01b5f52604160045260245ffd5b5f808335601e19843603018112612b59575f80fd5b8301803591506001600160401b03821115612b72575f80fd5b6020019150368190038213156110d9575f80fd5b5f81518060208401855e5f93019283525090919050565b828482375f8382015f815261184d8185612b86565b65ffffffffffff818116838216019080821115612bd157612bd1612af5565b5092915050565b65ffffffffffff861681526001600160a01b038581166020830152841660408201526080606082018190525f90612c129083018486612a73565b979650505050505050565b6001600160e01b03198135818116916004851015610ebc5760049490940360031b84901b1690921692915050565b5f6108868284612b86565b63ffffffff828116828216039080821115612bd157612bd1612af556fea2646970667358221220c43ad2149e6d54ef7bd71440700553641feabbdbd60ba28f20b2cce8cb9dbf7b64736f6c63430008190033","source_code":"// SPDX-License-Identifier: BUSL-1.1\npragma solidity ^0.8.24;\n\nimport {AccessManagerUpgradeable} from\n    \"openzeppelin-contracts-upgradeable/contracts/access/manager/AccessManagerUpgradeable.sol\";\n\ncontract QuillAccessManagerUpgradeable is AccessManagerUpgradeable {\n    uint32 public constant ADMIN_ROLE_TIMELOCK = 2 hours;\n    uint32 public constant ADMIN_ROLE_GRANT_TIMELOCK = 30 days;\n\n    uint64 public constant EMERGENCY_RESPONDER_ROLE = 1;\n    uint64 public constant HIGH_PRIORITY_OPS_ROLE = 2;\n    uint64 public constant MEDIUM_PRIORITY_OPS_ROLE = 3;\n    uint64 public constant LOW_PRIORITY_OPS_ROLE = 4;\n\n    uint32 public constant HIGH_PRIORITY_TIMELOCK = 5 minutes;\n    uint32 public constant MEDIUM_PRIORITY_TIMELOCK = 2 days;\n    uint32 public constant LOW_PRIORITY_TIMELOCK = 1 weeks;\n\n    constructor() {\n        _disableInitializers();\n    }\n\n    function initialize(address admin) public initializer {\n        __AccessManager_init(admin);\n    }\n\n    function minSetback() public pure override returns (uint32) {\n        return 0;\n    }\n}\n","creation_status":"success","file_path":"src/Quill/QuillAccessManagerUpgradeable.sol"}