@etherisc/registry-contracts
Version:
Etherisc's smart contracts for the registry.
1,215 lines (1,214 loc) • 90.1 kB
JSON
{
"abi": [],
"allSourcePaths": {
"25": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.8.2/contracts/utils/Strings.sol",
"26": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.8.2/contracts/utils/cryptography/ECDSA.sol",
"27": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.8.2/contracts/utils/cryptography/EIP712.sol",
"30": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.8.2/contracts/utils/math/Math.sol"
},
"ast": {
"absolutePath": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.8.2/contracts/utils/cryptography/EIP712.sol",
"exportedSymbols": {
"ECDSA": [
14129
],
"EIP712": [
14283
],
"Math": [
13636
],
"Strings": [
17301
]
},
"id": 14284,
"license": "MIT",
"nodeType": "SourceUnit",
"nodes": [
{
"id": 14131,
"literals": [
"solidity",
"^",
"0.8",
".0"
],
"nodeType": "PragmaDirective",
"src": "113:23:27"
},
{
"absolutePath": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.8.2/contracts/utils/cryptography/ECDSA.sol",
"file": "./ECDSA.sol",
"id": 14132,
"nameLocation": "-1:-1:-1",
"nodeType": "ImportDirective",
"scope": 14284,
"sourceUnit": 14130,
"src": "138:21:27",
"symbolAliases": [],
"unitAlias": ""
},
{
"abstract": true,
"baseContracts": [],
"canonicalName": "EIP712",
"contractDependencies": [],
"contractKind": "contract",
"documentation": {
"id": 14133,
"nodeType": "StructuredDocumentation",
"src": "161:1142:27",
"text": " @dev https://eips.ethereum.org/EIPS/eip-712[EIP 712] is a standard for hashing and signing of typed structured data.\n The encoding specified in the EIP is very generic, and such a generic implementation in Solidity is not feasible,\n thus this contract does not implement the encoding itself. Protocols need to implement the type-specific encoding\n they need in their contracts using a combination of `abi.encode` and `keccak256`.\n This contract implements the EIP 712 domain separator ({_domainSeparatorV4}) that is used as part of the encoding\n scheme, and the final step of the encoding to obtain the message digest that is then signed via ECDSA\n ({_hashTypedDataV4}).\n The implementation of the domain separator was designed to be as efficient as possible while still properly updating\n the chain id to protect against replay attacks on an eventual fork of the chain.\n NOTE: This contract implements the version of the encoding known as \"v4\", as implemented by the JSON RPC method\n https://docs.metamask.io/guide/signing-data.html[`eth_signTypedDataV4` in MetaMask].\n _Available since v3.4._"
},
"fullyImplemented": true,
"id": 14283,
"linearizedBaseContracts": [
14283
],
"name": "EIP712",
"nameLocation": "1322:6:27",
"nodeType": "ContractDefinition",
"nodes": [
{
"constant": false,
"id": 14135,
"mutability": "immutable",
"name": "_CACHED_DOMAIN_SEPARATOR",
"nameLocation": "1598:24:27",
"nodeType": "VariableDeclaration",
"scope": 14283,
"src": "1572:50:27",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
},
"typeName": {
"id": 14134,
"name": "bytes32",
"nodeType": "ElementaryTypeName",
"src": "1572:7:27",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"visibility": "private"
},
{
"constant": false,
"id": 14137,
"mutability": "immutable",
"name": "_CACHED_CHAIN_ID",
"nameLocation": "1654:16:27",
"nodeType": "VariableDeclaration",
"scope": 14283,
"src": "1628:42:27",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 14136,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1628:7:27",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "private"
},
{
"constant": false,
"id": 14139,
"mutability": "immutable",
"name": "_CACHED_THIS",
"nameLocation": "1702:12:27",
"nodeType": "VariableDeclaration",
"scope": 14283,
"src": "1676:38:27",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 14138,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "1676:7:27",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"visibility": "private"
},
{
"constant": false,
"id": 14141,
"mutability": "immutable",
"name": "_HASHED_NAME",
"nameLocation": "1747:12:27",
"nodeType": "VariableDeclaration",
"scope": 14283,
"src": "1721:38:27",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
},
"typeName": {
"id": 14140,
"name": "bytes32",
"nodeType": "ElementaryTypeName",
"src": "1721:7:27",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"visibility": "private"
},
{
"constant": false,
"id": 14143,
"mutability": "immutable",
"name": "_HASHED_VERSION",
"nameLocation": "1791:15:27",
"nodeType": "VariableDeclaration",
"scope": 14283,
"src": "1765:41:27",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
},
"typeName": {
"id": 14142,
"name": "bytes32",
"nodeType": "ElementaryTypeName",
"src": "1765:7:27",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"visibility": "private"
},
{
"constant": false,
"id": 14145,
"mutability": "immutable",
"name": "_TYPE_HASH",
"nameLocation": "1838:10:27",
"nodeType": "VariableDeclaration",
"scope": 14283,
"src": "1812:36:27",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
},
"typeName": {
"id": 14144,
"name": "bytes32",
"nodeType": "ElementaryTypeName",
"src": "1812:7:27",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"visibility": "private"
},
{
"body": {
"id": 14209,
"nodeType": "Block",
"src": "2519:547:27",
"statements": [
{
"assignments": [
14154
],
"declarations": [
{
"constant": false,
"id": 14154,
"mutability": "mutable",
"name": "hashedName",
"nameLocation": "2537:10:27",
"nodeType": "VariableDeclaration",
"scope": 14209,
"src": "2529:18:27",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
},
"typeName": {
"id": 14153,
"name": "bytes32",
"nodeType": "ElementaryTypeName",
"src": "2529:7:27",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"visibility": "internal"
}
],
"id": 14161,
"initialValue": {
"arguments": [
{
"arguments": [
{
"id": 14158,
"name": "name",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 14148,
"src": "2566:4:27",
"typeDescriptions": {
"typeIdentifier": "t_string_memory_ptr",
"typeString": "string memory"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_string_memory_ptr",
"typeString": "string memory"
}
],
"id": 14157,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "2560:5:27",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_bytes_storage_ptr_$",
"typeString": "type(bytes storage pointer)"
},
"typeName": {
"id": 14156,
"name": "bytes",
"nodeType": "ElementaryTypeName",
"src": "2560:5:27",
"typeDescriptions": {}
}
},
"id": 14159,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "2560:11:27",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
],
"id": 14155,
"name": "keccak256",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": -8,
"src": "2550:9:27",
"typeDescriptions": {
"typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$",
"typeString": "function (bytes memory) pure returns (bytes32)"
}
},
"id": 14160,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "2550:22:27",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "2529:43:27"
},
{
"assignments": [
14163
],
"declarations": [
{
"constant": false,
"id": 14163,
"mutability": "mutable",
"name": "hashedVersion",
"nameLocation": "2590:13:27",
"nodeType": "VariableDeclaration",
"scope": 14209,
"src": "2582:21:27",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
},
"typeName": {
"id": 14162,
"name": "bytes32",
"nodeType": "ElementaryTypeName",
"src": "2582:7:27",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"visibility": "internal"
}
],
"id": 14170,
"initialValue": {
"arguments": [
{
"arguments": [
{
"id": 14167,
"name": "version",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 14150,
"src": "2622:7:27",
"typeDescriptions": {
"typeIdentifier": "t_string_memory_ptr",
"typeString": "string memory"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_string_memory_ptr",
"typeString": "string memory"
}
],
"id": 14166,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "2616:5:27",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_bytes_storage_ptr_$",
"typeString": "type(bytes storage pointer)"
},
"typeName": {
"id": 14165,
"name": "bytes",
"nodeType": "ElementaryTypeName",
"src": "2616:5:27",
"typeDescriptions": {}
}
},
"id": 14168,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "2616:14:27",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
],
"id": 14164,
"name": "keccak256",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": -8,
"src": "2606:9:27",
"typeDescriptions": {
"typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$",
"typeString": "function (bytes memory) pure returns (bytes32)"
}
},
"id": 14169,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "2606:25:27",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "2582:49:27"
},
{
"assignments": [
14172
],
"declarations": [
{
"constant": false,
"id": 14172,
"mutability": "mutable",
"name": "typeHash",
"nameLocation": "2649:8:27",
"nodeType": "VariableDeclaration",
"scope": 14209,
"src": "2641:16:27",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
},
"typeName": {
"id": 14171,
"name": "bytes32",
"nodeType": "ElementaryTypeName",
"src": "2641:7:27",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"visibility": "internal"
}
],
"id": 14176,
"initialValue": {
"arguments": [
{
"hexValue": "454950373132446f6d61696e28737472696e67206e616d652c737472696e672076657273696f6e2c75696e7432353620636861696e49642c6164647265737320766572696679696e67436f6e747261637429",
"id": 14174,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "2683:84:27",
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f",
"typeString": "literal_string \"EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)\""
},
"value": "EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_stringliteral_8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f",
"typeString": "literal_string \"EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)\""
}
],
"id": 14173,
"name": "keccak256",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": -8,
"src": "2660:9:27",
"typeDescriptions": {
"typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$",
"typeString": "function (bytes memory) pure returns (bytes32)"
}
},
"id": 14175,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "functionCall",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "2660:117:27",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "2641:136:27"
},
{
"expression": {
"id": 14179,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"id": 14177,
"name": "_HASHED_NAME",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 14141,
"src": "2787:12:27",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"id": 14178,
"name": "hashedName",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 14154,
"src": "2802:10:27",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"src": "2787:25:27",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"id": 14180,
"nodeType": "ExpressionStatement",
"src": "2787:25:27"
},
{
"expression": {
"id": 14183,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"id": 14181,
"name": "_HASHED_VERSION",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 14143,
"src": "2822:15:27",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"id": 14182,
"name": "hashedVersion",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 14163,
"src": "2840:13:27",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"src": "2822:31:27",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"id": 14184,
"nodeType": "ExpressionStatement",
"src": "2822:31:27"
},
{
"expression": {
"id": 14188,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"id": 14185,
"name": "_CACHED_CHAIN_ID",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 14137,
"src": "2863:16:27",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"expression": {
"id": 14186,
"name": "block",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": -4,
"src": "2882:5:27",
"typeDescriptions": {
"typeIdentifier": "t_magic_block",
"typeString": "block"
}
},
"id": 14187,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberLocation": "2888:7:27",
"memberName": "chainid",
"nodeType": "MemberAccess",
"src": "2882:13:27",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "2863:32:27",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 14189,
"nodeType": "ExpressionStatement",
"src": "2863:32:27"
},
{
"expression": {
"id": 14196,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"id": 14190,
"name": "_CACHED_DOMAIN_SEPARATOR",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 14135,
"src": "2905:24:27",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"arguments": [
{
"id": 14192,
"name": "typeHash",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 14172,
"src": "2954:8:27",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
{
"id": 14193,
"name": "hashedName",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 14154,
"src": "2964:10:27",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
{
"id": 14194,
"name": "hashedVersion",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 14163,
"src": "2976:13:27",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
},
{
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
},
{
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
],
"id": 14191,
"name": "_buildDomainSeparator",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 14266,
"src": "2932:21:27",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_view$_t_bytes32_$_t_bytes32_$_t_bytes32_$returns$_t_bytes32_$",
"typeString": "function (bytes32,bytes32,bytes32) view returns (bytes32)"
}
},
"id": 14195,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "2932:58:27",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"src": "2905:85:27",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"id": 14197,
"nodeType": "ExpressionStatement",
"src": "2905:85:27"
},
{
"expression": {
"id": 14203,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"id": 14198,
"name": "_CACHED_THIS",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 14139,
"src": "3000:12:27",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"arguments": [
{
"id": 14201,
"name": "this",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": -28,
"src": "3023:4:27",
"typeDescriptions": {
"typeIdentifier": "t_contract$_EIP712_$14283",
"typeString": "contract EIP712"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_contract$_EIP712_$14283",
"typeString": "contract EIP712"
}
],
"id": 14200,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "3015:7:27",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_address_$",
"typeString": "type(address)"
},
"typeName": {
"id": 14199,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "3015:7:27",
"typeDescriptions": {}
}
},
"id": 14202,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "3015:13:27",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"src": "3000:28:27",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"id": 14204,
"nodeType": "ExpressionStatement",
"src": "3000:28:27"
},
{
"expression": {
"id": 14207,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"id": 14205,
"name": "_TYPE_HASH",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 14145,
"src": "3038:10:27",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"id": 14206,
"name": "typeHash",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 14172,
"src": "3051:8:27",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"src": "3038:21:27",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"id": 14208,
"nodeType": "ExpressionStatement",
"src": "3038:21:27"
}
]
},
"documentation": {
"id": 14146,
"nodeType": "StructuredDocumentation",
"src": "1900:559:27",
"text": " @dev Initializes the domain separator and parameter caches.\n The meaning of `name` and `version` is specified in\n https://eips.ethereum.org/EIPS/eip-712#definition-of-domainseparator[EIP 712]:\n - `name`: the user readable name of the signing domain, i.e. the name of the DApp or the protocol.\n - `version`: the current major version of the signing domain.\n NOTE: These parameters cannot be changed except through a xref:learn::upgrading-smart-contracts.adoc[smart\n contract upgrade]."
},
"id": 14210,
"implemented": true,
"kind": "constructor",
"modifiers": [],
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 14151,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 14148,
"mutability": "mutable",
"name": "name",
"nameLocation": "2490:4:27",
"nodeType": "VariableDeclaration",
"scope": 14210,
"src": "2476:18:27",
"stateVariable": false,
"storageLocation": "memory",
"typeDescriptions": {
"typeIdentifier": "t_string_memory_ptr",
"typeString": "string"
},
"typeName": {
"id": 14147,
"name": "string",
"nodeType": "ElementaryTypeName",
"src": "2476:6:27",
"typeDescriptions": {
"typeIdentifier": "t_string_storage_ptr",
"typeString": "string"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 14150,
"mutability": "mutable",
"name": "version",
"nameLocation": "2510:7:27",
"nodeType": "VariableDeclaration",
"scope": 14210,
"src": "2496:21:27",
"stateVariable": false,
"storageLocation": "memory",
"typeDescriptions": {
"typeIdentifier": "t_string_memory_ptr",
"typeString": "string"
},
"typeName": {
"id": 14149,
"name": "string",
"nodeType": "ElementaryTypeName",
"src": "2496:6:27",
"typeDescriptions": {
"typeIdentifier": "t_string_storage_ptr",
"typeString": "string"
}
},
"visibility": "internal"
}
],
"src": "2475:43:27"
},
"returnParameters": {
"id": 14152,
"nodeType": "ParameterList",
"parameters": [],
"src": "2519:0:27"
},
"scope": 14283,
"src": "2464:602:27",
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "internal"
},
{
"body": {
"id": 14238,
"nodeType": "Block",
"src": "3214:246:27",
"statements": [
{
"condition": {
"commonType": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"id": 14226,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"commonType": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"id": 14221,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"arguments": [
{
"id": 14218,
"name": "this",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": -28,
"src": "3236:4:27",
"typeDescriptions": {
"typeIdentifier": "t_contract$_EIP712_$14283",
"typeString": "contract EIP712"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_contract$_EIP712_$14283",
"typeString": "contract EIP712"
}
],
"id": 14217,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "3228:7:27",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_address_$",
"typeString": "type(address)"
},
"typeName": {
"id": 14216,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "3228:7:27",
"typeDescriptions": {}
}
},
"id": 14219,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "3228:13:27",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "BinaryOperation",
"operator": "==",
"rightExpression": {
"id": 14220,
"name": "_CACHED_THIS",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 14139,
"src": "3245:12:27",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"src": "3228:29:27",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"nodeType": "BinaryOperation",
"operator": "&&",
"rightExpression": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 14225,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"expression": {
"id": 14222,
"name": "block",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": -4,
"src": "3261:5:27",
"typeDescriptions": {
"typeIdentifier": "t_magic_block",
"typeString": "block"
}
},
"id": 14223,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberLocation": "3267:7:27",
"memberName": "chainid",
"nodeType": "MemberAccess",
"src": "3261:13:27",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "==",
"rightExpression": {