{"file_path":"src/core/dao/DAO.sol","creation_status":"success","source_code":"// SPDX-License-Identifier: AGPL-3.0-or-later\n\npragma solidity ^0.8.8;\n\nimport {ERC165StorageUpgradeable} from \"@openzeppelin/contracts-upgradeable/utils/introspection/ERC165StorageUpgradeable.sol\";\nimport {Initializable} from \"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\";\nimport {UUPSUpgradeable} from \"@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol\";\nimport {SafeERC20Upgradeable} from \"@openzeppelin/contracts-upgradeable/token/ERC20/utils/SafeERC20Upgradeable.sol\";\nimport {IERC20Upgradeable} from \"@openzeppelin/contracts-upgradeable/token/ERC20/IERC20Upgradeable.sol\";\nimport {IERC721ReceiverUpgradeable} from \"@openzeppelin/contracts-upgradeable/token/ERC721/IERC721ReceiverUpgradeable.sol\";\nimport {IERC1155Upgradeable} from \"@openzeppelin/contracts-upgradeable/token/ERC1155/IERC1155Upgradeable.sol\";\nimport {IERC1155ReceiverUpgradeable} from \"@openzeppelin/contracts-upgradeable/token/ERC1155/IERC1155ReceiverUpgradeable.sol\";\nimport {AddressUpgradeable} from \"@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol\";\nimport {IERC1271} from \"@openzeppelin/contracts/interfaces/IERC1271.sol\";\n\nimport {IProtocolVersion} from \"@aragon/osx-commons-contracts/src/utils/versioning/IProtocolVersion.sol\";\nimport {ProtocolVersion} from \"@aragon/osx-commons-contracts/src/utils/versioning/ProtocolVersion.sol\";\nimport {VersionComparisonLib} from \"@aragon/osx-commons-contracts/src/utils/versioning/VersionComparisonLib.sol\";\nimport {hasBit, flipBit} from \"@aragon/osx-commons-contracts/src/utils/math/BitMap.sol\";\nimport {Action} from \"@aragon/osx-commons-contracts/src/executors/Executor.sol\";\nimport {IExecutor} from \"@aragon/osx-commons-contracts/src/executors/IExecutor.sol\";\nimport {IDAO} from \"@aragon/osx-commons-contracts/src/dao/IDAO.sol\";\n\nimport {PermissionManager} from \"../permission/PermissionManager.sol\";\nimport {CallbackHandler} from \"../utils/CallbackHandler.sol\";\nimport {IEIP4824} from \"./IEIP4824.sol\";\n\n/// @title DAO\n/// @author Aragon X - 2021-2024\n/// @notice This contract is the entry point to the Aragon DAO framework and provides our users a simple and easy to use public interface.\n/// @dev Public API of the Aragon DAO framework.\n/// @custom:security-contact sirt@aragon.org\ncontract DAO is\n    IEIP4824,\n    Initializable,\n    IERC1271,\n    ERC165StorageUpgradeable,\n    IDAO,\n    IExecutor,\n    UUPSUpgradeable,\n    ProtocolVersion,\n    PermissionManager,\n    CallbackHandler\n{\n    using SafeERC20Upgradeable for IERC20Upgradeable;\n    using AddressUpgradeable for address;\n    using VersionComparisonLib for uint8[3];\n\n    /// @notice The ID of the permission required to call the `execute` function.\n    bytes32 public constant EXECUTE_PERMISSION_ID = keccak256(\"EXECUTE_PERMISSION\");\n\n    /// @notice The ID of the permission required to call the `_authorizeUpgrade` function.\n    bytes32 public constant UPGRADE_DAO_PERMISSION_ID = keccak256(\"UPGRADE_DAO_PERMISSION\");\n\n    /// @notice The ID of the permission required to call the `setMetadata` function.\n    bytes32 public constant SET_METADATA_PERMISSION_ID = keccak256(\"SET_METADATA_PERMISSION\");\n\n    /// @notice The ID of the permission required to call the `setTrustedForwarder` function.\n    bytes32 public constant SET_TRUSTED_FORWARDER_PERMISSION_ID =\n        keccak256(\"SET_TRUSTED_FORWARDER_PERMISSION\");\n\n    /// @notice The ID of the permission required to call the `registerStandardCallback` function.\n    bytes32 public constant REGISTER_STANDARD_CALLBACK_PERMISSION_ID =\n        keccak256(\"REGISTER_STANDARD_CALLBACK_PERMISSION\");\n\n    /// @notice The ID of the permission required to validate [ERC-1271](https://eips.ethereum.org/EIPS/eip-1271) signatures.\n    bytes32 public constant VALIDATE_SIGNATURE_PERMISSION_ID =\n        keccak256(\"VALIDATE_SIGNATURE_PERMISSION\");\n\n    /// @notice The internal constant storing the maximal action array length.\n    uint256 internal constant MAX_ACTIONS = 256;\n\n    /// @notice The first out of two values to which the `_reentrancyStatus` state variable (used by the `nonReentrant` modifier) can be set indicating that a function was not entered.\n    uint256 private constant _NOT_ENTERED = 1;\n\n    /// @notice The second out of two values to which the `_reentrancyStatus` state variable (used by the `nonReentrant` modifier) can be set indicating that a function was entered.\n    uint256 private constant _ENTERED = 2;\n\n    /// @notice Removed variable that is left here to maintain the storage layout.\n    /// @dev Introduced in v1.0.0. Removed in v1.4.0.\n    /// @custom:oz-renamed-from signatureValidator\n    address private __removed0;\n\n    /// @notice The address of the trusted forwarder verifying meta transactions.\n    /// @dev Added in v1.0.0.\n    address private trustedForwarder;\n\n    /// @notice The [EIP-4824](https://eips.ethereum.org/EIPS/eip-4824) DAO URI.\n    /// @dev Added in v1.0.0.\n    string private _daoURI;\n\n    /// @notice The state variable for the reentrancy guard of the `execute` function.\n    /// @dev Added in v1.3.0. The variable can be of value `_NOT_ENTERED = 1` or `_ENTERED = 2` in usage and is initialized with `_NOT_ENTERED`.\n    uint256 private _reentrancyStatus;\n\n    /// @notice Thrown if a call is reentrant.\n    error ReentrantCall();\n\n    /// @notice Thrown if the action array length is larger than `MAX_ACTIONS`.\n    error TooManyActions();\n\n    /// @notice Thrown if action execution has failed.\n    /// @param index The index of the action in the action array that failed.\n    error ActionFailed(uint256 index);\n\n    /// @notice Thrown if an action has insufficient gas left.\n    error InsufficientGas();\n\n    /// @notice Thrown if the deposit amount is zero.\n    error ZeroAmount();\n\n    /// @notice Thrown if there is a mismatch between the expected and actually deposited amount of native tokens.\n    /// @param expected The expected native token amount.\n    /// @param actual The actual native token amount deposited.\n    error NativeTokenDepositAmountMismatch(uint256 expected, uint256 actual);\n\n    /// @notice Thrown if an upgrade is not supported from a specific protocol version .\n    error ProtocolVersionUpgradeNotSupported(uint8[3] protocolVersion);\n\n    /// @notice Thrown when a function is removed but left to not corrupt the interface ID.\n    error FunctionRemoved();\n\n    /// @notice Thrown when initialize is called after it has already been executed.\n    error AlreadyInitialized();\n\n    /// @notice Emitted when a new DAO URI is set.\n    /// @param daoURI The new URI.\n    event NewURI(string daoURI);\n\n    /// @notice A modifier to protect a function from calling itself, directly or indirectly (reentrancy).\n    /// @dev Currently, this modifier is only applied to the `execute()` function. If this is used multiple times, private `_beforeNonReentrant()` and `_afterNonReentrant()` functions should be created to prevent code duplication.\n    modifier nonReentrant() {\n        if (_reentrancyStatus == _ENTERED) {\n            revert ReentrantCall();\n        }\n        _reentrancyStatus = _ENTERED;\n\n        _;\n\n        _reentrancyStatus = _NOT_ENTERED;\n    }\n\n    /// @notice This ensures that the initialize function cannot be called during the upgrade process.\n    modifier onlyCallAtInitialization() {\n        if (_getInitializedVersion() != 0) {\n            revert AlreadyInitialized();\n        }\n\n        _;\n    }\n\n    /// @notice Disables the initializers on the implementation contract to prevent it from being left uninitialized.\n    /// @custom:oz-upgrades-unsafe-allow constructor\n    constructor() {\n        _disableInitializers();\n    }\n\n    /// @notice Initializes the DAO by\n    /// - setting the reentrancy status variable to `_NOT_ENTERED`\n    /// - registering the [ERC-165](https://eips.ethereum.org/EIPS/eip-165) interface ID\n    /// - setting the trusted forwarder for meta transactions\n    /// - giving the `ROOT_PERMISSION_ID` permission to the initial owner (that should be revoked and transferred to the DAO after setup).\n    /// @dev This method is required to support [ERC-1822](https://eips.ethereum.org/EIPS/eip-1822).\n    /// @param _metadata IPFS hash that points to all the metadata (logo, description, tags, etc.) of a DAO.\n    /// @param _initialOwner The initial owner of the DAO having the `ROOT_PERMISSION_ID` permission.\n    /// @param _trustedForwarder The trusted forwarder responsible for verifying meta transactions.\n    /// @param daoURI_ The DAO URI required to support [ERC-4824](https://eips.ethereum.org/EIPS/eip-4824).\n    function initialize(\n        bytes calldata _metadata,\n        address _initialOwner,\n        address _trustedForwarder,\n        string calldata daoURI_\n    ) external onlyCallAtInitialization reinitializer(3) {\n        _reentrancyStatus = _NOT_ENTERED; // added in v1.3.0\n\n        // In addition to the current interfaceId, also support previous version of the interfaceId.\n        _registerInterface(type(IDAO).interfaceId ^ IExecutor.execute.selector);\n\n        _registerInterface(type(IDAO).interfaceId);\n        _registerInterface(type(IExecutor).interfaceId);\n        _registerInterface(type(IERC1271).interfaceId);\n        _registerInterface(type(IEIP4824).interfaceId);\n        _registerInterface(type(IProtocolVersion).interfaceId); // added in v1.3.0\n        _registerTokenInterfaces();\n\n        _setMetadata(_metadata);\n        _setTrustedForwarder(_trustedForwarder);\n        _setDaoURI(daoURI_);\n        __PermissionManager_init(_initialOwner);\n    }\n\n    /// @notice Initializes the DAO after an upgrade from a previous protocol version.\n    /// @param _previousProtocolVersion The semantic protocol version number of the previous DAO implementation contract this upgrade is transitioning from.\n    /// @param _initData The initialization data to be passed to via `upgradeToAndCall` (see [ERC-1967](https://docs.openzeppelin.com/contracts/4.x/api/proxy#ERC1967Upgrade)).\n    function initializeFrom(\n        uint8[3] calldata _previousProtocolVersion,\n        bytes calldata _initData\n    ) external reinitializer(3) {\n        _initData; // Silences the unused function parameter warning.\n\n        // Check that the contract is not upgrading from a different major release.\n        if (_previousProtocolVersion[0] != 1) {\n            revert ProtocolVersionUpgradeNotSupported(_previousProtocolVersion);\n        }\n\n        // Initialize `_reentrancyStatus` that was added in v1.3.0.\n        // Register Interface `ProtocolVersion` that was added in v1.3.0.\n        if (_previousProtocolVersion.lt([1, 3, 0])) {\n            _reentrancyStatus = _NOT_ENTERED;\n            _registerInterface(type(IProtocolVersion).interfaceId);\n        }\n\n        // Revoke the `SET_SIGNATURE_VALIDATOR_PERMISSION` that was deprecated in v1.4.0.\n        if (_previousProtocolVersion.lt([1, 4, 0])) {\n            _revoke({\n                _where: address(this),\n                _who: address(this),\n                _permissionId: keccak256(\"SET_SIGNATURE_VALIDATOR_PERMISSION\")\n            });\n\n            _registerInterface(type(IDAO).interfaceId);\n            _registerInterface(type(IExecutor).interfaceId);\n        }\n    }\n\n    /// @inheritdoc PermissionManager\n    function isPermissionRestrictedForAnyAddr(\n        bytes32 _permissionId\n    ) internal pure override returns (bool) {\n        return\n            _permissionId == EXECUTE_PERMISSION_ID ||\n            _permissionId == UPGRADE_DAO_PERMISSION_ID ||\n            _permissionId == SET_METADATA_PERMISSION_ID ||\n            _permissionId == SET_TRUSTED_FORWARDER_PERMISSION_ID ||\n            _permissionId == REGISTER_STANDARD_CALLBACK_PERMISSION_ID;\n    }\n\n    /// @notice Internal method authorizing the upgrade of the contract via the [upgradeability mechanism for UUPS proxies](https://docs.openzeppelin.com/contracts/4.x/api/proxy#UUPSUpgradeable) (see [ERC-1822](https://eips.ethereum.org/EIPS/eip-1822)).\n    /// @dev The caller must have the `UPGRADE_DAO_PERMISSION_ID` permission.\n    function _authorizeUpgrade(address) internal virtual override auth(UPGRADE_DAO_PERMISSION_ID) {}\n\n    /// @inheritdoc IDAO\n    function setTrustedForwarder(\n        address _newTrustedForwarder\n    ) external override auth(SET_TRUSTED_FORWARDER_PERMISSION_ID) {\n        _setTrustedForwarder(_newTrustedForwarder);\n    }\n\n    /// @inheritdoc IDAO\n    function getTrustedForwarder() external view virtual override returns (address) {\n        return trustedForwarder;\n    }\n\n    /// @inheritdoc IDAO\n    function hasPermission(\n        address _where,\n        address _who,\n        bytes32 _permissionId,\n        bytes memory _data\n    ) external view override returns (bool) {\n        return isGranted({_where: _where, _who: _who, _permissionId: _permissionId, _data: _data});\n    }\n\n    /// @inheritdoc IDAO\n    function setMetadata(\n        bytes calldata _metadata\n    ) external override auth(SET_METADATA_PERMISSION_ID) {\n        _setMetadata(_metadata);\n    }\n\n    /// @inheritdoc IExecutor\n    function execute(\n        bytes32 _callId,\n        Action[] calldata _actions,\n        uint256 _allowFailureMap\n    )\n        external\n        override\n        nonReentrant\n        auth(EXECUTE_PERMISSION_ID)\n        returns (bytes[] memory execResults, uint256 failureMap)\n    {\n        // Check that the action array length is within bounds.\n        if (_actions.length > MAX_ACTIONS) {\n            revert TooManyActions();\n        }\n\n        execResults = new bytes[](_actions.length);\n\n        uint256 gasBefore;\n        uint256 gasAfter;\n\n        for (uint256 i = 0; i < _actions.length; ) {\n            gasBefore = gasleft();\n\n            (bool success, bytes memory result) = _actions[i].to.call{value: _actions[i].value}(\n                _actions[i].data\n            );\n            gasAfter = gasleft();\n\n            // Check if failure is allowed\n            if (!hasBit(_allowFailureMap, uint8(i))) {\n                // Check if the call failed.\n                if (!success) {\n                    revert ActionFailed(i);\n                }\n            } else {\n                // Check if the call failed.\n                if (!success) {\n                    // Make sure that the action call did not fail because 63/64 of `gasleft()` was insufficient to execute the external call `.to.call` (see [ERC-150](https://eips.ethereum.org/EIPS/eip-150)).\n                    // In specific scenarios, i.e. proposal execution where the last action in the action array is allowed to fail, the account calling `execute` could force-fail this action by setting a gas limit\n                    // where 63/64 is insufficient causing the `.to.call` to fail, but where the remaining 1/64 gas are sufficient to successfully finish the `execute` call.\n                    if (gasAfter < gasBefore / 64) {\n                        revert InsufficientGas();\n                    }\n\n                    // Store that this action failed.\n                    failureMap = flipBit(failureMap, uint8(i));\n                }\n            }\n\n            execResults[i] = result;\n\n            unchecked {\n                ++i;\n            }\n        }\n\n        emit Executed({\n            actor: msg.sender,\n            callId: _callId,\n            actions: _actions,\n            allowFailureMap: _allowFailureMap,\n            failureMap: failureMap,\n            execResults: execResults\n        });\n    }\n\n    /// @inheritdoc IDAO\n    function deposit(\n        address _token,\n        uint256 _amount,\n        string calldata _reference\n    ) external payable override {\n        if (_amount == 0) revert ZeroAmount();\n\n        if (_token == address(0)) {\n            if (msg.value != _amount)\n                revert NativeTokenDepositAmountMismatch({expected: _amount, actual: msg.value});\n        } else {\n            if (msg.value != 0)\n                revert NativeTokenDepositAmountMismatch({expected: 0, actual: msg.value});\n\n            IERC20Upgradeable(_token).safeTransferFrom(msg.sender, address(this), _amount);\n        }\n\n        emit Deposited(msg.sender, _token, _amount, _reference);\n    }\n\n    /// @inheritdoc IDAO\n    function setSignatureValidator(address) external pure override {\n        revert FunctionRemoved();\n    }\n\n    /// @inheritdoc IDAO\n    /// @dev Relays the validation logic determining who is allowed to sign on behalf of the DAO to its permission manager.\n    /// Caller specific bypassing can be set direct granting (i.e., `grant({_where: dao, _who: specificErc1271Caller, _permissionId: VALIDATE_SIGNATURE_PERMISSION_ID})`).\n    /// Caller specific signature validation logic can be set by granting with a `PermissionCondition` (i.e., `grantWithCondition({_where: dao, _who: specificErc1271Caller, _permissionId: VALIDATE_SIGNATURE_PERMISSION_ID, _condition: yourConditionImplementation})`)\n    /// Generic signature validation logic can be set for all calling contracts by granting with a `PermissionCondition` to `PermissionManager.ANY_ADDR()` (i.e., `grantWithCondition({_where: dao, _who: PermissionManager.ANY_ADDR(), _permissionId: VALIDATE_SIGNATURE_PERMISSION_ID, _condition: yourConditionImplementation})`).\n    function isValidSignature(\n        bytes32 _hash,\n        bytes memory _signature\n    ) external view override(IDAO, IERC1271) returns (bytes4) {\n        if (\n            isGranted({\n                _where: address(this),\n                _who: msg.sender,\n                _permissionId: VALIDATE_SIGNATURE_PERMISSION_ID,\n                _data: abi.encode(_hash, _signature)\n            })\n        ) {\n            return 0x1626ba7e; // `type(IERC1271).interfaceId` = bytes4(keccak256(\"isValidSignature(bytes32,bytes)\")`\n        }\n        return 0xffffffff; // `bytes4(uint32(type(uint32).max-1))`\n    }\n\n    /// @notice Emits the `NativeTokenDeposited` event to track native token deposits that weren't made via the deposit method.\n    /// @dev This call is bound by the gas limitations for `send`/`transfer` calls introduced by [ERC-2929](https://eips.ethereum.org/EIPS/eip-2929).\n    /// Gas cost increases in future hard forks might break this function. As an alternative, [ERC-2930](https://eips.ethereum.org/EIPS/eip-2930)-type transactions using access lists can be employed.\n    receive() external payable {\n        emit NativeTokenDeposited(msg.sender, msg.value);\n    }\n\n    /// @notice Fallback to handle future versions of the [ERC-165](https://eips.ethereum.org/EIPS/eip-165) standard.\n    /// @param _input An alias being equivalent to `msg.data`. This feature of the fallback function was introduced with the [solidity compiler version 0.7.6](https://github.com/ethereum/solidity/releases/tag/v0.7.6)\n    /// @return The magic number registered for the function selector triggering the fallback.\n    fallback(bytes calldata _input) external returns (bytes memory) {\n        bytes4 magicNumber = _handleCallback(msg.sig, _input);\n        return abi.encode(magicNumber);\n    }\n\n    /// @notice Emits the MetadataSet event if new metadata is set.\n    /// @param _metadata Hash of the IPFS metadata object.\n    function _setMetadata(bytes calldata _metadata) internal {\n        emit MetadataSet(_metadata);\n    }\n\n    /// @notice Sets the trusted forwarder on the DAO and emits the associated event.\n    /// @param _trustedForwarder The trusted forwarder address.\n    function _setTrustedForwarder(address _trustedForwarder) internal {\n        trustedForwarder = _trustedForwarder;\n\n        emit TrustedForwarderSet(_trustedForwarder);\n    }\n\n    /// @notice Registers the [ERC-721](https://eips.ethereum.org/EIPS/eip-721) and [ERC-1155](https://eips.ethereum.org/EIPS/eip-1155) interfaces and callbacks.\n    function _registerTokenInterfaces() private {\n        _registerInterface(type(IERC721ReceiverUpgradeable).interfaceId);\n        _registerInterface(type(IERC1155ReceiverUpgradeable).interfaceId);\n\n        _registerCallback(\n            IERC721ReceiverUpgradeable.onERC721Received.selector,\n            IERC721ReceiverUpgradeable.onERC721Received.selector\n        );\n        _registerCallback(\n            IERC1155ReceiverUpgradeable.onERC1155Received.selector,\n            IERC1155ReceiverUpgradeable.onERC1155Received.selector\n        );\n        _registerCallback(\n            IERC1155ReceiverUpgradeable.onERC1155BatchReceived.selector,\n            IERC1155ReceiverUpgradeable.onERC1155BatchReceived.selector\n        );\n    }\n\n    /// @inheritdoc IDAO\n    function registerStandardCallback(\n        bytes4 _interfaceId,\n        bytes4 _callbackSelector,\n        bytes4 _magicNumber\n    ) external override auth(REGISTER_STANDARD_CALLBACK_PERMISSION_ID) {\n        _registerInterface(_interfaceId);\n        _registerCallback(_callbackSelector, _magicNumber);\n        emit StandardCallbackRegistered(_interfaceId, _callbackSelector, _magicNumber);\n    }\n\n    /// @inheritdoc IEIP4824\n    function daoURI() external view returns (string memory) {\n        return _daoURI;\n    }\n\n    /// @notice Updates the set DAO URI to a new value.\n    /// @param newDaoURI The new DAO URI to be set.\n    function setDaoURI(string calldata newDaoURI) external auth(SET_METADATA_PERMISSION_ID) {\n        _setDaoURI(newDaoURI);\n    }\n\n    /// @notice Sets the new [ERC-4824](https://eips.ethereum.org/EIPS/eip-4824) DAO URI and emits the associated event.\n    /// @param daoURI_ The new DAO URI.\n    function _setDaoURI(string calldata daoURI_) internal {\n        _daoURI = daoURI_;\n\n        emit NewURI(daoURI_);\n    }\n\n    /// @notice This empty reserved space is put in place to allow future versions to add new variables without shifting down storage in the inheritance chain (see [OpenZeppelin's guide about storage gaps](https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps)).\n    uint256[46] private __gap;\n}\n","deployed_bytecode":"0x6080604052600436106101dc5760003560e01c806352d1902d11610102578063d68bad2c11610095578063e978afe511610064578063e978afe5146106d0578063eafb8b06146106f0578063ee57e36f14610710578063fdef9106146107305761021b565b8063d68bad2c1461063c578063d96054c41461065c578063da7422281461067c578063e306bee71461069c5761021b565b8063c4a50145116100d1578063c4a50145146105a5578063c71bf324146105c5578063c9dbc2a4146105f3578063ce1b815f146106135761021b565b806352d1902d146105275780637034731b1461053c578063829331a11461055e578063bfe07da6146105925761021b565b80632675fdd01161017a5780633e2ab0d9116101495780633e2ab0d9146104a057806342d8e99e146104c05780634ec7ac23146104e05780634f1ef286146105145761021b565b80632675fdd01461040a57806326875b1f1461042a5780632ae9c6001461045e5780633659cfe6146104805761021b565b80631080f99b116101b65780631080f99b1461035b5780631626ba7e1461037d57806322844d04146103b657806324b4d73f146103d65761021b565b806301ffc9a7146102b05780630729d054146102e557806309e56b14146103275761021b565b3661021b57604080513381523460208201527f62c2c8e34665db7c56b2cabd7f5fb9702ccd352ffa8150147e450797e9f8e8f3910160405180910390a1005b34801561022757600080fd5b506000366060600061027b6000356001600160e01b03191685858080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061075092505050565b604080516001600160e01b03198316602082015291925001604051602081830303815290604052915050915050805190602001f35b3480156102bc57600080fd5b506102d06102cb36600461307f565b610827565b60405190151581526020015b60405180910390f35b3480156102f157600080fd5b506103197fbf04b4486c9663d805744005c3da000eda93de6e3308a4a7a812eb565327b78d81565b6040519081526020016102dc565b34801561033357600080fd5b506103197f815fe80e4b37c8582a3b773d1d7071f983eacfd56b5965db654f3087c25ada3381565b34801561036757600080fd5b5061037b6103763660046130e3565b61087c565b005b34801561038957600080fd5b5061039d6103983660046131c8565b6108b5565b6040516001600160e01b031990911681526020016102dc565b3480156103c257600080fd5b5061037b6103d1366004613224565b610940565b3480156103e257600080fd5b506103197f1f53edd44352e5d15bad2b29233baa93bcd595e09457780bc7c5445bbbe751cc81565b34801561041657600080fd5b506102d06104253660046132ac565b610a5c565b34801561043657600080fd5b506103197ffaf505be9907aa6951c2ebe5b0312f4980e14f21912ed355372103cc8bd683bc81565b34801561046a57600080fd5b50610473610c56565b6040516102dc9190613318565b34801561048c57600080fd5b5061037b61049b36600461334c565b610c80565b3480156104ac57600080fd5b5061037b6104bb36600461334c565b610e1d565b3480156104cc57600080fd5b5061037b6104db366004613369565b610e4f565b3480156104ec57600080fd5b506103197f968c17ebf04aa1b7544168e69314cdab6b69ba813bb6080d49c0c40a65560f5881565b61037b6105223660046133c1565b6110d2565b34801561053357600080fd5b50610319611260565b34801561054857600080fd5b50610551611325565b6040516102dc919061344b565b34801561056a57600080fd5b506103197f06d294bc8cbad2e393408b20dd019a772661f60b8d633e56761157cb1ec85f8c81565b61037b6105a036600461345e565b6113b8565b3480156105b157600080fd5b5061037b6105c03660046134ba565b6114f2565b3480156105d157600080fd5b506105e56105e03660046134fd565b61159c565b6040516102dc9291906135d7565b3480156105ff57600080fd5b5061037b61060e3660046135f9565b6118c2565b34801561061f57600080fd5b5061012e546040516001600160a01b0390911681526020016102dc565b34801561064857600080fd5b5061037b61065736600461364c565b6118f8565b34801561066857600080fd5b5061037b61067736600461364c565b611933565b34801561068857600080fd5b5061037b61069736600461334c565b611968565b3480156106a857600080fd5b506103197f4707e94b25cfce1a7c363508fbb838c35864388ad77284b248282b9746982b9b81565b3480156106dc57600080fd5b5061037b6106eb36600461368d565b61199b565b3480156106fc57600080fd5b5061037b61070b366004613702565b611ae7565b34801561071c57600080fd5b5061037b61072b3660046130e3565b611d40565b34801561073c57600080fd5b506102d061074b3660046132ac565b611d74565b6001600160e01b0319808316600090815260fb6020526040812054909160e09190911b9081166107c5576040517f4aa318c30000000000000000000000000000000000000000000000000000000081526001600160e01b03198086166004830152821660248201526044015b60405180910390fd5b837bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167f4792cb6e46e49876374bea490ba23274bacea6b84c216a64f47abab54027589b338560405161081692919061379b565b60405180910390a290505b92915050565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000006001600160e01b0319831614806108215750506001600160e01b03191660009081526033602052604090205460ff1690565b7f4707e94b25cfce1a7c363508fbb838c35864388ad77284b248282b9746982b9b6108a681611d8b565b6108b08383611e13565b505050565b600061090430337f968c17ebf04aa1b7544168e69314cdab6b69ba813bb6080d49c0c40a65560f5886866040516020016108f09291906137bd565b604051602081830303815290604052610a5c565b1561093057507f1626ba7e00000000000000000000000000000000000000000000000000000000610821565b506001600160e01b031992915050565b7f815fe80e4b37c8582a3b773d1d7071f983eacfd56b5965db654f3087c25ada3361096a81611d8b565b60005b82811015610a55576000848483818110610989576109896137d6565b90506060020180360381019061099f91906137fb565b90506000815160028111156109b6576109b6613864565b036109d3576109ce8682602001518360400151611e5f565b610a4c565b6001815160028111156109e8576109e8613864565b03610a00576109ce868260200151836040015161202b565b600281516002811115610a1557610a15613864565b03610a4c576040517fd4d3bef700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5060010161096d565b5050505050565b60008060c96000610ace888888604051692822a926a4a9a9a4a7a760b11b60208201526bffffffffffffffffffffffff19606084811b8216602a84015285901b16603e820152605281018290526000906072016040516020818303038152906040528051906020012090509392505050565b81526020810191909152604001600020546001600160a01b031690506001198101610afd576001915050610c4e565b6001600160a01b03811615610b2157610b19818787878761211f565b915050610c4e565b5060408051692822a926a4a9a9a4a7a760b11b6020808301919091526bffffffffffffffffffffffff19602a8301819052606089901b16603e83015260528083018790528351808403909101815260729092018352815191810191909120600090815260c990915220546001600160a01b03166001198101610ba7576001915050610c4e565b6001600160a01b03811615610bc357610b19818787878761211f565b5060408051692822a926a4a9a9a4a7a760b11b6020808301919091526bffffffffffffffffffffffff19606088901b8116602a840152603e83015260528083018790528351808403909101815260729092018352815191810191909120600090815260c990915220546001600160a01b03168015610c4857610b19818787878761211f565b50600090505b949350505050565b610c5e613044565b5060408051606081018252600181526004602082015260009181019190915290565b6001600160a01b037f00000000000000000000000058c1f7bc62bb63fb137bc8f6d8ea6321a0501d29163003610d1e5760405162461bcd60e51b815260206004820152602c60248201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060448201527f64656c656761746563616c6c000000000000000000000000000000000000000060648201526084016107bc565b7f00000000000000000000000058c1f7bc62bb63fb137bc8f6d8ea6321a0501d296001600160a01b0316610d797f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b6001600160a01b031614610df55760405162461bcd60e51b815260206004820152602c60248201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060448201527f6163746976652070726f7879000000000000000000000000000000000000000060648201526084016107bc565b610dfe816121c9565b60408051600080825260208201909252610e1a918391906121f3565b50565b6040517fb2728e9900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600054600390610100900460ff16158015610e71575060005460ff8083169116105b610ee35760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a656400000000000000000000000000000000000060648201526084016107bc565b6000805461ffff191660ff831617610100179055610f04602085018561388b565b60ff16600114610f4257836040517f84833d670000000000000000000000000000000000000000000000000000000081526004016107bc91906138a6565b6040805160608082018352600182526003602083018190526000838501528351808301909452610f8b939188919083908390808284376000920191909152509192915050612393565b15610fbf57600161013055610fbf7f2ae9c6000000000000000000000000000000000000000000000000000000000061242e565b6040805160608082018352600182526004602083015260008284015282518082019093526110089290879060039083908390808284376000920191909152509192915050612393565b1561108a5761103830307f0dcbfb19b09fb8ff4e9af583d4b8e9c8127cc1b26529b4d96dd3b7e77808837261202b565b6110617f549ea75a0000000000000000000000000000000000000000000000000000000061242e565b61108a7fc71bf3240000000000000000000000000000000000000000000000000000000061242e565b6000805461ff001916905560405160ff821681527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498906020015b60405180910390a150505050565b6001600160a01b037f00000000000000000000000058c1f7bc62bb63fb137bc8f6d8ea6321a0501d291630036111705760405162461bcd60e51b815260206004820152602c60248201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060448201527f64656c656761746563616c6c000000000000000000000000000000000000000060648201526084016107bc565b7f00000000000000000000000058c1f7bc62bb63fb137bc8f6d8ea6321a0501d296001600160a01b03166111cb7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b6001600160a01b0316146112475760405162461bcd60e51b815260206004820152602c60248201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060448201527f6163746976652070726f7879000000000000000000000000000000000000000060648201526084016107bc565b611250826121c9565b61125c828260016121f3565b5050565b6000306001600160a01b037f00000000000000000000000058c1f7bc62bb63fb137bc8f6d8ea6321a0501d2916146113005760405162461bcd60e51b815260206004820152603860248201527f555550535570677261646561626c653a206d757374206e6f742062652063616c60448201527f6c6564207468726f7567682064656c656761746563616c6c000000000000000060648201526084016107bc565b507f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc90565b606061012f8054611335906138d9565b80601f0160208091040260200160405190810160405280929190818152602001828054611361906138d9565b80156113ae5780601f10611383576101008083540402835291602001916113ae565b820191906000526020600020905b81548152906001019060200180831161139157829003601f168201915b5050505050905090565b826000036113f2576040517f1f2a200500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b03841661144757823414611442576040517f1abd5610000000000000000000000000000000000000000000000000000000008152600481018490523460248201526044016107bc565b61149d565b3415611488576040517f1abd5610000000000000000000000000000000000000000000000000000000008152600060048201523460248201526044016107bc565b61149d6001600160a01b0385163330866124cb565b836001600160a01b0316336001600160a01b03167f2bc500cf071be2d1c1458ed6ff484cd4db4345ada8943dee7ff29e7af3558f768585856040516114e49392919061393e565b60405180910390a350505050565b7ffaf505be9907aa6951c2ebe5b0312f4980e14f21912ed355372103cc8bd683bc61151c81611d8b565b6115258461242e565b6001600160e01b03198316600090815260fb60205260409020805463ffffffff191660e084901c179055604080516001600160e01b0319808716825280861660208301528416918101919091527ffc72fd547553f7a663e0048e590afc9c47b56a4242e960f31cf4c62e23d308b9906060016110c4565b60606000600261013054036115dd576040517f37ed32e800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6002610130557fbf04b4486c9663d805744005c3da000eda93de6e3308a4a7a812eb565327b78d61160d81611d8b565b610100851115611649576040517f11c763d600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8467ffffffffffffffff81111561166257611662613125565b60405190808252806020026020018201604052801561169557816020015b60608152602001906001900390816116805790505b50925060008060005b87811015611862575a92506000808a8a848181106116be576116be6137d6565b90506020028101906116d09190613958565b6116de90602081019061334c565b6001600160a01b03168b8b858181106116f9576116f96137d6565b905060200281019061170b9190613958565b602001358c8c86818110611721576117216137d6565b90506020028101906117339190613958565b611741906040810190613978565b60405161174f9291906139bf565b60006040518083038185875af1925050503d806000811461178c576040519150601f19603f3d011682016040523d82523d6000602084013e611791565b606091505b50915091505a9350600160ff84161b89166117e557816117e0576040517fa6a7dbbd000000000000000000000000000000000000000000000000000000008152600481018490526024016107bc565b61183a565b8161183a576117f56040866139cf565b84101561182e576040517f1c26714c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600160ff84161b871896505b8088848151811061184d5761184d6137d6565b6020908102919091010152505060010161169e565b50336001600160a01b03167fd4e57c2049f004fb297ef78591cd409503ceb6b2c722d7ffed032fc99e5f3b588a8a8a8a898b6040516118a6969594939291906139f1565b60405180910390a2505060016101305550909590945092505050565b7f815fe80e4b37c8582a3b773d1d7071f983eacfd56b5965db654f3087c25ada336118ec81611d8b565b610a5585858585612553565b7f815fe80e4b37c8582a3b773d1d7071f983eacfd56b5965db654f3087c25ada3361192281611d8b565b61192d848484611e5f565b50505050565b7f815fe80e4b37c8582a3b773d1d7071f983eacfd56b5965db654f3087c25ada3361195d81611d8b565b61192d84848461202b565b7f06d294bc8cbad2e393408b20dd019a772661f60b8d633e56761157cb1ec85f8c61199281611d8b565b61125c826128c9565b7f815fe80e4b37c8582a3b773d1d7071f983eacfd56b5965db654f3087c25ada336119c581611d8b565b60005b8281101561192d5760008484838181106119e4576119e46137d6565b905060a002018036038101906119fa9190613b1d565b9050600081516002811115611a1157611a11613864565b03611a775760608101516001600160a01b031615611a5b576040517fd4d3bef700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b611a72816020015182604001518360800151611e5f565b611ade565b600181516002811115611a8c57611a8c613864565b03611aa857611a7281602001518260400151836080015161202b565b600281516002811115611abd57611abd613864565b03611ade57611ade8160200151826040015183608001518460600151612553565b506001016119c8565b60005460ff1615611b24576040517f0dc149f000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600054600390610100900460ff16158015611b46575060005460ff8083169116105b611bb85760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a656400000000000000000000000000000000000060648201526084016107bc565b6000805461ffff191660ff831617610100179055600161013055611bfb7f9385547e0000000000000000000000000000000000000000000000000000000061242e565b611c247f549ea75a0000000000000000000000000000000000000000000000000000000061242e565b611c4d7fc71bf3240000000000000000000000000000000000000000000000000000000061242e565b611c767f1626ba7e0000000000000000000000000000000000000000000000000000000061242e565b611c9f7f7034731b0000000000000000000000000000000000000000000000000000000061242e565b611cc87f2ae9c6000000000000000000000000000000000000000000000000000000000061242e565b611cd061292b565b611cda8787612a38565b611ce3846128c9565b611ced8383611e13565b611cf685612a69565b6000805461ff001916905560405160ff821681527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a150505050505050565b7f4707e94b25cfce1a7c363508fbb838c35864388ad77284b248282b9746982b9b611d6a81611d8b565b6108b08383612a38565b6000611d8285858585610a5c565b95945050505050565b611dce3033836000368080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250610a5c92505050565b610e1a576040517f1e09743f000000000000000000000000000000000000000000000000000000008152306004820152336024820152604481018290526064016107bc565b61012f611e21828483613bfa565b507fe9b617ecb5f63f6a9ccd8d4d5fa0d7b2ef9b17ce3f48e6b135808d6a40e677428282604051611e53929190613cba565b60405180910390a15050565b7fffffffffffffffffffffffff00000000000000000000000000000000000000016001600160a01b03841601611ea8576040516324159e5b60e01b815260040160405180910390fd5b7fffffffffffffffffffffffff00000000000000000000000000000000000000016001600160a01b03831601611f28577f815fe80e4b37c8582a3b773d1d7071f983eacfd56b5965db654f3087c25ada33811480611f0a5750611f0a81612aef565b15611f28576040516324159e5b60e01b815260040160405180910390fd5b60408051692822a926a4a9a9a4a7a760b11b6020808301919091526bffffffffffffffffffffffff19606086811b8216602a85015287901b16603e83015260528083018590528351808403909101815260729092019092528051910120600090600081815260c960205260409020549091506001600160a01b031680610a5557600082815260c96020908152604091829020805473ffffffffffffffffffffffffffffffffffffffff1916600290811790915582516001600160a01b0389811682529281019190915290861691339186917f0f579ad49235a8c1fd9041427e7067b1eb10926bbed380bf6fabc73e0e807644910160405180910390a45050505050565b60408051692822a926a4a9a9a4a7a760b11b6020808301919091526bffffffffffffffffffffffff19606086811b8216602a85015287901b16603e83015260528083018590528351808403909101815260729092019092528051910120600090600081815260c960205260409020549091506001600160a01b03161561192d57600081815260c96020908152604091829020805473ffffffffffffffffffffffffffffffffffffffff1916905590516001600160a01b038681168252851691339185917f3ca48185ec3f6e47e24db18b13f1c65b1ce05da1659f9c1c4fe717dda5f67524910160405180910390a450505050565b6040517f2675fdd00000000000000000000000000000000000000000000000000000000081526000906001600160a01b03871690632675fdd09061216d908890889088908890600401613cce565b602060405180830381865afa9250505080156121a6575060408051601f3d908101601f191682019092526121a391810190613d00565b60015b156121bd5780156121bb576001915050611d82565b505b50600095945050505050565b7f1f53edd44352e5d15bad2b29233baa93bcd595e09457780bc7c5445bbbe751cc61125c81611d8b565b7f4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd91435460ff1615612226576108b083612bbe565b826001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa925050508015612280575060408051601f3d908101601f1916820190925261227d91810190613d22565b60015b6122f25760405162461bcd60e51b815260206004820152602e60248201527f45524331393637557067726164653a206e657720696d706c656d656e7461746960448201527f6f6e206973206e6f74205555505300000000000000000000000000000000000060648201526084016107bc565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc81146123875760405162461bcd60e51b815260206004820152602960248201527f45524331393637557067726164653a20756e737570706f727465642070726f7860448201527f6961626c6555554944000000000000000000000000000000000000000000000060648201526084016107bc565b506108b0838383612c89565b8051825160009160ff908116911610156123af57506001610821565b8151835160ff918216911611156123c857506000610821565b6020808301519084015160ff918216911610156123e757506001610821565b6020808301519084015160ff9182169116111561240657506000610821565b6040808301519084015160ff9182169116101561242557506001610821565b50600092915050565b6001600160e01b031980821690036124885760405162461bcd60e51b815260206004820152601c60248201527f4552433136353a20696e76616c696420696e746572666163652069640000000060448201526064016107bc565b6001600160e01b031916600090815260336020526040902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055565b604080516001600160a01b0385811660248301528416604482015260648082018490528251808303909101815260849091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f23b872dd0000000000000000000000000000000000000000000000000000000017905261192d908590612cae565b806001600160a01b0381163b6125a0576040517f48359af60000000000000000000000000000000000000000000000000000000081526001600160a01b03831660048201526024016107bc565b6040517f01ffc9a70000000000000000000000000000000000000000000000000000000081527f2675fdd00000000000000000000000000000000000000000000000000000000060048201526001600160a01b038216906301ffc9a790602401602060405180830381865afa15801561261d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906126419190613d00565b612682576040517fdbb048620000000000000000000000000000000000000000000000000000000081526001600160a01b03831660048201526024016107bc565b6001600160a01b038581161480156126a257506001600160a01b03848116145b156126d9576040517f85f1ba9900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b0385811614806126f857506001600160a01b03848116145b1561274d577f815fe80e4b37c8582a3b773d1d7071f983eacfd56b5965db654f3087c25ada3383148061272f575061272f83612aef565b1561274d576040516324159e5b60e01b815260040160405180910390fd5b60408051692822a926a4a9a9a4a7a760b11b6020808301919091526bffffffffffffffffffffffff19606088811b8216602a85015289901b16603e83015260528083018790528351808403909101815260729092019092528051910120600090600081815260c960205260409020549091506001600160a01b03168061284b57600082815260c96020908152604091829020805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0387811691821790925583518b8316815292830152881691339188917f0f579ad49235a8c1fd9041427e7067b1eb10926bbed380bf6fabc73e0e807644910160405180910390a46128c0565b826001600160a01b0316816001600160a01b0316146128c0576040517f0b98789e0000000000000000000000000000000000000000000000000000000081526001600160a01b03808916600483015280881660248301526044820187905280831660648301528416608482015260a4016107bc565b50505050505050565b61012e805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0383169081179091556040519081527fd91237492a9e30cd2faf361fc103998a382ff0ec2b1b07dc1cbebb76ae2f1ea29060200160405180910390a150565b6129547f150b7a020000000000000000000000000000000000000000000000000000000061242e565b61297d7f4e2312e00000000000000000000000000000000000000000000000000000000061242e565b60fb6020527f5a08f87af82de422c581ce019b2e54a9c17372e9cba575ae0470ba2482d63686805463ffffffff1990811663150b7a02179091557fe1cfe341950d56d8854f782066100d5ae1d5930cdb4949b973e554a343efc6c38054821663f23a6e611790557fbc197c81000000000000000000000000000000000000000000000000000000006000527f08ba3617671847c1c169da222a5bc01cfdefcc3c4f1e5525214a474479c89123805490911663bc197c81179055565b7fbb39ebb37e60fb5d606ffdb749d2336e56b88e6c88c4bd6513b308f643186eed8282604051611e53929190613cba565b600054610100900460ff16612ae65760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e6700000000000000000000000000000000000000000060648201526084016107bc565b610e1a81612d96565b60007fbf04b4486c9663d805744005c3da000eda93de6e3308a4a7a812eb565327b78d821480612b3e57507f1f53edd44352e5d15bad2b29233baa93bcd595e09457780bc7c5445bbbe751cc82145b80612b6857507f4707e94b25cfce1a7c363508fbb838c35864388ad77284b248282b9746982b9b82145b80612b9257507f06d294bc8cbad2e393408b20dd019a772661f60b8d633e56761157cb1ec85f8c82145b806108215750507ffaf505be9907aa6951c2ebe5b0312f4980e14f21912ed355372103cc8bd683bc1490565b6001600160a01b0381163b612c3b5760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201527f6f74206120636f6e74726163740000000000000000000000000000000000000060648201526084016107bc565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0392909216919091179055565b612c9283612dc1565b600082511180612c9f5750805b156108b05761192d8383612e01565b6000612d03826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316612e2d9092919063ffffffff16565b9050805160001480612d24575080806020019051810190612d249190613d00565b6108b05760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f7420737563636565640000000000000000000000000000000000000000000060648201526084016107bc565b610e1a30827f815fe80e4b37c8582a3b773d1d7071f983eacfd56b5965db654f3087c25ada33611e5f565b612dca81612bbe565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b6060612e268383604051806060016040528060278152602001613d4e60279139612e3c565b9392505050565b6060610c4e8484600085612eb4565b6060600080856001600160a01b031685604051612e599190613d3b565b600060405180830381855af49150503d8060008114612e94576040519150601f19603f3d011682016040523d82523d6000602084013e612e99565b606091505b5091509150612eaa86838387612fa6565b9695505050505050565b606082471015612f2c5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c000000000000000000000000000000000000000000000000000060648201526084016107bc565b600080866001600160a01b03168587604051612f489190613d3b565b60006040518083038185875af1925050503d8060008114612f85576040519150601f19603f3d011682016040523d82523d6000602084013e612f8a565b606091505b5091509150612f9b87838387612fa6565b979650505050505050565b6060831561301557825160000361300e576001600160a01b0385163b61300e5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016107bc565b5081610c4e565b610c4e838381511561302a5781518083602001fd5b8060405162461bcd60e51b81526004016107bc919061344b565b60405180606001604052806003906020820280368337509192915050565b80356001600160e01b03198116811461307a57600080fd5b919050565b60006020828403121561309157600080fd5b612e2682613062565b60008083601f8401126130ac57600080fd5b50813567ffffffffffffffff8111156130c457600080fd5b6020830191508360208285010111156130dc57600080fd5b9250929050565b600080602083850312156130f657600080fd5b823567ffffffffffffffff81111561310d57600080fd5b6131198582860161309a565b90969095509350505050565b634e487b7160e01b600052604160045260246000fd5b600082601f83011261314c57600080fd5b813567ffffffffffffffff8082111561316757613167613125565b604051601f8301601f19908116603f0116810190828211818310171561318f5761318f613125565b816040528381528660208588010111156131a857600080fd5b836020870160208301376000602085830101528094505050505092915050565b600080604083850312156131db57600080fd5b82359150602083013567ffffffffffffffff8111156131f957600080fd5b6132058582860161313b565b9150509250929050565b6001600160a01b0381168114610e1a57600080fd5b60008060006040848603121561323957600080fd5b83356132448161320f565b9250602084013567ffffffffffffffff8082111561326157600080fd5b818601915086601f83011261327557600080fd5b81358181111561328457600080fd5b87602060608302850101111561329957600080fd5b6020830194508093505050509250925092565b600080600080608085870312156132c257600080fd5b84356132cd8161320f565b935060208501356132dd8161320f565b925060408501359150606085013567ffffffffffffffff81111561330057600080fd5b61330c8782880161313b565b91505092959194509250565b60608101818360005b600381101561334357815160ff16835260209283019290910190600101613321565b50505092915050565b60006020828403121561335e57600080fd5b8135612e268161320f565b60008060006080848603121561337e57600080fd5b606084018581111561338f57600080fd5b8493503567ffffffffffffffff8111156133a857600080fd5b6133b48682870161309a565b9497909650939450505050565b600080604083850312156133d457600080fd5b82356133df8161320f565b9150602083013567ffffffffffffffff8111156131f957600080fd5b60005b838110156134165781810151838201526020016133fe565b50506000910152565b600081518084526134378160208601602086016133fb565b601f01601f19169290920160200192915050565b602081526000612e26602083018461341f565b6000806000806060858703121561347457600080fd5b843561347f8161320f565b935060208501359250604085013567ffffffffffffffff8111156134a257600080fd5b6134ae8782880161309a565b95989497509550505050565b6000806000606084860312156134cf57600080fd5b6134d884613062565b92506134e660208501613062565b91506134f460408501613062565b90509250925092565b6000806000806060858703121561351357600080fd5b84359350602085013567ffffffffffffffff8082111561353257600080fd5b818701915087601f83011261354657600080fd5b81358181111561355557600080fd5b8860208260051b850101111561356a57600080fd5b95986020929092019750949560400135945092505050565b600081518084526020808501808196508360051b8101915082860160005b858110156135ca5782840389526135b884835161341f565b988501989350908401906001016135a0565b5091979650505050505050565b6040815260006135ea6040830185613582565b90508260208301529392505050565b6000806000806080858703121561360f57600080fd5b843561361a8161320f565b9350602085013561362a8161320f565b92506040850135915060608501356136418161320f565b939692955090935050565b60008060006060848603121561366157600080fd5b833561366c8161320f565b9250602084013561367c8161320f565b929592945050506040919091013590565b600080602083850312156136a057600080fd5b823567ffffffffffffffff808211156136b857600080fd5b818501915085601f8301126136cc57600080fd5b8135818111156136db57600080fd5b86602060a0830285010111156136f057600080fd5b60209290920196919550909350505050565b6000806000806000806080878903121561371b57600080fd5b863567ffffffffffffffff8082111561373357600080fd5b61373f8a838b0161309a565b9098509650602089013591506137548261320f565b9094506040880135906137668261320f565b9093506060880135908082111561377c57600080fd5b5061378989828a0161309a565b979a9699509497509295939492505050565b6001600160a01b0383168152604060208201526000610c4e604083018461341f565b828152604060208201526000610c4e604083018461341f565b634e487b7160e01b600052603260045260246000fd5b80356003811061307a57600080fd5b60006060828403121561380d57600080fd5b6040516060810181811067ffffffffffffffff8211171561383057613830613125565b60405261383c836137ec565b8152602083013561384c8161320f565b60208201526040928301359281019290925250919050565b634e487b7160e01b600052602160045260246000fd5b803560ff8116811461307a57600080fd5b60006020828403121561389d57600080fd5b612e268261387a565b60608101818360005b60038110156133435760ff6138c38361387a565b16835260209283019291909101906001016138af565b600181811c908216806138ed57607f821691505b60208210810361390d57634e487b7160e01b600052602260045260246000fd5b50919050565b818352818160208501375060006020828401015260006020601f19601f840116840101905092915050565b838152604060208201526000611d82604083018486613913565b60008235605e1983360301811261396e57600080fd5b9190910192915050565b6000808335601e1984360301811261398f57600080fd5b83018035915067ffffffffffffffff8211156139aa57600080fd5b6020019150368190038213156130dc57600080fd5b8183823760009101908152919050565b6000826139ec57634e487b7160e01b600052601260045260246000fd5b500490565b600060a08201888352602060a0818501528188835260c08501905060c08960051b86010192508960005b8a811015613aee577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff408786030183528135605e198d3603018112613a5e57600080fd5b8c0160608135613a6d8161320f565b6001600160a01b03168752818601358688015260408083013536849003601e19018112613a9957600080fd5b90920186810192903567ffffffffffffffff811115613ab757600080fd5b803603841315613ac657600080fd5b82828a0152613ad8838a018286613913565b9850505093850193505090830190600101613a1b565b505050508560408401528460608401528281036080840152613b108185613582565b9998505050505050505050565b600060a08284031215613b2f57600080fd5b60405160a0810181811067ffffffffffffffff82111715613b5257613b52613125565b604052613b5e836137ec565b81526020830135613b6e8161320f565b60208201526040830135613b818161320f565b60408201526060830135613b948161320f565b60608201526080928301359281019290925250919050565b601f8211156108b057600081815260208120601f850160051c81016020861015613bd35750805b601f850160051c820191505b81811015613bf257828155600101613bdf565b505050505050565b67ffffffffffffffff831115613c1257613c12613125565b613c2683613c2083546138d9565b83613bac565b6000601f841160018114613c5a5760008515613c425750838201355b600019600387901b1c1916600186901b178355610a55565b600083815260209020601f19861690835b82811015613c8b5786850135825560209485019460019092019101613c6b565b5086821015613ca85760001960f88860031b161c19848701351681555b505060018560011b0183555050505050565b602081526000610c4e602083018486613913565b60006001600160a01b03808716835280861660208401525083604083015260806060830152612eaa608083018461341f565b600060208284031215613d1257600080fd5b81518015158114612e2657600080fd5b600060208284031215613d3457600080fd5b5051919050565b6000825161396e8184602087016133fb56fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a2646970667358221220be00bc19f55d2accf4e3537127e0329186cb395bc1a6a7274c12c3580cfe305b64736f6c63430008110033","optimization_enabled":true,"verified_twin_address_hash":null,"is_verified":true,"compiler_settings":{"evmVersion":"london","libraries":{},"metadata":{"bytecodeHash":"ipfs","useLiteralContent":true},"optimizer":{"enabled":true,"runs":2000},"remappings":[]},"optimization_runs":2000,"sourcify_repo_url":"https://repo.sourcify.dev/contracts/full_match/1/0x58C1F7Bc62Bb63fb137bc8F6d8ea6321a0501d29/","decoded_constructor_args":null,"compiler_version":"0.8.17+commit.8df45f5f","is_verified_via_verifier_alliance":false,"verified_at":"2025-03-28T14:36:11.431779Z","implementations":[],"proxy_type":null,"external_libraries":[],"creation_bytecode":"0x60a0604052306080523480156200001557600080fd5b506200002062000026565b620000e7565b600054610100900460ff1615620000935760405162461bcd60e51b815260206004820152602760248201527f496e697469616c697a61626c653a20636f6e747261637420697320696e697469604482015266616c697a696e6760c81b606482015260840160405180910390fd5b60005460ff90811614620000e5576000805460ff191660ff9081179091556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b565b608051613daa6200011f60003960008181610c8a01528181610d20015281816110dc01528181611172015261126d0152613daa6000f3fe6080604052600436106101dc5760003560e01c806352d1902d11610102578063d68bad2c11610095578063e978afe511610064578063e978afe5146106d0578063eafb8b06146106f0578063ee57e36f14610710578063fdef9106146107305761021b565b8063d68bad2c1461063c578063d96054c41461065c578063da7422281461067c578063e306bee71461069c5761021b565b8063c4a50145116100d1578063c4a50145146105a5578063c71bf324146105c5578063c9dbc2a4146105f3578063ce1b815f146106135761021b565b806352d1902d146105275780637034731b1461053c578063829331a11461055e578063bfe07da6146105925761021b565b80632675fdd01161017a5780633e2ab0d9116101495780633e2ab0d9146104a057806342d8e99e146104c05780634ec7ac23146104e05780634f1ef286146105145761021b565b80632675fdd01461040a57806326875b1f1461042a5780632ae9c6001461045e5780633659cfe6146104805761021b565b80631080f99b116101b65780631080f99b1461035b5780631626ba7e1461037d57806322844d04146103b657806324b4d73f146103d65761021b565b806301ffc9a7146102b05780630729d054146102e557806309e56b14146103275761021b565b3661021b57604080513381523460208201527f62c2c8e34665db7c56b2cabd7f5fb9702ccd352ffa8150147e450797e9f8e8f3910160405180910390a1005b34801561022757600080fd5b506000366060600061027b6000356001600160e01b03191685858080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061075092505050565b604080516001600160e01b03198316602082015291925001604051602081830303815290604052915050915050805190602001f35b3480156102bc57600080fd5b506102d06102cb36600461307f565b610827565b60405190151581526020015b60405180910390f35b3480156102f157600080fd5b506103197fbf04b4486c9663d805744005c3da000eda93de6e3308a4a7a812eb565327b78d81565b6040519081526020016102dc565b34801561033357600080fd5b506103197f815fe80e4b37c8582a3b773d1d7071f983eacfd56b5965db654f3087c25ada3381565b34801561036757600080fd5b5061037b6103763660046130e3565b61087c565b005b34801561038957600080fd5b5061039d6103983660046131c8565b6108b5565b6040516001600160e01b031990911681526020016102dc565b3480156103c257600080fd5b5061037b6103d1366004613224565b610940565b3480156103e257600080fd5b506103197f1f53edd44352e5d15bad2b29233baa93bcd595e09457780bc7c5445bbbe751cc81565b34801561041657600080fd5b506102d06104253660046132ac565b610a5c565b34801561043657600080fd5b506103197ffaf505be9907aa6951c2ebe5b0312f4980e14f21912ed355372103cc8bd683bc81565b34801561046a57600080fd5b50610473610c56565b6040516102dc9190613318565b34801561048c57600080fd5b5061037b61049b36600461334c565b610c80565b3480156104ac57600080fd5b5061037b6104bb36600461334c565b610e1d565b3480156104cc57600080fd5b5061037b6104db366004613369565b610e4f565b3480156104ec57600080fd5b506103197f968c17ebf04aa1b7544168e69314cdab6b69ba813bb6080d49c0c40a65560f5881565b61037b6105223660046133c1565b6110d2565b34801561053357600080fd5b50610319611260565b34801561054857600080fd5b50610551611325565b6040516102dc919061344b565b34801561056a57600080fd5b506103197f06d294bc8cbad2e393408b20dd019a772661f60b8d633e56761157cb1ec85f8c81565b61037b6105a036600461345e565b6113b8565b3480156105b157600080fd5b5061037b6105c03660046134ba565b6114f2565b3480156105d157600080fd5b506105e56105e03660046134fd565b61159c565b6040516102dc9291906135d7565b3480156105ff57600080fd5b5061037b61060e3660046135f9565b6118c2565b34801561061f57600080fd5b5061012e546040516001600160a01b0390911681526020016102dc565b34801561064857600080fd5b5061037b61065736600461364c565b6118f8565b34801561066857600080fd5b5061037b61067736600461364c565b611933565b34801561068857600080fd5b5061037b61069736600461334c565b611968565b3480156106a857600080fd5b506103197f4707e94b25cfce1a7c363508fbb838c35864388ad77284b248282b9746982b9b81565b3480156106dc57600080fd5b5061037b6106eb36600461368d565b61199b565b3480156106fc57600080fd5b5061037b61070b366004613702565b611ae7565b34801561071c57600080fd5b5061037b61072b3660046130e3565b611d40565b34801561073c57600080fd5b506102d061074b3660046132ac565b611d74565b6001600160e01b0319808316600090815260fb6020526040812054909160e09190911b9081166107c5576040517f4aa318c30000000000000000000000000000000000000000000000000000000081526001600160e01b03198086166004830152821660248201526044015b60405180910390fd5b837bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167f4792cb6e46e49876374bea490ba23274bacea6b84c216a64f47abab54027589b338560405161081692919061379b565b60405180910390a290505b92915050565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000006001600160e01b0319831614806108215750506001600160e01b03191660009081526033602052604090205460ff1690565b7f4707e94b25cfce1a7c363508fbb838c35864388ad77284b248282b9746982b9b6108a681611d8b565b6108b08383611e13565b505050565b600061090430337f968c17ebf04aa1b7544168e69314cdab6b69ba813bb6080d49c0c40a65560f5886866040516020016108f09291906137bd565b604051602081830303815290604052610a5c565b1561093057507f1626ba7e00000000000000000000000000000000000000000000000000000000610821565b506001600160e01b031992915050565b7f815fe80e4b37c8582a3b773d1d7071f983eacfd56b5965db654f3087c25ada3361096a81611d8b565b60005b82811015610a55576000848483818110610989576109896137d6565b90506060020180360381019061099f91906137fb565b90506000815160028111156109b6576109b6613864565b036109d3576109ce8682602001518360400151611e5f565b610a4c565b6001815160028111156109e8576109e8613864565b03610a00576109ce868260200151836040015161202b565b600281516002811115610a1557610a15613864565b03610a4c576040517fd4d3bef700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5060010161096d565b5050505050565b60008060c96000610ace888888604051692822a926a4a9a9a4a7a760b11b60208201526bffffffffffffffffffffffff19606084811b8216602a84015285901b16603e820152605281018290526000906072016040516020818303038152906040528051906020012090509392505050565b81526020810191909152604001600020546001600160a01b031690506001198101610afd576001915050610c4e565b6001600160a01b03811615610b2157610b19818787878761211f565b915050610c4e565b5060408051692822a926a4a9a9a4a7a760b11b6020808301919091526bffffffffffffffffffffffff19602a8301819052606089901b16603e83015260528083018790528351808403909101815260729092018352815191810191909120600090815260c990915220546001600160a01b03166001198101610ba7576001915050610c4e565b6001600160a01b03811615610bc357610b19818787878761211f565b5060408051692822a926a4a9a9a4a7a760b11b6020808301919091526bffffffffffffffffffffffff19606088901b8116602a840152603e83015260528083018790528351808403909101815260729092018352815191810191909120600090815260c990915220546001600160a01b03168015610c4857610b19818787878761211f565b50600090505b949350505050565b610c5e613044565b5060408051606081018252600181526004602082015260009181019190915290565b6001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000163003610d1e5760405162461bcd60e51b815260206004820152602c60248201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060448201527f64656c656761746563616c6c000000000000000000000000000000000000000060648201526084016107bc565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316610d797f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b6001600160a01b031614610df55760405162461bcd60e51b815260206004820152602c60248201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060448201527f6163746976652070726f7879000000000000000000000000000000000000000060648201526084016107bc565b610dfe816121c9565b60408051600080825260208201909252610e1a918391906121f3565b50565b6040517fb2728e9900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600054600390610100900460ff16158015610e71575060005460ff8083169116105b610ee35760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a656400000000000000000000000000000000000060648201526084016107bc565b6000805461ffff191660ff831617610100179055610f04602085018561388b565b60ff16600114610f4257836040517f84833d670000000000000000000000000000000000000000000000000000000081526004016107bc91906138a6565b6040805160608082018352600182526003602083018190526000838501528351808301909452610f8b939188919083908390808284376000920191909152509192915050612393565b15610fbf57600161013055610fbf7f2ae9c6000000000000000000000000000000000000000000000000000000000061242e565b6040805160608082018352600182526004602083015260008284015282518082019093526110089290879060039083908390808284376000920191909152509192915050612393565b1561108a5761103830307f0dcbfb19b09fb8ff4e9af583d4b8e9c8127cc1b26529b4d96dd3b7e77808837261202b565b6110617f549ea75a0000000000000000000000000000000000000000000000000000000061242e565b61108a7fc71bf3240000000000000000000000000000000000000000000000000000000061242e565b6000805461ff001916905560405160ff821681527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498906020015b60405180910390a150505050565b6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001630036111705760405162461bcd60e51b815260206004820152602c60248201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060448201527f64656c656761746563616c6c000000000000000000000000000000000000000060648201526084016107bc565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166111cb7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b6001600160a01b0316146112475760405162461bcd60e51b815260206004820152602c60248201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060448201527f6163746976652070726f7879000000000000000000000000000000000000000060648201526084016107bc565b611250826121c9565b61125c828260016121f3565b5050565b6000306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146113005760405162461bcd60e51b815260206004820152603860248201527f555550535570677261646561626c653a206d757374206e6f742062652063616c60448201527f6c6564207468726f7567682064656c656761746563616c6c000000000000000060648201526084016107bc565b507f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc90565b606061012f8054611335906138d9565b80601f0160208091040260200160405190810160405280929190818152602001828054611361906138d9565b80156113ae5780601f10611383576101008083540402835291602001916113ae565b820191906000526020600020905b81548152906001019060200180831161139157829003601f168201915b5050505050905090565b826000036113f2576040517f1f2a200500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b03841661144757823414611442576040517f1abd5610000000000000000000000000000000000000000000000000000000008152600481018490523460248201526044016107bc565b61149d565b3415611488576040517f1abd5610000000000000000000000000000000000000000000000000000000008152600060048201523460248201526044016107bc565b61149d6001600160a01b0385163330866124cb565b836001600160a01b0316336001600160a01b03167f2bc500cf071be2d1c1458ed6ff484cd4db4345ada8943dee7ff29e7af3558f768585856040516114e49392919061393e565b60405180910390a350505050565b7ffaf505be9907aa6951c2ebe5b0312f4980e14f21912ed355372103cc8bd683bc61151c81611d8b565b6115258461242e565b6001600160e01b03198316600090815260fb60205260409020805463ffffffff191660e084901c179055604080516001600160e01b0319808716825280861660208301528416918101919091527ffc72fd547553f7a663e0048e590afc9c47b56a4242e960f31cf4c62e23d308b9906060016110c4565b60606000600261013054036115dd576040517f37ed32e800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6002610130557fbf04b4486c9663d805744005c3da000eda93de6e3308a4a7a812eb565327b78d61160d81611d8b565b610100851115611649576040517f11c763d600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8467ffffffffffffffff81111561166257611662613125565b60405190808252806020026020018201604052801561169557816020015b60608152602001906001900390816116805790505b50925060008060005b87811015611862575a92506000808a8a848181106116be576116be6137d6565b90506020028101906116d09190613958565b6116de90602081019061334c565b6001600160a01b03168b8b858181106116f9576116f96137d6565b905060200281019061170b9190613958565b602001358c8c86818110611721576117216137d6565b90506020028101906117339190613958565b611741906040810190613978565b60405161174f9291906139bf565b60006040518083038185875af1925050503d806000811461178c576040519150601f19603f3d011682016040523d82523d6000602084013e611791565b606091505b50915091505a9350600160ff84161b89166117e557816117e0576040517fa6a7dbbd000000000000000000000000000000000000000000000000000000008152600481018490526024016107bc565b61183a565b8161183a576117f56040866139cf565b84101561182e576040517f1c26714c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600160ff84161b871896505b8088848151811061184d5761184d6137d6565b6020908102919091010152505060010161169e565b50336001600160a01b03167fd4e57c2049f004fb297ef78591cd409503ceb6b2c722d7ffed032fc99e5f3b588a8a8a8a898b6040516118a6969594939291906139f1565b60405180910390a2505060016101305550909590945092505050565b7f815fe80e4b37c8582a3b773d1d7071f983eacfd56b5965db654f3087c25ada336118ec81611d8b565b610a5585858585612553565b7f815fe80e4b37c8582a3b773d1d7071f983eacfd56b5965db654f3087c25ada3361192281611d8b565b61192d848484611e5f565b50505050565b7f815fe80e4b37c8582a3b773d1d7071f983eacfd56b5965db654f3087c25ada3361195d81611d8b565b61192d84848461202b565b7f06d294bc8cbad2e393408b20dd019a772661f60b8d633e56761157cb1ec85f8c61199281611d8b565b61125c826128c9565b7f815fe80e4b37c8582a3b773d1d7071f983eacfd56b5965db654f3087c25ada336119c581611d8b565b60005b8281101561192d5760008484838181106119e4576119e46137d6565b905060a002018036038101906119fa9190613b1d565b9050600081516002811115611a1157611a11613864565b03611a775760608101516001600160a01b031615611a5b576040517fd4d3bef700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b611a72816020015182604001518360800151611e5f565b611ade565b600181516002811115611a8c57611a8c613864565b03611aa857611a7281602001518260400151836080015161202b565b600281516002811115611abd57611abd613864565b03611ade57611ade8160200151826040015183608001518460600151612553565b506001016119c8565b60005460ff1615611b24576040517f0dc149f000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600054600390610100900460ff16158015611b46575060005460ff8083169116105b611bb85760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a656400000000000000000000000000000000000060648201526084016107bc565b6000805461ffff191660ff831617610100179055600161013055611bfb7f9385547e0000000000000000000000000000000000000000000000000000000061242e565b611c247f549ea75a0000000000000000000000000000000000000000000000000000000061242e565b611c4d7fc71bf3240000000000000000000000000000000000000000000000000000000061242e565b611c767f1626ba7e0000000000000000000000000000000000000000000000000000000061242e565b611c9f7f7034731b0000000000000000000000000000000000000000000000000000000061242e565b611cc87f2ae9c6000000000000000000000000000000000000000000000000000000000061242e565b611cd061292b565b611cda8787612a38565b611ce3846128c9565b611ced8383611e13565b611cf685612a69565b6000805461ff001916905560405160ff821681527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a150505050505050565b7f4707e94b25cfce1a7c363508fbb838c35864388ad77284b248282b9746982b9b611d6a81611d8b565b6108b08383612a38565b6000611d8285858585610a5c565b95945050505050565b611dce3033836000368080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250610a5c92505050565b610e1a576040517f1e09743f000000000000000000000000000000000000000000000000000000008152306004820152336024820152604481018290526064016107bc565b61012f611e21828483613bfa565b507fe9b617ecb5f63f6a9ccd8d4d5fa0d7b2ef9b17ce3f48e6b135808d6a40e677428282604051611e53929190613cba565b60405180910390a15050565b7fffffffffffffffffffffffff00000000000000000000000000000000000000016001600160a01b03841601611ea8576040516324159e5b60e01b815260040160405180910390fd5b7fffffffffffffffffffffffff00000000000000000000000000000000000000016001600160a01b03831601611f28577f815fe80e4b37c8582a3b773d1d7071f983eacfd56b5965db654f3087c25ada33811480611f0a5750611f0a81612aef565b15611f28576040516324159e5b60e01b815260040160405180910390fd5b60408051692822a926a4a9a9a4a7a760b11b6020808301919091526bffffffffffffffffffffffff19606086811b8216602a85015287901b16603e83015260528083018590528351808403909101815260729092019092528051910120600090600081815260c960205260409020549091506001600160a01b031680610a5557600082815260c96020908152604091829020805473ffffffffffffffffffffffffffffffffffffffff1916600290811790915582516001600160a01b0389811682529281019190915290861691339186917f0f579ad49235a8c1fd9041427e7067b1eb10926bbed380bf6fabc73e0e807644910160405180910390a45050505050565b60408051692822a926a4a9a9a4a7a760b11b6020808301919091526bffffffffffffffffffffffff19606086811b8216602a85015287901b16603e83015260528083018590528351808403909101815260729092019092528051910120600090600081815260c960205260409020549091506001600160a01b03161561192d57600081815260c96020908152604091829020805473ffffffffffffffffffffffffffffffffffffffff1916905590516001600160a01b038681168252851691339185917f3ca48185ec3f6e47e24db18b13f1c65b1ce05da1659f9c1c4fe717dda5f67524910160405180910390a450505050565b6040517f2675fdd00000000000000000000000000000000000000000000000000000000081526000906001600160a01b03871690632675fdd09061216d908890889088908890600401613cce565b602060405180830381865afa9250505080156121a6575060408051601f3d908101601f191682019092526121a391810190613d00565b60015b156121bd5780156121bb576001915050611d82565b505b50600095945050505050565b7f1f53edd44352e5d15bad2b29233baa93bcd595e09457780bc7c5445bbbe751cc61125c81611d8b565b7f4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd91435460ff1615612226576108b083612bbe565b826001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa925050508015612280575060408051601f3d908101601f1916820190925261227d91810190613d22565b60015b6122f25760405162461bcd60e51b815260206004820152602e60248201527f45524331393637557067726164653a206e657720696d706c656d656e7461746960448201527f6f6e206973206e6f74205555505300000000000000000000000000000000000060648201526084016107bc565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc81146123875760405162461bcd60e51b815260206004820152602960248201527f45524331393637557067726164653a20756e737570706f727465642070726f7860448201527f6961626c6555554944000000000000000000000000000000000000000000000060648201526084016107bc565b506108b0838383612c89565b8051825160009160ff908116911610156123af57506001610821565b8151835160ff918216911611156123c857506000610821565b6020808301519084015160ff918216911610156123e757506001610821565b6020808301519084015160ff9182169116111561240657506000610821565b6040808301519084015160ff9182169116101561242557506001610821565b50600092915050565b6001600160e01b031980821690036124885760405162461bcd60e51b815260206004820152601c60248201527f4552433136353a20696e76616c696420696e746572666163652069640000000060448201526064016107bc565b6001600160e01b031916600090815260336020526040902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055565b604080516001600160a01b0385811660248301528416604482015260648082018490528251808303909101815260849091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f23b872dd0000000000000000000000000000000000000000000000000000000017905261192d908590612cae565b806001600160a01b0381163b6125a0576040517f48359af60000000000000000000000000000000000000000000000000000000081526001600160a01b03831660048201526024016107bc565b6040517f01ffc9a70000000000000000000000000000000000000000000000000000000081527f2675fdd00000000000000000000000000000000000000000000000000000000060048201526001600160a01b038216906301ffc9a790602401602060405180830381865afa15801561261d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906126419190613d00565b612682576040517fdbb048620000000000000000000000000000000000000000000000000000000081526001600160a01b03831660048201526024016107bc565b6001600160a01b038581161480156126a257506001600160a01b03848116145b156126d9576040517f85f1ba9900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b0385811614806126f857506001600160a01b03848116145b1561274d577f815fe80e4b37c8582a3b773d1d7071f983eacfd56b5965db654f3087c25ada3383148061272f575061272f83612aef565b1561274d576040516324159e5b60e01b815260040160405180910390fd5b60408051692822a926a4a9a9a4a7a760b11b6020808301919091526bffffffffffffffffffffffff19606088811b8216602a85015289901b16603e83015260528083018790528351808403909101815260729092019092528051910120600090600081815260c960205260409020549091506001600160a01b03168061284b57600082815260c96020908152604091829020805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0387811691821790925583518b8316815292830152881691339188917f0f579ad49235a8c1fd9041427e7067b1eb10926bbed380bf6fabc73e0e807644910160405180910390a46128c0565b826001600160a01b0316816001600160a01b0316146128c0576040517f0b98789e0000000000000000000000000000000000000000000000000000000081526001600160a01b03808916600483015280881660248301526044820187905280831660648301528416608482015260a4016107bc565b50505050505050565b61012e805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0383169081179091556040519081527fd91237492a9e30cd2faf361fc103998a382ff0ec2b1b07dc1cbebb76ae2f1ea29060200160405180910390a150565b6129547f150b7a020000000000000000000000000000000000000000000000000000000061242e565b61297d7f4e2312e00000000000000000000000000000000000000000000000000000000061242e565b60fb6020527f5a08f87af82de422c581ce019b2e54a9c17372e9cba575ae0470ba2482d63686805463ffffffff1990811663150b7a02179091557fe1cfe341950d56d8854f782066100d5ae1d5930cdb4949b973e554a343efc6c38054821663f23a6e611790557fbc197c81000000000000000000000000000000000000000000000000000000006000527f08ba3617671847c1c169da222a5bc01cfdefcc3c4f1e5525214a474479c89123805490911663bc197c81179055565b7fbb39ebb37e60fb5d606ffdb749d2336e56b88e6c88c4bd6513b308f643186eed8282604051611e53929190613cba565b600054610100900460ff16612ae65760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e6700000000000000000000000000000000000000000060648201526084016107bc565b610e1a81612d96565b60007fbf04b4486c9663d805744005c3da000eda93de6e3308a4a7a812eb565327b78d821480612b3e57507f1f53edd44352e5d15bad2b29233baa93bcd595e09457780bc7c5445bbbe751cc82145b80612b6857507f4707e94b25cfce1a7c363508fbb838c35864388ad77284b248282b9746982b9b82145b80612b9257507f06d294bc8cbad2e393408b20dd019a772661f60b8d633e56761157cb1ec85f8c82145b806108215750507ffaf505be9907aa6951c2ebe5b0312f4980e14f21912ed355372103cc8bd683bc1490565b6001600160a01b0381163b612c3b5760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201527f6f74206120636f6e74726163740000000000000000000000000000000000000060648201526084016107bc565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0392909216919091179055565b612c9283612dc1565b600082511180612c9f5750805b156108b05761192d8383612e01565b6000612d03826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316612e2d9092919063ffffffff16565b9050805160001480612d24575080806020019051810190612d249190613d00565b6108b05760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f7420737563636565640000000000000000000000000000000000000000000060648201526084016107bc565b610e1a30827f815fe80e4b37c8582a3b773d1d7071f983eacfd56b5965db654f3087c25ada33611e5f565b612dca81612bbe565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b6060612e268383604051806060016040528060278152602001613d4e60279139612e3c565b9392505050565b6060610c4e8484600085612eb4565b6060600080856001600160a01b031685604051612e599190613d3b565b600060405180830381855af49150503d8060008114612e94576040519150601f19603f3d011682016040523d82523d6000602084013e612e99565b606091505b5091509150612eaa86838387612fa6565b9695505050505050565b606082471015612f2c5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c000000000000000000000000000000000000000000000000000060648201526084016107bc565b600080866001600160a01b03168587604051612f489190613d3b565b60006040518083038185875af1925050503d8060008114612f85576040519150601f19603f3d011682016040523d82523d6000602084013e612f8a565b606091505b5091509150612f9b87838387612fa6565b979650505050505050565b6060831561301557825160000361300e576001600160a01b0385163b61300e5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016107bc565b5081610c4e565b610c4e838381511561302a5781518083602001fd5b8060405162461bcd60e51b81526004016107bc919061344b565b60405180606001604052806003906020820280368337509192915050565b80356001600160e01b03198116811461307a57600080fd5b919050565b60006020828403121561309157600080fd5b612e2682613062565b60008083601f8401126130ac57600080fd5b50813567ffffffffffffffff8111156130c457600080fd5b6020830191508360208285010111156130dc57600080fd5b9250929050565b600080602083850312156130f657600080fd5b823567ffffffffffffffff81111561310d57600080fd5b6131198582860161309a565b90969095509350505050565b634e487b7160e01b600052604160045260246000fd5b600082601f83011261314c57600080fd5b813567ffffffffffffffff8082111561316757613167613125565b604051601f8301601f19908116603f0116810190828211818310171561318f5761318f613125565b816040528381528660208588010111156131a857600080fd5b836020870160208301376000602085830101528094505050505092915050565b600080604083850312156131db57600080fd5b82359150602083013567ffffffffffffffff8111156131f957600080fd5b6132058582860161313b565b9150509250929050565b6001600160a01b0381168114610e1a57600080fd5b60008060006040848603121561323957600080fd5b83356132448161320f565b9250602084013567ffffffffffffffff8082111561326157600080fd5b818601915086601f83011261327557600080fd5b81358181111561328457600080fd5b87602060608302850101111561329957600080fd5b6020830194508093505050509250925092565b600080600080608085870312156132c257600080fd5b84356132cd8161320f565b935060208501356132dd8161320f565b925060408501359150606085013567ffffffffffffffff81111561330057600080fd5b61330c8782880161313b565b91505092959194509250565b60608101818360005b600381101561334357815160ff16835260209283019290910190600101613321565b50505092915050565b60006020828403121561335e57600080fd5b8135612e268161320f565b60008060006080848603121561337e57600080fd5b606084018581111561338f57600080fd5b8493503567ffffffffffffffff8111156133a857600080fd5b6133b48682870161309a565b9497909650939450505050565b600080604083850312156133d457600080fd5b82356133df8161320f565b9150602083013567ffffffffffffffff8111156131f957600080fd5b60005b838110156134165781810151838201526020016133fe565b50506000910152565b600081518084526134378160208601602086016133fb565b601f01601f19169290920160200192915050565b602081526000612e26602083018461341f565b6000806000806060858703121561347457600080fd5b843561347f8161320f565b935060208501359250604085013567ffffffffffffffff8111156134a257600080fd5b6134ae8782880161309a565b95989497509550505050565b6000806000606084860312156134cf57600080fd5b6134d884613062565b92506134e660208501613062565b91506134f460408501613062565b90509250925092565b6000806000806060858703121561351357600080fd5b84359350602085013567ffffffffffffffff8082111561353257600080fd5b818701915087601f83011261354657600080fd5b81358181111561355557600080fd5b8860208260051b850101111561356a57600080fd5b95986020929092019750949560400135945092505050565b600081518084526020808501808196508360051b8101915082860160005b858110156135ca5782840389526135b884835161341f565b988501989350908401906001016135a0565b5091979650505050505050565b6040815260006135ea6040830185613582565b90508260208301529392505050565b6000806000806080858703121561360f57600080fd5b843561361a8161320f565b9350602085013561362a8161320f565b92506040850135915060608501356136418161320f565b939692955090935050565b60008060006060848603121561366157600080fd5b833561366c8161320f565b9250602084013561367c8161320f565b929592945050506040919091013590565b600080602083850312156136a057600080fd5b823567ffffffffffffffff808211156136b857600080fd5b818501915085601f8301126136cc57600080fd5b8135818111156136db57600080fd5b86602060a0830285010111156136f057600080fd5b60209290920196919550909350505050565b6000806000806000806080878903121561371b57600080fd5b863567ffffffffffffffff8082111561373357600080fd5b61373f8a838b0161309a565b9098509650602089013591506137548261320f565b9094506040880135906137668261320f565b9093506060880135908082111561377c57600080fd5b5061378989828a0161309a565b979a9699509497509295939492505050565b6001600160a01b0383168152604060208201526000610c4e604083018461341f565b828152604060208201526000610c4e604083018461341f565b634e487b7160e01b600052603260045260246000fd5b80356003811061307a57600080fd5b60006060828403121561380d57600080fd5b6040516060810181811067ffffffffffffffff8211171561383057613830613125565b60405261383c836137ec565b8152602083013561384c8161320f565b60208201526040928301359281019290925250919050565b634e487b7160e01b600052602160045260246000fd5b803560ff8116811461307a57600080fd5b60006020828403121561389d57600080fd5b612e268261387a565b60608101818360005b60038110156133435760ff6138c38361387a565b16835260209283019291909101906001016138af565b600181811c908216806138ed57607f821691505b60208210810361390d57634e487b7160e01b600052602260045260246000fd5b50919050565b818352818160208501375060006020828401015260006020601f19601f840116840101905092915050565b838152604060208201526000611d82604083018486613913565b60008235605e1983360301811261396e57600080fd5b9190910192915050565b6000808335601e1984360301811261398f57600080fd5b83018035915067ffffffffffffffff8211156139aa57600080fd5b6020019150368190038213156130dc57600080fd5b8183823760009101908152919050565b6000826139ec57634e487b7160e01b600052601260045260246000fd5b500490565b600060a08201888352602060a0818501528188835260c08501905060c08960051b86010192508960005b8a811015613aee577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff408786030183528135605e198d3603018112613a5e57600080fd5b8c0160608135613a6d8161320f565b6001600160a01b03168752818601358688015260408083013536849003601e19018112613a9957600080fd5b90920186810192903567ffffffffffffffff811115613ab757600080fd5b803603841315613ac657600080fd5b82828a0152613ad8838a018286613913565b9850505093850193505090830190600101613a1b565b505050508560408401528460608401528281036080840152613b108185613582565b9998505050505050505050565b600060a08284031215613b2f57600080fd5b60405160a0810181811067ffffffffffffffff82111715613b5257613b52613125565b604052613b5e836137ec565b81526020830135613b6e8161320f565b60208201526040830135613b818161320f565b60408201526060830135613b948161320f565b60608201526080928301359281019290925250919050565b601f8211156108b057600081815260208120601f850160051c81016020861015613bd35750805b601f850160051c820191505b81811015613bf257828155600101613bdf565b505050505050565b67ffffffffffffffff831115613c1257613c12613125565b613c2683613c2083546138d9565b83613bac565b6000601f841160018114613c5a5760008515613c425750838201355b600019600387901b1c1916600186901b178355610a55565b600083815260209020601f19861690835b82811015613c8b5786850135825560209485019460019092019101613c6b565b5086821015613ca85760001960f88860031b161c19848701351681555b505060018560011b0183555050505050565b602081526000610c4e602083018486613913565b60006001600160a01b03808716835280861660208401525083604083015260806060830152612eaa608083018461341f565b600060208284031215613d1257600080fd5b81518015158114612e2657600080fd5b600060208284031215613d3457600080fd5b5051919050565b6000825161396e8184602087016133fb56fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a2646970667358221220be00bc19f55d2accf4e3537127e0329186cb395bc1a6a7274c12c3580cfe305b64736f6c63430008110033","name":"DAO","is_blueprint":false,"license_type":"none","is_fully_verified":true,"is_verified_via_eth_bytecode_db":true,"language":"solidity","evm_version":"london","can_be_visualized_via_sol2uml":true,"is_verified_via_sourcify":true,"additional_sources":[{"file_path":"@openzeppelin/contracts-upgradeable/token/ERC20/IERC20Upgradeable.sol","source_code":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/IERC20.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Interface of the ERC20 standard as defined in the EIP.\n */\ninterface IERC20Upgradeable {\n    /**\n     * @dev Emitted when `value` tokens are moved from one account (`from`) to\n     * another (`to`).\n     *\n     * Note that `value` may be zero.\n     */\n    event Transfer(address indexed from, address indexed to, uint256 value);\n\n    /**\n     * @dev Emitted when the allowance of a `spender` for an `owner` is set by\n     * a call to {approve}. `value` is the new allowance.\n     */\n    event Approval(address indexed owner, address indexed spender, uint256 value);\n\n    /**\n     * @dev Returns the amount of tokens in existence.\n     */\n    function totalSupply() external view returns (uint256);\n\n    /**\n     * @dev Returns the amount of tokens owned by `account`.\n     */\n    function balanceOf(address account) external view returns (uint256);\n\n    /**\n     * @dev Moves `amount` tokens from the caller's account to `to`.\n     *\n     * Returns a boolean value indicating whether the operation succeeded.\n     *\n     * Emits a {Transfer} event.\n     */\n    function transfer(address to, uint256 amount) external returns (bool);\n\n    /**\n     * @dev Returns the remaining number of tokens that `spender` will be\n     * allowed to spend on behalf of `owner` through {transferFrom}. This is\n     * zero by default.\n     *\n     * This value changes when {approve} or {transferFrom} are called.\n     */\n    function allowance(address owner, address spender) external view returns (uint256);\n\n    /**\n     * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\n     *\n     * Returns a boolean value indicating whether the operation succeeded.\n     *\n     * IMPORTANT: Beware that changing an allowance with this method brings the risk\n     * that someone may use both the old and the new allowance by unfortunate\n     * transaction ordering. One possible solution to mitigate this race\n     * condition is to first reduce the spender's allowance to 0 and set the\n     * desired value afterwards:\n     * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n     *\n     * Emits an {Approval} event.\n     */\n    function approve(address spender, uint256 amount) external returns (bool);\n\n    /**\n     * @dev Moves `amount` tokens from `from` to `to` using the\n     * allowance mechanism. `amount` is then deducted from the caller's\n     * allowance.\n     *\n     * Returns a boolean value indicating whether the operation succeeded.\n     *\n     * Emits a {Transfer} event.\n     */\n    function transferFrom(address from, address to, uint256 amount) external returns (bool);\n}\n"},{"file_path":"@openzeppelin/contracts-upgradeable/interfaces/IERC1967Upgradeable.sol","source_code":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (interfaces/IERC1967.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev ERC-1967: Proxy Storage Slots. This interface contains the events defined in the ERC.\n *\n * _Available since v4.8.3._\n */\ninterface IERC1967Upgradeable {\n    /**\n     * @dev Emitted when the implementation is upgraded.\n     */\n    event Upgraded(address indexed implementation);\n\n    /**\n     * @dev Emitted when the admin account has changed.\n     */\n    event AdminChanged(address previousAdmin, address newAdmin);\n\n    /**\n     * @dev Emitted when the beacon is changed.\n     */\n    event BeaconUpgraded(address indexed beacon);\n}\n"},{"file_path":"@openzeppelin/contracts-upgradeable/utils/StorageSlotUpgradeable.sol","source_code":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/StorageSlot.sol)\n// This file was procedurally generated from scripts/generate/templates/StorageSlot.js.\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Library for reading and writing primitive types to specific storage slots.\n *\n * Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts.\n * This library helps with reading and writing to such slots without the need for inline assembly.\n *\n * The functions in this library return Slot structs that contain a `value` member that can be used to read or write.\n *\n * Example usage to set ERC1967 implementation slot:\n * ```solidity\n * contract ERC1967 {\n *     bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\n *\n *     function _getImplementation() internal view returns (address) {\n *         return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\n *     }\n *\n *     function _setImplementation(address newImplementation) internal {\n *         require(Address.isContract(newImplementation), \"ERC1967: new implementation is not a contract\");\n *         StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\n *     }\n * }\n * ```\n *\n * _Available since v4.1 for `address`, `bool`, `bytes32`, `uint256`._\n * _Available since v4.9 for `string`, `bytes`._\n */\nlibrary StorageSlotUpgradeable {\n    struct AddressSlot {\n        address value;\n    }\n\n    struct BooleanSlot {\n        bool value;\n    }\n\n    struct Bytes32Slot {\n        bytes32 value;\n    }\n\n    struct Uint256Slot {\n        uint256 value;\n    }\n\n    struct StringSlot {\n        string value;\n    }\n\n    struct BytesSlot {\n        bytes value;\n    }\n\n    /**\n     * @dev Returns an `AddressSlot` with member `value` located at `slot`.\n     */\n    function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) {\n        /// @solidity memory-safe-assembly\n        assembly {\n            r.slot := slot\n        }\n    }\n\n    /**\n     * @dev Returns an `BooleanSlot` with member `value` located at `slot`.\n     */\n    function getBooleanSlot(bytes32 slot) internal pure returns (BooleanSlot storage r) {\n        /// @solidity memory-safe-assembly\n        assembly {\n            r.slot := slot\n        }\n    }\n\n    /**\n     * @dev Returns an `Bytes32Slot` with member `value` located at `slot`.\n     */\n    function getBytes32Slot(bytes32 slot) internal pure returns (Bytes32Slot storage r) {\n        /// @solidity memory-safe-assembly\n        assembly {\n            r.slot := slot\n        }\n    }\n\n    /**\n     * @dev Returns an `Uint256Slot` with member `value` located at `slot`.\n     */\n    function getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) {\n        /// @solidity memory-safe-assembly\n        assembly {\n            r.slot := slot\n        }\n    }\n\n    /**\n     * @dev Returns an `StringSlot` with member `value` located at `slot`.\n     */\n    function getStringSlot(bytes32 slot) internal pure returns (StringSlot storage r) {\n        /// @solidity memory-safe-assembly\n        assembly {\n            r.slot := slot\n        }\n    }\n\n    /**\n     * @dev Returns an `StringSlot` representation of the string storage pointer `store`.\n     */\n    function getStringSlot(string storage store) internal pure returns (StringSlot storage r) {\n        /// @solidity memory-safe-assembly\n        assembly {\n            r.slot := store.slot\n        }\n    }\n\n    /**\n     * @dev Returns an `BytesSlot` with member `value` located at `slot`.\n     */\n    function getBytesSlot(bytes32 slot) internal pure returns (BytesSlot storage r) {\n        /// @solidity memory-safe-assembly\n        assembly {\n            r.slot := slot\n        }\n    }\n\n    /**\n     * @dev Returns an `BytesSlot` representation of the bytes storage pointer `store`.\n     */\n    function getBytesSlot(bytes storage store) internal pure returns (BytesSlot storage r) {\n        /// @solidity memory-safe-assembly\n        assembly {\n            r.slot := store.slot\n        }\n    }\n}\n"},{"file_path":"src/core/utils/CallbackHandler.sol","source_code":"// SPDX-License-Identifier: AGPL-3.0-or-later\n\npragma solidity ^0.8.8;\n\n/// @title CallbackHandler\n/// @author Aragon X - 2022-2023\n/// @notice This contract handles callbacks by registering a magic number together with the callback function's selector. It provides the `_handleCallback` function that inheriting contracts have to call inside their `fallback()` function  (`_handleCallback(msg.callbackSelector, msg.data)`).  This allows to adaptively register ERC standards (e.g., [ERC-721](https://eips.ethereum.org/EIPS/eip-721), [ERC-1115](https://eips.ethereum.org/EIPS/eip-1155), or future versions of [ERC-165](https://eips.ethereum.org/EIPS/eip-165)) and returning the required magic numbers for the associated callback functions for the inheriting contract so that it doesn't need to be upgraded.\n/// @dev This callback handling functionality is intended to be used by executor contracts (i.e., `DAO.sol`).\n/// @custom:security-contact sirt@aragon.org\nabstract contract CallbackHandler {\n    /// @notice A mapping between callback function selectors and magic return numbers.\n    mapping(bytes4 => bytes4) internal callbackMagicNumbers;\n\n    /// @notice The magic number refering to unregistered callbacks.\n    bytes4 internal constant UNREGISTERED_CALLBACK = bytes4(0);\n\n    /// @notice Thrown if the callback function is not registered.\n    /// @param callbackSelector The selector of the callback function.\n    /// @param magicNumber The magic number to be registered for the callback function selector.\n    error UnknownCallback(bytes4 callbackSelector, bytes4 magicNumber);\n\n    /// @notice Emitted when `_handleCallback` is called.\n    /// @param sender Who called the callback.\n    /// @param sig The function signature.\n    /// @param data The calldata.\n    event CallbackReceived(address sender, bytes4 indexed sig, bytes data);\n\n    /// @notice Handles callbacks to adaptively support ERC standards.\n    /// @dev This function is supposed to be called via `_handleCallback(msg.sig, msg.data)` in the `fallback()` function of the inheriting contract.\n    /// @param _callbackSelector The function selector of the callback function.\n    /// @param _data The calldata.\n    /// @return The magic number registered for the function selector triggering the fallback.\n    function _handleCallback(\n        bytes4 _callbackSelector,\n        bytes memory _data\n    ) internal virtual returns (bytes4) {\n        bytes4 magicNumber = callbackMagicNumbers[_callbackSelector];\n        if (magicNumber == UNREGISTERED_CALLBACK) {\n            revert UnknownCallback({callbackSelector: _callbackSelector, magicNumber: magicNumber});\n        }\n\n        emit CallbackReceived({sender: msg.sender, sig: _callbackSelector, data: _data});\n\n        return magicNumber;\n    }\n\n    /// @notice Registers a magic number for a callback function selector.\n    /// @param _callbackSelector The selector of the callback function.\n    /// @param _magicNumber The magic number to be registered for the callback function selector.\n    function _registerCallback(bytes4 _callbackSelector, bytes4 _magicNumber) internal virtual {\n        callbackMagicNumbers[_callbackSelector] = _magicNumber;\n    }\n\n    /// @notice This empty reserved space is put in place to allow future versions to add new variables without shifting down storage in the inheritance chain (see [OpenZeppelin's guide about storage gaps](https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps)).\n    uint256[49] private __gap;\n}\n"},{"file_path":"@openzeppelin/contracts-upgradeable/utils/introspection/ERC165Upgradeable.sol","source_code":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./IERC165Upgradeable.sol\";\nimport {Initializable} from \"../../proxy/utils/Initializable.sol\";\n\n/**\n * @dev Implementation of the {IERC165} interface.\n *\n * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check\n * for the additional interface id that will be supported. For example:\n *\n * ```solidity\n * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\n *     return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);\n * }\n * ```\n *\n * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation.\n */\nabstract contract ERC165Upgradeable is Initializable, IERC165Upgradeable {\n    function __ERC165_init() internal onlyInitializing {\n    }\n\n    function __ERC165_init_unchained() internal onlyInitializing {\n    }\n    /**\n     * @dev See {IERC165-supportsInterface}.\n     */\n    function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\n        return interfaceId == type(IERC165Upgradeable).interfaceId;\n    }\n\n    /**\n     * @dev This empty reserved space is put in place to allow future versions to add new\n     * variables without shifting down storage in the inheritance chain.\n     * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\n     */\n    uint256[50] private __gap;\n}\n"},{"file_path":"@openzeppelin/contracts-upgradeable/proxy/ERC1967/ERC1967UpgradeUpgradeable.sol","source_code":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (proxy/ERC1967/ERC1967Upgrade.sol)\n\npragma solidity ^0.8.2;\n\nimport \"../beacon/IBeaconUpgradeable.sol\";\nimport \"../../interfaces/IERC1967Upgradeable.sol\";\nimport \"../../interfaces/draft-IERC1822Upgradeable.sol\";\nimport \"../../utils/AddressUpgradeable.sol\";\nimport \"../../utils/StorageSlotUpgradeable.sol\";\nimport {Initializable} from \"../utils/Initializable.sol\";\n\n/**\n * @dev This abstract contract provides getters and event emitting update functions for\n * https://eips.ethereum.org/EIPS/eip-1967[EIP1967] slots.\n *\n * _Available since v4.1._\n */\nabstract contract ERC1967UpgradeUpgradeable is Initializable, IERC1967Upgradeable {\n    // This is the keccak-256 hash of \"eip1967.proxy.rollback\" subtracted by 1\n    bytes32 private constant _ROLLBACK_SLOT = 0x4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd9143;\n\n    /**\n     * @dev Storage slot with the address of the current implementation.\n     * This is the keccak-256 hash of \"eip1967.proxy.implementation\" subtracted by 1, and is\n     * validated in the constructor.\n     */\n    bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\n\n    function __ERC1967Upgrade_init() internal onlyInitializing {\n    }\n\n    function __ERC1967Upgrade_init_unchained() internal onlyInitializing {\n    }\n    /**\n     * @dev Returns the current implementation address.\n     */\n    function _getImplementation() internal view returns (address) {\n        return StorageSlotUpgradeable.getAddressSlot(_IMPLEMENTATION_SLOT).value;\n    }\n\n    /**\n     * @dev Stores a new address in the EIP1967 implementation slot.\n     */\n    function _setImplementation(address newImplementation) private {\n        require(AddressUpgradeable.isContract(newImplementation), \"ERC1967: new implementation is not a contract\");\n        StorageSlotUpgradeable.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\n    }\n\n    /**\n     * @dev Perform implementation upgrade\n     *\n     * Emits an {Upgraded} event.\n     */\n    function _upgradeTo(address newImplementation) internal {\n        _setImplementation(newImplementation);\n        emit Upgraded(newImplementation);\n    }\n\n    /**\n     * @dev Perform implementation upgrade with additional setup call.\n     *\n     * Emits an {Upgraded} event.\n     */\n    function _upgradeToAndCall(address newImplementation, bytes memory data, bool forceCall) internal {\n        _upgradeTo(newImplementation);\n        if (data.length > 0 || forceCall) {\n            AddressUpgradeable.functionDelegateCall(newImplementation, data);\n        }\n    }\n\n    /**\n     * @dev Perform implementation upgrade with security checks for UUPS proxies, and additional setup call.\n     *\n     * Emits an {Upgraded} event.\n     */\n    function _upgradeToAndCallUUPS(address newImplementation, bytes memory data, bool forceCall) internal {\n        // Upgrades from old implementations will perform a rollback test. This test requires the new\n        // implementation to upgrade back to the old, non-ERC1822 compliant, implementation. Removing\n        // this special case will break upgrade paths from old UUPS implementation to new ones.\n        if (StorageSlotUpgradeable.getBooleanSlot(_ROLLBACK_SLOT).value) {\n            _setImplementation(newImplementation);\n        } else {\n            try IERC1822ProxiableUpgradeable(newImplementation).proxiableUUID() returns (bytes32 slot) {\n                require(slot == _IMPLEMENTATION_SLOT, \"ERC1967Upgrade: unsupported proxiableUUID\");\n            } catch {\n                revert(\"ERC1967Upgrade: new implementation is not UUPS\");\n            }\n            _upgradeToAndCall(newImplementation, data, forceCall);\n        }\n    }\n\n    /**\n     * @dev Storage slot with the admin of the contract.\n     * This is the keccak-256 hash of \"eip1967.proxy.admin\" subtracted by 1, and is\n     * validated in the constructor.\n     */\n    bytes32 internal constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;\n\n    /**\n     * @dev Returns the current admin.\n     */\n    function _getAdmin() internal view returns (address) {\n        return StorageSlotUpgradeable.getAddressSlot(_ADMIN_SLOT).value;\n    }\n\n    /**\n     * @dev Stores a new address in the EIP1967 admin slot.\n     */\n    function _setAdmin(address newAdmin) private {\n        require(newAdmin != address(0), \"ERC1967: new admin is the zero address\");\n        StorageSlotUpgradeable.getAddressSlot(_ADMIN_SLOT).value = newAdmin;\n    }\n\n    /**\n     * @dev Changes the admin of the proxy.\n     *\n     * Emits an {AdminChanged} event.\n     */\n    function _changeAdmin(address newAdmin) internal {\n        emit AdminChanged(_getAdmin(), newAdmin);\n        _setAdmin(newAdmin);\n    }\n\n    /**\n     * @dev The storage slot of the UpgradeableBeacon contract which defines the implementation for this proxy.\n     * This is bytes32(uint256(keccak256('eip1967.proxy.beacon')) - 1)) and is validated in the constructor.\n     */\n    bytes32 internal constant _BEACON_SLOT = 0xa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50;\n\n    /**\n     * @dev Returns the current beacon.\n     */\n    function _getBeacon() internal view returns (address) {\n        return StorageSlotUpgradeable.getAddressSlot(_BEACON_SLOT).value;\n    }\n\n    /**\n     * @dev Stores a new beacon in the EIP1967 beacon slot.\n     */\n    function _setBeacon(address newBeacon) private {\n        require(AddressUpgradeable.isContract(newBeacon), \"ERC1967: new beacon is not a contract\");\n        require(\n            AddressUpgradeable.isContract(IBeaconUpgradeable(newBeacon).implementation()),\n            \"ERC1967: beacon implementation is not a contract\"\n        );\n        StorageSlotUpgradeable.getAddressSlot(_BEACON_SLOT).value = newBeacon;\n    }\n\n    /**\n     * @dev Perform beacon upgrade with additional setup call. Note: This upgrades the address of the beacon, it does\n     * not upgrade the implementation contained in the beacon (see {UpgradeableBeacon-_setImplementation} for that).\n     *\n     * Emits a {BeaconUpgraded} event.\n     */\n    function _upgradeBeaconToAndCall(address newBeacon, bytes memory data, bool forceCall) internal {\n        _setBeacon(newBeacon);\n        emit BeaconUpgraded(newBeacon);\n        if (data.length > 0 || forceCall) {\n            AddressUpgradeable.functionDelegateCall(IBeaconUpgradeable(newBeacon).implementation(), data);\n        }\n    }\n\n    /**\n     * @dev This empty reserved space is put in place to allow future versions to add new\n     * variables without shifting down storage in the inheritance chain.\n     * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\n     */\n    uint256[50] private __gap;\n}\n"},{"file_path":"@aragon/osx-commons-contracts/src/permission/condition/IPermissionCondition.sol","source_code":"// SPDX-License-Identifier: AGPL-3.0-or-later\n\npragma solidity ^0.8.8;\n\n/// @title IPermissionCondition\n/// @author Aragon X - 2021-2023\n/// @notice An interface to be implemented to support custom permission logic.\n/// @dev To attach a condition to a permission, the `grantWithCondition` function must be used and refer to the implementing contract's address with the `condition` argument.\n/// @custom:security-contact sirt@aragon.org\ninterface IPermissionCondition {\n    /// @notice Checks if a call is permitted.\n    /// @param _where The address of the target contract.\n    /// @param _who The address (EOA or contract) for which the permissions are checked.\n    /// @param _permissionId The permission identifier.\n    /// @param _data Optional data passed to the `PermissionCondition` implementation.\n    /// @return isPermitted Returns true if the call is permitted.\n    function isGranted(\n        address _where,\n        address _who,\n        bytes32 _permissionId,\n        bytes calldata _data\n    ) external view returns (bool isPermitted);\n}\n"},{"file_path":"@aragon/osx-commons-contracts/src/executors/Executor.sol","source_code":"// SPDX-License-Identifier: AGPL-3.0-or-later\n\npragma solidity ^0.8.8;\n\nimport {ERC165} from \"@openzeppelin/contracts/utils/introspection/ERC165.sol\";\n\nimport {IExecutor, Action} from \"./IExecutor.sol\";\nimport {flipBit, hasBit} from \"../utils/math/BitMap.sol\";\n\n/// @title IDAO\n/// @author Aragon X - 2024\n/// @notice Simple Executor that loops through the actions and executes them.\n/// @dev This doesn't use any type of permission for execution and can be called by anyone.\n///      Most useful use-case is to deploy it as non-upgradeable and call from another contract via delegatecall.\n///      If used with delegatecall, DO NOT add state variables in sequential slots, otherwise this will overwrite\n///      the storage of the calling contract.\n/// @custom:security-contact sirt@aragon.org\ncontract Executor is IExecutor, ERC165 {\n    /// @notice The internal constant storing the maximal action array length.\n    uint256 internal constant MAX_ACTIONS = 256;\n\n    // keccak256(\"osx-commons.storage.Executor\")\n    bytes32 private constant REENTRANCY_GUARD_STORAGE_LOCATION =\n        0x4d6542319dfb3f7c8adbb488d7b4d7cf849381f14faf4b64de3ac05d08c0bdec;\n\n    /// @notice The first out of two values to which the `_reentrancyStatus` state variable (used by the `nonReentrant` modifier) can be set indicating that a function was not entered.\n    uint256 private constant _NOT_ENTERED = 1;\n\n    /// @notice The second out of two values to which the `_reentrancyStatus` state variable (used by the `nonReentrant` modifier) can be set indicating that a function was entered.\n    uint256 private constant _ENTERED = 2;\n\n    /// @notice Thrown if the action array length is larger than `MAX_ACTIONS`.\n    error TooManyActions();\n\n    /// @notice Thrown if an action has insufficient gas left.\n    error InsufficientGas();\n\n    /// @notice Thrown if action execution has failed.\n    /// @param index The index of the action in the action array that failed.\n    error ActionFailed(uint256 index);\n\n    /// @notice Thrown if a call is reentrant.\n    error ReentrantCall();\n\n    /// @notice Initializes the contract with a non-entered reentrancy status.\n    /// @dev Sets the reentrancy guard status to `_NOT_ENTERED` to prevent reentrant calls from the start.\n    constructor() {\n        _storeReentrancyStatus(_NOT_ENTERED);\n    }\n\n    /// @notice Prevents reentrant calls to a function.\n    /// @dev This modifier checks the reentrancy status before function execution. If already entered, it reverts with\n    ///      `ReentrantCall()`. Sets the status to `_ENTERED` during execution and resets it to `_NOT_ENTERED` afterward.\n    modifier nonReentrant() {\n        if (_getReentrancyStatus() == _ENTERED) {\n            revert ReentrantCall();\n        }\n\n        _storeReentrancyStatus(_ENTERED);\n\n        _;\n\n        _storeReentrancyStatus(_NOT_ENTERED);\n    }\n\n    /// @notice Checks if this or the parent contract supports an interface by its ID.\n    /// @param _interfaceId The ID of the interface.\n    /// @return Returns `true` if the interface is supported.\n    function supportsInterface(bytes4 _interfaceId) public view virtual override returns (bool) {\n        return _interfaceId == type(IExecutor).interfaceId || super.supportsInterface(_interfaceId);\n    }\n\n    /// @inheritdoc IExecutor\n    function execute(\n        bytes32 _callId,\n        Action[] memory _actions,\n        uint256 _allowFailureMap\n    )\n        public\n        virtual\n        override\n        nonReentrant\n        returns (bytes[] memory execResults, uint256 failureMap)\n    {\n        // Check that the action array length is within bounds.\n        if (_actions.length > MAX_ACTIONS) {\n            revert TooManyActions();\n        }\n\n        execResults = new bytes[](_actions.length);\n\n        uint256 gasBefore;\n        uint256 gasAfter;\n\n        for (uint256 i = 0; i < _actions.length; ) {\n            gasBefore = gasleft();\n\n            (bool success, bytes memory data) = _actions[i].to.call{value: _actions[i].value}(\n                _actions[i].data\n            );\n\n            gasAfter = gasleft();\n\n            // Check if failure is allowed\n            if (!success) {\n                if (!hasBit(_allowFailureMap, uint8(i))) {\n                    revert ActionFailed(i);\n                }\n\n                // Make sure that the action call did not fail because 63/64 of `gasleft()` was insufficient to execute the external call `.to.call` (see [ERC-150](https://eips.ethereum.org/EIPS/eip-150)).\n                // In specific scenarios, i.e. proposal execution where the last action in the action array is allowed to fail, the account calling `execute` could force-fail this action by setting a gas limit\n                // where 63/64 is insufficient causing the `.to.call` to fail, but where the remaining 1/64 gas are sufficient to successfully finish the `execute` call.\n                if (gasAfter < gasBefore / 64) {\n                    revert InsufficientGas();\n                }\n                // Store that this action failed.\n                failureMap = flipBit(failureMap, uint8(i));\n            }\n\n            execResults[i] = data;\n\n            unchecked {\n                ++i;\n            }\n        }\n\n        emit Executed({\n            actor: msg.sender,\n            callId: _callId,\n            actions: _actions,\n            allowFailureMap: _allowFailureMap,\n            failureMap: failureMap,\n            execResults: execResults\n        });\n    }\n\n    /// @notice Gets the current reentrancy status.\n    /// @return status This returns the current reentrancy status.\n    function _getReentrancyStatus() private view returns (uint256 status) {\n        // solhint-disable-next-line no-inline-assembly\n        assembly {\n            status := sload(REENTRANCY_GUARD_STORAGE_LOCATION)\n        }\n    }\n\n    /// @notice Stores the reentrancy status at a specific storage slot.\n    /// @param _status The reentrancy status to be stored, typically `_ENTERED` or `_NOT_ENTERED`.\n    /// @dev Uses inline assembly to store the `_status` value at `REENTRANCY_GUARD_STORAGE_LOCATION` to manage\n    ///      reentrancy status efficiently.\n    function _storeReentrancyStatus(uint256 _status) private {\n        // solhint-disable-next-line no-inline-assembly\n        assembly {\n            sstore(REENTRANCY_GUARD_STORAGE_LOCATION, _status)\n        }\n    }\n}\n"},{"file_path":"@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol","source_code":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/Address.sol)\n\npragma solidity ^0.8.1;\n\n/**\n * @dev Collection of functions related to the address type\n */\nlibrary AddressUpgradeable {\n    /**\n     * @dev Returns true if `account` is a contract.\n     *\n     * [IMPORTANT]\n     * ====\n     * It is unsafe to assume that an address for which this function returns\n     * false is an externally-owned account (EOA) and not a contract.\n     *\n     * Among others, `isContract` will return false for the following\n     * types of addresses:\n     *\n     *  - an externally-owned account\n     *  - a contract in construction\n     *  - an address where a contract will be created\n     *  - an address where a contract lived, but was destroyed\n     *\n     * Furthermore, `isContract` will also return true if the target contract within\n     * the same transaction is already scheduled for destruction by `SELFDESTRUCT`,\n     * which only has an effect at the end of a transaction.\n     * ====\n     *\n     * [IMPORTANT]\n     * ====\n     * You shouldn't rely on `isContract` to protect against flash loan attacks!\n     *\n     * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\n     * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\n     * constructor.\n     * ====\n     */\n    function isContract(address account) internal view returns (bool) {\n        // This method relies on extcodesize/address.code.length, which returns 0\n        // for contracts in construction, since the code is only stored at the end\n        // of the constructor execution.\n\n        return account.code.length > 0;\n    }\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.0/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\n     */\n    function sendValue(address payable recipient, uint256 amount) internal {\n        require(address(this).balance >= amount, \"Address: insufficient balance\");\n\n        (bool success, ) = recipient.call{value: amount}(\"\");\n        require(success, \"Address: unable to send value, recipient may have reverted\");\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, it is bubbled up by this\n     * function (like regular Solidity function calls).\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     * _Available since v3.1._\n     */\n    function functionCall(address target, bytes memory data) internal returns (bytes memory) {\n        return functionCallWithValue(target, data, 0, \"Address: low-level call failed\");\n    }\n\n    /**\n     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\n     * `errorMessage` as a fallback revert reason when `target` reverts.\n     *\n     * _Available since v3.1._\n     */\n    function functionCall(\n        address target,\n        bytes memory data,\n        string memory errorMessage\n    ) internal returns (bytes memory) {\n        return functionCallWithValue(target, data, 0, errorMessage);\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     * _Available since v3.1._\n     */\n    function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {\n        return functionCallWithValue(target, data, value, \"Address: low-level call with value failed\");\n    }\n\n    /**\n     * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\n     * with `errorMessage` as a fallback revert reason when `target` reverts.\n     *\n     * _Available since v3.1._\n     */\n    function functionCallWithValue(\n        address target,\n        bytes memory data,\n        uint256 value,\n        string memory errorMessage\n    ) internal returns (bytes memory) {\n        require(address(this).balance >= value, \"Address: insufficient balance for call\");\n        (bool success, bytes memory returndata) = target.call{value: value}(data);\n        return verifyCallResultFromTarget(target, success, returndata, errorMessage);\n    }\n\n    /**\n     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n     * but performing a static call.\n     *\n     * _Available since v3.3._\n     */\n    function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\n        return functionStaticCall(target, data, \"Address: low-level static call failed\");\n    }\n\n    /**\n     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\n     * but performing a static call.\n     *\n     * _Available since v3.3._\n     */\n    function functionStaticCall(\n        address target,\n        bytes memory data,\n        string memory errorMessage\n    ) internal view returns (bytes memory) {\n        (bool success, bytes memory returndata) = target.staticcall(data);\n        return verifyCallResultFromTarget(target, success, returndata, errorMessage);\n    }\n\n    /**\n     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n     * but performing a delegate call.\n     *\n     * _Available since v3.4._\n     */\n    function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\n        return functionDelegateCall(target, data, \"Address: low-level delegate call failed\");\n    }\n\n    /**\n     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\n     * but performing a delegate call.\n     *\n     * _Available since v3.4._\n     */\n    function functionDelegateCall(\n        address target,\n        bytes memory data,\n        string memory errorMessage\n    ) internal returns (bytes memory) {\n        (bool success, bytes memory returndata) = target.delegatecall(data);\n        return verifyCallResultFromTarget(target, success, returndata, errorMessage);\n    }\n\n    /**\n     * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling\n     * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.\n     *\n     * _Available since v4.8._\n     */\n    function verifyCallResultFromTarget(\n        address target,\n        bool success,\n        bytes memory returndata,\n        string memory errorMessage\n    ) internal view returns (bytes memory) {\n        if (success) {\n            if (returndata.length == 0) {\n                // only check isContract if the call was successful and the return data is empty\n                // otherwise we already know that it was a contract\n                require(isContract(target), \"Address: call to non-contract\");\n            }\n            return returndata;\n        } else {\n            _revert(returndata, errorMessage);\n        }\n    }\n\n    /**\n     * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the\n     * revert reason or using the provided one.\n     *\n     * _Available since v4.3._\n     */\n    function verifyCallResult(\n        bool success,\n        bytes memory returndata,\n        string memory errorMessage\n    ) internal pure returns (bytes memory) {\n        if (success) {\n            return returndata;\n        } else {\n            _revert(returndata, errorMessage);\n        }\n    }\n\n    function _revert(bytes memory returndata, string memory errorMessage) 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(errorMessage);\n        }\n    }\n}\n"},{"file_path":"@aragon/osx-commons-contracts/src/permission/PermissionLib.sol","source_code":"// SPDX-License-Identifier: AGPL-3.0-or-later\n\npragma solidity ^0.8.8;\n\n/// @title PermissionLib\n/// @author Aragon X - 2021-2023\n/// @notice A library containing objects for permission processing.\n/// @custom:security-contact sirt@aragon.org\nlibrary PermissionLib {\n    /// @notice A constant expressing that no condition is applied to a permission.\n    address public constant NO_CONDITION = address(0);\n\n    /// @notice The types of permission operations available in the `PermissionManager`.\n    /// @param Grant The grant operation setting a permission without a condition.\n    /// @param Revoke The revoke operation removing a permission (that was granted with or without a condition).\n    /// @param GrantWithCondition The grant operation setting a permission with a condition.\n    enum Operation {\n        Grant,\n        Revoke,\n        GrantWithCondition\n    }\n\n    /// @notice A struct containing the information for a permission to be applied on a single target contract without a condition.\n    /// @param operation The permission operation type.\n    /// @param who The address (EOA or contract) receiving the permission.\n    /// @param permissionId The permission identifier.\n    struct SingleTargetPermission {\n        Operation operation;\n        address who;\n        bytes32 permissionId;\n    }\n\n    /// @notice A struct containing the information for a permission to be applied on multiple target contracts, optionally, with a condition.\n    /// @param operation The permission operation type.\n    /// @param where The address of the target contract for which `who` receives permission.\n    /// @param who The address (EOA or contract) receiving the permission.\n    /// @param condition The `PermissionCondition` that will be asked for authorization on calls connected to the specified permission identifier.\n    /// @param permissionId The permission identifier.\n    struct MultiTargetPermission {\n        Operation operation;\n        address where;\n        address who;\n        address condition;\n        bytes32 permissionId;\n    }\n}\n"},{"file_path":"@openzeppelin/contracts-upgradeable/interfaces/draft-IERC1822Upgradeable.sol","source_code":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.5.0) (interfaces/draft-IERC1822.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev ERC1822: Universal Upgradeable Proxy Standard (UUPS) documents a method for upgradeability through a simplified\n * proxy whose upgrades are fully controlled by the current implementation.\n */\ninterface IERC1822ProxiableUpgradeable {\n    /**\n     * @dev Returns the storage slot that the proxiable contract assumes is being used to store the implementation\n     * address.\n     *\n     * IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks\n     * bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this\n     * function revert if invoked through a proxy.\n     */\n    function proxiableUUID() external view returns (bytes32);\n}\n"},{"file_path":"@openzeppelin/contracts/utils/introspection/ERC165.sol","source_code":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./IERC165.sol\";\n\n/**\n * @dev Implementation of the {IERC165} interface.\n *\n * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check\n * for the additional interface id that will be supported. For example:\n *\n * ```solidity\n * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\n *     return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);\n * }\n * ```\n *\n * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation.\n */\nabstract contract ERC165 is IERC165 {\n    /**\n     * @dev See {IERC165-supportsInterface}.\n     */\n    function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\n        return interfaceId == type(IERC165).interfaceId;\n    }\n}\n"},{"file_path":"@aragon/osx-commons-contracts/src/utils/versioning/VersionComparisonLib.sol","source_code":"// SPDX-License-Identifier: AGPL-3.0-or-later\n\npragma solidity ^0.8.8;\n\n/// @title VersionComparisonLib\n/// @author Aragon X - 2023\n/// @notice A library containing methods for [semantic version number](https://semver.org/spec/v2.0.0.html) comparison.\n/// @custom:security-contact sirt@aragon.org\nlibrary VersionComparisonLib {\n    /// @notice Equality comparator for two semantic version numbers.\n    /// @param lhs The left-hand side semantic version number.\n    /// @param rhs The right-hand side semantic version number.\n    /// @return Whether the two numbers are equal or not.\n    function eq(uint8[3] memory lhs, uint8[3] memory rhs) internal pure returns (bool) {\n        if (lhs[0] != rhs[0]) return false;\n\n        if (lhs[1] != rhs[1]) return false;\n\n        if (lhs[2] != rhs[2]) return false;\n\n        return true;\n    }\n\n    /// @notice Inequality comparator for two semantic version numbers.\n    /// @param lhs The left-hand side semantic version number.\n    /// @param rhs The right-hand side semantic version number.\n    /// @return Whether the two numbers are inequal or not.\n    function neq(uint8[3] memory lhs, uint8[3] memory rhs) internal pure returns (bool) {\n        if (lhs[0] != rhs[0]) return true;\n\n        if (lhs[1] != rhs[1]) return true;\n\n        if (lhs[2] != rhs[2]) return true;\n\n        return false;\n    }\n\n    /// @notice Less than comparator for two semantic version numbers.\n    /// @param lhs The left-hand side semantic version number.\n    /// @param rhs The right-hand side semantic version number.\n    /// @return Whether the first number is less than the second number or not.\n    function lt(uint8[3] memory lhs, uint8[3] memory rhs) internal pure returns (bool) {\n        if (lhs[0] < rhs[0]) return true;\n        if (lhs[0] > rhs[0]) return false;\n\n        if (lhs[1] < rhs[1]) return true;\n        if (lhs[1] > rhs[1]) return false;\n\n        if (lhs[2] < rhs[2]) return true;\n\n        return false;\n    }\n\n    /// @notice Less than or equal to comparator for two semantic version numbers.\n    /// @param lhs The left-hand side semantic version number.\n    /// @param rhs The right-hand side semantic version number.\n    /// @return Whether the first number is less than or equal to the second number or not.\n    function lte(uint8[3] memory lhs, uint8[3] memory rhs) internal pure returns (bool) {\n        if (lhs[0] < rhs[0]) return true;\n        if (lhs[0] > rhs[0]) return false;\n\n        if (lhs[1] < rhs[1]) return true;\n        if (lhs[1] > rhs[1]) return false;\n\n        if (lhs[2] <= rhs[2]) return true;\n\n        return false;\n    }\n\n    /// @notice Greater than comparator for two semantic version numbers.\n    /// @param lhs The left-hand side semantic version number.\n    /// @param rhs The right-hand side semantic version number.\n    /// @return Whether the first number is greater than the second number or not.\n    function gt(uint8[3] memory lhs, uint8[3] memory rhs) internal pure returns (bool) {\n        if (lhs[0] > rhs[0]) return true;\n        if (lhs[0] < rhs[0]) return false;\n\n        if (lhs[1] > rhs[1]) return true;\n        if (lhs[1] < rhs[1]) return false;\n\n        if (lhs[2] > rhs[2]) return true;\n\n        return false;\n    }\n\n    /// @notice Greater than or equal to comparator for two semantic version numbers.\n    /// @param lhs The left-hand side semantic version number.\n    /// @param rhs The right-hand side semantic version number.\n    /// @return Whether the first number is greater than or equal to the second number or not.\n    function gte(uint8[3] memory lhs, uint8[3] memory rhs) internal pure returns (bool) {\n        if (lhs[0] > rhs[0]) return true;\n        if (lhs[0] < rhs[0]) return false;\n\n        if (lhs[1] > rhs[1]) return true;\n        if (lhs[1] < rhs[1]) return false;\n\n        if (lhs[2] >= rhs[2]) return true;\n\n        return false;\n    }\n}\n"},{"file_path":"@aragon/osx-commons-contracts/src/utils/math/BitMap.sol","source_code":"// SPDX-License-Identifier: AGPL-3.0-or-later\n\npragma solidity ^0.8.8;\n\n/// @param bitmap The `uint256` representation of bits.\n/// @param index The index number to check whether 1 or 0 is set.\n/// @return Returns `true` if the bit is set at `index` on `bitmap`.\n/// @custom:security-contact sirt@aragon.org\nfunction hasBit(uint256 bitmap, uint8 index) pure returns (bool) {\n    uint256 bitValue = bitmap & (1 << index);\n    return bitValue > 0;\n}\n\n/// @param bitmap The `uint256` representation of bits.\n/// @param index The index number to set the bit.\n/// @return Returns a new number in which the bit is set at `index`.\n/// @custom:security-contact sirt@aragon.org\nfunction flipBit(uint256 bitmap, uint8 index) pure returns (uint256) {\n    return bitmap ^ (1 << index);\n}\n"},{"file_path":"@openzeppelin/contracts-upgradeable/utils/introspection/ERC165StorageUpgradeable.sol","source_code":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165Storage.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./ERC165Upgradeable.sol\";\nimport {Initializable} from \"../../proxy/utils/Initializable.sol\";\n\n/**\n * @dev Storage based implementation of the {IERC165} interface.\n *\n * Contracts may inherit from this and call {_registerInterface} to declare\n * their support of an interface.\n */\nabstract contract ERC165StorageUpgradeable is Initializable, ERC165Upgradeable {\n    /**\n     * @dev Mapping of interface ids to whether or not it's supported.\n     */\n    mapping(bytes4 => bool) private _supportedInterfaces;\n\n    function __ERC165Storage_init() internal onlyInitializing {\n    }\n\n    function __ERC165Storage_init_unchained() internal onlyInitializing {\n    }\n    /**\n     * @dev See {IERC165-supportsInterface}.\n     */\n    function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\n        return super.supportsInterface(interfaceId) || _supportedInterfaces[interfaceId];\n    }\n\n    /**\n     * @dev Registers the contract as an implementer of the interface defined by\n     * `interfaceId`. Support of the actual ERC165 interface is automatic and\n     * registering its interface id is not required.\n     *\n     * See {IERC165-supportsInterface}.\n     *\n     * Requirements:\n     *\n     * - `interfaceId` cannot be the ERC165 invalid interface (`0xffffffff`).\n     */\n    function _registerInterface(bytes4 interfaceId) internal virtual {\n        require(interfaceId != 0xffffffff, \"ERC165: invalid interface id\");\n        _supportedInterfaces[interfaceId] = true;\n    }\n\n    /**\n     * @dev This empty reserved space is put in place to allow future versions to add new\n     * variables without shifting down storage in the inheritance chain.\n     * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\n     */\n    uint256[49] private __gap;\n}\n"},{"file_path":"@openzeppelin/contracts/interfaces/IERC1271.sol","source_code":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (interfaces/IERC1271.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Interface of the ERC1271 standard signature validation method for\n * contracts as defined in https://eips.ethereum.org/EIPS/eip-1271[ERC-1271].\n *\n * _Available since v4.1._\n */\ninterface IERC1271 {\n    /**\n     * @dev Should return whether the signature provided is valid for the provided data\n     * @param hash      Hash of the data to be signed\n     * @param signature Signature byte array associated with _data\n     */\n    function isValidSignature(bytes32 hash, bytes memory signature) external view returns (bytes4 magicValue);\n}\n"},{"file_path":"@aragon/osx-commons-contracts/src/dao/IDAO.sol","source_code":"// SPDX-License-Identifier: AGPL-3.0-or-later\n\npragma solidity ^0.8.8;\n\n/// @title IDAO\n/// @author Aragon X - 2022-2024\n/// @notice The interface required for DAOs within the Aragon App DAO framework.\n/// @custom:security-contact sirt@aragon.org\ninterface IDAO {\n    /// @notice Checks if an address has permission on a contract via a permission identifier and considers if `ANY_ADDRESS` was used in the granting process.\n    /// @param _where The address of the contract.\n    /// @param _who The address of a EOA or contract to give the permissions.\n    /// @param _permissionId The permission identifier.\n    /// @param _data The optional data passed to the `PermissionCondition` registered.\n    /// @return Returns true if the address has permission, false if not.\n    function hasPermission(\n        address _where,\n        address _who,\n        bytes32 _permissionId,\n        bytes memory _data\n    ) external view returns (bool);\n\n    /// @notice Updates the DAO metadata (e.g., an IPFS hash).\n    /// @param _metadata The IPFS hash of the new metadata object.\n    function setMetadata(bytes calldata _metadata) external;\n\n    /// @notice Emitted when the DAO metadata is updated.\n    /// @param metadata The IPFS hash of the new metadata object.\n    event MetadataSet(bytes metadata);\n\n    /// @notice Emitted when a standard callback is registered.\n    /// @param interfaceId The ID of the interface.\n    /// @param callbackSelector The selector of the callback function.\n    /// @param magicNumber The magic number to be registered for the callback function selector.\n    event StandardCallbackRegistered(\n        bytes4 interfaceId,\n        bytes4 callbackSelector,\n        bytes4 magicNumber\n    );\n\n    /// @notice Deposits (native) tokens to the DAO contract with a reference string.\n    /// @param _token The address of the token or address(0) in case of the native token.\n    /// @param _amount The amount of tokens to deposit.\n    /// @param _reference The reference describing the deposit reason.\n    function deposit(address _token, uint256 _amount, string calldata _reference) external payable;\n\n    /// @notice Emitted when a token deposit has been made to the DAO.\n    /// @param sender The address of the sender.\n    /// @param token The address of the deposited token.\n    /// @param amount The amount of tokens deposited.\n    /// @param _reference The reference describing the deposit reason.\n    event Deposited(\n        address indexed sender,\n        address indexed token,\n        uint256 amount,\n        string _reference\n    );\n\n    /// @notice Emitted when a native token deposit has been made to the DAO.\n    /// @dev This event is intended to be emitted in the `receive` function and is therefore bound by the gas limitations for `send`/`transfer` calls introduced by [ERC-2929](https://eips.ethereum.org/EIPS/eip-2929).\n    /// @param sender The address of the sender.\n    /// @param amount The amount of native tokens deposited.\n    event NativeTokenDeposited(address sender, uint256 amount);\n\n    /// @notice Setter for the trusted forwarder verifying the meta transaction.\n    /// @param _trustedForwarder The trusted forwarder address.\n    function setTrustedForwarder(address _trustedForwarder) external;\n\n    /// @notice Getter for the trusted forwarder verifying the meta transaction.\n    /// @return The trusted forwarder address.\n    function getTrustedForwarder() external view returns (address);\n\n    /// @notice Emitted when a new TrustedForwarder is set on the DAO.\n    /// @dev Requires {UPDATE_STAGES_PERMISSION_ID}\n    /// @param forwarder the new forwarder address.\n    event TrustedForwarderSet(address forwarder);\n\n    /// @notice Checks whether a signature is valid for a provided hash according to [ERC-1271](https://eips.ethereum.org/EIPS/eip-1271).\n    /// @param _hash The hash of the data to be signed.\n    /// @param _signature The signature byte array associated with `_hash`.\n    /// @return Returns the `bytes4` magic value `0x1626ba7e` if the signature is valid and `0xffffffff` if not.\n    function isValidSignature(bytes32 _hash, bytes memory _signature) external returns (bytes4);\n\n    /// @notice Registers an ERC standard having a callback by registering its [ERC-165](https://eips.ethereum.org/EIPS/eip-165) interface ID and callback function signature.\n    /// @param _interfaceId The ID of the interface.\n    /// @param _callbackSelector The selector of the callback function.\n    /// @param _magicNumber The magic number to be registered for the function signature.\n    function registerStandardCallback(\n        bytes4 _interfaceId,\n        bytes4 _callbackSelector,\n        bytes4 _magicNumber\n    ) external;\n\n    /// @notice Removed function being left here to not corrupt the IDAO interface ID. Any call will revert.\n    /// @dev Introduced in v1.0.0. Removed in v1.4.0.\n    function setSignatureValidator(address) external;\n}\n"},{"file_path":"@openzeppelin/contracts-upgradeable/token/ERC1155/IERC1155ReceiverUpgradeable.sol","source_code":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC1155/IERC1155Receiver.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../../utils/introspection/IERC165Upgradeable.sol\";\n\n/**\n * @dev _Available since v3.1._\n */\ninterface IERC1155ReceiverUpgradeable is IERC165Upgradeable {\n    /**\n     * @dev Handles the receipt of a single ERC1155 token type. This function is\n     * called at the end of a `safeTransferFrom` after the balance has been updated.\n     *\n     * NOTE: To accept the transfer, this must return\n     * `bytes4(keccak256(\"onERC1155Received(address,address,uint256,uint256,bytes)\"))`\n     * (i.e. 0xf23a6e61, or its own function selector).\n     *\n     * @param operator The address which initiated the transfer (i.e. msg.sender)\n     * @param from The address which previously owned the token\n     * @param id The ID of the token being transferred\n     * @param value The amount of tokens being transferred\n     * @param data Additional data with no specified format\n     * @return `bytes4(keccak256(\"onERC1155Received(address,address,uint256,uint256,bytes)\"))` if transfer is allowed\n     */\n    function onERC1155Received(\n        address operator,\n        address from,\n        uint256 id,\n        uint256 value,\n        bytes calldata data\n    ) external returns (bytes4);\n\n    /**\n     * @dev Handles the receipt of a multiple ERC1155 token types. This function\n     * is called at the end of a `safeBatchTransferFrom` after the balances have\n     * been updated.\n     *\n     * NOTE: To accept the transfer(s), this must return\n     * `bytes4(keccak256(\"onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)\"))`\n     * (i.e. 0xbc197c81, or its own function selector).\n     *\n     * @param operator The address which initiated the batch transfer (i.e. msg.sender)\n     * @param from The address which previously owned the token\n     * @param ids An array containing ids of each token being transferred (order and length must match values array)\n     * @param values An array containing amounts of each token being transferred (order and length must match ids array)\n     * @param data Additional data with no specified format\n     * @return `bytes4(keccak256(\"onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)\"))` if transfer is allowed\n     */\n    function onERC1155BatchReceived(\n        address operator,\n        address from,\n        uint256[] calldata ids,\n        uint256[] calldata values,\n        bytes calldata data\n    ) external returns (bytes4);\n}\n"},{"file_path":"@aragon/osx-commons-contracts/src/permission/condition/PermissionCondition.sol","source_code":"// SPDX-License-Identifier: AGPL-3.0-or-later\n\npragma solidity ^0.8.8;\n\nimport {ERC165} from \"@openzeppelin/contracts/utils/introspection/ERC165.sol\";\n\nimport {IProtocolVersion} from \"../../utils/versioning/IProtocolVersion.sol\";\nimport {ProtocolVersion} from \"../../utils/versioning/ProtocolVersion.sol\";\nimport {IPermissionCondition} from \"./IPermissionCondition.sol\";\n\n/// @title PermissionCondition\n/// @author Aragon X - 2023\n/// @notice An abstract contract for non-upgradeable contracts instantiated via the `new` keyword  to inherit from to support customary permissions depending on arbitrary on-chain state.\n/// @custom:security-contact sirt@aragon.org\nabstract contract PermissionCondition is ERC165, IPermissionCondition, ProtocolVersion {\n    /// @notice Checks if an interface is supported by this or its parent contract.\n    /// @param _interfaceId The ID of the interface.\n    /// @return Returns `true` if the interface is supported.\n    function supportsInterface(bytes4 _interfaceId) public view virtual override returns (bool) {\n        return\n            _interfaceId == type(IPermissionCondition).interfaceId ||\n            _interfaceId == type(IProtocolVersion).interfaceId ||\n            super.supportsInterface(_interfaceId);\n    }\n}\n"},{"file_path":"@openzeppelin/contracts-upgradeable/token/ERC1155/IERC1155Upgradeable.sol","source_code":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC1155/IERC1155.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../../utils/introspection/IERC165Upgradeable.sol\";\n\n/**\n * @dev Required interface of an ERC1155 compliant contract, as defined in the\n * https://eips.ethereum.org/EIPS/eip-1155[EIP].\n *\n * _Available since v3.1._\n */\ninterface IERC1155Upgradeable is IERC165Upgradeable {\n    /**\n     * @dev Emitted when `value` tokens of token type `id` are transferred from `from` to `to` by `operator`.\n     */\n    event TransferSingle(address indexed operator, address indexed from, address indexed to, uint256 id, uint256 value);\n\n    /**\n     * @dev Equivalent to multiple {TransferSingle} events, where `operator`, `from` and `to` are the same for all\n     * transfers.\n     */\n    event TransferBatch(\n        address indexed operator,\n        address indexed from,\n        address indexed to,\n        uint256[] ids,\n        uint256[] values\n    );\n\n    /**\n     * @dev Emitted when `account` grants or revokes permission to `operator` to transfer their tokens, according to\n     * `approved`.\n     */\n    event ApprovalForAll(address indexed account, address indexed operator, bool approved);\n\n    /**\n     * @dev Emitted when the URI for token type `id` changes to `value`, if it is a non-programmatic URI.\n     *\n     * If an {URI} event was emitted for `id`, the standard\n     * https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[guarantees] that `value` will equal the value\n     * returned by {IERC1155MetadataURI-uri}.\n     */\n    event URI(string value, uint256 indexed id);\n\n    /**\n     * @dev Returns the amount of tokens of token type `id` owned by `account`.\n     *\n     * Requirements:\n     *\n     * - `account` cannot be the zero address.\n     */\n    function balanceOf(address account, uint256 id) external view returns (uint256);\n\n    /**\n     * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {balanceOf}.\n     *\n     * Requirements:\n     *\n     * - `accounts` and `ids` must have the same length.\n     */\n    function balanceOfBatch(\n        address[] calldata accounts,\n        uint256[] calldata ids\n    ) external view returns (uint256[] memory);\n\n    /**\n     * @dev Grants or revokes permission to `operator` to transfer the caller's tokens, according to `approved`,\n     *\n     * Emits an {ApprovalForAll} event.\n     *\n     * Requirements:\n     *\n     * - `operator` cannot be the caller.\n     */\n    function setApprovalForAll(address operator, bool approved) external;\n\n    /**\n     * @dev Returns true if `operator` is approved to transfer ``account``'s tokens.\n     *\n     * See {setApprovalForAll}.\n     */\n    function isApprovedForAll(address account, address operator) external view returns (bool);\n\n    /**\n     * @dev Transfers `amount` tokens of token type `id` from `from` to `to`.\n     *\n     * Emits a {TransferSingle} event.\n     *\n     * Requirements:\n     *\n     * - `to` cannot be the zero address.\n     * - If the caller is not `from`, it must have been approved to spend ``from``'s tokens via {setApprovalForAll}.\n     * - `from` must have a balance of tokens of type `id` of at least `amount`.\n     * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the\n     * acceptance magic value.\n     */\n    function safeTransferFrom(address from, address to, uint256 id, uint256 amount, bytes calldata data) external;\n\n    /**\n     * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {safeTransferFrom}.\n     *\n     * Emits a {TransferBatch} event.\n     *\n     * Requirements:\n     *\n     * - `ids` and `amounts` must have the same length.\n     * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the\n     * acceptance magic value.\n     */\n    function safeBatchTransferFrom(\n        address from,\n        address to,\n        uint256[] calldata ids,\n        uint256[] calldata amounts,\n        bytes calldata data\n    ) external;\n}\n"},{"file_path":"@openzeppelin/contracts-upgradeable/token/ERC721/IERC721ReceiverUpgradeable.sol","source_code":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC721/IERC721Receiver.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @title ERC721 token receiver interface\n * @dev Interface for any contract that wants to support safeTransfers\n * from ERC721 asset contracts.\n */\ninterface IERC721ReceiverUpgradeable {\n    /**\n     * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom}\n     * by `operator` from `from`, this function is called.\n     *\n     * It must return its Solidity selector to confirm the token transfer.\n     * If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted.\n     *\n     * The selector can be obtained in Solidity with `IERC721Receiver.onERC721Received.selector`.\n     */\n    function onERC721Received(\n        address operator,\n        address from,\n        uint256 tokenId,\n        bytes calldata data\n    ) external returns (bytes4);\n}\n"},{"file_path":"@openzeppelin/contracts-upgradeable/proxy/beacon/IBeaconUpgradeable.sol","source_code":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (proxy/beacon/IBeacon.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev This is the interface that {BeaconProxy} expects of its beacon.\n */\ninterface IBeaconUpgradeable {\n    /**\n     * @dev Must return an address that can be used as a delegate call target.\n     *\n     * {BeaconProxy} will check that this address is a contract.\n     */\n    function implementation() external view returns (address);\n}\n"},{"file_path":"@aragon/osx-commons-contracts/src/utils/versioning/ProtocolVersion.sol","source_code":"// SPDX-License-Identifier: AGPL-3.0-or-later\n\npragma solidity ^0.8.8;\n\nimport {IProtocolVersion} from \"./IProtocolVersion.sol\";\n\n/// @title ProtocolVersion\n/// @author Aragon X - 2023\n/// @notice An abstract, stateless, non-upgradeable contract providing the current Aragon OSx protocol version number.\n/// @dev Do not add any new variables to this contract that would shift down storage in the inheritance chain.\n/// @custom:security-contact sirt@aragon.org\nabstract contract ProtocolVersion is IProtocolVersion {\n    // IMPORTANT: Do not add any storage variable, see the above notice.\n\n    /// @inheritdoc IProtocolVersion\n    function protocolVersion() public pure returns (uint8[3] memory) {\n        return [1, 4, 0];\n    }\n}\n"},{"file_path":"@aragon/osx-commons-contracts/src/executors/IExecutor.sol","source_code":"// SPDX-License-Identifier: AGPL-3.0-or-later\n\npragma solidity ^0.8.8;\n\n/// @notice The action struct to be consumed by the DAO's `execute` function resulting in an external call.\n/// @param to The address to call.\n/// @param value The native token value to be sent with the call.\n/// @param data The bytes-encoded function selector and calldata for the call.\nstruct Action {\n    address to;\n    uint256 value;\n    bytes data;\n}\n\n/// @title IExecutor\n/// @author Aragon X - 2024\n/// @notice The interface required for Executors within the Aragon App DAO framework.\n/// @custom:security-contact sirt@aragon.org\ninterface IExecutor {\n    /// @notice Emitted when a proposal is executed.\n    /// @dev The value of `callId` is defined by the component/contract calling the execute function.\n    ///      A `Plugin` implementation can use it, for example, as a nonce.\n    /// @param actor The address of the caller.\n    /// @param callId The ID of the call.\n    /// @param actions The array of actions executed.\n    /// @param allowFailureMap The allow failure map encoding which actions are allowed to fail.\n    /// @param failureMap The failure map encoding which actions have failed.\n    /// @param execResults The array with the results of the executed actions.\n    event Executed(\n        address indexed actor,\n        bytes32 callId,\n        Action[] actions,\n        uint256 allowFailureMap,\n        uint256 failureMap,\n        bytes[] execResults\n    );\n\n    /// @notice Executes a list of actions. If a zero allow-failure map is provided, a failing action reverts the entire execution. If a non-zero allow-failure map is provided, allowed actions can fail without the entire call being reverted.\n    /// @param _callId The ID of the call. The definition of the value of `callId` is up to the calling contract and can be used, e.g., as a nonce.\n    /// @param _actions The array of actions.\n    /// @param _allowFailureMap A bitmap allowing execution to succeed, even if individual actions might revert. If the bit at index `i` is 1, the execution succeeds even if the `i`th action reverts. A failure map value of 0 requires every action to not revert.\n    /// @return The array of results obtained from the executed actions in `bytes`.\n    /// @return The resulting failure map containing the actions have actually failed.\n    function execute(\n        bytes32 _callId,\n        Action[] memory _actions,\n        uint256 _allowFailureMap\n    ) external returns (bytes[] memory, uint256);\n}\n"},{"file_path":"@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol","source_code":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (proxy/utils/UUPSUpgradeable.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../../interfaces/draft-IERC1822Upgradeable.sol\";\nimport \"../ERC1967/ERC1967UpgradeUpgradeable.sol\";\nimport {Initializable} from \"./Initializable.sol\";\n\n/**\n * @dev An upgradeability mechanism designed for UUPS proxies. The functions included here can perform an upgrade of an\n * {ERC1967Proxy}, when this contract is set as the implementation behind such a proxy.\n *\n * A security mechanism ensures that an upgrade does not turn off upgradeability accidentally, although this risk is\n * reinstated if the upgrade retains upgradeability but removes the security mechanism, e.g. by replacing\n * `UUPSUpgradeable` with a custom implementation of upgrades.\n *\n * The {_authorizeUpgrade} function must be overridden to include access restriction to the upgrade mechanism.\n *\n * _Available since v4.1._\n */\nabstract contract UUPSUpgradeable is Initializable, IERC1822ProxiableUpgradeable, ERC1967UpgradeUpgradeable {\n    /// @custom:oz-upgrades-unsafe-allow state-variable-immutable state-variable-assignment\n    address private immutable __self = address(this);\n\n    /**\n     * @dev Check that the execution is being performed through a delegatecall call and that the execution context is\n     * a proxy contract with an implementation (as defined in ERC1967) pointing to self. This should only be the case\n     * for UUPS and transparent proxies that are using the current contract as their implementation. Execution of a\n     * function through ERC1167 minimal proxies (clones) would not normally pass this test, but is not guaranteed to\n     * fail.\n     */\n    modifier onlyProxy() {\n        require(address(this) != __self, \"Function must be called through delegatecall\");\n        require(_getImplementation() == __self, \"Function must be called through active proxy\");\n        _;\n    }\n\n    /**\n     * @dev Check that the execution is not being performed through a delegate call. This allows a function to be\n     * callable on the implementing contract but not through proxies.\n     */\n    modifier notDelegated() {\n        require(address(this) == __self, \"UUPSUpgradeable: must not be called through delegatecall\");\n        _;\n    }\n\n    function __UUPSUpgradeable_init() internal onlyInitializing {\n    }\n\n    function __UUPSUpgradeable_init_unchained() internal onlyInitializing {\n    }\n    /**\n     * @dev Implementation of the ERC1822 {proxiableUUID} function. This returns the storage slot used by the\n     * implementation. It is used to validate the implementation's compatibility when performing an upgrade.\n     *\n     * IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks\n     * bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this\n     * function revert if invoked through a proxy. This is guaranteed by the `notDelegated` modifier.\n     */\n    function proxiableUUID() external view virtual override notDelegated returns (bytes32) {\n        return _IMPLEMENTATION_SLOT;\n    }\n\n    /**\n     * @dev Upgrade the implementation of the proxy to `newImplementation`.\n     *\n     * Calls {_authorizeUpgrade}.\n     *\n     * Emits an {Upgraded} event.\n     *\n     * @custom:oz-upgrades-unsafe-allow-reachable delegatecall\n     */\n    function upgradeTo(address newImplementation) public virtual onlyProxy {\n        _authorizeUpgrade(newImplementation);\n        _upgradeToAndCallUUPS(newImplementation, new bytes(0), false);\n    }\n\n    /**\n     * @dev Upgrade the implementation of the proxy to `newImplementation`, and subsequently execute the function call\n     * encoded in `data`.\n     *\n     * Calls {_authorizeUpgrade}.\n     *\n     * Emits an {Upgraded} event.\n     *\n     * @custom:oz-upgrades-unsafe-allow-reachable delegatecall\n     */\n    function upgradeToAndCall(address newImplementation, bytes memory data) public payable virtual onlyProxy {\n        _authorizeUpgrade(newImplementation);\n        _upgradeToAndCallUUPS(newImplementation, data, true);\n    }\n\n    /**\n     * @dev Function that should revert when `msg.sender` is not authorized to upgrade the contract. Called by\n     * {upgradeTo} and {upgradeToAndCall}.\n     *\n     * Normally, this function will use an xref:access.adoc[access control] modifier such as {Ownable-onlyOwner}.\n     *\n     * ```solidity\n     * function _authorizeUpgrade(address) internal override onlyOwner {}\n     * ```\n     */\n    function _authorizeUpgrade(address newImplementation) internal virtual;\n\n    /**\n     * @dev This empty reserved space is put in place to allow future versions to add new\n     * variables without shifting down storage in the inheritance chain.\n     * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\n     */\n    uint256[50] private __gap;\n}\n"},{"file_path":"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol","source_code":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (proxy/utils/Initializable.sol)\n\npragma solidity ^0.8.2;\n\nimport \"../../utils/AddressUpgradeable.sol\";\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 Indicates that the contract has been initialized.\n     * @custom:oz-retyped-from bool\n     */\n    uint8 private _initialized;\n\n    /**\n     * @dev Indicates that the contract is in the process of being initialized.\n     */\n    bool private _initializing;\n\n    /**\n     * @dev Triggered when the contract has been initialized or reinitialized.\n     */\n    event Initialized(uint8 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 functions marked with `initializer` can be nested in the context of a\n     * constructor.\n     *\n     * Emits an {Initialized} event.\n     */\n    modifier initializer() {\n        bool isTopLevelCall = !_initializing;\n        require(\n            (isTopLevelCall && _initialized < 1) || (!AddressUpgradeable.isContract(address(this)) && _initialized == 1),\n            \"Initializable: contract is already initialized\"\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 255 will prevent any future reinitialization.\n     *\n     * Emits an {Initialized} event.\n     */\n    modifier reinitializer(uint8 version) {\n        require(!_initializing && _initialized < version, \"Initializable: contract is already initialized\");\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        require(_initializing, \"Initializable: contract is not initializing\");\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        require(!_initializing, \"Initializable: contract is initializing\");\n        if (_initialized != type(uint8).max) {\n            _initialized = type(uint8).max;\n            emit Initialized(type(uint8).max);\n        }\n    }\n\n    /**\n     * @dev Returns the highest version that has been initialized. See {reinitializer}.\n     */\n    function _getInitializedVersion() internal view returns (uint8) {\n        return _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 _initializing;\n    }\n}\n"},{"file_path":"@openzeppelin/contracts-upgradeable/token/ERC20/extensions/IERC20PermitUpgradeable.sol","source_code":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.4) (token/ERC20/extensions/IERC20Permit.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in\n * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].\n *\n * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by\n * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't\n * need to send a transaction, and thus is not required to hold Ether at all.\n *\n * ==== Security Considerations\n *\n * There are two important considerations concerning the use of `permit`. The first is that a valid permit signature\n * expresses an allowance, and it should not be assumed to convey additional meaning. In particular, it should not be\n * considered as an intention to spend the allowance in any specific way. The second is that because permits have\n * built-in replay protection and can be submitted by anyone, they can be frontrun. A protocol that uses permits should\n * take this into consideration and allow a `permit` call to fail. Combining these two aspects, a pattern that may be\n * generally recommended is:\n *\n * ```solidity\n * function doThingWithPermit(..., uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s) public {\n *     try token.permit(msg.sender, address(this), value, deadline, v, r, s) {} catch {}\n *     doThing(..., value);\n * }\n *\n * function doThing(..., uint256 value) public {\n *     token.safeTransferFrom(msg.sender, address(this), value);\n *     ...\n * }\n * ```\n *\n * Observe that: 1) `msg.sender` is used as the owner, leaving no ambiguity as to the signer intent, and 2) the use of\n * `try/catch` allows the permit to fail and makes the code tolerant to frontrunning. (See also\n * {SafeERC20-safeTransferFrom}).\n *\n * Additionally, note that smart contract wallets (such as Argent or Safe) are not able to produce permit signatures, so\n * contracts should have entry points that don't rely on permit.\n */\ninterface IERC20PermitUpgradeable {\n    /**\n     * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens,\n     * given ``owner``'s signed approval.\n     *\n     * IMPORTANT: The same issues {IERC20-approve} has related to transaction\n     * ordering also apply here.\n     *\n     * Emits an {Approval} event.\n     *\n     * Requirements:\n     *\n     * - `spender` cannot be the zero address.\n     * - `deadline` must be a timestamp in the future.\n     * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner`\n     * over the EIP712-formatted function arguments.\n     * - the signature must use ``owner``'s current nonce (see {nonces}).\n     *\n     * For more information on the signature format, see the\n     * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP\n     * section].\n     *\n     * CAUTION: See Security Considerations above.\n     */\n    function permit(\n        address owner,\n        address spender,\n        uint256 value,\n        uint256 deadline,\n        uint8 v,\n        bytes32 r,\n        bytes32 s\n    ) external;\n\n    /**\n     * @dev Returns the current nonce for `owner`. This value must be\n     * included whenever a signature is generated for {permit}.\n     *\n     * Every successful call to {permit} increases ``owner``'s nonce by one. This\n     * prevents a signature from being used multiple times.\n     */\n    function nonces(address owner) external view returns (uint256);\n\n    /**\n     * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}.\n     */\n    // solhint-disable-next-line func-name-mixedcase\n    function DOMAIN_SEPARATOR() external view returns (bytes32);\n}\n"},{"file_path":"@openzeppelin/contracts-upgradeable/token/ERC20/utils/SafeERC20Upgradeable.sol","source_code":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.3) (token/ERC20/utils/SafeERC20.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../IERC20Upgradeable.sol\";\nimport \"../extensions/IERC20PermitUpgradeable.sol\";\nimport \"../../../utils/AddressUpgradeable.sol\";\n\n/**\n * @title SafeERC20\n * @dev Wrappers around ERC20 operations that throw on failure (when the token\n * contract returns false). Tokens that return no value (and instead revert or\n * throw on failure) are also supported, non-reverting calls are assumed to be\n * successful.\n * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,\n * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.\n */\nlibrary SafeERC20Upgradeable {\n    using AddressUpgradeable for address;\n\n    /**\n     * @dev Transfer `value` amount of `token` from the calling contract to `to`. If `token` returns no value,\n     * non-reverting calls are assumed to be successful.\n     */\n    function safeTransfer(IERC20Upgradeable token, address to, uint256 value) internal {\n        _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));\n    }\n\n    /**\n     * @dev Transfer `value` amount of `token` from `from` to `to`, spending the approval given by `from` to the\n     * calling contract. If `token` returns no value, non-reverting calls are assumed to be successful.\n     */\n    function safeTransferFrom(IERC20Upgradeable token, address from, address to, uint256 value) internal {\n        _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));\n    }\n\n    /**\n     * @dev Deprecated. This function has issues similar to the ones found in\n     * {IERC20-approve}, and its usage is discouraged.\n     *\n     * Whenever possible, use {safeIncreaseAllowance} and\n     * {safeDecreaseAllowance} instead.\n     */\n    function safeApprove(IERC20Upgradeable token, address spender, uint256 value) internal {\n        // safeApprove should only be called when setting an initial allowance,\n        // or when resetting it to zero. To increase and decrease it, use\n        // 'safeIncreaseAllowance' and 'safeDecreaseAllowance'\n        require(\n            (value == 0) || (token.allowance(address(this), spender) == 0),\n            \"SafeERC20: approve from non-zero to non-zero allowance\"\n        );\n        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));\n    }\n\n    /**\n     * @dev Increase the calling contract's allowance toward `spender` by `value`. If `token` returns no value,\n     * non-reverting calls are assumed to be successful.\n     */\n    function safeIncreaseAllowance(IERC20Upgradeable token, address spender, uint256 value) internal {\n        uint256 oldAllowance = token.allowance(address(this), spender);\n        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, oldAllowance + value));\n    }\n\n    /**\n     * @dev Decrease the calling contract's allowance toward `spender` by `value`. If `token` returns no value,\n     * non-reverting calls are assumed to be successful.\n     */\n    function safeDecreaseAllowance(IERC20Upgradeable token, address spender, uint256 value) internal {\n        unchecked {\n            uint256 oldAllowance = token.allowance(address(this), spender);\n            require(oldAllowance >= value, \"SafeERC20: decreased allowance below zero\");\n            _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, oldAllowance - value));\n        }\n    }\n\n    /**\n     * @dev Set the calling contract's allowance toward `spender` to `value`. If `token` returns no value,\n     * non-reverting calls are assumed to be successful. Meant to be used with tokens that require the approval\n     * to be set to zero before setting it to a non-zero value, such as USDT.\n     */\n    function forceApprove(IERC20Upgradeable token, address spender, uint256 value) internal {\n        bytes memory approvalCall = abi.encodeWithSelector(token.approve.selector, spender, value);\n\n        if (!_callOptionalReturnBool(token, approvalCall)) {\n            _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, 0));\n            _callOptionalReturn(token, approvalCall);\n        }\n    }\n\n    /**\n     * @dev Use a ERC-2612 signature to set the `owner` approval toward `spender` on `token`.\n     * Revert on invalid signature.\n     */\n    function safePermit(\n        IERC20PermitUpgradeable token,\n        address owner,\n        address spender,\n        uint256 value,\n        uint256 deadline,\n        uint8 v,\n        bytes32 r,\n        bytes32 s\n    ) internal {\n        uint256 nonceBefore = token.nonces(owner);\n        token.permit(owner, spender, value, deadline, v, r, s);\n        uint256 nonceAfter = token.nonces(owner);\n        require(nonceAfter == nonceBefore + 1, \"SafeERC20: permit did not succeed\");\n    }\n\n    /**\n     * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement\n     * on the return value: the return value is optional (but if data is returned, it must not be false).\n     * @param token The token targeted by the call.\n     * @param data The call data (encoded using abi.encode or one of its variants).\n     */\n    function _callOptionalReturn(IERC20Upgradeable token, bytes memory data) private {\n        // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since\n        // we're implementing it ourselves. We use {Address-functionCall} to perform this call, which verifies that\n        // the target address contains contract code and also asserts for success in the low-level call.\n\n        bytes memory returndata = address(token).functionCall(data, \"SafeERC20: low-level call failed\");\n        require(returndata.length == 0 || abi.decode(returndata, (bool)), \"SafeERC20: ERC20 operation did not succeed\");\n    }\n\n    /**\n     * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement\n     * on the return value: the return value is optional (but if data is returned, it must not be false).\n     * @param token The token targeted by the call.\n     * @param data The call data (encoded using abi.encode or one of its variants).\n     *\n     * This is a variant of {_callOptionalReturn} that silents catches all reverts and returns a bool instead.\n     */\n    function _callOptionalReturnBool(IERC20Upgradeable token, bytes memory data) private returns (bool) {\n        // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since\n        // we're implementing it ourselves. We cannot use {Address-functionCall} here since this should return false\n        // and not revert is the subcall reverts.\n\n        (bool success, bytes memory returndata) = address(token).call(data);\n        return\n            success && (returndata.length == 0 || abi.decode(returndata, (bool))) && AddressUpgradeable.isContract(address(token));\n    }\n}\n"},{"file_path":"@openzeppelin/contracts-upgradeable/utils/introspection/IERC165Upgradeable.sol","source_code":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Interface of the ERC165 standard, as defined in the\n * https://eips.ethereum.org/EIPS/eip-165[EIP].\n *\n * Implementers can declare support of contract interfaces, which can then be\n * queried by others ({ERC165Checker}).\n *\n * For an implementation, see {ERC165}.\n */\ninterface IERC165Upgradeable {\n    /**\n     * @dev Returns true if this contract implements the interface defined by\n     * `interfaceId`. See the corresponding\n     * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]\n     * to learn more about how these ids are created.\n     *\n     * This function call must use less than 30 000 gas.\n     */\n    function supportsInterface(bytes4 interfaceId) external view returns (bool);\n}\n"},{"file_path":"@aragon/osx-commons-contracts/src/utils/versioning/IProtocolVersion.sol","source_code":"// SPDX-License-Identifier: AGPL-3.0-or-later\n\npragma solidity ^0.8.8;\n\n/// @title IProtocolVersion\n/// @author Aragon X - 2022-2023\n/// @notice An interface defining the semantic Aragon OSx protocol version number.\n/// @custom:security-contact sirt@aragon.org\ninterface IProtocolVersion {\n    /// @notice Returns the semantic Aragon OSx protocol version number that the implementing contract is associated with.\n    /// @return _version Returns the semantic Aragon OSx protocol version number.\n    /// @dev This version number is not to be confused with the `release` and `build` numbers found in the `Version.Tag` struct inside the `PluginRepo` contract being used to version plugin setup and associated plugin implementation contracts.\n    function protocolVersion() external view returns (uint8[3] memory _version);\n}\n"},{"file_path":"src/core/dao/IEIP4824.sol","source_code":"// SPDX-License-Identifier: AGPL-3.0-or-later\n\npragma solidity ^0.8.8;\n\n/// @title EIP-4824 Common Interfaces for DAOs\n/// @dev See https://eips.ethereum.org/EIPS/eip-4824\n/// @author Aragon X - 2021-2023\n/// @custom:security-contact sirt@aragon.org\ninterface IEIP4824 {\n    /// @notice A distinct Uniform Resource Identifier (URI) pointing to a JSON object following the \"EIP-4824 DAO JSON-LD Schema\". This JSON file splits into four URIs: membersURI, proposalsURI, activityLogURI, and governanceURI. The membersURI should point to a JSON file that conforms to the \"EIP-4824 Members JSON-LD Schema\". The proposalsURI should point to a JSON file that conforms to the \"EIP-4824 Proposals JSON-LD Schema\". The activityLogURI should point to a JSON file that conforms to the \"EIP-4824 Activity Log JSON-LD Schema\". The governanceURI should point to a flatfile, normatively a .md file. Each of the JSON files named above can be statically hosted or dynamically-generated.\n    /// @return _daoURI The DAO URI.\n    function daoURI() external view returns (string memory _daoURI);\n}\n"},{"file_path":"src/core/permission/PermissionManager.sol","source_code":"// SPDX-License-Identifier: AGPL-3.0-or-later\n\npragma solidity ^0.8.8;\n\nimport \"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\";\nimport \"@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol\";\n\nimport {IPermissionCondition} from \"@aragon/osx-commons-contracts/src/permission/condition/IPermissionCondition.sol\";\nimport {PermissionCondition} from \"@aragon/osx-commons-contracts/src/permission/condition/PermissionCondition.sol\";\nimport {PermissionLib} from \"@aragon/osx-commons-contracts/src/permission/PermissionLib.sol\";\n\n/// @title PermissionManager\n/// @author Aragon X - 2021-2023\n/// @notice The abstract permission manager used in a DAO, its associated plugins, and other framework-related components.\n/// @custom:security-contact sirt@aragon.org\nabstract contract PermissionManager is Initializable {\n    using AddressUpgradeable for address;\n\n    /// @notice The ID of the permission required to call the `grant`, `grantWithCondition`, `revoke`, and `bulk` function.\n    bytes32 public constant ROOT_PERMISSION_ID = keccak256(\"ROOT_PERMISSION\");\n\n    /// @notice A special address encoding permissions that are valid for any address `who` or `where`.\n    address internal constant ANY_ADDR = address(type(uint160).max);\n\n    /// @notice A special address encoding if a permissions is not set and therefore not allowed.\n    address internal constant UNSET_FLAG = address(0);\n\n    /// @notice A special address encoding if a permission is allowed.\n    address internal constant ALLOW_FLAG = address(2);\n\n    /// @notice A mapping storing permissions as hashes (i.e., `permissionHash(where, who, permissionId)`) and their status encoded by an address (unset, allowed, or redirecting to a `PermissionCondition`).\n    mapping(bytes32 => address) internal permissionsHashed;\n\n    /// @notice Thrown if a call is unauthorized.\n    /// @param where The context in which the authorization reverted.\n    /// @param who The address (EOA or contract) missing the permission.\n    /// @param permissionId The permission identifier.\n    error Unauthorized(address where, address who, bytes32 permissionId);\n\n    /// @notice Thrown if a permission has been already granted with a different condition.\n    /// @dev This makes sure that condition on the same permission can not be overwriten by a different condition.\n    /// @param where The address of the target contract to grant `_who` permission to.\n    /// @param who The address (EOA or contract) to which the permission has already been granted.\n    /// @param permissionId The permission identifier.\n    /// @param currentCondition The current condition set for permissionId.\n    /// @param newCondition The new condition it tries to set for permissionId.\n    error PermissionAlreadyGrantedForDifferentCondition(\n        address where,\n        address who,\n        bytes32 permissionId,\n        address currentCondition,\n        address newCondition\n    );\n\n    /// @notice Thrown if a condition address is not a contract.\n    /// @param condition The address that is not a contract.\n    error ConditionNotAContract(IPermissionCondition condition);\n\n    /// @notice Thrown if a condition contract does not support the `IPermissionCondition` interface.\n    /// @param condition The address that is not a contract.\n    error ConditionInterfaceNotSupported(IPermissionCondition condition);\n\n    /// @notice Thrown for `ROOT_PERMISSION_ID` or `EXECUTE_PERMISSION_ID` permission grants where `who` or `where` is `ANY_ADDR`.\n    error PermissionsForAnyAddressDisallowed();\n\n    /// @notice Thrown for permission grants where `who` and `where` are both `ANY_ADDR`.\n    error AnyAddressDisallowedForWhoAndWhere();\n\n    /// @notice Thrown if `Operation.GrantWithCondition` is requested as an operation but the method does not support it.\n    error GrantWithConditionNotSupported();\n\n    /// @notice Emitted when a permission `permission` is granted in the context `here` to the address `_who` for the contract `_where`.\n    /// @param permissionId The permission identifier.\n    /// @param here The address of the context in which the permission is granted.\n    /// @param where The address of the target contract for which `_who` receives permission.\n    /// @param who The address (EOA or contract) receiving the permission.\n    /// @param condition The address `ALLOW_FLAG` for regular permissions or, alternatively, the `IPermissionCondition` contract implementation to be used.\n    event Granted(\n        bytes32 indexed permissionId,\n        address indexed here,\n        address where,\n        address indexed who,\n        address condition\n    );\n\n    /// @notice Emitted when a permission `permission` is revoked in the context `here` from the address `_who` for the contract `_where`.\n    /// @param permissionId The permission identifier.\n    /// @param here The address of the context in which the permission is revoked.\n    /// @param where The address of the target contract for which `_who` loses permission.\n    /// @param who The address (EOA or contract) losing the permission.\n    event Revoked(\n        bytes32 indexed permissionId,\n        address indexed here,\n        address where,\n        address indexed who\n    );\n\n    /// @notice A modifier to make functions on inheriting contracts authorized. Permissions to call the function are checked through this permission manager.\n    /// @param _permissionId The permission identifier required to call the method this modifier is applied to.\n    modifier auth(bytes32 _permissionId) {\n        _auth(_permissionId);\n        _;\n    }\n\n    /// @notice Initialization method to set the initial owner of the permission manager.\n    /// @dev The initial owner is granted the `ROOT_PERMISSION_ID` permission.\n    /// @param _initialOwner The initial owner of the permission manager.\n    function __PermissionManager_init(address _initialOwner) internal onlyInitializing {\n        _initializePermissionManager({_initialOwner: _initialOwner});\n    }\n\n    /// @notice Grants permission to an address to call methods in a contract guarded by an auth modifier with the specified permission identifier.\n    /// @dev Requires the `ROOT_PERMISSION_ID` permission.\n    /// @param _where The address of the target contract for which `_who` receives permission.\n    /// @param _who The address (EOA or contract) receiving the permission.\n    /// @param _permissionId The permission identifier.\n    /// @dev Note, that granting permissions with `_who` or `_where` equal to `ANY_ADDR` does not replace other permissions with specific `_who` and `_where` addresses that exist in parallel.\n    function grant(\n        address _where,\n        address _who,\n        bytes32 _permissionId\n    ) external virtual auth(ROOT_PERMISSION_ID) {\n        _grant({_where: _where, _who: _who, _permissionId: _permissionId});\n    }\n\n    /// @notice Grants permission to an address to call methods in a target contract guarded by an auth modifier with the specified permission identifier if the referenced condition permits it.\n    /// @dev Requires the `ROOT_PERMISSION_ID` permission\n    /// @param _where The address of the target contract for which `_who` receives permission.\n    /// @param _who The address (EOA or contract) receiving the permission.\n    /// @param _permissionId The permission identifier.\n    /// @param _condition The `PermissionCondition` that will be asked for authorization on calls connected to the specified permission identifier.\n    /// @dev Note, that granting permissions with `_who` or `_where` equal to `ANY_ADDR` does not replace other permissions with specific `_who` and `_where` addresses that exist in parallel.\n    function grantWithCondition(\n        address _where,\n        address _who,\n        bytes32 _permissionId,\n        IPermissionCondition _condition\n    ) external virtual auth(ROOT_PERMISSION_ID) {\n        _grantWithCondition({\n            _where: _where,\n            _who: _who,\n            _permissionId: _permissionId,\n            _condition: _condition\n        });\n    }\n\n    /// @notice Revokes permission from an address to call methods in a target contract guarded by an auth modifier with the specified permission identifier.\n    /// @dev Requires the `ROOT_PERMISSION_ID` permission.\n    /// @param _where The address of the target contract for which `_who` loses permission.\n    /// @param _who The address (EOA or contract) losing the permission.\n    /// @param _permissionId The permission identifier.\n    /// @dev Note, that revoking permissions with `_who` or `_where` equal to `ANY_ADDR` does not revoke other permissions with specific `_who` and `_where` addresses that exist in parallel.\n    function revoke(\n        address _where,\n        address _who,\n        bytes32 _permissionId\n    ) external virtual auth(ROOT_PERMISSION_ID) {\n        _revoke({_where: _where, _who: _who, _permissionId: _permissionId});\n    }\n\n    /// @notice Applies an array of permission operations on a single target contracts `_where`.\n    /// @param _where The address of the single target contract.\n    /// @param items The array of single-targeted permission operations to apply.\n    function applySingleTargetPermissions(\n        address _where,\n        PermissionLib.SingleTargetPermission[] calldata items\n    ) external virtual auth(ROOT_PERMISSION_ID) {\n        for (uint256 i; i < items.length; ) {\n            PermissionLib.SingleTargetPermission memory item = items[i];\n\n            if (item.operation == PermissionLib.Operation.Grant) {\n                _grant({_where: _where, _who: item.who, _permissionId: item.permissionId});\n            } else if (item.operation == PermissionLib.Operation.Revoke) {\n                _revoke({_where: _where, _who: item.who, _permissionId: item.permissionId});\n            } else if (item.operation == PermissionLib.Operation.GrantWithCondition) {\n                revert GrantWithConditionNotSupported();\n            }\n\n            unchecked {\n                ++i;\n            }\n        }\n    }\n\n    /// @notice Applies an array of permission operations on multiple target contracts `items[i].where`.\n    /// @param _items The array of multi-targeted permission operations to apply.\n    function applyMultiTargetPermissions(\n        PermissionLib.MultiTargetPermission[] calldata _items\n    ) external virtual auth(ROOT_PERMISSION_ID) {\n        for (uint256 i; i < _items.length; ) {\n            PermissionLib.MultiTargetPermission memory item = _items[i];\n\n            if (item.operation == PermissionLib.Operation.Grant) {\n                // Ensure a non-zero condition isn't passed, as `_grant` can't handle conditions.\n                // This avoids the false impression that a conditional grant occurred,\n                // since the transaction would still succeed without conditions.\n                if (item.condition != address(0)) {\n                    revert GrantWithConditionNotSupported();\n                }\n                _grant({_where: item.where, _who: item.who, _permissionId: item.permissionId});\n            } else if (item.operation == PermissionLib.Operation.Revoke) {\n                _revoke({_where: item.where, _who: item.who, _permissionId: item.permissionId});\n            } else if (item.operation == PermissionLib.Operation.GrantWithCondition) {\n                _grantWithCondition({\n                    _where: item.where,\n                    _who: item.who,\n                    _permissionId: item.permissionId,\n                    _condition: IPermissionCondition(item.condition)\n                });\n            }\n\n            unchecked {\n                ++i;\n            }\n        }\n    }\n\n    /// @notice Checks if the caller address has permission on the target contract via a permission identifier and relays the answer to a condition contract if this was declared during the granting process.\n    /// @param _where The address of the target contract for which `_who` receives permission.\n    /// @param _who The address (EOA or contract) for which the permission is checked.\n    /// @param _permissionId The permission identifier.\n    /// @param _data Optional data to be passed to the set `PermissionCondition`.\n    /// @return Returns true if `_who` has the permissions on the target contract via the specified permission identifier.\n    function isGranted(\n        address _where,\n        address _who,\n        bytes32 _permissionId,\n        bytes memory _data\n    ) public view virtual returns (bool) {\n        // Specific caller (`_who`) and target (`_where`) permission check\n        {\n            // This permission may have been granted directly via the `grant` function or with a condition via the `grantWithCondition` function.\n            address specificCallerTargetPermission = permissionsHashed[\n                permissionHash({_where: _where, _who: _who, _permissionId: _permissionId})\n            ];\n\n            // If the permission was granted directly, return `true`.\n            if (specificCallerTargetPermission == ALLOW_FLAG) return true;\n\n            // If the permission was granted with a condition, check the condition and return the result.\n            if (specificCallerTargetPermission != UNSET_FLAG) {\n                return\n                    _checkCondition({\n                        _condition: specificCallerTargetPermission,\n                        _where: _where,\n                        _who: _who,\n                        _permissionId: _permissionId,\n                        _data: _data\n                    });\n            }\n\n            // If this permission is not set, continue.\n        }\n\n        // Generic caller (`_who: ANY_ADDR`)\n        {\n            address genericCallerPermission = permissionsHashed[\n                permissionHash({_where: _where, _who: ANY_ADDR, _permissionId: _permissionId})\n            ];\n\n            // If the permission was granted directly to (`_who: ANY_ADDR`), return `true`.\n            if (genericCallerPermission == ALLOW_FLAG) return true;\n\n            // If the permission was granted with a condition, check the condition and return the result.\n            if (genericCallerPermission != UNSET_FLAG) {\n                return\n                    _checkCondition({\n                        _condition: genericCallerPermission,\n                        _where: _where,\n                        _who: _who,\n                        _permissionId: _permissionId,\n                        _data: _data\n                    });\n            }\n            // If this permission is not set, continue.\n        }\n\n        // Generic target (`_where: ANY_ADDR`) condition check\n        {\n            // This permission can only be granted in conjunction with a condition via the `grantWithCondition` function.\n            address genericTargetPermission = permissionsHashed[\n                permissionHash({_where: ANY_ADDR, _who: _who, _permissionId: _permissionId})\n            ];\n\n            // If the permission was granted with a condition, check the condition and return the result.\n            if (genericTargetPermission != UNSET_FLAG) {\n                return\n                    _checkCondition({\n                        _condition: genericTargetPermission,\n                        _where: _where,\n                        _who: _who,\n                        _permissionId: _permissionId,\n                        _data: _data\n                    });\n            }\n            // If this permission is not set, continue.\n        }\n\n        // No specific or generic permission applies to the `_who`, `_where`, `_permissionId`, so we return `false`.\n        return false;\n    }\n\n    /// @notice Relays the question if caller address has permission on target contract via a permission identifier to a condition contract.\n    /// @notice Checks a condition contract by doing an external call via try/catch.\n    /// @param _condition The condition contract that is called.\n    /// @param _where The address of the target contract for which `_who` receives permission.\n    /// @param _who The address (EOA or contract) owning the permission.\n    /// @param _permissionId The permission identifier.\n    /// @param _data Optional data to be passed to a referenced `PermissionCondition`.\n    /// @return Returns `true` if a caller (`_who`) has the permissions on the contract (`_where`) via the specified permission identifier.\n    /// @dev If the external call fails, we return `false`.\n    function _checkCondition(\n        address _condition,\n        address _where,\n        address _who,\n        bytes32 _permissionId,\n        bytes memory _data\n    ) internal view virtual returns (bool) {\n        // Try-catch to skip failures\n        try\n            IPermissionCondition(_condition).isGranted({\n                _where: _where,\n                _who: _who,\n                _permissionId: _permissionId,\n                _data: _data\n            })\n        returns (bool result) {\n            if (result) {\n                return true;\n            }\n        } catch {}\n        return false;\n    }\n\n    /// @notice Grants the `ROOT_PERMISSION_ID` permission to the initial owner during initialization of the permission manager.\n    /// @param _initialOwner The initial owner of the permission manager.\n    function _initializePermissionManager(address _initialOwner) internal {\n        _grant({_where: address(this), _who: _initialOwner, _permissionId: ROOT_PERMISSION_ID});\n    }\n\n    /// @notice This method is used in the external `grant` method of the permission manager.\n    /// @param _where The address of the target contract for which `_who` receives permission.\n    /// @param _who The address (EOA or contract) owning the permission.\n    /// @param _permissionId The permission identifier.\n    /// @dev Note, that granting permissions with `_who` or `_where` equal to `ANY_ADDR` does not replace other permissions with specific `_who` and `_where` addresses that exist in parallel.\n    function _grant(address _where, address _who, bytes32 _permissionId) internal virtual {\n        if (_where == ANY_ADDR) {\n            revert PermissionsForAnyAddressDisallowed();\n        }\n\n        if (_who == ANY_ADDR) {\n            if (\n                _permissionId == ROOT_PERMISSION_ID ||\n                isPermissionRestrictedForAnyAddr(_permissionId)\n            ) {\n                revert PermissionsForAnyAddressDisallowed();\n            }\n        }\n\n        bytes32 permHash = permissionHash({\n            _where: _where,\n            _who: _who,\n            _permissionId: _permissionId\n        });\n\n        address currentFlag = permissionsHashed[permHash];\n\n        // Means permHash is not currently set.\n        if (currentFlag == UNSET_FLAG) {\n            permissionsHashed[permHash] = ALLOW_FLAG;\n\n            emit Granted({\n                permissionId: _permissionId,\n                here: msg.sender,\n                where: _where,\n                who: _who,\n                condition: ALLOW_FLAG\n            });\n        }\n    }\n\n    /// @notice This method is used in the external `grantWithCondition` method of the permission manager.\n    /// @param _where The address of the target contract for which `_who` receives permission.\n    /// @param _who The address (EOA or contract) owning the permission.\n    /// @param _permissionId The permission identifier.\n    /// @param _condition An address either resolving to a `PermissionCondition` contract address or being the `ALLOW_FLAG` address (`address(2)`).\n    /// @dev Note, that granting permissions with `_who` or `_where` equal to `ANY_ADDR` does not replace other permissions with specific `_who` and `_where` addresses that exist in parallel.\n    function _grantWithCondition(\n        address _where,\n        address _who,\n        bytes32 _permissionId,\n        IPermissionCondition _condition\n    ) internal virtual {\n        address conditionAddr = address(_condition);\n\n        if (!conditionAddr.isContract()) {\n            revert ConditionNotAContract(_condition);\n        }\n\n        if (\n            !PermissionCondition(conditionAddr).supportsInterface(\n                type(IPermissionCondition).interfaceId\n            )\n        ) {\n            revert ConditionInterfaceNotSupported(_condition);\n        }\n\n        if (_where == ANY_ADDR && _who == ANY_ADDR) {\n            revert AnyAddressDisallowedForWhoAndWhere();\n        }\n\n        if (_where == ANY_ADDR || _who == ANY_ADDR) {\n            if (\n                _permissionId == ROOT_PERMISSION_ID ||\n                isPermissionRestrictedForAnyAddr(_permissionId)\n            ) {\n                revert PermissionsForAnyAddressDisallowed();\n            }\n        }\n\n        bytes32 permHash = permissionHash({\n            _where: _where,\n            _who: _who,\n            _permissionId: _permissionId\n        });\n\n        address currentCondition = permissionsHashed[permHash];\n\n        // Means permHash is not currently set.\n        if (currentCondition == UNSET_FLAG) {\n            permissionsHashed[permHash] = conditionAddr;\n\n            emit Granted({\n                permissionId: _permissionId,\n                here: msg.sender,\n                where: _where,\n                who: _who,\n                condition: conditionAddr\n            });\n        } else if (currentCondition != conditionAddr) {\n            // Revert if `permHash` is already granted, but uses a different condition.\n            // If we don't revert, we either should:\n            //   - allow overriding the condition on the same permission\n            //     which could be confusing whoever granted the same permission first\n            //   - or do nothing and succeed silently which could be confusing for the caller.\n            revert PermissionAlreadyGrantedForDifferentCondition({\n                where: _where,\n                who: _who,\n                permissionId: _permissionId,\n                currentCondition: currentCondition,\n                newCondition: conditionAddr\n            });\n        }\n    }\n\n    /// @notice This method is used in the public `revoke` method of the permission manager.\n    /// @param _where The address of the target contract for which `_who` receives permission.\n    /// @param _who The address (EOA or contract) owning the permission.\n    /// @param _permissionId The permission identifier.\n    /// @dev Note, that revoking permissions with `_who` or `_where` equal to `ANY_ADDR` does not revoke other permissions with specific `_who` and `_where` addresses that might have been granted in parallel.\n    function _revoke(address _where, address _who, bytes32 _permissionId) internal virtual {\n        bytes32 permHash = permissionHash({\n            _where: _where,\n            _who: _who,\n            _permissionId: _permissionId\n        });\n        if (permissionsHashed[permHash] != UNSET_FLAG) {\n            permissionsHashed[permHash] = UNSET_FLAG;\n\n            emit Revoked({permissionId: _permissionId, here: msg.sender, where: _where, who: _who});\n        }\n    }\n\n    /// @notice A private function to be used to check permissions on the permission manager contract (`address(this)`) itself.\n    /// @param _permissionId The permission identifier required to call the method this modifier is applied to.\n    function _auth(bytes32 _permissionId) internal view virtual {\n        if (!isGranted(address(this), msg.sender, _permissionId, msg.data)) {\n            revert Unauthorized({\n                where: address(this),\n                who: msg.sender,\n                permissionId: _permissionId\n            });\n        }\n    }\n\n    /// @notice Generates the hash for the `permissionsHashed` mapping obtained from the word \"PERMISSION\", the contract address, the address owning the permission, and the permission identifier.\n    /// @param _where The address of the target contract for which `_who` receives permission.\n    /// @param _who The address (EOA or contract) owning the permission.\n    /// @param _permissionId The permission identifier.\n    /// @return The permission hash.\n    function permissionHash(\n        address _where,\n        address _who,\n        bytes32 _permissionId\n    ) internal pure virtual returns (bytes32) {\n        return keccak256(abi.encodePacked(\"PERMISSION\", _who, _where, _permissionId));\n    }\n\n    /// @notice Decides if the granting permissionId is restricted when `_who == ANY_ADDR` or `_where == ANY_ADDR`.\n    /// @param _permissionId The permission identifier.\n    /// @return Whether or not the permission is restricted.\n    /// @dev By default, every permission is unrestricted and it is the derived contract's responsibility to override it. Note, that the `ROOT_PERMISSION_ID` is included and not required to be set it again.\n    function isPermissionRestrictedForAnyAddr(\n        bytes32 _permissionId\n    ) internal view virtual returns (bool) {\n        (_permissionId); // silence the warning.\n        return false;\n    }\n\n    /// @notice This empty reserved space is put in place to allow future versions to add new variables without shifting down storage in the inheritance chain (see [OpenZeppelin's guide about storage gaps](https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps)).\n    uint256[49] private __gap;\n}\n"},{"file_path":"@openzeppelin/contracts/utils/introspection/IERC165.sol","source_code":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Interface of the ERC165 standard, as defined in the\n * https://eips.ethereum.org/EIPS/eip-165[EIP].\n *\n * Implementers can declare support of contract interfaces, which can then be\n * queried by others ({ERC165Checker}).\n *\n * For an implementation, see {ERC165}.\n */\ninterface IERC165 {\n    /**\n     * @dev Returns true if this contract implements the interface defined by\n     * `interfaceId`. See the corresponding\n     * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]\n     * to learn more about how these ids are created.\n     *\n     * This function call must use less than 30 000 gas.\n     */\n    function supportsInterface(bytes4 interfaceId) external view returns (bool);\n}\n"}],"certified":false,"conflicting_implementations":null,"abi":[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"}],"name":"ActionFailed","type":"error"},{"inputs":[],"name":"AlreadyInitialized","type":"error"},{"inputs":[],"name":"AnyAddressDisallowedForWhoAndWhere","type":"error"},{"inputs":[{"internalType":"contract IPermissionCondition","name":"condition","type":"address"}],"name":"ConditionInterfaceNotSupported","type":"error"},{"inputs":[{"internalType":"contract IPermissionCondition","name":"condition","type":"address"}],"name":"ConditionNotAContract","type":"error"},{"inputs":[],"name":"FunctionRemoved","type":"error"},{"inputs":[],"name":"GrantWithConditionNotSupported","type":"error"},{"inputs":[],"name":"InsufficientGas","type":"error"},{"inputs":[{"internalType":"uint256","name":"expected","type":"uint256"},{"internalType":"uint256","name":"actual","type":"uint256"}],"name":"NativeTokenDepositAmountMismatch","type":"error"},{"inputs":[{"internalType":"address","name":"where","type":"address"},{"internalType":"address","name":"who","type":"address"},{"internalType":"bytes32","name":"permissionId","type":"bytes32"},{"internalType":"address","name":"currentCondition","type":"address"},{"internalType":"address","name":"newCondition","type":"address"}],"name":"PermissionAlreadyGrantedForDifferentCondition","type":"error"},{"inputs":[],"name":"PermissionsForAnyAddressDisallowed","type":"error"},{"inputs":[{"internalType":"uint8[3]","name":"protocolVersion","type":"uint8[3]"}],"name":"ProtocolVersionUpgradeNotSupported","type":"error"},{"inputs":[],"name":"ReentrantCall","type":"error"},{"inputs":[],"name":"TooManyActions","type":"error"},{"inputs":[{"internalType":"address","name":"where","type":"address"},{"internalType":"address","name":"who","type":"address"},{"internalType":"bytes32","name":"permissionId","type":"bytes32"}],"name":"Unauthorized","type":"error"},{"inputs":[{"internalType":"bytes4","name":"callbackSelector","type":"bytes4"},{"internalType":"bytes4","name":"magicNumber","type":"bytes4"}],"name":"UnknownCallback","type":"error"},{"inputs":[],"name":"ZeroAmount","type":"error"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"previousAdmin","type":"address"},{"indexed":false,"internalType":"address","name":"newAdmin","type":"address"}],"name":"AdminChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"beacon","type":"address"}],"name":"BeaconUpgraded","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"sender","type":"address"},{"indexed":true,"internalType":"bytes4","name":"sig","type":"bytes4"},{"indexed":false,"internalType":"bytes","name":"data","type":"bytes"}],"name":"CallbackReceived","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"sender","type":"address"},{"indexed":true,"internalType":"address","name":"token","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"string","name":"_reference","type":"string"}],"name":"Deposited","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"actor","type":"address"},{"indexed":false,"internalType":"bytes32","name":"callId","type":"bytes32"},{"components":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"indexed":false,"internalType":"struct Action[]","name":"actions","type":"tuple[]"},{"indexed":false,"internalType":"uint256","name":"allowFailureMap","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"failureMap","type":"uint256"},{"indexed":false,"internalType":"bytes[]","name":"execResults","type":"bytes[]"}],"name":"Executed","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"permissionId","type":"bytes32"},{"indexed":true,"internalType":"address","name":"here","type":"address"},{"indexed":false,"internalType":"address","name":"where","type":"address"},{"indexed":true,"internalType":"address","name":"who","type":"address"},{"indexed":false,"internalType":"address","name":"condition","type":"address"}],"name":"Granted","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint8","name":"version","type":"uint8"}],"name":"Initialized","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bytes","name":"metadata","type":"bytes"}],"name":"MetadataSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"sender","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"NativeTokenDeposited","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"string","name":"daoURI","type":"string"}],"name":"NewURI","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"permissionId","type":"bytes32"},{"indexed":true,"internalType":"address","name":"here","type":"address"},{"indexed":false,"internalType":"address","name":"where","type":"address"},{"indexed":true,"internalType":"address","name":"who","type":"address"}],"name":"Revoked","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bytes4","name":"interfaceId","type":"bytes4"},{"indexed":false,"internalType":"bytes4","name":"callbackSelector","type":"bytes4"},{"indexed":false,"internalType":"bytes4","name":"magicNumber","type":"bytes4"}],"name":"StandardCallbackRegistered","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"forwarder","type":"address"}],"name":"TrustedForwarderSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"implementation","type":"address"}],"name":"Upgraded","type":"event"},{"stateMutability":"nonpayable","type":"fallback"},{"inputs":[],"name":"EXECUTE_PERMISSION_ID","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"REGISTER_STANDARD_CALLBACK_PERMISSION_ID","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"ROOT_PERMISSION_ID","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"SET_METADATA_PERMISSION_ID","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"SET_TRUSTED_FORWARDER_PERMISSION_ID","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"UPGRADE_DAO_PERMISSION_ID","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"VALIDATE_SIGNATURE_PERMISSION_ID","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"components":[{"internalType":"enum PermissionLib.Operation","name":"operation","type":"uint8"},{"internalType":"address","name":"where","type":"address"},{"internalType":"address","name":"who","type":"address"},{"internalType":"address","name":"condition","type":"address"},{"internalType":"bytes32","name":"permissionId","type":"bytes32"}],"internalType":"struct PermissionLib.MultiTargetPermission[]","name":"_items","type":"tuple[]"}],"name":"applyMultiTargetPermissions","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_where","type":"address"},{"components":[{"internalType":"enum PermissionLib.Operation","name":"operation","type":"uint8"},{"internalType":"address","name":"who","type":"address"},{"internalType":"bytes32","name":"permissionId","type":"bytes32"}],"internalType":"struct PermissionLib.SingleTargetPermission[]","name":"items","type":"tuple[]"}],"name":"applySingleTargetPermissions","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"daoURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"},{"internalType":"string","name":"_reference","type":"string"}],"name":"deposit","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_callId","type":"bytes32"},{"components":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"internalType":"struct Action[]","name":"_actions","type":"tuple[]"},{"internalType":"uint256","name":"_allowFailureMap","type":"uint256"}],"name":"execute","outputs":[{"internalType":"bytes[]","name":"execResults","type":"bytes[]"},{"internalType":"uint256","name":"failureMap","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"getTrustedForwarder","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_where","type":"address"},{"internalType":"address","name":"_who","type":"address"},{"internalType":"bytes32","name":"_permissionId","type":"bytes32"}],"name":"grant","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_where","type":"address"},{"internalType":"address","name":"_who","type":"address"},{"internalType":"bytes32","name":"_permissionId","type":"bytes32"},{"internalType":"contract IPermissionCondition","name":"_condition","type":"address"}],"name":"grantWithCondition","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_where","type":"address"},{"internalType":"address","name":"_who","type":"address"},{"internalType":"bytes32","name":"_permissionId","type":"bytes32"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"hasPermission","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes","name":"_metadata","type":"bytes"},{"internalType":"address","name":"_initialOwner","type":"address"},{"internalType":"address","name":"_trustedForwarder","type":"address"},{"internalType":"string","name":"daoURI_","type":"string"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint8[3]","name":"_previousProtocolVersion","type":"uint8[3]"},{"internalType":"bytes","name":"_initData","type":"bytes"}],"name":"initializeFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_where","type":"address"},{"internalType":"address","name":"_who","type":"address"},{"internalType":"bytes32","name":"_permissionId","type":"bytes32"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"isGranted","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_hash","type":"bytes32"},{"internalType":"bytes","name":"_signature","type":"bytes"}],"name":"isValidSignature","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"protocolVersion","outputs":[{"internalType":"uint8[3]","name":"","type":"uint8[3]"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"proxiableUUID","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes4","name":"_interfaceId","type":"bytes4"},{"internalType":"bytes4","name":"_callbackSelector","type":"bytes4"},{"internalType":"bytes4","name":"_magicNumber","type":"bytes4"}],"name":"registerStandardCallback","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_where","type":"address"},{"internalType":"address","name":"_who","type":"address"},{"internalType":"bytes32","name":"_permissionId","type":"bytes32"}],"name":"revoke","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"newDaoURI","type":"string"}],"name":"setDaoURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes","name":"_metadata","type":"bytes"}],"name":"setMetadata","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"setSignatureValidator","outputs":[],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"address","name":"_newTrustedForwarder","type":"address"}],"name":"setTrustedForwarder","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newImplementation","type":"address"}],"name":"upgradeTo","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newImplementation","type":"address"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"upgradeToAndCall","outputs":[],"stateMutability":"payable","type":"function"},{"stateMutability":"payable","type":"receive"}],"is_changed_bytecode":false,"is_partially_verified":false,"constructor_args":null}