{
    "Function": "slitherConstructorConstantVariables",
    "File": "contracts/v1/EIP3009.sol",
    "Parent Contracts": [
        "contracts/v1/EIP712Domain.sol",
        "contracts/v1/AbstractFiatTokenV1.sol",
        "contracts/util/IERC20.sol"
    ],
    "High-Level Calls": [],
    "Internal Calls": [],
    "Library Calls": [],
    "Low-Level Calls": [],
    "Code": "abstract contract EIP3009 is AbstractFiatTokenV1, EIP712Domain {\n    // keccak256(\"TransferWithAuthorization(address from,address to,uint256 value,uint256 validAfter,uint256 validBefore,bytes32 nonce)\")\n    bytes32 public constant TRANSFER_WITH_AUTHORIZATION_TYPEHASH =\n        0x7c7c6cdb67a18743f49ec6fa9b35f50d52ed05cbed4cc592e13b44501c1a2267;\n\n    // keccak256(\"ReceiveWithAuthorization(address from,address to,uint256 value,uint256 validAfter,uint256 validBefore,bytes32 nonce)\")\n    bytes32 public constant RECEIVE_WITH_AUTHORIZATION_TYPEHASH =\n        0xd099cc98ef71107a616c4f0f941f04c322d8e254fe26b3c6668db87aae413de8;\n\n    // keccak256(\"CancelAuthorization(address authorizer,bytes32 nonce)\")\n    bytes32 public constant CANCEL_AUTHORIZATION_TYPEHASH =\n        0x158b0a9edf7a828aad02f63cd515c68ef2f50ba807396f6d12842833a1597429;\n\n    /**\n     * @dev authorizer address => nonce => bool (true if nonce is used)\n     */\n    mapping(address => mapping(bytes32 => bool)) private _authorizationStates;\n\n    event AuthorizationUsed(address indexed authorizer, bytes32 indexed nonce);\n    event AuthorizationCanceled(\n        address indexed authorizer,\n        bytes32 indexed nonce\n    );\n\n    /**\n     * @notice Returns the state of an authorization\n     * @dev Nonces are randomly generated 32-byte data unique to the\n     * authorizer's address\n     * @param authorizer    Authorizer's address\n     * @param nonce         Nonce of the authorization\n     * @return True if the nonce is used\n     */\n    function authorizationState(address authorizer, bytes32 nonce)\n        external\n        view\n        returns (bool)\n    {\n        return _authorizationStates[authorizer][nonce];\n    }\n\n    /**\n     * @notice Execute a transfer with a signed authorization\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             v of the signature\n     * @param r             r of the signature\n     * @param s             s of the 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    ) internal {\n        _requireValidAuthorization(from, nonce, validAfter, validBefore);\n\n        bytes memory data = abi.encode(\n            TRANSFER_WITH_AUTHORIZATION_TYPEHASH,\n            from,\n            to,\n            value,\n            validAfter,\n            validBefore,\n            nonce\n        );\n        require(\n            EIP712.recover(_domainSeparatorV4(), v, r, s, data) == from,\n            \"EIP3009: invalid signature\"\n        );\n\n        _markAuthorizationAsUsed(from, nonce);\n        _transfer(from, to, value);\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\n     * matches the caller of this function to prevent front-running attacks.\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             v of the signature\n     * @param r             r of the signature\n     * @param s             s of the 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    ) internal {\n        require(to == msg.sender, \"EIP3009: caller must be the payee\");\n        _requireValidAuthorization(from, nonce, validAfter, validBefore);\n\n        bytes memory data = abi.encode(\n            RECEIVE_WITH_AUTHORIZATION_TYPEHASH,\n            from,\n            to,\n            value,\n            validAfter,\n            validBefore,\n            nonce\n        );\n        require(\n            EIP712.recover(_domainSeparatorV4(), v, r, s, data) == from,\n            \"EIP3009: invalid signature\"\n        );\n\n        _markAuthorizationAsUsed(from, nonce);\n        _transfer(from, to, value);\n    }\n\n    /**\n     * @notice Attempt to cancel an authorization\n     * @param authorizer    Authorizer's address\n     * @param nonce         Nonce of the authorization\n     * @param v             v of the signature\n     * @param r             r of the signature\n     * @param s             s of the signature\n     */\n    function _cancelAuthorization(\n        address authorizer,\n        bytes32 nonce,\n        uint8 v,\n        bytes32 r,\n        bytes32 s\n    ) internal {\n        _requireUnusedAuthorization(authorizer, nonce);\n\n        bytes memory data = abi.encode(\n            CANCEL_AUTHORIZATION_TYPEHASH,\n            authorizer,\n            nonce\n        );\n        require(\n            EIP712.recover(_domainSeparatorV4(), v, r, s, data) == authorizer,\n            \"EIP3009: invalid signature\"\n        );\n\n        _authorizationStates[authorizer][nonce] = true;\n        emit AuthorizationCanceled(authorizer, nonce);\n    }\n\n    /**\n     * @notice Check that an authorization is unused\n     * @param authorizer    Authorizer's address\n     * @param nonce         Nonce of the authorization\n     */\n    function _requireUnusedAuthorization(address authorizer, bytes32 nonce)\n        private\n        view\n    {\n        require(\n            !_authorizationStates[authorizer][nonce],\n            \"EIP3009: authorization is used or canceled\"\n        );\n    }\n\n    /**\n     * @notice Check that authorization is valid\n     * @param authorizer    Authorizer's address\n     * @param nonce         Nonce of the authorization\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     */\n    function _requireValidAuthorization(\n        address authorizer,\n        bytes32 nonce,\n        uint256 validAfter,\n        uint256 validBefore\n    ) private view {\n        require(\n            block.timestamp > validAfter,\n            \"FEIP3009: authorization is not yet valid\"\n        );\n        require(\n            block.timestamp < validBefore,\n            \"EIP3009: authorization is expired\"\n        );\n        _requireUnusedAuthorization(authorizer, nonce);\n    }\n\n    /**\n     * @notice Mark an authorization as used\n     * @param authorizer    Authorizer's address\n     * @param nonce         Nonce of the authorization\n     */\n    function _markAuthorizationAsUsed(address authorizer, bytes32 nonce)\n        private\n    {\n        _authorizationStates[authorizer][nonce] = true;\n        emit AuthorizationUsed(authorizer, nonce);\n    }\n\n    uint256[50] private __gap;\n}"
}