{"sources":{"contracts/util/StorageSlot.sol":{"content":"// SPDX-License-Identifier: MIT\r\n\r\npragma solidity 0.8.11;\r\n\r\n/**\r\n * @dev Forked from https://github.com/OpenZeppelin/openzeppelin-contracts/blob/4961a51cc736c7d4aa9bd2e11e4cbbaff73efee9/contracts/utils/StorageSlot.sol\r\n * Modifications:\r\n * 1. Change solidity version to 0.8.11\r\n */\r\n/**\r\n * @dev Library for reading and writing primitive types to specific storage slots.\r\n *\r\n * Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts.\r\n * This library helps with reading and writing to such slots without the need for inline assembly.\r\n *\r\n * The functions in this library return Slot structs that contain a `value` member that can be used to read or write.\r\n *\r\n * Example usage to set ERC1967 implementation slot:\r\n * ```\r\n * contract ERC1967 {\r\n *     bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\r\n *\r\n *     function _getImplementation() internal view returns (address) {\r\n *         return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\r\n *     }\r\n *\r\n *     function _setImplementation(address newImplementation) internal {\r\n *         require(Address.isContract(newImplementation), \"ERC1967: new implementation is not a contract\");\r\n *         StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\r\n *     }\r\n * }\r\n * ```\r\n *\r\n * _Available since v4.1 for `address`, `bool`, `bytes32`, and `uint256`._\r\n */\r\nlibrary StorageSlot {\r\n    struct AddressSlot {\r\n        address value;\r\n    }\r\n\r\n    struct BooleanSlot {\r\n        bool value;\r\n    }\r\n\r\n    struct Bytes32Slot {\r\n        bytes32 value;\r\n    }\r\n\r\n    struct Uint256Slot {\r\n        uint256 value;\r\n    }\r\n\r\n    /**\r\n     * @dev Returns an `AddressSlot` with member `value` located at `slot`.\r\n     */\r\n    function getAddressSlot(bytes32 slot)\r\n        internal\r\n        pure\r\n        returns (AddressSlot storage r)\r\n    {\r\n        assembly {\r\n            r.slot := slot\r\n        }\r\n    }\r\n\r\n    /**\r\n     * @dev Returns an `BooleanSlot` with member `value` located at `slot`.\r\n     */\r\n    function getBooleanSlot(bytes32 slot)\r\n        internal\r\n        pure\r\n        returns (BooleanSlot storage r)\r\n    {\r\n        assembly {\r\n            r.slot := slot\r\n        }\r\n    }\r\n\r\n    /**\r\n     * @dev Returns an `Bytes32Slot` with member `value` located at `slot`.\r\n     */\r\n    function getBytes32Slot(bytes32 slot)\r\n        internal\r\n        pure\r\n        returns (Bytes32Slot storage r)\r\n    {\r\n        assembly {\r\n            r.slot := slot\r\n        }\r\n    }\r\n\r\n    /**\r\n     * @dev Returns an `Uint256Slot` with member `value` located at `slot`.\r\n     */\r\n    function getUint256Slot(bytes32 slot)\r\n        internal\r\n        pure\r\n        returns (Uint256Slot storage r)\r\n    {\r\n        assembly {\r\n            r.slot := slot\r\n        }\r\n    }\r\n}\r\n"},"contracts/upgradeability/ERC1967Upgrade.sol":{"content":"// SPDX-License-Identifier: MIT\r\n// OpenZeppelin Contracts v4.4.1 (proxy/ERC1967/ERC1967Upgrade.sol)\r\n\r\npragma solidity 0.8.11;\r\n\r\nimport \"./draft-IERC1822.sol\";\r\nimport \"../util/Address.sol\";\r\nimport \"../util/StorageSlot.sol\";\r\n\r\n/**\r\n * @dev This abstract contract provides getters and event emitting update functions for\r\n * https://eips.ethereum.org/EIPS/eip-1967[EIP1967] slots.\r\n *\r\n * _Available since v4.1._\r\n *\r\n * @custom:oz-upgrades-unsafe-allow delegatecall\r\n */\r\nabstract contract ERC1967Upgrade {\r\n    // This is the keccak-256 hash of \"eip1967.proxy.rollback\" subtracted by 1\r\n    bytes32 private constant _ROLLBACK_SLOT = 0x4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd9143;\r\n\r\n    /**\r\n     * @dev Storage slot with the address of the current implementation.\r\n     * This is the keccak-256 hash of \"eip1967.proxy.implementation\" subtracted by 1, and is\r\n     * validated in the constructor.\r\n     */\r\n    bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\r\n\r\n    /**\r\n     * @dev Emitted when the implementation is upgraded.\r\n     */\r\n    event Upgraded(address indexed implementation);\r\n\r\n    /**\r\n     * @dev Returns the current implementation address.\r\n     */\r\n    function _getImplementation() internal view returns (address) {\r\n        return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\r\n    }\r\n\r\n    /**\r\n     * @dev Stores a new address in the EIP1967 implementation slot.\r\n     */\r\n    function _setImplementation(address newImplementation) private {\r\n        require(Address.isContract(newImplementation), \"ERC1967: new implementation is not a contract\");\r\n        StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\r\n    }\r\n\r\n    /**\r\n     * @dev Perform implementation upgrade\r\n     *\r\n     * Emits an {Upgraded} event.\r\n     */\r\n    function _upgradeTo(address newImplementation) internal {\r\n        _setImplementation(newImplementation);\r\n        emit Upgraded(newImplementation);\r\n    }\r\n\r\n    /**\r\n     * @dev Perform implementation upgrade with additional setup call.\r\n     *\r\n     * Emits an {Upgraded} event.\r\n     */\r\n    function _upgradeToAndCall(\r\n        address newImplementation,\r\n        bytes memory data,\r\n        bool forceCall\r\n    ) internal {\r\n        _upgradeTo(newImplementation);\r\n        if (data.length > 0 || forceCall) {\r\n            Address.functionDelegateCall(newImplementation, data);\r\n        }\r\n    }\r\n\r\n    /**\r\n     * @dev Perform implementation upgrade with security checks for UUPS proxies, and additional setup call.\r\n     *\r\n     * Emits an {Upgraded} event.\r\n     */\r\n    function _upgradeToAndCallUUPS(\r\n        address newImplementation,\r\n        bytes memory data,\r\n        bool forceCall\r\n    ) internal {\r\n        // Upgrades from old implementations will perform a rollback test. This test requires the new\r\n        // implementation to upgrade back to the old, non-ERC1822 compliant, implementation. Removing\r\n        // this special case will break upgrade paths from old UUPS implementation to new ones.\r\n        if (StorageSlot.getBooleanSlot(_ROLLBACK_SLOT).value) {\r\n            _setImplementation(newImplementation);\r\n        } else {\r\n            try IERC1822Proxiable(newImplementation).proxiableUUID() returns (bytes32 slot) {\r\n                require(slot == _IMPLEMENTATION_SLOT, \"ERC1967Upgrade: unsupported proxiableUUID\");\r\n            } catch {\r\n                revert(\"ERC1967Upgrade: new implementation is not UUPS\");\r\n            }\r\n            _upgradeToAndCall(newImplementation, data, forceCall);\r\n        }\r\n    }\r\n \r\n    uint256[50] private _gap;\r\n}"},"contracts/upgradeability/UUPSUpgradeable.sol":{"content":"// SPDX-License-Identifier: MIT\r\n// OpenZeppelin Contracts (last updated v4.5.0) (proxy/utils/UUPSUpgradeable.sol)\r\n\r\npragma solidity 0.8.11;\r\n\r\nimport \"./draft-IERC1822.sol\";\r\nimport \"./ERC1967Upgrade.sol\";\r\n\r\n/**\r\n * @dev An upgradeability mechanism designed for UUPS proxies. The functions included here can perform an upgrade of an\r\n * {ERC1967Proxy}, when this contract is set as the implementation behind such a proxy.\r\n *\r\n * A security mechanism ensures that an upgrade does not turn off upgradeability accidentally, although this risk is\r\n * reinstated if the upgrade retains upgradeability but removes the security mechanism, e.g. by replacing\r\n * `UUPSUpgradeable` with a custom implementation of upgrades.\r\n *\r\n * The {_authorizeUpgrade} function must be overridden to include access restriction to the upgrade mechanism.\r\n *\r\n * _Available since v4.1._\r\n */\r\nabstract contract UUPSUpgradeable is IERC1822Proxiable, ERC1967Upgrade {\r\n    /// @custom:oz-upgrades-unsafe-allow state-variable-immutable state-variable-assignment\r\n    address private immutable __self = address(this);\r\n\r\n    /**\r\n     * @dev Check that the execution is being performed through a delegatecall call and that the execution context is\r\n     * a proxy contract with an implementation (as defined in ERC1967) pointing to self. This should only be the case\r\n     * for UUPS and transparent proxies that are using the current contract as their implementation. Execution of a\r\n     * function through ERC1167 minimal proxies (clones) would not normally pass this test, but is not guaranteed to\r\n     * fail.\r\n     */\r\n    modifier onlyProxy() {\r\n        require(\r\n            address(this) != __self,\r\n            \"Function must be called through delegatecall\"\r\n        );\r\n        require(\r\n            _getImplementation() == __self,\r\n            \"Function must be called through active proxy\"\r\n        );\r\n        _;\r\n    }\r\n\r\n    /**\r\n     * @dev Check that the execution is not being performed through a delegate call. This allows a function to be\r\n     * callable on the implementing contract but not through proxies.\r\n     */\r\n    modifier notDelegated() {\r\n        require(\r\n            address(this) == __self,\r\n            \"UUPSUpgradeable: must not be called through delegatecall\"\r\n        );\r\n        _;\r\n    }\r\n\r\n    /**\r\n     * @dev Implementation of the ERC1822 {proxiableUUID} function. This returns the storage slot used by the\r\n     * implementation. It is used to validate that the this implementation remains valid after an upgrade.\r\n     *\r\n     * IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks\r\n     * bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this\r\n     * function revert if invoked through a proxy. This is guaranteed by the `notDelegated` modifier.\r\n     */\r\n    function proxiableUUID()\r\n        external\r\n        view\r\n        virtual\r\n        override\r\n        notDelegated\r\n        returns (bytes32)\r\n    {\r\n        return _IMPLEMENTATION_SLOT;\r\n    }\r\n\r\n    /**\r\n     * @dev Upgrade the implementation of the proxy to `newImplementation`.\r\n     *\r\n     * Calls {_authorizeUpgrade}.\r\n     *\r\n     * Emits an {Upgraded} event.\r\n     */\r\n    function upgradeTo(address newImplementation) external virtual onlyProxy {\r\n        _authorizeUpgrade(newImplementation);\r\n        _upgradeToAndCallUUPS(newImplementation, new bytes(0), false);\r\n    }\r\n\r\n    /**\r\n     * @dev Upgrade the implementation of the proxy to `newImplementation`, and subsequently execute the function call\r\n     * encoded in `data`.\r\n     *\r\n     * Calls {_authorizeUpgrade}.\r\n     *\r\n     * Emits an {Upgraded} event.\r\n     */\r\n    function upgradeToAndCall(address newImplementation, bytes memory data)\r\n        external\r\n        payable\r\n        virtual\r\n        onlyProxy\r\n    {\r\n        _authorizeUpgrade(newImplementation);\r\n        _upgradeToAndCallUUPS(newImplementation, data, true);\r\n    }\r\n\r\n    /**\r\n     * @dev Function that should revert when `msg.sender` is not authorized to upgrade the contract. Called by\r\n     * {upgradeTo} and {upgradeToAndCall}.\r\n     *\r\n     * Normally, this function will use an xref:access.adoc[access control] modifier such as {Ownable-onlyOwner}.\r\n     *\r\n     * ```solidity\r\n     * function _authorizeUpgrade(address) internal override onlyOwner {}\r\n     * ```\r\n     */\r\n    function _authorizeUpgrade(address newImplementation) internal virtual;\r\n\r\n    uint256[50] private _gap;\r\n}\r\n"},"contracts/upgradeability/draft-IERC1822.sol":{"content":"// SPDX-License-Identifier: MIT\r\n// OpenZeppelin Contracts v4.x.0 (proxy/ERC1822/IProxiable.sol)\r\n\r\npragma solidity 0.8.11;\r\n\r\n/**\r\n * @dev ERC1822: Universal Upgradeable Proxy Standard (UUPS) documents a method for upgradeability through a simplified\r\n * proxy whose upgrades are fully controlled by the current implementation.\r\n */\r\ninterface IERC1822Proxiable {\r\n    /**\r\n     * @dev Returns the storage slot that the proxiable contract assumes is being used to store the implementation\r\n     * address.\r\n     *\r\n     * IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks\r\n     * bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this\r\n     * function revert if invoked through a proxy.\r\n     */\r\n    function proxiableUUID() external view returns (bytes32);\r\n}"},"contracts/util/Address.sol":{"content":"// SPDX-License-Identifier: MIT\r\n// OpenZeppelin Contracts v4.4.0 (utils/Address.sol)\r\n\r\npragma solidity 0.8.11;\r\n\r\n/**\r\n * @dev Collection of functions related to the address type\r\n */\r\nlibrary Address {\r\n    /**\r\n     * @dev Returns true if `account` is a contract.\r\n     * @dev Forked from https://github.com/OpenZeppelin/openzeppelin-contracts/blob/4961a51cc736c7d4aa9bd2e11e4cbbaff73efee9/contracts/utils/Context.sol\r\n     * Modifications:\r\n     * 1. Change solidity version to 0.8.11\r\n     *\r\n     * [IMPORTANT]\r\n     * ====\r\n     * It is unsafe to assume that an address for which this function returns\r\n     * false is an externally-owned account (EOA) and not a contract.\r\n     *\r\n     * Among others, `isContract` will return false for the following\r\n     * types of addresses:\r\n     *\r\n     *  - an externally-owned account\r\n     *  - a contract in construction\r\n     *  - an address where a contract will be created\r\n     *  - an address where a contract lived, but was destroyed\r\n     * ====\r\n     */\r\n    function isContract(address account) internal view returns (bool) {\r\n        // This method relies on extcodesize, which returns 0 for contracts in\r\n        // construction, since the code is only stored at the end of the\r\n        // constructor execution.\r\n\r\n        uint256 size;\r\n        assembly {\r\n            size := extcodesize(account)\r\n        }\r\n        return size > 0;\r\n    }\r\n\r\n    /**\r\n     * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\r\n     * `recipient`, forwarding all available gas and reverting on errors.\r\n     *\r\n     * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\r\n     * of certain opcodes, possibly making contracts go over the 2300 gas limit\r\n     * imposed by `transfer`, making them unable to receive funds via\r\n     * `transfer`. {sendValue} removes this limitation.\r\n     *\r\n     * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\r\n     *\r\n     * IMPORTANT: because control is transferred to `recipient`, care must be\r\n     * taken to not create reentrancy vulnerabilities. Consider using\r\n     * {ReentrancyGuard} or the\r\n     * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\r\n     */\r\n    function sendValue(address payable recipient, uint256 amount) internal {\r\n        require(address(this).balance >= amount, \"Address: insufficient balance\");\r\n\r\n        (bool success, ) = recipient.call{value: amount}(\"\");\r\n        require(success, \"Address: unable to send value, recipient may have reverted\");\r\n    }\r\n\r\n    /**\r\n     * @dev Performs a Solidity function call using a low level `call`. A\r\n     * plain `call` is an unsafe replacement for a function call: use this\r\n     * function instead.\r\n     *\r\n     * If `target` reverts with a revert reason, it is bubbled up by this\r\n     * function (like regular Solidity function calls).\r\n     *\r\n     * Returns the raw returned data. To convert to the expected return value,\r\n     * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\r\n     *\r\n     * Requirements:\r\n     *\r\n     * - `target` must be a contract.\r\n     * - calling `target` with `data` must not revert.\r\n     *\r\n     * _Available since v3.1._\r\n     */\r\n    function functionCall(address target, bytes memory data) internal returns (bytes memory) {\r\n        return functionCall(target, data, \"Address: low-level call failed\");\r\n    }\r\n\r\n    /**\r\n     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\r\n     * `errorMessage` as a fallback revert reason when `target` reverts.\r\n     *\r\n     * _Available since v3.1._\r\n     */\r\n    function functionCall(\r\n        address target,\r\n        bytes memory data,\r\n        string memory errorMessage\r\n    ) internal returns (bytes memory) {\r\n        return functionCallWithValue(target, data, 0, errorMessage);\r\n    }\r\n\r\n    /**\r\n     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\r\n     * but also transferring `value` wei to `target`.\r\n     *\r\n     * Requirements:\r\n     *\r\n     * - the calling contract must have an ETH balance of at least `value`.\r\n     * - the called Solidity function must be `payable`.\r\n     *\r\n     * _Available since v3.1._\r\n     */\r\n    function functionCallWithValue(\r\n        address target,\r\n        bytes memory data,\r\n        uint256 value\r\n    ) internal returns (bytes memory) {\r\n        return functionCallWithValue(target, data, value, \"Address: low-level call with value failed\");\r\n    }\r\n\r\n    /**\r\n     * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\r\n     * with `errorMessage` as a fallback revert reason when `target` reverts.\r\n     *\r\n     * _Available since v3.1._\r\n     */\r\n    function functionCallWithValue(\r\n        address target,\r\n        bytes memory data,\r\n        uint256 value,\r\n        string memory errorMessage\r\n    ) internal returns (bytes memory) {\r\n        require(address(this).balance >= value, \"Address: insufficient balance for call\");\r\n        require(isContract(target), \"Address: call to non-contract\");\r\n\r\n        (bool success, bytes memory returndata) = target.call{value: value}(data);\r\n        return verifyCallResult(success, returndata, errorMessage);\r\n    }\r\n\r\n    /**\r\n     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\r\n     * but performing a static call.\r\n     *\r\n     * _Available since v3.3._\r\n     */\r\n    function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\r\n        return functionStaticCall(target, data, \"Address: low-level static call failed\");\r\n    }\r\n\r\n    /**\r\n     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\r\n     * but performing a static call.\r\n     *\r\n     * _Available since v3.3._\r\n     */\r\n    function functionStaticCall(\r\n        address target,\r\n        bytes memory data,\r\n        string memory errorMessage\r\n    ) internal view returns (bytes memory) {\r\n        require(isContract(target), \"Address: static call to non-contract\");\r\n\r\n        (bool success, bytes memory returndata) = target.staticcall(data);\r\n        return verifyCallResult(success, returndata, errorMessage);\r\n    }\r\n\r\n    /**\r\n     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\r\n     * but performing a delegate call.\r\n     *\r\n     * _Available since v3.4._\r\n     */\r\n    function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\r\n        return functionDelegateCall(target, data, \"Address: low-level delegate call failed\");\r\n    }\r\n\r\n    /**\r\n     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\r\n     * but performing a delegate call.\r\n     *\r\n     * _Available since v3.4._\r\n     */\r\n    function functionDelegateCall(\r\n        address target,\r\n        bytes memory data,\r\n        string memory errorMessage\r\n    ) internal returns (bytes memory) {\r\n        require(isContract(target), \"Address: delegate call to non-contract\");\r\n\r\n        (bool success, bytes memory returndata) = target.delegatecall(data);\r\n        return verifyCallResult(success, returndata, errorMessage);\r\n    }\r\n\r\n    /**\r\n     * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the\r\n     * revert reason using the provided one.\r\n     *\r\n     * _Available since v4.3._\r\n     */\r\n    function verifyCallResult(\r\n        bool success,\r\n        bytes memory returndata,\r\n        string memory errorMessage\r\n    ) internal pure returns (bytes memory) {\r\n        if (success) {\r\n            return returndata;\r\n        } else {\r\n            // Look for revert reason and bubble it up if present\r\n            if (returndata.length > 0) {\r\n                // The easiest way to bubble the revert reason is using memory via assembly\r\n\r\n                assembly {\r\n                    let returndata_size := mload(returndata)\r\n                    revert(add(32, returndata), returndata_size)\r\n                }\r\n            } else {\r\n                revert(errorMessage);\r\n            }\r\n        }\r\n    }\r\n}"},"contracts/util/ECRecover.sol":{"content":"/**\r\n * SPDX-License-Identifier: MIT\r\n *\r\n * Copyright (c) 2016-2019 zOS Global Limited\r\n * Copyright (c) 2018-2020 CENTRE SECZ\r\n *\r\n * Permission is hereby granted, free of charge, to any person obtaining a copy\r\n * of this software and associated documentation files (the \"Software\"), to deal\r\n * in the Software without restriction, including without limitation the rights\r\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n * copies of the Software, and to permit persons to whom the Software is\r\n * furnished to do so, subject to the following conditions:\r\n *\r\n * The above copyright notice and this permission notice shall be included in\r\n * copies or substantial portions of the Software.\r\n *\r\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\r\n * SOFTWARE.\r\n */\r\n\r\npragma solidity 0.8.11;\r\n\r\n/**\r\n * @dev Forked from https://github.com/centrehq/centre-tokens/blob/37039f00534d3e5148269adf98bd2d42ea9fcfd7/contracts/util/ECRecover.sol\r\n * Modifications:\r\n * 1. Change solidity version to 0.8.11\r\n */\r\n/**\r\n * @title ECRecover\r\n * @notice A library that provides a safe ECDSA recovery function\r\n */\r\nlibrary ECRecover {\r\n    /**\r\n     * @notice Recover signer's address from a signed message\r\n     * @dev Adapted from: https://github.com/OpenZeppelin/openzeppelin-contracts/blob/65e4ffde586ec89af3b7e9140bdc9235d1254853/contracts/cryptography/ECDSA.sol\r\n     * Modifications: Accept v, r, and s as separate arguments\r\n     * @param digest    Keccak-256 hash digest of the signed message\r\n     * @param v         v of the signature\r\n     * @param r         r of the signature\r\n     * @param s         s of the signature\r\n     * @return Signer address\r\n     */\r\n    function recover(\r\n        bytes32 digest,\r\n        uint8 v,\r\n        bytes32 r,\r\n        bytes32 s\r\n    ) internal pure returns (address) {\r\n        // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature\r\n        // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines\r\n        // the valid range for s in (281): 0 < s < secp256k1n ÷ 2 + 1, and for v in (282): v ∈ {27, 28}. Most\r\n        // signatures from current libraries generate a unique signature with an s-value in the lower half order.\r\n        //\r\n        // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value\r\n        // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or\r\n        // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept\r\n        // these malleable signatures as well.\r\n        if (\r\n            uint256(s) >\r\n            0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0\r\n        ) {\r\n            revert(\"ECRecover: invalid signature 's' value\");\r\n        }\r\n\r\n        if (v != 27 && v != 28) {\r\n            revert(\"ECRecover: invalid signature 'v' value\");\r\n        }\r\n\r\n        // If the signature is valid (and not malleable), return the signer address\r\n        address signer = ecrecover(digest, v, r, s);\r\n        require(signer != address(0), \"ECRecover: invalid signature\");\r\n\r\n        return signer;\r\n    }\r\n}"},"contracts/util/EIP712.sol":{"content":"/**\r\n * SPDX-License-Identifier: MIT\r\n *\r\n * Copyright (c) 2018-2020 CENTRE SECZ\r\n *\r\n * Permission is hereby granted, free of charge, to any person obtaining a copy\r\n * of this software and associated documentation files (the \"Software\"), to deal\r\n * in the Software without restriction, including without limitation the rights\r\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n * copies of the Software, and to permit persons to whom the Software is\r\n * furnished to do so, subject to the following conditions:\r\n *\r\n * The above copyright notice and this permission notice shall be included in\r\n * copies or substantial portions of the Software.\r\n *\r\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\r\n * SOFTWARE.\r\n */\r\n\r\npragma solidity 0.8.11;\r\n\r\nimport \"./ECRecover.sol\";\r\n\r\n/**\r\n * @title EIP712\r\n * @notice A library that provides EIP712 helper functions\r\n */\r\nlibrary EIP712 {\r\n    /**\r\n     * @notice Make EIP712 domain separator\r\n     * @param name      Contract name\r\n     * @param version   Contract version\r\n     * @return Domain separator\r\n     */\r\n    function makeDomainSeparator(string memory name, string memory version)\r\n        internal\r\n        view\r\n        returns (bytes32)\r\n    {\r\n        uint256 chainId;\r\n        assembly {\r\n            chainId := chainid()\r\n        }\r\n        return\r\n            keccak256(\r\n                abi.encode(\r\n                    // keccak256(\"EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)\")\r\n                    0x8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f,\r\n                    keccak256(bytes(name)),\r\n                    keccak256(bytes(version)),\r\n                    chainId,\r\n                    address(this)\r\n                )\r\n            );\r\n    }\r\n\r\n    /**\r\n     * @notice Recover signer's address from a EIP712 signature\r\n     * @param domainSeparator   Domain separator\r\n     * @param v                 v of the signature\r\n     * @param r                 r of the signature\r\n     * @param s                 s of the signature\r\n     * @param typeHashAndData   Type hash concatenated with data\r\n     * @return Signer's address\r\n     */\r\n    function recover(\r\n        bytes32 domainSeparator,\r\n        uint8 v,\r\n        bytes32 r,\r\n        bytes32 s,\r\n        bytes memory typeHashAndData\r\n    ) internal pure returns (address) {\r\n        bytes32 digest = keccak256(\r\n            abi.encodePacked(\r\n                \"\\x19\\x01\",\r\n                domainSeparator,\r\n                keccak256(typeHashAndData)\r\n            )\r\n        );\r\n        return ECRecover.recover(digest, v, r, s);\r\n    }\r\n}"},"contracts/util/IERC20.sol":{"content":"// SPDX-License-Identifier: MIT\r\n// OpenZeppelin Contracts v4.4.0 (token/ERC20/IERC20.sol)\r\n\r\npragma solidity 0.8.11;\r\n\r\n/**\r\n * @dev Forked from https://github.com/OpenZeppelin/openzeppelin-contracts/blob/4961a51cc736c7d4aa9bd2e11e4cbbaff73efee9/contracts/token/ERC20/IERC20.sol\r\n * Modifications:\r\n * 1. Change solidity version to 0.8.11\r\n */\r\n/**\r\n * @dev Interface of the ERC20 standard as defined in the EIP.\r\n */\r\ninterface IERC20 {\r\n    /**\r\n     * @dev Returns the amount of tokens in existence.\r\n     */\r\n    function totalSupply() external view returns (uint256);\r\n\r\n    /**\r\n     * @dev Returns the amount of tokens owned by `account`.\r\n     */\r\n    function balanceOf(address account) external view returns (uint256);\r\n\r\n    /**\r\n     * @dev Moves `amount` tokens from the caller's account to `recipient`.\r\n     *\r\n     * Returns a boolean value indicating whether the operation succeeded.\r\n     *\r\n     * Emits a {Transfer} event.\r\n     */\r\n    function transfer(address recipient, uint256 amount) external returns (bool);\r\n\r\n    /**\r\n     * @dev Returns the remaining number of tokens that `spender` will be\r\n     * allowed to spend on behalf of `owner` through {transferFrom}. This is\r\n     * zero by default.\r\n     *\r\n     * This value changes when {approve} or {transferFrom} are called.\r\n     */\r\n    function allowance(address owner, address spender) external view returns (uint256);\r\n\r\n    /**\r\n     * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\r\n     *\r\n     * Returns a boolean value indicating whether the operation succeeded.\r\n     *\r\n     * IMPORTANT: Beware that changing an allowance with this method brings the risk\r\n     * that someone may use both the old and the new allowance by unfortunate\r\n     * transaction ordering. One possible solution to mitigate this race\r\n     * condition is to first reduce the spender's allowance to 0 and set the\r\n     * desired value afterwards:\r\n     * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\r\n     *\r\n     * Emits an {Approval} event.\r\n     */\r\n    function approve(address spender, uint256 amount) external returns (bool);\r\n\r\n    /**\r\n     * @dev Moves `amount` tokens from `sender` to `recipient` using the\r\n     * allowance mechanism. `amount` is then deducted from the caller's\r\n     * allowance.\r\n     *\r\n     * Returns a boolean value indicating whether the operation succeeded.\r\n     *\r\n     * Emits a {Transfer} event.\r\n     */\r\n    function transferFrom(\r\n        address sender,\r\n        address recipient,\r\n        uint256 amount\r\n    ) external returns (bool);\r\n\r\n    /**\r\n     * @dev Emitted when `value` tokens are moved from one account (`from`) to\r\n     * another (`to`).\r\n     *\r\n     * Note that `value` may be zero.\r\n     */\r\n    event Transfer(address indexed from, address indexed to, uint256 value);\r\n\r\n    /**\r\n     * @dev Emitted when the allowance of a `spender` for an `owner` is set by\r\n     * a call to {approve}. `value` is the new allowance.\r\n     */\r\n    event Approval(address indexed owner, address indexed spender, uint256 value);\r\n}"},"contracts/v1/AbstractFiatTokenV1.sol":{"content":"/**\r\n * SPDX-License-Identifier: MIT\r\n *\r\n * Copyright (c) 2018-2020 CENTRE SECZ\r\n * Copyright (c) 2022 JPYC\r\n *\r\n * Permission is hereby granted, free of charge, to any person obtaining a copy\r\n * of this software and associated documentation files (the \"Software\"), to deal\r\n * in the Software without restriction, including without limitation the rights\r\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n * copies of the Software, and to permit persons to whom the Software is\r\n * furnished to do so, subject to the following conditions:\r\n *\r\n * The above copyright notice and this permission notice shall be included in\r\n * copies or substantial portions of the Software.\r\n *\r\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\r\n * SOFTWARE.\r\n */\r\n\r\npragma solidity 0.8.11;\r\n\r\nimport \"../util/IERC20.sol\";\r\n\r\n/**\r\n * @notice base abstract contract to inherit IERC20\r\n * @dev Forked from https://github.com/centrehq/centre-tokens/blob/37039f00534d3e5148269adf98bd2d42ea9fcfd7/contracts/v1/AbstractFiatTokenV1.sol\r\n * Modifications:\r\n * 1. Change solidity version to 0.8.11\r\n * 2. Add gap\r\n * 3. Add functions: _increaseAllowance & _decreaseAllowance\r\n */\r\n\r\nabstract contract AbstractFiatTokenV1 is IERC20 {\r\n    function _approve(\r\n        address owner,\r\n        address spender,\r\n        uint256 value\r\n    ) internal virtual;\r\n\r\n    function _transfer(\r\n        address from,\r\n        address to,\r\n        uint256 value\r\n    ) internal virtual;\r\n\r\n    function _increaseAllowance(\r\n        address owner,\r\n        address spender,\r\n        uint256 increment\r\n    ) internal virtual;\r\n\r\n    function _decreaseAllowance(\r\n        address owner,\r\n        address spender,\r\n        uint256 decrement\r\n    ) internal virtual;\r\n\r\n    uint256[50] private __gap;\r\n}"},"contracts/v1/Blocklistable.sol":{"content":"/**\r\n * SPDX-License-Identifier: MIT\r\n *\r\n * Copyright (c) 2018-2020 CENTRE SECZ\r\n * Copyright (c) 2022 JPYC\r\n *\r\n * Permission is hereby granted, free of charge, to any person obtaining a copy\r\n * of this software and associated documentation files (the \"Software\"), to deal\r\n * in the Software without restriction, including without limitation the rights\r\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n * copies of the Software, and to permit persons to whom the Software is\r\n * furnished to do so, subject to the following conditions:\r\n *\r\n * The above copyright notice and this permission notice shall be included in\r\n * copies or substantial portions of the Software.\r\n *\r\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\r\n * SOFTWARE.\r\n */\r\n\r\npragma solidity 0.8.11;\r\n\r\nimport \"./Ownable.sol\";\r\n\r\n/**\r\n * @dev Forked from https://github.com/centrehq/centre-tokens/blob/37039f00534d3e5148269adf98bd2d42ea9fcfd7/contracts/v1/Blacklistable.sol\r\n * Modifications:\r\n * 1. Change solidity version to 0.8.11\r\n * 2. Change bool -> uint256 for gas optimization\r\n * 3. Change blacklist -> blocklist\r\n * 4. Add gap\r\n */\r\n/**\r\n * @title Blocklistable Token\r\n * @dev Allows accounts to be blocklisted by a \"blocklister\" role\r\n */\r\ncontract Blocklistable is Ownable {\r\n    address public blocklister;\r\n    mapping(address => uint256) internal blocklisted;\r\n\r\n    event Blocklisted(address indexed _account);\r\n    event UnBlocklisted(address indexed _account);\r\n    event BlocklisterChanged(address indexed newBlocklister);\r\n\r\n    /**\r\n     * @dev Throws if called by any account other than the blocklister\r\n     */\r\n    modifier onlyBlocklister() {\r\n        require(\r\n            msg.sender == blocklister,\r\n            \"Blocklistable: caller is not the blocklister\"\r\n        );\r\n        _;\r\n    }\r\n\r\n    /**\r\n     * @dev Throws if argument account is blocklisted\r\n     * @param _account The address to check\r\n     */\r\n    modifier notBlocklisted(address _account) {\r\n        require(\r\n            blocklisted[_account] == 0,\r\n            \"Blocklistable: account is blocklisted\"\r\n        );\r\n        _;\r\n    }\r\n\r\n    /**\r\n     * @dev Checks if account is blocklisted\r\n     * @param _account The address to check\r\n     * @return True if account is blocklisted\r\n     */\r\n    function isBlocklisted(address _account) external view returns (bool) {\r\n        return blocklisted[_account] == 1;\r\n    }\r\n\r\n    /**\r\n     * @dev Adds account to blocklist\r\n     * @param _account The address to blocklist\r\n     */\r\n    function blocklist(address _account) external onlyBlocklister {\r\n        blocklisted[_account] = 1;\r\n        emit Blocklisted(_account);\r\n    }\r\n\r\n    /**\r\n     * @dev Removes account from blocklist\r\n     * @param _account The address to remove from the blocklist\r\n     */\r\n    function unBlocklist(address _account) external onlyBlocklister {\r\n        blocklisted[_account] = 0;\r\n        emit UnBlocklisted(_account);\r\n    }\r\n\r\n    function updateBlocklister(address _newBlocklister) external onlyOwner {\r\n        require(\r\n            _newBlocklister != address(0),\r\n            \"Blocklistable: new blocklister is the zero address\"\r\n        );\r\n        blocklister = _newBlocklister;\r\n        emit BlocklisterChanged(blocklister);\r\n    }\r\n\r\n    uint256[50] private __gap;\r\n}"},"contracts/v1/EIP2612.sol":{"content":"/**\r\n * SPDX-License-Identifier: MIT\r\n *\r\n * Copyright (c) 2018-2020 CENTRE SECZ\r\n * Copyright (c) 2022 JPYC\r\n *\r\n * Permission is hereby granted, free of charge, to any person obtaining a copy\r\n * of this software and associated documentation files (the \"Software\"), to deal\r\n * in the Software without restriction, including without limitation the rights\r\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n * copies of the Software, and to permit persons to whom the Software is\r\n * furnished to do so, subject to the following conditions:\r\n *\r\n * The above copyright notice and this permission notice shall be included in\r\n * copies or substantial portions of the Software.\r\n *\r\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\r\n * SOFTWARE.\r\n */\r\n\r\npragma solidity 0.8.11;\r\n\r\nimport \"./AbstractFiatTokenV1.sol\";\r\nimport \"./EIP712Domain.sol\";\r\nimport \"../util/EIP712.sol\";\r\n\r\n/**\r\n * @dev Forked from https://github.com/centrehq/centre-tokens/blob/37039f00534d3e5148269adf98bd2d42ea9fcfd7/contracts/v2/EIP2612.sol\r\n * Modifications:\r\n * 1. Change solidity version to 0.8.11\r\n * 2. Make domain separator dynamic by adding function: domainSeparatorV4\r\n * 3. Add gap\r\n * 4. Change now to block.timestamp\r\n */\r\n\r\n/**\r\n * @title EIP-2612\r\n * @notice Provide internal implementation for gas-abstracted approvals\r\n */\r\nabstract contract EIP2612 is AbstractFiatTokenV1, EIP712Domain {\r\n    // keccak256(\"Permit(address owner,address spender,uint256 value,uint256 nonce,uint256 deadline)\")\r\n    bytes32 public constant PERMIT_TYPEHASH =\r\n        0x6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c9;\r\n\r\n    mapping(address => uint256) private _permitNonces;\r\n\r\n    /**\r\n     * @notice Nonces for permit\r\n     * @param owner Token owner's address (Authorizer)\r\n     * @return Next nonce\r\n     */\r\n    function nonces(address owner) external view returns (uint256) {\r\n        return _permitNonces[owner];\r\n    }\r\n\r\n    /**\r\n     * @notice Verify a signed approval permit and execute if valid\r\n     * @param owner     Token owner's address (Authorizer)\r\n     * @param spender   Spender's address\r\n     * @param value     Amount of allowance\r\n     * @param deadline  The time at which this expires (unix time)\r\n     * @param v         v of the signature\r\n     * @param r         r of the signature\r\n     * @param s         s of the signature\r\n     */\r\n    function _permit(\r\n        address owner,\r\n        address spender,\r\n        uint256 value,\r\n        uint256 deadline,\r\n        uint8 v,\r\n        bytes32 r,\r\n        bytes32 s\r\n    ) internal {\r\n        require(deadline >= block.timestamp, \"EIP2612: permit is expired\");\r\n\r\n        bytes memory data = abi.encode(\r\n            PERMIT_TYPEHASH,\r\n            owner,\r\n            spender,\r\n            value,\r\n            _permitNonces[owner]++,\r\n            deadline\r\n        );\r\n        require(\r\n            EIP712.recover(_domainSeparatorV4(), v, r, s, data) == owner,\r\n            \"EIP2612: invalid signature\"\r\n        );\r\n\r\n        _approve(owner, spender, value);\r\n    }\r\n\r\n    uint256[50] private __gap;\r\n}\r\n"},"contracts/v1/EIP3009.sol":{"content":"/**\r\n * SPDX-License-Identifier: MIT\r\n *\r\n * Copyright (c) 2018-2020 CENTRE SECZ\r\n * Copyright (c) 2022 JPYC\r\n *\r\n * Permission is hereby granted, free of charge, to any person obtaining a copy\r\n * of this software and associated documentation files (the \"Software\"), to deal\r\n * in the Software without restriction, including without limitation the rights\r\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n * copies of the Software, and to permit persons to whom the Software is\r\n * furnished to do so, subject to the following conditions:\r\n *\r\n * The above copyright notice and this permission notice shall be included in\r\n * copies or substantial portions of the Software.\r\n *\r\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\r\n * SOFTWARE.\r\n */\r\n\r\npragma solidity 0.8.11;\r\n\r\nimport \"./AbstractFiatTokenV1.sol\";\r\nimport \"./EIP712Domain.sol\";\r\nimport \"../util/EIP712.sol\";\r\n\r\n/**\r\n * @dev Forked from https://github.com/centrehq/centre-tokens/blob/37039f00534d3e5148269adf98bd2d42ea9fcfd7/contracts/v2/EIP3009.sol\r\n * Modifications:\r\n * 1. Change solidity version to 0.8.11\r\n * 2. Make domain separator dynamic by adding function: domainSeparatorV4\r\n * 3. Change _authorizationStates to uint256 for gas optimization\r\n * 4. Change now to block.timestamp\r\n * 5. Add gap\r\n */\r\n\r\n/**\r\n * @title EIP-3009\r\n * @notice Provide internal implementation for gas-abstracted transfers\r\n * @dev Contracts that inherit from this must wrap these with publicly\r\n * accessible functions, optionally adding modifiers where necessary\r\n */\r\nabstract contract EIP3009 is AbstractFiatTokenV1, EIP712Domain {\r\n    // keccak256(\"TransferWithAuthorization(address from,address to,uint256 value,uint256 validAfter,uint256 validBefore,bytes32 nonce)\")\r\n    bytes32 public constant TRANSFER_WITH_AUTHORIZATION_TYPEHASH =\r\n        0x7c7c6cdb67a18743f49ec6fa9b35f50d52ed05cbed4cc592e13b44501c1a2267;\r\n\r\n    // keccak256(\"ReceiveWithAuthorization(address from,address to,uint256 value,uint256 validAfter,uint256 validBefore,bytes32 nonce)\")\r\n    bytes32 public constant RECEIVE_WITH_AUTHORIZATION_TYPEHASH =\r\n        0xd099cc98ef71107a616c4f0f941f04c322d8e254fe26b3c6668db87aae413de8;\r\n\r\n    // keccak256(\"CancelAuthorization(address authorizer,bytes32 nonce)\")\r\n    bytes32 public constant CANCEL_AUTHORIZATION_TYPEHASH =\r\n        0x158b0a9edf7a828aad02f63cd515c68ef2f50ba807396f6d12842833a1597429;\r\n\r\n    /**\r\n     * @dev authorizer address => nonce => bool (true if nonce is used)\r\n     */\r\n    mapping(address => mapping(bytes32 => uint256)) private _authorizationStates;\r\n\r\n    event AuthorizationUsed(address indexed authorizer, bytes32 indexed nonce);\r\n    event AuthorizationCanceled(\r\n        address indexed authorizer,\r\n        bytes32 indexed nonce\r\n    );\r\n\r\n    /**\r\n     * @notice Returns the state of an authorization\r\n     * @dev Nonces are randomly generated 32-byte data unique to the\r\n     * authorizer's address\r\n     * @param authorizer    Authorizer's address\r\n     * @param nonce         Nonce of the authorization\r\n     * @return True if the nonce is used\r\n     */\r\n    function authorizationState(address authorizer, bytes32 nonce)\r\n        external\r\n        view\r\n        returns (bool)\r\n    {\r\n        return _authorizationStates[authorizer][nonce] == 1;\r\n    }\r\n\r\n    /**\r\n     * @notice Execute a transfer with a signed authorization\r\n     * @param from          Payer's address (Authorizer)\r\n     * @param to            Payee's address\r\n     * @param value         Amount to be transferred\r\n     * @param validAfter    The time after which this is valid (unix time)\r\n     * @param validBefore   The time before which this is valid (unix time)\r\n     * @param nonce         Unique nonce\r\n     * @param v             v of the signature\r\n     * @param r             r of the signature\r\n     * @param s             s of the signature\r\n     */\r\n    function _transferWithAuthorization(\r\n        address from,\r\n        address to,\r\n        uint256 value,\r\n        uint256 validAfter,\r\n        uint256 validBefore,\r\n        bytes32 nonce,\r\n        uint8 v,\r\n        bytes32 r,\r\n        bytes32 s\r\n    ) internal {\r\n        _requireValidAuthorization(from, nonce, validAfter, validBefore);\r\n\r\n        bytes memory data = abi.encode(\r\n            TRANSFER_WITH_AUTHORIZATION_TYPEHASH,\r\n            from,\r\n            to,\r\n            value,\r\n            validAfter,\r\n            validBefore,\r\n            nonce\r\n        );\r\n        require(\r\n            EIP712.recover(_domainSeparatorV4(), v, r, s, data) == from,\r\n            \"EIP3009: invalid signature\"\r\n        );\r\n\r\n        _markAuthorizationAsUsed(from, nonce);\r\n        _transfer(from, to, value);\r\n    }\r\n\r\n    /**\r\n     * @notice Receive a transfer with a signed authorization from the payer\r\n     * @dev This has an additional check to ensure that the payee's address\r\n     * matches the caller of this function to prevent front-running attacks.\r\n     * @param from          Payer's address (Authorizer)\r\n     * @param to            Payee's address\r\n     * @param value         Amount to be transferred\r\n     * @param validAfter    The time after which this is valid (unix time)\r\n     * @param validBefore   The time before which this is valid (unix time)\r\n     * @param nonce         Unique nonce\r\n     * @param v             v of the signature\r\n     * @param r             r of the signature\r\n     * @param s             s of the signature\r\n     */\r\n    function _receiveWithAuthorization(\r\n        address from,\r\n        address to,\r\n        uint256 value,\r\n        uint256 validAfter,\r\n        uint256 validBefore,\r\n        bytes32 nonce,\r\n        uint8 v,\r\n        bytes32 r,\r\n        bytes32 s\r\n    ) internal {\r\n        require(to == msg.sender, \"EIP3009: caller must be the payee\");\r\n        _requireValidAuthorization(from, nonce, validAfter, validBefore);\r\n\r\n        bytes memory data = abi.encode(\r\n            RECEIVE_WITH_AUTHORIZATION_TYPEHASH,\r\n            from,\r\n            to,\r\n            value,\r\n            validAfter,\r\n            validBefore,\r\n            nonce\r\n        );\r\n        require(\r\n            EIP712.recover(_domainSeparatorV4(), v, r, s, data) == from,\r\n            \"EIP3009: invalid signature\"\r\n        );\r\n\r\n        _markAuthorizationAsUsed(from, nonce);\r\n        _transfer(from, to, value);\r\n    }\r\n\r\n    /**\r\n     * @notice Attempt to cancel an authorization\r\n     * @param authorizer    Authorizer's address\r\n     * @param nonce         Nonce of the authorization\r\n     * @param v             v of the signature\r\n     * @param r             r of the signature\r\n     * @param s             s of the signature\r\n     */\r\n    function _cancelAuthorization(\r\n        address authorizer,\r\n        bytes32 nonce,\r\n        uint8 v,\r\n        bytes32 r,\r\n        bytes32 s\r\n    ) internal {\r\n        _requireUnusedAuthorization(authorizer, nonce);\r\n\r\n        bytes memory data = abi.encode(\r\n            CANCEL_AUTHORIZATION_TYPEHASH,\r\n            authorizer,\r\n            nonce\r\n        );\r\n        require(\r\n            EIP712.recover(_domainSeparatorV4(), v, r, s, data) == authorizer,\r\n            \"EIP3009: invalid signature\"\r\n        );\r\n\r\n        _authorizationStates[authorizer][nonce] = 1;\r\n        emit AuthorizationCanceled(authorizer, nonce);\r\n    }\r\n\r\n    /**\r\n     * @notice Check that an authorization is unused\r\n     * @param authorizer    Authorizer's address\r\n     * @param nonce         Nonce of the authorization\r\n     */\r\n    function _requireUnusedAuthorization(address authorizer, bytes32 nonce)\r\n        private\r\n        view\r\n    {\r\n        require(\r\n            _authorizationStates[authorizer][nonce] == 0,\r\n            \"EIP3009: authorization is used or canceled\"\r\n        );\r\n    }\r\n\r\n    /**\r\n     * @notice Check that authorization is valid\r\n     * @param authorizer    Authorizer's address\r\n     * @param nonce         Nonce of the authorization\r\n     * @param validAfter    The time after which this is valid (unix time)\r\n     * @param validBefore   The time before which this is valid (unix time)\r\n     */\r\n    function _requireValidAuthorization(\r\n        address authorizer,\r\n        bytes32 nonce,\r\n        uint256 validAfter,\r\n        uint256 validBefore\r\n    ) private view {\r\n        require(\r\n            block.timestamp > validAfter,\r\n            \"EIP3009: authorization is not yet valid\"\r\n        );\r\n        require(\r\n            block.timestamp < validBefore,\r\n            \"EIP3009: authorization is expired\"\r\n        );\r\n        _requireUnusedAuthorization(authorizer, nonce);\r\n    }\r\n\r\n    /**\r\n     * @notice Mark an authorization as used\r\n     * @param authorizer    Authorizer's address\r\n     * @param nonce         Nonce of the authorization\r\n     */\r\n    function _markAuthorizationAsUsed(address authorizer, bytes32 nonce)\r\n        private\r\n    {\r\n        _authorizationStates[authorizer][nonce] = 1;\r\n        emit AuthorizationUsed(authorizer, nonce);\r\n    }\r\n\r\n    uint256[50] private __gap;\r\n}\r\n"},"contracts/v1/EIP712Domain.sol":{"content":"/**\r\n * SPDX-License-Identifier: MIT\r\n *\r\n * Copyright (c) 2018-2020 CENTRE SECZ\r\n *\r\n * Permission is hereby granted, free of charge, to any person obtaining a copy\r\n * of this software and associated documentation files (the \"Software\"), to deal\r\n * in the Software without restriction, including without limitation the rights\r\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n * copies of the Software, and to permit persons to whom the Software is\r\n * furnished to do so, subject to the following conditions:\r\n *\r\n * The above copyright notice and this permission notice shall be included in\r\n * copies or substantial portions of the Software.\r\n *\r\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\r\n * SOFTWARE.\r\n */\r\n\r\npragma solidity 0.8.11;\r\n\r\nimport \"../util/EIP712.sol\";\r\n\r\n/**\r\n * @dev Forked from https://github.com/centrehq/centre-tokens/blob/37039f00534d3e5148269adf98bd2d42ea9fcfd7/contracts/v2/EIP712Domain.sol\r\n * Modifications:\r\n * 1. Change solidity version to 0.8.11\r\n * 2. Add 4 new state variables: DOMAIN_SEPARATOR, CHAIN_ID, NAME, VERSION\r\n * 3. Add new function _domainSeparatorV4\r\n * 4. Add gap\r\n */\r\n\r\n/**\r\n * @title EIP712 Domain\r\n */\r\ncontract EIP712Domain {\r\n    /**\r\n     * @dev EIP712 Domain Separator\r\n     */\r\n    bytes32 internal DOMAIN_SEPARATOR;\r\n    uint256 internal CHAIN_ID;\r\n    string internal NAME;\r\n    string internal VERSION;\r\n\r\n    /**\r\n    * @dev Returns the domain separator for the current chain.\r\n    */\r\n    function _domainSeparatorV4() public view returns (bytes32) {\r\n        if(block.chainid == CHAIN_ID) {\r\n            return DOMAIN_SEPARATOR;\r\n        } else {\r\n            return EIP712.makeDomainSeparator(NAME, VERSION);\r\n        }\r\n    }\r\n\r\n    uint256[50] private __gap;\r\n}"},"contracts/v1/FiatTokenV1.sol":{"content":"/**\r\n * SPDX-License-Identifier: MIT\r\n *\r\n * Copyright (c) 2018-2020 CENTRE SECZ\r\n * Copyright (c) 2022 JPYC\r\n *\r\n * Permission is hereby granted, free of charge, to any person obtaining a copy\r\n * of this software and associated documentation files (the \"Software\"), to deal\r\n * in the Software without restriction, including without limitation the rights\r\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n * copies of the Software, and to permit persons to whom the Software is\r\n * furnished to do so, subject to the following conditions:\r\n *\r\n * The above copyright notice and this permission notice shall be included in\r\n * copies or substantial portions of the Software.\r\n *\r\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\r\n * SOFTWARE.\r\n */\r\n\r\npragma solidity 0.8.11;\r\n\r\nimport \"./Ownable.sol\";\r\nimport \"./Pausable.sol\";\r\nimport \"./Blocklistable.sol\";\r\nimport \"../util/EIP712.sol\";\r\nimport \"./Rescuable.sol\";\r\nimport \"./EIP3009.sol\";\r\nimport \"./EIP2612.sol\";\r\nimport \"../upgradeability/UUPSUpgradeable.sol\";\r\n\r\n/**\r\n * @dev ERC20 Token backed by fiat reserves. Forked from\r\n * https://github.com/centrehq/centre-tokens/blob/37039f00534d3e5148269adf98bd2d42ea9fcfd7/contracts/v1/FiatTokenV1.sol,\r\n * https://github.com/centrehq/centre-tokens/blob/37039f00534d3e5148269adf98bd2d42ea9fcfd7/contracts/v1.1/FiatTokenV1_1.sol,\r\n * https://github.com/centrehq/centre-tokens/blob/37039f00534d3e5148269adf98bd2d42ea9fcfd7/contracts/v2/FiatTokenV2.sol,\r\n * https://github.com/centrehq/centre-tokens/blob/37039f00534d3e5148269adf98bd2d42ea9fcfd7/contracts/v2/FiatTokenV2_1.sol\r\n * Modifications:\r\n * 1. Change solidity version to 0.8.11\r\n * 2. Use cashe for gas optimization\r\n * 3. Let initialize function initialize a rescuer\r\n * 4. Change materMinter -> minterAdmin\r\n * 5. Use initializedVersion to manage the version\r\n * 6. Check if the approved amount is max amount for gas optimization\r\n */\r\n\r\n/**\r\n * @title FiatToken\r\n * @dev ERC20 Token backed by fiat reserves\r\n */\r\ncontract FiatTokenV1 is\r\n    Ownable,\r\n    Pausable,\r\n    Blocklistable,\r\n    Rescuable,\r\n    EIP3009,\r\n    EIP2612,\r\n    UUPSUpgradeable\r\n{\r\n    string public name;\r\n    string public symbol;\r\n    string public currency;\r\n    uint256 internal totalSupply_;\r\n    address public minterAdmin;\r\n    uint8 public decimals;\r\n    uint8 internal initializedVersion;\r\n\r\n    mapping(address => uint256) internal balances;\r\n    mapping(address => mapping(address => uint256)) internal allowed;\r\n    mapping(address => bool) internal minters;\r\n    mapping(address => uint256) internal minterAllowed;\r\n\r\n    event Mint(address indexed minter, address indexed to, uint256 amount);\r\n    event Burn(address indexed burner, uint256 amount);\r\n    event MinterConfigured(address indexed minter, uint256 minterAllowedAmount);\r\n    event MinterRemoved(address indexed oldMinter);\r\n    event MinterAdminChanged(address indexed newMinterAdmin);\r\n\r\n    function initialize(\r\n        string memory tokenName,\r\n        string memory tokenSymbol,\r\n        string memory tokenCurrency,\r\n        uint8 tokenDecimals,\r\n        address newMinterAdmin,\r\n        address newPauser,\r\n        address newBlocklister,\r\n        address newRescuer,\r\n        address newOwner\r\n    ) public {\r\n        require(\r\n            initializedVersion == 0,\r\n            \"FiatToken: contract is already initialized\"\r\n        );\r\n        require(\r\n            newMinterAdmin != address(0),\r\n            \"FiatToken: new minterAdmin is the zero address\"\r\n        );\r\n        require(\r\n            newPauser != address(0),\r\n            \"FiatToken: new pauser is the zero address\"\r\n        );\r\n        require(\r\n            newBlocklister != address(0),\r\n            \"FiatToken: new blocklister is the zero address\"\r\n        );\r\n        require(\r\n            newRescuer != address(0),\r\n            \"FiatToken: new rescuer is the zero address\"\r\n        );\r\n        require(\r\n            newOwner != address(0),\r\n            \"FiatToken: new owner is the zero address\"\r\n        );\r\n\r\n        name = tokenName;\r\n        symbol = tokenSymbol;\r\n        currency = tokenCurrency;\r\n        decimals = tokenDecimals;\r\n        minterAdmin = newMinterAdmin;\r\n        pauser = newPauser;\r\n        blocklister = newBlocklister;\r\n        rescuer = newRescuer;\r\n        _transferOwnership(newOwner);\r\n        blocklisted[address(this)] = 1;\r\n        DOMAIN_SEPARATOR = EIP712.makeDomainSeparator(tokenName, \"1\");\r\n        CHAIN_ID = block.chainid;\r\n        NAME = tokenName;\r\n        VERSION = \"1\";\r\n        initializedVersion = 1;\r\n    }\r\n\r\n    /**\r\n     * @dev Throws if called by any account other than a minter\r\n     */\r\n    modifier onlyMinters() {\r\n        require(minters[msg.sender], \"FiatToken: caller is not a minter\");\r\n        _;\r\n    }\r\n\r\n    /**\r\n     * @dev Function to mint tokens\r\n     * @param _to The address that will receive the minted tokens.\r\n     * @param _amount The amount of tokens to mint. Must be less than or equal\r\n     * to the minterAllowance of the caller.\r\n     * @return A boolean that indicates if the operation was successful.\r\n     */\r\n    function mint(address _to, uint256 _amount)\r\n        external\r\n        whenNotPaused\r\n        onlyMinters\r\n        notBlocklisted(msg.sender)\r\n        notBlocklisted(_to)\r\n        returns (bool)\r\n    {\r\n        require(_to != address(0), \"FiatToken: mint to the zero address\");\r\n        require(_amount > 0, \"FiatToken: mint amount not greater than 0\");\r\n\r\n        uint256 mintingAllowedAmount = minterAllowed[msg.sender];\r\n        require(\r\n            _amount <= mintingAllowedAmount,\r\n            \"FiatToken: mint amount exceeds minterAllowance\"\r\n        );\r\n\r\n        totalSupply_ = totalSupply_ + _amount;\r\n        balances[_to] = balances[_to] + _amount;\r\n        minterAllowed[msg.sender] = mintingAllowedAmount - _amount;\r\n        emit Mint(msg.sender, _to, _amount);\r\n        emit Transfer(address(0), _to, _amount);\r\n        return true;\r\n    }\r\n\r\n    /**\r\n     * @dev Throws if called by any account other than the minterAdmin\r\n     */\r\n    modifier onlyMinterAdmin() {\r\n        require(\r\n            msg.sender == minterAdmin,\r\n            \"FiatToken: caller is not the minterAdmin\"\r\n        );\r\n        _;\r\n    }\r\n\r\n    /**\r\n     * @dev Get minter allowance for an account\r\n     * @param minter The address of the minter\r\n     * @return Allowance of the minter can mint\r\n     */\r\n    function minterAllowance(address minter) external view returns (uint256) {\r\n        return minterAllowed[minter];\r\n    }\r\n\r\n    /**\r\n     * @dev Checks if account is a minter\r\n     * @param account The address to check\r\n     * @return True if account is a minter\r\n     */\r\n    function isMinter(address account) external view returns (bool) {\r\n        return minters[account];\r\n    }\r\n\r\n    /**\r\n     * @notice Amount of remaining tokens spender is allowed to transfer on\r\n     * behalf of the token owner\r\n     * @param owner     Token owner's address\r\n     * @param spender   Spender's address\r\n     * @return Allowance amount\r\n     */\r\n    function allowance(address owner, address spender)\r\n        external\r\n        view\r\n        override\r\n        returns (uint256)\r\n    {\r\n        return allowed[owner][spender];\r\n    }\r\n\r\n    /**\r\n     * @dev Get totalSupply of token\r\n     * @return TotalSupply\r\n     */\r\n    function totalSupply() external view override returns (uint256) {\r\n        return totalSupply_;\r\n    }\r\n\r\n    /**\r\n     * @dev Get token balance of an account\r\n     * @param account address The account\r\n     * @return Balance amount of the account\r\n     */\r\n    function balanceOf(address account)\r\n        external\r\n        view\r\n        override\r\n        returns (uint256)\r\n    {\r\n        return balances[account];\r\n    }\r\n\r\n    /**\r\n     * @notice Set spender's allowance over the caller's tokens to be a given\r\n     * value.\r\n     * @param spender   Spender's address\r\n     * @param value     Allowance amount\r\n     * @return True if successful\r\n     */\r\n    function approve(address spender, uint256 value)\r\n        external\r\n        override\r\n        whenNotPaused\r\n        notBlocklisted(msg.sender)\r\n        notBlocklisted(spender)\r\n        returns (bool)\r\n    {\r\n        _approve(msg.sender, spender, value);\r\n        return true;\r\n    }\r\n\r\n    /**\r\n     * @dev Internal function to set allowance\r\n     * @param owner     Token owner's address\r\n     * @param spender   Spender's address\r\n     * @param value     Allowance amount\r\n     */\r\n    function _approve(\r\n        address owner,\r\n        address spender,\r\n        uint256 value\r\n    ) internal override {\r\n        require(owner != address(0), \"FiatToken: approve from the zero address\");\r\n        require(spender != address(0), \"FiatToken: approve to the zero address\");\r\n        allowed[owner][spender] = value;\r\n        emit Approval(owner, spender, value);\r\n    }\r\n\r\n    /**\r\n     * @notice Transfer tokens by spending allowance\r\n     * @param from  Payer's address\r\n     * @param to    Payee's address\r\n     * @param value Transfer amount\r\n     * @return True if successful\r\n     */\r\n    function transferFrom(\r\n        address from,\r\n        address to,\r\n        uint256 value\r\n    )\r\n        external\r\n        override\r\n        whenNotPaused\r\n        notBlocklisted(msg.sender)\r\n        notBlocklisted(from)\r\n        notBlocklisted(to)\r\n        returns (bool)\r\n    {\r\n        uint256 _allowed = allowed[from][msg.sender];\r\n        if (_allowed != type(uint256).max) {\r\n            require(_allowed >= value, \"FiatToken: transfer amount exceeds allowance\");\r\n            allowed[from][msg.sender] = _allowed - value;\r\n        }\r\n        _transfer(from, to, value);\r\n        return true;\r\n    }\r\n\r\n    /**\r\n     * @notice Transfer tokens from the caller\r\n     * @param to    Payee's address\r\n     * @param value Transfer amount\r\n     * @return True if successful\r\n     */\r\n    function transfer(address to, uint256 value)\r\n        external\r\n        override\r\n        whenNotPaused\r\n        notBlocklisted(msg.sender)\r\n        notBlocklisted(to)\r\n        returns (bool)\r\n    {\r\n        _transfer(msg.sender, to, value);\r\n        return true;\r\n    }\r\n\r\n    /**\r\n     * @notice Internal function to process transfers\r\n     * @param from  Payer's address\r\n     * @param to    Payee's address\r\n     * @param value Transfer amount\r\n     */\r\n    function _transfer(\r\n        address from,\r\n        address to,\r\n        uint256 value\r\n    ) internal override {\r\n        require(from != address(0), \"FiatToken: transfer from the zero address\");\r\n        require(to != address(0), \"FiatToken: transfer to the zero address\");\r\n        uint256 _balances = balances[from];\r\n        require(\r\n            value <= _balances,\r\n            \"FiatToken: transfer amount exceeds balance\"\r\n        );\r\n\r\n        balances[from] = _balances - value;\r\n        balances[to] = balances[to] + value;\r\n        emit Transfer(from, to, value);\r\n    }\r\n\r\n    /**\r\n     * @dev Function to add/update a new minter\r\n     * @param minter The address of the minter\r\n     * @param minterAllowedAmount The minting amount allowed for the minter\r\n     * @return True if the operation was successful.\r\n     */\r\n    function configureMinter(address minter, uint256 minterAllowedAmount)\r\n        external\r\n        whenNotPaused\r\n        onlyMinterAdmin\r\n        returns (bool)\r\n    {\r\n        minters[minter] = true;\r\n        minterAllowed[minter] = minterAllowedAmount;\r\n        emit MinterConfigured(minter, minterAllowedAmount);\r\n        return true;\r\n    }\r\n\r\n    /**\r\n     * @dev Function to remove a minter\r\n     * @param minter The address of the minter to remove\r\n     * @return True if the operation was successful.\r\n     */\r\n    function removeMinter(address minter)\r\n        external\r\n        onlyMinterAdmin\r\n        returns (bool)\r\n    {\r\n        minters[minter] = false;\r\n        minterAllowed[minter] = 0;\r\n        emit MinterRemoved(minter);\r\n        return true;\r\n    }\r\n\r\n    /**\r\n     * @dev allows a minter to burn some of its own tokens\r\n     * Validates that caller is a minter and that sender is not blocklisted\r\n     * amount is less than or equal to the minter's account balance\r\n     * @param _amount uint256 the amount of tokens to be burned\r\n     */\r\n    function burn(uint256 _amount)\r\n        external\r\n        whenNotPaused\r\n        onlyMinters\r\n        notBlocklisted(msg.sender)\r\n    {\r\n        uint256 balance = balances[msg.sender];\r\n        require(_amount > 0, \"FiatToken: burn amount not greater than 0\");\r\n        require(balance >= _amount, \"FiatToken: burn amount exceeds balance\");\r\n\r\n        totalSupply_ = totalSupply_ - _amount;\r\n        balances[msg.sender] = balance - _amount;\r\n        emit Burn(msg.sender, _amount);\r\n        emit Transfer(msg.sender, address(0), _amount);\r\n    }\r\n\r\n    function updateMinterAdmin(address _newMinterAdmin) external onlyOwner {\r\n        require(\r\n            _newMinterAdmin != address(0),\r\n            \"FiatToken: new minterAdmin is the zero address\"\r\n        );\r\n        minterAdmin = _newMinterAdmin;\r\n        emit MinterAdminChanged(minterAdmin);\r\n    }\r\n\r\n    /**\r\n     * @notice Increase the allowance by a given increment\r\n     * @param spender   Spender's address\r\n     * @param increment Amount of increase in allowance\r\n     * @return True if successful\r\n     */\r\n    function increaseAllowance(address spender, uint256 increment)\r\n        external\r\n        whenNotPaused\r\n        notBlocklisted(msg.sender)\r\n        notBlocklisted(spender)\r\n        returns (bool)\r\n    {\r\n        _increaseAllowance(msg.sender, spender, increment);\r\n        return true;\r\n    }\r\n\r\n    /**\r\n     * @notice Decrease the allowance by a given decrement\r\n     * @param spender   Spender's address\r\n     * @param decrement Amount of decrease in allowance\r\n     * @return True if successful\r\n     */\r\n    function decreaseAllowance(address spender, uint256 decrement)\r\n        external\r\n        whenNotPaused\r\n        notBlocklisted(msg.sender)\r\n        notBlocklisted(spender)\r\n        returns (bool)\r\n    {\r\n        _decreaseAllowance(msg.sender, spender, decrement);\r\n        return true;\r\n    }\r\n\r\n    /**\r\n     * @notice Internal function to increase the allowance by a given increment\r\n     * @param owner     Token owner's address\r\n     * @param spender   Spender's address\r\n     * @param increment Amount of increase\r\n     */\r\n    function _increaseAllowance(\r\n        address owner,\r\n        address spender,\r\n        uint256 increment\r\n    ) internal override {\r\n        _approve(owner, spender, allowed[owner][spender] + increment);\r\n    }\r\n\r\n    /**\r\n     * @notice Internal function to decrease the allowance by a given decrement\r\n     * @param owner     Token owner's address\r\n     * @param spender   Spender's address\r\n     * @param decrement Amount of decrease\r\n     */\r\n    function _decreaseAllowance(\r\n        address owner,\r\n        address spender,\r\n        uint256 decrement\r\n    ) internal override {\r\n        uint256 _allowed = allowed[owner][spender];\r\n        require(\r\n            decrement <= _allowed,\r\n            \"FiatToken: decreased allowance below zero\"\r\n        );\r\n        _approve(owner, spender, _allowed - decrement);\r\n    }\r\n\r\n    /**\r\n     * @notice Execute a transfer with a signed authorization\r\n     * @param from          Payer's address (Authorizer)\r\n     * @param to            Payee's address\r\n     * @param value         Amount to be transferred\r\n     * @param validAfter    The time after which this is valid (unix time)\r\n     * @param validBefore   The time before which this is valid (unix time)\r\n     * @param nonce         Unique nonce\r\n     * @param v             v of the signature\r\n     * @param r             r of the signature\r\n     * @param s             s of the signature\r\n     */\r\n    function transferWithAuthorization(\r\n        address from,\r\n        address to,\r\n        uint256 value,\r\n        uint256 validAfter,\r\n        uint256 validBefore,\r\n        bytes32 nonce,\r\n        uint8 v,\r\n        bytes32 r,\r\n        bytes32 s\r\n    ) external whenNotPaused notBlocklisted(from) notBlocklisted(to) {\r\n        _transferWithAuthorization(\r\n            from,\r\n            to,\r\n            value,\r\n            validAfter,\r\n            validBefore,\r\n            nonce,\r\n            v,\r\n            r,\r\n            s\r\n        );\r\n    }\r\n\r\n    /**\r\n     * @notice Receive a transfer with a signed authorization from the payer\r\n     * @dev This has an additional check to ensure that the payee's address\r\n     * matches the caller of this function to prevent front-running attacks.\r\n     * @param from          Payer's address (Authorizer)\r\n     * @param to            Payee's address\r\n     * @param value         Amount to be transferred\r\n     * @param validAfter    The time after which this is valid (unix time)\r\n     * @param validBefore   The time before which this is valid (unix time)\r\n     * @param nonce         Unique nonce\r\n     * @param v             v of the signature\r\n     * @param r             r of the signature\r\n     * @param s             s of the signature\r\n     */\r\n    function receiveWithAuthorization(\r\n        address from,\r\n        address to,\r\n        uint256 value,\r\n        uint256 validAfter,\r\n        uint256 validBefore,\r\n        bytes32 nonce,\r\n        uint8 v,\r\n        bytes32 r,\r\n        bytes32 s\r\n    ) external whenNotPaused notBlocklisted(from) notBlocklisted(to) {\r\n        _receiveWithAuthorization(\r\n            from,\r\n            to,\r\n            value,\r\n            validAfter,\r\n            validBefore,\r\n            nonce,\r\n            v,\r\n            r,\r\n            s\r\n        );\r\n    }\r\n\r\n    /**\r\n     * @notice Attempt to cancel an authorization\r\n     * @dev Works only if the authorization is not yet used.\r\n     * @param authorizer    Authorizer's address\r\n     * @param nonce         Nonce of the authorization\r\n     * @param v             v of the signature\r\n     * @param r             r of the signature\r\n     * @param s             s of the signature\r\n     */\r\n    function cancelAuthorization(\r\n        address authorizer,\r\n        bytes32 nonce,\r\n        uint8 v,\r\n        bytes32 r,\r\n        bytes32 s\r\n    ) external whenNotPaused {\r\n        _cancelAuthorization(authorizer, nonce, v, r, s);\r\n    }\r\n\r\n    /**\r\n     * @notice Update allowance with a signed permit\r\n     * @param owner       Token owner's address (Authorizer)\r\n     * @param spender     Spender's address\r\n     * @param value       Amount of allowance\r\n     * @param deadline    Expiration time, seconds since the epoch\r\n     * @param v           v of the signature\r\n     * @param r           r of the signature\r\n     * @param s           s of the signature\r\n     */\r\n    function permit(\r\n        address owner,\r\n        address spender,\r\n        uint256 value,\r\n        uint256 deadline,\r\n        uint8 v,\r\n        bytes32 r,\r\n        bytes32 s\r\n    ) external whenNotPaused notBlocklisted(owner) notBlocklisted(spender) {\r\n        _permit(owner, spender, value, deadline, v, r, s);\r\n    }\r\n\r\n    function _authorizeUpgrade(address newImplementation)\r\n        internal\r\n        override\r\n        onlyOwner\r\n    {}\r\n\r\n    uint256[50] private __gap;\r\n}\r\n"},"contracts/v1/Ownable.sol":{"content":"// SPDX-License-Identifier: MIT\r\n// OpenZeppelin Contracts v4.4.0 (access/Ownable.sol)\r\n\r\npragma solidity 0.8.11;\r\n\r\n/**\r\n * @dev Forked from https://github.com/OpenZeppelin/openzeppelin-contracts/blob/4961a51cc736c7d4aa9bd2e11e4cbbaff73efee9/contracts/access/Ownable.sol\r\n * Modifications:\r\n * 1. Change solidity version to 0.8.11\r\n * 2. Delete function renounceOwnership\r\n * 3. Do not inherit Context\r\n */\r\n\r\n/**\r\n * @dev Contract module which provides a basic access control mechanism, where\r\n * there is an account (an owner) that can be granted exclusive access to\r\n * specific functions.\r\n *\r\n * By default, the owner account will be the one that deploys the contract. This\r\n * can later be changed with {transferOwnership}.\r\n *\r\n * This module is used through inheritance. It will make available the modifier\r\n * `onlyOwner`, which can be applied to your functions to restrict their use to\r\n * the owner.\r\n */\r\nabstract contract Ownable {\r\n    address private _owner;\r\n\r\n    event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\r\n\r\n    /**\r\n     * @dev Initializes the contract setting the deployer as the initial owner.\r\n     */\r\n    constructor() {\r\n        _transferOwnership(msg.sender);\r\n    }\r\n\r\n    /**\r\n     * @dev Returns the address of the current owner.\r\n     */\r\n    function owner() public view virtual returns (address) {\r\n        return _owner;\r\n    }\r\n\r\n    /**\r\n     * @dev Throws if called by any account other than the owner.\r\n     */\r\n    modifier onlyOwner() {\r\n        require(owner() == msg.sender, \"Ownable: caller is not the owner\");\r\n        _;\r\n    }\r\n\r\n    /**\r\n     * @dev Transfers ownership of the contract to a new account (`newOwner`).\r\n     * Can only be called by the current owner.\r\n     */\r\n    function transferOwnership(address newOwner) public virtual onlyOwner {\r\n        require(newOwner != address(0), \"Ownable: new owner is the zero address\");\r\n        _transferOwnership(newOwner);\r\n    }\r\n\r\n    /**\r\n     * @dev Transfers ownership of the contract to a new account (`newOwner`).\r\n     * Internal function without access restriction.\r\n     */\r\n    function _transferOwnership(address newOwner) internal virtual {\r\n        address oldOwner = _owner;\r\n        _owner = newOwner;\r\n        emit OwnershipTransferred(oldOwner, newOwner);\r\n    }\r\n\r\n    uint256[50] private __gap;\r\n}"},"contracts/v1/Pausable.sol":{"content":"/**\r\n * SPDX-License-Identifier: MIT\r\n *\r\n * Copyright (c) 2016 Smart Contract Solutions, Inc.\r\n * Copyright (c) 2018-2020 CENTRE SECZ0\r\n * Copyright (c) 2022 JPYC\r\n *\r\n * Permission is hereby granted, free of charge, to any person obtaining a copy\r\n * of this software and associated documentation files (the \"Software\"), to deal\r\n * in the Software without restriction, including without limitation the rights\r\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n * copies of the Software, and to permit persons to whom the Software is\r\n * furnished to do so, subject to the following conditions:\r\n *\r\n * The above copyright notice and this permission notice shall be included in\r\n * copies or substantial portions of the Software.\r\n *\r\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\r\n * SOFTWARE.\r\n */\r\n\r\npragma solidity 0.8.11;\r\n\r\nimport \"./Ownable.sol\";\r\n\r\n/**\r\n* @dev Forked from https://github.com/OpenZeppelin/openzeppelin-contracts/blob/feb665136c0dae9912e08397c1a21c4af3651ef3/contracts/lifecycle/Pausable.sol\r\n * Modifications:\r\n * 1. Change solidity version to 0.8.11\r\n * 2. Do not set initial value of paused\r\n */\r\n\r\n/**\r\n * @notice Base contract which allows children to implement an emergency stop\r\n * mechanism\r\n * @dev Forked from https://github.com/OpenZeppelin/openzeppelin-contracts/blob/feb665136c0dae9912e08397c1a21c4af3651ef3/contracts/lifecycle/Pausable.sol\r\n * Modifications:\r\n * 1. Added pauser role, switched pause/unpause to be onlyPauser (6/14/2018)\r\n * 2. Removed whenNotPause/whenPaused from pause/unpause (6/14/2018)\r\n * 3. Removed whenPaused (6/14/2018)\r\n * 4. Switches ownable library to use ZeppelinOS (7/12/18)\r\n * 5. Remove constructor (7/13/18)\r\n * 6. Reformat, conform to Solidity 0.6 syntax and add error messages (5/13/20)\r\n * 7. Make public functions external (5/27/20)\r\n */\r\ncontract Pausable is Ownable {\r\n    event Pause();\r\n    event Unpause();\r\n    event PauserChanged(address indexed newAddress);\r\n\r\n    address public pauser;\r\n    bool public paused;\r\n\r\n    /**\r\n     * @dev Modifier to make a function callable only when the contract is not paused.\r\n     */\r\n    modifier whenNotPaused() {\r\n        require(!paused, \"Pausable: paused\");\r\n        _;\r\n    }\r\n\r\n    /**\r\n     * @dev throws if called by any account other than the pauser\r\n     */\r\n    modifier onlyPauser() {\r\n        require(msg.sender == pauser, \"Pausable: caller is not the pauser\");\r\n        _;\r\n    }\r\n\r\n    /**\r\n     * @dev called by the owner to pause, triggers stopped state\r\n     */\r\n    function pause() external onlyPauser {\r\n        paused = true;\r\n        emit Pause();\r\n    }\r\n\r\n    /**\r\n     * @dev called by the owner to unpause, returns to normal state\r\n     */\r\n    function unpause() external onlyPauser {\r\n        paused = false;\r\n        emit Unpause();\r\n    }\r\n\r\n    /**\r\n     * @dev update the pauser role\r\n     */\r\n    function updatePauser(address _newPauser) external onlyOwner {\r\n        require(\r\n            _newPauser != address(0),\r\n            \"Pausable: new pauser is the zero address\"\r\n        );\r\n        pauser = _newPauser;\r\n        emit PauserChanged(pauser);\r\n    }\r\n\r\n    uint256[50] private __gap;\r\n}"},"contracts/v1/Rescuable.sol":{"content":"/**\r\n * SPDX-License-Identifier: MIT\r\n *\r\n * Copyright (c) 2018-2020 CENTRE SECZ\r\n * Copyright (c) 2022 JPYC\r\n *\r\n * Permission is hereby granted, free of charge, to any person obtaining a copy\r\n * of this software and associated documentation files (the \"Software\"), to deal\r\n * in the Software without restriction, including without limitation the rights\r\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n * copies of the Software, and to permit persons to whom the Software is\r\n * furnished to do so, subject to the following conditions:\r\n *\r\n * The above copyright notice and this permission notice shall be included in\r\n * copies or substantial portions of the Software.\r\n *\r\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\r\n * SOFTWARE.\r\n */\r\n\r\npragma solidity 0.8.11;\r\n\r\nimport \"./Ownable.sol\";\r\nimport \"../util/IERC20.sol\";\r\n\r\n/**\r\n * @notice Base contract which allows children to rescue tokens mistakenly sent to the contract\r\n* @dev Forked from https://github.com/centrehq/centre-tokens/blob/37039f00534d3e5148269adf98bd2d42ea9fcfd7/contracts/v1.1/Rescuable.sol\r\n * Modifications:\r\n * 1. Change solidity version to 0.8.11\r\n * 2. Set state variable rescuer to public\r\n * 3. Do not use safeTransfer\r\n */\r\n\r\ncontract Rescuable is Ownable {\r\n\r\n    address public rescuer;\r\n\r\n    event RescuerChanged(address indexed newRescuer);\r\n\r\n    /**\r\n     * @notice Revert if called by any account other than the rescuer.\r\n     */\r\n    modifier onlyRescuer() {\r\n        require(msg.sender == rescuer, \"Rescuable: caller is not the rescuer\");\r\n        _;\r\n    }\r\n\r\n    /**\r\n     * @notice Rescue ERC20 tokens locked up in this contract.\r\n     * @param tokenContract ERC20 token contract address\r\n     * @param to        Recipient address\r\n     * @param amount    Amount to withdraw\r\n     */\r\n    function rescueERC20(\r\n        IERC20 tokenContract,\r\n        address to,\r\n        uint256 amount\r\n    ) external onlyRescuer {\r\n        tokenContract.transfer(to, amount);\r\n    }\r\n\r\n    /**\r\n     * @notice Assign the rescuer role to a given address.\r\n     * @param newRescuer New rescuer's address\r\n     */\r\n    function updateRescuer(address newRescuer) external onlyOwner {\r\n        require(\r\n            newRescuer != address(0),\r\n            \"Rescuable: new rescuer is the zero address\"\r\n        );\r\n        rescuer = newRescuer;\r\n        emit RescuerChanged(newRescuer);\r\n    }\r\n\r\n    uint256[50] private __gap;\r\n}"}},"matchId":"9861046","creationMatch":"exact_match","runtimeMatch":"exact_match","verifiedAt":"2025-11-09T17:57:11Z","match":"exact_match","chainId":"1","address":"0xafAC17FC3936A29CA2D2787cEd3c5d1c52007d2e"}