{"file_path":"src/StablecoinV2.sol","creation_status":"success","source_code":"// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.28;\n\nimport \"openzeppelin-contracts-upgradeable/contracts/utils/cryptography/SignatureCheckerUpgradeable.sol\";\nimport \"./libraries/EIP7598Constants.sol\";\nimport \"./Stablecoin.sol\";\n\ncontract StablecoinV2 is Stablecoin {\n\n    using ECDSAUpgradeable for bytes32;\n    using AddressUpgradeable for address;\n\n    // ============ Storage Layout ============\n    // Slot 359: _authorizationStates (mapping, 1 slot for the mapping pointer)\n    // Slot 360: eip7598EnableFlag (bool, 1 byte, packed in slot 360)\n    // Slot 361-408: __gap (48 slots reserved for future upgrades)\n    // ========================================\n\n    // State variable for tracking used authorization nonces\n    // This uses bytes32 nonces to allow for flexible nonce strategies\n    mapping(address => mapping(bytes32 => bool)) private _authorizationStates;\n    \n    bool public eip7598EnableFlag;\n\n    // Events\n    event AuthorizationUsed(address indexed authorizer, bytes32 indexed nonce);\n    event AuthorizationCanceled(address indexed authorizer, bytes32 indexed nonce);\n    event EIP7598Enabled();\n    event EIP7598Disabled();\n\n    /**\n     * @dev Throws if eip7598 is disabled.\n     */\n    modifier eip7598Enabled() {\n       require(eip7598EnableFlag, \"EIP7598 is disabled\");\n        _;\n    }\n\n    /**\n     * @dev Disable initializers for the implementation contract\n     */\n    constructor() {\n        _disableInitializers();\n    }\n\n    /**\n     * @dev Initialize the contract for V2 upgrade\n     */   \n    function initializeV2() public reinitializer(2) {  \n        eip7598EnableFlag = true;\n    }\n\n    /**\n    *  @dev enable eip7598 support\n     * Can only be called by the owner.\n     */\n    function enableEIP7598() external onlyOwner {\n        emit EIP7598Enabled();\n        eip7598EnableFlag = true;\n    }\n\n    /**\n    *  @dev disable eip7598 support\n     * Can only be called by the owner.\n     */\n    function disableEIP7598() external onlyOwner {\n        emit EIP7598Disabled();\n        eip7598EnableFlag = false;\n    }\n\n    /**\n     * @dev Execute a transfer with an authorization signature, backward-compatible with the ERC-3009 standard.\n     * @param from Payer's address (Authorizer)\n     * @param to Payee's address\n     * @param value Amount to transfer\n     * @param validAfter The time after which this is valid (unix time)\n     * @param validBefore The time before which this is valid (unix time)\n     * @param nonce Unique nonce for this authorization\n     * @param signature Signature bytes (EOA signature or EIP-1271 contract signature)\n     */\n    function transferWithAuthorization(\n        address from,\n        address to,\n        uint256 value,\n        uint256 validAfter,\n        uint256 validBefore,\n        bytes32 nonce,\n        bytes memory signature\n    ) external eip7598Enabled {\n        _transferOrReceiveWithAuthorization(EIP7598Constants.TRANSFER_WITH_AUTHORIZATION_TYPEHASH, from, to, value, validAfter, validBefore, nonce, signature);\n    }\n\n    /**\n     * @dev Execute a transfer with an authorization signature (EIP-7598)\n     * @param from Payer's address (Authorizer)\n     * @param to Payee's address\n     * @param value Amount to transfer\n     * @param validAfter The time after which this is valid (unix time)\n     * @param validBefore The time before which this is valid (unix time)\n     * @param nonce Unique nonce for this authorization\n     * @param v Signature bytes (EOA signature or EIP-1271 contract signature)\n     * @param r Signature bytes (EOA signature or EIP-1271 contract signature)\n     * @param s Signature bytes (EOA signature or EIP-1271 contract signature)\n     */\n    function transferWithAuthorization(\n        address from,\n        address to,\n        uint256 value,\n        uint256 validAfter,\n        uint256 validBefore,\n        bytes32 nonce,\n        uint8 v,\n        bytes32 r,\n        bytes32 s\n    ) external eip7598Enabled {\n        _transferOrReceiveWithAuthorization(EIP7598Constants.TRANSFER_WITH_AUTHORIZATION_TYPEHASH, from, to, value, validAfter, validBefore, nonce, abi.encodePacked(r, s, v));\n    }\n\n    /**\n    * @notice Receive a transfer with a signed authorization from the payer\n    * @dev This has an additional check to ensure that the payee's address matches\n    * the caller of this function to prevent front-running attacks. (See security\n    * considerations)\n    * @param from          Payer's address (Authorizer)\n    * @param to            Payee's address\n    * @param value         Amount to be transferred\n    * @param validAfter    The time after which this is valid (unix time)\n    * @param validBefore   The time before which this is valid (unix time)\n    * @param nonce         Unique nonce\n    * @param v Signature bytes (EOA signature or EIP-1271 contract signature)\n    * @param r Signature bytes (EOA signature or EIP-1271 contract signature)\n    * @param s Signature bytes (EOA signature or EIP-1271 contract signature)\n    */\n    function receiveWithAuthorization(\n        address from,\n        address to,\n        uint256 value,\n        uint256 validAfter,\n        uint256 validBefore,\n        bytes32 nonce,\n        uint8 v, \n        bytes32 r, \n        bytes32 s\n    ) external eip7598Enabled {\n        require(msg.sender == to, \"Caller must be the payee\");\n        _transferOrReceiveWithAuthorization(EIP7598Constants.RECEIVE_WITH_AUTHORIZATION_TYPEHASH, from, to, value, validAfter, validBefore, nonce, abi.encodePacked(r, s, v));\n    }\n\n     /**\n    * @notice Receive a transfer with a signed authorization from the payer\n    * @dev This has an additional check to ensure that the payee's address matches\n    * the caller of this function to prevent front-running attacks. (See security\n    * considerations)\n    * @param from          Payer's address (Authorizer)\n    * @param to            Payee's address\n    * @param value         Amount to be transferred\n    * @param validAfter    The time after which this is valid (unix time)\n    * @param validBefore   The time before which this is valid (unix time)\n    * @param nonce         Unique nonce\n    * @param signature     Unstructured bytes signature signed by an EOA wallet or a contract wallet\n    */\n    function receiveWithAuthorization(\n        address from,\n        address to,\n        uint256 value,\n        uint256 validAfter,\n        uint256 validBefore,\n        bytes32 nonce,\n        bytes memory signature\n    ) external eip7598Enabled {\n        require(msg.sender == to, \"Caller must be the payee\");\n        _transferOrReceiveWithAuthorization(EIP7598Constants.RECEIVE_WITH_AUTHORIZATION_TYPEHASH, from, to, value, validAfter, validBefore, nonce, signature);\n    }\n\n\n     /**\n     * @dev Check if an authorization has been used\n     * @param authorizer Address that provided the authorization\n     * @param nonce Nonce of the authorization\n     * @return True if the authorization has been used\n     */\n    function authorizationState(address authorizer, bytes32 nonce) external view returns (bool) {\n        return _authorizationStates[authorizer][nonce];\n    }\n\n    /**\n     * @dev Execute a transfer with an authorization signature (EIP-7598)\n     * @param from Payer's address (Authorizer)\n     * @param to Payee's address\n     * @param value Amount to transfer\n     * @param validAfter The time after which this is valid (unix time)\n     * @param validBefore The time before which this is valid (unix time)\n     * @param nonce Unique nonce for this authorization\n     * @param signature Signature bytes (EOA signature or EIP-1271 contract signature)\n     */\n    function _transferOrReceiveWithAuthorization(\n        bytes32 typeHash,\n        address from,\n        address to,\n        uint256 value,\n        uint256 validAfter,\n        uint256 validBefore,\n        bytes32 nonce,\n        bytes memory signature\n    ) internal {\n        // Validate time window\n        require(block.timestamp > validAfter, \"Authorization not yet valid\");\n        require(block.timestamp < validBefore, \"Authorization expired\");\n\n        // Validate nonce\n        require(!_authorizationStates[from][nonce], \"Authorization already used\");\n\n        // Build EIP-712 struct hash\n        bytes32 structHash = keccak256(\n            abi.encode(\n                typeHash,\n                from,\n                to,\n                value,\n                validAfter,\n                validBefore,\n                nonce\n            )\n        );\n\n        // Build EIP-712 digest\n        bytes32 digest = _hashTypedDataV4(structHash);\n\n        // Validate signature (supports both EOA and EIP-1271 smart contracts)\n        require(\n            SignatureCheckerUpgradeable.isValidSignatureNow(from, digest, signature),\n            \"Invalid signature\"\n        );\n\n        // Mark authorization as used\n        _authorizationStates[from][nonce] = true;\n        emit AuthorizationUsed(from, nonce);\n\n        // Execute the transfer\n        _transfer(from, to, value);\n    }\n\n    /**\n     * @dev Cancel an authorization before it's used\n     * @param authorizer Address that provided the authorization (must be msg.sender)\n     * @param nonce Nonce of the authorization to cancel\n     */\n    function cancelAuthorization(address authorizer, bytes32 nonce) external {\n        require(msg.sender == authorizer, \"Caller must be the authorizer\");\n        require(!_authorizationStates[authorizer][nonce], \"Authorization already used\");\n\n        _authorizationStates[authorizer][nonce] = true;\n        emit AuthorizationCanceled(authorizer, nonce);\n    }\n\n    /**\n     * @dev Gap for future upgrades\n     * \n     * Storage Layout for StablecoinV2:\n     * - Slot 359: _authorizationStates (mapping)\n     * - Slot 360: eip7598EnableFlag (bool)\n     * - Slot 361-408: __gap (48 slots)\n     * \n     * Total new slots used: 2\n     * Gap size: 48 (50 - 2 = 48)\n     * \n     * IMPORTANT: When adding new state variables in future upgrades (V3, V4, etc.):\n     * 1. Add new variables BEFORE this __gap\n     * 2. Reduce __gap size by the number of new slots used\n     * 3. Verify storage layout with `forge inspect StablecoinV3 storage-layout`\n     */\n    uint256[48] private __gap;\n}\n","deployed_bytecode":"0x608060405234801561000f575f5ffd5b5060043610610297575f3560e01c80638d1fdf2f11610161578063d505accf116100ca578063e3ee160e11610084578063e3ee160e14610572578063e4e9402314610585578063e94a010214610598578063ef55bec6146105d1578063f2fde38b146105e4578063fdc86aa0146105f7575f5ffd5b8063d505accf1461050c578063dd62ed3e1461051f578063df63d46a14610532578063dfdcfc3714610545578063e30c397814610559578063e3dcb6771461056a575f5ffd5b8063a0712d681161011b578063a0712d6814610493578063a457c2d7146104a6578063a9059cbb146104b9578063affed0e0146104cc578063cf092995146104d6578063d0516650146104e9575f5ffd5b80638d1fdf2f146104335780638da5cb5b1461044657806395d89b411461046b5780639a8a0592146104735780639c3dd17e1461047d5780639dcc9d2a1461048b575f5ffd5b806342966c681161020357806370a08231116101bd57806370a08231146103cd578063715018a6146103f557806379ba5097146103fd5780637ecebe00146104055780638456cb591461041857806388b7ab6314610420575f5ffd5b806342966c681461037857806345c8b1a61461038b5780634cd88b761461039e57806359fe232d146103b15780635c975abb146103b95780635cd8a76b146103c5575f5ffd5b80632959b545116102545780632959b54514610320578063313ce567146103335780633644e51514610342578063395093511461034a5780633f4ba83a1461035d57806340c10f1914610365575f5ffd5b806306fdde031461029b57806307c81df0146102b9578063095ea7b3146102ce57806318160ddd146102f157806323b872dd14610303578063268cbc2714610316575b5f5ffd5b6102a361060a565b6040516102b09190612853565b60405180910390f35b6102cc6102c7366004612865565b61069a565b005b6102e16102dc366004612892565b6106e5565b60405190151581526020016102b0565b6035545b6040519081526020016102b0565b6102e16103113660046128ba565b6106fe565b6102f56101665481565b6102e161032e3660046128f4565b610723565b604051601281526020016102b0565b6102f5610917565b6102e1610358366004612892565b610925565b6102cc610946565b6102e1610373366004612892565b610958565b6102e1610386366004612865565b610a08565b6102cc61039936600461292a565b610a5c565b6102cc6103ac3660046129ec565b610aae565b6102cc610ba5565b6101305460ff166102e1565b6102cc610be2565b6102f56103db36600461292a565b6001600160a01b03165f9081526033602052604090205490565b6102cc610c7d565b6102cc610cbb565b6102f561041336600461292a565b610d35565b6102cc610d52565b6102cc61042e366004612a51565b610d62565b6102cc61044136600461292a565b610e11565b60cc546001600160a01b03165b6040516001600160a01b0390911681526020016102b0565b6102a3610e7b565b6102f56101645481565b610168546102e19060ff1681565b6102cc610e8a565b6102e16104a1366004612865565b610edd565b6102e16104b4366004612892565b610f24565b6102e16104c7366004612892565b610fa9565b6102f56101635481565b6102cc6104e4366004612a51565b610fb6565b6102e16104f736600461292a565b6101626020525f908152604090205460ff1681565b6102cc61051a366004612af3565b611009565b6102f561052d366004612b59565b61116a565b6102e1610540366004612b8a565b611194565b61016554610453906001600160a01b031681565b60fe546001600160a01b0316610453565b6102cc611319565b6102cc610580366004612bb3565b611359565b6102cc610593366004612892565b6113fa565b6102e16105a6366004612892565b6001600160a01b03919091165f90815261016760209081526040808320938352929052205460ff1690565b6102cc6105df366004612bb3565b611520565b6102cc6105f236600461292a565b6115f5565b6102cc61060536600461292a565b611666565b60606036805461061990612c2e565b80601f016020809104026020016040519081016040528092919081815260200182805461064590612c2e565b80156106905780601f1061066757610100808354040283529160200191610690565b820191905f5260205f20905b81548152906001019060200180831161067357829003601f168201915b5050505050905090565b6106a2611700565b6101665460408051918252602082018390527f7a50a7cdd0cb8b1a12f7b5a18d811b9c8b415e05a60a875a6f917c2f465e97a8910160405180910390a161016655565b5f336106f281858561175a565b60019150505b92915050565b5f3361070b85828561180a565b610716858585611882565b60019150505b9392505050565b5f61072c61192b565b6001600160a01b0385165f90815261016260205260409020548590819060ff161561077b57604051631d6e3c0160e21b81526001600160a01b0390911660048201526024015b60405180910390fd5b506101655433906001600160a01b031681146107b657604051635c0d8a7360e01b81526001600160a01b039091166004820152602401610772565b5061016354841484906107df57604051632c4dce9b60e21b815260040161077291815260200190565b5061016454831483906108085760405163331003b360e01b815260040161077291815260200190565b50848061082b57604051633728b83d60e01b815260040161077291815260200190565b506101665485908181101561085c5760405163494d91e960e01b815260048101929092526024820152604401610772565b50506101638054905f61086e83612c74565b919050555061087d8686611972565b6040518581526001600160a01b0387169033907fab8530f87dc9b59234c4623bf917212bb2536d647574c8e7e5da92c2ede0c9f89060200160405180910390a3836001600160a01b038716336001600160a01b03167fecc1c2abe0b9e5b2981c11ea4430f5223ef5082cc28f017c458dbb273aed8e128860405161090391815260200190565b60405180910390a450600195945050505050565b5f610920611a32565b905090565b5f336106f2818585610937838361116a565b6109419190612c8c565b61175a565b61094e611700565b610956611aab565b565b5f61096161192b565b6001600160a01b0383165f90815261016260205260409020548390819060ff16156109ab57604051631d6e3c0160e21b81526001600160a01b039091166004820152602401610772565b506109b4611700565b6109be8484611972565b6040518381526001600160a01b0385169033907fab8530f87dc9b59234c4623bf917212bb2536d647574c8e7e5da92c2ede0c9f89060200160405180910390a35060019392505050565b5f610a11611700565b610a1b3383611afe565b604051828152339081907fbac40739b0d4ca32fa2d82fc91630465ba3eddd1598da6fca393b26fb63b9453906020015b60405180910390a35060015b919050565b610a64611700565b6001600160a01b0381165f8181526101626020526040808220805460ff191690555133917f4f3ab9ff0cc4f039268532098e01239544b0420171876e36889d01c62c784c7991a350565b5f54610100900460ff1615808015610acc57505f54600160ff909116105b80610ae55750303b158015610ae557505f5460ff166001145b610b015760405162461bcd60e51b815260040161077290612c9f565b5f805460ff191660011790558015610b22575f805461ff0019166101001790555b610b2a611c30565b610b348383611c56565b610b3d83611c86565b610b45611ccf565b610b4d611cfd565b610b5633611d2b565b46610164558015610ba0575f805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b505050565b610bad611700565b6040517f6573fec281b973b363d1f2e4f1316ce545dd5bcd1e23d0dd23273082a15bc0c1905f90a1610168805460ff19169055565b5f54600290610100900460ff16158015610c0257505f5460ff8083169116105b610c1e5760405162461bcd60e51b815260040161077290612c9f565b5f8054610168805460ff1916600117905561ffff191660ff83169081176101001761ff0019169091556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a150565b610c85611700565b60405162461bcd60e51b815260206004820152600b60248201526a155b9cdd5c1c1bdc9d195960aa1b6044820152606401610772565b60fe5433906001600160a01b03168114610d295760405162461bcd60e51b815260206004820152602960248201527f4f776e61626c6532537465703a2063616c6c6572206973206e6f7420746865206044820152683732bb9037bbb732b960b91b6064820152608401610772565b610d3281611d51565b50565b6001600160a01b0381165f908152609960205260408120546106f8565b610d5a611700565b610956611d6a565b6101685460ff16610d855760405162461bcd60e51b815260040161077290612ced565b336001600160a01b03871614610dd85760405162461bcd60e51b815260206004820152601860248201527743616c6c6572206d7573742062652074686520706179656560401b6044820152606401610772565b610e087fd099cc98ef71107a616c4f0f941f04c322d8e254fe26b3c6668db87aae413de888888888888888611da8565b50505050505050565b610e19611700565b6001600160a01b0381165f81815261016260205260409020805460ff19166001179055610e433390565b6001600160a01b03167f51d18786e9cb144f87d46e7b796309ea84c7c687d91e09c97f051eacf59bc52860405160405180910390a350565b60606037805461061990612c2e565b610e92611700565b610165546040515f916001600160a01b0316907f4dcfbb802c3ce803612559160f5d70539a491b5d0064b0d4d326788f0dec2730908390a361016580546001600160a01b0319169055565b5f610ee6611700565b610ef03383611972565b604051828152339081907fab8530f87dc9b59234c4623bf917212bb2536d647574c8e7e5da92c2ede0c9f890602001610a4b565b5f3381610f31828661116a565b905083811015610f915760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b6064820152608401610772565b610f9e828686840361175a565b506001949350505050565b5f336106f2818585611882565b6101685460ff16610fd95760405162461bcd60e51b815260040161077290612ced565b610e087f7c7c6cdb67a18743f49ec6fa9b35f50d52ed05cbed4cc592e13b44501c1a226788888888888888611da8565b834211156110595760405162461bcd60e51b815260206004820152601d60248201527f45524332305065726d69743a206578706972656420646561646c696e650000006044820152606401610772565b5f7f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c98888886110878c611fc1565b6040805160208101969096526001600160a01b0394851690860152929091166060840152608083015260a082015260c0810186905260e0016040516020818303038152906040528051906020012090505f6110e182611fe8565b90505f6110f082878787612034565b9050896001600160a01b0316816001600160a01b0316146111535760405162461bcd60e51b815260206004820152601e60248201527f45524332305065726d69743a20696e76616c6964207369676e617475726500006044820152606401610772565b61115e8a8a8a61175a565b50505050505050505050565b6001600160a01b039182165f90815260346020908152604080832093909416825291909152205490565b5f61119d61192b565b6101655433906001600160a01b031681146111d757604051635c0d8a7360e01b81526001600160a01b039091166004820152602401610772565b50610163548314839061120057604051632c4dce9b60e21b815260040161077291815260200190565b5061016454821482906112295760405163331003b360e01b815260040161077291815260200190565b50838061124c57604051633728b83d60e01b815260040161077291815260200190565b506101638054905f61125d83612c74565b91905055505f61127560cc546001600160a01b031690565b90506112818186611afe565b610165546040518681526001600160a01b038381169216907fbac40739b0d4ca32fa2d82fc91630465ba3eddd1598da6fca393b26fb63b94539060200160405180910390a36101655460405186815285916001600160a01b03848116929116907f9a38373a0903562b0424db0a574e0d2fe56b79cc9e0f488a89d7bd3f28082bd49060200160405180910390a4506001949350505050565b611321611700565b6040517f1f884f64c35e7b573cb0a8d4233f7730f243fdea728f7dadf858d0f151fb9e94905f90a1610168805460ff19166001179055565b6101685460ff1661137c5760405162461bcd60e51b815260040161077290612ced565b6113ef7f7c7c6cdb67a18743f49ec6fa9b35f50d52ed05cbed4cc592e13b44501c1a22675f1b8a8a8a8a8a8a89898c6040516020016113db93929190928352602083019190915260f81b6001600160f81b031916604082015260410190565b604051602081830303815290604052611da8565b505050505050505050565b336001600160a01b038316146114525760405162461bcd60e51b815260206004820152601d60248201527f43616c6c6572206d7573742062652074686520617574686f72697a65720000006044820152606401610772565b6001600160a01b0382165f9081526101676020908152604080832084845290915290205460ff16156114c65760405162461bcd60e51b815260206004820152601a60248201527f417574686f72697a6174696f6e20616c726561647920757365640000000000006044820152606401610772565b6001600160a01b0382165f81815261016760209081526040808320858452909152808220805460ff19166001179055518392917f1cdd46ff242716cdaa72d159d339a485b3438398348d68f09d7c8c0a59353d8191a35050565b6101685460ff166115435760405162461bcd60e51b815260040161077290612ced565b336001600160a01b038916146115965760405162461bcd60e51b815260206004820152601860248201527743616c6c6572206d7573742062652074686520706179656560401b6044820152606401610772565b6113ef7fd099cc98ef71107a616c4f0f941f04c322d8e254fe26b3c6668db87aae413de85f1b8a8a8a8a8a8a89898c6040516020016113db93929190928352602083019190915260f81b6001600160f81b031916604082015260410190565b6115fd611700565b60fe80546001600160a01b0383166001600160a01b0319909116811790915561162e60cc546001600160a01b031690565b6001600160a01b03167f38d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e2270060405160405180910390a350565b61166e611700565b806001600160a01b0381166116a2576040516303d0181b60e31b81526001600160a01b039091166004820152602401610772565b50610165546040516001600160a01b038084169216907f4dcfbb802c3ce803612559160f5d70539a491b5d0064b0d4d326788f0dec2730905f90a361016580546001600160a01b0319166001600160a01b0392909216919091179055565b60cc546001600160a01b031633146109565760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610772565b61176261192b565b6001600160a01b0383165f90815261016260205260409020548390819060ff16156117ac57604051631d6e3c0160e21b81526001600160a01b039091166004820152602401610772565b506001600160a01b0383165f90815261016260205260409020548390819060ff16156117f757604051631d6e3c0160e21b81526001600160a01b039091166004820152602401610772565b5061180385858561205a565b5050505050565b5f611815848461116a565b90505f19811461187c578181101561186f5760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e63650000006044820152606401610772565b61187c848484840361175a565b50505050565b61188a61192b565b6001600160a01b0383165f90815261016260205260409020548390819060ff16156118d457604051631d6e3c0160e21b81526001600160a01b039091166004820152602401610772565b506001600160a01b0383165f90815261016260205260409020548390819060ff161561191f57604051631d6e3c0160e21b81526001600160a01b039091166004820152602401610772565b5061180385858561217d565b6101305460ff16156109565760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606401610772565b6001600160a01b0382166119c85760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152606401610772565b8060355f8282546119d99190612c8c565b90915550506001600160a01b0382165f818152603360209081526040808320805486019055518481527fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a35b5050565b5f6109207f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f611a6060655490565b6066546040805160208101859052908101839052606081018290524660808201523060a08201525f9060c0016040516020818303038152906040528051906020012090509392505050565b611ab3612326565b610130805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b6001600160a01b038216611b5e5760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f206164647265736044820152607360f81b6064820152608401610772565b6001600160a01b0382165f9081526033602052604090205481811015611bd15760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e604482015261636560f01b6064820152608401610772565b6001600160a01b0383165f8181526033602090815260408083208686039055603580548790039055518581529192917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a3505050565b5f54610100900460ff166109565760405162461bcd60e51b815260040161077290612d1a565b5f54610100900460ff16611c7c5760405162461bcd60e51b815260040161077290612d1a565b611a2e8282612370565b5f54610100900460ff16611cac5760405162461bcd60e51b815260040161077290612d1a565b610d3281604051806040016040528060018152602001603160f81b8152506123af565b5f54610100900460ff16611cf55760405162461bcd60e51b815260040161077290612d1a565b6109566123ef565b5f54610100900460ff16611d235760405162461bcd60e51b815260040161077290612d1a565b61095661241e565b5f54610100900460ff1661166e5760405162461bcd60e51b815260040161077290612d1a565b60fe80546001600160a01b0319169055610d3281612451565b611d7261192b565b610130805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258611ae13390565b834211611df75760405162461bcd60e51b815260206004820152601b60248201527f417574686f72697a6174696f6e206e6f74207965742076616c696400000000006044820152606401610772565b824210611e3e5760405162461bcd60e51b8152602060048201526015602482015274105d5d1a1bdc9a5e985d1a5bdb88195e1c1a5c9959605a1b6044820152606401610772565b6001600160a01b0387165f9081526101676020908152604080832085845290915290205460ff1615611eb25760405162461bcd60e51b815260206004820152601a60248201527f417574686f72697a6174696f6e20616c726561647920757365640000000000006044820152606401610772565b6040805160208082018b90526001600160a01b038a811683850152891660608301526080820188905260a0820187905260c0820186905260e08083018690528351808403909101815261010090920190925280519101205f611f1382611fe8565b9050611f208982856124a2565b611f605760405162461bcd60e51b8152602060048201526011602482015270496e76616c6964207369676e617475726560781b6044820152606401610772565b6001600160a01b0389165f81815261016760209081526040808320888452909152808220805460ff19166001179055518692917f98de503528ee59b575ef0c0a2576a82497bfc029a5685b209e9ec333479b10a591a361115e898989611882565b6001600160a01b0381165f9081526099602052604090208054600181018255905b50919050565b5f6106f8611ff4611a32565b8360405161190160f01b602082015260228101839052604281018290525f9060620160405160208183030381529060405280519060200120905092915050565b5f5f5f612043878787876125dd565b915091506120508161269a565b5095945050505050565b6001600160a01b0383166120bc5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610772565b6001600160a01b03821661211d5760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610772565b6001600160a01b038381165f8181526034602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b0383166121e15760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401610772565b6001600160a01b0382166122435760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610772565b6001600160a01b0383165f90815260336020526040902054818110156122ba5760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b6064820152608401610772565b6001600160a01b038085165f8181526033602052604080822086860390559286168082529083902080548601905591517fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef906123199086815260200190565b60405180910390a361187c565b6101305460ff166109565760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b6044820152606401610772565b5f54610100900460ff166123965760405162461bcd60e51b815260040161077290612d1a565b60366123a28382612da9565b506037610ba08282612da9565b5f54610100900460ff166123d55760405162461bcd60e51b815260040161077290612d1a565b815160209283012081519190920120606591909155606655565b5f54610100900460ff166124155760405162461bcd60e51b815260040161077290612d1a565b61095633611d51565b5f54610100900460ff166124445760405162461bcd60e51b815260040161077290612d1a565b610130805460ff19169055565b60cc80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0905f90a35050565b5f5f5f6124af85856127e3565b90925090505f8160048111156124c7576124c7612e64565b1480156124e55750856001600160a01b0316826001600160a01b0316145b156124f55760019250505061071c565b5f5f876001600160a01b0316631626ba7e60e01b888860405160240161251c929190612e78565b60408051601f198184030181529181526020820180516001600160e01b03166001600160e01b031990941693909317909252905161255a9190612e98565b5f60405180830381855afa9150503d805f8114612592576040519150601f19603f3d011682016040523d82523d5f602084013e612597565b606091505b50915091508180156125aa575080516020145b80156125d157508051630b135d3f60e11b906125cf9083016020908101908401612eae565b145b98975050505050505050565b5f807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a083111561261257505f90506003612691565b604080515f8082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015612663573d5f5f3e3d5ffd5b5050604051601f1901519150506001600160a01b03811661268b575f60019250925050612691565b91505f90505b94509492505050565b5f8160048111156126ad576126ad612e64565b036126b55750565b60018160048111156126c9576126c9612e64565b036127165760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e617475726500000000000000006044820152606401610772565b600281600481111561272a5761272a612e64565b036127775760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606401610772565b600381600481111561278b5761278b612e64565b03610d325760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b6064820152608401610772565b5f5f8251604103612817576020830151604084015160608501515f1a61280b878285856125dd565b9450945050505061281e565b505f905060025b9250929050565b5f81518084528060208401602086015e5f602082860101526020601f19601f83011685010191505092915050565b602081525f61071c6020830184612825565b5f60208284031215612875575f5ffd5b5035919050565b80356001600160a01b0381168114610a57575f5ffd5b5f5f604083850312156128a3575f5ffd5b6128ac8361287c565b946020939093013593505050565b5f5f5f606084860312156128cc575f5ffd5b6128d58461287c565b92506128e36020850161287c565b929592945050506040919091013590565b5f5f5f5f60808587031215612907575f5ffd5b6129108561287c565b966020860135965060408601359560600135945092505050565b5f6020828403121561293a575f5ffd5b61071c8261287c565b634e487b7160e01b5f52604160045260245ffd5b5f5f67ffffffffffffffff84111561297157612971612943565b50604051601f19601f85018116603f0116810181811067ffffffffffffffff821117156129a0576129a0612943565b6040528381529050808284018510156129b7575f5ffd5b838360208301375f60208583010152509392505050565b5f82601f8301126129dd575f5ffd5b61071c83833560208501612957565b5f5f604083850312156129fd575f5ffd5b823567ffffffffffffffff811115612a13575f5ffd5b612a1f858286016129ce565b925050602083013567ffffffffffffffff811115612a3b575f5ffd5b612a47858286016129ce565b9150509250929050565b5f5f5f5f5f5f5f60e0888a031215612a67575f5ffd5b612a708861287c565b9650612a7e6020890161287c565b955060408801359450606088013593506080880135925060a0880135915060c088013567ffffffffffffffff811115612ab5575f5ffd5b8801601f81018a13612ac5575f5ffd5b612ad48a823560208401612957565b91505092959891949750929550565b803560ff81168114610a57575f5ffd5b5f5f5f5f5f5f5f60e0888a031215612b09575f5ffd5b612b128861287c565b9650612b206020890161287c565b95506040880135945060608801359350612b3c60808901612ae3565b9699959850939692959460a0840135945060c09093013592915050565b5f5f60408385031215612b6a575f5ffd5b612b738361287c565b9150612b816020840161287c565b90509250929050565b5f5f5f60608486031215612b9c575f5ffd5b505081359360208301359350604090920135919050565b5f5f5f5f5f5f5f5f5f6101208a8c031215612bcc575f5ffd5b612bd58a61287c565b9850612be360208b0161287c565b975060408a0135965060608a0135955060808a0135945060a08a01359350612c0d60c08b01612ae3565b989b979a50959894979396929550929360e081013593506101000135919050565b600181811c90821680612c4257607f821691505b602082108103611fe257634e487b7160e01b5f52602260045260245ffd5b634e487b7160e01b5f52601160045260245ffd5b5f60018201612c8557612c85612c60565b5060010190565b808201808211156106f8576106f8612c60565b6020808252602e908201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160408201526d191e481a5b9a5d1a585b1a5e995960921b606082015260800190565b6020808252601390820152721152540dcd4e4e081a5cc8191a5cd8589b1959606a1b604082015260600190565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b601f821115610ba057805f5260205f20601f840160051c81016020851015612d8a5750805b601f840160051c820191505b81811015611803575f8155600101612d96565b815167ffffffffffffffff811115612dc357612dc3612943565b612dd781612dd18454612c2e565b84612d65565b6020601f821160018114612e09575f8315612df25750848201515b5f19600385901b1c1916600184901b178455611803565b5f84815260208120601f198516915b82811015612e385787850151825560209485019460019092019101612e18565b5084821015612e5557868401515f19600387901b60f8161c191681555b50505050600190811b01905550565b634e487b7160e01b5f52602160045260245ffd5b828152604060208201525f612e906040830184612825565b949350505050565b5f82518060208501845e5f920191825250919050565b5f60208284031215612ebe575f5ffd5b505191905056fea264697066735822122094c811966f421e160a8047f75d7c5bfae4cea5ef9b4f026491a8aaf1bcb09e6264736f6c634300081c0033","optimization_enabled":true,"verified_twin_address_hash":null,"is_verified":true,"compiler_settings":{"evmVersion":"prague","libraries":{},"metadata":{"appendCBOR":true,"bytecodeHash":"ipfs","useLiteralContent":false},"optimizer":{"enabled":true,"runs":200},"outputSelection":{"*":{"":["*"],"*":["*"]}},"remappings":["openzeppelin-contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/","openzeppelin-contracts/=lib/openzeppelin-contracts/","forge-std/=lib/forge-std/src/","ds-test/=lib/forge-std/lib/ds-test/src/"],"viaIR":false},"optimization_runs":200,"sourcify_repo_url":null,"decoded_constructor_args":null,"compiler_version":"v0.8.28+commit.7893614a","is_verified_via_verifier_alliance":false,"verified_at":"2026-03-10T20:08:22.368547Z","implementations":[],"proxy_type":null,"external_libraries":[],"creation_bytecode":"0x6080604052348015600e575f5ffd5b506015601f565b601b601f565b60da565b5f54610100900460ff161560895760405162461bcd60e51b815260206004820152602760248201527f496e697469616c697a61626c653a20636f6e747261637420697320696e697469604482015266616c697a696e6760c81b606482015260840160405180910390fd5b5f5460ff908116101560d8575f805460ff191660ff9081179091556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b565b612efb806100e75f395ff3fe608060405234801561000f575f5ffd5b5060043610610297575f3560e01c80638d1fdf2f11610161578063d505accf116100ca578063e3ee160e11610084578063e3ee160e14610572578063e4e9402314610585578063e94a010214610598578063ef55bec6146105d1578063f2fde38b146105e4578063fdc86aa0146105f7575f5ffd5b8063d505accf1461050c578063dd62ed3e1461051f578063df63d46a14610532578063dfdcfc3714610545578063e30c397814610559578063e3dcb6771461056a575f5ffd5b8063a0712d681161011b578063a0712d6814610493578063a457c2d7146104a6578063a9059cbb146104b9578063affed0e0146104cc578063cf092995146104d6578063d0516650146104e9575f5ffd5b80638d1fdf2f146104335780638da5cb5b1461044657806395d89b411461046b5780639a8a0592146104735780639c3dd17e1461047d5780639dcc9d2a1461048b575f5ffd5b806342966c681161020357806370a08231116101bd57806370a08231146103cd578063715018a6146103f557806379ba5097146103fd5780637ecebe00146104055780638456cb591461041857806388b7ab6314610420575f5ffd5b806342966c681461037857806345c8b1a61461038b5780634cd88b761461039e57806359fe232d146103b15780635c975abb146103b95780635cd8a76b146103c5575f5ffd5b80632959b545116102545780632959b54514610320578063313ce567146103335780633644e51514610342578063395093511461034a5780633f4ba83a1461035d57806340c10f1914610365575f5ffd5b806306fdde031461029b57806307c81df0146102b9578063095ea7b3146102ce57806318160ddd146102f157806323b872dd14610303578063268cbc2714610316575b5f5ffd5b6102a361060a565b6040516102b09190612853565b60405180910390f35b6102cc6102c7366004612865565b61069a565b005b6102e16102dc366004612892565b6106e5565b60405190151581526020016102b0565b6035545b6040519081526020016102b0565b6102e16103113660046128ba565b6106fe565b6102f56101665481565b6102e161032e3660046128f4565b610723565b604051601281526020016102b0565b6102f5610917565b6102e1610358366004612892565b610925565b6102cc610946565b6102e1610373366004612892565b610958565b6102e1610386366004612865565b610a08565b6102cc61039936600461292a565b610a5c565b6102cc6103ac3660046129ec565b610aae565b6102cc610ba5565b6101305460ff166102e1565b6102cc610be2565b6102f56103db36600461292a565b6001600160a01b03165f9081526033602052604090205490565b6102cc610c7d565b6102cc610cbb565b6102f561041336600461292a565b610d35565b6102cc610d52565b6102cc61042e366004612a51565b610d62565b6102cc61044136600461292a565b610e11565b60cc546001600160a01b03165b6040516001600160a01b0390911681526020016102b0565b6102a3610e7b565b6102f56101645481565b610168546102e19060ff1681565b6102cc610e8a565b6102e16104a1366004612865565b610edd565b6102e16104b4366004612892565b610f24565b6102e16104c7366004612892565b610fa9565b6102f56101635481565b6102cc6104e4366004612a51565b610fb6565b6102e16104f736600461292a565b6101626020525f908152604090205460ff1681565b6102cc61051a366004612af3565b611009565b6102f561052d366004612b59565b61116a565b6102e1610540366004612b8a565b611194565b61016554610453906001600160a01b031681565b60fe546001600160a01b0316610453565b6102cc611319565b6102cc610580366004612bb3565b611359565b6102cc610593366004612892565b6113fa565b6102e16105a6366004612892565b6001600160a01b03919091165f90815261016760209081526040808320938352929052205460ff1690565b6102cc6105df366004612bb3565b611520565b6102cc6105f236600461292a565b6115f5565b6102cc61060536600461292a565b611666565b60606036805461061990612c2e565b80601f016020809104026020016040519081016040528092919081815260200182805461064590612c2e565b80156106905780601f1061066757610100808354040283529160200191610690565b820191905f5260205f20905b81548152906001019060200180831161067357829003601f168201915b5050505050905090565b6106a2611700565b6101665460408051918252602082018390527f7a50a7cdd0cb8b1a12f7b5a18d811b9c8b415e05a60a875a6f917c2f465e97a8910160405180910390a161016655565b5f336106f281858561175a565b60019150505b92915050565b5f3361070b85828561180a565b610716858585611882565b60019150505b9392505050565b5f61072c61192b565b6001600160a01b0385165f90815261016260205260409020548590819060ff161561077b57604051631d6e3c0160e21b81526001600160a01b0390911660048201526024015b60405180910390fd5b506101655433906001600160a01b031681146107b657604051635c0d8a7360e01b81526001600160a01b039091166004820152602401610772565b5061016354841484906107df57604051632c4dce9b60e21b815260040161077291815260200190565b5061016454831483906108085760405163331003b360e01b815260040161077291815260200190565b50848061082b57604051633728b83d60e01b815260040161077291815260200190565b506101665485908181101561085c5760405163494d91e960e01b815260048101929092526024820152604401610772565b50506101638054905f61086e83612c74565b919050555061087d8686611972565b6040518581526001600160a01b0387169033907fab8530f87dc9b59234c4623bf917212bb2536d647574c8e7e5da92c2ede0c9f89060200160405180910390a3836001600160a01b038716336001600160a01b03167fecc1c2abe0b9e5b2981c11ea4430f5223ef5082cc28f017c458dbb273aed8e128860405161090391815260200190565b60405180910390a450600195945050505050565b5f610920611a32565b905090565b5f336106f2818585610937838361116a565b6109419190612c8c565b61175a565b61094e611700565b610956611aab565b565b5f61096161192b565b6001600160a01b0383165f90815261016260205260409020548390819060ff16156109ab57604051631d6e3c0160e21b81526001600160a01b039091166004820152602401610772565b506109b4611700565b6109be8484611972565b6040518381526001600160a01b0385169033907fab8530f87dc9b59234c4623bf917212bb2536d647574c8e7e5da92c2ede0c9f89060200160405180910390a35060019392505050565b5f610a11611700565b610a1b3383611afe565b604051828152339081907fbac40739b0d4ca32fa2d82fc91630465ba3eddd1598da6fca393b26fb63b9453906020015b60405180910390a35060015b919050565b610a64611700565b6001600160a01b0381165f8181526101626020526040808220805460ff191690555133917f4f3ab9ff0cc4f039268532098e01239544b0420171876e36889d01c62c784c7991a350565b5f54610100900460ff1615808015610acc57505f54600160ff909116105b80610ae55750303b158015610ae557505f5460ff166001145b610b015760405162461bcd60e51b815260040161077290612c9f565b5f805460ff191660011790558015610b22575f805461ff0019166101001790555b610b2a611c30565b610b348383611c56565b610b3d83611c86565b610b45611ccf565b610b4d611cfd565b610b5633611d2b565b46610164558015610ba0575f805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b505050565b610bad611700565b6040517f6573fec281b973b363d1f2e4f1316ce545dd5bcd1e23d0dd23273082a15bc0c1905f90a1610168805460ff19169055565b5f54600290610100900460ff16158015610c0257505f5460ff8083169116105b610c1e5760405162461bcd60e51b815260040161077290612c9f565b5f8054610168805460ff1916600117905561ffff191660ff83169081176101001761ff0019169091556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a150565b610c85611700565b60405162461bcd60e51b815260206004820152600b60248201526a155b9cdd5c1c1bdc9d195960aa1b6044820152606401610772565b60fe5433906001600160a01b03168114610d295760405162461bcd60e51b815260206004820152602960248201527f4f776e61626c6532537465703a2063616c6c6572206973206e6f7420746865206044820152683732bb9037bbb732b960b91b6064820152608401610772565b610d3281611d51565b50565b6001600160a01b0381165f908152609960205260408120546106f8565b610d5a611700565b610956611d6a565b6101685460ff16610d855760405162461bcd60e51b815260040161077290612ced565b336001600160a01b03871614610dd85760405162461bcd60e51b815260206004820152601860248201527743616c6c6572206d7573742062652074686520706179656560401b6044820152606401610772565b610e087fd099cc98ef71107a616c4f0f941f04c322d8e254fe26b3c6668db87aae413de888888888888888611da8565b50505050505050565b610e19611700565b6001600160a01b0381165f81815261016260205260409020805460ff19166001179055610e433390565b6001600160a01b03167f51d18786e9cb144f87d46e7b796309ea84c7c687d91e09c97f051eacf59bc52860405160405180910390a350565b60606037805461061990612c2e565b610e92611700565b610165546040515f916001600160a01b0316907f4dcfbb802c3ce803612559160f5d70539a491b5d0064b0d4d326788f0dec2730908390a361016580546001600160a01b0319169055565b5f610ee6611700565b610ef03383611972565b604051828152339081907fab8530f87dc9b59234c4623bf917212bb2536d647574c8e7e5da92c2ede0c9f890602001610a4b565b5f3381610f31828661116a565b905083811015610f915760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b6064820152608401610772565b610f9e828686840361175a565b506001949350505050565b5f336106f2818585611882565b6101685460ff16610fd95760405162461bcd60e51b815260040161077290612ced565b610e087f7c7c6cdb67a18743f49ec6fa9b35f50d52ed05cbed4cc592e13b44501c1a226788888888888888611da8565b834211156110595760405162461bcd60e51b815260206004820152601d60248201527f45524332305065726d69743a206578706972656420646561646c696e650000006044820152606401610772565b5f7f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c98888886110878c611fc1565b6040805160208101969096526001600160a01b0394851690860152929091166060840152608083015260a082015260c0810186905260e0016040516020818303038152906040528051906020012090505f6110e182611fe8565b90505f6110f082878787612034565b9050896001600160a01b0316816001600160a01b0316146111535760405162461bcd60e51b815260206004820152601e60248201527f45524332305065726d69743a20696e76616c6964207369676e617475726500006044820152606401610772565b61115e8a8a8a61175a565b50505050505050505050565b6001600160a01b039182165f90815260346020908152604080832093909416825291909152205490565b5f61119d61192b565b6101655433906001600160a01b031681146111d757604051635c0d8a7360e01b81526001600160a01b039091166004820152602401610772565b50610163548314839061120057604051632c4dce9b60e21b815260040161077291815260200190565b5061016454821482906112295760405163331003b360e01b815260040161077291815260200190565b50838061124c57604051633728b83d60e01b815260040161077291815260200190565b506101638054905f61125d83612c74565b91905055505f61127560cc546001600160a01b031690565b90506112818186611afe565b610165546040518681526001600160a01b038381169216907fbac40739b0d4ca32fa2d82fc91630465ba3eddd1598da6fca393b26fb63b94539060200160405180910390a36101655460405186815285916001600160a01b03848116929116907f9a38373a0903562b0424db0a574e0d2fe56b79cc9e0f488a89d7bd3f28082bd49060200160405180910390a4506001949350505050565b611321611700565b6040517f1f884f64c35e7b573cb0a8d4233f7730f243fdea728f7dadf858d0f151fb9e94905f90a1610168805460ff19166001179055565b6101685460ff1661137c5760405162461bcd60e51b815260040161077290612ced565b6113ef7f7c7c6cdb67a18743f49ec6fa9b35f50d52ed05cbed4cc592e13b44501c1a22675f1b8a8a8a8a8a8a89898c6040516020016113db93929190928352602083019190915260f81b6001600160f81b031916604082015260410190565b604051602081830303815290604052611da8565b505050505050505050565b336001600160a01b038316146114525760405162461bcd60e51b815260206004820152601d60248201527f43616c6c6572206d7573742062652074686520617574686f72697a65720000006044820152606401610772565b6001600160a01b0382165f9081526101676020908152604080832084845290915290205460ff16156114c65760405162461bcd60e51b815260206004820152601a60248201527f417574686f72697a6174696f6e20616c726561647920757365640000000000006044820152606401610772565b6001600160a01b0382165f81815261016760209081526040808320858452909152808220805460ff19166001179055518392917f1cdd46ff242716cdaa72d159d339a485b3438398348d68f09d7c8c0a59353d8191a35050565b6101685460ff166115435760405162461bcd60e51b815260040161077290612ced565b336001600160a01b038916146115965760405162461bcd60e51b815260206004820152601860248201527743616c6c6572206d7573742062652074686520706179656560401b6044820152606401610772565b6113ef7fd099cc98ef71107a616c4f0f941f04c322d8e254fe26b3c6668db87aae413de85f1b8a8a8a8a8a8a89898c6040516020016113db93929190928352602083019190915260f81b6001600160f81b031916604082015260410190565b6115fd611700565b60fe80546001600160a01b0383166001600160a01b0319909116811790915561162e60cc546001600160a01b031690565b6001600160a01b03167f38d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e2270060405160405180910390a350565b61166e611700565b806001600160a01b0381166116a2576040516303d0181b60e31b81526001600160a01b039091166004820152602401610772565b50610165546040516001600160a01b038084169216907f4dcfbb802c3ce803612559160f5d70539a491b5d0064b0d4d326788f0dec2730905f90a361016580546001600160a01b0319166001600160a01b0392909216919091179055565b60cc546001600160a01b031633146109565760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610772565b61176261192b565b6001600160a01b0383165f90815261016260205260409020548390819060ff16156117ac57604051631d6e3c0160e21b81526001600160a01b039091166004820152602401610772565b506001600160a01b0383165f90815261016260205260409020548390819060ff16156117f757604051631d6e3c0160e21b81526001600160a01b039091166004820152602401610772565b5061180385858561205a565b5050505050565b5f611815848461116a565b90505f19811461187c578181101561186f5760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e63650000006044820152606401610772565b61187c848484840361175a565b50505050565b61188a61192b565b6001600160a01b0383165f90815261016260205260409020548390819060ff16156118d457604051631d6e3c0160e21b81526001600160a01b039091166004820152602401610772565b506001600160a01b0383165f90815261016260205260409020548390819060ff161561191f57604051631d6e3c0160e21b81526001600160a01b039091166004820152602401610772565b5061180385858561217d565b6101305460ff16156109565760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606401610772565b6001600160a01b0382166119c85760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152606401610772565b8060355f8282546119d99190612c8c565b90915550506001600160a01b0382165f818152603360209081526040808320805486019055518481527fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a35b5050565b5f6109207f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f611a6060655490565b6066546040805160208101859052908101839052606081018290524660808201523060a08201525f9060c0016040516020818303038152906040528051906020012090509392505050565b611ab3612326565b610130805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b6001600160a01b038216611b5e5760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f206164647265736044820152607360f81b6064820152608401610772565b6001600160a01b0382165f9081526033602052604090205481811015611bd15760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e604482015261636560f01b6064820152608401610772565b6001600160a01b0383165f8181526033602090815260408083208686039055603580548790039055518581529192917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a3505050565b5f54610100900460ff166109565760405162461bcd60e51b815260040161077290612d1a565b5f54610100900460ff16611c7c5760405162461bcd60e51b815260040161077290612d1a565b611a2e8282612370565b5f54610100900460ff16611cac5760405162461bcd60e51b815260040161077290612d1a565b610d3281604051806040016040528060018152602001603160f81b8152506123af565b5f54610100900460ff16611cf55760405162461bcd60e51b815260040161077290612d1a565b6109566123ef565b5f54610100900460ff16611d235760405162461bcd60e51b815260040161077290612d1a565b61095661241e565b5f54610100900460ff1661166e5760405162461bcd60e51b815260040161077290612d1a565b60fe80546001600160a01b0319169055610d3281612451565b611d7261192b565b610130805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258611ae13390565b834211611df75760405162461bcd60e51b815260206004820152601b60248201527f417574686f72697a6174696f6e206e6f74207965742076616c696400000000006044820152606401610772565b824210611e3e5760405162461bcd60e51b8152602060048201526015602482015274105d5d1a1bdc9a5e985d1a5bdb88195e1c1a5c9959605a1b6044820152606401610772565b6001600160a01b0387165f9081526101676020908152604080832085845290915290205460ff1615611eb25760405162461bcd60e51b815260206004820152601a60248201527f417574686f72697a6174696f6e20616c726561647920757365640000000000006044820152606401610772565b6040805160208082018b90526001600160a01b038a811683850152891660608301526080820188905260a0820187905260c0820186905260e08083018690528351808403909101815261010090920190925280519101205f611f1382611fe8565b9050611f208982856124a2565b611f605760405162461bcd60e51b8152602060048201526011602482015270496e76616c6964207369676e617475726560781b6044820152606401610772565b6001600160a01b0389165f81815261016760209081526040808320888452909152808220805460ff19166001179055518692917f98de503528ee59b575ef0c0a2576a82497bfc029a5685b209e9ec333479b10a591a361115e898989611882565b6001600160a01b0381165f9081526099602052604090208054600181018255905b50919050565b5f6106f8611ff4611a32565b8360405161190160f01b602082015260228101839052604281018290525f9060620160405160208183030381529060405280519060200120905092915050565b5f5f5f612043878787876125dd565b915091506120508161269a565b5095945050505050565b6001600160a01b0383166120bc5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610772565b6001600160a01b03821661211d5760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610772565b6001600160a01b038381165f8181526034602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b0383166121e15760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401610772565b6001600160a01b0382166122435760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610772565b6001600160a01b0383165f90815260336020526040902054818110156122ba5760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b6064820152608401610772565b6001600160a01b038085165f8181526033602052604080822086860390559286168082529083902080548601905591517fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef906123199086815260200190565b60405180910390a361187c565b6101305460ff166109565760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b6044820152606401610772565b5f54610100900460ff166123965760405162461bcd60e51b815260040161077290612d1a565b60366123a28382612da9565b506037610ba08282612da9565b5f54610100900460ff166123d55760405162461bcd60e51b815260040161077290612d1a565b815160209283012081519190920120606591909155606655565b5f54610100900460ff166124155760405162461bcd60e51b815260040161077290612d1a565b61095633611d51565b5f54610100900460ff166124445760405162461bcd60e51b815260040161077290612d1a565b610130805460ff19169055565b60cc80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0905f90a35050565b5f5f5f6124af85856127e3565b90925090505f8160048111156124c7576124c7612e64565b1480156124e55750856001600160a01b0316826001600160a01b0316145b156124f55760019250505061071c565b5f5f876001600160a01b0316631626ba7e60e01b888860405160240161251c929190612e78565b60408051601f198184030181529181526020820180516001600160e01b03166001600160e01b031990941693909317909252905161255a9190612e98565b5f60405180830381855afa9150503d805f8114612592576040519150601f19603f3d011682016040523d82523d5f602084013e612597565b606091505b50915091508180156125aa575080516020145b80156125d157508051630b135d3f60e11b906125cf9083016020908101908401612eae565b145b98975050505050505050565b5f807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a083111561261257505f90506003612691565b604080515f8082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015612663573d5f5f3e3d5ffd5b5050604051601f1901519150506001600160a01b03811661268b575f60019250925050612691565b91505f90505b94509492505050565b5f8160048111156126ad576126ad612e64565b036126b55750565b60018160048111156126c9576126c9612e64565b036127165760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e617475726500000000000000006044820152606401610772565b600281600481111561272a5761272a612e64565b036127775760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606401610772565b600381600481111561278b5761278b612e64565b03610d325760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b6064820152608401610772565b5f5f8251604103612817576020830151604084015160608501515f1a61280b878285856125dd565b9450945050505061281e565b505f905060025b9250929050565b5f81518084528060208401602086015e5f602082860101526020601f19601f83011685010191505092915050565b602081525f61071c6020830184612825565b5f60208284031215612875575f5ffd5b5035919050565b80356001600160a01b0381168114610a57575f5ffd5b5f5f604083850312156128a3575f5ffd5b6128ac8361287c565b946020939093013593505050565b5f5f5f606084860312156128cc575f5ffd5b6128d58461287c565b92506128e36020850161287c565b929592945050506040919091013590565b5f5f5f5f60808587031215612907575f5ffd5b6129108561287c565b966020860135965060408601359560600135945092505050565b5f6020828403121561293a575f5ffd5b61071c8261287c565b634e487b7160e01b5f52604160045260245ffd5b5f5f67ffffffffffffffff84111561297157612971612943565b50604051601f19601f85018116603f0116810181811067ffffffffffffffff821117156129a0576129a0612943565b6040528381529050808284018510156129b7575f5ffd5b838360208301375f60208583010152509392505050565b5f82601f8301126129dd575f5ffd5b61071c83833560208501612957565b5f5f604083850312156129fd575f5ffd5b823567ffffffffffffffff811115612a13575f5ffd5b612a1f858286016129ce565b925050602083013567ffffffffffffffff811115612a3b575f5ffd5b612a47858286016129ce565b9150509250929050565b5f5f5f5f5f5f5f60e0888a031215612a67575f5ffd5b612a708861287c565b9650612a7e6020890161287c565b955060408801359450606088013593506080880135925060a0880135915060c088013567ffffffffffffffff811115612ab5575f5ffd5b8801601f81018a13612ac5575f5ffd5b612ad48a823560208401612957565b91505092959891949750929550565b803560ff81168114610a57575f5ffd5b5f5f5f5f5f5f5f60e0888a031215612b09575f5ffd5b612b128861287c565b9650612b206020890161287c565b95506040880135945060608801359350612b3c60808901612ae3565b9699959850939692959460a0840135945060c09093013592915050565b5f5f60408385031215612b6a575f5ffd5b612b738361287c565b9150612b816020840161287c565b90509250929050565b5f5f5f60608486031215612b9c575f5ffd5b505081359360208301359350604090920135919050565b5f5f5f5f5f5f5f5f5f6101208a8c031215612bcc575f5ffd5b612bd58a61287c565b9850612be360208b0161287c565b975060408a0135965060608a0135955060808a0135945060a08a01359350612c0d60c08b01612ae3565b989b979a50959894979396929550929360e081013593506101000135919050565b600181811c90821680612c4257607f821691505b602082108103611fe257634e487b7160e01b5f52602260045260245ffd5b634e487b7160e01b5f52601160045260245ffd5b5f60018201612c8557612c85612c60565b5060010190565b808201808211156106f8576106f8612c60565b6020808252602e908201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160408201526d191e481a5b9a5d1a585b1a5e995960921b606082015260800190565b6020808252601390820152721152540dcd4e4e081a5cc8191a5cd8589b1959606a1b604082015260600190565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b601f821115610ba057805f5260205f20601f840160051c81016020851015612d8a5750805b601f840160051c820191505b81811015611803575f8155600101612d96565b815167ffffffffffffffff811115612dc357612dc3612943565b612dd781612dd18454612c2e565b84612d65565b6020601f821160018114612e09575f8315612df25750848201515b5f19600385901b1c1916600184901b178455611803565b5f84815260208120601f198516915b82811015612e385787850151825560209485019460019092019101612e18565b5084821015612e5557868401515f19600387901b60f8161c191681555b50505050600190811b01905550565b634e487b7160e01b5f52602160045260245ffd5b828152604060208201525f612e906040830184612825565b949350505050565b5f82518060208501845e5f920191825250919050565b5f60208284031215612ebe575f5ffd5b505191905056fea264697066735822122094c811966f421e160a8047f75d7c5bfae4cea5ef9b4f026491a8aaf1bcb09e6264736f6c634300081c0033","name":"StablecoinV2","is_blueprint":false,"license_type":"none","is_fully_verified":true,"is_verified_via_eth_bytecode_db":false,"language":"solidity","evm_version":"prague","can_be_visualized_via_sol2uml":true,"is_verified_via_sourcify":false,"additional_sources":[{"file_path":"lib/openzeppelin-contracts-upgradeable/contracts/utils/StringsUpgradeable.sol","source_code":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/Strings.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./math/MathUpgradeable.sol\";\n\n/**\n * @dev String operations.\n */\nlibrary StringsUpgradeable {\n    bytes16 private constant _SYMBOLS = \"0123456789abcdef\";\n    uint8 private constant _ADDRESS_LENGTH = 20;\n\n    /**\n     * @dev Converts a `uint256` to its ASCII `string` decimal representation.\n     */\n    function toString(uint256 value) internal pure returns (string memory) {\n        unchecked {\n            uint256 length = MathUpgradeable.log10(value) + 1;\n            string memory buffer = new string(length);\n            uint256 ptr;\n            /// @solidity memory-safe-assembly\n            assembly {\n                ptr := add(buffer, add(32, length))\n            }\n            while (true) {\n                ptr--;\n                /// @solidity memory-safe-assembly\n                assembly {\n                    mstore8(ptr, byte(mod(value, 10), _SYMBOLS))\n                }\n                value /= 10;\n                if (value == 0) break;\n            }\n            return buffer;\n        }\n    }\n\n    /**\n     * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.\n     */\n    function toHexString(uint256 value) internal pure returns (string memory) {\n        unchecked {\n            return toHexString(value, MathUpgradeable.log256(value) + 1);\n        }\n    }\n\n    /**\n     * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.\n     */\n    function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {\n        bytes memory buffer = new bytes(2 * length + 2);\n        buffer[0] = \"0\";\n        buffer[1] = \"x\";\n        for (uint256 i = 2 * length + 1; i > 1; --i) {\n            buffer[i] = _SYMBOLS[value & 0xf];\n            value >>= 4;\n        }\n        require(value == 0, \"Strings: hex length insufficient\");\n        return string(buffer);\n    }\n\n    /**\n     * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation.\n     */\n    function toHexString(address addr) internal pure returns (string memory) {\n        return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH);\n    }\n}\n"},{"file_path":"lib/openzeppelin-contracts-upgradeable/contracts/utils/cryptography/ECDSAUpgradeable.sol","source_code":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/cryptography/ECDSA.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../StringsUpgradeable.sol\";\n\n/**\n * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations.\n *\n * These functions can be used to verify that a message was signed by the holder\n * of the private keys of a given address.\n */\nlibrary ECDSAUpgradeable {\n    enum RecoverError {\n        NoError,\n        InvalidSignature,\n        InvalidSignatureLength,\n        InvalidSignatureS,\n        InvalidSignatureV // Deprecated in v4.8\n    }\n\n    function _throwError(RecoverError error) private pure {\n        if (error == RecoverError.NoError) {\n            return; // no error: do nothing\n        } else if (error == RecoverError.InvalidSignature) {\n            revert(\"ECDSA: invalid signature\");\n        } else if (error == RecoverError.InvalidSignatureLength) {\n            revert(\"ECDSA: invalid signature length\");\n        } else if (error == RecoverError.InvalidSignatureS) {\n            revert(\"ECDSA: invalid signature 's' value\");\n        }\n    }\n\n    /**\n     * @dev Returns the address that signed a hashed message (`hash`) with\n     * `signature` or error string. This address can then be used for verification purposes.\n     *\n     * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:\n     * this function rejects them by requiring the `s` value to be in the lower\n     * half order, and the `v` value to be either 27 or 28.\n     *\n     * IMPORTANT: `hash` _must_ be the result of a hash operation for the\n     * verification to be secure: it is possible to craft signatures that\n     * recover to arbitrary addresses for non-hashed data. A safe way to ensure\n     * this is by receiving a hash of the original message (which may otherwise\n     * be too long), and then calling {toEthSignedMessageHash} on it.\n     *\n     * Documentation for signature generation:\n     * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js]\n     * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers]\n     *\n     * _Available since v4.3._\n     */\n    function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError) {\n        if (signature.length == 65) {\n            bytes32 r;\n            bytes32 s;\n            uint8 v;\n            // ecrecover takes the signature parameters, and the only way to get them\n            // currently is to use assembly.\n            /// @solidity memory-safe-assembly\n            assembly {\n                r := mload(add(signature, 0x20))\n                s := mload(add(signature, 0x40))\n                v := byte(0, mload(add(signature, 0x60)))\n            }\n            return tryRecover(hash, v, r, s);\n        } else {\n            return (address(0), RecoverError.InvalidSignatureLength);\n        }\n    }\n\n    /**\n     * @dev Returns the address that signed a hashed message (`hash`) with\n     * `signature`. This address can then be used for verification purposes.\n     *\n     * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:\n     * this function rejects them by requiring the `s` value to be in the lower\n     * half order, and the `v` value to be either 27 or 28.\n     *\n     * IMPORTANT: `hash` _must_ be the result of a hash operation for the\n     * verification to be secure: it is possible to craft signatures that\n     * recover to arbitrary addresses for non-hashed data. A safe way to ensure\n     * this is by receiving a hash of the original message (which may otherwise\n     * be too long), and then calling {toEthSignedMessageHash} on it.\n     */\n    function recover(bytes32 hash, bytes memory signature) internal pure returns (address) {\n        (address recovered, RecoverError error) = tryRecover(hash, signature);\n        _throwError(error);\n        return recovered;\n    }\n\n    /**\n     * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately.\n     *\n     * See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures]\n     *\n     * _Available since v4.3._\n     */\n    function tryRecover(\n        bytes32 hash,\n        bytes32 r,\n        bytes32 vs\n    ) internal pure returns (address, RecoverError) {\n        bytes32 s = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff);\n        uint8 v = uint8((uint256(vs) >> 255) + 27);\n        return tryRecover(hash, v, r, s);\n    }\n\n    /**\n     * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately.\n     *\n     * _Available since v4.2._\n     */\n    function recover(\n        bytes32 hash,\n        bytes32 r,\n        bytes32 vs\n    ) internal pure returns (address) {\n        (address recovered, RecoverError error) = tryRecover(hash, r, vs);\n        _throwError(error);\n        return recovered;\n    }\n\n    /**\n     * @dev Overload of {ECDSA-tryRecover} that receives the `v`,\n     * `r` and `s` signature fields separately.\n     *\n     * _Available since v4.3._\n     */\n    function tryRecover(\n        bytes32 hash,\n        uint8 v,\n        bytes32 r,\n        bytes32 s\n    ) internal pure returns (address, RecoverError) {\n        // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature\n        // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines\n        // the valid range for s in (301): 0 < s < secp256k1n ÷ 2 + 1, and for v in (302): v ∈ {27, 28}. Most\n        // signatures from current libraries generate a unique signature with an s-value in the lower half order.\n        //\n        // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value\n        // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or\n        // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept\n        // these malleable signatures as well.\n        if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {\n            return (address(0), RecoverError.InvalidSignatureS);\n        }\n\n        // If the signature is valid (and not malleable), return the signer address\n        address signer = ecrecover(hash, v, r, s);\n        if (signer == address(0)) {\n            return (address(0), RecoverError.InvalidSignature);\n        }\n\n        return (signer, RecoverError.NoError);\n    }\n\n    /**\n     * @dev Overload of {ECDSA-recover} that receives the `v`,\n     * `r` and `s` signature fields separately.\n     */\n    function recover(\n        bytes32 hash,\n        uint8 v,\n        bytes32 r,\n        bytes32 s\n    ) internal pure returns (address) {\n        (address recovered, RecoverError error) = tryRecover(hash, v, r, s);\n        _throwError(error);\n        return recovered;\n    }\n\n    /**\n     * @dev Returns an Ethereum Signed Message, created from a `hash`. This\n     * produces hash corresponding to the one signed with the\n     * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]\n     * JSON-RPC method as part of EIP-191.\n     *\n     * See {recover}.\n     */\n    function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32) {\n        // 32 is the length in bytes of hash,\n        // enforced by the type signature above\n        return keccak256(abi.encodePacked(\"\\x19Ethereum Signed Message:\\n32\", hash));\n    }\n\n    /**\n     * @dev Returns an Ethereum Signed Message, created from `s`. This\n     * produces hash corresponding to the one signed with the\n     * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]\n     * JSON-RPC method as part of EIP-191.\n     *\n     * See {recover}.\n     */\n    function toEthSignedMessageHash(bytes memory s) internal pure returns (bytes32) {\n        return keccak256(abi.encodePacked(\"\\x19Ethereum Signed Message:\\n\", StringsUpgradeable.toString(s.length), s));\n    }\n\n    /**\n     * @dev Returns an Ethereum Signed Typed Data, created from a\n     * `domainSeparator` and a `structHash`. This produces hash corresponding\n     * to the one signed with the\n     * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`]\n     * JSON-RPC method as part of EIP-712.\n     *\n     * See {recover}.\n     */\n    function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32) {\n        return keccak256(abi.encodePacked(\"\\x19\\x01\", domainSeparator, structHash));\n    }\n}\n"},{"file_path":"lib/openzeppelin-contracts-upgradeable/contracts/utils/cryptography/EIP712Upgradeable.sol","source_code":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/cryptography/EIP712.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./ECDSAUpgradeable.sol\";\nimport \"../../proxy/utils/Initializable.sol\";\n\n/**\n * @dev https://eips.ethereum.org/EIPS/eip-712[EIP 712] is a standard for hashing and signing of typed structured data.\n *\n * The encoding specified in the EIP is very generic, and such a generic implementation in Solidity is not feasible,\n * thus this contract does not implement the encoding itself. Protocols need to implement the type-specific encoding\n * they need in their contracts using a combination of `abi.encode` and `keccak256`.\n *\n * This contract implements the EIP 712 domain separator ({_domainSeparatorV4}) that is used as part of the encoding\n * scheme, and the final step of the encoding to obtain the message digest that is then signed via ECDSA\n * ({_hashTypedDataV4}).\n *\n * The implementation of the domain separator was designed to be as efficient as possible while still properly updating\n * the chain id to protect against replay attacks on an eventual fork of the chain.\n *\n * NOTE: This contract implements the version of the encoding known as \"v4\", as implemented by the JSON RPC method\n * https://docs.metamask.io/guide/signing-data.html[`eth_signTypedDataV4` in MetaMask].\n *\n * _Available since v3.4._\n *\n * @custom:storage-size 52\n */\nabstract contract EIP712Upgradeable is Initializable {\n    /* solhint-disable var-name-mixedcase */\n    bytes32 private _HASHED_NAME;\n    bytes32 private _HASHED_VERSION;\n    bytes32 private constant _TYPE_HASH = keccak256(\"EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)\");\n\n    /* solhint-enable var-name-mixedcase */\n\n    /**\n     * @dev Initializes the domain separator and parameter caches.\n     *\n     * The meaning of `name` and `version` is specified in\n     * https://eips.ethereum.org/EIPS/eip-712#definition-of-domainseparator[EIP 712]:\n     *\n     * - `name`: the user readable name of the signing domain, i.e. the name of the DApp or the protocol.\n     * - `version`: the current major version of the signing domain.\n     *\n     * NOTE: These parameters cannot be changed except through a xref:learn::upgrading-smart-contracts.adoc[smart\n     * contract upgrade].\n     */\n    function __EIP712_init(string memory name, string memory version) internal onlyInitializing {\n        __EIP712_init_unchained(name, version);\n    }\n\n    function __EIP712_init_unchained(string memory name, string memory version) internal onlyInitializing {\n        bytes32 hashedName = keccak256(bytes(name));\n        bytes32 hashedVersion = keccak256(bytes(version));\n        _HASHED_NAME = hashedName;\n        _HASHED_VERSION = hashedVersion;\n    }\n\n    /**\n     * @dev Returns the domain separator for the current chain.\n     */\n    function _domainSeparatorV4() internal view returns (bytes32) {\n        return _buildDomainSeparator(_TYPE_HASH, _EIP712NameHash(), _EIP712VersionHash());\n    }\n\n    function _buildDomainSeparator(\n        bytes32 typeHash,\n        bytes32 nameHash,\n        bytes32 versionHash\n    ) private view returns (bytes32) {\n        return keccak256(abi.encode(typeHash, nameHash, versionHash, block.chainid, address(this)));\n    }\n\n    /**\n     * @dev Given an already https://eips.ethereum.org/EIPS/eip-712#definition-of-hashstruct[hashed struct], this\n     * function returns the hash of the fully encoded EIP712 message for this domain.\n     *\n     * This hash can be used together with {ECDSA-recover} to obtain the signer of a message. For example:\n     *\n     * ```solidity\n     * bytes32 digest = _hashTypedDataV4(keccak256(abi.encode(\n     *     keccak256(\"Mail(address to,string contents)\"),\n     *     mailTo,\n     *     keccak256(bytes(mailContents))\n     * )));\n     * address signer = ECDSA.recover(digest, signature);\n     * ```\n     */\n    function _hashTypedDataV4(bytes32 structHash) internal view virtual returns (bytes32) {\n        return ECDSAUpgradeable.toTypedDataHash(_domainSeparatorV4(), structHash);\n    }\n\n    /**\n     * @dev The hash of the name parameter for the EIP712 domain.\n     *\n     * NOTE: This function reads from storage by default, but can be redefined to return a constant value if gas costs\n     * are a concern.\n     */\n    function _EIP712NameHash() internal virtual view returns (bytes32) {\n        return _HASHED_NAME;\n    }\n\n    /**\n     * @dev The hash of the version parameter for the EIP712 domain.\n     *\n     * NOTE: This function reads from storage by default, but can be redefined to return a constant value if gas costs\n     * are a concern.\n     */\n    function _EIP712VersionHash() internal virtual view returns (bytes32) {\n        return _HASHED_VERSION;\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":"lib/openzeppelin-contracts-upgradeable/contracts/security/PausableUpgradeable.sol","source_code":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.7.0) (security/Pausable.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../utils/ContextUpgradeable.sol\";\nimport \"../proxy/utils/Initializable.sol\";\n\n/**\n * @dev Contract module which allows children to implement an emergency stop\n * mechanism that can be triggered by an authorized account.\n *\n * This module is used through inheritance. It will make available the\n * modifiers `whenNotPaused` and `whenPaused`, which can be applied to\n * the functions of your contract. Note that they will not be pausable by\n * simply including this module, only once the modifiers are put in place.\n */\nabstract contract PausableUpgradeable is Initializable, ContextUpgradeable {\n    /**\n     * @dev Emitted when the pause is triggered by `account`.\n     */\n    event Paused(address account);\n\n    /**\n     * @dev Emitted when the pause is lifted by `account`.\n     */\n    event Unpaused(address account);\n\n    bool private _paused;\n\n    /**\n     * @dev Initializes the contract in unpaused state.\n     */\n    function __Pausable_init() internal onlyInitializing {\n        __Pausable_init_unchained();\n    }\n\n    function __Pausable_init_unchained() internal onlyInitializing {\n        _paused = false;\n    }\n\n    /**\n     * @dev Modifier to make a function callable only when the contract is not paused.\n     *\n     * Requirements:\n     *\n     * - The contract must not be paused.\n     */\n    modifier whenNotPaused() {\n        _requireNotPaused();\n        _;\n    }\n\n    /**\n     * @dev Modifier to make a function callable only when the contract is paused.\n     *\n     * Requirements:\n     *\n     * - The contract must be paused.\n     */\n    modifier whenPaused() {\n        _requirePaused();\n        _;\n    }\n\n    /**\n     * @dev Returns true if the contract is paused, and false otherwise.\n     */\n    function paused() public view virtual returns (bool) {\n        return _paused;\n    }\n\n    /**\n     * @dev Throws if the contract is paused.\n     */\n    function _requireNotPaused() internal view virtual {\n        require(!paused(), \"Pausable: paused\");\n    }\n\n    /**\n     * @dev Throws if the contract is not paused.\n     */\n    function _requirePaused() internal view virtual {\n        require(paused(), \"Pausable: not paused\");\n    }\n\n    /**\n     * @dev Triggers stopped state.\n     *\n     * Requirements:\n     *\n     * - The contract must not be paused.\n     */\n    function _pause() internal virtual whenNotPaused {\n        _paused = true;\n        emit Paused(_msgSender());\n    }\n\n    /**\n     * @dev Returns to normal state.\n     *\n     * Requirements:\n     *\n     * - The contract must be paused.\n     */\n    function _unpause() internal virtual whenPaused {\n        _paused = false;\n        emit Unpaused(_msgSender());\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":"lib/openzeppelin-contracts-upgradeable/contracts/token/ERC20/ERC20Upgradeable.sol","source_code":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.8.0) (token/ERC20/ERC20.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./IERC20Upgradeable.sol\";\nimport \"./extensions/IERC20MetadataUpgradeable.sol\";\nimport \"../../utils/ContextUpgradeable.sol\";\nimport \"../../proxy/utils/Initializable.sol\";\n\n/**\n * @dev Implementation of the {IERC20} interface.\n *\n * This implementation is agnostic to the way tokens are created. This means\n * that a supply mechanism has to be added in a derived contract using {_mint}.\n * For a generic mechanism see {ERC20PresetMinterPauser}.\n *\n * TIP: For a detailed writeup see our guide\n * https://forum.openzeppelin.com/t/how-to-implement-erc20-supply-mechanisms/226[How\n * to implement supply mechanisms].\n *\n * We have followed general OpenZeppelin Contracts guidelines: functions revert\n * instead returning `false` on failure. This behavior is nonetheless\n * conventional and does not conflict with the expectations of ERC20\n * applications.\n *\n * Additionally, an {Approval} event is emitted on calls to {transferFrom}.\n * This allows applications to reconstruct the allowance for all accounts just\n * by listening to said events. Other implementations of the EIP may not emit\n * these events, as it isn't required by the specification.\n *\n * Finally, the non-standard {decreaseAllowance} and {increaseAllowance}\n * functions have been added to mitigate the well-known issues around setting\n * allowances. See {IERC20-approve}.\n */\ncontract ERC20Upgradeable is Initializable, ContextUpgradeable, IERC20Upgradeable, IERC20MetadataUpgradeable {\n    mapping(address => uint256) private _balances;\n\n    mapping(address => mapping(address => uint256)) private _allowances;\n\n    uint256 private _totalSupply;\n\n    string private _name;\n    string private _symbol;\n\n    /**\n     * @dev Sets the values for {name} and {symbol}.\n     *\n     * The default value of {decimals} is 18. To select a different value for\n     * {decimals} you should overload it.\n     *\n     * All two of these values are immutable: they can only be set once during\n     * construction.\n     */\n    function __ERC20_init(string memory name_, string memory symbol_) internal onlyInitializing {\n        __ERC20_init_unchained(name_, symbol_);\n    }\n\n    function __ERC20_init_unchained(string memory name_, string memory symbol_) internal onlyInitializing {\n        _name = name_;\n        _symbol = symbol_;\n    }\n\n    /**\n     * @dev Returns the name of the token.\n     */\n    function name() public view virtual override returns (string memory) {\n        return _name;\n    }\n\n    /**\n     * @dev Returns the symbol of the token, usually a shorter version of the\n     * name.\n     */\n    function symbol() public view virtual override returns (string memory) {\n        return _symbol;\n    }\n\n    /**\n     * @dev Returns the number of decimals used to get its user representation.\n     * For example, if `decimals` equals `2`, a balance of `505` tokens should\n     * be displayed to a user as `5.05` (`505 / 10 ** 2`).\n     *\n     * Tokens usually opt for a value of 18, imitating the relationship between\n     * Ether and Wei. This is the value {ERC20} uses, unless this function is\n     * overridden;\n     *\n     * NOTE: This information is only used for _display_ purposes: it in\n     * no way affects any of the arithmetic of the contract, including\n     * {IERC20-balanceOf} and {IERC20-transfer}.\n     */\n    function decimals() public view virtual override returns (uint8) {\n        return 18;\n    }\n\n    /**\n     * @dev See {IERC20-totalSupply}.\n     */\n    function totalSupply() public view virtual override returns (uint256) {\n        return _totalSupply;\n    }\n\n    /**\n     * @dev See {IERC20-balanceOf}.\n     */\n    function balanceOf(address account) public view virtual override returns (uint256) {\n        return _balances[account];\n    }\n\n    /**\n     * @dev See {IERC20-transfer}.\n     *\n     * Requirements:\n     *\n     * - `to` cannot be the zero address.\n     * - the caller must have a balance of at least `amount`.\n     */\n    function transfer(address to, uint256 amount) public virtual override returns (bool) {\n        address owner = _msgSender();\n        _transfer(owner, to, amount);\n        return true;\n    }\n\n    /**\n     * @dev See {IERC20-allowance}.\n     */\n    function allowance(address owner, address spender) public view virtual override returns (uint256) {\n        return _allowances[owner][spender];\n    }\n\n    /**\n     * @dev See {IERC20-approve}.\n     *\n     * NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on\n     * `transferFrom`. This is semantically equivalent to an infinite approval.\n     *\n     * Requirements:\n     *\n     * - `spender` cannot be the zero address.\n     */\n    function approve(address spender, uint256 amount) public virtual override returns (bool) {\n        address owner = _msgSender();\n        _approve(owner, spender, amount);\n        return true;\n    }\n\n    /**\n     * @dev See {IERC20-transferFrom}.\n     *\n     * Emits an {Approval} event indicating the updated allowance. This is not\n     * required by the EIP. See the note at the beginning of {ERC20}.\n     *\n     * NOTE: Does not update the allowance if the current allowance\n     * is the maximum `uint256`.\n     *\n     * Requirements:\n     *\n     * - `from` and `to` cannot be the zero address.\n     * - `from` must have a balance of at least `amount`.\n     * - the caller must have allowance for ``from``'s tokens of at least\n     * `amount`.\n     */\n    function transferFrom(\n        address from,\n        address to,\n        uint256 amount\n    ) public virtual override returns (bool) {\n        address spender = _msgSender();\n        _spendAllowance(from, spender, amount);\n        _transfer(from, to, amount);\n        return true;\n    }\n\n    /**\n     * @dev Atomically increases the allowance granted to `spender` by the caller.\n     *\n     * This is an alternative to {approve} that can be used as a mitigation for\n     * problems described in {IERC20-approve}.\n     *\n     * Emits an {Approval} event indicating the updated allowance.\n     *\n     * Requirements:\n     *\n     * - `spender` cannot be the zero address.\n     */\n    function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {\n        address owner = _msgSender();\n        _approve(owner, spender, allowance(owner, spender) + addedValue);\n        return true;\n    }\n\n    /**\n     * @dev Atomically decreases the allowance granted to `spender` by the caller.\n     *\n     * This is an alternative to {approve} that can be used as a mitigation for\n     * problems described in {IERC20-approve}.\n     *\n     * Emits an {Approval} event indicating the updated allowance.\n     *\n     * Requirements:\n     *\n     * - `spender` cannot be the zero address.\n     * - `spender` must have allowance for the caller of at least\n     * `subtractedValue`.\n     */\n    function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {\n        address owner = _msgSender();\n        uint256 currentAllowance = allowance(owner, spender);\n        require(currentAllowance >= subtractedValue, \"ERC20: decreased allowance below zero\");\n        unchecked {\n            _approve(owner, spender, currentAllowance - subtractedValue);\n        }\n\n        return true;\n    }\n\n    /**\n     * @dev Moves `amount` of tokens from `from` to `to`.\n     *\n     * This internal function is equivalent to {transfer}, and can be used to\n     * e.g. implement automatic token fees, slashing mechanisms, etc.\n     *\n     * Emits a {Transfer} event.\n     *\n     * Requirements:\n     *\n     * - `from` cannot be the zero address.\n     * - `to` cannot be the zero address.\n     * - `from` must have a balance of at least `amount`.\n     */\n    function _transfer(\n        address from,\n        address to,\n        uint256 amount\n    ) internal virtual {\n        require(from != address(0), \"ERC20: transfer from the zero address\");\n        require(to != address(0), \"ERC20: transfer to the zero address\");\n\n        _beforeTokenTransfer(from, to, amount);\n\n        uint256 fromBalance = _balances[from];\n        require(fromBalance >= amount, \"ERC20: transfer amount exceeds balance\");\n        unchecked {\n            _balances[from] = fromBalance - amount;\n            // Overflow not possible: the sum of all balances is capped by totalSupply, and the sum is preserved by\n            // decrementing then incrementing.\n            _balances[to] += amount;\n        }\n\n        emit Transfer(from, to, amount);\n\n        _afterTokenTransfer(from, to, amount);\n    }\n\n    /** @dev Creates `amount` tokens and assigns them to `account`, increasing\n     * the total supply.\n     *\n     * Emits a {Transfer} event with `from` set to the zero address.\n     *\n     * Requirements:\n     *\n     * - `account` cannot be the zero address.\n     */\n    function _mint(address account, uint256 amount) internal virtual {\n        require(account != address(0), \"ERC20: mint to the zero address\");\n\n        _beforeTokenTransfer(address(0), account, amount);\n\n        _totalSupply += amount;\n        unchecked {\n            // Overflow not possible: balance + amount is at most totalSupply + amount, which is checked above.\n            _balances[account] += amount;\n        }\n        emit Transfer(address(0), account, amount);\n\n        _afterTokenTransfer(address(0), account, amount);\n    }\n\n    /**\n     * @dev Destroys `amount` tokens from `account`, reducing the\n     * total supply.\n     *\n     * Emits a {Transfer} event with `to` set to the zero address.\n     *\n     * Requirements:\n     *\n     * - `account` cannot be the zero address.\n     * - `account` must have at least `amount` tokens.\n     */\n    function _burn(address account, uint256 amount) internal virtual {\n        require(account != address(0), \"ERC20: burn from the zero address\");\n\n        _beforeTokenTransfer(account, address(0), amount);\n\n        uint256 accountBalance = _balances[account];\n        require(accountBalance >= amount, \"ERC20: burn amount exceeds balance\");\n        unchecked {\n            _balances[account] = accountBalance - amount;\n            // Overflow not possible: amount <= accountBalance <= totalSupply.\n            _totalSupply -= amount;\n        }\n\n        emit Transfer(account, address(0), amount);\n\n        _afterTokenTransfer(account, address(0), amount);\n    }\n\n    /**\n     * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens.\n     *\n     * This internal function is equivalent to `approve`, and can be used to\n     * e.g. set automatic allowances for certain subsystems, etc.\n     *\n     * Emits an {Approval} event.\n     *\n     * Requirements:\n     *\n     * - `owner` cannot be the zero address.\n     * - `spender` cannot be the zero address.\n     */\n    function _approve(\n        address owner,\n        address spender,\n        uint256 amount\n    ) internal virtual {\n        require(owner != address(0), \"ERC20: approve from the zero address\");\n        require(spender != address(0), \"ERC20: approve to the zero address\");\n\n        _allowances[owner][spender] = amount;\n        emit Approval(owner, spender, amount);\n    }\n\n    /**\n     * @dev Updates `owner` s allowance for `spender` based on spent `amount`.\n     *\n     * Does not update the allowance amount in case of infinite allowance.\n     * Revert if not enough allowance is available.\n     *\n     * Might emit an {Approval} event.\n     */\n    function _spendAllowance(\n        address owner,\n        address spender,\n        uint256 amount\n    ) internal virtual {\n        uint256 currentAllowance = allowance(owner, spender);\n        if (currentAllowance != type(uint256).max) {\n            require(currentAllowance >= amount, \"ERC20: insufficient allowance\");\n            unchecked {\n                _approve(owner, spender, currentAllowance - amount);\n            }\n        }\n    }\n\n    /**\n     * @dev Hook that is called before any transfer of tokens. This includes\n     * minting and burning.\n     *\n     * Calling conditions:\n     *\n     * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens\n     * will be transferred to `to`.\n     * - when `from` is zero, `amount` tokens will be minted for `to`.\n     * - when `to` is zero, `amount` of ``from``'s tokens will be burned.\n     * - `from` and `to` are never both zero.\n     *\n     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\n     */\n    function _beforeTokenTransfer(\n        address from,\n        address to,\n        uint256 amount\n    ) internal virtual {}\n\n    /**\n     * @dev Hook that is called after any transfer of tokens. This includes\n     * minting and burning.\n     *\n     * Calling conditions:\n     *\n     * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens\n     * has been transferred to `to`.\n     * - when `from` is zero, `amount` tokens have been minted for `to`.\n     * - when `to` is zero, `amount` of ``from``'s tokens have been burned.\n     * - `from` and `to` are never both zero.\n     *\n     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\n     */\n    function _afterTokenTransfer(\n        address from,\n        address to,\n        uint256 amount\n    ) 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[45] private __gap;\n}\n"},{"file_path":"lib/openzeppelin-contracts-upgradeable/contracts/access/Ownable2StepUpgradeable.sol","source_code":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.8.0) (access/Ownable2Step.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./OwnableUpgradeable.sol\";\nimport \"../proxy/utils/Initializable.sol\";\n\n/**\n * @dev Contract module which provides access control mechanism, where\n * there is an account (an owner) that can be granted exclusive access to\n * specific functions.\n *\n * By default, the owner account will be the one that deploys the contract. This\n * can later be changed with {transferOwnership} and {acceptOwnership}.\n *\n * This module is used through inheritance. It will make available all functions\n * from parent (Ownable).\n */\nabstract contract Ownable2StepUpgradeable is Initializable, OwnableUpgradeable {\n    function __Ownable2Step_init() internal onlyInitializing {\n        __Ownable_init_unchained();\n    }\n\n    function __Ownable2Step_init_unchained() internal onlyInitializing {\n    }\n    address private _pendingOwner;\n\n    event OwnershipTransferStarted(address indexed previousOwner, address indexed newOwner);\n\n    /**\n     * @dev Returns the address of the pending owner.\n     */\n    function pendingOwner() public view virtual returns (address) {\n        return _pendingOwner;\n    }\n\n    /**\n     * @dev Starts the ownership transfer of the contract to a new account. Replaces the pending transfer if there is one.\n     * Can only be called by the current owner.\n     */\n    function transferOwnership(address newOwner) public virtual override onlyOwner {\n        _pendingOwner = newOwner;\n        emit OwnershipTransferStarted(owner(), newOwner);\n    }\n\n    /**\n     * @dev Transfers ownership of the contract to a new account (`newOwner`) and deletes any pending owner.\n     * Internal function without access restriction.\n     */\n    function _transferOwnership(address newOwner) internal virtual override {\n        delete _pendingOwner;\n        super._transferOwnership(newOwner);\n    }\n\n    /**\n     * @dev The new owner accepts the ownership transfer.\n     */\n    function acceptOwnership() external {\n        address sender = _msgSender();\n        require(pendingOwner() == sender, \"Ownable2Step: caller is not the new owner\");\n        _transferOwnership(sender);\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":"lib/openzeppelin-contracts-upgradeable/contracts/access/OwnableUpgradeable.sol","source_code":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../utils/ContextUpgradeable.sol\";\nimport \"../proxy/utils/Initializable.sol\";\n\n/**\n * @dev Contract module which provides a basic access control mechanism, where\n * there is an account (an owner) that can be granted exclusive access to\n * specific functions.\n *\n * By default, the owner account will be the one that deploys the contract. This\n * can later be changed with {transferOwnership}.\n *\n * This module is used through inheritance. It will make available the modifier\n * `onlyOwner`, which can be applied to your functions to restrict their use to\n * the owner.\n */\nabstract contract OwnableUpgradeable is Initializable, ContextUpgradeable {\n    address private _owner;\n\n    event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n    /**\n     * @dev Initializes the contract setting the deployer as the initial owner.\n     */\n    function __Ownable_init() internal onlyInitializing {\n        __Ownable_init_unchained();\n    }\n\n    function __Ownable_init_unchained() internal onlyInitializing {\n        _transferOwnership(_msgSender());\n    }\n\n    /**\n     * @dev Throws if called by any account other than the owner.\n     */\n    modifier onlyOwner() {\n        _checkOwner();\n        _;\n    }\n\n    /**\n     * @dev Returns the address of the current owner.\n     */\n    function owner() public view virtual returns (address) {\n        return _owner;\n    }\n\n    /**\n     * @dev Throws if the sender is not the owner.\n     */\n    function _checkOwner() internal view virtual {\n        require(owner() == _msgSender(), \"Ownable: caller is not the owner\");\n    }\n\n    /**\n     * @dev Leaves the contract without owner. It will not be possible to call\n     * `onlyOwner` functions anymore. Can only be called by the current owner.\n     *\n     * NOTE: Renouncing ownership will leave the contract without an owner,\n     * thereby removing any functionality that is only available to the owner.\n     */\n    function renounceOwnership() public virtual onlyOwner {\n        _transferOwnership(address(0));\n    }\n\n    /**\n     * @dev Transfers ownership of the contract to a new account (`newOwner`).\n     * Can only be called by the current owner.\n     */\n    function transferOwnership(address newOwner) public virtual onlyOwner {\n        require(newOwner != address(0), \"Ownable: new owner is the zero address\");\n        _transferOwnership(newOwner);\n    }\n\n    /**\n     * @dev Transfers ownership of the contract to a new account (`newOwner`).\n     * Internal function without access restriction.\n     */\n    function _transferOwnership(address newOwner) internal virtual {\n        address oldOwner = _owner;\n        _owner = newOwner;\n        emit OwnershipTransferred(oldOwner, newOwner);\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":"lib/openzeppelin-contracts-upgradeable/contracts/interfaces/IERC1271Upgradeable.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 IERC1271Upgradeable {\n    /**\n     * @dev Should return whether the signature provided is valid for the provided data\n     * @param hash      Hash of the data to be signed\n     * @param signature Signature byte array associated with _data\n     */\n    function isValidSignature(bytes32 hash, bytes memory signature) external view returns (bytes4 magicValue);\n}\n"},{"file_path":"lib/openzeppelin-contracts-upgradeable/contracts/proxy/utils/Initializable.sol","source_code":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.8.1) (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 * ```\n * contract MyToken is ERC20Upgradeable {\n *     function initialize() initializer public {\n *         __ERC20_init(\"MyToken\", \"MTK\");\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":"lib/openzeppelin-contracts-upgradeable/contracts/token/ERC20/IERC20Upgradeable.sol","source_code":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.6.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(\n        address from,\n        address to,\n        uint256 amount\n    ) external returns (bool);\n}\n"},{"file_path":"lib/openzeppelin-contracts-upgradeable/contracts/token/ERC20/extensions/IERC20MetadataUpgradeable.sol","source_code":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/IERC20Metadata.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../IERC20Upgradeable.sol\";\n\n/**\n * @dev Interface for the optional metadata functions from the ERC20 standard.\n *\n * _Available since v4.1._\n */\ninterface IERC20MetadataUpgradeable is IERC20Upgradeable {\n    /**\n     * @dev Returns the name of the token.\n     */\n    function name() external view returns (string memory);\n\n    /**\n     * @dev Returns the symbol of the token.\n     */\n    function symbol() external view returns (string memory);\n\n    /**\n     * @dev Returns the decimals places of the token.\n     */\n    function decimals() external view returns (uint8);\n}\n"},{"file_path":"lib/openzeppelin-contracts-upgradeable/contracts/token/ERC20/extensions/draft-ERC20PermitUpgradeable.sol","source_code":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.8.0) (token/ERC20/extensions/draft-ERC20Permit.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./draft-IERC20PermitUpgradeable.sol\";\nimport \"../ERC20Upgradeable.sol\";\nimport \"../../../utils/cryptography/ECDSAUpgradeable.sol\";\nimport \"../../../utils/cryptography/EIP712Upgradeable.sol\";\nimport \"../../../utils/CountersUpgradeable.sol\";\nimport \"../../../proxy/utils/Initializable.sol\";\n\n/**\n * @dev Implementation 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 * _Available since v3.4._\n *\n * @custom:storage-size 51\n */\nabstract contract ERC20PermitUpgradeable is Initializable, ERC20Upgradeable, IERC20PermitUpgradeable, EIP712Upgradeable {\n    using CountersUpgradeable for CountersUpgradeable.Counter;\n\n    mapping(address => CountersUpgradeable.Counter) private _nonces;\n\n    // solhint-disable-next-line var-name-mixedcase\n    bytes32 private constant _PERMIT_TYPEHASH =\n        keccak256(\"Permit(address owner,address spender,uint256 value,uint256 nonce,uint256 deadline)\");\n    /**\n     * @dev In previous versions `_PERMIT_TYPEHASH` was declared as `immutable`.\n     * However, to ensure consistency with the upgradeable transpiler, we will continue\n     * to reserve a slot.\n     * @custom:oz-renamed-from _PERMIT_TYPEHASH\n     */\n    // solhint-disable-next-line var-name-mixedcase\n    bytes32 private _PERMIT_TYPEHASH_DEPRECATED_SLOT;\n\n    /**\n     * @dev Initializes the {EIP712} domain separator using the `name` parameter, and setting `version` to `\"1\"`.\n     *\n     * It's a good idea to use the same `name` that is defined as the ERC20 token name.\n     */\n    function __ERC20Permit_init(string memory name) internal onlyInitializing {\n        __EIP712_init_unchained(name, \"1\");\n    }\n\n    function __ERC20Permit_init_unchained(string memory) internal onlyInitializing {}\n\n    /**\n     * @dev See {IERC20Permit-permit}.\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    ) public virtual override {\n        require(block.timestamp <= deadline, \"ERC20Permit: expired deadline\");\n\n        bytes32 structHash = keccak256(abi.encode(_PERMIT_TYPEHASH, owner, spender, value, _useNonce(owner), deadline));\n\n        bytes32 hash = _hashTypedDataV4(structHash);\n\n        address signer = ECDSAUpgradeable.recover(hash, v, r, s);\n        require(signer == owner, \"ERC20Permit: invalid signature\");\n\n        _approve(owner, spender, value);\n    }\n\n    /**\n     * @dev See {IERC20Permit-nonces}.\n     */\n    function nonces(address owner) public view virtual override returns (uint256) {\n        return _nonces[owner].current();\n    }\n\n    /**\n     * @dev See {IERC20Permit-DOMAIN_SEPARATOR}.\n     */\n    // solhint-disable-next-line func-name-mixedcase\n    function DOMAIN_SEPARATOR() external view override returns (bytes32) {\n        return _domainSeparatorV4();\n    }\n\n    /**\n     * @dev \"Consume a nonce\": return the current value and increment.\n     *\n     * _Available since v4.1._\n     */\n    function _useNonce(address owner) internal virtual returns (uint256 current) {\n        CountersUpgradeable.Counter storage nonce = _nonces[owner];\n        current = nonce.current();\n        nonce.increment();\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":"lib/openzeppelin-contracts-upgradeable/contracts/token/ERC20/extensions/draft-IERC20PermitUpgradeable.sol","source_code":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/draft-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 */\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    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":"lib/openzeppelin-contracts-upgradeable/contracts/utils/AddressUpgradeable.sol","source_code":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.8.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     *\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://diligence.consensys.net/posts/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.5.11/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(\n        address target,\n        bytes memory data,\n        uint256 value\n    ) 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 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":"lib/openzeppelin-contracts-upgradeable/contracts/utils/ContextUpgradeable.sol","source_code":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)\n\npragma solidity ^0.8.0;\nimport \"../proxy/utils/Initializable.sol\";\n\n/**\n * @dev Provides information about the current execution context, including the\n * sender of the transaction and its data. While these are generally available\n * via msg.sender and msg.data, they should not be accessed in such a direct\n * manner, since when dealing with meta-transactions the account sending and\n * paying for execution may not be the actual sender (as far as an application\n * is concerned).\n *\n * This contract is only required for intermediate, library-like contracts.\n */\nabstract contract ContextUpgradeable is Initializable {\n    function __Context_init() internal onlyInitializing {\n    }\n\n    function __Context_init_unchained() internal onlyInitializing {\n    }\n    function _msgSender() internal view virtual returns (address) {\n        return msg.sender;\n    }\n\n    function _msgData() internal view virtual returns (bytes calldata) {\n        return msg.data;\n    }\n\n    /**\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":"lib/openzeppelin-contracts-upgradeable/contracts/utils/CountersUpgradeable.sol","source_code":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/Counters.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @title Counters\n * @author Matt Condon (@shrugs)\n * @dev Provides counters that can only be incremented, decremented or reset. This can be used e.g. to track the number\n * of elements in a mapping, issuing ERC721 ids, or counting request ids.\n *\n * Include with `using Counters for Counters.Counter;`\n */\nlibrary CountersUpgradeable {\n    struct Counter {\n        // This variable should never be directly accessed by users of the library: interactions must be restricted to\n        // the library's function. As of Solidity v0.5.2, this cannot be enforced, though there is a proposal to add\n        // this feature: see https://github.com/ethereum/solidity/issues/4637\n        uint256 _value; // default: 0\n    }\n\n    function current(Counter storage counter) internal view returns (uint256) {\n        return counter._value;\n    }\n\n    function increment(Counter storage counter) internal {\n        unchecked {\n            counter._value += 1;\n        }\n    }\n\n    function decrement(Counter storage counter) internal {\n        uint256 value = counter._value;\n        require(value > 0, \"Counter: decrement overflow\");\n        unchecked {\n            counter._value = value - 1;\n        }\n    }\n\n    function reset(Counter storage counter) internal {\n        counter._value = 0;\n    }\n}\n"},{"file_path":"lib/openzeppelin-contracts-upgradeable/contracts/utils/cryptography/SignatureCheckerUpgradeable.sol","source_code":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/cryptography/SignatureChecker.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./ECDSAUpgradeable.sol\";\nimport \"../AddressUpgradeable.sol\";\nimport \"../../interfaces/IERC1271Upgradeable.sol\";\n\n/**\n * @dev Signature verification helper that can be used instead of `ECDSA.recover` to seamlessly support both ECDSA\n * signatures from externally owned accounts (EOAs) as well as ERC1271 signatures from smart contract wallets like\n * Argent and Gnosis Safe.\n *\n * _Available since v4.1._\n */\nlibrary SignatureCheckerUpgradeable {\n    /**\n     * @dev Checks if a signature is valid for a given signer and data hash. If the signer is a smart contract, the\n     * signature is validated against that smart contract using ERC1271, otherwise it's validated using `ECDSA.recover`.\n     *\n     * NOTE: Unlike ECDSA signatures, contract signatures are revocable, and the outcome of this function can thus\n     * change through time. It could return true at block N and false at block N+1 (or the opposite).\n     */\n    function isValidSignatureNow(\n        address signer,\n        bytes32 hash,\n        bytes memory signature\n    ) internal view returns (bool) {\n        (address recovered, ECDSAUpgradeable.RecoverError error) = ECDSAUpgradeable.tryRecover(hash, signature);\n        if (error == ECDSAUpgradeable.RecoverError.NoError && recovered == signer) {\n            return true;\n        }\n\n        (bool success, bytes memory result) = signer.staticcall(\n            abi.encodeWithSelector(IERC1271Upgradeable.isValidSignature.selector, hash, signature)\n        );\n        return (success &&\n            result.length == 32 &&\n            abi.decode(result, (bytes32)) == bytes32(IERC1271Upgradeable.isValidSignature.selector));\n    }\n}\n"},{"file_path":"lib/openzeppelin-contracts-upgradeable/contracts/utils/math/MathUpgradeable.sol","source_code":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/math/Math.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Standard math utilities missing in the Solidity language.\n */\nlibrary MathUpgradeable {\n    enum Rounding {\n        Down, // Toward negative infinity\n        Up, // Toward infinity\n        Zero // Toward zero\n    }\n\n    /**\n     * @dev Returns the largest of two numbers.\n     */\n    function max(uint256 a, uint256 b) internal pure returns (uint256) {\n        return a > b ? a : b;\n    }\n\n    /**\n     * @dev Returns the smallest of two numbers.\n     */\n    function min(uint256 a, uint256 b) internal pure returns (uint256) {\n        return a < b ? a : b;\n    }\n\n    /**\n     * @dev Returns the average of two numbers. The result is rounded towards\n     * zero.\n     */\n    function average(uint256 a, uint256 b) internal pure returns (uint256) {\n        // (a + b) / 2 can overflow.\n        return (a & b) + (a ^ b) / 2;\n    }\n\n    /**\n     * @dev Returns the ceiling of the division of two numbers.\n     *\n     * This differs from standard division with `/` in that it rounds up instead\n     * of rounding down.\n     */\n    function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {\n        // (a + b - 1) / b can overflow on addition, so we distribute.\n        return a == 0 ? 0 : (a - 1) / b + 1;\n    }\n\n    /**\n     * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0\n     * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv)\n     * with further edits by Uniswap Labs also under MIT license.\n     */\n    function mulDiv(\n        uint256 x,\n        uint256 y,\n        uint256 denominator\n    ) internal pure returns (uint256 result) {\n        unchecked {\n            // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use\n            // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256\n            // variables such that product = prod1 * 2^256 + prod0.\n            uint256 prod0; // Least significant 256 bits of the product\n            uint256 prod1; // Most significant 256 bits of the product\n            assembly {\n                let mm := mulmod(x, y, not(0))\n                prod0 := mul(x, y)\n                prod1 := sub(sub(mm, prod0), lt(mm, prod0))\n            }\n\n            // Handle non-overflow cases, 256 by 256 division.\n            if (prod1 == 0) {\n                return prod0 / denominator;\n            }\n\n            // Make sure the result is less than 2^256. Also prevents denominator == 0.\n            require(denominator > prod1);\n\n            ///////////////////////////////////////////////\n            // 512 by 256 division.\n            ///////////////////////////////////////////////\n\n            // Make division exact by subtracting the remainder from [prod1 prod0].\n            uint256 remainder;\n            assembly {\n                // Compute remainder using mulmod.\n                remainder := mulmod(x, y, denominator)\n\n                // Subtract 256 bit number from 512 bit number.\n                prod1 := sub(prod1, gt(remainder, prod0))\n                prod0 := sub(prod0, remainder)\n            }\n\n            // Factor powers of two out of denominator and compute largest power of two divisor of denominator. Always >= 1.\n            // See https://cs.stackexchange.com/q/138556/92363.\n\n            // Does not overflow because the denominator cannot be zero at this stage in the function.\n            uint256 twos = denominator & (~denominator + 1);\n            assembly {\n                // Divide denominator by twos.\n                denominator := div(denominator, twos)\n\n                // Divide [prod1 prod0] by twos.\n                prod0 := div(prod0, twos)\n\n                // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one.\n                twos := add(div(sub(0, twos), twos), 1)\n            }\n\n            // Shift in bits from prod1 into prod0.\n            prod0 |= prod1 * twos;\n\n            // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such\n            // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for\n            // four bits. That is, denominator * inv = 1 mod 2^4.\n            uint256 inverse = (3 * denominator) ^ 2;\n\n            // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also works\n            // in modular arithmetic, doubling the correct bits in each step.\n            inverse *= 2 - denominator * inverse; // inverse mod 2^8\n            inverse *= 2 - denominator * inverse; // inverse mod 2^16\n            inverse *= 2 - denominator * inverse; // inverse mod 2^32\n            inverse *= 2 - denominator * inverse; // inverse mod 2^64\n            inverse *= 2 - denominator * inverse; // inverse mod 2^128\n            inverse *= 2 - denominator * inverse; // inverse mod 2^256\n\n            // Because the division is now exact we can divide by multiplying with the modular inverse of denominator.\n            // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is\n            // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1\n            // is no longer required.\n            result = prod0 * inverse;\n            return result;\n        }\n    }\n\n    /**\n     * @notice Calculates x * y / denominator with full precision, following the selected rounding direction.\n     */\n    function mulDiv(\n        uint256 x,\n        uint256 y,\n        uint256 denominator,\n        Rounding rounding\n    ) internal pure returns (uint256) {\n        uint256 result = mulDiv(x, y, denominator);\n        if (rounding == Rounding.Up && mulmod(x, y, denominator) > 0) {\n            result += 1;\n        }\n        return result;\n    }\n\n    /**\n     * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded down.\n     *\n     * Inspired by Henry S. Warren, Jr.'s \"Hacker's Delight\" (Chapter 11).\n     */\n    function sqrt(uint256 a) internal pure returns (uint256) {\n        if (a == 0) {\n            return 0;\n        }\n\n        // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target.\n        //\n        // We know that the \"msb\" (most significant bit) of our target number `a` is a power of 2 such that we have\n        // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`.\n        //\n        // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)`\n        // → `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))`\n        // → `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)`\n        //\n        // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit.\n        uint256 result = 1 << (log2(a) >> 1);\n\n        // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128,\n        // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at\n        // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision\n        // into the expected uint128 result.\n        unchecked {\n            result = (result + a / result) >> 1;\n            result = (result + a / result) >> 1;\n            result = (result + a / result) >> 1;\n            result = (result + a / result) >> 1;\n            result = (result + a / result) >> 1;\n            result = (result + a / result) >> 1;\n            result = (result + a / result) >> 1;\n            return min(result, a / result);\n        }\n    }\n\n    /**\n     * @notice Calculates sqrt(a), following the selected rounding direction.\n     */\n    function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) {\n        unchecked {\n            uint256 result = sqrt(a);\n            return result + (rounding == Rounding.Up && result * result < a ? 1 : 0);\n        }\n    }\n\n    /**\n     * @dev Return the log in base 2, rounded down, of a positive value.\n     * Returns 0 if given 0.\n     */\n    function log2(uint256 value) internal pure returns (uint256) {\n        uint256 result = 0;\n        unchecked {\n            if (value >> 128 > 0) {\n                value >>= 128;\n                result += 128;\n            }\n            if (value >> 64 > 0) {\n                value >>= 64;\n                result += 64;\n            }\n            if (value >> 32 > 0) {\n                value >>= 32;\n                result += 32;\n            }\n            if (value >> 16 > 0) {\n                value >>= 16;\n                result += 16;\n            }\n            if (value >> 8 > 0) {\n                value >>= 8;\n                result += 8;\n            }\n            if (value >> 4 > 0) {\n                value >>= 4;\n                result += 4;\n            }\n            if (value >> 2 > 0) {\n                value >>= 2;\n                result += 2;\n            }\n            if (value >> 1 > 0) {\n                result += 1;\n            }\n        }\n        return result;\n    }\n\n    /**\n     * @dev Return the log in base 2, following the selected rounding direction, of a positive value.\n     * Returns 0 if given 0.\n     */\n    function log2(uint256 value, Rounding rounding) internal pure returns (uint256) {\n        unchecked {\n            uint256 result = log2(value);\n            return result + (rounding == Rounding.Up && 1 << result < value ? 1 : 0);\n        }\n    }\n\n    /**\n     * @dev Return the log in base 10, rounded down, of a positive value.\n     * Returns 0 if given 0.\n     */\n    function log10(uint256 value) internal pure returns (uint256) {\n        uint256 result = 0;\n        unchecked {\n            if (value >= 10**64) {\n                value /= 10**64;\n                result += 64;\n            }\n            if (value >= 10**32) {\n                value /= 10**32;\n                result += 32;\n            }\n            if (value >= 10**16) {\n                value /= 10**16;\n                result += 16;\n            }\n            if (value >= 10**8) {\n                value /= 10**8;\n                result += 8;\n            }\n            if (value >= 10**4) {\n                value /= 10**4;\n                result += 4;\n            }\n            if (value >= 10**2) {\n                value /= 10**2;\n                result += 2;\n            }\n            if (value >= 10**1) {\n                result += 1;\n            }\n        }\n        return result;\n    }\n\n    /**\n     * @dev Return the log in base 10, following the selected rounding direction, of a positive value.\n     * Returns 0 if given 0.\n     */\n    function log10(uint256 value, Rounding rounding) internal pure returns (uint256) {\n        unchecked {\n            uint256 result = log10(value);\n            return result + (rounding == Rounding.Up && 10**result < value ? 1 : 0);\n        }\n    }\n\n    /**\n     * @dev Return the log in base 256, rounded down, of a positive value.\n     * Returns 0 if given 0.\n     *\n     * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string.\n     */\n    function log256(uint256 value) internal pure returns (uint256) {\n        uint256 result = 0;\n        unchecked {\n            if (value >> 128 > 0) {\n                value >>= 128;\n                result += 16;\n            }\n            if (value >> 64 > 0) {\n                value >>= 64;\n                result += 8;\n            }\n            if (value >> 32 > 0) {\n                value >>= 32;\n                result += 4;\n            }\n            if (value >> 16 > 0) {\n                value >>= 16;\n                result += 2;\n            }\n            if (value >> 8 > 0) {\n                result += 1;\n            }\n        }\n        return result;\n    }\n\n    /**\n     * @dev Return the log in base 10, following the selected rounding direction, of a positive value.\n     * Returns 0 if given 0.\n     */\n    function log256(uint256 value, Rounding rounding) internal pure returns (uint256) {\n        unchecked {\n            uint256 result = log256(value);\n            return result + (rounding == Rounding.Up && 1 << (result * 8) < value ? 1 : 0);\n        }\n    }\n}\n"},{"file_path":"src/Stablecoin.sol","source_code":"// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.28;\n\nimport \"openzeppelin-contracts-upgradeable/contracts/token/ERC20/extensions/draft-ERC20PermitUpgradeable.sol\";\nimport \"openzeppelin-contracts-upgradeable/contracts/access/Ownable2StepUpgradeable.sol\";\nimport \"openzeppelin-contracts-upgradeable/contracts/security/PausableUpgradeable.sol\";\n\ncontract Stablecoin is ERC20PermitUpgradeable, Ownable2StepUpgradeable, PausableUpgradeable {\n\n    error CallerNotAutoOwner(address caller);\n    error NotAllowedAddress(address addr);\n    error FrozenAddress(address addr);\n    error InvalidNonce(uint256 nonce);\n    error InvalidChainId(uint256 chainId);\n    error InvalidAmount(uint256 amount);\n    error MintLimitExceeded(uint256 amount, uint256 limit);\n   \n    event Mint(address indexed caller, address indexed to, uint256 amount);\n    event AutoMint(address indexed caller, address indexed to, uint256 indexed seq, uint256 amount);\n    event Burn(address indexed caller, address indexed from, uint256 amount);\n    event AutoBurn(address indexed caller, address indexed from, uint256 indexed seq, uint256 amount);\n    event Freeze(address indexed caller, address indexed account);\n    event Unfreeze(address indexed caller, address indexed account);\n    event AutoOwnerTransferred(address indexed previousOwner, address indexed newOwner);\n    event SetAutoMintMaxLimit(uint256 previousLimit, uint256 newLimit);\n\n    mapping(address => bool) public frozen;\n\n    uint256 public nonce;\n    uint256 public chainId;\n    address public autoOwner;\n    uint256 public autoMintMaxLimit;\n\n    modifier onlyAutoOwner(){\n        require(msg.sender == autoOwner, CallerNotAutoOwner(msg.sender));\n        _;\n    }\n\n   /**\n     * @dev Constructor\n     */\n    constructor() {\n        _disableInitializers();\n    }\n\n   /**\n     * @dev Initializer method\n     */\n    function initialize(string memory _name, string memory _symbol) public initializer {\n        __Context_init();\n        __ERC20_init(_name, _symbol);\n        __ERC20Permit_init(_name);\n        __Ownable2Step_init();\n        __Pausable_init();\n        __AutoOwnerInit(msg.sender);\n\n        chainId = block.chainid;\n    }\n\n   /**\n     * @dev Init auto owner\n     */\n    function __AutoOwnerInit(address _autoOwner) internal onlyInitializing {\n        require(_autoOwner != address(0), NotAllowedAddress(_autoOwner));\n        emit AutoOwnerTransferred(autoOwner, _autoOwner);\n        autoOwner = _autoOwner;\n    }\n    \n    /**\n     * @dev Transfer auto owner\n     * @param _newAutoOwner new auto owner address\n     */\n    function transferAutoOwnership(address _newAutoOwner) external onlyOwner {\n        require(_newAutoOwner != address(0), NotAllowedAddress(_newAutoOwner));\n        emit AutoOwnerTransferred(autoOwner, _newAutoOwner);\n        autoOwner = _newAutoOwner;\n    }\n\n    \n    /**\n     * @dev Rennounce auto owner\n     */\n    function renounceAutoOwnership() external onlyOwner {\n        emit AutoOwnerTransferred(autoOwner, address(0));\n        autoOwner = address(0);\n    }\n\n    /**\n     * @dev Throws if account is frozen.\n     */\n    modifier notFrozen(address account) {\n        require(!frozen[account],FrozenAddress(account));\n        _;\n    }\n\n    /**\n    *  @dev set auto mint max limit\n     * @param limit auto mint max limit\n     * Can only be called by the auto owner.\n     */\n    function setAutoMintMaxLimit(uint256 limit) external onlyOwner {\n        emit SetAutoMintMaxLimit(autoMintMaxLimit, limit);\n        autoMintMaxLimit = limit;\n    }\n\n    /** \n     * @dev See {ERC20-_mint}.\n     * @param amount Mint amount\n     * @return True if successful\n     * Can only be called by the current owner.\n     */\n    function mint(uint256 amount) external onlyOwner returns (bool) {\n        _mint(_msgSender(), amount);\n        emit Mint(_msgSender(), _msgSender(), amount);\n        return true;\n    }\n\n    /** \n     * @dev See {ERC20-_mint}.\n     * @param to Mint to address\n     * @param amount Mint amount\n     * @return True if successful\n     * Can only be called by the current owner.\n     */\n    function mint(address to, uint256 amount) external whenNotPaused notFrozen(to) onlyOwner returns (bool) {\n        _mint(to, amount);\n        emit Mint(_msgSender(), to, amount);\n        return true;\n    }\n\n    /**\n     * @dev See {ERC20-_mint}.\n     * @param to Destination address\n     * @param amount Mint amount\n     * @param seq nonce\n     * @param chain chain id\n     * @return True if successful\n     * Can only be called by the current auto owner.\n     */\n    function autoMint(address to, uint256 amount, uint256 seq, uint256 chain) external whenNotPaused notFrozen(to) onlyAutoOwner returns (bool) {\n        require(seq == nonce, InvalidNonce(seq));\n        require(chain == chainId, InvalidChainId(chain));\n        require(amount > 0, InvalidAmount(amount));  \n        require(autoMintMaxLimit >= amount, MintLimitExceeded(amount, autoMintMaxLimit));\n        nonce++;\n        _mint(to, amount);\n        emit Mint(_msgSender(), to, amount);\n        emit AutoMint(_msgSender(), to, seq, amount);\n        return true;\n    }\n\n    /**\n     * @dev See {ERC20-_burn}.\n     * @param amount Burn amount\n     * @return True if successful\n     * Can only be called by the current owner.\n     */\n    function burn(uint256 amount) external onlyOwner returns (bool) {\n        _burn(_msgSender(), amount);\n        emit Burn(_msgSender(), _msgSender(), amount);\n        return true;\n    }\n\n    /**\n     * @dev See {ERC20-_burn}.\n     * @param amount Burn amount\n     * @param seq nonce\n     * @param chain chain id\n     * @return True if successful\n     * Can only be called by the current auto owner.\n     */\n    function autoBurn(uint256 amount, uint256 seq, uint256 chain) external whenNotPaused onlyAutoOwner returns (bool) {\n       require(seq == nonce, InvalidNonce(seq));\n        require(chain == chainId, InvalidChainId(chain));\n        require(amount > 0, InvalidAmount(amount));  \n        nonce++;\n        address owner = owner();\n        _burn(owner, amount);\n        emit Burn(autoOwner, owner, amount);\n        emit AutoBurn(autoOwner,owner, seq, amount);\n        return true;\n    }\n    \n    /**\n     * @dev Adds account to frozen state.\n     * Can only be called by the current owner.\n     */\n    function freeze(address account) external onlyOwner {\n        frozen[account] = true;\n        emit Freeze(_msgSender(), account);\n    }\n\n    /**\n     * @dev Removes account from frozen state.\n     * Can only be called by the current owner.\n     */\n    function unfreeze(address account) external onlyOwner {\n        delete frozen[account];\n        emit Unfreeze(_msgSender(), account);\n    }\n\n    /**\n     * @dev Triggers stopped state.\n     * Can only be called by the current owner.\n     */\n    function pause() external onlyOwner {\n        _pause();\n    }\n\n    /**\n     * @dev Returns to normal state.\n     * Can only be called by the current owner.\n     */\n    function unpause() external onlyOwner {\n        _unpause();\n    }\n\n    /**\n     * @dev Unsupported. Leaves the contract without owner.\n     */\n    function renounceOwnership() public view override onlyOwner {\n        revert(\"Unsupported\");\n    }\n\n    /**\n     * @dev See {ERC20-_transfer}.\n     * @param from Source address\n     * @param to Destination address\n     * @param amount Transfer amount\n     */\n    function _transfer(address from, address to, uint256 amount) internal override whenNotPaused notFrozen(from) notFrozen(to) {\n        super._transfer(from, to, amount);\n    }\n\n    /**\n     * @dev See {ERC20-_approve}.\n     * @param owner Owners's address\n     * @param spender Spender's address\n     * @param amount Allowance amount\n     */\n    function _approve(address owner, address spender, uint256 amount) internal override whenNotPaused notFrozen(owner) notFrozen(spender) {\n        super._approve(owner, spender, amount);\n    }\n}\n"},{"file_path":"src/libraries/EIP7598Constants.sol","source_code":"// SPDX-License-Identifier: MIT\npragma solidity ^0.8.28;\n\n/**\n * @title EIP7598Constants\n * @notice Constants for EIP-7598 (Transferable ERC-20 Permit)\n */\nlibrary EIP7598Constants {\n    /**\n     * @dev EIP-712 typehash for transferWithAuthorization\n     * keccak256(\"TransferWithAuthorization(address from,address to,uint256 value,uint256 validAfter,uint256 validBefore,bytes32 nonce)\")\n     */\n    bytes32 internal constant TRANSFER_WITH_AUTHORIZATION_TYPEHASH =\n        0x7c7c6cdb67a18743f49ec6fa9b35f50d52ed05cbed4cc592e13b44501c1a2267;\n\n     /**\n     * @dev EIP-712 typehash for receiveWithAuthorization\n     * keccak256(\"ReceiveWithAuthorization(address from,address to,uint256 value,uint256 validAfter,uint256 validBefore,bytes32 nonce)\")\n     */\n    bytes32 internal constant RECEIVE_WITH_AUTHORIZATION_TYPEHASH =\n        0xd099cc98ef71107a616c4f0f941f04c322d8e254fe26b3c6668db87aae413de8;    \n}\n"}],"certified":false,"conflicting_implementations":null,"abi":[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"address","name":"caller","type":"address"}],"name":"CallerNotAutoOwner","type":"error"},{"inputs":[{"internalType":"address","name":"addr","type":"address"}],"name":"FrozenAddress","type":"error"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"InvalidAmount","type":"error"},{"inputs":[{"internalType":"uint256","name":"chainId","type":"uint256"}],"name":"InvalidChainId","type":"error"},{"inputs":[{"internalType":"uint256","name":"nonce","type":"uint256"}],"name":"InvalidNonce","type":"error"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"limit","type":"uint256"}],"name":"MintLimitExceeded","type":"error"},{"inputs":[{"internalType":"address","name":"addr","type":"address"}],"name":"NotAllowedAddress","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"authorizer","type":"address"},{"indexed":true,"internalType":"bytes32","name":"nonce","type":"bytes32"}],"name":"AuthorizationCanceled","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"authorizer","type":"address"},{"indexed":true,"internalType":"bytes32","name":"nonce","type":"bytes32"}],"name":"AuthorizationUsed","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"caller","type":"address"},{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"uint256","name":"seq","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"AutoBurn","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"caller","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"seq","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"AutoMint","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"AutoOwnerTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"caller","type":"address"},{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Burn","type":"event"},{"anonymous":false,"inputs":[],"name":"EIP7598Disabled","type":"event"},{"anonymous":false,"inputs":[],"name":"EIP7598Enabled","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"caller","type":"address"},{"indexed":true,"internalType":"address","name":"account","type":"address"}],"name":"Freeze","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint8","name":"version","type":"uint8"}],"name":"Initialized","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"caller","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Mint","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferStarted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"previousLimit","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newLimit","type":"uint256"}],"name":"SetAutoMintMaxLimit","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"caller","type":"address"},{"indexed":true,"internalType":"address","name":"account","type":"address"}],"name":"Unfreeze","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"inputs":[],"name":"DOMAIN_SEPARATOR","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"acceptOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"authorizer","type":"address"},{"internalType":"bytes32","name":"nonce","type":"bytes32"}],"name":"authorizationState","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"seq","type":"uint256"},{"internalType":"uint256","name":"chain","type":"uint256"}],"name":"autoBurn","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"seq","type":"uint256"},{"internalType":"uint256","name":"chain","type":"uint256"}],"name":"autoMint","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"autoMintMaxLimit","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"autoOwner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"burn","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"authorizer","type":"address"},{"internalType":"bytes32","name":"nonce","type":"bytes32"}],"name":"cancelAuthorization","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"chainId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"subtractedValue","type":"uint256"}],"name":"decreaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"disableEIP7598","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"eip7598EnableFlag","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"enableEIP7598","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"freeze","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"frozen","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"addedValue","type":"uint256"}],"name":"increaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_name","type":"string"},{"internalType":"string","name":"_symbol","type":"string"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"initializeV2","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"mint","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"mint","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"nonce","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"nonces","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pendingOwner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"uint256","name":"deadline","type":"uint256"},{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"}],"name":"permit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"uint256","name":"validAfter","type":"uint256"},{"internalType":"uint256","name":"validBefore","type":"uint256"},{"internalType":"bytes32","name":"nonce","type":"bytes32"},{"internalType":"bytes","name":"signature","type":"bytes"}],"name":"receiveWithAuthorization","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"uint256","name":"validAfter","type":"uint256"},{"internalType":"uint256","name":"validBefore","type":"uint256"},{"internalType":"bytes32","name":"nonce","type":"bytes32"},{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"}],"name":"receiveWithAuthorization","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceAutoOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"limit","type":"uint256"}],"name":"setAutoMintMaxLimit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_newAutoOwner","type":"address"}],"name":"transferAutoOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"uint256","name":"validAfter","type":"uint256"},{"internalType":"uint256","name":"validBefore","type":"uint256"},{"internalType":"bytes32","name":"nonce","type":"bytes32"},{"internalType":"bytes","name":"signature","type":"bytes"}],"name":"transferWithAuthorization","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"uint256","name":"validAfter","type":"uint256"},{"internalType":"uint256","name":"validBefore","type":"uint256"},{"internalType":"bytes32","name":"nonce","type":"bytes32"},{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"}],"name":"transferWithAuthorization","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"unfreeze","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"unpause","outputs":[],"stateMutability":"nonpayable","type":"function"}],"is_changed_bytecode":false,"is_partially_verified":false,"constructor_args":null}