{
    "Function": "slitherConstructorConstantVariables",
    "File": "src/SmartWallet/ERC1271.sol",
    "Parent Contracts": [],
    "High-Level Calls": [],
    "Internal Calls": [
        "keccak256(bytes)"
    ],
    "Library Calls": [],
    "Low-Level Calls": [],
    "Code": "abstract contract ERC1271 {\n    /// @dev Precomputed `typeHash` used to produce EIP-712 compliant hash when applying the anti\n    ///      cross-account-replay layer.\n    ///\n    ///      The original hash must either be:\n    ///         - An EIP-191 hash: keccak256(\"\\x19Ethereum Signed Message:\\n\" || len(someMessage) || someMessage)\n    ///         - An EIP-712 hash: keccak256(\"\\x19\\x01\" || someDomainSeparator || hashStruct(someStruct))\n    bytes32 private constant _MESSAGE_TYPEHASH = keccak256(\"CoinbaseSmartWalletMessage(bytes32 hash)\");\n\n    /// @notice Returns information about the `EIP712Domain` used to create EIP-712 compliant hashes.\n    ///\n    /// @dev Follows ERC-5267 (see https://eips.ethereum.org/EIPS/eip-5267).\n    ///\n    /// @return fields The bitmap of used fields.\n    /// @return name The value of the `EIP712Domain.name` field.\n    /// @return version The value of the `EIP712Domain.version` field.\n    /// @return chainId The value of the `EIP712Domain.chainId` field.\n    /// @return verifyingContract The value of the `EIP712Domain.verifyingContract` field.\n    /// @return salt The value of the `EIP712Domain.salt` field.\n    /// @return extensions The list of EIP numbers, that extends EIP-712 with new domain fields.\n    function eip712Domain()\n        external\n        view\n        virtual\n        returns (\n            bytes1 fields,\n            string memory name,\n            string memory version,\n            uint256 chainId,\n            address verifyingContract,\n            bytes32 salt,\n            uint256[] memory extensions\n        )\n    {\n        fields = hex\"0f\"; // `0b1111`.\n        (name, version) = _domainNameAndVersion();\n        chainId = block.chainid;\n        verifyingContract = address(this);\n        salt = salt; // `bytes32(0)`.\n        extensions = extensions; // `new uint256[](0)`.\n    }\n\n    /// @notice Validates the `signature` against the given `hash`.\n    ///\n    /// @dev This implementation follows ERC-1271. See https://eips.ethereum.org/EIPS/eip-1271.\n    /// @dev IMPORTANT: Signature verification is performed on the hash produced AFTER applying the anti\n    ///      cross-account-replay layer on the given `hash` (i.e., verification is run on the replay-safe\n    ///      hash version).\n    ///\n    /// @param hash      The original hash.\n    /// @param signature The signature of the replay-safe hash to validate.\n    ///\n    /// @return result `0x1626ba7e` if validation succeeded, else `0xffffffff`.\n    function isValidSignature(bytes32 hash, bytes calldata signature) public view virtual returns (bytes4 result) {\n        if (_validateSignature({message: replaySafeHash(hash), signature: signature})) {\n            // bytes4(keccak256(\"isValidSignature(bytes32,bytes)\"))\n            return 0x1626ba7e;\n        }\n\n        return 0xffffffff;\n    }\n\n    /// @notice Wrapper around `_eip712Hash()` to produce a replay-safe hash fron the given `hash`.\n    ///\n    /// @dev The returned EIP-712 compliant replay-safe hash is the result of:\n    ///      keccak256(\n    ///         \\x19\\x01 ||\n    ///         this.domainSeparator ||\n    ///         hashStruct(CoinbaseSmartWalletMessage({ hash: `hash`}))\n    ///      )\n    ///\n    /// @param hash The original hash.\n    ///\n    /// @return The corresponding replay-safe hash.\n    function replaySafeHash(bytes32 hash) public view virtual returns (bytes32) {\n        return _eip712Hash(hash);\n    }\n\n    /// @notice Returns the `domainSeparator` used to create EIP-712 compliant hashes.\n    ///\n    /// @dev Implements domainSeparator = hashStruct(eip712Domain).\n    ///      See https://eips.ethereum.org/EIPS/eip-712#definition-of-domainseparator.\n    ///\n    /// @return The 32 bytes domain separator result.\n    function domainSeparator() public view returns (bytes32) {\n        (string memory name, string memory version) = _domainNameAndVersion();\n        return keccak256(\n            abi.encode(\n                keccak256(\"EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)\"),\n                keccak256(bytes(name)),\n                keccak256(bytes(version)),\n                block.chainid,\n                address(this)\n            )\n        );\n    }\n\n    /// @notice Returns the EIP-712 typed hash of the `CoinbaseSmartWalletMessage(bytes32 hash)` data structure.\n    ///\n    /// @dev Implements encode(domainSeparator : \ud835\udd39\u00b2\u2075\u2076, message : \ud835\udd4a) = \"\\x19\\x01\" || domainSeparator || hashStruct(message).\n    /// @dev See https://eips.ethereum.org/EIPS/eip-712#specification.\n    ///\n    /// @param hash The `CoinbaseSmartWalletMessage.hash` field to hash.\n    ////\n    /// @return The resulting EIP-712 hash.\n    function _eip712Hash(bytes32 hash) internal view virtual returns (bytes32) {\n        return keccak256(abi.encodePacked(\"\\x19\\x01\", domainSeparator(), _hashStruct(hash)));\n    }\n\n    /// @notice Returns the EIP-712 `hashStruct` result of the `CoinbaseSmartWalletMessage(bytes32 hash)` data structure.\n    ///\n    /// @dev Implements hashStruct(s : \ud835\udd4a) = keccak256(typeHash || encodeData(s)).\n    /// @dev See https://eips.ethereum.org/EIPS/eip-712#definition-of-hashstruct.\n    ///\n    /// @param hash The `CoinbaseSmartWalletMessage.hash` field.\n    ///\n    /// @return The EIP-712 `hashStruct` result.\n    function _hashStruct(bytes32 hash) internal view virtual returns (bytes32) {\n        return keccak256(abi.encode(_MESSAGE_TYPEHASH, hash));\n    }\n\n    /// @notice Returns the domain name and version to use when creating EIP-712 signatures.\n    ///\n    /// @dev MUST be defined by the implementation.\n    ///\n    /// @return name The user readable name of signing domain.\n    /// @return version The current major version of the signing domain.\n    function _domainNameAndVersion() internal view virtual returns (string memory name, string memory version);\n\n    /// @notice Validate the `signature` against the given `message`.\n    ///\n    /// @dev MUST be defined by the implementation.\n    /// @dev The `signature` content MIGHT NOT necessarily be the usual (r,s,v) values. It is the responsibility\n    ///      of the implementation to decode `signature` depending on its usecase.\n    ///\n    /// @param message   The message whose signature has been performed on.\n    /// @param signature The signature associated with `message`.\n    ///\n    /// @return `true` is the signature is valid, else `false`.\n    function _validateSignature(bytes32 message, bytes calldata signature) internal view virtual returns (bool);\n}"
}