@etherisc/depeg-contracts
Version:
Etherisc's smart contracts for a depeg insurance for stable coins.
1,302 lines (1,301 loc) • 182 kB
JSON
{
"abi": [
{
"inputs": [
{
"internalType": "string",
"name": "name",
"type": "string"
},
{
"internalType": "string",
"name": "version",
"type": "string"
}
],
"stateMutability": "nonpayable",
"type": "constructor"
},
{
"inputs": [],
"name": "EIP712_TYPE_HASH",
"outputs": [
{
"internalType": "bytes32",
"name": "",
"type": "bytes32"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes32",
"name": "digest",
"type": "bytes32"
},
{
"internalType": "bytes",
"name": "signature",
"type": "bytes"
}
],
"name": "getSigner",
"outputs": [
{
"internalType": "address",
"name": "signer",
"type": "address"
}
],
"stateMutability": "pure",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes32",
"name": "structHash",
"type": "bytes32"
}
],
"name": "getTypedDataV4Hash",
"outputs": [
{
"internalType": "bytes32",
"name": "",
"type": "bytes32"
}
],
"stateMutability": "view",
"type": "function"
}
],
"allSourcePaths": {
"12": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.7.3/contracts/utils/Strings.sol",
"13": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.7.3/contracts/utils/cryptography/ECDSA.sol",
"54": "contracts/EIP712.sol"
},
"ast": {
"absolutePath": "contracts/EIP712.sol",
"exportedSymbols": {
"ECDSA": [
13816
],
"EIP712": [
4683
]
},
"id": 4684,
"license": "Apache-2.0",
"nodeType": "SourceUnit",
"nodes": [
{
"id": 4581,
"literals": [
"solidity",
"0.8",
".2"
],
"nodeType": "PragmaDirective",
"src": "39:22:54"
},
{
"absolutePath": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.7.3/contracts/utils/cryptography/ECDSA.sol",
"file": "@openzeppelin/contracts/utils/cryptography/ECDSA.sol",
"id": 4583,
"nameLocation": "-1:-1:-1",
"nodeType": "ImportDirective",
"scope": 4684,
"sourceUnit": 13817,
"src": "63:75:54",
"symbolAliases": [
{
"foreign": {
"id": 4582,
"name": "ECDSA",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"src": "71:5:54",
"typeDescriptions": {}
},
"nameLocation": "-1:-1:-1"
}
],
"unitAlias": ""
},
{
"abstract": false,
"baseContracts": [],
"contractDependencies": [],
"contractKind": "contract",
"fullyImplemented": true,
"id": 4683,
"linearizedBaseContracts": [
4683
],
"name": "EIP712",
"nameLocation": "149:6:54",
"nodeType": "ContractDefinition",
"nodes": [
{
"constant": true,
"functionSelector": "74a640ff",
"id": 4588,
"mutability": "constant",
"name": "EIP712_TYPE_HASH",
"nameLocation": "187:16:54",
"nodeType": "VariableDeclaration",
"scope": 4683,
"src": "163:146:54",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
},
"typeName": {
"id": 4584,
"name": "bytes32",
"nodeType": "ElementaryTypeName",
"src": "163:7:54",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"value": {
"arguments": [
{
"hexValue": "454950373132446f6d61696e28737472696e67206e616d652c737472696e672076657273696f6e2c75696e7432353620636861696e49642c6164647265737320766572696679696e67436f6e747261637429",
"id": 4586,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "224:84:54",
"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": 4585,
"name": "keccak256",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": -8,
"src": "214:9:54",
"typeDescriptions": {
"typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$",
"typeString": "function (bytes memory) pure returns (bytes32)"
}
},
"id": 4587,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "214:95:54",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"visibility": "public"
},
{
"constant": false,
"id": 4590,
"mutability": "mutable",
"name": "_name",
"nameLocation": "331:5:54",
"nodeType": "VariableDeclaration",
"scope": 4683,
"src": "316:20:54",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_string_storage",
"typeString": "string"
},
"typeName": {
"id": 4589,
"name": "string",
"nodeType": "ElementaryTypeName",
"src": "316:6:54",
"typeDescriptions": {
"typeIdentifier": "t_string_storage_ptr",
"typeString": "string"
}
},
"visibility": "private"
},
{
"constant": false,
"id": 4592,
"mutability": "mutable",
"name": "_version",
"nameLocation": "357:8:54",
"nodeType": "VariableDeclaration",
"scope": 4683,
"src": "342:23:54",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_string_storage",
"typeString": "string"
},
"typeName": {
"id": 4591,
"name": "string",
"nodeType": "ElementaryTypeName",
"src": "342:6:54",
"typeDescriptions": {
"typeIdentifier": "t_string_storage_ptr",
"typeString": "string"
}
},
"visibility": "private"
},
{
"constant": false,
"id": 4594,
"mutability": "mutable",
"name": "_hashedName",
"nameLocation": "388:11:54",
"nodeType": "VariableDeclaration",
"scope": 4683,
"src": "372:27:54",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
},
"typeName": {
"id": 4593,
"name": "bytes32",
"nodeType": "ElementaryTypeName",
"src": "372:7:54",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"visibility": "private"
},
{
"constant": false,
"id": 4596,
"mutability": "mutable",
"name": "_hashedVersion",
"nameLocation": "421:14:54",
"nodeType": "VariableDeclaration",
"scope": 4683,
"src": "405:30:54",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
},
"typeName": {
"id": 4595,
"name": "bytes32",
"nodeType": "ElementaryTypeName",
"src": "405:7:54",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"visibility": "private"
},
{
"body": {
"id": 4629,
"nodeType": "Block",
"src": "498:155:54",
"statements": [
{
"expression": {
"id": 4605,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"id": 4603,
"name": "_name",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4590,
"src": "508:5:54",
"typeDescriptions": {
"typeIdentifier": "t_string_storage",
"typeString": "string storage ref"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"id": 4604,
"name": "name",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4598,
"src": "516:4:54",
"typeDescriptions": {
"typeIdentifier": "t_string_memory_ptr",
"typeString": "string memory"
}
},
"src": "508:12:54",
"typeDescriptions": {
"typeIdentifier": "t_string_storage",
"typeString": "string storage ref"
}
},
"id": 4606,
"nodeType": "ExpressionStatement",
"src": "508:12:54"
},
{
"expression": {
"id": 4609,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"id": 4607,
"name": "_version",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4592,
"src": "530:8:54",
"typeDescriptions": {
"typeIdentifier": "t_string_storage",
"typeString": "string storage ref"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"id": 4608,
"name": "version",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4600,
"src": "541:7:54",
"typeDescriptions": {
"typeIdentifier": "t_string_memory_ptr",
"typeString": "string memory"
}
},
"src": "530:18:54",
"typeDescriptions": {
"typeIdentifier": "t_string_storage",
"typeString": "string storage ref"
}
},
"id": 4610,
"nodeType": "ExpressionStatement",
"src": "530:18:54"
},
{
"expression": {
"id": 4618,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"id": 4611,
"name": "_hashedName",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4594,
"src": "558:11:54",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"arguments": [
{
"arguments": [
{
"id": 4615,
"name": "name",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4598,
"src": "588:4:54",
"typeDescriptions": {
"typeIdentifier": "t_string_memory_ptr",
"typeString": "string memory"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_string_memory_ptr",
"typeString": "string memory"
}
],
"id": 4614,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "582:5:54",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_bytes_storage_ptr_$",
"typeString": "type(bytes storage pointer)"
},
"typeName": {
"id": 4613,
"name": "bytes",
"nodeType": "ElementaryTypeName",
"src": "582:5:54",
"typeDescriptions": {}
}
},
"id": 4616,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "582:11:54",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
],
"id": 4612,
"name": "keccak256",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": -8,
"src": "572:9:54",
"typeDescriptions": {
"typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$",
"typeString": "function (bytes memory) pure returns (bytes32)"
}
},
"id": 4617,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "572:22:54",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"src": "558:36:54",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"id": 4619,
"nodeType": "ExpressionStatement",
"src": "558:36:54"
},
{
"expression": {
"id": 4627,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"id": 4620,
"name": "_hashedVersion",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4596,
"src": "604:14:54",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"arguments": [
{
"arguments": [
{
"id": 4624,
"name": "version",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4600,
"src": "637:7:54",
"typeDescriptions": {
"typeIdentifier": "t_string_memory_ptr",
"typeString": "string memory"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_string_memory_ptr",
"typeString": "string memory"
}
],
"id": 4623,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "631:5:54",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_bytes_storage_ptr_$",
"typeString": "type(bytes storage pointer)"
},
"typeName": {
"id": 4622,
"name": "bytes",
"nodeType": "ElementaryTypeName",
"src": "631:5:54",
"typeDescriptions": {}
}
},
"id": 4625,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "631:14:54",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
],
"id": 4621,
"name": "keccak256",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": -8,
"src": "621:9:54",
"typeDescriptions": {
"typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$",
"typeString": "function (bytes memory) pure returns (bytes32)"
}
},
"id": 4626,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "621:25:54",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"src": "604:42:54",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"id": 4628,
"nodeType": "ExpressionStatement",
"src": "604:42:54"
}
]
},
"id": 4630,
"implemented": true,
"kind": "constructor",
"modifiers": [],
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 4601,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 4598,
"mutability": "mutable",
"name": "name",
"nameLocation": "469:4:54",
"nodeType": "VariableDeclaration",
"scope": 4630,
"src": "455:18:54",
"stateVariable": false,
"storageLocation": "memory",
"typeDescriptions": {
"typeIdentifier": "t_string_memory_ptr",
"typeString": "string"
},
"typeName": {
"id": 4597,
"name": "string",
"nodeType": "ElementaryTypeName",
"src": "455:6:54",
"typeDescriptions": {
"typeIdentifier": "t_string_storage_ptr",
"typeString": "string"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 4600,
"mutability": "mutable",
"name": "version",
"nameLocation": "489:7:54",
"nodeType": "VariableDeclaration",
"scope": 4630,
"src": "475:21:54",
"stateVariable": false,
"storageLocation": "memory",
"typeDescriptions": {
"typeIdentifier": "t_string_memory_ptr",
"typeString": "string"
},
"typeName": {
"id": 4599,
"name": "string",
"nodeType": "ElementaryTypeName",
"src": "475:6:54",
"typeDescriptions": {
"typeIdentifier": "t_string_storage_ptr",
"typeString": "string"
}
},
"visibility": "internal"
}
],
"src": "454:43:54"
},
"returnParameters": {
"id": 4602,
"nodeType": "ParameterList",
"parameters": [],
"src": "498:0:54"
},
"scope": 4683,
"src": "443:210:54",
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "public"
},
{
"body": {
"id": 4645,
"nodeType": "Block",
"src": "807:56:54",
"statements": [
{
"expression": {
"arguments": [
{
"id": 4641,
"name": "digest",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4632,
"src": "838:6:54",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
{
"id": 4642,
"name": "signature",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4634,
"src": "846:9:54",
"typeDescriptions": {
"typeIdentifier": "t_bytes_calldata_ptr",
"typeString": "bytes calldata"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
},
{
"typeIdentifier": "t_bytes_calldata_ptr",
"typeString": "bytes calldata"
}
],
"expression": {
"id": 4639,
"name": "ECDSA",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 13816,
"src": "824:5:54",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_contract$_ECDSA_$13816_$",
"typeString": "type(library ECDSA)"
}
},
"id": 4640,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "recover",
"nodeType": "MemberAccess",
"referencedDeclaration": 13565,
"src": "824:13:54",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_pure$_t_bytes32_$_t_bytes_memory_ptr_$returns$_t_address_$",
"typeString": "function (bytes32,bytes memory) pure returns (address)"
}
},
"id": 4643,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "824:32:54",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"functionReturnParameters": 4638,
"id": 4644,
"nodeType": "Return",
"src": "817:39:54"
}
]
},
"functionSelector": "f7b2ec0d",
"id": 4646,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "getSigner",
"nameLocation": "669:9:54",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 4635,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 4632,
"mutability": "mutable",
"name": "digest",
"nameLocation": "696:6:54",
"nodeType": "VariableDeclaration",
"scope": 4646,
"src": "688:14:54",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
},
"typeName": {
"id": 4631,
"name": "bytes32",
"nodeType": "ElementaryTypeName",
"src": "688:7:54",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 4634,
"mutability": "mutable",
"name": "signature",
"nameLocation": "727:9:54",
"nodeType": "VariableDeclaration",
"scope": 4646,
"src": "712:24:54",
"stateVariable": false,
"storageLocation": "calldata",
"typeDescriptions": {
"typeIdentifier": "t_bytes_calldata_ptr",
"typeString": "bytes"
},
"typeName": {
"id": 4633,
"name": "bytes",
"nodeType": "ElementaryTypeName",
"src": "712:5:54",
"typeDescriptions": {
"typeIdentifier": "t_bytes_storage_ptr",
"typeString": "bytes"
}
},
"visibility": "internal"
}
],
"src": "678:64:54"
},
"returnParameters": {
"id": 4638,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 4637,
"mutability": "mutable",
"name": "signer",
"nameLocation": "795:6:54",
"nodeType": "VariableDeclaration",
"scope": 4646,
"src": "787:14:54",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 4636,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "787:7:54",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"visibility": "internal"
}
],
"src": "786:16:54"
},
"scope": 4683,
"src": "660:203:54",
"stateMutability": "pure",
"virtual": false,
"visibility": "public"
},
{
"body": {
"id": 4660,
"nodeType": "Block",
"src": "1108:82:54",
"statements": [
{
"expression": {
"arguments": [
{
"arguments": [],
"expression": {
"argumentTypes": [],
"id": 4655,
"name": "_buildDomainSeparator",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4682,
"src": "1147:21:54",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_view$__$returns$_t_bytes32_$",
"typeString": "function () view returns (bytes32)"
}
},
"id": 4656,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "1147:23:54",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
{
"id": 4657,
"name": "structHash",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4648,
"src": "1172:10:54",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
},
{
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
],
"expression": {
"id": 4653,
"name": "ECDSA",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 13816,
"src": "1125:5:54",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_contract$_ECDSA_$13816_$",
"typeString": "type(library ECDSA)"
}
},
"id": 4654,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "toTypedDataHash",
"nodeType": "MemberAccess",
"referencedDeclaration": 13815,
"src": "1125:21:54",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_pure$_t_bytes32_$_t_bytes32_$returns$_t_bytes32_$",
"typeString": "function (bytes32,bytes32) pure returns (bytes32)"
}
},
"id": 4658,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "1125:58:54",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"functionReturnParameters": 4652,
"id": 4659,
"nodeType": "Return",
"src": "1118:65:54"
}
]
},
"functionSelector": "0ff28b0c",
"id": 4661,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "getTypedDataV4Hash",
"nameLocation": "1039:18:54",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 4649,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 4648,
"mutability": "mutable",
"name": "structHash",
"nameLocation": "1066:10:54",
"nodeType": "VariableDeclaration",
"scope": 4661,
"src": "1058:18:54",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
},
"typeName": {
"id": 4647,
"name": "bytes32",
"nodeType": "ElementaryTypeName",
"src": "1058:7:54",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"visibility": "internal"
}
],
"src": "1057:20:54"
},
"returnParameters": {
"id": 4652,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 4651,
"mutability": "mutable",
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "VariableDeclaration",
"scope": 4661,
"src": "1099:7:54",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
},
"typeName": {
"id": 4650,
"name": "bytes32",
"nodeType": "ElementaryTypeName",
"src": "1099:7:54",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"visibility": "internal"
}
],
"src": "1098:9:54"
},
"scope": 4683,
"src": "1030:160:54",
"stateMutability": "view",
"virtual": false,
"visibility": "public"
},
{
"body": {
"id": 4681,
"nodeType": "Block",
"src": "1261:220:54",
"statements": [
{
"expression": {
"arguments": [
{
"arguments": [
{
"id": 4669,
"name": "EIP712_TYPE_HASH",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4588,
"src": "1329:16:54",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
{
"id": 4670,
"name": "_hashedName",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4594,
"src": "1364:11:54",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
{
"id": 4671,
"name": "_hashedVersion",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4596,
"src": "1394:14:54",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
{
"expression": {
"id": 4672,
"name": "block",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": -4,
"src": "1427:5:54",
"typeDescriptions": {
"typeIdentifier": "t_magic_block",
"typeString": "block"
}
},
"id": 4673,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "chainid",
"nodeType": "MemberAccess",
"src": "1427:13:54",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"arguments": [
{
"id": 4676,
"name": "this",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": -28,
"src": "1467:4:54",
"typeDescriptions": {
"typeIdentifier": "t_contract$_EIP712_$4683",
"typeString": "contract EIP712"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_contract$_EIP712_$4683",
"typeString": "contract EIP712"
}
],
"id": 4675,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "1459:7:54",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_address_$",
"typeString": "type(address)"
},
"typeName": {
"id": 4674,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "1459:7:54",
"typeDescriptions": {}
}
},
"id": 4677,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "1459:13:54",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
},
{
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
},
{
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
{
"typeIdentifier": "t_address",
"typeString": "address"
}
],
"expression": {
"id": 4667,